找不到readingskill数据集

时间:2019-02-16 10:27:51

标签: r

我已经在R中下载了所有必需的软件包,但是当我打电话

时,我无法访问ReadingSkill数据集。
 print(head(readingSkills))
  

head(readingSkills)出现错误:找不到对象'readingSkills'

在我安装打包派对之前

> install.packages("party")
Installing package into ‘C:/Users/Dato/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/party_1.3-1.zip'
Content type 'application/zip' length 898440 bytes (877 KB)
downloaded 877 KB

package ‘party’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\Dato\AppData\Local\Temp\Rtmpon2RVm\downloaded_packages

那我该如何访问readingSkills数据集?

2 个答案:

答案 0 :(得分:1)

尝试:head(party::readingSkills)我正在使用party 1.3-1

 nativeSpeaker age shoeSize    score
1           yes   5 24.83189 32.29385
2           yes   6 25.95238 36.63105
3            no  11 30.42170 49.60593
4           yes   7 28.66450 40.28456
5           yes  11 31.88207 55.46085
6           yes  10 30.07843 52.83124

通常,您可以这样做:

data(readingSkills,package = "party")

否则我怀疑您没有打电话:

library(party)

答案 1 :(得分:0)

您可能只需要按以下方式致电data(readingSkills),尽管很奇怪,我也能够在没有此情况的情况下使它正常工作。值得一试...

# install.packages('party')
library(party)
#> Loading required package: grid
#> Loading required package: mvtnorm
#> Loading required package: modeltools
#> Loading required package: stats4
#> Loading required package: strucchange
#> Loading required package: zoo
#> 
#> Attaching package: 'zoo'
#> The following objects are masked from 'package:base':
#> 
#>     as.Date, as.Date.numeric
#> Loading required package: sandwich

# Need to run this first
data(readingSkills)

print(head(readingSkills))
#>   nativeSpeaker age shoeSize    score
#> 1           yes   5 24.83189 32.29385
#> 2           yes   6 25.95238 36.63105
#> 3            no  11 30.42170 49.60593
#> 4           yes   7 28.66450 40.28456
#> 5           yes  11 31.88207 55.46085
#> 6           yes  10 30.07843 52.83124

reprex package(v0.2.1)于2019-03-09创建