Hi All, I am trying to fetch data from a pdf file with the below code but getting the error message: Error in stri_split_regex(string, pattern, n = n, simplify = simplify, : argument "string" is missing, with no default
library(readr)library(stringr)library(magrittr)library(dplyr) table_data <- nvsr65_05[ [ 14 ] ] %>% str_split(pattern = "\n") %>% unlist() %>% str_subset(pattern = "^[^…].*(\\. ){5}") %>% str_c(collapse = "\n") %>% read_table(col_names = FALSE) %>% mutate(X2 = str_replace_all(X2, "(\\. )*", ""), X5 = rep(c("Neonatal", "Postnatal"), each = 10)) %>% set_names(value = c("rank", "cause_of_death", "deaths", "percent", "group")) Please advice. Thank you. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.