# install the usethis package
# install.packages("usethis")
# Open the .Renviron file in RStudio
usethis::edit_r_environ()Day 1 - Introduction to Data Analysis with R
Freie Universität Berlin - Theoretical Ecology
October 17, 2026
When learning a programming language, you will run into errors all the time. That’s completely normal and it’s how programming works!
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")library(tidyverse)lenght() instead of length())Remember for packages: install once, but load every time you start R
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.
NA values in your data)
Make sure to save your scripts regularly. Sometimes R crashes and you have to start a new R session.
Selina Baldauf // Common errors