Off topic, but since I've observe both styles, does anyone know the
history behind/reason for using ## instead of a single # to start
comments in R. I know some editors do this by default. Is it because
in C it is easier to distinguish (search/replace/...) comments from C
preprocessor directives
I have recently become aware of some curious behaviour of median() which I
think could be usefully corrected. I am sure this must have come up before,
but I'm raising it again.
The phenomenon is best shown by a simple example.
> d <- matrix(runif(4*4), 4, 4)
> d
[,1] [,2]
On Tue, Sep 21, 2010 at 9:20 PM, David Winsemius wrote:
>
> On Sep 22, 2010, at 12:12 AM, Henrik Bengtsson wrote:
>
>> David's post made me realize that I got the sub()/gsub() lines wrong.
>> It should be:
>>
>> regexpr("a{2-}", "")
>> sub("a{2-}", "", "")
>> gsub("a{2-}", "", "")
>>
>
> Still no
On Sep 22, 2010, at 12:12 AM, Henrik Bengtsson wrote:
David's post made me realize that I got the sub()/gsub() lines wrong.
It should be:
regexpr("a{2-}", "")
sub("a{2-}", "", "")
gsub("a{2-}", "", "")
Still no crash on a Mac. Did you mean to include a third argument to
regexpr() as you d
David's post made me realize that I got the sub()/gsub() lines wrong.
It should be:
regexpr("a{2-}", "")
sub("a{2-}", "", "")
gsub("a{2-}", "", "")
Either way, the crash is there, at on least Windows and Linux.
/Henrik
On Tue, Sep 21, 2010 at 8:43 PM, David Winsemius wrote:
>
> On Sep 21, 2010
On Sep 21, 2010, at 11:04 PM, Henrik Bengtsson wrote:
Each of the following calls crash ("core dumps") R (R --vanilla) on
various versions and OSes:
regexpr("a{2-}", "")
sub("a{2-}", "")
gsub("a{2-}", "")
EXAMPLES:
sessionInfo()
R version 2.11.1 Patched (2010-09-16 r52949)
Platform: i386-
Each of the following calls crash ("core dumps") R (R --vanilla) on
various versions and OSes:
regexpr("a{2-}", "")
sub("a{2-}", "")
gsub("a{2-}", "")
EXAMPLES:
> sessionInfo()
R version 2.11.1 Patched (2010-09-16 r52949)
Platform: i386-pc-mingw32 (32-bit)
...
> regexpr("a{2-}", "")
Assertion f
I have a 64 bit machine running 64 bit windows 7 pro, 64 bit MySQL, and 64
bit R 2.11.1.
I have also installed RTools for 64 bit windows for this version of R
(archive name is oldWin64toolchain.zip; the install path for its contents
is C:\RTools, if that matters). I can open up a commandline wind
I see that some of the speed patches that I posted have been
incorporated into the current development version (eg, my patch-for,
patch-evalList, and patch-vec-arith).
My patch for speeding up x^2 has been addressed in an inadvisable way,
however. This was a simple addition of four lines of code
Yes, that's more or less what I mean. Thanks!
Maybe this functionality can be added to src/gnuwin32/rui.c
Regards,
Yihui
--
Yihui Xie
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA
On Tue, Sep 21, 2010 at 6:54 AM, Barry
>> How about an argument to lapply which would specify the [ or [[ subseting
>> to use
>> in the splitting of the vector?
>> Or may be a different set of functions lapply1,
>> sapply1?
>>
>>
> I'm not sure what you want exactly, but what about just using mapply over
> the names and vector elements
On 21/09/2010 10:38 AM, Karl Forner wrote:
Hello,
I got no reply on this issue.
It is not critical and I could think of work-around, but it really looks
like a bug to me.
Should I file a bug-report instead of posting in this list ?
I'd probably post instructions for a reproducible example fir
Hello,
I got no reply on this issue.
It is not critical and I could think of work-around, but it really looks
like a bug to me.
Should I file a bug-report instead of posting in this list ?
Thanks,
Karl
On Thu, Sep 16, 2010 at 6:11 PM, Karl Forner wrote:
> Hello,
>
> I have a package with a na
See ?vapply also
On Tue, Sep 21, 2010 at 7:55 AM, Vitaly S. wrote:
>
> Dear R developers,
>
> Reviewing my code, I have realized that about 80% of the time in the lapply
> I
> need to access the names of the objects inside the loop.
>
> In such cases I iterate over indexes or names:
> lapply(nam
On Tue, Sep 21, 2010 at 3:55 AM, Vitaly S. wrote:
>
> Dear R developers,
>
> Reviewing my code, I have realized that about 80% of the time in the lapply
> I
> need to access the names of the objects inside the loop.
>
> In such cases I iterate over indexes or names:
> lapply(names(x), ... [i]),
>
On Sat, Sep 18, 2010 at 11:17 PM, Yihui Xie wrote:
> Dear R developers,
>
> I asked this question in r-help list but have not got a definite
> solution yet, and I think it might be more appropriate to ask
> developers or CRAN maintainers directly. Many software packages often
> have a menu item li
Dear R developers,
Reviewing my code, I have realized that about 80% of the time in the lapply I
need to access the names of the objects inside the loop.
In such cases I iterate over indexes or names:
lapply(names(x), ... [i]),
lapply(seq_along(x), ... x[[i]] ... names(x)[i] ), or
for(i in seq
17 matches
Mail list logo