[R] State "disabled" to "Normal" menu

John Fox jfox at mcmaster.ca
Sun May 18 05:26:59 CEST 2008


Dear Handa,

It's very difficult for me to tell from your message what it is you're
trying to do. Are you simply a user of the Rcmdr, or are you trying to
write a plug-in?

If the former, Rcmdr menu items are disabled when they are for some
reason inappropriate to the current context. For example, before
there's an active data set, (almost) all of the statistical-analysis
menu items are disabled; similarly, if your data set has no factors,
then menus items for operations requiring factors, such as building
contingency tables, are disabled.

If the latter, the next-to-last field in each line of the
menu-definition file is (optionally) a quoted logical expression: if
the expression evaluates to TRUE, then the corresponding menu item is
activated; if FALSE, it is not. For example, for the two-way
contingency table menu item, the activation field is "factorsP(2)",
which evaluates to TRUE if there are at least two factors in the active
data set.

I hope this helps,
 John

On Sun, 18 May 2008 09:22:14 +0700 (ICT)
 Handayani Situmorang <handasitumorang at yahoo.co.id> wrote:
> Hello all.
>   is there a simple way to change the state of menu from "disabled"
> to "normal"? i have read from the Rcmdr code, but it's really
> difficult for me. I'm new for R. Thank you so much.
>    
>   Regard 
>   Handa
> 
>        
> ---------------------------------
>  Yahoo! Toolbar kini dilengkapi dengan Search Assist.   Download
> sekarang juga.
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.

--------------------------------
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/



More information about the R-help mailing list