On Mar 17, 2007, at 10:52 PM, [EMAIL PROTECTED] wrote: > Hi all - A stupid question here, my apology. I would like to know > how can I flip a vector in R? For example, I have a vector: > > a = c(1,2,3) > > I would like my vector b to have the following value > > b = c(1,2,3) > > But what operator I need to put to my original vector 'a' to obtain > 'b'? Please let me know. Thank you. >
I can only assume you wanted b=c(3,2,1). In that case, try rev(a) > - adschai Haris Skiadas Department of Mathematics and Computer Science Hanover College ______________________________________________ [email protected] 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.
