[Rd] termplot & predict.lm. some details about calculating predicted values with "other variables set at the mean"

2011-12-13 Thread Paul Johnson
I'm making some functions to illustrate regressions and I have been staring at termplot and predict.lm and residuals.lm to see how this is done. I've wondered who wrote predict.lm originally, because I think it is very clever. I got interested because termplot doesn't work with interactive models:

[Rd] termplot & predict.lm. some details about calculating predicted values with "other variables set at the mean"

2011-12-13 Thread Paul Johnson
I'm making some functions to illustrate regressions and I have been staring at termplot and predict.lm and residuals.lm to see how this is done. I've wondered who wrote predict.lm originally, because I think it is very clever. I got interested because termplot doesn't work with interactive models:

Re: [Rd] Rcpp too good to be true?

2011-12-13 Thread Jeffrey Pollock
Hey Martin, Thanks for the reply, that is a much better way!!! On another note, I actually meant to post this on the rcpp-devel list (and have forwarded it there, noting that there was a mistake in the original post), however I'm quite glad I posted it here by mistake to see this answer :) Cheer

Re: [Rd] bug in sum() on integer vector

2011-12-13 Thread Hervé Pagès
Hi Ted, On 11-12-13 04:52 PM, (Ted Harding) wrote: [...] Now, computer programs for numerical computation can broadly be divided into two types. In one, "arbitrary precision" is available: you can tell the program how many decimal digits you want it to work to. An example of this is 'bc': h

Re: [Rd] problems with iconv

2011-12-13 Thread Joshua Ulrich
As Uwe asked, please cite the original messages. On Tue, Dec 13, 2011 at 4:10 PM, RogerP wrote: > Sorry, but IMHO saying "read the manual" does not constitute actual help. > > But here it is from the manual: > > A suitably comprehensive iconv function is essential. The R usage requires > iconv to

Re: [Rd] bug in sum() on integer vector

2011-12-13 Thread Ted Harding
[See at end] On 13-Dec-11 23:41:12, Hervé Pagès wrote: > Hi Duncan, > > On 11-12-10 05:27 AM, Duncan Murdoch wrote: >> On 11-12-09 4:41 PM, Hervé Pagès wrote: >>> Hi Duncan, >>> >>> On 11-12-09 11:39 AM, Duncan Murdoch wrote: On 09/12/2011 1:40 PM, Hervé Pagès wrote: > Hi, > > x<

Re: [Rd] Rcpp too good to be true?

2011-12-13 Thread Martin Morgan
On 12/13/2011 03:48 PM, Jeffrey Pollock wrote: Hello all, I've been working on a package to do various things related to the Conway-Maxwell-Poisson distribution and wanted to be able to make fast random draws from the distribution. My R code was running quite slow so I decided to give Rcpp a bas

Re: [Rd] bug in sum() on integer vector

2011-12-13 Thread Murray Stokely
FYI, the new int64 package on CRAN gets this right, but is of course somewhat slower since it is not doing hardware 64-bit arithmetic.  x <- c(rep(180003L, 1000), -rep(120002L, 1500)) library(int64) sum(as.int64(x)) # [1] 0 - Murray 2011/12/9 Hervé Pagès : > Hi, >

Re: [Rd] problems with iconv

2011-12-13 Thread RogerP
Sorry, but IMHO saying "read the manual" does not constitute actual help. But here it is from the manual: A suitably comprehensive iconv function is essential. The R usage requires iconv to be able to translate between "latin1" and "UTF-8", to recognize "" (as the current encoding) and "ASCII", a

[Rd] Rcpp too good to be true?

2011-12-13 Thread Jeffrey Pollock
Hello all, I've been working on a package to do various things related to the Conway-Maxwell-Poisson distribution and wanted to be able to make fast random draws from the distribution. My R code was running quite slow so I decided to give Rcpp a bash. I had used it before but only for extremely ba

Re: [Rd] warning for inefficiently compressed datasets

2011-12-13 Thread Hervé Pagès
Hi Uwe, On 11-12-07 12:34 AM, Uwe Ligges wrote: On 06.12.2011 23:28, Hervé Pagès wrote: Hi, Recently added to doc/NEWS.Rd: 'R CMD check' now gives a warning rather than a note if it finds inefficiently compressed datasets. With 'bzip2' and 'xz' compression having been available since R 2.10

Re: [Rd] bug in sum() on integer vector

2011-12-13 Thread Hervé Pagès
Hi Duncan, On 11-12-10 05:27 AM, Duncan Murdoch wrote: On 11-12-09 4:41 PM, Hervé Pagès wrote: Hi Duncan, On 11-12-09 11:39 AM, Duncan Murdoch wrote: On 09/12/2011 1:40 PM, Hervé Pagès wrote: Hi, x<- c(rep(180003L, 1000), -rep(120002L, 1500)) This is correct: sum(as.doubl

[Rd] paste0 bug in install.packages() - leopard installer?

2011-12-13 Thread Dan Tenenbaum
Hello, I get the following: > install.packages("abind", repos="http://cran.fhcrc.org";, type="source") trying URL 'http://cran.fhcrc.org/src/contrib/abind_1.4-0.tar.gz' Content type 'application/x-gzip' length 19642 bytes (19 Kb) opened URL == downl

Re: [Rd] problems with iconv

2011-12-13 Thread Kasper Daniel Hansen
Roger, Since Ripley is usually right, if I was you, I would focus on "You need to ensure that GNU libiconv is actually used: you are obviously not finding it, and I suspect your error is in not setting the path to its header file." Based on your description "I've downloaded and compiled iconv v

Re: [Rd] problems with iconv

2011-12-13 Thread Uwe Ligges
Please cite the original messages! On 13.12.2011 21:32, RogerP wrote: As I said in my email: help I appreciate - sarcasm not so much. I re-read the manual - just in case I'd missed something and still do not have any idea. The manual, BTW, needs some serious help for it to be useful to its in

Re: [Rd] problems with iconv

2011-12-13 Thread RogerP
As I said in my email: help I appreciate - sarcasm not so much. I re-read the manual - just in case I'd missed something and still do not have any idea. The manual, BTW, needs some serious help for it to be useful to its intended audiance - people who don't already know how to install R. For exa

Re: [Rd] problems with iconv

2011-12-13 Thread Prof Brian Ripley
On 13/12/2011 17:12, RogerP wrote: I'm at wit's ends here and need some help. Like reading the manual? You need to ensure that GNU libiconv is actually used: you are obviously not finding it, and I suspect your error is in not setting the path to its header file. There are explicit instruc

[Rd] problems with iconv

2011-12-13 Thread RogerP
I'm at wit's ends here and need some help. I've downloaded and compiled iconv versions 1.13 and 1.14 - libiconv.so.2.5.0 and libiconv.so.2.5.1 and copied the iconv all over, replacing the native iconv on my Solaris machine. Still when I try to run the configure I get: checking iconv.h usability