Learn R Programming

gdsfmt (version 1.8.3)

createfn.gds: Create a GDS file

Description

Create a new CoreArray Genomic Data Structure (GDS) file.

Usage

createfn.gds(filename, allow.duplicate=FALSE)

Arguments

filename
the file name of a new GDS file to be created
allow.duplicate
if TRUE, it is allowed to open a GDS file with read-only mode when it has been opened in the same R session

Value

Return an object of class gds.class:
filename
the file name to be created
id
internal file id
root
an object of class gdsn.class, the root of hierachical structure
readonly
whether it is read-only or not

Details

Keep in mind that the new file may not actually be written to disk until closefn.gds or sync.gds is called.

References

http://github.com/zhengxwen/gdsfmt

See Also

openfn.gds, closefn.gds

Examples

Run this code
# cteate a GDS file
f <- createfn.gds("test.gds")

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

f

# 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