Hi,

Trying to give an example here.
Say, I have read in a .csv file using read.csv (), and the file contains
the following info.


Names Col x Col y Col z
rowName1 A E H
rowName2 B F I
rowName3 C G J
rowName4 D K



Now, this is what is required:

1. Combine/stack/join contents from -
              a) multiple rows into one column.


That is:

A
E
H
B
F
I
C
G
J
D
K

              b) multiple columns into one row.

A B C D E F G H I J K


2. Stack contents from

A) multiple columns into one column.

A
B
C
D
E
F
G
H
I
J
K


B) Multiple rows into one row.

A E H B F I C G J D


Thank you.

Cheers,
Santana

================================


On Fri, Oct 12, 2012 at 1:32 PM, David Winsemius <dwinsemius@comcast.net>wrote:

>
> On Oct 11, 2012, at 5:55 PM, Santana Sarma 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).
>
> Could _you_ please produce an example.
>
> Dataframes do not have headers. They do have column names and column names
> are required.
>
> --
> David Winsemius, MD
> Alameda, CA, USA
>
>

	[[alternative HTML version deleted]]


