Displaying 20 results from an estimated 2000 matches similar to: "Debugging namespace problems"
2011 Mar 03
2
lattice custom axis function -- right side margins
Dear R help list,
I have a plot with two different vertical scales that I want to display
on either side of the plot. It's quite similar to the
Fahrenheit-Centigrade example in the examples section of the
documentation for axis.default.
The right-side axis is clipped off, though, and I haven't been able to
figure out anything with viewport() and clipping or trellis.par.set to
fix
2010 Jun 30
1
Why the variation when creating .pdf file output for my plots?
Esteemed R Users,
Would some one be patient enough to explain the variation i see when
creating .pdf file output for my plots? FYI- my goal is produce the
highest quality .pdf output from the R 'command line' as opposed to
using the menu of the acitve graphics window.
Im using 32bit WinXP. Session info at the bottom. I have Ghostscript
v8.71 installed and in the Path such that
2005 Dec 22
1
png support for R 2.2.1 (PR#8425)
Full_Name: Sylvain Broh?e
Version: 2.2.1
OS: Suse Linux 9.2
Submission from: (NULL) (164.15.109.58)
I recently went to a new version of R (2.2.1) but now, when trying to save a
plot in the png format, I got this error message :
> png("my_plot.png")
Error in X11(paste("png::", filename, sep = ""), width, height, pointsize, :
unable to start device PNG
2005 Dec 23
1
how to specify dev.print target by a variable?
I want to do the following:
DEVw=500
DEVh=350
fname="my_plot"
dev.print(file=fname, device=FOO, width=DEVw, height=DEVh, bg="transparent")
How do I do this such that I can specify FOO to be one of several choices? (GDD, PNG, postscript, etc.)
If I make FOO a character variable, then "dev.print" complains.
I tried a simpled "substitute" but
2012 Feb 07
1
Using custom R_LIBS with R CMD install
Hi all,
Am I using the correct syntax to set a custom R_LIBS when running R
CMD INSTALL from the command line?
I get:
R_LIBS=/Users/hadley/R-dev R CMD INSTALL aL3xa-rapport-08e68ca/
# Desktop : R_LIBS=/Users/hadley/R-dev R CMD INSTALL aL3xa-rapport-08e68ca/
# * installing to library ?/Users/hadley/R?
# ERROR: dependency ?ascii? is not available for package ?rapport?
But:
ls
2012 Mar 20
1
Substitute adds id attribute?
Hi all,
I can't figure out how to make this problem easily reproducible, but I
can demonstrate it very simply, so I hoped someone might be able to
suggest a place to start:
> f <- function(x) substitute(x)
> f(x)
x
> f(mpg)
mpg
attr(,"id")
[1] 11
It works as expected in a clean R session:
> f <- function(x) substitute(x)
> f(x)
x
> f(mpg)
mpg
but not
2011 Dec 23
1
ggplot2: behaviour with empty datasets
For example, prepare like this
> df.0 <- data.frame(x = 0, y = 0, note = "1")
> df.1 <- subset(df.0, note == "1")
> df.2 <- subset(df.0, note == "2")
Then a call to
> ggplot() + aes(x = x, y = y) +
> geom_point(data = df.1) + geom_point(data = df.2)
produces the error
> Error in eval(expr, envir, enclos) : object 'x' not found
2011 Aug 16
2
sysdata.rda, namespaces and package dependencies
Hi all,
I'm struggling with accessing a package dataset (munsell.map, stored
in sysdata.rda) when that package is imported, not required. A simple
reproducible example is:
install.packages("munsell")
munsell::mnsl("10B 4/6")
# Error in match(col, munsell.map$name) : object 'munsell.map' not found
library(munsell)
munsell::mnsl("10B 4/6")
# Function
2011 May 04
4
Recursive objects
Hi all,
Does anyone have a comprehensive list of recursive-type objects in R?
is.recursive defines them as by exclusion: "most types of objects are
regarded as recursive, except for vector types, ?NULL? and symbols
(as given by ?as.name?)." I think this that means recursive objects
are:
* lists
* pairlists
* calls
* expressions
Did I miss anything?
Hadley
--
Assistant
2011 Oct 18
9
readRDS and saveRDS
Hi all,
Is there any chance that readRDS and saveRDS might one day become
read.rds and write.rds? That would make them more consistent with the
other reading and writing functions.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
2010 Jun 29
4
Tips for debugging: R CMD check examples
Hi all,
Does anyone have any suggestions for debugging the execution of
examples by R CMD check? The examples work fine when I run them from
a live R prompt, but I get errors when they are run by R CMD check.
Thanks,
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
2010 Nov 09
3
How to detect if a vector is FP constant?
Hi all,
What's the equivalent to length(unique(x)) == 1 if want to ignore
small floating point differences? Should I look at diff(range(x)) or
sd(x) or something else? What cut off should I use?
If it helps to be explicit, I'm interested in detecting when a vector
is constant for the purpose of visual display. In other words, if I
rescale x to [0, 1] do I have enough precision to get
2011 Dec 31
4
Base function for flipping matrices
Hi all,
Are there base functions that do the equivalent of this?
fliptb <- function(x) x[nrow(x):1, ]
fliplr <- function(x) x[, nrow(x):1]
Obviously not hard to implement (although it needs some more checks),
just wondering if it had already been implemented.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
2010 Aug 27
2
NEWS and readNEWS
readNEWS() states:
Read R's ?NEWS? file or a similarly formatted one. This is an
experimental feature, new in R 2.4.0 and may change in several
ways
and news() also indicates that this tool is supposed to work with
non-R news files. However, I've not been able to get readNEWS to read
a package news file, even when following the format indicated in
news(). Looking at the
2010 Nov 15
1
Create NAMESPACE file as 'package.skeleton()' would do
Hi there,
is there a way to create a NAMESPACE file based on Rd-files (or whatever is
needed in order to apply the regular expression "^[[:alpha:]]+" without(!)
resorting to package.skeleton() (as this kind of interferes with
roxygenize() pretty often)?
Thanks a lot,
Janko
[[alternative HTML version deleted]]
2017 Mar 19
3
RFC: (in-principle) native unquoting for standard evaluation
Would this return a quosure? (i.e. a single sided formula that captures
both expression and environment). That's the data structure we've adopted
in tidyeval as it already has some built in support.
Hadley
On Friday, March 17, 2017, Michael Lawrence <lawrence.michael at gene.com>
wrote:
> Interesting idea. Lazy and non-standard evaluation is going to happen; the
> language
2010 Aug 24
3
require is to suggests as what is to imports?
Hi all,
If a package suggests another package in its description, you can
check it at runtime with requires. How do you do check if a package
is available without loading it, if you only want to access one
function in the package namespace.
Thanks,
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
2011 Sep 21
3
Quelplot
Hi all,
Does anyone have an R implementation of the queplot (K.?M. Goldberg
and B.?Iglewicz. Bivariate extensions of the boxplot. Technometrics,
34(3):pp. 307?320, 1992)? I'm struggling with the estimation of the
asymmetry parameters.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
2010 Mar 10
2
ggplot2: "varwidth"-equivalent for geom_boxplot?
Hi,
Is there such a thing? If no: is it easily simulated?
thanks, Joh
2010 Nov 25
3
Go (back) from Rd to roxygen
Hi all,
Since roxygen is a great help to document R packages, I am wondering
if there exists an approach to go back from the raw Rd files to
roxygen-documentation? E.g. turn "\author{Somebody}" into "@author
Somebody". This sounds ridiculous, but I believe it helps in the long
term for me to maintain R packages.
Thanks!
Regards,
Yihui
--
Yihui Xie <xieyihui at