Learn R Programming

broadcast (version 0.1.7)

Broadcasted Array Operations Like 'NumPy'

Description

Implements efficient 'NumPy'-like broadcasted operations for atomic and recursive arrays. In the context of operations involving 2 (or more) arrays, “broadcasting” refers to efficiently recycling array dimensions, without making copies. Besides linking to 'Rcpp', 'broadcast' does not use any external libraries in any way; 'broadcast' was essentially made from scratch and can be installed out-of-the-box. The implementations available in 'broadcast' include, but are not limited to, the following. 1) Broadcasted element-wise operations on any 2 arrays; they support a large set of relational, arithmetic, Boolean, string, and bit-wise operations. 2) A faster, more memory efficient, and broadcasted abind-like function, for binding arrays along an arbitrary dimension. 3) Broadcasted ifelse-like and apply-like functions. 4) Casting functions, that cast subset-groups of an array to a new dimension, cast nested lists to dimensional lists, and vice-versa. 5) A few linear algebra functions for statistics. The functions in the 'broadcast' package strive to minimize computation time and memory usage (which is not just better for efficient computing, but also for the environment).

Copy Link

Version

Install

install.packages('broadcast')

Monthly Downloads

135

Version

0.1.7

License

MPL-2.0

Issues

Pull Requests

Stars

Forks

Maintainer

Tony Wilkes

Last Published

December 14th, 2025

Functions in broadcast (0.1.7)

bc.d

Broadcasted Decimal Numeric Operations
typecast

Atomic and List Type Casting With Names and Dimensions Preserved
cast_shallow2atomic

Cast Shallow List to Atomic Object
ndim

Get the Number of Dimensions of an Array
rep_dim

Replicate Array Dimensions
bc.raw

Broadcasted Operations that Take Raw Arrays and Return Raw Arrays
bc_strrep

Broadcasted strrep
bc_ifelse

Broadcasted Ifelse
cast_hier2dim

Cast Hierarchical List into Dimensional list
bc.rel

Broadcasted General Relational Operators
cast_dim2hier

Cast Dimensional List into Hierarchical List
dropnests

Drop Redundant List Nesting
vector2array

Turn Vector to Array and Vice-Versa
bc.str

Broadcasted String Operations
linear_algebra_stats

Simple Linear Algebra Functions for Statistics
bc_dim

Predict Broadcasted Dimensions
hier2dim

Helper Functions For cast_hier2dim
bc.cplx

Broadcasted Complex Numeric Operations
bc.bit

Broadcasted Bit-wise Operations
aaa00_broadcast_help

broadcast Package Overview
bc.i

Broadcasted Integer Numeric Operations with Extra Overflow Protection
bc.list

Broadcasted Operations for Recursive Arrays
aaa02_broadcast_casting

Details on Casting Functions
acast

Simple and Fast Casting/Pivoting of an Array
aaa01_broadcast_operators

Details on Broadcasted Operators
bc.b

Broadcasted Boolean Operations
bcapply

Apply Function to Pair of Arrays with Broadcasting
broadcaster

Check or Set if an Array is a Broadcaster
bind_array

Dimensional Binding of Arrays with Broadcasting
cast_dim2flat

Cast Dimensional List into a Flattened List