symlink | R Documentation |
This function creates a symbolic (soft) link to a file, in a solution that works for all major operating systems, so a file can have two names without actually duplicating data. Although the two paths can be specified directly, this function automatically handles a conversion for a common but troublesome case when the link is not in the current directory, in which case the file must be relative to the parent directory of the link, although it is more natural to specify the file relative to the current directory.
symlink(file, link, adjust_path = TRUE, verbose = TRUE)
file |
The file that will be linked. This function does not require this file to exist, but the link will be broken in that case. |
link |
The path to the link to the file. If this points to an existing file, or an existing link, it will be overwritten. |
adjust_path |
If |
verbose |
If |
# in this example, for the existing file, use this file provided by the package.
# Note that it is an absolute path, so it will not be edited.
file <- system.file("extdata", 'sample.bed', package = "genio", mustWork = TRUE)
# this is the path to the link
link <- tempfile('delete-me-example', fileext = '.bed')
# create the symbolic link!
symlink( file, link )
# delete example link when done
file.remove( link )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.