what does <dbl> in R stand for?

printing a tibble in R outputs the content in rows and columns.

> my_data <- as_tibble(iris)
> my_data
# A tibble: 150 x 5
   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
          <dbl>       <dbl>        <dbl>       <dbl> <fct>  
 1          5.1         3.5          1.4         0.2 setosa 
 2          4.9         3            1.4         0.2 setosa 
 3          4.7         3.2          1.3         0.2 setosa 

there are some abbreviations beneath column names, like <dbl>, <fct>.

it seems that <fct> stands for "factor".

what does <dbl>stand for?

dbl stands for double class. A double-precision floating point number.


It is a data type defined to hold numeric values with decimal points (dbl came from double). The alternative, integer, is defined for integer numbers.
Not so relevant nowadays for most situations (and most numeric values can be treated as double, even if integers), but in the past there could a big difference in performance and memmory use depending on wich type was choosen.


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.