TREC-Agroecology / agroecosystems

Project repository for "Evaluating the agroecosystem context of a simplified cropping system"
2 stars 4 forks source link

Visualization of LER fractions #82

Closed readersm closed 4 years ago

readersm commented 4 years ago

I was able to create a table long-form by binding the rows of two different data frames generated (one for species 1 fraction and the second for species 2), but I can't seem to bring along a column that details which CropSp each row's LER fraction is referring to within the for loop. I have tried everything I can think of or search on forums.

Can I somehow create a vector of the correct order of species and join it outside of the for loop? I'm not sure how to get the correct order before joining it. Or can I somehow use the [i] in the for loop?

It starts on line 141 of the R file titled 'harvestAGonly.R' now (finally) up on GitHub.

readersm commented 4 years ago

Nevermind! I figured it out! Below is how I did it by season, I'm going to work on doing it for each unique season now. LER Fraction visulization