circle_matrix: Print numbers in circle

Description Usage Arguments Details Value Examples

View source: R/map_matrix.R

Description

This function helps to create a n*m matrix with ascending numbers printed in circle.

Usage

1
circle_matrix(max_row, max_col)

Arguments

max_row

Maximum rows of the matrix

max_col

Maximum columns of the matrix

Details

Steven received an interview question: “how to create a matrix in circle?” Steven failed to answer this question during the interview, but he created a package once he got back to home. Users need to specify the dimension (n*m) of the matrix, and the function will print out a n*m matrix and automatically fill in ascending numbers in circle.

Value

A matrix with ascending numbers in circle

Examples

1
2

zj2213/mapMatrix documentation built on Jan. 3, 2021, 12:39 a.m.