- Notifications
You must be signed in to change notification settings - Fork2
Open
Description
I just updatedkiwisR
to take advantage of some newer functionality (ability to query other fields withki_timeseries_values
- thanks for adding this)!
Previously, I could run this code without errors:
library(tidyverse)library(kiwisR)# List all stations in swmc hub that match "SNOW-WLF" mystations <- ki_station_list(hub = myhub) %>% filter(str_sub(station_no, 1, 8) == "SNOW-WLF" & !station_no %in% c("SNOW-WLF-XX", "SNOW-WLF-TEMP"))# List all codes that connect the station codes with their available time series.my_station_ids <- unique(mystations$station_id)# List all timeseries associated with each code.available_ts <- ki_timeseries_list( hub = myhub, station_id = my_station_ids)
Now, when I run the last line of code (list all timeseries associated with each code), I get the error,"Error: object of type 'closure' is not subsettable".
I tried putting the last line in a loop and it works ok - I thought I could find the problem station by doing this here, but I didn't.
for (i in seq_along(my_station_ids)) {available_ts <- ki_timeseries_list( hub = myhub, station_id = my_station_ids[i])}
Can you reproduce this issue? If so, any idea on how to fix it?