parent
428e1d2186
commit
9fe4a64ec8
|
@ -225,7 +225,7 @@ An atomic vector can not have a mix of different types because the type is a pro
|
|||
|
||||
### Test functions
|
||||
|
||||
Sometimes you want to do different things based on the type of vector. One option is to use `typeof()`. Another is to use a test function which returns a `TRUE` or `FALSE`. Base R provides many functions like `is.vector()` and `is.atomic()`, but they often returns surprising results. Instead, it's safer to use the `is_*` functions provided by purrr, which are summarised in the table below.
|
||||
Sometimes you want to do different things based on the type of vector. One option is to use `typeof()`. Another is to use a test function which returns a `TRUE` or `FALSE`. Base R provides many functions like `is.vector()` and `is.atomic()`, but they often return surprising results. Instead, it's safer to use the `is_*` functions provided by purrr, which are summarised in the table below.
|
||||
|
||||
| | lgl | int | dbl | chr | list |
|
||||
|------------------|-----|-----|-----|-----|------|
|
||||
|
|
Loading…
Reference in New Issue