r - Load files from a list of file names in a data frame -
i have created program calculation excel worksheet. data worksheet comes machine. have set machine export given folder. want r program input data folder (data) , run code, export different folder (results). don't want code run on data done. have done:
library(gdata) library (xlconnect) #################### data in ######################## setwd("c:/r/data/") datain <- list.files(pattern="*.xlsx", full.names=t, recursive=false) ##################### results in ################### setwd("c:/r/result/") results <- list.files(pattern="*.xlsx", full.names=t, recursive=false) ################## set wd data ################################# setwd("c:/r/c/") torun <- datain[!(datain %in% results)] ############################################################################ dataframtorun <- data.frame(torun) dataframtorun torun 1 ./343sdasd.xlsx 2 ./4ewwq.xlsx 3 ./tricarb.xlsx
i want load 3 files above , run program in loop.
Comments
Post a Comment