kunstler / ForestAvalanche

Analyse of CLPA and NFI data
0 stars 0 forks source link

Compute basal area per species per plot for IFN C4 C3 C2 #2

Closed kunstler closed 4 years ago

Cavaliere-maude commented 4 years ago

compute sum of basal area with weight per hectar using w and c13 excluding dead tree to have a table with in row the plot (idp) and in column the species. using group_by in dplyr

Cavaliere-maude commented 4 years ago

packages loading

require(drake)
require(dplyr)

data loading

loadd(treesC4)

basal area calculation

treesC4$w are factors then --> as.numeric(as.character(treesC4$w))

treesC4$basal_area <- (treesC4$c13 * 2 / (4*3.14) ) * as.numeric(as.character(treesC4$w))

data formatting

nom de l'espèce "espar", nom de la placette "idp"

#undergroups <- treesC4 %>% group_by(idp, espar) %>% summaries(mean_basal_area <- mean(basal_area))

Erreur : function summaries() in drake is defunct.

I will continue to formatting data monday

Cavaliere-maude commented 4 years ago

View "basal_area_calc" file commit this day

kunstler commented 4 years ago

put species name replace NA per 0

Cavaliere-maude commented 4 years ago

4 unknown species code in C4 data

kunstler commented 4 years ago

https://www.dropbox.com/s/bdq5d9lreos6r7v/all_species_C4.csv?dl=0