[Rd] wrong MD5 checksums in R 3.0.2

2014-01-17 Thread Tal Galili
Dear R-devel members, An R user recently reportedthat when running MD5 checksums on a recent R installation (R 3.0.2), he gets the following error that the files ‘bin/i386/Rblas.dll’, ‘bin/i386/Rlapack.dll’, ‘bin/x64/R

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Henrik Bengtsson
1. This is one of the reasons for isFile() and isDirectory() in R.utils. I add "workarounds" as new ones are discovered. 2. This works (and also tests for existence of a *directory*): > file_test("-d", "C:/Program Files") [1] TRUE > file_test("-d", "C:/Program Files/") [1] TRUE 3a. "C:" and "C:

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Kirill Müller
On 01/17/2014 07:35 PM, William Dunlap wrote: I think that ignoring a terminal slash/backslash on Windows would do no >harm: Windows makes a distinction between "C:" and "C:/": the former is not a file (or directory) and the latter is. But, according to the documentation, neither would be curren

[Rd] rexp, different results on 32/64 bit

2014-01-17 Thread Gábor Csárdi
Hi all, I just run into this today. Apparently rexp() sometimes gives different slightly results for the same seed on 32 bit and 64 bit machines. runif() is the same for both, so the problem seems to be in rexp(). 64 bit Linux is the same as 64 bit OSX, and R-devel gives the same results as R-3.0

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread William Dunlap
> I think that ignoring a terminal slash/backslash on Windows would do no > harm: Windows makes a distinction between "C:" and "C:/": the former is not a file (or directory) and the latter is. Bill Dunlap TIBCO Software wdunlap tibco.com > -Original Message- > From: r-devel-boun...@r-pr

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Kirill Müller
On 01/17/2014 02:56 PM, Gabor Grothendieck wrote: At the moment I am using this to avoid the problem: File.exists <- function(x) { if (.Platform$OS == "windows" && grepl("[/\\]$", x)) { file.exists(dirname(x)) } else file.exists(x) } but it would be nice if that could be done by

Re: [Rd] How to debug an R package (with C code)

2014-01-17 Thread Hadley Wickham
>> Even if you are using a developer mode, sourcing an R file will have no >> effect on a) the shared object library (DLL/so/dylib) available in the R >> session, nor which shared objects are associated with the package. There >> are ways to unload shared libraries within an R session, but personal

Re: [Rd] How to debug an R package (with C code)

2014-01-17 Thread Gábor Csárdi
Small note: if you are using a recent version of OSX, then gdb is essentially useless, but you can use llvm, which is nicer in many respects, anyway. Gabor On Fri, Jan 17, 2014 at 3:43 AM, Gabriel Becker wrote: > Saisai, > > I haven't watched the specific video Sandip posted, but from the title

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Gabor Grothendieck
On Fri, Jan 17, 2014 at 6:16 AM, Martin Maechler wrote: >> Gabor Grothendieck >> on Fri, 17 Jan 2014 00:10:43 -0500 writes: > > > If a path name ends in slash then file.exists says it does > > not exist. I would have expected these to all return > > TRUE. > > >> file.

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Martin Maechler
> Gabor Grothendieck > on Fri, 17 Jan 2014 00:10:43 -0500 writes: > If a path name ends in slash then file.exists says it does > not exist. I would have expected these to all return > TRUE. >> file.exists("/Program Files") > [1] TRUE >> file.exists("/Program

Re: [Rd] file.exists does not like path names ending in /

2014-01-17 Thread Uwe Ligges
On 17.01.2014 06:10, Gabor Grothendieck wrote: If a path name ends in slash then file.exists says it does not exist. I would have expected these to all return TRUE. file.exists("/Program Files") [1] TRUE file.exists("/Program Files/") [1] FALSE file.exists(normalizePath("/Program Files/")

Re: [Rd] How to debug an R package (with C code)

2014-01-17 Thread Peter Meilstrup
On Fri, Jan 17, 2014 at 12:43 AM, Gabriel Becker wrote: > There were some deeper issues with what you asked, though. Sourcing an R > file will have no effect on a package in the namespace at all unless you > are using something like ESS's developer mode which sources the file into > the package na

Re: [Rd] How to debug an R package (with C code)

2014-01-17 Thread Gabriel Becker
Saisai, I haven't watched the specific video Sandip posted, but from the title it looks to be correct. Running R with/in gdb is the correct way to debug C code in R packages. One thing to watch out for: The default compiler flags for C/C++ code in R packages call for substantial optimization (I b

Re: [Rd] How to debug an R package (with C code)

2014-01-17 Thread Sandip Nandi
Hi , The video may help you http://vimeo.com/11937905 Thanks, Sandip On Thu, Jan 16, 2014 at 4:17 PM, Ma, Saisai - maysy020 < saisai...@mymail.unisa.edu.au> wrote: > Hi all, > > Sorry to bother you. > > I am a beginner in R programming. I have encountered some problems when I > modified a R p