I am a true beginner, reached out to my professor and she instructed me to create a post in here, rather than look into it herself....so here I am!
The instructions in our homework say, "Now load the admissions data set, which contains admission information for men and women across six majors and keep only the admitted percentage column: " and provides the code below
load(admissions)
dat <- admissions %>% select(-applicants)
I have ensured that I have tidyverse and dslabs already installed. But I continually get this error:
Error in load(admissions) : bad 'file' argument
Does anyone know if I am doing something incorrectly? Or could it be an outdated dataset or something?
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
In addition: Warning messages:
1: package ‘dplyr’ was built under R version 4.2.1
2: In readChar(con, 5L, useBytes = TRUE) :
cannot open compressed file 'admissions', probable reason 'No such file or directory'
I told my professor that I suspected this dataset was outdated or may no longer exist as written....but I am not knowledgeable enough to say with 100% certainty
*The instructions in our homework say, "Now load the admissions data set, which contains admission information for men and women across six majors and keep only the admitted percentage column: " *
Is there anything in the homework instructions about installing an R package or loading a library? Possibly in earlier instructions? I suspect that we may be dealing with a dataset specifically constructed for your course.
That first warning messaage suggests that you are not using the most recent version of R which is 4.2.1 under which it looks like dplyr was compiled. I do not think is is anything to worry about.
admissions is part of the dslabs package. Load that package using the library() function.
library(tidyverse)
library(dslabs)
dat <- admissions %>% select(-applicants)
dat
#> major gender admitted
#> 1 A men 62
#> 2 B men 63
#> 3 C men 37
#> 4 D men 33
#> 5 E men 28
#> 6 F men 6
#> 7 A women 82
#> 8 B women 68
#> 9 C women 34
#> 10 D women 35
#> 11 E women 24
#> 12 F women 7
Great!
Would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it: