Why can't parameters in r language Plot be in the form of dataframe []?

r=read.xlsx ("F:\ econometrics calculus data\ multiregressionp131.xlsx", 1 min encoding = "UTF-8")

correct drawing statement plot
incorrect drawing statement
plot (Xeror ["expenditure"], yardr ["disposableincome"])
Error in stripchart.default (x1,.): parameter 2 has several formal parameters corresponding to it

Why can"t the parameter form of dataframe ["] be used in Plot statements? Thank you

R
May.09,2021

df ["factor"] this syntax may return a data.frame instead of vector

you can try this syntax:

 plot(expenditure, disposableincome,data = r)
Menu