R error with MEPDF package inside function cube

18 Views Asked by At

I want to build a bivariate empirical distribution function. I have found the package MEPDF which does the job I want, however I get an error even while using the example available from the help.

Here is a documentation for this package with the example I am having trouble: MEPDF Documentation

Here is the code

data <- MASS::mvrnorm(100000, mu = c(0, 0), Sigma = diag(2))
density <- epdf(data,max_corner = c(2,2),
                min_corner = c(-2,-2),
                main_gridsize = c(0.05,0.05))

Inside the epdf function, the function cube is called and the following variable is created

char <- "X1"
  if (dim > 1) {
    for (i in 2:dim) {
      char <- paste(char, ",X", i, sep = "")
    }
  }
> char
[1] "X1,X2"

And finally I get an error on the following line

lst <- eval(parse(text = paste(".(", char, ")", sep = "")))
Error in .(X1, X2) : could not find function "."

This package was build under R 3.0 and I am using 4.1. I don't know if this could be a problem.

0

There are 0 best solutions below