我有一个关于xaxis标签的问题。
与此处讨论的内容相比:
How to specify the actual x axis values to plot as x axis ticks in R
我绘制了一个包含10列的数据框。每个都用方框图表示。
对于x轴,我的标签是管道1到管道10。现在我想用这种方式将这些标签更改为特定的ID
windows()
par(mfrow= c(2,1),las=3)
boxplot(output.valid.fast,outline=F, xlab ="Pipes",ylab="RMSE(-)")
axis(1,at=c("Pipe1","Pipe2","Pipe3","Pipe4","Pipe5","Pipe6","Pipe7","Pipe8","Pipe9","Pipe10"),labels=c("1234","2345","3456","4567","5678","6789","78910","891011","9101112","10111213"))
每次这样做时,我都会收到一个错误,显示以下内容:
In axis(1, at = c("Pipe1", "Pipe2", "Pipe3", "Pipe4", "Pipe5", "Pipe6", :
NAs introduced by coercion
我在这里做错了什么?我非常感谢您的提示或建议。
干杯
奥利