dgirtin-class.Rd
summary(object, ...) # S4 method for dgirtIn summary(object, ...) print(x, ...) # S4 method for dgirtIn print(x, ...) get_item_names(x) # S4 method for dgirtIn get_item_names(x) get_n(x, by = NULL, aggregate_name = NULL) # S4 method for dgirtIn get_n(x, by = NULL, aggregate_name = NULL) get_item_n(x, by = NULL, aggregate_data = FALSE) # S4 method for dgirtIn get_item_n(x, by = NULL, aggregate_data = FALSE) # S4 method for dgirtIn show(object)
object | An object of class |
---|---|
... | Unused. |
x | An object of class |
by | The name of a grouping variable. |
aggregate_name | If specified |
aggregate_data | If specified |
A list of item names.
data(toy_dgirt_in) get_item_names(toy_dgirt_in)#> $item_data #> [1] "affirmative_action" "gaymarriage_amendment" #> #> $aggregate_data #> NULL #>get_n(toy_dgirt_in)#> n #> 1: 2526get_n(toy_dgirt_in, by = "year")#> year n #> 1: 2009 524 #> 2: 2010 2002get_n(toy_dgirt_in, by = "source")#> source n #> 1: CCES_2009 524 #> 2: CCES_2010 2002get_item_n(toy_dgirt_in)#> affirmative_action gaymarriage_amendment #> 1: 2522 1994get_item_n(toy_dgirt_in, by = "year")#> year affirmative_action gaymarriage_amendment #> 1: 2009 524 0 #> 2: 2010 1998 1994data(toy_dgirt_in) get_item_names(toy_dgirt_in)#> $item_data #> [1] "affirmative_action" "gaymarriage_amendment" #> #> $aggregate_data #> NULL #># respondent count data(toy_dgirt_in) get_n(toy_dgirt_in)#> n #> 1: 2526# respondent count by year get_n(toy_dgirt_in, by = "year")#> year n #> 1: 2009 524 #> 2: 2010 2002# respondent count by year and survey identifier get_n(toy_dgirt_in, by = c("year", "source"))#> year source n #> 1: 2009 CCES_2009 524 #> 2: 2010 CCES_2010 2002data(toy_dgirt_in) get_item_n(toy_dgirt_in)#> affirmative_action gaymarriage_amendment #> 1: 2522 1994get_item_n(toy_dgirt_in, by = "year")#> year affirmative_action gaymarriage_amendment #> 1: 2009 524 0 #> 2: 2010 1998 1994