misc {kyotil} | R Documentation |
Misc functions. summ computes iterative sum, sort of like diff.
pava (x, wt = rep(1, length(x))) summ(x) sample.for.cv (dat, v, seed) empty2na(x)
dat |
a data frame. One of the columns must be named y and y should be 0/1 with 1 for case and 0 for control |
v |
v-fold cross validation |
seed |
seed for random number generators |
x |
|
wt |
sample.for.cv: case and controls are sampled separately.
sample.for.cv returns a list of two vector of integers: train and test, which refer to the rows of dat