This package provides provider-agnostic tools for jointly comparing and optimizing prompts, language-model providers, and generation strategies for generative artificial intelligence workflows. Candidate configurations can be evaluated using user-supplied scoring functions, cost and latency measurements, robustness perturbations, Pareto-front screening, budget and latency constraints, prompt evolution, adaptive routing, self-consistency, and text-output ensembles. The core workflow is designed to run offline with deterministic mock providers, while external model application programming interfaces can be connected through user-defined provider functions. Evolutionary search concepts are described by Goldberg (1989, ISBN:0201157675), and multi-objective optimization concepts are related to Deb, Pratap, Agarwal and Meyarivan (2002) <doi:10.1109/4235.996017>.
The Analytic Hierarchy Process is a versatile multi-criteria decision-making tool introduced by Saaty (1987) <doi:10.1016/0270-0255(87)90473-8> that allows decision-makers to weigh attributes and evaluate alternatives presented to them. This package provides a consistent methodology for researchers to reformat data and run analytic hierarchy process in R on data that are formatted using the survey data entry mode. It is optimized for performing the analytic hierarchy process with many decision-makers, and provides tools and options for researchers to aggregate individual preferences and test multiple options. It also allows researchers to quantify, visualize and correct for inconsistency in the decision-maker's comparisons.
This package provides functions to estimate and interpret the alpha-NOMINATE ideal point model developed in Carroll et al. (2013, <doi:10.1111/ajps.12029>). alpha-NOMINATE extends traditional spatial voting frameworks by allowing for a mixture of Gaussian and quadratic utility functions, providing flexibility in modeling political actors preferences. The package uses Markov Chain Monte Carlo (MCMC) methods for parameter estimation, supporting robust inference about individuals ideological positions and the shape of their utility functions. It also contains functions to simulate data from the model and to calculate the probability of a vote passing given the ideal points of the legislators/voters and the estimated location of the choice alternatives.
This package contains Bayesian implementations of the Mixed-Effects Accelerated Failure Time (MEAFT) models for censored data. Those can be not only right-censored but also interval-censored, doubly-interval-censored or misclassified interval-censored. The methods implemented in the package have been published in Komárek and Lesaffre (2006, Stat. Modelling) <doi:10.1191/1471082X06st107oa>, Komárek, Lesaffre and Legrand (2007, Stat. in Medicine) <doi:10.1002/sim.3083>, Komárek and Lesaffre (2007, Stat. Sinica) <https://www3.stat.sinica.edu.tw/statistica/oldpdf/A17n27.pdf>, Komárek and Lesaffre (2008, JASA) <doi:10.1198/016214507000000563>, Garcà a-Zattera, Jara and Komárek (2016, Biometrics) <doi:10.1111/biom.12424>.
This package provides a class of Bayesian beta regression models for the analysis of continuous data with support restricted to an unknown finite support. The response variable is modeled using a four-parameter beta distribution with the mean or mode parameter depending linearly on covariates through a link function. When the response support is known to be (0,1), the above class of models reduce to traditional (0,1) supported beta regression models. Model choice is carried out via the logarithm of the pseudo marginal likelihood (LPML), the deviance information criterion (DIC), and the Watanabe-Akaike information criterion (WAIC). See Zhou and Huang (2022) <doi:10.1016/j.csda.2021.107345>.
Computes scalar performance metrics and goodness-of-fit summaries for comparing simulated and observed hydrological or regression values. Provides error metrics, percentage bias, Nash-Sutcliffe efficiency, Kling-Gupta efficiency variants, correlation measures, agreement indices, and comparison tables via gof() and gof_compare(). Metric definitions are registry-governed with shared validation, provenance-aware wrappers, and explicit handling of undefined or degenerate cases. Methods include Nash and Sutcliffe (1970) <doi:10.1016/0022-1694(70)90255-6>, Gupta et al. (2009) <doi:10.1016/j.jhydrol.2009.08.003>, Kling et al. (2012) <doi:10.1016/j.jhydrol.2012.01.011>, and Willmott et al. (2012) <doi:10.1002/joc.2419>.
Builds decision trees by splitting on linear combinations of randomly chosen variables. Projection pursuit is used to choose a projection of the variables that best separates the groups. Using linear combinations of variables to separate groups takes the correlation between variables into account, which allows the model to outperform a traditional decision tree when the separation between groups occurs in combinations of variables. Single trees can be assembled into random forests for improved accuracy. Implements projection pursuit classification trees (Lee, Cook, Park and Lee (2013) <doi:10.1214/13-EJS810>) and projection pursuit forests (da Silva, Cook and Lee (2021) <doi:10.1080/10618600.2020.1870480>), following the earlier PPforest package.
Computes and compares multiple measures of separation and overlap between phonological categories (for example vowels or consonants) in arbitrary multi-dimensional acoustic spaces such as formant values, mel-frequency cepstral coefficients (MFCCs), duration, or learned embeddings. The main entry point, phontrast(), reports several contrast metrics in one call -- Jensen-Shannon divergence and distance (Lin, 1991) <doi:10.1109/18.61115>, the Pillai-Bartlett trace, Bhattacharyya distance and affinity, Mahalanobis distance, and proportional overlap -- globally or by group on a common separation-oriented scale, with bootstrap confidence intervals. Also provides utilities for preparing estimates for downstream modelling such as generalized additive models and mixed-effects models. Formerly released as phonJSD'.
Determining potential output and the output gap - two inherently unobservable variables - is a major challenge for macroeconomists. sectorgap features a flexible modeling and estimation framework for a multivariate Bayesian state space model identifying economic output fluctuations consistent with subsectors of the economy. The proposed model is able to capture various correlations between output and a set of aggregate as well as subsector indicators. Estimation of the latent states and parameters is achieved using a simple Gibbs sampling procedure and various plotting options facilitate the assessment of the results. For details on the methodology and an illustrative example, see Streicher (2024) <https://www.research-collection.ethz.ch/handle/20.500.11850/653682>.
The extrafont package makes it easier to use fonts other than the basic PostScript fonts that R uses. Fonts that are imported into extrafont can be used with PDF or PostScript output files. There are two hurdles for using fonts in PDF (or Postscript) output files:
Making R aware of the font and the dimensions of the characters.
Embedding the fonts in the PDF file so that the PDF can be displayed properly on a device that doesn't have the font. This is usually needed if you want to print the PDF file or share it with others.
The extrafont package makes both of these things easier.
Tuning-free kernel density estimation for heaped and rounded data using a characteristic-function theory of heaping. Rounding to a grid is convolution with a box followed by lattice sampling, so the density is recovered by deconvolving the known box and tapering against a data-driven noise floor. Provides a box-deconvolution de-heaping estimator, a superposition variant, and a single combined estimator selected by a band-capacity gate; grid, heaped-fraction, and mixed-grain readers; and a spectral higher-order comb detector. Base-R replicas of the Heitjan-Rubin multiple-imputation and measurement-error deconvolution methods are included for comparison, and the Kernelheaping stochastic expectation-maximization estimator is used when installed.
An interface for creating, registering, and resolving content-based identifiers for data management. Content-based identifiers rely on the cryptographic hashes to refer to the files they identify, thus, anyone possessing the file can compute the identifier using a well-known standard algorithm, such as SHA256'. By registering a URL at which the content is accessible to a public archive (such as Hash Archive) or depositing data in a scientific repository such Zenodo', DataONE or SoftwareHeritage', the content identifier can serve many functions typically associated with A Digital Object Identifier ('DOI'). Unlike location-based identifiers like DOIs', content-based identifiers permit the same content to be registered in many locations.
This package provides functions for forest objects detection, structure metrics computation, model calibration and mapping with airborne laser scanning: co-registration of field plots (Monnet and Mermin (2014) <doi:10.3390/f5092307>); tree detection (method 1 in Eysn et al. (2015) <doi:10.3390/f6051721>) and segmentation; forest parameters estimation with the area-based approach: model calibration with ground reference, and maps export (Aussenac et al. (2023) <doi:10.12688/openreseurope.15373.2>); extraction of both physical (gaps, edges, trees) and statistical features useful for e.g. habitat suitability modeling (Glad et al. (2020) <doi:10.1002/rse2.117>) and forest maturity mapping (Fuhr et al. (2022) <doi:10.1002/rse2.274>).
Grey model is commonly used in time series forecasting when statistical assumptions are violated with a limited number of data points. The minimum number of data points required to fit a grey model is four observations. This package fits Grey model of First order and One Variable, i.e., GM (1,1) for multivariate time series data and returns the parameters of the model, model evaluation criteria and h-step ahead forecast values for each of the time series variables. For method details see, Akay, D. and Atak, M. (2007) <DOI:10.1016/j.energy.2006.11.014>, Hsu, L. and Wang, C. (2007).<DOI:10.1016/j.techfore.2006.02.005>.
The method m:Explorer associates a given list of target genes (e.g. those involved in a biological process) to gene regulators such as transcription factors. Transcription factors that bind DNA near significantly many target genes or correlate with target genes in transcriptional (microarray or RNAseq data) are selected. Selection of candidate master regulators is carried out using multinomial regression models, likelihood ratio tests and multiple testing correction. Reference: m:Explorer: multinomial regression models reveal positive and negative regulators of longevity in yeast quiescence. Juri Reimand, Anu Aun, Jaak Vilo, Juan M Vaquerizas, Juhan Sedman and Nicholas M Luscombe. Genome Biology (2012) 13:R55 <doi:10.1186/gb-2012-13-6-r55>.
Converts NIfTI format T1/FL neuroimages into structured, high-dimensional 2D data frames with a focus on region of interest (ROI) based processing. The package incorporates the partition algorithm, which offers a flexible framework for agglomerative partitioning based on the Direct-Measure-Reduce approach. This method ensures that each reduced variable maintains a user-specified minimum level of information while remaining interpretable, as each maps uniquely to one variable in the reduced dataset. The partition framework is described in Millstein et al. (2020) <doi:10.1093/bioinformatics/btz661>. The package allows customization in variable selection, measurement of information loss, and data reduction methods for neuroimaging analysis and machine learning workflows.
Despite that several tests for normality in stationary processes have been proposed in the literature, consistent implementations of these tests in programming languages are limited. Seven normality test are implemented. The asymptotic Lobato & Velasco's, asymptotic Epps, Psaradakis and Vávra, Lobato & Velasco's and Epps sieve bootstrap approximations, El bouch et al., and the random projections tests for univariate stationary process. Some other diagnostics such as, unit root test for stationarity, seasonal tests for seasonality, and arch effect test for volatility; are also performed. Additionally, the El bouch test performs normality tests for bivariate time series. The package also offers residual diagnostic for linear time series models developed in several packages.
This package provides a random forest based implementation of the method described in Chapter 7.1.2 (Regression model based anomaly detection) of Chandola et al. (2009) <doi:10.1145/1541880.1541882>. It works as follows: Each numeric variable is regressed onto all other variables by a random forest. If the scaled absolute difference between observed value and out-of-bag prediction of the corresponding random forest is suspiciously large, then a value is considered an outlier. The package offers different options to replace such outliers, e.g. by realistic values found via predictive mean matching. Once the method is trained on a reference data, it can be applied to new data.
This package provides a collection of functions which (i) assess the quality of variable subsets as surrogates for a full data set, in either an exploratory data analysis or in the context of a multivariate linear model, and (ii) search for subsets which are optimal under various criteria. Theoretical support for the heuristic search methods and exploratory data analysis criteria is in Cadima, Cerdeira, Minhoto (2003, <doi:10.1016/j.csda.2003.11.001>). Theoretical support for the leap and bounds algorithm and the criteria for the general multivariate linear model is in Duarte Silva (2001, <doi:10.1006/jmva.2000.1920>). There is a package vignette "subselect", which includes additional references.
Herein, we provide a broad variety of functions which are useful for handling, manipulating, and visualizing satellite-based remote sensing data. These operations range from mere data import and layer handling (eg subsetting), over Raster* typical data wrangling (eg crop, extend), to more sophisticated (pre-)processing tasks typically applied to satellite imagery (eg atmospheric and topographic correction). This functionality is complemented by a full access to the satellite layers metadata at any stage and the documentation of performed actions in a separate log file. Currently available sensors include Landsat 4-5 (TM), 7 (ETM+), and 8 (OLI/TIRS Combined), and additional compatibility is ensured for the Landsat Global Land Survey data set.
Mixed models for repeated measures (MMRM) are a popular choice for analyzing longitudinal continuous outcomes in randomized clinical trials and beyond; see for example Cnaan, Laird and Slasor (1997) <doi:10.1002/(SICI)1097-0258(19971030)16:20%3C2349::AID-SIM667%3E3.0.CO;2-E>. This package provides an interface for fitting MMRM within the tern <https://cran.r-project.org/package=tern> framework by Zhu et al. (2023) and tabulate results easily using rtables <https://cran.r-project.org/package=rtables> by Becker et al. (2023). It builds on mmrm <https://cran.r-project.org/package=mmrm> by Sabanés Bové et al. (2023) for the actual MMRM computations.
This package provides a set of utility function to prevent the spread of utility scripts in W4M (Workflow4Metabolomics) tools, and centralize them in a single package. To note, some are meant to be replaced by the use of dedicated packages in the future, like the parse_args() function: it is here only to prepare the ground for more global changes in W4M scripts and tools. This package is used by part of the W4M Galaxy modules, some of them being available on the community-maintained GitHub repository for Metabolomics Galaxy tools <https://github.com/workflow4metabolomics/tools-metabolomics>. See Delporte et al (2025) <doi:10.1002/cpz1.70095> for more details.
This is a data only package providing the algorithmic complexity of short strings, computed using the coding theorem method. For a given set of symbols in a string, all possible or a large number of random samples of Turing machines with a given number of states (e.g., 5) and number of symbols corresponding to the number of symbols in the strings were simulated until they reached a halting state or failed to end. This package contains data on 4.5 million strings from length 1 to 12 simulated on Turing machines with 2, 4, 5, 6, and 9 symbols. The complexity of the string corresponds to the distribution of the halting states.
Add mean comparison annotations to a ggplot'. This package provides an easy way to indicate if two or more groups are significantly different in a ggplot'. Usually you do not need to specify the test method, you only need to tell stat_compare() whether you want to perform a parametric test or a nonparametric test, and stat_compare() will automatically choose the appropriate test method based on your data. For comparisons between two groups, the p-value is calculated by t-test (parametric) or Wilcoxon rank sum test (nonparametric). For comparisons among more than two groups, the p-value is calculated by One-way ANOVA (parametric) or Kruskal-Wallis test (nonparametric).