我正在绘制箱线图并尝试为我的 x 轴分配标签,这是我使用的代码:
tidy_titanic %>%
ggplot(mapping = aes(x = as.logical(survived,labels("Died","Survived")),y = fare))+
geom_boxplot()+
scale_y_log10()
我收到错误代码:
Error in as.factor(survived,"Survived")) :
unused argument (labels("Died","Survived"))