Studies comparing populations at different elevations in mountains are particularly popular for studying climatic effects on adaptation \citep{halbritter_trait_2018, hereford_quantitative_2009, leimu_meta-analysis_2008}. They provide strongly contrasting environments in close proximity, and keep to a minimum the effects of confounding factors such as photoperiod and geology or biogeographic history. Recently, Halbritter et al. (\citeyear{halbritter_trait_2018}) combined the information from studies of multiple plant species along elevation gradients. They found significant evidence for adaptation to different elevations in terms of biomass, with a clear trend towards smaller adult plants at higher elevation. A common hypothesis in the literature is that the smaller size of plants from high elevation provides several advantages, including warmer microclimatic conditions close to the ground and protection from wind \citep{korner_alpine_2003}. Alternatively, smaller size at higher elevation could also reflect an overall lower performance of populations reaching their range edge at high elevation \citep{korner_alpine_2003,sexton_evolution_2009}. Another hypothesis is that this pattern would be a consequence of selection on previous life stages. Indeed, early-life traits such as germination-related traits (seed size, germination rate, time to germinate etc.) are widely recognized for their role in plant adaptation to their environment \citep{donohue_germination_2010}. For instance, smaller size at high elevation could be a consequence of a delayed germination at high elevation that propagate through life and induces reduced size in adult plants. Therefore, the effect of smaller size on plant fitness- either advantageous or disadvantageous- would not change along elevation.\\


Another hypothesis is that this pattern would be a consequence of selection on previous life stages. Indeed, early-life traits such as germination-related traits (seed size, germination rate, time to germinate etc.) are widely recognized for their role in plant adaptation to their environment \citep{donohue_germination_2010}. For instance, smaller size at high elevation could be a consequence of a delayed germination at high elevation that propagate through life and induces reduced size in adult plants. Therefore, the effect of smaller size on plant fitness- either advantageous or disadvantageous- would not change along elevation.\\

Natural selection on early life stages can influence the evolution of subsequent life stages, \textit{i.e.} cascading effects \citep{donohue_why_2014}. For instance, the timing of germination influences the seasonal environment experienced by subsequent life stages, and the length of the growth period \citep{donohue_germination_2002, donohue_evolutionary_2005}. Traits expressed in adult life stages can therefore be shaped by indirect selection, (\textit{i.e.}, through the selection of early life traits that will influence adult traits). This mechanism does not preclude traits expressed in adult life stages from being under direct selection as the two mechanisms are not exclusive. For example, the reduced size of adult plants at a given time can be due to direct selection on the adult life stage, but also to indirect selection for delayed germination at early life stages, e.g., on seeds. These cascading effects are often complex, frequently invisible, and rarely considered in studies testing for local adaptation in the wild \citep{gibson_can_2016, halbritter_trait_2018, hereford_quantitative_2009, leimu_meta-analysis_2008}. Experiments testing for local adaptation on later stages while mitigating the influence of earlier stages have the potential to shed light on direct and indirect selection along the life cycle of plants.\\

Thus, all the plants used in our experiment had been confronted to similar environmental conditions during germination and seedling growth before being transplanted in the common gardens.

Thus, all the plants used in our experiment had been confronted to similar environmental conditions during germination and seedling growth before being transplanted in the common gardens. Yet, time to germination differ between populations originating from high and low elevation; on average population from high elevation germinated on aveage 3 days later than populations from low elevation (\textit{A. m. striatum} 16.5 days $\pm$ 0.31 at high elevation vs 14.4 days $\pm$ 0.34 at low elevation, \textit{A. m. pseudomajus} 15.7 days $\pm$ 0.31 at high elevation vs 11.8 days $\pm$ 0.19 at low elevation).


Smaller size at higher elevation could be due to the influence of prior stages in \textit{A. m. striatum}, and also in \textit{A. m. pseudomajus}. In our study, the influence of prior life stages was kept to a minimum. We reduced maternal environmental effects by using seeds harvested after two successive generations of plants grown under controlled conditions. Germination time was homogenized as much as possible between origins in controlled conditions, but remaines different between populations originating from high- and low-elevation in both subspecies. We mitigated environmental differences at seedling stages by using young seedlings grown under controlled similar conditions before being transplanted in the four common gardens. However, our experiment does not allow to dilute the genetically-based differences in germination timing or growth rate during early life stages. Although genetically-based delayed germination at high elevation found in \textit{A. m. striatum} \citep{gibert_anais_signs_2020}, is unlikely to affect our results. Even otherwise, such differentiation in the timing of germination was not found for \textit{A. m. pseudomajus} \citep{marin_potential_2020}. Genetic divergence in growth rate or timing to germination between populations originating from different elevations might however propagate through life stages and have induced reduced size in adult plants. One might speculate that this hypothesis holds some adaptive significance because the association of early germination and rapid growth may be advantageous at high elevation where the time window for advantageous environmental conditions is short, but to date, there is no evidence supporting this hypothesis. Non-adaptive processes linked to the evolutionary history of the subspecies foundation and expansion along the elevation range could also be speculated to explain this pattern but population genetic data does not support such scenario in \textit{A. majus} \citep{pujol_mountain_2017}. An alternative hypothesis is that smaller size at higher elevation could also reflect an overall lower performance of populations reaching their range edge at high elevation \citep{korner_alpine_2003, sexton_evolution_2009}. Thus, while it is impossible to draw conclusions on the mechanisms underlying this size difference, both adaptive, maladaptive and selectively neutral processes could have generated the pattern of reduced plant at higher elevation in \textit{A. majus} subspecies.\\ 



Survival was significantly affected by the three phenotypic traits tested in \textit{A. m. pseudomajus} (vegetative height, internode length and number of nodes, CIs were not overlapping zero), and by two traits in \textit{A. m. striatum} (vegetative height and internode length, see Table S3). Taller plants with shorter internode length or fewer nodes survived better. This pattern was consistent across the combined origin/garden elevations. Indeed, while the interaction between the vegetative height and elevation of combined origin/garden elevation showed a relative importance $\ge$  80 \% in \textit{A. m. pseudomajus} (Table S3), differences between populations remained non significant (CIs overlapping zero, Table S3).\\

\begin{table*}[ht!]
\centering
\caption{Estimates of model-averaging approach testing the effects of phenotypic traits on the number of flowers in both subspecies of \textit{Antirrhinum majus}. $R^2$ is the part of variance explained by the best model. Only significant interactions were shown here.}
\label{tab:2}
\begingroup\fontsize{12pt}{10pt}\selectfont
\scalebox{1}{
\begin{tabular}{l c c c c }
 \hline
   &  \multicolumn{2}{c} {\textit{A. majus striatum}} & \multicolumn{2}{c} {\textit{A. majus pseudomajus}}  \\
    \hline
                           &  Estimates & CI 95\% &  Estimates & CI 95\% \\
                           & & & & \\
   		 \textbf{a) Number of flowers} &  \multicolumn{2}{c}{$R^{2}$ = $\Sexpr{round(Table_estimatesY[[1]][["R^2"]][Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}$} & \multicolumn{2}{c}{$R^{2}$ = $\Sexpr{round(Table_estimatesP[[1]][["R^2"]][Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}$}\\
      & & & &\\
      Intercept 
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ \\
       Vegetative height
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}$ \\
       Internode length 
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_elong"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_elong"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_elong"], 2)}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_elong"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_elong"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_elong"], 2)}$ \\
      	Number of nodes
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_elong"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_nb.nodes"], 2)}$ \\
      	SLA
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_sla"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_sla"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_sla"], 2)}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_sla"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_sla"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_sla"], 2)}$ \\
      	Time to flowering
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_ttf"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_ttf"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_ttf"], 2)}}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_ttf"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_ttf"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_ttf"], 2)}$ \\
      	Reproductive height
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_repro.height"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_repro.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_repro.height"], 2)}}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_repro.height"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_repro.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_repro.height"], 2)}}$ \\
      	Number of reproductive stems
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_nb.stems"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_nb.stems"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_nb.stems"], 2)}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_nb.stems"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_nb.stems"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_nb.stems"], 2)}$ \\
      	Diameter of stems
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_stem.diam"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_stem.diam"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "z_stem.diam"], 2)}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_stem.diam"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_stem.diam"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "z_stem.diam"], 2)}$ \\
      	& & & & \\
      	Elevation gardens/origin & & & & \\
      	  	Garden High / Origin Low	 			
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL"], 2)}}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL"], 2)}$ \\
      		Low / High	 			
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH"], 2)}}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH"], 2)}}$ \\
      	  	Low / Low	
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}}$ \\
      			& & & &  \\
      			 \hline
       \multicolumn{5}{c}{Interactions elevation of gardens/origin X traits}\\
       Elevation of gardens/origin X Vegetative height   & & & &  \\
      		High / Low 			
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_veg.height"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_veg.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_veg.height"], 2)}}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_veg.height"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_veg.height"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_veg.height"], 2)}$ \\
     		Low / High			
      			& $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_veg.height"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_veg.height"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_veg.height"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_veg.height"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_veg.height"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_veg.height"], 2)}$ \\
      		Low / Low	 
      			& $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_veg.height"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_veg.height"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_veg.height"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_veg.height"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_veg.height"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_veg.height"], 2)}$ \\
      			& & & &  \\
		   Elevation of gardens/origin X Number of nodes & & & &  \\
      		High / Low 			
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_nb.nodes"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_nb.nodes"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_nb.nodes"], 2)}}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_nb.nodes"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_nb.nodes"], 2)}$ \\
      		Low / High 			
      			& $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_nb.nodes"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_nb.nodes"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_nb.nodes"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_nb.nodes"], 2)}$ \\
      		Low / Low 
      			& $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ \\
      			     			& & & &  \\
         Elevation of gardens/origin X Reproductive height & & & &  \\
      			Garden high / Origin low	 			
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_repro.height"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_repro.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_repro.height"], 2)}}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_repro.height"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_repro.height"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_repro.height"], 2)}$ \\
      			Low / High	 			
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_repro.height"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_repro.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_repro.height"], 2)}}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_repro.height"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_repro.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_repro.height"], 2)}}$ \\
      			Low / Low 
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_repro.height"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_repro.height"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_repro.height"], 2)}$ 
      			&  $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_repro.height"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_repro.height"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_repro.height"], 2)}$ \\
		& & & &  \\
      	   Elevation of gardens/origin X Number of reproductive stems  & & & &  \\
      		High / Low			
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_nb.stems"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_nb.stems"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTH_OL:z_nb.stems"], 2)}}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_nb.stems"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_nb.stems"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTH_OL:z_nb.stems"], 2)}$ \\
      		Low /  High	 			
      			& $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_nb.stems"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_nb.stems"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OH:z_nb.stems"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_nb.stems"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_nb.stems"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OH:z_nb.stems"], 2)}$ \\
      		Low /  Low	 
      			& $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_nb.stems"], 2)}$ & $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_nb.stems"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "nbf" & Table_estimatesY[[1]]$params == "trans_oriTL_OL:z_nb.stems"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.stems"], 2)}$ & $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.stems"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "nbf" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.stems"], 2)}$ \\
      			& & & &  \\
      	      		
\hline
\end{tabular}
}
\endgroup
\end{table*}



Our findings imply that our ability to understand the adaptation of adult plants based on phenotypic trait differentiation requires knowledge on earlier life stages and might harbor a number of complications in the absence of tests for the relationship between phenotypic traits and fitness components. 

\begin{table*}[ht!]
\centering
\caption{Results from the generalized mixed models (GLMM) testing for local adaptation on fitness-related traits in both subspecies of \textit{Antirrhinum majus}. Random factors in all models are the population effect and the site effect. Marginal $R2$ is the part of variance explained by fixed effects. Conditional $R^2$ is the part of variance explained by both fixed and random effects.}
\label{tab:1}
\resizebox{\textwidth}{!}{
\begin{tabular}{l c c c c }
 \hline
   & \multicolumn{2}{c} {\textit{A. majus striatum}} & \multicolumn{2}{c} {\textit{A. majus pseudomajus}}  \\
    \hline
      & Estimates & CI 95\%  & Estimates & CI 95\%  \\
      \textbf{a) Survival (binomial)} & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_modelY[[1]]$R2m[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_modelY[[1]]$R2c[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "intercept"], 2)}$}  & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_modelP[[1]]$R2m[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_modelP[[1]]$R2c[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "intercept"], 2)}$} \\
      Fixed Effects & & & &  \\
	   Intercept & $\textbf{\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "intercept"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "intercept"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "intercept"], 2)}}$ *
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "intercept"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "intercept"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "intercept"], 2)}}$ *
	   			 \\
	   Garden(s) & $\textbf{\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitude gardens"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitude gardens"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitude gardens"], 2)}}$ *
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitude gardens"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitude gardens"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitude gardens"], 2)}}$ *
	   			 \\
	   Elevation of origin & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitude origin"], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitude origin"], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitude origin"], 2)}$\\
	 
	   Elevation of origin X Garden(s) & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 \\
	   &  &  &  &   \\
	   Random Effects & Variance & CI 95\%  & Variance & CI 95\% \\
	   Between populations  & $\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}$ 

	   						& $\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}$ \\
	   Site effect & $\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ 

	   						& $\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ 
						\\
	   	\hline
	    &  &  &  & \\
	   \textbf{b) Flowering (binomial)} & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_modelY[[1]]$R2m[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_modelY[[1]]$R2c[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "intercept"], 2)}$}  & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_modelP[[1]]$R2m[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_modelP[[1]]$R2c[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "intercept"], 2)}$} \\
      Fixed Effects & & & &  \\
	   Intercept & $\textbf{\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "intercept"], 2)}}$  
	   			 & $\textbf{\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "intercept"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "intercept"], 2)}}$*
	   			  & $\textbf{\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "intercept"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "intercept"], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "intercept"], 2)}}$ *
	   			 \\
	   Garden(s) & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitude gardens"], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitude gardens"], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitude gardens"], 2)}$
	   			\\
	   Elevation of origin & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitude origin"], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitude origin"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitude origin"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitude origin"], 2)}}$ *
	   			\\
	 
	   Elevation of origin X Garden(s) & $\textbf{\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}}$ * 
	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}$ 
	   			 & $\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			\\
	   &  &  &  &  \\
	   Random Effects & Variance & CI 95\% & Variance & CI 95\%  \\
	   Between populations  & $\textbf{\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}}$ *
	   					
	   						& $\textbf{\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}}$ *
	   					\\
	   Site effect & $\textbf{\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}}$ *
	   					
	   						& $\textbf{\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}}$ *
	   						\\
		       \hline
	    &  &  &  &  \\
	    \textbf{c) Number of flowers (poisson)} & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_modelY[[1]]$R2m[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_modelY[[1]]$R2c[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "intercept"], 2)}$}  & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_modelP[[1]]$R2m[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_modelP[[1]]$R2c[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "intercept"], 2)}$} \\
	   Fixed Effects & & & & \\
	   Intercept & $\textbf{\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "intercept"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "intercept"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "intercept"], 2)}}$ *
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "intercept"], 2)}}$ 
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "intercept"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "intercept"], 2)}}$ *
	   			\\
	   Garden(s) & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitude gardens"], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitude gardens"], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitude gardens"], 2)}$\\
	   Elevation of origin & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitude origin"], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitude origin"], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitude origin"], 2)}$\\
	 
	   Elevation of origin X Garden(s) & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$CIlower[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$CIupper[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_modelP[[1]]$CIlower[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}}$ - $\textbf{\Sexpr{round(Table_modelP[[1]]$CIupper[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}}$ *
	   				\\
	   &  &  &  &   \\
	   Random Effects & Variance & CI 95\% & Variance & CI 95\%  \\
	   Between populations  & $\textbf{\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}}$ *

	   						& $\textbf{\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}}$ *
	   						\\
	  Site effect & $\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "f0_reduced" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ 
	   					 

	   						& $\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "f0_reduced" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ 
	   						\\
		   
\hline
\end{tabular}
}
\end{table*}


\begin{table*}[h!]
\centering
\caption{Models comparisons between null models and models including the altitude of origin in \textit{Anthirrinum majus} populations. Random factors for all models were (1| population) + (1|replicates). If the log-likelihood ratio test (LRT) returned a significant P-value, the model with the altitude of origin fitted the data better than the model without the altitude of origin.}
\label{tab:1}
\resizebox{\textwidth}{!}{
\begin{tabular}{l c c c}
 \hline
 Fitness components & Subspecies & LRT & p-value\\
 \hline
 Survival & \textit{A. m. striatum} & $\Sexpr{round(Table_modelY[[2]][1, 2], 3)}$ & $\Sexpr{round(Table_modelY[[2]][1, 3], 3)}$ $\Sexpr{Table_modelY[[2]][1, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_modelP[[2]][1, 2], 3)}$ & $\Sexpr{round(Table_modelP[[2]][1, 3], 3)}$ $\Sexpr{Table_modelP[[2]][1, 4]}$\\
 Probability of flowering & \textit{A. m. striatum} & $\Sexpr{round(Table_modelY[[2]][2, 2], 3)}$ & $\Sexpr{round(Table_modelY[[2]][2, 3], 3)}$ $\Sexpr{Table_modelY[[2]][2, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_modelP[[2]][2, 2], 3)}$ & $\Sexpr{round(Table_modelP[[2]][2, 3], 3)}$ $\Sexpr{Table_modelP[[2]][2, 4]}$\\
 Number of flowers & \textit{A. m. striatum} & $\Sexpr{round(Table_modelY[[2]][3, 2], 3)}$ & $\Sexpr{round(Table_modelY[[2]][3, 3], 3)}$ $\Sexpr{Table_modelY[[2]][3, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_modelP[[2]][3, 2], 3)}$ & $\Sexpr{round(Table_modelP[[2]][3, 3], 3)}$ $\Sexpr{Table_modelP[[2]][3, 4]}$\\
 \hline
 Vegetative height & \textit{A. m. striatum} & $\Sexpr{round(Table_traitY[[2]][5, 2], 3)}$ & $\Sexpr{round(Table_traitY[[2]][5, 3], 3)}$ $\Sexpr{Table_traitY[[2]][5, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_traitP[[2]][5, 2], 3)}$ & $\Sexpr{round(Table_traitP[[2]][5, 3], 3)}$ $\Sexpr{Table_traitP[[2]][5, 4]}$\\
  Internode length & \textit{A. m. striatum} & $\Sexpr{round(Table_traitY[[2]][7, 2], 3)}$ & $\Sexpr{round(Table_traitY[[2]][7, 3], 3)}$ $\Sexpr{Table_traitY[[2]][7, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_traitP[[2]][7, 2], 3)}$ & $\Sexpr{round(Table_traitP[[2]][7, 3], 3)}$ $\Sexpr{Table_traitP[[2]][7, 4]}$\\
  Number of nodes & \textit{A. m. striatum} & $\Sexpr{round(Table_traitY[[2]][2, 2], 3)}$ & $\Sexpr{round(Table_traitY[[2]][2, 3], 3)}$ $\Sexpr{Table_traitY[[2]][2, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_traitP[[2]][2, 2], 3)}$ & $\Sexpr{round(Table_traitP[[2]][2, 3], 3)}$ $\Sexpr{Table_traitP[[2]][2, 4]}$\\
  Time to flowering & \textit{A. m. striatum} & $\Sexpr{round(Table_traitY[[2]][1, 2], 3)}$ & $\Sexpr{round(Table_traitY[[2]][1, 3], 3)}$ $\Sexpr{Table_traitY[[2]][1, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_traitP[[2]][1, 2], 3)}$ & $\Sexpr{round(Table_traitP[[2]][1, 3], 3)}$ $\Sexpr{Table_traitP[[2]][1, 4]}$\\
 Reproductive height & \textit{A. m. striatum} & $\Sexpr{round(Table_traitY[[2]][6, 2], 3)}$ & $\Sexpr{round(Table_traitY[[2]][6, 3], 3)}$ $\Sexpr{Table_traitY[[2]][6, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_traitP[[2]][6, 2], 3)}$ & $\Sexpr{round(Table_traitP[[2]][6, 3], 3)}$ $\Sexpr{Table_traitP[[2]][6, 4]}$\\  
 Number of stem & \textit{A. m. striatum} & $\Sexpr{round(Table_traitY[[2]][3, 2], 3)}$ & $\Sexpr{round(Table_traitY[[2]][3, 3], 3)}$ $\Sexpr{Table_traitY[[2]][3, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_traitP[[2]][3, 2], 3)}$ & $\Sexpr{round(Table_traitP[[2]][3, 3], 3)}$ $\Sexpr{Table_traitP[[2]][3, 4]}$\\
  Stem diameter & \textit{A. m. striatum} & $\Sexpr{round(Table_traitY[[2]][4, 2], 3)}$ & $\Sexpr{round(Table_traitY[[2]][4, 3], 3)}$ $\Sexpr{Table_traitY[[2]][4, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_traitP[[2]][4, 2], 3)}$ & $\Sexpr{round(Table_traitP[[2]][4, 3], 3)}$ $\Sexpr{Table_traitP[[2]][4, 4]}$\\
  SLA & \textit{A. m. striatum} & $\Sexpr{round(Table_traitY[[2]][8, 2], 3)}$ & $\Sexpr{round(Table_traitY[[2]][8, 3], 3)}$ $\Sexpr{Table_traitY[[2]][8, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_traitP[[2]][8, 2], 3)}$ & $\Sexpr{round(Table_traitP[[2]][8, 3], 3)}$ $\Sexpr{Table_traitP[[2]][8, 4]}$\\
 \hline
\end{tabular}
}
\end{table*}

\clearpage


\clearpage

\begin{table*}[ht!]
\centering
\caption{Results from the generalised mixed models (GLMM) testing for local adaptation on two phenotypic traits (internode length and number of nodes) in both subspecies of \textit{Anthirrinum majus}. Random factors were (1| population) + (1| replicates). Results from GLMM for others traits were available in appendix Table \ref{tab:S1}.}
\label{tab:3}
\resizebox{\textwidth}{!}{
\begin{tabular}{l c c c c}
 \hline
   & \multicolumn{2}{c} {\textit{A. majus striatum}} & \multicolumn{2}{c} {\textit{A. majus pseudomajus}}  \\
    \hline
      & Estimates & CI 95\%  & Estimates & CI 95\% \\
      
	   	 \textbf{a) Internode length} & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_traitY[[1]]$R2m[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_traitY[[1]]$R2c[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "intercept"], 2)}$}  & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_traitP[[1]]$R2m[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_traitP[[1]]$R2c[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "intercept"], 2)}$} \\
      Fixed Effects & & & &  \\
	   Intercept & $\textbf{\Sexpr{round(Table_traitY[[1]]$estimates[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "intercept"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_traitY[[1]]$CIlower[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "intercept"], 2)}}$- $\textbf{\Sexpr{round(Table_traitY[[1]]$CIupper[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "intercept"], 2)}}$ *
	   			 & $\textbf{\Sexpr{round(Table_traitP[[1]]$estimates[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "intercept"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_traitP[[1]]$CIlower[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "intercept"], 2)}}$ - $\textbf{\Sexpr{round(Table_traitP[[1]]$CIupper[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "intercept"], 2)}}$ *
	   			 \\
	   Garden(s) & $\Sexpr{round(Table_traitY[[1]]$estimates[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitY[[1]]$CIlower[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitude gardens"], 2)}$ - $\Sexpr{round(Table_traitY[[1]]$CIupper[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitP[[1]]$estimates[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitP[[1]]$CIlower[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitude gardens"], 2)}$ - $\Sexpr{round(Table_traitP[[1]]$CIupper[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitude gardens"], 2)}$
	   			  \\
	   Altitude of origin & $\Sexpr{round(Table_traitY[[1]]$estimates[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitY[[1]]$CIlower[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitude origin"], 2)}$ - $\Sexpr{round(Table_traitY[[1]]$CIupper[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitude origin"], 2)}$
	   			
	   			
	   			 & $\Sexpr{round(Table_traitP[[1]]$estimates[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitP[[1]]$CIlower[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitude origin"], 2)}$ - $\Sexpr{round(Table_traitP[[1]]$CIupper[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitude origin"], 2)}$
	   			\\
	 
	   Altitude of origin X Garden(s) & $\textbf{\Sexpr{round(Table_traitY[[1]]$estimates[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitudes gardens x origin"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_traitY[[1]]$CIlower[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitudes gardens x origin"], 2)}}$ - $\textbf{\Sexpr{round(Table_traitY[[1]]$CIupper[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$params == "altitudes gardens x origin"], 2)}}$ *
	   			  
	   			 & $\Sexpr{round(Table_traitP[[1]]$estimates[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitP[[1]]$CIlower[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitudes gardens x origin"], 2)}$ -  $\Sexpr{round(Table_traitP[[1]]$CIupper[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 \\
	   &  &  &  &   \\
	   Random Effects & Variance & CI 95\%  & Variance & CI 95\%   \\
	   Between populations  & $\textbf{\Sexpr{round(Table_traitY[[1]]$randomVar[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "pop"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitY[[1]]$randomCIlower[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "pop"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_traitY[[1]]$randomCIupper[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "pop"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitP[[1]]$randomVar[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "pop"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitP[[1]]$randomCIlower[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "pop"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_traitP[[1]]$randomCIupper[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "pop"][1], 2)}}$ 
	   						\\
	    Site effect & $\textbf{\Sexpr{round(Table_traitY[[1]]$randomVar[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "site"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitY[[1]]$randomCIlower[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "site"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_traitY[[1]]$randomCIupper[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "site"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitP[[1]]$randomVar[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "site"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitP[[1]]$randomCIlower[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "site"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_traitP[[1]]$randomCIupper[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "site"][1], 2)}}$ 
	   						\\
	   Residuals & $\textbf{\Sexpr{round(Table_traitY[[1]]$randomVar[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "Residual"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitY[[1]]$randomCIlower[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "Residual"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_traitY[[1]]$randomCIupper[Table_traitY[[1]]$model == "m_elong" & Table_traitY[[1]]$randomEff  == "Residual"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitP[[1]]$randomVar[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "Residual"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitP[[1]]$randomCIlower[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "Residual"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_traitP[[1]]$randomCIupper[Table_traitP[[1]]$model == "m_elong" & Table_traitP[[1]]$randomEff  == "Residual"][1], 2)}}$ 
	   						\\
	   							& & & &  \\
		\hline
	   	 \textbf{b) Number of nodes} & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_traitY[[1]]$R2m[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_traitY[[1]]$R2c[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "intercept"], 2)}$}  & \multicolumn{2}{c}{$R^{2}_{m}$ = $\Sexpr{round(Table_traitP[[1]]$R2m[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "intercept"], 2)}$, $R^{2}_{c}$ = $\Sexpr{round(Table_traitP[[1]]$R2c[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "intercept"], 2)}$} \\
      Fixed Effects & & & &  \\
	   Intercept & $\textbf{\Sexpr{round(Table_traitY[[1]]$estimates[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "intercept"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_traitY[[1]]$CIlower[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "intercept"], 2)}}$- $\textbf{\Sexpr{round(Table_traitY[[1]]$CIupper[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "intercept"], 2)}}$ *
	   			 & $\textbf{\Sexpr{round(Table_traitP[[1]]$estimates[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "intercept"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_traitP[[1]]$CIlower[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "intercept"], 2)}}$ - $\textbf{\Sexpr{round(Table_traitP[[1]]$CIupper[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "intercept"], 2)}}$ *
	   			 \\
	   Garden(s) & $\Sexpr{round(Table_traitY[[1]]$estimates[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitY[[1]]$CIlower[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitude gardens"], 2)}$ - $\Sexpr{round(Table_traitY[[1]]$CIupper[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitP[[1]]$estimates[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitP[[1]]$CIlower[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitude gardens"], 2)}$ - $\Sexpr{round(Table_traitP[[1]]$CIupper[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitude gardens"], 2)}$
	   			  \\
	   Altitude of origin & $\Sexpr{round(Table_traitY[[1]]$estimates[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitY[[1]]$CIlower[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitude origin"], 2)}$ - $\Sexpr{round(Table_traitY[[1]]$CIupper[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitude origin"], 2)}$
	   			
	   			
	   			 & $\textbf{\Sexpr{round(Table_traitP[[1]]$estimates[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitude origin"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_traitP[[1]]$CIlower[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitude origin"], 2)}}$ - $\textbf{\Sexpr{round(Table_traitP[[1]]$CIupper[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitude origin"], 2)}}$ *
	   			\\
	 
	   Altitude of origin X Garden(s) & $\Sexpr{round(Table_traitY[[1]]$estimates[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitY[[1]]$CIlower[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitudes gardens x origin"], 2)}$ - $\Sexpr{round(Table_traitY[[1]]$CIupper[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$params == "altitudes gardens x origin"], 2)}$ 
	   			  
	   			 & $\textbf{\Sexpr{round(Table_traitP[[1]]$estimates[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitudes gardens x origin"], 2)}}$
	   			 & $\textbf{\Sexpr{round(Table_traitP[[1]]$CIlower[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitudes gardens x origin"], 2)}}$ -  $\textbf{\Sexpr{round(Table_traitP[[1]]$CIupper[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$params == "altitudes gardens x origin"], 2)}}$ *
	   			 \\
	   &  &  &  &   \\
	   Random Effects & Variance & CI 95\%  & Variance & CI 95\%   \\
	   Between populations  & $\Sexpr{round(Table_traitY[[1]]$randomVar[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitY[[1]]$randomCIlower[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$randomEff  == "pop"][1], 2)}$ - $\Sexpr{round(Table_traitY[[1]]$randomCIupper[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitP[[1]]$randomVar[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitP[[1]]$randomCIlower[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$randomEff  == "pop"][1], 2)}$ - $\Sexpr{round(Table_traitP[[1]]$randomCIupper[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						\\
	   Site effect & $\Sexpr{round(Table_traitY[[1]]$randomVar[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitY[[1]]$randomCIlower[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_traitY[[1]]$randomCIupper[Table_traitY[[1]]$model == "m_nb.nodes" & Table_traitY[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& $\textbf{\Sexpr{round(Table_traitP[[1]]$randomVar[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$randomEff  == "site"][1], 2)}}$ 
	   						& $\textbf{\Sexpr{round(Table_traitP[[1]]$randomCIlower[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$randomEff  == "site"][1], 2)}}$ - $\textbf{\Sexpr{round(Table_traitP[[1]]$randomCIupper[Table_traitP[[1]]$model == "m_nb.nodes" & Table_traitP[[1]]$randomEff  == "site"][1], 2)}}$ 
	   						\\
	   							& & & &  \\
	    
\hline
\end{tabular}
}
\end{table*}


\clearpage
\begin{table*}[h!]
\centering
\caption{Summary results of the model-averaging approach exploring the effect of the interaction between traits and altitude (of origin and transplantation) on the components of plant fitness (survival, flowering and the number of flowers). The relative importance refers to the probability of a variable to be included in the best model.  A relative importance closed to 100 \% suggested that the effect of trait on fitness varied between altitude of origin and/or transplantation. Interactions with a relative importance $\ge$ to 80\% were in bold.}
\label{tab:4}
\resizebox{\textwidth}{!}{
\begin{tabular}{l l c c}
 \hline
 Fitness & Variables & \multicolumn{2}{c} {Relative importance (\%)}\\
  \hline
  		 & 		    & \textit{A. m. striatum} & \textit{A. m. pseudomajus} \\
 &&&\\
 Survival & Altitude * Vegetative height &  $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "s0" & Table_importanceY$trait == "trans_ori:z_veg.height"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "s0" & Table_importanceP$trait == "trans_ori:z_veg.height"], 2) *100}$\\
 		  & Altitude * Nb nodes & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "s0" & Table_importanceY$trait == "trans_ori:z_nb.nodes"], 2) *100}$ & $\textbf{\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "s0" & Table_importanceP$trait == "trans_ori:z_nb.nodes"], 2) *100}}$\\
 		  & Altitude * Internode length & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "s0" & Table_importanceY$trait == "trans_ori:z_elong"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "s0" & Table_importanceP$trait == "trans_ori:z_elong"], 2) *100}$\\
 &&&\\
 Flowering 	& Altitude * Vegetative height & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "flo" & Table_importanceY$trait == "trans_ori:z_veg.height"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "flo" & Table_importanceP$trait == "trans_ori:z_veg.height"], 2) *100}$\\
 		    & Altitude * Nb nodes & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "flo" & Table_importanceY$trait == "trans_ori:z_nb.nodes"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "flo" & Table_importanceP$trait == "trans_ori:z_nb.nodes"], 2) *100}$\\
 		   & Altitude * Internode length & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "flo" & Table_importanceY$trait == "trans_ori:z_elong"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "flo" & Table_importanceP$trait == "trans_ori:z_elong"], 2) *100}$\\
&&&\\
 Number of flowers	& Altitude * Vegetative height & $\textbf{\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "nbf" & Table_importanceY$trait == "trans_ori:z_veg.height"], 2) *100}}$ & $\textbf{\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "nbf" & Table_importanceP$trait == "trans_ori:z_veg.height"], 2) *100}}$\\
 		    & Altitude * Nb nodes & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "nbf" & Table_importanceY$trait == "trans_ori:z_nb.nodes"], 2) *100}$ & $\textbf{\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "nbf" & Table_importanceP$trait == "trans_ori:z_nb.nodes"], 2) *100}}$\\
 		   & Altitude * Internode length & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "nbf" & Table_importanceY$trait == "trans_ori:z_elong"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "nbf" & Table_importanceP$trait == "trans_ori:z_elong"], 2) *100}$\\
 		   & Altitude * SLA & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "nbf" & Table_importanceY$trait == "trans_ori:z_sla"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "nbf" & Table_importanceP$trait == "trans_ori:z_sla"], 2) *100}$\\
 		   & Altitude * Time to flowering & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "nbf" & Table_importanceY$trait == "trans_ori:z_ttf"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "nbf" & Table_importanceP$trait == "trans_ori:z_ttf"], 2) *100}$\\
		   & Altitude * Reproductive height & $\textbf{\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "nbf" & Table_importanceY$trait == "trans_ori:z_repro.height"], 2) *100}}$ & $\textbf{\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "nbf" & Table_importanceP$trait == "trans_ori:z_repro.height"], 2) *100}}$\\
			& Altitude * Nb stems & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "nbf" & Table_importanceY$trait == "trans_ori:z_nb.stems"], 2) *100}$ & $\textbf{\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "nbf" & Table_importanceP$trait == "trans_ori:z_nb.stems"], 2) *100}}$\\
			& Altitude * Stem diameter & $\Sexpr{round(Table_importanceY$SW[Table_importanceY$model == "nbf" & Table_importanceY$trait == "trans_ori:z_ttf"], 2) *100}$ & $\Sexpr{round(Table_importanceP$SW[Table_importanceP$model == "nbf" & Table_importanceP$trait == "trans_ori:z_ttf"], 2) *100}$\\
\hline
\end{tabular}
}
\end{table*}


\clearpage

\begin{table*}[ht!]
\centering
\caption{Results from the averaging-models testing the effect of phenotypic traits on survival and the probability of flowering in both subspecies of \textit{Anthirrinum majus}. Only interactions between altitude and traits with a relative importance $\ge$ to 80\% were shown here (see table \ref{tab:4}). Results from GLMs for all interactions were available in appendix Table \ref{tab:S3}.}
\label{tab:5}
\resizebox{\textwidth}{!}{
\begin{tabular}{l c c c c}
 \hline
   &  \multicolumn{2}{c} {\textit{A. majus striatum}} & \multicolumn{2}{c} {\textit{A. majus pseudomajus}}  \\
    \hline
                           &  Estimates & CI &  Estimates & CI \\
                           & & & &  \\
      \textbf{a) Survival} &  \multicolumn{2}{c}{$R^{2}$ = $\Sexpr{round(Table_estimatesY[[1]][["R^2"]][Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}$} & \multicolumn{2}{c}{$R^{2}$ = $\Sexpr{round(Table_estimatesP[[1]][["R^2"]][Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}$}\\
       & & & &  \\
      (Intercept) 
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ \\
       Internode length 
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "z_elong"], 2)}}$ & $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "s0" 
      			& Table_estimatesY[[1]]$params == "z_elong"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "z_elong"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_elong"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_elong"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_elong"], 2)}}$ \\
      	Number of nodes
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_elong"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_nb.nodes"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_nb.nodes"], 2)}}$ \\
      	Vegetative height
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}}$ \\
      	Altitude & & & &   \\
      	(1) Garden low / Origin low	
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "s0" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}$ \\
      			& & & &   \\
      			Interactions & & & &  \\
      	Altitude * Number of nodes   & & & &   \\
      			(1) Garden low / Origin low	 
      			& & 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "s0" & Table_estimatesP[[1]]$params == "trans_oriTL_OL:z_nb.nodes"], 2)}$ \\
      			
\hline
\textbf{b) Probability of flowering} &  \multicolumn{2}{c}{$R^{2}$ = $\Sexpr{round(Table_estimatesY[[1]][["R^2"]][Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}$} & \multicolumn{2}{c}{$R^{2}$ = $\Sexpr{round(Table_estimatesP[[1]][["R^2"]][Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}$}\\
      & & & &  \\
      (Intercept) 
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "(Intercept)"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "(Intercept)"], 2)}}$ \\
       Internode length 
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_elong"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_elong"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_elong"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_elong"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_elong"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_elong"], 2)}$ \\
      	Number of nodes
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_nb.nodes"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_elong"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_nb.nodes"], 2)}$ - $\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_nb.nodes"], 2)}$ \\
      	Vegetative height
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "z_veg.height"], 2)}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "z_veg.height"], 2)}}$ \\
      	Altitude & & & &   \\
      	(1) Garden low / Origin low	
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTL_OL"], 2)}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTL_OL"], 2)}}$ \\
      	(2) Garden high / Origin low	 			
      			&  $\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTH_OL"], 2)}$ 
      			& $\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTH_OL"], 2)}$ - $\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTH_OL"], 2)}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTH_OL"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTH_OL"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTH_OL"], 2)}}$ \\
      	(3) Garden low / Origin high	 			
      			&  $\textbf{\Sexpr{round(Table_estimatesY[[1]]$estimates[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTL_OH"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIlower[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTL_OH"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesY[[1]]$CIupper[Table_estimatesY[[1]]$model == "flo" & Table_estimatesY[[1]]$params == "trans_oriTL_OH"], 2)}}$ 
      			&  $\textbf{\Sexpr{round(Table_estimatesP[[1]]$estimates[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTL_OH"], 2)}}$ 
      			& $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIlower[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTL_OH"], 2)}}$ - $\textbf{\Sexpr{round(Table_estimatesP[[1]]$CIupper[Table_estimatesP[[1]]$model == "flo" & Table_estimatesP[[1]]$params == "trans_oriTL_OH"], 2)}}$ \\
\hline
\end{tabular}
}
\end{table*}

\clearpage







\subsubsection{Estimating environmental, genetic and G × E interactions variances}
For each subspecies, we used GLMMs (Generalized Linear Mixed Model) with fixed and random effects to quantify the magnitude of the environmental, genetic and gene-by-environment (G × E) interactions variances in the response of fitness components to elevation. The fixed effect included the altitude of the garden effect and the site effect (i.e replicates). These fixed effect tested whether the phenotypes were different in the different environmental conditions, and refer to the environmental variance. For the survival and the fecondity, the random effect variances included the between-population genetic variance ($V_B$), the family effect variance ($V_F$), a elevation of the garden × site × family interaction variance ($V_{G X E}$). Both $V_B$ and $V_F$ refer to the genetic variance, whereas $V_{G X E}$ refers to the genetic by environment interaction. The phenotypic plasticity is the sum of environmental variance ($V_B$ and $V_F$) and G × E variance ($V_{G X E}$, \citealt{scheiner_comparison_1984, scheiner_genetics_1989}). 

Since only a subset of individual flowering, the number of flowers was measured on a reduced dataset compared to the survival and the fecundity. Thus, we simplified random effect structure of the models for the number of flowers. The random effect included the between-population genetic variance ($V_B$), and a altitude of the garden x site x population interaction variance ($V_{G X E}$), but not the family effect variance. 

For all fitness measurement, the error distributions were chosen to fit each trait: (i) a binomial model was used for survival  (0 vs 1), (ii) a Poisson (with a log link function) model was used for the fecundity and the number of flowers. 



 \textbf{a) Fecundity} & & & & & & \\
	   Fixed Effects & & & & & & \\
	   Intercept & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "intercept"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$SE[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "intercept"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$PVAL[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "intercept"], 3)}$ $\Sexpr{Table_modelY[[1]]$stars[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "intercept"]}$

	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "intercept"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$SE[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "intercept"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$PVAL[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "intercept"], 3)}$ $\Sexpr{Table_modelP[[1]]$stars[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "intercept"]}$\\
	   Garden(s) & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$SE[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$PVAL[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitude gardens"], 3)}$ $\Sexpr{Table_modelY[[1]]$stars[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitude gardens"]}$

	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$SE[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$PVAL[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitude gardens"], 3)}$ $\Sexpr{Table_modelP[[1]]$stars[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitude gardens"]}$\\
	   Altitude of origin & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$SE[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$PVAL[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitude origin"], 3)}$ $\Sexpr{Table_modelY[[1]]$stars[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitude origin"]}$

	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$SE[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$PVAL[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitude origin"], 3)}$ $\Sexpr{Table_modelP[[1]]$stars[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitude origin"]}$\\
	 
	   Altitude of origin X Garden(s) & $\Sexpr{round(Table_modelY[[1]]$estimates[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$SE[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelY[[1]]$PVAL[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitudes gardens x origin"], 3)}$ $\Sexpr{Table_modelY[[1]]$stars[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$params == "altitudes gardens x origin"]}$

	   			 & $\Sexpr{round(Table_modelP[[1]]$estimates[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$SE[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_modelP[[1]]$PVAL[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitudes gardens x origin"], 3)}$ $\Sexpr{Table_modelP[[1]]$stars[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$params == "altitudes gardens x origin"]}$\\
	   &  &  &  &  &  & \\
	   Random Effects & Variance & CI 95\% & Nb group & Variance & CI 95\%  & Nb group \\
	   \textit{Genetic effects} & & & & & & \\
	   Between populations  & $\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& 7 

	   						& $\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "pop"][1], 2)}$ 
	   						& 8 \\
	   Family nested in population & $\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& 103 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& 113 \\
	   \textit{Site effect} & $\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "f0" & Table_modelY[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& 4 

	   						& $\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "f0" & Table_modelP[[1]]$randomEff  == "site"][1], 2)}$ 
	   						& 4 \\
	    \hline
	   &  &  &  &  &  & \\






	   \begin{table*}[h!]
\centering
\caption{Models comparisons between null models and models including the altitude of origin in \textit{Anthirrinum majus} populations. Random factors for survival and fecundity models are (1| population) + (1 | population/family) + (1|replicates). Random factors for number of flowers model are (1| population) + (1|replicates). If the log-likelihood ratio test (LRT) returned a significant P-value, the model with the altitude of origin fitted the data better than the model without the altitude of origin.}
\label{tab:S4}
\resizebox{\textwidth}{!}{
\begin{tabular}{l c c c}
 \hline
 Fitness components & Subspecies & LRT & p-value\\
 \hline
 Survival & \textit{A. m. striatum} & $\Sexpr{round(Table_modelY[[2]][1, 2], 3)}$ & $\Sexpr{round(Table_modelY[[2]][1, 3], 3)}$ $\Sexpr{Table_modelY[[2]][1, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_modelP[[2]][1, 2], 3)}$ & $\Sexpr{round(Table_modelP[[2]][1, 3], 3)}$ $\Sexpr{Table_modelP[[2]][1, 4]}$\\
 Fecundity & \textit{A. m. striatum} & $\Sexpr{round(Table_modelY[[2]][2, 2], 3)}$ & $\Sexpr{round(Table_modelY[[2]][2, 3], 3)}$ $\Sexpr{Table_modelY[[2]][2, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_modelP[[2]][2, 2], 3)}$ & $\Sexpr{round(Table_modelP[[2]][2, 3], 3)}$ $\Sexpr{Table_modelP[[2]][2, 4]}$\\
 Number of flowers & \textit{A. m. striatum} & $\Sexpr{round(Table_modelY[[2]][3, 2], 3)}$ & $\Sexpr{round(Table_modelY[[2]][3, 3], 3)}$ $\Sexpr{Table_modelY[[2]][3, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_modelP[[2]][3, 2], 3)}$ & $\Sexpr{round(Table_modelP[[2]][3, 3], 3)}$ $\Sexpr{Table_modelP[[2]][3, 4]}$\\
 Probability of flowering & \textit{A. m. striatum} & $\Sexpr{round(Table_modelY[[2]][4, 2], 3)}$ & $\Sexpr{round(Table_modelY[[2]][4, 3], 3)}$ $\Sexpr{Table_modelY[[2]][4, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_modelP[[2]][4, 2], 3)}$ & $\Sexpr{round(Table_modelP[[2]][4, 3], 3)}$ $\Sexpr{Table_modelP[[2]][4, 4]}$\\
 Survival of flowering plants & \textit{A. m. striatum} & $\Sexpr{round(Table_modelY[[2]][5, 2], 3)}$ & $\Sexpr{round(Table_modelY[[2]][5, 3], 3)}$ $\Sexpr{Table_modelY[[2]][5, 4]}$\\
  & \textit{A. m. pseudomajus} & $\Sexpr{round(Table_modelP[[2]][5, 2], 3)}$ & $\Sexpr{round(Table_modelP[[2]][5, 3], 3)}$ $\Sexpr{Table_modelP[[2]][5, 4]}$\\

 \hline
\end{tabular}
}
\end{table*}









\begin{table*}[ht!]
\centering
\caption{Results from the generalised mixed models (GLMM) testing for local adaptation on phenotypic traits in both subspecies of \textit{Anthirrinum majus}. Random factors for survival and probability of flowering models are (1| population) + (1 | population/family) + (1|replicates). Random factors for traits measured on flowering plants exclusively are (1| population) + (1|replicates).}
\label{tab:3}
\resizebox{\textwidth}{!}{
\begin{tabular}{l c c c c c c}
 \hline
   & \multicolumn{3}{c} {\textit{A. majus striatum}} & \multicolumn{3}{c} {\textit{A. majus pseudomajus}}  \\
    \hline
      & Estimates & SE & P-value & Estimates & SE & P-value \\
      \textbf{a) Vegetative height} & & & & & & \\
      Fixed Effects & & & & & & \\
	   Intercept & $\Sexpr{round(Table_traitY$estimates[Table_traitY$trait == "veg.height" & Table_traitY$params == "intercept"], 2)}$
	   			 & $\Sexpr{round(Table_traitY$SE[Table_traitY$trait == "veg.height" & Table_traitY$params == "intercept"], 2)}$
	   			 & $\Sexpr{round(Table_traitY$PVAL[Table_traitY[$trait == "veg.height" & Table_traitY$params == "intercept"], 3)}$ $\Sexpr{Table_traitY$stars[Table_traitY$trait == "veg.height" & Table_traitY$params == "intercept"]}$

	   			 & $\Sexpr{round(Table_traitP$estimates[Table_traitP$trait == "veg.height" & Table_traitP$params == "intercept"], 2)}$
	   			 & $\Sexpr{round(Table_traitP$SE[Table_traitP$trait == "veg.height" & Table_traitP$params == "intercept"], 2)}$
	   			 & $\Sexpr{round(Table_traitP$PVAL[Table_traitP$trait == "veg.height" & Table_traitP$params == "intercept"], 3)}$ $\Sexpr{Table_traitP$stars[Table_traitP$trait == "veg.height" & Table_traitP$params == "intercept"]}$\\
	   Garden(s) & $\Sexpr{round(Table_traitY$estimates[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitY$SE[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitY$PVAL[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitude gardens"], 3)}$ $\Sexpr{Table_traitY$stars[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitude gardens"]}$

	   			 & $\Sexpr{round(Table_traitP$estimates[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitP$SE[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitude gardens"], 2)}$
	   			 & $\Sexpr{round(Table_traitP$PVAL[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitude gardens"], 3)}$ $\Sexpr{Table_traitP$stars[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitude gardens"]}$\\
	   Altitude of origin & $\Sexpr{round(Table_traitY$estimates[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitY$SE[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitY$PVAL[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitude origin"], 3)}$ $\Sexpr{Table_traitY$stars[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitude origin"]}$

	   			 & $\Sexpr{round(Table_traitP$estimates[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitP$SE[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitude origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitP$PVAL[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitude origin"], 3)}$ $\Sexpr{Table_traitP$stars[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitude origin"]}$\\
	 
	   Altitude of origin X Garden(s) & $\Sexpr{round(Table_traitY$estimates[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitY$SE[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitY$PVAL[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitudes gardens x origin"], 3)}$ $\Sexpr{Table_traitY$stars[Table_traitY$trait == "veg.height" & Table_traitY$params == "altitudes gardens x origin"]}$

	   			 & $\Sexpr{round(Table_traitP$estimates[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitP$SE[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitudes gardens x origin"], 2)}$
	   			 & $\Sexpr{round(Table_traitP$PVAL[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitudes gardens x origin"], 3)}$ $\Sexpr{Table_traitP$stars[Table_traitP$trait == "veg.height" & Table_traitP$params == "altitudes gardens x origin"]}$\\
	   &  &  &  &  &  & \\
	   Random Effects & Variance & CI 95\% & Nb group & Variance & CI 95\%  & Nb group \\
	   Between populations  & $\Sexpr{round(Table_traitY$randomVar[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitY$randomCIlower[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "pop"][1], 2)}$ - $\Sexpr{round(Table_traitY$randomCIupper[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "pop"][1], 2)}$ 
	   						& 7 

	   						& $\Sexpr{round(Table_traitP$randomVar[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitP$randomCIlower[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "pop"][1], 2)}$ - $\Sexpr{round(Table_traitP$randomCIupper[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "pop"][1], 2)}$ 
	   						& 8 \\
	   Family nested in population & $\Sexpr{round(Table_traitY$randomVar[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "family:pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitY$randomCIlower[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "family:pop"][1], 2)}$ - $\Sexpr{round(Table_traitY$randomCIupper[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "family:pop"][1], 2)}$ 
	   						& 103 
	   						& $\Sexpr{round(Table_traitP$randomVar[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "family:pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitP$randomCIlower[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "family:pop"][1], 2)}$ - $\Sexpr{round(Table_traitP$randomCIupper[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "family:pop"][1], 2)}$ 
	   						& 113 \\
	   Site effect & $\Sexpr{round(Table_traitY$randomVar[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitY$randomCIlower[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_traitY$randomCIupper[Table_traitY$trait == "veg.height" & Table_traitY$randomEff  == "site"][1], 2)}$ 
	   						& 4 

	   						& $\Sexpr{round(Table_traitP$randomVar[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "site"][1], 2)}$ 
	   						& $\Sexpr{round(Table_traitP$randomCIlower[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "site"][1], 2)}$ - $\Sexpr{round(Table_traitP$randomCIupper[Table_traitP$trait == "veg.height" & Table_traitP$randomEff  == "site"][1], 2)}$ 
	   						& 4 \\
	   	\hline
	    &  &  &  &  &  & \\
	  
\hline
\end{tabular}
}
\end{table*}


	   Family nested in population & $\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "p0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& 103 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "p0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& 113 \\

	      Family nested in population & $\Sexpr{round(Table_modelY[[1]]$randomVar[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelY[[1]]$randomCIlower[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ - $\Sexpr{round(Table_modelY[[1]]$randomCIupper[Table_modelY[[1]]$model == "s0" & Table_modelY[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& 103 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomVar[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& $\Sexpr{round(Table_modelP[[1]]$randomCIlower[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ - $\Sexpr{round(Table_modelP[[1]]$randomCIupper[Table_modelP[[1]]$model == "s0" & Table_modelP[[1]]$randomEff  == "family:pop"][1], 2)}$ 
	   						& 113 \\


