upfront
Base R Convenience Wrappers That Put Data Up Front
Description
A series of functions that help use the new built-in pipe operator in R without the need for the heft of the tidyverse.
What’s Inside The Tin
The following functions are implemented:
arrange
: Convenience data frame sorterbind_cols
: More convenient cbind.data.framebind_rows
: More convenient do.call(rbind.data.frame, …)capture_error
: More convenient capture.outputcapture_output
: More convenient capture.outputcompact
: Discard empty elementscount
: Convenience aggregatedfilter
: Convenience subsetdiscard
: Discard elements based on conditiondselect
: Convenience extract%l0%
: Infix length 0is_empty
: Infix is emptyis_even
: Infix is evenis_false
: Infix is falseis_negative
: Infix is negativeis_odd
: Infix is oddis_positive
: Infix is positiveis_true
: Infix is TRUEis_zero
: Infix is zerokeep
: Keep elements based on conditionmap_chr
: Typed Mapmap_dbl
: Typed Mapmap_df
: Typed more convenient Mapmap_dfc
: Typed more convenient Mapmap_dfr
: Typed more convenient Mapmap_int
: Typed Mapmap_lgl
: Typed Mapmap
: More convenient Mapmap2_chr
: Typed more convenient Mapmap2_dbl
: Typed more convenient Mapmap2_df
: Typed more convenient Mapmap2_dfc
: Typed more convenient Mapmap2_int
: Typed more convenient Mapmap2_lgl
: Typed more convenient Mapmap2
: More convenient mapplypossibly
: More convient tryquietly
: More convenient suppressWarmingssafely
: More convenient tryset_names
: Set object nameswalk
: Less noisy lapplywalk2
: Less noisy, more convenient lapply
Installation
remotes::install_github("hrbrmstr/upfront")
NOTE: To use the ‘remotes’ install options you will need to have the {remotes} package installed.
Usage
library(upfront)
# current version
packageVersion("upfront")
## [1] '0.1.0'
upfront Metrics
Lang | # Files | (%) | LoC | (%) | Blank lines | (%) | # Lines | (%) |
---|---|---|---|---|---|---|---|---|
R | 3 | 0.38 | 291 | 0.5 | 75 | 0.5 | 103 | 0.5 |
YAML | 1 | 0.12 | 1 | 0.0 | 0 | 0.0 | 0 | 0.0 |
SUM | 4 | 0.50 | 292 | 0.5 | 75 | 0.5 | 103 | 0.5 |
{cloc} 📦 metrics for upfront
Code of Conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.