remotes::install_github("kwb-r/kwb.pilot", upgrade = "always")
In paths_list
you need to replace the dummy value kwb-server
for the key servername
.
paths_list <- list(
root = "C:/kwb/projects/suleman",
rawdata = "<root>/10_rawdata",
online = "<rawdata>/online_data",
export_dir = "<root>/export"
)
# Only execute "At Home" if not at "KWB" (i.e. KWB server path does not exist)
if(!fs::dir_exists(paths$online)) {
paths <- kwb.utils::resolve(paths_list)
}
### Recursive listing of all ".xlsx" Weintek files in rawdata directory:
files <- fs::dir_ls(paths$online,recurse = TRUE, regexp = "^[^~].*\\.xlsx$")
weintek_data_raw <- kwb.pilot::read_weintek_batch(files)
weintek_data_10min <- weintek_data_raw %>% kwb.pilot::group_datetime(by = 600)
weintek_data_1hour <- weintek_data_raw %>% kwb.pilot::group_datetime(by = 3600)
kwb.pilot::export_data(weintek_data_raw, export_dir = paths$export_dir)
kwb.pilot::export_data(weintek_data_10min, export_dir = paths$export_dir)
kwb.pilot::export_data(weintek_data_1hour, export_dir = paths$export_dir)