Description Usage Arguments Value Note Author(s) Examples
This function return validate value that indicate variable that met the rule described by L param.
1 2 3 |
x |
is a vector which could be numeric, character or datetime type |
L |
is a expression ,eg:(0,10]),['a','c','b'],etc. |
method |
specified the method should be used |
mode |
is the mode of x |
tsFormat |
used to detect tsFormat in ts value |
logic value which could be T,F,NA
the expression of L is flexible,like "(0,3)","[7,11]","[0,Inf)",c('[-1,0]','(1,10)'), "[2013-1-2,2-13-10-11]",c('apple','orange')
sontron
1 2 3 4 5 6 7 8 9 10 | x=rnorm(10)
L="[0,Inf]"
validateVec(x,L,method='ranges',mode='numeric')
x.char=c('a','b','cd')
L.char=c('a','c')
validateVec(x=x.char,L=L.char,method='elements',mode='character')
validateVec(x=x.char,L=L.char,method='substrs',mode='character')
Date=c('2016-1-1 14:24:00',NA,'2016-6-1','2016-12-31 24:00:00')
L.date='[2016-1-1,2016-12-31)'
validateVec(x=Date,L=L.date,method='ranges',mode='datetime')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.