In R, you can perform linear regression using the lm() function. For simple linear regression, you'd do:
lm_model <- lm(response_variable ~ predictor_variable, data = your_data_frame)
And for multiple linear regression:
mlm_model <- lm(response_variable ~ predictor1 + predictor2 + predictor3, data = your_data_frame)
You can visualize your regression model using scatterplots and add the regression line for simple linear regression. For multiple linear regression, partial regression plots help visualize relationships between predictor variables and the response.