error message for every parenthesis

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error message for every parenthesis

Tara Kerin
Hi,

I seem to be having the same problem Garrett (below) had in 2009.
However, I do not have functions named try written in my active code.
In fact, I don't have any of my own functions written at all yet.  I
did just install version 3.2.1 today, and the errors started after
that.  Please advise!

Thank you,

Tara Kerin

An example from my GUI is below:

[Workspace restored from /Users/tarakerin/.RData]
[History restored from /Users/tarakerin/.Rapp.history]

Error in try(gsub("\\s+", " ", paste(capture.output(print(args(library))),  :
  unused argument (silent = TRUE)
> library()



On 7/13/2009 12:35 PM, Garrett Grolemund wrote:
>* Whenever I type a parenthesis immediately following a word (as if I'm
*>* entering a function) R displays the following error
*> >* Error in try(gsub("\\s+", " ", paste(capture.output(print(args(try))),  :
*>*   unused argument(s) (silent = TRUE)
*>>* try(
*> >* The above is pasted from my R console. The error appears above the command
*>* because it appears immediately upon typing the parenthesis.  It does not
*>* wait until I try to execute the command.  This happens for every function.
*>* I can finish typing the function and execute it.  But these error messages
*>* make it difficult to debug my code.  In particular, if I have options(error
*>* = recover) set, the above crashes R.
*> >* I can avoid the error by typing the parentheses first and then moving the
*>* cursor back to type in the word. This error displays on the console whether
*>* I'm typing in the console or in an open document window.
*> >* I'm using the mac GUI for R.  The error only occurs on my Macbook (OS X
*>* 10.5.7), which I bought a few months ago.  It has occurred  every time I use
*>* R on this computer.  It has happened with R 2.8 and now R 2.91.
*> >* Any idea what may be going on?
*
Presumably this has something to do with command completion or argument
hints.  From the "silent = TRUE" error, and your example, I would guess
you have a function named try(), and the GUI is finding yours instead of
the one in the base package.

The GUI shouldn't do that, it should look in the right place, but as a
workaround, you could remove your function named "try", and call it
something else.

Duncan Murdoch

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: error message for every parenthesis

Michael Dewey-3
Dear Tara

1 - why did you install 3.2.1 when 3.2.3 is the latest version
2 - what happens if you delete .RData and .Rapp.history from your workspace?
3 - you do have a function try as it is part of R

On 16/02/2016 02:49, Tara Kerin wrote:

> Hi,
>
> I seem to be having the same problem Garrett (below) had in 2009.
> However, I do not have functions named try written in my active code.
> In fact, I don't have any of my own functions written at all yet.  I
> did just install version 3.2.1 today, and the errors started after
> that.  Please advise!
>
> Thank you,
>
> Tara Kerin
>
> An example from my GUI is below:
>
> [Workspace restored from /Users/tarakerin/.RData]
> [History restored from /Users/tarakerin/.Rapp.history]
>
> Error in try(gsub("\\s+", " ", paste(capture.output(print(args(library))),  :
>    unused argument (silent = TRUE)
>> library()
>
>
>
> On 7/13/2009 12:35 PM, Garrett Grolemund wrote:
>> * Whenever I type a parenthesis immediately following a word (as if I'm
> *>* entering a function) R displays the following error
> *> >* Error in try(gsub("\\s+", " ", paste(capture.output(print(args(try))),  :
> *>*   unused argument(s) (silent = TRUE)
> *>>* try(
> *> >* The above is pasted from my R console. The error appears above the command
> *>* because it appears immediately upon typing the parenthesis.  It does not
> *>* wait until I try to execute the command.  This happens for every function.
> *>* I can finish typing the function and execute it.  But these error messages
> *>* make it difficult to debug my code.  In particular, if I have options(error
> *>* = recover) set, the above crashes R.
> *> >* I can avoid the error by typing the parentheses first and then moving the
> *>* cursor back to type in the word. This error displays on the console whether
> *>* I'm typing in the console or in an open document window.
> *> >* I'm using the mac GUI for R.  The error only occurs on my Macbook (OS X
> *>* 10.5.7), which I bought a few months ago.  It has occurred  every time I use
> *>* R on this computer.  It has happened with R 2.8 and now R 2.91.
> *> >* Any idea what may be going on?
> *
> Presumably this has something to do with command completion or argument
> hints.  From the "silent = TRUE" error, and your example, I would guess
> you have a function named try(), and the GUI is finding yours instead of
> the one in the base package.
>
> The GUI shouldn't do that, it should look in the right place, but as a
> workaround, you could remove your function named "try", and call it
> something else.
>
> Duncan Murdoch
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

--
Michael
http://www.dewey.myzen.co.uk/home.html

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: error message for every parenthesis

Tara Kerin
Thank you both for your quick reply!
I did install 3.2.3, it appears that was just a typo in my earlier message.

Yes! deleting the workspace and history seems to correct the problem. I
will also not continue the practice of saving my workspace. I have also now
downloaded R studio.  Thank you for the tip. The interface is nice, and I
hope this will help my transition over to R.  I'll have to send my thanks
to Garrett as well. :)

I appreciate your help with this, and your patience with a R newbie!

Thanks,
Tara

On Tue, Feb 16, 2016 at 3:42 AM, Michael Dewey <[hidden email]>
wrote:

> Dear Tara
>
> 1 - why did you install 3.2.1 when 3.2.3 is the latest version
> 2 - what happens if you delete .RData and .Rapp.history from your
> workspace?
> 3 - you do have a function try as it is part of R
>
> On 16/02/2016 02:49, Tara Kerin wrote:
>
>> Hi,
>>
>> I seem to be having the same problem Garrett (below) had in 2009.
>> However, I do not have functions named try written in my active code.
>> In fact, I don't have any of my own functions written at all yet.  I
>> did just install version 3.2.1 today, and the errors started after
>> that.  Please advise!
>>
>> Thank you,
>>
>> Tara Kerin
>>
>> An example from my GUI is below:
>>
>> [Workspace restored from /Users/tarakerin/.RData]
>> [History restored from /Users/tarakerin/.Rapp.history]
>>
>> Error in try(gsub("\\s+", " ",
>> paste(capture.output(print(args(library))),  :
>>    unused argument (silent = TRUE)
>>
>>> library()
>>>
>>
>>
>>
>> On 7/13/2009 12:35 PM, Garrett Grolemund wrote:
>>
>>> * Whenever I type a parenthesis immediately following a word (as if I'm
>>>
>> *>* entering a function) R displays the following error
>> *> >* Error in try(gsub("\\s+", " ",
>> paste(capture.output(print(args(try))),  :
>> *>*   unused argument(s) (silent = TRUE)
>> *>>* try(
>> *> >* The above is pasted from my R console. The error appears above the
>> command
>> *>* because it appears immediately upon typing the parenthesis.  It does
>> not
>> *>* wait until I try to execute the command.  This happens for every
>> function.
>> *>* I can finish typing the function and execute it.  But these error
>> messages
>> *>* make it difficult to debug my code.  In particular, if I have
>> options(error
>> *>* = recover) set, the above crashes R.
>> *> >* I can avoid the error by typing the parentheses first and then
>> moving the
>> *>* cursor back to type in the word. This error displays on the console
>> whether
>> *>* I'm typing in the console or in an open document window.
>> *> >* I'm using the mac GUI for R.  The error only occurs on my Macbook
>> (OS X
>> *>* 10.5.7), which I bought a few months ago.  It has occurred  every
>> time I use
>> *>* R on this computer.  It has happened with R 2.8 and now R 2.91.
>> *> >* Any idea what may be going on?
>> *
>> Presumably this has something to do with command completion or argument
>> hints.  From the "silent = TRUE" error, and your example, I would guess
>> you have a function named try(), and the GUI is finding yours instead of
>> the one in the base package.
>>
>> The GUI shouldn't do that, it should look in the right place, but as a
>> workaround, you could remove your function named "try", and call it
>> something else.
>>
>> Duncan Murdoch
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>>
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp&d=CwIC-g&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=prT9XxFuaRugndr7R7tjdw&m=HVCyKiQWRxny54BBUQ0nDk5GMBt-Tqu5QKL9lPLHz68&s=q4D_wqmRhBJGJthwMhvTyghlur-p0y7tvRFFyQzEKrY&e=
>> PLEASE do read the posting guide
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html&d=CwIC-g&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=prT9XxFuaRugndr7R7tjdw&m=HVCyKiQWRxny54BBUQ0nDk5GMBt-Tqu5QKL9lPLHz68&s=Q6yO2ncF0da0PoI6_hWTYJpGUERfu3iQB1Uvl_-rr_I&e=
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
> --
> Michael
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dewey.myzen.co.uk_home.html&d=CwIC-g&c=clK7kQUTWtAVEOVIgvi0NU5BOUHhpN0H8p7CSfnc_gI&r=prT9XxFuaRugndr7R7tjdw&m=HVCyKiQWRxny54BBUQ0nDk5GMBt-Tqu5QKL9lPLHz68&s=dg8BMn7W326f_R6GuQUhbH3-QoXSzP40qHbv_wLeNkI&e=

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.