Skip to contents

Split path string environment variable

Usage

splitPathString(x = Sys.getenv("PATH"))

Arguments

x

character(1). PATH string, containing elements separated with a colon (":"). Defaults to system path string.

Value

character. Discrete path elements in a vector. Intentionally does not make elements unique.

Note

Updated 2021-08-18.

See also

  • Sys.getenv("PATH")

Examples

splitPathString()
#>  [1] "/Applications/RStudio.app/Contents/Resources/app/quarto/bin"              
#>  [2] "/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64"
#>  [3] "/Applications/RStudio.app/Contents/Resources/app/bin/postback"            
#>  [4] "/opt/koopa/bin"                                                           
#>  [5] "/usr/bin"                                                                 
#>  [6] "/bin"                                                                     
#>  [7] "/usr/sbin"                                                                
#>  [8] "/sbin"                                                                    
#>  [9] "/Library/TeX/texbin"                                                      
#> [10] "/usr/local/MacGPG2/bin"                                                   
#> [11] "/opt/X11/bin"