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

Tutorial: Introduction to R for scholars of humanities and social sciences

Contents

  • Syllabus
  • Materials
    • Legend
  • References

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

  • 02. May 2025: Welcome to the summer semester 2025 and welcome to this course! :-)

Recordings of the lecture are available online. Please see the schedule for relevant videos and corresponding material. Make sure to enroll in the elearning-course to see assignments and get feedback on your solutions.

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.

Materials¶

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

Section Title
General Remarks Getting Help
General Remarks Find Help on the Internet
General Remarks Thinking in Scripts
Hello World Getting Started in RStudio
Hello World About Variables
Hello World About Vectors
Dataframes About Dataframes
Dataframes Modifying dataframes
Working with external data Read in data files
Working with external data Obstacles with data files: Separators
Hello World pt. 2 Functions
Hello World pt. 2 Functions accepting parameters
Assignments Submitting and Evaluating your Assignments
Working with external data Dealing with missing values
Sort & Order Sorting values and dataframes
Visualization Draw scatter plots and line plots
Visualization Draw pie charts
Visualization Draw bar charts
Visualization Draw histograms
Visualization Draw stacked and grouped bar charts
Visualization Customize your plots
Conditions Comparing Things
Conditions Conditional Selects
Conditions Combining multiple comparisons
Aggregate Aggregate data
Aggregate Advanced use of aggregate function
Merge Merge tables
Merge Advanced use of merge: specify columns
Merge Advanced use of merge: missing data
Merge Advanced use of merge: multiple columns
Merge Advanced use of merge: continuous merge
Advanced visualization Add legends
Advanced visualization Save your figures to files
Advanced visualization Adjust the axes
Advanced visualization Add more details to your plot
Advanced visualization Combine multiple figures on one canvas
Loops in R for-loops
Loops in R sapply-loops
Loops in R When to use sapply vs. when to use for
Loops in R Looping(s) through datasets
Advanced Conditions Execute Code Conditionally
Advanced Conditions Check vector elements
Advanced Conditions AND, OR, XOR
Advanced Conditions Conditions and vectors

Legend¶

Find a 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/.

  • « Smart Home Heating Revisited
  • Software Technology and Applied Programming »

Published

18. Oct, 2023

Last Updated

May 2, 2025

Tags

  • lecturenotes 12
  • teaching 22
  • ubt 19

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.