Can you describe with sample code what is the issue ?
When I installed ISLR from CRAN, I see a dataset not a function
class(ISLR::Carseats)
#> [1] "data.frame"
head(ISLR::Carseats)
#> Sales CompPrice Income Advertising Population Price ShelveLoc Age
#> 1 9.50 138 73 11 276 120 Bad 42
#> 2 11.22 111 48 16 260 83 Good 65
#> 3 10.06 113 35 10 269 80 Medium 59
#> 4 7.40 117 100 4 466 97 Medium 55
#> 5 4.15 141 64 3 340 128 Bad 38
#> 6 10.81 124 113 13 501 72 Bad 78
#> Education Urban US
#> 1 17 Yes Yes
#> 2 10 Yes Yes
#> 3 12 Yes Yes
#> 4 14 Yes Yes
#> 5 13 Yes No
#> 6 16 No Yes
Created on 2018-03-31 by the reprex package (v0.2.0).