R Under development (unstable) (2024-02-05 r85863 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library('skellam') > lambda1 = 3 > lambda2 = 2 > par(mfrow=c(1,2)) > > x = rskellam(100,lambda1, lambda2) > hist(x,prob=TRUE, main='skellam') > > xseq = seq(min(x)-1, max(x)+1) > lines(xseq, dskellam(xseq, lambda1, lambda2),col='red') > legend('topright', fill=c('black','red'), legend=c('hist','dens')) > > > pseq = seq(0,1,len=1000) > plot(qskellam(pseq, lambda1, lambda2), pseq, type='l', xlab='x', ylab='quant') > lines(xseq, pskellam(xseq, lambda1, lambda2),col='red') > legend('topright', fill=c('black','red'), legend=c('qskellam','pskellam')) > > proc.time() user system elapsed 0.12 0.10 0.21