View source: R/repgrid-basicops.r
addAvgElement | R Documentation |
A new element is added to the grid. The scores are the arithmetic means across all selected elements.
addAvgElement(x, name = "avg", i, digits = Inf)
x |
A |
name |
Name of new element. |
i |
Indexes of elements to be averaged across. Negative indexes can be used to exclude elements from the complete set. Duplicate indexes are allowed but a warning is issued. |
digits |
Digits to round mean value to. By default no rounding is used
( |
A repgrid
object with additional new element.
addAvgElement(feixas2004, "others", i = 2:12)
addAvgElement(feixas2004, "others", i = 2:12, digits = 0) # integers
# exluding elements via negative indexes
addAvgElement(feixas2004, "others", i = c(-1, -13))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.