Page 1 of 1
R programming language
Posted: Fri Jul 09, 2010 6:00 am
by outstripp
Has anyone played with a Rev interface for the R programming environment--especially for doing statistics?
How about displaying R graphics in Rev?
It is trivial to put something like this in a field:
Code: Select all
r --vanilla
license()
demo(lm.glm)
xvar=c(10,20,30,40,50)
xvar
demo(graphics)
q()
and then run it in a shell(fld 1) command. But the graphics are lost.
Steve
Re: R programming language
Posted: Fri Jul 09, 2010 8:44 am
by outstripp
To answer my own question
Code: Select all
xvar=c(10,20,30,40,50,44,55,66,33,44)
mean(xvar)
yvar=c(2,2,3,8,9,3,4,8,6,7)
mean(yvar)
#plot a regression line
png(file="myplot.png")
#par(mfrow=c(2,2)) #put 4 graphs in one frame
plot(xvar,yvar)
abline(lm(yvar~xvar))
dev.off()
q()
and then in Rev:
Code: Select all
import paint from file "myplot.png"
It's cool.
Re: R programming language
Posted: Fri Jul 09, 2010 9:00 am
by Mark
Hi Steve,
In my opinion it is cooler to have R generate the statistics (where relevant) and have Revolution generate the graphs. I think that Revolution has more graphing features.
Best,
Mark
Re: R programming language
Posted: Sun Aug 24, 2014 2:45 pm
by jorgebarrero
Hello
I am very interested in this topic... can you tell me what have you acomplished?