Hello, everyone. I copied the code on this website and and tried to load station data. I have two questions.
The first one is when I run str(di),it shows: .. ..$ startDate: POSIXlt[1:1], format: NA .. ..$ endDate : POSIXlt[1:1], format: NA, but the example on this website shows .. ..$ startDate: POSIXlt[1:1], format: "1961-01-01" .. ..$ endDate : POSIXlt[1:1], format: "2010-12-31".
str(di)
List of 3
$ Stations :List of 4
..$ station_id : chr [1:86] "000012" "000013" "000014" "000015" ...
..$ LonLatCoords : num [1:86, 1:2] 15.4 11.4 13 12.9 16.4 ...
.. ..- attr(, "dimnames")=List of 2
.. .. ..$ : chr [1:86] "000012" "000013" "000014" "000015" ...
.. .. ..$ : chr [1:2] "lon" "lat"
..$ times :List of 3
.. ..$ startDate: POSIXlt[1:1], format: NA
.. ..$ endDate : POSIXlt[1:1], format: NA
.. ..$ timeStep : 'difftime' num 24
.. .. ..- attr(, "units")= chr "hours"
..$ other.metadata:List of 3
.. ..$ name : chr [1:86] "GRAZ" "INNSBRUCK" "SALZBURG" "SONNBLICK" ...
.. ..$ altitude: int [1:86] 366 577 437 3106 198 100 156 4 139 179 ...
.. ..$ source : chr [1:86] "ECA&D" "ECA&D" "ECA&D" "ECA&D" ...
$ Variables :'data.frame': 4 obs. of 3 variables:
..$ variable : chr [1:4] "precip" "tmean" "tmin" "tmax"
..$ unit : chr [1:4] "mm" "degC" "degC" "degC"
..$ missing.code: num [1:4] NaN NaN NaN NaN
$ Summary.stats: NULL
The second one is when I run the last line (example1 <- loadStationData(dataset = value, var="tmax", stationID = c("000234", "003946"), season = 6:8, years = 1981:2000)) the software reported an error: Error in if (class(out$Data) == "numeric") datadimnames <- "time" : the condition has length > 1.
library(loadeR)
value <- tempfile(fileext = ".zip")
download.file("www.value-cost.eu/sites/default/files/VALUE_ECA_86_v2.zip",
destfile = value)
di <- dataInventory(value)
str(di)
example1 <- loadStationData(dataset = value,
var="tmax",
stationID = c("000234", "003946"),
season = 6:8,
years = 1981:2000)
I would appreciate it if there is anyone who can help me solve this problem. Thank you for your time.
Hello, everyone. I copied the code on this website and and tried to load station data. I have two questions.
The first one is when I run str(di),it shows: .. ..$ startDate: POSIXlt[1:1], format: NA .. ..$ endDate : POSIXlt[1:1], format: NA, but the example on this website shows .. ..$ startDate: POSIXlt[1:1], format: "1961-01-01" .. ..$ endDate : POSIXlt[1:1], format: "2010-12-31".
The second one is when I run the last line (example1 <- loadStationData(dataset = value, var="tmax", stationID = c("000234", "003946"), season = 6:8, years = 1981:2000)) the software reported an error: Error in if (class(out$Data) == "numeric") datadimnames <- "time" : the condition has length > 1.
library(loadeR)
value <- tempfile(fileext = ".zip")
download.file("www.value-cost.eu/sites/default/files/VALUE_ECA_86_v2.zip",
destfile = value)
di <- dataInventory(value)
str(di)
example1 <- loadStationData(dataset = value,
var="tmax",
stationID = c("000234", "003946"),
season = 6:8,
years = 1981:2000)
I would appreciate it if there is anyone who can help me solve this problem. Thank you for your time.