olea %>%
filter(var == "Aglan") %>% # to have a balanced nb of 'view'
chop(~view) %>% # split into a list of 2
npoly %>% # separately apply npoly
# strict equivalent to lapply(npoly)
combine %>% # recombine
PCA %>% plot # an illustration of the 2 views
# treated separately
Run the code above in your browser using DataLab