[R] print (names and) values of parameters of function

2016-10-08 Thread Christian Hoffmann
I try to print (names and) values of parameters of a function within that function, like: F <- function(x, y, z=4, ...) { print("x = ", x, " , y = ", y, "... = " , ...) in a fashion that avoids the explicit mention of "x = ", x, " , y = ", y, "... = " , ... Combinations of eval, substitu

[R] Sweave vs. R CMD Rd2pdf --no-clean --force

2016-07-04 Thread Christian Hoffmann
Hi, I have a *.Rnw which I can Sweave with no problem, but which cannot be processed by R CMD Rd2pdf --no-clean --force. Th latter stops with creating vignettes ... ERROR Error: processing vignette 'cwhmisc.Rnw' failed with diagnostics: at cwhmisc.Rnw:31, could not find function "cformat" E

[R] object 'add.expr' not found

2016-06-27 Thread Christian Hoffmann
Since the change to R-3.2.1 I seem to be unable to compile and install my package cwhmisc. One evidence is the appearance of th messages in R CMD build and install: * installing *source* package 'cwhmisc' ... ** R ** inst ** preparing package for lazy loading Error in eval(expr, envir, enclos)

[R] value of variable in ls()

2015-10-18 Thread Christian Hoffmann
This may seem trivial: ls() gives me names of variables as a character vector. How can I print the values 'behind' those character values: ls() > "a" > a [1] 5 How can I do e.g. print("unknown"(ls())) and get the variable values in my current environment? -- Christian W. Hoffmann CH - 8915

[R] ERROR: unable to collate and parse R files

2015-07-19 Thread Christian Hoffmann
I tried in vain to execute R CMD install /Users/hoffmann/R/cwhmisc ('cwhmisc' is the package name) * installing to library ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library’ * installing *source* package ‘cwhmisc’ ... ** R Error : '\&' ist eine unbekannte Escape-Sequenz in der

[R] R CMD wants (unnecessary) packages ?

2015-03-01 Thread Christian Hoffmann
When executing R CMD check etc. on a package, 00install.out tells me Warning in file.copy(file.path(.Library, pkg, "DESCRIPTION"), pd) : problem copying /Library/Frameworks/R.framework/Resources/library/MASS/DESCRIPTION to /var/ although I do not use MASS ( and all the other recently u

[R] infix paste and package

2014-06-19 Thread Christian Hoffmann
Hi, I can successfully define in .R and in > R "%&%" <- function(a,b) { paste(a,b,sep="") } nd use in R > "a" %&% "b" [1] "ab" but in a package definition .Rd \name{pasteInfix} \alias{pasteInfix} \alias{\%&\% } \usage{ a \%&\% b } will fail in R CMD check --as-cran saying "I am"

[R] was: 127.0.0.1:22381/doc/html/index.html hep.start won't start

2014-04-15 Thread Christian Hoffmann
Dear All, I narrowed down my problem to library(tcltk) in .First() which causes the freezing of R and Aquamacs running it. What could make tcltk behave in this way? Christian I am using Aquamacs 3.0a (GNU Emacs 24.3.50.2)with R3.0.3, newly installed: sessionInfo() --- R version 3.0

[R] 127.0.0.1:22381/doc/html/index.html hep.start won't start

2014-04-02 Thread Christian Hoffmann
Dear All, Sorry to bother you. I narrowed my problem to the function help.start() which causes the freezing of R by mill endlessly after M-x R waiting for 127.0.0.1:22381/doc/html/index.html to load. I am using Aquamacs 3.0a (GNU Emacs 24.3.50.2)with R3.0.3, newly installed: sessionInfo()

[R] 127.0.0.1:22381/doc/html/index.html won't start 2.

2014-04-01 Thread Christian Hoffmann
Dear All, Sorry to bother you. I am using Aquamacs 3.0a (GNU Emacs 24.3.50.2), newly installed, on Mac OSX 10.7.5 . Somehow, on my mac even the newly installed R3.0.3 will mill endlessly after M-x R waiting for 127.0.0.1:22381/doc/html/index.html to load. How can I find out, what is wrong

[R] 127.0.0.1:22381/doc/html/index.html won't start

2014-04-01 Thread Christian Hoffmann
Dear All, Sorry to bother you. I am using Aquamacs 3.0a (GNU Emacs 24.3.50.2), newly installed. Somehow, on my mac even the newly installed R3.0.3 will mill endlessly after M-x R waiting for 127.0.0.1:22381/doc/html/index.html to load. How can I find out, what is wrong with my configuration

[R] history ?? 2 no readline ?

2013-12-16 Thread Christian Hoffmann
Hi, What could the cause of history() Error in savehistory(file) : no history available to save savehistory(file="myhist") Error in savehistory(file) : no history available to save save.image() be? I have the information in the attached gif Cheers Christian -- Christian W. Hoffmann, C

[R] there is no package called 'boot'

2013-10-14 Thread Christian Hoffmann
Hi, R CMD mypackage /Users/hoffmann/R/cwhmisc check --as-cran gives me * checking Rd cross-references ... WARNING Error in find.package(package, lib.loc) : there is no package called 'boot' although there is no textual reference to 'boot' in my /R and /man within /cwhmisc nor any file of

[R] chooseCRANmirror

2013-05-31 Thread Christian Hoffmann
Obviously, chooseCRANmirror() is run at every start. Can I permanently store my choice with q() and 'yes' ? Cheers Christian -- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland Rigiblickstrasse 15 b, Tel.+41-44-7640853 c-w.hoffm...@sunrise.ch, christ...@echoffmann.ch, www.echoffm

[R] Aquamacs Preferences not showing, windows inaccessible, Scrolling not possible !!!

2013-01-12 Thread Christian Hoffmann
Hi, sorry for bothering, but I suspect the start of M-x R within Aquamacs is causing my problems: *Scrolling* is *not possible*, neither by key stroke nor by mouse. Aquamacs does not show all windows. 'Prefences', 'About A.', 'Check fo updates' will not open. Menu 'windows' shows several window

[R] R --no-readline ?, was: history and readline, Mac OSX

2012-12-06 Thread Christian Hoffmann
Hi, By chance I came across an iESS buffer showing that R had been started with this option: R --no-readline This seems to prevent the use of history() which I noticed earlier. Why is this start option chosen, and where can I change this? ESS version 5.13, R: > sessionInfo() R version 2.1

[R] .Rd vs. .R, matrix multiplication

2012-12-03 Thread Christian Hoffmann
Hi, I find it cumbersomesome the I have to use \%*\% in .Rd files vs. %*% in .R files. R CMD check will refuse %*% in .Rd files. I would like to have %*% in .Rd files to be able to execute expressions with matrix multiplication from .Rd files directly, but ESS (version 5.13) would refuse to e

[R] install own package ?

2012-11-14 Thread Christian Hoffmann
what happens here: > install.packages("/Users/hoffmann/R/cwhmisc_4.0.tar.gz",repos = NULL) Error: file '/Users/hoffmann/R/cwhmisc_4.0.tar.gz' is not an OS X binary package > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] C attac

[R] division giving spurious NA

2012-11-05 Thread Christian Hoffmann
Hi, I stumbled acros the following disturbing computation: x <- matrix(c( 2.594028,0.8468867,NA,2.244600,1.215535,0.8233032,NA,3.176697,3.425393,2.5345225,NA,3.247219),nrow=3,byrow=TRUE) x # having NA in column3 only x[1:2,]/x[3,] ## [,1] [,2] [,3] [,4] [1,] 0.7572935

[R] quartz.save of the FAQ (Mac)

2012-10-22 Thread Christian Hoffmann
Hi, In the FAQ for Mac http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html there is 7.2 Saving the image You can can (???) the content of the quartz device window into a PDF file. This is not explained! This is a very simple way to export high quality graphics from R into other applications

[R] help stored permanently

2012-10-22 Thread Christian Hoffmann
Hi, Each > help.start() generates a new tree of the R help system, somewhere in 127.0.0.1:xxx, each xxx being difeerent. This tree disappears when exiting R. How can the current help tree copied to a permanent place for reference outside a running R? This would be practical for not having to

[R] history and readline, Mac OSX

2012-10-17 Thread Christian Hoffmann
Hi, Obviously history() will only work with readline installed: so far I have not been able to find working advice for installing and enabling readline on MacOSX. > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] C attached base pac

[R] history() does not work? 2

2012-10-10 Thread Christian Hoffmann
Hi, history() gives Error in savehistory(file) : no history available to save although I can scroll throu history with C^uparrow an C^downarrow. How can I make history() work and/or show the current history in a *file*, so that I can choose from previous commands? The notion of having re

[R] Contacting Delphi ??

2012-10-10 Thread Christian Hoffmann
What does the sudden appearance of "Contacting Delphi ..the oracle is unavailable. We apologize for any inconvenience." mean? A bug? It appears at plotting. Thanks Christian -- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland Rigiblickstrasse 15 b, Tel.+41-44-7640853 c-w.hoffm

[R] history() does not work?

2012-10-10 Thread Christian Hoffmann
Hi, > history() gives Error in savehistory(file) : no history available to save although I can scroll throu history with C^uparrow an C^downarrow. How can I make history() work and/or show the current history in a file, so that I can choose from previous commands? The web did not throw up a

[R] device error pdf

2012-10-08 Thread Christian Hoffmann
Hi, Iwrote 'pdfc' in analogy to 'lpr': pdfc <- function (file = "Rplot.pdf") { current.device <- dev.cur() dev.off(dev.copy(device = pdf, file = file, ...)) dev.set(current.device) print(paste(file, "generated.")) } lpr <- function (object, file = "Rplotlpr.ps", ...) { if (missing

[R] R CMD check and browser

2012-09-15 Thread Christian Hoffmann
Hi, Every time I do system("R CMD check mypackckage" the process executes a help.start(). Why does this happen? Cheers Christian -- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland Rigiblickstrasse 15 b, Tel.+41-44-7640853 c-w.hoffm...@sunrise.ch, christ...@echoffmann.ch, www.ec

[R] history ??

2012-09-10 Thread Christian Hoffmann
Hi, What could the cause of > history() Error in savehistory(file) : no history available to save > savehistory(file="myhist") Error in savehistory(file) : no history available to save > save.image() be?. Cheers Christian -- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland Rigibl

[R] Sweave Error: c("'...Rnw'", "'...Rnw'") is not ASCII and does not declare an encoding

2012-09-10 Thread Christian Hoffmann
Sorry to bother everyone. What has changed in Sweave since 2009? Sweave("Crs.Rnw") Error: c("'Crs.HdrFct.Rnw'", "'Crs.Rnw'") is not ASCII and does not declare an encoding No error in 2009 with the same files. heers Christian -- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland R

[R] Package cwhmisc and problems

2012-08-28 Thread Christian Hoffmann
ependencies“ . This error appeared so suddenly during a run of R CMD check's that I have no explanation, I beg to ask to give me a pointer to how to circumvent this block. I can send you my whole source of *.R and *.Rd files if that can be of any help. Thanks for assisting me (r-devel has

[R] start.help() and browser

2012-01-16 Thread Christian Hoffmann
Hi, when calling help.start() I get the message "> sh: firefox: command not found" and the help system is inaccessible (which is an absolute nuisance, but bypassable under http://stat.ethz.ch/R-manual/R-patched/library/) I have no idea what is broken in my system and I didn'n find any poin

[R] Aquamacs/emacs and color of echo in R console 2!

2009-11-24 Thread Christian Hoffmann
Hi Sorry, I forgot to state the version: GNU Emacs 22.3.1 I have been unable to find information on the following problem: All the text in my *R* window is shown in light red, starting after the echo "This is mgcv 1.5-6 . For overview type ", the following `help("mgcv-package")' is already in

[R] Aquamacs/emacs and color of echo in R console

2009-11-24 Thread Christian Hoffmann
Hi I have been unable to find information on the following problem: All the text in my *R* window is shown in light red, starting after the echo "This is mgcv 1.5-6 . For overview type ", the following `help("mgcv-package")' is already in the light red. This color annoys me because I need m

[R] get.gpar, grid.Call

2009-11-23 Thread Christian Hoffmann
Hi I have been unable to find information on the following problem: Error in get.gpar(): unable to find function "grid.Call" Reinstalling R-2.10.0, platform: i386-pc-mingw32 did not help. Before this message there was a "get.gpar" missing. We then transported the source code from another mach

[R] Simulation of linear lists

2009-01-31 Thread Christian Hoffmann
Hi there has anybody experimented with the implementation in R of linear lists, as described e.g. in books on Pascal (Jensen and Wirth), or Wirth, "Algorithms and data structures" ? See \url{www.dbnet.ece.ntua.gr/~adamo/csbooksonline/AD.pdf } Pointers would be welcome. Christian -- -- Chri

[R] How to retrieve a method

2008-12-05 Thread Christian Hoffmann
Hi there, I am interested in the inner workings of wilcox.test: > wilcox.test function (x, ...) UseMethod("wilcox.test") how can I get at the code, if it is R-code? For Methods one should be able to learn what extension to use, but here default or such do not help. Is there a wayplot.default