From b15859715f63f796e880b7376d5c58bb38f1435f Mon Sep 17 00:00:00 2001 From: Adriaan Dokter Date: Fri, 10 Jan 2025 14:01:34 -0500 Subject: [PATCH 1/4] add datetime and height sorting --- R/as.vpts.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/as.vpts.R b/R/as.vpts.R index 059d51bc..1c09d681 100644 --- a/R/as.vpts.R +++ b/R/as.vpts.R @@ -16,9 +16,12 @@ as.vpts <- function(data) { data <- data %>% dplyr::rename(DBZH = "dbz_all") } - + validate_vpts(data) + # sort by datetime and height + data |> arrange(datetime, height) -> data + height <- datetime <- source_file <- radar <- NULL # Throw error if nrows per height are not identical From af246a58f51b05c794f3a0fcbeffe2bcfec2def6 Mon Sep 17 00:00:00 2001 From: Adriaan Dokter Date: Fri, 10 Jan 2025 14:48:51 -0500 Subject: [PATCH 2/4] add dplyr namespace --- R/as.vpts.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/as.vpts.R b/R/as.vpts.R index 1c09d681..9e0aa3e8 100644 --- a/R/as.vpts.R +++ b/R/as.vpts.R @@ -20,7 +20,7 @@ as.vpts <- function(data) { validate_vpts(data) # sort by datetime and height - data |> arrange(datetime, height) -> data + data |> dplyr::arrange(datetime, height) -> data height <- datetime <- source_file <- radar <- NULL From f5c3d60e3b7c5acddfc2295d1b6673fa92d1365b Mon Sep 17 00:00:00 2001 From: Adriaan Dokter Date: Fri, 10 Jan 2025 14:50:41 -0500 Subject: [PATCH 3/4] remove pipe --- R/as.vpts.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/as.vpts.R b/R/as.vpts.R index 9e0aa3e8..9562678e 100644 --- a/R/as.vpts.R +++ b/R/as.vpts.R @@ -20,7 +20,7 @@ as.vpts <- function(data) { validate_vpts(data) # sort by datetime and height - data |> dplyr::arrange(datetime, height) -> data + data <- dplyr::arrange(data, datetime, height) height <- datetime <- source_file <- radar <- NULL From 9062ea9a38bd8adb2134df79457c8466c2ca794b Mon Sep 17 00:00:00 2001 From: Adriaan Dokter Date: Fri, 10 Jan 2025 16:06:59 -0500 Subject: [PATCH 4/4] update news --- NEWS.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/NEWS.md b/NEWS.md index f22594bd..50283f4c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,24 +1,26 @@ # bioRad 0.8.1.9000 -* correct units specified in plot label for quantity VIR (#674) +* Correct units specified in plot label for quantity VIR (#674). -* discard profiles with misspecified altitude bins in `as.vpts()` and `read_vpts()` (#684) +* Discard profiles with misspecified altitude bins in `as.vpts()` and `read_vpts()` (#684). -* new argument `zoomin` for function `bioRad::map()` to increase basemap resolution (#689) +* New argument `zoomin` for function `bioRad::map()` to increase basemap resolution (#689). -* correct type of gap field in vpts objects for profiles stored in ODIM HDF5 format (.h5) (#635, #691) +* Correct type of gap field in vpts objects for profiles stored in ODIM HDF5 format (.h5) (#635, #691). -* interpret NA values in field DBZH in integrate_to_ppi() as pixels that were not irradiated (#658) +* Interpret NA values in field DBZH in `integrate_to_ppi()` as pixels that were not irradiated (#658). + +* Fixes a bug that prevented a data.frame to be converted to a vpts object with as.vpts() when profiles are not sorted in datetime and height (#692). # bioRad 0.8.1 ## bugfixes -* dbz_all field in VPTS CSV files is now correctly mapped to DBZH field (#661) +* dbz_all field in VPTS CSV files is now correctly mapped to DBZH field (#661). -* non-standard data fields are now retained in vpts objects produced with as.vpts() (#661) +* Non-standard data fields are now retained in vpts objects produced with as.vpts() (#661). -* corrected the type of gap field in vpts objects to logical (#635) +* Corrected the type of gap field in vpts objects to logical (#635). # bioRad 0.8.0