Learn R Programming

nws (version 1.6.3)

nwsStoreFile: netWorkSpace Class Method

Description

Store a new value into a variable in the workspace from a file.

Usage

## S3 method for class 'netWorkSpace':
nwsStoreFile(.Object, xName, fObj, n=0)

Arguments

.Object
a netWorkSpace class object
xName
name of the variable to be stored
fObj
file to read data from to store in the variable.
n
Number of bytes to write. A value of zero means to write all the data in the file.

Details

nwsStoreFile works like nwsStore, except that the value to store in the workspace variable comes from a file. If 'fObj' is a character string, nwsStoreFile calls 'file' to obtain a file connection which is opened for the duration of the method.

See Also

nwsStore

Examples

Run this code
ws <- netWorkSpace('nws example')
nwsStoreFile(ws, 'x', '/etc/printcap')

Run the code above in your browser using DataLab