crop_matix_to_square: Crop Matrix to Square

View source: R/func_crop_matrix_to_sqaure.R

crop_matix_to_squareR Documentation

Crop Matrix to Square

Description

Crop a matrix to size. Discards a border around the trim_size, preserving the center of the matrix
If mymatrix is smaller than the trim_size, mymatrix will be padded with pad

Only supports matrices that both dimentions are to be cropped or padded. will not crop one dimention and pad the other

Usage

crop_matix_to_square(mymatrix, trim_size = 100, pad = 0)

Arguments

mymatrix

matrix to be cropped

trim_size

dimentions to crop matrix

pad

if matrix is to be padded

Author(s)

W S Drysdale


willdrysdale/wsdmiscr documentation built on Aug. 26, 2023, 12:31 a.m.