mcsv_r(files, a.names = NULL, l.name = NULL, list = TRUE, pos = 1, envir = as.environment(pos))mcsv_w(..., dir = NULL, open = FALSE, sep = ", ", dataframes = NULL, pos = 1, envir = as.environment(pos))
NULL
assigns the name(s) of the csv files in the directory, without the file
extension, to the objects in the global environment.NULL
)
uses L1
.TRUE
then a list of dataframes is crated in
the global environment in addition to the individual dataframes.NULL
a directory will be
created in the working directory with the data and time stamp as the folder
name.TRUE
opens the directory upon completion.termco
or
polarity
) can be passed as well.mcsv_r
- reads in multiple csv files at once.
mcsv_w
- creates a directory with multiple csv files.
Silently returns the path of the directory.
mcsv_r
- Read and assign multiple csv files at the same time.
mcsv_w
- Write multiple csv files into a file at the same time.
mcsv is short for "multiple csv" and the suffix c(_r, _w) stands for "read" (r) or "write" (w).
mcsv_r
is useful for reading in multiple csv files
from cm_df.temp
for interaction with
cm_range2long
.
## <strong>Not run</strong>: # ## mcsv_r EXAMPLE: # mtcarsb <- mtcars[1:5, ]; CO2b <- CO2[1:5, ] # (a <- mcsv_w(mtcarsb, CO2b, dir="foo")) # rm("mtcarsb", "CO2b") # gone from .GlobalEnv # (nms <- dir(a)) # mcsv_r(file.path(a, nms)) # mtcarsb; CO2b # rm("mtcarsb", "CO2b") # gone from .GlobalEnv # mcsv_r(file.path(a, nms), paste0("foo.dat", 1:2)) # foo.dat1; foo.dat2 # rm("foo.dat1", "foo.dat2") # gone from .GlobalEnv # library(reports); delete("foo") # # ## mcsv_w EXAMPLES: # (a <- mcsv_w(mtcars, CO2, dir="foo")) # delete("foo") # # ## Write lists of dataframes as well # poldat <- with(DATA.SPLIT, polarity(state, person)) # term <- c("the ", "she", " wh") # termdat <- with(raj.act.1, termco(dialogue, person, term)) # mcsv_w(poldat, termdat, mtcars, CO2, dir="foo2") # delete("foo2") # ## <strong>End(Not run)</strong>