diff --git a/R/classes.R b/R/classes.R index e33e9af3..fb402b3a 100644 --- a/R/classes.R +++ b/R/classes.R @@ -28,15 +28,9 @@ #' rsi_data <- as.rsi(c(rep("S", 474), rep("I", 36), rep("R", 370))) #' rsi_data <- as.rsi(c(rep("S", 474), rep("I", 36), rep("R", 370), "A", "B", "C")) #' is.rsi(rsi_data) +#' #' plot(rsi_data) # for percentages #' barplot(rsi_data) # for frequencies -#' -#' \donttest{ -#' library(dplyr) -#' tbl %>% -#' mutate_at(vars(ends_with("_rsi")), as.rsi) -#' sapply(mic_data, is.rsi) -#' } as.rsi <- function(x) { if (is.rsi(x)) { x @@ -201,15 +195,9 @@ barplot.rsi <- function(height, ...) { #' @examples #' mic_data <- as.mic(c(">=32", "1.0", "1", "1.00", 8, "<=0.128", "8", "16", "16")) #' is.mic(mic_data) +#' #' plot(mic_data) #' barplot(mic_data) -#' -#' \donttest{ -#' library(dplyr) -#' tbl %>% -#' mutate_at(vars(ends_with("_mic")), as.mic) -#' sapply(mic_data, is.mic) -#' } as.mic <- function(x, na.rm = FALSE) { if (is.mic(x)) { x diff --git a/man/as.mic.Rd b/man/as.mic.Rd index db7bbe9c..4dc1a8cd 100644 --- a/man/as.mic.Rd +++ b/man/as.mic.Rd @@ -23,13 +23,7 @@ This transforms a vector to a new class\code{mic}, which is an ordered factor wi \examples{ mic_data <- as.mic(c(">=32", "1.0", "1", "1.00", 8, "<=0.128", "8", "16", "16")) is.mic(mic_data) + plot(mic_data) barplot(mic_data) - -\donttest{ -library(dplyr) -tbl \%>\% - mutate_at(vars(ends_with("_mic")), as.mic) -sapply(mic_data, is.mic) -} } diff --git a/man/as.rsi.Rd b/man/as.rsi.Rd index 01461007..952ecef4 100644 --- a/man/as.rsi.Rd +++ b/man/as.rsi.Rd @@ -22,13 +22,7 @@ This transforms a vector to a new class \code{rsi}, which is an ordered factor w rsi_data <- as.rsi(c(rep("S", 474), rep("I", 36), rep("R", 370))) rsi_data <- as.rsi(c(rep("S", 474), rep("I", 36), rep("R", 370), "A", "B", "C")) is.rsi(rsi_data) + plot(rsi_data) # for percentages barplot(rsi_data) # for frequencies - -\donttest{ -library(dplyr) -tbl \%>\% - mutate_at(vars(ends_with("_rsi")), as.rsi) -sapply(mic_data, is.rsi) -} }