Marc,
Thanks very much for this. I hadn't really looked at Rprof in the
past; now I have a new toy to play with!
I have formulated an hypothesis that the reason parse/eval is quicker
lies in the pattern-matching code: strsplit is using regular
expressions, whereas perhaps parse is using some mo
On Sat, 2006-08-19 at 10:25 -0600, Mike Nielsen wrote:
> Wow. New respect for parse/eval.
>
> Do you think this is a special case of a more general principle? I
> suppose the cost is memory, but from time to time a speedup like this
> would be very beneficial.
>
> Any hints about how R programm
Wow. New respect for parse/eval.
Do you think this is a special case of a more general principle? I
suppose the cost is memory, but from time to time a speedup like this
would be very beneficial.
Any hints about how R programmers could recognize such cases would, I
am sure, be of value to the l
s to all.
>
>
> Charles Annis, P.E.
>
> [EMAIL PROTECTED]
> phone: 561-352-9699
> eFax: 614-455-3265
> http://www.StatisticalEngineering.com
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Charles Annis, P.E.
>
[EMAIL PROTECTED] On Behalf Of Charles Annis, P.E.
Sent: Saturday, August 19, 2006 7:59 AM
To: r-help@stat.math.ethz.ch
Subject: [R] string-to-number
Greetings, Amigos:
I have been trying without success to convert a character string,
> repeated.measures.columns
[1] "3,6,10"
into c(3,6,10
On Sat, 2006-08-19 at 13:30 +0100, Prof Brian Ripley wrote:
> On Sat, 19 Aug 2006, Marc Schwartz wrote:
>
> > On Sat, 2006-08-19 at 07:58 -0400, Charles Annis, P.E. wrote:
> > > Greetings, Amigos:
> > >
> > > I have been trying without success to convert a character string,
> > > > repeated.measu
On Sat, 19 Aug 2006, Marc Schwartz wrote:
> On Sat, 2006-08-19 at 07:58 -0400, Charles Annis, P.E. wrote:
> > Greetings, Amigos:
> >
> > I have been trying without success to convert a character string,
> > > repeated.measures.columns
> > [1] "3,6,10"
> >
> > into c(3,6,10) for subsequent use.
>
On Sat, 19 Aug 2006, Charles Annis, P.E. wrote:
> Greetings, Amigos:
>
> I have been trying without success to convert a character string,
> > repeated.measures.columns
> [1] "3,6,10"
>
> into c(3,6,10) for subsequent use.
>
> as.numeric(repeated.measures.columns) doesn't work (likely because o
"Charles Annis, P.E." <[EMAIL PROTECTED]> writes:
> Greetings, Amigos:
>
> I have been trying without success to convert a character string,
> > repeated.measures.columns
> [1] "3,6,10"
>
> into c(3,6,10) for subsequent use.
>
> as.numeric(repeated.measures.columns) doesn't work (likely because
On Sat, 2006-08-19 at 07:58 -0400, Charles Annis, P.E. wrote:
> Greetings, Amigos:
>
> I have been trying without success to convert a character string,
> > repeated.measures.columns
> [1] "3,6,10"
>
> into c(3,6,10) for subsequent use.
>
> as.numeric(repeated.measures.columns) doesn't work (lik
Greetings, Amigos:
I have been trying without success to convert a character string,
> repeated.measures.columns
[1] "3,6,10"
into c(3,6,10) for subsequent use.
as.numeric(repeated.measures.columns) doesn't work (likely because of the
commas)
[1] NA
Warning message:
NAs introduced by coercion
I
Serge Boiko <[EMAIL PROTECTED]> writes:
> Hi there;
> In order to convert sting to number I do:
> s <- "22"
> mode(s) <- "integer" # "double", etc. will do
>
> Is that a "preferred" way?
Coersion functions are preferred.
> as.integer("22")
[1] 22
> as.numeric("22")
[1] 22
If you have the metho
Hi there;
In order to convert sting to number I do:
s <- "22"
mode(s) <- "integer" # "double", etc. will do
Is that a "preferred" way?
Many thanks.
-Serge
__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help
13 matches
Mail list logo