0

I have a dataframe "prod_fm_wt_3 contain 12 integer column. After I did a matrix transform

 `t <- t(prod_fm_wt_3)`

I did a median calculation

 w1 <- median(t[,1])

then if I use

print(w1)

it will show me 12 different numbers enter image description here

but when I want to put those 12 numbers into a data frame column

it show 12 same numbers, enter image description here How can I put the 12 number I print above to a column in data frame?

  • The Code I use for generate dataframe column is "test_frame$test=w1" – Kelly yisi Liu Nov 10 '21 at 22:19
  • 1
    Hello @Kelly yisi Liu, Welcome to SO! Please provide a [minimal reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) so that other SO users can help you in the best way. Cheers. – lovalery Nov 10 '21 at 23:29

0 Answers0