Re: [R] Using the shape () function

2008-06-17 Thread Tom Backer Johnsen
hadley wickham wrote: You might try using the reshape package instead: last <- function(x) x[length(x)] names(d) <- c("value", "person", "time") cast(d, person ~ time, last) The first and the last line I think is clear, although I will have to experiment more to understand the call on cast () b

Re: [R] Using the shape () function

2008-06-17 Thread hadley wickham
>> You might try using the reshape package instead: >> >> last <- function(x) x[length(x)] >> names(d) <- c("value", "person", "time") >> cast(d, person ~ time, last) > > The first and the last line I think is clear, although I will have to > experiment more to understand the call on cast () better

Re: [R] Using the shape () function

2008-06-17 Thread Tom Backer Johnsen
hadley wickham wrote: On Tue, Jun 17, 2008 at 9:28 AM, Tom Backer Johnsen <[EMAIL PROTECTED]> wrote: In a research project we are using a web-based tools for collecting data from questionnaire. The system generates files that are simple to read as a data frame in the "long" format, which are si

Re: [R] Using the shape () function

2008-06-17 Thread hadley wickham
On Tue, Jun 17, 2008 at 9:28 AM, Tom Backer Johnsen <[EMAIL PROTECTED]> wrote: > In a research project we are using a web-based tools for collecting data > from questionnaire. The system generates files that are simple to read as a > data frame in the "long" format, which are simple to convert to

[R] Using the shape () function

2008-06-17 Thread Tom Backer Johnsen
In a research project we are using a web-based tools for collecting data from questionnaire. The system generates files that are simple to read as a data frame in the "long" format, which are simple to convert to the "wide" format. Something that might happen are: (a) there are two (multiple