nroPostprocess {Numero} | R Documentation |
Process a new dataset using a standardization procedure that was created for another dataset
nroPostprocess(data, mapping)
data |
A matrix or a data frame with column names. |
mapping |
A list object or a matrix or a data frame. |
The input argument can be a data frame with the attribute "mapping" as
returned from nroPreprocess()
or a list object with the
elements input
and output
that each contain a data frame or
a matrix of equal size.
The function projects the input data to the values in mapping$input
to determine the positions of the input values with respect to the rows
in the model. These positions are then used to interpolate corresponding
output values in mapping$output
.
The mapping elements must have identical row and columns names.
The output data frame may have less rows and columns than the input depending on how many values were usable.
A data frame of processed values.
Ville-Petteri Makinen
# Import data. fname <- system.file("extdata", "finndiane.txt", package = "Numero") dataset <- read.delim(file = fname) # Show original data characteristics. print(summary(dataset)) # Preprocess a subset of data. ds.pre <- nroPreprocess(dataset[1:100,]) print(summary(ds.pre)) # Repeat preprocessing for the whole dataset (approximation). ds.post <- nroPostprocess(dataset, ds.pre) print(summary(ds.post))