[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, substitute, formals, etc. should be able to do the 
job, but I didn't find help online.


Anyone lend a helping hand?
TIA  Christian

--
Christian W. Hoffmann
CH - 8915 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christ...@echoffmann.ch
home: www.echoffmann.ch

__
R-help@r-project.org 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.


[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"
Execution halted

Before dissecting my *.Rnw systematically , I wanted to ask, if  R CMD 
Rd2pdf has changed since the last R version.


sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.7.5 (Lion)

locale:
[1] C

attached base packages:
 [1] tools stats4splines   parallel  datasets
 [6] compiler  graphics  grDevices stats grid
[11] utils methods   base

other attached packages:
 [1] survival_2.38-3spatial_7.3-11
..

Any ideas ?
C.

--

Christian W. Hoffmann
CH - 8915 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christ...@echoffmann.ch
home: www.echoffmann.ch

__
R-help@r-project.org 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.


[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) : object 'add.expr' not found

Can anyone give me a pointer to where I should investigate my problem 
further?


C.

--
Christian W. Hoffmann
CH - 8915 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christ...@echoffmann.ch
home: www.echoffmann.ch

__
R-help@r-project.org 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.


[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 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christ...@echoffmann.ch
home: www.echoffmann.ch

__
R-help@r-project.org 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.


[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 Zeichenkette 
beginnend mit \

ERROR: unable to collate and parse R files for package ‘cwhmisc’
* removing 
‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/cwhmisc’
* restoring previous 
‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/cwhmisc’


under

 sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
Running under: OS X 10.7.5 (Lion)

locale:
[1] C

attached base packages:
 [1] tools stats4splines   parallel  compiler  grid stats
 [8] graphics  grDevices utils datasets  methods   base

other attached packages:
 [1] survival_2.38-1spatial_7.3-9  rpart_4.1-9 nnet_7.3-9
 [5] mgcv_1.8-6 nlme_3.1-120   foreign_0.8-63 codetools_0.2-11
 [9] cluster_2.0.1  class_7.3-12   boot_1.3-16 Matrix_1.2-1
[13] MASS_7.3-40KernSmooth_2.23-14 cwhmisc_6.0 lattice_0.20-31

Strategy of mine:
- search the net :
- grep for '\'  : to no avail
- remove ~/.Rprofile : no success (it contained only 
'options(repos=c(CRAN=http://stat.ethz.ch/CRAN/;))' anyway)

- change CRAN mirror in .Rprofile : no success
- check vignette : nothing

- R CMD  check --as-cran /Users/hoffmann/R/cwhmisc : Installation failed.
  00install.out reads (also) Error : '\' is an unrecognized escape in 
character string starting \

ERROR: unable to collate and parse R files for package 'cwhmisc'

What could be a way out of this maze?

--
Christian W. Hoffmann
CH - 8915 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christ...@echoffmann.ch
home: www.echoffmann.ch

__
R-help@r-project.org 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.

[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 uninstalled 
packages).


Any help ?
TIA

--
Christian W. Hoffmann
CH - 8915 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christ...@echoffmann.ch
home: www.echoffmann.ch

__
R-help@r-project.org 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.


[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 %%
+   hungry # [1] I am hungry
Error: could not find function %%
Execution halted.

What is wrong in my .Rd file?

PS:  The placement of the closing } and the escaping of % seem also 
critical.


TIA  Christian

--
Christian W. Hoffmann
Mathematiker
CH - 8915 Hausen am Albis, Schweiz
Rigiblickstrasse 15 b, Tel.+41-44-7640853
mailto: christ...@echoffmann.ch
home: www.echoffmann.ch

__
R-help@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.


[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.3 (2014-03-06)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.0.3 tools_3.0.3
-

The FIREWALL has nothing to do with it

Has anyone seen this to happen, too?

Christian

__
R-help@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.


[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 version 3.0.3 (2014-03-06)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] C

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

loaded via a namespace (and not attached):
[1] compiler_3.0.3 tools_3.0.3
-

The FIREWALL is responsible, deactivating will allow help.start()? Bur I 
don't want to work without the firewall!!
Settingthe firewall for  Firefox and Aquamacs to allow incoming 
connections (translated from German)will also not help.


Thanks for considering.

Christian

__
R-help@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.


[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?

Thanks for considering.

Christian

__
R-help@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.


[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 with my configuration?

Thanks for considering.

Christian

__
R-help@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.


[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,
CH - 8915 Hausen am Albis, Switzerland
Rigiblickstrasse 15 b, Tel.+41-44-7640853
c-w.hoffm...@sunrise.ch,
christ...@echoffmann.ch,
www.echoffmann.ch

__
R-help@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.


[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 that name.


How could I possibly find the culprit?

TIA

C.

sessionInfo()  R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] C

attached base packages:
 [1] tools tcltk stats4splines   parallel  datasets compiler
 [8] graphics  grDevices stats grid  utils methods base

other attached packages:
 [1] survival_2.37-4spatial_7.3-6  rpart_4.1-1 nnet_7.3-6
 [5] nlme_3.1-109   foreign_0.8-53 codetools_0.2-8 cluster_1.14.4
 [9] class_7.3-7Matrix_1.0-12  MASS_7.3-26 KernSmooth_2.23-10
[13] cwhmisc_4.1lattice_0.20-15

--
Christian W. Hoffmann,
CH - 8915 Hausen am Albis, Switzerland
Rigiblickstrasse 15 b, Tel.+41-44-7640853
(!! c-w.hoffm...@sunrise.ch, will be eliminated in the near future,
instead Bitte nicht mehr benutzen !!, stattdessen: )
mailto: christ...@echoffmann.ch
home: www.echoffmann.ch

__
R-help@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.


[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.echoffmann.ch

__
R-help@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.


[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 windows, but 
clicking on them will not open their buffers. Also, reinstallation of 
Aquamacs-2.4 (the newest version) did not help.


What can I do?

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.echoffmann.ch

__
R-help@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.


[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.15.2 (2012-10-26)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

attached base packages:
 [1] tools tcltk stats4splines   parallel  datasets compiler
 [8] graphics  grDevices stats grid  utils methods base

other attached packages:
 [1] survival_2.36-14  spatial_7.3-5 rpart_3.1-55 nnet_7.3-5
 [5] nlme_3.1-105  mgcv_1.7-22   foreign_0.8-51 codetools_0.2-8
 [9] cluster_1.14.3class_7.3-5   boot_1.3-7 Matrix_1.0-9
[13] MASS_7.3-22   KernSmooth_2.23-8 cwhmisc_4.0 lattice_0.20-10


--
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.echoffmann.ch

__
R-help@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.


[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 execute this execution.


What can be done here?

TIA

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.echoffmann.ch

__
R-help@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.


[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

attached base packages:
 [1] tools tcltk stats4splines   parallel  datasets compiler
 [8] graphics  grDevices stats grid  utils methods base

other attached packages:
 [1] survival_2.36-14  spatial_7.3-3 rpart_3.1-53 nnet_7.3-1
 [5] nlme_3.1-104  mgcv_1.7-18   foreign_0.8-50 codetools_0.2-8
 [9] cluster_1.14.2class_7.3-3   boot_1.3-4 Matrix_1.0-6
[13] MASS_7.3-18   KernSmooth_2.23-7 cwhmisc_3.0 lattice_0.20-6


The .tar.gz has been generated by R CMD build, and is a source package, 
as suggested in the help.


TIA

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.echoffmann.ch

__
R-help@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.


[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   NA   NANA
[2,] 0.4795913 0.253541   NA 0.9782823

where do the two Nas in columns 2 and 4 come from?

TIA

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.echoffmann.ch

__
R-help@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.


[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 on Mac OS X graphics is PDF based (so are almost all 
applications available). However, this process uses R's PDF device and 
not Mac OS X PDF facilities and thus doesn't yeild (???)

an exact copy of the device contents. For Mac-native solution, see (see 
Copying the image into the clipboard 
http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Copying-the-image-into-the-clipboard)
 
and quartz.save command.

7.3 Copying the image into the clipboard

You can copy the content of the quartz device window in the clipboard to 
make the resulting image available for pasting into other applications. 
The clipboard will contain both a PDF versiond (???) and a bitmap 
version of the quartz device window. Which version will be used depends 
on the pasting applications, most modern application will prefer the PDF 
version which is of higher quality as it supports vector graphics.

In the menu bar of the quartz window  'Edit' the copy command is 
active, but the is no choice in 'File' for saving the pdf !

Note that there is currently a difference between using the clipboard 
and saving to a PDF file (see Saving the image 
http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Saving-the-image). 
The latter will use R's PDF device which will not yield WYSIWYG results. 
However, using quartz.save ...

There is no function quartz.save in 2-15-1 !

Thanks for correcting the errors in the text and for enlighten me an 
quartz.save.

Christian

PS I wrote the following function for saving the quartz window (thanks 
\author{Ray Brownrigg \email{r...@mcs.vuw.ac.nz}):

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.))
   }

-- 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.echoffmann.ch


[[alternative HTML version deleted]]

__
R-help@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.


[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 packages:
 [1] tools tcltk stats4splines   parallel  datasets compiler
 [8] graphics  grDevices stats grid  utils methods base

other attached packages:
 [1] survival_2.36-14  spatial_7.3-3 rpart_3.1-53 nnet_7.3-1
 [5] nlme_3.1-104  mgcv_1.7-18   foreign_0.8-50 codetools_0.2-8
 [9] cluster_1.14.2class_7.3-3   boot_1.3-4 Matrix_1.0-6
[13] MASS_7.3-18   KernSmooth_2.23-7 cwhmisc_3.0 lattice_0.20-6


Who is willing to give me advice?

TIA  -- 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.echoffmann.ch

__
R-help@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.


[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 anything useful.

TIA  --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.echoffmann.ch

__
R-help@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.


[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...@sunrise.ch,
christ...@echoffmann.ch,
www.echoffmann.ch

__
R-help@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.


[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 readline enabled: How can I do that on mac osx? I 
work with


R version 2.15.1 (2012-06-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

TIA  --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.echoffmann.ch

__
R-help@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.


[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(object)) {
current.device - dev.cur()
dev.off(dev.copy(device = postscript, file = file, ...))
dev.set(current.device)
system(paste(lpr, file))
print(paste(file, printed.))
}
else {
if (missing(file))
file - Robjlpr.txt
sink(file)
object - as.character(substitute(object))
print(get(object))
sink()
system(paste(lpr, file))
print(paste(object, printed.))
}
}

Now, while
 

lpr()

[1] Rplotlpr.ps printed.

is working almost fine (the plot window of Quartz-2 is not sized correctly, 
what would you suggest, Ray Brownrig \email{r...@mcs.vuw.ac.nz} ?),

with  pdfc()

I get

Error in dev.off(dev.copy(device = pdf, file = file, ...)) :
  '...' used in an incorrect context

I searched the Web, but found no hint how to avoid  this error. So the culprit 
could be

device = pdf

On the other hand  executing


pdf()


generates the file

Rplotlpr.ps

but this very small and causes the Adobe Reader to say

This file is damaged and cannot be opened.


Thanks for help.

Chirsitan HOffmann

--
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.echoffmann.ch

__
R-help@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.


[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.echoffmann.ch

__
R-help@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.


[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
Rigiblickstrasse 15 b, Tel.+41-44-7640853
c-w.hoffm...@sunrise.ch,
christ...@echoffmann.ch,
www.echoffmann.ch

__
R-help@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.


[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
Rigiblickstrasse 15 b, Tel.+41-44-7640853
c-w.hoffm...@sunrise.ch,
christ...@echoffmann.ch,
www.echoffmann.ch

__
R-help@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.


[R] Package cwhmisc and problems

2012-08-28 Thread Christian Hoffmann

Hi,
I have revised my package cwhmisc and want to re-submit it (meeting a 
deadline soon). One big stumbling stone is the 'sudden' appearance of


 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 packages:
 [1] tools tcltk stats4splines   parallel  datasets  compiler
 [8] graphics  grDevices stats grid  utils methods   base

other attached packages:
 [1] survival_2.36-14  spatial_7.3-3 rpart_3.1-53  nnet_7.3-1 

 [5] nlme_3.1-104  mgcv_1.7-18   foreign_0.8-50 
codetools_0.2-8
 [9] cluster_1.14.2class_7.3-3   boot_1.3-4Matrix_1.0-6 


[13] MASS_7.3-18   KernSmooth_2.23-7 cwhmisc_3.0   lattice_0.20-6
 system(R CMD check /Users/hoffmann/R/cwhmisc)
* using log directory 
'/Users/hoffmann/Projects/LtoQ/Mathematics/cwhmisc.Rcheck'

* using R version 2.15.1 (2012-06-22)
* using platform: x86_64-apple-darwin9.8.0 (64-bit)
* using session charset: ASCII
* checking for file 'cwhmisc/DESCRIPTION' ... OK
* this is package 'cwhmisc' version '3.1'
* checking package namespace information ... OK
* checking package dependencies ...Error in if (x2 != x1) { : missing 
value where TRUE/FALSE needed

Execution halted

Grep-ing my source directory for '(x2 != x1)' does not find anything, so 
I guess this is a message internal to R CMD check, namely in


   package dependencies“ .

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 so far not answered my request)

Christian Hoffmann

--
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.echoffmann.ch

__
R-help@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.


[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 pointer 
in the archives(my search skills may be deficient..)


My sessionInfo():

R version 2.14.0 (2011-10-31)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)

locale:
[1] C

attached base packages:
 [1] tools tcltk stats4splines   parallel  grid  datasets
 [8] compiler  graphics  grDevices stats utils methods   base

other attached packages:
 [1] survival_2.36-10  spatial_7.3-3 rpart_3.1-50  nnet_7.3-1
 [5] nlme_3.1-102  mgcv_1.7-9foreign_0.8-46codetools_0.2-8
 [9] cluster_1.14.1class_7.3-3   boot_1.3-3Matrix_1.0-1
[13] MASS_7.3-16   KernSmooth_2.23-6 cwhmisc_3.0   lattice_0.20-0
Warning message:
'DESCRIPTION' file has 'Encoding' field and re-encoding is not possible   IS 
THIS ESSENTIAL ??




I would appreciate help very much

Christian

--
Christian W. Hoffmann,
Rigiblickstrasse 15 b, CH-8915Hausen am Albis, Switzerland,
Tel +41-44-7640853, c-w.hoffm...@sunrise.ch
www.wsl.ch/personal_homepages/hoffmann/

__
R-help@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.


[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 more contrast, and it is even worse 
for use with a beamer.


In the options menu I can open Appearance and then Foreground color 
for comint mode, but apart from the [quit] in the upper left corner I 
can see no hint how to make a choice, let alone make it permanent.


Or will I have to try Appearance  Customize Aquamacs?

M-x color-theme-select opens an empty frame with nothing to select from 
(Hint given in http://www.emacswiki.org/emacs/AquamacsFAQ)


What am I missing?

Thanks for help.

C.Hoffmann

--
Dr. Christian W. Hoffmann,
Swiss Federal Research Institute WSL
Zuercherstrasse 111, CH-8903 Birmensdorf, Switzerland
Tel +41-44-7392-277 (office), -111(exchange), -215  (fax)
christian.hoffm...@wsl.ch,  www.wsl.ch/personal_homepages/hoffmann/
Jene, die grundlegende Freiheit aufgeben wuerden, um eine geringe 
voruebergehende Sicherheit zu erwerben, verdienen weder Freiheit noch 
Sicherheit. - Benjamin Franklin


__
R-help@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.


[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 the light red.

This color annoys me because I need more contrast, and it is even worse
for use with a beamer.

In the options menu I can open Appearance and then Foreground color
for comint mode, but apart from the [quit] in the upper left corner I
can see no hint how to make a choice, let alone make it permanent.

Or will I have to try Appearance  Customize Aquamacs?

M-x color-theme-select opens an empty frame with nothing to select from
(Hint given in http://www.emacswiki.org/emacs/AquamacsFAQ)

What am I missing?

Thanks for help.

C.Hoffmann

--
Dr. Christian W. Hoffmann,
Swiss Federal Research Institute WSL
Zuercherstrasse 111, CH-8903 Birmensdorf, Switzerland
Tel +41-44-7392-277 (office), -111(exchange), -215  (fax)
christian.hoffm...@wsl.ch,  www.wsl.ch/personal_homepages/hoffmann/
Jene, die grundlegende Freiheit aufgeben wuerden, um eine geringe
voruebergehende Sicherheit zu erwerben, verdienen weder Freiheit noch
Sicherheit. - Benjamin Franklin

__
R-help@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.


[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 machine and source()-ed it.


Any ideas. It seems to belong in the base package, but this is 
unavailable for install.packages or update.packages.


Thanks for help.

C.Hoffmann

--
Dr. Christian W. Hoffmann,
Swiss Federal Research Institute WSL
Zuercherstrasse 111, CH-8903 Birmensdorf, Switzerland 
Tel +41-44-7392-277 (office), -111(exchange), -215  (fax)

christian.hoffm...@wsl.ch,  www.wsl.ch/personal_homepages/hoffmann/
Jene, die grundlegende Freiheit aufgeben wuerden, um eine geringe voruebergehende 
Sicherheit zu erwerben, verdienen weder Freiheit noch Sicherheit. - Benjamin 
Franklin

__
R-help@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.


[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

--

--
Christian W. Hoffmann,
Rigiblickstrasse 15 b, CH-8915Hausen am Albis, Switzerland,
Tel +41-44-7640853, c-w.hoffm...@sunrise.ch

__
R-help@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.


[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)
environment: namespace:stats

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 to learn which different versions of plot there 
are except trying plot.lm,  ...

best

-c

--
Dr. Christian W. Hoffmann,
Swiss Federal Research Institute WSL
Zuercherstrasse 111, CH-8903 Birmensdorf, Switzerland 
Tel +41-44-7392-277 (office), -111(exchange), -215  (fax)

[EMAIL PROTECTED],  www.wsl.ch/personal_homepages/hoffmann/
Jene, die grundlegende Freiheit aufgeben wuerden, um eine geringe voruebergehende 
Sicherheit zu erwerben, verdienen weder Freiheit noch Sicherheit. - Benjamin 
Franklin


--
Christian W. Hoffmann,
Rigiblickstrasse 15 b, CH-8915Hausen am Albis, Switzerland,
Tel +41-44-7640853, [EMAIL PROTECTED]

__
R-help@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.