yarrr
yarrr copied to clipboard
Plotting in a loop
Hello, I'm using a pirateplot inside a loop and I'd like to include the i-value in the title of the graph. How should I do it?
Thanks
Hi Nico, in this case, the paste()
function is your friend.
For example, try..
library(yarrr)
for(i in 1:4) {
pirateplot(weight ~ Time, data = ChickWeight, main = paste("plot", i))
}