On Fri, Jul 17, 2009 at 10:29 AM, Andriy Fetsun<fet...@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
micknud...@gmail.com
http://lifeofknudsen.blogspot.com/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to