Re: [R] Reshape large Data Frame to new format

2014-04-30 Thread Arunkumar Srinivasan
AM University College Station, TX 77840-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of arun Sent: Monday, March 24, 2014 9:57 AM To: r-help@r-project.org Cc: Dark Subject: Re: [R] Reshape large Data Frame to new format

[R] Reshape large Data Frame to new format

2014-03-24 Thread Dark
Hi R-experts, I have a data.frame that I want to reshape to a certain format so I can use it in a tool for further analysis. Basicly I have a very long list with IDs of persons and their codes. I create a row for every person with 25 of their codes. I a person has more then 25 codes, I want to

Re: [R] Reshape large Data Frame to new format

2014-03-24 Thread arun
Hi, In your 'resultData, some observations seems to be omitted. with(rawData,tapply(codes, PersonID,FUN=function(x) x))$Person3  #[1] 56177 61704 70879 69033 87224 68670 65602 25476 81209 62086 35492 39771 #[13] 14380 43858 53679 78023 43785 69884 12840 54021 resultData[4,] #  PersonId Code1

Re: [R] Reshape large Data Frame to new format

2014-03-24 Thread David Carlson
Of arun Sent: Monday, March 24, 2014 9:57 AM To: r-help@r-project.org Cc: Dark Subject: Re: [R] Reshape large Data Frame to new format Hi, In your 'resultData, some observations seems to be omitted. with(rawData,tapply(codes, PersonID,FUN=function(x) x))$Person3  #[1] 56177 61704 70879 69033 87224