Skip to content

Commit

Permalink
file opened in 'rb' mode resolves Issue johnmyleswhite#16
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Stednick committed Nov 26, 2013
1 parent 096787b commit d41f91b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 03-Classification/email_classify.R
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ggsave(plot = ex1,
# words as features
get.msg <- function(path)
{
con <- file(path, open = "rt", encoding = "latin1")
con <- file(path, open = "rb", encoding = "latin1")
text <- readLines(con)
# The message always begins after the first full line break
msg <- text[seq(which(text == "")[1] + 1, length(text), 1)]
Expand Down

0 comments on commit d41f91b

Please sign in to comment.