DS4PS / cpp-526-fall-2020

Course shell for CPP 526 Foundations of Data Science I for Fall 2020
http://ds4ps.org/cpp-526-fall-2020/
MIT License
3 stars 1 forks source link

Also error loading packages #9

Open tim-ness opened 4 years ago

tim-ness commented 4 years ago

Hello,

I'm having similar problems to others loading the libraries at the start of Lab 2, but there's less information in the error message so I don't know what to do to fix it.

lab 2 ss 1

I saw Dr. Lecy advised someone else to install directly from GitHub so I tried those instructions, but got a similar error that there is no package called 'devtools'.

image

I saw he also advised someone to try running in an R shell outside of R Studio. I have no idea if I did this right, but I tried and looks like the same error.

image

The same thing happens for all the libraries. Here it is with the traceback and errors for other libraries.

image

I also tried loading the data in another script file so that it would already be in the environment to see if that helped, but it did not. Please advise - I'm not sure how to start this lab.

Thank you!

lecy commented 4 years ago

Try these:

install.packages( "sp" )
install.packages( "geojsonio" )
install.packages( "rgdal" )
jamisoncrawford commented 4 years ago

@tim-ness as @lecy wrote, you need to install these packages separately before loading them in an R Markdown file.

Just for clarification, don't include the install.packages() function in any code chunks in R Markdown, but do use the library() function to load required packages.

Instead, install packages with install.packages() in the console or in a new/separate .R script.

Did this do the trick?

tim-ness commented 4 years ago

Thank you. I was so focused on the lab instruction not to load the packages into a code chunk that I didn't realize they needed to be loaded into a separate script first. Apologies.

jamisoncrawford commented 4 years ago

Hi @tim-ness, no need to apologize! This is great feedback - we'll update these instructions to make this clearer. Thank you!

Reopening the issue just in case anyone else finds it helpful!