Explanation of methods:

1. Plot selection:

2. Treatments:

3. Replicates per treatment:

4. Layout:

5. Planting and sowing:

6. Watering:

7. Monitoring:

setwd("D:/Dropbox/100_PROJECTS/2016.4_PROJECT_Cyclopia.transplants")
read.csv("Data/SamplingDates.csv")%>%tbl_df()%>%
  rename(SamplingEvent=ColumnHeading)->
  sampling_dates

read.csv("Data/AB_MSC_RHB_data VER3-2014-2016.csv")%>%tbl_df()%>%
  mutate(H5a=as.numeric(H5a))%>% # one numeric column was imported as a factor. Can't see why...
  select(-N1,-N2a,-N2b,-N3a,-N3b,-N4a,-N4b,-N5a,-N5b)%>%
  tidyr::gather("SamplingEvent","Height",c(H1,H2a,H2b,H3a,H3b,H4a,H4b,H5a,H5b))->
  tutu
read.csv("Data/AB_MSC_RHB_data VER3-2014-2016.csv")%>%tbl_df()%>%
  mutate(H5a=as.numeric(H5a))%>% # one numeric column was imported as a factor. Can't see why...
  select(-H1,-H2a,-H2b,-H3a,-H3b,-H4a,-H4b,-H5a,-H5b)%>%
  rename(H1=N1,H2a=N2a,H2b=N2b,H3a=N3a,H3b=N3b,H4a=N4a,H4b=N4b,H5a=N5a,H5b=N5b)%>%
  tidyr::gather("SamplingEvent","SamplingNote",c(H1,H2a,H2b,H3a,H3b,H4a,H4b,H5a,H5b))->
  toto
## Warning: attributes are not identical across measure variables;
## they will be dropped
full_join(tutu,toto,by=c("Year","CODE","SPECIES","TYPE","LT","TR","GP","SamplingEvent"))%>%
  filter(!(TYPE=="SEEDLING"&SamplingEvent=="H2b"))%>% # There are no second replicates for seedlings
  filter(!(TYPE=="SEEDLING"&SamplingEvent=="H3b"))%>% # There are no second replicates for seedlings
  filter(!(TYPE=="SEEDLING"&SamplingEvent=="H4b"))%>% # There are no second replicates for seedlings
  filter(!(TYPE=="SEEDLING"&SamplingEvent=="H5b"))%>% # There are no second replicates for seedlings
  left_join(sampling_dates,by=c("Year","SamplingEvent"))%>%
  mutate(Replicate=substr(SamplingEvent,3,3),
         Index=paste(CODE,TYPE,Year,Replicate,sep="-"))%>%
  rename(YEAR=Year)->
  dat.long
## Warning: Column `SamplingEvent` joining character vector and factor,
## coercing into character vector
read.csv("Data/AB_MSC_RHB_data VER3-2014-2016.csv")%>%tbl_df()%>%
  mutate(H5a=as.numeric(H5a))->
  dat.wide
#dat.long%>%group_by(YEAR,SPECIES,TYPE,LT,TR,GP)%>%tally()%>%View
dat.long%>%group_by(YEAR,SPECIES,TYPE,LT,TR,GP)%>%tally()
## # A tibble: 165 x 7
## # Groups:   YEAR, SPECIES, TYPE, LT, TR [?]
##    YEAR  SPECIES TYPE  LT    TR       GP     n
##    <fct> <fct>   <fct> <fct> <fct> <int> <int>
##  1 14/15 INT     SEED  FY    CL        1    72
##  2 14/15 INT     SEED  FY    CL        2    72
##  3 14/15 INT     SEED  FY    CL        3    72
##  4 14/15 INT     SEED  FY    CL        4    72
##  5 14/15 INT     SEED  FY    CL        5    72
##  6 14/15 INT     SEED  FY    CL        6    72
##  7 14/15 INT     SEED  FY    CL        7    72
##  8 14/15 INT     SEED  FY    CL        8    72
##  9 14/15 INT     SEED  FY    CL        9    72
## 10 14/15 INT     SEED  FY    CL       10    72
## # ... with 155 more rows
dat.long%>%group_by(YEAR,SPECIES,TYPE)%>%tally()
## # A tibble: 6 x 4
## # Groups:   YEAR, SPECIES [?]
##   YEAR  SPECIES TYPE         n
##   <fct> <fct>   <fct>    <int>
## 1 14/15 INT     SEED      3609
## 2 14/15 SUB     SEED      3609
## 3 14/15 SUB     SEEDLING  2025
## 4 15/16 INT     SEEDLING  2010
## 5 15/16 SUB     SEED      3609
## 6 15/16 SUB     SEEDLING  2005

2014/15: SUB seeds and seedling, INT seeds 2015/16: SUB seeds and seedlings, INT seedlings

Coding structure

C. subternata seed germination and survival overall

C. subternata seed germination and seed+seedling survival overall

C. subternata & C. intermedia seed germination and seed+seedling survival overall

C. subternata seedling survival overall

C. intermedia seedling survival overall

Final sizes: All combinations

dat.long%>%
  filter(SamplingEvent%in%c("H5a","H5b"))%>%
  filter(!is.na(Height))%>%
  filter(Height!=1)%>%
  ggplot(aes((Height)))+
  geom_histogram(bins=5)+
  facet_grid(LT+SPECIES+TYPE~Date+TR)+
  coord_flip()

Final sizes: C. subternata

dat.long%>%
  filter(SamplingEvent%in%c("H5a","H5b"))%>%
  filter(!is.na(Height))%>%
  filter(SPECIES=="SUB")%>%
  filter(Height!=1)%>%
  ggplot(aes((Height)))+
  geom_histogram(bins=5,aes(fill=TYPE))+
  facet_grid(LT~Date+TR)+
  coord_flip()+
  theme(legend.position="top",
        legend.title = element_blank())+
  xlab("Height class (mm)")

Final sizes: C. subternata

dat.long%>%
  filter(SamplingEvent%in%c("H5a","H5b"))%>%
  filter(!is.na(Height))%>%
  filter(SPECIES=="INT")%>%
  filter(Height!=1)%>%
  ggplot(aes((Height)))+
  geom_histogram(bins=5,aes(fill=TYPE))+
  facet_grid(LT~Date+TR)+
  coord_flip()+
  theme(legend.position="top",
        legend.title = element_blank())+
  xlab("Height class (cm)")