Skip to content

Commit 062233f

Browse files
committed
Merge pull request #443 from RcppCore/feature/switch-to-usr-bin-env-r
Feature/switch to usr bin env r (closes #440)
2 parents fa58dc2 + a32d882 commit 062233f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+188
-120
lines changed

ChangeLog

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,79 @@
1+
2016-03-04 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/unitTests/runit.Function.R: Switched to '/usr/bin/env r'
4+
* inst/unitTests/runit.table.R: Idem
5+
* inst/unitTests/runit.as.R: Idem
6+
* inst/unitTests/runit.Date.R: Idem
7+
* inst/unitTests/runit.misc.R: Idem
8+
* inst/unitTests/runit.Language.R: Idem
9+
* inst/unitTests/runit.subset.R: Idem
10+
* inst/unitTests/runit.wrap.R: Idem
11+
* inst/unitTests/runit.sugar.R: Idem
12+
* inst/unitTests/runit.na.R: Idem
13+
* inst/unitTests/runit.String.R: Idem
14+
* inst/unitTests/runit.Vector.R: Idem
15+
* inst/unitTests/runit.environments.R: Idem
16+
* inst/unitTests/runit.Reference.R: Idem
17+
* inst/unitTests/runit.Matrix.R: Idem
18+
* inst/unitTests/runit.client.package.R: Idem
19+
* inst/unitTests/runit.binary.package.R: Idem
20+
* inst/unitTests/runit.support.R: Idem
21+
* inst/unitTests/runit.S4.R: Idem
22+
* inst/unitTests/runit.RObject.R: Idem
23+
* inst/unitTests/runit.modref.R: Idem
24+
* inst/unitTests/runit.InternalFunctionCPP11.R: Idem
25+
* inst/unitTests/runit.attributes.R: Idem
26+
* inst/unitTests/runit.sugar.var.R: Idem
27+
* inst/unitTests/runit.Module.R: Idem
28+
* inst/unitTests/runit.XPTr.R: Idem
29+
* inst/unitTests/runit.Module.client.package.R: Idem
30+
* inst/unitTests/runit.stats.R: Idem
31+
* inst/unitTests/runit.rmath.R: Idem
32+
* inst/unitTests/runit.DataFrame.R: Idem
33+
* inst/unitTests/runit.wstring.R: Idem
34+
* inst/unitTests/runit.InternalFunction.R: Idem
35+
36+
2016-03-03 Dirk Eddelbuettel <[email protected]>
37+
38+
* inst/examples/FastLM/benchmarkLongley.r: Switched to '/usr/bin/env r'
39+
* inst/examples/FastLM/fastLMviaArmadillo.r: Idem
40+
* inst/examples/FastLM/fastLMviaGSL.r: Idem
41+
* inst/examples/FastLM/lmArmadillo.R: Idem
42+
* inst/examples/FastLM/lmGSL.R: Idem
43+
* inst/examples/FastLM/benchmark.r: Idem
44+
* inst/examples/ConvolveBenchmarks/exampleRCode.r: Idem
45+
46+
2016-02-27 Dirk Eddelbuettel <[email protected]>
47+
48+
* inst/examples/RcppInline/RcppInlineWithLibsExamples.r: Switched to
49+
using '/usr/bin/env r', switch to using 'cxxfunction' and RcppGSL plugin
50+
51+
* inst/examples/RcppInline/external_pointer.r: Switched to '/usr/bin/env r'
52+
* inst/examples/RcppInline/RcppInlineExample.r: Idem
53+
* inst/examples/ConvolveBenchmarks/overhead.r: Idem
54+
55+
* inst/include/Rcpp/Fast.h (Rcpp): Undo two const declarations
56+
57+
2016-02-23 Dirk Eddelbuettel <[email protected]>
58+
59+
* inst/examples/OpenMP/OpenMPandInline.r: Switched to '/usr/bin/env r'
60+
* inst/examples/RcppInline/RcppSimpleExample.r: Idem
61+
* inst/examples/RcppInline/RObject.r: Idem
62+
* inst/examples/RcppInline/UncaughtExceptions.r: Idem
63+
64+
2016-02-21 Dirk Eddelbuettel <[email protected]>
65+
66+
* inst/examples/functionCallback/newApiExample.r (vecfunc): Switched to
67+
using '/usr/bin/env r', switch to using 'cxxfunction'
68+
69+
* inst/examples/Misc/fibonacci.r: Switched to using '/usr/bin/env r',
70+
added explicit load of Rcpp package
71+
72+
* inst/examples/Misc/newFib.r: Switched to using '/usr/bin/env r'
73+
* inst/examples/Misc/ifelseLooped.r: Idem
74+
* inst/examples/Misc/piBySimulation.r: Idem
75+
* inst/examples/SugarPerformance/sugarBenchmarks.r: Idem
76+
177
2016-02-16 Dirk Eddelbuettel <[email protected]>
278

379
* vignettes/Rcpp-FAQ.Rnw: Added answer on fixed-size limit of arguments

inst/examples/ConvolveBenchmarks/exampleRCode.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/r
1+
#!/usr/bin/env r
22

33
suppressMessages(require(Rcpp))
44
set.seed(42)

inst/examples/ConvolveBenchmarks/overhead.r

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/r
1+
#!/usr/bin/env r
22

33
set.seed(42)
44
a <- rnorm(100)
@@ -17,12 +17,8 @@ overhead_cpp <- function(a,b) .Call( overhead_cpp_symbol, a, b )
1717
## load benchmarkin helper function
1818
suppressMessages(library(rbenchmark))
1919

20-
benchmark(
21-
22-
overhead_cpp(a,b),
23-
overhead_c(a,b),
24-
25-
columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
26-
order="relative",
27-
replications=10000)
28-
20+
res <- benchmark(overhead_cpp(a,b), overhead_c(a,b),
21+
columns=c("test", "replications", "elapsed", "relative", "user.self", "sys.self"),
22+
order="relative",
23+
replications=10000)
24+
print(res)

inst/examples/FastLM/benchmark.r

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/r -t
1+
#!/usr/bin/env r
22
#
33
# Comparison benchmark
44
#
@@ -22,6 +22,9 @@
2222
# You should have received a copy of the GNU General Public License
2323
# along with Rcpp. If not, see <http://www.gnu.org/licenses/>.
2424

25+
suppressMessages(library(RcppGSL))
26+
suppressMessages(library(RcppArmadillo))
27+
2528
source("lmArmadillo.R")
2629
source("lmGSL.R")
2730

inst/examples/FastLM/benchmarkLongley.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/r -t
1+
#!/usr/bin/env r
22
#
33
# Comparison benchmark -- using old and small Longley data set
44
#

inst/examples/FastLM/fastLMviaArmadillo.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/r -t
1+
#!/usr/bin/env r
22
#
33
# A faster lm() replacement based on Armadillo
44
#

inst/examples/FastLM/fastLMviaGSL.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/r -t
1+
#!/usr/bin/env r
22
#
33
# A faster lm() replacement based on GNU GSL
44
#

inst/examples/FastLM/lmArmadillo.R

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,9 @@ lmArmadillo <- function() {
4949
'
5050

5151
## turn into a function that R can call
52-
fun <- cfunction(signature(Ysexp="numeric", Xsexp="numeric"),
53-
src,
54-
includes="#include <armadillo>",
55-
Rcpp=TRUE,
56-
cppargs="-I/usr/include",
57-
libargs="-larmadillo -llapack")
52+
fun <- cxxfunction(signature(Ysexp="numeric", Xsexp="numeric"),
53+
src,
54+
includes="#include <armadillo>",
55+
plugin="RcppArmadillo")
5856
}
5957

inst/examples/FastLM/lmGSL.R

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,8 @@ lmGSL <- function() {
6262

6363
## turn into a function that R can call
6464
## compileargs redundant on Debian/Ubuntu as gsl headers are found anyway
65-
fun <- cfunction(signature(Ysexp="numeric", Xsexp="numeric"),
66-
src,
67-
includes="#include <gsl/gsl_multifit.h>",
68-
Rcpp=TRUE,
69-
cppargs="-I/usr/include",
70-
libargs="-lgsl -lgslcblas")
65+
fun <- cxxfunction(signature(Ysexp="numeric", Xsexp="numeric"),
66+
src,
67+
includes="#include <gsl/gsl_multifit.h>",
68+
plugin="RcppGSL")
7169
}

inst/examples/Misc/fibonacci.r

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
#!/usr/bin/r
1+
#!/usr/bin/env r
22

33
## this short example was provided in response to this StackOverflow questions:
44
## http://stackoverflow.com/questions/6807068/why-is-my-recursive-function-so-slow-in-r
55
## and illustrates that recursive function calls are a) really expensive in R and b) not
66
## all expensive in C++ (my machine sees a 700-fold speed increase) and c) the byte
77
## compiler in R does not help here.
88

9+
suppressMessages(library(Rcpp))
10+
911
## byte compiler
1012
require(compiler)
1113

0 commit comments

Comments
 (0)