Hi,
I keep getting, "object 'sexe' not found", when trying to call the variable 'sexe' from my dataset.
names_fr <- readr::read_delim(my_url05, "\t") %>% filter(my_url05, sexe == 2, !is.na(preusuel), annais != "XXXX", preusuel !="_PRENOMS_RARES") %>% complete(preusuel, annais) %>% mutate(nombre = ifelse(is.na(nombre), 0, nombre), sexe = ifelse(is.na(sexe), 2, sexe)) %>% select(-sexe)
Im still quite new to R, so the problem might lay in the way data are loading.
Im asked to load data from an url:
my_url05 <- "https://perso.telecom-paristech.fr/eagan/class/igr204/data/nat1900- 2017.tsv"
names_fr <- readr::read_delim(my_url05, "\t")
An object called "my_url05" are created, holding the url.
Also a spec_tbl_df are created:
`` names_fr`
A tibble: 1 x 1
https://perso.telecom-paristech.fr/eagan/class/igr204/data/nat1900-
1 2017.tsv `
When i load the data "manually", by downloading the dataset myself an placing it in an object, it does contain the variable called "sexe".
R is the latest version and packages are updated.
What else might be the problem?
Thank you