Code without visible output:
a <- 8
b <- 4:59
With visible output:
a + b
Printing is captured and sent to the frontend:
print('Hello world! Love, R in Jupyter.')
[1] "Hello world! Love, R in Jupyter."
So are errors:
f2 <- function() stop('deep error')
throw <- function() f2()
'this line is run / displayed'
throw()
'this line is not run / displayed'
Error in f2(): deep error Traceback: 1. throw() 2. f2() # at line 2 of file <text> 3. stop("deep error") # at line 1 of file <text>
Plotting works too:
x <- seq(0, 2*pi, length.out=50)
plot(x, sin(x))