Skip to content

Commit

Permalink
Change color for P.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Mar 5, 2014
1 parent 86c4423 commit 644fcc1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sand/R/sand-package.r
Expand Up @@ -41,7 +41,8 @@ set_chapter <- function(which) {

## Set chapter, on the first chunk
cat(colourise(paste0("SAND Chapter ", which,
", press N (+enter) to get started"), fg="red"), "\n")
", press N (+ENTER) to run the next code chunk"),
fg="red"), "\n")
.sand_set(chapter=which, chunk=1)
}

Expand Down Expand Up @@ -83,8 +84,7 @@ set_chapter <- function(which) {
if (is.null(code)) { return() }
code <- paste(code, collapse="\n")
cat(sep="",
colourise(paste0("<<< ", chapter, ".",
chunk, "\n"), fg="red"),
colourise(paste0("<<< ", chapter, ".", chunk, "\n"), fg="red"),
colourise(code, fg="light green"))
expr <- parse(text=code)

Expand Down Expand Up @@ -116,8 +116,7 @@ print.sand_print <- function(x, ...) {
if (is.null(code)) { return() }
code <- paste(code, collapse="\n")
cat(sep="",
colourise(paste0("=== ", chapter,
".", chunk, "\n"), fg="brown"),
colourise(paste0("=== ", chapter, ".", chunk, "\n"), fg="red"),
colourise(code, fg="green"))
}

Expand Down

0 comments on commit 644fcc1

Please sign in to comment.