Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 177

4.8.2 Excel Files

Оглавление

Microsoft's Excel is omnipresent in the corporate environment and many people will have some data in that format. There is no need to to first save the data as a CSV file and then upload in R. The package xlsx will allow us to directly import a file in xlsx format.

Excel

.xlx

Importing and xlsx-file is very similar to importing a CSV-file.

# install the package xlsx if not yet done if (!any(grepl(“xlsx”,installed.packages()))){ install.packages(“xlsx”)} library(xlsx) data <- read.xlsx(“input.xlsx”, sheetIndex = 1)

The Big R-Book

Подняться наверх