Learn R Programming

Simulate real and complex numbers from distributions of their magnitude and arguments. Optionally, the magnitudes and/or arguments may be fixed in almost arbitrary ways. Plot density and distribution functions with automatic selection of suitable regions. Small programming utilities: check if an object is identical to NA, count positional arguments in a call, set intersection of more than two sets, check if an argument is unnamed, compute the graph of S4 classes in packages.

Installing gbutils

The latest stable version is on CRAN.

install.packages("gbutils")

You can install the development version of gbutils from Github:

remotes::install_github("GeoBosh/gbutils")

Overview

Package gbutils is a collection of (mostly small) functions used interactively or in packages.

Numeric computations

  • sim_numbers(), sim_complex(), sim_real() - Simulate real or complex numbers from (possibly partial) polar form specifications.

  • cdf2quantile() - Compute quantiles from a given distribution function.

  • pseudoInverse() - Compute pseudo-inverse matrices.

  • rpoly() - create polynomials with real coefficients from zeroes (roots) given in Cartesian or polar form.

Graphics

  • plotpdf() - Plot functions with automatic determination of the "interesting" region (typically probability density and distribution functions)

S4 classes

  • adjacencyOfClasses() - Create inheritance graphs of S4 classes defined in one or more packages.

Programming utilities

  • isNA() - Is an object NA?

  • isargunnamed() - Is an element of a list named?

  • missing_arg() - Is an element of a pairlist missing?

  • parse_text() - Parse expressions.

  • nposargs() - Count the number of positional arguments used in a call.

  • shiftleft() shiftright() - Rotate vectors.

Other

  • mintersect() - Set intersection of arbitrary number of arguments.

  • myouter() - Outer product using a non-vectorised function.

  • raw_history() Get the command history in a character vector.

Copy Link

Version

Install

install.packages('gbutils')

Monthly Downloads

16,764

Version

0.5.1

License

GPL (>= 2)

Maintainer

Georgi Boshnakov

Last Published

December 18th, 2025

Functions in gbutils (0.5.1)

isargunnamed

Is an element of a list named?
rpoly

Polynomials with real coefficients
mintersect

Set intersection of arbitrary number of arguments
missing_arg

Check if an element of a pairlist is missing
objectPad-class

Class "objectPad" objects and methods to store and retrieve information
raw_history

Get the command history
myouter

Functions for some basic operations
pseudoInverse

Compute a pseudo-inverse matrix
parse_text

Parse expressions residing in character vectors
sim_complex

Simulate real or complex numbers using polar form
plotpdf

Plot a probability denstity function
sim_numbers

Simulation based on polar form specifications
nposargs

Function to count the number of positional arguments used in a call
cdf2quantile

Calculate a quantile from a distribution function
pad-methods

Store and get data in pad objects
isNA

Check if an object is NA
adjacencyOfClasses

Adjacency graph of classes in packages