List and Dataframe in R

List in R:

A list is a series of items bundled together to form a single object. In the following example the grass data you met previously has been made into a list:

> grass.l
$mow
[1] 12 15 17 11 15
$unmow
[1] 8 9 7 9

When you look at it you see each vector listed separately along with its name, which is prefixed with a dollar sign. This example list is very simple and contains only two vectors. A list could be constructed from objects of various sorts.

Dataframe in R:

A data frame is a two-dimensional object, that is, it has rows and columns. R treats the columns as separate samples or variables, and the rows represent the replicates or observations. All data frames are rectangular and R will pad out any “short” columns using NA.

Here is a simple example that you met previously. There are two columns; one represents a sample called mow and contains five replicates/observations. The second column is called unmow and contains four observations:

> grass
mow unmow
1 12 8
2 15 9
3 17 7
4 11 9
5 15 NA

Where Each column can be a separate type of data