Open lizzieinvancouver opened 4 months ago
Reshaping treatment col
# reshaping
newdf <- reshape(alldat, idvar=c("lat", "lon", "year", "sp"), timevar="metric", direction = "wide")
# where time is the thing that gives names you want to become column names, idvar is columns to keep and ...
# the column missing here will be spread across new columns (in this case it was called 'value')
First 30 rows of the treatment column and the number of datasetID that have them:
datasetID treatment
225 208 control
177 113 cold stratification
140 49 chilling
388 48 moist chilling
101 38 chemical
567 31 storage
162 30 cold
581 30 stratification
511 22 scarification
170 21 cold strat
678 19 warm stratification
105 16 chemical + moist chilling
286 16 GA3
615 16 temperature
178 14 Cold stratification
226 14 Control
259 13 dry storage
238 11 dark
442 11 non-stratified
165 9 cold moist stratification
196 9 cold stratification, dark
197 9 cold stratification,light
513 9 scarification
519 9 scarification+chilling
661 9 untreated, dark
662 9 untreated, light
202 8 cold-moist stratification
351 7 light
370 7 low temperature
410 7 NA (control)
And then do it by dormancy class!
So, basically, get the EGRET data where a row has only germination temperature (and duration), then cold (and duration) and germination temp are filled in ... then split (reshape) on treatment and start going though those combos.
And, again, then do it by dormancy class!