Yash
Yash

Reputation: 11

Invalid model formula in extractvars when trying to display scatter matrix

When trying to create a scatter matrix in R, I am using the pairs function inputting columns 1, 6, 11, and 14 as so:

pairs(~ 1 + 6 + 11 + 14, data = housing.df)

but getting an invalid model formula error:

pairs(~ 1 + 6 + 11 + 14, data = housing.df) Error in terms.formula(formula, data = data) : invalid model formula in ExtractVars

What does it mean, and how can it be resolved?

Upvotes: 0

Views: 180

Answers (1)

Yash
Yash

Reputation: 11

pairs(~ V1 + V6 + V11 + V14, data = housing.df)

Upvotes: 0

Related Questions