tidyverse / ggplot2

An implementation of the Grammar of Graphics in R
https://ggplot2.tidyverse.org
Other
6.48k stars 2.02k forks source link

does discrete x variable work? #653

Closed kohske closed 12 years ago

kohske commented 12 years ago

scales: 8fa5a67b2556da16dff076af4f9ecf564918942f gtable: d20948645d0a0a8b3e83dd92ed8e6358f2c1c10c ggplot2: e4fd80a3b2c46e2e540890b5f8c39390bbada438

qplot(letters[1:3], 1:3)

fails to:

Error: Discrete value supplied to continuous scale
wch commented 12 years ago

It works fine for me, with the same versions of the packages. Can you provide more information?

kohske commented 12 years ago

By load_alling the relevant packages:

load_all("~/Dropbox/dev/R/scales/")
load_all("~/Dropbox/dev/R/gtable/")
load_all("~/Dropbox/dev/R/ggplot2/")

by librarying, it wokrs:

Am I missing something (maybe w.r.t. devtools)?

wch commented 12 years ago

It's possible that the old version of devtools loaded things in a way that didn't work quite right.

Try installing the latest github version of devtools and doing load_all -- there have been a lot of changes, and it now loads packages in a way that is much more like loading a package with library().

kohske commented 12 years ago

Worked with the latest devtools, thanks. BTW, why was the ~/Rpackages support removed?

wch commented 12 years ago

I'm glad it works for you.

Hadley decided that removing ~/.Rpackages would make thing simpler, and he thought he was the only person who used it. I guess he was wrong about the second part. :)

kohske commented 12 years ago

I guess he was wrong about the second part. :)

Definitely yes :-) Here is the other person who loves the .Rpackages.

But okey, I can manage things by myself.