inspect_list | R Documentation |
A useful function for exploratory work or when coding. Takes a list as an argument and prints a glimpse of the data contained in each list element and the dimensions of each list element. If the list contains more than 5 list elements, only the first 5 elements are printed to console with no warning. The function will print a maximum of 10 values if the list element is a vector and 10 rows and 5 columns if the list element is a matrix.
inspect_list(x)
x |
A list of vectors or matrices |
NOTE: There are currently no checks built in to handle a list of lists. In this case, everything in the sublists will be printed with no checks or warnings.
x <- list(
matrix(runif(100), nrow = 20, ncol = 5),
matrix(runif(100), nrow = 10, ncol = 10)
)
inspect_list(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.