Description Usage Arguments Details Value Author(s) See Also Examples
Function gentransform
enables to transform different data structures used in the genasis package one to another.
1 | gentransform(x, y=NA, input="openair", output=NA, pollutant=NA)
|
x |
vector of concentration values or data frame of genasis/openair type. See 'Details' for more detailed description of both data types. |
y |
vector of measurement dates in the case of vector input only. |
input |
type of data frame in the case of data frame input. The allowed values are |
output |
type of output data frame. As in the |
pollutant |
name of the pollutant(s), which will be included into resulting data frame. |
The gentransform
function serves from transforming data from one three different input formats to one of two formats used in genasis package: Option "openair" uses openair format of data frame with first column of name 'date' and class "Date"
, optional columns of names "date_end"
, "temp"
, "wind"
and "note"
and other columns of type "numeric"
containing concentration values and named by names of the compounds. input="genasis"
is used for input of a data frame with six columns "valu"
, "comp"
, "date_start"
, "date_end"
, "temp"
and "wind"
where the first, fifth and sixth are of class "numeric"
, second of class "character"
and third and fourth columns could be both "character"
or "Date"
class. The names of columns in input="genasis"
are not rigid, only their order is assumed. There is also a possibility to input x
and y
as two vectors of equal lenght, first of class "numeric"
containing concentration values, second of class "character"
or "Date"
containing measurement dates.
Argument output
must be specified in the case of vector input. In other cases it is set up equal to input
, which lefts the data frame without significant changes (except sorting the rows by date).
|
Data frame or vector depending on the |
Jiri Kalina
kalina@mail.muni.cz
genloq, genoutlier, genhistogram, genpastoact,
genanaggr, genplot, genstatistic, genwhisker
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Input as a pair of vectors.
gentransform(c(0.386,0.256,0.182,0.254),
c("2013-05-01","2013-06-03","2013-07-05","2013-08-07"),
output="genasis")
gentransform(c(0.386,0.256,0.182,0.254),
c("2013-05-01","2013-06-03","2013-07-05","2013-08-07"),
output="openair",pollutant="PeCB")
## Not run: ## Data frame inputs:
data(kosetice.act.genasis)
gentransform(kosetice.act.genasis,input="genasis",output="openair")
data(kosetice.pas.openair)
gentransform(genpastoact(genoutlier(kosetice.pas.openair,plot=FALSE)$res),
output="genasis")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.