Permalink
Browse files

Revised style and fixed filenames for Chapter 12 code.

  • Loading branch information...
1 parent 48df06a commit f7a8c8fd1369a5f105f7fd9ae8425c3b8e6ad90a @johnmyleswhite committed Feb 17, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 12-Model_Comparison/chapter12.R
@@ -17,11 +17,10 @@
# working directory for the console to whereever you have saved this file prior to running.
# Otherwise you will see errors when loading data or saving figures!
-
library('ggplot2')
# First code snippet
-df <- read.csv('data/df.csv')
+df <- read.csv(file.path('data', 'df.csv'))
logit.fit <- glm(Label ~ X + Y,
family = binomial(link = 'logit'),
@@ -222,7 +221,7 @@ ggplot(predictions, aes(x = X, y = Y, color = factor(value))) +
facet_grid(variable ~ .)
# Eleventh code snippet
-load('data/dtm.RData')
+load(file.path('data', 'dtm.RData'))
set.seed(1)

0 comments on commit f7a8c8f

Please sign in to comment.