Package: hutilscpp 0.10.4

Hugh Parsonage

hutilscpp: Miscellaneous Functions in C++

Provides utility functions that are simply, frequently used, but may require higher performance that what can be obtained from base R. Incidentally provides support for 'reverse geocoding', such as matching a point with its nearest neighbour in another array. Used as a complement to package 'hutils' by sacrificing compilation or installation time for higher running speeds. The name is a portmanteau of the author and 'Rcpp'.

Authors:Hugh Parsonage [aut, cre], Simon Urbanek [ctb]

hutilscpp_0.10.4.tar.gz
hutilscpp_0.10.4.zip(r-4.5)hutilscpp_0.10.4.zip(r-4.4)hutilscpp_0.10.4.zip(r-4.3)
hutilscpp_0.10.4.tgz(r-4.4-arm64)hutilscpp_0.10.4.tgz(r-4.4-x86_64)hutilscpp_0.10.4.tgz(r-4.3-arm64)hutilscpp_0.10.4.tgz(r-4.3-x86_64)
hutilscpp_0.10.4.tar.gz(r-4.5-noble)hutilscpp_0.10.4.tar.gz(r-4.4-noble)
hutilscpp_0.10.4.tgz(r-4.4-emscripten)hutilscpp_0.10.4.tgz(r-4.3-emscripten)
hutilscpp.pdf |hutilscpp.html
hutilscpp/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/hughparsonage/hutilscpp/issues

Uses libs:
  • openmp– GCC OpenMP (GOMP) support library

On CRAN:

61 exports 10 stars 2.38 score 4 dependencies 4 dependents 2.0k downloads

Last updated 6 months agofrom:1393f35274b7ef96d4a49c1d48ff73ce331a9714

Exports:abs_diffallNAand3and3sanyOutsideare_evenas_integer_if_safebench_system_timecharacter2integercoalesce0COALESCE0Commacount_logicalcumsum_resetdiamdivisibledivisible16divisible2every_intfinpfmatchpfnotinphelperImpliesis_constantis_sortedisntConstantisntSortedmatch_nrst_haversinemax_abs_diffminmaxModeCor3or3spmax0pmax3pmaxCpmaxVpmin0pmin3pminCpminVpoleInaccessibility2poleInaccessibility3range_rcppsquishsum_and3ssum_isnasum_or3sthinnerunique_fmatchuniqueN_fmatchwhich_are_evenwhich_firstwhich_firstNAwhich_lastwhich_lastNAwhich_true_onwardswhich3whichsxor2

Dependencies:data.tablefastmatchhutilsmagrittr

Readme and manuals

Help Manual

Help pageTopics
Absolute differenceabs_diff max_abs_diff
Is a vector empty?allNA
Are any values outside the interval specified?anyOutside
Are elements of a vector even?are_even which_are_even
Coerce from double to integer if safeas_integer_if_safe
Evaluate time of computationbench_system_time
Character to numericcharacter2integer
Convenience function for coalescing to zeroCOALESCE0 coalesce0
Faster version of 'scales::comma'Comma
Count logicalscount_logical
Cumulative sum unless resetcumsum_reset
What is the diameter of set of points?diam thinner
Divisibilitydivisible divisible16 divisible2
Every integerevery_int
Parallel fastmatchingfinp fmatchp fnotinp
Helperhelper
ImpliesImplies
Is a vector constant?isntConstant is_constant
Is a vector sorted?isntSorted is_sorted
Vectorized logical with support for short-circuitsand3 logical3 or3
Complex logical expressionsand3s logical3s or3s
Match coordinates to nearest coordinatesmatch_nrst_haversine
Minimum and maximumminmax
Most common elementModeC
Parallel maximum/minimumpmax0 pmax3 pmaxC pmaxV pmin0 pmin3 pminC pminV
Find a binary pole of inaccessibilitypoleInaccessibility poleInaccessibility2 poleInaccessibility3
Range C++range_rcpp
Squish into a rangesquish
Sum of logical expressionssum_and3s sum_or3s
Number of missing valuessum_isna
Distinct elementsuniqueN_fmatch unique_fmatch
Where does a logical expression first return 'TRUE'?which_first which_last
First/last position of missing valueswhich_firstNA which_lastNA
At which point are all values true onwardswhich_true_onwards
which of three vectors are the elements (all, any) true?which3
Separated whichwhichs
Exclusive orxor2