我有一个我已经绘制的数据集,我现在正在尝试使用相应的点样式构建一个图例,这些点在图表上正确绘制,但图例显示了二进制响应集的相同符号。我对为什么有点困惑,希望这是一件小事。这是我的代码
# data should already be loaded in from the project on the school drive
library(survival)
attach(lace)
lace
# To control the type of symbol we use we will use psymbol, it takes
# value 1 and 2
psymbol <- FAILURE + 1
table(psymbol)
plot(AGE, TOTAL.LACE, pch=(psymbol))
legend(0, 15, c("FAILURE = 1", "FAILURE = 0"), pch=(psymbol))]
谢谢,