-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chapter 3: error executing ggsave to create final plot of results #6
Comments
Does just calling print(class.plot) produce the same error? |
Yes, print(class.plot) returns the same error too. I notice also that print(class.res) outputs complete different figures than are printed in the book. Although I assuming this is because the data in the data dir is different atm. |
Hmmm. This is quite hard to debug since the error message is so vague. I'll try the code again. |
What version of ggplot2 are you running? |
My installation reports that I'm using ggplot2_0.9.1 |
I also has this bug.. Error in seq.default(min, max, by = by) : |
I think that's caused by the "scale_x_log10" function, in the result of easyham2.class, there are some zero-value caused by precison |
I had the same problem and agree with hanfelsun that its related to the scale_x_log_10 functions. I was able to get around this by plotting the log of the values for pr.Spam & pr.Ham so avoiding the need to use these functions. ie try this code for your plot instead: class.plot <- ggplot(class.df, aes(x = log(pr.Ham), log(pr.Spam))) + |
The following command in email_classify.R fails
ggsave(plot = class.plot,
filename = file.path("images", "03_final_classification.pdf"),
height = 10,
width = 10)
Throws this error:
Error in seq.default(min, max, by = by) :
invalid (to - from)/by in seq(.)
This is using R version 2.15.0 and OSX 10.7.3
The text was updated successfully, but these errors were encountered: