We provide two packages, oceanwaves and owhlR, that work with the statistical software R to help process raw CSV data files from the OWHL into wave statistics. Functions from the package oce are also used in the functions of the oceanwaves package, so oce must be installed as well.
The oceanwaves package can be found in the main R package repository at https://cran.r- project.org/package=oceanwaves, and oce can be found at https://cran.r-project.org/package=oce. Both packages can be installed from within an active R session using the commands:
install.packages(‘oceanwaves’)
install.packages(‘oce’)
The package owhlR can be downloaded as a .zip file from the permanent repository https://doi.org/10.5281/zenodo.3468467 or from https://github.com/millerlp/owhlR. The version found at Github can be installed from within an active R session using functions in the devtools package. The installation process would proceed as follows:
install.packages(‘devtools’)
library(devtools)
install_github(‘millerlp/ohwlR’, build_vignettes = TRUE)
If you want the latest development version of the oceanwaves package, you can instead install it as follows:
install_github(‘millerlp/oceanwaves’, build_vignettes = TRUE)
The argument in the commands above to build vignettes will create the tutorial vignette for the owhlR package which details the current post-processing workflow. To load the oceanwaves and owhlR packages in a current R session, do the following:
library(oceanwaves)
library(owhlR)
Once the owhlR package has been loaded, the vignette ‘OWHL-workflow can be loaded using the command:
vignette(‘OWHL-workflow’, package = ‘owhlR’)
This will generate an html file in the user’s browser that walks through the processing steps, with the relevant R code to generate wave statistics. If you get an error that the vignette can’t be found, make sure you include the build_vignettes=TRUE argument when you installed owhlR from Github using the install_github() function above.