with.sshfs_mount_point | R Documentation |
SSHFS can be a bit finicky and fail when reading lots of files. It can be safer, then, to mount and unmount the folder each time you read each file.
## S3 method for class 'sshfs_mount_point'
with(data, expr, ...)
data |
a mount object returned by [sshfs_mount()] |
expr |
any R expression thet will be evaluated. |
... |
ignored |
The function mounts the remote folder, evaluates the expresion and then unmounts. The 'expr' can access the locally-mounted folder with the '.folder' variable.
## Not run:
mount <- sshfs_mount("user", "remote.server.com", "~/data_folder", "~/loca_folder")
bici <- with(mount, read.csv(file.path(.folder, "some_file.csv")))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.