# 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))
f
index.gdsn(f, "list/x")
index.gdsn(f, index=c("list", "x"))
index.gdsn(f, index=c(1, 1))
index.gdsn(f, index=c("list", "z"))
## Not run:
# index.gdsn(f, "list/x/z")
# # Error in index.gdsn(f, "list/x/z") : Invalid path "list/x/z"!
# ## End(Not run)
# return NULL
index.gdsn(f, "list/x/z", silent=TRUE)
# close the GDS file
closefn.gds(f)
# delete the temporary file
unlink("test.gds", force=TRUE)
Run the code above in your browser using DataLab