diff --git a/R/get_bbox.R b/R/get_bbox.R index 1555e24..805a398 100644 --- a/R/get_bbox.R +++ b/R/get_bbox.R @@ -12,13 +12,17 @@ get_bbox <-function(site_metadata, sites){ if (!is.null(sites)){ - site_lat <- site_df |> - filter(field_site_id %in% (sites)) |> - select(latitude) + # site_lat <- site_df |> + # filter(field_site_id %in% (sites)) |> + # select(latitude) + # + # site_lon <- site_df |> + # filter(field_site_id %in% (sites)) |> + # select(longitude) + + site_lat <- site_df[which(site_df[,2] == sites), 'latitude'] + site_lon <- site_df[which(site_df[,2] == sites), 'longitude'] - site_lon <- site_df |> - filter(field_site_id %in% (sites)) |> - select(longitude) #site_lat <- sapply(sites,function(i) site_df$latitude[which(site_df[,2] == i)]) #site_lon <- sapply(sites,function(i) site_df$longitude[which(site_df[,2] == i)])