From fa5c4a758238ccdc8d62ecf53bad0b247272db33 Mon Sep 17 00:00:00 2001 From: maeveupton Date: Wed, 14 Feb 2024 12:18:14 +0000 Subject: [PATCH] correct --- R/internal_functions.R | 6 ++++-- R/reslr_load.R | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/R/internal_functions.R b/R/internal_functions.R index 5388852..877a216 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -273,7 +273,6 @@ clean_tidal_gauge_data <- function(data, utils::unzip(temp_file, exdir = temp_dir) - ### ------------Loop to open all RSL & Age data files------------ read_plus <- function(flnm) { # fread quicker way to read in & allows for ; to be used @@ -464,10 +463,13 @@ clean_tidal_gauge_data <- function(data, unique() %>% as.data.frame() SL_tide_unique <- SL_tide_site_df %>% - dplyr::select(SiteName, Longitude, Latitude, data_type_id, n_obs_by_site) %>% + dplyr::select(SiteName, Longitude, Latitude, data_type_id, + n_obs_by_site, + LongLat) %>% unique() %>% as.data.frame() + #---Distance Matrix for each site to each other--- mat.distance <- geosphere::distm(SL_proxy_unique[, 2:3], SL_tide_unique[, 2:3]) mat.distance_m <- as.matrix(mat.distance) diff --git a/R/reslr_load.R b/R/reslr_load.R index 109f3ab..2a879da 100644 --- a/R/reslr_load.R +++ b/R/reslr_load.R @@ -94,6 +94,7 @@ reslr_load <- function(data, # } # else{ data <- data %>% dplyr::mutate(data_type_id = "ProxyRecord") + data <- clean_tidal_gauge_data( data = data, list_preferred_TGs = list_preferred_TGs,