| umx_tail | R Documentation |
Sort data on the column wag and keep the n most extreme rows.
what chooses which extreme:
high (default): the largest values, largest first.
low: the smallest values, smallest first.
both: rows from both ends. An odd n gives the extra row to the high end. The high end is printed first (largest first), then the low end (smallest first).
abs: the rows with the largest absolute deviation from the median of wag. wag must be numeric. Ties keep their original relative order.
Rows with NA in wag are left out of the ranking. The printed columns are face, in the order given, then wag if it is not already in face.
Printing goes through umx_print(): markdown by default, or a browser table when report = "html".
umx_tail(
data,
wag,
face,
report = c("markdown", "html"),
n = 6,
what = c("high", "low", "both", "abs")
)
data |
A data.frame. |
wag |
Column name to rank on. A single string. |
face |
Column names to display. A character vector. |
report |
|
n |
How many extreme rows to show. A single positive integer. Default is 6, the same as |
what |
Which extreme. One of |
The selected rows and columns, invisibly. A data.frame.
umx_print()
Other Miscellaneous Utility Functions:
install.OpenMx(),
libs(),
qm(),
umx,
umxLav2RAM(),
umxModelNames(),
umxRAM2Lav(),
umxVersion(),
umx_ICA_report(),
umx_array_shift(),
umx_data(),
umx_find_object(),
umx_lower.tri(),
umx_msg(),
umx_open_CRAN_page(),
umx_pad(),
umx_print(),
umx_wide2long(),
umx_wide4lmer()
data(mtcars)
umx_tail(mtcars, wag = "mpg", face = c("cyl", "hp"), n = 3, what = "high")
umx_tail(mtcars, wag = "mpg", face = c("cyl", "hp"), n = 4, what = "both")
## Not run:
umx_tail(mtcars, wag = "mpg", face = c("cyl", "hp"), n = 3, report = "html")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.