Description Usage Arguments Details Value Note Author(s) See Also Examples
A graphical user interface (GUI) for reading table formatted data from a text file.
1 | ImportText(parent = NULL)
|
parent |
tkwin. GUI parent window |
This GUI is a wrapper for the read.table
function.
Data connections are defined as the path to the file to be opened,
a complete URL (e.g. http://, https://, ftp:// or file://), or windows clipboard.
Files are limited to text format (e.g., ‘.tsv’ ‘.csv’, or ‘.txt’);
however, they can be compressed by gzip, bzip2,
or xz with additional extension
‘.gz’, ‘.bz2’, or ‘.xz’, respectively.
Conversion specification formats are the character representation of object types used to:
identify column classes prior to reading in data, and format values for printing.
Conversion specifications are based on C-style string formatting commands for
numeric
, integer
, and character
object classes, see sprintf
;
for example, a format string of "
Calendar date and time objects of class POSIXct
are defined by the ISO C99 / POSIX standard, see strftime
;
for example, "02/26/2010 02:05:39 PM" is represented using "
Comments located above data records and header lines are preserved; all other comments are ignored. Requires the specification of a comment character.
Performance issues associated with reading in large files can be alleviated by specifying formats in a header line, and giving the maximum number of rows to read in.
Sets the following components in Data
:
data.raw |
imported data table. |
cols |
a list with length equal to the current number of data variables.
Each component in |
comment |
vector of comment strings |
import |
a list of saved GUI options |
Components of the import
list include:
source |
a vector of length 2 that includes the pathname of the text file and access date. |
fmts |
indicates whether the file contains the conversion specification format strings of the variables. |
cols |
indicates whether the file contains the names of the variables. |
skip |
Number of lines skipped before data is read. |
sep |
Field separator string |
dec |
Used in the file for decimal points. |
na |
String interpreted as |
quote |
Set of quoting characters |
comment |
Comment character |
encoding |
Encoding that was assumed for input strings, see |
str.as.fact |
If true, character variables are converted to factors. |
Requires the Tcl package Tktable.
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
1 2 3 4 | ## Not run:
ImportText()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.