From 47c631f1f25fb559ca7c290a05213093ff375c12 Mon Sep 17 00:00:00 2001 From: pete-hulson Date: Wed, 7 Aug 2024 12:58:43 -0700 Subject: [PATCH] filter out rss = 0 for sd(iss) calcs --- R/data.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/data.R b/R/data.R index d3f4a7b..3197597 100644 --- a/R/data.R +++ b/R/data.R @@ -456,6 +456,7 @@ iss_stats <- function(iss_data, rss_data, iter, tot, reg){ if('region' %in% colnames(iss_data)){ iss_data %>% tidytable::left_join(rss_data %>% + tidytable::filter(rss != 0) %>% tidytable::summarise(v = var(1 / rss), n = length(rss), m = 1 / length(rss) * sum(1 / rss), @@ -468,6 +469,7 @@ iss_stats <- function(iss_data, rss_data, iter, tot, reg){ } else{ # without subregion case iss_data %>% tidytable::left_join(rss_data %>% + tidytable::filter(rss != 0) %>% tidytable::summarise(v = var(1 / rss), n = length(rss), m = 1 / length(rss) * sum(1 / rss), @@ -482,6 +484,7 @@ iss_stats <- function(iss_data, rss_data, iter, tot, reg){ if('length' %in% colnames(iss_data)){ iss_data %>% tidytable::left_join(rss_data %>% + tidytable::filter(rss != 0) %>% tidytable::summarise(v = var(1 / rss), n = length(rss), m = 1 / length(rss) * sum(1 / rss),