Description Usage Arguments Details Author(s) References See Also Examples
batch version of read.data() function, can read all the files in a folder
1 | batch.read(path, index = NULL, spnum = 2, islandnum = 10)
|
path |
a vector recording all the files in a folder, which can be generated by convert.filenames() function |
index |
local fielname/path for recording all the parameter combination index matrix generated from make.parcomb() function |
spnum |
species number in the model, default is 2 |
islandnum |
patch number in the model,default is 10 |
return a list of data, each list member represents a model output
Youhua Chen <yhchen@zoology.ubc.ca>
Chen YH (2012) coexist: an R package for performing species coexistence modeling and analysis under asymmetric dispersal and fluctuating source-sink dynamics. http://code.google.com/p/coexist.
read.data
,
read.patchdata
,
make.parcomb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (path = pathvector, index = NULL, spnum = 2, islandnum = 10)
{
num <- length(path)
outlist <- list()
length(outlist) <- num
if (length(index) == 0) {
for (i in 1:num) {
outlist[[i]] <- read.patchdata(path = path[i], spnum = spnum,
islandnum = islandnum)
}
}
if (length(index) != 0) {
for (i in 1:num) {
outlist[[i]] <- read.data(path = path[i], index = index,
spnum = spnum, islandnum = islandnum)
}
}
return(outlist)
}
|
function (path = pathvector, index = NULL, spnum = 2, islandnum = 10)
{
num <- length(path)
outlist <- list()
length(outlist) <- num
if (length(index) == 0) {
for (i in 1:num) {
outlist[[i]] <- read.patchdata(path = path[i], spnum = spnum,
islandnum = islandnum)
}
}
if (length(index) != 0) {
for (i in 1:num) {
outlist[[i]] <- read.data(path = path[i], index = index,
spnum = spnum, islandnum = islandnum)
}
}
return(outlist)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.