loads_MSqRob | R Documentation |
loads_MSqRob
is almost a pure copy of the loads
function from the saves
package by Dar\'oczi (2013) with some minor code tweaks to make it work for MSqRob. It loads data from a special binary file format (RDatas) made up by the MSqRob_saves
function. This special, uncompressed tar archive inlcudes several separate RData files (saved by MSqRob_saves
function) as being columns/variables of a data frame.
loads_MSqRob(file = NULL, variables = NULL, ultra.fast = FALSE, printProgress = FALSE, shiny = FALSE, message = NULL)
file |
character string: the (RDatas) filename from which to load the variables. If using |
variables |
Optional: a character vector containing the variable names to load. If not specified, all variables will be loaded. |
ultra.fast |
boolean: if |
to.data.frame |
boolean: the default behavior of loads is to concatenate the variables to a list. This could be overriden with |
The purpose of this function is to be able only a few variables of a data.frame really fast. It is done by reading and writing datas in binary format without any transformations, and combining the speed of only reading the needed part of an archive.
Some minor experiments shows a huge performance gain against using SQLite/MySQL backends or loading whole binary data, but be conscious always choosing the aprropriate method to write and read data.
The author of the saves
package (Dar\'oczi) emphasizes: this package could be useful only in few cases!
Loaded data.frame.
Dar\'oczi, G. (2013). saves: Fast load variables. R package version 0.5, URL http://cran.r-project.org/package=saves
Other saves_MSqRob
to save R objects to RDatas binary format: inspect_loads_MSqRob
Other inspect_loads_MSqRob
to inspect the content of an RDatas binary object.: saves_MSqRob
## Not run: # Loading the 'v1' and 'v5' variables of the demo dataset. data(evs.2000.hun) saves(evs.2000.hun) evs.filtered.list <- loads("evs.2000.hun.RDatas", c('v1', 'v5')) evs.filtered.df <- loads("evs.2000.hun.RDatas", c('v1', 'v5'), to.data.frame=TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.