R: Read or write R objects from or to the file system

from.dfs {rmr2} | R Documentation

## Read or write R objects from or to the file system

### Description

Functions that read or write R objects from or to the file system

### Usage

    to.dfs(kv, output = dfs.tempfile(), format = "native")
    from.dfs(input, format = "native")

### Arguments

`kv` | A key-value pair; also, a vector, list, matrix or a data frame (in this case the keys will be set to NULL)
`input` | A valid path or a `big.data.object`
`output` | A valid path
`format` | For `from.dfs` either a string naming a format, the same as those allowed by `make.input.format`, or the value returned by `make.input.format`. The same is true for `to.dfs`, but refer to `make.output.format` instead.

### Details

These functions allow to move data from RAM to the file system and back. Keep in mind that the capacity of these two storage media is different by two or more orders of magnitude, so the conversion will make sense only in specific situations. These functions do not perform any size control, so the responsibility is on the user. For the local backend, file system means the local file system. For the Hadooop backend it means HDFS

### Value

`from.dfs` returns the object whose representation is contained in `input`. `to.dfs` returns the value of `output` or, when this is missing, a `big.data.object`

### Examples

    from.dfs(to.dfs(1:10))
    from.dfs(to.dfs(keyval(1, 1:10)))

[Package rmr2 version 3.3.1 Index]