diff --git a/.Rbuildignore b/.Rbuildignore index cb0953f..31a9a74 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -3,6 +3,7 @@ ^LICENSE\.md$ ^R/\.Rhistory$ ^R/paper$ +CITATION.cff$ ^doc$ ^data-raw$ ^Meta$ diff --git a/DESCRIPTION b/DESCRIPTION index f547d85..17c3eee 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,34 +1,47 @@ Package: BGmisc Title: An R Package for Extended Behavior Genetics Analysis Version: 1.2.0 -URL: https://github.com/R-Computing-Lab/BGmisc/, https://r-computing-lab.github.io/BGmisc/ -BugReports: https://github.com/R-Computing-Lab/BGmisc/issues -Authors@R: - c(person("S. Mason", "Garrison", email = "garrissm@wfu.edu", role = c("aut", "cre"), comment=c(ORCID = "0000-0002-4804-6003")), - person(c("Michael", "D."), "Hunter", role = "aut", comment=c(ORCID = "0000-0002-3651-6709")), - person("Xuanyu", "Lyu", role = "aut", comment=c(ORCID = "0000-0002-2841-5529")), - person(c("Rachel", "N."), "Good", role = "aut", comment=c(ORCID = "0000-0000-0000-0000")), - person(c("Jonathan", "D."), "Trattner", role = "aut", comment=c(ORCID = "0000-0002-1097-7603")), - person(c("S.", "Alexandra"), "Burt", role = "aut", comment=c(ORCID = "0000-0001-5538-7431")) +Authors@R: c( + person("S. Mason", "Garrison", , "garrissm@wfu.edu", role = c("aut", "cre"), + comment = c(ORCID = "0000-0002-4804-6003")), + person(c("Michael", "D."), "Hunter", role = "aut", + comment = c(ORCID = "0000-0002-3651-6709")), + person("Xuanyu", "Lyu", role = "aut", + comment = c(ORCID = "0000-0002-2841-5529")), + person(c("Rachel", "N."), "Good", role = "aut", + comment = c(ORCID = "0000-0000-0000-0000")), + person(c("Jonathan", "D."), "Trattner", role = "aut", + comment = c(ORCID = "0000-0002-1097-7603")), + person(c("S.", "Alexandra"), "Burt", role = "aut", + comment = c(ORCID = "0000-0001-5538-7431")) ) -Description: The BGmisc R package offers a comprehensive suite of functions tailored for extended behavior genetics analysis, including model identification, calculating relatedness, pedigree conversion, pedigree simulation, and more. +Description: The BGmisc R package offers a comprehensive suite of + functions tailored for extended behavior genetics analysis, including + model identification, calculating relatedness, pedigree conversion, + pedigree simulation, and more. License: GPL-3 -Encoding: UTF-8 -LazyData: true -RoxygenNote: 7.3.1 +URL: https://github.com/R-Computing-Lab/BGmisc/, + https://r-computing-lab.github.io/BGmisc/ +BugReports: https://github.com/R-Computing-Lab/BGmisc/issues +Depends: + R (>= 3.5.0) Imports: - Matrix, - stats, + igraph, kinship2, - igraph + Matrix, + stats Suggests: - knitr, - rmarkdown, + dplyr, EasyMx, + knitr, OpenMx, - dplyr, + rmarkdown, + rticles, testthat (>= 3.0.0) -VignetteBuilder: knitr +VignetteBuilder: + knitr Config/testthat/edition: 3 -Depends: - R (>= 3.5.0) +Encoding: UTF-8 +LazyData: true +RoxygenNote: 7.3.1 +Language: en-US diff --git a/R/checkIDs.R b/R/checkIDs.R index d8ce3a8..c4a2357 100644 --- a/R/checkIDs.R +++ b/R/checkIDs.R @@ -4,7 +4,7 @@ #' 1. Checks for the uniqueness of individual IDs. #' 2. Optionally repairs non-unique IDs based on a specified logic. #' -#' @param ped A dataframe representing the pedigree data with columns 'ID', 'dadID', and 'momID'. +#' @param ped A dataframe representing the pedigree data with columns `ID`, `dadID`, and `momID`. #' @param verbose A logical flag indicating whether to print progress and validation messages to the console. #' @param repair A logical flag indicating whether to attempt repairs on non-unique IDs. #' diff --git a/R/dataDoc.R b/R/dataDoc.R index 88b4002..bc622bc 100755 --- a/R/dataDoc.R +++ b/R/dataDoc.R @@ -55,7 +55,7 @@ NULL ##' \item DA2. Binary variable signifying the fundamental unknowability of existence ##' \item birthYr. Birth year for person ##' \item onsetYr. Year of onset for person -##' \item deathYr. Death year for person +##' \item \code{deathYr}. Death year for person ##' \item available. logical. Whether ##' \item Gen. Generation of the person ##' \item proband. logical. Whether the person is a proband or not diff --git a/R/tweakPedigree.R b/R/tweakPedigree.R index a974e94..03447d7 100644 --- a/R/tweakPedigree.R +++ b/R/tweakPedigree.R @@ -7,7 +7,7 @@ #' @param ID_twin2 A vector of \code{ID} of the second twin. #' @param verbose logical. If TRUE, print progress through stages of algorithm #' @param gen_twin A vector of \code{generation} of the twin to be imputed. -#' @return Returns a \code{data.frame} with MZ twins infomration added as a new column. +#' @return Returns a \code{data.frame} with MZ twins information added as a new column. #' @export # A function to impute twins in the simulated pedigree \code{data.frame}. @@ -226,15 +226,15 @@ makeInbreeding <- function(ped, #' dropLink #' A function to drop a person from his/her parents in the simulated pedigree \code{data.frame}. -#' The person can be dropped by specifying his/her ID or by specifying the generation which the randomly to be dropeed person is in. -#' The function can separate one pedigree into two pedigrees. Seperating into small pieces should be done by running the function multiple times. +#' The person can be dropped by specifying his/her ID or by specifying the generation which the randomly to-be-dropped person is in. +#' The function can separate one pedigree into two pedigrees. Separating into small pieces should be done by running the function multiple times. #' This is a supplementary function for \code{simulatePedigree}. #' @param ped a pedigree simulated from simulatePedigree function or the same format #' @param ID_drop the ID of the person to be dropped from his/her parents. -#' @param gen_drop the generation in which the randomly dropped person is. Will work if ID_drop is not specified. +#' @param gen_drop the generation in which the randomly dropped person is. Will work if `ID_drop` is not specified. #' @param sex_drop the biological sex of the randomly dropped person. #' @param n_drop the number of times the mutation happens. -#' @return a pedigree with the dropped person's dadID and momID set to NA. +#' @return a pedigree with the dropped person's `dadID` and `momID` set to NA. #' @export dropLink <- function(ped, ID_drop = NA_integer_, diff --git a/dev/config_attachment.yaml b/dev/config_attachment.yaml new file mode 100644 index 0000000..46e24ec --- /dev/null +++ b/dev/config_attachment.yaml @@ -0,0 +1,12 @@ +path.n: NAMESPACE +path.d: DESCRIPTION +dir.r: R +dir.v: vignettes +dir.t: tests +extra.suggests: ~ +pkg_ignore: ~ +document: yes +normalize: yes +inside_rmd: no +must.exist: yes +check_if_suggests_is_installed: yes diff --git a/man/hazard.Rd b/man/hazard.Rd index 8a29f3b..7dd9503 100755 --- a/man/hazard.Rd +++ b/man/hazard.Rd @@ -28,7 +28,7 @@ The variables are as follows: \item DA2. Binary variable signifying the fundamental unknowability of existence \item birthYr. Birth year for person \item onsetYr. Year of onset for person - \item deathYr. Death year for person + \item \code{deathYr}. Death year for person \item available. logical. Whether \item Gen. Generation of the person \item proband. logical. Whether the person is a proband or not diff --git a/man/makeTwins.Rd b/man/makeTwins.Rd index 1458db8..8d9701f 100644 --- a/man/makeTwins.Rd +++ b/man/makeTwins.Rd @@ -27,7 +27,7 @@ makeTwins( \item{verbose}{logical. If TRUE, print progress through stages of algorithm} } \value{ -Returns a \code{data.frame} with MZ twins infomration added as a new column. +Returns a \code{data.frame} with MZ twins information added as a new column. } \description{ makeTwins diff --git a/vignettes/modelingrelatedness.Rmd b/vignettes/modelingrelatedness.Rmd index 7275134..a719302 100644 --- a/vignettes/modelingrelatedness.Rmd +++ b/vignettes/modelingrelatedness.Rmd @@ -119,7 +119,7 @@ run1 <- emxTwinModel( summary(run1) ``` -As you can see the model was unsucessful because it was not identified. But when we add another group, so that the model is identified, the model now fits. +As you can see the model was unsuccessful because it was not identified. But when we add another group, so that the model is identified, the model now fits. ```{r} run2 <- emxTwinModel( diff --git a/vignettes/modelingrelatedness.html b/vignettes/modelingrelatedness.html index 32291ad..0429b9e 100644 --- a/vignettes/modelingrelatedness.html +++ b/vignettes/modelingrelatedness.html @@ -485,10 +485,10 @@
identifyComponentModel
FunctionAs you can see the model was unsucessful because it was not identified. But when we add another group, so that the model is @@ -524,10 +524,10 @@
identifyComponentModel
FunctionplotPedigree()
function.
-
+
#> 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