[ESS] S+ re-factoring ( some recent bugs/annoyances)
gerald.jean at dgag.ca
gerald.jean at dgag.ca
Thu Dec 13 14:18:17 CET 2012
Hello Vitalie,
the following functions are unknown to S+:
tryCatch, environmentName, environment
I am going to try to install the SVN version of S+ but I have no
administrative rights on the machie where I am running Splus, will it work
anyway???
Thanks,
Gérald
(Embedded image moved to file:
pic19718.gif)
Gerald Jean, M. Sc. en statistiques
Conseiller senior en statistiques Lévis (siège social)
Actuariat corporatif, 418 835-4900, poste
Modélisation et Recherche 7639
Assurance de dommages 1 877 835-4900, poste
Mouvement Desjardins 7639
Télécopieur : 418
835-6657
Faites bonne impression et imprimez seulement au besoin!
Ce courriel est confidentiel, peut être protégé par le secret professionnel et
est adressé exclusivement au destinataire. Il est strictement interdit à toute
autre personne de diffuser, distribuer ou reproduire ce message. Si vous l'avez
reçu par erreur, veuillez immédiatement le détruire et aviser l'expéditeur.
Merci.
Vitalie Spinu <spinuvit at gmail.com> a écrit sur 2012/12/12 11:22:45 :
> >> gerald.jean at dgag.ca
> >> on Wed, 12 Dec 2012 10:28:58 -0500 wrote:
>
> [...]
>
>
> gj> I am willing to test this release from SVN but have never installed
> gj> anything from SVN, where do I find how to do it???
>
> It's very easy. The somewhat obfuscated instructions are
> http://ess.r-project.org/Manual/ess.html#Installation
>
> Just do
>
> svn checkout https://svn.r-project.org/ESS/trunk ESS
>
> this creates ESS directory with the source inside. Switch to it and do
>
> make
>
> This step is not strictly necessary but it makes things faster.
>
> Now add to your init file:
>
> (load "~/path/to/ESS/lisp/ess-site")
>
> That's all.
>
> [...]
>
>
> >> > args("plot")
> >> function (x, y, ...)
> >> NULL
> >> >
>
> Good, now check if this function works:
>
> funnargs <-
> function(object){
> funname <- as.character(substitute(object))
> fun <- tryCatch(object, error=function(e) NULL) ## works for
> special objects also
> if(is.function(fun)) {
> args <- args(fun)
> fmls <- formals(args)
> fmls_names <- names(fmls)
> fmls <- gsub('\"', '\\\"', as.character(fmls), fixed=TRUE)
> args_alist <- sprintf("'(%s)", paste("(\"", fmls_names, "\"
> . \"", fmls, "\")", sep = '', collapse = ' '))
> envname <- environmentName(environment(fun))
> cat(sprintf('(list \"%s\" %s )\n', envname, args_alist))
> }
> }
>
> it should do something of this kind:
>
>
> > funnargs(plot)
> (list "graphics" '(("x" . "") ("y" . "") ("..." . "")) )
> > funnargs(ls)
> (list "base" '(("name" . "") ("pos" . "-1") ("envir" . "as.
> environment(pos)") ("all.names" . "FALSE") ("pattern" . "")) )
>
> If it works, then we are done. You will have your eldoc in the evening.
>
> Let me know what it returns for local functions:
>
> > tt <- list(fun = function(a = 4, b = 5) a*b)
> > funnargs(tt$fun)
> (list "R_GlobalEnv" '(("a" . "4") ("b" . "5")) )
>
>
> Vitalie
More information about the ESS-help
mailing list