as.surveyorStats: Creates surveyorStats object, used as input to plot.

Description Usage Arguments Value See Also

Description

A surveyorStats object contains all of the summarised information necessary to create a plot. This is the input data for as.surveyorPlot.

Usage

1
2
3
4
5
  as.surveyorStats(data, surveyorCode,
    ylabel = "Fraction of respondents",
    formatter = "formatPercent", nquestion = NULL,
    scale_breaks = NULL, stats_method = "",
    plotFunction = "", ...)

Arguments

data

A data frame

surveyorCode

A surveyorCode object

ylabel

Character string to print as plot y label

formatter

Name of a formatting function

nquestion

Number of identifiable questions / responses, used for plot sizing downstream

scale_breaks

Vector that specifies breaks in ggplot

stats_method

Character. Ddescription of calling statsFunction name - for audit trail

plotFunction

Character. Description of plotFunction to use

...

Ignored

Value

A surveyorStats object. This is a list of:

data

A data frame containing the summarized data

surveyorDefaults

A list with surveyorDefaults

plotTitle

The plot title to display

qid

Question id

ylabel

Plot y-axis label

formatter

Formatting function to use

nquestion

Number of subquestions. Used to determine vertical size of plot

scale_breaks

Scale breaks

stats_method

stats function - used for audit trail

plotFunction

plot function to use. See also plotGuess

qtype

Question type, as returned by qType

See Also

as.surveyorPlot, statsGuess

surveyPlot to plot a surveyor object


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