# cteate a GDS file
f <- createfn.gds("test.gds")
# commom types
n <- add.gdsn(f, "int", val=1:100, compress="ZIP")
# you can not read the variable "int" because of writing mode
# read.gdsn(n)
readmode.gdsn(n)
# now you can read "int"
read.gdsn(n)
# 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