From 9446650d3a1988089525845306dfd0ac5537880c Mon Sep 17 00:00:00 2001 From: Mason Garrison Date: Fri, 29 Mar 2024 12:27:06 -0400 Subject: [PATCH] Updated documentation inherited details from parent function --- R/convertPedigree.R | 16 +++++----------- man/Null.Rd | 2 +- man/SimPed.Rd | 2 +- man/allGens.Rd | 2 +- man/calculateH.Rd | 2 +- man/calculateRelatedness.Rd | 2 +- man/efunc.Rd | 2 +- man/evenInsert.Rd | 2 +- man/famSizeCal.Rd | 2 +- man/hazard.Rd | 2 +- man/inbreeding.Rd | 2 +- man/inferRelatedness.Rd | 2 +- man/nullToNA.Rd | 2 +- man/ped2add.Rd | 3 +-- man/ped2ce.Rd | 2 +- man/ped2cn.Rd | 2 +- man/ped2com.Rd | 2 +- man/ped2fam.Rd | 2 +- man/ped2graph.Rd | 2 +- man/ped2maternal.Rd | 2 +- man/ped2mit.Rd | 2 +- man/ped2paternal.Rd | 2 +- man/potter.Rd | 2 +- man/related_coef.Rd | 2 +- man/relatedness.Rd | 2 +- man/resample.Rd | 2 +- man/rmvn.Rd | 2 +- man/sizeAllGens.Rd | 2 +- man/try_na.Rd | 2 +- vignettes/pedigree.html | 4 ++-- 30 files changed, 35 insertions(+), 42 deletions(-) diff --git a/R/convertPedigree.R b/R/convertPedigree.R index 4123c4c..84c1662 100644 --- a/R/convertPedigree.R +++ b/R/convertPedigree.R @@ -12,7 +12,7 @@ #' @param tcross.alt.crossprod logical. If TRUE, use alternative method of using Crossprod function for computing the transpose #' @param tcross.alt.star logical. If TRUE, use alternative method of using \%\*\% for computing the transpose #' @param ... additional arguments to be passed to \code{\link{ped2com}} -#' @details The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". +#' @details The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". For more advanced scenarios and detailed explanations, consult this vignette. #' @export #' ped2com <- function(ped, component, @@ -156,8 +156,6 @@ ped2com <- function(ped, component, # compute rel <- tcrossprod(rsq) if (gc) { rm(isPar, newIsPar) - } - if (gc) { gc() } if (verbose) { @@ -166,8 +164,6 @@ ped2com <- function(ped, component, r2 <- r %*% Matrix::Diagonal(x = sqrt(isChild), n = nr) if (gc) { rm(r, isChild) - } - if (gc) { gc() } if (verbose) { @@ -201,9 +197,7 @@ ped2com <- function(ped, component, #' Take a pedigree and turn it into an additive genetics relatedness matrix #' @inheritParams ped2com -#' @details The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". -#' For more advanced scenarios and detailed explanations, consult this vignette. - +#' @inherit ped2com details #' @export #' ped2add <- function(ped, max.gen = Inf, sparse = FALSE, verbose = FALSE, gc = FALSE, flatten.diag = FALSE, standardize.colnames = TRUE, @@ -224,7 +218,7 @@ ped2add <- function(ped, max.gen = Inf, sparse = FALSE, verbose = FALSE, gc = FA #' Take a pedigree and turn it into a mitochondrial relatedness matrix #' @inheritParams ped2com -#' @details The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". +#' @inherit ped2com details #' @export #' @aliases ped2mt #' @@ -245,7 +239,7 @@ ped2mit <- ped2mt <- function(ped, max.gen = Inf, sparse = FALSE, verbose = FALS #' Take a pedigree and turn it into a common nuclear environmental relatedness matrix #' @inheritParams ped2com -#' @details The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". +#' @inherit ped2com details #' @export #' ped2cn <- function(ped, max.gen = Inf, sparse = FALSE, verbose = FALSE, gc = FALSE, flatten.diag = FALSE, standardize.colnames = TRUE, tcross.alt.crossprod = FALSE, tcross.alt.star = FALSE) { @@ -265,7 +259,7 @@ ped2cn <- function(ped, max.gen = Inf, sparse = FALSE, verbose = FALSE, gc = FAL #' Take a pedigree and turn it into an extended environmental relatedness matrix #' @inheritParams ped2com -#' @details The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". +#' @inherit ped2com details #' @export #' ped2ce <- function(ped) { diff --git a/man/Null.Rd b/man/Null.Rd index b51c24f..24fc71d 100644 --- a/man/Null.Rd +++ b/man/Null.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{Null} \alias{Null} \title{Compute the null space of a matrix} diff --git a/man/SimPed.Rd b/man/SimPed.Rd index 1d70f0f..79dd1f9 100644 --- a/man/SimPed.Rd +++ b/man/SimPed.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{SimPed} \alias{SimPed} \title{SimPed (Deprecated)} diff --git a/man/allGens.Rd b/man/allGens.Rd index 2f7efe0..6bc6d9e 100644 --- a/man/allGens.Rd +++ b/man/allGens.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/famSizeCal.R +% Please edit documentation in R/calculateFamilySize.R \name{allGens} \alias{allGens} \title{allGens diff --git a/man/calculateH.Rd b/man/calculateH.Rd index 9fe2415..0894f0c 100644 --- a/man/calculateH.Rd +++ b/man/calculateH.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/formula.R +% Please edit documentation in R/computeRelatedness.R \name{calculateH} \alias{calculateH} \title{Falconer's Formula diff --git a/man/calculateRelatedness.Rd b/man/calculateRelatedness.Rd index 81f7a3b..259ff8b 100644 --- a/man/calculateRelatedness.Rd +++ b/man/calculateRelatedness.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/formula.R +% Please edit documentation in R/computeRelatedness.R \name{calculateRelatedness} \alias{calculateRelatedness} \title{Calculate Relatedness Coefficient} diff --git a/man/efunc.Rd b/man/efunc.Rd index 31ef25f..f51dcc9 100644 --- a/man/efunc.Rd +++ b/man/efunc.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{efunc} \alias{efunc} \title{Error Function} diff --git a/man/evenInsert.Rd b/man/evenInsert.Rd index 010b627..2dae39c 100644 --- a/man/evenInsert.Rd +++ b/man/evenInsert.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/evenInsert.R +% Please edit documentation in R/insertEven.R \name{evenInsert} \alias{evenInsert} \title{evenInsert diff --git a/man/famSizeCal.Rd b/man/famSizeCal.Rd index 60e20a9..e51f95e 100644 --- a/man/famSizeCal.Rd +++ b/man/famSizeCal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/famSizeCal.R +% Please edit documentation in R/calculateFamilySize.R \name{famSizeCal} \alias{famSizeCal} \title{famSizeCal diff --git a/man/hazard.Rd b/man/hazard.Rd index c701a19..fa0430c 100755 --- a/man/hazard.Rd +++ b/man/hazard.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dataDoc.R +% Please edit documentation in R/documentData.R \docType{data} \name{hazard} \alias{hazard} diff --git a/man/inbreeding.Rd b/man/inbreeding.Rd index a8fad43..d85149e 100755 --- a/man/inbreeding.Rd +++ b/man/inbreeding.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dataDoc.R +% Please edit documentation in R/documentData.R \docType{data} \name{inbreeding} \alias{inbreeding} diff --git a/man/inferRelatedness.Rd b/man/inferRelatedness.Rd index cf30820..961de7e 100644 --- a/man/inferRelatedness.Rd +++ b/man/inferRelatedness.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/formula.R +% Please edit documentation in R/computeRelatedness.R \name{inferRelatedness} \alias{inferRelatedness} \title{Infer Relatedness Coefficient} diff --git a/man/nullToNA.Rd b/man/nullToNA.Rd index 7efae0c..4bccb4b 100644 --- a/man/nullToNA.Rd +++ b/man/nullToNA.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{nullToNA} \alias{nullToNA} \title{nullToNA} diff --git a/man/ped2add.Rd b/man/ped2add.Rd index ad87012..581a5b9 100644 --- a/man/ped2add.Rd +++ b/man/ped2add.Rd @@ -41,6 +41,5 @@ generations as there are in the data.} Take a pedigree and turn it into an additive genetics relatedness matrix } \details{ -The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". -For more advanced scenarios and detailed explanations, consult this vignette. +The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". For more advanced scenarios and detailed explanations, consult this vignette. } diff --git a/man/ped2ce.Rd b/man/ped2ce.Rd index a736557..f4c1efa 100644 --- a/man/ped2ce.Rd +++ b/man/ped2ce.Rd @@ -13,5 +13,5 @@ ped2ce(ped) Take a pedigree and turn it into an extended environmental relatedness matrix } \details{ -The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". +The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". For more advanced scenarios and detailed explanations, consult this vignette. } diff --git a/man/ped2cn.Rd b/man/ped2cn.Rd index 0d7e3eb..e4b8e84 100644 --- a/man/ped2cn.Rd +++ b/man/ped2cn.Rd @@ -41,5 +41,5 @@ generations as there are in the data.} Take a pedigree and turn it into a common nuclear environmental relatedness matrix } \details{ -The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". +The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". For more advanced scenarios and detailed explanations, consult this vignette. } diff --git a/man/ped2com.Rd b/man/ped2com.Rd index 67daf5f..1f35587 100644 --- a/man/ped2com.Rd +++ b/man/ped2com.Rd @@ -47,5 +47,5 @@ generations as there are in the data.} Take a pedigree and turn it into a relatedness matrix } \details{ -The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". +The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". For more advanced scenarios and detailed explanations, consult this vignette. } diff --git a/man/ped2fam.Rd b/man/ped2fam.Rd index c3db0a7..0620d15 100644 --- a/man/ped2fam.Rd +++ b/man/ped2fam.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/family.R +% Please edit documentation in R/buildPedigree.R \name{ped2fam} \alias{ped2fam} \title{Add an extended family ID variable to a pedigree} diff --git a/man/ped2graph.Rd b/man/ped2graph.Rd index 0564b1f..cf90526 100755 --- a/man/ped2graph.Rd +++ b/man/ped2graph.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/family.R +% Please edit documentation in R/buildPedigree.R \name{ped2graph} \alias{ped2graph} \title{Turn a pedigree into a graph} diff --git a/man/ped2maternal.Rd b/man/ped2maternal.Rd index 8cc0a8b..3822684 100755 --- a/man/ped2maternal.Rd +++ b/man/ped2maternal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/family.R +% Please edit documentation in R/buildPedigree.R \name{ped2maternal} \alias{ped2maternal} \title{Add a maternal line ID variable to a pedigree} diff --git a/man/ped2mit.Rd b/man/ped2mit.Rd index 530ca4e..520c986 100644 --- a/man/ped2mit.Rd +++ b/man/ped2mit.Rd @@ -42,5 +42,5 @@ generations as there are in the data.} Take a pedigree and turn it into a mitochondrial relatedness matrix } \details{ -The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". +The algorithms and methodologies used in this function are further discussed and exemplified in the vignette titled "examplePedigreeFunctions". For more advanced scenarios and detailed explanations, consult this vignette. } diff --git a/man/ped2paternal.Rd b/man/ped2paternal.Rd index b88fabb..719097d 100755 --- a/man/ped2paternal.Rd +++ b/man/ped2paternal.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/family.R +% Please edit documentation in R/buildPedigree.R \name{ped2paternal} \alias{ped2paternal} \title{Add a paternal line ID variable to a pedigree} diff --git a/man/potter.Rd b/man/potter.Rd index 100a164..1fff502 100755 --- a/man/potter.Rd +++ b/man/potter.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/dataDoc.R +% Please edit documentation in R/documentData.R \docType{data} \name{potter} \alias{potter} diff --git a/man/related_coef.Rd b/man/related_coef.Rd index b48fc0d..1111298 100644 --- a/man/related_coef.Rd +++ b/man/related_coef.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{related_coef} \alias{related_coef} \title{related_coef (Deprecated)} diff --git a/man/relatedness.Rd b/man/relatedness.Rd index 0ae4832..f84740d 100644 --- a/man/relatedness.Rd +++ b/man/relatedness.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{relatedness} \alias{relatedness} \title{relatedness (Deprecated)} diff --git a/man/resample.Rd b/man/resample.Rd index ae2aa85..67246be 100644 --- a/man/resample.Rd +++ b/man/resample.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{resample} \alias{resample} \title{Resample Elements of a Vector} diff --git a/man/rmvn.Rd b/man/rmvn.Rd index fe3be9b..a293947 100644 --- a/man/rmvn.Rd +++ b/man/rmvn.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{rmvn} \alias{rmvn} \title{rmvn} diff --git a/man/sizeAllGens.Rd b/man/sizeAllGens.Rd index 47e1afd..e477c19 100644 --- a/man/sizeAllGens.Rd +++ b/man/sizeAllGens.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/famSizeCal.R +% Please edit documentation in R/calculateFamilySize.R \name{sizeAllGens} \alias{sizeAllGens} \title{sizeAllGens diff --git a/man/try_na.Rd b/man/try_na.Rd index e5abb2e..0f8fdde 100644 --- a/man/try_na.Rd +++ b/man/try_na.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/helper.R +% Please edit documentation in R/helpGeneric.R \name{try_na} \alias{try_na} \title{modified tryCatch function} diff --git a/vignettes/pedigree.html b/vignettes/pedigree.html index edc6f3d..0b13234 100644 --- a/vignettes/pedigree.html +++ b/vignettes/pedigree.html @@ -416,7 +416,7 @@

Single Pedigree Visualization

plotPedigree() function.

# Plot the simulated pedigree
 plotPedigree(df_ped)
-

+

#> Did not plot the following people: 10032
 #> $plist
 #> $plist$n
@@ -598,7 +598,7 @@ 

Visualizing Multiple Pedigrees Side-by-Side

# Plot the 4-generation pedigree plotPedigree(df_ped_4, width = 1)
-

+

#> $plist
 #> $plist$n
 #> [1]  2  5 10 12