I am trying to add the data from one data frame into a much larger data frame. Basically, in my case "df" is a data frame where the row lengths are 376, but I want to put these 376 items into "data" which will have row lengths of 10000. The reason I am doing this is because while my data in "df" is capped at 376 items per row, each row is not complete and I am going to concatenate rows together once I get them into the larger "data" data frame. The issue with my code shown below is that when I try transferring a row of "df" into a row of "data", I get numbers instead of some letter name that should be shown in place (I'm assuming the numbers are the location of the item in memory). How do I fix my code so that I get the actual item names transferred over to "data"?
df<-read.table("msigdb.v5.2.symbols.txt", fill = TRUE)
data<-data.frame(matrix(NA,ncol = 10000, nrow = 19337))
for (w in 1:20){
data[w,]<-df[w,]
}
data[1,1] should be "AAANWWTGC_UNKNOWN", instead I am just getting "5"