Subset a bigSNP
Subset (copy) of a bigSNP
, also stored on disk.
snp_subset( x, ind.row = rows_along(x$fam), ind.col = rows_along(x$map), backingfile = NULL ) ## S3 method for class 'bigSNP' subset( x, ind.row = rows_along(x$fam), ind.col = rows_along(x$map), backingfile = NULL, ... )
x |
A bigSNP. |
ind.row |
Indices of the rows (individuals) to keep. Negative indices can be used to exclude row indices. Default: keep them all. |
ind.col |
Indices of the columns (SNPs) to keep. Negative indices can be used to exclude column indices. Default: keep them all. |
backingfile |
Prefix of the two new files created (".bk" and ".rds"). By default, it is automatically determined by appending "_sub" and a number to the prefix of the input bigSNP backing files. |
... |
Not used. |
The path to the RDS file that stores the bigSNP
object.
str(test <- snp_attachExtdata()) # keep only first 50 samples and SNPs rdsfile <- snp_subset(test, ind.row = 1:50, ind.col = 1:50) str(snp_attach(rdsfile)) # remove only first 50 samples and SNPs rdsfile2 <- snp_subset(test, ind.row = -(1:50), ind.col = -(1:50)) str(snp_attach(rdsfile2))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.