# install the usethis package
# install.packages("usethis")
# Open the .Rprofile file in RStudio
usethis::edit_r_profile()Day 1 - Introduction to Data Analysis with R
Freie Universität Berlin - Theoretical Ecology
March 16, 2026
When learning a programming language, you will run into errors all the time. That’s completely normal and it’s how programming works!
Reading and understanding error messages is one of the most important skills you will learn
Every error you fix teaches you something about how R works
It will get easier over time and you will start recognizing patterns
Even experienced programmers spend a lot of time fixing errors
Add it to your .Rprofile
and how to deal with them
+R is not running code anymore and the console only prints +
Escape. Then you should see the > sign instead of + again.variableA but typed variable_A)print(hello) looks for a variable named hello, but you wanted print("hello")“Could not find function” errors have two main reasons:
library(readr) or library(tidyverse)readr::read_csv()lenght() instead of length())This means the package is not installed on your computer.
When reading data, you might see errors like:
When reading data, you might see errors like:
data/ folder?Build your path with auto-completion
When you start typing a path in RStudio, you can use auto-completion to avoid typos. Start with "" and then hit tab to see suggestions for files and folders in your project.
R can give you warnings for many reasons, e.g.
NA values in your dataWarnings are not errors, your code still ran. But:
Sometimes R crashes completely and you see this:
A step by step approach
Selina Baldauf // Common errors