[Rd] source(), parse(), and foreign UTF-8 characters

2017-05-09 Thread Kirill Müller
Hi I'm having trouble sourcing or parsing a UTF-8 file that contains characters that are not representable in the current locale ("foreign characters") on Windows. The source() function stops with an error, the parse() function reencodes all foreign characters using the notation. I have add

Re: [Rd] A few suggestions and perspectives from a PhD student

2017-05-09 Thread Hilmar Berger
Hi, On 08/05/17 16:37, Ista Zahn wrote: One of the key strengths of R is that packages are not akin to "fan created mods". They are a central and necessary part of the R system. I would tend to disagree here. R packages are in their majority not maintained by the core R developers. Concepts, f

Re: [Rd] A few suggestions and perspectives from a PhD student

2017-05-09 Thread Joris Meys
On Tue, May 9, 2017 at 9:47 AM, Hilmar Berger wrote: > Hi, > > On 08/05/17 16:37, Ista Zahn wrote: > >> One of the key strengths of R is that packages are not akin to "fan >> created mods". They are a central and necessary part of the R system. >> >> I would tend to disagree here. R packages are

Re: [Rd] A few suggestions and perspectives from a PhD student

2017-05-09 Thread Lionel Henry
> Third, there's a lot of nonstandard evaluation going on in all these > packages. Using them inside your own functions requires serious attention > (eg the difference between aes() and aes_() in ggplot2). Actually, even > though I definitely see the merits of these packages in data analysis, the >

Re: [Rd] A few suggestions and perspectives from a PhD student

2017-05-09 Thread Hilmar Berger
On 09/05/17 11:22, Joris Meys wrote: > > > On Tue, May 9, 2017 at 9:47 AM, Hilmar Berger > mailto:ber...@mpiib-berlin.mpg.de>> wrote: > > Hi, > > On 08/05/17 16:37, Ista Zahn wrote: > > One of the key strengths of R is that packages are not akin to > "fan > create

[Rd] Potential Bug in convolve {stats}

2017-05-09 Thread George Anastasiou
Dear All, I think there is a bug in the convolve function of stats package. Running the following: a <- convolve(c(1,1,1,1), 1, type="filter") a the answer is: [1] 1 1 whereas it should be: [1] 1 1 1 1 Looking at the code of convolve, the bug is on line 22 at: [-c(1L:n1, (n - n1 + 1L):n)]/n

Re: [Rd] source(), parse(), and foreign UTF-8 characters

2017-05-09 Thread Duncan Murdoch
On 09/05/2017 3:42 AM, Kirill Müller wrote: Hi I'm having trouble sourcing or parsing a UTF-8 file that contains characters that are not representable in the current locale ("foreign characters") on Windows. The source() function stops with an error, the parse() function reencodes all foreign c

[Rd] registering Fortran routines in R packages

2017-05-09 Thread Christophe Dutang
Dear list, I’m trying to register Fortran routines in randtoolbox (in srt/init.c file), see https://r-forge.r-project.org/scm/viewvc.php/pkg/randtoolbox/src/init.c?view=markup&root=rmetrics. Reading https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Registering-native-routines and

Re: [Rd] registering Fortran routines in R packages

2017-05-09 Thread Berend Hasselman
> On 9 May 2017, at 13:44, Christophe Dutang wrote: > > Dear list, > > I’m trying to register Fortran routines in randtoolbox (in srt/init.c file), > see > https://r-forge.r-project.org/scm/viewvc.php/pkg/randtoolbox/src/init.c?view=markup&root=rmetrics. > > > Reading > https://cran.r-pro

[Rd] Bug simulate.lm() --> needs credential to report it

2017-05-09 Thread Alexandre Courtiol
Dear R developers, I did not get any reply concerning my email from last week concerning the bug I found in stats::simulate.lm(). The bug shows up when called upon a GLM with family gaussian(). I am confident it is a genuine bug related to a mix-up between weights and prior weights that only impac

[Rd] R-3.3.3/R-3.4.0 change in sys.call(sys.parent())

2017-05-09 Thread William Dunlap via R-devel
Some formula methods for S3 generic functions use the idiom returnValue$call <- sys.call(sys.parent()) to show how to recreate the returned object or to use as a label on a plot. It is often followed by returnValue$call[[1]] <- quote(myName) E.g., I see it in packages "latticeExtra" and "

Re: [Rd] source(), parse(), and foreign UTF-8 characters

2017-05-09 Thread Kirill Müller
On 09.05.2017 13:19, Duncan Murdoch wrote: On 09/05/2017 3:42 AM, Kirill Müller wrote: Hi I'm having trouble sourcing or parsing a UTF-8 file that contains characters that are not representable in the current locale ("foreign characters") on Windows. The source() function stops with an error,

Re: [Rd] source(), parse(), and foreign UTF-8 characters

2017-05-09 Thread Duncan Murdoch
On 09/05/2017 5:46 PM, Kirill Müller wrote: On 09.05.2017 13:19, Duncan Murdoch wrote: On 09/05/2017 3:42 AM, Kirill Müller wrote: Hi I'm having trouble sourcing or parsing a UTF-8 file that contains characters that are not representable in the current locale ("foreign characters") on Windows

Re: [Rd] registering Fortran routines in R packages

2017-05-09 Thread Christophe Dutang
Thanks for your email. I try to change the name in lowercase but it conflicts with a C implementation also named halton. So I rename the C function halton2() and sobol2() while the Fortran function are HALTON() and SOBOL() (I also try lower case in the Fortran code). Unfortunately, it does not

Re: [Rd] registering Fortran routines in R packages

2017-05-09 Thread Berend Hasselman
Christophe, > On 10 May 2017, at 08:08, Christophe Dutang wrote: > > Thanks for your email. > > I try to change the name in lowercase but it conflicts with a C > implementation also named halton. So I rename the C function halton2() and > sobol2() while the Fortran function are HALTON() and

Re: [Rd] registering Fortran routines in R packages

2017-05-09 Thread Jari Oksanen
Have you tried using tools:::package_native_routine_registration_skeleton()? If you don't like its output, you can easily edit its results and still avoid most pitfalls. Cheers, Jari Oksanen From: R-devel on behalf of Berend Hasselman Sent: 10 May 2017