Closed akoontz11 closed 4 years ago
Great, thanks. You can give arguments to an sapply
function, and there is
mapply
too if you need it. At any rate, good to see you're making
progress!
Thanks for the tip. I'm going to close this issue as I think I figured this out: a few changes were required, but the major one was that I did indeed need to use mapply
.
I wanted to give an update on what I've been doing to update the code to compare against untransformed phylogenies.
Currently, I'm encountering issues with the worker function I'm
sapply
ing to the simulation data. The original worker function just correlated to the 10th column (i.e. delta = 1.0) of the matrix of MPD values supplied as an argument to that function. That would typically look likeMy new worker function instead takes a vector of MPD values of the original untransformed phylogeny as a 2nd argument to the function, and correlates against that. That vector looks identical to the matrix column shown above, and using the new worker function works when I'm comparing just a single set of values.
But when I try to
sapply
the new worker function, I get an error reading "incompatible dimensions". I feel like this may be happening because I'm trying tosapply
a function that takes multiple arguments, and I'm doing that incorrectly, but I'm not sure.I'm still working on this, and considering if there's a means to do all of this in a more straightforward way. But I wanted to let you know where I was at.