Hi,
You can do that even without apply():
v.v<-seq(10,20, by=0.1)
y<-v.v^2
But if you want it with apply...
apply(as.matrix(v.v), 1, function(x) x^2)
Regards,
Carlos Ortega
www.qualityexcellence.es
2012/1/31 arunkumar
> Hi
>
> I have a function
>
> y= x^2
>
> min =10
> max=20
> in
Hi
I have a function
y= x^2
min =10
max=20
increment=0.1
I want to find the value of y for the value of x between min and max by step
increment.
how to get the values using apply function instead of for loop
-
Thanks in Advance
Arun
--
View this message in context:
http://r.7896
2 matches
Mail list logo