[R] Ignore escape characters in a string...
ruipbarradas at sapo.pt
Tue Apr 8 17:35:17 CEST 2014
There is support for the clipboard on Windows 7.
Also, note that on Windows your solution leaves a connection open so
maybe the following is better.
# copy the next line
clipb <- file("clipboard")
winpath <- readLines(clipb)
And, just to avoid backslashes altogether,
fun <- function(x) gsub("\\\\", "/", x)
Hope this helps,
Em 08-04-2014 16:17, Barry Rowlingson escreveu:
> On Tue, Apr 8, 2014 at 4:00 PM, Jonathan Greenberg <jgrn at illinois.edu>wrote:
>> C:\Program Files\R\R-3.0.3
> Does R on windows have clipboard support? I can do this on Linux:
> > readLines(file("clipboard"))
>  "C:\\Program Files\\R\\R-3.0.3"
> - that's from a copy of a path with only single slashes in. But
> help(connections) on my linux system doesn't mention the Windows
> Some ppl on SO have assorted solutions involving Windows scripting tools
> that tweak the clipboard so you can Ctrl-V a modified value:
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help