# NOT RUN {
## These are just illustrative examples. Users should fill in their
## own files instead of the dummy names used here.
## suppose that the current working directory contains
## 100 spc files named: rand.1.spc, rand.2.spc, ...,
## rand.100.spc
## read the files in:
spc.list <- read.multiple.objects(".","rand","spc")
## you can access each spc using the id extracted from
## the file name, e.g.:
summary(spc.list[["1"]])
## more usefully, you might want to iterate over the
## whole list, e.g., to calculate mean V:
mean(sapply(spc.list,V))
## notice that ids are arbitrary strings
## e.g., suppose that directory /home/me/animals
## contains sounds.dog.vgc and sounds.elephant.vgc
## we read the vgcs in:
vgc.list <- read.multiple.objects("/home/me/animals","sounds","vgc")
## accessing the elephant vgc:
V(vgc.list[["elephant"]])
## of course, tfl-reading works in the same way (assuming
## that the animals directory also contains some tfl files):
tfl.list <- read.multiple.objects("/home/me/animals","sounds","tfl")
# }
Run the code above in your browser using DataLab