cate_nelson_1965 {soiltestcorr} | R Documentation |
Cate & Nelson quadrants analysis (graphical)
Description
This function runs the quadrants analysis suggested by Cate and Nelson (1965)
Usage
cate_nelson_1965(data = NULL, stv, ry, target, tidy = TRUE, plot = FALSE)
boot_cn_1965(data, ry, stv, target = 90, n = 5, ...)
Arguments
data |
argument to call a data.frame or data.table containing the data |
stv |
argument to call the vector or column containing the soil test value (stv) data |
ry |
argument to call the vector or column containing the relative yield (ry) data |
target |
argument to specify the ry target (numeric) to estimate the critical stv for |
tidy |
logical operator (TRUE/FALSE) to decide the type of return. TRUE returns a tibble, FALSE returns a list. Default: TRUE. |
plot |
logical operator (TRUE/FALSE) to decide the type of return. TRUE returns a ggplot, FALSE returns either a list (tidy == FALSE) or a tibble (tidy == TRUE). |
n |
sample size for the bootstrapping Default: 500 |
... |
when running bootstrapped samples, the |
Details
See online-documentation for additional details.
Value
returns an object of type ggplot
if plot = TRUE.
returns an object of class data.frame
if tidy = TRUE,
returns an object of class list
if tidy = FALSE.
boot_cn_1965: bootstrapping function
Note
This code was adapted from Mangiafico, S. S. (2013). Cate-Nelson Analysis for Bivariate Data Using R-project. The Journal of Extension, 51(5), Article 33. https://tigerprints.clemson.edu/joe/vol51/iss5/33/
References
Cate & Nelson (1965). A rapid method for correlation of soil test analysis with plant response data. North Carolina Agric. Exp. Stn., International soil Testing Series l. No. 1.
See Also
eval_tidy
,defusing-advanced
lm
,anova
ggplot
,aes
,geom_point
,labs
,geom_abline
,annotate
,theme
Examples
# Example 1 dataset
dat <- data.frame("ry" = c(65,80,85,88,90,94,93,96,97,95,98,100,99,99,100),
"stv" = c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
# Run
fit_example_cn_1965 <- cate_nelson_1965(data = dat,
ry = ry, stv = stv, target = 90, tidy=FALSE, plot=FALSE)
fit_example_cn_1965