Package: wrapr 2.1.0

John Mount

wrapr: Wrap R Tools for Debugging and Parametric Programming

Tools for writing and debugging R code. Provides: '%.>%' dot-pipe (an 'S3' configurable pipe), unpack/to (R style multiple assignment/return), 'build_frame()'/'draw_frame()' ('data.frame' example tools), 'qc()' (quoting concatenate), ':=' (named map builder), 'let()' (converts non-standard evaluation interfaces to parametric standard evaluation interfaces, inspired by 'gtools::strmacro()' and 'base::bquote()'), and more.

Authors:John Mount [aut, cre], Nina Zumel [aut], Win-Vector LLC [cph]

wrapr_2.1.0.tar.gz
wrapr_2.1.0.zip(r-4.5)wrapr_2.1.0.zip(r-4.4)wrapr_2.1.0.zip(r-4.3)
wrapr_2.1.0.tgz(r-4.4-any)wrapr_2.1.0.tgz(r-4.3-any)
wrapr_2.1.0.tar.gz(r-4.5-noble)wrapr_2.1.0.tar.gz(r-4.4-noble)
wrapr_2.1.0.tgz(r-4.4-emscripten)wrapr_2.1.0.tgz(r-4.3-emscripten)
wrapr.pdf |wrapr.html
wrapr/json (API)
NEWS

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

Peer review:

Bug tracker:https://github.com/winvector/wrapr/issues

On CRAN:

11.13 score 136 stars 13 packages 386 scripts 3.9k downloads 89 exports 0 dependencies

Last updated 1 years agofrom:4f360edf33. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 11 2024
R-4.5-winOKNov 11 2024
R-4.5-linuxOKNov 11 2024
R-4.4-winOKNov 11 2024
R-4.4-macOKNov 11 2024
R-4.3-winOKNov 11 2024
R-4.3-macOKNov 11 2024

Exports::=%:=%%?%%.%%.>%%.|%%<s%%>.%%|.%%c%%dot%%in_block%%p%%qc%%s>%add_name_columnapply_leftapply_left_defaultapply_rightapply_right_S4as_named_listbcbquote_callbquote_call_argsbquote_functionbuild_framebuildNameCallbackcheck_equiv_framescheckColsFormUniqueKeysclean_fit_glmclean_fit_lmcoalesceDebugFnDebugFnEDebugFnWDebugFnWEDebugPrintFnDebugPrintFnEdefineLambdadraw_framedraw_framecevalbexecute_parallelf.grab_assignments_from_dotsgrepdfgrepvhas_no_dup_rowsinvert_permlambdalapplymletmakeFunction_semap_to_charmap_uppermapsymsmatch_ordermk_formulamk_tmp_name_sourcenamed_map_builderordervpackparLapplyLBmpartition_tablespipe_implpsaggqaeqcqchar_frameqeqsrestrictToNameAssignmentsreturnCaptureseqisisinterpsortvsplit_at_brace_pairsstop_if_dot_argsstrsplit_capturesxtouniquesunpackUnpackerFUnpackerPvapplymVectorizeMview

Dependencies:

bquote

Rendered frombquote.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2022-01-26
Started: 2019-01-16

Corner Cases

Rendered fromCornerCases.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2017-07-05
Started: 2017-07-05

Debug Vignette

Rendered fromDebugFnW.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-09-06
Started: 2017-02-10

Dot Pipe

Rendered fromdot_pipe.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-10-17
Started: 2017-07-23

Frame Tools

Rendered fromFrameTools.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-08-10
Started: 2018-02-28

lambda Function Builder

Rendered fromlambda.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-02-22
Started: 2017-08-26

Let

Rendered fromlet.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-09-06
Started: 2017-02-10

Multiple Assignment

Rendered frommulti_assign.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-02-22
Started: 2020-01-22

Multiple Assignment with unpack

Rendered fromunpack_multiple_assignment.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-02-22
Started: 2020-01-24

Named Arguments

Rendered fromNamed_Arguments.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2023-08-19
Started: 2018-02-22

Named Map Builder

Rendered fromnamed_map_builder.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2018-11-06
Started: 2017-08-24

Quoting Concatinate

Rendered fromQuotingConcatinate.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-08-10
Started: 2018-11-06

Substitution Modes

Rendered fromSubstitutionModes.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2018-09-13
Started: 2017-07-05

wrapr Dot Arrow Pipe

Rendered fromwrapr_pipe.pdf.asisusingR.rsp::asison Nov 11 2024.

Last update: 2018-11-05
Started: 2018-11-05

wrapr Eager Evaluation

Rendered fromwrapr_Eager.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2020-08-10
Started: 2020-01-21

wrapr let Block

Rendered fromwrapr_let.pdf.asisusingR.rsp::asison Nov 11 2024.

Last update: 2018-11-05
Started: 2018-11-05

wrapr_applicable

Rendered fromwrapr_applicable.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2018-10-13
Started: 2017-12-31

Readme and manuals

Help Manual

Help pageTopics
wrapr: Wrap R Tools for Debugging and Parametric Programmingwrapr-package wrapr
Prepare for unpack or bind values into the calling environment.[.Unpacker
Unpack or bind values into the calling environment.[<-.Unpacker
Dot substitution string interpolation.%<s%
Inline list/array concatenate.%c%
Inline dot product.%dot%
Inline let-block notation.%in_block%
Inline character paste0.%p%
Inline quoting list/array concatenate.%qc%
Dot substitution string interpolation.%s>%
Add list name as a column to a list of data.frames.add_name_column
S3 dispatch on class of pipe_left_arg.apply_left
S3 dispatch on class of pipe_left_arg.apply_left_default
S3 dispatch on class of pipe_left_arg.apply_left.default
S3 dispatch on class of pipe_right_argument.apply_right
S4 dispatch method for apply_right.apply_right_S4
Default apply_right implementation.apply_right.default
Capture named objects as a named list.as_named_list
Blank Concatenate. Parse argument as a vector of values allowing "blank separators".bc
Treat ... argument as bquoted-values.bquote_call_args
Adapt a function to use bquote on its arguments.bquote_function
Build a data.frame from the user's description.build_frame
Build a custom writeback function that writes state into a user named variable.buildNameCallback
Check two data.frames are equivalent after sorting columns and rows.check_equiv_frames
Check that a set of columns form unique keys.checkColsFormUniqueKeys
Fit a stats::glm without carying back large structures.clean_fit_glm
Fit a stats::lm without carying back large structures.clean_fit_lm
Coalesce values (NULL/NA on left replaced by values on the right).%?% coalesce
Capture arguments of exception throwing function call for later debugging.DebugFn
Capture arguments and environment of exception throwing function call for later debugging.DebugFnE
Wrap a function for debugging.DebugFnW
Wrap function to capture arguments and environment of exception throwing function call for later debugging.DebugFnWE
Capture arguments of exception throwing function call for later debugging.DebugPrintFn
Capture arguments and environment of exception throwing function call for later debugging.DebugPrintFnE
Define lambda function building function.defineLambda
Pipe operator ("dot arrow", "dot pipe" or "dot arrow pipe").%.% %.>% %>.% dot_arrow
Render a simple data.frame in build_frame format.draw_frame
Render a simple data.frame in qchar_frame format.draw_framec
Near 'eval(bquote(expr))' shortcut.evalb
Execute f in parallel partitioned by partition_column.execute_parallel
Build an anonymous function of dot.
Grep for column names from a 'data.frame'grepdf
Return a vector of matches.grepv
Check for duplicate rows.has_no_dup_rows
Invert a permutation.invert_perm
Build an anonymous function.lambda
Memoizing wrapper for lapply.lapplym
Execute expr with name substitutions specified in alias.let
Build an anonymous function.makeFunction_se
format a map.map_to_char
Map up-cased symbol names to referenced values if those values are string scalars (else throw).map_upper
Map symbol names to referenced values if those values are string scalars (else throw).mapsyms
Match one order to another.match_order
Construct a formula.mk_formula
Produce a temp name generator with a given prefix.mk_tmp_name_source
Named map builder.%:=% := named_map_builder
Order by a list of vectors.orderv
Pack values into a named list.pack
Memoizing wrapper for parLapplyLBparLapplyLBm
Partition as set of tables into a list.partition_tables
Pipe dispatch implementation.pipe_impl
Pseudo aggregator.psagg
Quote assignment expressions (name = expr, name := expr, name %:=% expr).qae
Quoting version of c() array concatenate.qc
Build a quoted data.frame.qchar_frame
Quote expressions.qe
Quote argument as a string.qs
Use function to reduce or expand arguments.%.|% %|.% reduceexpand
Restrict an alias mapping list to things that look like name assignmentsrestrictToNameAssignments
Increasing whole-number sequence.seqi
Dot substitution string interpolation.si
Dot substitution string interpolation.sinterp
Sort a data.frame.sortv
Split strings at -pairs.split_at_brace_pairs
Stop with message if dot_args is a non-trivial list.stop_if_dot_args
Split a string, keeping separator regionsstrsplit_capture
String eXplode. Parse argument as a vector of string allowing "blank separators".sx
Unpack or bind values by names into the calling environment, eager eval (no-dot) variation.to
Strict version of unique (without ...).uniques
Unpack or bind values by names into the calling environment.unpack
Memoizing wrapper for vapply.vapplym
Memoizing wrapper to base::Vectorize()VectorizeM
Invoke a spreadsheet like viewer when appropriate.view