0

I am trying to unzip a file that is in my downloads, I loaded the swirl library and need to follow this step:

install_course_zip("YOUR_PATH/14_740x_Intro_to_R.zip",multi=FALSE) Where YOUR_PATH is the folder path where you saved the zip file you downloaded in step 1. This usually looks something like this:

 Mac: /Users/johndoe/Desktop

for reference my file location is Mac:/Users/mgottsch/Downloads and the attempt I've made is as follows:

install_course_zip("Mac:/Users/mgottsch/Downloads/14_740x_Intro_to_R.zip",multi= FALSE)

I keep getting this error message:

Warning message:
In unzip(path, exdir = swirl_courses_dir()) :
  error 1 in extracting from zip file

Does anyone know where I am going off course? I've tried moving the zip file to my desktop but it does not seem to make a difference. Thanks!

jay.sf
  • 60,139
  • 8
  • 53
  • 110
  • remove `Mac:`, as in `install_course_zip("/Users/mgottsch/Downloads/14_740x_Intro_to_R.zip",multi= FALSE)`. – r2evans Jun 07 '20 at 05:16

1 Answers1

0

There seems to be a problem in your file path. It should be OK to write only:

install_course_zip("/Users/mgottsch/Downloads/14_740x_Intro_to_R.zip", multi = FALSE)

Or place the file inside your working directory (in your case probably /Users/mgottsch/Documents/, check it with getwd() in your R console) and then load the course via:

install_course_zip(file.path(getwd(), "14_740x_Intro_to_R.zip"), multi = FALSE)

The getwd() gets a path to your working directory and file.path() function makes a complete path to that file in a platform-independent way.