Re: [Rd] missing IntegerFromString()

2007-06-07 Thread Aniko Szabo
Thanks to everybody who responded to my question. asInteger(coerceVector(x,INTSXP)) indeed does what I need. I guess there is a lot I don't understand about type coercion, as I would not have expected it to work. Aniko -Original Message- From: Seth Falcon [mailto:[EMAIL PROTECTED] Sent:

Re: [Rd] missing IntegerFromString()

2007-06-07 Thread Douglas Bates
On 6/6/07, Aniko Szabo <[EMAIL PROTECTED]> wrote: > Thanks to everybody who responded to my question. > asInteger(coerceVector(x,INTSXP)) indeed does what I need. I guess there > is a lot I don't understand about type coercion, as I would not have > expected it to work. It is better to use asInte

Re: [Rd] missing IntegerFromString()

2007-06-07 Thread Simon Urbanek
On Jun 7, 2007, at 11:33 AM, Douglas Bates wrote: > On 6/6/07, Aniko Szabo <[EMAIL PROTECTED]> wrote: >> Thanks to everybody who responded to my question. >> asInteger(coerceVector(x,INTSXP)) indeed does what I need. I guess >> there >> is a lot I don't understand about type coercion, as I woul

Re: [Rd] missing IntegerFromString()

2007-06-07 Thread Prof Brian Ripley
On Thu, 7 Jun 2007, Douglas Bates wrote: > On 6/6/07, Aniko Szabo <[EMAIL PROTECTED]> wrote: >> Thanks to everybody who responded to my question. >> asInteger(coerceVector(x,INTSXP)) indeed does what I need. I guess there >> is a lot I don't understand about type coercion, as I would not have >> e

Re: [Rd] missing IntegerFromString()

2007-06-07 Thread Prof Brian Ripley
On Thu, 7 Jun 2007, Prof Brian Ripley wrote: > On Thu, 7 Jun 2007, Douglas Bates wrote: > >> On 6/6/07, Aniko Szabo <[EMAIL PROTECTED]> wrote: >>> Thanks to everybody who responded to my question. >>> asInteger(coerceVector(x,INTSXP)) indeed does what I need. I guess there >>> is a lot I don't und

Re: [Rd] C function with unknown output length

2007-06-07 Thread Vincent Goulet
Le 07-06-06 à 15:20, Herve Pages a écrit : > Vincent Goulet wrote: >> Hi all, >> >> Could anyone point me to one or more examples in the R sources of a C >> function that is called without knowing in advance what will be the >> length (say) of the output vector? >> >> To make myself clearer, we ha

Re: [Rd] missing IntegerFromString()

2007-06-07 Thread Aniko Szabo
I am sorry about the confusion, I was too hasty. asInteger(coerceVector(x,INTSXP)) does not work after all. Here are more details of what I am trying to accomplish: I have a matrix with column names that are actually known to be integers (because I set them so myself in the R code, say, colnames(ma

Re: [Rd] missing IntegerFromString()

2007-06-07 Thread Seth Falcon
"Aniko Szabo" <[EMAIL PROTECTED]> writes: > I am sorry about the confusion, I was too hasty. > asInteger(coerceVector(x,INTSXP)) does not work after all. Here are more > details of what I am trying to accomplish: I have a matrix with column > names that are actually known to be integers (because I

Re: [Rd] missing IntegerFromString()

2007-06-07 Thread Prof Brian Ripley
On Thu, 7 Jun 2007, Aniko Szabo wrote: > I am sorry about the confusion, I was too hasty. > asInteger(coerceVector(x,INTSXP)) does not work after all. Here are more > details of what I am trying to accomplish: I have a matrix with column > names that are actually known to be integers (because I se