Plotting linear regression of mean colour % over altitude

Hello,

Building a regression model is not difficult in R, but you need to have the correct data. Numeric data works very well, but for categorical data (e.g. Mother ID or species) things are more complex as you'll have to create a one-hot vector representation. R functions can do this for you, but if you have many categories, it might make the model more complex and less robust.

Please take a look at one of my older posts for more details

Hope this helps,
PJ