Reading data in R from package

前端 未结 2 1047
甜味超标
甜味超标 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:35

    ISwR is the name of the package, not the datasets included in the package.

    You can use data(package = "ISwR") to see the list of datasets which come with the Introductory Statistics in R package.

    0 讨论(0)
  • 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
    
    0 讨论(0)
提交回复
热议问题