Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
simisc committed Mar 21, 2023
1 parent 7a80444 commit 61a9e80
Show file tree
Hide file tree
Showing 6 changed files with 827 additions and 26 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
.Rhistory
.RData
.Ruserdata
test
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: splintr
Type: Package
Title: Natural Cubic SPLines with Interpretable INTercepts
Version: 1.0.3
Version: 1.0.4
Authors@R: person("Simon", "Schoenbuchner",
email = "sms86@cam.ac.uk",
role = c("aut", "cre"),
Expand All @@ -16,6 +16,6 @@ Encoding: UTF-8
LazyData: true
Imports: splines, stats
RoxygenNote: 7.2.1
Suggests:
Suggests:
testthat (>= 3.0.0)
Config/testthat/edition: 3
6 changes: 4 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ knitr::opts_chunk$set(

# splintr

[![R build status](https://github.com/simisc/splintr/workflows/R-CMD-check/badge.svg)](https://github.com/simisc/splintr/actions)
<!-- badges: start -->
[![check-standard](https://github.com/simisc/splintr/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/simisc/splintr/actions/workflows/check-standard.yaml)
[![DOI](https://zenodo.org/badge/141533742.svg)](https://zenodo.org/badge/latestdoi/141533742)
[![Licence](https://img.shields.io/github/license/simisc/splintr)](https://github.com/simisc/splintr/blob/master/LICENSE)
[![Lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable)
[![codecov](https://codecov.io/gh/simisc/splintr/branch/master/graph/badge.svg?token=U41V9KQ40I)](https://codecov.io/gh/simisc/splintr)
<!-- badges: end -->

Natural cubic splines with interpretable intercepts: 'centres' a basis generated using `splines::ns()` on a specified x-value. When used in a model formula, this allows the model intercept to be interpreted with respect to that central x-value, rather than with respect to the x-value of the first `splines::ns()` knot.

Expand Down Expand Up @@ -110,7 +112,7 @@ augment(model_fits[[1]], data = women) %>%
ggplot(aes(x = height)) +
geom_point(aes(y = weight)) +
geom_line(aes(y = .fitted), col = "blue") +
geom_point(data = int_pts, aes(x = x, y = y), col = "red") +
geom_point(data = int_pts, aes(x = x, y = y), col = "red") +
geom_label_repel(data = int_pts, aes(x = x, y = y, label = model),
col = "red", nudge_y = 7) +
theme_few()
Expand Down
Loading

0 comments on commit 61a9e80

Please sign in to comment.