最后一步報(bào)錯(cuò)
hist(airquality$Wind,xlab="wind")
boxplot(airquality$Wind,xlab="wind",ylab="speed(mph)")
plot(airquality$Wind,airquality$Temp)
with(airquality,plot(Wind,Temp,main="Wind and Temp in NYC"))
title(main="Wind and Temp in NYC")
with(airquality,plot(Wind,Temp,
? ? ? ? ? ? ? ? ? ? ?main="Wind and Temp in NYC",
? ? ? ? ? ? ? ? ? ? ?type = "n"))
with(subset(airquality,Month==9),
? ? ?points(Wind,Temp,col = "red"))
with(subset(airquality,Month==5),
? ? ?points(Wind,Temp,col = "blue"))
with(subset(airquality,Month==8),
? ? ?points(Wind,Temp,col = "black"))
with(subset(airquality,Month %in% c(6,7,8)),
? ? ?points(Wind,Temp,col = "black"))
fit <- lm(Temp ~ Wind,airquality)
abline(fit,lwd=2)
legend("toprint",pch=1,
? ? ? ?col=c("red","blue","black"),
? ? ? ?legend=c("Sep","May","other"))
Error in match.arg(x, c("bottomright", "bottom", "bottomleft", "left", ?:?
? 'arg' should be one of “bottomright”, “bottom”, “bottomleft”, “l(fā)eft”, “topleft”, “top”, “topright”, “right”, “center”
2016-07-11
你打的是legend("toprint",pch=1,
提示說(shuō)了,應(yīng)該是topright,屬于打字出錯(cuò)