```
# \donttest{
## these are equivalent, but 2d is faster for n > 50
n <- 100
x <- rnorm(100)
y <- rnorm(100)
all.equal(dcov(x, y)^2, dcov2d(x, y), check.attributes = FALSE)
all.equal(bcdcor(x, y), dcor2d(x, y, "U"), check.attributes = FALSE)
x <- rlnorm(400)
y <- rexp(400)
dcov.test(x, y, R=199) #permutation test
dcor.test(x, y, R=199)
# }
```

Run the code above in your browser using DataLab