is_list | R Documentation |
This function checks if a value is a list.
By default, definition of a 'list' excludes data.frames in spite of them technically being lists.
This behaviour can be changed by setting include_dataframes = TRUE
is_list(x, include_dataframes = FALSE)
x |
A value to check. |
include_dataframes |
A logical indicating whether data_frames should be considered vectors. Default is |
A logical scalar indicating whether x
is a list.
if(interactive()){
is_list(list(1, 2)) # TRUE
is_list(c(1, 2, 3)) # FALSE
is_list(data.frame()) # FALSE
is_list(data.frame(), include_dataframes = TRUE) # TRUE
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.