Strange Attractors

Wandering around chaotically until beauty appears


New package on CRAN: lamW

Published by Avi on May 26, 2015

Recently, in various research projects, the Lambert-W function arose a number of times. Somewhat frustratingly, there is no built-in function in R to calculate it. The only options were those in the gsl and LambertW packages, the latter merely importing the former. Importing the entire GNU Scientific Library (GSL) can be a bit of a hassle, especially for those of us restricted to a Windows environment.

Therefore, I spent a little time and built a package for R whose sole purpose is to calculate the real-valued versions of the Lambert W function without the need for importing the GSL: the lamW package. It does depends on Rcpp, though. It could have been written in pure R, but as there are a number of loops involved which cannot be vectorized, and as Rcpp is fast becoming almost a base package, I figured that the speed and convenience was worth it.

A welcome outcome of this was that I think I finally wrapped my head around basic Padé approximation, which I use when calculating some parts of the primary branch of the Lambert-W. Eventually, I’d like to write a longer post about Padé approximation; when that will happen, who knows 8-).

Posted in Math, Programming | Tagged R, Software

← Previous Next →

About me

LinkedIn: Avraham Adler
Follow @avrahamadler profile for Avraham on Stack Exchange, a network of free, community-driven Q&A sites
ORCID iD icon https://orcid.org/0000-0002-3039-0703
SiteLock
  • About
    • KeyOxide Signature Profile
  • Coding Style Guide
  • R programming tips
    • R Benchmark Code
    • [DEPRECATED] Building OpenBLAS-based Rblas.dll for 64-bit R for Windows: R ≥ 3.3.0
  • Disclaimer

Recent posts

  • Updated WordPress citation package
  • Updating Style Guide
  • Reduce Dependency Hell: from testthat to tinytest
  • Building R 4.2 for Windows with OpenBLAS
  • Building R 4+ for Windows with OpenBLAS

Tags

Approximant ATLAS big data BLAS C++ capital tranching CAS Casualty Actuarial Society causation Chaos Theory copula correlation css cybersecurity eigenvalues Elections Fortran github GotoBLAS high-performance computing HPC journal kendall tau LaTeX multivariate OpenBLAS OpenMP package Pade parallelism publishing R Rcpp risk Software themes Variance vectorization Windows wordpress

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Strange Attractors Copyright © 2013–2025 · Avraham Adler · All Rights Reserved · Powered by WordPress and Spine.