Description Usage Arguments Details Value Author(s) See Also Examples
Connect to a data source on local disk
1 2 | localDiskConn(loc, nBins = 0, fileHashFn = NULL, autoYes = FALSE,
reset = FALSE, verbose = TRUE)
|
loc |
location on local disk for the data source |
nBins |
number of bins (subdirectories) to put data files into - if anticipating a large number of k/v pairs, it is a good idea to set this to something bigger than 0 |
fileHashFn |
an optional function that operates on each key-value pair to determine the subdirectory structure for where the data should be stored for that subset, or can be specified "asis" when keys are scalar strings |
autoYes |
automatically answer "yes" to questions about creating a path on local disk |
reset |
should existing metadata for this object be overwritten? |
verbose |
logical - print messages about what is being done |
This simply creates a "connection" to a directory on local disk (which need not have data in it). To actually do things with this connection, see ddo
, etc. Typically, you should just use loc
to specify where the data is or where you would like data for this connection to be stored. Metadata for the object is also stored in this directory.
a "kvConnection" object of class "localDiskConn"
Ryan Hafen
addData
, ddo
, ddf
, localDiskConn
1 2 3 4 5 6 7 8 9 | # connect to empty localDisk directory
conn <- localDiskConn(file.path(tempdir(), "irisSplit"), autoYes = TRUE)
# add some data
addData(conn, list(list("1", iris[1:10,])))
addData(conn, list(list("2", iris[11:110,])))
addData(conn, list(list("3", iris[111:150,])))
# represent it as a distributed data frame
irisDdf <- ddf(conn, update = TRUE)
irisDdf
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.