draft.data.script {icesTAF} | R Documentation |
Draft or create a boot data script
Description
Create an ‘R’ file to fetch data including adding metadata via roxygen2 fields to the top of the file.
Usage
draft.data.script(name, title, description, format, originator, year, period,
access, content)
Arguments
name |
the name of the dataset and the file name that will be created. |
title |
description of the data, including survey names or the like. |
description |
a more involved description if required. |
format |
the format of the data produced, e.g. "csv" |
originator |
who prepared the data, e.g. a working group acronym. |
year |
year of the analysis when the data were used. The default is the current year. |
period |
a numeric vector of the form |
access |
data access code: |
content |
the r code that fetches and saves the data |
Examples
## Not run:
# Create boot folder
mkdir("boot")
# Create boot script, boot/mydata.R
draft.data.script(name="mydata", title="Title", description="Description",
format="txt", originator="Me", year="2022",
period=c(2000,2020), access="Public",
content='write(pi, file="pi.txt")')
# Create metadata, boot/DATA.bib
taf.roxygenise(files="mydata.R")
# Run boot script, creating boot/data/mydata/pi.txt
taf.boot()
## End(Not run)
[Package icesTAF version 4.2.0 Index]