[Rd] Package Rcpp: Question conerning source code of cpp files and related question

2014-09-30 Thread Martin Spindler
Dear all, I am trying to use Rcpp to write some files in C++ for use in R. Below is an example for a cpp-file (crossp.cpp). Then I use >sourceCpp("crossp.cpp") in R and the corresponding function is availabe in R. Now I have to question related to this worklfow: 1) Is there a way to see the sour

Re: [Rd] Package Rcpp: Question conerning source code of cpp files and related question

2014-09-30 Thread Dirk Eddelbuettel
On 30 September 2014 at 13:00, Martin Spindler wrote: | I am trying to use Rcpp to write some files in C++ for use in R. Please subscribe to rcpp-devel, and post on that list. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org __

[Rd] Intel Fortran compiler returns a -1 TRUE value

2014-09-30 Thread Barry Rowlingson
I have access to a cluster on which I have been supplied with R 3.1.0 which appears to have been built using the intel compiler tools. The following minimal Fortran file: subroutine truth(lind) logical lind lind = .TRUE. end Compiles thusly: arcadia> R CMD SHLIB truth.f

Re: [Rd] Intel Fortran compiler returns a -1 TRUE value

2014-09-30 Thread Duncan Murdoch
On 30/09/2014, 7:41 AM, Barry Rowlingson wrote: > I have access to a cluster on which I have been supplied with R 3.1.0 which > appears to have been built using the intel compiler tools. > > The following minimal Fortran file: > > subroutine truth(lind) > logical lind > lind = .

Re: [Rd] Intel Fortran compiler returns a -1 TRUE value

2014-09-30 Thread Barry Rowlingson
On Tue, Sep 30, 2014 at 12:53 PM, Duncan Murdoch wrote: > > This appears to be user error. According to Writing R Extensions, the > Fortran type corresponding to R logical is INTEGER, not LOGICAL. > Oh yes, a very old and long-standing user error. I assume the CRAN checks don't check this. Has

Re: [Rd] Intel Fortran compiler returns a -1 TRUE value

2014-09-30 Thread Duncan Murdoch
On 30/09/2014 8:39 AM, Barry Rowlingson wrote: On Tue, Sep 30, 2014 at 12:53 PM, Duncan Murdoch mailto:murdoch.dun...@gmail.com>> wrote: This appears to be user error. According to Writing R Extensions, the Fortran type corresponding to R logical is INTEGER, not LOGICAL. Oh yes,

Re: [Rd] Intel Fortran compiler returns a -1 TRUE value

2014-09-30 Thread William Dunlap
In S+ and S it was valid to pass logicals to .Fortran, where they got mapped into the appropriate bit pattern. (The trouble was that 'appropriate' was compiled into the program - so you were locked into our compiler vendor's choice). Passing them between Fortran code and C code has always been a

[Rd] R's internal tar ignores files in sub-directories

2014-09-30 Thread Kevin Ushey
E.g. I am seeing: dir <- file.path(tempdir(), "test-tar") dir.create(dir) setwd(dir) dir.create("foo", showWarnings = FALSE) file.create("foo/bar.R") tar("test.tar", files = "foo/bar.R") dir.create("untarred") untar("test.tar", exdir = "untarred") list.files("

Re: [Rd] R's internal tar ignores files in sub-directories

2014-09-30 Thread Harris A. Jaffee
Sounds like a bug to me, at least in documentation. I would say that it ignores them by accident. I doubt that skipping files is intended. The problem appears to be that the 'files' argument to tar() becomes the 'path' argument to list.files(), and the spec for 'path' is not a whole lot more ill

[Rd] Shallow copies

2014-09-30 Thread Matthieu Gomez
I have a question about shallow copies in R. Since R 3.1.0, subsetting a dataframe with respect to its columns no longer result in deep copies. This is an amazing change in my opinion. Now, subsetting a data.frame by rows (or subsetting a matrix by columns or rows) still does deep copies. In partic

Re: [Rd] Shallow copies

2014-09-30 Thread Henrik Bengtsson
On Tue, Sep 30, 2014 at 2:20 PM, Matthieu Gomez wrote: > I have a question about shallow copies in R. Since R 3.1.0, subsetting > a dataframe with respect to its columns no longer result in deep > copies. This is an amazing change in my opinion. Now, subsetting a > data.frame by rows (or subsettin