cal_all <- full_join(df_long, MDF, by="Sample") %>% mutate(colour = factor(colour)) %>%
mutate(colour=recode(colour, "yellow" = "1 year", "blue" = "20 days", "orange"="+6 days"))
cols <- c("1 year" = "yellow", "20 days" = "blue", "+6 days" = "orange")
ggplot(data = cal_all, aes(x=MDF, y=K_ARM_100))+geom_point(aes(group=colour,colour=colour))+xlab('MDF ARM (mT)')+
ylab(bquote(λ[ARM]~"/IR"~M["100mT"]~" (units: E-5 m/A)")) + scale_colour_manual(values=cols)+
scale_x_continuous(breaks=seq(0,30,5), limits=c(0,30))+
scale_fill_discrete(name = "ARM corrected for pot", labels = c("20 days", "+6 days", "1 year"))
ggsave("Task2.jpeg", width=10, height=8, units='in')
Error: Problem with mutate()
input colour
.
x object 'colour' not found
i Input colour
is recode(colour, yellow = "1 year", blue = "20 days", orange = "+6 days")
.
Hi, im trying to mutate my column data with colours but it isnt letting me do so, any help will be highly appreciated