This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env/ | |
__pycache__/ | |
*-app.py | |
*_files/ | |
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Rcpp.h> | |
using namespace Rcpp; | |
class BinFixed { | |
double width_; | |
double origin_; | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IntegerVector table1(const CharacterVector x) { | |
std::map<char*, int> counts; | |
int n = x.length(); | |
for (int i = 0; i < n; i++) { | |
counts[x[i]]++; | |
} | |
// Loop through each element of map and output into named vector | |
IntegerVector out(counts.size()); |