TidyCode: Tidy Code

View source: R/basic_functions.R

TidyCodeR 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)
}

bfw documentation built on March 18, 2022, 6:19 p.m.