isAbsolutePath: Check if Path is Absolute.

Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/param.r

Description

Check whether a path is relative or absolute.

Usage

1

Arguments

path

Path to be tested.

Details

The function is designed to word with both Windows and Unix paths.

Value

TRUE if the path is absolute, FALSE otherwise.

Note

This function improves upon the analog function in R.utils package. For instance, "~hi" is not an absolute path.

Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

See Also

See also makefullpath.

Examples

1
2
3
4
5
6
7
isAbsolutePath( "C:/123" )   # TRUE
isAbsolutePath( "~123" )     # FALSE
isAbsolutePath( "~/123" )    # TRUE
isAbsolutePath( "/123" )     # TRUE
isAbsolutePath( "\\123" )    # TRUE
isAbsolutePath( "asd\\123" ) # FALSE
isAbsolutePath( "a\\123" )   # FALSE

ramwas documentation built on Nov. 8, 2020, 8:24 p.m.