mlf176f2/r-autoyas.el — Issue #1: pnorm
Author: mlf176f2
Created: 2011-12-02 19:24:12+00:00
State: open

In a R process, could you type "pnorm" When I do this, I get
>
> > pnorm
> function (q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)
> .Internal(pnorm(q, mean, sd, lower.tail, log.p))
>
>
> Which allows R-autoyas to guess this function is in a prebuilt package.
>
> Could you tell me what you get?

Dear Matt,

thanks for your help and sorry for the very late response.

I get the same output as you:
function (q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE)
.Internal(pnorm(q, mean, sd, lower.tail, log.p))

>
> In the interim, you could customize `r-autoyas-expand-package-functions-only' to nil.

I tried this and started Aquamacs again (C-h v r-autoyas-expand-package-functions-only now shows nil), but it did not change the behavior when I type in "pnorm" and press TAB.

Do you have any ideas what is going wrong?

If I type in "pnorm(" and hit TAB, I get the following in a split buffer:

--------------------------------------------------------------------------------
Click on a completion to select it.
In this buffer, type RET to select the completion near point.

Possible completions are:
log.p= lower.tail=
mean= q=
sd=
--------------------------------------------------------------------------------

But that should be the internal R behavior, I also get this if I don't have r-autoyas installed at all.

Cheers,

Marius

> This should allow functions to expand even if they are not a bulit-in packages. Tell me if that works for you.
>
> Matt.
>
> On Wed, Sep 28, 2011 at 2:54 PM, Hofert Jan Marius wrote:
> Dear all,
>
> I work with Aquamacs 2.3a under Mac OS X 10.6.8.
> I would like to use r-autoyas and put in the following lines [and nothing more] in Preferences.el:
>
> ;; r-autoyas; see http://www.svenhartenstein.de/Software/R-autoyas
> (require 'r-autoyas)
> (load-file "~/Library/Preferences/Aquamacs Emacs/r-autoyas/r-autoyas.el")
>
> After saving and restarting Aquamacs, I open an .R file and an R process. By typing "pnorm" and hitting TAB, this should expand the arguments of the function pnorm. However, I obtain "Namespace: `nil'" and nothing happens.
> What is wrong?
>
> I can use C-h v r-autoyas- + TAB and obtain:
>
> Possible completions are:
> r-autoyas-auto-expand-with-paren
> r-autoyas-cache
> r-autoyas-echo-inject-commands
> r-autoyas-expand-package-functions-only
> r-autoyas-ignored-functions
> r-autoyas-lisp-based-dot-replacement
> r-autoyas-number-of-commas-before-return
> r-autoyas-paren-skip-autopair
> r-autoyas-preloaded-packages
> r-autoyas-r-based-dot-replacement
> r-autoyas-remove-explicit-assignments
> r-autoyas-save-expression-to-memory
> r-autoyas-use-lisp-based-dot-replacement
> r-autoyas-use-r-based-dot-replacement
> r-autoyas-wrap-on-exit
>
> This should mean that r-autoyas is found. But why is it not working? Any ideas?
>
> Marius
>
>
>
>
> ETH Zurich
> Dr. Marius Hofert
> RiskLab, Department of Mathematics
> HG E 65.2
> Rämistrasse 101
> 8092 Zurich
> Switzerland
>
> Phone +41 44 632 2423
> marius.hofert@math.ethz.ch
> http://www.math.ethz.ch/~hofertj
>
> ______________________________________________
> ESS-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

ETH Zurich
Dr. Marius Hofert
RiskLab, Department of Mathematics
HG E 65.2
Rämistrasse 101
8092 Zurich
Switzerland

Phone +41 44 632 2423
marius.hofert@math.ethz.ch
http://www.math.ethz.ch/~hofertj