Description Usage Arguments Value Warning Note
This function recovers the original data from a model object. Since some of the modelling objects that this package uses do not store the data, this function cannot reliably extract the data from an model object not generated using generateModel. If the data is not found in the model, an error will be thrown.
1 | getData(model)
|
model |
is the model for which to extract the data. |
a data frame of the data used to generate the model.
If you are getting very strange errors from getData, consider this... The raster package also has a getData
function that is not overloaded. Depending on where the two packages fall in the search path, it may be that
raster::getData is getting called instead of NPEL.Classification::getData. See help on search
for a
starting point on search paths. The following hack may help.
detach (package:NPEL.Classification)
library (NPEL.Classification)
The nearest neighbour models in package:FNN and package:class do not enclose their results in a class; when NPEL.Classification builds objects of these types it wraps them in a class so they are recognizable by S3 methods, and attaches the formula and data. Hence, if a model was built directly using these packages the result will not run this function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.