R/PRO.R

Defines functions PRO

PRO <-
function(groups, size, newSize, grpIDs){
newGrpSizes<-unlist(lapply(1:length(grpIDs), function(i, groups){
newGrpSize <- round(newSize*(sum(groups==i)/size))
if(newGrpSize == 0)
newGrpSize <- 1
return(newGrpSize)
}, groups))

return(newGrpSizes)
}

Try the ccChooser package in your browser

Any scripts or data that you put into this service are public.

ccChooser documentation built on May 1, 2019, 10:56 p.m.