[R] 폴더 안의 파일 목록 가져오기

list.files(path, pattern = ) 

> getwd()
[1] "C:/Users/Jay/Desktop/R_basic"
> list.files(getwd())
 [1] "[K-MOOC] 데이터과학을 위한 R프로그래밍_2021"
 [2] "corr_analysis.R"                            
 [3] "correlation test_iris.R"                    
 [4] "corrgram.png"                               
 [5] "dacon"                                      
 [6] "moocr"                                      
 [7] "pval.xlsx"                                  
 [8] "Rplot.png"                                  
 [9] "Rplot01.png"                                
[10] "Rplot02.png"                                
[11] "timeseries.R"                               
[12] "상관분석_chart.png"                         
[13] "상관분석_corrgram.png"                      
> list.files(getwd(),pattern = '.xlsx')
[1] "pval.xlsx"
>

 

'Data Science > R' 카테고리의 다른 글

벡터, 행렬의 연산 및 함수  (1) 2022.12.07