Skip to content

Commit

Permalink
Updated check in matrixSums C code and removed CXX11 requirements fro…
Browse files Browse the repository at this point in the history
…m Makevars files to adhere to new CRAN standards
  • Loading branch information
Josh Campbell committed Apr 2, 2024
1 parent e4ec2b6 commit 1e1887f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
##
## And with R 3.4.0, and RcppArmadillo 0.7.960.*, we turn C++11 on as OpenMP
## support within Armadillo prefers / requires it
CXX_STD = CXX11

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
1 change: 0 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
##
## And with R 3.4.0, and RcppArmadillo 0.7.960.*, we turn C++11 on as OpenMP
## support within Armadillo prefers / requires it
CXX_STD = CXX11

PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
18 changes: 9 additions & 9 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ BEGIN_RCPP
END_RCPP
}

RcppExport SEXP _colSumByGroup(void *, void *);
RcppExport SEXP _colSumByGroup_numeric(void *, void *);
RcppExport SEXP _colSumByGroupChange(void *, void *, void *, void *);
RcppExport SEXP _colSumByGroupChange_numeric(void *, void *, void *, void *);
RcppExport SEXP _perplexityG(void *, void *, void *, void *);
RcppExport SEXP _rowSumByGroup(void *, void *);
RcppExport SEXP _rowSumByGroup_numeric(void *, void *);
RcppExport SEXP _rowSumByGroupChange(void *, void *, void *, void *);
RcppExport SEXP _rowSumByGroupChange_numeric(void *, void *, void *, void *);
RcppExport SEXP _colSumByGroup(SEXP, SEXP);
RcppExport SEXP _colSumByGroup_numeric(SEXP, SEXP);
RcppExport SEXP _colSumByGroupChange(SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP _colSumByGroupChange_numeric(SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP _perplexityG(SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP _rowSumByGroup(SEXP, SEXP);
RcppExport SEXP _rowSumByGroup_numeric(SEXP, SEXP);
RcppExport SEXP _rowSumByGroupChange(SEXP, SEXP, SEXP, SEXP);
RcppExport SEXP _rowSumByGroupChange_numeric(SEXP, SEXP, SEXP, SEXP);

static const R_CallMethodDef CallEntries[] = {
{"_celda_decontXEM", (DL_FUNC) &_celda_decontXEM, 10},
Expand Down
6 changes: 3 additions & 3 deletions src/matrixSums.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ SEXP _colSumByGroupChange(SEXP R_x, SEXP R_px, SEXP R_group, SEXP R_pgroup)
int *pgroup = INTEGER(R_pgroup);

// If the grouping variable is not a factor, throw an error
if (!isFactor(R_group) | !isFactor(R_pgroup)) {
if (!isFactor(R_group) || !isFactor(R_pgroup)) {
error("The grouping arguments must be factors");
}
int nl = nlevels(R_group);
Expand Down Expand Up @@ -290,7 +290,7 @@ SEXP _rowSumByGroupChange_numeric(SEXP R_x, SEXP R_px, SEXP R_group, SEXP R_pgro
int *pgroup = INTEGER(R_pgroup);

// If the grouping variable is not a factor, throw an error
if (!isFactor(R_group) | !isFactor(R_pgroup)) {
if (!isFactor(R_group) || !isFactor(R_pgroup)) {
error("The grouping arguments must be factors");
}
int nl = nlevels(R_group);
Expand Down Expand Up @@ -340,7 +340,7 @@ SEXP _colSumByGroupChange_numeric(SEXP R_x, SEXP R_px, SEXP R_group, SEXP R_pgro
int *pgroup = INTEGER(R_pgroup);

// If the grouping variable is not a factor, throw an error
if (!isFactor(R_group) | !isFactor(R_pgroup)) {
if (!isFactor(R_group) || !isFactor(R_pgroup)) {
error("The grouping arguments must be factors");
}
int nl = nlevels(R_group);
Expand Down

0 comments on commit 1e1887f

Please sign in to comment.