I am working on a problem set for ggplot2 in R. One of my questions asks for a scale log transformation, which both my notes and the Hadley Wickam book say can be done through this function:
scale_x_log()
However, when I use this function, R does not recognize it. Any time I use it, it gives me this error response:
Error: could not find function "scale_x_log"
When I use the help function, "?scale_x_log", it returns this error message:
No documentation for ‘scale_x_log’ in specified packages and libraries:
you could try ‘??scale_x_log’
The "??scale_x_log" page takes me to "ggplot2::scale_x_continuous", which lists the function "scale_x_log10()". I am wondering if the function I am using doesn't exist, though this does not seem likely to me. I am also wondering if I need to download another package or something. I hope this question is clear....
scale_x_log. It seems your references are out of date. Did you want a log10 transformation? Then usescale_x_log10. Did you want a natural long transformation? usescale_x_continuous(trans = "log")