I have a code with several plots, some of them are in layouts and others stand alone. The problem is when I draw a layout, the next plots, that must be alone, appears in the previous layout arrangement. How can I stop the layout arrangement for the plots after a layout?
layout(matrix(c(1,2,3,4), 2, 2))
plot(1:10)
plot(10:100)
plot(100:1000)
plot(1000:10000)
#Plots that I dont't want into a layout
plot(1, main = "Example 1")
plot(2, main = "Example 2")
When I run the entire code, I expected in the Rstudio window, a layout and then 2 separated plots, but I get:
and