dir.check | R Documentation |
Checks for the existance of the directories to where the designated file(s) will be output.
dir.check(filename)
filename |
Strings. The name of the files you want to save (and thus of whose parent directories you want to create if needed). |
While doing your analyses, you may often want several directories
to where the output files can be saved.
But before saving, you need to first check
whether appropriate directory to save outputs already exists.
dir.check()
automatically does this process
by just passing filename(s) you are going to save subsequently.
Thus the basic functionality is almost the same to
dir.create(basename(x))
,
but dir.check()
accepts multiple filenames
and performs some additional path handling.
Strings. Names of the directories that was actually created.
## Not run:
f <- "test.eps"
dir.check(f)
eps(f, width = 6, height = 4)
example(htb.colors)
dev.off()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.