Difference between revisions of "R: operasi file"

From OnnoWiki
Jump to navigation Jump to search
(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...")
 
 
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



Pranala Menarik