Description Usage Arguments Value
write.r2mym: your function to transform your R code into a MyM file that can be read by the TIMER model
1 2 3 4 |
data |
your R dataframe that needs to be transformed to MyM, should include only the data to be written (no excessive columns) |
outputfile |
Your data output file, includes full path (if necessary) and file extension (e.g. ".dat") |
value.var |
string indicating the column containing the numeric values |
MyM.vartype |
the MyM variable type, e.g. 'REAL' |
MyM.varname |
the full name for the variable in MyM, e.g. 'main.submodel.childunderweight_deaths' |
time.dependent |
TRUE or FALSE, whether the variable is time dependent and the first column of data indicates the year |
sep.years |
what characters to print after each year. '\n' is added automatically (Default is ',') |
sep.data |
what characters to print after each regular number |
matrix.format |
Default output is all the numbers for year X on one row. This setting makes multiple rows, leaving only the last dimension on one row (e.g. region) (matters for IMAGE input files!) (makes it slow, though) |
comment.line |
Documentation line (e.g. original data source). It's an optional comment line to add at the top, crucial for IMAGE input files. |
header.line |
optional, specifiy the exact header line yourself (replaces MyM.vartype, MyM.varname) - beware: more scope for human error! |
returns a data file in the path provided under outputfile
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.