Skip to content

Commit

Permalink
resubmitting to CRAN
Browse files Browse the repository at this point in the history
* support British spellings #27
* more markdown in Rd
* update news and cran comments
  • Loading branch information
IndrajeetPatil committed Oct 3, 2021
1 parent 5382b33 commit 324bb91
Show file tree
Hide file tree
Showing 13 changed files with 67 additions and 13 deletions.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ S3method(winsorize,logical)
S3method(winsorize,numeric)
export(adjust)
export(center)
export(centre)
export(change_scale)
export(convert_data_to_numeric)
export(data_addprefix)
Expand Down Expand Up @@ -110,6 +111,7 @@ export(reshape_longer)
export(reshape_wider)
export(skewness)
export(smoothness)
export(standardise)
export(standardize)
export(text_concatenate)
export(text_fullstop)
Expand All @@ -118,6 +120,7 @@ export(text_paste)
export(text_remove)
export(text_wrap)
export(to_numeric)
export(unstandardise)
export(unstandardize)
export(visualisation_recipe)
export(winsorize)
8 changes: 6 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# datawizard 0.2.1

- Exports `plot` method for `visualisation_recipe()` objects from `{see}` package.
- Exports `plot` method for `visualisation_recipe()` objects from `{see}`
package.

- `centre()`, `standardise()`, `unstandardise()` are exported as aliases for
`center()`, `standardize()`, `unstandardize()`, respectively.

# datawizard 0.2.0.1

- This is mainly a maintenance release that addresses some issues with
- This is mainly a maintenance release that addresses some issues with
conflicting namespaces.

# datawizard 0.2.0
Expand Down
15 changes: 11 additions & 4 deletions R/center.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@
#' subtracting the mean.
#' @param verbose Toggle warnings and messages.
#' @param weights Can be `NULL` (for no weighting), or:
#' \itemize{
#' \item For data frames: a numeric vector of weights, or a character of the
#' - For data frames: a numeric vector of weights, or a character of the
#' name of a column in the `data.frame` that contains the weights.
#' \item For numeric vectors: a numeric vector of weights.
#' }
#' - For numeric vectors: a numeric vector of weights.
#' @param ... Currently not used.
#'
#' @note
#' **Difference between centering and standardizing**: Standardized variables
#' are computed by subtracting the mean of the variable and then dividing it by
#' the standard deviation, while centering variables involves only the
#' subtraction.
#'
#' @seealso If centering within-clusters (instead of grand-mean centering)
#' is required, see [demean()].
#'
Expand All @@ -43,6 +47,9 @@ center <- function(x, ...) {
UseMethod("center")
}

#' @rdname center
#' @export
centre <- center

#' @rdname center
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/data_rescale.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @param x A numeric variable.
#' @param to New range that the variable will have after rescaling.
#' @param range Initial (old) range of values. If `NULL`, will take the range of
#' the input vector (\code{range(x)}).
#' the input vector (`range(x)`).
#' @param ... Arguments passed to or from other methods.
#'
#' @examples
Expand Down
4 changes: 2 additions & 2 deletions R/data_transpose.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#' Transpose a dataframe
#'
#' Transpose a dataframe. It's the equivalent of using \code{t()} but restores the data.frame class, and prints a warning if the data type is modified (see example).
#' Transpose a dataframe. It's the equivalent of using `t()` but restores the data.frame class, and prints a warning if the data type is modified (see example).
#'
#' @inheritParams data_rename
#' @param verbose Silence warnings and/or messages by setting it to \code{FALSE}.
#' @param verbose Silence warnings and/or messages by setting it to `FALSE`.
#'
#' @examples
#' transposed <- data_transpose(iris)
Expand Down
4 changes: 2 additions & 2 deletions R/demean.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
#' \subsection{Heterogeneity Bias}{
#' Mixed models include different levels of sources of variability, i.e.
#' error terms at each level. When macro-indicators (or level-2 predictors,
#' or higher-level units, or more general: \emph{group-level predictors that
#' **vary** within and across groups}) are included as fixed effects (i.e.
#' or higher-level units, or more general: *group-level predictors that
#' **vary** within and across groups*) are included as fixed effects (i.e.
#' treated as covariate at level-1), the variance that is left unaccounted for
#' this covariate will be absorbed into the error terms of level-1 and level-2
#' (\cite{Bafumi and Gelman 2006; Gelman and Hill 2007, Chapter 12.6.}):
Expand Down
3 changes: 3 additions & 0 deletions R/standardize.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ standardize <- function(x,
UseMethod("standardize")
}

#' @rdname standardize
#' @export
standardise <- standardize

#' @rdname standardize
#' @export
Expand Down
3 changes: 3 additions & 0 deletions R/unstandardize.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ unstandardize <- function(x,
UseMethod("unstandardize")
}

#' @rdname standardize
#' @export
unstandardise <- unstandardize

#' @export
unstandardize.numeric <- function(x,
Expand Down
2 changes: 1 addition & 1 deletion R/visualisation_recipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' layers with data and geoms that can be easily plotted using for instance
#' `ggplot2`. See the documentation for your object's class:
#' \itemize{
#' \item{\link[modelbased:visualisation_recipe.estimate_predicted]{modelbased} (`estimate_means`, `estimate_contrasts`, `estimate_slopes`, `estimate_predicted`, `estimate_grouplevel`)}
#' \item{[modelbased][modelbased::visualisation_recipe.estimate_predicted] (`estimate_means`, `estimate_contrasts`, `estimate_slopes`, `estimate_predicted`, `estimate_grouplevel`)}
#' }
#'
#' @param x An `easystats` object.
Expand Down
4 changes: 4 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
0 errors | 0 warnings | 0 note

* Maintenance release.

## Reverse Dependancies

* No problems detected.
9 changes: 9 additions & 0 deletions man/center.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions man/standardize.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/visualisation_recipe.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 324bb91

Please sign in to comment.