structure2vector: Convert a structure into a vector

structure2vectorR Documentation

Convert a structure into a vector

Description

The structure is supposed to be a list. Flattening is done by extracting the given fields (return.fields) and applying the additional function (return.extra). This is mainly to be used within sapply and similar.

Usage

structure2vector(d, return.fields = NULL, return.extra = NULL)

kinetics2vector(
  d,
  condition = NULL,
  return.fields = c("Synthesis", "Half-life"),
  return.extra = NULL
)

Arguments

d

the data structure

return.fields

which fields should be extracted directly (may be NULL)

return.extra

apply a function returning a flat list or vector (may be NULL)

condition

if the original grandR object had Condition set, which condition to extract (NULL otherwise)

Value

the data flattened into a vector

Functions

  • kinetics2vector(): Convert the output of the FitKinetics methods into a vector

Examples

sars <- ReadGRAND(system.file("extdata", "sars.tsv.gz", package = "grandR"),
                  design=c("Condition",Design$dur.4sU,Design$Replicate))
sars <- Normalize(sars)
fit <- FitKineticsGeneLeastSquares(sars,"SRSF6")$Mock
print(fit)
kinetics2vector(fit)


grandR documentation built on April 4, 2025, 2:27 a.m.