Hi,
in a code chunk I generate some random data. Rarely it happens that the random data are not okay and they create later an error in the chunk. So, I need to add some condition which prevents that these data are generated. For example:
x <- round(rnorm(6, mean=180, sd))
q <- quantile(x, c(0.25, 0.75))
# my code chunk broke later if q[1]==q[2] which happened not very often
Of course, I can copy the code chunk into an R file in a repeat {...}
block to see what exactly leads to the error, but it would be easier if I could run the code chunk n
times directly in the R Markdown file. Is this possible?
Sigbert