Description Usage Arguments Details Examples
Structures representing a directory of data files
1 2 3  | gadget_directory(dir, mainfile = "main")
gadget_dir_write(gd, obj)
gadget_dir_read(gd, file_name, missing_okay = TRUE)
 | 
dir | 
 Name of directory, will be created if it doesn't exist.  | 
mainfile | 
 Name of the GADGET mainfile to use.  | 
gd | 
 A   | 
obj | 
 The   | 
file_name | 
 File to read out of the directory and turn into a   | 
missing_okay | 
 If true, return an empty file instead of complaining that the given file does not exist.  | 
This handles
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  | ## Not run: 
# Create a gadget directory
gd <- gadget_directory('./out')
# Read in the likelihood file
likelihood <- gadget_dir_read(gd, 'likelihood')
# Write out an area file to "./out/areas", replacing any existing file
gadget_dir_write(gd, gadget_file("areas", components = list(list(north = 1:3, south = 4:7))))
# Replace a likelihood component if one already exists with
# the same name/type or append it to the bottom
gadget_dir_write(gd, gadget_likelihood_component("understocking", name = "frank"))
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.