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
These traits are not time series, each of the ~500 genotypes is associated with a single value for each trait. This is different from the time series of LAI that we saw in the previous exercise or the biomass data that we will look at below.
However, with almost 200k rows it currently takes 40 minutes to query (this is a limitation of the API). For the purposes of this tutorial, we will use a cached copy of the dataset.
241
241
242
242
243
-
```{r}
244
-
#load('data/sorghum_height.RData')
243
+
```{r 10-sim-sorg-plot, message = FALSE}
244
+
load('traits/sorghum_height.RData')
245
245
246
246
s <- sorghum_height %>%
247
247
mutate(day = lubridate::yday(raw_date),
@@ -267,7 +267,7 @@ Now lets look at a 'pairs' plot to see if there is any covariance among the trai
267
267
268
268
First, lets rearrange the data from 'long' to 'wide' format. We will also take this chance to rename the 'cultivar' field to 'genotype'.
269
269
270
-
```{r}
270
+
```{r 10_traits_wide, echo = TRUE}
271
271
272
272
traits_wide <- traits %>%
273
273
select(genotype = cultivar, trait, mean) %>%
@@ -277,7 +277,7 @@ traits_wide <- traits %>%
277
277
278
278
Now, lets create a variable called `max_height`
279
279
280
-
```{r max_height}
280
+
```{r max_height, echo = TRUE}
281
281
# create the variable max height
282
282
max_height <- s %>%
283
283
group_by(genotype) %>%
@@ -287,13 +287,14 @@ max_height <- s %>%
287
287
288
288
Now, join the traits data frame with the new max_height data frame trait data we will merge the two data frames on the `genotype` field.
0 commit comments