Displaying 4 results from an estimated 4 matches for "evalr".
Did you mean:
eval
2011 Aug 26
0
Problem in calling R functions from Matlab
...OM.StatConnectorSrv_StatConnector
>> Rdemo
b =???? 1???? 4???? 9??? 16??? 25??? 36??? 49??? 64??? 81?? 100
c =???? 2???? 5??? 10??? 17??? 26??? 37??? 50??? 65??? 82?? 101
I then tried running the Rdemo available on http://www.mathworks.com/matlabcentral/fx_files/5051/1/content/Rdemo.html
evalR('demo("persp")') works well. Also the arithmetic functions all work well:
a = 1:10;
putRdata('a',a)
b = evalR('a^2')
evalR('b <- a^2');
evalR('c <- b + 1');
c = getRdata('c')
However ?Now copy the volcano data into MATLAB? secti...
2009 Sep 07
2
calling combinations of variable names
R-2.9.1, Windows7
Dear list,
I have a question to you that seems very simple to me, but I just can't
figure it out.
I have a dataframe called "ratings" which contains the following
variables: evalR1, evalR2, evalR3, evalR4, scoreR1, scoreR2, scoreR3,
scoreR4, opinionR1, opinionR2, opinionR3, opinionR4. (there are more
variables, but this gives an idea of the data structure).
What I want is run several analyses on all 3 or 4-combinations of a
given variable. So, for example, I want to comput...
2009 Sep 08
0
Re : calling combinations of variable names
...at.math.ethz.ch
>Subject: Re: Re : [R] calling combinations of variable names
>
>may be this can work
>
>testfun<-function(x) {
> rval=""
> k<-length(x)
> for (i in 1: k) rval<-paste(rval,x[i],sep="-")
> rval
>}
>
>v1<-paste("evalr",1:4,sep="")
>eval<-expand.grid(w=v1,x=v1,y=v1,z=v1)
>n<-dim(eval)[1]
>
>results<-rep("", n)
>
>for (i in 1:n) {
> row<-unique(unlist(eval[i,]))
>
> if (length(row)>=3) results[i]<-testfun(row)
>}
>
>You just have to rep...
2009 Mar 09
0
Usar R desde Matlab
...r unas funciones para
enviar variables a r y trabajar desde matlab. Un ejemplo sería este:
>> openR
>> a = round(10*rand(4))
a =
10 9 8 9
2 8 4 7
6 5 6 2
5 0 8 4
>> putRdata( ''a'', a )
>> evalR( ''v <- apply( a, 1, mean )'' )
>> getRdata( ''v'' )
ans =
9.0000 5.2500 4.7500 4.2500
>> closeR
Se podrían generar archivos .m que llamen a funciones de R y devuelvan el
resultado a Matlab.
He visto que hay dos formas de conectarlo,...