inst/doc/RInterface.R

## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(echo = TRUE)
library(froth, quietly = TRUE)

## -----------------------------------------------------------------------------
froth.parse("1 2 3 . . .")

## -----------------------------------------------------------------------------
froth.parse("1 2 3")
froth.parse(". . .")

## -----------------------------------------------------------------------------
froth.parse("1")
x <- froth.RPop()
x

## -----------------------------------------------------------------------------
froth.RPush(\(x) x**2)
froth.parse('.s')

## -----------------------------------------------------------------------------
froth.parse('clear')
froth.RDefine('R_rnorm', rnorm, 3L)
froth.parse("5 0 0.5 R_rnorm")
r <- unlist(froth.RPop(5L))
r

Try the froth package in your browser

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

froth documentation built on June 22, 2024, 12:21 p.m.