Learn R Programming

⚠️There's a newer version (1.73) of this package.Take me there.

kutils (version 0.93)

Project Management Tools

Description

Tools for data importation, recoding, and inspection that are used at the University of Kansas Center for Research Methods and Data Analysis. There are functions to create new project folders, R code templates, create uniquely named output directories, and to quickly obtain a visual summary for each variable in a data frame. The main feature here is the systematic implementation of the "variable key" framework for data importation and recoding. We are eager to have community feedback about the variable key and the vignette about it.

Copy Link

Version

Install

install.packages('kutils')

Monthly Downloads

13,877

Version

0.93

License

GPL-2

Maintainer

Paul Johnson

Last Published

January 26th, 2017

Functions in kutils (0.93)

compareCFA

compareCFA
assignMissing

Scrub a variable's missings away
deleteBogusColumns

Remove columns in which the proportion of missing data exceeds
colnamesReplace

Replace column names with new names from a named vector
assignRecode

A variable is transformed in an indicated way
keyApply

Apply variable key to data frame (generate recoded data frame)
dev.create

Create a graphics device
detectNested

Discern nesting pattern of SEM coefficients
keyDiagnostic

Diagnose accuracy of result from applying variable key to data
initProject

Create project directories, initialize a git repo, create README.md
dir.create.unique

Create a uniquely named directory. Appends number & optionally date to directory
is.data.frame.simple

Check if a data frame is a simple collection of columns (no lists
dts

Delete trailing slash
dms

Delete multiple slashes, replace with one
escape

Text that is to be included as content in documents is cleaned
natlongsurv

Smoking, Happiness, and other survey responses
makeKeylist

Convert the variable key into a keylist structure for use in
long2wide

convert a key object from long to wide format
likert

Percentage tables for Likert Scale variables
keyUpdate

Update a key in light of a new data frame (add variables and
keyDiff

Compares a key provided to keyUpdate with the return of keyUpdate
n2NA

Convert nothing to R missing(NA).
keyTemplate

Create variable key template
keyImport

Import a file and clean up for use as variable key
mgsub

apply a vector of replacements, one after the other.
reverse

Reverse the levels in a factor
removeMatches

Remove elements if they are in a target vector, possibly replacing with NA
safeInteger

If a numeric variable has only integer values, then
padW0

Insert 0's in the front of existing digits or characters so that
peek

Show variables, one column at a time.
smartSave

save file after deducing type from suffix
starsig

How many stars would we need for this p value?
shorten

Reduce each in a vector of strings to a given length
print.keyDiagnostic

Print the "changes" component of a keyDiagnostic object
smartRead

read file after deducing file type from suffix.
truncsmart

Cuts a string at a specified linewidth, trying to align cut with a
stringbreak

Insert "\n" after the k'th character in a string. This IS vectorized,
wide2long

Convert a key object from wide to long format
updatePackages

Update packages, spot new dependencies, and install them
zapspace

Convert leading or trailing white space and tab characters to nothing.
cfaTable

Creates Confirmatory Factor Analysis Tables
alphaOnly

Keep only alpha-numeric symbols
checkValues

Compare observed values with the values listed
deleteBogusRows

Remove rows in which the proportion of missing data exceeds
cleanDataFrame

Check and Clean data.frame for usage with variable key functions