Learn R Programming

dexter (version 0.8.5)

start_new_project: Start a new project

Description

Imports a complete set of scoring rules and starts a new project (data base)

Usage

start_new_project(rules, db = "dexter.db", person_properties = NULL,
  covariates = person_properties)

Arguments

rules

A data frame with columns item_id, response, and item_score. The order is not important but spelling is. Any other columns will be ignored.

db

A connection to an existing sqlite database or a string specifying a filename for a new sqlite database to be created. If this name does not contain a path, the file will be created in the work directory. Any existing file with the same name will be overwritten. For an in-memory database you can use the string ":memory:".

person_properties

An optional list of person properties. Names should correspond to person_properties intended to be used in the project. Values are used as default (missing) values. The datatype will also be inferred from the values. Known person_properties will be automatically imported when adding response data with add_booklet.

covariates

Deprecated alias for person_properties.

Value

If the scoring rules pass a sanity check, a handle to the data base.

Details

This package only works with closed items (e.g. likert, MC or possibly short answer) it does not score any open items. The first step to creating a project is to import an exhaustive list of all items and all admissible responses, along with the score that any of the latter will be given. Responses may be integers or strings but they will always be treated as strings. Scores must be integers, and the minimum score for an item must be 0. When inputting data, all responses not specified in the rules can optionally be treated as missing and ultimately scored 0, but it is good style to include the missing responses in the list. NA values will be treated as the string "NA"'.

Examples

Run this code
# NOT RUN {
head(verbAggrRules)
db = start_new_project(verbAggrRules, "verbAggression.db", 
                       person_properties = list(gender = "unknown"))
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab