On the Anatomy of Real-World R Code for Static Analysis
- URL: http://arxiv.org/abs/2401.16228v1
- Date: Mon, 29 Jan 2024 15:29:17 GMT
- Title: On the Anatomy of Real-World R Code for Static Analysis
- Abstract summary: We conduct a large-scale static analysis of more than 50 million lines of real-world R programs and packages.
We compare the similarities and differences between the scripts of R users and the implementations of package authors.
We find a high frequency of name-based indexing, assignments, and loops, but a low frequency for most of R's reflective functions.
- Score: 1.1767330101986737
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: CONTEXT The R programming language has a huge and active community,
especially in the area of statistical computing. Its interpreted nature allows
for several interesting constructs, like the manipulation of functions at
run-time, that hinder the static analysis of R programs. At the same time,
there is a lack of existing research regarding how these features, or even the
R language as a whole are used in practice. OBJECTIVE In this paper, we conduct
a large-scale, static analysis of more than 50 million lines of real-world R
programs and packages to identify their characteristics and the features that
are actually used. Moreover, we compare the similarities and differences
between the scripts of R users and the implementations of package authors. We
provide insights for static analysis tools like the lintr package as well as
potential interpreter optimizations and uncover areas for future research.
METHOD We analyze 4230 R scripts submitted alongside publications and the
sources of 19450 CRAN packages for over 350000 R files, collecting and
summarizing quantitative information for features of interest. RESULTS We find
a high frequency of name-based indexing operations, assignments, and loops, but
a low frequency for most of R's reflective functions. Furthermore, we find
neither testing functions nor many calls to R's foreign function interface
(FFI) in the publication submissions. CONCLUSION R scripts and package sources
differ, for example, in their size, the way they include other packages, and
their usage of R's reflective capabilities. We provide features that are used
frequently and should be prioritized by static analysis tools, like operator
assignments, function calls, and certain reflective functions like load.
Related papers
- Supporting the Comprehension of Data Analysis Scripts [0.39146761527401425]
FlowR is an extension for Positron and VS Code to handle data analysis scripts.<n>It incrementally analyzes R projects by intertwining interprocedural data- and control-flow analyses.<n>It offers a plugin system and interfaces, allowing the integration of further analyses, such as new linting rules or custom visualizations.
arXiv Detail & Related papers (2026-04-17T11:28:49Z) - DARE: Aligning LLM Agents with the R Statistical Ecosystem via Distribution-Aware Retrieval [21.193573505360266]
DARE (Distribution-Aware Retrieval Embedding) is a lightweight, plug-and-play retrieval model that incorporates data distribution information into function representations for R package retrieval.<n>Our main contributions are: (i) RPKB, a curated R Package Knowledge Base derived from 8,191 high-quality CRAN packages; (ii) DARE, an embedding model that fuses distributional features with function metadata to improve retrieval relevance; and (iii) RCodingAgent, an R-oriented LLM agent for reliable R code generation and a suite of statistical analysis tasks.
arXiv Detail & Related papers (2026-03-05T02:29:54Z) - MLIR-Smith: A Novel Random Program Generator for Evaluating Compiler Pipelines [5.268554895844063]
We introduce MLIR-Smith, a novel random program generator specifically designed to test and evaluate compiler optimizations.<n>By providing a tool that can generate random MLIR programs, this paper enhances our ability to evaluate and improve compilers.
arXiv Detail & Related papers (2026-01-05T15:43:09Z) - ThinkGeo: Evaluating Tool-Augmented Agents for Remote Sensing Tasks [54.52092001110694]
ThinkGeo is a benchmark designed to evaluate tool-augmented agents on remote sensing tasks via structured tool use and multi-step planning.<n>Inspired by tool-interaction paradigms, ThinkGeo includes human-curated queries spanning a wide range of real-world applications.<n>Our analysis reveals notable disparities in tool accuracy and planning consistency across models.
arXiv Detail & Related papers (2025-05-29T17:59:38Z) - A Comprehensive Survey on Composed Image Retrieval [54.54527281731775]
Composed Image Retrieval (CIR) is an emerging yet challenging task that allows users to search for target images using a multimodal query.
There is currently no comprehensive review of CIR to provide a timely overview of this field.
We synthesize insights from over 120 publications in top conferences and journals, including ACM TOIS, SIGIR, and CVPR.
arXiv Detail & Related papers (2025-02-19T01:37:24Z) - ASPIRE: Assistive System for Performance Evaluation in IR [1.9441753575523208]
ASPIRE (Assistive System for Performance Evaluation in IR) is a visual analytics tool for in-depth analysis of Information Retrieval experiments.
ASPIRE supports four key aspects of IR experiment evaluation and analysis: single/multi-experiment comparisons, query-level analysis, query characteristics-performance interplay, and collection-based retrieval analysis.
arXiv Detail & Related papers (2024-12-20T10:25:28Z) - RobPy: a Python Package for Robust Statistical Methods [1.2233362977312945]
RobPy offers a wide range of robust methods in Python, built upon established libraries including NumPy, SciPy, and scikit-learn.
This paper presents the structure of the RobPy package, demonstrates its functionality through examples, and compares its features to existing implementations in other statistical software.
arXiv Detail & Related papers (2024-11-04T10:27:30Z) - Do Current Language Models Support Code Intelligence for R Programming Language? [2.225268436173329]
We evaluate Code-PLMs for two tasks of code summarization and method name prediction using several settings and strategies.
Our results demonstrate that the studied models have experienced varying degrees of performance degradation.
The dual syntax paradigms in R significantly impact the models' performance, particularly in code summarization tasks.
arXiv Detail & Related papers (2024-10-10T10:23:23Z) - RAGGED: Towards Informed Design of Retrieval Augmented Generation Systems [51.171355532527365]
Retrieval-augmented generation (RAG) can significantly improve the performance of language models (LMs)
RAGGED is a framework for analyzing RAG configurations across various document-based question answering tasks.
arXiv Detail & Related papers (2024-03-14T02:26:31Z) - LLMDFA: Analyzing Dataflow in Code with Large Language Models [8.92611389987991]
This paper presents LLMDFA, a compilation-free and customizable dataflow analysis framework.
We decompose the problem into several subtasks and introduce a series of novel strategies.
On average, LLMDFA achieves 87.10% precision and 80.77% recall, surpassing existing techniques with F1 score improvements of up to 0.35.
arXiv Detail & Related papers (2024-02-16T15:21:35Z) - CRUD-RAG: A Comprehensive Chinese Benchmark for Retrieval-Augmented Generation of Large Language Models [49.16989035566899]
Retrieval-Augmented Generation (RAG) is a technique that enhances the capabilities of large language models (LLMs) by incorporating external knowledge sources.
This paper constructs a large-scale and more comprehensive benchmark, and evaluates all the components of RAG systems in various RAG application scenarios.
arXiv Detail & Related papers (2024-01-30T14:25:32Z) - FIND: A Function Description Benchmark for Evaluating Interpretability
Methods [86.80718559904854]
This paper introduces FIND (Function INterpretation and Description), a benchmark suite for evaluating automated interpretability methods.
FIND contains functions that resemble components of trained neural networks, and accompanying descriptions of the kind we seek to generate.
We evaluate methods that use pretrained language models to produce descriptions of function behavior in natural language and code.
arXiv Detail & Related papers (2023-09-07T17:47:26Z) - Ordinal time series analysis with the R package otsfeatures [0.0]
R package otsfeatures attempts to provide a set of simple functions for analyzing ordinal time series.
The output of several functions can be employed to perform traditional machine learning tasks including clustering, classification or outlier detection.
arXiv Detail & Related papers (2023-04-24T16:40:27Z) - Analyzing categorical time series with the R package ctsfeatures [0.0]
The R package ctsfeatures offers users a set of useful tools for analyzing categorical time series.
The output of some functions can be employed to perform traditional machine learning tasks including clustering, classification and outlier detection.
arXiv Detail & Related papers (2023-04-24T16:16:56Z) - Rissanen Data Analysis: Examining Dataset Characteristics via
Description Length [78.42578316883271]
We introduce a method to determine if a certain capability helps to achieve an accurate model of given data.
Since minimum program length is uncomputable, we estimate the labels' minimum description length (MDL) as a proxy.
We call the method Rissanen Data Analysis (RDA) after the father of MDL.
arXiv Detail & Related papers (2021-03-05T18:58:32Z) - Shared Space Transfer Learning for analyzing multi-site fMRI data [83.41324371491774]
Multi-voxel pattern analysis (MVPA) learns predictive models from task-based functional magnetic resonance imaging (fMRI) data.
MVPA works best with a well-designed feature set and an adequate sample size.
Most fMRI datasets are noisy, high-dimensional, expensive to collect, and with small sample sizes.
This paper proposes the Shared Space Transfer Learning (SSTL) as a novel transfer learning approach.
arXiv Detail & Related papers (2020-10-24T08:50:26Z) - Estimating Structural Target Functions using Machine Learning and
Influence Functions [103.47897241856603]
We propose a new framework for statistical machine learning of target functions arising as identifiable functionals from statistical models.
This framework is problem- and model-agnostic and can be used to estimate a broad variety of target parameters of interest in applied statistics.
We put particular focus on so-called coarsening at random/doubly robust problems with partially unobserved information.
arXiv Detail & Related papers (2020-08-14T16:48:29Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.