From 7cd8705a7d815139f3f3763a343ac4c948b0d4f9 Mon Sep 17 00:00:00 2001 From: Jay Hesselberth Date: Sun, 22 Dec 2024 14:25:02 -0700 Subject: [PATCH] update readme --- README.Rmd | 7 +++++-- README.md | 17 +++++++++++++++-- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/README.Rmd b/README.Rmd index b022c39..4049101 100644 --- a/README.Rmd +++ b/README.Rmd @@ -9,7 +9,7 @@ output: github_document [![Codecov test coverage](https://codecov.io/gh/rnabioco/cpp11bigwig/graph/badge.svg)](https://app.codecov.io/gh/rnabioco/cpp11bigwig) -cpp11bigwig provides read access to bigWig files in R using `libBigWig` from @dpryan79. Data is read into an R `data.frame`. +cpp11bigwig provides read access to bigWig files in R using [libBigWig](https://github.com/dpryan79/libBigWig). Data is read into an R `data.frame`. ## Installation @@ -24,6 +24,9 @@ pak::pak("rnabioco/cpp11bigwig") ```{r} -#| eval: false library(cpp11bigwig) + +bw = system.file('extdata', 'test.bw', package = 'cpp11bigwig') + +read_bigwig(bw) ``` diff --git a/README.md b/README.md index 4cbb8ad..3f3f00b 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,9 @@ coverage](https://codecov.io/gh/rnabioco/cpp11bigwig/graph/badge.svg)](https://app.codecov.io/gh/rnabioco/cpp11bigwig) -cpp11bigwig provides read access to bigWig files in R using `libBigWig` -from @dpryan79. Data is read into an R `data.frame`. +cpp11bigwig provides read access to bigWig files in R using +[libBigWig](https://github.com/dpryan79/libBigWig). Data is read into an +R `data.frame`. ## Installation @@ -25,4 +26,16 @@ pak::pak("rnabioco/cpp11bigwig") ``` r library(cpp11bigwig) + +bw = system.file('extdata', 'test.bw', package = 'cpp11bigwig') + +read_bigwig(bw) ``` + + ## chrom start end value + ## 1 1 0 1 0.1 + ## 2 1 1 2 0.2 + ## 3 1 2 3 0.3 + ## 4 1 100 150 1.4 + ## 5 1 150 151 1.5 + ## 6 10 200 300 2.0