[R] discrete ECDF

Wu Gong wg2f at mtmail.mtsu.edu
Wed Aug 4 17:38:00 CEST 2010

Just a little difference. 

ecdf.tbl <- function (.dat) { 
	.dat <- as.matrix(.dat)
	na.m <- is.na(.dat)
	.dat[na.m]<-0 # Assign NA a value 0  
	res <- apply(t(apply(.dat,1,cumsum)),2,cumsum)
	res[na.m] <- NA # Assign NA back

A R learner.
View this message in context: http://r.789695.n4.nabble.com/discrete-ECDF-tp2313561p2313673.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list