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: right
Function Description: right
Returns the rightmost n characters of a stringFunction Arguments:
| Argument | Default Value |
|---|---|
| s | |
| n | |
| bytetype | 'bytes' |
Function Source:
right=function(s,n,bytetype='bytes')
{
strlen=nchar(s,type=bytetype)
return(substr(s,strlen-n+1,strlen))
}
{
strlen=nchar(s,type=bytetype)
return(substr(s,strlen-n+1,strlen))
}