# Testing all variables for Rosario de Santa Fe
# Create a data frame with all data from list Rosario
# For daily data we need to add the hour and minute columns (NAs)
Ros <- Rosario
Ros$Tx[,c("Hour","Minute")] <- NA
Ros$Tn[,c("Hour","Minute")] <- NA
Ros$rr[,c("Hour","Minute")] <- NA
Ros <- do.call("rbind", Ros)
Ros <- Ros[, c("Var","Year","Month","Day","Hour","Minute","Value")]
# Create a data frame with metadata including data resolution
df_meta <- do.call("rbind", Meta)
df_meta <- df_meta[which(df_meta$id=="Rosario"), ]
df_meta$res <- c("s", "s", "d", "d", "s", "s", "d", rep("s",4))
# Run all qc tests at once
# Time for Rosario is in UTC, therefore an offset is needed to get local time
qc(Ros, df_meta, outpath = tempdir(), time_offset=-4.28)
# Testing one variable at one station
qc(Bern$ta, cbind(Meta$ta[which(Meta$ta$id=="Bern"),],"s"),
outpath = tempdir(), time_offset=0)
Run the code above in your browser using DataLab