DBILITY

R package load,unload 본문

statistics/R

R package load,unload

DBILITY 2018. 11. 29. 07:47
반응형

library(패키지명) 이렇다.

> library(RMySQL)

다음의 패키지를 부착합니다: ‘RMySQL’

The following object is masked from ‘package:RSQLite’:

    isIdCurrent

> search()
 [1] ".GlobalEnv"        "package:RMySQL"    "package:DBI"      
 [4] "package:sqldf"     "package:RSQLite"   "package:gsubfn"   
 [7] "package:proto"     "tools:rstudio"     "package:stats"    
[10] "package:graphics"  "package:grDevices" "package:utils"    
[13] "package:datasets"  "package:methods"   "Autoloads"        
[16] "package:base"     
> detach("package:RMySQL",unload = T)
> search()
 [1] ".GlobalEnv"        "package:DBI"       "package:sqldf"    
 [4] "package:RSQLite"   "package:gsubfn"    "package:proto"    
 [7] "tools:rstudio"     "package:stats"     "package:graphics" 
[10] "package:grDevices" "package:utils"     "package:datasets" 
[13] "package:methods"   "Autoloads"         "package:base"     
> searchpaths()
 [1] ".GlobalEnv"                                         
 [2] "C:/Users/username/Documents/R/win-library/3.5/DBI"    
 [3] "C:/Users/username/Documents/R/win-library/3.5/sqldf"  
 [4] "C:/Users/username/Documents/R/win-library/3.5/RSQLite"
 [5] "C:/Users/username/Documents/R/win-library/3.5/gsubfn" 
 [6] "C:/Users/username/Documents/R/win-library/3.5/proto"  
 [7] "tools:rstudio"                                      
 [8] "C:/Program Files/R/R-3.5.1/library/stats"           
 [9] "C:/Program Files/R/R-3.5.1/library/graphics"        
[10] "C:/Program Files/R/R-3.5.1/library/grDevices"       
[11] "C:/Program Files/R/R-3.5.1/library/utils"           
[12] "C:/Program Files/R/R-3.5.1/library/datasets"        
[13] "C:/Program Files/R/R-3.5.1/library/methods"         
[14] "Autoloads"                                          
[15] "C:/PROGRA~1/R/R-35~1.1/library/base"                
> library(RMySQL)

다음의 패키지를 부착합니다: ‘RMySQL’

The following object is masked from ‘package:RSQLite’:

    isIdCurrent

> search()
 [1] ".GlobalEnv"        "package:RMySQL"    "package:DBI"      
 [4] "package:sqldf"     "package:RSQLite"   "package:gsubfn"   
 [7] "package:proto"     "tools:rstudio"     "package:stats"    
[10] "package:graphics"  "package:grDevices" "package:utils"    
[13] "package:datasets"  "package:methods"   "Autoloads"        
[16] "package:base"  

> detach("package:RMySQL",unload = T)
> search()
 [1] ".GlobalEnv"        "package:DBI"       "package:sqldf"    
 [4] "package:RSQLite"   "package:gsubfn"    "package:proto"    
 [7] "tools:rstudio"     "package:stats"     "package:graphics" 
[10] "package:grDevices" "package:utils"     "package:datasets" 
[13] "package:methods"   "Autoloads"         "package:base" 

> library(RMySQL,quietly = T)
> search()
 [1] ".GlobalEnv"        "package:RMySQL"    "package:DBI"      
 [4] "package:sqldf"     "package:RSQLite"   "package:gsubfn"   
 [7] "package:proto"     "tools:rstudio"     "package:stats"    
[10] "package:graphics"  "package:grDevices" "package:utils"    
[13] "package:datasets"  "package:methods"   "Autoloads"        
[16] "package:base"  

> unloadNamespace("RMySQL")
> search()
 [1] ".GlobalEnv"        "package:DBI"       "package:RSQLite"  
 [4] "package:gsubfn"    "package:proto"     "tools:rstudio"    
 [7] "package:stats"     "package:graphics"  "package:grDevices"
[10] "package:utils"     "package:datasets"  "package:methods"  
[13] "Autoloads"         "package:base"
반응형
Comments