In our previous tutorial, we learned to read an excel file in R using readxl package. In this tutorial, we will learn how to import Excel data into an R Dataframe.

In certain scenarios, your input data might come in an XLS or XLSX Excel files. Then you need to load the data from Excel file into R.

Import Excel Data into R Dataframe

To read Excel Data into an R Dataframe, we first read Excel data using read_excel() and then pass this excel data as an argument to data.frame() function.

Reference: Read Excel File Data in R

In the above example, when we read excel data using read_excel() function, the excel data is read into a tibble.

You can perform the data operations on a tibble just like a dataframe.

If you would like to have the data in an R Dataframe, you can use data.frame() function as shown in the above example.