~enricoschumann/neighbours

efb02a5d29fd201bc3bc5df83bbded9d0dfa381e — Enrico Schumann 2 years ago 8b8a9ef
Test if quadprog is available
1 files changed, 2 insertions(+), 1 deletions(-)

M vignettes/neighbours.Rnw
M vignettes/neighbours.Rnw => vignettes/neighbours.Rnw +2 -1
@@ 320,7 320,8 @@ sol.ls <- LSopt(variance,
                     printBar = FALSE),
                S = S)

sol.qp <- if (requireNamespace("NMOF"))
sol.qp <- if (requireNamespace("NMOF") &&
              requireNamespace("quadprog"))
              round(NMOF::minvar(S, wmin = 0, wmax = 0.2), 2) else NA
data.frame(LS = round(sol.ls$xbest, 2)[1:10],
           QP = sol.qp[1:10])