Return the number of child nodes

Share:

Description

Return the number of child nodes for a GDS node.

Usage

1
cnt.gdsn(node)

Arguments

node

an object of class gdsn.class, a GDS node

Value

If node is a folder, return the numbers of variables in the folder including child folders. Otherwise, return 0.

Author(s)

Xiuwen Zheng

References

http://github.com/zhengxwen/gdsfmt

See Also

objdesp.gdsn, ls.gdsn, index.gdsn, delete.gdsn, add.gdsn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# cteate a GDS file
f <- createfn.gds("test.gds")

# add a list to "test.gds"
node <- add.gdsn(f, name="list", val=list(x=c(1,2), y=c("T","B","C"), z=TRUE))
cnt.gdsn(node)
# 3

closefn.gds(f)


# delete the temporary file
unlink("test.gds", force=TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.