Search NASA⌕ Search

SEARCH · Search NASA

Results for “R package”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 73 records · Page 4

Improving the accessibility and transferability of machine learning algorithms for identification of animals in camera trap images: MLWIC2

Motion-activated wildlife cameras (or “camera traps”) are frequently used to remotely and noninvasively observe animals. The vast number of images collected from camera trap projects has prompted some biologists to employ machine learning algorithms to automatically recognize species in these images, or at least filter-out images that do not contain animals. These approaches are often limited by model transferability, as a model trained to recognize species from one location might not work as well for the same species in different locations. Furthermore, these methods often require advanced computational skills, making them inaccessible to many biologists. We used 3 million camera trap images from 18 studies in 10 states across the United States of America to train two deep neural networks, one that recognizes 58 species, the “species model,” and one that determines if an image is empty or if it contains an animal, the “empty-animal model.” Our species model and empty-animal model had accuracies of 96.8% and 97.3%, respectively. Furthermore, the models performed well on some out-of-sample datasets, as the species model had 91% accuracy on species from Canada (accuracy range 36%–91% across all out-of-sample datasets) and the empty-animal model achieved an accuracy of 91%–94% on out-of-sample datasets from different continents. Our software addresses some of the limitations of using machine learning to classify images from camera traps. By including many species from several locations, our species model is potentially applicable to many camera trap studies in North America. We also found that our empty-animal model can facilitate removal of images without animals globally. We provide the trained models in an R package (MLWIC2: Machine Learning for Wildlife Image Classification in R), which contains Shiny Applications that allow scientists with minimal programming experience to use trained models and train new models in six neural network architectures with varying depths.

59 BASIC BIOLOGICAL SCIENCES↗

Social Network Analysis in R: A Software Review

In education research, social network analysis is being widely used to study different interactions and their overall implications. Recently, there has also been a surge in the development of software tools to implement social network analysis. In this article, we review two popular R packages, igraph and statnet suite, in the context of network summarization and modeling. We discuss different aspects of these packages and demonstrate some of their functionalities by analyzing a friendship network of lawyers. Finally, we end with recommendations for using these packages along with pointers to additional resources for network analysis in R.

97 MATHEMATICS AND COMPUTING↗

metabCombiner 2.0: Disparate Multi-Dataset Feature Alignment for LC-MS Metabolomics

Liquid chromatography–high-resolution mass spectrometry (LC-HRMS), as applied to untargeted metabolomics, enables the simultaneous detection of thousands of small molecules, generating complex datasets. Alignment is a crucial step in data processing pipelines, whereby LC-MS features derived from common ions are assembled into a unified matrix amenable to further analysis. Variability in the analytical factors that influence liquid chromatography separations complicates data alignment. This is prominent when aligning data acquired in different laboratories, generated using non-identical instruments, or between batches from large-scale studies. Previously, we developed metabCombiner for aligning disparately acquired LC-MS metabolomics datasets. Here, we report significant upgrades to metabCombiner that enable the stepwise alignment of multiple untargeted LC-MS metabolomics datasets, facilitating inter-laboratory reproducibility studies. To accomplish this, a “primary” feature list is used as a template for matching compounds in “target” feature lists. We demonstrate this workflow by aligning four lipidomics datasets from core laboratories generated using each institution’s in-house LC-MS instrumentation and methods. We also introduce batchCombine, an application of the metabCombiner framework for aligning experiments composed of multiple batches. metabCombiner is available as an R package on Github and Bioconductor, along with a new online version implemented as an R Shiny App.

97 MATHEMATICS AND COMPUTING↗

Soil Incubation, Methane Pool Dilution, Edgewater, MD, USA, July 2022 v1.0.1

Isotopic pool dilution is a powerful approach to quantify gross biogeochemical transformation rates, but remains seldom used despite its potential. To facilitate broader implementation of pool dilution methods, we developed a user-friendly R package that optimizes gross production and consumption rates (and optionally fractionation constants as well) based on standard pool dilution time series data. This data package is the soil methane pool dilution data and code for building and using this software, including source code (R) and raw data (.csv). This package features extensive documentation and example analyses, and is easily integrated into analytical pipelines as R software is free and open source. Operation of this package requires R version 2.10 or newer, and we recommend its use in conjunction with packages testthat (3.0.0), knitr, rmarkdown, ggploto2, tibble, and tidyr.

54 ENVIRONMENTAL SCIENCES↗

nmrrr : A Reproducible Workflow for Binning and Visualizing NMR Spectra From Environmental Samples

Nuclear magnetic resonance (NMR) spectroscopy is a useful tool for detection and identification of molecular structural information, with increasing applications in environmental sciences. NMR instrument outputs are however heterogeneous and require extensive post-processing, creating barriers to their use and application by non-specialists. Here, we report on a new open-source R package, nmrrr, that processes and visualizes spectral data obtained from one-dimensional solution-state and solid-state NMR experiments; the package also performs relevant calculations commonly applied in natural organic matter communities, such as computing the relative abundance of various functional groups. We document the package's installation, dependencies, and functions; and provide a standard workflow for processing NMR data. This package is currently available on CRAN and GitHub, and community contributions are welcome.

54 ENVIRONMENTAL SCIENCES↗

Temporal Characterization and Filtering of Sensor Data to Support Anomaly Detection

Here, we present an approach for characterizing complex temporal behavior in the sensor measurements of a system in order to support detection of anomalies in that system. We first characterize typical behavior by extending a hidden Markov model-based approach to time series alignment. We then use a trace of that learned behavior to develop a particle filter that enables efficient estimation of the filtering distribution on the state space. This produces filtered residuals that can then be used in an anomaly detection framework. Our motivating example is the daily behavior of a building’s heating, ventilation, and air conditioning (HVAC) system, using sensor measurements that arrive every minute and induce a state space with 15,120 states. We provide an end-to-end demonstration of our approach showing improved performance of anomaly detection after application of alignment and filtering compared to the unaligned data. The proposed model is implemented as a computationally efficient R package alignts (align time series) built with R and Fortran 95 with OpenMP support.

47 OTHER INSTRUMENTATION↗

IsoMatchMS : Open-Source Software for Automated Annotation and Visualization of High Resolution MALDI-MS Spectra

Due to its speed, accuracy, and adaptability to various sample types, matrix-assisted laser desorption/ionization mass spectrometry (MALDI-MS) has become a popular method to identify molecular isotope profiles from biological samples. Often MALDI-MS data do not include tandem MS fragmentation data, and thus the identification of compounds in samples requires external databases so that the accurate mass of detected signals can be matched to known molecular compounds. Most relevant MALDI-MS software tools developed to confirm compound identifications are focused on small molecules (e.g., metabolites, lipids) and cannot be easily adapted to protein data due to their more complex isotopic distributions. Here, we present an R package called IsoMatchMS for the automated annotation of MALDI-MS data for multiple datatypes: intact proteins, peptides, and glycans. This tool accepts already derived molecular formulas or, for proteomics applications, can derive molecular formulas from a list of input peptides or proteins including proteins with post-translational modifications. In conclusion, visualization of all matched isotopic profiles is provided in a highly accessible HTML format called a trelliscope display, which allows users to filter and sort by several parameters such as match scores and the number of peaks matched. IsoMatchMS simplifies the annotation and visualization of MALDI-MS data for downstream analyses.

47 OTHER INSTRUMENTATION↗

How R Developers explain their Package Choice: A Survey

Background: Contemporary software development relies heavily on reusing already implemented functionality, usually in the form of packages. Aims: We aim to shed light on developers' preferences when selecting packages in R language. Method: To do that, we create and administer a survey to over 1000 developers who have added one of two common dataframe enhancement libraries in R to their projects: data.table or tidyr. We design a questionnaire using the Social Contagion Theory (SCT) following prior work on technology adoption and ensure that key dimensions affecting developer choice are considered. Results: Of the 1085 developers we contacted, 803 completed the survey asking them to prioritize various factors known to affect developer perceptions of package quality and to provide their background. Most developers self-identified as data scientists with two to five years of work experience. We found significant differences between the preferences of developers who chose data.table and tidyr. Surprisingly, package reputation based on easy-to-see measures, such as the number of stars on GitHub, was not an important factor for either group. Conclusions: Our findings demonstrate the inherently social nature of package adoption. They can help design future studies on how different populations of developers make decisions on which software packages to use in their projects. Finally, package developers and maintainers can benefit by better understanding the prime concerns of the users of their packages.

Malviya Thakur, Addi↗

taxadb: A high‐performance local taxonomic database interface

Abstract A familiar and growing challenge in ecological and evolutionary research is that of establishing consistent taxonomy when combining data from separate sources. While this problem is already well understood and numerous naming authorities have been created to address the issue, most researchers lack a fast, consistent, and intuitive way to retrieve taxonomic names. We present taxadb R package which creates a local database, managed automatically from within R, to provide fast operations on millions of taxonomic names. taxadb provides access to established naming authorities to resolve synonyms, taxonomic identifiers, and hierarchical classification in a consistent and intuitive data format. taxadb makes operation on millions of taxonomic names fast and manageable.

Norman, Kari E. A.↗

glmnetLRC f/k/a lrc package: Logistic Regression Classification

Methods for fitting and predicting logistic regression classifiers (LRC) with an arbitrary loss function using elastic net or best subsets. This package adds additional model fitting features to the existing glmnet and bestglm R packages. This package was created to perform the analyses described in Amidan BG, Orton DJ, LaMarche BL, et al. 2014. Signatures for Mass Spectrometry Data Quality. Journal of Proteome Research. 13(4), 2215-2222. It makes the model fitting available in the glmnet and bestglm packages more general by identifying optimal model parameters via cross validation with an customizable loss function. It also identifies the optimal threshold for binary classification.

Source record↗

glmnetLRC f/k/a lrc package: Logistic Regression Classification

Methods for fitting and predicting logistic regression classifiers (LRC) with an arbitrary loss function using elastic net or best subsets. This package adds additional model fitting features to the existing glmnet and bestglm R packages. This package was created to perform the analyses described in Amidan BG, Orton DJ, LaMarche BL, et al. 2014. Signatures for Mass Spectrometry Data Quality. Journal of Proteome Research. 13(4), 2215-2222. It makes the model fitting available in the glmnet and bestglm packages more general by identifying optimal model parameters via cross validation with an customizable loss function. It also identifies the optimal threshold for binary classification.

Source record↗

USING COPULAS TO MODEL DEPENDENCE IN SIMULATION RISK ASSESSMENT

Typical engineering systems in applications with high failure consequences such as nuclear reactor plants often employ redundancy and diversity of equipment in an effort to lower the probability of failure and therefore risk. However, it has long been recognized that dependencies exist in these redundant and diverse systems. Some dependencies, such as common sources of electrical power, are typically captured in the logic structure of the risk model. Others, usually referred to as intercomponent dependencies, are treated implicitly by introducing one or more statistical parameters into the model. Such common-cause failure models have limitations in a simulation environment. In addition, substantial subjectivity is associated with parameter estimation for these models. This paper describes an approach in which system performance is simulated by drawing samples from the joint distributions of dependent variables. The approach relies on the notion of a copula distribution, a notion which has been employed by the actuarial community for ten years or more, but which has seen only limited application in technological risk assessment. The paper also illustrates how equipment failure data can be used in a Bayesian framework to estimate the parameter values in the copula model. This approach avoids much of the subjectivity required to estimate parameters in traditional common-cause failure models. Simulation examples are presented for failures in time. The open-source software package R is used to perform the simulations. The open-source software package WinBUGS is used to perform the Bayesian inference via Markov chain Monte Carlo sampling.

99 GENERAL AND MISCELLANEOUS↗

rsed

"rsed" is an R package that contains tools for stream editing: manipulating text files by making insertions, replacements, deletions, substitutions, or commenting. It hails from the powerful Unix command, "sed". While the "rsed" package is not nearly as powerful as "see", it is much simpler to use. R programmers often write scripts that may require simple manipulation of text files. "rsed" addresses that need.

Source record↗

rsed

"rsed" is an R package that contains tools for stream editing: manipulating text files by making insertions, replacements, deletions, substitutions, or commenting. It hails from the powerful Unix command, "sed". While the "rsed" package is not nearly as powerful as "see", it is much simpler to use. R programmers often write scripts that may require simple manipulation of text files. "rsed" addresses that need.

Source record↗

Grandparent Inference from Genetic Data: The Potential for Parentage-Based Tagging Programs to Identify Offspring of Hatchery Strays

Abstract Fisheries managers routinely use hatcheries to increase angling opportunity. Many hatcheries operate as segregated programs where hatchery-origin fish are not intended to spawn with natural-origin conspecifics in order to prevent potential negative effects on the natural-origin population. Currently available techniques to monitor the frequency with which hatchery-origin strays successfully spawn in the wild rely on either genetic differentiation between the hatchery- and natural-origin fish or extensive sampling of fish on the spawning grounds. We present a method to infer grandparent–grandchild trios by using only genotypes from two putative grandparents and one putative grandchild. We developed estimators of false-positive and false-negative error rates and showed that genetic panels containing 500–700 single-nucleotide polymorphisms or 200–300 microhaplotypes are expected to allow application of this technique for monitoring segregated hatchery programs. We discuss the ease with which this technique can be implemented by pre-existing parentage-based tagging programs and provide an R package that applies the method.

Delomas, Thomas A. (ORCID:000000015154759X)↗

DanteR: an extensible R-based tool for quantitative analysis of -omics data

Motivation: The size and complex nature of LC-MS proteomics data sets motivates development of specialized software for statistical data analysis and exploration. We present DanteR, a graphical R package that features extensive statistical and diagnostic functions for quantitative proteomics data analysis, including normalization, imputation, hypothesis testing, interactive visualization and peptide-to-protein rollup. More importantly, users can easily extend the existing functionality by including their own algorithms under the Add-On tab. Availability: DanteR and its associated user guide are available for download at http://omics.pnl.gov/software/. For Windows, a single click automatically installs DanteR along with the R programming environment. For Linux and Mac OS X, users must first install R and then follow instructions on the DanteR web site for package installation.

Environmental Molecular Sciences Laboratory↗

R “SHINY” GUI DEVELOPMENT FOR URANIUM ISOTOPIC ANALYSIS WITH MATRIX-ASSISTED IONIZATION MASS SPECTROMETRY

The international nuclear safeguards community continues to seek rapid, accurate, and precise characterization capabilities for the in-field measurement of uranium isotopic compositions in nuclear facilities. Mass spectrometry (MS) is considered the “gold standard” for analysis of relatively long-lived actinides such as uranium (U) and plutonium; however, conventional MS analysis often requires time consuming sample preparation and complex analytical methodologies that are difficult to perform in-field or in-facility. Matrix assisted ionization (MAI) is a novel ambient ionization MS technique (i.e., MAI-MS) that potentially addresses these challenges due to the relative simplicity of the ionization phenomenon and ruggedness of ambient MS instrumentation. Savannah River National Laboratory (SRNL, USA) has demonstrated this technique for nanogram-level 235U/238U isotope ratio measurements within seconds, with percent-level analytical uncertainties capable of discriminating depleted, natural, and low-enriched uranium. Current experimental work on developing MAI methods for uranium isotopic analysis has been enabled by parallel development of a comprehensive MAI-MS data analysis suite at SRNL. Development of this bespoke data analysis software was necessary because commercially available ambient MS software is poorly suited for uranium isotope ratio measurement. The effort leverages the power of R, a popular open-source programming language, and Shiny, an R package providing tools for graphical user interface (GUI) and web interface coding. This software allows researchers without any programming experience to harness and utilize R’s considerable data analysis/visualization power.

LaBone, Elizabeth D.↗

Criterion validity of wrist accelerometry for assessing energy intake via the intake-balance technique

Background: Intake-balance assessments measure energy intake (EI) by summing energy expenditure (EE) with concurrent change in energy storage (ΔES). Prior work has not examined the validity of such calculations when EE is estimated via open-source techniques for research-grade accelerometry devices. The purpose of this study was to test the criterion validity of accelerometry-based intake-balance methods for a wrist-worn ActiGraph device. Methods: Healthy adults (n = 24) completed two 14-day measurement periods while wearing an ActiGraph accelerometer on the non-dominant wrist. During each period, criterion values of EI were determined based on ΔES measured by dual X-ray absorptiometry and EE measured by doubly labeled water. A total of 11 prediction methods were tested, 8 derived from the accelerometer and 3 from non-accelerometry methods (e.g., diet recall; included for comparison). Group-level validity was assessed through mean bias, while individual-level validity was assessed through mean absolute error, mean absolute percentage error, and Bland–Altman analysis. Results: Mean bias for the three best accelerometry-based methods ranged from -167 to 124 kcal/day, versus -104 to 134 kcal/day for the non-accelerometry-based methods. The same three accelerometry-based methods had mean absolute error of 323–362 kcal/day and mean absolute percentage error of 18.1-19.3%, versus 353–464 kcal/day and 19.5-24.4% for the non-accelerometry-based methods. All 11 methods demonstrated systematic bias in the Bland–Altman analysis. Conclusions: Accelerometry-based intake-balance methods have promise for advancing EI assessment, but ongoing refinement is necessary. We provide an R package to facilitate implementation and refinement of accelerometry-based methods in future research (see paulhibbing.com/IntakeBalance).

60 APPLIED LIFE SCIENCES↗