library(data.table)
dt <- data.table(x=c(0.3, 1.3, 1.4, 3.6), y=c(1.2, 1.2, 3.8, 3.9))
empirical_cdf(dt$x, ubounds=as.numeric(1:4))
empirical_cdf(dt, ubounds=list(x=as.numeric(1:4)))
empirical_cdf(dt, ubounds=list(x=as.numeric(1:4), y=as.numeric(1:4)))
empirical_cdf(ubounds=list(x=as.numeric(1:4), y=as.numeric(1:4), z=as.numeric(1:2)))
Run the code above in your browser using DataLab