Closed Durell-S-Desmond closed 3 years ago
Here's what I did (I found this solution online here)
nutrient_labels <- c("Ammonia", "Nitrate", "Nitrite", "SRP", "Total N", "Total P")
This creates a variable with the desired nutrient labels
names(nutrient_labels) <- c("ammonia", "nitrate", "nitrite", "soluble_reactive_phosphorus_srp",
"total_nitrogen_mixed_forms", "total_phosphorus_mixed_forms")
This then essentially assigns them to the names they're going to replace
Then for your line of code you would write (just be sure to use your respective variable names):
facet_grid(rows = vars(basin), cols = vars(nutrient), labeller = labeller(nutrient = nutrient_labels)) +
Thank you! It worked...
I am having trouble getting the names write for the facet grid column labels. I was trying to use "labeller" function to adjust the original names. Any help would be much appreciated. Sorry for the last minute question!
I have attached the generated figure and corresponding code for the figure generation for reference...