user_data_dir() returns path to the user-specific data directory and
user_config_dir() returns full path to the user-specific configuration
directory. These are the same on Windows and Mac but different on Linux.
These functions first use
R_USER_CONFIG_DIR if set.
Otherwise, they follow platform conventions. Typical user config and data
Mac OS X:
Win XP (not roaming):
C:\\Documents and Settings\\<username>\\Data\\<AppAuthor>\\<AppName>
Win XP (roaming):
C:\\Documents and Settings\\<username>\\Local Settings\\Data\\<AppAuthor>\\<AppName>
Win 7 (not roaming):
Win 7 (roaming):
Only Linux makes the distinction between config and data:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
is the name of application. If NULL, just the system directory is returned.
(only required and used on Windows) is the name of the appauthor or distributing body for this application. Typically it is the owning company name. This falls back to appname.
is an optional version path element to append to the
path. You might want to use this if you want multiple versions
of your app to be able to run independently. If used, this
would typically be
If TRUE (the default) will expand the
Operating system whose conventions are used to construct the
requested directory. Possible values are "win", "mac", "unix". If
1 2 3 4 5 6 7
 "/home/anon/.local/share/rappdirs"  "C:/Users/<username>/AppData/rappdirs/rappdirs"  "C:/Users/<username>/Local/rappdirs/rappdirs"  "/home/anon/.config/rappdirs"  "/home/anon/Library/Application Support/rappdirs"  "/home/anon/.config/rappdirs/x86_64-pc-linux-gnu-platform/4.0"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.