From 26c1a8b0c05328e6902d54e70eb310188b01bf6a Mon Sep 17 00:00:00 2001 From: etiennebacher Date: Tue, 24 Mar 2026 21:36:21 +0100 Subject: [PATCH] init --- R/demean.R | 2 +- R/means_by_group.R | 2 +- R/normalize.R | 2 +- R/reshape_ci.R | 6 +++--- man/demean.Rd | 2 +- man/means_by_group.Rd | 2 +- man/normalize.Rd | 2 +- man/reshape_ci.Rd | 6 +++--- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/R/demean.R b/R/demean.R index 342b41f97..7f02d2419 100644 --- a/R/demean.R +++ b/R/demean.R @@ -258,7 +258,7 @@ #' #' data(iris) #' iris$ID <- sample(1:4, nrow(iris), replace = TRUE) # fake-ID -#' iris$binary <- as.factor(rbinom(150, 1, .35)) # binary variable +#' iris$binary <- as.factor(rbinom(150, 1, 0.35)) # binary variable #' #' x <- demean(iris, select = c("Sepal.Length", "Petal.Length"), by = "ID") #' head(x) diff --git a/R/means_by_group.R b/R/means_by_group.R index cc778c237..62db5ccf3 100644 --- a/R/means_by_group.R +++ b/R/means_by_group.R @@ -38,7 +38,7 @@ #' means_by_group(iris, "Sepal.Width", "Species") #' #' # weighting -#' efc$weight <- abs(rnorm(n = nrow(efc), mean = 1, sd = .5)) +#' efc$weight <- abs(rnorm(n = nrow(efc), mean = 1, sd = 0.5)) #' means_by_group(efc, "c12hour", "e42dep", weights = "weight") #' @export means_by_group <- function(x, ...) { diff --git a/R/normalize.R b/R/normalize.R index 13c6e4ae2..d2bf700ab 100644 --- a/R/normalize.R +++ b/R/normalize.R @@ -36,7 +36,7 @@ #' normalize(c(0, 1, 5, -5, -2)) #' normalize(c(0, 1, 5, -5, -2), include_bounds = FALSE) #' # use a value defining the bounds -#' normalize(c(0, 1, 5, -5, -2), include_bounds = .001) +#' normalize(c(0, 1, 5, -5, -2), include_bounds = 0.001) #' #' head(normalize(trees)) #' diff --git a/R/reshape_ci.R b/R/reshape_ci.R index 9bee5a526..14c7f27c6 100644 --- a/R/reshape_ci.R +++ b/R/reshape_ci.R @@ -19,9 +19,9 @@ #' @examples #' x <- data.frame( #' Parameter = c("Term 1", "Term 2", "Term 1", "Term 2"), -#' CI = c(.8, .8, .9, .9), -#' CI_low = c(.2, .3, .1, .15), -#' CI_high = c(.5, .6, .8, .85), +#' CI = c(0.8, 0.8, 0.9, 0.9), +#' CI_low = c(0.2, 0.3, 0.1, 0.15), +#' CI_high = c(0.5, 0.6, 0.8, 0.85), #' stringsAsFactors = FALSE #' ) #' diff --git a/man/demean.Rd b/man/demean.Rd index ef4d12eee..9dac2a52d 100644 --- a/man/demean.Rd +++ b/man/demean.Rd @@ -291,7 +291,7 @@ into R using \code{lmer()} from \strong{lme4} can be found in data(iris) iris$ID <- sample(1:4, nrow(iris), replace = TRUE) # fake-ID -iris$binary <- as.factor(rbinom(150, 1, .35)) # binary variable +iris$binary <- as.factor(rbinom(150, 1, 0.35)) # binary variable x <- demean(iris, select = c("Sepal.Length", "Petal.Length"), by = "ID") head(x) diff --git a/man/means_by_group.Rd b/man/means_by_group.Rd index 0c0ae0624..fcb84a7a9 100644 --- a/man/means_by_group.Rd +++ b/man/means_by_group.Rd @@ -127,6 +127,6 @@ data(iris) means_by_group(iris, "Sepal.Width", "Species") # weighting -efc$weight <- abs(rnorm(n = nrow(efc), mean = 1, sd = .5)) +efc$weight <- abs(rnorm(n = nrow(efc), mean = 1, sd = 0.5)) means_by_group(efc, "c12hour", "e42dep", weights = "weight") } diff --git a/man/normalize.Rd b/man/normalize.Rd index c8e14e850..579df47ba 100644 --- a/man/normalize.Rd +++ b/man/normalize.Rd @@ -164,7 +164,7 @@ from the input data frame. normalize(c(0, 1, 5, -5, -2)) normalize(c(0, 1, 5, -5, -2), include_bounds = FALSE) # use a value defining the bounds -normalize(c(0, 1, 5, -5, -2), include_bounds = .001) +normalize(c(0, 1, 5, -5, -2), include_bounds = 0.001) head(normalize(trees)) diff --git a/man/reshape_ci.Rd b/man/reshape_ci.Rd index a245a5833..97a33b717 100644 --- a/man/reshape_ci.Rd +++ b/man/reshape_ci.Rd @@ -27,9 +27,9 @@ Reshape CI between wide/long formats. \examples{ x <- data.frame( Parameter = c("Term 1", "Term 2", "Term 1", "Term 2"), - CI = c(.8, .8, .9, .9), - CI_low = c(.2, .3, .1, .15), - CI_high = c(.5, .6, .8, .85), + CI = c(0.8, 0.8, 0.9, 0.9), + CI_low = c(0.2, 0.3, 0.1, 0.15), + CI_high = c(0.5, 0.6, 0.8, 0.85), stringsAsFactors = FALSE )