[R] read.csv() error
r@hep@rd @end|ng |rom @pp|-eco@y@@com
Thu Sep 2 18:32:24 CEST 2021
The first three commands in the script are:
stage <- read.csv('../data/water/gauge-ht.dat', header = TRUE, sep = ',',
stringsAsFactors = FALSE)
stage$sampdate <- as.Date(stage$sampdate)
stage$ht <- as.numeric(stage$ht, length = 6)
Running the script produces this error:
Error in `$<-.data.frame`(`*tmp*`, ht, value = numeric(0)) :
replacement has 0 rows, data has 486336
Sample lines from the data file:
Maximum value for elev is about 11.00, 5 digits.
I don't understand this error because the equivalent commands for another
data source file completes without error.
What is that error message telling me?
More information about the R-help