researchdatapod.com
How to Solve R Error: `data` must be a data frame, or other object coercible by `fortify()`, not a numeric vector
This error occurs when you try to plot the variables from a data frame but specify a numeric vector instead of a data frame for the data argument. You can solve this error by passing the data frame…