From 5541582ba6dad731f8ae0a4da087e044fc26cf40 Mon Sep 17 00:00:00 2001 From: atottenUSGS <44782051+atottenUSGS@users.noreply.github.com> Date: Mon, 5 Nov 2018 13:33:13 -0500 Subject: [PATCH] Update 5_diagnostics_plot.R Line 110 Names of prop Variable prop sum of loads had unclean names. In line 110 you wanted to change these names using the clean_names variable. The indexing in line 110 seems to be taking the length of convars to length of cleannames, this only displays 1 name. I'm not sure what the purpose of this index was. Eliminating the indexing and using just the clean_names variable seems to work. --- scripts/data_processing/5_diagnostics_plots.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/data_processing/5_diagnostics_plots.R b/scripts/data_processing/5_diagnostics_plots.R index acb90f7..ba37eb6 100644 --- a/scripts/data_processing/5_diagnostics_plots.R +++ b/scripts/data_processing/5_diagnostics_plots.R @@ -107,7 +107,7 @@ prop <- wq.temp %>% summarise_at(vars(loadvars), sum) # change names to be shortened/clean versions -names(prop)[2:ncol(prop)] <- clean_names[(length(concvars) + 1):(length(clean_names))] +names(prop)[2:ncol(prop)] <- clean_names prop.long <- prop %>% gather(variable, value, -frozen)