citation.counts | R Documentation |
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
.
citation.counts(x, product.name = "", product.col = 1,
attribute.col = 2, results.col = NULL, comparison = "average")
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 |
attribute.col |
index of column in |
results.col |
indices of columns in |
comparison |
specifies whether the comparison will be with the average of all products ( |
list object with three elements:
P1
matrix of counts for product specified by product.name
(attributes are in rows; times are in columns).
Pn
number of observations for product.name
C1
matrix of counts for comparison set specified by comparison
(dimensions equal to P1
.
Cn
number of observations for the comparison set defined by comparison
ref
a matrix of citation proportions for the comparison set specified
by comparison
(dimensions equal to P1
; can be used to draw a reference line;
see tcata.line.plot
declutter
a matrix for decluttering in a line plot
(dimensions equal to P1
; see get.decluttered
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. \Sexpr[results=rd]{tools:::Rd_expr_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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.foodqual.2017.02.003")}
tcata.line.plot
, get.decluttered
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.