Skip to content
Prev 181192 / 398502 Next

Behavior of seq with vector from

So if I want to concatenate the output of multiple seq calls, there's no clear way to to do this?

For background, I have a number of data.frames with the same structure in a list. I want to 'collapse' the list into a single data.frame but only keeping certain columns from each underlying data.frame. In my example below, I want to keep columns 2,3 in each underlying data.frame.

I'm using do.call('cbind', my.list) and then using the statement below to extract only the columns I need (other details omitted for brevity). If there's a built-in or pre-built function to do this, I'm all eyes.


Brian

PS if this is unclear, flame away, and I'll post some code

-----Original Message-----
From: Peter Dalgaard [mailto:P.Dalgaard at biostat.ku.dk] 
Sent: Friday, May 22, 2009 6:20 AM
To: Rowe, Brian Lee Yung (Portfolio Analytics)
Cc: r-help at r-project.org
Subject: Re: [R] Behavior of seq with vector from
Rowe, Brian Lee Yung (Portfolio Analytics) wrote:
....
1. Hmm, not really. NA.

2. I'd view it as an outer sum, stringed out to a single vector, hence:
[1]  2  3  5  6  8  9 11 12