On 06/03/2012 1:02 PM, Robert Baer wrote:> In following a thread on this mailing list, I encounter an apparent issue
> with **Edit | Paste commands only** in the Windows R-GUI.
>
> Reproducible steps:
>
> Go to (using IE?):
> http://www.r-bloggers.com/select-operations-on-r-data-frames/
>
> Find the section entitled 'Duplicate row names'
> Copy the following lines from the web page
> < a = matrix(1:18, nrow=6, ncol=3)
> < rownames(a)<- c('a', 'a', 'a',
'b', 'b', 'b')
> < colnames(a)<- c('foo', 'bar', 'bat')
> < a
>
> Open R-GUI 2.14.2 under Windows 7
> Using R-GUI menu, Choose **Edit | Paste Commands Only**
>
> Result: Nothing appears on the console.
> Hit Edit | Paste or ctrl-v and verify that the code is contained on the
> clipboard as expected
>
> [Note: upon pasting into MSWord the clipboard contents are, by default,
> pasted as "HTML" not "unformatted" text]
>
> Is this a bug or just unsupported use of the command?
I would say unsupported use. That menu option is for copying from the
console to the console. It can generally handle some variations on the
prompt (e.g. it will work on the output of example()), but it's not
going to know that you mean < to be the prompt, even if you use
options(prompt="< ") to tell it.
Duncan Murdoch> Rob
>
> > R.Version()
> $platform
> [1] "i386-pc-mingw32"
>
> $arch
> [1] "i386"
>
> $os
> [1] "mingw32"
>
> $system
> [1] "i386, mingw32"
>
> $status
> [1] ""
>
> $major
> [1] "2"
>
> $minor
> [1] "14.2"
>
> $year
> [1] "2012"
>
> $month
> [1] "02"
>
> $day
> [1] "29"
>
> $`svn rev`
> [1] "58522"
>
> $language
> [1] "R"
>
> $version.string
> [1] "R version 2.14.2 (2012-02-29)"
>
>
> ------------------------------------------
> Robert W. Baer, Ph.D.
> Professor of Physiology
> Kirksville College of Osteopathic Medicine
> A. T. Still University of Health Sciences
> 800 W. Jefferson St.
> Kirksville, MO 63501
> 660-626-2322
> FAX 660-626-2965
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.