Exercise 1
Create an R project on your computer in the location and with the name you want (avoid white spaces). This should create a new folder containing an
Rprojfile.Create a quarto document with the title “Exercise 1” and your name as author. Save the file as (“lastname_ex1.qmd”) and save it in the same folder. Visit this link if you need help with Quarto.
Add a chunk of code and print out your working directory to make sure your R session is launched in the project you’ve created. The last part of the path displayed should correspond to the project name.
Add a new chunk of code and find a way to import the Quality of Government environmental indicators dataset into Rstudio, either in
.dtaformat (stata) or.savformat (spss).Once the data has been imported, answer the following questions with both code and writing on the quarto document:
- What is this dataset about ?
- What is the unit of analysis for this dataset ?
- Find a way to calculate the mean of the variable wdi_fossil and write a sentence to interpret the result.
- Render the quarto document in a pdf format and upload your file on moodle. To compile in pdf, you might need to install the
tinytexpackage and it might actually do not work. If it does not, try first in words by usingformat : docx. If you do not succeed some of the exercice and render fail because of errors, add#| error:trueinside of the chunk of code that produces errors. It will allow me to see your errors.