Re: [Rd] Comments in the DESCRIPTION file

2013-05-02 Thread cgenolin
Hi, I am not that familiar with the DCF... But R seems to accept # quite easely. More precisely: Before posting my message, I try it on a small package: R CMD check or R CMD INSTALL did not make any warning or error (whereas they do if I use '#' alone). After reading your response, I dig a bit

[Rd] Catch SIGINT from user in backend C++ code

2013-05-02 Thread Jewell, Chris
Hi, I was wondering if anybody knew how to trap SIGINTs (ie Ctrl-C) in backend C++ code for R extensions? I'm writing a package that uses the GPU for some hefty matrix operations in a tightly coupled parallel algorithm implemented in CUDA. The problem is that once running, the C++ module canno

[Rd] foreign: write.xport

2013-05-02 Thread Tim Bergsma
I see in the archives significant discussion about SAS, CDISC formats etc. for FDA, but no direct suggestion of adding a write.xport method to the foreign package. Are there significant barriers to doing so? [[alternative HTML version deleted]] ___

[Rd] diag() when input is a numeric scalar

2013-05-02 Thread philchalmers
Hi All, I'm wondering why when passing a single numeric value that contains any decimals to diag() that the value is silently coerced to a integer for constructing an identify matrix. To me, an input like diag(5.435) seems fairly ambiguous and is more than likely a programming mistake, since it's

Re: [Rd] Catch SIGINT from user in backend C++ code

2013-05-02 Thread R. Michael Weylandt
On Thu, May 2, 2013 at 12:50 AM, Jewell, Chris wrote: > Hi, > > I was wondering if anybody knew how to trap SIGINTs (ie Ctrl-C) in backend > C++ code for R extensions? I'm writing a package that uses the GPU for some > hefty matrix operations in a tightly coupled parallel algorithm implemented

Re: [Rd] diag() when input is a numeric scalar

2013-05-02 Thread R. Michael Weylandt
On Thu, May 2, 2013 at 12:35 AM, philchalmers wrote: > Hi All, > > I'm wondering why when passing a single numeric value that contains any > decimals to diag() that the value is silently coerced to a integer for > constructing an identify matrix. To me, an input like diag(5.435) seems > fairly amb

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-02 Thread Terry Therneau
I'll be the "anybody" to argue that } else { is an ugly kludge which you will never find in my source code. Yes, it's necessary at the command line because the parser needs help in guessing when an expression is finished, but is only needed in that case. Since I can hardly imagine using

Re: [Rd] trace with reference class

2013-05-02 Thread Kohske Takahashi
I got it, thanks! kohske 2013/5/2 John Chambers : > No intended change. The trace method was not updated when reference class > generators became functions. Should be fixed now in r-devel and 3.0.0 > patched (rev 62699). > > Thanks for the catch. > > John > > > On 4/29/13 11:30 PM, Kohske Takah

Re: [Rd] foreign: write.xport

2013-05-02 Thread Marc Schwartz
On May 1, 2013, at 1:12 PM, Tim Bergsma wrote: > I see in the archives significant discussion about SAS, CDISC formats etc. > for FDA, but no direct suggestion of adding a write.xport method to the > foreign package. Are there significant barriers to doing so? Hi, The primary barrier would b

Re: [Rd] Windows, format.POSIXct and character encodings

2013-05-02 Thread Hadley Wickham
>> identical(x, y) >> # [1] TRUE >> >> # But, confusingly, ... >> >> charToRaw(x) >> # [1] e5 8d 88 e5 89 8d 2b 2a e5 8d 88 e5 be 8c >> >> charToRaw(y) >> # [1] 8c df 91 4f 2b 2a 8c df 8c e3 >> > > That's not confusing at all: > >> Encoding(x) > [1] "UTF-8" >> Encoding(y) > [1] "unknown" > > The fi

[Rd] install.packages from own rpository - depencies

2013-05-02 Thread Knut Krueger
I am trying to setup a respository for students with a own package. Its working fine when the depended packages are already installed with: install.packages("mypackage", type="source",repos="http://myrepository.example.com";) but if the the dependencies are not already installed I get the foll

Re: [Rd] Comments in the DESCRIPTION file

2013-05-02 Thread Simon Urbanek
On May 2, 2013, at 2:58 AM, cgenolin wrote: > Hi, > > I am not that familiar with the DCF... But R seems to accept # quite easely. The fact that R currently accepts invalid DCF files is not a guarantee that it won't be following the standard more closely in the future. What you are doing is i

Re: [Rd] install.packages from own rpository - depencies

2013-05-02 Thread Simon Urbanek
On May 2, 2013, at 9:58 AM, Knut Krueger wrote: > I am trying to setup a respository for students with a own package. > Its working fine when the depended packages are already installed with: > install.packages("mypackage", > type="source",repos="http://myrepository.example.com";) > > but if the

Re: [Rd] Comments in the DESCRIPTION file

2013-05-02 Thread cgenolin
So it IS curently accepted, but may NOT be in the futur. Thanks for your answer. So I guess that using --- 8< - %1: %%%2: Section 1 %%%3 ... --- 8< - is correct, isn't it? Christophe -- View this message in context: http://r.789695.n4.nabble.com/Comments-in-

Re: [Rd] Comments in the DESCRIPTION file

2013-05-02 Thread Simon Urbanek
On May 2, 2013, at 10:17 AM, cgenolin wrote: > So it IS curently accepted, but may NOT be in the futur. Thanks for your > answer. > > So I guess that using > --- 8< - > %1: > %%%2: Section 1 > %%%3 > ... > --- 8< - > > is correct, isn't it? > Yes, that is lega

[Rd] Data in packages: save or write.table?

2013-05-02 Thread cgenolin
Hi all, I am trying to understand Writing R Extension... Section 1.1.5, data: I include two datasets in a package, one using 'save', the other using 'write.table': --- 8< myData1 <- data.frame(x=1:10) write.table(myData1,file="myData1.txt") myData2 <- data.frame(x=2:10) save(myData2,file="myD

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-02 Thread Duncan Murdoch
On 01/05/2013 3:34 PM, Joris Meys wrote: +1 for "} else {" . It might seem a detail, but I agree wholeheartedly that this would make teaching R easier. Just one last comment to finish off my participation in this thread. I think that in general, "+1" votes mean almost nothing. To have a chang

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-02 Thread Joris Meys
On Thu, May 2, 2013 at 4:49 PM, Duncan Murdoch wrote: > On 01/05/2013 3:34 PM, Joris Meys wrote: > >> +1 for "} else {" . It might seem a detail, but I agree wholeheartedly >> that this would make teaching R easier. >> > > Just one last comment to finish off my participation in this thread. I > t

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-02 Thread Brian Lee Yung Rowe
Writing R in a declarative style a la functional programming makes this whole thread go away since you don't need if/else blocks. • Brian Lee Yung Rowe On May 2, 2013, at 8:27 AM, Terry Therneau wrote: > I'll be the "anybody" to argue that > } else { > is an ugly kludge which you wi

Re: [Rd] Patch proposal for R style consistency (concerning deparse.c)

2013-05-02 Thread Hervé Pagès
On 05/02/2013 05:26 AM, Terry Therneau wrote: I'll be the "anybody" to argue that } else { is an ugly kludge which you will never find in my source code. Yes, it's necessary at the command line because the parser needs help in guessing when an expression is finished, but is only needed in

[Rd] loading of an unwanted namespace

2013-05-02 Thread Terry Therneau
I have a debugging environment for the survival package, perhaps unique to me, but I find it works very well. To wit, a separate directory with copies of the source code but none of the package accuements of DESCRIPTION, NAMESPACE, etc. This separate space does NOT contain a copy of src/init.c

Re: [Rd] loading of an unwanted namespace

2013-05-02 Thread Duncan Murdoch
On 13-05-02 3:05 PM, Terry Therneau wrote: I have a debugging environment for the survival package, perhaps unique to me, but I find it works very well. To wit, a separate directory with copies of the source code but none of the package accuements of DESCRIPTION, NAMESPACE, etc. This separate s

Re: [Rd] loading of an unwanted namespace

2013-05-02 Thread Martin Morgan
On 05/02/2013 01:35 PM, Duncan Murdoch wrote: On 13-05-02 3:05 PM, Terry Therneau wrote: I have a debugging environment for the survival package, perhaps unique to me, but I find it works very well. To wit, a separate directory with copies of the source code but none of the package accuements of

Re: [Rd] dyn.load inside a package in R >= 3.0

2013-05-02 Thread Adrian Mejia
I see that for the x64 architecture a function is used called dyn.open. Is that what puts it in the appropriate namespace? The x86 version uses dyn.load and it doesn't seem to specify a package or namespace. I can't find any documentation for dyn.open - is it defined somewhere I can't find it? W

Re: [Rd] diag() when input is a numeric scalar

2013-05-02 Thread philchalmers
Thanks for the reply Michael, Although I probably would lean a bit more to the 'strict mode', I wouldn't suggest changing the default behavior since it could break existing code and goes against R's current philosophy. However, adding an additional argument to some functions where the floating dig

[Rd] Minimal build of R ...

2013-05-02 Thread Jony Hudson
Hi, I'm trying to cross-compile R to javascript so that it can run in a web-browser. Take as long as you need to stop laughing. So, as I was saying - I want to try and get a build of R running in the browser. [If you're not familiar with it already, you might enjoy looking at emscripten.org. I

[Rd] Please check link for R-patched.tar.gz

2013-05-02 Thread John Minter
I have been trying to build R-patched from source using the link ftp://ftp.stat.math.ethz.ch/Software/R/R-patched.tar.gz Which the file list says is linked to R-patched_2013-05-01.tar.gz but what I download by both wget and curl (with -R -O --ssl ) is dated 2013-04-23 and builds to an old patch l

Re: [Rd] Minimal build of R ...

2013-05-02 Thread Gabriel Becker
Jony, I'm currently writing up the paper for something with a similar result but very different implementation. The RBrowserPlugin package/browser plugin (joint with my advisor Duncan Temple Lang) embeds R within the web browser as an NPAPI plugin. This approach allows full bi-directional communi

Re: [Rd] Minimal build of R ...

2013-05-02 Thread R. Michael Weylandt
On Thu, May 2, 2013 at 5:12 PM, Jony Hudson wrote: > Hi, > > I'm trying to cross-compile R to javascript so that it can run in a > web-browser. Take as long as you need to stop laughing. So, as I was saying - > I want to try and get a build of R running in the browser. [If you're not > familia

Re: [Rd] Minimal build of R ...

2013-05-02 Thread Simon Urbanek
On May 2, 2013, at 6:18 PM, Gabriel Becker wrote: > Jony, > > I'm currently writing up the paper for something with a similar result but > very different implementation. The RBrowserPlugin package/browser plugin > (joint with my advisor Duncan Temple Lang) embeds R within the web browser > as an