-1
I have the following exercise and I am in doubt on item b in bold.
Perform a data analysis, using lm(), between two variables, as we did in the room, but you should import data from any source, using read.table() or equivalent commands according to the data format.
(1) Data -- choose the variables you want to work and manipulate the data in an electronic spreadsheet; export the file in the format you want to be imported into R.
(2) Adjust -- after importing the data, make an adjustment with lm() using different models (functional forms) and place the data points and adjustments found on the chart (PDF format).
(3) send in compressed file containing only 2 files:
a. the data archive;
b. the code to be executed in R -- it is important to emphasize that the user must execute the code with source() and the code must do the whole task: import, analysis and generation of the Plots in PDF, and use of the Summary command to display the important statistical information of each model.
How to generate the graphic in pdf?