defineKnots: Define the knots location

defineKnotsR Documentation

Define the knots location

Description

defineKnots function determine the knots location for a ptrSet or ptrRaw object. There is three possibilities :

  • method = expiration in the expiration periods, a knots is placed every knotsPeriod seconds, and 1 knots in the middle of two expiration, one at begin and at the end

  • method= uniforme, the knots are placed uniformly every knotsPeriod time points

  • give in knotsList a list of knot, with all base name file in name of the list element. All file must be informed. The knots location must be contained in the time axis

Usage

defineKnots(
  object,
  knotsPeriod = 3,
  method = c("expiration", "uniform", "manual")[1],
  knotsList = NULL,
  ...
)

## S4 method for signature 'ptrRaw'
defineKnots(
  object,
  knotsPeriod = 3,
  method = c("expiration", "uniform")[1],
  knotsList = NULL,
  timeLimit = list(NULL)
)

## S4 method for signature 'ptrSet'
defineKnots(
  object,
  knotsPeriod = 3,
  method = c("expiration", "uniform")[1],
  knotsList = NULL
)

Arguments

object

ptrSet object

knotsPeriod

the period in second (times scale) between two knots for the two dimensional modelization

method

expiration or uniform

knotsList

a list of knot location for each files, with all base name file in name of the list element

...

not used

timeLimit

index time of the expiration limits and background

Value

numeric vector of knots

a list with numeric vector of knots for each file

Examples

library(ptairData)
dirRaw <- system.file("extdata/exhaledAir", package = "ptairData")
exhaledPtrset <- createPtrSet(dir=dirRaw, setName="exhaledPtrset", 
mzCalibRef = c(21.022, 60.0525), fracMaxTIC = 0.7, saveDir = NULL )

#### placed knots every 2 times points
exhaledPtrset <- defineKnots(exhaledPtrset ,knotsPeriod=2,method='uniform')

#### placed knots every 3 times points in the expiration (default)
exhaledPtrset <- defineKnots(exhaledPtrset ,knotsPeriod=3,method='expiration')

camilleroquencourt/ptairMS documentation built on April 19, 2024, 1:27 p.m.