Ny sökning
PNG0101
Understanding and coding the R programming language
The course is about R as a language, to allow participants to understand the code to read and write. It will start from a very basic level and teaches many of the principles that are necessary to be able to write your own programs in R but are usually skipped over in the rush to do some ‘stats’. . It is ideal for people who: (1) have never used R before, or (2) use it but don’t really understand what they are doing or (3) use it at a basic level and want to develop their programming skills (e.g. how to do loops, write their own functions or do graphics). The course is NOT about statistics. Because people on the course will come from diverse backgrounds, the methods we teach will be general enough so they can be applied to any research question.
Day 1: The building blocks of R programming
1. Introduction to objects and functions in R
2. How R stores information - vectors & matrices
3. The 3 vector principles - recycling, vectorisation and indexing
4. How data are represented - Lists & data frames
Day 2: Programing for automating processes
1. If-else statements
2. Loops and programming repetition
3. Programming functions
Day 3: Plotting and graphics
1. The basics of plotting
2. Manipulating plot parameters
3. Adding shapes, lines, points and text
4. Combining multiple plots
Day 4: Additional concepts and exercises
1. Writing clear code
2. Debugging
3. Dates and time in R
4. Manipulating datasets
5. Exercises of increasing complexity
Day 5: Statistical objects
1. Linear models and GLMMs
2. Storing and manipulating statistical objects
3. Creating and visualizing model predictions
4. LOTS more exercises!
Course structure
The course runs for 5 days with each day beginning at 8:45 and finishing at ~17:00 with 1 hour for lunch and 2 fika breaks. Each day is a combination of lectures and exercises with an in-class computer exercise introduced after every new concept. During these exercises the teachers will work with the students to help them achieve the objective of each task, and to answer any questions regarding the concepts. This allows us to provide immediate help for students that have difficulty with any concept.
Day 1: The building blocks of R programming
1. Introduction to objects and functions in R
2. How R stores information - vectors & matrices
3. The 3 vector principles - recycling, vectorisation and indexing
4. How data are represented - Lists & data frames
Day 2: Programing for automating processes
1. If-else statements
2. Loops and programming repetition
3. Programming functions
Day 3: Plotting and graphics
1. The basics of plotting
2. Manipulating plot parameters
3. Adding shapes, lines, points and text
4. Combining multiple plots
Day 4: Additional concepts and exercises
1. Writing clear code
2. Debugging
3. Dates and time in R
4. Manipulating datasets
5. Exercises of increasing complexity
Day 5: Statistical objects
1. Linear models and GLMMs
2. Storing and manipulating statistical objects
3. Creating and visualizing model predictions
4. LOTS more exercises!
Course structure
The course runs for 5 days with each day beginning at 8:45 and finishing at ~17:00 with 1 hour for lunch and 2 fika breaks. Each day is a combination of lectures and exercises with an in-class computer exercise introduced after every new concept. During these exercises the teachers will work with the students to help them achieve the objective of each task, and to answer any questions regarding the concepts. This allows us to provide immediate help for students that have difficulty with any concept.
Kursplan och övrig information
Kursplan
PNG0101 Understanding and coding the R programming language, 3,0 Hp
Ämnen
Matematisk statistikUtbildningens nivå
ForskarnivåFörkunskapskrav
Admitted to PhD studiesMål
The aim of the course is to help each student overcome the initial steep learning curve that is associated with learning R, and how to think in a structured and logical way to make programming easier. By the end of the course students will: 1. Know the differences between data structure types and why these are used 2. Be able to create data structures and extract information from these 3. Understand how functions work in R and be able to create their own 4. Use specific programming methods to automate repetitive processes 5. Create publication-quality figures from data 6. Implement and extract information from statistical objects 7. Write code in a series of logical steps to create complex outputs using combinations of simple functionsInnehåll
The course is about R as a language, to allow participants to understand the code to read and write. It will start from a very basic level and teaches many of the principles that are necessary to be able to write your own programs in R but are usually skipped over in the rush to do some ‘stats’. . It is ideal for people who: (1) have never used R before, or (2) use it but don’t really understand what they are doing or (3) use it at a basic level and want to develop their programming skills (e.g. how to do loops, write their own functions or do graphics). The course is NOT about statistics. Because people on the course will come from diverse backgrounds, the methods we teach will be general enough so they can be applied to any research question. Day 1: The building blocks of R programming 1. Introduction to objects and functions in R 2. How R stores information - vectors & matrices 3. The 3 vector principles - recycling, vectorisation and indexing 4. How data are represented - Lists & data frames Day 2: Programing for automating processes 1. If-else statements 2. Loops and programming repetition 3. Programming functions Day 3: Plotting and graphics 1. The basics of plotting 2. Manipulating plot parameters 3. Adding shapes, lines, points and text 4. Combining multiple plots Day 4: Additional concepts and exercises 1. Writing clear code 2. Debugging 3. Dates and time in R 4. Manipulating datasets 5. Exercises of increasing complexity Day 5: Statistical objects 1. Linear models and GLMMs 2. Storing and manipulating statistical objects 3. Creating and visualizing model predictions 4. LOTS more exercises! Course structure The course runs for 5 days with each day beginning at 8:45 and finishing at ~17:00 with 1 hour for lunch and 2 fika breaks. Each day is a combination of lectures and exercises with an in-class computer exercise introduced after every new concept. During these exercises the teachers will work with the students to help them achieve the objective of each task, and to answer any questions regarding the concepts. This allows us to provide immediate help for students that have difficulty with any concept.Ytterligare information
Apply for the course by sending an email to Matt Low matt.low@slu.seTeachers: Matt Low and Malin Aronsson (Dept. of Ecology, SLU)
The course will be a distance course with possible IRL workshop at Ultuna campus.
Ansvarig institution/motsvarande
Institutionen för ekologi