R/RcppExports.R

Defines functions peg_sum

Documented in peg_sum

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#'@title Example PEG
#'@description an example of a Parsing Expression Grammar
#'(PEG) that takes a comma-separated string of digits and
#'sums them together
#'
#'@param x a vector of strings, each containing a comma-separated
#'set of digits
#'
#'@return a vector of numbers, containing either the sum of
#'the equivalent element of \code{x} or (if the element
#'could not be parsed) \code{NA}.
#'
#'@examples
#'# Simple example
#'peg_sum("1,2, 5, 91, 34")
#'
#'@export
peg_sum <- function(x) {
    .Call(`_piton_peg_sum`, x)
}

Try the piton package in your browser

Any scripts or data that you put into this service are public.

piton documentation built on Nov. 16, 2020, 9:13 a.m.