Difference between revisions of "R: operasi file"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with " file_vector <- list.files(path = ".") file_vector file_vector <- list.files(path = "..") file_vector file_vector %>% head() grepl(".pdf",file_list) pdf_list <- fi...") |
Onnowpurbo (talk | contribs) |
||
Line 9: | Line 9: | ||
file_vector %>% head() | file_vector %>% head() | ||
+ | # list file | ||
+ | # | ||
+ | file_list <- file_vector %>% head() | ||
grepl(".pdf",file_list) | grepl(".pdf",file_list) | ||
+ | # pdf list | ||
+ | # | ||
pdf_list <- file_vector[grepl(".pdf",file_list)] | pdf_list <- file_vector[grepl(".pdf",file_list)] | ||
+ | pdf_list | ||
Latest revision as of 10:29, 6 November 2018
file_vector <- list.files(path = ".") file_vector
file_vector <- list.files(path = "..") file_vector
file_vector %>% head()
# list file # file_list <- file_vector %>% head() grepl(".pdf",file_list)
# pdf list # pdf_list <- file_vector[grepl(".pdf",file_list)] pdf_list