citation.counts {tempR}R Documentation

Counts TCATA Citations and Observations for a Product and a Comparison Set

Description

Calculates how many times a specified product was checked and how many times a comparison set was checked. The number of evaluations for the product and comparison set are also calculated, along with a reference and decluttering matrix for plotting in tcata.line.plot.

Usage

citation.counts(x, product.name = "", product.col = 1,
attribute.col = 2, results.col = NULL, comparison = "average")

Arguments

x

matrix of TCATA 0/1 data with (Assessors x Products x Reps x Attributes) in rows with row headers and (Times) in columns

product.name

name of the product for which to calculate how many times a product was checked and not checked

product.col

index of column in x that contains the product identities

attribute.col

index of column in x that contains the attribute identities

results.col

indices of columns in x that contain the raw (0/1) data

comparison

specifies whether the comparison will be with the average of all products ("average" (default)) or with the average of the other products ("other", i.e. excludes the product specified by product.name)

Value

list object with three elements:

References

Castura, J.C., AntĂșnez, L., GimĂ©nez, A., Ares, G. (2016). Temporal check-all-that-apply (TCATA): A novel temporal sensory method for characterizing products. Food Quality and Preference, 47, 79-90. doi:10.1016/j.foodqual.2015.06.017

Meyners, M., Castura, J.C. (2018). The analysis of temporal check-all-that-apply (TCATA) data. Food Quality and Preference, 67, 67-76. doi:10.1016/j.foodqual.2017.02.003

See Also

tcata.line.plot, get.decluttered

Examples

# example using 'ojtcata' data set
data(ojtcata)

# comparison of Orange Juice 3 vs. all other OJs (1, 2, 4, 5, 6)
oj3.v.other <- citation.counts(ojtcata, product.name = "3", product.col = 2,
       attribute.col = 4, results.col = 5:25, comparison = "other")

# show results
oj3.v.other

times <- get.times(colnames(ojtcata)[-c(1:4)])
attributes <- unique(ojtcata$attribute)
palettes <- make.palettes(length(attributes))

# plot results
tcata.line.plot(oj3.v.other$P1, n = oj3.v.other$Pn,
   attributes = attributes, times = times,
   line.col = palettes$pal, reference = oj3.v.other$ref, ref.lty = 3,
   declutter = oj3.v.other$declutter, highlight = TRUE, highlight.lwd = 4,
   highlight.col = palettes$pal.light,
   height = 7, width = 11, legend.cex = 0.7, main = "Product 3 vs. Other Products")

[Package tempR version 0.10.1.1 Index]