I am very new to RStudio so this is probably a very basic questions, but I get the error " $ operator is invalid for atomic vectors" when I want to get the plots of a multiple linear regression with General Happiness as my dependent variable and Job Satisfaction as the independent variable. I want to use Age and Gender as the controll variables. I only get 2 plots, but there should be 2 (Cook's Distance and fitted vs. residuals).

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: