-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from friendly/roxygen
Roxygen
- Loading branch information
Showing
104 changed files
with
7,994 additions
and
3,554 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ README.md | |
^docs$ | ||
^pkgdown$ | ||
.nojekyll | ||
man-old/ | ||
NAMESPACE-old | ||
.build-steps.R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
Package: candisc | ||
Type: Package | ||
Title: Visualizing Generalized Canonical Discriminant and Canonical Correlation Analysis | ||
Version: 0.8-6 | ||
Date: 2021-10-06 | ||
Depends: R (>= 3.5.0), car, heplots (>= 0.8-6), graphics, stats | ||
Suggests: rgl, corrplot, | ||
Version: 0.9.0 | ||
Date: 2024-05-05 | ||
Depends: R (>= 3.5.0), heplots (>= 0.8-6) | ||
Imports: car, graphics, stats | ||
Suggests: | ||
rgl, | ||
carData, | ||
corrplot, | ||
knitr, | ||
rmarkdown, | ||
MASS, rpart, rpart.plot | ||
MASS, | ||
rpart, | ||
rpart.plot | ||
LazyLoad: yes | ||
LazyData: yes | ||
Authors@R: c(person(given = "Michael", family = "Friendly", role=c("aut", "cre"), email="[email protected]"), | ||
person(given = "John", family = "Fox", role="aut")) | ||
Author: Michael Friendly [aut, cre], John Fox [aut] | ||
Authors@R: c( | ||
person(given = "Michael", | ||
family = "Friendly", | ||
role=c("aut", "cre"), | ||
email="[email protected]", | ||
comment = c(ORCID = "0000-0002-3237-0941")), | ||
person(given = "John", | ||
family = "Fox", role="aut", | ||
comment = c(ORCID = "0000-0002-1196-8012")) | ||
) | ||
Maintainer: Michael Friendly <[email protected]> | ||
Language: en-US | ||
Description: Functions for computing and visualizing | ||
|
@@ -27,6 +40,8 @@ Description: Functions for computing and visualizing | |
visualizations of terms in an 'mlm' via the 'plot.candisc' and 'heplot.candisc' methods. Related plots are | ||
now provided for canonical correlation analysis when all predictors are quantitative. | ||
License: GPL (>= 2) | ||
Packaged: 10/9/2008 6:12PM; Michael Friendly | ||
Encoding: UTF-8 | ||
VignetteBuilder: knitr | ||
URL: https://github.com/friendly/candisc/, https://friendly.github.io/candisc/ | ||
BugReports: https://github.com/friendly/candisc/issues | ||
RoxygenNote: 7.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,78 @@ | ||
# last modified 6 October 2007 by J. Fox | ||
# last modified 22 April 2009 by M. Friendly | ||
|
||
import(car) | ||
|
||
import(heplots) | ||
import(graphics) | ||
import(stats) | ||
importFrom("grDevices", "palette") | ||
importFrom("utils", "menu") | ||
|
||
export(candisc, candiscList, dataIndex, | ||
cancor, vectors, Wilks, scores, redundancy, vecscale, can_lm, varOrder) | ||
#S3method(can_lm, mlm) | ||
S3method(candisc, mlm) | ||
S3method(candiscList, mlm) | ||
S3method(coef, candisc) | ||
S3method(plot, candisc) | ||
S3method(plot, candiscList) | ||
S3method(print, candisc) | ||
S3method(print, candiscList) | ||
S3method(summary, candisc) | ||
S3method(summary, candiscList) | ||
|
||
# the following may be moved to the heplots package | ||
S3method(heplot, candisc) | ||
S3method(heplot3d, candisc) | ||
S3method(heplot, candiscList) | ||
S3method(heplot3d, candiscList) | ||
|
||
# new for cancor | ||
S3method(cancor, default) | ||
S3method(cancor, formula) | ||
S3method(print, cancor) | ||
S3method(summary, cancor) | ||
S3method(coef, cancor) | ||
S3method(Wilks, cancor) | ||
S3method(Wilks, candisc) | ||
S3method(heplot, cancor) | ||
S3method(scores, cancor) | ||
S3method(print, cancor.redundancy) | ||
S3method(plot, cancor) | ||
S3method(heplot3d, cancor) | ||
|
||
S3method(varOrder, mlm) | ||
S3method(varOrder, data.frame) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
# Generated by roxygen2: do not edit by hand | ||
|
||
S3method(Wilks,cancor) | ||
S3method(Wilks,candisc) | ||
S3method(cancor,default) | ||
S3method(cancor,formula) | ||
S3method(candisc,mlm) | ||
S3method(candiscList,mlm) | ||
S3method(coef,cancor) | ||
S3method(coef,candisc) | ||
S3method(heplot,cancor) | ||
S3method(heplot,candisc) | ||
S3method(heplot,candiscList) | ||
S3method(heplot3d,cancor) | ||
S3method(heplot3d,candisc) | ||
S3method(heplot3d,candiscList) | ||
S3method(plot,cancor) | ||
S3method(plot,candisc) | ||
S3method(plot,candiscList) | ||
S3method(predictor.names,default) | ||
S3method(print,cancor) | ||
S3method(print,cancor.redundancy) | ||
S3method(print,candisc) | ||
S3method(print,candiscList) | ||
S3method(scores,cancor) | ||
S3method(summary,cancor) | ||
S3method(summary,candisc) | ||
S3method(summary,candiscList) | ||
S3method(varOrder,data.frame) | ||
S3method(varOrder,default) | ||
S3method(varOrder,mlm) | ||
export(Wilks) | ||
export(can_lm) | ||
export(cancor) | ||
export(candisc) | ||
export(candiscList) | ||
export(dataIndex) | ||
export(predictor.names) | ||
export(redundancy) | ||
export(scores) | ||
export(varOrder) | ||
export(vecscale) | ||
export(vectors) | ||
importFrom(car,Anova) | ||
importFrom(car,dataEllipse) | ||
importFrom(car,loessLine) | ||
importFrom(car,showLabels) | ||
importFrom(grDevices,palette) | ||
importFrom(graphics,abline) | ||
importFrom(graphics,arrows) | ||
importFrom(graphics,boxplot) | ||
importFrom(graphics,layout) | ||
importFrom(graphics,lines) | ||
importFrom(graphics,par) | ||
importFrom(graphics,points) | ||
importFrom(graphics,polygon) | ||
importFrom(graphics,symbols) | ||
importFrom(graphics,text) | ||
importFrom(heplots,heplot) | ||
importFrom(heplots,heplot3d) | ||
importFrom(stats,aggregate) | ||
importFrom(stats,complete.cases) | ||
importFrom(stats,contrasts) | ||
importFrom(stats,cor) | ||
importFrom(stats,cov) | ||
importFrom(stats,cov.wt) | ||
importFrom(stats,formula) | ||
importFrom(stats,lsfit) | ||
importFrom(stats,model.frame) | ||
importFrom(stats,model.matrix) | ||
importFrom(stats,model.response) | ||
importFrom(stats,model.weights) | ||
importFrom(stats,pf) | ||
importFrom(stats,qchisq) | ||
importFrom(stats,terms) | ||
importFrom(stats,update) | ||
importFrom(stats,var) | ||
importFrom(utils,menu) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# last modified 6 October 2007 by J. Fox | ||
# last modified 22 April 2009 by M. Friendly | ||
|
||
import(car) | ||
|
||
import(heplots) | ||
import(graphics) | ||
import(stats) | ||
importFrom("grDevices", "palette") | ||
importFrom("utils", "menu") | ||
|
||
export(candisc, candiscList, dataIndex, | ||
cancor, vectors, Wilks, scores, redundancy, vecscale, can_lm, varOrder) | ||
#S3method(can_lm, mlm) | ||
S3method(candisc, mlm) | ||
S3method(candiscList, mlm) | ||
S3method(coef, candisc) | ||
S3method(plot, candisc) | ||
S3method(plot, candiscList) | ||
S3method(print, candisc) | ||
S3method(print, candiscList) | ||
S3method(summary, candisc) | ||
S3method(summary, candiscList) | ||
|
||
# the following may be moved to the heplots package | ||
S3method(heplot, candisc) | ||
S3method(heplot3d, candisc) | ||
S3method(heplot, candiscList) | ||
S3method(heplot3d, candiscList) | ||
|
||
# new for cancor | ||
S3method(cancor, default) | ||
S3method(cancor, formula) | ||
S3method(print, cancor) | ||
S3method(summary, cancor) | ||
S3method(coef, cancor) | ||
S3method(Wilks, cancor) | ||
S3method(Wilks, candisc) | ||
S3method(heplot, cancor) | ||
S3method(scores, cancor) | ||
S3method(print, cancor.redundancy) | ||
S3method(plot, cancor) | ||
S3method(heplot3d, cancor) | ||
|
||
S3method(varOrder, mlm) | ||
S3method(varOrder, data.frame) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Sys.setenv(RGL_USE_NULL = TRUE) | ||
|
||
# get list of possibly misspelled words | ||
wds <- spelling::spell_check_package() | ||
cat(paste(wds[, "word"], collapse = "\n")) | ||
# to add all words | ||
update_wordlist() | ||
|
||
# check reverse dependencies | ||
devtools::revdep() | ||
# [1] "Guerry" "heplots" "KnowBR" "MorphoTools2" | ||
# [5] "MultivariateAnalysis" "smacof" "SurveyCC" | ||
|
||
# revdep | ||
#remotes::install_github("r-lib/revdepcheck") | ||
#library(revdepcheck) | ||
revdepcheck::revdep_check(num_workers = 4) | ||
|
||
|
||
library(devtools) | ||
|
||
# prepare pkgdown site | ||
build_readme() | ||
pkgdown::build_site() | ||
|
||
devtools::build() | ||
devtools::build_vignettes() | ||
|
||
devtools::check_win_devel() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,42 @@ | ||
#' Wilks Lambda Tests for Canonical Correlations | ||
#' | ||
#' Tests the sequential hypotheses that the \eqn{i}th canonical correlation and | ||
#' all that follow it are zero, \deqn{\rho_i = \rho_{i+1} = \cdots = 0} | ||
#' | ||
#' Wilks' Lambda values are calculated from the eigenvalues and converted to F | ||
#' statistics using Rao's approximation. | ||
#' | ||
#' @aliases Wilks Wilks.cancor Wilks.candisc | ||
#' @param object An object of class \code{"cancor""} or \code{"candisc""} | ||
#' @param \dots Other arguments passed to methods (not used) | ||
#' @return A data.frame (of class \code{"anova"}) containing the test | ||
#' statistics | ||
#' @author Michael Friendly | ||
#' @seealso \code{\link{cancor}}, ~~~ | ||
#' @references Mardia, K. V., Kent, J. T. and Bibby, J. M. (1979). | ||
#' \emph{Multivariate Analysis}. London: Academic Press. | ||
#' @keywords htest | ||
#' @examples | ||
#' | ||
#' data(Rohwer, package="heplots") | ||
#' X <- as.matrix(Rohwer[,6:10]) # the PA tests | ||
#' Y <- as.matrix(Rohwer[,3:5]) # the aptitude/ability variables | ||
#' | ||
#' cc <- cancor(X, Y, set.names=c("PA", "Ability")) | ||
#' Wilks(cc) | ||
#' | ||
#' iris.mod <- lm(cbind(Petal.Length, Sepal.Length, Petal.Width, Sepal.Width) ~ Species, data=iris) | ||
#' iris.can <- candisc(iris.mod, data=iris) | ||
#' Wilks(iris.can) | ||
#' | ||
#' | ||
#' @export Wilks | ||
Wilks <- function (object, ...) { | ||
UseMethod("Wilks") | ||
} | ||
|
||
#' @describeIn Wilks \code{"cancor"} method. | ||
#' @export | ||
Wilks.cancor <- function(object, ...) { | ||
# tests of canonical dimensions | ||
|
||
|
@@ -45,6 +80,8 @@ tests | |
# Rao's F approximation for canonical discriminant analysis | ||
# using code from Martina Vandebroek <[email protected]> | ||
|
||
#' @describeIn Wilks \code{print()} method for \code{"candisc"} objects. | ||
#' @export | ||
Wilks.candisc <- function(object, ...) { | ||
|
||
ev <- object$eigenvalues | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.