tcata.diff.plot {tempR} | R Documentation |
TCATA difference plot
Description
Plots TCATA difference curves.
Usage
tcata.diff.plot(x1 = x1, x2 = NA, n1 = 1, n2 = NA,
attributes = c(), times = c(), lwd = 1,
declutter = NA, get.decluttered = FALSE, emphasis = NA, alpha = 0.05, emphasis.lwd = 3,
main = "", height = 8, width = 12,
xlab = "Time", ylab = "Difference in citation proportion",
axes.font = 1, axes.cex = 1, line.col = c(), x.increment = 5,
legend.cex = 1, legend.font = 1, save.as = "")
Arguments
x1 |
matrix of difference proportions, or of counts if |
x2 |
matrix of proportions for second sample, or of counts if |
n1 |
number of observations for first sample |
n2 |
number of observations for second sample |
attributes |
vector of attribute labels for row in |
times |
vector of times for columns in |
lwd |
Line width |
declutter |
indicator matrix with same dimensions of |
get.decluttered |
if |
emphasis |
set to |
alpha |
significance level for entrywise test of |
emphasis.lwd |
line weight for emphasizing significant differences |
main |
plot title; see |
height |
plot height |
width |
plot width |
xlab |
label for x axis |
ylab |
label for y axis |
axes.font |
Font for axes labels; see |
axes.cex |
Size for axes labels. |
line.col |
line color for attribute lines |
x.increment |
increment between time labels on x axis |
legend.cex |
symbol size for legend |
legend.font |
Font for the legend; see |
save.as |
Filename to use if file will be saved. |
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
Examples
# difference between High and Low ethanol wines (sip 1)
x.diff.raw <- t(syrah[seq(1, 1026, by = 6), -c(1:4)]) -
t(syrah[seq(3, 1026, by = 6), -c(1:4)])
x.diff.smooth <- get.smooth(x.diff.raw, low.bound = -1, up.bound = 1)
colnames(x.diff.smooth) <- colnames(x.diff.raw) <- times <- 10:180
tcata.diff.plot(x1 = x.diff.smooth, attributes = rownames(x.diff.smooth), times = times, lwd = 2,
main = "Sip 1 differences: High-ethanol wine - Low-ethanol wine")
# an example based on the syrah data set (truncated for efficiency)
n <- 52
H1 <- t(syrah[seq(1, 126, by = 6), -c(1:4)] * n)
L1 <- t(syrah[seq(3, 126, by = 6), -c(1:4)] * n)
colnames(H1) <- colnames(L1) <- times <- 10:30
tcata.diff.plot(x1 = H1, x2 = L1, n1 = n, n2 = n,
attributes = rownames(H1), get.decluttered = TRUE, lwd = 2)