[R] 1.8.1 behavior change?

Al Piszcz apiszcz at solarrain.com
Sat Nov 22 17:57:32 CET 2003


In <R 1.8.1 the following fragment worked properly, now (1.8.1)
it creates the following warning/error:

Any advice appreciated.


  stt <- data.frame()
  # load all datasets into a dataframe
  for (ds in 1:n) {
    stt[ds] <- as.matrix(read.table(fileList[ds]))
  }


--

>   stt <- data.frame()
>   # load all datasets into a dataframe
>   for (ds in 1:n) {
+     stt[ds] <- as.matrix(read.table(fileList[ds]))
+   }
Error in "[<-.data.frame"(`*tmp*`, ds, value =
as.matrix(read.table(fileList[ds]))) :
        replacement has 358 rows, data has 0
>




More information about the R-help mailing list