SCM Repository

[chemosensors] View of /pkg/man/Scenario-class.Rd
ViewVC logotype

View of /pkg/man/Scenario-class.Rd

Parent Directory Parent Directory | Revision Log Revision Log

Revision 55 - (download) (as text) (annotate)
Wed Mar 2 14:48:07 2016 UTC (2 years, 11 months ago) by variani
File size: 2726 byte(s)
new Rd produced by roxygen2
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ScenarioClass.R, R/ScenarioClassMethods.R
\title{Class Scenario.}

\S4method{initialize}{Scenario}(.Object, T, nT, V, nV, tunit, randomize, name,
  gases, gnames, concUnits, concUnitsInt, seed, ...)

\item{...}{parameters of constructor.}
List of the default parameters.
Class \code{Scenario} represents a concentration profile to build a concentration matrix.

Function to get default constructor parameters of class \code{\link{Scenario}}.

Constructor method of Scenario Class.

Wrapper function Scenario.
Slots of the class:
  \code{tunit} \tab Time length of a single gas pulse.
    The unity value means experiments with steady-state sensor signals. The default value is \code{1}. \cr
  \code{gases} \tab Gas indices. \cr
  \code{ngases} \tab The number of gases. \cr
  \code{gnames} \tab Names of gases. \cr
  \code{concUnits} \tab Concentration units external to the model, values given in an input concentration matrix. \cr
  \code{concUnitsInt} \tab Concentration units internal to the model. \cr
  \code{df} \tab Data frame of a concentration profile with the columns:
    names of gases (\code{gnames}), \code{time}, \code{set}, \code{lab} and \code{tpoint}. \cr

Methods of the class:
  \code{add<-} \tab A replacement method to add gas pulses to the object. \cr
  \code{getConc} \tab Get the concentration matrix of the object. \cr

The \code{plot} method has one type (parameter \code{y}):
  \code{time} \tab Shows the concentration of gases over time. \cr
# scenario object (empty): default initialization 
sc <- Scenario(tunit = 60)

# add data to 
add(sc) <- list("A", 0.05, 2)
add(sc) <- list("B", 0.05, 2)
add(sc) <- list("C", 1, 2)
add(sc) <- list(c("A", "B", "C"), c(0.02, 0.04, 0.5), 2)

# scenario object: custom initialization
set <- c("A 0.05", "B 0.05", "C 1", "A 0.02, B 0.04, C 0.5") 
sc <- Scenario(tunit = 60, T = set, nT = 2, V = set, nV = 2)

# a real example of Scenario
sc <- Scenario(name = "Regression", tunit = 60, concUnits = "perc",
  T = c("A 0.01", "A 0.02", "A 0.05"), nT = 30,
  V = c("A 0.01", "A 0.02", "A 0.05"), nV = 30,
  randomize = TRUE)

add(sc) <- list("A", 0.03, 30, "T")
add(sc) <- list("A", 0.04, 30, "T")

# get information about the sensor

## Not run:
plot(sc, facet = FALSE, concUnits = 'norm')
## End(Not run)

# extract conc. matrix from scenatio
conc <- getConc(sc)

ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge