Description Usage Arguments Value Examples
View source: R/genSampleData.R
Generate example data for package cdbk. The resulting data
frame have variables that are numeric, character, factor, and integer
with and without missing data (NA
s).
1 | genSampleData(n = 20, k = 5, pna = 0.1)
|
n |
numeric, number of rows in the resulting data frame |
k |
numeric, number of distinct categories in some of the variables |
pna |
numeric, probability of |
Data frame with columns:
numeric variable
character variable
factor variable
integer variable
numeric variable with missing values
character variable with missing values
factor variable with missing values
integer variable with missing values
1 2 3 | set.seed(1234)
d <- genSampleData()
str(d)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.