Learn R Programming

SeqArray (version 1.12.5)

seqTranspose: Transpose Data Array

Description

Transpose data array or matrix for possibly higher-speed access.

Usage

seqTranspose(gdsfile, var.name, compress=NULL, verbose=TRUE)

Arguments

gdsfile
var.name
the variable name with '/' as a separator
compress
the compression option used in add.gdsn; or determine automatically if NULL
verbose
if TRUE, show information

Value

None.

Details

It is designed for possibly higher-speed access. More details will be provided in the future version.

See Also

seqGetData, seqApply

Examples

Run this code
# the VCF file
(vcf.fn <- seqExampleFileName("vcf"))

# convert
seqVCF2GDS(vcf.fn, "tmp.gds")

# list the structure of GDS variables
f <- seqOpen("tmp.gds", FALSE)
f

seqTranspose(f, "genotype/data")
f

# the original array
index.gdsn(f, "genotype/data")
# the transposed array
index.gdsn(f, "genotype/~data")

# close
seqClose(f)

# delete the temporary file
unlink("tmp.gds")

Run the code above in your browser using DataLab