Tools for Data Manipulation and Testing


[Up] [Top]

Documentation for package ‘jwutil’ version 1.1.1

Help Pages

jwutil-package Tools for data manipulation not found elsewhere, and testthat extensions
%nin% inverse of %in%
add_time_to_date convert separate lists of dates and times to POSIXlt objects
affixFields update a set of data frame field names
allIsInteger check whether vector represents all integer values, not that the same as 'is.integer'
allIsNumeric check whether character vector represents all numeric values
areIntegers convert factor or vector to numeric without warnings
areNumeric which elements of a vector are numeric
asCharacterNoWarn convert factor or vector to character without warnings
asIntegerNoWarn convert factor or vector to numeric without warnings
asNumericNoWarn convert factor or vector to numeric without warnings
bad_input bad input data for tests
binary_cols names of fields which are numeric, binary or combinations thereof
binary_col_names names of fields which are numeric, binary or combinations thereof
buildLinearFormula build simple linear formula from variable names
combn_subset all unique combinations of a vector and all its non-zero subsets
countIsNa count NA in vector
countNonNaCumulative running totals of number of non-NA values in consecutive fields
countNonNaPairs count which combinations of fields have at least one non-NA
countNotNumeric count non-numeric elements
countNumeric count numeric elements
dput_expect_equal dput a testthat test
dropDuplicateFields drop duplicate fields
dropRowsWithNAField drops rows with NA values in specified fields
expandFactors Takes factors from a data frame and converts them to true/false fields with appropriately named fields.
expect_that_combine_all_args alternative 'expect_that' from 'testthat' which permutes all the inputs to a function which should give the same result where n args >=2 and the function is commutative.
expect_that_combine_first_arg alternative 'expect_that' from 'testthat' which permutes all the inputs to a function which should give the same result where n args >=2 and the function is commutative.
extreme_numbers extreme numbers
factorToDataframeLogical convert factor into a data.frame of logicals
fillMissingCombs fill out missing combinations of factors with NA
filterBetter filter data with diagnostics
flattenList flatten a list
getDropped get items or numerics that would be dropped in a merge
getFactorNames get names of the factor fields in a data frame
getNAFields get NA field names from data frame
getNonFactorNames get names of the factor fields in a data frame
getNonNAFields get NA field names from data frame
invwhich inverse which
is.Date is the object a 'Date'
isFlat determine whether a list is nested
isRowSorted is every row sorted?
isValidTime check if a time is valid in 24h clock
jwutil Tools for data manipulation not found elsewhere, and testthat extensions
listTrim trim null or empty values from a list
listTrimFlat trim null or empty values from a list
logicalToBinary encode TRUE as 1, and FALSE as 0 (integers)
lsf list all functions in a package
lsos show largest objects
lsp list all items in a package
mergeBetter merge better
mergeLists merge lists by names
numbers_to_long_and_float convert numbers to long and float types
numeric_cols names of fields which are numeric, binary or combinations thereof
numeric_col_names names of fields which are numeric, binary or combinations thereof
opt_binary_brute optimizes a function for all combinations of all subsets
permute generate all permutations of input
permuteWithRepeats generate all permutations of input, reusing values in each result row
platformIsLinux Are we running on Linux, Mac or Windows?
platformIsMac Are we running on Linux, Mac or Windows?
platformIsWindows Are we running on Linux, Mac or Windows?
propIsNa Proportion of NA values in a vector
propNaPerField return proportion of NA values per field
propRowSorted proportion of non-descending rows in matrix
random_test_dates generate random Dates or POSIXlt test datetimes
random_test_integers create extreme random numbers
random_test_letters create extreme random numbers
random_test_numbers create extreme random numbers
random_test_posixlt_datetimes generate random Dates or POSIXlt test datetimes
read.zip.url read file from zip at URL
read_xlsx_linux read '.xlsx' file, interpret as CSV, and return a data frame
rm_r recursive remove
set_attr_in_place Set attribute on any SEXP in place
shuffle shuffle
source_purl extract code from knitr vignette and source it
strip strip all whitespace
stripForFormula strip a string so that it can be used as a variable name in a formula.
strMultiMatch return the actual matches from a bracketed regex
strPairMatch return the actual matches from a bracketed regex
trim strip whitespace from ends of each string in given character vector
zeroes zeroes
zero_na zero NA values in a data.frame