-
Notifications
You must be signed in to change notification settings - Fork 7
CodingConvention
Christophe Dutang edited this page May 7, 2015
·
3 revisions
#Coding convention
- for the MBBEFD distribution, distinguish parametrizations
- first parametrization MBBEFD(a,b) : mbbefdR-1stparam.R, mbbefdCpp-1stparam.R
- second parametrization MBBEFD(g,b) : mbbefdR-2ndparam.R, mbbefdCpp-2ndparam.R
- for one-inflated distributions
- 1infl-xxx.R
- for the MBBEFD distribution, append the letter (d, p, q, r) + distr name in upper or lower case + R or C
- first parametrization :
dmbbefdR(),dmbbefdC() - second parametrization :
dMBBEFDR(),dMBBEFDC()
- first parametrization :
- for one-inflated distributions, append the letter (d, p, q, r) + oi + distr name in lower case
-
doi<origdistr>()for exampledoiunif()
-
- for the MBBEFD distribution, do both R or C
- first parametrization :
dmbbefdR(),dmbbefdC() - second parametrization :
dMBBEFDR(),dMBBEFDC() - for random generation (r), use C++
- otherwise (d, p, q) use R
- first parametrization :
- for one-inflated distributions, always use R
- for the MBBEFD distribution
- first parametrization :
ecmbbefd() - second parametrization :
ecMBBEFD()
- first parametrization :
- for base R distributions,
-
ec<origdistr>()for exampleecunif()
-
- for one-inflated distributions,
-
ecoi<origdistr>()for exampleecoiunif()
-
- for the MBBEFD distribution
- first parametrization :
mmbbefd()andtlmbbefd() - second parametrization :
mMBBEFD()andtlMBBEFD()
- first parametrization :
- for base R distributions,
- moments are already implemented in actuar
-
tl<origdistr>()for exampletlunif()
- for one-inflated distributions,
-
moi<origdistr>()for examplemoiunif() -
tloi<origdistr>()for exampletloiunif()
-
- arguments
-
logfordfunc -
log.pforpfuncandqfunc -
lower.tailforpfuncandqfunc
-
- NaN values
- inconsistent probability
p<0orp>1 - invalid parameter
- inconsistent probability
- recycling arguments : The numerical arguments other than
nare recycled to the length of the result. Only the first elements of the logical arguments are used. - manual page : should take the R base template
- do as much as possible unit testing.