From bad29ac7c33f238b8b5725d765c1df4872aa03d5 Mon Sep 17 00:00:00 2001 From: milesmedina <44986194+milesmedina@users.noreply.github.com> Date: Wed, 8 May 2024 01:17:22 -0400 Subject: [PATCH] correcting factor() calls --- R/logistic_ex.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/logistic_ex.R b/R/logistic_ex.R index 4606376..fe632d3 100644 --- a/R/logistic_ex.R +++ b/R/logistic_ex.R @@ -31,11 +31,11 @@ toplo <- toprd |> prd = prds$fit, hival = prds$fit + 1.96 * prds$se.fit, loval = prds$fit - 1.96 * prds$se.fit, - Turbidity = factor(Turbidity, labels = c('95th %tile','mean')) + Turbidity = factor( Turbidity, labels = c('95th %tile','mean'), levels = unique(Turbidity) ) ) # get lines to show connection between hypothetical target and certainty of meeting threshold -trgs <- crossing( +trgs <- expand_grid( value = c(50), Turbidity = c( quantile(tomod$Turbidity, 0.95), mean(tomod$Turbidity) ) ) @@ -45,7 +45,7 @@ tolns <- trgs |> prd = lnprds$fit, hival = lnprds$fit + 1.96 * lnprds$se.fit, loval = lnprds$fit - 1.96 * lnprds$se.fit, - Turbidity = factor(Turbidity, labels = c('mean', '95th %tile')) + Turbidity = factor( Turbidity, labels = c('95th %tile','mean'), levels = unique(Turbidity) ) ) # plot