concept different type in category R

appears as: Different types, different type, different types
Beyond Spreadsheets with R

This is an excerpt from Manning's book Beyond Spreadsheets with R.

  • Different types of data require different treatments.
  • The spreadsheet equivalent of a vector is a selection of one or more cells. Usually these are all in the same row or column and can be referred to with a range, for example A1:A8. Spreadsheet software will also typically warn you if values in a column of a table are of different types, though it will allow them (and pretend to work with them). An example of selecting a group of values in a spreadsheet is shown in figure 5.1.

    my_tbl <- as.tibble( 
      list(    #2  
        x = 1:3,    #3  
        y = list(    #4  
          letters,    #5  
          TRUE,    #6  
          mtcars    #7  
        )
      )
    )
    
    #2   It contains a list of lists (a list of columns, some of which may themselves be lists).
    #3   The first column is a sequence from 1 to 3.
    #4   The second column is a list-column containing different types.
    #5   A character vector of length 26
    #6   A logical vector of length 1
    #7   The mtcars dataset (a data.frame)