[R] Transformation of data!
Michael Knudsen
micknudsen at gmail.com
Fri Jul 17 13:13:56 CEST 2009
On Fri, Jul 17, 2009 at 10:29 AM, Andriy Fetsun<fetsun at googlemail.com> wrote:
> I want to perform some sort of transformation on all the
> elements in the matrix I have posted and that I have only presented
> those 3 elements as an example of how the transformation will affect
> those 3 elements.
>
> Do you see the problem now?
Hmmm ... I don't think to. If you have a function f, you can apply it
to all elements in a vector x by simply typing f(x). If you want to
arrange it in two columns as you suggest, you could do
cbind(1:length(x),f(x)),
but I really can't see why you would ever want to do that.
> Here the proposed by R-guy solution
>
> mydata <- data.frame(W21)
Where is your function, and what is W21?
--
Michael Knudsen
micknudsen at gmail.com
http://lifeofknudsen.blogspot.com/
More information about the R-help
mailing list