< Back

Use Raw Strings to Load Multiple Files Using Multiple Lines


In 2018 R2 we’ve added the capability for raw strings to be used in Macros. This added the capability to space the files out on multiple lines for readability.

Before raw strings, all of the files had to be placed on one line which made for terrible readability when loading more than a couple of data files.

Here is the syntax for loading multiple files:

$!ReadDataSet R”INPUTFILES(“/this/is/a/somewhat/long/file/name/File1.dat”
                                                                “/this/is/a/somewhat/long/file/name/File2.dat”
                                                                “/this/is/a/somewhat/long/file/name/File3.dat”
                                                                “/this/is/a/somewhat/long/file/name/File4.dat”
                                                                “/this/is/a/somewhat/long/file/name/File5.dat”)INPUTFILES”

Raw strings are of the form:
R"delimiter(raw_characters)delimiter"
where
delimiter:
is an optional character sequence composed of zero or more printable characters that does not contain parentheses, backslashes, or whitespace
raw_characters:
is any character sequence, that does not match the closing delimiter sequence:
   )delimiter"

For most cases an empty delimiter is sufficient. If the preamble needs to contain the two character sequence, )", then a custom delimiter conforming to the raw string format defined above must be used.
For example: Preamble=R"LaTeX(....)LaTeX"