{-# LANGUAGE QuasiQuotes #-} import RlangQQ x = [0 .. 10 :: Double] main = do [r| library(ggplot2) print('blahh') png(file='test.png') plot(qplot( hs_x, $( map (sin . (*pi) . (/10)) x) )) dev.off() |]