plantphys / spectratrait

A tutorial R package for illustrating how to fit, evaluate, and report spectra-trait PLSR models. The package provides functions to enhance the base functionality of the R pls package, identify an optimal number of PLSR components, standardize model validation, and vignette examples that utilize datasets sourced from EcoSIS (ecosis.org)
GNU General Public License v3.0
11 stars 9 forks source link

Package load syntax is wrong - need to fix I think #72

Closed serbinsh closed 3 years ago

serbinsh commented 3 years ago
> lapply(list.of.packages, library, character.only = TRUE)
[[1]]
 [1] "spectratrait" "gridExtra"    "ggplot2"      "plotrix"      "here"         "reshape2"    
 [7] "dplyr"        "pls"          "stats"        "graphics"     "grDevices"    "utils"       
[13] "datasets"     "methods"      "base"        

I don't think that's correct. Maybe at some point, I screwed up that syntax. clearly its wrong and it should be doing "library(package), ...)"

serbinsh commented 3 years ago

Actually, this is fine and not the problem. The problem was me trying to make the script all-encompassing and forgetting that we need to instruct how to get things installed first, then restart R then run the script which should only load the packages not also try to install if missing.

I am going to create a new issue to address this and address the necessary changes