[R] how to flip row/ column of a matrix?

Sarah Goslee sarah.goslee at gmail.com
Wed Oct 3 21:19:16 CEST 2012


Do you mean all the rows and columns, or just a row and column as you said?

Your reference to matlab makes me think the former, in which case all
you need is ?t - the transpose function.

Sarah

On Wed, Oct 3, 2012 at 3:14 PM, Jason Love <jason.love1492 at gmail.com> wrote:
> Hi all,
> Sorry about posting such a basic question, but I can't seem to find out a
> way of flipping a column and row of a matrix.
> In matlab, this can be easily done by putting a prime next to a variable
> name. (e.g., a -> a')
> If anyone knows, please help.
> -Jason
>

-- 
Sarah Goslee
http://www.functionaldiversity.org




More information about the R-help mailing list