{"id":32207793,"url":"https://github.com/dewittpe/cpr","last_synced_at":"2026-03-16T05:17:43.840Z","repository":{"id":56937521,"uuid":"68039841","full_name":"dewittpe/cpr","owner":"dewittpe","description":"Control Polygon Reduction: Methods for quick and efficient placement of internal knots for B-splines and tensor products of B-splines.","archived":false,"fork":false,"pushed_at":"2024-07-29T22:43:47.000Z","size":38435,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T05:59:25.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.peteredewitt.com/cpr/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dewittpe.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-09-12T19:18:02.000Z","updated_at":"2024-07-29T22:37:45.000Z","dependencies_parsed_at":"2023-12-06T18:28:20.258Z","dependency_job_id":"a13bad84-d317-4c36-9587-2f8ef5363052","html_url":"https://github.com/dewittpe/cpr","commit_stats":{"total_commits":654,"total_committers":3,"mean_commits":218.0,"dds":0.5107033639143731,"last_synced_commit":"262996d5b469ae086d71a457ae2f7e6bd0ef1fde"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/dewittpe/cpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewittpe%2Fcpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewittpe%2Fcpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewittpe%2Fcpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewittpe%2Fcpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dewittpe","download_url":"https://codeload.github.com/dewittpe/cpr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dewittpe%2Fcpr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280389300,"owners_count":26322507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-22T05:59:23.605Z","updated_at":"2026-03-16T05:17:43.834Z","avatar_url":"https://github.com/dewittpe.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cpr: Control Polygon Reduction \u003cimg src=\"man/figures/logo120x139.png\" align=\"right\"/\u003e\n\n[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n[![R-CMD-check](https://github.com/dewittpe/cpr/workflows/R-CMD-check/badge.svg)](https://github.com/dewittpe/cpr/actions)\n[![Coverage Status](https://img.shields.io/codecov/c/github/dewittpe/cpr/master.svg)](https://app.codecov.io/github/dewittpe/cpr?branch=master)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/cpr)](https://cran.r-project.org/package=cpr)\n[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/cpr)](https://www.r-pkg.org/pkg/cpr)\n\nAn R package for implementing the Control Polygon Reduction model\nselection method.  When we are tasked with modeling the functional relationship\nbetween a response and a continuous predictor, i.e., y = f(x), CPR allows for quick and\nefficient searching of a large model space to find B-spline estimates of the\nfunction f(x).\n\nCPR extends to multiple dimensions and allows one to find good locations for\nknots in a tensor product of B-splines.\n\n## Learn More About CPR.\nThis model selection method was developed as part of [Peter DeWitt's PhD\ndissertation](https://doi.org/10.25677/awnc-b795) work.  It has since been\nextended.\n\n### Vignettes\nThere are two vignettes within the package:\n```r\nvignettes(topic = 'cpr', package = 'cpr')\nvignettes(topic = 'cnr', package = 'cpr')\n```\n\nYou can also read these on the package website\n\n\n### Related Publications:\n\n* The CPR method was presented at the 28th International Biometric Conference\n  held in July 2016 in Victoria, British Columbia, Canada.  The abstract, paper,\n  and talk had the title:\n  \"Parsimonious B-splines Regression Models via Control Polygon\n  Reduction.\"  A BibTeX entry for the abstract:\n\n```\n@inproceedings{,\n  author       = {DeWitt, Peter E. and Carlson, Nichole E. and Samantha MaWhinney},\n  title        = {Parsimonious B-spline Regression Models via Control Polygon Reduction},\n  booktitle    = {Abstracts for the XXVIIIth International Biometric Conference},\n  month        = {July},\n  year         = {2016},\n  organization = {International Biometric Society},\n  address      = {Victoria, British Columbia},\n  isbn         = {978-0-9821919-4-1}\n}\n```\n\n**Awards:** The presentation of the work earned Peter DeWitt two awards:\n\n1. \"Best Student Oral Presentation\" from the International Biometric Society\n   (IBS).\n2. \"Distinguished Oral Presentation\" as part of the student\n   paper competition hosted by the Western North American Region\n   (WNAR) of the IBS.\n\n## Installing CPR\n\n### Released Version\n\nInstall from the Comprehensive R Archive Network (CRAN)\n\n```r\n# within R\ninstall.packages(\"cpr\", repos = \"https://cran.rstudio.com\")\n```\n\n### Developmental Version\n\nIf you are working on a Windows machine you will need to have\n[Rtools](https://cran.r-project.org/bin/windows/Rtools/) installed.\n\n#### From GitHub\n\nThis will require you to have\n[remotes](https://cran.r-project.org/package=remotes) package installed.\n\n```r\n# Just the package without the manual and without vignettes\nremotes::install_github(repo = \"dewittpe/cpr\")\n\n# Install with vignettes\nremotes::install_github(\n    repo = \"dewittpe/cpr\"\n  , dependbuild_vignettes = TRUE\n  , dependencies = TRUE\n)\n```\n\n#### From a cloned repository\n\nYou'll need to have the R package\n[devtools](https://cran.r-project.org/package=devtools) installed on your\nmachine.\n\nTo check R dependencies before building, or after you get errors due to missing\nR packages run:\n```r\ndevtools::install_dev_deps()\n```\n\nTo build the R package and install the dev version on your machine:\n\n```bash\nmake install\n```\n\nAlternatively, you should be able to build and install without `make`\n```bash\nR CMD build \u003cpath to cloned repo\u003e\nR CMD INSTALL cpr_\u003cversion\u003e.tar.gz\n```\n\n## Other Notes:\nThe `cpr` package provides 3D graphics via the\n[`rgl`](https://CRAN.R-project.org/package=rgl) package.  If you get an\nerror (or message) of the form:\n```\n  font family \"sans\" not found, using \"bitmap\"\n```\nThen there is an easy fix.  You need to get the [FreeType 2 font\nengine](https://freetype.org/).\n\nOn Debian, you can get the library via:\n\n```bash\napt-get install libfreetype6-dev\n```\n\nOnce the FreeType 2 font engine has been installed on your computer you **must\nreinstall** the `rgl` package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewittpe%2Fcpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdewittpe%2Fcpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdewittpe%2Fcpr/lists"}