I am getting error messages when trying to create a scatterplot in R. My professor does not get this error message when using the same dataset and the same code. I re-installed R, RStudio, and all R packages without success. The plot looks fine, so I don't understand why it throws these errors.
As I am using RMarkdown (not in this particular code snippet, but I want to include this plot in a RMarkdown file), the error messages appear in the RMarkdown output along with the graph and I would like to remove these error messages from the output so that it looks clean.
The dataset was taken from https://wps.pearsoned.co.uk/wps/media/objects/12401/12699039/datasets3e/datasets/caschool.xlsx.
I would appreciate any hints to either (1) suppress the warning messages as the plot actually looks fine (2) or to solve the underlying problem. Option (2) would be preferable, of course.
library(readxl)
caschool <- read_excel("../dataStockWatson15/caschool.xlsx")
library(car)
scatterplot(testscr~str, reg.line=FALSE, smooth=FALSE, spread=FALSE, boxplots=FALSE, span=0.5, ellipse=FALSE, levels=c(.5, .9), data=caschool)
warnings()
Warnings:
Warning messages:
1: In plot.window(...) : "reg.line" is not a graphical parameter
2: In plot.window(...) : "spread" is not a graphical parameter
3: In plot.window(...) : "span" is not a graphical parameter
4: In plot.window(...) : "levels" is not a graphical parameter
5: In plot.xy(xy, type, ...) : "reg.line" is not a graphical parameter
6: In plot.xy(xy, type, ...) : "spread" is not a graphical parameter
7: In plot.xy(xy, type, ...) : "span" is not a graphical parameter
8: In plot.xy(xy, type, ...) : "levels" is not a graphical parameter
9: In axis(side = side, at = at, labels = labels, ...) :
"reg.line" is not a graphical parameter
10: In axis(side = side, at = at, labels = labels, ...) :
"spread" is not a graphical parameter
11: In axis(side = side, at = at, labels = labels, ...) :
"span" is not a graphical parameter
12: In axis(side = side, at = at, labels = labels, ...) :
"levels" is not a graphical parameter
13: In axis(side = side, at = at, labels = labels, ...) :
"reg.line" is not a graphical parameter
14: In axis(side = side, at = at, labels = labels, ...) :
"spread" is not a graphical parameter
15: In axis(side = side, at = at, labels = labels, ...) :
"span" is not a graphical parameter
16: In axis(side = side, at = at, labels = labels, ...) :
"levels" is not a graphical parameter
17: In box(...) : "reg.line" is not a graphical parameter
18: In box(...) : "spread" is not a graphical parameter
19: In box(...) : "span" is not a graphical parameter
20: In box(...) : "levels" is not a graphical parameter
21: In title(...) : "reg.line" is not a graphical parameter
22: In title(...) : "spread" is not a graphical parameter
23: In title(...) : "span" is not a graphical parameter
24: In title(...) : "levels" is not a graphical parameter
There were 48 warnings (use warnings() to see them)