Package: cheapr 1.5.1.9000

Nick Christofides

cheapr: Simple Functions to Save Time and Memory

Fast and memory-efficient (or 'cheap') tools to facilitate efficient programming, saving time and memory. It aims to provide 'cheaper' alternatives to common base R functions, as well as some additional functions.

Authors:Nick Christofides [aut, cre]

cheapr_1.5.1.9000.tar.gz
cheapr_1.5.1.9000.zip(r-4.7)cheapr_1.5.1.9000.zip(r-4.6)cheapr_1.5.1.9000.zip(r-4.5)
cheapr_1.5.1.9000.tgz(r-4.6-x86_64)cheapr_1.5.1.9000.tgz(r-4.6-arm64)cheapr_1.5.1.9000.tgz(r-4.5-x86_64)cheapr_1.5.1.9000.tgz(r-4.5-arm64)
cheapr_1.5.1.9000.tar.gz(r-4.7-arm64)cheapr_1.5.1.9000.tar.gz(r-4.7-x86_64)cheapr_1.5.1.9000.tar.gz(r-4.6-arm64)cheapr_1.5.1.9000.tar.gz(r-4.6-x86_64)
cheapr_1.5.1.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
cheapr/json (API)
NEWS

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

Bug tracker:https://github.com/nicchr/cheapr/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

Conda:

cppopenmp

7.04 score 21 stars 2 packages 91 scripts 817 downloads 173 exports 3 dependencies

Last updated from:6ba6e6c8a3. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK154
linux-devel-x86_64OK153
source / vignettesOK166
linux-release-arm64OK153
linux-release-x86_64OK157
macos-release-arm64OK127
macos-release-x86_64OK205
macos-oldrel-arm64OK115
macos-oldrel-x86_64OK221
windows-develOK262
windows-releaseOK163
windows-oldrelOK173
wasm-releaseOK122

Exports:%!in_%%in_%abs_add_addressall_naany_naarchetypearchetype_commonas_dfas_discreteas_factorattrs_addattrs_clearattrs_modifyattrs_rmbinc_casecastcast_commonceiling_cheapr_ccheapr_if_elsecheapr_repcheapr_rep_eachcheapr_rep_lencheapr_revcheapr_sdcheapr_tablecheapr_varcol_all_nacol_any_nacol_ccol_na_countscountscpp_rebuilddeep_copydf_modifydivide_exp_factor_fast_dffloor_gcdgcd2get_breaksget_max_threadsget_threadsif_else_int_signintersect_is_nais_whole_numberlag_lag_sequencelag2_lead_sequencelengths_levels_addlevels_add_nalevels_countlevels_droplevels_drop_nalevels_factorlevels_lumplevels_renamelevels_reorderlevels_rmlevels_unusedlevels_usedlist_as_dflist_assignlist_combinelist_drop_nulllist_lengthslist_modifylog_log10_multiply_na_countna_findna_initna_insertna_replacena_rmname_repairnamed_listnegate_new_characternew_complexnew_dfnew_doublenew_integernew_listnew_logicalnew_rawnum_naoverviewpaste_pow_r_typer_type_commonrebuildrecyclerep_rep_each_rep_len_replace_rev_round_row_all_narow_any_narow_crow_na_countssample_scmscm2sd_semi_copyseq_seq_endseq_idseq_incrementseq_sizeseq_startsequence_set_absset_addset_ceilingset_change_signset_divideset_expset_floorset_logset_multiplyset_powset_roundset_sqrtset_subtractset_threadsset_truncsetdiff_shallow_copysign_signif_sqrt_ssetsset_colsset_dfsset_rowstr_coalescesubtract_switch_argstable_trunc_unique_unique_name_repairunlisted_lengthval_countval_findval_insertval_matchval_replaceval_rmvar_vector_lengthwhich_which_nawhich_not_nawhich_valwindow_sequencewith_local_seed

Dependencies:collapsecpp11Rcpp

Readme and manuals

Help Manual

Help pageTopics
cheapr: Simple Functions to Save Time and Memorycheapr-package cheapr
Memory address of R objectaddress
Turn continuous data into discrete binsas_discrete as_discrete.integer64 as_discrete.numeric
Add and remove attributesattrs attrs_add attrs_clear attrs_modify attrs_rm
A sometimes cheaper but argument richer alternative to '.bincode()'bin
A cheapr version of 'c()'cheapr_c c_
A cheapr case-when and switchcase val_match
Fast casting/coercing of R objectsarchetype archetype_common cast cast_common r_type r_type_common
Fast frequency tables - Still experimentalcheapr_table counts table_
Copy R objectscopy deep_copy semi_copy shallow_copy
Low-level attribute re-constructorcpp_rebuild
A cheaper version of 'factor()' along with cheaper utilitiesas_factor factor_ levels_add levels_add_na levels_count levels_drop levels_drop_na levels_factor levels_lump levels_rename levels_reorder levels_rm levels_unused levels_used
Greatest common divisor and smallest common multiplegcd gcd2 scm scm2
Pretty break-points for continuous (numeric) dataget_breaks get_breaks.default get_breaks.integer64 get_breaks.numeric
Get and set the number of OpenMP threads to be used in cheaprget_max_threads get_threads set_threads
Cheaper version of 'ifelse()'cheapr_if_else if_else if_else_
A fast and integer-based 'sign()'int_sign
Efficient functions for dealing with missing values.all_na any_na col_all_na col_any_na col_na_counts is_na is_na.data.frame is_na.default is_na.POSIXlt is_na.vctrs_rcrd num_na row_all_na row_any_na row_na_counts which_na which_not_na
Very fast check that numeric vector consists only of whole numbersis_whole_number
Lagged operations.lag2_ lag_
List utilitieslengths_ list_assign list_combine list_drop_null list_lengths list_modify new_list unlisted_length
Parallelised math operationsabs_ add_ ceiling_ divide_ exp_ floor_ log10_ log_ math multiply_ negate_ pow_ round_ signif_ sign_ sqrt_ subtract_ trunc_
Fast 'NA' initialisationna_init
Turn dot-dot-dot ('...') into a named listnamed_list
Cheap data frame utilitiesas_df col_c df_modify fast_df list_as_df name_repair new_df row_c unique_name_repair
Fast multi-threaded vector initialisationnew_character new_complex new_double new_integer new_logical new_raw
An alternative to 'summary()' inspired by the skimr packageoverview overview.character overview.data.frame overview.Date overview.default overview.factor overview.integer overview.integer64 overview.logical overview.numeric overview.POSIXt overview.ts overview.zoo
Rebuild an object from a templaterebuild rebuild.data.frame rebuild.data.table rebuild.sf rebuild.tbl_df
Recycle objects to a common sizerecycle
cheapr style repeat functionscheapr_rep cheapr_rep_each cheapr_rep_len rep rep_ rep_each_ rep_len_
Fast vector replacement, an alternative to [<-replace replace_
Utilities for creating many sequenceslag_sequence lead_sequence sequences sequence_ seq_ seq_end seq_id seq_increment seq_size seq_start window_sequence
Math operations by reference - *Experimental*set_abs set_add set_ceiling set_change_sign set_divide set_exp set_floor set_log set_multiply set_pow set_round set_sqrt set_subtract set_trunc
Extra utilities%!in_% %in_% cheapr_rev cheapr_sd cheapr_var intersect_ na_insert rev_ sample_ sd_ setdiff_ val_insert var_ vector_length with_local_seed
Cheaper subset 'sset()'sset
Fast functions for data frame subsettingsset_col sset_df sset_row
Coalesce character vectorsstr_coalesce
Fast string concatenation using C++paste_ strings
Switch between dot-dot-dot and a list of argsswitch_args
An alternative 'unique' functionunique_
Efficient functions for counting, finding, replacing and removing scalarsna_count na_find na_replace na_rm val_count val_find val_replace val_rm which_val
Memory-efficient alternative to 'which()'which_