1. Introduction to R
Due Week 1
Readings
- Read the course syllabus (all parts of this website)
- Recommended reading:
- FCSP chapter 1, or
- PSDS, chapter 5 or
- RDS, introduction
Data & Computational Work
The main purpose of this week’s assignment is to get your computer ready for all the work in the class. This means, primarily, installing software.
Install R on your computer
Begin by installing R (http://cloud.r-project.org). Choose the version appropriate for your computing platform:
If you use macOS with an Apple Silicon processor (i.e. an M-series processor), then install R for macOS’s Apple Silicon build. This version does not work on older, Intel-based Macs.
If you use macOS with an Intel processor, then install R for macOS’s Intel build.
If you use Microsoft Windows, then install R for Windows.
If you use Linux, choose your distribution and install the R package for it.
Install RStudio on your computer
If you use macOS (whether Apple Silicon or Intel), install this version of RStudio.
If you use Windows, install this version of RStudio.
If you use Linux, choose your distribution from the download page.
Confirm things work
- R is really a great big calculator. Let’s do some calculations!
- Add 2 and 3 together
- Multiply 4 by 6
- Divide 10 by 5
Submit: .R File (Optional)
In an .R file, write code to answer the following questions. Make sure your file is appropriately titled and headered.
Note: You can submit this R file in Week 2, if you prefer.
- Create an object named
aardvark
that stores a 3 as a single number - Create a second object named
boomba
that stores a 6 as a single number - Create a third object named
centauri
that is the addition ofaardvark
andboomba
- Create a fourth object named
diabolical
that is the multiplicationaardvark
andboomba
- Create an object named
ebullient
that stores three numbers as a vector: 4,5,and 6 - Create an object named
fastidious
that stores three numbers as a vector: 8,9, and 11 - Add
ebullient
andfastidious
together, and store it in an object namedgeorge
- Find the mean (average) of
fastidious
, and store it in an object namedzoinks
Submit: PDF file
Answer the following questions and upload as a PDF to Blackboard.
What is your name and program of study at Syracuse?
(Optional: provide your pronouns, if you wish.)What is your prior experience with statistics, data analysis, R, and computer programming generally?
What are you hoping to get out of this class?
Please include a picture of yourself!
- It can be anything – just make sure that you are the only person in the picture so I can clearly identify you.
What is the mean of the
fastidious
object from your .R assignment above?