-
Notifications
You must be signed in to change notification settings - Fork 2
/
collate_run.Rd
64 lines (54 loc) · 1.88 KB
/
collate_run.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_handling.R
\name{collate_run}
\alias{collate_run}
\title{Collate Vortex .run output files}
\usage{
collate_run(
project,
scenario,
npops = 1,
dec_sep = ".",
dir_in = NULL,
save2disk = TRUE,
dir_out = "ProcessedData",
verbose = TRUE
)
}
\arguments{
\item{project}{The Vortex project name to be imported}
\item{scenario}{The scenario name}
\item{npops}{The total number of simulated populations including the
metapopulation}
\item{dec_sep}{Decimal separator (default ".")}
\item{dir_in}{The local folder containing Vortex files, default: NULL. If
not specified, will fall back to use current working directory.}
\item{save2disk}{Whether to save the data as rda and csv, default: TRUE}
\item{dir_out}{The local path to store the output. Default: ProcessedData}
\item{verbose}{Progress messages, default: TRUE}
}
\value{
a list with two elements: run, a data.frame with data from all
Vortex files and lrun, where the same data are re-arranged in long format
}
\description{
\code{collate_run} collates all Vortex output files with extension .run
matching the project and scenario name in a given directory into one named
list.
}
\details{
\code{dir_in} may contain other files; only files matching the project and
the scenario name will be read.
\code{dir_out} is created within the working directory unless a full path is
provided.
If no matching files are found in the given directory, an error is reported.
When \code{verbose=TRUE} the progress (i.e. the file being read) is reported
on screen.
}
\examples{
# Using Pacioni et al. example files. See ?pacioni for more details.
pac.dir <- system.file('extdata', 'pacioni', package='vortexRdata')
# Run collate_run on all .run of the project 'Pacioni_et_al' and
run <- collate_run('Pacioni_et_al', 'ST_LHS', 1, dir_in=pac.dir,
save2disk=FALSE)
}