Displaying 20 results from an estimated 20000 matches similar to: "NEWS and readNEWS"
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 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 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 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/
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 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 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/
2011 Dec 23
1
Debugging namespace problems
Hi all,
I frequently find that I've failed to export something in my NAMESPACE
and hence my package doesn't work when it's imported into another
package. Does anyone have suggestion for debugging this type of
problem? R CMD check passes without any ns related errors on both the
importee and the importer.
I've attached a reproducible example - if you install the development
2011 Jun 13
3
Detecting development environment
Hi all,
Is there a straight-forward, cross-platform way of determining if a
user has all the tools needed to develop R packages (i.e. gcc etc)?
It doesn't need to be 100%, but should give a rough idea. One idea I
had was simply to see if system("R CMD install --help") worked.
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
2010 Mar 19
5
Encrypt/decrypt in R
Hi all,
Does any one know of any encryption/decryption algorithms in R? I'm
not looking for anything robust - I want some way of printing output
to the screen that the user can't read immediately, but can decrypt a
little later. The main thing I don't want to the user to see is a
number, so (e.g.) ROT13 isn't appropriate.
Hadley
--
Assistant Professor / Dobelman Family Junior
2011 Apr 13
2
Line plots in base graphics
Am I missing something obvious on how to draw multi-line plots in base graphics?
In ggplot2, I can do:
data(Oxboys, package = "nlme")
library(ggplot2)
qplot(age, height, data = Oxboys, geom = "line", group = Subject)
But in base graphics, the best I can come up with is this:
with(Oxboys, plot(age, height, type = "n"))
lapply(split(Oxboys[c("age",
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 Jun 29
1
Performance enhancement for ave
library(plyr)
n<-100000
grp1<-sample(1:750, n, replace=T)
grp2<-sample(1:750, n, replace=T)
d<-data.frame(x=rnorm(n), y=rnorm(n), grp1=grp1, grp2=grp2)
system.time({
d$avx1 <- ave(d$x, list(d$grp1, d$grp2))
d$avy1 <- ave(d$y, list(d$grp1, d$grp2))
})
# user system elapsed
# 39.300 0.279 40.809
system.time({
d$avx2 <- ave(d$x, interaction(d$grp1, d$grp2, drop =
2010 Oct 08
2
What do you call the value that represents a missing argument?
Hi all,
What's the official name for the value that represents a missing argument?
e.g.
formals(plot)$x
str(formals(plot)$x)
deparse(formals(plot)$x)
is.symbol(formals(plot)$x)
What's the correct way to create an object like this? (for example if
you are manipulating the formals of a function to add an argument with
no default value, as in http://stackoverflow.com/questions/3892580/).
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 Aug 24
2
Comparing/diffing strings
Hi all,
all.equal is generally very useful when you want to find the
differences between two objects. It breaks down however, when you
have two long strings to compare:
> all.equal(a, b)
[1] "1 string mismatch"
Does any one know of any good text diffing tools implemented in R?
Thanks,
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice
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
2010 Jun 23
2
xtable for latex: setting some values globally
Dear All,
a quick xtable question. I do have quite a bunch of tables in my latex
document which I produce with xtable. That works fine so far.
But I wonder is it possible set some values such as "environement",
"caption.placement", or "size" globally so that it applies for table
unless otherwise specified?
If anybody has quick fix, that would be helpful.
Thanks and
2011 Feb 19
1
Accessing Package NEWS (NEWS.Rd)
Okay. So, after having spent quite some time never really tracking down
why my package NEWS files were unacceptable to readNEWS(), I
noticed that there was recent (to me anyway) development that allowed
the NEWS to be done as an Rd file. Sweet! A more standard format...
I converted a NEWS file in one of my unreleased packages to Rd format.
checkNEWS() gave it a thumbs up.
But then it went south.
2010 Sep 29
1
License of R manuals
Hi all,
Under what license are the R manuals (R language definition etc)
released? They are not mentioned explicitly in license() and have no
license information in the individual documents. Does this mean that
they are released under GPL-2? If so, what does that mean, given that
they aren't software?
Hadley
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics