inline-r-1.0.1: Seamlessly call R from Haskell and vice versa. No FFI required.
Copyright(C) 2013 Amgen Inc.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.R.QQ

Description

 
Synopsis

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.

collectAntis Source #

Arguments

:: String

the R code that may contain antiquotations, which are identifiers ending with antiSuffix

-> 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.