Import XLSX files into R (Excel to R)

Опубликовано: 14 Июнь 2026
на канале: Statistik am PC
119,448
819

// Importing XLSX files into R (Excel to R) //

In this video, I briefly demonstrate how to import XLSX files, i.e., Excel files, into R. This requires an additional package that must be installed. It is the "readxl" package. After installing and activating it, you can begin the actual import of the XLSX file into R. Creating a data frame using this function is incredibly simple. It is important that you know where the file is located—either in the working directory or somewhere completely different. You can reference this using absolute cell references. Now that the file path has been resolved, all that remains is the import.

You should sometimes assign missing values ​​("NA") as such.

A final and very convenient way to avoid using the working directory or absolute cell references is the file.choose() function. With this function, you can directly select the (XLSX) file to be imported in a dialog box.

💡 The relevant code is available for copying on my homepage (YouTube doesn't allow certain characters of the code in the video description :-/):
https://www.bjoernwalther.com/daten-i...

More tutorials and supporting materials:
============================
🌐My homepage: https://bjoernwalther.com/

For questions or suggestions about importing XLSX files into R, please use the comments section. You can decide whether you found the video helpful by giving it a thumbs up or down. #statistikampc

📘 For the readers among you:
========================
My book "Statistics with R - Quick Start": https://amzn.to/3OzeLJI [Affiliate link]

⭐Become a channel member⭐:
======================
   / @statistikampc_bjoernwalther  

Timestamp ⏰
============
0:00 Introduction and initial situation
0:20 Installing and loading the readxl add-on package
0:54 Using the read_excel() function
1:38 Encoding missing values ​​appropriately
1:54 Defining variable names
2:23 Selecting the Excel worksheet
3:44 Optional - Deleting data frames
4:02 Using the file.choose() function to select data files

Support the channel? 🙌🏼
====================
Paypal donation: https://www.paypal.com/paypalme/Bjoer...
Amazon affiliate link: http://amzn.to/2iBFeG9

Thank you for your support! ♥