Code without visible output:


In [1]:
a <- 8

In [2]:
b <- 4:59

With visible output:


In [3]:
a + b


Out[3]:
 [1] 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
[26] 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
[51] 62 63 64 65 66 67

Printing is captured and sent to the frontend:


In [4]:
print('Hello world! Love, R in IPython.')


[1] "Hello world! Love, R in IPython."

So are errors:


In [5]:
h


Error in eval(expr, envir, enclos): Objekt 'h' nicht gefunden

Plotting works too:


In [6]:
x = seq(0, 2*pi, length.out=50)
plot(x, sin(x))