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: which.allnonNA
Function Description: which.allnonNA
Finds all values of a vector which are not NA. Fills out a vector to length 6 with NAs if there are fewer than 6.Function Arguments:
| Argument | Default Value |
|---|---|
| x |
Function Source:
which.allnonNA=function(x)
{
good=which(!is.na(x))
result=rep(NA,6)
if(length(good)==0) return(result)
result[1:length(good)]=x[good]
return(result)
}
{
good=which(!is.na(x))
result=rep(NA,6)
if(length(good)==0) return(result)
result[1:length(good)]=x[good]
return(result)
}