search for: myexampleend2

Displaying 1 result from an estimated 1 matches for "myexampleend2".

Did you mean: myexampleend
2011 Mar 10
1
getting percentiles by factor
...olumn, sortAsc=True) { # x data.frame/list being analysed # column to calculate percentiles on # sortAsc sorting order (True Ascending, False Descending) w1 <- ecdf(x$column) w2 <- if (sortAsc) w1(x$column) * 100 else abs(w1(x$column) * 100 - 100) w3 <- transform(x, myPerc=w2) return(w3) } myExampleEnd2 <- lapply(split(myExample, myExample$Sectors), myecdf2, column=Ret, sortAsc="True") myExampleEnd2 <- unsplit(myExampleEnd, myExample$Sectors) I'm not sure whether I'm going down the right way so any help is appreciated...also from scratch. Paolo [[alternative HTML versi...