TidyCode: Tidy Code

Description Usage Arguments Value Examples

View source: R/basic_functions.R

Description

Small function that clears up messy code

Usage

1
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

1
2
3
4
5
6
7
8
9
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 Jan. 11, 2020, 9:29 a.m.