[R] What to do when problems() returns nothing
Micha Silver
t@v|b@r @end|ng |rom gm@||@com
Thu Nov 4 16:20:50 CET 2021
On 04/11/2021 16:02, Rich Shepard wrote:
> On Thu, 4 Nov 2021, Ben Tupper wrote:
>
> )
>
> The gzipped data file can be downloaded from
> <https://tinyurl.com/5usc8wbz>.
This seems to work fine for me:
library(readr)
cor_stage_file <- "cor-stage.csv"
cor_stage <- read_csv(cor_stage_file,
col_types = list(site_nbr = col_integer(),
year = col_character(),
mon = col_character(),
day = col_character(),
hr = col_character(),
min = col_character(),
tz = col_character(),
ft = col_double()))
# Add a proper datetime column
date_string <- with(cor_stage, paste(year, mon, day, sep="-"))
time_string <- with(cor_stage, paste(hr, min, "00", sep=":"))
cor_stage['date_time'] <- as.POSIXct(paste(date_string, time_string,
cor_stage$tz))
Why are you importing the last "ft" column as an integer when it's
clearly decimal data?
--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918
More information about the R-help
mailing list