Re: [R] Columns and rows

2012-10-14 Thread Santana Sarma
[mailto:r-help-bounces@r- project.org] On Behalf Of arun Sent: Thursday, October 11, 2012 11:26 PM To: Santana Sarma Cc: R help Subject: Re: [R] Columns and rows HI, Try this: dat1-read.table(text= Names Colx Coly Colz rowName1 A E H rowName2 B F I rowName3 C G J rowName4 D K

Re: [R] Columns and rows

2012-10-12 Thread David L Carlson
-bounces@r- project.org] On Behalf Of arun Sent: Thursday, October 11, 2012 11:26 PM To: Santana Sarma Cc: R help Subject: Re: [R] Columns and rows HI, Try this: dat1-read.table(text= Names Colx Coly Colz rowName1 A E H rowName2 B F I rowName3 C G J rowName4 D K ,sep=,header=TRUE

[R] Columns and rows

2012-10-11 Thread Santana Sarma
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

Re: [R] Columns and rows

2012-10-11 Thread Jeff Newmiller
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

Re: [R] Columns and rows

2012-10-11 Thread David Winsemius
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

Re: [R] Columns and rows

2012-10-11 Thread Santana Sarma
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 -

Re: [R] Columns and rows

2012-10-11 Thread arun
J D K X.. #1 A E H B F I C G J D K    A.K. - Original Message - From: Santana Sarma aimanusa...@gmail.com To: David Winsemius dwinsem...@comcast.net Cc: r-help@r-project.org Sent: Thursday, October 11, 2012 11:07 PM Subject: Re: [R] Columns and rows Hi, Trying to give an example here

Re: [R] Columns and rows

2012-10-11 Thread Jeff Newmiller
Better, but you didn't do your reading. Seriously... learn to make it reproducible... you will get quicker help from more skilled R users. Also, post in text, not HTML. Note that data frames are not really the right data structure for doing the kinds of operations you are describing below,