Syllabus

Course information

Instructor Peter Gao
Lectures Weekly on Monday and Wednesday, 12-1:15pm (Section 01) and 1:30-2:45pm (Section 02) in MH235.
Office Hours Monday and Wednesday, 10:30-11:30am in MH426 or email for an appointment
Email

peter.gao [at sjsu]

I will make every effort to respond to emails within a day, but please feel free to send me a reminder after 48 hours have passed. Please include [MATH 167R] in your subject line.

Learning objectives

Introduction to the R programming language. Topics include data structures, reading and writing data, databases, data visualization, accessing packages, programming structures and functions.

Upon successful completion of this course, students will be able to:

  1. Understand the structures of R objects
  2. Import data from a variety of sources.
  3. Save data in formats that can be used by other programs.
  4. Create publication quality graphs.
  5. Download and install packages.
  6. Create reusable functions.
  7. Perform statistical analysis on R.

This course aims to help you build a foundation of computational skills for data analysis. Data encountered in real world applications are usually messy, breaking many of the assumptions we make in typical statistics courses. Throughout this course, we will practice using computers to help us understand, summarize, visualize, and model complex data in a reproducible way.

Materials

The primary text for the course will be the lecture slides, which will be posted to the course website. The following textbooks may be useful resources.

  • Grolemund, G. (2014). Hands-On Programming with R. Available here for free.

  • Wickham, H. and Grolemund, G. (2023). R for Data Science. Available here for free.

  • Lee, B.L. (2016). An Introduction to Computational Probability and Statistics with R (Draft).

  • Çetinkaya-Rundel, M. and Hardin, J. (2021) Introduction to Modern Statistics. Available here for free.

The main way we will interact with R is through the software RStudio, both of which can be downloaded and installed for free. The students will be required to have access to a computer with R and RStudio. The computer lab in MacQuarrie Hall 221 contains computers with all of the software that will be used during the semester. All of the coursework may be completed on a personal computer and the software is freely available to students.

Course requirements and grading

  • Check-ins: On most Mondays, you will be assigned short check-in assignments. These are designed to be completed during lab or shortly after and will usually be due at the start of the next class. At the end of the quarter, your lowest check-in grade will be dropped. They will be graded on the following two point scale:

    • 0: indicates incomplete or unacceptable work

    • 1: represents demonstrated effort towards completing at least 75% of the assignment

    • 2: represents demonstrated effort towards completing the entire assignment.

  • Labs: On most Wednesdays, you will be assigned Labs. These are extended, more complicated assignments that you will likely not be able to complete during class. They will typically be due the next Wednesday. At the end of the quarter, your lowest lab grade will be dropped.

  • Midterm and Final Exams: There will be one in-person midterm during the semester and one final exam during finals week. Practice questions will be provided in advance of the exams. There will be no make-up midterm or final exams.

  • Class Project: During the semester, you will complete a class project that requires you to apply the data manipulation, visualization, and analysis skills covered in this course to a real-world dataset of your choice.

  • Late Work: In general, the late policy is as follows: Any assignment that is received late but less than 24 hours late will receive a grade penalty of 25%. Any assignment that is received 24 to 48 hours late will receive a grade penalty of 50%. Assignments will not be accepted more than 48 hours late.

Grading scale

Your final grade will be calculated as follows:

  • 10%: Check-ins

  • 40%: Labs

  • 20%: Final exam

  • 30%: Final project

Letter Grade Raw Percentage
A plus 96 to 100%
A 93 to 95%
A minus 90 to 92%
B plus 86 to 89%
B 83 to 85%
B minus 80 to 82%
C plus 76 to 79%
C 73 to 75%
C minus 70 to 72%
D plus 66 to 69%
D 63 to 65%
D minus 60 to 62%
F 0 to 60%

Course Schedule

The updated course schedule is available on the course homepage here.

Policies

Feedback

I encourage and appreciate your feedback throughout the quarter. You are welcome to provide feedback on any aspect of the course at any time via email or in person. If you would prefer to do so confidentially, you can do so through the form on the course Canvas page.

Collaboration

On most assignments, collaboration is allowed and encouraged. You may discuss problems, approaches, and solutions with your classmates. Acceptable collaboration is limited to your classmates in this course and you must clearly include on any collaborative work the name(s) of anyone with whom you worked. Additionally, all submitted work must be your own; you should not submit code or answers copied from any resource including your classmates. Plagiarism and cheating is easy to detect and can lead to serious negative consequences for you. If you have any questions regarding this policy, please ask for clarification.

Online resources

Students are encouraged to use online resources including large language model-based chatbots (ex. ChatGPT) as aids for learning and understanding course material. However, the use of external resources like ChatGPT to generate code or answers for course labs, assignments, exams, and projects is not permitted.

Discussion

You are encouraged to participate on the discussion forum by posting questions about assignments and answering questions from other students. Posts may not include substantial amounts of code that can be used for a solution to any problem, but may include code snippets within reason. Participation, in the form of both questions and answers, can earn you up to 2% extra credit for your final grade. Posts will be evaluated based on how substantive and helpful they are to the class.

University policies

Per University Policy S16-9, relevant university policy concerning all courses, such as student responsibilities, academic integrity, accommodations, dropping and adding, consent for recording of class, etc. and available student services (e.g. learning assistance, counseling, and other resources) are listed on Syllabus Information web page (link). Make sure to visit this page to review and be aware of these university policies and resources.

Frequently Asked Questions

Q1. Why doesn’t my code work? Why don’t I “get” programming?

A1. This is a natural part of learning to program. In fact, I believe that the ability to work through “bugs” and broken code is the single most important skill you can develop in this course. If you can learn how to be resourceful and solve your own coding problems, you will be able to learn any programming language on your own.

Q2. OK, but my homework is due in a week and I need actual advice on how to fix this bug.

A2. It sounds like you’re getting started early! Good. If you’re running into trouble, here are a few places you can ask for help:

  • Google

  • StackOverflow

  • The course discussion board

  • Your classmates

Q3. OK, but my homework is due tomorrow and I still can’t fix this bug.

A3. Above all, try not to put yourself in this position. Start early and ask questions early. Give yourself time to solve your own problems. Of course, sometime you will get busy or life will get in the way and you won’t have as much time as you would like to work on an assignment. My second piece of advice is don’t go it alone. There have been numerous times where I have spent hours looking for a bug only to have a friend identify it in minutes. This does not just mean asking your friends who have already completed MATH 167 for help—some times all you need is a different perspective. Ask your classmates for help—in person or on the discussion board.