Skip to content

Instantly share code, notes, and snippets.

View traversc's full-sized avatar

Travers traversc

View GitHub Profile
@traversc
traversc / edlibR_example.cpp
Created July 17, 2025 23:21
edlibR Rcpp script example
#include <Rcpp.h>
#include "edlib_external.h"
// [[Rcpp::depends(edlibR)]]
using namespace Rcpp;
// [[Rcpp::export]]
List edlib_test_basic() {
// simple example
std::string query = "GATTACA";
@traversc
traversc / geom_smooth_monotonic.R
Created August 15, 2025 23:58
geom_smooth_monotonic
# ggplot2 + scam monotonic smoother
# alpha works on the line when se = FALSE
# Depends: ggplot2, scam
StatSmoothMonotonic <- ggplot2::ggproto(
"StatSmoothMonotonic", ggplot2::Stat,
required_aes = c("x", "y"),
compute_group = function(data, scales,
se = TRUE, level = 0.95, n = 100,
k = 10, dir = c("increasing","decreasing"),