search for: 4626l

Displaying 1 result from an estimated 1 matches for "4626l".

Did you mean: 4626
2013 Mar 07
2
Copying a dataframe
...the data frame that is input. c.leng<-length(tab[,1]); r.leng<-length(tab[1,]); opdf<-data.frame(ncol=c.leng, nrow=r.leng); a<-1; while(a<=c.leng) { opdf[[1]][a]<-tab[[1]][a]; a<-a+1; } This is the error message I am getting: Error in `[[<-.data.frame`(`*tmp*`, 1, value = c(4626L, 1L)) : replacement has 2 rows, data has 1 I have tried printing out the dimensions of tab and mat separately to see if they are the same, but tab is 4626 rows, 21 columns (which is correct), while mat says 1row and 2columns. Would be grateful if you could tell me where I am going wrong? Is there...