Matthias Kohl was so kind and provided me the following lines in this issue:
library(distrEx) chf <- function(t, D){ E(D, function(x){exp(1i*t*x)}, useApply = FALSE) } ## Normalverteilung D <- Norm() t <- seq(-3, 3, by = 0.05) chf.norm <- sapply(t, chf, D = D) chf.exakt <- exp(-t^2/2) chf.diff <- chf.norm - chf.exakt plot(chf.diff) abs(chf.diff) This is nice BUT: * Only built-in distributions can be used * I want to understand the fft() function, instead here you used E() of the distrEx package. Apart from this it was exactly what i was looking for: I know the characteristic function and want to get the distribution. (My porposal was to use fft(,inverse=T).) Any help appreciated, Thomas ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.