Lab 1

This assignment is intended to introduce you to the course, course policies, and some of the software that will be used in the course. Questions in Part 1 are not worth points but must be completed in order for Part 2 to be graded. Your R script in Part 2 is worth 14 points, and the questions in Part 2 are each worth 2 points.

Part 1: About you, course syllabus, and policies

About you

  1. What is your hometown?
  2. What you plan to do after you graduate? (Note: still being undecided is ok!)
  3. Where is the coolest place (city, country, neighborhood, park, etc.) you’ve visited in the last year?
  4. What experience do you have with statistics (e.g., other courses, research experience, or work experience)?
  5. What do you hope to get out of this course? Be brutally honest!

Syllabus information

Read through information on the course website (i.e., the syllabus) and answer the following questions. Short and quick responses are fine, and I fully support the use of Ctrl-f for this.

  1. How do you convert a Microsoft Word document (or Google Drive document, Pages file. etc.) to a .pdf?
  2. Does the instructor allow digital notetaking in class? Why or why not?
  3. Can you work with other students on labs?
  4. Are there opportunities for extra credit in the course?
  5. Are lectures recorded?
  6. How does the participation grade work?
  7. Are digital presentation files made available outside of class?
  8. How favorably is grade grubbing perceived by the instructor?
  9. Can labs be turned in late? If so, what is the late penalty?
  10. What should be used as the subject heading for all emails related to the course?
  11. What is the purpose of the course website vs. Canvas?
  12. Can you access the buildings and labs after they close for the day?
  13. Can you use the course software from home?
  14. What should you do if you have a technical question on a lab outside of class?
  15. What are the consequences of having an unexcused absence (see the Attendance section)?
  16. Can you take the final exam early?

Part 2: Bare bones introduction to R and RStudio

This assignment can be completed by using R and RStudio in P275 or P268. Alternatively, you can complete it by installing R and RStudio (in that order) on a personal computer.

Take a look at the Bare Bones Starter Script. Open RStudio, then open a new .R file using Ctrl + Shift + n or selecting New file > R script from the “File” dropdown menu. Watch the video Bare bones intro to R and RStudio and follow along in your own .R script.

Copy/paste the content from the starter script, then write code below every commented line to complete the stated task. Additionally, run every line individually without any errors and complete the questions below.

You will turn in two items: - Your completed script (as a .R file) - Your and include your answers to the questions below as comments.

Questions

  1. What is the most likely cause of the error message below, and what could be done to fix the problem?
Error: object 'x' not found
  1. What is the most likely cause of the error message below, and what could be done to fix the problem?
Error in library(suncalc) : there is no package called ‘suncalc’
  1. What is the most likely cause of the error message below, and what could be done to fix the problem? Note: you may have to do some searching for this one online, and this error does not just pertain to the function getMoonIllumination; it could pertain to any function.
Error in getMoonIllumination() :
  could not find function "getMoonIllumination"