as.SurveyQuestion: Coerce to or Check If SurveyQuestion

Description Usage Arguments Details Value See Also

Description

Functions to check if an object is a valid SurveyQuestion, or coerce it if possible

Usage

1
2
3
4
5
6
as.SurveyQuestion(x, ...)

## S3 method for class 'data.frame'
as.SurveyQuestion(x, questionProperties)

is.SurveyQuestion(x)

Arguments

x

Data frame containing all of the columns described in SurveyQuestion to be coerced into a SurveyQuestion object or tested to determine if it is currently a SurveyQuestion object.

questionProperties

Data frame defining the properties of each question in the survey. See questionProperties for structure and details

Details

The coercion method, as.SurveyQuestion, is primary for internal use. It does not verify the appropriateness of the data provided, and malformed SurveyQuestion objects created in this manner will lead to errors if supplied to class methods. Creating SurveyQuestion objects direclty from file using loadSurveyMonkeyXLS is preferred, but refer to SurveyQuestion for structure detailes if manual construction is necessary.

The checking function, is.SurveyQuestion, verifies not only that the object's class contrains SurveyQuestion, but also that a questionProperties attribute is available (without verifying its structure).

Value

An object of class SurveyQuestion for as.SurveyQuestion . Logical for is.SurveyQuestion.

See Also

loadSurveyMonkeyXLS, SurveyQuestion, questionProperties


wmurphyrd/monkeywrangler documentation built on May 4, 2019, 9:46 a.m.