mircoschoenfeld
  • publications
  • teaching
  • talks and workshops
  • community service
  • research projects
  • lab@ubt
  • blog

Tutorial: Introduction to R for scholars of humanities and social sciences (Summer 2022)

Contents

  • News
  • Syllabus
  • Schedule
    • General Remarks
    • Hello World
    • Dataframes
    • Working with external data
    • Sort & Order
    • Conditions
    • Visualization
    • Aggregate
    • Advanced Aggregate
    • Merge
    • Advanced Merge
    • Loops in R
    • Legend
  • References

This is the main course website for the tutorial "Introduction to R for scholars of humanities and social sciences" given in summer term 2022 at University of Bayreuth.

News¶

  • 17. June 2022: This week we’ll get to know loops!
  • 10. June 2022: Function of the week: merge!
  • 03. June 2022: Function of the week: aggregate!
  • 20. May 2022: We start plotting our data!
  • 13. May 2022: This week is dedicated to working with data
  • 06. May 2022: Tutorial starts! See the videos section to access the relevant content.

Recordings of the lecture are available online. Please see the schedule for a selection of relevant videos.

Syllabus¶

This course covers the basics of R: What are variables and how are they used? What data structures are there and what can we model with them? How do programming concepts like loops and functions work in R and what are they necessary for?

The course prepares students to be able to perform data analysis independently. Therefore, reading and writing external data files is an important topic as well as preparation of data for visualization and its actual visualization.

Special attention is paid to dealing with error messages. These contain important information about the parts of the program code that need to be revised. Therefore, we will provoke diverse error messages and learn to tackle the causes of them. In the course, students will learn how to independently search for help and apply it to their own problems.

Finally, the course includes some special tasks for humanities and social science students, such as social network analysis and text analysis.

Schedule¶

In this section, you will find a list of tutorial videos helping you to get started with analyzing text data in R.

General Remarks¶

Title Video Source-Code Material
Submitting and Evaluating your Assignments
Getting Help
Find Help on the Internet
Thinking in Scripts

Hello World¶

Title Video Source-Code Material
Getting Started in RStudio

About Variables
About Vectors
Functions
Functions accepting parameters

Dataframes¶

Title Video Source-Code Material
About Dataframes
Modifying dataframes

Working with external data¶

Title Video Source-Code Material
Read in data files
Obstacles with data files: Separators
Dealing with missing values

Sort & Order¶

Title Video Source-Code Material
Sorting values and dataframes

Conditions¶

Title Video Source-Code Material
Comparing Things
Combining multiple comparisons
Conditional Selects

Visualization¶

Title Video Source-Code Material
Draw scatter plots and line plots
Draw pie charts
Draw bar charts
Draw histograms
Save your figures to files
Customize your plots
Add legends
Draw stacked and grouped bar charts

Aggregate¶

Title Video Source-Code Material
Aggregate data

Advanced Aggregate¶

Title Video Source-Code Material
Advanced use of aggregate function

Merge¶

Title Video Source-Code Material
Merge tables

Advanced Merge¶

Title Video Source-Code Material
Advanced use of merge: specify columns
Advanced use of merge: missing data
Advanced use of merge: multiple columns
Advanced use of merge: continuous merge

Loops in R¶

Title Video Source-Code Material
for-loops
sapply-loops
When to use sapply vs. when to use for
Looping(s) through datasets

Legend¶

Find the video here
Find code material here
Find external material here

References¶

  • Alex Douglas, Deon Roos, Francesca Mancini, Ana Couto, and David Lusseau. An Introduction to R. online, https://intro2r.com/, 2022. https://intro2r.com/.

  • « Tutorial Introduction to R
  • Seminar: Introduction to computer-based text analysis (Summer 2022) »

Published

25. Apr, 2022

Last Updated

Oct 13, 2022

Tags

  • lecturenotes 7
  • teaching 17
  • ubt 14

Links

  • elearning@ubt
  • cmlife@ubt
  • recordings

Find me here

  • This website contains no ads, cookies, trackers or social media buttons.
  • Powered by Pelican and Elegant.