squeeze: Remove empty dimensions from an array

Description Usage Arguments Examples

View source: R/cimg_class.R

Description

Works just like Matlab's squeeze function: if anything in dim(x) equals one the corresponding dimension is removed

Usage

1

Arguments

x

an array

Examples

1
2
A <- array(1:9,c(3,1,3)) #3D array with one flat dimension
A %>% squeeze #flat dimension removed

imager documentation built on May 19, 2017, 7:04 p.m.

Search within the imager package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.