Module 12: R语言简介 Recording

课程描述

R语言,一门强大的数据分析语言,一个极其人性化的编程环境,一种充满惊喜的工作方式。本课程面向零基础的学员,从最基本的安装开始,一步一步手把手带你进入 R 语言的精彩世界。

课程目标

通过学习本课程,学员将

  1. 在计算机上搭建 R 语言工作环境,
  2. 了解 R 语言的用途和扩展性,
  3. 熟悉 R 语言的基本用法,
  4. 初步掌握常见图形的绘制方法,

培训内容

  1. 了解用途
  • 知道R语言在科研中的用途和扩展性,
  • 了解常用扩展包,
  • 知道如何寻求帮助。
  1. 数据读写
  • 熟练掌握将常见格式的数据导入R语言环境的方法,
  • 知道如何将特殊格式的数据导入R语言环境,
  • 熟练掌握将计算结果的数据保存为常见格式。
  1. 图形绘制
  • 熟练掌握R基础包绘制常见图形(散点图、直方图、箱式图、折线图等)的方法,有能力根据研究意图任意订制图形的风格(大小、颜色、点的形状、线的类型)为图形任意添加各种元素(点、线、文字、多边形、图例、坐标轴),
  • 学习使用最流行的ggplot2包来绘制美观的常见图形,

参考书目

  • 赵鹏,李怡。学 R:零基础学习R 语言。研究出版社,北京,2018。
  • 赵鹏,谢益辉,黄湘云。现代统计图形。人民邮电出版社,北京,2021。

培训老师

赵鹏博士,西交利物浦大学助理教授,统计之都成员。毕业于北京大学(理学学士,环境科学硕士)、德国拜罗伊特大学(地理生态学博士)。曾就职于中国气象科学研究院,曾在奥地利因斯布鲁克大学和德国马克斯-普朗克研究所从事博士后研究工作。对于 R 语言应用于科学研究有10年使用经验,开发有十几个R 扩展包,CRAN 上的累计下载量超过 15 万。

 

Session 1: Introduction to R and Statistics

All statistical endeavours start with data. In this session, you will learn how to import your data into the R environment. This will be the perfect opportunity for you to become familiar with the R language, as well as with its basic commands. You will learn about data types most commonly used by ecologists, and the basics of descriptive statistics.

Session 1.1: Introduction to R

Session 1.2: Application to Data

Session 2: R Studio and Hypothesis Testing

In this session, we explore in more details the fundamentals of statistical theory. Using built-in datasets in R, you will learn how to identify methods that are most appropriate depending on the data you are working with, as well as essential principles of hypothesis testing.

Session 2.1: Review

Session 2.2: Fundamentals II and R Studio

Session 2.3: Hypothesis Testing

Session 2.4: Application of Hypothesis Testing

Session 3: Fundamentals III

Using what we learned in the previous two sessions, we will work through all essential steps involved in data analysis, with a focus on linear regression. This includes the formulation of a hypothesis, data preparation and visualisation, statistical testing, and finally, results interpretation. We will complete two full practical exercises in R using built-in datasets. At the end of this session, you will be split into different groups in order to carry out one final analysis, which will be presented the week after.

Session 3.1: Introduction to fundamentals III

 

Session 3.2: Application in R

Session 4: Regressions, Correlations and more

This session will start with presentation of results from the last analysis (see Session 3). The rest of the session will be dedicated to identifying and avoiding common mistakes in data analysis. This will allow us to also discuss issues related to results interpretation, which is essential in the field of conservation science when results may directly inform conservation planning.

Session 4.1: T-test and ANOVA Recap

Session 4.2: Regression and Correlation

Session 4.3: Beyond and Conclusion