TidyCode {bfw}R Documentation

Tidy Code

Description

Small function that clears up messy code

Usage

TidyCode(tidy.code, jags = TRUE)

Arguments

tidy.code

Messy code that needs cleaning

jags

logical, if TRUE run code as JAGS model, Default: TRUE

Value

(Somewhat) tidy code

Examples

messy <- "code <- function( x ) {
print (x ) }"
cat(messy)
code <- function( x ) {
print (x ) }
cat ( TidyCode(messy, jags = FALSE) )
code <- function(x) {
   print(x)
}

[Package bfw version 0.4.2 Index]