Re: [R] applying uniroot function to each element in vector

2011-04-27 Thread David Winsemius
On Apr 27, 2011, at 9:29 PM, Dale wrote: Yes my example was not the best, it is an oversimplified example. I tried using your method and didn't seem to work. And to whom might you be addressing this complaint? -- View this message in context: http://r.789695.n4.nabble.com/applying-uniro

Re: [R] applying uniroot function to each element in vector

2011-04-27 Thread Dale
Yes my example was not the best, it is an oversimplified example. I tried using your method and didn't seem to work. -- View this message in context: http://r.789695.n4.nabble.com/applying-uniroot-function-to-each-element-in-vector-tp3478573p3479895.html Sent from the R help mailing list archive

Re: [R] applying uniroot function to each element in vector

2011-04-27 Thread Rolf Turner
On 28/04/11 06:12, David Winsemius wrote: On Apr 27, 2011, at 11:54 AM, Dale wrote: If I have a vector of n elements, e.g. a vector of length 4 with elements 10, 20, 30, 40 and want to find the different values of x such that x^2=10, x^2=20, x^30 and x^2=40, how could I do this in R? I'm thin

Re: [R] applying uniroot function to each element in vector

2011-04-27 Thread David Winsemius
On Apr 27, 2011, at 11:54 AM, Dale wrote: If I have a vector of n elements, e.g. a vector of length 4 with elements 10, 20, 30, 40 and want to find the different values of x such that x^2=10, x^2=20, x^30 and x^2=40, how could I do this in R? I'm thinking of using the uniroot function, but

[R] applying uniroot function to each element in vector

2011-04-27 Thread Dale
If I have a vector of n elements, e.g. a vector of length 4 with elements 10, 20, 30, 40 and want to find the different values of x such that x^2=10, x^2=20, x^30 and x^2=40, how could I do this in R? I'm thinking of using the uniroot function, but am finding difficult applying it to a vector. Than