load_layer() fails to load csv files with integer columns
Created by: famuvie
library(mapMCDA)
td <- data.frame(
from = LETTERS[1:3],
to = LETTERS[2:4],
fx = 1:3 + .1, # double
fy = 1:3L, # int
tx = 2:4 + .1,
ty = c(2:3, 1),
hc = 10 * (1:3)
)
tf <- tempfile(fileext = ".csv")
write.csv(td, tf, row.names = FALSE)
n1 <- load_layer(tf)
#> Error in class(dat[vapply(dat, is.integer, T)]) <- "numeric": (list) object cannot be coerced to type 'double'
Created on 2019-04-06 by the reprex package (v0.2.0).