Learn R Programming

inlmisc

Description

The R package inlmisc is a collection of functions for creating high-level graphics, performing raster-based analysis, processing MODFLOW-based models, selecting subsets using a genetic algorithm, creating interactive web maps, accessing color palettes, etc. Used to support packages and scripts written by researchers at the U.S. Geological Survey (USGS) Idaho National Laboratory (INL) Project Office.

Installation

The current release is available on CRAN, which you can install using the following command:

install.packages("inlmisc", dependencies = TRUE)

A recent version of Pandoc (>= 1.12.3) is also required to run particular examples in the help documentation—RStudio includes this so you do not need to download Pandoc if working in a RStudio IDE. The webshot package is imported from and has as a dependency the external program PhantomJS, which may be installed using the command:

webshot::install_phantomjs()

For creating word clouds, the OptiPNG program is recommended and needs to be accessible through the command window. Finally, to install the development version of inlmisc, you need to clone the repository and build from source, or run:

if (!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("USGS-R/inlmisc", dependencies = TRUE)

Usage

Examples are given in the package help pages. To access this documentation, run:

library("inlmisc")
help(package = "inlmisc")

Author

Jason C. Fisher (ORCID iD 0000-0001-9032-8912)

Point of Contact

Jason C. Fisher (jfisher@usgs.gov)

Suggested Citation

To cite inlmisc in publications, please use:

Fisher, J.C., 2020, inlmisc—Miscellaneous functions for the U.S. Geological Survey Idaho National Laboratory Project Office: U.S. Geological Survey software release, R package, Reston, Va.

Contributing

We welcome your contributions and suggestions for how to make these materials more useful to the community. Please feel free to comment on the issue tracker or open a merge request to contribute.

Code of Conduct

All contributions to- and interactions surrounding- this project will abide by the USGS Code of Scientific Conduct.

Disclaimer

This software is preliminary or provisional and is subject to revision. It is being provided to meet the need for timely best science. The software has not received final approval by the U.S. Geological Survey (USGS). No warranty, expressed or implied, is made by the USGS or the U.S. Government as to the functionality of the software and related material nor shall the fact of release constitute any such warranty. The software is provided on the condition that neither the USGS nor the U.S. Government shall be held liable for any damages resulting from the authorized or unauthorized use of the software.

Any use of trade, product, or firm names is for descriptive purposes only and does not imply endorsement by the U.S. Government.

License

Unless otherwise noted, this project is in the public domain in the United States because it contains materials that originally came from the United States Geological Survey, an agency of the United States Department of Interior. For more information, see the official USGS copyright policy at copyrights-and-credits.

Additionally, we waive copyright and related rights in the work worldwide through the CC0 1.0 Universal public domain dedication.

CC0 1.0 Universal Summary

This is a human-readable summary of the Legal Code (read the full text).

No Copyright

The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.

You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Other Information

In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights.

Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. When using or citing the work, you should not imply endorsement by the author or the affirmer.

Support

The Idaho National Laboratory Project Office of the USGS supports the development and maintenance of inlpubs. Resources are available primarily for maintenance and responding to user questions. Priorities on the development of new features are determined by the development team.

Copy Link

Version

Install

install.packages('inlmisc')

Monthly Downloads

328

Version

0.5.5

License

CC0

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

January 24th, 2022

Functions in inlmisc (0.5.5)

AddGradientLegend

Add Color Gradient Legend to Plot
AddNorthArrow

Add North Arrow to Plot
AddColorKey

Add Color Key to Plot
BumpDisconnectCells

Adjust Vertically Disconnected Cells
AddInsetMap

Add Inset Map to Plot
AddPoints

Add Points to Plot
AddIntervals

Add Interval Symbols to Plot
BuildVignettes

Build Package Vignettes
AddScaleBar

Add Scale Bar to Plot
AddWebMapElements

Add Elements to Web Map
BumpRiverStage

Adjust Implausible River Stage
CreateWebMap

Create a Web Map Using TNM Services
GetRegionOfInterest

Get Region of Interest
RecreateLibrary

Recreate R Library
GetColors

Get Palette Colors
Grid2Polygons

Convert Spatial Grids to Polygons
ReplaceInTemplate

Replace Values in a Template Text
ExportRasterStack

Export a Raster Stack
GetDaysInMonth

Get Number of Days in a Year and Month
ExtractAlongTransect

Extract Raster Values Along a Transect Line
GetInsetLocation

Get Location for Inset in Plot
PrintPackageHelp

Print Package Help Documentation
MakeWordCloud

Create a Word Cloud from a Frequency Table of Words
PrintTable

Print as LaTeX Table
POSIXct2Character

Convert from POSIXct to Character
ReadCodeChunks

Read Knitr Code Chunks
PlotCrossSection

Plot Cross Section
PlotGraph

Plot Graph
ReadModflowBinary

Read MODFLOW Binary File
SummariseBudget

Summarize MODFLOW Water Budget
SetPolygons

Overlay Multi-Polygon Objects
ToScientific

Format for Scientific Notation
usgs_article

USGS Article Format
EncodeChromosome

Encode and Decode an Integer Chromosome
FindOptimalSubset

Find Optimal Subset Using a GA
inlmisc-deprecated

Deprecated Functions in the inlmisc Package
SetHinge

Set Hinge Location in Color Palette
RmSmallCellChunks

Remove Small Cell Chunks
IsColor

Check whether a character string is a valid color specification.
FindPolyNodes

Find Polygon Nodes
IsPackageInstalled

Check whether Package is Installed
PlotMap

Plot Map
PrintFigure

Print as LaTeX Figure
FormatPval

Format P Values