Chapter 2 Taking a First Look at Your Data
In this chapter, you will gather and take a first look at your data. Before getting started with the work here, you should have done the following:
- Create and open an R project. (See Sections 1.2 and 1.3)
- Create or open an RScript file. See Section 1.4 for details. A quick reminder of options.
- Go to the
Filemenu ->New File->R Script - Select the
new file menuin the RStudio window ->R Script - Use the keyboard commands. Mac: Shift-Cmd-N; Windows: Shift-Ctrl-N.
- Go to the
If you have already done these steps, you are good to go!
Let’s get to work in R. You can do this.
You will now need to start writing your script to:
- Load the needed packages. Details are in section 1.7 and section 1.8.
tidyversesummarytoolshaven(if you have WVS data)readxl(if you have state or Gapminder data)
- Download your dataset. See Section 2.1
- Load your dataset and view it. Section 2.2
- Run frequency distributions. Section 2.3
- Save your data file for further use. Section 2.4
- Compile your script, creating a Word file that you will annotate and submit in Blackboard. [Section 2.2][Compile your report]
Videos showing you how to do most of the steps are in Blackboard and linked later in this chapter.
