0% found this document useful (0 votes)
25 views2 pages

GG 615 L P R, R, R P: Iterate Rogramming With Studio AND Markdown Urpose

This course introduces students to literate programming with R, RStudio, and R Markdown. Over 14 weeks, topics will include basic R computations, data structures, graphics, functions, loops, and probability/statistics. Assignments involve hands-on coding touching on intro topics in stats, pre-calc math, and linear algebra. Later, Matlab will be introduced. The course utilizes weekly coding assignments, midterm quizzes, and a student project for assessment. It meets Monday/Wednesday and Thursday for lecture and lab work.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

GG 615 L P R, R, R P: Iterate Rogramming With Studio AND Markdown Urpose

This course introduces students to literate programming with R, RStudio, and R Markdown. Over 14 weeks, topics will include basic R computations, data structures, graphics, functions, loops, and probability/statistics. Assignments involve hands-on coding touching on intro topics in stats, pre-calc math, and linear algebra. Later, Matlab will be introduced. The course utilizes weekly coding assignments, midterm quizzes, and a student project for assessment. It meets Monday/Wednesday and Thursday for lecture and lab work.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

GG

615

LITERATE PROGRAMMING WITH R, RSTUDIO, AND R MARKDOWN

PURPOSE
This course was created to meet the needs of graduate students and upper level undergraduates who
haven’t coded before at all, or want to learn R, or want to learn literate programming for the
purpose of writing research papers.

The course is mostly hands-on coding. Weekly coding assignments touch on introductory statistics,
pre-calculus math, and even a bit of linear algebra. Toward the end of the course we also introduce
Matlab, which is easy to learn and convenient for rapid modeling.

Instructor: Neil Frazer, [email protected], POST Building 819-C

Times: Monday & Wednesday 12:30-1:20, Thursday 1:30-4:20.

Topics

Numbered roughly by week, although the order of topics may change.

1. Introduction to R, RStudio and R Markdown. RStudio projects. Simple computations in R.


YAML headers, cascading style sheets, chunks and the setup chunk. Knitting to html.

2. Introduction to graphics in R: base graphics and the ggplot2 package. LaTeX for math in R
Markdown. Expressions and latex2exp for annotation in R.

3. Classes and data structures in R. Vector and matrix algebra in R and Matlab. Tidy data.

4. Indexing and subsetting in R and Matlab. Submission formats for science journals. EndNote.

5. Skill with RStudio: navigating directories and environments, inspecting and editing data
structures, choosing and installing packages, CRAN and Taskview. Skill with R Markdown:
stopping the knit where you want, figure sizing, choosing the dev, saving separate figures.

6. Writing and calling functions in R and Matlab. Graceful error handling. Knitting to MSWord
and subsequent editing.

7. For- and while loops. Functional programming. Advanced graphics: legend wrangling in R and
Matlab.

8. Control structures: if, if-else, ifelse, switch. Review of probability density functions.

9. Forward modeling and the estimation of uncertainty. Why Monte Carlo is easier and less prone
to error than calculus. Histograms, densities and statistics. Why quantiles are always more
informative than mean and sd.
10. More on distributions: PDFs, CDFs, inverse CDFs and samplers. The d-p-q-r nomenclature.
Interval scale and ratio scale variables: when to transform.

11. Frequentist thinking and likelihood. Wilkinson-Rogers notation, lm() and its friend predict().
Confidence intervals and prediction intervals. Robustness and alternatives to L2 processing.
Bootstrapping.

12. Bayesian thinking: prior, posterior and sampling distributions, likelihood, prior predictive,
posterior predictive, evidence. Conjugate priors. Uninformative priors.

13. Introduction to Markov chain Monte Carlo (MCMC). The Gibbs sampler and the JAGS
program. Hamiltonian Monte Carlo and the Stan program.

14. Review.

Textbooks: A textbook isn’t absolutely required, but I recommend Data Analysis with R by Tony
Fischetti, PACKT Publishing, and copies of this text have been ordered by the UHM bookstore.

Assessment and Grading:


Literate programming, no less than traditional programming, requires regular practice, so this course
utilizes weekly coding assignments that must be handed in by the due date except for medical reasons.
Most students will be able to complete the assignments during the laboratory period. The final grade
will be a weighted average of attendance (10%), scores on weekly assignments (40%), scores on
midterm quizzes (40%), and student projects (10%). There is no final exam.

Class Format:
This is a combined lecture-laboratory. Students are encouraged to actively ask questions in class, to
work on weekly assignments in class, and to assist each other in learning, although copying of work is
not permitted.

You might also like