| Line 188... |
Line 188... |
| 188 |
|
188 |
|
| 189 |
\item{fileEncoding}{character string: if non-empty declares the
|
189 |
\item{fileEncoding}{character string: if non-empty declares the
|
| 190 |
encoding used on a file when given as a character string (not on an
|
190 |
encoding used on a file when given as a character string (not on an
|
| 191 |
existing connection) so the character data can
|
191 |
existing connection) so the character data can
|
| 192 |
be re-encoded. See the \sQuote{Encoding} section of the help for
|
192 |
be re-encoded. See the \sQuote{Encoding} section of the help for
|
| 193 |
\code{\link{file}}, the \sQuote{R Data Import/Export} manual and
|
193 |
\code{\link{file}}, \manual{R-data}{Variations on read.table}, and
|
| 194 |
\sQuote{Note}.
|
194 |
\sQuote{Note}.
|
| 195 |
}
|
195 |
}
|
| 196 |
|
196 |
|
| 197 |
\item{encoding}{encoding to be assumed for input strings. It is
|
197 |
\item{encoding}{encoding to be assumed for input strings. It is
|
| 198 |
used to mark character strings as known to be in
|
198 |
used to mark character strings as known to be in
|
| Line 286... |
Line 286... |
| 286 |
\code{"UTF-8"}.
|
286 |
\code{"UTF-8"}.
|
| 287 |
}
|
287 |
}
|
| 288 |
|
288 |
|
| 289 |
\section{Memory usage}{
|
289 |
\section{Memory usage}{
|
| 290 |
These functions can use a surprising amount of memory when reading
|
290 |
These functions can use a surprising amount of memory when reading
|
| 291 |
large files. There is extensive discussion in the \sQuote{R Data
|
291 |
large files. There is extensive discussion in the manual \manual{R-data}{},
|
| 292 |
Import/Export} manual, supplementing the notes here.
|
292 |
supplementing the notes here.
|
| 293 |
|
293 |
|
| 294 |
Less memory will be used if \code{colClasses} is specified as one of
|
294 |
Less memory will be used if \code{colClasses} is specified as one of
|
| 295 |
the six \link{atomic} vector classes. This can be particularly so when
|
295 |
the six \link{atomic} vector classes. This can be particularly so when
|
| 296 |
reading a column that takes many distinct numeric values, as storing
|
296 |
reading a column that takes many distinct numeric values, as storing
|
| 297 |
each distinct value as a character string can take up to 14 times as
|
297 |
each distinct value as a character string can take up to 14 times as
|
| Line 321... |
Line 321... |
| 321 |
into the current locale. Note that on Windows or other systems not running
|
321 |
into the current locale. Note that on Windows or other systems not running
|
| 322 |
in a UTF-8 locale, this may not be possible.
|
322 |
in a UTF-8 locale, this may not be possible.
|
| 323 |
}
|
323 |
}
|
| 324 |
|
324 |
|
| 325 |
\seealso{
|
325 |
\seealso{
|
| 326 |
The \sQuote{R Data Import/Export} manual.
|
326 |
The manual \manual{R-data}{}.
|
| 327 |
|
327 |
|
| 328 |
\code{\link{scan}}, \code{\link{type.convert}},
|
328 |
\code{\link{scan}}, \code{\link{type.convert}},
|
| 329 |
\code{\link{read.fwf}} for reading \emph{f}ixed \emph{w}idth
|
329 |
\code{\link{read.fwf}} for reading \emph{f}ixed \emph{w}idth
|
| 330 |
\emph{f}ormatted input;
|
330 |
\emph{f}ormatted input;
|
| 331 |
\code{\link{write.table}};
|
331 |
\code{\link{write.table}};
|