rename proportions
This commit is contained in:
@@ -28,7 +28,7 @@ condition_colors <- c("green", "yellow", "orange", "red", "black")
|
|||||||
##
|
##
|
||||||
|
|
||||||
# Calculate the percentage of trees in each health condition
|
# Calculate the percentage of trees in each health condition
|
||||||
percentage <- prop.table(table(df$tree_health_index)) * 100
|
percentage <- proportions(table(df$tree_health_index)) * 100
|
||||||
# Now, let's create the bar plot
|
# Now, let's create the bar plot
|
||||||
barplot(percentage,
|
barplot(percentage,
|
||||||
names.arg = condition_names,
|
names.arg = condition_names,
|
||||||
|
|||||||
Reference in New Issue
Block a user