Forza ritenzione radici per settore su 5 alberi

library(tidyverse)
## -- Attaching packages ---------------- tidyverse 1.2.1 --
## v ggplot2 3.0.0     v purrr   0.2.5
## v tibble  1.4.2     v dplyr   0.7.6
## v tidyr   0.8.1     v stringr 1.3.1
## v readr   1.1.1     v forcats 0.3.0
## -- Conflicts ------------------- tidyverse_conflicts() --
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(openxlsx)
df <- read.xlsx("mdata.xlsx")
n_sect <- 8
a_sect <- 2*pi/n_sect
dir <- -(1:n_sect)*a_sect+a_sect/2
library(ggplot2)
ggplot(mapping = aes(x=cos(dir), y=sin(dir), 
                     label = LETTERS[1:n_sect])) + 
  geom_text()
plot of chunk unnamed-chunk-1
plot of chunk unnamed-chunk-1
names(dir) <- letters[1:n_sect]
ggplot(df, aes(x=dir[Sector], colour=Tree, y=Force)) +
  geom_smooth(se=F)
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
plot of chunk unnamed-chunk-1
plot of chunk unnamed-chunk-1
tx <- 'tree5_1m'
tree_label <- df %>% 
  filter((Sector=='a' & Tree!=tx)|(Sector=='b' & Tree==tx)) %>% 
  mutate(d = dir[Sector])
ggplot(df, aes(x=dir[Sector], colour=Tree, y=Force)) +
  geom_point() +
  geom_smooth(se=F) +
  geom_text(data = tree_label, aes(x=d, y=Force, label=Tree))
## `geom_smooth()` using method = 'loess' and formula 'y ~ x'
plot of chunk unnamed-chunk-1
plot of chunk unnamed-chunk-1