All functions

add_columns() replace_columns() add_id()

Add or replace data frame columns

add_rows() merge_df()

Merge labelled data frames

add_variables() add_case()

Add variables or cases to data frames

all_na()

Check if vector only has NA values

big_mark() prcn()

Format numbers

count_na()

Frequency table of tagged NA values

descr()

Basic descriptive statistics

de_mean()

Compute group-meaned and de-meaned variables

dicho() dicho_if()

Dichotomize variables

efc

Sample dataset from the EUROFAMCARE project

empty_cols() empty_rows() remove_empty_cols() remove_empty_rows()

Return or remove variables or observations that are completely missing

find_var() find_variables()

Find variable by name or label

flat_table()

Flat (proportional) tables

frq()

Frequency table of labelled variables

`%nin%`

Value matching

group_str()

Group near elements of string vectors

group_var() group_var_if() group_labels() group_labels_if()

Recode numeric variables into equal-ranged groups

has_na() incomplete_cases() complete_cases() complete_vars() incomplete_vars()

Check if variables or cases have missing / infinite values

is_crossed() is_nested() is_cross_classified()

Check whether two factors are crossed or nested

is_empty()

Check whether string, list or vector is empty

is_even() is_odd()

Check whether value is even or odd

is_float() is_whole()

Check if a variable is of (non-integer) double type or a whole number

is_num_fac() is_num_chr()

Check whether a factor has numeric levels only

merge_imputations()

Merges multiple imputed data frames into a single data frame

move_columns()

Move columns to other positions in a data frame

numeric_to_factor()

Convert numeric vectors into factors associated value labels

rec() rec_if()

Recode variables

recode_to() recode_to_if()

Recode variable categories into new values

rec_pattern()

Create recode pattern for 'rec' function

ref_lvl()

Change reference level of (numeric) factors

remove_var() remove_cols()

Remove variables from a data frame

replace_na()

Replace NA with specific values

reshape_longer()

Reshape data into long format

rotate_df()

Rotate a data frame

round_num()

Round numeric variables in a data frame

row_count() col_count()

Count row or column indices

row_sums() row_means() total_mean()

Row sums and means for data frames

seq_col() seq_row()

Sequence generation for column or row counts of data frames

set_na_if()

Replace specific values in vector with NA

shorten_string()

Shorten character strings

sjmisc-package

Data and Variable Transformation Functions

split_var() split_var_if()

Split numeric variables into smaller groups

spread_coef()

Spread model coefficients of list-variables into columns

std() std_if() center() center_if()

Standardize and center variables

str_contains()

Check if string contains pattern

str_find()

Find partial matching and close distance elements in strings

str_start() str_end()

Find start and end index of pattern in string

tidy_values()

Tidy values of character vectors.

to_character()

Convert variable into character vector and replace values with associated value labels

to_dummy()

Split (categorical) vectors into dummy variables

to_factor()

Convert variable into factor and keep value labels

to_label()

Convert variable into factor with associated value labels

to_long()

Convert wide data to long format

to_value()

Convert factors to numeric variables

trim()

Trim leading and trailing whitespaces from strings

typical_value()

Return the typical value of a vector

var_rename()

Rename variables

var_type()

Determine variable type

word_wrap()

Insert line breaks in long labels

zap_inf()

Convert infiite or NaN values into regular NA