Learn R Programming

rtemis (version 1.4.3)

rnormmat: Random Normal Matrix

Description

Create a matrix or data frame of defined dimensions, whose columns are random normal vectors

Usage

rnormmat(
  nrow = 10,
  ncol = 10,
  mean = 0,
  sd = 1,
  return_df = FALSE,
  seed = NULL
)

Value

matrix or data.frame.

Arguments

nrow

Integer: Number of rows.

ncol

Integer: Number of columns.

mean

Float: Mean.

sd

Float: Standard deviation.

return_df

Logical: If TRUE, return data.frame, otherwise matrix.

seed

Integer: Set seed for rnorm.

Author

EDG

Examples

Run this code
x <- rnormmat(20, 5, mean = 12, sd = 6, return_df = TRUE, seed = 2026)
x

Run the code above in your browser using DataLab