is.surveyor: Tests that object is of class surveyor object.

Description Usage Arguments Examples

Description

Tests that object is of class surveyor object.

Usage

1

Arguments

x

Object to be tested

Examples

1
2
3
4
5
6
7
library(surveydata)
sdata <- data.frame(Q1=c(11, 12), Q4_1 = c(1,2), Q4_2=c(3,4), Q4_3=c(5,6))
varlabels(sdata) <- c("Question 1", "Question 4: red", "Question 4: yellow", "Question 4: blue")
sdata <- as.surveydata(sdata, renameVarlabels=TRUE)
s <- as.surveyor(sdata, crossbreak=list(breaks=factor(c("aa", "bb"))), weight=c(1,1))
is.surveyor(s) # TRUE
is.surveyor("String") #FALSE

andrie/surveyor documentation built on May 10, 2019, 11:21 a.m.