ones: Create an array of ones or zeros

Description Usage Arguments Value See Also Examples

Description

Easy interface for creating an array of supplied dimension of ones and zeros. Simply a wrapper for array. Built for convinienece and not speed.

Usage

1
2
3

Arguments

...

A vector or list of integers giving the dimension of the array. A dimnames argument can be supplied.

Value

Returns an array, matrix, or vector of the dimension specified by the arguments.

See Also

array

Examples

1
2
3
4
5
6
7
ones(6)
ones(3,5)
ones(c(2,3,3))
ones(3,3,3, dimnames=list(LETTERS[1:3], letters[1:3], LETTERS[4:6]))
zeros(4, 3)
zeros(list(5, 3, 2))
zeros(c(3, 4), dimnames=list(LETTERS[1:3], letters[9:12]))

AEBilgrau/Bmisc documentation built on May 5, 2019, 11:28 a.m.