|
|
Greetings All.
My apologies for a question whose answer is probably
readily available somewhere (for some interpetation
of "somewhere") ...
Say I have just typed (from a sheet of paper) several
lines into the R command-line, and what I see is:
> chisq.test(matrix(c(3,6,3,4,4,
+ 4,1,4,6,5,
+ 2,7,4,2,5,
+ 8,2,4,4,2,
+ 3,4,5,4,4),ncol=5))
Later, I find that would like to re-input the data part
of this command ("matrix(c(...)...)"). Without the "+"
continuation prompts, it would be easy to do this by
copy&paste with the mouse in one operation. With the "+"
marks there, I have to do the copy&paste for each separate line.
So is there a way to suppress the output of the "+" at the
beginning of each continuation line?
(The above is one of the smaller examples of this situation;
sometimes I have wished to do this for commands extending over,
say, 15-20 lines).
With thanks,
Ted.
-------------------------------------------------
E-Mail: (Ted Harding) < [hidden email]>
Date: 30-Jul-2012 Time: 09:58:02
This message was sent by XFMail
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
|
|
Hello,
See the setting of options()$continue
> options("continue" = "")
Error in options(continue = "") : invalid value for 'continue'
> options("continue" = " ")
> x <-
1:5
> x
[1] 1 2 3 4 5
Hope this helps,
Rui Barradas
Em 30-07-2012 09:58, (Ted Harding) escreveu:
> Greetings All.
> My apologies for a question whose answer is probably
> readily available somewhere (for some interpetation
> of "somewhere") ...
>
> Say I have just typed (from a sheet of paper) several
> lines into the R command-line, and what I see is:
>
>> chisq.test(matrix(c(3,6,3,4,4,
> + 4,1,4,6,5,
> + 2,7,4,2,5,
> + 8,2,4,4,2,
> + 3,4,5,4,4),ncol=5))
>
> Later, I find that would like to re-input the data part
> of this command ("matrix(c(...)...)"). Without the "+"
> continuation prompts, it would be easy to do this by
> copy&paste with the mouse in one operation. With the "+"
> marks there, I have to do the copy&paste for each separate line.
>
> So is there a way to suppress the output of the "+" at the
> beginning of each continuation line?
>
> (The above is one of the smaller examples of this situation;
> sometimes I have wished to do this for commands extending over,
> say, 15-20 lines).
>
> With thanks,
> Ted.
>
> -------------------------------------------------
> E-Mail: (Ted Harding) < [hidden email]>
> Date: 30-Jul-2012 Time: 09:58:02
> This message was sent by XFMail
>
> ______________________________________________
> [hidden email] 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.
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
|
|
On Mon, Jul 30, 2012 at 4:58 AM, Ted Harding < [hidden email]> wrote:
> Greetings All.
> My apologies for a question whose answer is probably
> readily available somewhere (for some interpetation
> of "somewhere") ...
>
> Say I have just typed (from a sheet of paper) several
> lines into the R command-line, and what I see is:
>
>> chisq.test(matrix(c(3,6,3,4,4,
> + 4,1,4,6,5,
> + 2,7,4,2,5,
> + 8,2,4,4,2,
> + 3,4,5,4,4),ncol=5))
>
> Later, I find that would like to re-input the data part
> of this command ("matrix(c(...)...)"). Without the "+"
> continuation prompts, it would be easy to do this by
> copy&paste with the mouse in one operation. With the "+"
> marks there, I have to do the copy&paste for each separate line.
>
> So is there a way to suppress the output of the "+" at the
> beginning of each continuation line?
>
> (The above is one of the smaller examples of this situation;
> sometimes I have wished to do this for commands extending over,
> say, 15-20 lines).
>
On Windows just copy the command to the clipboard and the use Edit |
Paste Commands to paste them back (as opposed to just Paste) in and it
will remove the leading junk on each line as it pastes it in.
Another possibility which is not specific to Windows is to issue:
history()
and then copy from the history -- the history output has no leading
junk in the first place.
--
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
|
|
If I understand the question correctly the answer is probably not to type anything at the R command line. A good editor or interface is a better approach
http://en.wikipedia.org/wiki/R_%28programming_language%29#InterfacesJohn Kane
Kingston ON Canada
> -----Original Message-----
> From: [hidden email]
> Sent: Mon, 30 Jul 2012 09:58:09 +0100 (BST)
> To: [hidden email]
> Subject: [R] Turning off continuation prompt?
>
> Greetings All.
> My apologies for a question whose answer is probably
> readily available somewhere (for some interpetation
> of "somewhere") ...
>
> Say I have just typed (from a sheet of paper) several
> lines into the R command-line, and what I see is:
>
>> chisq.test(matrix(c(3,6,3,4,4,
> + 4,1,4,6,5,
> + 2,7,4,2,5,
> + 8,2,4,4,2,
> + 3,4,5,4,4),ncol=5))
>
> Later, I find that would like to re-input the data part
> of this command ("matrix(c(...)...)"). Without the "+"
> continuation prompts, it would be easy to do this by
> copy&paste with the mouse in one operation. With the "+"
> marks there, I have to do the copy&paste for each separate line.
>
> So is there a way to suppress the output of the "+" at the
> beginning of each continuation line?
>
> (The above is one of the smaller examples of this situation;
> sometimes I have wished to do this for commands extending over,
> say, 15-20 lines).
>
> With thanks,
> Ted.
>
> -------------------------------------------------
> E-Mail: (Ted Harding) < [hidden email]>
> Date: 30-Jul-2012 Time: 09:58:02
> This message was sent by XFMail
>
> ______________________________________________
> [hidden email] 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.
____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
|
|
Dear Ted,
I don't think that it's really advisable to do so, because it might lead to confusion, but you could set options(continue=" ").
Best,
John
------------------------------------------------
John Fox
Sen. William McMaster Prof. of Social Statistics
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/
On Mon, 30 Jul 2012 09:58:09 +0100 (BST)
(Ted Harding) < [hidden email]> wrote:
> Greetings All.
> My apologies for a question whose answer is probably
> readily available somewhere (for some interpetation
> of "somewhere") ...
>
> Say I have just typed (from a sheet of paper) several
> lines into the R command-line, and what I see is:
>
> > chisq.test(matrix(c(3,6,3,4,4,
> + 4,1,4,6,5,
> + 2,7,4,2,5,
> + 8,2,4,4,2,
> + 3,4,5,4,4),ncol=5))
>
> Later, I find that would like to re-input the data part
> of this command ("matrix(c(...)...)"). Without the "+"
> continuation prompts, it would be easy to do this by
> copy&paste with the mouse in one operation. With the "+"
> marks there, I have to do the copy&paste for each separate line.
>
> So is there a way to suppress the output of the "+" at the
> beginning of each continuation line?
>
> (The above is one of the smaller examples of this situation;
> sometimes I have wished to do this for commands extending over,
> say, 15-20 lines).
>
> With thanks,
> Ted.
>
> -------------------------------------------------
> E-Mail: (Ted Harding) < [hidden email]>
> Date: 30-Jul-2012 Time: 09:58:02
> This message was sent by XFMail
>
> ______________________________________________
> [hidden email] 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.
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
|
|
On Mon, 30 Jul 2012 09:58:09 +0100 (BST) (Ted Harding)
< [hidden email]> wrote:
>> Greetings All.
>> My apologies for a question whose answer is probably
>> readily available somewhere (for some interpetation
>> of "somewhere") ...
>>
>> Say I have just typed (from a sheet of paper) several
>> lines into the R command-line, and what I see is:
>>
>>> chisq.test(matrix(c(3,6,3,4,4,
>> + 4,1,4,6,5,
>> + 2,7,4,2,5,
>> + 8,2,4,4,2,
>> + 3,4,5,4,4),ncol=5))
>>
>> Later, I find that would like to re-input the data part
>> of this command ("matrix(c(...)...)"). Without the "+"
>> continuation prompts, it would be easy to do this by
>> copy&paste with the mouse in one operation. With the "+"
>> marks there, I have to do the copy&paste for each separate line.
>>
>> So is there a way to suppress the output of the "+" at the
>> beginning of each continuation line?
At some level of complexity it is worth thinking of using a programming
front end to R rather than the basic GUI. I have really benefited from
downloading RStudio myself, but there are any number of other choices
that might be suited to your needs as well. Knowing how long you have
been around this list, you probably can name more than I.
Rob
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
|
|
On 30.07.2012 15:36, Robert Baer wrote:
> On Mon, 30 Jul 2012 09:58:09 +0100 (BST) (Ted Harding)
> < [hidden email]> wrote:
>>> Greetings All.
>>> My apologies for a question whose answer is probably
>>> readily available somewhere (for some interpetation
>>> of "somewhere") ...
>>>
>>> Say I have just typed (from a sheet of paper) several
>>> lines into the R command-line, and what I see is:
>>>
>>>> chisq.test(matrix(c(3,6,3,4,4,
>>> + 4,1,4,6,5,
>>> + 2,7,4,2,5,
>>> + 8,2,4,4,2,
>>> + 3,4,5,4,4),ncol=5))
>>>
>>> Later, I find that would like to re-input the data part
>>> of this command ("matrix(c(...)...)"). Without the "+"
>>> continuation prompts, it would be easy to do this by
>>> copy&paste with the mouse in one operation. With the "+"
>>> marks there, I have to do the copy&paste for each separate line.
>>>
>>> So is there a way to suppress the output of the "+" at the
>>> beginning of each continuation line?
> At some level of complexity it is worth thinking of using a programming
> front end to R rather than the basic GUI. I have really benefited from
> downloading RStudio myself, but there are any number of other choices
> that might be suited to your needs as well. Knowing how long you have
> been around this list, you probably can name more than I.
Or just see ?options and its argument "continue".
Uwe Ligges
> Rob
>
> ______________________________________________
> [hidden email] 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.
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
|
|