R/Ascending_Num.R

Defines functions Ascending_Num

Documented in Ascending_Num

Ascending_Num <-
function(data){
  coun <- count(data)
  sor <- rev(sort(coun$freq))
  for (i in 1:length(sor)){
    d <- as.numeric(coun[which(coun$freq == sor[i]),]$x)
    data <- replace(data, data == d, (-i))
  }
  data <- data*(-1)
  return(data)
}

Try the MVNBayesian package in your browser

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

MVNBayesian documentation built on May 2, 2019, 2:16 a.m.