diff --git a/.Rbuildignore b/.Rbuildignore
index c213e49..0347e2f 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -29,3 +29,5 @@ logo_script.R
check funs.R
inst/figure
Thumbs.db
+^wakefield\.Rproj$
+^\.github$
diff --git a/.github/.gitignore b/.github/.gitignore
new file mode 100644
index 0000000..2d19fc7
--- /dev/null
+++ b/.github/.gitignore
@@ -0,0 +1 @@
+*.html
diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml
new file mode 100644
index 0000000..52c2b27
--- /dev/null
+++ b/.github/workflows/R-CMD-check.yaml
@@ -0,0 +1,49 @@
+# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
+# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
+on:
+ push:
+ branches: [main, master]
+ pull_request:
+ branches: [main, master]
+
+name: R-CMD-check
+
+jobs:
+ R-CMD-check:
+ runs-on: ${{ matrix.config.os }}
+
+ name: ${{ matrix.config.os }} (${{ matrix.config.r }})
+
+ strategy:
+ fail-fast: false
+ matrix:
+ config:
+ - {os: macOS-latest, r: 'release'}
+ - {os: windows-latest, r: 'release'}
+ - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
+ - {os: ubuntu-latest, r: 'release'}
+ - {os: ubuntu-latest, r: 'oldrel-1'}
+
+ env:
+ GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+ R_KEEP_PKG_SOURCE: yes
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: r-lib/actions/setup-pandoc@v2
+
+ - uses: r-lib/actions/setup-r@v2
+ with:
+ r-version: ${{ matrix.config.r }}
+ http-user-agent: ${{ matrix.config.http-user-agent }}
+ use-public-rspm: true
+
+ - uses: r-lib/actions/setup-r-dependencies@v2
+ with:
+ extra-packages: any::rcmdcheck
+ needs: check
+
+ - uses: r-lib/actions/check-r-package@v2
+ with:
+ upload-snapshots: true
diff --git a/DESCRIPTION b/DESCRIPTION
index 296e085..fc16911 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -2,39 +2,110 @@ Package: wakefield
Title: Generate Random Data Sets
Version: 0.3.7
Authors@R: c(
- person("Tyler", "Rinker", email = "tyler.rinker@gmail.com", role = c("aut", "cre")),
- person("Josh", "O'Brien", role = "ctb"),
- person("Ananda", "Mahto", role = "ctb"),
- person("Matthew", "Sigal", role = "ctb"),
- person("Jonathan", "Carroll", role = "ctb"),
- person("Scott", "Westenberger", role = "ctb")
- )
+ person("Tyler", "Rinker", , "tyler.rinker@gmail.com", role = c("aut", "cre")),
+ person("Josh", "O'Brien", role = "ctb"),
+ person("Ananda", "Mahto", role = "ctb"),
+ person("Matthew", "Sigal", role = "ctb"),
+ person("Jonathan", "Carroll", role = "ctb"),
+ person("Scott", "Westenberger", role = "ctb")
+ )
Maintainer: Tyler Rinker
-Description: Generates random data sets including: data.frames, lists,
- and vectors.
-Depends: R (>= 3.2.0)
-Imports: chron, ggplot2, dplyr, stringi
-Suggests: testthat
+Description: Generates random data sets including: data.frames, lists, and
+ vectors.
License: GPL-2
-LazyData: TRUE
URL: https://github.com/trinker/wakefield
BugReports: https://github.com/trinker/wakefield/issues
-Roxygen: list(wrap = FALSE)
-Collate: 'utils.R' 'r_sample.R' 'age.R' 'r_sample_factor.R' 'animal.R'
- 'r_sample_binary.R' 'answer.R' 'area.R' 'as_integer.R' 'car.R'
- 'children.R' 'coin.R' 'color.R' 'date_stamp.R'
- 'r_sample_logical.R' 'death.R' 'dice.R' 'dna.R' 'dob.R'
- 'dummy.R' 'education.R' 'employment.R' 'eye.R' 'grade.R'
- 'grade_level.R' 'group.R' 'hair.R' 'normal.R' 'height.R'
- 'hour.R' 'id.R' 'income.R' 'internet_browser.R' 'interval.R'
- 'iq.R' 'language.R' 'level.R' 'r_sample_ordered.R' 'likert.R'
- 'lorem_ipsum.R' 'marital.R' 'military.R' 'minute.R' 'month.R'
- 'r_sample_replace.R' 'wakefield-package.R' 'name.R' 'peek.R'
- 'political.R' 'probs.R' 'r_data.R' 'r_data_frame.R' 'r_dummy.R'
- 'seriesname.R' 'r_insert.R' 'r_list.R' 'r_na.R'
- 'r_sample_integer.R' 'r_series.R' 'race.R' 'relate.R'
- 'religion.R' 'sat.R' 'second.R' 'sentence.R' 'sex.R'
- 'sex_inclusive.R' 'smokes.R' 'speed.R' 'state.R' 'string.R'
- 'table_heat.R' 'time_stamp.R' 'upper.R' 'valid.R' 'variables.R'
- 'varname.R' 'year.R' 'zip_code.R'
-RoxygenNote: 7.1.1
+Depends:
+ R (>= 3.2.0)
+Imports:
+ chron,
+ tibble,
+ stringi
+Suggests:
+ dplyr,
+ ggplot2,
+ testthat
+Encoding: UTF-8
+LazyData: TRUE
+RoxygenNote: 7.2.1
+Collate:
+ 'utils.R'
+ 'r_sample.R'
+ 'age.R'
+ 'r_sample_factor.R'
+ 'animal.R'
+ 'r_sample_binary.R'
+ 'answer.R'
+ 'area.R'
+ 'as_integer.R'
+ 'car.R'
+ 'children.R'
+ 'coin.R'
+ 'color.R'
+ 'date_stamp.R'
+ 'r_sample_logical.R'
+ 'death.R'
+ 'dice.R'
+ 'dna.R'
+ 'dob.R'
+ 'dummy.R'
+ 'education.R'
+ 'employment.R'
+ 'eye.R'
+ 'grade.R'
+ 'grade_level.R'
+ 'group.R'
+ 'hair.R'
+ 'normal.R'
+ 'height.R'
+ 'hour.R'
+ 'id.R'
+ 'income.R'
+ 'internet_browser.R'
+ 'interval.R'
+ 'iq.R'
+ 'language.R'
+ 'level.R'
+ 'r_sample_ordered.R'
+ 'likert.R'
+ 'lorem_ipsum.R'
+ 'marital.R'
+ 'military.R'
+ 'minute.R'
+ 'month.R'
+ 'r_sample_replace.R'
+ 'wakefield-package.R'
+ 'name.R'
+ 'peek.R'
+ 'political.R'
+ 'probs.R'
+ 'r_data.R'
+ 'r_data_frame.R'
+ 'r_dummy.R'
+ 'seriesname.R'
+ 'r_insert.R'
+ 'r_list.R'
+ 'r_na.R'
+ 'r_sample_integer.R'
+ 'r_series.R'
+ 'race.R'
+ 'relate.R'
+ 'religion.R'
+ 'sat.R'
+ 'second.R'
+ 'sentence.R'
+ 'sex.R'
+ 'sex_inclusive.R'
+ 'smokes.R'
+ 'speed.R'
+ 'state.R'
+ 'string.R'
+ 'table_heat.R'
+ 'time_stamp.R'
+ 'upper.R'
+ 'valid.R'
+ 'variables.R'
+ 'varname.R'
+ 'year.R'
+ 'zip_code.R'
+Roxygen: list(markdown = TRUE)
diff --git a/R/animal.R b/R/animal.R
index 23a1675..364eab8 100644
--- a/R/animal.R
+++ b/R/animal.R
@@ -1,6 +1,6 @@
#' Generate Random Vector of animals
#'
-#' \code{animal} - Generate a random vector of animals.
+#' `animal` - Generate a random vector of animals.
#'
#' @inheritParams color
#' @return Returns a random factor vector of animal elements.
@@ -29,16 +29,16 @@ animal <- function(n, k = 10, x = wakefield::animal_list, prob = NULL, name = "A
#' Generate Random Vector of animals
#'
-#' \code{pet} - Generate a random vector of pets.
+#' `pet` - Generate a random vector of pets.
#'
#' @details The household pets and probabilities:
#'
#' \tabular{ll}{
-#' Dog \tab 36.5 \%\cr
-#' Cat \tab 30.4 \%\cr
-#' None \tab 25.8 \%\cr
-#' Bird \tab 3.1 \% \cr
-#' Horse \tab 1.5 \% \cr
+#' Dog \tab 36.5 %\cr
+#' Cat \tab 30.4 %\cr
+#' None \tab 25.8 %\cr
+#' Bird \tab 3.1 % \cr
+#' Horse \tab 1.5 % \cr
#' }
#'
#' @export
diff --git a/R/as_integer.R b/R/as_integer.R
index aec346c..587cb14 100644
--- a/R/as_integer.R
+++ b/R/as_integer.R
@@ -1,19 +1,19 @@
#' Convert a Factor Data Frame to Integer
#'
-#' Converts a \code{\link[base]{data.frame}} of \code{\link[base]{factor}}s to
+#' Converts a [base::data.frame()] of [base::factor()]s to
#' integers.
#'
-#' @param x A \code{\link[base]{data.frame}} of \code{\link[base]{factor}}s.
-#' @param cols Numeric indices of the columns to incude (use \code{-} to exclude
-#' as well). Default is to assign random \code{NA}s to all columns except the
+#' @param x A [base::data.frame()] of [base::factor()]s.
+#' @param cols Numeric indices of the columns to incude (use `-` to exclude
+#' as well). Default is to assign random `NA`s to all columns except the
#' first column.
-#' @param fun An \code{as.} coercion function to apply to each column. Default
-#' is \code{\link[base]{as.integer}}.
-#' @return Returns a \code{\link[base]{data.frame}} equal to the
-#' \code{\link[base]{class}} of \code{x} with integer columns rather than factor.
+#' @param fun An `as.` coercion function to apply to each column. Default
+#' is [base::as.integer()].
+#' @return Returns a [base::data.frame()] equal to the
+#' [base::class()] of `x` with integer columns rather than factor.
#' @keywords integer numeric
#' @export
-#' @seealso \code{\link[wakefield]{r_series}}
+#' @seealso [wakefield::r_series()]
#' @examples
#' as_integer(r_series(likert_7, 5, 10))
#' as_integer(r_series(likert_7, 5, 10), cols = c(2, 4))
diff --git a/R/car.R b/R/car.R
index da74caf..3ef47a3 100644
--- a/R/car.R
+++ b/R/car.R
@@ -1,6 +1,6 @@
#' Generate Random Vector of Cars
#'
-#' Generate a random vector of cars (see \code{?\link[datasets]{mtcars}}).
+#' Generate a random vector of cars (see `?[mtcars][datasets::mtcars]`).
#'
#' @inheritParams r_sample_factor
#' @return Returns a random vector of car elements.
diff --git a/R/color.R b/R/color.R
index 1dc2b07..0f4c08c 100644
--- a/R/color.R
+++ b/R/color.R
@@ -1,15 +1,15 @@
#' Generate Random Vector of Colors
#'
-#' \code{color} - Generate a random vector of colors (sampled from \code{colors()}).
+#' `color` - Generate a random vector of colors (sampled from `colors()`).
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
-#' @param k The number of the elements of x to sample from (uses \code{sample(x, k)}).
+#' the environment of `r_data_frame` or `r_list`.
+#' @param k The number of the elements of x to sample from (uses `sample(x, k)`).
#' @param x A vector of elements to chose from.
#' @param prob A vector of probabilities to chose from.
-#' @param name The name to assign to the output vector's \code{varname}
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random factor vector of color elements.
#' @keywords color
#' @export
@@ -37,8 +37,8 @@ color <- function(n, k = 10, x = grDevices::colors(), prob = NULL, name = "Color
#' Generate Random Vector of Colors
#'
-#' \code{color} - Generate a random vector of \emph{psycological primary}
-#' colors (sampled from \code{colors()}).
+#' `color` - Generate a random vector of *psycological primary*
+#' colors (sampled from `colors()`).
#'
#' @export
#' @rdname color
diff --git a/R/date_stamp.R b/R/date_stamp.R
index 089d0d3..29642b8 100644
--- a/R/date_stamp.R
+++ b/R/date_stamp.R
@@ -3,27 +3,27 @@
#' Generate a random vector of dates.
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
-#' @param random logical. If \code{TRUE} the dates are randomized, otherwise the
+#' the environment of `r_data_frame` or `r_list`.
+#' @param random logical. If `TRUE` the dates are randomized, otherwise the
#' dates are sequential.
-#' @param x A vector of elements to chose from. This may be \code{NULL} if
-#' arguments are supplied to \code{start}, \code{k}, and \code{by}. The
-#' \code{x} argument takes precedence over the other three if \code{!is.null}.
-#' Note that \code{start}, \code{k}, and \code{by} work together to make a
-#' vector of dates to sample from. See \code{\link[base]{seq.Date}} for
+#' @param x A vector of elements to chose from. This may be `NULL` if
+#' arguments are supplied to `start`, `k`, and `by`. The
+#' `x` argument takes precedence over the other three if `!is.null`.
+#' Note that `start`, `k`, and `by` work together to make a
+#' vector of dates to sample from. See [base::seq.Date()] for
#' additional information.
#' @param start A date to start the sequence at.
#' @param k The length of the sequence (number of the elements) so build out from
-#' \code{start}.
+#' `start`.
#' @param by The interval to use in building the sequence.
#' @param prob A vector of probabilities to chose from.
-#' @param name The name to assign to the output vector's \code{varname}
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random factor vector of date elements.
#' @keywords date
#' @export
-#' @seealso \code{\link[base]{seq.Date}}
+#' @seealso [base::seq.Date()]
#' @family variable functions
#' @examples
#' date_stamp(10)
@@ -35,7 +35,7 @@ date_stamp <- function(n, random = FALSE, x = NULL, start = Sys.Date(), k = 12,
by = "-1 months", prob = NULL, name = "Date"){
if (is.null(x)){
- x <- seq(start, length = k, by = by)
+ x <- seq(start, length.out = k, by = by)
}
if (!inherits(x, c("Date", "POSIXct", "POSIXt"))) warning("`x`may not a date vector")
diff --git a/R/death.R b/R/death.R
index cc97cf8..5531b90 100644
--- a/R/death.R
+++ b/R/death.R
@@ -1,6 +1,6 @@
#' Generate Random Vector of Deaths Outcomes
#'
-#' Generate a random logical vector of deaths (\code{TRUE}/\code{FALSE}).
+#' Generate a random logical vector of deaths (`TRUE`/`FALSE`).
#'
#' @inheritParams dummy
#' @return Returns a random logical vector of death outcome elements.
diff --git a/R/dob.R b/R/dob.R
index 6444119..949bdd9 100644
--- a/R/dob.R
+++ b/R/dob.R
@@ -17,7 +17,7 @@ dob <- function(n, random = TRUE, x = NULL, start = Sys.Date() - 365*15,
k = 365*2, by = "1 days", prob = NULL, name = "DOB"){
if (is.null(x)){
- x <- seq(start, length = k, by = by)
+ x <- seq(start, length.out = k, by = by)
}
if (!inherits(x, c("Date", "POSIXct", "POSIXt"))) warning("`x`may not a date vector")
diff --git a/R/dummy.R b/R/dummy.R
index 150c30e..da5cb23 100644
--- a/R/dummy.R
+++ b/R/dummy.R
@@ -3,13 +3,13 @@
#' Generate a random dummy coded (0/1) vector.
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
+#' the environment of `r_data_frame` or `r_list`.
#' @param prob A vector of probabilities to chose from.
-#' @param name The name to assign to the output vector's \code{varname}
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random dummy vector of (0/1) elements.
-#' @seealso \code{\link[base]{sample.int}}
+#' @seealso [base::sample.int()]
#' @family variable functions
#' @export
#' @examples
diff --git a/R/education.R b/R/education.R
index 463a03a..4e9d316 100644
--- a/R/education.R
+++ b/R/education.R
@@ -6,19 +6,19 @@
#' U.S. educational attainment make-up (http://www.census.gov):
#'
#' \tabular{lr}{
-#' \bold{ Highest Attainment} \tab \bold{Percent} \cr
-#' No Schooling Completed \tab 1.3 \% \cr
-#' Nursery School to 8th Grade \tab 5 \% \cr
-#' 9th Grade to 12th Grade, No Diploma \tab 8.5 \% \cr
-#' Regular High School Diploma \tab 24.6 \%\cr
-#' GED or Alternative Credential \tab 3.9 \% \cr
-#' Some College, Less than 1 Year \tab 6.4 \% \cr
-#' Some College, 1 or More Years, No Degree \tab 15 \% \cr
-#' Associate's Degree \tab 7.5 \% \cr
-#' Bachelor's Degree \tab 17.6 \%\cr
-#' Master's Degree \tab 7.2 \% \cr
-#' Professional School Degree \tab 1.9 \% \cr
-#' Doctorate Degree \tab 1.2 \% \cr
+#' ** Highest Attainment** \tab **Percent** \cr
+#' No Schooling Completed \tab 1.3 % \cr
+#' Nursery School to 8th Grade \tab 5 % \cr
+#' 9th Grade to 12th Grade, No Diploma \tab 8.5 % \cr
+#' Regular High School Diploma \tab 24.6 %\cr
+#' GED or Alternative Credential \tab 3.9 % \cr
+#' Some College, Less than 1 Year \tab 6.4 % \cr
+#' Some College, 1 or More Years, No Degree \tab 15 % \cr
+#' Associate's Degree \tab 7.5 % \cr
+#' Bachelor's Degree \tab 17.6 %\cr
+#' Master's Degree \tab 7.2 % \cr
+#' Professional School Degree \tab 1.9 % \cr
+#' Doctorate Degree \tab 1.2 % \cr
#' }
#'
#' @inheritParams r_sample_factor
diff --git a/R/employment.R b/R/employment.R
index f219768..3757c27 100644
--- a/R/employment.R
+++ b/R/employment.R
@@ -6,12 +6,12 @@
#' @details The following arbitrary probabilities are used:
#'
#' \tabular{lr}{
-#' \bold{ Employment Status} \tab \bold{Percent}\cr
-#' Full Time \tab 60\%\cr
-#' Part Time \tab 10\%\cr
-#' Unemployed \tab 10\%\cr
-#' Retired \tab 10\%\cr
-#' Student \tab 10\%\cr
+#' ** Employment Status** \tab **Percent**\cr
+#' Full Time \tab 60%\cr
+#' Part Time \tab 10%\cr
+#' Unemployed \tab 10%\cr
+#' Retired \tab 10%\cr
+#' Student \tab 10%\cr
#' }
#'
#' @return Returns a random vector of employment status elements.
diff --git a/R/eye.R b/R/eye.R
index 0360973..99b5b39 100644
--- a/R/eye.R
+++ b/R/eye.R
@@ -5,12 +5,12 @@
#' @details The eye colors and probabilities:
#'
#' \tabular{lr}{
-#' \bold{ Color} \tab \bold{Percent}\cr
-#' Brown \tab 44 \%\cr
-#' Blue \tab 30 \%\cr
-#' Green \tab 13 \%\cr
-#' Hazel \tab 9 \%\cr
-#' Gray \tab 4 \%\cr
+#' ** Color** \tab **Percent**\cr
+#' Brown \tab 44 %\cr
+#' Blue \tab 30 %\cr
+#' Green \tab 13 %\cr
+#' Hazel \tab 9 %\cr
+#' Gray \tab 4 %\cr
#' }
#'
#' @inheritParams r_sample_factor
diff --git a/R/grade.R b/R/grade.R
index e61cf8a..b14ca84 100644
--- a/R/grade.R
+++ b/R/grade.R
@@ -1,11 +1,11 @@
#' Generate Random Vector of Grades
#'
-#' \code{grade} - Generate a random normal vector of percent grades.
+#' `grade` - Generate a random normal vector of percent grades.
#'
#' @details The conversion between percent range, letter grade, and GPA is:
#'
#' \tabular{llr}{
-#' \bold{Percent} \tab \bold{Letter} \tab \bold{GPA}\cr
+#' **Percent** \tab **Letter** \tab **GPA**\cr
#' 97-100 \tab A+ \tab 4.00\cr
#' 93-96 \tab A \tab 4.00\cr
#' 90-92 \tab A- \tab 3.67\cr
@@ -49,7 +49,7 @@ function (n, mean = 88, sd = 4, name = "Grade", digits = 1) {
#' Generate Random Vector of Grades
#'
-#' \code{grade} - Generate a random normal vector of letter grades.
+#' `grade` - Generate a random normal vector of letter grades.
#'
#' @export
#' @rdname grade
@@ -65,7 +65,7 @@ function (n, mean = 88, sd = 4, name = "Grade_Letter") {
#' Generate Random Vector of Grades
#'
-#' \code{grade} - Generate a random normal vector of grade point averages (GPA;
+#' `grade` - Generate a random normal vector of grade point averages (GPA;
#' 0.0 - 4.0 scale).
#'
#' @export
diff --git a/R/hair.R b/R/hair.R
index 19898d1..1d752d0 100644
--- a/R/hair.R
+++ b/R/hair.R
@@ -5,11 +5,11 @@
#' @details The hair colors and probabilities:
#'
#' \tabular{lr}{
-#' \bold{ Color} \tab \bold{Percent}\cr
-#' Brown \tab 35 \%\cr
-#' Black \tab 28 \%\cr
-#' Blonde \tab 26 \%\cr
-#' Red \tab 11 \%\cr
+#' ** Color** \tab **Percent**\cr
+#' Brown \tab 35 %\cr
+#' Black \tab 28 %\cr
+#' Blonde \tab 26 %\cr
+#' Red \tab 11 %\cr
#' }
#'
#' @inheritParams r_sample_factor
diff --git a/R/height.R b/R/height.R
index 6f2683c..88cf8d7 100644
--- a/R/height.R
+++ b/R/height.R
@@ -1,10 +1,10 @@
#' Generate Random Vector of Heights
#'
-#' \code{height} and \code{height_in} - Generate a random normal vector of
+#' `height` and `height_in` - Generate a random normal vector of
#' heights in inches.
#'
-#' @note \code{height} rounds to nearest whole number. \code{height_in} &
-#' \code{height_in} round to the nearest tenths.
+#' @note `height` rounds to nearest whole number. `height_in` &
+#' `height_in` round to the nearest tenths.
#'
#' @inheritParams normal_round
#' @return Returns a random normal vector of height elements.
@@ -39,7 +39,7 @@ height_in <- hijack(normal_round,
#' Generate Random Vector of Heights
#'
-#' \code{height_cm} - Generate a random normal vector of heights in centimeters.
+#' `height_cm` - Generate a random normal vector of heights in centimeters.
#'
#' @rdname height
#' @export
diff --git a/R/hour.R b/R/hour.R
index dae1485..f312460 100644
--- a/R/hour.R
+++ b/R/hour.R
@@ -3,12 +3,12 @@
#' Generate a random vector of H:M:S times.
#'
#' @inheritParams r_sample_factor
-#' @param random logical. If \code{TRUE} the times are randomized, otherwise the
+#' @param random logical. If `TRUE` the times are randomized, otherwise the
#' times are sequential.
#' @return Returns a random vector of H:M:S time elements.
#' @keywords time hour
#' @export
-#' @seealso \code{\link[chron]{times}}
+#' @seealso [chron::times()]
#' @examples
#' hour(20)
#' hour(20, random=TRUE)
diff --git a/R/id.R b/R/id.R
index 03c06fb..988bf55 100644
--- a/R/id.R
+++ b/R/id.R
@@ -1,29 +1,29 @@
#' Identification Numbers
#'
-#' \code{id} - Generate a sequential \code{\link[base]{character}} vector of
+#' `id` - Generate a sequential [base::character()] vector of
#' zero-padded identification numbers (IDs).
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
-#' @param random logical. If \code{TRUE} the IDs are randomized, otherwise the
+#' the environment of `r_data_frame` or `r_list`.
+#' @param random logical. If `TRUE` the IDs are randomized, otherwise the
#' IDs are sequential.
-#' @param name The name to assign to the output vector's \code{varname}
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @rdname id
#' @keywords id identification
-#' @section Warning: \code{id} uses \code{\link[base]{sprintf}} to generate the
-#' padded ID. Per \code{\link[base]{sprintf}}'s documentation: ``The format
+#' @section Warning: `id` uses [base::sprintf()] to generate the
+#' padded ID. Per [base::sprintf()]'s documentation: ``The format
#' string is passed down the OS's sprintf function...The behaviour on inputs not
#' documented here is 'undefined', which means it is allowed to differ by
-#' platform.'' See \code{\link[base]{sprintf}} for details.
-#' @note \code{id} is faster than \code{id_factor}, as the later coerces the
-#' vector to a \code{\link[base]{factor}}.
+#' platform.'' See [base::sprintf()] for details.
+#' @note `id` is faster than `id_factor`, as the later coerces the
+#' vector to a [base::factor()].
#' @return Returns a (optionally random) vector of
-#' \code{\link[base]{character}}/\code{\link[base]{factor}} observations
+#' [base::character()]/[base::factor()] observations
#' ID numbers.
#' @export
-#' @seealso \code{\link[base]{sprintf}}
+#' @seealso [base::sprintf()]
#' @examples
#' id(1000)
#' r_data_frame(n=21, id)
@@ -42,7 +42,7 @@ id <- function(n, random = FALSE, name = "ID"){
#' Identification Numbers
#'
-#' \code{id_factor} - Generate a sequential \code{\link[base]{factor}} vector
+#' `id_factor` - Generate a sequential [base::factor()] vector
#' of zero-padded identification numbers (IDs).
#'
#' @rdname id
diff --git a/R/income.R b/R/income.R
index 7dc0fee..46b17c8 100644
--- a/R/income.R
+++ b/R/income.R
@@ -2,19 +2,19 @@
#'
#' Generate a random gamma vector of incomes.
#'
-#' @details Incomes are generated using: \code{rgamma(n, 2) * 2000}.
+#' @details Incomes are generated using: `rgamma(n, 2) * 2000`.
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
+#' the environment of `r_data_frame` or `r_list`.
#' @param digits Integer indicating the number of decimal places to be used.
-#' Negative values are allowed (see \code{\link[base]{round}}).
-#' @param name The name to assign to the output vector's \code{varname}
+#' Negative values are allowed (see [base::round()]).
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random gamma vector of income elements.
#' @keywords income
#' @export
#' @family variable functions
-#' @seealso \code{\link[base]{gamma}}
+#' @seealso [base::gamma()]
#' @examples
#' income(10)
#' hist(income(10000))
diff --git a/R/internet_browser.R b/R/internet_browser.R
index 1658595..1f7e7ef 100644
--- a/R/internet_browser.R
+++ b/R/internet_browser.R
@@ -5,13 +5,13 @@
#' @details The browser use and probabilities (from https://gs.statcounter.com/):
#'
#' \tabular{lr}{
-#' \bold{ Browser} \tab \bold{Percent} \cr
-#' Chrome \tab 50.27 \%\cr
-#' IE \tab 17.50 \% \cr
-#' Firefox \tab 16.89 \%\cr
-#' Safari \tab 9.94 \% \cr
-#' Opera \tab 1.70 \% \cr
-#' Android \tab 1.32 \% \cr
+#' ** Browser** \tab **Percent** \cr
+#' Chrome \tab 50.27 %\cr
+#' IE \tab 17.50 % \cr
+#' Firefox \tab 16.89 %\cr
+#' Safari \tab 9.94 % \cr
+#' Opera \tab 1.70 % \cr
+#' Android \tab 1.32 % \cr
#' }
#'
#' @inheritParams r_sample_factor
@@ -40,7 +40,7 @@ internet_browser <- hijack(r_sample_factor,
## Android,1.32", header=TRUE, stringsAsFactors = FALSE, sep=",") %>%
## mutate(
## Proportion = Percent/100,
-## Percent = paste(Percent, "\\%")
+## Percent = paste(Percent, "\%")
## ) %>%
## arrange(desc(Proportion)) %>%
## select(1, 3) %>% dput
diff --git a/R/interval.R b/R/interval.R
index db84198..9281fa1 100644
--- a/R/interval.R
+++ b/R/interval.R
@@ -1,30 +1,30 @@
#' Cut Numeric Into Factor
#'
-#' A wrapper for \code{\link[base]{cut}} that cuts the vector and then adds the
-#' \code{varname} produced by the original function.
+#' A wrapper for [base::cut()] that cuts the vector and then adds the
+#' `varname` produced by the original function.
#'
#' @param fun A vector producing function.
#' @param breaks Either a numeric vector of two or more unique cut points or a
#' single number (greater than or equal to 2) giving the number of intervals
-#' into which the vector produced from \code{fun} is to be cut.
-#' @param \ldots Other arguments passed to \code{fun}.
+#' into which the vector produced from `fun` is to be cut.
+#' @param \ldots Other arguments passed to `fun`.
#' @param labels Labels for the levels of the resulting category. By default,
#' labels are constructed using "(a,b]" interval notation. If
-#' \code{labels = FALSE}, simple integer codes are returned instead of a factor.
-#' @param include.lowest logical. If \code{TRUE} an 'x[i]' equal to the lowest
-#' (or highest, for \code{right = FALSE}) 'breaks' value should be included.
-#' @param right logical. If \code{TRUE} the intervals will be closed on the
+#' `labels = FALSE`, simple integer codes are returned instead of a factor.
+#' @param include.lowest logical. If `TRUE` an `x[i]` equal to the lowest
+#' (or highest, for `right = FALSE`) 'breaks' value should be included.
+#' @param right logical. If `TRUE` the intervals will be closed on the
#' right (and open on the left).
#' @param dig.lab An integer which is used when labels are not given. It
#' determines the number of digits used in formatting the break numbers.
-#' @param ordered_result logical. If \code{TRUE} the result be an ordered
+#' @param ordered_result logical. If `TRUE` the result be an ordered
#' factor.
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
-#' @return Returns a \code{\link[base]{cut}} factor vector.
+#' the environment of `r_data_frame` or `r_list`.
+#' @return Returns a [base::cut()] factor vector.
#' @keywords cut interval
#' @export
-#' @seealso \code{\link[base]{cut}}
+#' @seealso [base::cut()]
#' @examples
#' interval(normal, 4, n=100)
#' attributes(interval(normal, 4, n=100))
diff --git a/R/language.R b/R/language.R
index 1d173c7..1def921 100644
--- a/R/language.R
+++ b/R/language.R
@@ -1,7 +1,7 @@
#' Generate Random Vector of Languages
#'
#' Generate a random vector of languages from the
-#' \code{\link[wakefield]{presidential_debates_2012}}.
+#' [wakefield::presidential_debates_2012()].
#'
#' @inheritParams r_sample_factor
#' @return Returns a random character vector of language elements.
diff --git a/R/level.R b/R/level.R
index 04bb656..c14f236 100644
--- a/R/level.R
+++ b/R/level.R
@@ -1,6 +1,6 @@
#' Generate Random Vector of Levels
#'
-#' \code{level} - Generate a random vector of integer levels (1-4).
+#' `level` - Generate a random vector of integer levels (1-4).
#'
#' @inheritParams r_sample_factor
#' @return Returns a random vector of integer levels (1-4) elements.
@@ -25,18 +25,18 @@ level <- hijack(r_sample,
#' Generate Random Vector of Levels
#'
-#' \code{math} - Generate a random vector of integer mathematics levels (1-4)
+#' `math` - Generate a random vector of integer mathematics levels (1-4)
#' similar to New York State grades 3-8 assessment results.
#'
-#' @details Distribution of levels (used in \code{prob}) were taken from New
-#' York State' s 2014 assessment report: \url{http://www.p12.nysed.gov/irs/}
+#' @details Distribution of levels (used in `prob`) were taken from New
+#' York State' s 2014 assessment report:
#'
#' \tabular{lrr}{
-#' \bold{ Level} \tab \bold{ELA} \tab \bold{Math}\cr
-#' 1 \tab 31.6\% \tab 29.8\%\cr
-#' 2 \tab 37.3\% \tab 33.3\%\cr
-#' 3 \tab 22.3\% \tab 22.8\%\cr
-#' 4 \tab 8.8\% \tab 14.0\%\cr
+#' ** Level** \tab **ELA** \tab **Math**\cr
+#' 1 \tab 31.6% \tab 29.8%\cr
+#' 2 \tab 37.3% \tab 33.3%\cr
+#' 3 \tab 22.3% \tab 22.8%\cr
+#' 4 \tab 8.8% \tab 14.0%\cr
#' }
#'
#' @export
@@ -49,7 +49,7 @@ math <- hijack(r_sample,
#' Generate Random Vector of Levels
#'
-#' \code{ela} - Generate a random vector of integer English language arts (ELA)
+#' `ela` - Generate a random vector of integer English language arts (ELA)
#' levels (1-4) similar to New York State grades 3-8 assessment results.
#'
#' @export
diff --git a/R/likert.R b/R/likert.R
index 0bdd5bf..f96c793 100644
--- a/R/likert.R
+++ b/R/likert.R
@@ -3,8 +3,8 @@
#' Generate a random vector of Likert-type responses.
#'
#' @inheritParams r_sample_factor
-#' @note \code{likert} & \code{likert_5} are identical outputs, sampling from a
-#' 5-point response scale. \code{likert_7} samples from a 7-point response
+#' @note `likert` & `likert_5` are identical outputs, sampling from a
+#' 5-point response scale. `likert_7` samples from a 7-point response
#' scale.
#' @return Returns a random vector of Likert-type response elements.
#' @keywords likert responses
diff --git a/R/lorem_ipsum.R b/R/lorem_ipsum.R
index 3c9180e..691b715 100644
--- a/R/lorem_ipsum.R
+++ b/R/lorem_ipsum.R
@@ -3,18 +3,18 @@
#' Generates (pseudo)random lorem ipsum text.
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
-#' @param \dots Other arguments passed to \code{\link[stringi]{stri_rand_lipsum}}.
-#' @param name The name to assign to the output vector's \code{varname}
+#' the environment of `r_data_frame` or `r_list`.
+#' @param \dots Other arguments passed to [stringi::stri_rand_lipsum()].
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random character vector of string elements.
#' @keywords string character
#' @export
-#' @note \code{lorem_ipsum} and \code{paragraph} produce identical strings but
+#' @note `lorem_ipsum` and `paragraph` produce identical strings but
#' will produce different vector/column names when used inside of
-#' \code{r_data_frame} or \code{r_list}.
-#' @seealso \code{\link[stringi]{stri_rand_lipsum}}
+#' `r_data_frame` or `r_list`.
+#' @seealso [stringi::stri_rand_lipsum()]
#' @rdname lorem_ipsum
#' @family variable functions
#' @examples
diff --git a/R/military.R b/R/military.R
index 03d5bae..ff5a62c 100644
--- a/R/military.R
+++ b/R/military.R
@@ -6,12 +6,12 @@
#' military make-up:
#'
#' \tabular{lrr}{
-#' \bold{ Branch} \tab \bold{N} \tab \bold{Percent} \cr
-#' Army \tab 541,291 \tab 37.9\%\cr
-#' Air Force \tab 333,772 \tab 23.3\%\cr
-#' Navy \tab 317,237 \tab 22.2\%\cr
-#' Marine Corps \tab 195,338 \tab 13.7\%\cr
-#' Coast Guard \tab 42,357 \tab 3.0\%\cr
+#' ** Branch** \tab **N** \tab **Percent** \cr
+#' Army \tab 541,291 \tab 37.9%\cr
+#' Air Force \tab 333,772 \tab 23.3%\cr
+#' Navy \tab 317,237 \tab 22.2%\cr
+#' Marine Corps \tab 195,338 \tab 13.7%\cr
+#' Coast Guard \tab 42,357 \tab 3.0%\cr
#' }
#'
#' @inheritParams r_sample_factor
diff --git a/R/minute.R b/R/minute.R
index b81e9a3..62d9d6a 100644
--- a/R/minute.R
+++ b/R/minute.R
@@ -3,12 +3,12 @@
#' Generate a random vector of minutes in H:M:S format.
#'
#' @inheritParams r_sample_factor
-#' @param random logical. If \code{TRUE} the times are randomized, otherwise the
+#' @param random logical. If `TRUE` the times are randomized, otherwise the
#' times are sequential.
#' @return Returns a random vector of minute time elements in H:M:S format.
#' @keywords time minute
#' @export
-#' @seealso \code{\link[chron]{times}}
+#' @seealso [chron::times()]
#' @examples
#' minute(20)
#' minute(20, random=TRUE)
diff --git a/R/name.R b/R/name.R
index fa5e57c..5f64807 100644
--- a/R/name.R
+++ b/R/name.R
@@ -1,7 +1,7 @@
#' Generate Random Vector of Names
#'
#' Generate a random vector of first names. This dataset includes all unique entries
-#' from the \code{babynames} package.
+#' from the `babynames` package.
#'
#' @inheritParams r_sample_replace
#' @return Returns a random vector of name elements.
diff --git a/R/normal.R b/R/normal.R
index 0f16f8a..b8751d1 100644
--- a/R/normal.R
+++ b/R/normal.R
@@ -1,22 +1,22 @@
#' Generate Random Normal Vector
#'
-#' \code{normal} - A wrapper for \code{\link[stats]{rnorm}} that generate a
+#' `normal` - A wrapper for [stats::rnorm()] that generate a
#' random normal vector.
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
+#' the environment of `r_data_frame` or `r_list`.
#' @param mean The mean value for the normal distribution to be drawn from.
#' @param sd The standard deviation of the normal distribution to draw from.
#' @param min A numeric lower boundary cutoff. Results less than this value will be
-#' replaced with \code{min}.
+#' replaced with `min`.
#' @param max A numeric upper boundary cutoff. Results greater than this value will
-#' be replaced with \code{max}.
-#' @param name The name to assign to the output vector's \code{varname}
+#' be replaced with `max`.
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random vector of elements.
#' @keywords normal
-#' @seealso \code{\link[stats]{rnorm}}
+#' @seealso [stats::rnorm()]
#' @family variable functions
#' @export
#' @rdname normal
@@ -44,12 +44,12 @@ function (n, mean = 0, sd = 1, min = NULL, max = NULL, name = "Normal") {
#' Generate Random Normal Vector
#'
-#' \code{normal_round} - A wrapper for \code{\link[stats]{rnorm}} that generate
+#' `normal_round` - A wrapper for [stats::rnorm()] that generate
#' a rounded random normal vector.
#'
#' @param digits Integer indicating the number of decimal places to be used.
-#' Negative values are allowed (see \code{\link[base]{round}}).
-#' @seealso \code{\link[base]{round}}
+#' Negative values are allowed (see [base::round()]).
+#' @seealso [base::round()]
#' @export
#' @rdname normal
normal_round <-
diff --git a/R/peek.R b/R/peek.R
index 2838795..7fdf794 100644
--- a/R/peek.R
+++ b/R/peek.R
@@ -1,19 +1,19 @@
#' Data Frame Viewing
#'
#' Convenience function to view all the columns of the head
-#' of a truncated \code{\link[base]{data.frame}}. \code{peek} invisibly returns
-#' \code{x}. This makes its use ideal in a \pkg{dplyr}/\pkg{magrittr} pipeline.
+#' of a truncated [base::data.frame()]. `peek` invisibly returns
+#' `x`. This makes its use ideal in a \pkg{dplyr}/\pkg{magrittr} pipeline.
#'
-#' @param x A \code{\link[base]{data.frame}} object.
+#' @param x A [base::data.frame()] object.
#' @param n Number of rows to display.
#' @param width The width of the columns to be displayed.
#' @param \ldots For internal use.
-#' @return Prints a truncated head but invisibly returns \code{x}.
-#' @seealso \code{\link[utils]{head}}
+#' @return Prints a truncated head but invisibly returns `x`.
+#' @seealso [utils::head()]
#' @export
#' @details By default \pkg{dplyr} does not print all columns of a data frame
-#' (\code{tbl_df}). This makes inspection of data difficult at times,
-#' particularly with text string data. \code{peek} allows the user to see a
+#' (`tbl_df`). This makes inspection of data difficult at times,
+#' particularly with text string data. `peek` allows the user to see a
#' truncated head for inspection purposes.
#' @examples
#' (dat1 <- r_data_frame(100, id, sentence, paragraph))
diff --git a/R/political.R b/R/political.R
index 1e91de2..1f507cf 100644
--- a/R/political.R
+++ b/R/political.R
@@ -6,12 +6,12 @@
#' political make-up of registered voters (2014). The default make up is:
#'
#' \tabular{lrr}{
-#' \bold{ Party} \tab \bold{N} \tab \bold{Percent} \cr
-#' Democrat \tab 43,140,758 \tab 57.73\% \cr
-#' Republican \tab 30,700,138 \tab 41.08\% \cr
-#' Constitution \tab 367,000 \tab .49\% \cr
-#' Libertarian \tab 278,446 \tab .37\% \cr
-#' Green \tab 246,145 \tab .33\% \cr
+#' ** Party** \tab **N** \tab **Percent** \cr
+#' Democrat \tab 43,140,758 \tab 57.73% \cr
+#' Republican \tab 30,700,138 \tab 41.08% \cr
+#' Constitution \tab 367,000 \tab .49% \cr
+#' Libertarian \tab 278,446 \tab .37% \cr
+#' Green \tab 246,145 \tab .33% \cr
#' }
#'
#' @inheritParams r_sample_factor
diff --git a/R/probs.R b/R/probs.R
index 0dd0197..e60fe91 100644
--- a/R/probs.R
+++ b/R/probs.R
@@ -4,7 +4,7 @@
#'
#' @param j An integer of number of probability elements (typically performs
#' best at j < 4000).
-#' @param upper \code{probs} works by sampling from \code{1:upper} j times and
+#' @param upper `probs` works by sampling from `1:upper` j times and
#' then dividing each sample by the sum of all samples.
#' @return Returns a vector of probabilities summing to 1.
#' @keywords probability percent
diff --git a/R/r_data.R b/R/r_data.R
index 933f1e5..7684d46 100644
--- a/R/r_data.R
+++ b/R/r_data.R
@@ -1,6 +1,6 @@
#' Pre-Selected Column Data Set
#'
-#' \code{r_data} - Generate a data set with pre-set columns selected.
+#' `r_data` - Generate a data set with pre-set columns selected.
#'
#' @param n The length to pass to the randomly generated vectors (number of rows).
#' @param \ldots A set of optionally named arguments. Using \pkg{wakefield}
@@ -18,13 +18,13 @@
#' \item Died
#' }
#'
-#' The user may use \ldots to add additional columns. \code{r_data} is a
+#' The user may use \ldots to add additional columns. `r_data` is a
#' convenience function to quickly produce a data set. For more specific usage
-#' use the more flexible \code{\link[wakefield]{r_data_frame}} function.
-#' @return Returns a \code{\link[dplyr]{tbl_df}}.
+#' use the more flexible [wakefield::r_data_frame()] function.
+#' @return Returns a [dplyr::tbl_df()].
#' @export
#' @rdname r_data
-#' @seealso \code{\link[wakefield]{r_data_frame}}
+#' @seealso [wakefield::r_data_frame()]
#' @examples
#' r_data()
#' r_data(10)
@@ -52,7 +52,7 @@ r_data <- function(n = 500, ...){
#' Pre-Selected Column Data Set
#'
-#' \code{r_data_theme} - Generate a themed data set with pre-set columns.
+#' `r_data_theme` - Generate a themed data set with pre-set columns.
#'
#' @param data_theme A data theme. Currently selections include:
#' \describe{
diff --git a/R/r_data_frame.R b/R/r_data_frame.R
index b58bb7b..4a5b436 100644
--- a/R/r_data_frame.R
+++ b/R/r_data_frame.R
@@ -1,6 +1,6 @@
#' Data Frame Production (From Variable Functions)
#'
-#' Produce a \code{\link[dplyr]{tbl_df}} data frame that allows the user to
+#' Produce a [dplyr::tbl_df()] data frame that allows the user to
#' lazily pass unnamed \pkg{wakefield} variable functions (optionally, without
#' call parenthesis).
#'
@@ -8,19 +8,19 @@
#' @param \ldots A set of optionally named arguments. Using \pkg{wakefield}
#' variable functions require no name or call parenthesis.
#' @param rep.sep A separator to use for repeated variable names. For example
-#' if the \code{\link[wakefield]{age}} is used three times
-#' (\code{r_data_frame(age, age, age)}), the name "Age" will be assigned to all
-#' three columns. The results in column names \code{c("Age_1", "Age_2", "Age_3")}.
-#' To turn of this behavior use \code{rep.sep = NULL}. This results in
-#' \code{c("Age", "Age.1", "Age.2")} column names in the
-#' \code{\link[base]{data.frame}}.
-#' @return Returns a \code{\link[dplyr]{tbl_df}}.
+#' if the [wakefield::age()] is used three times
+#' (`r_data_frame(age, age, age)`), the name "Age" will be assigned to all
+#' three columns. The results in column names `c("Age_1", "Age_2", "Age_3")`.
+#' To turn of this behavior use `rep.sep = NULL`. This results in
+#' `c("Age", "Age.1", "Age.2")` column names in the
+#' [base::data.frame()].
+#' @return Returns a [dplyr::tbl_df()].
#' @author Josh O'Brien and Tyler Rinker .
#' @references https://stackoverflow.com/a/29617983/1000343
#' @export
-#' @seealso \code{\link[wakefield]{r_list}},
-#' \code{\link[wakefield]{r_series}}
-#' \code{\link[wakefield]{r_dummy}}
+#' @seealso [wakefield::r_list()],
+#' [wakefield::r_series()]
+#' [wakefield::r_dummy()]
#' @examples
#' r_data_frame(n = 30,
#' id,
@@ -98,7 +98,7 @@ function (n, ..., rep.sep = "_") {
out <- stats::setNames(data.frame(out, stringsAsFactors = FALSE,
check.names = FALSE), nms)
- dplyr::tbl_df(out)
+ tibble::as_tibble(out)
}
diff --git a/R/r_dummy.R b/R/r_dummy.R
index 9c8c199..5d13a71 100644
--- a/R/r_dummy.R
+++ b/R/r_dummy.R
@@ -4,20 +4,20 @@
#'
#' @param fun A \pkg{wakefield} variable function.
#' @param n The number of rows to produce.
-#' @param \ldots Additional arguments passed to \code{fun}.
-#' @param prefix logical. If \code{TRUE} the original factor name (supplied to
-#' \code{fun} as \code{name} argument) will prefix the column names that were
+#' @param \ldots Additional arguments passed to `fun`.
+#' @param prefix logical. If `TRUE` the original factor name (supplied to
+#' `fun` as `name` argument) will prefix the column names that were
#' generated from the factor's categories.
#' @param rep.sep A separator to use for the variable and category part of names
-#' when \code{prefix = TRUE}. For example if the \code{\link[wakefield]{age}}
-#' is used (\code{r_dummy(sex)}), this results in column names
-#' \code{c("Sex_Male", "Sex_Female")}.
-#' @return Returns a \code{\link[dplyr]{tbl_df}}.
+#' when `prefix = TRUE`. For example if the [wakefield::age()]
+#' is used (`r_dummy(sex)`), this results in column names
+#' `c("Sex_Male", "Sex_Female")`.
+#' @return Returns a [dplyr::tbl_df()].
#' @keywords dummy
#' @export
-#' @seealso \code{\link[wakefield]{r_list}},
-#' \code{\link[wakefield]{r_data_frame}},
-#' \code{\link[wakefield]{r_series}}
+#' @seealso [wakefield::r_list()],
+#' [wakefield::r_data_frame()],
+#' [wakefield::r_series()]
#' @examples
#' r_dummy(sex, 10)
#' r_dummy(race, 1000)
diff --git a/R/r_insert.R b/R/r_insert.R
index 8cc5f7c..a8b1283 100644
--- a/R/r_insert.R
+++ b/R/r_insert.R
@@ -1,15 +1,15 @@
-#' Insert Data Frames Into \code{r_data_frame}
+#' Insert Data Frames Into `r_data_frame`
#'
-#' Safely insert \code{\link[base]{data.frame}} objects into a
-#' \code{\link[wakefield]{r_data_frame}} or \code{\link[wakefield]{r_list}}.
+#' Safely insert [base::data.frame()] objects into a
+#' [wakefield::r_data_frame()] or [wakefield::r_list()].
#'
#' @inheritParams seriesname
-#' @return Returns a \code{\link[base]{data.frame}} with a
-#' \code{attributes(x)[["seriesname"]]} assigned.
+#' @return Returns a [base::data.frame()] with a
+#' `attributes(x)[["seriesname"]]` assigned.
#' @keywords insert
#' @export
#' @include utils.R seriesname.R
-#' @seealso \code{\link[wakefield]{seriesname}}
+#' @seealso [wakefield::seriesname()]
#' @examples
#' dat <- dplyr::data_frame(
#' Age_1 = age(100), Age_2 = age(100), Age_3 = age(100),
diff --git a/R/r_list.R b/R/r_list.R
index dad7d22..4cba7e3 100644
--- a/R/r_list.R
+++ b/R/r_list.R
@@ -1,6 +1,6 @@
#' List Production (From Variable Functions)
#'
-#' Produce a named \code{\link[base]{list}} that allows the user to lazily pass
+#' Produce a named [base::list()] that allows the user to lazily pass
#' unnamed \pkg{wakefield} variable functions (optionally, without call
#' parenthesis).
#'
@@ -8,21 +8,21 @@
#' @param \ldots A set of optionally named arguments. Using \pkg{wakefield}
#' variable functions require no name or call parenthesis.
#' @param rep.sep A separator to use for repeated variable names. For example
-#' if the \code{\link[wakefield]{age}} is used three times
-#' (\code{r_list(age, age, age)}), the name "Age" will be assigned to all three
+#' if the [wakefield::age()] is used three times
+#' (`r_list(age, age, age)`), the name "Age" will be assigned to all three
#' vectors in the list. The results in column names
-#' \code{c("Age_1", "Age_2", "Age_3")}. To turn of this behavior use
-#' \code{rep.sep = NULL}. This results in \code{c("Age", "Age", "Age")} for
-#' vector names, leading to \code{c("Age", "Age.1", "Age.2")} if coerced to a
-#' \code{\link[base]{data.frame}}.
+#' `c("Age_1", "Age_2", "Age_3")`. To turn of this behavior use
+#' `rep.sep = NULL`. This results in `c("Age", "Age", "Age")` for
+#' vector names, leading to `c("Age", "Age.1", "Age.2")` if coerced to a
+#' [base::data.frame()].
#' @return Returns a named list of equal length vectors.
#' @author Josh O'Brien and Tyler Rinker .
#' @references https://stackoverflow.com/a/29617983/1000343
#' @keywords list
#' @export
-#' @seealso \code{\link[wakefield]{r_data_frame}},
-#' \code{\link[wakefield]{r_series}}
-#' \code{\link[wakefield]{r_dummy}}
+#' @seealso [wakefield::r_data_frame()],
+#' [wakefield::r_series()]
+#' [wakefield::r_dummy()]
#' @examples
#' r_list(
#' n = 30,
diff --git a/R/r_na.R b/R/r_na.R
index 60ea6d6..34bef56 100644
--- a/R/r_na.R
+++ b/R/r_na.R
@@ -2,14 +2,14 @@
#'
#' Replaces a proportion of values with NA. Useful for simulating missing data.
#'
-#' @param x A \code{\link[base]{data.frame}} or \code{\link[base]{list}} to
-#' randomly replace elements with \code{NA}s.
-#' @param cols Numeric indices of the columns to incude (use \code{-} to exlcude
-#' as well). Default is to assign random \code{NA}s to al columns except the
+#' @param x A [base::data.frame()] or [base::list()] to
+#' randomly replace elements with `NA`s.
+#' @param cols Numeric indices of the columns to incude (use `-` to exlcude
+#' as well). Default is to assign random `NA`s to al columns except the
#' first column.
#' @param prob The proportion of each column/vector elements to assign to
-#' \code{NA}.
-#' @return Returns a \code{\link[base]{data.frame}} or \code{\link[base]{list}}
+#' `NA`.
+#' @return Returns a [base::data.frame()] or [base::list()]
#' with random missing values.
#' @keywords na missing
#' @export
diff --git a/R/r_sample.R b/R/r_sample.R
index cd228e5..17459cc 100644
--- a/R/r_sample.R
+++ b/R/r_sample.R
@@ -5,7 +5,7 @@
#' @inheritParams r_sample_factor
#' @return Returns a random vector of elements.
#' @include utils.R
-#' @seealso \code{\link[base]{sample}}
+#' @seealso [base::sample()]
#' @export
#' @examples
#' r_sample(100, name = "Var")
diff --git a/R/r_sample_binary.R b/R/r_sample_binary.R
index 32dfc05..201c07e 100644
--- a/R/r_sample_binary.R
+++ b/R/r_sample_binary.R
@@ -1,11 +1,11 @@
#' Generate Random Binary Vector
#'
-#' \code{r_sample_binary} - Generate a random binary vector.
+#' `r_sample_binary` - Generate a random binary vector.
#'
#' @inheritParams dummy
#' @param x A vector of length 2 to sample from.
#' @return Returns a random binary vector of elements.
-#' @seealso \code{\link[base]{sample.int}}
+#' @seealso [base::sample.int()]
#' @export
#' @rdname r_sample_binary
#' @examples
@@ -23,7 +23,7 @@ function (n, x = 1:2, prob = NULL, name = "Binary") {
#' Generate Random Binary Vector
#'
-#' \code{r_sample_binary_factor} - Generate a random binary vector and coerces
+#' `r_sample_binary_factor` - Generate a random binary vector and coerces
#' to a factor.
#'
#' @export
diff --git a/R/r_sample_factor.R b/R/r_sample_factor.R
index 5966746..d349d26 100644
--- a/R/r_sample_factor.R
+++ b/R/r_sample_factor.R
@@ -3,15 +3,15 @@
#' Generate a random vector and coerces to a factor.
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
+#' the environment of `r_data_frame` or `r_list`.
#' @param x A vector of elements to chose from.
#' @param prob A vector of probabilities to chose from.
-#' @param name The name to assign to the output vector's \code{varname}
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random actor vector of elements.
#' @export
-#' @seealso \code{\link[base]{sample}}
+#' @seealso [base::sample()]
#' @examples
#' r_sample_factor(100, name = "Var")
#' table(r_sample_factor(x = c("Dog", "Cat", "Fish", "Bird"), n=1000))
diff --git a/R/r_sample_integer.R b/R/r_sample_integer.R
index b278e1e..2a0dbc4 100644
--- a/R/r_sample_integer.R
+++ b/R/r_sample_integer.R
@@ -4,7 +4,7 @@
#'
#' @inheritParams r_sample_factor
#' @return Returns a random integer vector of elements.
-#' @seealso \code{\link[base]{sample}}
+#' @seealso [base::sample()]
#' @include utils.R r_sample.R
#' @export
#' @examples
diff --git a/R/r_sample_logical.R b/R/r_sample_logical.R
index a2e2eda..df48a2f 100644
--- a/R/r_sample_logical.R
+++ b/R/r_sample_logical.R
@@ -1,10 +1,10 @@
#' Generate Random Logical Vector
#'
-#' Generate a random logical (\code{TRUE}/\code{FALSE}) vector.
+#' Generate a random logical (`TRUE`/`FALSE`) vector.
#'
#' @inheritParams r_sample_binary
-#' @return Returns a random logical (\code{TRUE}/\code{FALSE}) vector of elements.
-#' @seealso \code{\link[base]{sample}}
+#' @return Returns a random logical (`TRUE`/`FALSE`) vector of elements.
+#' @seealso [base::sample()]
#' @export
#' @examples
#' r_sample_logical(100, name = "Var")
diff --git a/R/r_sample_ordered.R b/R/r_sample_ordered.R
index adca8ea..2abddd4 100644
--- a/R/r_sample_ordered.R
+++ b/R/r_sample_ordered.R
@@ -6,8 +6,8 @@
#' @return Returns a random factor vector of elements.
#' @export
#' @keywords ordered factor
-#' @seealso \code{\link[base]{sample}},
-#' \code{\link[base]{ordered}}
+#' @seealso [base::sample()],
+#' [base::ordered()]
#' @examples
#' r_sample_ordered(100, name = "Var")
#'
diff --git a/R/r_sample_replace.R b/R/r_sample_replace.R
index c2fc3c2..c6aa062 100644
--- a/R/r_sample_replace.R
+++ b/R/r_sample_replace.R
@@ -3,17 +3,17 @@
#' Generate a random vector without replacement.
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
+#' the environment of `r_data_frame` or `r_list`.
#' @param x A vector of elements to chose from.
#' @param prob A vector of probabilities to chose from.
-#' @param replace logical. If \code{TRUE} sampling is done with replacement.
+#' @param replace logical. If `TRUE` sampling is done with replacement.
#' Default is without replacement.
-#' @param name The name to assign to the output vector's \code{varname}
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random vector of elements.
#' @include utils.R
-#' @seealso \code{\link[base]{sample}}
+#' @seealso [base::sample()]
#' @export
#' @examples
#' r_sample(100, name = "Var")
diff --git a/R/r_series.R b/R/r_series.R
index 38ed278..677dfae 100644
--- a/R/r_series.R
+++ b/R/r_series.R
@@ -1,29 +1,29 @@
#' Data Frame Series (Repeated Measures)
#'
-#' Produce a \code{\link[dplyr]{tbl_df}} data frame of repeated measures from a
+#' Produce a [dplyr::tbl_df()] data frame of repeated measures from a
#' wakefield variable function.
#'
#' @param fun A \pkg{wakefield} variable function.
#' @param j The number of columns to produce.
#' @param n The number of rows to produce.
-#' @param \ldots Additional arguments passed to \code{fun}.
-#' @param integer logical. If \code{TRUE} factor columns will be coerced to
+#' @param \ldots Additional arguments passed to `fun`.
+#' @param integer logical. If `TRUE` factor columns will be coerced to
#' integer.
#' @param relate Allows the user to specify the relationship between columns.
-#' May be a named list of \code{c("operation", "mean", "sd")} or a string of
+#' May be a named list of `c("operation", "mean", "sd")` or a string of
#' the form of "fM_sd" where `f` is one of (+, -, *, /), `M` is a mean value, and
-#' `sd` is a standard deviation of the mean value (e.g., \code{"*4_1"}). See
-#' \code{\link[wakefield]{relate}} for details.
+#' `sd` is a standard deviation of the mean value (e.g., `"*4_1"`). See
+#' [wakefield::relate()] for details.
#' @param rep.sep A separator to use for repeated variable names. For example
-#' if the \code{\link[wakefield]{age}} is used three times
-#' (\code{r_data_frame(age, age, age)}), the name "Age" will be assigned to all
-#' three columns. The results in column names \code{c("Age_1", "Age_2", "Age_3")}.
-#' @return Returns a \code{\link[dplyr]{tbl_df}}.
-#' @references \url{https://github.com/trinker/wakefield/issues/1/#issuecomment-96166910}
+#' if the [wakefield::age()] is used three times
+#' (`r_data_frame(age, age, age)`), the name "Age" will be assigned to all
+#' three columns. The results in column names `c("Age_1", "Age_2", "Age_3")`.
+#' @return Returns a [dplyr::tbl_df()].
+#' @references
#' @export
-#' @seealso \code{\link[wakefield]{r_list}},
-#' \code{\link[wakefield]{r_data_frame}}
-#' \code{\link[wakefield]{r_dummy}}
+#' @seealso [wakefield::r_list()],
+#' [wakefield::r_data_frame()]
+#' [wakefield::r_dummy()]
#' @examples
#' r_series(grade, 5, 10)
#'
diff --git a/R/race.R b/R/race.R
index 4495bc9..7aa0c36 100644
--- a/R/race.R
+++ b/R/race.R
@@ -6,15 +6,15 @@
#' make-up. The default make up is:
#'
#' \tabular{lr}{
-#' \bold{Race} \tab \bold{Percent}\cr
-#' White \tab 63.70 \%\cr
-#' Hispanic \tab 16.30 \%\cr
-#' Black \tab 12.20 \%\cr
-#' Asian \tab 4.70 \%\cr
-#' Bi-Racial \tab 1.90 \%\cr
-#' Native \tab .70 \%\cr
-#' Other \tab .20 \%\cr
-#' Hawaiian \tab .15 \%\cr
+#' **Race** \tab **Percent**\cr
+#' White \tab 63.70 %\cr
+#' Hispanic \tab 16.30 %\cr
+#' Black \tab 12.20 %\cr
+#' Asian \tab 4.70 %\cr
+#' Bi-Racial \tab 1.90 %\cr
+#' Native \tab .70 %\cr
+#' Other \tab .20 %\cr
+#' Hawaiian \tab .15 %\cr
#' }
#'
#' @inheritParams r_sample_factor
diff --git a/R/relate.R b/R/relate.R
index 4613b65..3682601 100644
--- a/R/relate.R
+++ b/R/relate.R
@@ -4,26 +4,26 @@
#'
#' @param x A starting column.
#' @param j The number of columns to produce.
-#' @param name An optional prefix name to give to the columns. If \code{NULL}
-#' attempts to take from the \code{varname} attribute of \code{x}. If not found,
+#' @param name An optional prefix name to give to the columns. If `NULL`
+#' attempts to take from the `varname` attribute of `x`. If not found,
#' "Variable" is used.
#' @param operation A operation character vector of length 1; either
-#' \code{c("+", "-", "*", "/")}. This is the relationship between columns.
+#' `c("+", "-", "*", "/")`. This is the relationship between columns.
#' @param mean Mean is the average value to add, subtract, multiple, or divide
#' by.
-#' @param sd The amount of variability to allow in \code{mean}. Setting to 0
+#' @param sd The amount of variability to allow in `mean`. Setting to 0
#' will constrain the operation between x_(n - 1) column and x_n to be exactly
-#' the mean value (see \bold{Examples} for a demonstration).
+#' the mean value (see **Examples** for a demonstration).
#' @param rep.sep A separator to use for repeated variable names. For example
-#' if the \code{\link[wakefield]{age}} is used three times
-#' (\code{r_data_frame(age, age, age)}), the name "Age" will be assigned to all
-#' three columns. The results in column names \code{c("Age_1", "Age_2", "Age_3")}.
+#' if the [wakefield::age()] is used three times
+#' (`r_data_frame(age, age, age)`), the name "Age" will be assigned to all
+#' three columns. The results in column names `c("Age_1", "Age_2", "Age_3")`.
#' @param digits The number of digits to round to. Defaults to the max number
-#' of significant digits in \code{x}.
-#' @return Returns a \code{\link[dplyr]{tbl_df}}.
+#' of significant digits in `x`.
+#' @return Returns a [dplyr::tbl_df()].
#' @keywords correlate related
#' @export
-#' @seealso \code{\link[wakefield]{r_series}}
+#' @seealso [wakefield::r_series()]
#' @examples
#' relate(1:10, 10)
#'
@@ -67,6 +67,6 @@ relate <- function(x, j, name = NULL, operation = "+", mean = 5, sd = 1,
out <- stats::setNames(seed_dat, paste(name, seq_len(j), sep = rep.sep))
- seriesname(dplyr::tbl_df(out), name)
+ seriesname(tibble::as_tibble(out), name)
}
diff --git a/R/religion.R b/R/religion.R
index 0667708..5ff0b25 100644
--- a/R/religion.R
+++ b/R/religion.R
@@ -3,19 +3,19 @@
#' Generate a random vector of religion.
#'
#' @details The religion and probabilities used match approximate world
-#' religion make-up (from \href{https://www.pewforum.org/}{Pew Research Center}).
+#' religion make-up (from [Pew Research Center](https://www.pewforum.org/)).
#' The default make up is:
#'
#' \tabular{lrr}{
-#' \bold{ Religion} \tab \bold{N} \tab \bold{Percent} \cr
-#' Christian \tab 2,173,260,000 \tab 31.48 \%\cr
-#' Muslim \tab 1,599,280,000 \tab 23.16 \%\cr
-#' None \tab 1,127,000,000 \tab 16.32 \%\cr
-#' Hindu \tab 1,034,620,000 \tab 14.99 \%\cr
-#' Buddhist \tab 489,030,000 \tab 7.08 \% \cr
-#' Folk \tab 406,140,000 \tab 5.88 \% \cr
-#' Other \tab 59,330,000 \tab .86 \% \cr
-#' Jewish \tab 15,670,000 \tab .23 \% \cr
+#' ** Religion** \tab **N** \tab **Percent** \cr
+#' Christian \tab 2,173,260,000 \tab 31.48 %\cr
+#' Muslim \tab 1,599,280,000 \tab 23.16 %\cr
+#' None \tab 1,127,000,000 \tab 16.32 %\cr
+#' Hindu \tab 1,034,620,000 \tab 14.99 %\cr
+#' Buddhist \tab 489,030,000 \tab 7.08 % \cr
+#' Folk \tab 406,140,000 \tab 5.88 % \cr
+#' Other \tab 59,330,000 \tab .86 % \cr
+#' Jewish \tab 15,670,000 \tab .23 % \cr
#' }
#'
#' @inheritParams r_sample_factor
@@ -48,7 +48,7 @@ religion <- hijack(r_sample_factor,
## vect2df("Religion", "Total") %>%
## mutate(
## Proportion = Total/sum(Total),
-## Percent = paste(round(100*Proportion, 2), "\\%"),
+## Percent = paste(round(100*Proportion, 2), "\%"),
## Proportion = round(Proportion, 5),
## Total = format(Total, big.mark = ",", scientific=FALSE),
## Religion = gsub("^U.+", "None", gsub("\\..+", "", Religion))
diff --git a/R/sat.R b/R/sat.R
index a798f4d..7f79666 100644
--- a/R/sat.R
+++ b/R/sat.R
@@ -1,6 +1,6 @@
#' Generate Random Vector of Scholastic Aptitude Test (SATs)
#'
-#' \code{grade} - Generate a random normal vector of scholastic aptitude test
+#' `grade` - Generate a random normal vector of scholastic aptitude test
#' (SATs).
#'
#' @inheritParams normal_round
diff --git a/R/second.R b/R/second.R
index ea38597..e89079f 100644
--- a/R/second.R
+++ b/R/second.R
@@ -3,12 +3,12 @@
#' Generate a random vector of seconds in H:M:S format.
#'
#' @inheritParams r_sample_factor
-#' @param random logical. If \code{TRUE} the times are randomized, otherwise the
+#' @param random logical. If `TRUE` the times are randomized, otherwise the
#' times are sequential.
#' @return Returns a random vector of second time elements in H:M:S format.
#' @keywords time second
#' @export
-#' @seealso \code{\link[chron]{times}}
+#' @seealso [chron::times()]
#' @examples
#' second(20)
#' second(20, random=TRUE)
diff --git a/R/sentence.R b/R/sentence.R
index c3f8b79..1f71e5d 100644
--- a/R/sentence.R
+++ b/R/sentence.R
@@ -1,7 +1,7 @@
#' Generate Random Vector of Sentences
#'
#' Generate a random vector of sentences from the
-#' \code{\link[wakefield]{presidential_debates_2012}}.
+#' [wakefield::presidential_debates_2012()].
#'
#' @inheritParams r_sample_factor
#' @return Returns a random character vector of sentence elements.
diff --git a/R/seriesname.R b/R/seriesname.R
index 533370d..2522b3f 100644
--- a/R/seriesname.R
+++ b/R/seriesname.R
@@ -1,13 +1,13 @@
#' Add Internal Name to Data Frame
#'
-#' Adds \code{attributes(x)[["seriesname"]]} attribute to a
-#' \code{\link[base]{data.frame}}.
+#' Adds `attributes(x)[["seriesname"]]` attribute to a
+#' [base::data.frame()].
#'
-#' @param x A \code{\link[base]{data.frame}} to add a \code{seriesname}
-#' attribute (i.e., \code{attributes(x)[["seriesname"]]})
-#' @param name A name to assign to \code{attributes(x)[["seriesname"]]}.
-#' @return Returns a \code{\link[base]{data.frame}} with a
-#' \code{attributes(x)[["seriesname"]]} assigned.
+#' @param x A [base::data.frame()] to add a `seriesname`
+#' attribute (i.e., `attributes(x)[["seriesname"]]`)
+#' @param name A name to assign to `attributes(x)[["seriesname"]]`.
+#' @return Returns a [base::data.frame()] with a
+#' `attributes(x)[["seriesname"]]` assigned.
#' @export
#' @examples
#' seriesname(mtcars, "Cars")
diff --git a/R/sex.R b/R/sex.R
index ce47e40..1703ead 100644
--- a/R/sex.R
+++ b/R/sex.R
@@ -7,8 +7,8 @@
#'
#' \tabular{lr}{
#' \bold{Gender} \tab \bold{Percent}\cr
-#' Male \tab 51.22 \%\cr
-#' Female \tab 48.78 \%\cr
+#' Male \tab 51.22 %\cr
+#' Female \tab 48.78 %\cr
#' }
#'
#' @inheritParams r_sample_binary_factor
diff --git a/R/sex_inclusive.R b/R/sex_inclusive.R
index 436ac4d..37797ef 100644
--- a/R/sex_inclusive.R
+++ b/R/sex_inclusive.R
@@ -2,7 +2,7 @@
#'
#' Generate a random vector of non-binary genders. Proportion of trans*
#' category was taken from the
-#' \href{https://williamsinstitute.law.ucla.edu/}{Williams Institute Report} (2011),
+#' [Williams Institute Report](https://williamsinstitute.law.ucla.edu/) (2011),
#' and subtracted equally from the male and female categories.
#'
#' @details The genders and probabilities used match approximate gender
@@ -10,9 +10,9 @@
#'
#' \tabular{lr}{
#' \bold{Gender} \tab \bold{Percent}\cr
-#' Male \tab 51.07 \%\cr
-#' Female \tab 48.63 \%\cr
-#' Trans* \tab 0.30 \%\cr
+#' Male \tab 51.07 %\cr
+#' Female \tab 48.63 %\cr
+#' Trans* \tab 0.30 %\cr
#' }
#'
#' @inheritParams r_sample_factor
diff --git a/R/smokes.R b/R/smokes.R
index a02307c..4535f24 100644
--- a/R/smokes.R
+++ b/R/smokes.R
@@ -1,9 +1,9 @@
#' Generate Random Logical Smokes Vector
#'
-#' Generate a random logical (\code{TRUE}/\code{FALSE}) smokes vector.
+#' Generate a random logical (`TRUE`/`FALSE`) smokes vector.
#'
#' @inheritParams r_sample_logical
-#' @details The probabilities are non-smoker: 82.2\% vs. smoker: 17.8\%.
+#' @details The probabilities are non-smoker: 82.2% vs. smoker: 17.8%.
#' @return Returns a random logical vector of smokes elements.
#' @keywords smoking
#' @export
diff --git a/R/speed.R b/R/speed.R
index dca9ff5..b0fb450 100644
--- a/R/speed.R
+++ b/R/speed.R
@@ -1,10 +1,10 @@
#' Generate Random Vector of Speeds
#'
-#' \code{speed} and \code{speed_in} - Generate a random normal vector of
+#' `speed` and `speed_in` - Generate a random normal vector of
#' speeds in inches.
#'
-#' @note \code{speed} rounds to nearest whole number. \code{speed_in} &
-#' \code{speed_in} round to the nearest tenths.
+#' @note `speed` rounds to nearest whole number. `speed_in` &
+#' `speed_in` round to the nearest tenths.
#'
#' @inheritParams normal_round
#' @return Returns a random normal vector of speed elements.
@@ -39,7 +39,7 @@ speed_mph <- hijack(normal_round,
#' Generate Random Vector of Speeds
#'
-#' \code{speed_cm} - Generate a random normal vector of speeds in centimeters.
+#' `speed_cm` - Generate a random normal vector of speeds in centimeters.
#'
#' @rdname speed
#' @export
diff --git a/R/state.R b/R/state.R
index 9a2dd83..6d2295a 100644
--- a/R/state.R
+++ b/R/state.R
@@ -5,56 +5,56 @@
#' @details The state populations and probabilities:
#' \tabular{lrr}{
#' \bold{ State} \tab \bold{Population} \tab \bold{Percent} \cr
-#' California \tab 37,253,956 \tab 12.09 \%\cr
-#' Texas \tab 25,145,561 \tab 8.16 \% \cr
-#' New York \tab 19,378,102 \tab 6.29 \% \cr
-#' Florida \tab 18,801,310 \tab 6.10 \% \cr
-#' Illinois \tab 12,830,632 \tab 4.16 \% \cr
-#' Pennsylvania \tab 12,702,379 \tab 4.12 \% \cr
-#' Ohio \tab 11,536,504 \tab 3.74 \% \cr
-#' Michigan \tab 9,883,640 \tab 3.21 \% \cr
-#' Georgia \tab 9,687,653 \tab 3.14 \% \cr
-#' North Carolina \tab 9,535,483 \tab 3.09 \% \cr
-#' New Jersey \tab 8,791,894 \tab 2.85 \% \cr
-#' Virginia \tab 8,001,024 \tab 2.60 \% \cr
-#' Washington \tab 6,724,540 \tab 2.18 \% \cr
-#' Massachusetts \tab 6,547,629 \tab 2.12 \% \cr
-#' Indiana \tab 6,483,802 \tab 2.10 \% \cr
-#' Arizona \tab 6,392,017 \tab 2.07 \% \cr
-#' Tennessee \tab 6,346,105 \tab 2.06 \% \cr
-#' Missouri \tab 5,988,927 \tab 1.94 \% \cr
-#' Maryland \tab 5,773,552 \tab 1.87 \% \cr
-#' Wisconsin \tab 5,686,986 \tab 1.85 \% \cr
-#' Minnesota \tab 5,303,925 \tab 1.72 \% \cr
-#' Colorado \tab 5,029,196 \tab 1.63 \% \cr
-#' Alabama \tab 4,779,736 \tab 1.55 \% \cr
-#' South Carolina \tab 4,625,364 \tab 1.50 \% \cr
-#' Louisiana \tab 4,533,372 \tab 1.47 \% \cr
-#' Kentucky \tab 4,339,367 \tab 1.41 \% \cr
-#' Oregon \tab 3,831,074 \tab 1.24 \% \cr
-#' Oklahoma \tab 3,751,351 \tab 1.22 \% \cr
-#' Connecticut \tab 3,574,097 \tab 1.16 \% \cr
-#' Iowa \tab 3,046,355 \tab .99 \% \cr
-#' Mississippi \tab 2,967,297 \tab .96 \% \cr
-#' Arkansas \tab 2,915,918 \tab .95 \% \cr
-#' Kansas \tab 2,853,118 \tab .93 \% \cr
-#' Utah \tab 2,763,885 \tab .90 \% \cr
-#' Nevada \tab 2,700,551 \tab .88 \% \cr
-#' New Mexico \tab 2,059,179 \tab .67 \% \cr
-#' West Virginia \tab 1,852,994 \tab .60 \% \cr
-#' Nebraska \tab 1,826,341 \tab .59 \% \cr
-#' Idaho \tab 1,567,582 \tab .51 \% \cr
-#' Hawaii \tab 1,360,301 \tab .44 \% \cr
-#' Maine \tab 1,328,361 \tab .43 \% \cr
-#' New Hampshire \tab 1,316,470 \tab .43 \% \cr
-#' Rhode Island \tab 1,052,567 \tab .34 \% \cr
-#' Montana \tab 989,415 \tab .32 \% \cr
-#' Delaware \tab 897,934 \tab .29 \% \cr
-#' South Dakota \tab 814,180 \tab .26 \% \cr
-#' Alaska \tab 710,231 \tab .23 \% \cr
-#' North Dakota \tab 672,591 \tab .22 \% \cr
-#' Vermont \tab 625,741 \tab .20 \% \cr
-#' Wyoming \tab 563,626 \tab .18 \% \cr
+#' California \tab 37,253,956 \tab 12.09 %\cr
+#' Texas \tab 25,145,561 \tab 8.16 % \cr
+#' New York \tab 19,378,102 \tab 6.29 % \cr
+#' Florida \tab 18,801,310 \tab 6.10 % \cr
+#' Illinois \tab 12,830,632 \tab 4.16 % \cr
+#' Pennsylvania \tab 12,702,379 \tab 4.12 % \cr
+#' Ohio \tab 11,536,504 \tab 3.74 % \cr
+#' Michigan \tab 9,883,640 \tab 3.21 % \cr
+#' Georgia \tab 9,687,653 \tab 3.14 % \cr
+#' North Carolina \tab 9,535,483 \tab 3.09 % \cr
+#' New Jersey \tab 8,791,894 \tab 2.85 % \cr
+#' Virginia \tab 8,001,024 \tab 2.60 % \cr
+#' Washington \tab 6,724,540 \tab 2.18 % \cr
+#' Massachusetts \tab 6,547,629 \tab 2.12 % \cr
+#' Indiana \tab 6,483,802 \tab 2.10 % \cr
+#' Arizona \tab 6,392,017 \tab 2.07 % \cr
+#' Tennessee \tab 6,346,105 \tab 2.06 % \cr
+#' Missouri \tab 5,988,927 \tab 1.94 % \cr
+#' Maryland \tab 5,773,552 \tab 1.87 % \cr
+#' Wisconsin \tab 5,686,986 \tab 1.85 % \cr
+#' Minnesota \tab 5,303,925 \tab 1.72 % \cr
+#' Colorado \tab 5,029,196 \tab 1.63 % \cr
+#' Alabama \tab 4,779,736 \tab 1.55 % \cr
+#' South Carolina \tab 4,625,364 \tab 1.50 % \cr
+#' Louisiana \tab 4,533,372 \tab 1.47 % \cr
+#' Kentucky \tab 4,339,367 \tab 1.41 % \cr
+#' Oregon \tab 3,831,074 \tab 1.24 % \cr
+#' Oklahoma \tab 3,751,351 \tab 1.22 % \cr
+#' Connecticut \tab 3,574,097 \tab 1.16 % \cr
+#' Iowa \tab 3,046,355 \tab .99 % \cr
+#' Mississippi \tab 2,967,297 \tab .96 % \cr
+#' Arkansas \tab 2,915,918 \tab .95 % \cr
+#' Kansas \tab 2,853,118 \tab .93 % \cr
+#' Utah \tab 2,763,885 \tab .90 % \cr
+#' Nevada \tab 2,700,551 \tab .88 % \cr
+#' New Mexico \tab 2,059,179 \tab .67 % \cr
+#' West Virginia \tab 1,852,994 \tab .60 % \cr
+#' Nebraska \tab 1,826,341 \tab .59 % \cr
+#' Idaho \tab 1,567,582 \tab .51 % \cr
+#' Hawaii \tab 1,360,301 \tab .44 % \cr
+#' Maine \tab 1,328,361 \tab .43 % \cr
+#' New Hampshire \tab 1,316,470 \tab .43 % \cr
+#' Rhode Island \tab 1,052,567 \tab .34 % \cr
+#' Montana \tab 989,415 \tab .32 % \cr
+#' Delaware \tab 897,934 \tab .29 % \cr
+#' South Dakota \tab 814,180 \tab .26 % \cr
+#' Alaska \tab 710,231 \tab .23 % \cr
+#' North Dakota \tab 672,591 \tab .22 % \cr
+#' Vermont \tab 625,741 \tab .20 % \cr
+#' Wyoming \tab 563,626 \tab .18 % \cr
#' }
#'
#' @inheritParams r_sample_factor
diff --git a/R/string.R b/R/string.R
index 3827f35..3d7d216 100644
--- a/R/string.R
+++ b/R/string.R
@@ -3,17 +3,17 @@
#' Generate a random vector of strings.
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
+#' the environment of `r_data_frame` or `r_list`.
#' @param x A character vector specifying character classes to draw elements
#' from.
#' @param length Integer vector, desired string lengths.
-#' @param name The name to assign to the output vector's \code{varname}
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random character vector of string elements.
#' @keywords string character
#' @export
-#' @seealso \code{\link[stringi]{stri_rand_strings}}
+#' @seealso [stringi::stri_rand_strings()]
#' @family variable functions
#' @examples
#' string(10)
diff --git a/R/table_heat.R b/R/table_heat.R
index 95cbe13..9bce2f2 100644
--- a/R/table_heat.R
+++ b/R/table_heat.R
@@ -1,23 +1,23 @@
#' View Data Table Column Types as Heat Map
#'
-#' Generate a heat map of column types from a \code{\link[base]{data.frame}}.
+#' Generate a heat map of column types from a [base::data.frame()].
#'
-#' @param x A \code{\link[base]{data.frame}}.
-#' @param flip logical. If \code{TRUE} the \code{\link[base]{data.frame}} is
+#' @param x A [base::data.frame()].
+#' @param flip logical. If `TRUE` the [base::data.frame()] is
#' flipped so that the columns are on the y axis and observations on the x axis.
#' This is useful when there are many columns or the column names are longer.
#' @param palette A palette to chose from. See
-#' \code{\link[ggplot2]{scale_fill_brewer}} for more. These choices should
-#' exceed the number of unique column types. Use \code{NULL} to use
+#' [ggplot2::scale_fill_brewer()] for more. These choices should
+#' exceed the number of unique column types. Use `NULL` to use
#' \pkg{ggplot2}'s default color scheme.
-#' @param print logical. If \code{TRUE} the pot is printed. Option for use in
+#' @param print logical. If `TRUE` the pot is printed. Option for use in
#' document construction such as \pkg{knitr} or \pkg{rmarkdown}.
#' @param sep A separator to use between column types. Column types are
-#' determined via \code{sapply(x, class)}. When multiple types are present
-#' these are collapsed. By default the \code{\\n} is used.
+#' determined via `sapply(x, class)`. When multiple types are present
+#' these are collapsed. By default `\n` is used.
#' @return Returns a \pkg{ggplot2} object.
#' @details By default coumn names retain their order. Column types are ordered
-#' alphabetically in the legend, with \code{NA} appearing last.
+#' alphabetically in the legend, with `NA` appearing last.
#' @keywords class
#' @export
#' @examples
@@ -123,7 +123,7 @@ table_heat <- function(x, flip = FALSE, palette = "Set3", print = interactive(),
#' Plots a tbl_df object.
#'
#' @param x The tbl_df object.
-#' @param \ldots Arguments passed to \code{\link[wakefield]{table_heat}}.
+#' @param \ldots Arguments passed to [wakefield::table_heat()].
#' @method plot tbl_df
#' @export
plot.tbl_df <- function(x, ...){
diff --git a/R/time_stamp.R b/R/time_stamp.R
index e04e533..d1075cf 100644
--- a/R/time_stamp.R
+++ b/R/time_stamp.R
@@ -3,12 +3,12 @@
#' Generate a random vector of times in H:M:S format.
#'
#' @inheritParams r_sample_factor
-#' @param random logical. If \code{TRUE} the times are randomized, otherwise the
+#' @param random logical. If `TRUE` the times are randomized, otherwise the
#' times are sequential.
#' @return Returns a random vector of time elements in H:M:S format.
#' @keywords time
#' @export
-#' @seealso \code{\link[chron]{times}}
+#' @seealso [chron::times()]
#' @examples
#' time_stamp(20)
#' time_stamp(20, random=TRUE)
diff --git a/R/upper.R b/R/upper.R
index 0952b4d..2f89ad6 100644
--- a/R/upper.R
+++ b/R/upper.R
@@ -1,15 +1,15 @@
#' Generate Random Letter Vector
#'
-#' \code{upper} - Generates a random character vector of upper case letters.
+#' `upper` - Generates a random character vector of upper case letters.
#'
#' @param n The number elements to generate. This can be globally set within
-#' the environment of \code{r_data_frame} or \code{r_list}.
+#' the environment of `r_data_frame` or `r_list`.
#' @param k The number of the elements of x to sample from (uses 1:k).
#' @param x A vector of elements to chose from.
#' @param prob A vector of probabilities to chose from.
-#' @param name The name to assign to the output vector's \code{varname}
+#' @param name The name to assign to the output vector's `varname`
#' attribute. This is used to auto assign names to the column/vector name when
-#' used inside of \code{r_data_frame} or \code{r_list}.
+#' used inside of `r_data_frame` or `r_list`.
#' @return Returns a random character/factor vector of letter elements.
#' @keywords letters upper lower capitals
#' @export
@@ -36,7 +36,7 @@ upper <- function(n, k = 5, x = LETTERS, prob = NULL, name = "Upper"){
#' Generate Random Letter Vector
#'
-#' \code{lower} - Generates a random character vector of lower case letters.
+#' `lower` - Generates a random character vector of lower case letters.
#'
#' @export
#' @rdname letter
@@ -47,7 +47,7 @@ lower <- hijack(upper,
#' Generate Random Letter Vector
#'
-#' \code{upper_factor} - Generates a random factor vector of upper case letters.
+#' `upper_factor` - Generates a random factor vector of upper case letters.
#'
#' @export
#' @rdname letter
@@ -65,7 +65,7 @@ upper_factor <- function(n, k = 5, x = LETTERS, prob = NULL, name = "Upper"){
#' Generate Random Letter Vector
#'
-#' \code{lower_factor} - Generates a random factor vector of lower case letters.
+#' `lower_factor` - Generates a random factor vector of lower case letters.
#'
#' @export
#' @rdname letter
diff --git a/R/valid.R b/R/valid.R
index db52af5..7904946 100644
--- a/R/valid.R
+++ b/R/valid.R
@@ -1,6 +1,6 @@
#' Generate Random Logical Vector
#'
-#' Generate a random logical (\code{TRUE}/\code{FALSE}) vector.
+#' Generate a random logical (`TRUE`/`FALSE`) vector.
#'
#' @inheritParams r_sample_logical
#' @return Returns a random logical vector of elements.
diff --git a/R/variables.R b/R/variables.R
index 6421d11..f39833e 100644
--- a/R/variables.R
+++ b/R/variables.R
@@ -1,22 +1,22 @@
#' Available Variable Functions
#'
#' See a listing of all available variable functions for use in
-#' \code{\link[wakefield]{r_data_frame}} or \code{\link[wakefield]{r_list}}.
+#' [wakefield::r_data_frame()] or [wakefield::r_list()].
#'
-#' @param type The output type. Must be either \code{NULL} (returns a
-#' character vector), \code{"matrix"}, or \code{"list"}; or the user may extract
+#' @param type The output type. Must be either `NULL` (returns a
+#' character vector), `"matrix"`, or `"list"`; or the user may extract
#' a specific type from a list using:
-#' \code{"character"}, \code{"date"}, \code{"factor"}, \code{"integer"},
-#' \code{"logical"}, \code{"numeric"}, \code{"ordered factor"}. Setting
-#' \code{type = TRUE} will also return a \code{\link[base]{list}}.
-#' The \code{\link[base]{list}} version breaks the variable functions into
-#' classes. Specifying a specific class (e.g., \code{type = "numeric"} will
+#' `"character"`, `"date"`, `"factor"`, `"integer"`,
+#' `"logical"`, `"numeric"`, `"ordered factor"`. Setting
+#' `type = TRUE` will also return a [base::list()].
+#' The [base::list()] version breaks the variable functions into
+#' classes. Specifying a specific class (e.g., `type = "numeric"` will
#' list only variable functions that yield a numeric output.
-#' @param ncols The number of columns to use if \code{type = "matrix"}.
-#' @param \ldots Other arguments passed to \code{\link[base]{matrix}}.
-#' @return Returns a \code{\link[base]{character}} vector,
-#' \code{\link[base]{matrix}} of all variable functions, or a
-#' \code{\link[base]{list}} of variable functions by type.
+#' @param ncols The number of columns to use if `type = "matrix"`.
+#' @param \ldots Other arguments passed to [base::matrix()].
+#' @return Returns a [base::character()] vector,
+#' [base::matrix()] of all variable functions, or a
+#' [base::list()] of variable functions by type.
#' @keywords type
#' @export
#' @examples
diff --git a/R/varname.R b/R/varname.R
index c11ea71..7fc2d5c 100644
--- a/R/varname.R
+++ b/R/varname.R
@@ -1,13 +1,13 @@
#' Add Internal Name to Vector
#'
-#' Adds the class \code{variable} and an internal
-#' \code{attributes(x)[["varname"]]} attribute to a vector.
+#' Adds the class `variable` and an internal
+#' `attributes(x)[["varname"]]` attribute to a vector.
#'
-#' @param x A vector to add a \code{varname} attribute (i.e.,
-#' \code{attributes(x)[["varname"]]})
-#' @param name A name to assign to \code{attributes(x)[["varname"]]}.
-#' @return Returns a vector of the class \code{variable} with a
-#' \code{attributes(x)[["varname"]]} assigned.
+#' @param x A vector to add a `varname` attribute (i.e.,
+#' `attributes(x)[["varname"]]`)
+#' @param name A name to assign to `attributes(x)[["varname"]]`.
+#' @return Returns a vector of the class `variable` with a
+#' `attributes(x)[["varname"]]` assigned.
#' @export
#' @examples
#' varname(1:10, "A")
@@ -27,9 +27,9 @@ function (x, name) {
#' Prints a variable Object
#'
-#' Prints a \code{variable} object
+#' Prints a `variable` object
#'
-#' @param x The \code{variable} object.
+#' @param x The `variable` object.
#' @param \ldots Ignored.
#' @export
#' @method print variable
diff --git a/R/wakefield-package.R b/R/wakefield-package.R
index 7ad1ce7..3e41c4c 100644
--- a/R/wakefield-package.R
+++ b/R/wakefield-package.R
@@ -9,7 +9,7 @@ NULL
#' Augmented List of Grady Ward's English Words and Mark Kantrowitz's Names List
#'
#' A dataset containing a vector of Grady Ward's English words augmented with
-#' \pkg{qdapDictionaries}'s \code{DICTIONARY}, Mark Kantrowitz's names list,
+#' \pkg{qdapDictionaries}'s `DICTIONARY`, Mark Kantrowitz's names list,
#' other proper nouns, and contractions.
#'
#' @details A dataset containing a vector of Grady Ward's English words
diff --git a/README.Rmd b/README.Rmd
index 3304cfd..b709aa9 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -1,10 +1,6 @@
---
title: "wakefield"
-date: "`r format(Sys.time(), '%d %B, %Y')`"
-output:
- md_document:
- toc: true
- toc_depth: 4
+output: github_document
---
```{r, echo=FALSE}
@@ -16,7 +12,7 @@ library(pacman)
# verbadge <- sprintf('
', ver, ver)
verbadge <- ''
p_load(dplyr, wakefield, knitr, tidyr, ggplot2)
-````
+```
```{r, echo=FALSE}
knit_hooks$set(htmlcap = function(before, options, envir) {
@@ -26,14 +22,18 @@ knit_hooks$set(htmlcap = function(before, options, envir) {
})
knitr::opts_knit$set(self.contained = TRUE, cache = FALSE)
knitr::opts_chunk$set(fig.path = "tools/figure/")
+set.seed(1)
```
+
+
[](https://www.repostatus.org/#active)
-[](https://travis-ci.org/trinker/wakefield)
+[](https://github.com/trinker/wakefield/actions/workflows/R-CMD-check.yaml)
[](https://coveralls.io/github/trinker/wakefield)
[](https://dx.doi.org/10.5281/zenodo.17172)
[](https://cran.r-project.org/package=wakefield)
`r verbadge`
+
**wakefield** is designed to quickly generate random data sets. The user passes `n` (number of rows) and predefined vectors to the `r_data_frame` function to produce a `dplyr::tbl_df` object.
@@ -56,6 +56,7 @@ pacman::p_load(dplyr, tidyr, ggplot2)
# Contact
You are welcome to:
+
* submit suggestions and bug-reports at:
* send a pull request on:
* compose a friendly e-mail to:
@@ -104,7 +105,7 @@ p_load(pander, xtable)
variables("matrix", ncol=5) %>%
xtable() %>%
print(type = 'html', include.colnames = FALSE, include.rownames = FALSE,
- html.table.attributes = '')
+ html.table.attributes = '', timestamp = NULL)
#matrix(c(sprintf("`%s`", vect), blanks), ncol=4) %>%
# pandoc.table(format = "markdown", caption = "Available variable functions.")
diff --git a/README.md b/README.md
index 00b06a2..a5d2b4b 100644
--- a/README.md
+++ b/README.md
@@ -1,41 +1,26 @@
-wakefield
-============
+wakefield
+================
+
+
[](https://www.repostatus.org/#active)
-[](https://travis-ci.org/trinker/wakefield)
+[](https://github.com/trinker/wakefield/actions/workflows/R-CMD-check.yaml)
[](https://coveralls.io/github/trinker/wakefield)
[](https://dx.doi.org/10.5281/zenodo.17172)
[](https://cran.r-project.org/package=wakefield)
+
+
**wakefield** is designed to quickly generate random data sets. The user
passes `n` (number of rows) and predefined vectors to the `r_data_frame`
function to produce a `dplyr::tbl_df` object.

-Table of Contents
-============
-
-- [Installation](#installation)
-- [Contact](#contact)
-- [Demonstration](#demonstration)
- - [Getting Started](#getting-started)
- - [Random Missing Observations](#random-missing-observations)
- - [Repeated Measures & Time Series](#repeated-measures-time-series)
- - [Related Series](#related-series)
- - [Some Examples With Variation](#some-examples-with-variation)
- - [Adjust Correlations](#adjust-correlations)
- - [Visualize the Relationship](#visualize-the-relationship)
- - [Expanded Dummy Coding](#expanded-dummy-coding)
- - [Visualizing Column Types](#visualizing-column-types)
-
-
-Installation
-============
+# Installation
To download the development version of **wakefield**:
@@ -45,25 +30,24 @@ ball](https://github.com/trinker/wakefield/tarball/master), decompress
and run `R CMD INSTALL` on it, or use the **pacman** package to install
the development version:
- if (!require("pacman")) install.packages("pacman")
- pacman::p_load_gh("trinker/wakefield")
- pacman::p_load(dplyr, tidyr, ggplot2)
+``` r
+if (!require("pacman")) install.packages("pacman")
+pacman::p_load_gh("trinker/wakefield")
+pacman::p_load(dplyr, tidyr, ggplot2)
+```
+
+# Contact
-Contact
-=======
+You are welcome to:
-You are welcome to: \* submit suggestions and bug-reports at:
-https://github.com/trinker/wakefield/issues
-\* send a pull request on:
-https://github.com/trinker/wakefield/
-\* compose a friendly e-mail to:
-tyler.rinker@gmail.com
+- submit suggestions and bug-reports at:
+
+- send a pull request on:
+- compose a friendly e-mail to:
-Demonstration
-=============
+# Demonstration
-Getting Started
----------------
+## Getting Started
The `r_data_frame` function (random data frame) takes `n` (the number of
rows) and any number of variables (columns). These columns are typically
@@ -73,15 +57,21 @@ length, allowing the user to lazily pass unnamed functions (optionally,
without call parenthesis). The column name is hidden as a `varname`
attribute. For example here we see the `race` variable function:
- race(n=10)
+``` r
+race(n=10)
+```
- ## [1] Bi-Racial White Bi-Racial Native White White White Asian White Hispanic
+ ## [1] White White White Black White Black Asian Hispanic
+ ## [9] White White
## Levels: White Hispanic Black Asian Bi-Racial Native Other Hawaiian
- attributes(race(n=10))
+``` r
+attributes(race(n=10))
+```
## $levels
- ## [1] "White" "Hispanic" "Black" "Asian" "Bi-Racial" "Native" "Other" "Hawaiian"
+ ## [1] "White" "Hispanic" "Black" "Asian" "Bi-Racial" "Native"
+ ## [7] "Other" "Hawaiian"
##
## $class
## [1] "variable" "factor"
@@ -93,66 +83,64 @@ When this variable is used inside of `r_data_frame` the `varname` is
used as a column name. Additionally, the `n` argument is not set within
variable functions but is set once in `r_data_frame`:
- r_data_frame(
- n = 500,
- race
- )
+``` r
+r_data_frame(
+ n = 500,
+ race
+)
+```
- ## Warning: `tbl_df()` is deprecated as of dplyr 1.0.0.
- ## Please use `tibble::as_tibble()` instead.
- ## This warning is displayed once every 8 hours.
- ## Call `lifecycle::last_warnings()` to see where this warning was generated.
-
- ## # A tibble: 500 x 1
+ ## # A tibble: 500 × 1
## Race
##
- ## 1 White
+ ## 1 Asian
## 2 White
- ## 3 White
+ ## 3 Hispanic
## 4 White
- ## 5 Black
- ## 6 Black
+ ## 5 White
+ ## 6 White
## 7 White
## 8 White
- ## 9 Hispanic
+ ## 9 Black
## 10 White
- ## # ... with 490 more rows
+ ## # … with 490 more rows
The power of `r_data_frame` is apparent when we use many modular
variable functions:
- r_data_frame(
- n = 500,
- id,
- race,
- age,
- sex,
- hour,
- iq,
- height,
- died
- )
-
- ## # A tibble: 500 x 8
- ## ID Race Age Sex Hour IQ Height Died
- ##
- ## 1 001 White 25 Female 00:00:00 93 69 TRUE
- ## 2 002 White 80 Male 00:00:00 87 59 FALSE
- ## 3 003 White 60 Female 00:00:00 119 74 TRUE
- ## 4 004 Bi-Racial 54 Female 00:00:00 109 72 FALSE
- ## 5 005 White 75 Female 00:00:00 106 70 FALSE
- ## 6 006 White 54 Male 00:00:00 89 67 TRUE
- ## 7 007 Hispanic 67 Male 00:00:00 94 73 TRUE
- ## 8 008 Bi-Racial 86 Female 00:00:00 100 65 TRUE
- ## 9 009 Hispanic 56 Male 00:00:00 92 76 FALSE
- ## 10 010 Hispanic 52 Female 00:00:00 104 71 FALSE
- ## # ... with 490 more rows
+``` r
+r_data_frame(
+ n = 500,
+ id,
+ race,
+ age,
+ sex,
+ hour,
+ iq,
+ height,
+ died
+)
+```
+
+ ## # A tibble: 500 × 8
+ ## ID Race Age Sex Hour IQ Height Died
+ ##
+ ## 1 001 Black 72 Female 00:00:00 92 74 FALSE
+ ## 2 002 Hispanic 63 Male 00:00:00 96 67 TRUE
+ ## 3 003 White 40 Female 00:00:00 117 69 FALSE
+ ## 4 004 White 59 Male 00:00:00 77 65 FALSE
+ ## 5 005 White 46 Male 00:00:00 100 70 TRUE
+ ## 6 006 Asian 86 Female 00:00:00 84 71 FALSE
+ ## 7 007 Black 82 Female 00:00:00 107 63 TRUE
+ ## 8 008 Hispanic 30 Male 00:00:00 103 64 FALSE
+ ## 9 009 Asian 39 Female 00:30:00 83 71 TRUE
+ ## 10 010 Native 75 Male 00:30:00 95 68 FALSE
+ ## # … with 490 more rows
There are 49 **wakefield** based variable functions to chose from,
spanning **R**’s various data types (see `?variables` for details).
-
-
+
|
@@ -168,7 +156,7 @@ hair
military
|
-sex\_inclusive
+sex_inclusive
|
@@ -213,7 +201,7 @@ area
dummy
|
-internet\_browser
+internet_browser
|
normal
@@ -292,19 +280,19 @@ year
|
|
-date\_stamp
+date_stamp
|
-grade\_level
+grade_level
|
-lorem\_ipsum
+lorem_ipsum
|
sentence
|
-zip\_code
+zip_code
|
@@ -332,141 +320,154 @@ However, the user may also pass their own vector producing functions or
vectors to `r_data_frame`. Those with an `n` argument can be set by
`r_data_frame`:
- r_data_frame(
- n = 500,
- id,
- Scoring = rnorm,
- Smoker = valid,
- race,
- age,
- sex,
- hour,
- iq,
- height,
- died
- )
-
- ## # A tibble: 500 x 10
+``` r
+r_data_frame(
+ n = 500,
+ id,
+ Scoring = rnorm,
+ Smoker = valid,
+ race,
+ age,
+ sex,
+ hour,
+ iq,
+ height,
+ died
+)
+```
+
+ ## # A tibble: 500 × 10
## ID Scoring Smoker Race Age Sex Hour IQ Height Died
##
- ## 1 001 0.833 FALSE White 20 Female 00:00:00 92 69 TRUE
- ## 2 002 -0.529 TRUE Hispanic 83 Female 00:00:00 99 74 TRUE
- ## 3 003 -0.704 TRUE Hispanic 24 Male 00:00:00 115 62 TRUE
- ## 4 004 -0.839 TRUE Asian 19 Female 00:00:00 113 69 TRUE
- ## 5 005 0.606 TRUE White 70 Male 00:00:00 95 68 FALSE
- ## 6 006 1.46 FALSE Other 45 Female 00:00:00 110 78 FALSE
- ## 7 007 -0.681 TRUE Black 47 Female 00:00:00 98 64 TRUE
- ## 8 008 0.541 FALSE White 88 Male 00:30:00 75 70 TRUE
- ## 9 009 -0.294 FALSE Hispanic 89 Male 00:30:00 104 63 FALSE
- ## 10 010 0.0749 FALSE Hispanic 74 Female 00:30:00 105 69 TRUE
- ## # ... with 490 more rows
-
- r_data_frame(
- n = 500,
- id,
- age, age, age,
- grade, grade, grade
- )
-
- ## # A tibble: 500 x 7
+ ## 1 001 -1.60 TRUE White 88 Female 00:00:00 107 71 FALSE
+ ## 2 002 0.559 TRUE Hispanic 42 Male 00:00:00 104 69 FALSE
+ ## 3 003 1.33 TRUE Hispanic 87 Male 00:00:00 94 67 FALSE
+ ## 4 004 -1.45 FALSE Hispanic 67 Male 00:00:00 100 71 FALSE
+ ## 5 005 1.11 FALSE White 83 Male 00:00:00 108 72 FALSE
+ ## 6 006 -0.678 FALSE Hispanic 80 Female 00:00:00 104 70 FALSE
+ ## 7 007 -0.615 TRUE White 64 Female 00:00:00 94 72 TRUE
+ ## 8 008 -0.239 TRUE White 18 Male 00:00:00 116 69 FALSE
+ ## 9 009 -1.28 FALSE White 77 Female 00:00:00 103 64 FALSE
+ ## 10 010 -0.267 FALSE Asian 39 Female 00:00:00 100 73 TRUE
+ ## # … with 490 more rows
+
+``` r
+r_data_frame(
+ n = 500,
+ id,
+ age, age, age,
+ grade, grade, grade
+)
+```
+
+ ## # A tibble: 500 × 7
## ID Age_1 Age_2 Age_3 Grade_1 Grade_2 Grade_3
##
- ## 1 001 67 24 89 82.4 86.8 90.6
- ## 2 002 55 76 27 87.3 85.4 89.8
- ## 3 003 60 61 22 82.2 87 90.1
- ## 4 004 50 19 56 96.4 86.6 95.6
- ## 5 005 83 77 71 88.8 87.5 84.4
- ## 6 006 55 71 76 87.3 96.5 86.5
- ## 7 007 88 36 75 92.1 91.6 93.4
- ## 8 008 71 48 81 87.9 91.4 80.9
- ## 9 009 76 78 21 86.9 93.6 84.3
- ## 10 010 49 68 47 85.5 93 86.6
- ## # ... with 490 more rows
+ ## 1 001 49 28 55 88.5 87.4 91.8
+ ## 2 002 39 31 37 84.1 84.1 91.7
+ ## 3 003 66 53 89 91.9 94.2 88.3
+ ## 4 004 41 37 50 82.9 92.5 79.8
+ ## 5 005 67 75 51 90.2 80.4 86.1
+ ## 6 006 36 45 78 81.7 86 79.4
+ ## 7 007 64 59 54 79.8 95.1 85.6
+ ## 8 008 33 56 52 94.5 83.5 86
+ ## 9 009 55 74 24 87.2 92.8 77.7
+ ## 10 010 32 51 75 89.1 84.8 87
+ ## # … with 490 more rows
While passing variable functions to `r_data_frame` without call
parenthesis is handy, the user may wish to set arguments. This can be
done through call parenthesis as we do with `data.frame` or
`dplyr::data_frame`:
- r_data_frame(
- n = 500,
- id,
- Scoring = rnorm,
- Smoker = valid,
- `Reading(mins)` = rpois(lambda=20),
- race,
- age(x = 8:14),
- sex,
- hour,
- iq,
- height(mean=50, sd = 10),
- died
- )
-
- ## # A tibble: 500 x 11
- ## ID Scoring Smoker `Reading(mins)` Race Age Sex Hour IQ Height Died
- ##
- ## 1 001 2.48 FALSE 10 White 9 Male 00:00:00 93 44 TRUE
- ## 2 002 0.566 FALSE 14 Hispanic 10 Male 00:00:00 116 58 FALSE
- ## 3 003 -0.563 FALSE 19 Hispanic 8 Female 00:00:00 97 64 TRUE
- ## 4 004 0.0187 TRUE 19 White 9 Male 00:00:00 104 58 TRUE
- ## 5 005 -0.462 FALSE 17 Hispanic 11 Male 00:00:00 96 53 FALSE
- ## 6 006 -1.13 FALSE 17 White 10 Male 00:00:00 91 66 TRUE
- ## 7 007 -0.673 TRUE 15 White 13 Female 00:00:00 99 61 FALSE
- ## 8 008 0.164 TRUE 22 White 11 Male 00:00:00 106 47 FALSE
- ## 9 009 -0.227 FALSE 21 White 12 Female 00:00:00 101 54 TRUE
- ## 10 010 0.762 TRUE 22 White 8 Male 00:00:00 107 50 FALSE
- ## # ... with 490 more rows
-
-Random Missing Observations
----------------------------
+``` r
+r_data_frame(
+ n = 500,
+ id,
+ Scoring = rnorm,
+ Smoker = valid,
+ `Reading(mins)` = rpois(lambda=20),
+ race,
+ age(x = 8:14),
+ sex,
+ hour,
+ iq,
+ height(mean=50, sd = 10),
+ died
+)
+```
+
+ ## # A tibble: 500 × 11
+ ## ID Scoring Smoker Reading(min…¹ Race Age Sex Hour IQ Height Died
+ ##
+ ## 1 001 1.18 FALSE 23 Black 11 Fema… 00:0… 82 56 TRUE
+ ## 2 002 0.862 FALSE 29 White 14 Male 00:0… 101 45 FALSE
+ ## 3 003 0.986 FALSE 18 Asian 14 Male 00:0… 102 36 FALSE
+ ## 4 004 1.13 FALSE 23 White 9 Fema… 00:0… 85 60 FALSE
+ ## 5 005 0.678 TRUE 14 White 12 Fema… 00:0… 109 57 FALSE
+ ## 6 006 0.913 TRUE 23 White 8 Male 00:3… 95 72 FALSE
+ ## 7 007 1.09 TRUE 17 White 11 Fema… 00:3… 112 51 TRUE
+ ## 8 008 0.811 TRUE 16 White 9 Fema… 00:3… 93 68 TRUE
+ ## 9 009 0.334 TRUE 13 White 8 Fema… 00:3… 81 56 TRUE
+ ## 10 010 -0.786 FALSE 26 White 10 Male 00:3… 95 43 TRUE
+ ## # … with 490 more rows, and abbreviated variable name ¹​`Reading(mins)`
+
+## Random Missing Observations
Often data contains missing values. **wakefield** allows the user to add
a proportion of missing values per column/vector via the `r_na` (random
`NA`). This works nicely within a **dplyr**/**magrittr** `%>%` *then*
pipeline:
- r_data_frame(
- n = 30,
- id,
- race,
- age,
- sex,
- hour,
- iq,
- height,
- died,
- Scoring = rnorm,
- Smoker = valid
- ) %>%
- r_na(prob=.4)
-
- ## # A tibble: 30 x 10
- ## ID Race Age Sex Hour IQ Height Died Scoring Smoker
- ##
- ## 1 01 Hispanic 24 Female 01:30:00 92 70 NA NA NA
- ## 2 02 White NA Female NA NA FALSE 0.696 TRUE
- ## 3 03 Hispanic NA Female 02:00:00 107 68 FALSE -0.113 TRUE
- ## 4 04 Black 29 Female 93 75 TRUE -1.64 TRUE
- ## 5 05 43 Female 03:30:00 NA NA NA -0.705 FALSE
- ## 6 06 Black NA 04:00:00 93 NA TRUE NA NA
- ## 7 07 Hispanic 60 NA NA TRUE NA NA
- ## 8 08 Hispanic NA NA NA TRUE NA FALSE
- ## 9 09 34 05:30:00 NA 70 NA -1.44 TRUE
- ## 10 10 White 88 NA NA NA NA NA
- ## # ... with 20 more rows
-
-Repeated Measures & Time Series
--------------------------------
+``` r
+r_data_frame(
+ n = 30,
+ id,
+ race,
+ age,
+ sex,
+ hour,
+ iq,
+ height,
+ died,
+ Scoring = rnorm,
+ Smoker = valid
+) %>%
+ r_na(prob=.4)
+```
+
+ ## # A tibble: 30 × 10
+ ## ID Race Age Sex Hour IQ Height Died Scoring Smoker
+ ##
+ ## 1 01 19 Female 00:00:00 96 65 NA -1.86 FALSE
+ ## 2 02 NA 00:30:00 83 NA NA NA NA
+ ## 3 03 White 54 Male 100 NA FALSE 1.51 TRUE
+ ## 4 04 NA NA NA NA 1.38 FALSE
+ ## 5 05 White 30 Female 103 NA TRUE NA FALSE
+ ## 6 06 Bi-Racial 24 07:00:00 112 NA NA NA NA
+ ## 7 07 Black 63 Male 07:00:00 92 64 FALSE NA FALSE
+ ## 8 08 Black NA Male 07:30:00 NA 73 FALSE 1.28 NA
+ ## 9 09 White 80 Male 08:00:00 96 75 FALSE NA NA
+ ## 10 10 Black NA Male 08:00:00 106 70 FALSE 1.55 TRUE
+ ## # … with 20 more rows
+
+## Repeated Measures & Time Series
The `r_series` function allows the user to pass a single **wakefield**
function and dictate how many columns (`j`) to produce.
- set.seed(10)
+``` r
+set.seed(10)
+
+r_series(likert, j = 3, n=10)
+```
- r_series(likert, j = 3, n=10)
+ ## Warning: `tbl_df()` was deprecated in dplyr 1.0.0.
+ ## Please use `tibble::as_tibble()` instead.
+ ## ℹ The deprecated feature was likely used in the wakefield package.
+ ## Please report the issue at <]8;;https://github.com/trinker/wakefield/issueshttps://github.com/trinker/wakefield/issues]8;;>.
- ## # A tibble: 10 x 3
+ ## # A tibble: 10 × 3
## Likert_1 Likert_2 Likert_3
## *
## 1 Neutral Agree Agree
@@ -487,11 +488,13 @@ column name prefixes. This can be accomplished via the variable
function’s `name` argument. Both of these features are demonstrated
here.
- set.seed(10)
+``` r
+set.seed(10)
- as_integer(r_series(likert, j = 5, n=10, name = "Item"))
+as_integer(r_series(likert, j = 5, n=10, name = "Item"))
+```
- ## # A tibble: 10 x 5
+ ## # A tibble: 10 × 5
## Item_1 Item_2 Item_3 Item_4 Item_5
##
## 1 3 4 4 4 5
@@ -507,16 +510,18 @@ here.
`r_series` can be used within a `r_data_frame` as well.
- set.seed(10)
+``` r
+set.seed(10)
- r_data_frame(n=100,
- id,
- age,
- sex,
- r_series(likert, 3, name = "Question")
- )
+r_data_frame(n=100,
+ id,
+ age,
+ sex,
+ r_series(likert, 3, name = "Question")
+)
+```
- ## # A tibble: 100 x 6
+ ## # A tibble: 100 × 6
## ID Age Sex Question_1 Question_2 Question_3
##
## 1 001 26 Male Strongly Agree Disagree Disagree
@@ -529,18 +534,20 @@ here.
## 8 008 59 Female Neutral Strongly Agree Strongly Disagree
## 9 009 88 Male Agree Agree Agree
## 10 010 51 Male Agree Disagree Neutral
- ## # ... with 90 more rows
+ ## # … with 90 more rows
- set.seed(10)
+``` r
+set.seed(10)
- r_data_frame(n=100,
- id,
- age,
- sex,
- r_series(likert, 5, name = "Item", integer = TRUE)
- )
+r_data_frame(n=100,
+ id,
+ age,
+ sex,
+ r_series(likert, 5, name = "Item", integer = TRUE)
+)
+```
- ## # A tibble: 100 x 8
+ ## # A tibble: 100 × 8
## ID Age Sex Item_1 Item_2 Item_3 Item_4 Item_5
##
## 1 001 26 Male 5 2 2 4 5
@@ -553,7 +560,7 @@ here.
## 8 008 59 Female 3 5 1 4 1
## 9 009 88 Male 4 4 4 3 2
## 10 010 51 Male 4 2 3 1 3
- ## # ... with 90 more rows
+ ## # … with 90 more rows
### Related Series
@@ -562,9 +569,9 @@ The user can also create related series via the `relate` argument in
columns. `relate` may be a named list of or a short hand string of the
form of `"fM_sd"` where:
-- `f` is one of (+, -, \*, /)
-- `M` is a mean value
-- `sd` is a standard deviation of the mean value
+- `f` is one of (+, -, \*, /)
+- `M` is a mean value
+- `sd` is a standard deviation of the mean value
For example you may use `relate = "*4_1"`. If `relate = NULL` no
relationship is generated between columns. I will use the short hand
@@ -572,9 +579,11 @@ string form here.
#### Some Examples With Variation
- r_series(grade, j = 5, n = 100, relate = "+1_6")
+``` r
+r_series(grade, j = 5, n = 100, relate = "+1_6")
+```
- ## # A tibble: 100 x 5
+ ## # A tibble: 100 × 5
## Grade_1 Grade_2 Grade_3 Grade_4 Grade_5
## *
## 1 90.0 98.7 98.6 104.6 114.1
@@ -587,11 +596,13 @@ string form here.
## 8 86.7 88.6 90.3 89.0 83.8
## 9 86.1 84.1 88.9 90.1 72.6
## 10 86.4 92.3 88.5 94.6 99.0
- ## # ... with 90 more rows
+ ## # … with 90 more rows
- r_series(age, 5, 100, relate = "+5_0")
+``` r
+r_series(age, 5, 100, relate = "+5_0")
+```
- ## # A tibble: 100 x 5
+ ## # A tibble: 100 × 5
## Age_1 Age_2 Age_3 Age_4 Age_5
## *
## 1 83 88 93 98 103
@@ -604,11 +615,13 @@ string form here.
## 8 31 36 41 46 51
## 9 81 86 91 96 101
## 10 50 55 60 65 70
- ## # ... with 90 more rows
+ ## # … with 90 more rows
- r_series(likert, 5, 100, name ="Item", relate = "-.5_.1")
+``` r
+r_series(likert, 5, 100, name ="Item", relate = "-.5_.1")
+```
- ## # A tibble: 100 x 5
+ ## # A tibble: 100 × 5
## Item_1 Item_2 Item_3 Item_4 Item_5
## *
## 1 1 0 -1 -1 -2
@@ -621,11 +634,13 @@ string form here.
## 8 1 0 -1 -2 -2
## 9 3 2 1 1 1
## 10 1 0 0 -1 -2
- ## # ... with 90 more rows
+ ## # … with 90 more rows
- r_series(grade, j = 5, n = 100, relate = "*1.05_.1")
+``` r
+r_series(grade, j = 5, n = 100, relate = "*1.05_.1")
+```
- ## # A tibble: 100 x 5
+ ## # A tibble: 100 × 5
## Grade_1 Grade_2 Grade_3 Grade_4 Grade_5
## *
## 1 90.8 90.80 99.880 109.8680 109.8680
@@ -638,13 +653,15 @@ string form here.
## 8 92.7 83.43 91.773 110.1276 121.1404
## 9 84.9 93.39 93.390 102.7290 113.0019
## 10 84.7 84.70 93.170 93.1700 111.8040
- ## # ... with 90 more rows
+ ## # … with 90 more rows
#### Adjust Correlations
Use the `sd` command to adjust correlations.
- round(cor(r_series(grade, 8, 10, relate = "+1_2")), 2)
+``` r
+round(cor(r_series(grade, 8, 10, relate = "+1_2")), 2)
+```
## Grade_1 Grade_2 Grade_3 Grade_4 Grade_5 Grade_6 Grade_7 Grade_8
## Grade_1 1.00 0.84 0.57 0.41 0.31 0.30 0.16 0.15
@@ -656,7 +673,9 @@ Use the `sd` command to adjust correlations.
## Grade_7 0.16 0.52 0.77 0.76 0.83 0.93 1.00 0.95
## Grade_8 0.15 0.50 0.71 0.66 0.79 0.92 0.95 1.00
- round(cor(r_series(grade, 8, 10, relate = "+1_0")), 2)
+``` r
+round(cor(r_series(grade, 8, 10, relate = "+1_0")), 2)
+```
## Grade_1 Grade_2 Grade_3 Grade_4 Grade_5 Grade_6 Grade_7 Grade_8
## Grade_1 1 1 1 1 1 1 1 1
@@ -668,7 +687,9 @@ Use the `sd` command to adjust correlations.
## Grade_7 1 1 1 1 1 1 1 1
## Grade_8 1 1 1 1 1 1 1 1
- round(cor(r_series(grade, 8, 10, relate = "+1_20")), 2)
+``` r
+round(cor(r_series(grade, 8, 10, relate = "+1_20")), 2)
+```
## Grade_1 Grade_2 Grade_3 Grade_4 Grade_5 Grade_6 Grade_7 Grade_8
## Grade_1 1.00 -0.11 0.14 -0.21 -0.42 -0.29 -0.30 -0.27
@@ -680,7 +701,9 @@ Use the `sd` command to adjust correlations.
## Grade_7 -0.30 0.23 0.70 0.76 0.85 0.91 1.00 0.93
## Grade_8 -0.27 0.51 0.81 0.87 0.79 0.89 0.93 1.00
- round(cor(r_series(grade, 8, 10, relate = "+15_20")), 2)
+``` r
+round(cor(r_series(grade, 8, 10, relate = "+15_20")), 2)
+```
## Grade_1 Grade_2 Grade_3 Grade_4 Grade_5 Grade_6 Grade_7 Grade_8
## Grade_1 1.00 0.48 0.47 0.63 0.58 0.66 0.35 0.18
@@ -694,22 +717,28 @@ Use the `sd` command to adjust correlations.
#### Visualize the Relationship
- dat <- r_data_frame(12,
- name,
- r_series(grade, 100, relate = "+1_6")
- )
+``` r
+dat <- r_data_frame(12,
+ name,
+ r_series(grade, 100, relate = "+1_6")
+)
+
+dat %>%
+ gather(Time, Grade, -c(Name)) %>%
+ mutate(Time = as.numeric(gsub("\\D", "", Time))) %>%
+ ggplot(aes(x = Time, y = Grade, color = Name, group = Name)) +
+ geom_line(size=.8) +
+ theme_bw()
+```
- dat %>%
- gather(Time, Grade, -c(Name)) %>%
- mutate(Time = as.numeric(gsub("\\D", "", Time))) %>%
- ggplot(aes(x = Time, y = Grade, color = Name, group = Name)) +
- geom_line(size=.8) +
- theme_bw()
+ ## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
+ ## Please use `linewidth` instead.
+ ## ℹ The deprecated feature was likely used in the ggplot2 package.
+ ## Please report the issue at <]8;;https://github.com/tidyverse/ggplot2/issueshttps://github.com/tidyverse/ggplot2/issues]8;;>.
-
+
-Expanded Dummy Coding
----------------------
+## Expanded Dummy Coding
The user may wish to expand a `factor` into `j` dummy coded columns. The
`r_dummy` function expands a factor into `j` columns and works similar
@@ -717,15 +746,17 @@ to the `r_series` function. The user may wish to use the original factor
name as the prefix to the `j` columns. Setting `prefix = TRUE` within
`r_dummy` accomplishes this.
- set.seed(10)
- r_data_frame(n=100,
- id,
- age,
- r_dummy(sex, prefix = TRUE),
- r_dummy(political)
- )
-
- ## # A tibble: 100 x 8
+``` r
+set.seed(10)
+r_data_frame(n=100,
+ id,
+ age,
+ r_dummy(sex, prefix = TRUE),
+ r_dummy(political)
+)
+```
+
+ ## # A tibble: 100 × 8
## ID Age Sex_Male Sex_Female Democrat Republican Libertarian Green
##
## 1 001 26 1 0 0 0 1 0
@@ -738,30 +769,29 @@ name as the prefix to the `j` columns. Setting `prefix = TRUE` within
## 8 008 59 0 1 0 1 0 0
## 9 009 88 1 0 0 1 0 0
## 10 010 51 1 0 0 1 0 0
- ## # ... with 90 more rows
+ ## # … with 90 more rows
-Visualizing Column Types
-------------------------
+## Visualizing Column Types
It is helpful to see the column types and `NA`s as a visualization. The
`table_heat` (also the `plot` method assigned to `tbl_df` as well) can
provide visual glimpse of data types and missing cells.
- set.seed(10)
-
- r_data_frame(n=100,
- id,
- dob,
- animal,
- grade, grade,
- death,
- dummy,
- grade_letter,
- gender,
- paragraph,
- sentence
- ) %>%
- r_na() %>%
- plot(palette = "Set1")
-
-
+``` r
+set.seed(10)
+
+r_data_frame(n=100,
+ id,
+ dob,
+ animal,
+ grade, grade,
+ death,
+ dummy,
+ grade_letter,
+ gender,
+ paragraph,
+ sentence
+) %>%
+ r_na() %>%
+ plot(palette = "Set1")
+```
diff --git a/man/age.Rd b/man/age.Rd
index 30b75bd..49459e0 100644
--- a/man/age.Rd
+++ b/man/age.Rd
@@ -19,12 +19,12 @@ attribute. This is used to auto assign names to the column/vector name when
used inside of \code{r_data_frame} or \code{r_list}.}
}
\value{
-Returns a random integer vector of ages within the provided range
+Returns a random integer vector of ages within the provided range
(defaults to 18:89).
}
\description{
-Generate a random vector of ages within the provided range. The default age
-range is set between 18 and 89, to match the age ranges which appear (see e.g.,
+Generate a random vector of ages within the provided range. The default age
+range is set between 18 and 89, to match the age ranges which appear (see e.g.,
https://gssdataexplorer.norc.org/variables/53/vshow).
}
\examples{
@@ -40,7 +40,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/animal.Rd b/man/animal.Rd
index d3299f3..d744bb1 100644
--- a/man/animal.Rd
+++ b/man/animal.Rd
@@ -40,11 +40,11 @@ Returns a random factor vector of animal elements.
The household pets and probabilities:
\tabular{ll}{
- Dog \tab 36.5 \%\cr
- Cat \tab 30.4 \%\cr
- None \tab 25.8 \%\cr
- Bird \tab 3.1 \% \cr
- Horse \tab 1.5 \% \cr
+Dog \tab 36.5 \%\cr
+Cat \tab 30.4 \%\cr
+None \tab 25.8 \%\cr
+Bird \tab 3.1 \% \cr
+Horse \tab 1.5 \% \cr
}
}
\examples{
@@ -62,7 +62,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/answer.Rd b/man/answer.Rd
index c44f7ba..2b0fd0b 100644
--- a/man/answer.Rd
+++ b/man/answer.Rd
@@ -36,7 +36,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/area.Rd b/man/area.Rd
index 261b787..56d4e76 100644
--- a/man/area.Rd
+++ b/man/area.Rd
@@ -36,7 +36,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/as_integer.Rd b/man/as_integer.Rd
index 0a4d81f..0692979 100644
--- a/man/as_integer.Rd
+++ b/man/as_integer.Rd
@@ -7,21 +7,21 @@
as_integer(x, cols = NULL, fun = as.integer)
}
\arguments{
-\item{x}{A \code{\link[base]{data.frame}} of \code{\link[base]{factor}}s.}
+\item{x}{A \code{\link[base:data.frame]{base::data.frame()}} of \code{\link[base:factor]{base::factor()}}s.}
\item{cols}{Numeric indices of the columns to incude (use \code{-} to exclude
as well). Default is to assign random \code{NA}s to all columns except the
first column.}
\item{fun}{An \code{as.} coercion function to apply to each column. Default
-is \code{\link[base]{as.integer}}.}
+is \code{\link[base:integer]{base::as.integer()}}.}
}
\value{
-Returns a \code{\link[base]{data.frame}} equal to the
-\code{\link[base]{class}} of \code{x} with integer columns rather than factor.
+Returns a \code{\link[base:data.frame]{base::data.frame()}} equal to the
+\code{\link[base:class]{base::class()}} of \code{x} with integer columns rather than factor.
}
\description{
-Converts a \code{\link[base]{data.frame}} of \code{\link[base]{factor}}s to
+Converts a \code{\link[base:data.frame]{base::data.frame()}} of \code{\link[base:factor]{base::factor()}}s to
integers.
}
\examples{
@@ -38,7 +38,7 @@ r_data_frame(n=100,
as_integer(2:3)
}
\seealso{
-\code{\link[wakefield]{r_series}}
+\code{\link[=r_series]{r_series()}}
}
\keyword{integer}
\keyword{numeric}
diff --git a/man/car.Rd b/man/car.Rd
index f2cd1f8..17d8ba6 100644
--- a/man/car.Rd
+++ b/man/car.Rd
@@ -22,7 +22,7 @@ used inside of \code{r_data_frame} or \code{r_list}.}
Returns a random vector of car elements.
}
\description{
-Generate a random vector of cars (see \code{?\link[datasets]{mtcars}}).
+Generate a random vector of cars (see \verb{?[mtcars][datasets::mtcars]}).
}
\examples{
car(10)
@@ -36,7 +36,7 @@ Other variable functions:
\code{\link{area}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/children.Rd b/man/children.Rd
index 56868e4..d9fa7c0 100644
--- a/man/children.Rd
+++ b/man/children.Rd
@@ -41,7 +41,7 @@ Other variable functions:
\code{\link{area}()},
\code{\link{car}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/coin.Rd b/man/coin.Rd
index aaa989b..cd53c2e 100644
--- a/man/coin.Rd
+++ b/man/coin.Rd
@@ -36,7 +36,7 @@ Other variable functions:
\code{\link{area}()},
\code{\link{car}()},
\code{\link{children}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/date_stamp.Rd b/man/date_stamp.Rd
index 9707bc4..9490b28 100644
--- a/man/date_stamp.Rd
+++ b/man/date_stamp.Rd
@@ -26,7 +26,7 @@ dates are sequential.}
arguments are supplied to \code{start}, \code{k}, and \code{by}. The
\code{x} argument takes precedence over the other three if \code{!is.null}.
Note that \code{start}, \code{k}, and \code{by} work together to make a
-vector of dates to sample from. See \code{\link[base]{seq.Date}} for
+vector of dates to sample from. See \code{\link[base:seq.Date]{base::seq.Date()}} for
additional information.}
\item{start}{A date to start the sequence at.}
@@ -56,7 +56,7 @@ pie(table(date_stamp(2000, prob = probs(12))))
date_stamp(10, x = seq(as.Date("1980-11-16"), length = 30, by = "1 years"))
}
\seealso{
-\code{\link[base]{seq.Date}}
+\code{\link[base:seq.Date]{base::seq.Date()}}
Other variable functions:
\code{\link{age}()},
@@ -66,7 +66,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{death}()},
\code{\link{dice}()},
\code{\link{dna}()},
diff --git a/man/death.Rd b/man/death.Rd
index 88146f9..c4ee5db 100644
--- a/man/death.Rd
+++ b/man/death.Rd
@@ -41,7 +41,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{dice}()},
\code{\link{dna}()},
diff --git a/man/dice.Rd b/man/dice.Rd
index ad54f95..2837efa 100644
--- a/man/dice.Rd
+++ b/man/dice.Rd
@@ -37,7 +37,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dna}()},
diff --git a/man/dna.Rd b/man/dna.Rd
index e1f69b5..20baca0 100644
--- a/man/dna.Rd
+++ b/man/dna.Rd
@@ -42,7 +42,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/dob.Rd b/man/dob.Rd
index 7c2154d..aaeadf2 100644
--- a/man/dob.Rd
+++ b/man/dob.Rd
@@ -38,7 +38,7 @@ dates are sequential.}
arguments are supplied to \code{start}, \code{k}, and \code{by}. The
\code{x} argument takes precedence over the other three if \code{!is.null}.
Note that \code{start}, \code{k}, and \code{by} work together to make a
-vector of dates to sample from. See \code{\link[base]{seq.Date}} for
+vector of dates to sample from. See \code{\link[base:seq.Date]{base::seq.Date()}} for
additional information.}
\item{start}{A date to start the sequence at.}
@@ -74,7 +74,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/dummy.Rd b/man/dummy.Rd
index eb8367f..2e968fb 100644
--- a/man/dummy.Rd
+++ b/man/dummy.Rd
@@ -27,7 +27,7 @@ dummy(100, name = "Var")
table(dummy(1000))
}
\seealso{
-\code{\link[base]{sample.int}}
+\code{\link[base:sample]{base::sample.int()}}
Other variable functions:
\code{\link{age}()},
@@ -37,7 +37,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/education.Rd b/man/education.Rd
index c468785..fc42a37 100644
--- a/man/education.Rd
+++ b/man/education.Rd
@@ -40,19 +40,19 @@ The educational attainments and probabilities used match approximate
U.S. educational attainment make-up (http://www.census.gov):
\tabular{lr}{
- \bold{ Highest Attainment} \tab \bold{Percent} \cr
- No Schooling Completed \tab 1.3 \% \cr
- Nursery School to 8th Grade \tab 5 \% \cr
- 9th Grade to 12th Grade, No Diploma \tab 8.5 \% \cr
- Regular High School Diploma \tab 24.6 \%\cr
- GED or Alternative Credential \tab 3.9 \% \cr
- Some College, Less than 1 Year \tab 6.4 \% \cr
- Some College, 1 or More Years, No Degree \tab 15 \% \cr
- Associate's Degree \tab 7.5 \% \cr
- Bachelor's Degree \tab 17.6 \%\cr
- Master's Degree \tab 7.2 \% \cr
- Professional School Degree \tab 1.9 \% \cr
- Doctorate Degree \tab 1.2 \% \cr
+** Highest Attainment** \tab \strong{Percent} \cr
+No Schooling Completed \tab 1.3 \% \cr
+Nursery School to 8th Grade \tab 5 \% \cr
+9th Grade to 12th Grade, No Diploma \tab 8.5 \% \cr
+Regular High School Diploma \tab 24.6 \%\cr
+GED or Alternative Credential \tab 3.9 \% \cr
+Some College, Less than 1 Year \tab 6.4 \% \cr
+Some College, 1 or More Years, No Degree \tab 15 \% \cr
+Associate's Degree \tab 7.5 \% \cr
+Bachelor's Degree \tab 17.6 \%\cr
+Master's Degree \tab 7.2 \% \cr
+Professional School Degree \tab 1.9 \% \cr
+Doctorate Degree \tab 1.2 \% \cr
}
}
\examples{
@@ -71,7 +71,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/employment.Rd b/man/employment.Rd
index 14f2fd3..9add8c5 100644
--- a/man/employment.Rd
+++ b/man/employment.Rd
@@ -33,12 +33,12 @@ Generate a random vector of employment statuses.
The following arbitrary probabilities are used:
\tabular{lr}{
- \bold{ Employment Status} \tab \bold{Percent}\cr
- Full Time \tab 60\%\cr
- Part Time \tab 10\%\cr
- Unemployed \tab 10\%\cr
- Retired \tab 10\%\cr
- Student \tab 10\%\cr
+** Employment Status** \tab \strong{Percent}\cr
+Full Time \tab 60\%\cr
+Part Time \tab 10\%\cr
+Unemployed \tab 10\%\cr
+Retired \tab 10\%\cr
+Student \tab 10\%\cr
}
}
\examples{
@@ -55,7 +55,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/eye.Rd b/man/eye.Rd
index e0abaa5..9aba3cb 100644
--- a/man/eye.Rd
+++ b/man/eye.Rd
@@ -33,12 +33,12 @@ Generate a random vector of eye colors.
The eye colors and probabilities:
\tabular{lr}{
- \bold{ Color} \tab \bold{Percent}\cr
- Brown \tab 44 \%\cr
- Blue \tab 30 \%\cr
- Green \tab 13 \%\cr
- Hazel \tab 9 \%\cr
- Gray \tab 4 \%\cr
+** Color** \tab \strong{Percent}\cr
+Brown \tab 44 \%\cr
+Blue \tab 30 \%\cr
+Green \tab 13 \%\cr
+Hazel \tab 9 \%\cr
+Gray \tab 4 \%\cr
}
}
\examples{
@@ -54,7 +54,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/grade.Rd b/man/grade.Rd
index 041ff8c..f7e8508 100644
--- a/man/grade.Rd
+++ b/man/grade.Rd
@@ -25,7 +25,7 @@ attribute. This is used to auto assign names to the column/vector name when
used inside of \code{r_data_frame} or \code{r_list}.}
\item{digits}{Integer indicating the number of decimal places to be used.
-Negative values are allowed (see \code{\link[base]{round}}).}
+Negative values are allowed (see \code{\link[base:Round]{base::round()}}).}
}
\value{
Returns a random normal vector of grade elements.
@@ -42,20 +42,20 @@ Returns a random normal vector of grade elements.
The conversion between percent range, letter grade, and GPA is:
\tabular{llr}{
- \bold{Percent} \tab \bold{Letter} \tab \bold{GPA}\cr
- 97-100 \tab A+ \tab 4.00\cr
- 93-96 \tab A \tab 4.00\cr
- 90-92 \tab A- \tab 3.67\cr
- 87-89 \tab B+ \tab 3.33\cr
- 83-86 \tab B \tab 3.00\cr
- 80-82 \tab B- \tab 2.67\cr
- 77-79 \tab C+ \tab 2.33\cr
- 73-76 \tab C \tab 2.00\cr
- 70-72 \tab C- \tab 1.67\cr
- 67-69 \tab D+ \tab 1.33\cr
- 63-66 \tab D \tab 1.00\cr
- 60-62 \tab D- \tab 0.67\cr
- < 60 \tab F \tab 0.00
+\strong{Percent} \tab \strong{Letter} \tab \strong{GPA}\cr
+97-100 \tab A+ \tab 4.00\cr
+93-96 \tab A \tab 4.00\cr
+90-92 \tab A- \tab 3.67\cr
+87-89 \tab B+ \tab 3.33\cr
+83-86 \tab B \tab 3.00\cr
+80-82 \tab B- \tab 2.67\cr
+77-79 \tab C+ \tab 2.33\cr
+73-76 \tab C \tab 2.00\cr
+70-72 \tab C- \tab 1.67\cr
+67-69 \tab D+ \tab 1.33\cr
+63-66 \tab D \tab 1.00\cr
+60-62 \tab D- \tab 0.67\cr
+< 60 \tab F \tab 0.00
}
}
\examples{
@@ -78,7 +78,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/grade_level.Rd b/man/grade_level.Rd
index 93b3616..5956c5c 100644
--- a/man/grade_level.Rd
+++ b/man/grade_level.Rd
@@ -42,7 +42,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/group.Rd b/man/group.Rd
index f9967b2..0b4a9bf 100644
--- a/man/group.Rd
+++ b/man/group.Rd
@@ -25,7 +25,7 @@ Returns a random factor vector of group (control/treatment) elements.
Generate a random vector of binary groups (e.g., control/treatment).
}
\note{
-If you want > 2 groups see `r_sample_factor`.
+If you want > 2 groups see \code{r_sample_factor}.
}
\examples{
group(10)
@@ -41,7 +41,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/hair.Rd b/man/hair.Rd
index 3741d3d..f452636 100644
--- a/man/hair.Rd
+++ b/man/hair.Rd
@@ -33,11 +33,11 @@ Generate a random vector of hair colors.
The hair colors and probabilities:
\tabular{lr}{
- \bold{ Color} \tab \bold{Percent}\cr
- Brown \tab 35 \%\cr
- Black \tab 28 \%\cr
- Blonde \tab 26 \%\cr
- Red \tab 11 \%\cr
+** Color** \tab \strong{Percent}\cr
+Brown \tab 35 \%\cr
+Black \tab 28 \%\cr
+Blonde \tab 26 \%\cr
+Red \tab 11 \%\cr
}
}
\examples{
@@ -55,7 +55,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/height.Rd b/man/height.Rd
index e00f18b..538f205 100644
--- a/man/height.Rd
+++ b/man/height.Rd
@@ -51,7 +51,7 @@ replaced with \code{min}.}
be replaced with \code{max}.}
\item{digits}{Integer indicating the number of decimal places to be used.
-Negative values are allowed (see \code{\link[base]{round}}).}
+Negative values are allowed (see \code{\link[base:Round]{base::round()}}).}
\item{name}{The name to assign to the output vector's \code{varname}
attribute. This is used to auto assign names to the column/vector name when
@@ -84,7 +84,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/hour.Rd b/man/hour.Rd
index 6e5a346..f3dba15 100644
--- a/man/hour.Rd
+++ b/man/hour.Rd
@@ -32,7 +32,7 @@ hour(20)
hour(20, random=TRUE)
}
\seealso{
-\code{\link[chron]{times}}
+\code{\link[chron:dates]{chron::times()}}
}
\keyword{hour}
\keyword{time}
diff --git a/man/id.Rd b/man/id.Rd
index c35f05f..7d34c91 100644
--- a/man/id.Rd
+++ b/man/id.Rd
@@ -22,26 +22,26 @@ used inside of \code{r_data_frame} or \code{r_list}.}
}
\value{
Returns a (optionally random) vector of
-\code{\link[base]{character}}/\code{\link[base]{factor}} observations
+\code{\link[base:character]{base::character()}}/\code{\link[base:factor]{base::factor()}} observations
ID numbers.
}
\description{
-\code{id} - Generate a sequential \code{\link[base]{character}} vector of
+\code{id} - Generate a sequential \code{\link[base:character]{base::character()}} vector of
zero-padded identification numbers (IDs).
-\code{id_factor} - Generate a sequential \code{\link[base]{factor}} vector
+\code{id_factor} - Generate a sequential \code{\link[base:factor]{base::factor()}} vector
of zero-padded identification numbers (IDs).
}
\note{
\code{id} is faster than \code{id_factor}, as the later coerces the
-vector to a \code{\link[base]{factor}}.
+vector to a \code{\link[base:factor]{base::factor()}}.
}
\section{Warning}{
- \code{id} uses \code{\link[base]{sprintf}} to generate the
-padded ID. Per \code{\link[base]{sprintf}}'s documentation: ``The format
+ \code{id} uses \code{\link[base:sprintf]{base::sprintf()}} to generate the
+padded ID. Per \code{\link[base:sprintf]{base::sprintf()}}'s documentation: ``The format
string is passed down the OS's sprintf function...The behaviour on inputs not
documented here is 'undefined', which means it is allowed to differ by
-platform.'' See \code{\link[base]{sprintf}} for details.
+platform.'' See \code{\link[base:sprintf]{base::sprintf()}} for details.
}
\examples{
@@ -49,7 +49,7 @@ id(1000)
r_data_frame(n=21, id)
}
\seealso{
-\code{\link[base]{sprintf}}
+\code{\link[base:sprintf]{base::sprintf()}}
}
\keyword{id}
\keyword{identification}
diff --git a/man/income.Rd b/man/income.Rd
index 74a822c..fd30197 100644
--- a/man/income.Rd
+++ b/man/income.Rd
@@ -11,7 +11,7 @@ income(n, digits = 2, name = "Income")
the environment of \code{r_data_frame} or \code{r_list}.}
\item{digits}{Integer indicating the number of decimal places to be used.
-Negative values are allowed (see \code{\link[base]{round}}).}
+Negative values are allowed (see \code{\link[base:Round]{base::round()}}).}
\item{name}{The name to assign to the output vector's \code{varname}
attribute. This is used to auto assign names to the column/vector name when
@@ -32,7 +32,7 @@ hist(income(10000))
pie(table(cut(income(10000), 10)))
}
\seealso{
-\code{\link[base]{gamma}}
+\code{\link[base:Special]{base::gamma()}}
Other variable functions:
\code{\link{age}()},
@@ -42,7 +42,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/internet_browser.Rd b/man/internet_browser.Rd
index 13cf99f..5ba7632 100644
--- a/man/internet_browser.Rd
+++ b/man/internet_browser.Rd
@@ -30,16 +30,16 @@ Returns a random factor vector of Internet browser elements.
Generate a random vector of Internet browser.
}
\details{
-The browser use and probabilities (from https://gs.statcounter.com/):
+The browser use and probabilities (from https://gs.statcounter.com/):
\tabular{lr}{
- \bold{ Browser} \tab \bold{Percent} \cr
- Chrome \tab 50.27 \%\cr
- IE \tab 17.50 \% \cr
- Firefox \tab 16.89 \%\cr
- Safari \tab 9.94 \% \cr
- Opera \tab 1.70 \% \cr
- Android \tab 1.32 \% \cr
+** Browser** \tab \strong{Percent} \cr
+Chrome \tab 50.27 \%\cr
+IE \tab 17.50 \% \cr
+Firefox \tab 16.89 \%\cr
+Safari \tab 9.94 \% \cr
+Opera \tab 1.70 \% \cr
+Android \tab 1.32 \% \cr
}
}
\examples{
@@ -59,7 +59,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/interval.Rd b/man/interval.Rd
index 3bd26c2..7f3d345 100644
--- a/man/interval.Rd
+++ b/man/interval.Rd
@@ -27,7 +27,7 @@ into which the vector produced from \code{fun} is to be cut.}
labels are constructed using "(a,b]" interval notation. If
\code{labels = FALSE}, simple integer codes are returned instead of a factor.}
-\item{include.lowest}{logical. If \code{TRUE} an 'x[i]' equal to the lowest
+\item{include.lowest}{logical. If \code{TRUE} an \code{x[i]} equal to the lowest
(or highest, for \code{right = FALSE}) 'breaks' value should be included.}
\item{right}{logical. If \code{TRUE} the intervals will be closed on the
@@ -45,10 +45,10 @@ the environment of \code{r_data_frame} or \code{r_list}.}
\item{\ldots}{Other arguments passed to \code{fun}.}
}
\value{
-Returns a \code{\link[base]{cut}} factor vector.
+Returns a \code{\link[base:cut]{base::cut()}} factor vector.
}
\description{
-A wrapper for \code{\link[base]{cut}} that cuts the vector and then adds the
+A wrapper for \code{\link[base:cut]{base::cut()}} that cuts the vector and then adds the
\code{varname} produced by the original function.
}
\examples{
@@ -57,7 +57,7 @@ attributes(interval(normal, 4, n=100))
interval(age, 3, n = 1000)
}
\seealso{
-\code{\link[base]{cut}}
+\code{\link[base:cut]{base::cut()}}
}
\keyword{cut}
\keyword{interval}
diff --git a/man/iq.Rd b/man/iq.Rd
index 35b8f70..613bbbf 100644
--- a/man/iq.Rd
+++ b/man/iq.Rd
@@ -21,7 +21,7 @@ replaced with \code{min}.}
be replaced with \code{max}.}
\item{digits}{Integer indicating the number of decimal places to be used.
-Negative values are allowed (see \code{\link[base]{round}}).}
+Negative values are allowed (see \code{\link[base:Round]{base::round()}}).}
\item{name}{The name to assign to the output vector's \code{varname}
attribute. This is used to auto assign names to the column/vector name when
@@ -47,7 +47,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/language.Rd b/man/language.Rd
index aecae9f..0a1274e 100644
--- a/man/language.Rd
+++ b/man/language.Rd
@@ -28,7 +28,7 @@ Returns a random character vector of language elements.
}
\description{
Generate a random vector of languages from the
-\code{\link[wakefield]{presidential_debates_2012}}.
+\code{\link[=presidential_debates_2012]{presidential_debates_2012()}}.
}
\examples{
language(10)
@@ -48,7 +48,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/languages.Rd b/man/languages.Rd
index e34caa0..c4e8381 100644
--- a/man/languages.Rd
+++ b/man/languages.Rd
@@ -16,10 +16,10 @@ https://en.wikipedia.org/wiki/List_of_languages_by_number_of_native_speakers.
}
\details{
\itemize{
- \item Language. The language spoken.
- \item N. The number of speakers world-wide.
- \item Proportion. The proportion of speakers.
- \item Percent. The percentage of speakers.
+\item Language. The language spoken.
+\item N. The number of speakers world-wide.
+\item Proportion. The proportion of speakers.
+\item Percent. The percentage of speakers.
}
}
\references{
diff --git a/man/letter.Rd b/man/letter.Rd
index 1da9adc..72c6922 100644
--- a/man/letter.Rd
+++ b/man/letter.Rd
@@ -72,7 +72,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/level.Rd b/man/level.Rd
index 72ec5a5..fd56c5a 100644
--- a/man/level.Rd
+++ b/man/level.Rd
@@ -41,11 +41,11 @@ Distribution of levels (used in \code{prob}) were taken from New
York State' s 2014 assessment report: \url{http://www.p12.nysed.gov/irs/}
\tabular{lrr}{
- \bold{ Level} \tab \bold{ELA} \tab \bold{Math}\cr
- 1 \tab 31.6\% \tab 29.8\%\cr
- 2 \tab 37.3\% \tab 33.3\%\cr
- 3 \tab 22.3\% \tab 22.8\%\cr
- 4 \tab 8.8\% \tab 14.0\%\cr
+** Level** \tab \strong{ELA} \tab \strong{Math}\cr
+1 \tab 31.6\% \tab 29.8\%\cr
+2 \tab 37.3\% \tab 33.3\%\cr
+3 \tab 22.3\% \tab 22.8\%\cr
+4 \tab 8.8\% \tab 14.0\%\cr
}
}
\examples{
@@ -67,7 +67,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/likert.Rd b/man/likert.Rd
index 4d69a2c..fea1935 100644
--- a/man/likert.Rd
+++ b/man/likert.Rd
@@ -64,7 +64,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/lorem_ipsum.Rd b/man/lorem_ipsum.Rd
index 33a19e3..e2c5cc3 100644
--- a/man/lorem_ipsum.Rd
+++ b/man/lorem_ipsum.Rd
@@ -13,7 +13,7 @@ paragraph(n, ..., name = "Paragraph")
\item{n}{The number elements to generate. This can be globally set within
the environment of \code{r_data_frame} or \code{r_list}.}
-\item{\dots}{Other arguments passed to \code{\link[stringi]{stri_rand_lipsum}}.}
+\item{\dots}{Other arguments passed to \code{\link[stringi:stri_rand_lipsum]{stringi::stri_rand_lipsum()}}.}
\item{name}{The name to assign to the output vector's \code{varname}
attribute. This is used to auto assign names to the column/vector name when
@@ -37,7 +37,7 @@ paragraph(10)
lorem_ipsum(10, start_lipsum = FALSE)
}
\seealso{
-\code{\link[stringi]{stri_rand_lipsum}}
+\code{\link[stringi:stri_rand_lipsum]{stringi::stri_rand_lipsum()}}
Other variable functions:
\code{\link{age}()},
@@ -47,7 +47,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/marital.Rd b/man/marital.Rd
index 0b6837b..ec661c2 100644
--- a/man/marital.Rd
+++ b/man/marital.Rd
@@ -42,7 +42,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/military.Rd b/man/military.Rd
index f0bba13..3ee3c55 100644
--- a/man/military.Rd
+++ b/man/military.Rd
@@ -34,12 +34,12 @@ The military branches and probabilities used match approximate U.S.
military make-up:
\tabular{lrr}{
- \bold{ Branch} \tab \bold{N} \tab \bold{Percent} \cr
- Army \tab 541,291 \tab 37.9\%\cr
- Air Force \tab 333,772 \tab 23.3\%\cr
- Navy \tab 317,237 \tab 22.2\%\cr
- Marine Corps \tab 195,338 \tab 13.7\%\cr
- Coast Guard \tab 42,357 \tab 3.0\%\cr
+** Branch** \tab \strong{N} \tab \strong{Percent} \cr
+Army \tab 541,291 \tab 37.9\%\cr
+Air Force \tab 333,772 \tab 23.3\%\cr
+Navy \tab 317,237 \tab 22.2\%\cr
+Marine Corps \tab 195,338 \tab 13.7\%\cr
+Coast Guard \tab 42,357 \tab 3.0\%\cr
}
}
\examples{
@@ -56,7 +56,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/minute.Rd b/man/minute.Rd
index f7d0a8b..dadadda 100644
--- a/man/minute.Rd
+++ b/man/minute.Rd
@@ -39,7 +39,7 @@ minute(20, random=TRUE)
pie(table(minute(2000, x = seq(0, 59, by = 10)/60, prob = probs(6))))
}
\seealso{
-\code{\link[chron]{times}}
+\code{\link[chron:dates]{chron::times()}}
}
\keyword{minute}
\keyword{time}
diff --git a/man/month.Rd b/man/month.Rd
index d5c2c73..7148b5b 100644
--- a/man/month.Rd
+++ b/man/month.Rd
@@ -37,7 +37,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/name.Rd b/man/name.Rd
index f54a0d7..fe91ab4 100644
--- a/man/name.Rd
+++ b/man/name.Rd
@@ -48,7 +48,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/normal.Rd b/man/normal.Rd
index 0280d70..37645bd 100644
--- a/man/normal.Rd
+++ b/man/normal.Rd
@@ -36,16 +36,16 @@ attribute. This is used to auto assign names to the column/vector name when
used inside of \code{r_data_frame} or \code{r_list}.}
\item{digits}{Integer indicating the number of decimal places to be used.
-Negative values are allowed (see \code{\link[base]{round}}).}
+Negative values are allowed (see \code{\link[base:Round]{base::round()}}).}
}
\value{
Returns a random vector of elements.
}
\description{
-\code{normal} - A wrapper for \code{\link[stats]{rnorm}} that generate a
+\code{normal} - A wrapper for \code{\link[stats:Normal]{stats::rnorm()}} that generate a
random normal vector.
-\code{normal_round} - A wrapper for \code{\link[stats]{rnorm}} that generate
+\code{normal_round} - A wrapper for \code{\link[stats:Normal]{stats::rnorm()}} that generate
a rounded random normal vector.
}
\examples{
@@ -54,9 +54,9 @@ hist(normal(10000, 100, 10))
interval(normal, 9, n = 1000)
}
\seealso{
-\code{\link[stats]{rnorm}}
+\code{\link[stats:Normal]{stats::rnorm()}}
-\code{\link[base]{round}}
+\code{\link[base:Round]{base::round()}}
Other variable functions:
\code{\link{age}()},
@@ -66,7 +66,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/peek.Rd b/man/peek.Rd
index 419b77d..7b9656e 100644
--- a/man/peek.Rd
+++ b/man/peek.Rd
@@ -7,7 +7,7 @@
peek(x, n = 10, width = 10, ...)
}
\arguments{
-\item{x}{A \code{\link[base]{data.frame}} object.}
+\item{x}{A \code{\link[base:data.frame]{base::data.frame()}} object.}
\item{n}{Number of rows to display.}
@@ -20,7 +20,7 @@ Prints a truncated head but invisibly returns \code{x}.
}
\description{
Convenience function to view all the columns of the head
-of a truncated \code{\link[base]{data.frame}}. \code{peek} invisibly returns
+of a truncated \code{\link[base:data.frame]{base::data.frame()}}. \code{peek} invisibly returns
\code{x}. This makes its use ideal in a \pkg{dplyr}/\pkg{magrittr} pipeline.
}
\details{
@@ -51,5 +51,5 @@ dat2
peek(dat2)
}
\seealso{
-\code{\link[utils]{head}}
+\code{\link[utils:head]{utils::head()}}
}
diff --git a/man/plot.tbl_df.Rd b/man/plot.tbl_df.Rd
index d50bb86..4c12113 100644
--- a/man/plot.tbl_df.Rd
+++ b/man/plot.tbl_df.Rd
@@ -9,7 +9,7 @@
\arguments{
\item{x}{The tbl_df object.}
-\item{\ldots}{Arguments passed to \code{\link[wakefield]{table_heat}}.}
+\item{\ldots}{Arguments passed to \code{\link[=table_heat]{table_heat()}}.}
}
\description{
Plots a tbl_df object.
diff --git a/man/political.Rd b/man/political.Rd
index b7e1ef2..00d795c 100644
--- a/man/political.Rd
+++ b/man/political.Rd
@@ -35,12 +35,12 @@ The political parties and probabilities used match approximate U.S.
political make-up of registered voters (2014). The default make up is:
\tabular{lrr}{
- \bold{ Party} \tab \bold{N} \tab \bold{Percent} \cr
- Democrat \tab 43,140,758 \tab 57.73\% \cr
- Republican \tab 30,700,138 \tab 41.08\% \cr
- Constitution \tab 367,000 \tab .49\% \cr
- Libertarian \tab 278,446 \tab .37\% \cr
- Green \tab 246,145 \tab .33\% \cr
+** Party** \tab \strong{N} \tab \strong{Percent} \cr
+Democrat \tab 43,140,758 \tab 57.73\% \cr
+Republican \tab 30,700,138 \tab 41.08\% \cr
+Constitution \tab 367,000 \tab .49\% \cr
+Libertarian \tab 278,446 \tab .37\% \cr
+Green \tab 246,145 \tab .33\% \cr
}
}
\examples{
@@ -56,7 +56,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/r_data.Rd b/man/r_data.Rd
index 8fa2a25..7f8243f 100644
--- a/man/r_data.Rd
+++ b/man/r_data.Rd
@@ -14,16 +14,16 @@ r_data_theme(n = 100, data_theme = "the_works")
\item{data_theme}{A data theme. Currently selections include:
\describe{
- \item{the_works}{all available variable functions}
- \item{survey}{ID column plus 10 numeric 5-point Likert type response columns}
- \item{survey2}{ID column plus 10 5-point Likert type response columns}
+\item{the_works}{all available variable functions}
+\item{survey}{ID column plus 10 numeric 5-point Likert type response columns}
+\item{survey2}{ID column plus 10 5-point Likert type response columns}
}}
\item{\ldots}{A set of optionally named arguments. Using \pkg{wakefield}
variable functions require no name or call parenthesis.}
}
\value{
-Returns a \code{\link[dplyr]{tbl_df}}.
+Returns a \code{\link[dplyr:tbl_df]{dplyr::tbl_df()}}.
}
\description{
\code{r_data} - Generate a data set with pre-set columns selected.
@@ -34,19 +34,19 @@ Returns a \code{\link[dplyr]{tbl_df}}.
The pre-selected columns include:
\itemize{
- \item ID
- \item Race
- \item Age
- \item Sex
- \item Hour
- \item IQ
- \item Height
- \item Died
+\item ID
+\item Race
+\item Age
+\item Sex
+\item Hour
+\item IQ
+\item Height
+\item Died
}
The user may use \ldots to add additional columns. \code{r_data} is a
convenience function to quickly produce a data set. For more specific usage
-use the more flexible \code{\link[wakefield]{r_data_frame}} function.
+use the more flexible \code{\link[=r_data_frame]{r_data_frame()}} function.
}
\examples{
r_data()
@@ -60,5 +60,5 @@ r_data_theme(, "survey")
r_data_theme(, "survey2")
}
\seealso{
-\code{\link[wakefield]{r_data_frame}}
+\code{\link[=r_data_frame]{r_data_frame()}}
}
diff --git a/man/r_data_frame.Rd b/man/r_data_frame.Rd
index a312633..f9ae7b9 100644
--- a/man/r_data_frame.Rd
+++ b/man/r_data_frame.Rd
@@ -10,21 +10,21 @@ r_data_frame(n, ..., rep.sep = "_")
\item{n}{The length to pass to the randomly generated vectors.}
\item{rep.sep}{A separator to use for repeated variable names. For example
-if the \code{\link[wakefield]{age}} is used three times
+if the \code{\link[=age]{age()}} is used three times
(\code{r_data_frame(age, age, age)}), the name "Age" will be assigned to all
three columns. The results in column names \code{c("Age_1", "Age_2", "Age_3")}.
To turn of this behavior use \code{rep.sep = NULL}. This results in
\code{c("Age", "Age.1", "Age.2")} column names in the
-\code{\link[base]{data.frame}}.}
+\code{\link[base:data.frame]{base::data.frame()}}.}
\item{\ldots}{A set of optionally named arguments. Using \pkg{wakefield}
variable functions require no name or call parenthesis.}
}
\value{
-Returns a \code{\link[dplyr]{tbl_df}}.
+Returns a \code{\link[dplyr:tbl_df]{dplyr::tbl_df()}}.
}
\description{
-Produce a \code{\link[dplyr]{tbl_df}} data frame that allows the user to
+Produce a \code{\link[dplyr:tbl_df]{dplyr::tbl_df()}} data frame that allows the user to
lazily pass unnamed \pkg{wakefield} variable functions (optionally, without
call parenthesis).
}
@@ -102,10 +102,10 @@ r_data_frame(n=100,
https://stackoverflow.com/a/29617983/1000343
}
\seealso{
-\code{\link[wakefield]{r_list}},
-\code{\link[wakefield]{r_series}}
-\code{\link[wakefield]{r_dummy}}
+\code{\link[=r_list]{r_list()}},
+\code{\link[=r_series]{r_series()}}
+\code{\link[=r_dummy]{r_dummy()}}
}
\author{
-Josh O'Brien and Tyler Rinker .
+Josh O'Brien and Tyler Rinker \href{mailto:tyler.rinker@gmail.com}{tyler.rinker@gmail.com}.
}
diff --git a/man/r_dummy.Rd b/man/r_dummy.Rd
index 958c0b2..7a70aac 100644
--- a/man/r_dummy.Rd
+++ b/man/r_dummy.Rd
@@ -16,14 +16,14 @@ r_dummy(fun, n, ..., prefix = FALSE, rep.sep = "_")
generated from the factor's categories.}
\item{rep.sep}{A separator to use for the variable and category part of names
-when \code{prefix = TRUE}. For example if the \code{\link[wakefield]{age}}
+when \code{prefix = TRUE}. For example if the \code{\link[=age]{age()}}
is used (\code{r_dummy(sex)}), this results in column names
\code{c("Sex_Male", "Sex_Female")}.}
\item{\ldots}{Additional arguments passed to \code{fun}.}
}
\value{
-Returns a \code{\link[dplyr]{tbl_df}}.
+Returns a \code{\link[dplyr:tbl_df]{dplyr::tbl_df()}}.
}
\description{
Generate random values from a \pkg{wakefield} variable function.
@@ -34,8 +34,8 @@ r_dummy(race, 1000)
r_dummy(race, 1000, name = "Ethnicity")
}
\seealso{
-\code{\link[wakefield]{r_list}},
-\code{\link[wakefield]{r_data_frame}},
-\code{\link[wakefield]{r_series}}
+\code{\link[=r_list]{r_list()}},
+\code{\link[=r_data_frame]{r_data_frame()}},
+\code{\link[=r_series]{r_series()}}
}
\keyword{dummy}
diff --git a/man/r_insert.Rd b/man/r_insert.Rd
index 9230a58..cc6a499 100644
--- a/man/r_insert.Rd
+++ b/man/r_insert.Rd
@@ -7,18 +7,18 @@
r_insert(x, name = "Inserted")
}
\arguments{
-\item{x}{A \code{\link[base]{data.frame}} to add a \code{seriesname}
+\item{x}{A \code{\link[base:data.frame]{base::data.frame()}} to add a \code{seriesname}
attribute (i.e., \code{attributes(x)[["seriesname"]]})}
\item{name}{A name to assign to \code{attributes(x)[["seriesname"]]}.}
}
\value{
-Returns a \code{\link[base]{data.frame}} with a
+Returns a \code{\link[base:data.frame]{base::data.frame()}} with a
\code{attributes(x)[["seriesname"]]} assigned.
}
\description{
-Safely insert \code{\link[base]{data.frame}} objects into a
-\code{\link[wakefield]{r_data_frame}} or \code{\link[wakefield]{r_list}}.
+Safely insert \code{\link[base:data.frame]{base::data.frame()}} objects into a
+\code{\link[=r_data_frame]{r_data_frame()}} or \code{\link[=r_list]{r_list()}}.
}
\examples{
dat <- dplyr::data_frame(
@@ -40,6 +40,6 @@ r_list(10,
)
}
\seealso{
-\code{\link[wakefield]{seriesname}}
+\code{\link[=seriesname]{seriesname()}}
}
\keyword{insert}
diff --git a/man/r_list.Rd b/man/r_list.Rd
index 9e37e12..f459004 100644
--- a/man/r_list.Rd
+++ b/man/r_list.Rd
@@ -10,13 +10,13 @@ r_list(n, ..., rep.sep = "_")
\item{n}{The length to pass to the randomly generated vectors.}
\item{rep.sep}{A separator to use for repeated variable names. For example
-if the \code{\link[wakefield]{age}} is used three times
+if the \code{\link[=age]{age()}} is used three times
(\code{r_list(age, age, age)}), the name "Age" will be assigned to all three
vectors in the list. The results in column names
\code{c("Age_1", "Age_2", "Age_3")}. To turn of this behavior use
\code{rep.sep = NULL}. This results in \code{c("Age", "Age", "Age")} for
vector names, leading to \code{c("Age", "Age.1", "Age.2")} if coerced to a
-\code{\link[base]{data.frame}}.}
+\code{\link[base:data.frame]{base::data.frame()}}.}
\item{\ldots}{A set of optionally named arguments. Using \pkg{wakefield}
variable functions require no name or call parenthesis.}
@@ -25,7 +25,7 @@ variable functions require no name or call parenthesis.}
Returns a named list of equal length vectors.
}
\description{
-Produce a named \code{\link[base]{list}} that allows the user to lazily pass
+Produce a named \code{\link[base:list]{base::list()}} that allows the user to lazily pass
unnamed \pkg{wakefield} variable functions (optionally, without call
parenthesis).
}
@@ -60,11 +60,11 @@ r_list(
https://stackoverflow.com/a/29617983/1000343
}
\seealso{
-\code{\link[wakefield]{r_data_frame}},
-\code{\link[wakefield]{r_series}}
-\code{\link[wakefield]{r_dummy}}
+\code{\link[=r_data_frame]{r_data_frame()}},
+\code{\link[=r_series]{r_series()}}
+\code{\link[=r_dummy]{r_dummy()}}
}
\author{
-Josh O'Brien and Tyler Rinker .
+Josh O'Brien and Tyler Rinker \href{mailto:tyler.rinker@gmail.com}{tyler.rinker@gmail.com}.
}
\keyword{list}
diff --git a/man/r_na.Rd b/man/r_na.Rd
index d7542b3..1a0d2ac 100644
--- a/man/r_na.Rd
+++ b/man/r_na.Rd
@@ -7,7 +7,7 @@
r_na(x, cols = -1, prob = 0.05)
}
\arguments{
-\item{x}{A \code{\link[base]{data.frame}} or \code{\link[base]{list}} to
+\item{x}{A \code{\link[base:data.frame]{base::data.frame()}} or \code{\link[base:list]{base::list()}} to
randomly replace elements with \code{NA}s.}
\item{cols}{Numeric indices of the columns to incude (use \code{-} to exlcude
@@ -18,7 +18,7 @@ first column.}
\code{NA}.}
}
\value{
-Returns a \code{\link[base]{data.frame}} or \code{\link[base]{list}}
+Returns a \code{\link[base:data.frame]{base::data.frame()}} or \code{\link[base:list]{base::list()}}
with random missing values.
}
\description{
diff --git a/man/r_sample.Rd b/man/r_sample.Rd
index 21c155b..ca6de46 100644
--- a/man/r_sample.Rd
+++ b/man/r_sample.Rd
@@ -31,5 +31,5 @@ r_sample(x = c("B", "W"), prob = c(.7, .3), n = 25, name = "Race")
r_sample(25, x = c(TRUE, FALSE))
}
\seealso{
-\code{\link[base]{sample}}
+\code{\link[base:sample]{base::sample()}}
}
diff --git a/man/r_sample_binary.Rd b/man/r_sample_binary.Rd
index 279be0e..18f1dcb 100644
--- a/man/r_sample_binary.Rd
+++ b/man/r_sample_binary.Rd
@@ -36,5 +36,5 @@ table(r_sample_binary(1000))
c("B", "W")[r_sample_binary(10)]
}
\seealso{
-\code{\link[base]{sample.int}}
+\code{\link[base:sample]{base::sample.int()}}
}
diff --git a/man/r_sample_factor.Rd b/man/r_sample_factor.Rd
index 7caa428..af2e805 100644
--- a/man/r_sample_factor.Rd
+++ b/man/r_sample_factor.Rd
@@ -30,5 +30,5 @@ table(r_sample_factor(x = c("Dog", "Cat", "Fish", "Bird"), n=1000))
r_sample_factor(x = c("B", "W"), prob = c(.7, .3), n = 25)
}
\seealso{
-\code{\link[base]{sample}}
+\code{\link[base:sample]{base::sample()}}
}
diff --git a/man/r_sample_integer.Rd b/man/r_sample_integer.Rd
index eda09b4..070c452 100644
--- a/man/r_sample_integer.Rd
+++ b/man/r_sample_integer.Rd
@@ -31,5 +31,5 @@ r_sample_integer(x = c("B", "W"), prob = c(.7, .3), n = 25, name = "Race")
r_sample_integer(25, x = c(TRUE, FALSE))
}
\seealso{
-\code{\link[base]{sample}}
+\code{\link[base:sample]{base::sample()}}
}
diff --git a/man/r_sample_logical.Rd b/man/r_sample_logical.Rd
index bf9aa47..5c0c567 100644
--- a/man/r_sample_logical.Rd
+++ b/man/r_sample_logical.Rd
@@ -28,5 +28,5 @@ table(r_sample_logical(1000))
c("B", "W")[r_sample_logical(10)]
}
\seealso{
-\code{\link[base]{sample}}
+\code{\link[base:sample]{base::sample()}}
}
diff --git a/man/r_sample_ordered.Rd b/man/r_sample_ordered.Rd
index 2371b96..69f24ab 100644
--- a/man/r_sample_ordered.Rd
+++ b/man/r_sample_ordered.Rd
@@ -36,8 +36,8 @@ slices <- c(table(out))
pie(slices, main="Pie Chart of Colors", col = tolower(names(slices)))
}
\seealso{
-\code{\link[base]{sample}},
-\code{\link[base]{ordered}}
+\code{\link[base:sample]{base::sample()}},
+\code{\link[base:factor]{base::ordered()}}
}
\keyword{factor}
\keyword{ordered}
diff --git a/man/r_sample_replace.Rd b/man/r_sample_replace.Rd
index dea82b9..a7bb27e 100644
--- a/man/r_sample_replace.Rd
+++ b/man/r_sample_replace.Rd
@@ -34,5 +34,5 @@ r_sample(x = c("B", "W"), prob = c(.7, .3), n = 25, name = "Race")
r_sample(25, x = c(TRUE, FALSE))
}
\seealso{
-\code{\link[base]{sample}}
+\code{\link[base:sample]{base::sample()}}
}
diff --git a/man/r_series.Rd b/man/r_series.Rd
index c0d9be7..a1740b2 100644
--- a/man/r_series.Rd
+++ b/man/r_series.Rd
@@ -18,22 +18,22 @@ integer.}
\item{relate}{Allows the user to specify the relationship between columns.
May be a named list of \code{c("operation", "mean", "sd")} or a string of
-the form of "fM_sd" where `f` is one of (+, -, *, /), `M` is a mean value, and
-`sd` is a standard deviation of the mean value (e.g., \code{"*4_1"}). See
-\code{\link[wakefield]{relate}} for details.}
+the form of "fM_sd" where \code{f} is one of (+, -, *, /), \code{M} is a mean value, and
+\code{sd} is a standard deviation of the mean value (e.g., \code{"*4_1"}). See
+\code{\link[=relate]{relate()}} for details.}
\item{rep.sep}{A separator to use for repeated variable names. For example
-if the \code{\link[wakefield]{age}} is used three times
+if the \code{\link[=age]{age()}} is used three times
(\code{r_data_frame(age, age, age)}), the name "Age" will be assigned to all
three columns. The results in column names \code{c("Age_1", "Age_2", "Age_3")}.}
\item{\ldots}{Additional arguments passed to \code{fun}.}
}
\value{
-Returns a \code{\link[dplyr]{tbl_df}}.
+Returns a \code{\link[dplyr:tbl_df]{dplyr::tbl_df()}}.
}
\description{
-Produce a \code{\link[dplyr]{tbl_df}} data frame of repeated measures from a
+Produce a \code{\link[dplyr:tbl_df]{dplyr::tbl_df()}} data frame of repeated measures from a
wakefield variable function.
}
\examples{
@@ -96,7 +96,7 @@ ggplot(dat, aes(x = Time, y = values, color = ID, group = ID)) +
\url{https://github.com/trinker/wakefield/issues/1/#issuecomment-96166910}
}
\seealso{
-\code{\link[wakefield]{r_list}},
-\code{\link[wakefield]{r_data_frame}}
-\code{\link[wakefield]{r_dummy}}
+\code{\link[=r_list]{r_list()}},
+\code{\link[=r_data_frame]{r_data_frame()}}
+\code{\link[=r_dummy]{r_dummy()}}
}
diff --git a/man/race.Rd b/man/race.Rd
index 38e0c7f..21b2f93 100644
--- a/man/race.Rd
+++ b/man/race.Rd
@@ -35,15 +35,15 @@ The races and probabilities used match approximate U.S. racial
make-up. The default make up is:
\tabular{lr}{
- \bold{Race} \tab \bold{Percent}\cr
- White \tab 63.70 \%\cr
- Hispanic \tab 16.30 \%\cr
- Black \tab 12.20 \%\cr
- Asian \tab 4.70 \%\cr
- Bi-Racial \tab 1.90 \%\cr
- Native \tab .70 \%\cr
- Other \tab .20 \%\cr
- Hawaiian \tab .15 \%\cr
+\strong{Race} \tab \strong{Percent}\cr
+White \tab 63.70 \%\cr
+Hispanic \tab 16.30 \%\cr
+Black \tab 12.20 \%\cr
+Asian \tab 4.70 \%\cr
+Bi-Racial \tab 1.90 \%\cr
+Native \tab .70 \%\cr
+Other \tab .20 \%\cr
+Hawaiian \tab .15 \%\cr
}
}
\examples{
@@ -59,7 +59,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/relate.Rd b/man/relate.Rd
index 4f57b2d..731ae03 100644
--- a/man/relate.Rd
+++ b/man/relate.Rd
@@ -32,10 +32,10 @@ by.}
\item{sd}{The amount of variability to allow in \code{mean}. Setting to 0
will constrain the operation between x_(n - 1) column and x_n to be exactly
-the mean value (see \bold{Examples} for a demonstration).}
+the mean value (see \strong{Examples} for a demonstration).}
\item{rep.sep}{A separator to use for repeated variable names. For example
-if the \code{\link[wakefield]{age}} is used three times
+if the \code{\link[=age]{age()}} is used three times
(\code{r_data_frame(age, age, age)}), the name "Age" will be assigned to all
three columns. The results in column names \code{c("Age_1", "Age_2", "Age_3")}.}
@@ -43,7 +43,7 @@ three columns. The results in column names \code{c("Age_1", "Age_2", "Age_3")}.
of significant digits in \code{x}.}
}
\value{
-Returns a \code{\link[dplyr]{tbl_df}}.
+Returns a \code{\link[dplyr:tbl_df]{dplyr::tbl_df()}}.
}
\description{
Generate columns that are related.
@@ -71,7 +71,7 @@ relate(time_stamp(10), 6)
relate(rep(100, 10), 6, "Reaction", "-")
}
\seealso{
-\code{\link[wakefield]{r_series}}
+\code{\link[=r_series]{r_series()}}
}
\keyword{correlate}
\keyword{related}
diff --git a/man/religion.Rd b/man/religion.Rd
index 30c09c5..b966149 100644
--- a/man/religion.Rd
+++ b/man/religion.Rd
@@ -31,19 +31,19 @@ Generate a random vector of religion.
}
\details{
The religion and probabilities used match approximate world
-religion make-up (from \href{https://www.pewforum.org/}{Pew Research Center}).
+religion make-up (from \href{https://www.pewforum.org/}{Pew Research Center}).
The default make up is:
\tabular{lrr}{
- \bold{ Religion} \tab \bold{N} \tab \bold{Percent} \cr
- Christian \tab 2,173,260,000 \tab 31.48 \%\cr
- Muslim \tab 1,599,280,000 \tab 23.16 \%\cr
- None \tab 1,127,000,000 \tab 16.32 \%\cr
- Hindu \tab 1,034,620,000 \tab 14.99 \%\cr
- Buddhist \tab 489,030,000 \tab 7.08 \% \cr
- Folk \tab 406,140,000 \tab 5.88 \% \cr
- Other \tab 59,330,000 \tab .86 \% \cr
- Jewish \tab 15,670,000 \tab .23 \% \cr
+** Religion** \tab \strong{N} \tab \strong{Percent} \cr
+Christian \tab 2,173,260,000 \tab 31.48 \%\cr
+Muslim \tab 1,599,280,000 \tab 23.16 \%\cr
+None \tab 1,127,000,000 \tab 16.32 \%\cr
+Hindu \tab 1,034,620,000 \tab 14.99 \%\cr
+Buddhist \tab 489,030,000 \tab 7.08 \% \cr
+Folk \tab 406,140,000 \tab 5.88 \% \cr
+Other \tab 59,330,000 \tab .86 \% \cr
+Jewish \tab 15,670,000 \tab .23 \% \cr
}
}
\examples{
@@ -63,7 +63,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/sat.Rd b/man/sat.Rd
index 0e4f525..f3eda08 100644
--- a/man/sat.Rd
+++ b/man/sat.Rd
@@ -21,7 +21,7 @@ replaced with \code{min}.}
be replaced with \code{max}.}
\item{digits}{Integer indicating the number of decimal places to be used.
-Negative values are allowed (see \code{\link[base]{round}}).}
+Negative values are allowed (see \code{\link[base:Round]{base::round()}}).}
\item{name}{The name to assign to the output vector's \code{varname}
attribute. This is used to auto assign names to the column/vector name when
@@ -48,7 +48,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/second.Rd b/man/second.Rd
index 22f652f..da17a66 100644
--- a/man/second.Rd
+++ b/man/second.Rd
@@ -39,7 +39,7 @@ second(20, random=TRUE)
pie(table(second(2000, x = seq(0, 59, by = 10)/3600, prob = probs(6))))
}
\seealso{
-\code{\link[chron]{times}}
+\code{\link[chron:dates]{chron::times()}}
}
\keyword{second}
\keyword{time}
diff --git a/man/sentence.Rd b/man/sentence.Rd
index 072b657..4f91fa2 100644
--- a/man/sentence.Rd
+++ b/man/sentence.Rd
@@ -28,7 +28,7 @@ Returns a random character vector of sentence elements.
}
\description{
Generate a random vector of sentences from the
-\code{\link[wakefield]{presidential_debates_2012}}.
+\code{\link[=presidential_debates_2012]{presidential_debates_2012()}}.
}
\examples{
sentence(10)
@@ -42,7 +42,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/seriesname.Rd b/man/seriesname.Rd
index f6cb465..4fed07b 100644
--- a/man/seriesname.Rd
+++ b/man/seriesname.Rd
@@ -7,18 +7,18 @@
seriesname(x, name)
}
\arguments{
-\item{x}{A \code{\link[base]{data.frame}} to add a \code{seriesname}
+\item{x}{A \code{\link[base:data.frame]{base::data.frame()}} to add a \code{seriesname}
attribute (i.e., \code{attributes(x)[["seriesname"]]})}
\item{name}{A name to assign to \code{attributes(x)[["seriesname"]]}.}
}
\value{
-Returns a \code{\link[base]{data.frame}} with a
+Returns a \code{\link[base:data.frame]{base::data.frame()}} with a
\code{attributes(x)[["seriesname"]]} assigned.
}
\description{
Adds \code{attributes(x)[["seriesname"]]} attribute to a
-\code{\link[base]{data.frame}}.
+\code{\link[base:data.frame]{base::data.frame()}}.
}
\examples{
seriesname(mtcars, "Cars")
diff --git a/man/sex.Rd b/man/sex.Rd
index d75d454..55c842e 100644
--- a/man/sex.Rd
+++ b/man/sex.Rd
@@ -42,9 +42,9 @@ The genders and probabilities used match approximate gender
make-up:
\tabular{lr}{
- \bold{Gender} \tab \bold{Percent}\cr
- Male \tab 51.22 \%\cr
- Female \tab 48.78 \%\cr
+\bold{Gender} \tab \bold{Percent}\cr
+Male \tab 51.22 \%\cr
+Female \tab 48.78 \%\cr
}
}
\examples{
@@ -60,7 +60,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/sex_inclusive.Rd b/man/sex_inclusive.Rd
index f51d8ab..29590b1 100644
--- a/man/sex_inclusive.Rd
+++ b/man/sex_inclusive.Rd
@@ -45,10 +45,10 @@ The genders and probabilities used match approximate gender
make-up:
\tabular{lr}{
- \bold{Gender} \tab \bold{Percent}\cr
- Male \tab 51.07 \%\cr
- Female \tab 48.63 \%\cr
- Trans* \tab 0.30 \%\cr
+\bold{Gender} \tab \bold{Percent}\cr
+Male \tab 51.07 \%\cr
+Female \tab 48.63 \%\cr
+Trans* \tab 0.30 \%\cr
}
}
\examples{
@@ -67,7 +67,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
@@ -110,7 +110,7 @@ Other variable functions:
\code{\link{zip_code}()}
}
\author{
-Matthew Sigal
+Matthew Sigal \href{mailto:msigal@yorku.ca}{msigal@yorku.ca}
}
\concept{variable functions}
\keyword{gender}
diff --git a/man/smokes.Rd b/man/smokes.Rd
index d109920..e1656a8 100644
--- a/man/smokes.Rd
+++ b/man/smokes.Rd
@@ -38,7 +38,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/speed.Rd b/man/speed.Rd
index 6b9966a..e684956 100644
--- a/man/speed.Rd
+++ b/man/speed.Rd
@@ -43,7 +43,7 @@ replaced with \code{min}.}
be replaced with \code{max}.}
\item{digits}{Integer indicating the number of decimal places to be used.
-Negative values are allowed (see \code{\link[base]{round}}).}
+Negative values are allowed (see \code{\link[base:Round]{base::round()}}).}
\item{name}{The name to assign to the output vector's \code{varname}
attribute. This is used to auto assign names to the column/vector name when
@@ -76,7 +76,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/state.Rd b/man/state.Rd
index 0af3910..e3ce1a9 100644
--- a/man/state.Rd
+++ b/man/state.Rd
@@ -32,57 +32,57 @@ Generate a random factor vector of states.
\details{
The state populations and probabilities:
\tabular{lrr}{
- \bold{ State} \tab \bold{Population} \tab \bold{Percent} \cr
- California \tab 37,253,956 \tab 12.09 \%\cr
- Texas \tab 25,145,561 \tab 8.16 \% \cr
- New York \tab 19,378,102 \tab 6.29 \% \cr
- Florida \tab 18,801,310 \tab 6.10 \% \cr
- Illinois \tab 12,830,632 \tab 4.16 \% \cr
- Pennsylvania \tab 12,702,379 \tab 4.12 \% \cr
- Ohio \tab 11,536,504 \tab 3.74 \% \cr
- Michigan \tab 9,883,640 \tab 3.21 \% \cr
- Georgia \tab 9,687,653 \tab 3.14 \% \cr
- North Carolina \tab 9,535,483 \tab 3.09 \% \cr
- New Jersey \tab 8,791,894 \tab 2.85 \% \cr
- Virginia \tab 8,001,024 \tab 2.60 \% \cr
- Washington \tab 6,724,540 \tab 2.18 \% \cr
- Massachusetts \tab 6,547,629 \tab 2.12 \% \cr
- Indiana \tab 6,483,802 \tab 2.10 \% \cr
- Arizona \tab 6,392,017 \tab 2.07 \% \cr
- Tennessee \tab 6,346,105 \tab 2.06 \% \cr
- Missouri \tab 5,988,927 \tab 1.94 \% \cr
- Maryland \tab 5,773,552 \tab 1.87 \% \cr
- Wisconsin \tab 5,686,986 \tab 1.85 \% \cr
- Minnesota \tab 5,303,925 \tab 1.72 \% \cr
- Colorado \tab 5,029,196 \tab 1.63 \% \cr
- Alabama \tab 4,779,736 \tab 1.55 \% \cr
- South Carolina \tab 4,625,364 \tab 1.50 \% \cr
- Louisiana \tab 4,533,372 \tab 1.47 \% \cr
- Kentucky \tab 4,339,367 \tab 1.41 \% \cr
- Oregon \tab 3,831,074 \tab 1.24 \% \cr
- Oklahoma \tab 3,751,351 \tab 1.22 \% \cr
- Connecticut \tab 3,574,097 \tab 1.16 \% \cr
- Iowa \tab 3,046,355 \tab .99 \% \cr
- Mississippi \tab 2,967,297 \tab .96 \% \cr
- Arkansas \tab 2,915,918 \tab .95 \% \cr
- Kansas \tab 2,853,118 \tab .93 \% \cr
- Utah \tab 2,763,885 \tab .90 \% \cr
- Nevada \tab 2,700,551 \tab .88 \% \cr
- New Mexico \tab 2,059,179 \tab .67 \% \cr
- West Virginia \tab 1,852,994 \tab .60 \% \cr
- Nebraska \tab 1,826,341 \tab .59 \% \cr
- Idaho \tab 1,567,582 \tab .51 \% \cr
- Hawaii \tab 1,360,301 \tab .44 \% \cr
- Maine \tab 1,328,361 \tab .43 \% \cr
- New Hampshire \tab 1,316,470 \tab .43 \% \cr
- Rhode Island \tab 1,052,567 \tab .34 \% \cr
- Montana \tab 989,415 \tab .32 \% \cr
- Delaware \tab 897,934 \tab .29 \% \cr
- South Dakota \tab 814,180 \tab .26 \% \cr
- Alaska \tab 710,231 \tab .23 \% \cr
- North Dakota \tab 672,591 \tab .22 \% \cr
- Vermont \tab 625,741 \tab .20 \% \cr
- Wyoming \tab 563,626 \tab .18 \% \cr
+\bold{ State} \tab \bold{Population} \tab \bold{Percent} \cr
+California \tab 37,253,956 \tab 12.09 \%\cr
+Texas \tab 25,145,561 \tab 8.16 \% \cr
+New York \tab 19,378,102 \tab 6.29 \% \cr
+Florida \tab 18,801,310 \tab 6.10 \% \cr
+Illinois \tab 12,830,632 \tab 4.16 \% \cr
+Pennsylvania \tab 12,702,379 \tab 4.12 \% \cr
+Ohio \tab 11,536,504 \tab 3.74 \% \cr
+Michigan \tab 9,883,640 \tab 3.21 \% \cr
+Georgia \tab 9,687,653 \tab 3.14 \% \cr
+North Carolina \tab 9,535,483 \tab 3.09 \% \cr
+New Jersey \tab 8,791,894 \tab 2.85 \% \cr
+Virginia \tab 8,001,024 \tab 2.60 \% \cr
+Washington \tab 6,724,540 \tab 2.18 \% \cr
+Massachusetts \tab 6,547,629 \tab 2.12 \% \cr
+Indiana \tab 6,483,802 \tab 2.10 \% \cr
+Arizona \tab 6,392,017 \tab 2.07 \% \cr
+Tennessee \tab 6,346,105 \tab 2.06 \% \cr
+Missouri \tab 5,988,927 \tab 1.94 \% \cr
+Maryland \tab 5,773,552 \tab 1.87 \% \cr
+Wisconsin \tab 5,686,986 \tab 1.85 \% \cr
+Minnesota \tab 5,303,925 \tab 1.72 \% \cr
+Colorado \tab 5,029,196 \tab 1.63 \% \cr
+Alabama \tab 4,779,736 \tab 1.55 \% \cr
+South Carolina \tab 4,625,364 \tab 1.50 \% \cr
+Louisiana \tab 4,533,372 \tab 1.47 \% \cr
+Kentucky \tab 4,339,367 \tab 1.41 \% \cr
+Oregon \tab 3,831,074 \tab 1.24 \% \cr
+Oklahoma \tab 3,751,351 \tab 1.22 \% \cr
+Connecticut \tab 3,574,097 \tab 1.16 \% \cr
+Iowa \tab 3,046,355 \tab .99 \% \cr
+Mississippi \tab 2,967,297 \tab .96 \% \cr
+Arkansas \tab 2,915,918 \tab .95 \% \cr
+Kansas \tab 2,853,118 \tab .93 \% \cr
+Utah \tab 2,763,885 \tab .90 \% \cr
+Nevada \tab 2,700,551 \tab .88 \% \cr
+New Mexico \tab 2,059,179 \tab .67 \% \cr
+West Virginia \tab 1,852,994 \tab .60 \% \cr
+Nebraska \tab 1,826,341 \tab .59 \% \cr
+Idaho \tab 1,567,582 \tab .51 \% \cr
+Hawaii \tab 1,360,301 \tab .44 \% \cr
+Maine \tab 1,328,361 \tab .43 \% \cr
+New Hampshire \tab 1,316,470 \tab .43 \% \cr
+Rhode Island \tab 1,052,567 \tab .34 \% \cr
+Montana \tab 989,415 \tab .32 \% \cr
+Delaware \tab 897,934 \tab .29 \% \cr
+South Dakota \tab 814,180 \tab .26 \% \cr
+Alaska \tab 710,231 \tab .23 \% \cr
+North Dakota \tab 672,591 \tab .22 \% \cr
+Vermont \tab 625,741 \tab .20 \% \cr
+Wyoming \tab 563,626 \tab .18 \% \cr
}
}
\examples{
@@ -99,7 +99,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/state_populations.Rd b/man/state_populations.Rd
index 942bfd7..56c91af 100644
--- a/man/state_populations.Rd
+++ b/man/state_populations.Rd
@@ -15,9 +15,9 @@ A dataset containing U.S. state populations.
}
\details{
\itemize{
- \item State. The 50 U.S. states.
- \item Population. Population of state.
- \item Proportion. Proportion of total U.S. population.
+\item State. The 50 U.S. states.
+\item Population. Population of state.
+\item Proportion. Proportion of total U.S. population.
}
}
\references{
diff --git a/man/string.Rd b/man/string.Rd
index 7ab983e..37f048a 100644
--- a/man/string.Rd
+++ b/man/string.Rd
@@ -29,7 +29,7 @@ Generate a random vector of strings.
string(10)
}
\seealso{
-\code{\link[stringi]{stri_rand_strings}}
+\code{\link[stringi:stri_rand_strings]{stringi::stri_rand_strings()}}
Other variable functions:
\code{\link{age}()},
@@ -39,7 +39,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/table_heat.Rd b/man/table_heat.Rd
index d054a4d..c26d0b0 100644
--- a/man/table_heat.Rd
+++ b/man/table_heat.Rd
@@ -13,14 +13,14 @@ table_heat(
)
}
\arguments{
-\item{x}{A \code{\link[base]{data.frame}}.}
+\item{x}{A \code{\link[base:data.frame]{base::data.frame()}}.}
-\item{flip}{logical. If \code{TRUE} the \code{\link[base]{data.frame}} is
+\item{flip}{logical. If \code{TRUE} the \code{\link[base:data.frame]{base::data.frame()}} is
flipped so that the columns are on the y axis and observations on the x axis.
This is useful when there are many columns or the column names are longer.}
\item{palette}{A palette to chose from. See
-\code{\link[ggplot2]{scale_fill_brewer}} for more. These choices should
+\code{\link[ggplot2:scale_brewer]{ggplot2::scale_fill_brewer()}} for more. These choices should
exceed the number of unique column types. Use \code{NULL} to use
\pkg{ggplot2}'s default color scheme.}
@@ -29,13 +29,13 @@ document construction such as \pkg{knitr} or \pkg{rmarkdown}.}
\item{sep}{A separator to use between column types. Column types are
determined via \code{sapply(x, class)}. When multiple types are present
-these are collapsed. By default the \code{\\n} is used.}
+these are collapsed. By default \verb{\\n} is used.}
}
\value{
Returns a \pkg{ggplot2} object.
}
\description{
-Generate a heat map of column types from a \code{\link[base]{data.frame}}.
+Generate a heat map of column types from a \code{\link[base:data.frame]{base::data.frame()}}.
}
\details{
By default coumn names retain their order. Column types are ordered
diff --git a/man/time_stamp.Rd b/man/time_stamp.Rd
index b127a95..768023f 100644
--- a/man/time_stamp.Rd
+++ b/man/time_stamp.Rd
@@ -39,6 +39,6 @@ time_stamp(20, random=TRUE)
pie(table(time_stamp(2000, x = seq(0, 23, by = 2), prob = probs(12))))
}
\seealso{
-\code{\link[chron]{times}}
+\code{\link[chron:dates]{chron::times()}}
}
\keyword{time}
diff --git a/man/valid.Rd b/man/valid.Rd
index c692b14..806cce0 100644
--- a/man/valid.Rd
+++ b/man/valid.Rd
@@ -35,7 +35,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/variables.Rd b/man/variables.Rd
index 2f9e9b3..dc3e277 100644
--- a/man/variables.Rd
+++ b/man/variables.Rd
@@ -12,23 +12,23 @@ character vector), \code{"matrix"}, or \code{"list"}; or the user may extract
a specific type from a list using:
\code{"character"}, \code{"date"}, \code{"factor"}, \code{"integer"},
\code{"logical"}, \code{"numeric"}, \code{"ordered factor"}. Setting
-\code{type = TRUE} will also return a \code{\link[base]{list}}.
-The \code{\link[base]{list}} version breaks the variable functions into
+\code{type = TRUE} will also return a \code{\link[base:list]{base::list()}}.
+The \code{\link[base:list]{base::list()}} version breaks the variable functions into
classes. Specifying a specific class (e.g., \code{type = "numeric"} will
list only variable functions that yield a numeric output.}
\item{ncols}{The number of columns to use if \code{type = "matrix"}.}
-\item{\ldots}{Other arguments passed to \code{\link[base]{matrix}}.}
+\item{\ldots}{Other arguments passed to \code{\link[base:matrix]{base::matrix()}}.}
}
\value{
-Returns a \code{\link[base]{character}} vector,
-\code{\link[base]{matrix}} of all variable functions, or a
-\code{\link[base]{list}} of variable functions by type.
+Returns a \code{\link[base:character]{base::character()}} vector,
+\code{\link[base:matrix]{base::matrix()}} of all variable functions, or a
+\code{\link[base:list]{base::list()}} of variable functions by type.
}
\description{
See a listing of all available variable functions for use in
-\code{\link[wakefield]{r_data_frame}} or \code{\link[wakefield]{r_list}}.
+\code{\link[=r_data_frame]{r_data_frame()}} or \code{\link[=r_list]{r_list()}}.
}
\examples{
variables()
diff --git a/man/year.Rd b/man/year.Rd
index 61ae914..fb1cdc2 100644
--- a/man/year.Rd
+++ b/man/year.Rd
@@ -43,7 +43,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/man/zip_code.Rd b/man/zip_code.Rd
index a06b968..f8b71a1 100644
--- a/man/zip_code.Rd
+++ b/man/zip_code.Rd
@@ -39,7 +39,7 @@ Other variable functions:
\code{\link{car}()},
\code{\link{children}()},
\code{\link{coin}()},
-\code{\link{color}},
+\code{\link{color}()},
\code{\link{date_stamp}()},
\code{\link{death}()},
\code{\link{dice}()},
diff --git a/tests/testthat/test-age.R b/tests/testthat/test-age.R
deleted file mode 100644
index b6f44ad..0000000
--- a/tests/testthat/test-age.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking age")
-
-test_that("age ...",{
-
-
-})
-
diff --git a/tests/testthat/test-animal.R b/tests/testthat/test-animal.R
deleted file mode 100644
index 2d96f40..0000000
--- a/tests/testthat/test-animal.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking animal")
-
-test_that("animal ...",{
-
-
-})
-
diff --git a/tests/testthat/test-answer.R b/tests/testthat/test-answer.R
deleted file mode 100644
index 3536898..0000000
--- a/tests/testthat/test-answer.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking answer")
-
-test_that("answer ...",{
-
-
-})
-
diff --git a/tests/testthat/test-area.R b/tests/testthat/test-area.R
deleted file mode 100644
index 6146ab1..0000000
--- a/tests/testthat/test-area.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking area")
-
-test_that("area ...",{
-
-
-})
-
diff --git a/tests/testthat/test-as_integer.R b/tests/testthat/test-as_integer.R
deleted file mode 100644
index 8e04a06..0000000
--- a/tests/testthat/test-as_integer.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking as_integer")
-
-test_that("as_integer ...",{
-
-
-})
-
diff --git a/tests/testthat/test-browser.R b/tests/testthat/test-browser.R
deleted file mode 100644
index f96664c..0000000
--- a/tests/testthat/test-browser.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking browser")
-
-test_that("browser ...",{
-
-
-})
-
diff --git a/tests/testthat/test-car.R b/tests/testthat/test-car.R
deleted file mode 100644
index cf0e7cc..0000000
--- a/tests/testthat/test-car.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking car")
-
-test_that("car ...",{
-
-
-})
-
diff --git a/tests/testthat/test-children.R b/tests/testthat/test-children.R
deleted file mode 100644
index 8a8ac97..0000000
--- a/tests/testthat/test-children.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking children")
-
-test_that("children ...",{
-
-
-})
-
diff --git a/tests/testthat/test-coin.R b/tests/testthat/test-coin.R
deleted file mode 100644
index 3ca7e87..0000000
--- a/tests/testthat/test-coin.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking coin")
-
-test_that("coin ...",{
-
-
-})
-
diff --git a/tests/testthat/test-color.R b/tests/testthat/test-color.R
deleted file mode 100644
index a9d9798..0000000
--- a/tests/testthat/test-color.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking color")
-
-test_that("color ...",{
-
-
-})
-
diff --git a/tests/testthat/test-data_stamp.R b/tests/testthat/test-data_stamp.R
deleted file mode 100644
index cee185d..0000000
--- a/tests/testthat/test-data_stamp.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking data_stamp")
-
-test_that("data_stamp ...",{
-
-
-})
-
diff --git a/tests/testthat/test-death.R b/tests/testthat/test-death.R
deleted file mode 100644
index 6e7c667..0000000
--- a/tests/testthat/test-death.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking death")
-
-test_that("death ...",{
-
-
-})
-
diff --git a/tests/testthat/test-dice.R b/tests/testthat/test-dice.R
deleted file mode 100644
index 5652ff7..0000000
--- a/tests/testthat/test-dice.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking dice")
-
-test_that("dice ...",{
-
-
-})
-
diff --git a/tests/testthat/test-dna.R b/tests/testthat/test-dna.R
deleted file mode 100644
index 3ce04d8..0000000
--- a/tests/testthat/test-dna.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking dna")
-
-test_that("dna ...",{
-
-
-})
-
diff --git a/tests/testthat/test-dob.R b/tests/testthat/test-dob.R
deleted file mode 100644
index fad696f..0000000
--- a/tests/testthat/test-dob.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking dob")
-
-test_that("dob ...",{
-
-
-})
-
diff --git a/tests/testthat/test-dummy.R b/tests/testthat/test-dummy.R
deleted file mode 100644
index 753c663..0000000
--- a/tests/testthat/test-dummy.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking dummy")
-
-test_that("dummy ...",{
-
-
-})
-
diff --git a/tests/testthat/test-education.R b/tests/testthat/test-education.R
deleted file mode 100644
index 4042c90..0000000
--- a/tests/testthat/test-education.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking education")
-
-test_that("education ...",{
-
-
-})
-
diff --git a/tests/testthat/test-employment.R b/tests/testthat/test-employment.R
deleted file mode 100644
index 87b6695..0000000
--- a/tests/testthat/test-employment.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking employment")
-
-test_that("employment ...",{
-
-
-})
-
diff --git a/tests/testthat/test-eye.R b/tests/testthat/test-eye.R
deleted file mode 100644
index 854429d..0000000
--- a/tests/testthat/test-eye.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking eye")
-
-test_that("eye ...",{
-
-
-})
-
diff --git a/tests/testthat/test-grade.R b/tests/testthat/test-grade.R
deleted file mode 100644
index 9516527..0000000
--- a/tests/testthat/test-grade.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking grade")
-
-test_that("grade ...",{
-
-
-})
-
diff --git a/tests/testthat/test-grade_level.R b/tests/testthat/test-grade_level.R
deleted file mode 100644
index a99faff..0000000
--- a/tests/testthat/test-grade_level.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking grade_level")
-
-test_that("grade_level ...",{
-
-
-})
-
diff --git a/tests/testthat/test-group.R b/tests/testthat/test-group.R
deleted file mode 100644
index a5911db..0000000
--- a/tests/testthat/test-group.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking group")
-
-test_that("group ...",{
-
-
-})
-
diff --git a/tests/testthat/test-hair.R b/tests/testthat/test-hair.R
deleted file mode 100644
index 61c4eb2..0000000
--- a/tests/testthat/test-hair.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking hair")
-
-test_that("hair ...",{
-
-
-})
-
diff --git a/tests/testthat/test-height.R b/tests/testthat/test-height.R
deleted file mode 100644
index 7750a37..0000000
--- a/tests/testthat/test-height.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking height")
-
-test_that("height ...",{
-
-
-})
-
diff --git a/tests/testthat/test-hour.R b/tests/testthat/test-hour.R
deleted file mode 100644
index 469e5e2..0000000
--- a/tests/testthat/test-hour.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking hour")
-
-test_that("hour ...",{
-
-
-})
-
diff --git a/tests/testthat/test-id.R b/tests/testthat/test-id.R
deleted file mode 100644
index 5d4c637..0000000
--- a/tests/testthat/test-id.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking id")
-
-test_that("id ...",{
-
-
-})
-
diff --git a/tests/testthat/test-income.R b/tests/testthat/test-income.R
deleted file mode 100644
index e269e66..0000000
--- a/tests/testthat/test-income.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking income")
-
-test_that("income ...",{
-
-
-})
-
diff --git a/tests/testthat/test-interval.R b/tests/testthat/test-interval.R
deleted file mode 100644
index 478fb06..0000000
--- a/tests/testthat/test-interval.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking interval")
-
-test_that("interval ...",{
-
-
-})
-
diff --git a/tests/testthat/test-iq.R b/tests/testthat/test-iq.R
deleted file mode 100644
index 8e0a981..0000000
--- a/tests/testthat/test-iq.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking iq")
-
-test_that("iq ...",{
-
-
-})
-
diff --git a/tests/testthat/test-language.R b/tests/testthat/test-language.R
deleted file mode 100644
index 186e9a3..0000000
--- a/tests/testthat/test-language.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking language")
-
-test_that("language ...",{
-
-
-})
-
diff --git a/tests/testthat/test-level.R b/tests/testthat/test-level.R
deleted file mode 100644
index 0dffc8c..0000000
--- a/tests/testthat/test-level.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking level")
-
-test_that("level ...",{
-
-
-})
-
diff --git a/tests/testthat/test-likert.R b/tests/testthat/test-likert.R
deleted file mode 100644
index 759318b..0000000
--- a/tests/testthat/test-likert.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking likert")
-
-test_that("likert ...",{
-
-
-})
-
diff --git a/tests/testthat/test-lorem_ipsum.R b/tests/testthat/test-lorem_ipsum.R
deleted file mode 100644
index 54b07c3..0000000
--- a/tests/testthat/test-lorem_ipsum.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking lorem_ipsum")
-
-test_that("lorem_ipsum ...",{
-
-
-})
-
diff --git a/tests/testthat/test-marital.R b/tests/testthat/test-marital.R
deleted file mode 100644
index d5ac2c1..0000000
--- a/tests/testthat/test-marital.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking marital")
-
-test_that("marital ...",{
-
-
-})
-
diff --git a/tests/testthat/test-military.R b/tests/testthat/test-military.R
deleted file mode 100644
index 3e0e840..0000000
--- a/tests/testthat/test-military.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking military")
-
-test_that("military ...",{
-
-
-})
-
diff --git a/tests/testthat/test-minute.R b/tests/testthat/test-minute.R
deleted file mode 100644
index 440981f..0000000
--- a/tests/testthat/test-minute.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking minute")
-
-test_that("minute ...",{
-
-
-})
-
diff --git a/tests/testthat/test-month.R b/tests/testthat/test-month.R
deleted file mode 100644
index e8c8cbb..0000000
--- a/tests/testthat/test-month.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking month")
-
-test_that("month ...",{
-
-
-})
-
diff --git a/tests/testthat/test-name.R b/tests/testthat/test-name.R
deleted file mode 100644
index 799d901..0000000
--- a/tests/testthat/test-name.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking name")
-
-test_that("name ...",{
-
-
-})
-
diff --git a/tests/testthat/test-normal.R b/tests/testthat/test-normal.R
deleted file mode 100644
index 92973fe..0000000
--- a/tests/testthat/test-normal.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking normal")
-
-test_that("normal ...",{
-
-
-})
-
diff --git a/tests/testthat/test-peek.R b/tests/testthat/test-peek.R
deleted file mode 100644
index 14984c5..0000000
--- a/tests/testthat/test-peek.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking peek")
-
-test_that("peek ...",{
-
-
-})
-
diff --git a/tests/testthat/test-political.R b/tests/testthat/test-political.R
deleted file mode 100644
index 3f17926..0000000
--- a/tests/testthat/test-political.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking political")
-
-test_that("political ...",{
-
-
-})
-
diff --git a/tests/testthat/test-probs.R b/tests/testthat/test-probs.R
deleted file mode 100644
index 015aab0..0000000
--- a/tests/testthat/test-probs.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking probs")
-
-test_that("probs ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_data.R b/tests/testthat/test-r_data.R
deleted file mode 100644
index 2270d71..0000000
--- a/tests/testthat/test-r_data.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_data")
-
-test_that("r_data ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_data_frame.R b/tests/testthat/test-r_data_frame.R
deleted file mode 100644
index b0a550c..0000000
--- a/tests/testthat/test-r_data_frame.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_data_frame")
-
-test_that("r_data_frame ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_dummy.R b/tests/testthat/test-r_dummy.R
deleted file mode 100644
index ff55413..0000000
--- a/tests/testthat/test-r_dummy.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_dummy")
-
-test_that("r_dummy ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_insert.R b/tests/testthat/test-r_insert.R
deleted file mode 100644
index 2469718..0000000
--- a/tests/testthat/test-r_insert.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_insert")
-
-test_that("r_insert ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_list.R b/tests/testthat/test-r_list.R
index 6b620f2..a546da8 100644
--- a/tests/testthat/test-r_list.R
+++ b/tests/testthat/test-r_list.R
@@ -1,7 +1,3 @@
-context("Checking r_list")
-
-test_that("r_list ...",{
-
-
+test_that("r_list can set n of individual functions", {
+ expect_length(r_list(10, age)[[1]], 10)
})
-
diff --git a/tests/testthat/test-r_na.R b/tests/testthat/test-r_na.R
deleted file mode 100644
index 7e8e11e..0000000
--- a/tests/testthat/test-r_na.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_na")
-
-test_that("r_na ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_sample.R b/tests/testthat/test-r_sample.R
deleted file mode 100644
index 1c9e7b4..0000000
--- a/tests/testthat/test-r_sample.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_sample")
-
-test_that("r_sample ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_sample_binary.R b/tests/testthat/test-r_sample_binary.R
deleted file mode 100644
index 4498688..0000000
--- a/tests/testthat/test-r_sample_binary.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_sample_binary")
-
-test_that("r_sample_binary ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_sample_factor.R b/tests/testthat/test-r_sample_factor.R
deleted file mode 100644
index 03b9df1..0000000
--- a/tests/testthat/test-r_sample_factor.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_sample_factor")
-
-test_that("r_sample_factor ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_sample_integer.R b/tests/testthat/test-r_sample_integer.R
deleted file mode 100644
index f6bfa05..0000000
--- a/tests/testthat/test-r_sample_integer.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_sample_integer")
-
-test_that("r_sample_integer ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_sample_logical.R b/tests/testthat/test-r_sample_logical.R
deleted file mode 100644
index c27dc81..0000000
--- a/tests/testthat/test-r_sample_logical.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_sample_logical")
-
-test_that("r_sample_logical ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_sample_ordered.R b/tests/testthat/test-r_sample_ordered.R
deleted file mode 100644
index 5e61d12..0000000
--- a/tests/testthat/test-r_sample_ordered.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_sample_ordered")
-
-test_that("r_sample_ordered ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_sample_replace.R b/tests/testthat/test-r_sample_replace.R
deleted file mode 100644
index 2098b13..0000000
--- a/tests/testthat/test-r_sample_replace.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_sample_replace")
-
-test_that("r_sample_replace ...",{
-
-
-})
-
diff --git a/tests/testthat/test-r_series.R b/tests/testthat/test-r_series.R
deleted file mode 100644
index 2ba452a..0000000
--- a/tests/testthat/test-r_series.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking r_series")
-
-test_that("r_series ...",{
-
-
-})
-
diff --git a/tests/testthat/test-race.R b/tests/testthat/test-race.R
deleted file mode 100644
index e3c62ec..0000000
--- a/tests/testthat/test-race.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking race")
-
-test_that("race ...",{
-
-
-})
-
diff --git a/tests/testthat/test-relate.R b/tests/testthat/test-relate.R
deleted file mode 100644
index 58beaf9..0000000
--- a/tests/testthat/test-relate.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking relate")
-
-test_that("relate ...",{
-
-
-})
-
diff --git a/tests/testthat/test-religion.R b/tests/testthat/test-religion.R
deleted file mode 100644
index 883b1b9..0000000
--- a/tests/testthat/test-religion.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking religion")
-
-test_that("religion ...",{
-
-
-})
-
diff --git a/tests/testthat/test-sat.R b/tests/testthat/test-sat.R
deleted file mode 100644
index adb8e47..0000000
--- a/tests/testthat/test-sat.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking sat")
-
-test_that("sat ...",{
-
-
-})
-
diff --git a/tests/testthat/test-second.R b/tests/testthat/test-second.R
deleted file mode 100644
index ae2302e..0000000
--- a/tests/testthat/test-second.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking second")
-
-test_that("second ...",{
-
-
-})
-
diff --git a/tests/testthat/test-sentence.R b/tests/testthat/test-sentence.R
deleted file mode 100644
index eaf6868..0000000
--- a/tests/testthat/test-sentence.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking sentence")
-
-test_that("sentence ...",{
-
-
-})
-
diff --git a/tests/testthat/test-seriesname.R b/tests/testthat/test-seriesname.R
deleted file mode 100644
index 89fb665..0000000
--- a/tests/testthat/test-seriesname.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking seriesname")
-
-test_that("seriesname ...",{
-
-
-})
-
diff --git a/tests/testthat/test-sex.R b/tests/testthat/test-sex.R
deleted file mode 100644
index ebe7bfc..0000000
--- a/tests/testthat/test-sex.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking sex")
-
-test_that("sex ...",{
-
-
-})
-
diff --git a/tests/testthat/test-sex_inclusive.R b/tests/testthat/test-sex_inclusive.R
deleted file mode 100644
index f8d3640..0000000
--- a/tests/testthat/test-sex_inclusive.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking sex_inclusive")
-
-test_that("sex_inclusive ...",{
-
-
-})
-
diff --git a/tests/testthat/test-smokes.R b/tests/testthat/test-smokes.R
deleted file mode 100644
index 8e2906b..0000000
--- a/tests/testthat/test-smokes.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking smokes")
-
-test_that("smokes ...",{
-
-
-})
-
diff --git a/tests/testthat/test-speed.R b/tests/testthat/test-speed.R
deleted file mode 100644
index c238030..0000000
--- a/tests/testthat/test-speed.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking speed")
-
-test_that("speed ...",{
-
-
-})
-
diff --git a/tests/testthat/test-state.R b/tests/testthat/test-state.R
deleted file mode 100644
index edac133..0000000
--- a/tests/testthat/test-state.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking state")
-
-test_that("state ...",{
-
-
-})
-
diff --git a/tests/testthat/test-string.R b/tests/testthat/test-string.R
deleted file mode 100644
index 9e47a8b..0000000
--- a/tests/testthat/test-string.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking string")
-
-test_that("string ...",{
-
-
-})
-
diff --git a/tests/testthat/test-table_heat.R b/tests/testthat/test-table_heat.R
deleted file mode 100644
index ba3ae60..0000000
--- a/tests/testthat/test-table_heat.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking table_heat")
-
-test_that("table_heat ...",{
-
-
-})
-
diff --git a/tests/testthat/test-time_stamp.R b/tests/testthat/test-time_stamp.R
deleted file mode 100644
index 3225c48..0000000
--- a/tests/testthat/test-time_stamp.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking time_stamp")
-
-test_that("time_stamp ...",{
-
-
-})
-
diff --git a/tests/testthat/test-upper.R b/tests/testthat/test-upper.R
deleted file mode 100644
index 14af9c1..0000000
--- a/tests/testthat/test-upper.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking upper")
-
-test_that("upper ...",{
-
-
-})
-
diff --git a/tests/testthat/test-valid.R b/tests/testthat/test-valid.R
deleted file mode 100644
index 3dcaf67..0000000
--- a/tests/testthat/test-valid.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking valid")
-
-test_that("valid ...",{
-
-
-})
-
diff --git a/tests/testthat/test-variables.R b/tests/testthat/test-variables.R
deleted file mode 100644
index fa19302..0000000
--- a/tests/testthat/test-variables.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking variables")
-
-test_that("variables ...",{
-
-
-})
-
diff --git a/tests/testthat/test-varname.R b/tests/testthat/test-varname.R
deleted file mode 100644
index 4d79304..0000000
--- a/tests/testthat/test-varname.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking varname")
-
-test_that("varname ...",{
-
-
-})
-
diff --git a/tests/testthat/test-year.R b/tests/testthat/test-year.R
deleted file mode 100644
index 7fab7ea..0000000
--- a/tests/testthat/test-year.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking year")
-
-test_that("year ...",{
-
-
-})
-
diff --git a/tests/testthat/test-zip_code.R b/tests/testthat/test-zip_code.R
deleted file mode 100644
index 0ac298c..0000000
--- a/tests/testthat/test-zip_code.R
+++ /dev/null
@@ -1,7 +0,0 @@
-context("Checking zip_code")
-
-test_that("zip_code ...",{
-
-
-})
-
diff --git a/tools/figure/unnamed-chunk-17-1.png b/tools/figure/unnamed-chunk-17-1.png
index f4a75da..5fca9e0 100644
Binary files a/tools/figure/unnamed-chunk-17-1.png and b/tools/figure/unnamed-chunk-17-1.png differ