File: chunk.Rd

package info (click to toggle)
r-cran-bit 4.0.4%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 996 kB
  • sloc: ansic: 5,083; makefile: 6
file content (60 lines) | stat: -rw-r--r-- 1,731 bytes parent folder | download | duplicates (2)
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
56
57
58
59
60
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chunkutil.R
\name{chunk}
\alias{chunk}
\alias{chunk.default}
\title{Methods for chunked range index}
\usage{
chunk(x = NULL, ...)

\method{chunk}{default}(x = NULL, ..., RECORDBYTES = NULL, BATCHBYTES = NULL)
}
\arguments{
\item{x}{the object along we want chunks}

\item{\dots}{further arguments passed to \code{\link{chunks}}}

\item{RECORDBYTES}{integer scalar representing the bytes needed to process a single element of the boolean vector (default 4 bytes for logical)}

\item{BATCHBYTES}{integer scalar limiting the number of bytes to be processed in one chunk, default from \code{getOption("ffbatchbytes")} if not null, otherwise 16777216}
}
\value{
returns a named list of \code{\link{ri}} objects 
representing chunks of subscripts
}
\description{
Calls \code{\link{chunks}} to create a sequence of range indexes along the object which causes the method dispatch.
}
\details{
\code{chunk} is generic, the default method is described here, other methods
that automatically consider RAM needs are provided with package 'ff', see
for example \code{\link[ff]{chunk.ffdf}}
}
\section{Methods (by class)}{
\itemize{
\item \code{default}: default vector method
}}

\section{available methods}{
 \code{chunk.default}, \code{\link[ff:chunk.ffdf]{chunk.ff_vector}}, \code{\link[ff]{chunk.ffdf}}
}

\examples{
  chunk(complex(1e7))
  chunk(raw(1e7))
  chunk(raw(1e7), length=3)
  
  chunks(1,10,3)
  # no longer do
  chunk(1,100,10)
  # but for bckward compatibility this works
  chunk(from=1,to=100,by=10)
  
}
\seealso{
\code{\link{chunks}}, \code{\link{ri}}, \code{\link[base]{seq}}, \code{\link{bbatch}}
}
\author{
Jens Oehlschlägel
}
\keyword{data}