diff --git a/R/clean_names.R b/R/clean_names.R index 4500b0c2..b8fe3b5f 100644 --- a/R/clean_names.R +++ b/R/clean_names.R @@ -23,9 +23,9 @@ #' which is a character vector mapping all known mu or micro Unicode code points #' (characters) to "u". #' -#' @param dat the input data.frame. +#' @param dat The input `data.frame`. #' @inheritDotParams make_clean_names -string -#' @return Returns the data.frame with clean names. +#' @return A `data.frame` with clean names. #' #' @details `clean_names()` is intended to be used on `data.frames` #' and `data.frame`-like objects. For this reason there are methods to diff --git a/R/excel_dates.R b/R/excel_dates.R index 914e7823..9d56dc34 100644 --- a/R/excel_dates.R +++ b/R/excel_dates.R @@ -1,7 +1,7 @@ -#' @title Convert dates encoded as serial numbers to Date class. +#' Convert dates encoded as serial numbers to Date class. #' -#' @description Converts numbers like `42370` into date values like -#' `2016-01-01`. +#' @description +#' Converts numbers like `42370` into date values like `2016-01-01`. #' #' Defaults to the modern Excel date encoding system. However, Excel for Mac #' 2008 and earlier Mac versions of Excel used a different date system. To @@ -14,11 +14,10 @@ #' current timezone is available from `base::Sys.timezone()`. #' #' If your input data has a mix of Excel numeric dates and actual dates, see the -#' more powerful functions `convert_to_date()` and `convert_to_datetime()`. +#' more powerful functions [convert_to_date()] and `convert_to_datetime()`. #' #' @param date_num numeric vector of serial numbers to convert. -#' @param date_system the date system, either `"modern"` or `"mac -#' pre-2011"`. +#' @param date_system the date system, either `"modern"` or `"mac pre-2011"`. #' @param include_time Include the time (hours, minutes, seconds) in the output? #' (See details) #' @param round_seconds Round the seconds to an integer (only has an effect when diff --git a/R/get_one_to_one.R b/R/get_one_to_one.R index e21bd1aa..6b8d2884 100644 --- a/R/get_one_to_one.R +++ b/R/get_one_to_one.R @@ -1,6 +1,6 @@ #' Find the list of columns that have a 1:1 mapping to each other #' -#' @param dat A data.frame or similar object +#' @param dat A `data.frame` or similar object #' @return A list with one element for each group of columns that map #' identically to each other. #' @export diff --git a/R/statistical_tests.R b/R/statistical_tests.R index 6e8666df..239879d9 100644 --- a/R/statistical_tests.R +++ b/R/statistical_tests.R @@ -7,9 +7,9 @@ #' #' @param x a two-way tabyl, a numeric vector or a factor #' @param ... other parameters passed to [stats::chisq.test()] -#' @return The result is the same as the one of stats::chisq.test. If `tabyl_results` -#' is `TRUE`, the returned tables `observed`, `expected`, `residuals` and `stdres` -#' are converted to tabyls. +#' @return The result is the same as the one of `stats::chisq.test()`. +#' If `tabyl_results` is `TRUE`, the returned tables `observed`, `expected`, +#' `residuals` and `stdres` are converted to tabyls. #' #' @examples #' tab <- tabyl(mtcars, gear, cyl) diff --git a/janitor.Rproj b/janitor.Rproj index eaa6b818..a8cdf15f 100644 --- a/janitor.Rproj +++ b/janitor.Rproj @@ -16,3 +16,5 @@ BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source PackageRoxygenize: rd,collate,namespace + +SpellingDictionary: en_US diff --git a/man/clean_names.Rd b/man/clean_names.Rd index 02abb212..23579ffb 100644 --- a/man/clean_names.Rd +++ b/man/clean_names.Rd @@ -19,7 +19,7 @@ clean_names(dat, ...) \method{clean_names}{tbl_lazy}(dat, ...) } \arguments{ -\item{dat}{the input data.frame.} +\item{dat}{The input \code{data.frame}.} \item{...}{ Arguments passed on to \code{\link[=make_clean_names]{make_clean_names}} @@ -67,7 +67,7 @@ You should use this feature with care in case of \code{case = "parsed"}, \code{c }} } \value{ -Returns the data.frame with clean names. +A \code{data.frame} with clean names. } \description{ Resulting names are unique and consist only of the \verb{_} character, numbers, and letters. @@ -78,7 +78,7 @@ German umlaut over it becomes "o", and the Spanish character "enye" becomes "n". This function takes and returns a data.frame, for ease of piping with -\verb{\\\%>\\\%}. For the underlying function that works on a character vector +\verb{\%>\%}. For the underlying function that works on a character vector of names, see \code{\link[=make_clean_names]{make_clean_names()}}. \code{clean_names} relies on the versatile function \code{\link[snakecase:to_any_case]{snakecase::to_any_case()}}, which accepts many arguments. See that function's documentation for ideas on getting diff --git a/man/excel_numeric_to_date.Rd b/man/excel_numeric_to_date.Rd index 442fef60..22b49409 100644 --- a/man/excel_numeric_to_date.Rd +++ b/man/excel_numeric_to_date.Rd @@ -32,8 +32,7 @@ Returns a vector of class Date if \code{include_time} is \code{TRUE}. } \description{ -Converts numbers like \code{42370} into date values like -\code{2016-01-01}. +Converts numbers like \code{42370} into date values like \code{2016-01-01}. Defaults to the modern Excel date encoding system. However, Excel for Mac 2008 and earlier Mac versions of Excel used a different date system. To @@ -46,7 +45,7 @@ A list of all timezones is available from \code{base::OlsonNames()}, and the current timezone is available from \code{base::Sys.timezone()}. If your input data has a mix of Excel numeric dates and actual dates, see the -more powerful functions \code{convert_to_date()} and \code{convert_to_datetime()}. +more powerful functions \code{\link[=convert_to_date]{convert_to_date()}} and \code{convert_to_datetime()}. } \details{ When using \code{include_time=TRUE}, days with leap seconds will not diff --git a/man/fisher.test.Rd b/man/fisher.test.Rd index d815136c..dd54d990 100644 --- a/man/fisher.test.Rd +++ b/man/fisher.test.Rd @@ -4,7 +4,7 @@ \alias{fisher.test} \alias{fisher.test.default} \alias{fisher.test.tabyl} -\title{Apply stats::fisher.test to a two-way tabyl} +\title{Apply \code{stats::fisher.test()} to a two-way tabyl} \usage{ fisher.test(x, ...) @@ -13,19 +13,19 @@ fisher.test(x, ...) \method{fisher.test}{tabyl}(x, ...) } \arguments{ -\item{x}{a two-way tabyl, a numeric vector or a factor} +\item{x}{A two-way tabyl, a numeric vector or a factor} -\item{...}{other parameters passed to stats::fisher.test} +\item{...}{Parameters passed to \code{\link[stats:fisher.test]{stats::fisher.test()}}} \item{y}{if x is a vector, must be another vector or factor of the same length} } \value{ -The result is the same as the one of stats::fisher.test. +The same as the one of \code{stats::fisher.test()}. } \description{ -This generic function overrides stats::fisher.test. If the passed table -is a two-way tabyl, it runs it through janitor::fisher.test.tabyl, otherwise -it just calls stats::fisher.test. +This generic function overrides \code{\link[stats:fisher.test]{stats::fisher.test()}}. If the passed table +is a two-way tabyl, it runs it through \code{janitor::fisher.test.tabyl}, otherwise +it just calls \code{stats::fisher.test()}. } \examples{ tab <- tabyl(mtcars, gear, cyl) diff --git a/man/get_one_to_one.Rd b/man/get_one_to_one.Rd index 5d013e98..07f4deca 100644 --- a/man/get_one_to_one.Rd +++ b/man/get_one_to_one.Rd @@ -7,7 +7,7 @@ get_one_to_one(dat) } \arguments{ -\item{dat}{A data.frame or similar object} +\item{dat}{A \code{data.frame} or similar object} } \value{ A list with one element for each group of columns that map