Integrating R into Excel 2013 using VBA -
this question has answer here:
- running r scripts vba 2 answers
- embed r process in vba macro 3 answers
i'm playing wordclouds in r, drawing data column in excel 2013. had been doing going in excel doc, copying respective column , dumping via clipboard r. there tricky areas involving pivots in excel doc , i'd push wordcloud functionality excel.
i've been told 1 way run r script through vba on excel. knowledge of vba beyond poor, however. r script below:
library("tm") library("wordcloud") library("snowballc") clipboard <- read.table("clipboard",sep="\t",header=t) vclip <- as.vector(clipboard) words <- corpus(vectorsource(vclip)) words <- tm_map(words, stripwhitespace) words <- tm_map(words, tolower) words <- tm_map(words, removewords, stopwords("english")) wordcloud(words, scale=c(3,0.5), max.words=100, random.order=false, rot.per=0.35, use.r.layout=false, colors=brewer.pal(8, "dark2"))
what optimal way alter script run in vba? how run r script through vba on excel 2013? (i've heard deathly rumors rexcel, i'd avoid if possible)
Comments
Post a Comment