Package: omnibus 1.2.14

omnibus: Helper Tools for Managing Data, Dates, Missing Values, and Text

An assortment of helper functions for managing data (e.g., rotating values in matrices by a user-defined angle, switching from row- to column-indexing), dates (e.g., intuiting year from messy date strings), handling missing values (e.g., removing elements/rows across multiple vectors or matrices if any have an NA), text (e.g., flushing reports to the console in real-time); and combining data frames with different schema (copying, filling, or concatenating columns or applying functions before combining).

Authors:Adam B. Smith [cre, aut]

omnibus_1.2.14.tar.gz
omnibus_1.2.14.zip(r-4.5)omnibus_1.2.14.zip(r-4.4)omnibus_1.2.14.zip(r-4.3)
omnibus_1.2.14.tgz(r-4.4-any)omnibus_1.2.14.tgz(r-4.3-any)
omnibus_1.2.14.tar.gz(r-4.5-noble)omnibus_1.2.14.tar.gz(r-4.4-noble)
omnibus_1.2.14.tgz(r-4.4-emscripten)omnibus_1.2.14.tgz(r-4.3-emscripten)
omnibus.pdf |omnibus.html
omnibus/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/adamlilith/omnibus/issues

Datasets:

On CRAN:

count-decimalsleap-yearmerge-listsmissing-valuesrotate-matrixsampling

5.77 score 4 stars 2 packages 62 scripts 696 downloads 63 exports 0 dependencies

Last updated 2 months agofrom:c4d34dad60. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 28 2024
R-4.5-winOKOct 28 2024
R-4.5-linuxOKOct 28 2024
R-4.4-winOKOct 28 2024
R-4.4-macOKOct 28 2024
R-4.3-winOKOct 28 2024
R-4.3-macOKOct 28 2024

Exports:%!=%%!=na%%<%%<=%%<=na%%<na%%==%%==na%%>%%>=%%>=na%%>na%%notin%appendListsbracketcapItcombineDfcompareFloatconvertUnitscornercountDecDigitsculldirCreateepsexpandUnitsforwardSlashinsertinsertColinsertRowis.wholeNumberisFALSENAisLeapYearisTRUENAlistFileslongRunmaxRunsmemUsemergeListsmirrormmodenaComparenaOmitMultinaRowsnotInpairDistpmatchSafeprefixquadArearenameColrenumSeqrotateMatrixroundedSigDigitsroundTorowColIndexingrstringsaysidestretchMinMaxunlistRecursiveunragMatrixwhich.pmaxwhich.pminyearFromDate

Dependencies:

Readme and manuals

Help Manual

Help pageTopics
Append values to elements of a list from another listappendLists
Identify values bracketing another valuebracket
Capitalize first letter of a stringcapIt
Combine data frames with different fields using a crosswalk tablecombineDf
Compare values to floating-point precision%!=% %<% %<=% %==% %>% %>=% compareFloat `%!=%` `%<%` `%<=%` `%==%` `%>%` `%>=%`
Data frame or conversion factors for length or areal unitsconversionFactors
Convert length or areal unitsconvertUnits
Corner of a matrix or data framecorner
Number of digits after a decimal placecountDecDigits
Force objects to have length or rows equal to the shortestcull
Replacement for dir.create()dirCreate
Day of month for leap yearsdomLeap
Day of month for non-leap yearsdomNonLeap
Day of year for leap yearsdoyLeap
Days of year for non-leap yearsdoyNonLeap
The smallest machine-readable numbereps
Convert unit abbreviations to proper unit namesexpandUnits
Replace backslash with forward slashforwardSlash
Insert values into a vectorinsert
Insert a column or row into a data frame or matrixinsertCol insertRow
Test if a numeric value is a whole numberis.wholeNumber
Is a year a leap year?isLeapYear
Vectorized test for truth robust to NAisFALSENA isTRUENA
Replacement for 'list.files()'listFiles
Length of the longest run of a particular value in a numeric vectorlongRun
Maximum number of continuous "runs" of values meeting a particular conditionmaxRuns
Size of objects taking most memory usememUse
Merge two lists with precedencemergeLists
Flip an objectmirror
Modal value(s)mmode
Compare values using <, <=, >, >=, !=, and == (robust to NAs)%!=na% %<=na% %<na% %==na% %>=na% %>na% grapes_less_than_na_grapes naCompare `%!=na%` `%!=na%`, `%<==%` `%<=na%` `%<=na%`, `%<na%` `%<na%`, `%==na%`, `%>=na%` `%>na%` `%>na%`,
Remove NAs from one or more equal-length vectorsnaOmitMulti
Index of rows in a data frame or matrix that contain at least one 'NA'naRows
Opposite of '%in%'%notin% notIn `%notin%`
Calculate pairwise distances between two matrices or data frames.pairDist
Partial matching of strings with error checkingpmatchSafe
Add leading characters to a stringprefix
Area of a quadrilateralquadArea
Rename columnsrenameCol
Renumber a sequence of numbersrenumSeq
Rotate values in a matrixrotateMatrix
Number of significant digits in rounded numbersroundedSigDigits
Round to nearest target valueroundTo
Convert between row- and column-style indexing of matricesrowColIndexing
Make a nearly-guaranteed unique stringrstring
Nicer version of 'print()' or 'cat()' functionsay
Left/right side of a data frame or matrixside
Rescale valuesstretchMinMax
For any object in a list that is also a list, unlist itunlistRecursive
Turn a "ragged" matrix into a "ragged" vectorunragMatrix
Which vector has maximum value at each elementwhich.pmax which.pmin
Year from date formats that are possibly ambiguousyearFromDate