Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
Introduction to programming with R
FOR 6934, Sections: 3326 / 3825 / 3956
Online (asynchronous) course, 2 credits
Summer A 2024
1 Overview
This is an online course that will help students to gain a basic understanding of
scientific programming. The course will be taught using R language, so you will learn to
use R. However, the programming techniques learned in this course will be easily
transferable to other programming languages. The focus will be on programming for
scientific analyses. This course will cover basic concepts and techniques in
programming such as recognizing and changing data types, reading in and writing out
data, indexing, loops, creating functions, iterations, manipulating data and creating
plots. You will learn base R and a few selected packages.
This course will use a combination of lectures, programming demonstrations, and
assignments to teach introductory programming skills at the graduate level and senior
undergraduate level.
This course is open for both on-campus and off-campus students, and targets people
who have no experience in programming. Students will become familiar with R and
achieve the ability to use R to solve their particular data analysis needs after finishing
the course. This course is online and asynchronous, but not a “go at your own pace”
course. Each module must be completed in a specific week (see weekly schedule
below)
Instructor
Dr Geraldine Klarenberg
430 McCarty Hall C
[email protected]
352-273-0792
Office hours (assignment discussion): Tuesday 6-7 pm EDT, and Friday 10-11 am EDT.
Individual appointment: scheduling link will be made available on Canvas.
Email policy: emails and/or Canvas messages will be answered in 24 hours, during work
hours.
Page 1
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
1.1 Course Pre-Requisites / Co-Requisites
NA
1.2 Learning Outcomes
At the end of this course, your will be able to:
- Explain the advantage of using a script vs point-and-click methods
- Understand basic programming concepts such as data types, data structures and
indexing, and use them in your work
- Apply basic functions
- Conceptualize and create if-else statements and loops to solve different types of
problems
- Create your own customized functions
- Create plots
- Perform basic exploratory data analysis with summary statistics and plots
- Demonstrate the use of selected libraries
- Evaluate new data sets and functions by yourself using R
1.3 Time commitment
The Southern Association of Colleges and Schools Commission on Colleges provides
the federal definition of one credit hour as three hours of work (lectures, assignments,
etc) per week in a 15 week semester (at a minimum). This means that this 2-credit
course has a total workload of 90 hours, which, divided over 6 weeks, translates to
approximately 15 hours of work a week. This means that, aside from the videos with
explanations and programming demos (2 to 3 hrs/wk), you are expected to spend a
decent amount of time on readings, assignments, a quiz and participation each week.
1.4 Materials and Supply Fees
NA
1.5 Required Textbooks and Software
Online (free) text books:
1. Peng, R.D. (2020). R Programming for Data Science.
https://bookdown.org/rdpeng/rprogdatascience/
2. Phillips, N.D. (2018). YaRrr, The Pirate’s Guide to R.
https://bookdown.org/ndphillips/YaRrr/
Page 2
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
3. Mahoney, M. (2019). Introduction to Data Exploration and Analysis with R.
https://bookdown.org/mikemahoney218/IDEAR/
4. Grolemund, G. and Wickham, H. (2019). R for Data Science. https://r4ds.had.co.nz/
5. Wickham, H. (2018). The tidyverse styleguide. https://style.tidyverse.org/
Required software:
Primarily Posit Cloud: online tool, available at no cost, no installation required. Go to
https://posit.cloud/ and log in with your ufl email address to create a free account. You
will receive an invitation to join the class space where you should do your work.
If desired, R and RStudio on your local computer: open source, available at no cost.
1.6 Recommended Materials
N/A
1.7 Course Logistics
Modules include pre-recorded videos with built-in quizzes. These quizzes are short and
ungraded but are a way to assess your understanding of the topic and allow you to
move on to the next topic. Weekly graded quizzes on vocabulary and basic concepts
will be conducted through Canvas. One to two assignments are due every week;
submission will be through Canvas. See section 2.1.
All materials will be made available through Canvas. Other online tools that will be
used are Posit Cloud (practice and assignments) and Zoom (office hours).
1.8 Technology Requirements
• A computer or mobile device with high-speed internet connection. This course will
work best on a laptop or a desktop computer. It is possible to use the tools we
employ in this course on a tablet or smartphone, but it is not recommended.
• A headset and/or microphone and speakers; a web cam is suggested.
• Latest version of web browser. Canvas supports only the two most recent versions
of any given browser. What browser am I using?
Synchronous online sessions may be recorded. By sharing your video, screen, or
audio during any synchronous online class sessions, you are consenting to being
recorded for the benefit of students who cannot attend live as well as for class review
during the current semester. If you have special circumstances or concerns about
privacy, it is your responsibility to discuss it with your instructor.
Page 3
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
2 Course Schedule
Week Topics and video lectures Reading** Assignment
Week 1 1. Introduction, expectations and tools Phillips (2018), ch Introductions
13 May 2. What is programming; about computers and stuff 1, 2, 3.1, 3.3, 4, 9 #1 Built-in
3. What is scientific programming? And why use functions, finding
scripting? Introducing R, RStudio and Peng (2020), ch 1, help and reading
RStudioCloud 2, 4.1, 4.2, 18 in data
4. First forays: R for calculations, variables and
objects, assignments, vectors, built-in functions
5. Vector calculations, reading in data, more built-in
functions
6. What is a working directory, RProjects, libraries
7. How to get help
Week 2 1. The nature of the beast: data types in R Phillips (2018), ch #2 Vectors and
20 May 2. Understanding and manipulating data structures 5, 6, 8.1-8.4, 11 dataframes
3. Things that can help or hurt you: factors Peng (2020), ch 4.3 #3
4. Visualization: making plots – 4.15, 5 Understanding
5. Saving your hard work: writing out data and plots Grolemund & scripts
6. What is data acumen and why should I care? Wickham (2019):
3.2-3.6
Week 3 1. More about lists because they are special Phillips (2018), ch #4 Indexing
27 May 2. How to find stuff: indexing 7, 8.5, 8.6 #5 If-else
3. Making choices: conditional statements Peng (2020), ch 9, statements
4. Do one thing or another thing: if-else statements 13.1
5. Naming things and coding style matter Wickham (2018), ch
1-2
Week 4 1. When you’re searching for words: working with Mahoney (2019), ch #6 String and
03 June strings 11, 12 date
2. Dealing with dates and times Peng (2020), ch 11, manipulation
3. Doing things over and over 13.2 – 13.7, 14, 17 #7 Making
4. Making your own functions Phillips (2018), ch functions
5. Vectorization: what’s the big deal? 16, 17
Week 5 1. More fancy things with loops Phillips (2018), ch #8 Loops
10 June 2. More ways to iterate 13, 14, 15 #9 Iterate and
3. Data exploration: descriptive statistics Peng (2020), ch 16 summary
4. So what do I know about programming now? Mahoney (2019), ch statistics
14
Week 6 1. Data science principles: tidy data Peng (2020), ch 12,
#10 tidyverse
17 June 2. A trip into the tidyverse 21
3. Putting it all together (an example) Grolemund &
4. Final remarks on scientific programming, using Wickham (2019), ch
scripts, and other languages
5, 12, 13, 18
** Additional/optional reading will be made available on Canvas
Page 4
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
2.1 Assignments and quizzes
Quizzes are to be completed by Sunday, and will evaluate your understanding of
concepts covered in the week before, and programming (R) vocabulary. You have 2
(two) attempts for each quiz, with a 20-minute time limit for each. The highest score will
be kept.
One to two assignments are due every week. The first assignment will be due on
Wednesday, the second on Sunday. The assignments follow the video lectures. It will
be indicated which questions accompany which video. A document and a video
outlining the format of assignment submissions will be available on Canvas. This format
is not optional, and worth 10 points on each assignment.
During office hours on Tuesday (6-7 pm EDT) I will go over (i.e. demonstrate) the
assignment that was due on Sunday; on Friday (10-11 am EDT) the assignment that was
due on Wednesday. These sessions will be recorded and made available on Canvas
(attendance is not mandatory). See section 3.1 for late submission policies.
For the assignments you are allowed to discuss in the chat, or ask for advice through
other avenues, but you are expected to write your own code. Do not copy someone
else’s code; this amounts to plagiarism and violates UF’s Academic Honesty Policy (see
section 3.7). For the best learning experience, I highly discourage the use of ChatGPT
or other AI applications. If you do, you need to acknowledge this in your code /
submission (where and how). There will be a few occasions where we will use
ChatGPT/AI specifically.
Each assignment and quiz with the lowest score/points will be dropped from the final
grade calculation.
2.2 Participation
We will use an online platform (in Canvas) to engage and interact with each other.
Asking questions and answering others’ questions is an important part of learning. You
will receive points for participating, to ensure interaction (though, you will soon realize
how beneficial this interaction is for your learning!)
2.3 Evaluation of Grades
Assignment Total Points Percentage of Final Grade
Assignments (9) 100 each 75%
Quiz (5) 50 each 15%
Participation (6) 20 each 10%
100%
Page 5
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
2.4 Grading Policy
A 90.0-100
B+ 86.7-89.9 B 83.7-86.6 B- 80.0-83.6
C+ 76.7-79.9 C 73.7-76.6 C- 70.0-73.6
D+ 66.7-69.9 D 63.7-66.6 D- 60.0-63.6
E < 60.0
More information on UF grading policy may be found at:
https://catalog.ufl.edu/ugrad/current/regulations/info/grades.aspx. Grades/points can
be discussed up to a week after being posted to Canvas. After this, they are final.
3 Policies and Requirements
This syllabus represents current plans and objectives for this course. As the semester
progresses, changes may need to be made to accommodate timing, logistics, or to
enhance learning. Such changes, communicated clearly, are not unusual and should be
expected.
3.1 Late Submissions & Make-up Requests
It is the responsibility of the student to access on-line lectures, readings, quizzes, and
exams and to maintain satisfactory progress in the course. Requirements for class
attendance and make-up exams, assignments and other work are consistent with
university policies that can be found at:
https://catalog.ufl.edu/ugrad/current/regulations/info/attendance.aspx
Late submissions of assignments will result in a 10% deduction of points for every 24
hours after the submission deadline, up to a maximum 50% deduction. Quizzes are
open until 24 hours after the due date (-10% late penalty) and will then be closed.
Computer or other hardware failures, except failure of the UF e-Learning system or
Posit Cloud, will not excuse students for missing assignments. Any late submissions
due to technical issues MUST be accompanied by the ticket number received from the
Helpdesk when the problem was reported to them (in the case of UF e-Learning system
problems). The ticket number will document the time and date of the problem. In the
case of Posit Cloud issues, late submissions MUST be accompanied by a screenshot of
the issue. You MUST message your instructor within 24 hours of the technical difficulty
if you wish to request consideration. For computer, software compatibility, or access
problems, call the HELP DESK phone number: 352-392-4357.
Page 6
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
3.2 Semester Evaluation Process
Student assessment of instruction is an important part of efforts to improve teaching
and learning. At approximately the mid-point of the semester, the School of Forest,
Fisheries and Geomatics Sciences will request anonymous feedback on student
satisfaction on various aspects of this course. These surveys will be sent out through
Canvas and are not required, but encouraged. This is not the UF Faculty Evaluation! At
the end of the semester, students are expected to provide professional and respectful
feedback on the quality of instruction in this course by completing course evaluations
online via GatorEvals. Guidance on how to give feedback in a professional and
respectful manner is available at https://gatorevals.aa.ufl.edu/students/.
Students will be notified when the evaluation period opens, and can complete
evaluations through the email they receive from GatorEvals, in their Canvas course
menu under GatorEvals, or via https://ufl.bluera.com/ufl/. Summaries of course
evaluation results are available to students at https://gatorevals.aa.ufl.edu/public-
results/
3.3 Netiquette: Communication Courtesy and Professionalism
Just as in any professional environment, meaningful and constructive dialogue is
expected in this class and requires a degree of mutual respect, willingness to
listen, and tolerance of opposing points of view. Respect for individual
differences and alternative viewpoints will be maintained in this class at all
times. All members of the class are expected to follow rules of common courtesy,
decency, and civility in all interactions. Failure to do so will not be tolerated and
may result in loss of participation points and/or referral to the Dean of Students’
Office.
3.4 Inclusive Learning Environment
This course embraces the University of Florida’s Non-Discrimination Policy, which
reads,
The University shall actively promote equal opportunity policies and practices
conforming to laws against discrimination. The University is committed to non-
discrimination with respect to race, creed, color, religion, age, disability, sex,
sexual orientation, gender identity and expression, marital status, national
origin, political opinions or affiliations, genetic information and veteran status as
protected under the Vietnam Era Veterans’ Readjustment Assistance Act.
Page 7
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
If you have questions or concerns about your rights and responsibilities for inclusive
learning environment, please see the instructor or refer to the Office of Multicultural &
Diversity Affairs website: http://multicultural.ufl.edu.
3.5 Services for Students with Disabilities
The Disability Resource Center coordinates the needed accommodations of students
with disabilities. This includes registering disabilities, recommending academic
accommodations within the classroom, accessing special adaptive computer
equipment, providing interpretation services and mediating faculty-student disability
related issues. Students requesting classroom accommodation must first register with
the Dean of Students Office. The Dean of Students Office will provide documentation
to the student who must then provide this documentation to the Instructor when
requesting accommodation. 0001 Reid Hall, 352-392-8565, https://disability.ufl.edu/.
3.6 Student Privacy
There are federal laws protecting your privacy with regards to grades earned in courses
and on individual assignments. For more information, please see:
https://gradcatalog.ufl.edu/graduate/regulations/.
3.7 Academic Honesty Policy
As a student at the University of Florida, you have committed yourself to uphold the
Honor Code, which includes the following pledge: “We, the members of the University
of Florida community, pledge to hold ourselves and our peers to the highest standards
of honesty and integrity.” You are expected to exhibit behavior consistent with this
commitment to the UF academic community, and on all work submitted for credit at
the University of Florida, the following pledge is either required or implied: "On my
honor, I have neither given nor received unauthorized aid in doing this assignment." It
is assumed that you will complete all work independently in each course unless them
instructor provides explicit permission for you to collaborate on course tasks (e.g.
assignments, papers, quizzes, exams). Furthermore, as part of your obligation to
uphold the Honor Code, you should report any condition that facilitates academic
misconduct or appropriate personnel. It is your individual responsibility to know and
comply with all university policies and procedures regarding academic integrity and the
Student Honor Code. Violations of the Honor Code at the University of Florida will not
be tolerated. Violations will be reported to the Dean of Students Office for
Page 8
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
consideration of disciplinary action. For more information regarding the Student Honor
Code, please see: https://sccr.dso.ufl.edu/process/student-conduct-code/.
3.8 Software Use
All faculty, staff and students of the university are required and expected to obey the
laws and legal agreements governing software use. Failure to do so can lead to
monetary damages and/or criminal penalties for the individual violator. Because such
violations are also against university policies and rules, disciplinary action will be taken
as appropriate.
4 Campus Helping Resources
For issues with technical difficulties for e-learning in Canvas, please post your question
to the Technical Help Discussion in your course, or contact the UF Help Desk at:
• [email protected] | (352) 392-4357 | https://elearning.ufl.edu/student-help/
• SSFFGS Academic Hub https://ufl.instructure.com/courses/303721
4.1 Student Life, Wellness, and Counseling Help
Students experiencing crises or personal problems that interfere with their general
well-being are encouraged to utilize the university’s counseling resources. The
Counseling & Wellness Center provides confidential counseling services at no cost for
currently enrolled students. Resources are available on campus for students having
personal problems or lacking clear career or academic goals, which interfere with their
academic performance.
• Counseling and Wellness resources http://www.counseling.ufl.edu/
• U Matter, We Care http://www.umatter.ufl.edu/
• Other resources are available at http://www.distance.ufl.edu/getting-help for online
students.
4.2 Student Complaint Process
The School of Forest, Fisheries and Geomatics Sciences cares about your experience
and we will make every effort to address course concerns. We request that all of our
online students complete a course satisfaction survey each semester, which is a time for
you to voice your thoughts on how your course is being delivered. You can also submit
feedback anytime.
Page 9
https://t.me/PDFMatrix
Introduction to Programming with R (FOR 6934) Last update: 05/06/2024
Klarenberg, Summer A 2024
If you have a more urgent concern, your first point of contact should be the FFGS
Academic Coordinator or the Graduate/Undergraduate Coordinator for the program
offering the course. You may also submit a complaint directly to UF administration:
• Students in online courses: https://pfs.tnt.aa.ufl.edu/state-authorization-
status/#student-complaint
• Students in face-to-face courses: https://sccr.dso.ufl.edu/policies/student-honor-
code-student-conduct-code/
4.3 Academic Resources
E-learning technical support, 352-392-4357 or e-mail to
[email protected].
https://elearning.ufl.edu/student-help/
Career Connections Center, Reitz Union, 392-1601. Career assistance and counseling.
http://career.ufl.edu/.
Library Support, http://uflib.ufl.edu/find/ask. Various ways to receive assistance with
respect to using the libraries or finding resources.
Teaching Center, Broward Hall, 392-2010 or 392-6420. General study skills and
tutoring. https://academicresources.clas.ufl.edu/
Writing Studio, 302 Tigert Hall, 846-1138. Help brainstorming, formatting, and writing
papers. https://writing.ufl.edu/writing-studio/
Page 10
https://t.me/PDFMatrix