Hi there,
I'm new to R and I'm having a lot of trouble with a homework assignment for class. We need to install a package "ISLR" into rstudio and then run something with it. I cannot install the package. I'm so unfamiliar with R that I don't know what to do. Can anyone give me advice on what to do? Thank you in advance. The error I get is below.
install.packages("ISLR")
Error in install.packages : Updating loaded packages
Restarting R session...
install.packages("ISLR")
Installing package into ‘/home/codio/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/ISLR_1.2.tar.gz'
Content type 'application/x-gzip' length 1757568 bytes (1.7 MB)
==================================================
downloaded 1.7 MB
installing source package ‘ISLR’ ...
** package ‘ISLR’ successfully unpacked and MD5 sums checked
** data
*** moving datasets to lazyload DB
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
DONE (ISLR)
The downloaded source packages are in
‘/tmp/RtmpN9vS8B/downloaded_packages’
The error message only means that you were installing a package that was already installed and loaded. After restarting it went ahead and installed it again from source (which did not require compiling because there are no functions in this package, only datasets).
Thanks for the replies. HOWEVER, when I then try library(ISLR) and data(default) as instructed and after doing the install.packages command, I get this:
library(ISLR)
data(ISLR)
Warning message:
In data(ISLR) : data set ‘ISLR’ not found
Sorry, I realized I didn't reply to you. This is what I get when I enter that and try to do the other commands.
library(ISLR)
data(ISLR)
Warning message:
In data(ISLR) : data set ‘ISLR’ not found
or just use the command
data() without the name and scroll down the data sets until you hit
Data sets in package ‘ISLR’:
Auto Auto Data Set
Caravan The Insurance Company (TIC) Benchmark
Carseats Sales of Child Car Seats
College U.S. News and World Report's College Data
Credit Credit Card Balance Data
Default Credit Card Default Data
Hitters Baseball Data
Khan Khan Gene Data
NCI60 NCI 60 Data
OJ Orange Juice Data
Portfolio Portfolio Data
Smarket S&P Stock Market Data
Wage Mid-Atlantic Wage Data
Weekly Weekly S&P Stock Market Data
The data sets are immediately available as soon as you issue the command:
library(ISLR)
"" To check issue the command
str(Auto)
No one has ever claimed that R is intuitive
Powerful, really useful, etc., etc., but not intuitive.