simulate_dataframe: Simulate data frames with missing values

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Simulate a data frame representing a questionnaire randomly generated with n observation on a survey with questions including missing values. The aim of this data is to test the methods of dfexplore package based on different kind of data but should be used

Usage

1
2
simulate_dataframe(nsubjects = 100, nquestions = 10, 
                  includeMatrix = FALSE)

Arguments

nsubjects

integer - number of subjects in the data frame

nquestions

integer - number of questions in the data frame

includeMatrix

boolean - does the answer of the questions should be included as a matrix in the final data frame (see details)

Details

Data frames may have components matrices components. This is unusual, but technically allowed and necessary in some cases. Methods of dfexplore package have to deal with this.

Value

A data.frame wih nquestions + 8 columns and nsubjects observations with various data classes. It should countain a matrix component if includeMatrix = TRUE.

Author(s)

Joris Muller

See Also

There is already some simulated data frames included as example_df

Examples

1
2
3
simulated <- simulate_dataframe(nsubjects=200)
str(simulated)
dfplot(simulated)

jomuller/dfexplore documentation built on May 19, 2019, 7:26 p.m.