| predict_spectra {waves} | R Documentation | 
Use provided model object to predict trait values with input dataset
Description
Loads an existing model and cross-validation performance
statistics (created with save_model) and makes predictions
based on new spectra.
Usage
predict_spectra(
  input.data,
  model.stats.location,
  model.location,
  model.method = "pls",
  wavelengths = deprecated()
)
Arguments
input.data | 
 
  | 
model.stats.location | 
 String containing file path (including file name)
to save location of "(model.name)_stats.csv" as output from the
  | 
model.location | 
 String containing file path (including file name) to
location where the trained model ("(model.name).Rds") was saved as output
by the   | 
model.method | 
 Model type to use for training. Valid options include: 
  | 
wavelengths | 
 DEPRECATED   | 
Value
data.frame object of predictions for each sample (row). First
column is unique identifier supplied by input.data and second is
predicted values
Author(s)
Jenna Hershberger jmh579@cornell.edu
Examples
## Not run: 
ikeogu.2017 %>%
  dplyr::select(sample.id, dplyr::starts_with("X")) %>%
  predict_spectra(
    input.data = .,
    model.stats.location = paste0(
      getwd(),
      "/my_model_stats.csv"
    ),
    model.location = paste0(getwd(), "/my_model.Rds")
  )
## End(Not run)