# cteate a GDS file
f <- createfn.gds("test.gds")
add.gdsn(f, "int", 1:100)
add.gdsn(f, "int.matrix", matrix(1:(50*100), nrow=100, ncol=50))
put.attr.gdsn(index.gdsn(f, "int.matrix"), "int", 1:10)
print(f, all=TRUE)
print(f, all=TRUE, attribute=TRUE)
print(f, all=TRUE, attribute=TRUE, attribute.trim=FALSE)
show(index.gdsn(f, "int"))
show(index.gdsn(f, "int.matrix"))
# 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