{"id":15296138,"url":"https://github.com/eddelbuettel/rcppgsl","last_synced_at":"2026-03-27T02:41:02.454Z","repository":{"id":17272721,"uuid":"20042541","full_name":"eddelbuettel/rcppgsl","owner":"eddelbuettel","description":"Rcpp integration for GNU GSL vectors and matrices","archived":false,"fork":false,"pushed_at":"2026-03-05T15:18:34.000Z","size":1951,"stargazers_count":33,"open_issues_count":0,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-05T15:35:07.974Z","etag":null,"topics":["c-plus-plus","cran","gnu-gsl","hacktoberfest","r-package","rcpp"],"latest_commit_sha":null,"homepage":"","language":"TeX","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/eddelbuettel.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","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":"2014-05-22T00:50:23.000Z","updated_at":"2026-03-05T15:18:38.000Z","dependencies_parsed_at":"2024-03-26T23:25:16.938Z","dependency_job_id":"2da189b2-2488-4491-93bf-71564749605f","html_url":"https://github.com/eddelbuettel/rcppgsl","commit_stats":{"total_commits":371,"total_committers":7,"mean_commits":53.0,"dds":"0.28840970350404316","last_synced_commit":"7d03b51df080b18b10f1ee3597f1facd858ececf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eddelbuettel/rcppgsl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcppgsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcppgsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcppgsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcppgsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eddelbuettel","download_url":"https://codeload.github.com/eddelbuettel/rcppgsl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eddelbuettel%2Frcppgsl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31011339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T02:33:22.146Z","status":"ssl_error","status_checked_at":"2026-03-27T02:33:21.763Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c-plus-plus","cran","gnu-gsl","hacktoberfest","r-package","rcpp"],"created_at":"2024-09-30T18:09:31.537Z","updated_at":"2026-03-27T02:41:02.446Z","avatar_url":"https://github.com/eddelbuettel.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"## RcppGSL: Rcpp Integration for GNU GSL Vectors and Matrices\n\n[![CI](https://github.com/eddelbuettel/rcppgsl/workflows/ci/badge.svg)](https://github.com/eddelbuettel/rcppgsl/actions?query=workflow%3Aci)\n[![License](https://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](https://www.r-project.org/Licenses/GPL-2) \n[![CRAN](https://www.r-pkg.org/badges/version/RcppGSL)](https://cran.r-project.org/package=RcppGSL) \n[![Debian package](https://img.shields.io/debian/v/r-cran-rcppgsl/sid?color=brightgreen)](https://packages.debian.org/sid/r-cran-rcppgsl)\n[![Downloads](https://cranlogs.r-pkg.org/badges/RcppGSL?color=brightgreen)](https://www.r-pkg.org:443/pkg/RcppGSL) \n[![Last Commit](https://img.shields.io/github/last-commit/eddelbuettel/rcppgsl)](https://github.com/eddelbuettel/rcppgsl)\n\nThis package uses [Rcpp](https://github.com/RcppCore/Rcpp) to connect the\n[R](https://www.r-project.org) system to the [GNU GSL](https://www.gnu.org/software/gsl/), a\ncollection of numerical routines for scientific computing, particularly its vector and matrix\nclasses.\n\n### Examples\n\n#### Faster `lm()` for OLS regression\n\nThe `fastLm()` function [included as file `src/fastLm.cpp`](https://github.com/eddelbuettel/rcppgsl/blob/master/src/fastLm.cpp) in the package:\n\n```cpp\n#include \u003cRcppGSL.h\u003e\n\n#include \u003cgsl/gsl_multifit.h\u003e\n#include \u003ccmath\u003e\n\n// [[Rcpp::export]]\nRcpp::List fastLm(const RcppGSL::Matrix \u0026X, const RcppGSL::Vector \u0026y) {\n\n    int n = X.nrow(), k = X.ncol();\n    double chisq;\n\n    RcppGSL::Vector coef(k);                // to hold the coefficient vector \n    RcppGSL::Matrix cov(k,k);               // and the covariance matrix\n    \n    // the actual fit requires working memory we allocate and free\n    gsl_multifit_linear_workspace *work = gsl_multifit_linear_alloc (n, k);\n    gsl_multifit_linear (X, y, coef, cov, \u0026chisq, work);\n    gsl_multifit_linear_free (work);\n\n    // assign diagonal to a vector, then take square roots to get std.error\n    Rcpp::NumericVector std_err;\n    std_err = gsl_matrix_diagonal(cov); \t// need two step decl. and assignment\n    std_err = Rcpp::sqrt(std_err);         \t// sqrt() is an Rcpp sugar function\n\n    return Rcpp::List::create(Rcpp::Named(\"coefficients\") = coef, \n                              Rcpp::Named(\"stderr\")       = std_err,\n                              Rcpp::Named(\"df.residual\")  = n - k);\n    \n}\n\n```\n\n#### A simple column norm\n\nThis example comes from the [complete example package included in RcppGSL](https://github.com/eddelbuettel/rcppgsl/tree/master/inst/examples/RcppGSLExample)\nand is from [the file `inst/examples/RcppGSLExample/src/colNorm.cpp`](https://github.com/eddelbuettel/rcppgsl/blob/master/inst/examples/RcppGSLExample/src/colNorm.cpp)\n\n```cpp\n\n#include \u003cRcppGSL.h\u003e\n#include \u003cgsl/gsl_matrix.h\u003e\n#include \u003cgsl/gsl_blas.h\u003e\n\n// [[Rcpp::export]]\nRcpp::NumericVector colNorm(const RcppGSL::Matrix \u0026 G) {\n    int k = G.ncol();\n    Rcpp::NumericVector n(k);           // to store results\n    for (int j = 0; j \u003c k; j++) {\n        RcppGSL::VectorView colview = gsl_matrix_const_column (G, j);\n        n[j] = gsl_blas_dnrm2(colview);\n    }\n    return n;                           // return vector\n}\n\n```\n\n### Dependencies\n\n- [GNU GSL](https://www.gnu.org/software/gsl/) library (eg [libgsl0-dev](https://packages.debian.org/sid/libgsl0-dev) on Debian or Ubuntu)\n- [Rcpp](https://github.com/RcppCore/Rcpp) for seamless R and C++ integration\n\n### Availabililty\n\nOn [CRAN](https://cran.r-project.org) and here.\n\n### Authors\n\nDirk Eddelbuettel and Romain Francois\n\n### License\n\nGPL (\u003e= 2)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddelbuettel%2Frcppgsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feddelbuettel%2Frcppgsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feddelbuettel%2Frcppgsl/lists"}