
library(transformeR)
library(igraph)

# An example subset from S4_tas_iberia
arg.list <- list() # latitudinal extent
#Dataset subset is applied using subsetGrid:
 dataset.subset <- subsetGrid(grid = S4_tas_iberia,
                             members = 1:3, 
                             season = NULL,
                             years = 1991:1995, 
                             lonLim = c(-5,3), 
                            latLim = c(37,43),
                            drop = FALSE)
                            
 command.call <- "subsetGrid(grid = S4_tas_iberia,
                             members = 1:3, 
                             season = NULL,
                             years = 1991:1995, 
                             lonLim = c(-5,3), 
                             latLim = c(37,43),
                             drop = FALSE)"
 # Encoding provenance: 
 dsgraph <- metaclipR.DatasetSubset(package = "transformeR",
                                    fun = "subsetGrid",
                                    arg.list = command.call,
                                    output = "dataset.subset")
 # The Graph containing the metadata has been created.
 # This is a bit congested, but note that it is not conceived to be visualized in R
 plot(dsgraph$graph, vertex.size = 5, edge.arrow.size=0.1)
 