there is no need for 'apply' here, because R can handle vectors.
ord<-m[,1]+m[,2]/m[,1]
Am 02.02.2011 15:12, schrieb ADias:
>
> Hi
>
> I have this function and this matrix:
>
> function(x,y) x+y/x
>
> m<-matrix(c(1,2,4,2,10,8),3,2)
>
>> m
> [,1] [,2]
> [1,]12
> [2,]2 10
Hi
r-help-boun...@r-project.org napsal dne 02.02.2011 16:05:21:
>
> On Feb 2, 2011, at 9:12 AM, ADias wrote:
>
> >
> > Hi
> >
> > I have this function and this matrix:
> >
> > function(x,y) x+y/x
> >
> > m<-matrix(c(1,2,4,2,10,8),3,2)
> >
> >> m
> > [,1] [,2]
> > [1,]12
> > [2,]
On Feb 2, 2011, at 9:12 AM, ADias wrote:
Hi
I have this function and this matrix:
function(x,y) x+y/x
m<-matrix(c(1,2,4,2,10,8),3,2)
m
[,1] [,2]
[1,]12
[2,]2 10
[3,]48
each row represent a point (x,y) in a chart and I want via my
fucntion to
calculate the im
3 matches
Mail list logo