Nothing
###
### $Id: util.R 825 2014-06-25 22:06:03Z proebuck $
###
##-----------------------------------------------------------------------------
## Returns TRUE if path represents a directory; otherwise, FALSE.
dir.exists <- function(path) {
## Check arguments
stopifnot(is.character(path) && length(path) == 1)
##-------------------------------------------------------------------------
dirTest <- function(x) {
!is.na(isdir <- file.info(x)$isdir) & isdir
}
## Begin processing
file.exists(path) && dirTest(path)
}
##-----------------------------------------------------------------------------
## Remove spaces from beginning of string.
.trimleft <- function(string) {
stopifnot(is.character(string))
gsub("^[[:space:]]+", "", string)
}
##-----------------------------------------------------------------------------
## Remove spaces from end of string.
.trimright <- function(string) {
stopifnot(is.character(string))
gsub("[[:space:]]+$", "", string)
}
##-----------------------------------------------------------------------------
## Remove spaces from both ends of string.
.trim <- function(string) {
stopifnot(is.character(string))
.trimright(.trimleft(string))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.