Description Usage Arguments Details Value Examples
Useful functions that create sequentially numbered file names.
1 2 3 | buildFileNameFun(..., prefix = "ponto", ext = ".rda", sep = "-")
buildFileName(n, prefix = "ponto", ext = NULL, sep = "-", nc = NULL)
|
prefix |
Prefix of the filename. |
ext |
File name extension. If |
sep |
Separator element between different parts of the file name |
n |
Numbers used to build file name. |
nc |
Number of characters to use when building the numbers. If null use largest number in |
It is very common useful to build file names with sequential numbers
within. So that the numbers appear in the correct order in directory
listings or simply that when viewing the file names they appear
homogeneous it is nice to have a function that perform build this file
names easily. buildFileName
takes as input a sequence of numbers
and builds the file names with given prefix, extension and
separator.
The other function, buildFileNameFun
returns a
function that creates the file name given the indexes. It allows
multiple indexes so that, for instance a grid of file names can be
created.
Character vector with the names.
1 2 3 4 | print(buildFileName(1:10, ext='.txt'))
print(buildFileName(1:10, ext='.txt', sep='_'))
print(buildFileName(1:10, ext=NULL))
print(buildFileName(1:10, nc=3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.