Using GNU R sessions inside TeXmacs

GNU R is an integrated suit of software facilities for data manipulation and graphical display. Many people use R as a statistics system. But the developers prefer to think of it as an implement within which many classical and modern statistical techniques have been implemented. You may download R from

    http://www.r-project.org

In order to launch an R session inside TeXmacs, use TextSessionR. The v() function can be used in order to include the contents of the R graphics window inside your worksheet.

> Welcome to the TeXmacs interface to R.

To put the current graph in the TeXmacs buffer as an eps use v().

The functions plotv(), linesv(), and pointsv() are provided as a convenience.

They do the regular function, and then insert the graph.

To change the size of the graph that is inserted to TeXmacs,just adjust the size of the X11 window.

>

qnorm(1/2,mean=0,sd=1)

[1] 0

>

x<-1:100

>

y<-rnorm(x)

>

plot(x,y)

>

v()

>

plot(x)

>

v()

>

z<-sort(y)

>

plot(z)

>

v()

>

plot(z,sort(y))

>

v()

>

hist(z)

>

v()

>

summary(z)

Min. 1st Qu. Median Mean 3rd Qu. Max.
-2.802000 -1.003000 0.007691 -0.040620 0.840500 2.447000

>

hist(y,seq(-4,3.5,0.2),prob=TRUE)

>

v()

>

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".