vroom/ 0000755 0001762 0000144 00000000000 14533733452 011425 5 ustar ligges users vroom/NAMESPACE 0000644 0001762 0000144 00000005161 14533651065 012646 0 ustar ligges users # Generated by roxygen2: do not edit by hand
S3method(as.col_spec,"NULL")
S3method(as.col_spec,character)
S3method(as.col_spec,col_spec)
S3method(as.col_spec,default)
S3method(as.col_spec,list)
S3method(collector_value,collector_character)
S3method(collector_value,collector_date)
S3method(collector_value,collector_datetime)
S3method(collector_value,collector_double)
S3method(collector_value,collector_factor)
S3method(collector_value,collector_guess)
S3method(collector_value,collector_integer)
S3method(collector_value,collector_logical)
S3method(collector_value,collector_numeric)
S3method(collector_value,collector_time)
S3method(output_column,POSIXt)
S3method(output_column,character)
S3method(output_column,default)
S3method(output_column,double)
S3method(output_column,factor)
S3method(print,vroom_altrep)
S3method(summary,col_spec)
S3method(vroom_str,data.frame)
S3method(vroom_str,default)
export(as.col_spec)
export(col_big_integer)
export(col_character)
export(col_date)
export(col_datetime)
export(col_double)
export(col_factor)
export(col_guess)
export(col_integer)
export(col_logical)
export(col_number)
export(col_skip)
export(col_time)
export(cols)
export(cols_condense)
export(cols_only)
export(contains)
export(date_names)
export(date_names_lang)
export(date_names_langs)
export(default_locale)
export(ends_with)
export(everything)
export(fwf_cols)
export(fwf_empty)
export(fwf_positions)
export(fwf_widths)
export(gen_character)
export(gen_date)
export(gen_datetime)
export(gen_double)
export(gen_factor)
export(gen_integer)
export(gen_logical)
export(gen_name)
export(gen_number)
export(gen_tbl)
export(gen_time)
export(guess_type)
export(last_col)
export(locale)
export(matches)
export(num_range)
export(one_of)
export(output_column)
export(problems)
export(spec)
export(starts_with)
export(vroom)
export(vroom_altrep)
export(vroom_altrep_opts)
export(vroom_example)
export(vroom_examples)
export(vroom_format)
export(vroom_fwf)
export(vroom_lines)
export(vroom_progress)
export(vroom_str)
export(vroom_write)
export(vroom_write_lines)
import(rlang)
importFrom(bit64,integer64)
importFrom(crayon,blue)
importFrom(crayon,bold)
importFrom(crayon,cyan)
importFrom(crayon,green)
importFrom(crayon,reset)
importFrom(crayon,silver)
importFrom(glue,glue)
importFrom(lifecycle,deprecate_warn)
importFrom(lifecycle,deprecated)
importFrom(methods,setOldClass)
importFrom(tidyselect,contains)
importFrom(tidyselect,ends_with)
importFrom(tidyselect,everything)
importFrom(tidyselect,last_col)
importFrom(tidyselect,matches)
importFrom(tidyselect,num_range)
importFrom(tidyselect,one_of)
importFrom(tidyselect,starts_with)
useDynLib(vroom, .registration = TRUE)
vroom/LICENSE 0000644 0001762 0000144 00000000053 14422654617 012432 0 ustar ligges users YEAR: 2023
COPYRIGHT HOLDER: vroom authors
vroom/README.md 0000644 0001762 0000144 00000023565 14533532252 012712 0 ustar ligges users
# ππ¨vroom
[](https://github.com/tidyverse/vroom/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/tidyverse/vroom?branch=main)
[](https://cran.r-project.org/package=vroom)
[](https://lifecycle.r-lib.org/articles/stages.html#stable)
The fastest delimited reader for R, **1.23 GB/sec**.
But thatβs impossible! How can it be [so
fast](https://vroom.r-lib.org/articles/benchmarks.html)?
vroom doesnβt stop to actually *read* all of your data, it simply
indexes where each record is located so it can be read later. The
vectors returned use the [Altrep
framework](https://svn.r-project.org/R/branches/ALTREP/ALTREP.html) to
lazily load the data on-demand when it is accessed, so you only pay for
what you use. This lazy access is done automatically, so no changes to
your R data-manipulation code are needed.
vroom also uses multiple threads for indexing, materializing
non-character columns, and when writing to further improve performance.
| package | version | time (sec) | speedup | throughput |
|:-----------|--------:|-----------:|--------:|--------------:|
| vroom | 1.5.1 | 1.36 | 53.30 | 1.23 GB/sec |
| data.table | 1.14.0 | 5.83 | 12.40 | 281.65 MB/sec |
| readr | 1.4.0 | 37.30 | 1.94 | 44.02 MB/sec |
| read.delim | 4.1.0 | 72.31 | 1.00 | 22.71 MB/sec |
## Features
vroom has nearly all of the parsing features of
[readr](https://readr.tidyverse.org) for delimited and fixed width
files, including
- delimiter guessing\*
- custom delimiters (including multi-byte\* and Unicode\* delimiters)
- specification of column types (including type guessing)
- numeric types (double, integer, big integer\*, number)
- logical types
- datetime types (datetime, date, time)
- categorical types (characters, factors)
- column selection, like `dplyr::select()`\*
- skipping headers, comments and blank lines
- quoted fields
- double and backslashed escapes
- whitespace trimming
- windows newlines
- [reading from multiple files or
connections\*](#reading-multiple-files)
- embedded newlines in headers and fields\*\*
- writing delimited files with as-needed quoting.
- robust to invalid inputs (vroom has been extensively tested with the
[afl](https://lcamtuf.coredump.cx/afl/) fuzz tester)\*.
\* *these are additional features not in readr.*
\*\* *requires `num_threads = 1`.*
## Installation
Install vroom from CRAN with:
``` r
install.packages("vroom")
```
Alternatively, if you need the development version from
[GitHub](https://github.com/) install it with:
``` r
# install.packages("pak")
pak::pak("tidyverse/vroom")
```
## Usage
See [getting started](https://vroom.r-lib.org/articles/vroom.html) to
jump start your use of vroom!
vroom uses the same interface as readr to specify column types.
``` r
vroom::vroom("mtcars.tsv",
col_types = list(cyl = "i", gear = "f",hp = "i", disp = "_",
drat = "_", vs = "l", am = "l", carb = "i")
)
#> # A tibble: 32 Γ 10
#> model mpg cyl hp wt qsec vs am gear carb
#>
#> 1 Mazda RX4 21 6 110 2.62 16.5 FALSE TRUE 4 4
#> 2 Mazda RX4 Wag 21 6 110 2.88 17.0 FALSE TRUE 4 4
#> 3 Datsun 710 22.8 4 93 2.32 18.6 TRUE TRUE 4 1
#> # βΉ 29 more rows
```
## Reading multiple files
vroom natively supports reading from multiple files (or even multiple
connections!).
First we generate some files to read by splitting the nycflights dataset
by airline. For the sake of the example, weβll just take the first 2
lines of each file.
``` r
library(nycflights13)
purrr::iwalk(
split(flights, flights$carrier),
~ { .x$carrier[[1]]; vroom::vroom_write(head(.x, 2), glue::glue("flights_{.y}.tsv"), delim = "\t") }
)
```
Then we can efficiently read them into one tibble by passing the
filenames directly to vroom. The `id` argument can be used to request a
column that reveals the filename that each row originated from.
``` r
files <- fs::dir_ls(glob = "flights*tsv")
files
#> flights_9E.tsv flights_AA.tsv flights_AS.tsv flights_B6.tsv flights_DL.tsv
#> flights_EV.tsv flights_F9.tsv flights_FL.tsv flights_HA.tsv flights_MQ.tsv
#> flights_OO.tsv flights_UA.tsv flights_US.tsv flights_VX.tsv flights_WN.tsv
#> flights_YV.tsv
vroom::vroom(files, id = "source")
#> Rows: 32 Columns: 20
#> ββ Column specification ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
#> Delimiter: "\t"
#> chr (4): carrier, tailnum, origin, dest
#> dbl (14): year, month, day, dep_time, sched_dep_time, dep_delay, arr_time, ...
#> dttm (1): time_hour
#>
#> βΉ Use `spec()` to retrieve the full column specification for this data.
#> βΉ Specify the column types or set `show_col_types = FALSE` to quiet this message.
#> # A tibble: 32 Γ 20
#> source year month day dep_time sched_dep_time dep_delay arr_time
#>
#> 1 flights_9E.tsv 2013 1 1 810 810 0 1048
#> 2 flights_9E.tsv 2013 1 1 1451 1500 -9 1634
#> 3 flights_AA.tsv 2013 1 1 542 540 2 923
#> # βΉ 29 more rows
#> # βΉ 12 more variables: sched_arr_time , arr_delay , carrier ,
#> # flight , tailnum , origin , dest , air_time ,
#> # distance , hour , minute , time_hour
```
## Learning more
- [Getting started with
vroom](https://vroom.r-lib.org/articles/vroom.html)
- [π½ vroom: Because Life is too short to read
slow](https://www.youtube.com/watch?v=RA9AjqZXxMU&t=10s) -
Presentation at UseR!2019
([slides](https://speakerdeck.com/jimhester/vroom))
- [πΉ vroom: Read and write rectangular data
quickly](https://www.youtube.com/watch?v=ZP_y5eaAc60) - a video tour
of the vroom features.
## Benchmarks
The speed quoted above is from a real 1.53G dataset with 14,388,451 rows
and 11 columns, see the [benchmark
article](https://vroom.r-lib.org/articles/benchmarks.html) for full
details of the dataset and
[bench/](https://github.com/tidyverse/vroom/tree/main/inst/bench) for
the code used to retrieve the data and perform the benchmarks.
# Environment variables
In addition to the arguments to the `vroom()` function, you can control
the behavior of vroom with a few environment variables. Generally these
will not need to be set by most users.
- `VROOM_TEMP_PATH` - Path to the directory used to store temporary
files when reading from a R connection. If unset defaults to the R
sessionβs temporary directory (`tempdir()`).
- `VROOM_THREADS` - The number of processor threads to use when indexing
and parsing. If unset defaults to `parallel::detectCores()`.
- `VROOM_SHOW_PROGRESS` - Whether to show the progress bar when
indexing. Regardless of this setting the progress bar is disabled in
non-interactive settings, R notebooks, when running tests with
testthat and when knitting documents.
- `VROOM_CONNECTION_SIZE` - The size (in bytes) of the connection buffer
when reading from connections (default is 128 KiB).
- `VROOM_WRITE_BUFFER_LINES` - The number of lines to use for each
buffer when writing files (default: 1000).
There are also a family of variables to control use of the Altrep
framework. For versions of R where the Altrep framework is unavailable
(R \< 3.5.0) they are automatically turned off and the variables have no
effect. The variables can take one of `true`, `false`, `TRUE`, `FALSE`,
`1`, or `0`.
- `VROOM_USE_ALTREP_NUMERICS` - If set use Altrep for *all* numeric
types (default `false`).
There are also individual variables for each type. Currently only
`VROOM_USE_ALTREP_CHR` defaults to `true`.
- `VROOM_USE_ALTREP_CHR`
- `VROOM_USE_ALTREP_FCT`
- `VROOM_USE_ALTREP_INT`
- `VROOM_USE_ALTREP_BIG_INT`
- `VROOM_USE_ALTREP_DBL`
- `VROOM_USE_ALTREP_NUM`
- `VROOM_USE_ALTREP_LGL`
- `VROOM_USE_ALTREP_DTTM`
- `VROOM_USE_ALTREP_DATE`
- `VROOM_USE_ALTREP_TIME`
## RStudio caveats
RStudioβs environment pane calls `object.size()` when it refreshes the
pane, which for Altrep objects can be extremely slow. RStudio 1.2.1335+
includes the fixes
([RStudio#4210](https://github.com/rstudio/rstudio/pull/4210),
[RStudio#4292](https://github.com/rstudio/rstudio/pull/4292)) for this
issue, so it is recommended you use at least that version.
## Thanks
- [Gabe Becker](https://github.com/gmbecker), [Luke
Tierney](https://homepage.divms.uiowa.edu/~luke/) and [Tomas
Kalibera](https://github.com/kalibera) for conceiving, Implementing
and maintaining the [Altrep
framework](https://svn.r-project.org/R/branches/ALTREP/ALTREP.html)
- [Romain FranΓ§ois](https://github.com/romainfrancois), whose
[Altrepisode](https://web.archive.org/web/20200315075838/https://purrple.cat/blog/2018/10/14/altrep-and-cpp/)
package and [related
blog-posts](https://web.archive.org/web/20200315075838/https://purrple.cat/blog/2018/10/14/altrep-and-cpp/)
were a great guide for creating new Altrep objects in C++.
- [Matt Dowle](https://github.com/mattdowle) and the rest of the
[Rdatatable](https://github.com/Rdatatable) team,
`data.table::fread()` is blazing fast and great motivation to see how
fast we could go faster!
vroom/man/ 0000755 0001762 0000144 00000000000 14504643364 012200 5 ustar ligges users vroom/man/cols.Rd 0000644 0001762 0000144 00000010413 14362130126 013413 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/col_types.R
\name{cols}
\alias{cols}
\alias{col_types}
\alias{cols_only}
\alias{col_logical}
\alias{col_integer}
\alias{col_big_integer}
\alias{col_double}
\alias{col_character}
\alias{col_skip}
\alias{col_number}
\alias{col_guess}
\alias{col_factor}
\alias{col_datetime}
\alias{col_date}
\alias{col_time}
\title{Create column specification}
\usage{
cols(..., .default = col_guess(), .delim = NULL)
cols_only(...)
col_logical(...)
col_integer(...)
col_big_integer(...)
col_double(...)
col_character(...)
col_skip(...)
col_number(...)
col_guess(...)
col_factor(levels = NULL, ordered = FALSE, include_na = FALSE, ...)
col_datetime(format = "", ...)
col_date(format = "", ...)
col_time(format = "", ...)
}
\arguments{
\item{...}{Either column objects created by \verb{col_*()}, or their abbreviated
character names (as described in the \code{col_types} argument of
\code{\link[=vroom]{vroom()}}). If you're only overriding a few columns, it's
best to refer to columns by name. If not named, the column types must match
the column names exactly. In \verb{col_*()} functions these are stored in the
object.}
\item{.default}{Any named columns not explicitly overridden in \code{...}
will be read with this column type.}
\item{.delim}{The delimiter to use when parsing. If the \code{delim} argument
used in the call to \code{vroom()} it takes precedence over the one specified in
\code{col_types}.}
\item{levels}{Character vector of the allowed levels. When \code{levels = NULL}
(the default), \code{levels} are discovered from the unique values of \code{x}, in
the order in which they appear in \code{x}.}
\item{ordered}{Is it an ordered factor?}
\item{include_na}{If \code{TRUE} and \code{x} contains at least one \code{NA}, then \code{NA}
is included in the levels of the constructed factor.}
\item{format}{A format specification, as described below. If set to "",
date times are parsed as ISO8601, dates and times used the date and
time formats specified in the \code{\link[readr:locale]{locale()}}.
Unlike \code{\link[=strptime]{strptime()}}, the format specification must match
the complete string.}
}
\description{
\code{cols()} includes all columns in the input data, guessing the column types
as the default. \code{cols_only()} includes only the columns you explicitly
specify, skipping the rest.
}
\details{
The available specifications are: (long names in quotes and string abbreviations in brackets)\tabular{llll}{
function \tab long name \tab short name \tab description \cr
\code{col_logical()} \tab "logical" \tab "l" \tab Logical values containing only \code{T}, \code{F}, \code{TRUE} or \code{FALSE}. \cr
\code{col_integer()} \tab "integer" \tab "i" \tab Integer numbers. \cr
\code{col_big_integer()} \tab "big_integer" \tab "I" \tab Big Integers (64bit), requires the \code{bit64} package. \cr
\code{col_double()} \tab "double", "numeric" \tab "d" \tab 64-bit double floating point numbers. \cr
\code{col_character()} \tab "character" \tab "c" \tab Character string data. \cr
\code{col_factor(levels, ordered)} \tab "factor" \tab "f" \tab A fixed set of values. \cr
\code{col_date(format = "")} \tab "date" \tab "D" \tab Calendar dates formatted with the locale's \code{date_format}. \cr
\code{col_time(format = "")} \tab "time" \tab "t" \tab Times formatted with the locale's \code{time_format}. \cr
\code{col_datetime(format = "")} \tab "datetime", "POSIXct" \tab "T" \tab ISO8601 date times. \cr
\code{col_number()} \tab "number" \tab "n" \tab Human readable numbers containing the \code{grouping_mark} \cr
\code{col_skip()} \tab "skip", "NULL" \tab "_", "-" \tab Skip and don't import this column. \cr
\code{col_guess()} \tab "guess", "NA" \tab "?" \tab Parse using the "best" guessed type based on the input. \cr
}
}
\examples{
cols(a = col_integer())
cols_only(a = col_integer())
# You can also use the standard abbreviations
cols(a = "i")
cols(a = "i", b = "d", c = "_")
# Or long names (like utils::read.csv)
cols(a = "integer", b = "double", c = "skip")
# You can also use multiple sets of column definitions by combining
# them like so:
t1 <- cols(
column_one = col_integer(),
column_two = col_number())
t2 <- cols(
column_three = col_character())
t3 <- t1
t3$cols <- c(t1$cols, t2$cols)
t3
}
vroom/man/vroom_write_lines.Rd 0000644 0001762 0000144 00000001761 14363145201 016230 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vroom_write.R
\name{vroom_write_lines}
\alias{vroom_write_lines}
\title{Write lines to a file}
\usage{
vroom_write_lines(
x,
file,
eol = "\\n",
na = "NA",
append = FALSE,
num_threads = vroom_threads()
)
}
\arguments{
\item{x}{A character vector.}
\item{file}{File or connection to write to.}
\item{eol}{The end of line character to use. Most commonly either \code{"\n"} for
Unix style newlines, or \code{"\r\n"} for Windows style newlines.}
\item{na}{String used for missing values. Defaults to 'NA'.}
\item{append}{If \code{FALSE}, will overwrite existing file. If \code{TRUE},
will append to existing file. In both cases, if the file does not exist a new
file is created.}
\item{num_threads}{Number of threads to use when reading and materializing
vectors. If your data contains newlines within fields the parser will
automatically be forced to use a single thread only.}
}
\description{
Write lines to a file
}
vroom/man/problems.Rd 0000644 0001762 0000144 00000001755 14362130126 014307 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/problems.R
\name{problems}
\alias{problems}
\title{Retrieve parsing problems}
\usage{
problems(x = .Last.value, lazy = FALSE)
}
\arguments{
\item{x}{A data frame from \code{vroom::vroom()}.}
\item{lazy}{If \code{TRUE}, just the problems found so far are returned. If
\code{FALSE} (the default) the lazy data is first read completely and all
problems are returned.}
}
\value{
A data frame with one row for each problem and four columns:
\itemize{
\item row,col - Row and column number that caused the problem, referencing the
original input
\item expected - What vroom expected to find
\item actual - What it actually found
\item file - The file with the problem
}
}
\description{
vroom will only fail to parse a file if the file is invalid in a way that is
unrecoverable. However there are a number of non-fatal problems that you
might want to know about. You can retrieve a data frame of these problems
with this function.
}
vroom/man/vroom_format.Rd 0000644 0001762 0000144 00000004163 14362130126 015172 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vroom_write.R
\name{vroom_format}
\alias{vroom_format}
\title{Convert a data frame to a delimited string}
\usage{
vroom_format(
x,
delim = "\\t",
eol = "\\n",
na = "NA",
col_names = TRUE,
escape = c("double", "backslash", "none"),
quote = c("needed", "all", "none"),
bom = FALSE,
num_threads = vroom_threads()
)
}
\arguments{
\item{x}{A data frame or tibble to write to disk.}
\item{delim}{Delimiter used to separate values. Defaults to \verb{\\t} to write
tab separated value (TSV) files.}
\item{eol}{The end of line character to use. Most commonly either \code{"\n"} for
Unix style newlines, or \code{"\r\n"} for Windows style newlines.}
\item{na}{String used for missing values. Defaults to 'NA'.}
\item{col_names}{If \code{FALSE}, column names will not be included at the top of the file. If \code{TRUE},
column names will be included. If not specified, \code{col_names} will take the opposite value given to \code{append}.}
\item{escape}{The type of escape to use when quotes are in the data.
\itemize{
\item \code{double} - quotes are escaped by doubling them.
\item \code{backslash} - quotes are escaped by a preceding backslash.
\item \code{none} - quotes are not escaped.
}}
\item{quote}{How to handle fields which contain characters that need to be
quoted.
\itemize{
\item \code{needed} - Values are only quoted if needed: if they contain a delimiter,
quote, or newline.
\item \code{all} - Quote all fields.
\item \code{none} - Never quote fields.
}}
\item{bom}{If \code{TRUE} add a UTF-8 BOM at the beginning of the file. This is
recommended when saving data for consumption by excel, as it will force
excel to read the data with the correct encoding (UTF-8)}
\item{num_threads}{Number of threads to use when reading and materializing
vectors. If your data contains newlines within fields the parser will
automatically be forced to use a single thread only.}
}
\description{
This is equivalent to \code{\link[=vroom_write]{vroom_write()}}, but instead of writing to
disk, it returns a string. It is primarily useful for examples and for
testing.
}
vroom/man/date_names.Rd 0000644 0001762 0000144 00000002130 14132374245 014557 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/date.R
\name{date_names}
\alias{date_names}
\alias{date_names_lang}
\alias{date_names_langs}
\title{Create or retrieve date names}
\usage{
date_names(mon, mon_ab = mon, day, day_ab = day, am_pm = c("AM", "PM"))
date_names_lang(language)
date_names_langs()
}
\arguments{
\item{mon, mon_ab}{Full and abbreviated month names.}
\item{day, day_ab}{Full and abbreviated week day names. Starts with Sunday.}
\item{am_pm}{Names used for AM and PM.}
\item{language}{A BCP 47 locale, made up of a language and a region,
e.g. \code{"en_US"} for American English. See \code{date_names_langs()}
for a complete list of available locales.}
}
\description{
When parsing dates, you often need to know how weekdays of the week and
months are represented as text. This pair of functions allows you to either
create your own, or retrieve from a standard list. The standard list is
derived from ICU (\verb{https://site.icu-project.org}) via the \emph{stringi} package.
}
\examples{
date_names_lang("en")
date_names_lang("ko")
date_names_lang("fr")
}
vroom/man/vroom_fwf.Rd 0000644 0001762 0000144 00000021427 14533532502 014472 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vroom_fwf.R
\name{vroom_fwf}
\alias{vroom_fwf}
\alias{fwf_empty}
\alias{fwf_widths}
\alias{fwf_positions}
\alias{fwf_cols}
\title{Read a fixed width file into a tibble}
\usage{
vroom_fwf(
file,
col_positions = fwf_empty(file, skip, n = guess_max),
col_types = NULL,
col_select = NULL,
id = NULL,
locale = default_locale(),
na = c("", "NA"),
comment = "",
skip_empty_rows = TRUE,
trim_ws = TRUE,
skip = 0,
n_max = Inf,
guess_max = 100,
altrep = TRUE,
altrep_opts = deprecated(),
num_threads = vroom_threads(),
progress = vroom_progress(),
show_col_types = NULL,
.name_repair = "unique"
)
fwf_empty(file, skip = 0, col_names = NULL, comment = "", n = 100L)
fwf_widths(widths, col_names = NULL)
fwf_positions(start, end = NULL, col_names = NULL)
fwf_cols(...)
}
\arguments{
\item{file}{Either a path to a file, a connection, or literal data
(either a single string or a raw vector).
Files ending in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} will
be automatically uncompressed. Files starting with \verb{http://},
\verb{https://}, \verb{ftp://}, or \verb{ftps://} will be automatically
downloaded. Remote gz files can also be automatically downloaded and
decompressed.
Literal data is most useful for examples and tests. To be recognised as
literal data, the input must be either wrapped with \code{I()}, be a string
containing at least one new line, or be a vector containing at least one
string with a new line.
Using a value of \code{\link[readr:clipboard]{clipboard()}} will read from the system clipboard.}
\item{col_positions}{Column positions, as created by \code{\link[readr:fwf_empty]{fwf_empty()}},
\code{\link[readr:fwf_widths]{fwf_widths()}} or \code{\link[readr:fwf_positions]{fwf_positions()}}. To read in only selected fields,
use \code{\link[readr:fwf_positions]{fwf_positions()}}. If the width of the last column is variable (a
ragged fwf file), supply the last end position as NA.}
\item{col_types}{One of \code{NULL}, a \code{\link[readr:cols]{cols()}} specification, or
a string. See \code{vignette("readr")} for more details.
If \code{NULL}, all column types will be inferred from \code{guess_max} rows of the
input, interspersed throughout the file. This is convenient (and fast),
but not robust. If the guessed types are wrong, you'll need to increase
\code{guess_max} or supply the correct types yourself.
Column specifications created by \code{\link[=list]{list()}} or \code{\link[readr:cols]{cols()}} must contain
one column specification for each column. If you only want to read a
subset of the columns, use \code{\link[readr:cols_only]{cols_only()}}.
Alternatively, you can use a compact string representation where each
character represents one column:
\itemize{
\item c = character
\item i = integer
\item n = number
\item d = double
\item l = logical
\item f = factor
\item D = date
\item T = date time
\item t = time
\item ? = guess
\item _ or - = skip
}
By default, reading a file without a column specification will print a
message showing what \code{readr} guessed they were. To remove this message,
set \code{show_col_types = FALSE} or set `options(readr.show_col_types = FALSE).}
\item{col_select}{Columns to include in the results. You can use the same
mini-language as \code{dplyr::select()} to refer to the columns by name. Use
\code{c()} to use more than one selection expression. Although this
usage is less common, \code{col_select} also accepts a numeric column index. See
\code{\link[tidyselect:language]{?tidyselect::language}} for full details on the
selection language.}
\item{id}{The name of a column in which to store the file path. This is
useful when reading multiple input files and there is data in the file
paths, such as the data collection date. If \code{NULL} (the default) no extra
column is created.}
\item{locale}{The locale controls defaults that vary from place to place.
The default locale is US-centric (like R), but you can use
\code{\link[readr:locale]{locale()}} to create your own locale that controls things like
the default time zone, encoding, decimal mark, big mark, and day/month
names.}
\item{na}{Character vector of strings to interpret as missing values. Set this
option to \code{character()} to indicate no missing values.}
\item{comment}{A string used to identify comments. Any text after the
comment characters will be silently ignored.}
\item{skip_empty_rows}{Should blank rows be ignored altogether? i.e. If this
option is \code{TRUE} then blank rows will not be represented at all. If it is
\code{FALSE} then they will be represented by \code{NA} values in all the columns.}
\item{trim_ws}{Should leading and trailing whitespace (ASCII spaces and tabs) be trimmed from
each field before parsing it?}
\item{skip}{Number of lines to skip before reading data.}
\item{n_max}{Maximum number of lines to read.}
\item{guess_max}{Maximum number of lines to use for guessing column types.
Will never use more than the number of lines read.
See \code{vignette("column-types", package = "readr")} for more details.}
\item{altrep}{Control which column types use Altrep representations,
either a character vector of types, \code{TRUE} or \code{FALSE}. See
\code{\link[=vroom_altrep]{vroom_altrep()}} for for full details.}
\item{altrep_opts}{\Sexpr[results=rd, stage=render]{lifecycle::badge("deprecated")}}
\item{num_threads}{The number of processing threads to use for initial
parsing and lazy reading of data. If your data contains newlines within
fields the parser should automatically detect this and fall back to using
one thread only. However if you know your file has newlines within quoted
fields it is safest to set \code{num_threads = 1} explicitly.}
\item{progress}{Display a progress bar? By default it will only display
in an interactive session and not while knitting a document. The automatic
progress bar can be disabled by setting option \code{readr.show_progress} to
\code{FALSE}.}
\item{show_col_types}{If \code{FALSE}, do not show the guessed column types. If
\code{TRUE} always show the column types, even if they are supplied. If \code{NULL}
(the default) only show the column types if they are not explicitly supplied
by the \code{col_types} argument.}
\item{.name_repair}{Handling of column names. The default behaviour is to
ensure column names are \code{"unique"}. Various repair strategies are
supported:
\itemize{
\item \code{"minimal"}: No name repair or checks, beyond basic existence of names.
\item \code{"unique"} (default value): Make sure names are unique and not empty.
\item \code{"check_unique"}: no name repair, but check they are \code{unique}.
\item \code{"universal"}: Make the names \code{unique} and syntactic.
\item A function: apply custom name repair (e.g., \code{name_repair = make.names}
for names in the style of base R).
\item A purrr-style anonymous function, see \code{\link[rlang:as_function]{rlang::as_function()}}.
}
This argument is passed on as \code{repair} to \code{\link[vctrs:vec_as_names]{vctrs::vec_as_names()}}.
See there for more details on these terms and the strategies used
to enforce them.}
\item{col_names}{Either NULL, or a character vector column names.}
\item{n}{Number of lines the tokenizer will read to determine file structure. By default
it is set to 100.}
\item{widths}{Width of each field. Use NA as width of last field when
reading a ragged fwf file.}
\item{start, end}{Starting and ending (inclusive) positions of each field.
Use NA as last end field when reading a ragged fwf file.}
\item{...}{If the first element is a data frame,
then it must have all numeric columns and either one or two rows.
The column names are the variable names. The column values are the
variable widths if a length one vector, and if length two, variable start and end
positions. The elements of \code{...} are used to construct a data frame
with or or two rows as above.}
}
\description{
Read a fixed width file into a tibble
}
\details{
\emph{Note}: \code{fwf_empty()} cannot take a R connection such as a URL as input, as
this would result in reading from the connection twice. In these cases it is
better to download the file first before reading.
}
\examples{
fwf_sample <- vroom_example("fwf-sample.txt")
writeLines(vroom_lines(fwf_sample))
# You can specify column positions in several ways:
# 1. Guess based on position of empty columns
vroom_fwf(fwf_sample, fwf_empty(fwf_sample, col_names = c("first", "last", "state", "ssn")))
# 2. A vector of field widths
vroom_fwf(fwf_sample, fwf_widths(c(20, 10, 12), c("name", "state", "ssn")))
# 3. Paired vectors of start and end positions
vroom_fwf(fwf_sample, fwf_positions(c(1, 30), c(20, 42), c("name", "ssn")))
# 4. Named arguments with start and end positions
vroom_fwf(fwf_sample, fwf_cols(name = c(1, 20), ssn = c(30, 42)))
# 5. Named arguments with column widths
vroom_fwf(fwf_sample, fwf_cols(name = 20, state = 10, ssn = 12))
}
vroom/man/vroom_str.Rd 0000644 0001762 0000144 00000000731 14132374245 014516 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/altrep.R
\name{vroom_str}
\alias{vroom_str}
\title{Structure of objects}
\usage{
vroom_str(x)
}
\arguments{
\item{x}{a vector}
}
\description{
Similar to \code{str()} but with more information for Altrep objects.
}
\examples{
# when used on non-altrep objects altrep will always be false
vroom_str(mtcars)
mt <- vroom(vroom_example("mtcars.csv"), ",", altrep = c("chr", "dbl"))
vroom_str(mt)
}
vroom/man/generators.Rd 0000644 0001762 0000144 00000004007 14132374245 014635 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generator.R
\name{generators}
\alias{generators}
\alias{gen_character}
\alias{gen_double}
\alias{gen_number}
\alias{gen_integer}
\alias{gen_factor}
\alias{gen_time}
\alias{gen_date}
\alias{gen_datetime}
\alias{gen_logical}
\alias{gen_name}
\title{Generate individual vectors of the types supported by vroom}
\usage{
gen_character(n, min = 5, max = 25, values = c(letters, LETTERS, 0:9), ...)
gen_double(n, f = stats::rnorm, ...)
gen_number(n, f = stats::rnorm, ...)
gen_integer(n, min = 1L, max = .Machine$integer.max, prob = NULL, ...)
gen_factor(
n,
levels = NULL,
ordered = FALSE,
num_levels = gen_integer(1L, 1L, 25L),
...
)
gen_time(n, min = 0, max = hms::hms(days = 1), fractional = FALSE, ...)
gen_date(n, min = as.Date("2001-01-01"), max = as.Date("2021-01-01"), ...)
gen_datetime(
n,
min = as.POSIXct("2001-01-01"),
max = as.POSIXct("2021-01-01"),
tz = "UTC",
...
)
gen_logical(n, ...)
gen_name(n)
}
\arguments{
\item{n}{The size of the vector to generate}
\item{min}{The minimum range for the vector}
\item{max}{The maximum range for the vector}
\item{values}{The explicit values to use.}
\item{...}{Additional arguments passed to internal generation functions}
\item{f}{The random function to use.}
\item{prob}{a vector of probability weights for obtaining the elements
of the vector being sampled.}
\item{levels}{The explicit levels to use, if \code{NULL} random levels are generated using \code{\link[=gen_name]{gen_name()}}.}
\item{ordered}{Should the factors be ordered factors?}
\item{num_levels}{The number of factor levels to generate}
\item{fractional}{Whether to generate times with fractional seconds}
\item{tz}{The timezone to use for dates}
}
\description{
Generate individual vectors of the types supported by vroom
}
\examples{
# characters
gen_character(4)
# factors
gen_factor(4)
# logical
gen_logical(4)
# numbers
gen_double(4)
gen_integer(4)
# temporal data
gen_time(4)
gen_date(4)
gen_datetime(4)
}
vroom/man/vroom.Rd 0000644 0001762 0000144 00000022555 14505325006 013631 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vroom.R
\name{vroom}
\alias{vroom}
\title{Read a delimited file into a tibble}
\usage{
vroom(
file,
delim = NULL,
col_names = TRUE,
col_types = NULL,
col_select = NULL,
id = NULL,
skip = 0,
n_max = Inf,
na = c("", "NA"),
quote = "\\"",
comment = "",
skip_empty_rows = TRUE,
trim_ws = TRUE,
escape_double = TRUE,
escape_backslash = FALSE,
locale = default_locale(),
guess_max = 100,
altrep = TRUE,
altrep_opts = deprecated(),
num_threads = vroom_threads(),
progress = vroom_progress(),
show_col_types = NULL,
.name_repair = "unique"
)
}
\arguments{
\item{file}{Either a path to a file, a connection, or literal data (either a
single string or a raw vector). \code{file} can also be a character vector
containing multiple filepaths or a list containing multiple connections.
Files ending in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} will be automatically
uncompressed. Files starting with \verb{http://}, \verb{https://}, \verb{ftp://}, or
\verb{ftps://} will be automatically downloaded. Remote gz files can also be
automatically downloaded and decompressed.
Literal data is most useful for examples and tests. To be recognised as
literal data, wrap the input with \code{I()}.}
\item{delim}{One or more characters used to delimit fields within a
file. If \code{NULL} the delimiter is guessed from the set of \code{c(",", "\\t", " ", "|", ":", ";")}.}
\item{col_names}{Either \code{TRUE}, \code{FALSE} or a character vector
of column names.
If \code{TRUE}, the first row of the input will be used as the column
names, and will not be included in the data frame. If \code{FALSE}, column
names will be generated automatically: X1, X2, X3 etc.
If \code{col_names} is a character vector, the values will be used as the
names of the columns, and the first row of the input will be read into
the first row of the output data frame.
Missing (\code{NA}) column names will generate a warning, and be filled
in with dummy names \code{...1}, \code{...2} etc. Duplicate column names
will generate a warning and be made unique, see \code{name_repair} to control
how this is done.}
\item{col_types}{One of \code{NULL}, a \code{\link[=cols]{cols()}} specification, or
a string.
If \code{NULL}, all column types will be imputed from \code{guess_max} rows
on the input interspersed throughout the file. This is convenient (and
fast), but not robust. If the imputation fails, you'll need to increase
the \code{guess_max} or supply the correct types yourself.
Column specifications created by \code{\link[=list]{list()}} or \code{\link[=cols]{cols()}} must contain
one column specification for each column. If you only want to read a
subset of the columns, use \code{\link[=cols_only]{cols_only()}}.
Alternatively, you can use a compact string representation where each
character represents one column:
\itemize{
\item c = character
\item i = integer
\item n = number
\item d = double
\item l = logical
\item f = factor
\item D = date
\item T = date time
\item t = time
\item ? = guess
\item _ or - = skip
By default, reading a file without a column specification will print a
message showing what \code{readr} guessed they were. To remove this message,
set \code{show_col_types = FALSE} or set \code{options(readr.show_col_types = FALSE)}.
}}
\item{col_select}{Columns to include in the results. You can use the same
mini-language as \code{dplyr::select()} to refer to the columns by name. Use
\code{c()} to use more than one selection expression. Although this
usage is less common, \code{col_select} also accepts a numeric column index. See
\code{\link[tidyselect:language]{?tidyselect::language}} for full details on the
selection language.}
\item{id}{Either a string or 'NULL'. If a string, the output will contain a
variable with that name with the filename(s) as the value. If 'NULL', the
default, no variable will be created.}
\item{skip}{Number of lines to skip before reading data. If \code{comment} is
supplied any commented lines are ignored \emph{after} skipping.}
\item{n_max}{Maximum number of lines to read.}
\item{na}{Character vector of strings to interpret as missing values. Set this
option to \code{character()} to indicate no missing values.}
\item{quote}{Single character used to quote strings.}
\item{comment}{A string used to identify comments. Any text after the
comment characters will be silently ignored.}
\item{skip_empty_rows}{Should blank rows be ignored altogether? i.e. If this
option is \code{TRUE} then blank rows will not be represented at all. If it is
\code{FALSE} then they will be represented by \code{NA} values in all the columns.}
\item{trim_ws}{Should leading and trailing whitespace (ASCII spaces and tabs) be trimmed from
each field before parsing it?}
\item{escape_double}{Does the file escape quotes by doubling them?
i.e. If this option is \code{TRUE}, the value '""' represents
a single quote, '"'.}
\item{escape_backslash}{Does the file use backslashes to escape special
characters? This is more general than \code{escape_double} as backslashes
can be used to escape the delimiter character, the quote character, or
to add special characters like \verb{\\\\n}.}
\item{locale}{The locale controls defaults that vary from place to place.
The default locale is US-centric (like R), but you can use
\code{\link[=locale]{locale()}} to create your own locale that controls things like
the default time zone, encoding, decimal mark, big mark, and day/month
names.}
\item{guess_max}{Maximum number of lines to use for guessing column types.
See \code{vignette("column-types", package = "readr")} for more details.}
\item{altrep}{Control which column types use Altrep representations,
either a character vector of types, \code{TRUE} or \code{FALSE}. See
\code{\link[=vroom_altrep]{vroom_altrep()}} for for full details.}
\item{altrep_opts}{\Sexpr[results=rd, stage=render]{lifecycle::badge("deprecated")}}
\item{num_threads}{Number of threads to use when reading and materializing
vectors. If your data contains newlines within fields the parser will
automatically be forced to use a single thread only.}
\item{progress}{Display a progress bar? By default it will only display
in an interactive session and not while knitting a document. The automatic
progress bar can be disabled by setting option \code{readr.show_progress} to
\code{FALSE}.}
\item{show_col_types}{Control showing the column specifications. If \code{TRUE}
column specifications are always show, if \code{FALSE} they are never shown. If
\code{NULL} (the default) they are shown only if an explicit specification is not
given to \code{col_types}.}
\item{.name_repair}{Handling of column names. The default behaviour is to
ensure column names are \code{"unique"}. Various repair strategies are
supported:
\itemize{
\item \code{"minimal"}: No name repair or checks, beyond basic existence of names.
\item \code{"unique"} (default value): Make sure names are unique and not empty.
\item \code{"check_unique"}: no name repair, but check they are \code{unique}.
\item \code{"universal"}: Make the names \code{unique} and syntactic.
\item A function: apply custom name repair (e.g., \code{name_repair = make.names}
for names in the style of base R).
\item A purrr-style anonymous function, see \code{\link[rlang:as_function]{rlang::as_function()}}.
}
This argument is passed on as \code{repair} to \code{\link[vctrs:vec_as_names]{vctrs::vec_as_names()}}.
See there for more details on these terms and the strategies used
to enforce them.}
}
\description{
Read a delimited file into a tibble
}
\examples{
# get path to example file
input_file <- vroom_example("mtcars.csv")
input_file
# Read from a path
# Input sources -------------------------------------------------------------
# Read from a path
vroom(input_file)
# You can also use paths directly
# vroom("mtcars.csv")
\dontrun{
# Including remote paths
vroom("https://github.com/tidyverse/vroom/raw/main/inst/extdata/mtcars.csv")
}
# Or directly from a string with `I()`
vroom(I("x,y\n1,2\n3,4\n"))
# Column selection ----------------------------------------------------------
# Pass column names or indexes directly to select them
vroom(input_file, col_select = c(model, cyl, gear))
vroom(input_file, col_select = c(1, 3, 11))
# Or use the selection helpers
vroom(input_file, col_select = starts_with("d"))
# You can also rename specific columns
vroom(input_file, col_select = c(car = model, everything()))
# Column types --------------------------------------------------------------
# By default, vroom guesses the columns types, looking at 1000 rows
# throughout the dataset.
# You can specify them explicitly with a compact specification:
vroom(I("x,y\n1,2\n3,4\n"), col_types = "dc")
# Or with a list of column types:
vroom(I("x,y\n1,2\n3,4\n"), col_types = list(col_double(), col_character()))
# File types ----------------------------------------------------------------
# csv
vroom(I("a,b\n1.0,2.0\n"), delim = ",")
# tsv
vroom(I("a\tb\n1.0\t2.0\n"))
# Other delimiters
vroom(I("a|b\n1.0|2.0\n"), delim = "|")
# Read datasets across multiple files ---------------------------------------
mtcars_by_cyl <- vroom_example(vroom_examples("mtcars-"))
mtcars_by_cyl
# Pass the filenames directly to vroom, they are efficiently combined
vroom(mtcars_by_cyl)
# If you need to extract data from the filenames, use `id` to request a
# column that reveals the underlying file path
dat <- vroom(mtcars_by_cyl, id = "source")
dat$source <- basename(dat$source)
dat
}
vroom/man/spec.Rd 0000644 0001762 0000144 00000001321 14132374245 013412 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/col_types.R
\name{cols_condense}
\alias{cols_condense}
\alias{spec}
\title{Examine the column specifications for a data frame}
\usage{
cols_condense(x)
spec(x)
}
\arguments{
\item{x}{The data frame object to extract from}
}
\value{
A col_spec object.
}
\description{
\code{cols_condense()} takes a spec object and condenses its definition by setting
the default column type to the most frequent type and only listing columns
with a different type.
\code{spec()} extracts the full column specification from a tibble
created by readr.
}
\examples{
df <- vroom(vroom_example("mtcars.csv"))
s <- spec(df)
s
cols_condense(s)
}
\concept{parsers}
vroom/man/output_column.Rd 0000644 0001762 0000144 00000001114 14132374245 015375 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vroom_write.R
\name{output_column}
\alias{output_column}
\title{Preprocess column for output}
\usage{
output_column(x)
}
\arguments{
\item{x}{A vector}
}
\description{
This is a generic function that applied to each column before it is saved
to disk. It provides a hook for S3 classes that need special handling.
}
\examples{
# Most types are returned unchanged
output_column(1)
output_column("x")
# datetimes are formatted in ISO 8601
output_column(Sys.Date())
output_column(Sys.time())
}
\keyword{internal}
vroom/man/vroom_lines.Rd 0000644 0001762 0000144 00000006040 14505325006 015012 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vroom_lines.R
\name{vroom_lines}
\alias{vroom_lines}
\title{Read lines from a file}
\usage{
vroom_lines(
file,
n_max = Inf,
skip = 0,
na = character(),
skip_empty_rows = FALSE,
locale = default_locale(),
altrep = TRUE,
altrep_opts = deprecated(),
num_threads = vroom_threads(),
progress = vroom_progress()
)
}
\arguments{
\item{file}{Either a path to a file, a connection, or literal data (either a
single string or a raw vector). \code{file} can also be a character vector
containing multiple filepaths or a list containing multiple connections.
Files ending in \code{.gz}, \code{.bz2}, \code{.xz}, or \code{.zip} will be automatically
uncompressed. Files starting with \verb{http://}, \verb{https://}, \verb{ftp://}, or
\verb{ftps://} will be automatically downloaded. Remote gz files can also be
automatically downloaded and decompressed.
Literal data is most useful for examples and tests. To be recognised as
literal data, wrap the input with \code{I()}.}
\item{n_max}{Maximum number of lines to read.}
\item{skip}{Number of lines to skip before reading data. If \code{comment} is
supplied any commented lines are ignored \emph{after} skipping.}
\item{na}{Character vector of strings to interpret as missing values. Set this
option to \code{character()} to indicate no missing values.}
\item{skip_empty_rows}{Should blank rows be ignored altogether? i.e. If this
option is \code{TRUE} then blank rows will not be represented at all. If it is
\code{FALSE} then they will be represented by \code{NA} values in all the columns.}
\item{locale}{The locale controls defaults that vary from place to place.
The default locale is US-centric (like R), but you can use
\code{\link[=locale]{locale()}} to create your own locale that controls things like
the default time zone, encoding, decimal mark, big mark, and day/month
names.}
\item{altrep}{Control which column types use Altrep representations,
either a character vector of types, \code{TRUE} or \code{FALSE}. See
\code{\link[=vroom_altrep]{vroom_altrep()}} for for full details.}
\item{altrep_opts}{\Sexpr[results=rd, stage=render]{lifecycle::badge("deprecated")}}
\item{num_threads}{Number of threads to use when reading and materializing
vectors. If your data contains newlines within fields the parser will
automatically be forced to use a single thread only.}
\item{progress}{Display a progress bar? By default it will only display
in an interactive session and not while knitting a document. The automatic
progress bar can be disabled by setting option \code{readr.show_progress} to
\code{FALSE}.}
}
\description{
\code{vroom_lines()} is similar to \code{readLines()}, however it reads the lines
lazily like \code{\link[=vroom]{vroom()}}, so operations like \code{length()}, \code{head()}, \code{tail()} and \code{sample()}
can be done much more efficiently without reading all the data into R.
}
\examples{
lines <- vroom_lines(vroom_example("mtcars.csv"))
length(lines)
head(lines, n = 2)
tail(lines, n = 2)
sample(lines, size = 2)
}
vroom/man/vroom_example.Rd 0000644 0001762 0000144 00000001350 14505365056 015343 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/example.R
\name{vroom_example}
\alias{vroom_example}
\alias{vroom_examples}
\title{Get path to vroom examples}
\usage{
vroom_example(path)
vroom_examples(pattern = NULL)
}
\arguments{
\item{path}{Name of file.}
\item{pattern}{A regular expression of filenames to match. If \code{NULL}, all
available files are returned.}
}
\description{
vroom comes bundled with a number of sample files in
its 'inst/extdata' directory. Use \code{vroom_examples()} to list all the
available examples and \code{vroom_example()} to retrieve the path to one
example.
}
\examples{
# List all available examples
vroom_examples()
# Get path to one example
vroom_example("mtcars.csv")
}
vroom/man/vroom_altrep.Rd 0000644 0001762 0000144 00000003226 14132374245 015177 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vroom.R
\name{vroom_altrep}
\alias{vroom_altrep}
\title{Show which column types are using Altrep}
\usage{
vroom_altrep(which = NULL)
}
\arguments{
\item{which}{A character vector of column types to use Altrep for. Can also
take \code{TRUE} or \code{FALSE} to use Altrep for all possible or none of the
types}
}
\description{
\code{vroom_altrep()} can be used directly as input to the \code{altrep}
argument of \code{\link[=vroom]{vroom()}}.
}
\details{
Alternatively there is also a family of environment variables to control use of
the Altrep framework. These can then be set in your \code{.Renviron} file, e.g.
with \code{usethis::edit_r_environ()}. For versions of R where the Altrep
framework is unavailable (R < 3.5.0) they are automatically turned off and
the variables have no effect. The variables can take one of \code{true}, \code{false},
\code{TRUE}, \code{FALSE}, \code{1}, or \code{0}.
\itemize{
\item \code{VROOM_USE_ALTREP_NUMERICS} - If set use Altrep for \emph{all} numeric types
(default \code{false}).
}
There are also individual variables for each type. Currently only
\code{VROOM_USE_ALTREP_CHR} defaults to \code{true}.
\itemize{
\item \code{VROOM_USE_ALTREP_CHR}
\item \code{VROOM_USE_ALTREP_FCT}
\item \code{VROOM_USE_ALTREP_INT}
\item \code{VROOM_USE_ALTREP_BIG_INT}
\item \code{VROOM_USE_ALTREP_DBL}
\item \code{VROOM_USE_ALTREP_NUM}
\item \code{VROOM_USE_ALTREP_LGL}
\item \code{VROOM_USE_ALTREP_DTTM}
\item \code{VROOM_USE_ALTREP_DATE}
\item \code{VROOM_USE_ALTREP_TIME}
}
}
\examples{
vroom_altrep()
vroom_altrep(c("chr", "fct", "int"))
vroom_altrep(TRUE)
vroom_altrep(FALSE)
}
vroom/man/vroom_altrep_opts.Rd 0000644 0001762 0000144 00000001044 14132374245 016240 0 ustar ligges users % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vroom.R
\name{vroom_altrep_opts}
\alias{vroom_altrep_opts}
\title{Show which column types are using Altrep}
\usage{
vroom_altrep_opts(which = NULL)
}
\arguments{
\item{which}{A character vector of column types to use Altrep for. Can also
take \code{TRUE} or \code{FALSE} to use Altrep for all possible or none of the
types}
}
\description{
\Sexpr[results=rd, stage=render]{lifecycle::badge("deprecated")}
This function is deprecated in favor of \code{vroom_altrep()}.
}
vroom/man/figures/ 0000755 0001762 0000144 00000000000 14504102737 013636 5 ustar ligges users vroom/man/figures/lifecycle-defunct.svg 0000644 0001762 0000144 00000002424 14504102737 017746 0 ustar ligges users
vroom/man/figures/lifecycle-maturing.svg 0000644 0001762 0000144 00000002430 14504102737 020141 0 ustar ligges users
vroom/man/figures/logo.png 0000644 0001762 0000144 00000054271 14132374245 015317 0 ustar ligges users PNG
IHDR π ·ΊO gAMA ±όa cHRM z&