Skip to content

Commit 3c3d868

Browse files
merging with upstream master
2 parents faf0436 + bbf7e19 commit 3c3d868

20 files changed

+1260
-502
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ r:
77
- devel
88
addons:
99
apt:
10-
packages: libmpfr-dev
10+
packages: libmpfr-dev
1111
warnings_are_errors: true
1212
before_install:
1313
- tlmgr install index # for texlive and vignette?
14+
- R -e 'install.packages("Rcpp", repos="http://cloud.r-project.org")'
15+
- make Rcpp
1416
- cd selectiveInference

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Rcpp:
2+
- rm -f selectiveInference/src/RcppExports.cpp
3+
- rm -f selectiveInference/R/RcppExports.R
4+
Rscript -e "library(Rcpp); Rcpp::compileAttributes('selectiveInference')"
5+
6+
install: Rcpp
7+
R CMD install selectiveInference
8+
9+
build:
10+
R CMD build selectiveInference
11+
12+
check: Rcpp build
13+
R CMD build selectiveInference
14+
R CMD check selectiveInference_1.2.2.tar.gz # fix this to be a script variable

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ The latest release of the package can be installed through CRAN:
2121
install.packages("selectiveInference")
2222
```
2323
Code in repo is under development and may be unstable.
24+
25+
## For development
26+
27+
You will have to run
28+
29+
```
30+
make Rcpp
31+
```

selectiveInference/DESCRIPTION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ Description: New tools for post-selection inference, for use with forward
1818
models.
1919
License: GPL-2
2020
RoxygenNote: 5.0.1
21+
LinkingTo: Rcpp
22+
Imports: Rcpp

selectiveInference/NAMESPACE

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ export(lar,fs,
66
print.larInf,print.fsInf,
77
plot.lar,plot.fs,
88
fixedLassoInf,print.fixedLassoInf,
9-
# fixedLogitLassoInf,print.fixedLogitLassoInf,
10-
# fixedCoxLassoInf,print.fixedCoxLassoInf,
119
forwardStop,
1210
estimateSigma,
1311
manyMeans,print.manyMeans,
1412
groupfs,groupfsInf,
1513
scaleGroups,factorDesign,
1614
TG.pvalue,
1715
TG.limits,
18-
TG.interval
16+
TG.interval,
17+
debiasingMatrix
1918
)
2019

2120
S3method("coef", "lar")
@@ -44,5 +43,5 @@ importFrom("stats", dnorm, lsfit, pexp, pnorm, predict,
4443
qnorm, rnorm, sd, uniroot, dchisq, model.matrix, pchisq)
4544
importFrom("stats", "coef", "df", "lm", "pf")
4645
importFrom("stats", "glm", "residuals", "vcov")
47-
46+
importFrom("Rcpp", "sourceCpp")
4847

selectiveInference/R/funs.common.R

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,7 @@ updateQR <- function(Q1,Q2,R,col) {
152152
n = ncol(Q1)
153153
k = ncol(Q2)
154154

155-
a = .C("update1",
156-
Q2=as.double(Q2),
157-
w=as.double(t(Q2)%*%col),
158-
m=as.integer(m),
159-
k=as.integer(k),
160-
dup=FALSE,
161-
package="selectiveInference")
155+
a = update1_(as.matrix(Q2), t(Q2)%*%col, m, k) # Rcpp call
162156

163157
Q2 = matrix(a$Q2,nrow=m)
164158
w = c(t(Q1)%*%col,a$w)

0 commit comments

Comments
 (0)