Re: [R] sum portions of a vector

2012-12-10 Thread William Dunlap
org [mailto:r-help-boun...@r-project.org] On > Behalf > Of David L Carlson > Sent: Monday, December 10, 2012 12:08 PM > To: s...@gnu.org; r-help@r-project.org > Subject: Re: [R] sum portions of a vector > > How about? > > > vec <- 1:10 > > breaks <- c(3,8,1

Re: [R] sum portions of a vector

2012-12-10 Thread Marc Schwartz
On Dec 10, 2012, at 3:29 PM, Marc Schwartz wrote: > > On Dec 10, 2012, at 2:52 PM, David Winsemius wrote: > >> >> On Dec 10, 2012, at 11:29 AM, Sam Steingold wrote: >> >>> How do I sum portions of a vector into another vector? >>> E.g., for >>> --8<---cut here---star

Re: [R] sum portions of a vector

2012-12-10 Thread Marc Schwartz
On Dec 10, 2012, at 2:52 PM, David Winsemius wrote: > > On Dec 10, 2012, at 11:29 AM, Sam Steingold wrote: > >> How do I sum portions of a vector into another vector? >> E.g., for >> --8<---cut here---start->8--- >>> vec <- 1:10 >>> breaks <- c(3,8,10) >> --

Re: [R] sum portions of a vector

2012-12-10 Thread arun
- From: Sam Steingold To: r-help@r-project.org Cc: Sent: Monday, December 10, 2012 2:29 PM Subject: [R] sum portions of a vector How do I sum portions of a vector into another vector? E.g., for --8<---cut here---start->8--- > vec <- 1:10 >

Re: [R] sum portions of a vector

2012-12-10 Thread Marc Schwartz
On Dec 10, 2012, at 1:29 PM, Sam Steingold wrote: > How do I sum portions of a vector into another vector? > E.g., for > --8<---cut here---start->8--- >> vec <- 1:10 >> breaks <- c(3,8,10) > --8<---cut here---end--->8--- > I

Re: [R] sum portions of a vector

2012-12-10 Thread David Winsemius
On Dec 10, 2012, at 11:29 AM, Sam Steingold wrote: How do I sum portions of a vector into another vector? E.g., for --8<---cut here---start->8--- vec <- 1:10 breaks <- c(3,8,10) --8<---cut here---end--->8--- I want to get

Re: [R] sum portions of a vector

2012-12-10 Thread David L Carlson
:r-help-bounces@r- > project.org] On Behalf Of Sam Steingold > Sent: Monday, December 10, 2012 1:29 PM > To: r-help@r-project.org > Subject: [R] sum portions of a vector > > How do I sum portions of a vector into another vector? > E.g., for > --8<---cut here

Re: [R] sum portions of a vector

2012-12-10 Thread David Winsemius
On Dec 10, 2012, at 11:29 AM, Sam Steingold wrote: How do I sum portions of a vector into another vector? E.g., for --8<---cut here---start->8--- vec <- 1:10 breaks <- c(3,8,10) --8<---cut here---end--->8--- I want to get

[R] sum portions of a vector

2012-12-10 Thread Sam Steingold
How do I sum portions of a vector into another vector? E.g., for --8<---cut here---start->8--- > vec <- 1:10 > breaks <- c(3,8,10) --8<---cut here---end--->8--- I want to get a vector of length 3 with content --8<--