Description Usage Arguments Value Examples
A surveyor object describes the data and meta-data in the survey that will be analysed by the analysis and reporting functions in the surveyor package.
1 2 | as.surveyor(sdata, crossbreak = sdata$crossbreak,
weight = sdata$weight, defaults = surveyorDefaults())
|
sdata |
surveydata object. See also
|
crossbreak |
List of named factors that contain
crossbreak data. Each factor must have the same length as
the columns in the |
weight |
Numeric vector with weighting data. Must
have the same length as the columns in the
|
defaults |
Surveyor defaults. See also
|
A list object of class surveyor
:
surveydata object. See also
as.surveydata
1 2 3 4 5 6 | library(surveydata)
sdata <- data.frame(Q1=c(11, 12), Q4_1 = c(1,2), Q4_2=c(3,4), Q4_3=c(5,6))
qtext <- c("Question 1", "Question 4: red", "Question 4: yellow", "Question 4: blue")
varlabels(sdata) <- qtext
sdata <- as.surveydata(sdata, renameVarlabels=TRUE)
s <- as.surveyor(sdata, crossbreak=list(breaks=factor(c("aa", "bb"))), weight=c(1,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.