Hi!
I'm puzzled by the return value of ifelse
consider
x<-integer(0)
ifelse(is(x, "character"), paste(x), x)
[1] NA
whereas
if (is(x, "character")) return(paste(x)) else x
[1] integer(0)
or
x<-integer(1)
ifelse(is(x, "character"), paste(x), x)
[1] 0
work as I had anticipated. Is this correct
On 4/26/2007 9:53 AM, [EMAIL PROTECTED] wrote:
> Hi!
>
> I'm puzzled by the return value of ifelse
>
> consider
>
> x<-integer(0)
> ifelse(is(x, "character"), paste(x), x)
> [1] NA
The test evaluates to a length 1 logical vector containing FALSE. So
ifelse() tries to return the first entry of
A simpler version of your "puzzling call to ifelse" is
ifelse(FALSE, character(0), integer(0))
The most obvious way to satisfy the requirements stated in the
documentation is to extend integer(0) to length 1 by creating an NA
value, and that's what you get as a return value (here the 'test'
ar
Duncan Murdoch wrote:
> On 4/26/2007 9:53 AM, [EMAIL PROTECTED] wrote:
>> Hi!
>>
>> I'm puzzled by the return value of ifelse
>>
>> consider
>>
>> x<-integer(0)
>> ifelse(is(x, "character"), paste(x), x)
>> [1] NA
>
> The test evaluates to a length 1 logical vector containing FALSE. So
> ifelse(
Hi,
R 2.5.0 isn't auto-completing paths properly as it used to. E.g.
suppose I have:
> dir("CEL/choe")
[1] "chipC-rep1.CEL" "chipC-rep2.CEL" "chipC-rep3.CEL" "chipS-rep1.CEL"
[5] "chipS-rep2.CEL" "chipS-rep3.CEL"
Now if I do:
ReadAffy("CEL/choe/ch # => ReadAffy("CEL/choe/chip
ReadAffy("CEL/c
Did you actually look at the NEWS file?
o The Unix-alike readline terminal interface now does
command-completion for R objects, incorporating the
functionality formerly in package 'rcompletion' by Deepayan
Sarkar. This can be disabled by setting the environment
Read release note of 2.5.0. It is mentioned there.
Ernest Turro wrote:
> Hi,
>
> R 2.5.0 isn't auto-completing paths properly as it used to. E.g.
> suppose I have:
>
> > dir("CEL/choe")
> [1] "chipC-rep1.CEL" "chipC-rep2.CEL" "chipC-rep3.CEL" "chipS-rep1.CEL"
> [5] "chipS-rep2.CEL" "chipS-rep
Apologies for missing that in NEWS.
Apart for auto-completion breaking for paths with '-', this sounds
very convenient.
E
On 26 Apr 2007, at 17:30, Prof Brian Ripley wrote:
> Did you actually look at the NEWS file?
>
> o The Unix-alike readline terminal interface now does
> command
Hi,
Using latest R 2.5.0 Patched, I'm unable to install the Matrix package
from cran.fhcrc.org.
I get:
Creating a new generic function for "isSymmetric" in "Matrix"
Creating a new generic function for "unname" in "Matrix"
Error in conformMethod(signature, mnames, fnames, f) :
In method f
Yes, it works in the release.
The essence of the problem is that Matrix defines an S4 method for '!'
with dispatch on 'e1', but the documentation for '!' (and many S3 methods)
says the argument is 'x'. As '!' is a primitive the argument matching of
the base function might be expected to be pos
Hi,
I recently discovered this buglet in lattice: If lattice is _not_
attached, I get
> lattice::dotplot(~1:10)
Error in eval(expr, envir, enclos) : could not find function "bwplot"
This happens because of this:
> lattice:::dotplot.formula
function (x, data = NULL, panel = "panel.dotplot", ...)
On 4/26/2007 7:39 PM, Deepayan Sarkar wrote:
> Hi,
>
> I recently discovered this buglet in lattice: If lattice is _not_
> attached, I get
>
>> lattice::dotplot(~1:10)
> Error in eval(expr, envir, enclos) : could not find function "bwplot"
>
> This happens because of this:
>
>> lattice:::dotplo
On 4/26/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote:
> On 4/26/2007 7:39 PM, Deepayan Sarkar wrote:
> > Hi,
> >
> > I recently discovered this buglet in lattice: If lattice is _not_
> > attached, I get
> >
> >> lattice::dotplot(~1:10)
> > Error in eval(expr, envir, enclos) : could not find functio
Duncan Murdoch <[EMAIL PROTECTED]> writes:
> On 4/26/2007 7:39 PM, Deepayan Sarkar wrote:
>> Hi,
>>
>> I recently discovered this buglet in lattice: If lattice is _not_
>> attached, I get
>>
>>> lattice::dotplot(~1:10)
>> Error in eval(expr, envir, enclos) : could not find function "bwplot"
>>
14 matches
Mail list logo