Installing Packages in RStudio

Hi All,

I am new to RStudio and the course I am taking requires me to install the "rafalib" package. When I type in install.packages("rafalib") nothing happens. Any suggestions? Thank you.

Hi @polanm, next to type, please put click here

or in you keyboard press ctrl + Enter in the line of the script.

In RStudio, click on the "Packages" tab and check the list to be sure you don't have "rafalib" installed already. Assuming you do not, click the "Install" button, start typing the name and then select it when it shows up and click "Install". If the installation fails, post the error message here.

1 Like

If you want to run a command immediately, you need to type it into the "Console" panel, at the R prompt, and then press ENTER.

If you are typing it into an R script that you are editing then indeed nothing is going to happen until you run that script. But it is better not to include install.packages() in the script, but run it from the console.