df4kbd: Produces a data.frame from the keyboard.

Description Usage Arguments Details Value Examples

View source: R/rbsa4.code.r

Description

This function issues repeatedly a series of questions onto the screen and from the answers builds a data.frame.

Usage

1
2
 
  df4kbd(def) 

Arguments

def

A named list describing the different variables of the data frame to produce. Its names give the names of the variables. Each component of def are the list of arguments to provide to function inquiry to get the values for each individual. More precisely question which is compulsory, help (default NULL), a7type (compulsory either numeric or character), a7possibilities (default NULL).

Details

Questions are proposed with the function inquiry. Activating the 'stop' in any of the questions is interpreted as the end of the data capture.

Value

The resulting data frame, possibly with zero row when no individual was correctly recorded.

Examples

1
2
3
4
5
 
  nom <- list(question="The name?",a7type="character"); 
  edad <- list(question="How old?",a7type="numeric"); 
  defi <- list(NAME=nom,AGE=edad); 
  ## Not run: df4kbd(defi) 

rbsa documentation built on May 31, 2017, 4:29 a.m.