Learn R Programming

pcvr

R functions for use with plantCV output

Installation

A stable version of pcvr can be installed from CRAN

install.packages("pcvr")
library(pcvr)

Alternatively, the development version of pcvr can be installed using remotes/devtools install_github as shown below. Note that the default behavior in devtools/remotes is to only install true dependencies. Several functions in pcvr use specific packages that would otherwise not be needed for most work, notably the brms supporting functions. To install suggested packages (see DESCRIPTION file) add dependencies=T to the install_github function call.

devtools::install_github("danforthcenter/pcvr", build_vignettes=T) # to install without building vignettes set the build_vignettes argument to F or exclude it.
library(pcvr)

Usage

Please see the bellwether vignette for a general introduction to pcvr. In the future we expect to have more vignettes and to specialize each to some degree.

vignette("bellwether", package="pcvr")
# or 
browseVignettes("pcvr")

Feedback

Please report bugs and make feature requests with issues in this repository.

Copy Link

Version

Install

install.packages('pcvr')

Monthly Downloads

520

Version

1.2.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Josh Sumner

Last Published

April 16th, 2025

Functions in pcvr (1.2.0)

bw.time

Time conversion and plotting for bellwether data
brmSurvPlot

Function to visualize brms survival models specified using growthSS.
bw.water

Read in lemnatech watering data from metadata.json files
bw.outliers

Remove outliers from bellwether data using cook's distance
brmViolin

Function to visualize hypotheses tested on brms models similar to those made using growthSS outputs.
barg

Function to help fulfill elements of the Bayesian Analysis Reporting Guidelines.
cumulativePheno

Reduce phenotypes in longitudinal data to cumulative sums of phenotypes.
conjugate-class

Class conjugate for output from the pcvr::conjugate function.
fitGrowthnlme

Ease of use nlme wrapper function for fitting growth models specified by growthSS
distributionPlot

Function for plotting iterations of posterior distributions
fitGrowthmgcvgam

Ease of use mgcv wrapper function for fitting gams specified by growthSS
conjugate

Bayesian testing using conjugate priors and method of moments for single or multi value traits.
fitGrowth

Ease of use wrapper function for fitting various growth models specified by growthSS
fitGrowthlm

Ease of use lm wrapper function for fitting growth models specified by mvSS
fitGrowthflexsurv

Ease of use wrapper function for fitting growth models specified by growthSS
frem

Variance partitioning using Full Random Effects Models
fitGrowthbrms

Ease of use brms wrapper function for fitting growth models specified by growthSS
fitGrowthsurvreg

Ease of use wrapper function for fitting growth models specified by growthSS
fitGrowthnlrqgam

Ease of use rq wrapper function for fitting gams specified by growthSS
fitGrowthnlmegam

Ease of use lme wrapper function for fitting gams specified by growthSS
fitGrowthnls

Ease of use nls wrapper function for fitting growth models specified by growthSS
flexsurvregPlot

Function to visualize flexsurv::flexsurvreg models fit by fitGrowth.
fitGrowthnlrq

Ease of use nlrq wrapper function for fitting growth models specified by growthSS
fitGrowthrq

Ease of use rq wrapper function for fitting models specified by mvSS
fitGrowthnlsgam

Ease of use lm wrapper function for fitting gams specified by growthSS
growthPlot

Function to visualize models made by fitGrowth.
growthSim

Growth data simulating function
growthSS

Ease of use growth model helper function.
nlrqPlot

Function to visualize common quantreg::nlrq growth models.
gam_diff

Helper function for visualizing differences in GAMs fit with mgcv::gam
nlsPlot

Function to visualize common stats::nls growth models.
nlmePlot

Function to visualize common nlme::nlme growth models.
pcvrss-class

Class pcvrss for models specified in pcvr.
net.plot

Visualizing igraph networks
mvSim

Multi Value Trait simulating function
plot.conjugate

Plot a conjugate object.
mvSS

Ease of use multi-value trait model helper function.
mv_ag

Multi Value Trait Aggregation function
pcadf

Function to run a PCA, plot and optionally return the data with PCA coordinates and pca object
pcv.emd

Earth Mover's Distance between spectral histograms
print.pcvrsssummary

Print a pcvrsssummary object.
summary.pcvrss

Summarize a pcvrss object.
summary.conjugate

Summarize a conjugate object.
print.pcvrss

Print a pcvrss object.
plotVIP

Plot Variable Influence on Projection
rqPlot

Function to visualize quantreg::rq general additive growth models.
survregPlot

Function to visualize survival::survreg models fit by fitGrowth.
plotPrior

Check priors used in ease of use brms functions
pwue

Calculate pseudo water use efficiency from phenotype and watering data
testGrowth

Hypothesis testing for fitGrowth models.
pcv.joyplot

Make Joyplots for multi value trait plantCV data
read.pcv.3

Read in plantCV csv from bellwether phenotyper style experiments analyzed with plantCV versions <4.
pcv.plsr

Run Partial Least Squares Regression on spectral data
pcv_theme

Default theme for ggplots made by pcvr functions.
relativeTolerance

Calculate relative tolerance of some phenotype(s) relative to control
read.pcv

Read in plantCV csv output in wide or long format
print.conjugate

Print a conjugate object.
print.conjugatesummary

Print a conjugatesummary object.
pcv.net

Network analysis of a distance matrix
checkGroups

Helper function to check groups in data.
brmPlot

Function to visualize brms models similar to those made using growthSS outputs.
awkHelper

subset helper function for use reading in large data, called in pcv.sub.read
combineDraws

Combine Draws From brms Models