Search notes:

R: data frames

An R data frame roughly corresonds to a SAS (or SPSS) data set.
A data frame is stored as a list of vectors, factors and/or matrices each of which has the same length (i. e. tabular data)

Dimensions

The dimensions of a data frame can be queried with nrow() and length().
nrow() returns the number of observations (or rows or records).
length() returns the number of columns.
df <- data.frame (
  val_1 = c('foo', 'bar', 'baz'),
  val_1 = c(   1 ,    2 ,    3 )
)

nrow  (df) # 3
length(df) # 2
Github repository about-r, path: /data-structures/data-frame/nrow-length.R

Class, type and mode

A data.frame's class is data.frame; typeof() and mode() return list.
df <- data.frame (
  val_1 = c('foo', 'bar', 'baz'),
  val_1 = c(   1 ,    2 ,    3 )
)

class (df) # data.frame
typeof(df) # list
mode  (df) # list
Github repository about-r, path: /data-structures/data-frame/class-typeof-mode.R

Functions to create data frames

Some functions to create data frames and values to it are (TO BE COMPLETED):

See also

data.frame(…), read.table(…)
Tibbles are data frames that are tweaked to work better in the tidyverse.
dplyr provides SQL like access to data frames.
The package sqldf allows to manipulate data frames with SQL.
The data or content stored in a dataframe might be visually inspected with the View() or DT::datatable() functions.
Data frames vs matrices
The (Python) pandas DataFrame.
The DBI function dbWriteTable can be used to write a data frame into a database.

Index