importCSV | R Documentation |
Imports a comma-separated variable file to a data frame.
importCSV(file.name = "", tz = "")
file.name |
a character string specifying the name of the comma-separated variable
(CSV) file containing the data to be imported; |
tz |
a character string indicating the time-zone information for data imported as "POSIXct." The default is to use the local setting. |
All of the dates in a date column must have the same format as the first
non-blank date in the column. Any date with a format different from that of
the first non-blank date in the column will be imported as NA
(missing
value). Dates imported as class "Date" using a 4-digit year,
2-digit month, and 2-digit day with the period (.), hyphen (-), slash (/), or
no separator. Time and date data are imported as class "POSIXct" and
assumes the standard POSIX format for date and time.
A data frame with one column for each data column in the CSV file.
A NULL data frame is created if there are no data in the file.
read.csv
, read.table
, scan
,
as.Date
, as.POSIXct
## Not run: ## These datasets are available in smwrData as text files TestDir <- system.file("misc", package="smwrData") TestPart <- importCSV(file.path(TestDir, "TestPart.csv")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.