You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* For example, if all of this data was collected in the same year and we wanted to add that year as a column in our data frame we could do it like this
* So, that's the basic idea behind how vectors and data frames are related and how to convert between them.
131
146
* A data frame is a set of equal length vectors
132
147
* We can extract a column of a data frame into a vector using either `$` or two sets of `[]`
133
148
* We can combine vectors into data frames using the `data.frame` function, which takes a series of arguments, one vector for each column we want to create in the data frame.
134
-
135
-
136
-
> Do [Building data frames from vectors]({{ site.baseurl }}/exercises/building-data-frames-from-vectors-R/).
* Looking at the `combined` table, we can see that on every row with a particular value for `species_id` the join has added the matching values on`genus`, `species`, and `taxa`
67
-
*So one way to think about this join is that it adds the relevant information in the `species` table to the `surveys` table
66
+
* Looking at the `combined` table, we can see that on every row with a particular value for `species_id` the join has added the matching values for`genus`, `species`, and `taxa`
67
+
*One way to think about this join is that it adds the relevant information in the `species` table to the `surveys` table
68
68
* Often for scientific data we can think about there being one main table, the `surveys` table in our case, and multiple supplementary tables that provide additional details
69
69
70
70
* Inner joins keep information from both tables when both tables have a matching value in the join column
0 commit comments