| Safe Haskell | None |
|---|
RlangQQ.Internal
- r :: QuasiQuoter
- quoteRExpression :: Int -> String -> Q Exp
- parseTree' :: Parser (Tree [Char])
- parseTree :: Parser (Tree [Char])
- parseTreeTest :: IO ()
- hsVars :: Tree String -> [String]
- class ToRVal a where
- toRVal :: String -> a -> ByteString
- listToVec :: Show a => String -> [a] -> ByteString
- class FromRVal a where
- fromRVal :: ByteString -> a
- fromRValp :: Parser a -> ByteString -> a
Documentation
Calls R with the supplied string. Variables in R prefixed hs_ cause
the corresponding (un-prefixed) variable to be converted. The variable(s) must
be in the class ToRVal.
For example, when this file http://code.haskell.org/~aavogt/examples/test.hs is run
import RlangQQ
x = [0 .. 10 :: Double]
y = map (sin . (*pi) . (/10)) x
main = do
[r|
library(ggplot2)
png(file='test.png')
plot(qplot( hs_x, hs_y ))
dev.off()
|]
The file is produced
converting R's AST
parseTree' :: Parser (Tree [Char])Source
parseTreeTest :: IO ()Source
classes for marshalling data
haskell -> R
listToVec :: Show a => String -> [a] -> ByteStringSource
R -> haskell
not used yet
Methods
fromRVal :: ByteString -> aSource
fromRValp :: Parser a -> ByteString -> aSource