You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: man/fread.Rd
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,15 @@ Currently, the \code{yaml} setting is somewhat inflexible with respect to incorp
118
118
119
119
When \code{input} begins with http://, https://, ftp://, ftps://, or file://, \code{fread} detects this and \emph{downloads} the target to a temporary file (at \code{tempfile()}) before proceeding to read the file as usual. URLS (ftps:// and https:// as well as ftp:// and http://) paths are downloaded with \code{download.file} and \code{method} set to \code{getOption("download.file.method")}, defaulting to \code{"auto"}; and file:// is downloaded with \code{download.file} with \code{method="internal"}. NB: this implies that for file://, even files found on the current machine will be "downloaded" (i.e., hard-copied) to a temporary file. See \code{\link{download.file}} for more details.
120
120
121
+
\bold{Automatic Decompression:}
122
+
123
+
In many cases, \code{fread} can automatically detect and decompress files with common compression extensions directly, without needing an explicit connection object or shell commands. This works by checking the file extension.
124
+
125
+
\itemize{
126
+
\item \code{.gz} and \code{.bz2} are supported out of the box.
127
+
\item \code{.zip} is also supported. If the archive contains a single data file, \code{fread} will read it. If the archive contains multiple files, \code{fread} will produce an error.
128
+
}
129
+
121
130
\bold{Shell commands:}
122
131
123
132
\code{fread} accepts shell commands for convenience. The input command is run and its output written to a file in \code{tmpdir} (\code{\link{tempdir}()} by default) to which \code{fread} is applied "as normal". The details are platform dependent -- \code{system} is used on UNIX environments, \code{shell} otherwise; see \code{\link[base]{system}}.
SEXPRCHK; // a 2 item list holding vars (result of checkVars) and not_NA_indices. PROTECTed up in fmelt so that preprocess() doesn't need to PROTECT. To pass rchk, #2865
286
-
SEXPidcols,// convenience pointers into RCHK[0][0], RCHK[0][1] and RCHK[1] respectively
287
-
variable_table,// NULL or data for variable column(s).
288
-
valuecols,// list with one element per output/value column, each element is an integer vector.
289
-
not_NA_indices;
290
-
int*isfactor,
291
-
*leach,// length of each element of the valuecols(measure.vars) list.
292
-
*isidentical; // are all inputs for this value column the same type?
293
-
intlids,// number of id columns.
294
-
lvars,// number of variable columns.
295
-
lvalues,// number of value columns.
296
-
lmax,// max length of valuecols elements / number of times to repeat ids.
297
-
totlen,// of output/long DT result of melt operation.
298
-
nrow; // of input/wide DT to be melted.
285
+
SEXPRCHK; // a 2 item list holding vars (result of checkVars) and not_NA_indices. PROTECTed up in fmelt so that preprocess() doesn't need to PROTECT. To pass rchk, #2865
286
+
SEXPidcols; // convenience pointers into RCHK[0][0], RCHK[0][1] and RCHK[1] respectively
287
+
SEXPvariable_table;// NULL or data for variable column(s).
288
+
SEXPvaluecols; // list with one element per output/value column, each element is an integer vector.
289
+
SEXPnot_NA_indices;
290
+
int*isfactor;
291
+
int*leach; // length of each element of the valuecols(measure.vars) list.
292
+
int*isidentical;// are all inputs for this value column the same type?
293
+
intlids; // number of id columns.
294
+
intlvars; // number of variable columns.
295
+
intlvalues; // number of value columns.
296
+
intlmax; // max length of valuecols elements / number of times to repeat ids.
297
+
inttotlen; // of output/long DT result of melt operation.
0 commit comments