diff --git a/.gitignore b/.gitignore index a0fd3b3..6c38bf7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ # Example code in package build process *-Ex.R +.Rproj.user diff --git a/DESCRIPTION b/DESCRIPTION index 6683f12..3ec6f2a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,6 +7,6 @@ Maintainer: Francois Pelletier Description: This is a package gathering different functions to work with the characteristic function and Fourier transforms Depends: - actuar,MASS,multicore + actuar,MASS,parallel LazyLoad: yes License: LGPL-3 diff --git a/FourierStuff.Rproj b/FourierStuff.Rproj new file mode 100644 index 0000000..21a4da0 --- /dev/null +++ b/FourierStuff.Rproj @@ -0,0 +1,17 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source diff --git a/R/cftocdf.R b/R/cftocdf.R index 92607f3..b0d1917 100644 --- a/R/cftocdf.R +++ b/R/cftocdf.R @@ -24,7 +24,7 @@ cftocdf <- function(grid,char.fun,...,wmin=0,wmax=50,MSwindows=FALSE) # Integrate for each grid point using parallel computation if available if(!MSwindows) { - return(unlist(multicore::mclapply(grid, + return(unlist(mclapply(grid, function(x) 1/2-1/pi* integrate(integrand,wmin,wmax,x,char.fun,...)$value))) }