Package: kutils 1.73

kutils: Project Management Tools

Tools for data importation, recoding, and inspection. 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. In version 1.7, the function 'semTable' is removed. It was deprecated since 1.67. That is provided in a separate package, 'semTable'.

Authors:Paul Johnson [aut, cre], Benjamin Kite [aut], Charles Redmon [aut], Jared Harpole [ctb], Kenna Whitley [ctb], Po-Yi Chen [ctb], Shadi Pirhosseinloo [ctb]

kutils_1.73.tar.gz
kutils_1.73.zip(r-4.5)kutils_1.73.zip(r-4.4)kutils_1.73.zip(r-4.3)
kutils_1.73.tgz(r-4.4-any)kutils_1.73.tgz(r-4.3-any)
kutils_1.73.tar.gz(r-4.5-noble)kutils_1.73.tar.gz(r-4.4-noble)
kutils_1.73.tgz(r-4.4-emscripten)kutils_1.73.tgz(r-4.3-emscripten)
kutils.pdf |kutils.html
kutils/json (API)

# Install 'kutils' in R:
install.packages('kutils', repos = c('https://pauljohn32.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Datasets:
  • natlongsurv - Smoking, Happiness, and other survey responses

On CRAN:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

53 exports 3.21 score 8 dependencies 20 dependents 109 scripts 7.9k downloads

Last updated 1 years agofrom:cec4bcd983. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 11 2024
R-4.5-winNOTESep 11 2024
R-4.5-linuxNOTESep 11 2024
R-4.4-winNOTESep 11 2024
R-4.4-macNOTESep 11 2024
R-4.3-winNOTESep 11 2024
R-4.3-macNOTESep 11 2024

Exports:alphaOnlyassignMissingassignRecodecheckCoercioncleanDataFramecolnamesReplacededuperdeleteBogusColumnsdeleteBogusRowsdev.createdir.create.uniquedmsdtsescapefile.backupimportQualtricsinitProjectis.data.frame.simpleisNAkeyApplykeyCheckkeyDiffkeyImportkeyLookupkeyReadkeySavekeysPoolkeysPoolCheckkeyTemplatekeyTemplateSPSSkeyTemplateStatakeyUpdatelikertlong2widemergeCheckmgsubmodifyVectorn2NApadW0peekqualtricsBlockStackremoveMatchesreversesafeIntegershortenstarsigstringbreaktruncsmartupdatePackagesvarlabTemplatewide2longwriteCSVzapspace

Dependencies:foreignopenxlsxplyrRcppRUnitstringixtablezip

variablekey

Rendered fromvariablekey.Rnwusingutils::Sweaveon Sep 11 2024.

Last update: 2023-09-17
Started: 2016-12-22

Readme and manuals

Help Manual

Help pageTopics
An all.equal method for variable wide keysall.equal.key
An all.equal method for variable long keysall.equal.keylong
Keep only alpha-numeric symbolsalphaOnly
Create unique anonymous id valuesanonomize
Set missing valuesassignMissing
A variable is transformed in an indicated wayassignRecode
Check if values can be safely coerced without introduction of missing valuescheckCoercion
Replace column names with new names from a named vectorcolnamesReplace
Removes redundant words from beginnings of character stringsdeduper
Remove columns in which the proportion of missing data exceeds a threshold.deleteBogusColumns
Remove rows in which the proportion of missing data exceeds a threshold.deleteBogusRows
Create a graphics devicedev.create
Create a uniquely named directory. Appends number & optionally date to directory name.dir.create.unique
Delete multiple slashes, replace with onedms
Delete trailing slashdts
Text that is to be included as content in documents is cleaned (escaped) to prevent errorsescape
Create a backup version of a file by renaming it.file.backup
Import Qualtrics survey files, apply clean column namesimportQualtrics
Create project directories, initialize a git repo, create README.md ChangeLog, and R template file in R directoryinitProject
Check if a data frame is a simple collection of columns (no lists or matrices within)is.data.frame.simple
Check if values are R NA symbol or any one of the na.strings elementsisNA
Apply variable key to data frame (generate recoded data frame)keyApply
Check a key for consistency of names, values with classes.keyCheck
keyCrossRefkeyCrossRef
Diagnose accuracy of result from applying variable key to datakeyDiagnostic
Show difference between 2 keyskeyDiff
Import/validate a key object or import/validate a key from a file.keyImport
Look for old (or new) names in variable keykeyLookup
Read file after deducing file type from suffix.keyRead
Save key as file after deducing type from suffixkeySave
Homogenize class values and create a long key by pooling variable keys.keysPool
Compares keys from different data sets; finds differences classes of variables. This used to check for similarity of keys from various data sets, one precursor to either combining the keys or merging the data sets themselves.keysPoolCheck
Create variable key template (in memory or in a file)keyTemplate
Import an SPSS file, create a key representing the numeric -> factor transitionkeyTemplateSPSS
Import a Stata (version 12 or lower) file, create a key representing the numeric -> factor transitionkeyTemplateStata
Update a key in light of a new data frame (add variables and values)keyUpdate
Percentage tables for Likert Scale variableslikert
convert a key object from long to wide formatlong2wide
First draft of function to diagnose problems in merges and key variablesmergeCheck
apply a vector of replacements, one after the other.mgsub
Use new information to update a vector. Similar in concept to R's modify listmodifyVector
Convert nothing to R missing(NA).n2NA
Smoking, Happiness, and other survey responsesnatlongsurv
Insert 0's in the front of existing digits or characters so that all elements of a vector have the same number of characters.padW0
Show variables, one at a time, QUICKLY and EASILY.histOMatic peek
Print out the result of mergeCheck function.print.keycheck
Print a keyDiff objectprint.keyDiff
print method for likert tablesprint.likert
Create meta data frame to align identical questionsqualtricsBlockStack
Remove elements if they are in a target vector, possibly replacing with NAremoveMatches
Reverse the levels in a factorreverse
If a numeric variable has only integer values, then make it an integer.safeInteger
Reduce each in a vector of strings to a given lengthshorten
How many stars would we need for this p value?starsig
keyFactors: private function that does work for keyTemplateSPSS and key template StatastatdatKey
Insert "\n" after the k'th character in a string. This IS vectorized, so can receive just one or many character strings in a vector.stringbreak
Cuts a string at a specified linewidth, trying to align cut with a separatortruncsmart
Update packages, spot new dependencies, and install themupdatePackages
Create Variable Label TemplatevarlabTemplate
Convert a key object from wide to long formatwide2long
Write CSV files with quotes same as MS Excel 2013 or newerwriteCSV
Convert leading or trailing white space and tab characters to nothing.zapspace