[R-SIG-Mac] Clipboard problems

2014-09-03 Thread Duncan Murdoch
The standard advice for reading the clipboard on OSX is to use the pipe(pbpaste) connection, but I'm finding it misses the last line. (I believe the last line in my examples generally doesn't include any EOL marker.) For example, if I highlight these three lines: line 1 line 2 line 3 and copy

Re: [R-SIG-Mac] Clipboard problems

2014-09-03 Thread peter dalgaard
On 03 Sep 2014, at 13:56 , Duncan Murdoch murdoch.dun...@gmail.com wrote: The standard advice for reading the clipboard on OSX is to use the pipe(pbpaste) connection, but I'm finding it misses the last line. (I believe the last line in my examples generally doesn't include any EOL marker.)

Re: [R-SIG-Mac] Clipboard problems

2014-09-03 Thread Hans-Jörg Bibiko
On 03 Sep 2014, at 14:29, peter dalgaard pda...@gmail.com wrote: This works, presumably because text connections are not non-blocking: readLines(textConnection(system(pbpaste,intern=TRUE))) [1] line 1 line 2 line 3” or the following should also work on each OSX readLines(pipe(pbpaste|awk

Re: [R-SIG-Mac] Clipboard problems

2014-09-03 Thread Adrian Dușa
On Wed, Sep 3, 2014 at 3:29 PM, peter dalgaard pda...@gmail.com wrote: On 03 Sep 2014, at 13:56 , Duncan Murdoch murdoch.dun...@gmail.com wrote: [...] This works, presumably because text connections are not non-blocking: readLines(textConnection(system(pbpaste,intern=TRUE))) [1] line 1 line 2