write.gdsn | R Documentation |
Write data to a GDS node.
write.gdsn(node, val, start=NULL, count=NULL, check=TRUE)
node |
an object of class |
val |
the data to be written |
start |
a vector of integers, starting from 1 for each dimension |
count |
a vector of integers, the length of each dimnension |
check |
if |
start
, count
: The values in data are taken to be those in
the array with the leftmost subscript moving fastest.
start
and count
should both exist or be missing.
If start
and count
are both missing, the dimensions and values
of val
will be assigned to the data field.
GDS format does not support missing characters NA
, and any
NA
will be converted to a blank string ""
.
None.
Xiuwen Zheng
append.gdsn
, read.gdsn
,
add.gdsn
# cteate a GDS file
f <- createfn.gds("test.gds")
###################################################
n <- add.gdsn(f, "matrix", matrix(1:20, ncol=5))
read.gdsn(n)
write.gdsn(n, val=c(NA, NA), start=c(2, 2), count=c(2, 1))
read.gdsn(n)
###################################################
n <- add.gdsn(f, "n", val=1:12)
read.gdsn(n)
write.gdsn(n, matrix(1:24, ncol=6))
read.gdsn(n)
write.gdsn(n, array(1:24, c(4,3,2)))
read.gdsn(n)
# close the GDS file
closefn.gds(f)
# delete the temporary file
unlink("test.gds", force=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.