Description Usage Arguments Value Examples
an example of a Parsing Expression Grammar (PEG) that takes a comma-separated string of digits and sums them together
1 | peg_sum(x)
|
x |
a vector of strings, each containing a comma-separated set of digits |
a vector of numbers, containing either the sum of
the equivalent element of x
or (if the element
could not be parsed) NA
.
1 2 | # Simple example
peg_sum("1,2, 5, 91, 34")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.