Re: [Rd] Error - Compiling R on a Sun V40Z - R/R-2.2.1 (PR#9024)

2006-06-23 Thread ripley
The current version of R is 2.3.1 patched.  You are asked not to report 
problems on obselete versions of R.

This seems to be gcc 3.3.6, also obselete.

On Fri, 23 Jun 2006, [EMAIL PROTECTED] wrote:

> configure: WARNING: dlfcn.h: present but cannot be compiled
> configure: WARNING: dlfcn.h: check for missing prerequisite headers?
> configure: WARNING: dlfcn.h: see the Autoconf documentation
> configure: WARNING: dlfcn.h: section "Present But Cannot Be Compiled"
> configure: WARNING: dlfcn.h: proceeding with the preprocessor's result
> configure: WARNING: dlfcn.h: in the future, the compiler will take
> precedence
> configure: WARNING: ## --- ##
> configure: WARNING: ## Report this to [EMAIL PROTECTED] ##
> configure: WARNING: ## --- ##
> checking for dlfcn.h... yes

That seems to be a Solaris/gcc and not an R problem, though.

> --
>
> LANG=C
> LD_LIBRARY_PATH=/usr/sfw/lib:/usr/lib:/usr/local/lib:/usr/local/BerkeleyDB.4.4/lib
> LIVE_BIN_DIR=/dbdev/bin/:/dbdev/3.0.0/
> LIVE_DIR=/dbdev
> LOGNAME=denny
> MAIL=/var/mail//denny
> MANPATH=/usr/sfw/man:/opt/sfw/pgsql/man::/usr/share/man:/usr/local/man
> NAMS_LOGINS=/dbdev/logins
> OPT_BIN_DIR=/usr/local/bin:/usr/sfw/bin
> OPT_MAN_DIR=/usr/sfw/man:/opt/sfw/pgsql/man
> PATH=/usr/ccs/bin:.:/dbdev/bin/:/dbdev/3.0.0/:/usr/local/bin:/usr/sfw/bin:/usr/bin:/opt/sfw/bin:/opt/sfw/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/pgsql/bin
>
> --
> $ cat ./z
> ./configure --with-readline=no --without-recommended-packages
> $ . ./z
> checking build system type... i386-pc-solaris2.10
> checking host system type... i386-pc-solaris2.10
> loading site script './config.site'
> loading build specific script './config.site'
> checking for pwd... /usr/bin/pwd
> checking whether builddir is srcdir... yes
> checking for working aclocal... missing
> checking for working autoconf... missing
> checking for working automake... missing
> checking for working autoheader... missing
> checking for working makeinfo... found
> checking for gawk... no
> checking for mawk... no
> checking for nawk... nawk
> checking for egrep... egrep
> checking whether ln -s works... yes
> checking for ranlib... ranlib
> checking for bison... bison -y
> checking for ar... ar
> checking for a BSD-compatible install... tools/install-sh -c
> checking for sed... /usr/xpg4/bin/sed
> checking for less... /usr/bin/less
> checking for perl... /usr/local/bin/perl
> checking whether perl version is at least 5.004... yes
> checking for dvips... no
> checking for tex... no
> checking for latex... no
> configure: WARNING: you cannot build DVI versions of the R manuals
> checking for makeindex... no
> checking for pdftex... no
> checking for pdflatex... no
> configure: WARNING: you cannot build PDF versions of the R manuals
> checking for makeinfo... /usr/sfw/bin/makeinfo
> checking for unzip... /usr/bin/unzip
> checking for zip... /usr/bin/zip
> checking for gzip... /dbdev/bin//gzip
> checking for firefox... no
> checking for mozilla... /usr/sfw/bin/mozilla
> using default browser ... /usr/sfw/bin/mozilla
> checking for acroread... no
> checking for acroread4... no
> checking for xpdf... no
> checking for gv... no
> checking for gnome-gv... no
> checking for ggv... /usr/bin/ggv
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files...
> checking whether we are using the GNU C compiler... no
> checking whether gcc accepts -g... no
> checking for gcc option to accept ANSI C... none needed
> checking how to run the C preprocessor... gcc -E
> checking how to run the C preprocessor... gcc -E
> checking for f95... no
> checking for fort... no
> checking for xlf95... no
> checking for ifort... no
> checking for ifc... no
> checking for efc... no
> checking for pgf95... no
> checking for lf95... no
> checking for gfortran... no
> checking for ftn... no
> checking for g95... no
> checking for f90... no
> checking for xlf90... no
> checking for pgf90... no
> checking for pghpf... no
> checking for epcf90... no
> checking for g77... g77
> checking whether we are using the GNU Fortran 77 compiler... no
> checking whether g77 accepts -g... no
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... no
> checking whether g++ accepts -g... no
> checking how to run the C++ preprocessor... g++ -E
> checking for a sed that does not truncate output... /usr/bin/sed
> checking for non-GNU ld... /usr/ccs/bin/ld
> checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
> checking for /usr/ccs/bin/ld op

[Rd] symbols() draws squares too high (PR#9027)

2006-06-23 Thread michellang
Full_Name: Michel Lang
Version: 2.2.1
OS: 2.6.16-gentoo-r9 on x86_64
Submission from: (NULL) (62.143.164.39)


  plot(-2:2, -2:2, type = "n")
  symbols(x = 0, y = 0, squares = 2, inches = FALSE, add = TRUE)

This should plot a square with its center at (0,0) and side length 2, in other
words a square from (-1,-1) as lower left angle to (1,1) as upper right angle.

However, if you execute this line
  abline(h = c(-1,1))
you see that the squares height is definitely too large.

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] symbols() draws squares too high (PR#9027)

2006-06-23 Thread Duncan Murdoch
On 6/23/2006 9:55 AM, [EMAIL PROTECTED] wrote:
> Full_Name: Michel Lang
> Version: 2.2.1
> OS: 2.6.16-gentoo-r9 on x86_64
> Submission from: (NULL) (62.143.164.39)
> 
> 
>   plot(-2:2, -2:2, type = "n")
>   symbols(x = 0, y = 0, squares = 2, inches = FALSE, add = TRUE)
> 
> This should plot a square with its center at (0,0) and side length 2, in other
> words a square from (-1,-1) as lower left angle to (1,1) as upper right angle.
> 
> However, if you execute this line
>   abline(h = c(-1,1))
> you see that the squares height is definitely too large.

This is not a bug.

The documentation says that when inches = FALSE, the units are those of 
the x axis, so horizontal lines are not relevant.  Try

abline(v=c(-1, 1))

If you want your x and y scales to be identical, I think you need to use 
grid and lattice, rather than traditional graphics, and to set aspect="iso".

Duncan Murdoch

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] symbols() draws squares too high (PR#9027)

2006-06-23 Thread Prof Brian Ripley
On Fri, 23 Jun 2006, Duncan Murdoch wrote:

> On 6/23/2006 9:55 AM, [EMAIL PROTECTED] wrote:
>> Full_Name: Michel Lang
>> Version: 2.2.1

That's long obselete, and quite possibly the documentation was wrong then 
(it was at some point in the midterm past).

>> OS: 2.6.16-gentoo-r9 on x86_64
>> Submission from: (NULL) (62.143.164.39)
>>
>>
>>   plot(-2:2, -2:2, type = "n")
>>   symbols(x = 0, y = 0, squares = 2, inches = FALSE, add = TRUE)
>>
>> This should plot a square with its center at (0,0) and side length 2, in 
>> other
>> words a square from (-1,-1) as lower left angle to (1,1) as upper right 
>> angle.
>>
>> However, if you execute this line
>>   abline(h = c(-1,1))
>> you see that the squares height is definitely too large.
>
> This is not a bug.
>
> The documentation says that when inches = FALSE, the units are those of
> the x axis, so horizontal lines are not relevant.  Try
>
> abline(v=c(-1, 1))
>
> If you want your x and y scales to be identical, I think you need to use
> grid and lattice, rather than traditional graphics, and to set aspect="iso".

par(asp=1) or eqscplot (MASS) does this perfectly well in base graphics.


-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] Error - Compiling R on a Sun V40Z - R/R-2.2.1

2006-06-23 Thread Barry Rowlingson
[EMAIL PROTECTED] wrote:
> The current version of R is 2.3.1 patched.  You are asked not to report 
> problems on obselete versions of R.
> 
> This seems to be gcc 3.3.6, also obselete.

If configure says:

>>configure: WARNING: ## --- ##
>>configure: WARNING: ## Report this to [EMAIL PROTECTED] ##
>>configure: WARNING: ## --- ##

  then people might just do what it says. Perhaps the message should 
mention something about current, patched, and obsolete versions...

Barry

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Bug in R-intro.html ? (PR#9028)

2006-06-23 Thread hueppop
Full_Name: Ommo Hüppop
Version: 2.0.1
OS: XP
Submission from: (NULL) (84.143.196.187)


Hi,

Presumably, I've found an error in
http://finzi.psych.upenn.edu/R/doc/manual/R-intro.html

In Chapter 11.3 Generic functions for extracting model information it says
"Select a suitable model by adding or dropping terms and preserving hierarchies.
The model with the LARGEST value of AIC (Akaike's An Information Criterion)
discovered in the stepwise search is returned." Shouldn't it read "with the
SMALLEST value ..."?

Sorry, if I only misunderstood the meaning of "returned"!

By the way: Thank you very much indeed for developing this great free software!


Sincerely
Ommo Hüppop

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Documentation detail [was: Merging factor levels.]

2006-06-23 Thread François Pinard
Hi to R developers.

In the "Details:" section of "?levels", it would be nice including the 
following sentence, taken from a reply from Brian Ripley:

If you set two levels to be the same label, they get merged.

Granted, the "Examples:" section does have a terse comment and examples 
from which users may imply this behaviour.  Yet, the documentation would 
be friendlier if it was clearly stating the fact.

Brian's message stated in full below, for reference:

- Forwarded message from Prof Brian D Ripley <[EMAIL PROTECTED]> -

From: Prof Brian D Ripley <[EMAIL PROTECTED]>
Date: Thu Apr 10 10:43:28 2003
Subject: [R] Merging factor levels.

On Mon, 12 Nov 2001, [iso-8859-1] Göran Broström wrote:

> This must be a FAQ, but I can't find the answer:
> I have a factor 'okk':

> > table(okk)
> okk
>  Other   STORKAGE SKELLEFTEAFALMARK   BOLE  NEAR_TOWN
>  14064560346526332 34

> Now I want to put the cases in 'NEAR_TOWN' into the 'Other' category',
> so I try:

> > okk <- ifelse(okk == "NEAR_TOWN", "Other", okk)
> > table(okk)
> okk
> 1 2 3 4 5 Other
> 14064   560   346   526   33234
> > is.factor(okk)
> [1] FALSE

> This is not what I intended. I can do what I want the hard way (i.e., by
> converting  okk  to character an then back again) but there
> must be something simpler?

Something like

levels(okk) <- c(levels(okk)[1:5], "Other")

If you set two levels to be the same label, they get merged.

-- 
Brian D. Ripley,  [EMAIL PROTECTED]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UKFax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: [EMAIL PROTECTED]
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

- End forwarded message -

-- 
François Pinard   http://pinard.progiciels-bpi.ca

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] [R] GARCH

2006-06-23 Thread Gabor Grothendieck
Looks like tseries needs a coef.summary.garch method or perhaps
stats needs a coef.default method.

On 6/24/06, Spencer Graves <[EMAIL PROTECTED]> wrote:
>  I'll outline here how you can solve this kind of problem, using the
> first example in the 'garch' help page:
>
> library(tseries)
>  n <- 1100
>  a <- c(0.1, 0.5, 0.2)  # ARCH(2) coefficients
>  e <- rnorm(n)
>  x <- double(n)
>  x[1:2] <- rnorm(2, sd = sqrt(a[1]/(1.0-a[2]-a[3])))
>  for(i in 3:n)  # Generate ARCH(2) process
>  {
>x[i] <- e[i]*sqrt(a[1]+a[2]*x[i-1]^2+a[3]*x[i-2]^2)
>  }
>  x <- ts(x[101:1100])
>  x.arch <- garch(x, order = c(0,2))  # Fit ARCH(2)
> (sum.arch <- summary(x.arch))
> 
> Estimate  Std. Error  t value Pr(>|t|)
> a0   0.09887 0.010139.764  < 2e-16 ***
> a1   0.43104 0.052768.170 2.22e-16 ***
> a2   0.31261 0.058445.350 8.82e-08 ***
> 
>
>  Then I tried 'str(sum.arch)'.  This told me it is a list with 6
> components, and the one I want is named 'coef'.  This led me to examine
> 'sum.arch$coef', which includes the desired numbers.  Moreover,
> 'class(sum.arch$coef)' told me this is a 'matrix'.  This information
> suggests that the following might be what you requested:
>
>  sum.arch$coef[, "Pr(>|t|)"]
>   a0   a1   a2
> 0.00e+00 2.220446e-16 8.815239e-08
>
>  Hope this helps.
>  Spencer Graves
>
> Jeff Newmiller wrote:
> > Prof Brian Ripley wrote:
> >> Why do you think
> >>
> >>> help.search("garch-methods", package="tseries")
> >> finds accessor functions?  That is notation for S4 methods, and "garch"
> >> is an S3 class so there will be none.  Here there _is_ an accessor,
> >> coef(), and you can find that there is by
> >
> > Probably because I used it, found a mention of various extraction functions
> > including coef(), and could not find a way to access "Pr(>|t|)" using
> > coef(). Nor have I had luck with
> >   help.search("summary.garch", package="tseries")
> >
> > Possibly also because I have not yet figured out the difference between
> > S4 and S3 methods, but since the result of my  help.search call displayed S3
> > functions I don't see how knowing this difference would have helped.
> >
> >>> methods(class="garch")
> >> [1] coef.garch*  fitted.garch*logLik.garch*plot.garch*
> >> [5] predict.garch*   print.garch* residuals.garch* summary.garch*
> >>
> >>Non-visible functions are asterisked
> >>
> >> Note though that inherited methods might be relevant too (e.g. default
> >> methods) and indeed it seems that here the default method for coef would
> >> work just as well.
> >
> > Given Arun Kumar Saha's question...
> >
> >  > > Now I want to store the value of Pr(>|t|) for coefficient a0, a1,
> >  > > and b1, and also values of these coefficients, so that I can use
> >  > > them in future separately. I know that I can do it for coefficients
> >  > > by using the command:
> >  > > coef(garch1)["a0"] etc, but not for Pr(>|t|). Can anyone please
> >  > > tell me how to do this?
> >
> > ... I don't see how coef() helps because I have yet to figure out how
> > to use coef() (or any other accessor) to find " Std. Error" of the
> > coefficient, much less "Pr(>|t|)". summary.garch seems to have only a
> > print method, with no accessors at all. Can you offer a solution?
> >
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel