Sample Data data <- structure(list(SPECIES = structure(c(1L, 1L, 1L, 1L, 1L, 1L). # SPECIES LOCATION X.COLONIZATION SPORE_DENSITY pH NO3 NH4 P Organic_C K Cu Mn Zn BD X.Sand X.Silt X.Clay Note that columns currently being group_by-ed are not included in everything(). Here's a simple approach with the new across functionality. I have tried using reshape, tapply, summarize but all to no avail. ![]() same with row 4 to 6 reducing to 1 row and so on. So i want to have the row 1 to 3 reduced to 1 row by taking average of each variable for the specie (and location). ![]() Here is the first few rows of my data SPECIES LOCATION X.COLONIZATION SPORE_DENSITY pH NO3 NH4 P Organic_C K Cu Mn Zn BD X.Sandġ C. How can i reduce the dataframe to 1 reading of each variable by taking the mean of the 3 readings. In my dataframe, i have 3 readings of each variable for a each observation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |