Skip to content

Commit

Permalink
Address cran comments; resubmit
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Jun 18, 2021
1 parent c7283b0 commit 2023491
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 691 deletions.
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2021-06-17.
Once it is accepted, delete this file and tag the release (commit 36a1725).
This package was submitted to CRAN on 2021-06-18.
Once it is accepted, delete this file and tag the release (commit c7283b0).
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Description: A lightweight package to easily manipulate, clean,
transform, and prepare your data for analysis. It also forms
the data wrangling backend for the packages in the 'easystats'
ecosystem.
License: GPL-3 | file LICENSE
License: GPL-3
URL: https://easystats.github.io/datawizard/
BugReports: https://github.com/easystats/datawizard/issues
Depends:
Expand Down
674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

7 changes: 7 additions & 0 deletions R/check_multimodal.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
#' Check if a distribution is unimodal or multimodal
#'
#' @details
#'
#' For univariate distributions (one-dimensional vectors), this functions
#' performs a Ameijeiras-Alonso et al. (2018) excess mass test. For multivariate
#' distributions (dataframes), it uses mixture modelling. However, it seems that
#' it always returns a significant result (suggesting that the distribution is
#' multimodal). A better method might be needed here.
#'
#' @return
#'
#' Prints a message describing results from test checking if a distribution is
#' unimodal or multimodal.
#'
#' @param x A numeric vector or a data frame.
#' @param ... Additional arguments passed to the methods.
Expand Down Expand Up @@ -65,6 +71,7 @@ check_multimodal.data.frame <- function(x, ...) {

# Text
text <- "The parametric mixture modelling test suggests that "

if (rez$p < .05) {
text <- paste0(
text,
Expand Down
6 changes: 6 additions & 0 deletions R/data_match.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
#' @param x A data frame.
#' @param to The data frame of which to meet the characteristics.
#'
#' @return
#'
#' A dataframe containing rows that match the specified configuration.
#'
#' @examples
#'
#' matching_rows <- data_match(mtcars, data.frame(vs = 0, am = 1))
#' mtcars[matching_rows, ]
#'
#' matching_rows <- data_match(mtcars, data.frame(vs = 0, am = c(0, 1)))
#' mtcars[matching_rows, ]
#' @export

data_match <- function(x, to) {

# Sanity checks
Expand Down
6 changes: 6 additions & 0 deletions R/data_restoretype.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
#' @param reference A reference data frame from which to find the correct
#' column types.
#'
#' @return
#'
#' A dataframe with columns whose types have been restored based on the
#' reference dataframe.
#'
#' @examples
#' data <- data.frame(
#' Sepal.Length = c("1", "3", "2"),
Expand All @@ -14,6 +19,7 @@
#' fixed <- data_restoretype(data, reference = iris)
#' summary(fixed)
#' @export

data_restoretype <- function(data, reference = NULL) {
for (col in names(data)) {

Expand Down
7 changes: 7 additions & 0 deletions R/reshape_ci.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
#'
#' @param x A data frame containing columns named \code{CI_low} and \code{CI_high}.
#'
#' @return
#'
#' A dataframe with columns corresponding to confidence intervals reshaped
#' either to wide or long format.
#'
#' @examples
#' x <- data.frame(
#' Parameter = c("Term 1", "Term 2", "Term 1", "Term 2"),
Expand All @@ -12,9 +17,11 @@
#' CI_high = c(.5, .6, .8, .85),
#' stringsAsFactors = FALSE
#' )
#'
#' reshape_ci(x)
#' reshape_ci(reshape_ci(x))
#' @export

reshape_ci <- function(x) {


Expand Down
1 change: 1 addition & 0 deletions R/utils_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ data_addsuffix <- function(data, pattern) {

#' help-functions
#' @keywords internal
#' @noRd
.data_frame <- function(...) {
x <- data.frame(..., stringsAsFactors = FALSE)
rownames(x) <- NULL
Expand Down
6 changes: 6 additions & 0 deletions R/winsorize.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#' Winsorize data
#'
#' @details
#'
#' Winsorizing or winsorization is the transformation of statistics by limiting
#' extreme values in the statistical data to reduce the effect of possibly
#' spurious outliers. The distribution of many statistics can be heavily
Expand All @@ -10,6 +12,10 @@
#' percentile. Winsorized estimators are usually more robust to outliers than
#' their more standard forms.
#'
#' @return
#'
#' A dataframe with winsorized columns or a winsorized vector.
#'
#' @param data Dataframe or vector.
#' @param threshold The amount of winsorization.
#' @param verbose Toggle warnings.
Expand Down
3 changes: 1 addition & 2 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ doi
easystats
endogeneity
et
geoms
https
leptokurtic
lme
Expand All @@ -64,8 +63,8 @@ tailedness
th
unstandardize
untransformed
visualisation
wikipedia
winsorization
winsorize
winsorized
wockety
7 changes: 7 additions & 0 deletions man/check_multimodal.Rd

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

4 changes: 4 additions & 0 deletions man/data_match.Rd

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

4 changes: 4 additions & 0 deletions man/data_restoretype.Rd

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

12 changes: 0 additions & 12 deletions man/dot-data_frame.Rd

This file was deleted.

5 changes: 5 additions & 0 deletions man/reshape_ci.Rd

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

6 changes: 6 additions & 0 deletions man/winsorize.Rd

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

0 comments on commit 2023491

Please sign in to comment.