I have a function that calls multiple windows (new graphics device window). To make this happen I use windows(). This works but as this is for a package how do I make it platform neutral so each plot gets plotted in a new window while leaving the old window?
What I currently have:
WORD.C <- function(WORDS){
require(wordcloud)
L2 <- lapply(WORDS, function(x) as.data.frame(table(x), stringsAsFactors = FALSE))
FUN <- function(X){
windows() #how to make this platform neutral
wordcloud(X[, 1], X[, 2], min.freq=1)
}
lapply(L2, FUN)
}
WORD.C(list.xy)
Will
dev.new()cover your needs? It opens a graphics window of the default type set up in your console sessions.