| cate_nelson_1971 {soiltestcorr} | R Documentation | 
Cate & Nelson quadrants analysis (statistical)
Description
This function runs the quadrants analysis suggested by Cate and Nelson (1971)
Usage
cate_nelson_1971(data = NULL, stv, ry, tidy = TRUE, plot = FALSE)
boot_cn_1971(data, ry, stv, 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 | 
| tidy | logical operator (TRUE/FALSE) to decide the type of return. TRUE returns a data.frame, 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 data.frame (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_1971: 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 (1971). A simple statistical procedure for partitioning soil test correlation data into two classes. Soil Sci. Soc. Am. Proc. 35:658-660. doi:10.2136/sssaj1971.03615995003500040048x
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_1971 <- cate_nelson_1971(data = dat, 
 ry = ry, stv = stv, tidy=FALSE, plot=FALSE)
 
 fit_example_cn_1971