0

I am asked to get and load the dataset on UScrime from the data() package in R, but I met two problems, sometimes it shows that

Error in install.packages: 'match' requires vector arguments

and sometimes it tells that

Warning in install.packages: package ‘data’ is not available for this version of R'

How can I fix the problem?

Thank you!

Zhiying Hu
  • 11
  • 1
  • `data` isn't an R package. `data()` is a function that can load data sets from packages. It seems the `UScrimes` data comes from the `MASS` package. Make sure you have `MASS` installed and then you can load the data with `data("UScrime", package="MASS")` – MrFlick Mar 03 '22 at 21:11

0 Answers0