Download Course Project
This lesson is called Download Course Project, part of the R in 3 Months (Fall 2021) course. This lesson is called Download Course Project, part of the R in 3 Months (Fall 2021) course.
Transcript
Click on the transcript to go to that point in the video. Please note that transcripts are auto generated and may contain minor inaccuracies.
Two notes on this lesson:
When you run this code, it will download the course project onto your desktop. Please look for it there!
If you are working on Windows, you may need to install Rtools. First, try running the code without downloading Rtools. If you have issues, then please download the latest stable version of Rtools here, install it, then restart RStudio, and then run the code below.
Your Turn
Enter the following into the RStudio console pane:
install.packages("usethis")
library(usethis)
use_course("https://rfor.us/getting-started-materials")
Have any questions? Put them below and we will help you out!
Course Content
134 Lessons
You need to be signed-in to comment on this post. Login.
Kathleen Carson • March 18, 2021
How do you change where the file is downloaded to? It defaulted to my user file, which is not a place files typically download, and didn't see how to change it.
Elise Erickson • March 19, 2021
I am following the instructions to install rtools and getting errors that it's not installed when I take these additional steps. tried uninstalling/reinstalling several times. not sure what to try next
viju chirayil • March 24, 2021
hello, I use linux OS(ubuntu16.04). I get the following error when i try to run install.packages("usethis") in Rstudio
"ERROR: dependencies ‘curl’, ‘gert’, ‘gh’, ‘lifecycle’, ‘purrr’, ‘rlang’ are not available for package ‘usethis" "installation of package ‘usethis’ had non-zero exit status" "Error in library(usethis) : there is no package called ‘usethis’"
Nicole Jedinak • April 15, 2021
Hi there, It seems like I am having trouble both with the package not installing correctly, and not being able to identify where the packages install. I have no idea what the "Var" folder it says they are installed do and I can't find any files. This is what I have in my console:
> install.packages("usethis") Error in install.packages : Updating loaded packages > > library(usethis) > > use_course("http://bit.ly/getting-started-with-r", destdir = “D:/iclouddrive/Documents/RFiles) Error: unexpected input in "use_course("http://bit.ly/getting-started-with-r", destdir = “"
Restarting R session...
> install.packages("usethis") trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/usethis_2.0.1.tgz' Content type 'application/x-gzip' length 707071 bytes (690 KB)
downloaded 690 KB
The downloaded binary packages are in /var/folders/kv/394r0gtj1cx2sz3c57lgr_zh0000gn/T//RtmpPLf7nK/downloaded_packages
Sabina Ramirez Hincapie • August 6, 2021
Hi David
when trying to install the packages I get this error : Error in curl::curl_download(url = url, destfile = destfile, quiet = quiet, : HTTP error 407.
what can I do ? Thanks!
Zen Sel • October 12, 2021
Hi David. I am getting an error message as below. . .... Error in normalizePath(destfile, mustWork = FALSE) : file name conversion problem -- name too long?
Vivian KAWANAMI • October 13, 2021
Hi!
I'm having some trouble downloading the course project. Among the error messages, the last one was:
> library(usethis) Error in library(usethis) : aucun package nommé ‘usethis’ n'est trouvé > use_course("http://bit.ly/getting-started-with-r") Error: could not find function "use_course"
There also were some previous error messages like this one:
There are binary versions available but the source versions are later: binary source needs_compilation mime 0.5 0.12 TRUE openssl 1.0.1 1.4.5 TRUE sys 1.5 3.4 TRUE zip 1.0.0 2.2.0 TRUE httr 1.3.1 1.4.2 FALSE magrittr 1.5 2.0.1 FALSE cli 1.0.0 3.0.1 FALSE curl 3.2 4.3.2 TRUE fs 1.2.2 1.5.0 TRUE gh 1.0.1 1.3.0 FALSE glue 1.2.0 1.4.2 TRUE jsonlite 1.5 1.7.2 TRUE purrr 0.2.4 0.3.4 TRUE rappdirs 0.3.1 0.3.3 TRUE rlang 0.2.0 0.4.11 TRUE yaml 2.1.18 2.2.1 TRUE usethis 1.3.0 2.0.1 FALSE
As I'm taking the course on my work computer, the lastest R version I have access to is 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch". Is this the source of my download and installation issues? There's no file on my desktop either :(
Hiral Gajra • February 3, 2022
Hey
i m not able to download latest stable version
Vishnu Gunneri • February 22, 2022
Thank you for the ~destdir prompt so as to save your file to the desired location. Got few syntax errors but eventually figured it out! The lesson I got out of this is you need to be patient and think with a clear head.
Mónica Izquierdo • March 11, 2022
I have this error in my console:
Error in install.packages : cannot open file 'C:/Users/moizq/OneDrive/Documentos/R/win-library/4.0/file270c68ed367b/zip/example.zip': Permission denied
Can somebody help me, please?
Carolyn Ford • March 13, 2022
For the use_course command line, I am getting the following feedback:
Shall we try a couple more times, with a longer timeout?
1: Absolutely 2: Negative 3: No way
Selection: 1 i Retrying download ... attempt 2 i Retrying download ... attempt 3 Error in curl::curl_download(url = url, destfile = destfile, quiet = quiet, : Recv failure: Connection was reset
Noting that I did first try to run the code without having to download RTools, and then I have successfully followed the RTools download, as well as the "Putting RTools on the PATH sequence: https://cran.rstudio.com/bin/windows/Rtools/rtools40.html BUT I am still getting the feedback above. What do I do now? Thanks.
Mauricio Montes • March 17, 2022
Would you be able to share more information about the "usethis" package? - e.g., What is it's function in this module? (I see it's to pull in the project for this module, but why was this specific route chosen to pull in this data compared to alternatives (if there are alternatives); what ways is "usethis" typically used?/how else can it be used (use_course and other potential functions in this package)?
Md Zahir Raihan • May 5, 2022
What should I do at the following situation; √ Downloading from 'http://bit.ly/getting-started-with-r' x Recv failure: Connection was reset Download failed :( See above for everything we know about why it failed. Shall we try a couple more times, with a longer timeout?
1: Yeah 2: Nope 3: No
Selection: 1 i Retrying download ... attempt 2 i Retrying download ... attempt 3 Error in curl::curl_download(url = url, destfile = destfile, quiet = quiet, : Recv failure: Connection was reset
Dimeji Olawuyi • May 7, 2022
Hi! I encountered this error while trying to download the course project Error: [EPERM] Failed to move 'C:/Users/ADMIN/AppData/Local/Temp/RtmpeKrKco/tidy-download-23007fb93c38'to 'C:/Users/ADMIN/Desktop/getting-started-master.zip': operation not permitted How do I solve this?
Dimeji Olawuyi • May 7, 2022
I encountered this problem even after I had installed RTools. Error: [EPERM] Failed to move 'C:/Users/ADMIN/AppData/Local/Temp/RtmpcJ75yB/tidy-download-238041e02940'to 'C:/Users/ADMIN/Desktop/getting-started-master.zip': operation not permitted How do I solve this, please?
Brianna Chmielewski • July 19, 2022
Is there a way for the Scripts section in the top left corner of RStudio to open automatically? I'm using a Macbook and I always have to maximize that section.
Edy Brito • July 22, 2022
I get this warning message. What I have to do?
> library(usethis) Warning message: package ‘usethis’ was built under R version 4.1.2 > use_course("http://bit.ly/getting-started-with-r" +
Ellen Wilson • September 1, 2022
I got this error message: > library(usethis) Error: package or namespace load failed for ‘usethis’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): there is no package called ‘rlang’
Amy Williams • October 6, 2022
Hi, im just trying to install packages ive downloaded Rtools as it stated it needed this first but it says this Installing package into ‘C:/Users/amywi/AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘use this’ is not available for this version of R A version of this package for your version of R might be available elsewhere,
not sure what i need to do next
Mohammed Ibrahim • December 9, 2022
Hi David, I just went back to this lesson to see but I use the code what you given but its show Error in use_course("http://bit.ly/getting-started-with-r") : could not find function "use_course" and I use version 1.1.463 I am currently using 32 bit laptop
Innocent Ouko • February 27, 2023
Hello, So far, I have been encountering challenges. I had to download the zip file from the browser even after downloading the R tools. Luckily, the folder had the course materials. However, when running the library path, I encountered this: Restarting R session...
> .libPaths function (new, include.site = TRUE) { if (!missing(new)) { new <- Sys.glob(path.expand(new)) paths <- c(new, if (include.site) .Library.site, .Library) paths <- paths[dir.exists(paths)] .lib.loc <<- unique(normalizePath(paths, "/")) } else .lib.loc }
How should I address this issue? I am using Windows Software
Abigail Baumgarten • March 24, 2023
Hi David, I successfully dowloaded R version 4.2.3 and Rstudio and I thought I correctly downloaded Rtools. But this happens: install.packages("tidyverse") WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/abbyb/AppData/Local/R/win-library/4.2’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/tidyverse_2.0.0.zip' Content type 'application/zip' length 430911 bytes (420 KB) downloaded 420 KB
package ‘tidyverse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\abbyb\AppData\Local\Temp\RtmpATX71M\downloaded_packages I used the link it provided to redownload Rtools but the same message keeps popping up
Tuhin CHATURVEDI • April 29, 2023
Hello. I am using RStudio Cloud - now Posit Cloud. The options which I got were different, though I was able to figure out how to go to "Home" and locate the "getting-started-master". It would be great if this course is updated for Posit Cloud users too. Thank you.