Learn R Programming

nws (version 1.7.0.1)

nwsFetchFile: Fetch a Value and Write It to a File

Description

Fetch a value of a netWorkSpace variable and write it to a file.

Usage

"nwsFetchFile"(.Object, xName, fObj)

Arguments

.Object
a netWorkSpace object.
xName
character string giving the name of the variable to find.
fObj
file object or character string specifying file to write data to.

Details

The nwsFetchFile method looks in the shared netWorkSpace .Object for a value bound to xName; if it finds such a value, nwsFetchFile writes the value to the specified file and removes it from the variable. If no value is found, nwsFetchFile blocks until a value for xName becomes available.

See Also

nwsFindFile, nwsFetch

Examples

Run this code
## Not run: 
# ws <- netWorkSpace('nws example')
# nwsStore(ws, 'x', 'Hello, world\n')
# nwsFetchFile(ws, 'x', 'hello.txt')
# ## End(Not run)

Run the code above in your browser using DataLab