On Wed, 11 Jul 2007, Herve Pages wrote:
> Hi,
>
> I'm wondering why indexing a data frame by row name doesn't work
> with [[. It works with [:
>
> > sw <- swiss[1:5,1:2]
> > sw["Moutier", "Agriculture"]
> [1] 36.5
>
> but not with [[:
>
> > sw[["Moutier", "Agriculture"]]
> Error in .subset2(.
Hi,
I'm wondering why indexing a data frame by row name doesn't work
with [[. It works with [:
> sw <- swiss[1:5,1:2]
> sw["Moutier", "Agriculture"]
[1] 36.5
but not with [[:
> sw[["Moutier", "Agriculture"]]
Error in .subset2(.subset2(x, ..2), ..1) : subscript out of bounds
The probl
Just an opinion from an R user: I think it's a sound idea. I use my own
version of sweep with a stricter check: it stops if the vector is not
exactly the right length.
-- Tony Plate
Ben Bolker wrote:
> Ben Bolker zoo.ufl.edu> writes:
>
>
>> What would R-core think of the following 'enhan
Hi Kasper
This is not an immediate solution for your problem,
but a suggestion that the "ideal" solution
might be different from what you are asking for.
In many projects, when we need to compile
the same source file for two or more different
purposes (e.g. architectures, compilation flags, etc
On Jul 11, 2007, at 9:30 AM, Prof Brian Ripley wrote:
> On Mon, 9 Jul 2007, Kasper Daniel Hansen wrote:
>
>> Hi
>>
>> This is a question prompted by the mac version of R, but as I see it,
>> it should have broader interest.
>>
>> These days the CRAN Mac binary per default compiles every package f
On Mon, 9 Jul 2007, Kasper Daniel Hansen wrote:
> Hi
>
> This is a question prompted by the mac version of R, but as I see it,
> it should have broader interest.
>
> These days the CRAN Mac binary per default compiles every package for
> two architectures. First i386 and then ppc. In between the t
These don't work either:
args(match.fun("{"))
args("{")
On 7/11/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
> On Wed, 11 Jul 2007, Duncan Murdoch wrote:
>
> > On 7/11/2007 9:40 AM, Seth Falcon wrote:
> >> Prof Brian Ripley <[EMAIL PROTECTED]> writes:
> >>
> >>> My problem is that if we mak
On Wed, 11 Jul 2007, Duncan Murdoch wrote:
> On 7/11/2007 9:40 AM, Seth Falcon wrote:
>> Prof Brian Ripley <[EMAIL PROTECTED]> writes:
>>
>>> My problem is that if we make formals() work on primitives, people will
>>> expect
>>>
>>> formals(log) <- value
>>>
>>> to work, and it cannot.
>>
>>
On 7/11/2007 9:40 AM, Seth Falcon wrote:
> Prof Brian Ripley <[EMAIL PROTECTED]> writes:
>
>> My problem is that if we make formals() work on primitives, people will
>> expect
>>
>> formals(log) <- value
>>
>> to work, and it cannot.
>
> But it could give an informative error message. Asking fo
Even that does not appear to work everywhere.
Either of these returns NULL:
formals(args("{"))
formals(args(match.fun("{")))
> R.version.string # XP
[1] "R version 2.5.1 (2007-06-27)"
On 7/11/07, Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
> > formals(args(log))
> $x
>
>
> $base
> exp(1)
>
> g
Prof Brian Ripley <[EMAIL PROTECTED]> writes:
> My problem is that if we make formals() work on primitives, people will
> expect
>
> formals(log) <- value
>
> to work, and it cannot.
But it could give an informative error message. Asking for formals()
seems to make sense so making it work seems
My problem is that if we make formals() work on primitives, people will
expect
formals(log) <- value
to work, and it cannot.
On Wed, 11 Jul 2007, Martin Maechler wrote:
>> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]>
>> on Wed, 11 Jul 2007 05:48:56 +0100 (BST) writes:
>
>>> f
> "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]>
> on Wed, 11 Jul 2007 05:48:56 +0100 (BST) writes:
>> formals(args(log))
BDR> $x
BDR> $base
BDR> exp(1)
BDR> gives what formals(log) used to.
(I knew). I've been asking myself several times now,
if we should not m
On Jul 10, 2007, at 12:33 PM, Saptarshi Guha wrote:
> Hi,
> Some progress: I am using
> SEXP retty;
> book=Calloc(1,int);
> *book=10;
> PROTECT(retty=R_MakeExternalPtr(book,R_NilValue,R_NilValue));
>
> then UNPROTECTING and returning retty.
>
> In
14 matches
Mail list logo