Skip to content

RStudio addin to paste paths as character vectors, Windows-friendly escaped and quoted.

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

lgaborini/rstudio-pastepath

Repository files navigation

pastepath

R-CMD-check

The goal of {pastepath} is to let Windows users copy-paste a path in RStudio (e.g. from Explorer), automatically dealing with the backslashes/quotes.

  • Backslashes \ are always converted to /
  • Double quotes are added, if necessary

Examples

  • C:\Users\MyUser\my project becomes "C:/Users/MyUser/my project"
    "C:\Users\MyUser\my project" becomes "C:/Users/MyUser/my project"
    'C:\Users\MyUser\my project' becomes 'C:/Users/MyUser/my project'

  • Relative paths:
    data\cache becomes "data/cache"

Installation

You can install the addin from this GitHub:

remotes::install_github("lgaborini/rstudio-pastepath")

Usage

The addin provides two commands:

  • "Paste path as character vector" (default usage)
    Useful for paths containing spaces, the clipboard contents are escaped, then surrounded by " (unless already wrapped in " or ').
    Note: it works also for text data to quickly create a character vector.
  • "Paste path without quotes"
    As before, but it skips the wrapping.

Protip: assign a keyboard shortcut to one of these commands (e.g. ctrl+shift+V)!

About

RStudio addin to paste paths as character vectors, Windows-friendly escaped and quoted.

Topics

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages