mjhendrickson / Learning-R

Project for learning R
MIT License
18 stars 3 forks source link

Error plotting dates after session refresh #6

Closed mjhendrickson closed 6 years ago

mjhendrickson commented 6 years ago

ggplot(data = HxMx) + geom_bar(mapping = aes(x = start_time_DI)) + scale_x_date(name = " ") + scale_y_continuous(name = " ", labels = comma) + theme(axis.title.x = element_blank(), axis.text.x = element_text(angle = 90, vjust = 0.5)) + labs(title = "Start Time")

Results in Error: Invalid input: date_trans works with objects of class Date only

mjhendrickson commented 6 years ago

After fix in #7, a new error results when running the above code. Error in check_breaks_labels(breaks, labels) : object 'comma' not found

mjhendrickson commented 6 years ago

Removing labels = comma from the scale_y_continous argument alleviates the issue.