Skip to content

Commit

Permalink
Debugging Rcpp build 8 revise C++.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereckmezquita committed Jul 8, 2024
1 parent dddd6c1 commit a3b3725
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
run: |
echo "Contents of src/bb-bollinger-bands.cpp:"
cat src/bb-bollinger-bands.cpp
echo "Contents of src/sma-simple-moving-average.cpp:"
cat src/sma-simple-moving-average.cpp
echo "Contents of src/init.c:"
cat src/init.c
echo "Compiling C++ code manually:"
Expand All @@ -74,4 +76,4 @@ jobs:
- name: Deploy to branch
if: success()
shell: Rscript {0}
run: pkgdown::deploy_to_branch(branch = "bot/github-pages")
run: pkgdown::deploy_to_branch(branch = "bot/github-pages")
8 changes: 4 additions & 4 deletions src/bb-bollinger-bands.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include <Rcpp.h>
#include <math.h>
// [[Rcpp::interfaces(r, cpp)]]

#include "bb-bollinger-bands.h"
#include <math.h>
#include "sma-simple-moving-average.h"

using namespace Rcpp;

// https://gallery.rcpp.org/articles/creating-a-datatable-in-rcpp/

using namespace Rcpp;

// [[Rcpp::export]]
Rcpp::List bb(std::vector<double> price, int n, int sd = 2) {
// calculate the simple moving average
Expand Down
1 change: 1 addition & 0 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ static const R_CallMethodDef CallEntries[] = {
void R_init_dmplot(DllInfo *dll) {
R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
R_useDynamicSymbols(dll, FALSE);
R_forceSymbols(dll, TRUE);
}
2 changes: 2 additions & 0 deletions src/sma-simple-moving-average.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include <Rcpp.h>
// [[Rcpp::interfaces(r, cpp)]]

#include <vector>

using namespace Rcpp;
Expand Down

0 comments on commit a3b3725

Please sign in to comment.