How can I fix the unzip(path, list = TRUE) error in swirl?

160 Views Asked by At

I've been messing around with R for a short time, and I've come across a problem, I assume that it's my first experience in this type of program and I don't understand many things, the problem is the following:

I am trying to do a statseducation course, where in the swirl part, there is a link to download the course. Once the course was downloaded and the swirl() package installed, I proceeded to install the course as indicated in the guide without success.

I have tried to change the location of the file without success, and the solutions that I have consulted refer to the preloaded courses in the package and choosing a specific program, such as:

install_course_zip("~/Downloads/swirl_courses-master.zip", multi=TRUE, which_course="R Programming")

However, what I want is to install the course and be able to follow it, not just download a lesson.

I hope I was able to explain myself well and that you can give me a hand.

Thanks in advance!

Sergio Lahera

library(swirl)
install_course_zip(""C:Users/sergi/Desktop/R/R Basics/swirl_courses-master.zip", multi=TRUE)

But it throws me the following error message:

Error in unzip(path, list = TRUE) : zip file 'C:Users/sergi/Desktop/R/R Basics/swirl_courses-master.zip' cannot be opened

What I want is to be able to install the course and then be able to choose the lesson to follow it properly.

1

There are 1 best solutions below

0
Sergio Lahera On

Thanks to @SamR's input, I realized that the path was misspelled, however, I couldn't test if that fixed my error.

Therefore, as it is a course that is in a GitHub repository, with the function install_github_course(github_username, course_name) I was able to fix the error:

[1]: https://github.com/Sullivanstatistics/swirl_courses
[2]: https://i.stack.imgur.com/dJlnq.png