Copyright | (C) 2013 Amgen Inc. |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Language.R.QQ
Description
Synopsis
- r :: QuasiQuoter
- rsafe :: QuasiQuoter
- collectAntis :: String -> IO (Either String [String])
Documentation
r :: QuasiQuoter Source #
An R value, expressed as an R expression, in R's syntax.
rsafe :: QuasiQuoter Source #
Quasiquoter for pure R code (no side effects) and that does not depend on the global environment (referential transparency). This means that all symbols must appear qualified with a package namespace (whose bindings are locked by default), the code must not affect R shared state in any way, including the global environment, and must not perform I/O.
Arguments
:: String | the R code that may contain antiquotations, which are
identifiers ending with |
-> IO (Either String [String]) | either an error message from R, or a list of unique antiquoted identifiers |
Map backwards slashes to forward slashes.
Find all occurences of antiquotations.
This function works by parsing the user's R code in a separate R process. As a nice side-effect, it will detect and return any syntax errors in the quasi-quoted R code.
This function is exposed only for testing; you probably don't need to call it in the user code.