Learn R Programming

kazaam (version 0.1-0)

ranshaq: ranshaq

Description

Generate a random shaq object.

Usage

ranshaq(generator, nrows, ncols, local = FALSE, ...)

Arguments

generator

A function, such as runif() or rnorm() (passed without parens). See examples for a demonstration of usage.

nrows, ncols

The number of rows

local

Is the problem size nrows*ncols specifying the local or global problem size?

...

Additional arguments passed to the generator.

Value

A shaq.

Communication

The operation is entirely local.

Examples

Run this code

library(kazaam)

# a 10x3 shaq with random uniform data
x = ranshaq(runif, 10, 3)
x

# a (comm.size() * 10)x3 shaq with random normal data
y = ranshaq(rnorm, 10, 3, local=TRUE)
y

finalize()


Run the code above in your browser using DataLab