[R] Columns and rows

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Fri Oct 12 04:17:28 CEST 2012


Data frames don't have unequal column or row lengths within a single object. Your terminology is obscuring your intent. Perhaps you should read the posting guide for guidance on posting here and then generate a reproducible example. Since you seem to be having difficulty with the "how", at least provide sample input and desired output following the recommendations here:

 http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Are you aware of

?cbind
?rbind
?merge

?
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

Santana Sarma <aimanusarma at gmail.com> wrote:

>Hi,
>
>Could you please advice some easy way to do the following for a
>dataframe
>(header=F) having unequal column- & row- length.
>
>1. Combine/stack/join contents from -
>              a) multiple rows into one column.
>              b) multiple columns into one row.
>
>2. Stack contents from multiple columns (or, rows) into one column (or,
>row).
>
>Thank you.
>
>Cheers,
>
>Santana
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at 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.




More information about the R-help mailing list