Unable to import Hotel_Bookings Dataset to RStudio

Hello Community !
I am taking the Google Data Analytics Course. but I have serous problem to import the "hotel_booking.csv" dataset for exercices:

Here is the code I'm using :
library(readr)
hotel_bookings <- read_csv("hotel_bookings.csv")
View(hotel_bookings)

And here is the output from the console :hot_face:

library(readr)
hotel_bookings <- read_csv("hotel_bookings.csv")
Rows: 119390 Columns: 32
Error in nchar(x, "width") : invalid multibyte string, element 1

Thank you for your support.
best regards.
Francky

Oooh I'm lucky, after reading other posts, the solution consist to insert the encoding "latin1" in the call of readr as shown here:

library(readr)
hotel_bookings <- read_csv("hotel_bookings1.csv", locale = readr::locale(encoding = "latin1"))

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.