Comments (13)
hi,
scales depends on other few packages.
try
> install.packages('munsell', dep=TRUE)
and run the example.
from scales.
Thanks. I did install munsell
. I think the problem is likely to come from the fact that R begins to force LazyData: TRUE
in packages, or someone did not really make this commit into the package: cwickham/munsell@a5660c1 So this may be a bug of munsell
.
from scales.
Can you please provide the output of sessionInfo
?
from scales.
> library(scales) > x <- seq(0, 1, length = 25) > show_col(seq_gradient_pal()(x)) Error in match(col, munsell.map$name) : object 'munsell.map' not found > show_col(seq_gradient_pal("white", "black")(x)) > sessionInfo() R version 2.13.1 (2011-07-08) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] scales_0.1.0 loaded via a namespace (and not attached): [1] colorspace_1.1-0 dichromat_1.2-3 munsell_0.2 plyr_1.6 [5] RColorBrewer_1.0-5 stringr_0.5 > library(munsell) # problem is fixed when munsell is loaded > show_col(seq_gradient_pal()(x)) # OK
from scales.
I found that the error occurs in my environment. my session info:
> sessionInfo()
R version 2.13.1 (2011-07-08)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] ja_JP.UTF-8/ja_JP.UTF-8/C/C/ja_JP.UTF-8/ja_JP.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] scales_0.1.0 devtools_0.3
loaded via a namespace (and not attached):
[1] colorspace_1.0-1 dichromat_1.2-3 munsell_0.2 plyr_1.5.1 RColorBrewer_1.0-2 stringr_0.4
from scales.
actually munsell.map
is not exported from munsell, so it is not available after importing the exports into scales namespace.
Is this know problem in R-dev?
from scales.
then, should munsell be listed in "depends" instead of "imports" in DESCRIPTION file, since munsell must be attached?
http://cran.r-project.org/doc/manuals/R-exts.html#The-DESCRIPTION-file
from scales.
That's a weird error, but I think the basic problem is that in seq_gradient_pal
etc. I should have munsell::mnsl("10B 4/6")
in the defaults.
from scales.
Did you find this description in the R-exts.html?
The general rules are
- Packages whose name space only is needed to load the package using library(pkgname) must be listed in the ‘Imports’ field and not in the ‘Depends’ field.
- Packages that need to be attached to successfully load the package using library(pkgname) must be listed in the ‘Depends’ field, only.
- All packages that are needed to successfully run R CMD check on the package must be listed in one of ‘Depends’ or ‘Suggests’ or ‘Imports’. Packages used to run examples or tests conditionally (e.g. via if(require(pkgname))) should be listed in ‘Suggests’ or ‘Enhances’. (This allows checkers to ensure that all the packages needed for a complete check are installed.)
from scales.
Yes, I'm quite aware of that. I'm trying to minimise the use of depends and maximise the use of imports because it's better development practice: you're less likely to have/cause problems with other packages.
from scales.
aha, it sounds nice.
from scales.
since this issue has already been solved, any plans on releasing the github version of munsell to CRAN?
from scales.
Sure, just as soon as I get latex working on my computer again :/
from scales.
Related Issues (20)
- Feature request: `label_log()` but for negative numbers
- Feature request: expand suite of colour manipulation functions
- Feature request: `pal_size`, `pal_alpha`, & `pal_linewidth` HOT 5
- Feature request: properties for palettes
- Feature request: `hold` argument for `label_*` functions HOT 1
- Feature request: could scales support keeping oob values but with infinites turned to NA? HOT 2
- Consider including package name in S3 class name(s)?
- Add help for breaks_* functions that says they return a function etc
- Could arguments be added `breaks_extended`, so that it is easier to use?
- Feature - wrap at a specific character
- `breaks_width()` does not work with reverse transform
- Feature request: Could `label_*` functions support labelling every nth break? HOT 1
- Unexpected Error when using `scale_cut = cut_short_scale()` HOT 1
- Feature request: Could a `breaks_equal` function be provided? HOT 1
- Should `transform_time` be named `transform_datetime`?
- Feature request: could `scales::breaks_width` have an argument to return breaks that encompass the full range of the data?
- Feature request: `transform_squish` or `label_squish`
- Feature request: an option to remove leading zeros in `label_date_short()`
- Feature request: Could `scales::number` etc have a `style_negative` option of `"none"`?
- label_number(accuracy=) generating plots with multiple 0 values on the X axis HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scales.