Das liegt daran, dass in y eine 0 steckt. log(0) ist minus unendlich und damit lässt sich keine Pearson-Korrelation berechnen. NaN steht in R für Not a Number.
LG, Bernhard
---- `Oh, you can't help that,' said the Cat: `we're all mad here. I'm mad. You're mad.' `How do you know I'm mad?' said Alice. `You must be,' said the Cat, `or you wouldn't have come here.' (Lewis Carol, Alice in Wonderland)