Bug in lpm()
Running the following code should reproduce an error
library(PerformanceAnalytics) data(edhec) lpm(edhec)
Error in [.xts(R, R < threshold, ) : 'i' or 'j' out of range
not actually a bug:
lpm(edhec[,1]) [1] 0.0004371911
this function only takes a single-column xts object.
We would certainly entertain a patch to handle multiple columns in the manner than many (most) other PerformanceAnalytics function do.
For your case: apply(edhec,2,lpm) will work.
I was not able to implement lpm in a multivariate framework due to the conditional nature of the calculation, the lengths of data for each column will not be the same. Patches would be most welcome