From: Dave Evens <devens8765_at_yahoo.com>

Date: Wed 20 Sep 2006 - 21:19:04 GMT

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu Sep 21 07:37:43 2006

Date: Wed 20 Sep 2006 - 21:19:04 GMT

# my vector is this

a.vector <- seq(2, by=5, length=100)

# indices where I would like to slice my vector

cut.values <- c(30, 50, 100, 109, 300, 601, 803)

# so I have to create another vector of similar length

# to use the split() command, i.e.

x <- rep(1:length(cut.values), times=diff(c(0,
cut.values))

# this means I can use split()

split(a.vector, x)

Best,

Dave.

R-help@stat.math.ethz.ch mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu Sep 21 07:37:43 2006

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.1.8, at Thu 21 Sep 2006 - 08:30:06 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*