class: center, middle, inverse, title-slide # Introduction to R ## BST-680 ### Byron C. Jaeger ### last updated: 2021-05-11 --- # What is this course? Everything you want to know about the course, and everything you will need for the course will be posted at [bst680.rbind.io](http://bst680.rbind.io/) -- - We will be learning concepts from computer science -- - We will be using concepts from statistical science -- - However, this is not a computer or statistical science course. -- - This course will _introduce_ you to the R programming language and, more broadly, dip your toe into the world of data science. --- class: center, middle # Your instructor --- background-image: url(img/run_R_kids.png) background-size: 100% --- # Who am I? Byron Casey Jaeger - I go by Byron or Dr. Jaeger. - I am available by e-mail: [bcjaeger@uab.edu](mailto:bcjaeger@uab.edu) - I hold office hours after class<sup>1</sup> or by appointment.<sup>2</sup> - I enjoy margaritas and Rocket League. - Aside from R, I study machine learning, blood pressure, and cardiovascular disease. .footnote[<sup>1</sup> I will end office hours early if no one shows up in the first 5 minutes. </br> <sup>2</sup> e-mail me with a list of questions to discuss at least 24 hours before we meet.] --- class: inverse, center, middle # R --- background-image: url(img/R_cars_meme.png) background-size: 100% --- # R pros and cons .pull-left[ - R is __open-source__. - R has a great __community__ - R is __versatile__ + RMarkdown + Shiny + Rcpp + Reticulate + Statistics ] -- .pull-right[ - steep learning curve - some operations are slow - type stability - hard to stay in the loop ] --- class: center, middle # Your turn! --- ## Create a GitHub account Go to https://github.com/, and create an account (unless you already have one). Tips for selecting a username:<sup>1</sup> - Incorporate your actual name! - Reuse your username from other contexts, e.g., Twitter. - Pick a username you will be comfortable sharing w/your boss. - Shorter is better than longer. - Be as unique as possible in as few characters as possible. - Make it timeless. Don’t highlight your current university, employer, or place of residence. - Avoid words laden with special meaning in programming, like `NA`. <font color="#E34132"> Type 'done' in chat when you finish. Raise your hand if you need help.</br> </font> .footnote[ <sup>1</sup>Source: [Happy git with R](http://happygitwithr.com/github-acct.html#username-advice) by Jenny Bryan.] --- ## Join RStudio.cloud <font color="#E34132"> If you haven't already, send me an e-mail to receive an invitation to the Rstudio could space. </font> --- class: inverse, center, middle # Course structure and policies --- ## Class meetings -- - Interactive -- - Sometimes I will give a lecture. -- - Most of the time, we will work through in-class exercises -- - You will be assigned teams of 3-4 students based on a survey that assesses your programming experience. -- - Teams will stay consistent throughout the semester (barring extraordinary circumstances). -- - You will work in these teams during class and on the final project. --- ## Diversity & Inclusiveness The culture of my classroom values diversity as a strength and does not tolerate bullying of any form. -- It is my intent to present materials and activities that are respectful of diversity: gender identity, sexuality, disability, age, socioeconomic status, ethnicity, race, nationality, religion, and culture. -- If you feel like your performance in the class is being impacted by your experiences outside of class, please don't hesitate to come and talk with me. I want to be a resource for you. If you prefer to speak with someone outside of the course, your academic dean is an excellent resource. -- I am still learning about diverse perspectives and identities. If something was said in class (by anyone) that made you feel uncomfortable, please talk to me about it. Your suggestions are encouraged and appreciated. --- background-image: url(img/two_states_programming.png) background-position: 50% 60% background-size: 75% ## How to get help --- ## How to get help - Course content, logistics, etc. discussion via GitHub on the [UAB-BST-680/community](https://github.com/UAB-BST-680/community) repository. + Note that this is a public discussion forum, which means others outside of the course can stumble upon it and help you as well. + See policies in course website for tips on posting questions. - For personal and grade related questions, use email. - Google is always a friend --- ## Academic integrity You are expected to follow the [UAB School of Public Health Honor Code](https://www.soph.uab.edu/students/honorcode) throughout this course. Additionally, - unless I explicitly tell you not to use something, you may make use of any online resources (e.g. StackOverflow) but you must explicitly cite where you obtained any code you directly use (or use as inspiration). - On individual assignments you may not directly share code with another student in this class, and on team assignments you may not directly share code with another team in this class. - You are welcome to discuss the problems together and ask for advice, but you may not send or make use of code from another team or student. --- class: inverse, center, middle # Course components --- ## Readings and Primers: These are the first place you will go to absorb materials - All textbooks are free and online - [Rstudio cloud](https://rstudio.cloud/learn/primers) provides primers (interactive tutorials) It is essential for you to complete required readings and primer tutorials in order to get the most out of class time. #### Grading - Send me proof of primer completion before the specified due date (see Syllabus). - A screenshot of your own computer screen showing that you have completed the required primer materials is all you need to send me. --- ## Learnr tutorials I have written some interactive tutorials to help you get more practice with certain topics in R. - I recommend doing each of these tutorials to get a better and deeper understanding of the basic components of R. #### Grading - A screenshot of your own computer screen showing that you have completed the tutorial is all you need to send me. --- ## Homework: Homework problems - present you with opportunities to go beyond class material. It is normal to be stuck and it is okay to do your best and still not completely finish the work. - build on previous problems, but you can still do problems > x if you are stuck on problem x. Homework assignments - will be completed _individually_, but you may discuss the problems with your classmates and team members. - are designed to ensure you make an excellent grade if you invest plenty of time and effort into the work. --- ## Overall grade - Homeworks: + 4 assignments will be given. + assignments are 15 points each - Final project + 20 points total + 15 points for writeup, 5 for in-class presentation. - Class participation + 20 points total + based on participation in lectures and community forum. Cumulative numerical averages of 90 - 100 are guaranteed at least an A-, 80 - 89 at least a B-, and 70 - 79 at least a C-, however the exact ranges for letter grades will be determined after the final. --- # Before next class: Logistics Send me an e-mail with a .csv attachment, a 'dataset' with 1 row and 5 columns: - [`name`] your name. - [`email`] your e-mail address (whatever you'd like to get invited to Rstudio cloud with). - [`prog_exp_yrs`] number of years with programming experience. - [`prog_exp_self`] self-rated programming experience (scale of 1-10). A value of 1 means no prior experience at all. A value of 10 means you are fluent in loops, functions, and object oriented programming. - [`goal`] your primary goal for the semester. 1-2 sentences is great! --- # Before next class: Logistics - Send me an e-mail with a .csv attachment, a 'dataset' with 1 row and 5 columns. - I'll invite you to Rstudio cloud once I have your .csv file.