getfile.gdsn: Output a file from a stream container

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/gdsfmt-main.r

Description

Get a file from a GDS node of stream container.

Usage

1
getfile.gdsn(node, out.filename)

Arguments

node

an object of class gdsn.class, a GDS node

out.filename

the file name of output stream

Value

None.

Author(s)

Xiuwen Zheng

References

http://github.com/zhengxwen/gdsfmt

See Also

addfile.gdsn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# save a .RData object
obj <- list(X=1:10, Y=seq(1, 10, 0.1))
save(obj, file="tmp.RData")

# cteate a GDS file
f <- createfn.gds("test.gds")

add.gdsn(f, "double", val=seq(1, 1000, 0.4))
addfile.gdsn(f, "tmp.RData", "tmp.RData")

# open the GDS file
closefn.gds(f)


# open the existing file
(f <- openfn.gds("test.gds"))

getfile.gdsn(index.gdsn(f, "tmp.RData"), "tmp1.RData")
(obj <- get(load("tmp1.RData")))

# open the GDS file
closefn.gds(f)


# delete the temporary files
unlink(c("test.gds", "tmp.RData", "tmp1.RData"), force=TRUE)

gdsfmt documentation built on Dec. 26, 2020, 6 p.m.