[Rcpp-devel] sourceCpp issue: code vs. file
Dirk Eddelbuettel
edd at debian.org
Thu May 23 16:14:17 CEST 2013
On 23 May 2013 at 09:03, Hadley Wickham wrote:
| >> R governs the behaviour of R CMD <whatever> based on the extension.
| >>
| >> The .cxx form was /never/ supported by R as far as I know.
| >
| > Indeed. According to "Package subdirectories" in Writing R Extensions
| > (http://cran.r-project.org/doc/manuals/R-exts.html#Package-subdirectories)
| > the only supported extensions are .c, .cc, .cpp, .f, .f90, .f95, .m, and
| > .mm.
|
| So maybe sourceCpp could provide a warning if the extension is not in that list?
Hmpd. I am not exactly sure why you advocate supporting .c or .f, .f90, .f95,
.m and .mm none of which are likely to work _in any way_ with the parsing
done and scaffolding added by sourceCpp. When you read 'sourceCpp', mentally
stress the last three letters.
This is for R and C++. And the file extension is .cpp (with a bit of luck
you may get .cc).
The rest is user error. You can't try and catch everything.
Dirk
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list