A Dipping Sauce to Data Analysis and Visualization
Package dipsaus provides add-ons to various packages such as shiny, rlang, future, etc. to enhance these packages. To install the development version package from Github,
devtools::install_github('dipterix/dipsaus')dipsaus provides add-ons from the following perspectives:
1. Shiny Customized Widgets (Vignette)
compoundInput2assembles any shiny native inputs and create variable-length input;actionButtonStyledadd styles to shiny defaultactionButtonand its updating function can also update the styles or enable/disable the button;sync_shiny_inputssynchronize among shiny inputs without causing dead-locks in UI changes;set_shiny_inputto set shinyinputobject;flex_divto display elements withflexlayout;
2. Parallel Functions
collapseis a parallel solution to calculate sum/mean along arrays, providing4xspeed-ups for large arrays;make_forked_clustersenablesmulticore(forked clusters) infuturepackage even inRStudioenvironment;make_async_evaluatorqueues arbitrary number of tasks and keeps them running in the background without blocking the main session. (vignette);baseline_arrayto baseline arrays inRcppParallel;shift_arrayto shift arrays along given dimensions;lapply_async2usesfuturepackage, but with progress bar either in console or in shiny apps;
3. R Expressions (Vignette)
eval_dirtyworks asbase::eval, but supports quosures generated fromrlang::quo;match_callsmatch calls in a nested manner, and support changing the call arguments recursively;%?<-%assigns default values to left-hand object. E.g.a %?<-% 1assignsato be1ifaisNULLor does not exist.%=>%provides JavaScript-style of creating functions;new_function2creates new function with quasi-quotation;mask_function2modifies function and mask certain elements within a function;
4. Utility Functions (Vignette)
cat2act as base functioncatbut provides different levels with different colored outputs;check_installed_packages,package_installedchecks if package(s) are installed;col2hexStrconvert color to hex strings that are friendly toHTML,CSSandJavaScript;parse_svecconverts a string into integer vectors,deparse_svecconverts integer vectors back into a compact string;drop_nullsremoves invalid items within lists;get_cpugets CPU types and chip-set names;get_ram,mem_limit2gets total RAM size as an alternatives formem.limitsin non-windows environment;to_ram_sizeprovides simple way to convert numbers to printable storage sizes in given units;time_deltacalculates time differences and returns a number in given units;ask_yesno,ask_or_defaultinteractively ask for user's input either in console or inRStudio;fast_map2provides a wrapper onfastmappackage, giving the object list-like operations;shared_finalizerfinalizes multiple elements when last element is garbage collected.