Reading data in R from package

前端 未结 2 1049
甜味超标
甜味超标 2021-01-23 20:21

I\'m studying from a book called \"Introductory Statistics in R\" which uses data from the package \"ISwR\".My problem is that I can\'t load the data on the workspace.When I do<

2条回答
  •  悲哀的现实
    2021-01-23 20:42

    install.packages("ISLR")  #install the package ISLR
    
    library(ISLR)
    
    data(package = "ISLR")  #list the datasets in the package ISLR
    
    car=as.data.frame(Auto)  #read the dataset Auto in the package ISLR
    
    car
    

提交回复
热议问题