Hi,
is there an easy, robust, and/or recommended way to distinguish a
missing argument from an empty argument as in:
foo <- function(i, j){
print(missing(j))
print(nargs())
}
foo(i) # TRUE, 1
foo(i,) # TRUE, 2
I know I can work around with nargs, the list of arguments and the names
Hello,
It seems that the plot function for dendrograms does not draw labels when
they are too long.
> hc <- hclust(dist(USArrests), "ave")
> dend1 <- as.dendrogram(hc)
> dend2 <- cut(dend1, h=70)
> dd <- dend2$lower[[1]]
> plot(dd) # first label is drawn
> attr(dd[[1]], "label") <- "a
On Tue, 25 Jan 2011, Renaud Gaujoux wrote:
Hi,
is there an easy, robust, and/or recommended way to distinguish a missing
argument from an empty argument as in:
An empty argument is a missing argument when argument matching is
done, e.g.
foo <- function(i,j) match.call()
foo(i)
foo(i = i
My purpose is indeed to write a '[' method.
I will go for the `[.data.frame` solution then.
Thank you.
On 25/01/2011 12:53, Prof Brian Ripley wrote:
On Tue, 25 Jan 2011, Renaud Gaujoux wrote:
Hi,
is there an easy, robust, and/or recommended way to distinguish a
missing argument from an empt
Hi Karl,
On 01/25/2011 11:27 AM, Karl Forner wrote:
It seems that the plot function for dendrograms does not draw labels when
they are too long.
hc<- hclust(dist(USArrests), "ave")
dend1<- as.dendrogram(hc)
dend2<- cut(dend1, h=70)
dd<- dend2$lower[[1]]
plot(dd) # first label is drawn
attr(dd
Matthew Dowle wrote:
> I'm not sure, but note the difference in locale between
> Linux (UTF-8) and Windows (non UTF-8). As far as I
> understand it R much prefers UTF-8, which Windows doesn't
> natively support. Otherwise you could just change your
> Windows locale to a UTF-8 locale to make R happ
Hi Tobias and thank you for your reply,
Using your insight I managed to work-around the issue (with some help) by
increasing
the "mai" option of par().
For example a "mai" with first coordinate (bottom) set to 5 allows to
display ~ 42 letters.
We tried to change the xpd value in the text() call t
Hi.
I'm writing a print method for an object that includes a numeric matrix
for which
the lower diagonal elements are not meaningful. So I make the lower
diagonal of my matrix NA and print it.
But my co-author does not like NA there and wants a dash.
I have tried coercing the matrix to characte
On Jan 25, 2011, at 9:34 AM, Robin Hankin wrote:
> Hi.
>
> I'm writing a print method for an object that includes a numeric matrix
> for which
> the lower diagonal elements are not meaningful. So I make the lower
> diagonal of my matrix NA and print it.
>
> But my co-author does not like NA the
I don't know if that's enough to flip the UTF8 switches
internally in R. If it is enough, then this result may show
I'm barking up the wrong tree. Hopefully someone from
core is watching who knows. Is it feasible that you run
R using an alias, and for some reason the alias is not
picking up your s
Hi list,
When nesting 2 function calls, if an exception occurs during the inner
call, the error message will display properly:
bar <- function() stop("bar() is broken")
foo <- function(x) {x * (x - 2)}
> foo(bar())
Error in bar() : bar() is broken
However, starting with R 2.12, if fo
On Jan 25, 2011, at 5:49 AM, Karl Ove Hufthammer wrote:
> Matthew Dowle wrote:
>
>> I'm not sure, but note the difference in locale between
>> Linux (UTF-8) and Windows (non UTF-8). As far as I
>> understand it R much prefers UTF-8, which Windows doesn't
>> natively support. Otherwise you could
L.S.
Please find below a patch for dendrogram.R (stats package)
against revision r54107 which allows one to pass the xpd
parameter as a component of the nodePar list (to be
passed to plot.dendrogram).
I hope I did not overlook anything.
Best,
Tobias
378a379
> lab.xpd <- Xtract("xpd", nPar,
Thanks Simon! I can reproduce this on Linux now, too.
locale -a didn't show en_US.iso88591 for me so I needed
'sudo locale-gen en_US' first.
Then running R with
$ LANG="en_US.ISO-8859-1" R
is enough to reproduce the problem.
Karl - can you use tabulate instead as Simon suggests?
Matthew
--
V
14 matches
Mail list logo