File: vecseq.Rd

package info (click to toggle)
r-cran-bit 4.6.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,000 kB
  • sloc: ansic: 5,145; sh: 13; makefile: 6
file content (55 lines) | stat: -rw-r--r-- 1,783 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chunkutil.R
\name{vecseq}
\alias{vecseq}
\title{Vectorized Sequences}
\usage{
vecseq(x, y = NULL, concat = TRUE, eval = TRUE)
}
\arguments{
\item{x}{vector of sequence start points}

\item{y}{vector of sequence end points (if \code{is.null(y)} then \code{x}
are taken as endpoints, all starting at 1)}

\item{concat}{vector of sequence end points (if \code{is.null(y)} then
\code{x} are taken as endpoints, all starting at 1)}

\item{eval}{vector of sequence end points (if \code{is.null(y)} then
\code{x} are taken as endpoints, all starting at 1)}
}
\value{
\itemize{
\item if \code{concat == FALSE} and \code{eval == FALSE} a list with n calls that generate sequences
\item if \code{concat == FALSE} and \code{eval == TRUE } a list with n sequences
\item if \code{concat == TRUE } and \code{eval == FALSE} a single call generating the concatenated
sequences
\item if \code{concat == TRUE} and \code{eval == TRUE } an integer vector of concatentated sequences
}
}
\description{
\code{vecseq} returns concatenated multiple sequences
}
\details{
This is a generalization of \code{\link[=sequence]{sequence()}} in that you can choose
sequence starts other than 1 and also have options to no concat and/or
return a call instead of the evaluated sequence.
}
\examples{

  sequence(c(3, 4))
  vecseq(c(3, 4))
  vecseq(c(1, 11), c(5, 15))
  vecseq(c(1, 11), c(5, 15), concat=FALSE, eval=FALSE)
  vecseq(c(1, 11), c(5, 15), concat=FALSE, eval=TRUE)
  vecseq(c(1, 11), c(5, 15), concat=TRUE, eval=FALSE)
  vecseq(c(1, 11), c(5, 15), concat=TRUE, eval=TRUE)

}
\seealso{
\code{\link{:}}, \code{\link[=seq]{seq()}}, \code{\link[=sequence]{sequence()}}
}
\author{
Angelo Canty, Jens Oehlschlägel
}
\keyword{manip}