Importing Excel

Hi,

I have to import an Excel file into R but every tutorial I've found so far are about simple datasheets and mine is a bit more complicated. Can you help me with this?

https://drive.google.com/file/d/1R5sVaP20MDLlaY6TLesrCj664wJYUhDG/view?usp=sharing

Thank you very much in advance!

The most explicit path for you is to access this with multiple reads, i.e. get the main data rectangle (specifying the range) and either use another read (or two) for the tricky column headers or just apply column names "by hand".

You could use readxl for the above or googlesheets (both on CRAN) or googlesheets4 (only on GitHub right now).

Alternatively, if you've got local xlsx, you should check out tidyxl (on CRAN) which is specialized in this sort of tricky sheet.

2 Likes