utilities: Utilities

Description Usage List of utilities Author(s) Examples

Description

A few wrappers to make a common tasks less verbose.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
get_default(string)

clean_text(var)

clean_score(var)

rescale_score(var)

conjunct_string(x, conjunction = "and")

ordered_replace(x, match_by, replacement = NULL)

intranet_link(https)

List of utilities

intranet_link

Converts any http(s) link with a .se domain to a link for a network drive (sharepoint) on windows.

clean_score

Takes vectors representing likert scales and cleans text descriptions. E.g. "10 Very happy" becomes "10", and the value is converted to numeric without warning.

rescale_score

Takes vectors representing 10-point likert scales and transforms them to 100-point scales (numeric). (x-1)*(100/9)

ordered_replace

Replace x with replacement where x matches match_by. Matches and replacements retain the original order of x.

get_default

Get default settings from the reporttool package. x is a search-string which is not case sensitive.

set_missing

Takes a data.frame and cleans the default missing value strings. See defaults.R for these strings.

Author(s)

Kristian D. Olsen

Examples

1
get_default("palette")

itsdalmo/reporttool documentation built on May 18, 2019, 7:11 a.m.