powered by
Small function that clears up messy code
TidyCode(tidy.code, jags = TRUE)
Messy code that needs cleaning
logical, if TRUE run code as JAGS model, Default: TRUE
(Somewhat) tidy code
# NOT RUN { messy <- "code <- function( x ) { print (x ) }" cat(messy) code <- function( x ) { print (x ) } cat ( TidyCode(messy, jags = FALSE) ) code <- function(x) { print(x) } # }
Run the code above in your browser using DataLab