Displaying 1 result from an estimated 1 matches for "sampdata".
Did you mean:
sampdate
2003 Jun 25
1
Help on using read.table with files containing dates
...me hope, but I have not been able to figure out some of the options,
e.g., colNames).
Here is a specific example of what I mean and what the problems are. An
First I load a sample data file whose first column is a date. This gives
the wrong answer as we shall see:
> library(date)
> sampData <- read.table("sampleData.csv",sep=",",header=TRUE)
> sampData
Date Col1 Col2 Col3
1 1/1/2003 1.2 1.4 0.160
2 1/4/2003 1.8 1.2 0.900
3 1/5/2003 0.9 1.1 -0.003
> mode(sampData$Date)
[1] "numeric"
>
Note that the Date column is coerced incor...