Re: [R] Idea/package to linearize a curve along the diagonal?

2012-03-14 Thread Yvonnick Noel
I am trying to normalize some data. First I fitted a principal curve (using the LCPM package), but now I would like to apply a transformation so that the curve becomes a straight diagonal line on the plot. The data used to fit the curve would then be normalized by applying the same

Re: [R] Idea/package to linearize a curve along the diagonal?

2012-03-13 Thread Emmanuel Levy
Dear David and Jeff, Only if you were going apply some sort of transformation that did not extend globally Exactly, this is why the LPCM package is great, as it assigns points to parts of a curve. I think I pretty much got what I need - it is not perfect yet but it should be enough to give

Re: [R] Idea/package to linearize a curve along the diagonal?

2012-03-12 Thread Jeff Newmiller
It is possible that I do not see what you mean, but it seems like the following code does what you want. The general version of this is likely to be rather more difficult to do, but in theory the inverse function seems like what you are trying to accomplish. x - 1:20 y - x^2 + rnorm(20) y.lm

Re: [R] Idea/package to linearize a curve along the diagonal?

2012-03-12 Thread Emmanuel Levy
Hi Jeff, Thanks for your reply and the example. I'm not sure if it could be applied to the problem I'm facing though, for two reasons: (i) my understanding is that the inverse will associate a new Y coordinate given an absolute X coordinate. However, in the case I'm working on, the

Re: [R] Idea/package to linearize a curve along the diagonal?

2012-03-12 Thread Jeff Newmiller
You said: Does this make sense? Not to me. I don't understand either of your points. It may be time for you to provide a concrete example of your own (reproducible R code, or at least specific input and output data). ---

Re: [R] Idea/package to linearize a curve along the diagonal?

2012-03-12 Thread David Winsemius
On Mar 12, 2012, at 3:07 PM, Emmanuel Levy wrote: Hi Jeff, Thanks for your reply and the example. I'm not sure if it could be applied to the problem I'm facing though, for two reasons: (i) my understanding is that the inverse will associate a new Y coordinate given an absolute X coordinate.

[R] Idea/package to linearize a curve along the diagonal?

2012-03-11 Thread Emmanuel Levy
Hi, I am trying to normalize some data. First I fitted a principal curve (using the LCPM package), but now I would like to apply a transformation so that the curve becomes a straight diagonal line on the plot. The data used to fit the curve would then be normalized by applying the same

Re: [R] Idea/package to linearize a curve along the diagonal?

2012-03-11 Thread Jeff Newmiller
Aren't you just reinventing the inverse of a function? --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...