Hi,

I am trying to create a data.frame called "correction_factors_BRD4_norm" by dividing columns from a data.frame called "BRD4". The output is correct and has done the right division but my column names "TMT_1", "TMT_2" etc are not labeled. What is wrong with my code?

correction_factors_BRD4_norm <- data.frame(TMT_1 = BRD4[,10] / BRD4[,10],
TMT_2 = BRD4[,10] / BRD4[,11],
TMT_3 = BRD4[,10] / BRD4[,12],
TMT_4 = BRD4[,10] / BRD4[,13],
TMT_5 = BRD4[,10] / BRD4[,14],
TMT_6 = BRD4[,10] / BRD4[,15],
TMT_7 = BRD4[,10] / BRD4[,16],
TMT_8 = BRD4[,10] / BRD4[,17],
TMT_9 = BRD4[,10] / BRD4[,18],
TMT_10 = BRD4[,10] / BRD4[,19],
TMT_11 = BRD4[,10] / BRD4[,20],
TMT_12 = BRD4[,10] / BRD4[,21],
TMT_13 = BRD4[,10] / BRD4[,22],
TMT_14 = BRD4[,10] / BRD4[,23],
TMT_15 = BRD4[,10] / BRD4[,24],
TMT_16 = BRD4[,10] / BRD4[,25])

Without this object, it's hard to tell. See the FAQ: How to do a minimal reproducible example `reprex` for beginners. The form of the code is ok.

``````dat <- data.frame(TMT_1 = mtcars[,1] / mtcars[,1],
TMT_2 = mtcars[,1] / mtcars[,2],
TMT_3 = mtcars[,1] / mtcars[,3],
TMT_4 = mtcars[,1] / mtcars[,4],
TMT_5 = mtcars[,1] / mtcars[,5],
TMT_6 = mtcars[,1] / mtcars[,6],
TMT_7 = mtcars[,1] / mtcars[,7],
TMT_8 = mtcars[,1] / mtcars[,8],
TMT_9 = mtcars[,1] / mtcars[,9])