## Not run: ------------------------------------
# # to see all methods for Coo objects.
# methods(class='Coo')
# # Let's take an Out example. But all methods shown here
# # work on Ldk (try data(wings) ) and on Opn (try data(olea))
# data(bot)
#
# # Primarily a 'Coo' object, but also an 'Out'
# class(bot)
# inherits(bot, "Coo")
# panel(bot)
# stack(bot)
# plot(bot)
#
# # Getters (you can also use it to set data)
# bot[1] %>% coo_plot()
# bot[1:5] %>% str()
#
# # Setters
# bot[1] <- shapes[4]
# panel(bot)
#
# bot[1:5] <- shapes[4:8]
# panel(bot)
#
# # access the different components
# # $coo coordinates
# head(bot$coo)
# # $fac grouping factors
# head(bot$fac)
# # or if you know the name of the column of interest
# bot$type
# # table
# table(bot$fac)
# # an internal view of an Out object
# str(bot)
#
# # subsetting
# # see ?filter, ?select, and their 'see also' section for the
# # complete list of dplyr-like verbs implemented in Momocs
#
# length(bot) # the number of shapes
# names(bot) # access all individual names
# bot2 <- bot
# names(bot2) <- paste0('newnames', 1:length(bot2)) # define new names
## ---------------------------------------------
Run the code above in your browser using DataLab