bogind / easycsv

An R package for easy data loading from multiple tables
GNU Lesser General Public License v2.1
4 stars 4 forks source link

New combine parameter #3

Closed alexfun closed 5 years ago

alexfun commented 5 years ago

Hi, I've added the combine parameter so users can choose to read files into the global environment, data table, or a list. This should resolve https://github.com/bogind/easycsv/issues/2. I couldn't (easily) work out how your documentation is being generated so I did not update the documentation to reflect the change. Something like the following should suffice:

@param combine character taking value from \code{c("global", "data.frame", "list")}. Defaults to \code{global}, in which case the read csv files will be assigned to a variable in the global environment with name taken from the file being read. The \code{data.frame} option binds all read csvs into a data table and converts it to a data frame if the argument \code{data.table = F}. Finally, \code{list} returns a named list of the read csvs, with names taken from the files being read.