Re: [R] assign a data frame name from a list in do loop

2021-07-14 Thread Kai Yang via R-help
Hello Rui, it's very helpful.  Thank you, Kai On Wednesday, July 14, 2021, 10:07:57 AM PDT, Rui Barradas wrote: Hello, Just before for(j in 1:nrow(ora)) include the following code line (I have removed the underscore): sdif <- vector("list", length = nrow(ora)) In the loop: sdif[[j

Re: [R] assign a data frame name from a list in do loop

2021-07-14 Thread Rui Barradas
Hello, Just before for(j in 1:nrow(ora)) include the following code line (I have removed the underscore): sdif <- vector("list", length = nrow(ora)) In the loop: sdif[[j]] <- sqldf(etc) Also, once again, why noquote? It's better to form file names with file.path: rdcsv  <- file.path(

[R] assign a data frame name from a list in do loop

2021-07-14 Thread Kai Yang via R-help
Hello List, I wrote a script below to compare the difference of data frames structure (and will do something else). First of all I save the file list in a data frame ora, then I use for loop to 1. load the data from two resource, 2. generate data structure into two data frames, 3.do the compares