Skip to content

Commit

Permalink
update snapshots, wordlist, lintrs, styler, note
Browse files Browse the repository at this point in the history
  • Loading branch information
rempsyc committed Dec 17, 2024
1 parent 72041f5 commit 835b3bb
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 724 deletions.
7 changes: 3 additions & 4 deletions R/describe_missing.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @details
#' In psychology, it is common to ask participants to answer questionnaires in
#' which people answer several questions about a specific topic. For example,
#' people could answer 10 different questions about how extroversioned they are.
#' people could answer 10 different questions about how extroverted they are.
#' In turn, researchers calculate the average for those 10 questions (called
#' items). These questionnaires are called (e.g., Likert) "scales" (such as the
#' Rosenberg Self-Esteem Scale, also known as the RSES).
Expand All @@ -25,7 +25,7 @@
#' missing more than a single data point").*
#'
#' @param data The data frame to be analyzed.
#' @param vars Variable (or lists of variables) to check for missing values (NAs).
#' @param select Variable (or lists of variables) to check for missing values (NAs).
#' @param scales If you rely on composite scores such as psychological scales
#' or questionnaires, you can provide the shared suffix among those variables
#' (as a character vector). This is useful if the variables you want to check
Expand Down Expand Up @@ -81,7 +81,6 @@
#' )
#' )
#'

describe_missing <- function(data, select = NULL, scales = NULL, ...) {
vars <- select
if (!is.null(vars) && missing(scales)) {
Expand All @@ -90,7 +89,7 @@ describe_missing <- function(data, select = NULL, scales = NULL, ...) {
vars.internal <- lapply(scales, function(x) {
grep(paste0("^", x), names(data), value = TRUE)
})
} else if (is.null(vars) && missing(scales)){
} else if (is.null(vars) && missing(scales)) {
vars <- as.list(names(data))
}
if (!is.null(vars)) {
Expand Down
2 changes: 2 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Heisig
Herrington
Hoffmann
Joanes
Likert
Llabre
Lumley
MADs
Expand All @@ -34,6 +35,7 @@ Minitab
ORCID
PSU
Posteriori
RSES
Ranktransform
Recode
Recoding
Expand Down
6 changes: 3 additions & 3 deletions man/describe_missing.Rd

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

Loading

0 comments on commit 835b3bb

Please sign in to comment.