Hi there,
Have searched for a solution but none have worked or came close to what I am working with. The following code is what I am trying to use. I have plotted nearly the same plot with slightly different variables but can't get this one to work. Thanks!
depth_order <- factor(CRUISE_EN_651_edit_$depth_interval,level= c('5-6', '6-7','7-8', '10-12', '12-14', '14-16', '18-20', '26-27', '29-30', '30-31', '31-32', '32-33', '42-43'))
CRUISE_EN_651_edit_ %>%
pivot_longer(c(clay
, silt
, very_fine_sand
, fine_sand
, medium_sand
, coarse_sand
, very_coarse_sand
, total_sand
), names_to = "all_sed_type", values_to = "all_percent_in_sample")%>%
ggplot( mapping =aes(x = depth_order , y = all_percent_in_sample))+
geom_bar(stat = "identity")+
facet_wrap(~ all_sed_type, nrow = 3)
#Error in check_aesthetics()
:
! Aesthetics must be either length 1 or the same as the data (208): x
Backtrace: