BioSSA: Construct a new BioSSA decomposition object

Description Usage Arguments Details Value See Also Examples

View source: R/BioSSA.R

Description

Construct a new BioSSA decomposition object from passed embryo object or formula.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## S3 method for class 'formula'
BioSSA(x, data = NULL, ...)
## S3 method for class 'embryo2d'
BioSSA(x,
       ...,
       step = 0.5,
       L = c(50, 50),
       xlim = c(-Inf, Inf),
       ylim = c(-Inf, Inf),
       xperc = c(0, 100),
       yperc = c(0, 100),
       units = c("percent", "original"))
## S3 method for class 'embryo3d'
BioSSA(x, ..., sweep = sweep.function)

Arguments

x

formula or object of class ‘embryo2d’ or ‘embryo3d’

...

further arguments passed to ssa with parameter kind = '2d-ssa'; ssa is the main function of the ‘Rssa’ package, which performs Singular Spectum Analysis

units

units for L, step, xlim and ylim arguments. ‘percent’ means percent of whole embryo length

L

vector of two elements, window length (in ‘units’)

step

grid step for interpolation (in ‘units’)

xlim, ylim

numeric vectors of two elements, cutoff bounds by AP and DV axes (in ‘units’)

xperc, yperc

numeric vectors of two elements, denote the size (width and height) of presented embryo part in percent (usefull if data present only a part of the whole embryo)

data

a data frame (or more precisely, anything that is a valid envir argument in eval, e.g., a list or an environment) containing values for any variables in the formula. If not found in data, or if data is unspecified, the variables are looked for in the environment of the formula

sweep

sweeping function for planarize 3d embryo to 2d ones. Just now is only default function (sweep.function) is supported, which provides cylindrical sweeping (MB, projection; please, somebody, fix my lexics...). Interface for user-specified planarization functions in developing now (In future, it will be function which takes object of class ‘embryo3d’ and returns list of ‘embryo2d’ objects)

Details

For the ‘formula’: formula is evaluated with using data. The specified data are transformed to ‘embryo2d’ or ‘embryo3d’ object (it's determined by formula length). the obtained object is passed (along with arguments specified by ...) to the BioSSA method for corresponding class.

For the ‘embryo3d’ object: 2d projection is performed (using sweep function, topology is kept, that is, along Y (DV) axis the circulat topology is considered. Thus, ‘embtyo3d’ contains ‘embryo2d’ object. Then the BioSSA method for ‘embryo2d’ class is called.

For the ‘embryo2d’ object: the linear interpolation (see interp) is performed to the regular grid with step step. For regular data, the conventional 2D-SSA procedure (ssa from ‘Rssa’) is called.

Value

‘embryo2d’ or ‘embryo3d’ object, according to the type of x, stores the result of decomposition of the trajectory matrix. To obtain the decomposition of the data, reconstruct should be called.

See Also

BioSSA-class, reconstruct, ssa, plot.ssa.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
xlim <- c(22, 88)
ylim <- c(32, 68)
L <- c(15, 15)

file <- system.file("extdata/data", "ab16.txt", package = "BioSSA")
df <- read.emb.data(file)

bss <- BioSSA(cad ~ AP + DV, data = df, ylim = ylim, xlim = xlim, L = L)
summary(bss)
plot(bss)
plot(bss, type = "ssa-vectors")
plot(bss, type = "ssa-vectors", vectors = "factor")

BioSSA/BioSSA documentation built on Dec. 28, 2017, 9:27 p.m.