Topic: Utilities
Topic Description:
Basic R utilities used in many packages and functions, such as date and string manipulations, statistical distributions, geometry of lines and distances. The R package date is required for the two data functions.
File: utilities/utilities.r
| View File Source | Download File | No help file available |
Function: logical.grep
Function Description: logical.grep
A form of grep returning logical instead of indices (numbers).Function Arguments:
| Argument | Default Value |
|---|---|
| needle | |
| haystack |
Function Source:
logical.grep=function(needle,haystack)
{
result=rep(FALSE,length(haystack))
result[grep(needle,haystack,fixed=TRUE)]=TRUE
return(result)
}
{
result=rep(FALSE,length(haystack))
result[grep(needle,haystack,fixed=TRUE)]=TRUE
return(result)
}