excel - Embed VBA macro in R -



excel - Embed VBA macro in R -

how embed/execute excel vba macro in r ? have below sub want o execute r console.

sub splitinto99() dim x long, lastrow long, varrin variant, varrout variant lastrow = cells(rows.count, "a").end(xlup).row varrin = range("a1:a" & lastrow) redim varrout(1 24, 1 int(lastrow / 24) + 1) x = 0 lastrow - 1 varrout(1 + (x mod 24), 1 + int(x / 24)) = varrin(x + 1, 1) next range("b1").resize(24, ubound(varrout, 2)) = varrout end sub

i got set probabilities in columns & rows without using vba . creating list , loop.

probs <- seq(.01,.99,.01) wlm <- plm <- list() for(i in seq_along(probs)){ wlm[[i]] <- lm(zonal.price~.-zoneid-timestamp,data=train9) plm[[i]] <- predict(wlm[[i]],newdata=test9) } write.csv(plm,"predlm.csv")

r excel vba

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -