[R] Q: how to submit documentation patches?

2004-08-25 Thread David Forrest
I don't want to gripe here, but I would like to know the best method for
submitting suggestions and patches to the documentation.

It looks like for many help items, we need to track from the html file
which help.search(*)/help(*) presents, back to the authoritiative
documentation file from which they are generated.  It seems the
installation process discards much of the .../{package}/man/*.Rd files, so
to build patches to the original documentation requires a download and
extraction from the source.

Is there a way to retain the authoritiative files, patch them, re-install
the patched documentation, and perhaps produce a useable patch for the
package maintainers?

Something like
  R CMD INSTALL --docs-only pixmap_mine_0.4-1.tar.gz
  # to rebuild the documentation
or
  R CMD INSTALL --keep-docs --library=/usr/lib/R/library \
   utils.xx.yy.tar.gz  # to keep the authoritative documentation


with a:

 diff -ru pixmap/man pixmap_mine/man pixmap_doc.patch

 ... as a convenient way to deliver the document criticism, correction, or
elaboration to the package maintainers.

As it is, one has to either download, patch and reinstall the packages, or
edit the .../help/, .../html/, derived files directly to make minor
improvements in the documentation.

I apologise for the complaining, but I did spend too much time today
rediscovering that 'pixmap' is a package for computing images, (I was
off-line, and knew there was something in R that read, plotted, or wrote
graphics files) and a small change like the patch to utils/help/methods
attached would also have saved me some time.  R does many things, but the
documentation is hard to patch and improve.

And back to my subject:
  Is producing patches against the authoritative documentation the
recommended way to improve the documentation?

Dave
-- 
 Dave Forrest
 [EMAIL PROTECTED](804)684-7900w
 [EMAIL PROTECTED] (804)642-0662h
   http://maplepark.com/~drf5n/diff -ur R-1.9.1-dist/src/library/utils/man/methods.Rd 
R-1.9.1/src/library/utils/man/methods.Rd
--- R-1.9.1-dist/src/library/utils/man/methods.Rd   2003-12-09 02:24:25.0 
-0500
+++ R-1.9.1/src/library/utils/man/methods.Rd2004-08-24 23:33:44.0 -0400
@@ -47,7 +47,8 @@
   The original \code{methods} function was written by Martin Maechler.
 }
 \seealso{
-  \code{\link{S3Methods}}, \code{\link[base]{class}}, \code{\link{getS3method}}
+  \code{\link{S3Methods}}, \code{\link[base]{class}}, \code{\link{getS3method}},
+  \code{\link[methods]{showMethods}}
 }
 \references{
   Chambers, J. M. (1992)
__
[EMAIL PROTECTED] 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] R and Latex tables

2004-08-25 Thread Joao Pedro W. de Azevedo
Dear R users,
I would like to know if there is any way that I can aumatically generate
*.tex files with the output of my estimations from R.
Many thanks in advance,
Joao Pedro

__
[EMAIL PROTECTED] 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] Problems with Heatmap

2004-08-25 Thread michael watson (IAH-C)
Hi

I am having some problems getting my heatmap to be the right size!  Let
me explain.  I am experienced at getting an hclust or a dendrogram
object to be the right size.  

For example, I have a dataset which has 4000 rows, which I clustered
using hclust and I wanted to plot it as a horizontal dendrogram.  So I
used jpeg(), set the image height to be 4000 and plotted the dendrogram
and got the result I expected - ie the dendrogram filled up the whole
image and I had roughly one pixel per row of data.  However, if I run
heatmap() instead of hclust(), the resulting image DOES NOT fill up the
whole jpeg() - instead, it sits right in the middle of it, the same size
as it would be if I had ran heatmap() normally into an x11() window.

I've figured out how to use the margins= argument of heatmap() to set
the margins, but how do I make my heatmap fill up all of the available
space in a jpeg()?

Mick

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R and Latex tables

2004-08-25 Thread Kevin Wang
Hi,

On Wed, 25 Aug 2004, Joao Pedro W. de Azevedo wrote:

 Dear R users,
 I would like to know if there is any way that I can aumatically generate
 *.tex files with the output of my estimations from R.

Take a look at the xtable package.

HTH,

Kevin


Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200
Australia

Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] R and Latex tables

2004-08-25 Thread Rau, Roland
Hi,

 -Original Message-
 From: [EMAIL PROTECTED]
 [SMTP:[EMAIL PROTECTED] On Behalf Of Joao Pedro W. de
 Azevedo
 Sent: Wednesday, August 25, 2004 10:43 AM
 To:   [EMAIL PROTECTED]
 Subject:  [R] R and Latex tables
 
 Dear R users,
 I would like to know if there is any way that I can aumatically generate
 *.tex files with the output of my estimations from R.
 
I am not sure what you exactly mean, but one of the two ways should
meet your needs.
a)
library(xtable)
?xtable
b)
library(utils)
?Sweave

Was this of some help for you?
Roland

P.S. I am using Sweave on a regular basis and I would like to thank
Friedrich Leisch for this great tool.


+
This mail has been sent through the MPI for Demographic Rese...{{dropped}}

__
[EMAIL PROTECTED] 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] R-help

2004-08-25 Thread Jim Gustafsson

Dear R users,

I have just start working with R and would need some help.

If you have a matrix as:


   [,1][,2]   [,3]
[1,]   11   24   11
[2,]   16   29   16
[3,]215 2

and you want the position where you can find the maximum value, in this 
case row 2 and column 2.
How could you get the position?

The values in the matrix is likelihood function values, and  each row and 
column represent values from two parameters. So the idea is to seek which 
parameter values maximise the likelihood and therefore I need boot row and 
column position.

Regards Jim


--
This e-mail and any attachment may be confidential and may also be privileged.
If you are not the intended recipient, please notify us immediately and then
delete this e-mail and any attachment without retaining copies or disclosing
the contents thereof to any other person.
Thank you.
--
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] R-help

2004-08-25 Thread Dimitris Rizopoulos
Hi Jim,

you could try this:

mat - matrix(sample(1:25), 5, 5)
mat
row(mat)[mat==max(mat)]
col(mat)[mat==max(mat)]

I hope it helps.

Best,
Dimitris


Dimitris Rizopoulos
Doctoral Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/396887
Fax: +32/16/337015
Web: http://www.med.kuleuven.ac.be/biostat/
 http://www.student.kuleuven.ac.be/~m0390867/dimitris.htm


- Original Message - 
From: Jim Gustafsson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 11:07 AM
Subject: [R] R-help



 Dear R users,

 I have just start working with R and would need some help.

 If you have a matrix as:


[,1][,2]   [,3]
 [1,]   11   24   11
 [2,]   16   29   16
 [3,]215 2

 and you want the position where you can find the maximum value, in
this
 case row 2 and column 2.
 How could you get the position?

 The values in the matrix is likelihood function values, and  each
row and
 column represent values from two parameters. So the idea is to seek
which
 parameter values maximise the likelihood and therefore I need boot
row and
 column position.

 Regards Jim


 
--
 This e-mail and any attachment may be confidential and may also be
privileged.
 If you are not the intended recipient, please notify us immediately
and then
 delete this e-mail and any attachment without retaining copies or
disclosing
 the contents thereof to any other person.
 Thank you.
 
--
 [[alternative HTML version deleted]]

 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Help using Hmisc / Latex

2004-08-25 Thread Kevin Wang
Hi,

On Wed, 25 Aug 2004, Joao Pedro W. de Azevedo wrote:

 ## Annette Dobson (1990) An Introduction to Generalized Linear Models.
 ## Page 9: Plant Weight Data.
 summary(lm.D90 - lm(weight ~ group - 1))# omitting intercept
 out  - latex(lm.D90)
 latex(out, model1, file=)

 When I run this code, I get an output which does not attend my needs.

Just out of interest, have you read the documentation for latex()?

Kevin


Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200
Australia

Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301

__
[EMAIL PROTECTED] 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] Heckman estimation

2004-08-25 Thread Arne Henningsen
Hi,

I wrote a function to perform a two-step Heckman (also known as heckit) 
estimation. This function is mainly a wrapper function to glm (1st step 
probit estimation) and lm (2nd step OLS estimation). Though this function 
is not perfect yet, it is IMHO already very useful. Since there were some 
questions about Heckmann estimation in this list, I would like to release it 
to the public. I hope that useRs will become developeRs and help to improve 
and extend this function(s). I think it might be not very reasonable to start 
a new package just for this single small function. And my package micEcon 
for microeconomic analysis that I hope to release soon seems also not to be 
the right place, since heckman estimations are used in many other areas 
besides microeconomic analysis. Can anybody suggest me a package that is 
appropriate to include the Heckmann function and whose maintainer is willing 
to do that, too? (Of course, I will write the .Rd file and, if the maintainer 
wants, I will maintain this function.)

Thanks,
Arne

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
[EMAIL PROTECTED]
http://www.uni-kiel.de/agrarpol/ahenningsen/

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Problems with Heatmap

2004-08-25 Thread Liaw, Andy
By `filling up the page with heatmap', do you mean the image map on the
lower right corner of a typical heatmap?  If so, that's just image(), so you
can use that directly.

Andy

 From: michael watson (IAH-C)
 
 Hi
 
 I am having some problems getting my heatmap to be the right 
 size!  Let
 me explain.  I am experienced at getting an hclust or a dendrogram
 object to be the right size.  
 
 For example, I have a dataset which has 4000 rows, which I clustered
 using hclust and I wanted to plot it as a horizontal dendrogram.  So I
 used jpeg(), set the image height to be 4000 and plotted the 
 dendrogram
 and got the result I expected - ie the dendrogram filled up the whole
 image and I had roughly one pixel per row of data.  However, if I run
 heatmap() instead of hclust(), the resulting image DOES NOT 
 fill up the
 whole jpeg() - instead, it sits right in the middle of it, 
 the same size
 as it would be if I had ran heatmap() normally into an x11() window.
 
 I've figured out how to use the margins= argument of heatmap() to set
 the margins, but how do I make my heatmap fill up all of the available
 space in a jpeg()?
 
 Mick

__
[EMAIL PROTECTED] 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] Mapping PCA loadings on to map

2004-08-25 Thread Laura Quinn
Hello all,

I have performed PCA on stacked wind vector data for 20 different spatial
locations. In this case I therefore am in effect working out a PCA for 40
different stations (2 paired pieces of information [ie u and v vector
information] for each station), so have 40 PCs.

In my previous PCA (for none vector data) i have plotted the PC loadings
onto a map of the area of concern, and would like to represent
the results of this PCA in a similar way.

My previous code looks like this:

east-sort(unique(alt$east))
north-sort(unique(alt$north))
map.matrix-matrix(alt$Alt,nrow=length(north),byrow=TRUE)
site.data-read.table(siteinfo.dat,header=TRUE)
ts.data-read.table(met.dat,header=TRUE)
library(mva)
met.pca-prcomp(ts.data,retx=FALSE,scale=TRUE,center=TRUE)

scale-2
for(i in 1:4){
image(east,north,t(map.matrix),col=terrain.colors(50),axes=TRUE,
xlab=,ylab=)
text(site.data$east,site.data$north,labels=as.character(site.data$site))
pc-met.pca$rotation[,i]
pc.pos-(pc0)
if(any(pc.pos)){
symbols(site.data$east[pc.pos],site.data$north[pc.pos],
circles=scale*pc[pc.pos],lwd=2,fg=red,inches=FALSE,add=TRUE)}
if(any(!pc.pos)){
symbols(site.data$east[!pc.pos],site.data$north[!pc.pos],
circles=-scale*pc[!pc.pos],lwd=2,fg=blue,inches=FALSE,add=TRUE)}
box()
}

My problem is, how can i adjust this code so that I get a pair of loadings
at each site? I've been having real problems trying to sort the
subscripting out, as i need to be able to recognise the PC loadings as
pairs, (so have made a further u and v subscript to each station name
before the analysis) but then I they aren't in the same format as needed
to plot onto the map.

I guess there is probably a very obvious way around this and would be
extremely grateful if anyone could help me out!

Also, it occurs to me that another way of representing this information is
by using the arrows() function to add a vector to the map - but again this
relies on my subscripting problem

TIA,
Laura

Laura Quinn
Institute of Atmospheric Science
School of the Environment
University of Leeds
Leeds
LS2 9JT

tel: +44 113 343 1596
fax: +44 113 343 6716
mail: [EMAIL PROTECTED]

__
[EMAIL PROTECTED] 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] Testing Performance of R on AIX

2004-08-25 Thread Liao, Kexiao

Dear R Users,
  I compiled two R-1.9.1 environments on IBM P690 AIX platform, one with
optimization level 3(-O3), another with optimization level 2(-O). I
would like to do some performance comparison with these two
environments. Can anybody give me some advices for how to do the
performance test against R?
Thanks in advance.

Kexiao

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Testing Performance of R on AIX

2004-08-25 Thread Whit Armstrong
Acovea is a nice tool for testing gcc optimization options, but you would
probably have to do a lot of work to build tests for R.

http://www.coyotegulch.com/products/acovea/index.html



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Liao, Kexiao 
 Sent: Wednesday, August 25, 2004 9:28 AM
 To: [EMAIL PROTECTED]
 Subject: [R] Testing Performance of R on AIX
 
 
 
 Dear R Users,
   I compiled two R-1.9.1 environments on IBM P690 AIX 
 platform, one with optimization level 3(-O3), another with 
 optimization level 2(-O). I would like to do some performance 
 comparison with these two environments. Can anybody give me 
 some advices for how to do the performance test against R? 
 Thanks in advance.
 
 Kexiao
 
 __
 [EMAIL PROTECTED] mailing list 
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html


__
[EMAIL PROTECTED] 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] Missing Info on /bin/macosx/r-devel

2004-08-25 Thread Diethelm Wuertz
A minor problem ...
Since several weeks the Daily checking results for contributed packages 
with R-devel
for MacOSX seems to be broken, respectively the check file is empty. 
Please follow the links
http://cran.r-project.org/bin/macosx/ and 
http://cran.r-project.org/bin/macosx//r-devel.

Does anybody know, where to find the checking results of R-packages for 
MacOSX?

Many thanks in advance
Diethelm Wuertz
__
[EMAIL PROTECTED] 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] ADE4

2004-08-25 Thread jpineda
**Libre de Virus - Escaneado por la Universidad de Manizales**
X-Virus-Scanned: by AMaViS perl-11

Solicito su ayuda para encontrar e instalar el ADE4, pues en la versión
1.9.1. que tengo instalada no la encuentro y estos son mis primeros
ejercicios

Le agradezco su colaboración

__
[EMAIL PROTECTED] 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] Win-Edt and Sweave

2004-08-25 Thread Joao Pedro W. de Azevedo
Hello,
Does anyone knows if there is any plugin for Sweave to run on WinEdt, or any
other windows Latex editor?
Many thanks,
JP

__
[EMAIL PROTECTED] 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] sjava problem

2004-08-25 Thread Pillas Thibaut
hello,

I am trying to install SJava on Windows XP as
described on 
http://www.omegahat.org/RSJava/:
at the level configure.win:

$rhome/sjava/configure.win returned argument 'c:/...'
ignored  


When i tried to install like the readme file, it
returned in R
 library(SJava)
using JAVA_HOME = C:\Program Files\Java\j2re1.4.2_04 
 .JavaInit()
Error in .JavaInit() : Couldn't start Java Virtual
Machine: Can't create Java Virtual Machine

what can I do?

 version

 _  

platform i386-pc-mingw32

arch i386   

os   mingw32

system   i386, mingw32  

status  

major1  

minor9.0

year 2004   

month04 

day  12 

language R  

thank you
thibaut pillas

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Win-Edt and Sweave

2004-08-25 Thread Liaw, Andy
What's wrong with (X)Emacs?  If you want to use Sweave together with R and
LaTeX, there's probably nothing else that's better.

Andy

 From: Joao Pedro W. de Azevedo
 
 Hello,
 Does anyone knows if there is any plugin for Sweave to run on 
 WinEdt, or any
 other windows Latex editor?
 Many thanks,
 JP
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Win-Edt and Sweave

2004-08-25 Thread Rau, Roland
Hi,

 -Original Message-
 From: [EMAIL PROTECTED]
 [SMTP:[EMAIL PROTECTED] On Behalf Of Joao Pedro W. de
 Azevedo
 Sent: Wednesday, August 25, 2004 5:25 PM
 To:   [EMAIL PROTECTED]
 Subject:  [R] Win-Edt and Sweave
 
 Does anyone knows if there is any plugin for Sweave to run on WinEdt, or
 any
 other windows Latex editor?
 
I use XEmacs 21.4.13 on Win32 here in my office and it works fine.
The second bullet point at the Sweave FAQ site at:
http://www.ci.tuwien.ac.at/~leisch/Sweave/FAQ.html
tells you what to have to insert into your .emacs file (or
.xemacs/init.el). And, of course, you need to have the ESS package installed
as well.

For me, it worked right away.

Best,
Roland



+
This mail has been sent through the MPI for Demographic Rese...{{dropped}}

__
[EMAIL PROTECTED] 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] Re: R online manuals

2004-08-25 Thread Martin Maechler
[diverted from R-devel to R-help, since hopefully of much wider interest]

 PD == Peter Dalgaard [EMAIL PROTECTED]
 on 25 Aug 2004 17:17:55 +0200 writes:

PD [EMAIL PROTECTED] writes:
 There is a mistake on the Weibull Distribution (base
 package) help page in the online docs
 (http://docs.stat.ufl.edu/R/doc/html/). The formula for
 Var(X) should have Gamma(1 + 1/a)^2 in place of Gamma(1 +
 1/a).

PD Looks like docs.stat.ufl.edu haven't been updated for a
PD while. It still has the old organisation of the base
PD packages. We can't fix bugs retrospectively,
PD y'know... The 1.9.1 version does have the squared term
PD (it has gamma instead of Gamma, though).

Just as note to everyone listening:

There are much more official ``R online manuals''
than the one you mention:

1)
  The most official ones, available by [Manuals] just off the R home page,
  which goes to CRAN http://cran.r-project.org/manuals.html
  but these are PDFs which---for the reference
  manual of all help pages---may be a bit frightening with its
  almost 2300 pages.
  
  Though, actually using acroread's [Find] , entering Weibull
  very quickly brings you to page 1141, and on p.1142 you see
  the formulae as nice mathematical equations.

  If you like these real formulae rather than their plain (or
  Html) text equivalents, I'd like to draw your attention to the
  much underused
   help(dweibull, offline = TRUE)
  which produces a nice postscript help file for the weibull
  distribution --- if LateX has been properly available when
  your R was built / installed.

2) The less official ones, particularly for R-developers are
   the help pages for current R-patched and R-devel,
   available by  [Help Pages]  off the R home page,  which leads
   you to  http://stat.ethz.ch/R-manual/
   and there, you'll find (all the manuals, not just) the help pages
   in the usual ``help.start()'' like form, e.g.,
   http://stat.ethz.ch/R-manual/R-patched/library/stats/html/Weibull.html

Martin Maechler

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Win-Edt and Sweave

2004-08-25 Thread Uwe Ligges
Joao Pedro W. de Azevedo wrote:
Hello,
Does anyone knows if there is any plugin for Sweave to run on WinEdt, or any
other windows Latex editor?
Many thanks,
JP
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
No plugin for WinEdt that supports LaTeX + R at the same time in the 
same editor windows is available yet (nor running Sweave from WinEdt). 
There are some plans to implement it in R-WinEdt, but other stuff is of 
higher priority on my list ...

Uwe Ligges
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] ADE4

2004-08-25 Thread Almirall, Daniel

La manera mas facil seria haciendo clic en Packages -- Install Packages from CRAN -- 
ADE4.  Despues que lo instales, usa la siguente orden para poder utilizar la libreria 
ADE4:

 library(ade4)

Espero que esto te ayude,
Danny

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 11:59 AM
To: [EMAIL PROTECTED]
Subject: [R] ADE4


**Libre de Virus - Escaneado por la Universidad de Manizales**
X-Virus-Scanned: by AMaViS perl-11

Solicito su ayuda para encontrar e instalar el ADE4, pues en la versión
1.9.1. que tengo instalada no la encuentro y estos son mis primeros
ejercicios

Le agradezco su colaboración

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] 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] S - R

2004-08-25 Thread Zachary Skrivanek
Hello!  I would like to be able to read in list data objects in R/S 
created in R/S.  (Ie R-S or S-R.)  I have tried 'dput' and 'dump' in S, 
but neither of the created files could be read into R (with 'dget' nor 
'source').  Is there any way that I can save a list object in S that can 
be read into R?

Sincerely,
Zachary Skrivanek, PhD
Research Scientist
Program Phase Statistics-Endocrine  
[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] 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] Measuring Variational Distance

2004-08-25 Thread Bret Collier
R-Users,
Does anyone know if there is a package or code somewhere in R that 
provides a measure of the maximum difference between 2 distributions 
defined on a common space?  I think it is called variational distance?  I 
have constructed several marginal distribution plots (proportion/sample 
where I defined bin-widths) showing the difference between 2 treatments and 
I have been trying to get a measure of the difference in area between the 
curves.

I tried searches using variational distance  on the R website and CRAN 
with no luck.

TIA,
Bret Collier
Univ. Arkansas
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] S - R

2004-08-25 Thread Tony Plate
Have you tried following the advice in the R Data Import/Export manual?  It 
suggests the following:

Function data.restore reads S-PLUS data dumps (created by data.dump) with
the same restrictions (except that dumps from the Alpha platform can also 
be read).
It should be possible to read data dumps from S-PLUS 5.x and 6.x written with
data.dump(oldStyle=T).

-- Tony Plate

At Wednesday 10:29 AM 8/25/2004, Zachary Skrivanek wrote:
Hello!  I would like to be able to read in list data objects in R/S
created in R/S.  (Ie R-S or S-R.)  I have tried 'dput' and 'dump' in S,
but neither of the created files could be read into R (with 'dget' nor
'source').  Is there any way that I can save a list object in S that can
be read into R?

Sincerely,
Zachary Skrivanek, PhD
Research Scientist
Program Phase Statistics-Endocrine
 [[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] S - R

2004-08-25 Thread Sundar Dorai-Raj

Zachary Skrivanek wrote:
Hello!  I would like to be able to read in list data objects in R/S 
created in R/S.  (Ie R-S or S-R.)  I have tried 'dput' and 'dump' in S, 
but neither of the created files could be read into R (with 'dget' nor 
'source').  Is there any way that I can save a list object in S that can 
be read into R?

Have you read section 3.1 in R Data Import/Export?
http://cran.r-project.org/doc/manuals/R-data.pdf
--sundar
__
[EMAIL PROTECTED] 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] Statistical Learning and Data Mining course

2004-08-25 Thread Trevor Hastie
Short course: Statistical Learning and Data Mining
 
Trevor Hastie and Robert Tibshirani, Stanford University
 
Georgetown University Conference Center
Washington DC
September 20-21, 2004
 
This two-day course gives a detailed overview of statistical models
for data mining, inference and prediction.  With the rapid
developments in internet technology, genomics and other high-tech
industries, we rely increasingly more on data analysis and statistical
models to exploit the vast amounts of data at our fingertips.
 
This sequel to our popular Modern Regression and Classification
course covers many new areas of unsupervised learning and data mining,
and gives an in-depth treatment of some of the hottest tools in
supervised learning.
 
The first course is not a prerequisite for this new course.
Most of the techniques discussed in the course are implemented by the
authors and others in the S language (S-plus or R), and all of the
examples were developed in S.
 
Day one focuses on state-of-art  methods for supervised
learning, including PRIM, boosting, support vector machines,
and very recent work on least angle regression and the lasso.
 
Day two covers unsupervised learning, including clustering, principal
components, principal curves and self-organizing maps.  Many
applications will be discussed, including the analysis of DNA
expression arrays - one of the hottest new areas in biology!
 
###
Much of the material is based on the book:
 
Elements of Statistical Learning: data mining, inference and prediction
 
Hastie, Tibshirani  Friedman, Springer-Verlag, 2001
 
http://www-stat.stanford.edu/ElemStatLearn/
 
A copy of this book will be given to all attendees.
 
###
 
For more information, and to register, visit the course homepage:
 
http://www-stat.stanford.edu/~hastie/mrc.html
 


  Trevor Hastie  [EMAIL PROTECTED]  
  Professor, Department of Statistics, Stanford University
  Phone: (650) 725-2231 (Statistics)  Fax: (650) 725-8977  
  (650) 498-5233 (Biostatistics)   Fax: (650) 725-6951
  URL: http://www-stat.stanford.edu/~hastie  
  address: room 104, Department of Statistics, Sequoia Hall
   390 Serra Mall, Stanford University, CA 94305-4065

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] S - R

2004-08-25 Thread Rau, Roland
Hi,

 -Original Message-
 From: [EMAIL PROTECTED]
 [SMTP:[EMAIL PROTECTED] On Behalf Of Zachary Skrivanek
 Sent: Wednesday, August 25, 2004 6:29 PM
 To:   [EMAIL PROTECTED]
 Subject:  [R] S - R
 
 'source').  Is there any way that I can save a list object in S that can 
 be read into R?
 
With S you probably mean S-PLUS, right? Given that is the case, it
depends on the version of S-PLUS you are using. I had no problems to dump
a list and then load it into R as long as I was using S-PLUS 2000. When I
switched to S-PLUS 6, I suddenly could not do that anymore. 
It was possible again to do it when I used the same specification of
dump by setting the argument oldStyle=T
This indicates that (excerpt from ?dump) 
oldStyle 
logical flag; should the file be written in a form that can be read
by earlier versions of S-PLUS? If F, then the file will not be readable by
versions of S-PLUS earlier than 5.0 (Unix) or 6.0 (Windows). 


Hope this gets you going.
By the way, this has been discussed before on this list. Please
check (could be googled by using the keywords:
R-project S-PLUS dump; it is actually the first hit):
http://tolstoy.newcastle.edu.au/R/help/04/01/0650.html (for the
beginning of the thread)
http://tolstoy.newcastle.edu.au/R/help/04/01/0665.html (for the same
suggestion as given in my message here)

Roland




+
This mail has been sent through the MPI for Demographic Rese...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Adding labels to variables

2004-08-25 Thread Raubertas, Richard


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Martin Maechler
 Sent: Wednesday, August 25, 2004 2:46 AM
 To: Austin, Matt
 Cc: [EMAIL PROTECTED]
 Subject: RE: [R] Adding labels to variables
 
  AustinM == Austin, Matt [EMAIL PROTECTED]
  on Tue, 24 Aug 2004 22:15:15 -0700 writes:
 
 AustinM Check out the Hmisc library.
 
 It's a *package*, not a library !
 

   [ ... rest deleted ...]

As long as the function to load a package is called *library*,
I think your campaign to change common usage is doomed to failure.

Rich Raubertas

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] ADE4

2004-08-25 Thread Spencer Graves
S'il vous plait: 

 La lengua de esta listserve es inglés.  Sé que es difícil 
expresarse en una lengua diferente de lo suyo, pero muchas personas 
apprendan leyendo las preguntans y contestaciones de esta lista.  Muchos 
de los leyentes aquí no entienden francés o aleman o japones o ... .  
Por eso, yo les pido a ustedes utilicen la norma internacional de esta 
lista (o construyen una liste para R en Castellano puro). 

 Vielen Dank. 
 Spencer Graves

Almirall, Daniel wrote:
La manera mas facil seria haciendo clic en Packages -- Install Packages from CRAN -- 
ADE4.  Despues que lo instales, usa la siguente orden para poder utilizar la libreria ADE4:
 

library(ade4)
   

Espero que esto te ayude,
Danny
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 11:59 AM
To: [EMAIL PROTECTED]
Subject: [R] ADE4
**Libre de Virus - Escaneado por la Universidad de Manizales**
X-Virus-Scanned: by AMaViS perl-11
Solicito su ayuda para encontrar e instalar el ADE4, pues en la versión
1.9.1. que tengo instalada no la encuentro y estos son mis primeros
ejercicios
Le agradezco su colaboración
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

__
[EMAIL PROTECTED] 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] License for including datasets in packages

2004-08-25 Thread Arne Henningsen
Dear All,

I would like to publish a function for 'heckit' estimations together with two 
examples from Greene's and Wooldridge's econometric textbooks. 
These examples use the dataset of Mroz (1987) that is also available in John 
Fox' car package. However, not all variables that are used in my examples 
are available in the car package. Therefore, I want to put the full Mroz 
dataset in my package. This full dataset can be downloaded from some internet 
sites (e.g. pages.stern.nyu.edu/~wgreene/Text/econometricanalysis.htm, 
www.stata.com/texts/eacsap/), but I did not find any license information. 

Whom do I have to ask wether I am allowed to put these data in a GPLed R 
package? (Mr. Mroz, Mr. Greene, STATA, University of Michigan (PSID), . . . )

@John: Do you have any license information on these data?

Thanks,
Arne

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
[EMAIL PROTECTED]
http://www.uni-kiel.de/agrarpol/ahenningsen/

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Help using Hmisc / Latex

2004-08-25 Thread Kevin Bartz
I'm afraid you need to modify your approach. You're trying to pass latex an
lm object, which latex doesn't know how to handle. Also, latex isn't
supposed to produce a full .tex file; it generates just a core that's
loaded into a shell when you run dvi.

Here's an example of how you might use it appropriately:

l - latex(summary(lm(b ~ a, data.frame(a = 1:5, b = 1:5)))$coefficients)
d - dvi(l)
d

If you want the full .tex file, you can read the console output after
running dvi(l) to find out where the .tex tempfile lives and copy it over to
someplace usable. Obviously, you'll have to tweak the row and column names
as well as the rounding to suit your preferences.

If you're just looking for graphical output--not necessarily a .tex file--I
have a function grid.table, now being rolled into a package I will soon
release, which uses grid to place a data frame (neatly) on the graphics
device. You could then wrap the command around a pdf(), postscript() or any
other device to produce an appropriate display. Let me know if you'd like me
to send over my working version of the binaries.

Kevin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joao Pedro W. de
Azevedo
Sent: Wednesday, August 25, 2004 4:02 AM
To: [EMAIL PROTECTED]
Subject: [R] Help using Hmisc / Latex

Dear R users,
I'm trying to automatically generate a *.tex file with the output of an OLS
estimation. Some people suggested to use the latex function on the Hmisc
package. I'm having a bit of trouble to properly specify this function (I'm
not a very experienced R user). Below you will find an example, of what I'm
doing.

## Annette Dobson (1990) An Introduction to Generalized Linear Models.
## Page 9: Plant Weight Data.
summary(lm.D90 - lm(weight ~ group - 1))# omitting intercept
out  - latex(lm.D90)
latex(out, model1, file=)

When I run this code, I get an output which does not attend my needs.

First, I could not figure out how to print the variable names. Second I'm
not sure how I can select only the coefficients and the std. errors to be
inserted on the output. Third, I was wondering if there is any way I can
automatically generate significance level indicators next to either the
coefficients or the std erros. Forth, is there any way I can aumtomaticaly
insert some of model fitting statistics? Fifth, is it possible to specify
this function to save the std. error under the coefficient?

I'm sure this are quite basic questions, but my attempts to fiddle with the
parameters in the model took me nowhere. 

Many thanks once again,

Joao Pedro

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] S - R

2004-08-25 Thread Rolf Turner

I'm puzzled by the discourse in this thread.  Briefly, dput() and
dget() seem to work just fine for me.

I tried

 junk - list(x=rnorm(20),y=sample(1:100,12,TRUE))
 dput(junk,junk.dat)

in Splus (Version 6.1.2 Release 2 for Sun SPARC, SunOS 5.6 : 2002)

and then in R

 junk - dget(junk.dat)

R version:

platform sparc-sun-solaris2.9
arch sparc   
os   solaris2.9  
system   sparc, solaris2.9   
status   
major1   
minor9.1 
year 2004
month06  
day  21  
language R

There were no complaints, and typing ``junk'' in the R window
and in the Splus window appeared to produce indentical results.

So what's the problem?

cheers,

Rolf Turner
[EMAIL PROTECTED]

Tony Plate wrote:

 Have you tried following the advice in the R Data Import/Export manual?  It 
 suggests the following:
 
 Function data.restore reads S-PLUS data dumps (created by data.dump) with
 the same restrictions (except that dumps from the Alpha platform can also 
 be read).
 It should be possible to read data dumps from S-PLUS 5.x and 6.x written with
 data.dump(oldStyle=T).
 
 -- Tony Plate
 
 At Wednesday 10:29 AM 8/25/2004, Zachary Skrivanek wrote:
 Hello!  I would like to be able to read in list data objects in R/S
 created in R/S.  (Ie R-S or S-R.)  I have tried 'dput' and 'dump' in S,
 but neither of the created files could be read into R (with 'dget' nor
 'source').  Is there any way that I can save a list object in S that can
 be read into R?
 
 Sincerely,
 Zachary Skrivanek, PhD
 Research Scientist
 Program Phase Statistics-Endocrine

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] S - R

2004-08-25 Thread Tony Plate
I think the issue is that dput() and dget() don't work for some more 
complex structures (as you point out, they do appear to work for simple 
structures).  The R Data Import/Export manual doesn't mention using dput 
and dget to transfer objects between R and S-PLUS, perhaps because these 
functions have limited coverage?

E.g.:
S-PLUS6.1 junk - list(f=as.name(g))
S-PLUS6.1 dput(junk,junk1.dat)
S-PLUS6.1 data.dump(junk, file=junk2.dat, oldStyle=F)
S-PLUS6.1 data.dump(junk, file=junk3.dat, oldStyle=T)
R dget(junk1.dat)
Error in eval(expr, envir, enclos) : Object g not found
R # with package foreign loaded
R data.restore(junk2.dat)
Error in ReadSdump(TRUE,  ) : S mode junk (near byte offset 45) not 
supported
In addition: Warning message:
NAs introduced by coercion
R data.restore(junk3.dat)
[1] junk3.dat
R junk
$f
g


-- Tony Plate
At Wednesday 11:45 AM 8/25/2004, Rolf Turner wrote:
I'm puzzled by the discourse in this thread.  Briefly, dput() and
dget() seem to work just fine for me.
I tried
 junk - list(x=rnorm(20),y=sample(1:100,12,TRUE))
 dput(junk,junk.dat)
in Splus (Version 6.1.2 Release 2 for Sun SPARC, SunOS 5.6 : 2002)
and then in R
 junk - dget(junk.dat)
R version:
platform sparc-sun-solaris2.9
arch sparc
os   solaris2.9
system   sparc, solaris2.9
status
major1
minor9.1
year 2004
month06
day  21
language R
There were no complaints, and typing ``junk'' in the R window
and in the Splus window appeared to produce indentical results.
So what's the problem?
cheers,
Rolf Turner
[EMAIL PROTECTED]
Tony Plate wrote:
 Have you tried following the advice in the R Data Import/Export 
manual?  It
 suggests the following:

 Function data.restore reads S-PLUS data dumps (created by data.dump) with
 the same restrictions (except that dumps from the Alpha platform can also
 be read).
 It should be possible to read data dumps from S-PLUS 5.x and 6.x 
written with
 data.dump(oldStyle=T).

 -- Tony Plate

 At Wednesday 10:29 AM 8/25/2004, Zachary Skrivanek wrote:
 Hello!  I would like to be able to read in list data objects in R/S
 created in R/S.  (Ie R-S or S-R.)  I have tried 'dput' and 'dump' in S,
 but neither of the created files could be read into R (with 'dget' nor
 'source').  Is there any way that I can save a list object in S that can
 be read into R?
 
 Sincerely,
 Zachary Skrivanek, PhD
 Research Scientist
 Program Phase Statistics-Endocrine

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] S - R

2004-08-25 Thread Rolf Turner
Thanks Tony.  But the Mr. Skrivanek initially said he couldn't get
dput() and dget() to work with ***lists***.  It seems to turn out
that lists, as such, are not the issue.  The problem stems from
having relatively weird components in the lists.

Also, in your example, the issue is not an R -- S incompatibility
problem.  The example causes an error even if one stays entirely
within Splus (or within R):

===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===
 junk - list(f=as.name(g))
 dput(junk,junk.dat)
 crap - dget(junk.dat)
Problem in dget(junk.dat): Object g not found 
Use traceback() to see the call stack
===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===

And the same happens in R (except that the error message is phrased
differently:

===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===
Error in structure(list(f = g), .Names = f) : 
Object g not found
===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===+===

cheers,

Rolf Turner
[EMAIL PROTECTED]

__
[EMAIL PROTECTED] 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] Newbie Question: Spatial Autocorrelation with R Tutorial?

2004-08-25 Thread Jeff Hollister
Howdy All,

I am looking for some good tutorials (books, websites, whatever) for 
calculating/testing for Spatial Autocorrelation using R.

Specifically, I am wanting to test for autocorrelation of a number of variables 
measured at a set of discrete locations.

Up to this point I have been exploring the spdep package and I can get moran.test 
to work, but I am concerned that somewhere along the line I may not be doing things 
correctly.  Hence my request for a tutorial so that I may brush up on my 
autocorrelation basics, specifically autocorrelation with R, and reassure myself that 
the results I am getting aren't bogus.

Thanks in advance for any suggestions!

Jeff Hollister
  
*
Jeffrey William Hollister  
Ph.D. Candidate  
Environmental Data Center   
Department of Natural Resources Science  
University of Rhode Island   
office: (401) 874 5054
fax: (401) 874 4561
cell: (401)556 4087
http://www.edc.uri.edu/personal/jeff/home/jwh_cv_full.htm

__
[EMAIL PROTECTED] 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] Censored (Tobit) Regression method

2004-08-25 Thread Eric Peterson
I need to give a quick description of Tobit Regression (TR), including how
it differs from ordinary least squares (OLS).  I am an ecologist who knows
just enough about remote sensing and statistics to be dangerous in both.
Now I have found myself doing a remote sensing project where I have used TR:
survreg(Surv()).  As far as I can tell, no form of Censored Regression has
been used in analyzing satellite imagery, so the manuscript I am working on
will effectively be introducing TR to the remote sensing community.  The
manuscript has gone through peer review, and the strongest comment was that
I need to give a short description of TR compared to OLS.

While I think I've got a reasonable understanding of how to use it, I must
admit that I know nothing about the mathematics behind TR.

Some references mention it being a combination of OLS and Probit Analysis.
At least one econometrics book describes estimating an normal mean from data
with a censored or truncated normal distribution.  I also find lots of
mentionings of y (dependant variable) being a 'latent' variable, though I
cannot seem to find a definition for 'latent variable' anywhere, though my
guess is that it simply is another way of referring to a censored or
truncated variable.  I've also seen mentionings of the use of the Tobit
Model in Bayesian statistics... so maybe Tobit refers only to a linear model
with a censored outcome and there may be multiple ways of getting to that?

Here are some specific questions, in case that makes it easier to reply:
(1) Does 'Tobit' refer only to y* = Bx + E where y* is censored, or does it
also refer to the method for estimating the coefficients of significant
variables?  (Is it the model or the regression method?)

(2) What is a 'latent' variable?

(3) In the use of survreg(Surv()), are both OLS and Probit Analysis
involved?

(4) If OLS is involved, are there modifications made to estimating the
means?  Is this where Probit Analysis is involved?

(5) I've also seen mentionings of maximum likelihood (ML), and ML values are
given in the survreg output for the base and full models.  Where does ML get
involved in the calculations?

Thanks!
-Eric
---
Eric B. Peterson, Ph.D.
Vegetation Ecologist  Lichenologist
Nevada Natural Heritage Program
and (adjunct) UNR Dept. NRES


[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] 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] How to Arrange character vector in alphabetic order

2004-08-25 Thread Yao, Minghua
Hi,
 
Is there any function that can arrange a character in alphabetic order? Thanks for 
answer
 
-MY 

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] License for including datasets in packages

2004-08-25 Thread John Fox
Dear Arne,

I'm not a lawyer, but I believe that data per se are not copyrightable.

Regards,
 John 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Arne Henningsen
 Sent: Wednesday, August 25, 2004 12:06 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: [R] License for including datasets in packages
 
 Dear All,
 
 I would like to publish a function for 'heckit' estimations 
 together with two examples from Greene's and Wooldridge's 
 econometric textbooks. 
 These examples use the dataset of Mroz (1987) that is also 
 available in John Fox' car package. However, not all 
 variables that are used in my examples are available in the 
 car package. Therefore, I want to put the full Mroz dataset 
 in my package. This full dataset can be downloaded from some 
 internet sites (e.g. 
 pages.stern.nyu.edu/~wgreene/Text/econometricanalysis.htm,
 www.stata.com/texts/eacsap/), but I did not find any license 
 information. 
 
 Whom do I have to ask wether I am allowed to put these data 
 in a GPLed R package? (Mr. Mroz, Mr. Greene, STATA, 
 University of Michigan (PSID), . . . )
 
 @John: Do you have any license information on these data?
 
 Thanks,
 Arne
 
 --
 Arne Henningsen
 Department of Agricultural Economics
 University of Kiel
 Olshausenstr. 40
 D-24098 Kiel (Germany)
 Tel: +49-431-880 4445
 Fax: +49-431-880 1397
 [EMAIL PROTECTED]
 http://www.uni-kiel.de/agrarpol/ahenningsen/
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] How to Arrange character vector in alphabetic order

2004-08-25 Thread Liaw, Andy
You mean as in:

 x - c(aaa, abc, ab, d)
 sort(x)
[1] aaa ab  abc d  

??

Andy

 From: Yao, Minghua
 
 Hi,
  
 Is there any function that can arrange a character in 
 alphabetic order? Thanks for answer
  
 -MY

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to Arrange character vector in alphabetic order

2004-08-25 Thread Jeff Gentry
 Is there any function that can arrange a character in alphabetic order? Thanks for 
 answer

Check out sort().

 vv - c(letters[5:10], letters[20:11], letters[21:26], letters[4:1])
 vv
 [1]
e f g h i j t s r q p o n m l k u v w[20]
x y z d c b a
 sort(vv)
 [1]
a b c d e f g h i j k l m n o p q r s[20]
t u v w x y z

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] How to Arrange character vector in alphabetic order

2004-08-25 Thread Sundar Dorai-Raj

Yao, Minghua wrote:
Hi,
 
Is there any function that can arrange a character in alphabetic order? Thanks for answer
 
-MY 

[[alternative HTML version deleted]]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
  ^
?sort, ?order, etc
--sundar
__
[EMAIL PROTECTED] 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] RE: How to Arrange character vector in alphabetic order

2004-08-25 Thread Yao, Minghua
Sorry for not asking the question clearly. The elements of the character vector may 
consist of numbers not just letter. How to do that. Thanks.
 
-MY



From: Yao, Minghua
Sent: Wed 8/25/2004 2:20 PM
To: R Help
Subject: How to Arrange character vector in alphabetic order


Hi,
 
Is there any function that can arrange a character in alphabetic order? Thanks for 
answer
 
-MY 

[[alternative HTML version deleted]]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Pixmap problem

2004-08-25 Thread Roger Bivand
On Wed, 25 Aug 2004, Benjamin Lloyd-Hughes wrote:

 Hi,
 
 I'm having trouble writing .pnm images which I think is due to a problem
 with my colour space.  The pixmap object seems to be looking for 72 of 8
 colours (one per cell?) which doesn't seem healthy...
 
  library(pixmap)
  x - pixmapIndexed(rep(1:8, 9), nrow=6, col=rainbow(8))
  x
 Pixmap image
   Type  : pixmapIndexed 
   Size  : 6x12 
   Resolution: 1x1 
   Bounding box  : 0 0 12 6 
   Nr. of colors : 72 of 8 
 
  write.pnm(x, file=D:/Temp/output.pnm)
 Error in options(x) : evaluation nested too deeply: infinite recursion /
 options(expression=)?

This one is in:

 x - pixmapIndexed(rep(1:8, 9), nrow=6, col=rainbow(8))
 as(x, pixmapRGB)
Error in options(x) : evaluation nested too deeply: infinite recursion / 
options(expression=)?

and as(x, pixmapRGB) is called to make the indexed pixmap 
an RGB pixmap, and hits:

setAs(pixmapIndexed, pixmapRGB,
function(from, to){
z = as(from, pixmapRGB)

in setAs(pixmapIndexed, pixmapRGB, ...

with traceback() saying, quite logically:

 traceback()
140: options(x)
139: getOption(topLevelEnvironment)
138: identical(envir, matchThisEnv)
137: topenv(parent.frame())
136: exists(classMetaName(Class), where)
135: isClass(class1)
134: possibleExtends(cl, class2)
133: is(fdef, genericMethods)
132: getMethodsForDispatch(f, fdef)
131: getMethods(coerce)
130: .quickCoerceSelect(thisClass, Class)
129: as(from, pixmapRGB)
128: asMethod(object)
...
5: as(from, pixmapRGB)
4: asMethod(object)
3: as(from, pixmapRGB)
2: asMethod(object)
1: as(x, pixmap)

for me:

 version
 _   
platform i686-pc-linux-gnu   
arch i686
os   linux-gnu   
system   i686, linux-gnu 
status   Under development (unstable)
major2   
minor0.0 
year 2004
month08  
day  06  
language R   

Until this is fixed, is it feasible for you to use pixmapRGB, not
pixmapIndexed, directly? pixmapRGB objects seem to pass through 
write.pnm() without trouble.

 
 
 Grey ones work but with a warning...
 
  x - pixmapGrey(rep(1:8, 9), nrow=6)
  x
 Pixmap image
   Type  : pixmapGrey 
   Size  : 6x12 
   Resolution: 1x1 
   Bounding box  : 0 0 12 6 
 
  write.pnm(x, file=D:/Temp/output.pnm)
 Warning message: 
 connection is already open 
 

 showConnections(TRUE)
  description class  mode text   isopen   can read can write
0 stdin terminal r  text opened yesno 
1 stdoutterminal w  text opened no yes
2 stderrterminal w  text opened no yes

suggests that this is caused by a coding infelicity:

con - file(file, open=w)
open(con, open=w)

in write.pnm() - the open() is unneeded, and will be removed in the next 
release.

 
 Any ideas? 
 
 Cheers, Ben
 [R 1.9.1 and Pixmap 0.4-1 under windows]
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: [EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Adding labels to variables

2004-08-25 Thread Mike Prager
At 01:01 PM 08/25/2004, Raubertas, Richard wrote:
As long as the function to load a package is called *library*,
I think your campaign to change common usage is doomed to failure.
Yes, and it's also annoyingly hard to remember -- at least for those of us 
who don't eat, sleep, and breathe R.

MHP

--
Michael Prager, Ph.D.[EMAIL PROTECTED]
NOAA Center for Coastal Fisheries and Habitat Research
Beaufort, North Carolina  28516
http://shrimp.ccfhrb.noaa.gov/~mprager/
NOTE: Opinions expressed are personal, not official.  No government 
endorsement of
any product is expressed or implied.

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] RE: How to Arrange character vector in alphabetic order

2004-08-25 Thread Sundar Dorai-Raj

Yao, Minghua wrote:
Sorry for not asking the question clearly. The elements of the character vector may consist of numbers not just letter. How to do that. Thanks.
 
-MY

Why won't ?sort do what you want? Please provide an example and the 
output you desire.

--sundar
__
[EMAIL PROTECTED] 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] integrate function

2004-08-25 Thread Ronaldo Reis Jr.
Is possible to integrate this diferential equation:

dN/dt = Nr(1-(N/K))

in R using the integrate() function?

Or any other diferential equation?

If yes, how?

If no, anybody know any software on linux that make this?

Inte
Ronaldo
-- 

O problema de ter os dois pés bem firmes no chão é que você não vai conseguir 
tirar as calças.

--Anônimo
--
|   // | \\   [***]
|   ( õ   õ )  [Ronaldo Reis Júnior]
|  V  [UFV/DBA-Entomologia]
|/ \   [36571-000 Viçosa - MG  ]
|  /(.''`.)\  [Fone: 31-3899-2532 ]
|  /(: :'  :)\ [EMAIL PROTECTED]]
|/ (`. `'` ) \[ICQ#: 5692561 | LinuxUser#: 205366 ]
|( `-  )   [***]
|  _/   \_Powered by GNU/Debian Woody/Sarge

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] RE: How to Arrange character vector in alphabetic order

2004-08-25 Thread Liaw, Andy
Please do read the posting guide, which suggests that you provide a simple
example of what you want to achieve, instead of leaving people guessing what
you have in mind.

Andy

 From: Yao, Minghua
 
 Sorry for not asking the question clearly. The elements of 
 the character vector may consist of numbers not just letter. 
 How to do that. Thanks.
  
 -MY
 
 
 
 From: Yao, Minghua
 Sent: Wed 8/25/2004 2:20 PM
 To: R Help
 Subject: How to Arrange character vector in alphabetic order
 
 
 Hi,
  
 Is there any function that can arrange a character in 
 alphabetic order? Thanks for answer
  
 -MY 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Adding labels to variables

2004-08-25 Thread Peter Dalgaard
Mike Prager [EMAIL PROTECTED] writes:

 At 01:01 PM 08/25/2004, Raubertas, Richard wrote:
 As long as the function to load a package is called *library*,
 I think your campaign to change common usage is doomed to failure.

Who says it's common usage? It is of course a common fallacy to think
that everyone else makes the same mistakes as you do... 
 
 Yes, and it's also annoyingly hard to remember -- at least for those
 of us who don't eat, sleep, and breathe R.

There's a good chance that R-2.x will introduce usePackage() and
eventually remove library() as a tool for loading packages. 

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] integrate function

2004-08-25 Thread Peter Dalgaard
Ronaldo Reis Jr. [EMAIL PROTECTED] writes:

 Is possible to integrate this diferential equation:
 
 dN/dt = Nr(1-(N/K))
 
 in R using the integrate() function?

No.
 
 Or any other diferential equation?

Only if the right hand side does not depend on the dependent variable
(N in this case) -- just plain integrals.

 If yes, how?
 
 If no, anybody know any software on linux that make this?

The odesolve package in R. 

Possibly, there's also stuff in Octave but I haven't looked lately. 

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [Q] Apply Function Over Multiple Array Margins

2004-08-25 Thread Peter Dalgaard
Paul Roebuck [EMAIL PROTECTED] writes:

 Is there a canonical means to apply a function
 over multiple arrays simultaneously? For example,
 if I wanted to plot each line with a different color?
 Or is a for loop conversion my best option?

Try looking at matplot() and friends...
 
 
 x - seq(0, 8, by = 2)
 y - matrix(1:15, nrow = 5, byrow = TRUE)
 my.colors - heat.colors(3)
 
 drawLines - function(row) {
 lines(x, row)# want corresponding 'my.colors' here
 }
 
 plotData - function(x, y) {
 plot(x, type='n', axes = FALSE,
  xlim = c(min(x), max(x)),
  ylim = c(0, max(y)));
 box();
 axis(1, min(x):max(x))
 axis(2, seq(0, max(y), by = 5))
 axis(3, labels = FALSE)
 axis(4, labels = FALSE)
 apply(y, 1, drawLines)
 }
 
 plotData(x, t(y))
 
 --
 SIGSIG -- signature too long (core dumped)
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] [Q] Apply Function Over Multiple Array Margins

2004-08-25 Thread Jeff Gentry
 Is there a canonical means to apply a function
 over multiple arrays simultaneously? For example,

Would mapply() get you what you're looking for?

__
[EMAIL PROTECTED] 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] gam plots

2004-08-25 Thread Paul von Hippel
When smooths fitted by the gam package are plotted, what are the units of 
the vertical axis? Is there a simple way to change these units to units of 
the dependent variable?

Thanks for any suggestions!
Paul von Hippel
Paul von Hippel
Department of Sociology / Initiative in Population Research
Ohio State University
300 Bricker Hall
190 N. Oval Mall
Columbus OH 43210
614 688-3768
Office hours M-Th 3-5pm
__
[EMAIL PROTECTED] 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] brlr function

2004-08-25 Thread Min-Han Tan
Hi,

I'm trying the brlr function in a penalized logistic regression function. 

However, I am not sure why I am encountering errors. I hope to seek
your advice here. (output below)

Thank you! Your help is truly appreciated.

Min-Han


#No error here, the glm seems to work fine
 genes.cox1.glm1-glm(as.formula(paste(paste('as.integer(sim.cv.cox.yhat1)~'),paste('sim.dat.tst[',genes.cox1.rows,',]',sep=,collapse='+'

#Something happened here ... I only substituted brlr for glm
  genes.cox1.glm1-brlr(as.formula(paste(paste('as.integer(sim.cv.cox.yhat1)~'),paste('sim.dat.tst[',genes.cox1.rows,',]',sep=,collapse='+'
Error in eval(expr, envir, enclos) : y values must be 0 = y = 1

#using the test data in brlr gives the same error if the dependent is
reduced to one column, is it a problem with my dependent? It works
fine as per the original vignette with
brlr(cbind(grahami,opalinus)~height ...)
 brlr(grahami~height+diameter,data=lizards)
Error in eval(expr, envir, enclos) : y values must be 0 = y = 1
 
#This is how the objects look
 as.integer(sim.cv.cox.yhat1)
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 2 2 1 1 2 2 1 1 1 2 1 2 2 2
1 2 1 1 2 1 1 2 1 1 1 2 2 2 2

 as.formula(paste(paste('as.integer(sim.cv.cox.yhat1)~'),paste('sim.dat.tst[',genes.cox1.rows,',]',sep=,collapse='+')))
as.integer(sim.cv.cox.yhat1) ~ sim.dat.tst[27, ] + sim.dat.tst[35, 
] + sim.dat.tst[17, ] + sim.dat.tst[41, ] + sim.dat.tst[38, 
] + sim.dat.tst[31, ] + sim.dat.tst[3, ] + sim.dat.tst[32, 
] + sim.dat.tst[16, ] + sim.dat.tst[48, ] + sim.dat.tst[13, 
] + sim.dat.tst[28, ]
 
 sim.dat.tst[27,]
Sample 1  Sample 2  Sample 3  Sample 4  Sample 5  Sample 6  Sample 7 
Sample 8  Sample 9 Sample 10 Sample 11 Sample 12 Sample 13 Sample 14
Sample 15
 5.79  6.72  6.11  5.58  6.32  6.50  6.45 
5.77  7.46  6.32  5.64  5.77  5.44  5.83  
   5.57
Sample 16 Sample 17 Sample 18 Sample 19 Sample 20 Sample 21 Sample 22
Sample 23 Sample 24 Sample 25 Sample 26 Sample 27 Sample 28 Sample 29
Sample 30
 5.70  5.67  5.72  5.50  6.34  5.98  6.10 
6.25  6.13  7.40  7.28  8.37  5.73  6.83  
   5.72
Sample 31 Sample 32 Sample 33 Sample 34 Sample 35 Sample 36 Sample 37
Sample 38 Sample 39 Sample 40 Sample 41 Sample 42 Sample 43 Sample 44
Sample 45
 6.12  6.74  6.64  6.13  7.74  6.70  7.37 
6.54  6.49  5.75  6.18  6.41  7.68  5.36  
   6.34
Sample 46 Sample 47 Sample 48 
 5.86  6.64  6.69

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Adding labels to variables

2004-08-25 Thread Raubertas, Richard
Sigh.  I thought I was making a small innocuous observation,
but it has apparently been taken as some kind of challenge.
Martin's efforts to correct this usage seem (to me) frequent 
enough to justify calling the mistake 'common', but I guess
others will disagree.

And what grounds do you have for your implication that it is 
a mistake I make?

Rich Raubertas

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard
 Sent: Wednesday, August 25, 2004 4:37 PM
 To: Mike Prager
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] Adding labels to variables
 
 
 Mike Prager [EMAIL PROTECTED] writes:
 
  At 01:01 PM 08/25/2004, Raubertas, Richard wrote:
  As long as the function to load a package is called *library*,
  I think your campaign to change common usage is doomed to failure.
 
 Who says it's common usage? It is of course a common fallacy to think
 that everyone else makes the same mistakes as you do... 
  
  Yes, and it's also annoyingly hard to remember -- at least for those
  of us who don't eat, sleep, and breathe R.
 
 There's a good chance that R-2.x will introduce usePackage() and
 eventually remove library() as a tool for loading packages. 
 
 -- 
O__   Peter Dalgaard Blegdamsvej 3  
   c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
  (*) \(*) -- University of Copenhagen   Denmark  Ph: 
 (+45) 35327918
 ~~ - ([EMAIL PROTECTED]) FAX: 
 (+45) 35327907
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


__
[EMAIL PROTECTED] 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] Beginners Question: Make nlm work

2004-08-25 Thread Johannes Graumann
Hello,

I'm new to this and am trying to teach myself some R by plotting
biological data. The growth curve in question is supposed to be fitted
to the Verhulst equation, which may be transcribed as follows:
f(x)=a/(1+((a-0.008)/0.008)*exp(-(b*x)))
- for a known population density (0.008) at t(0).

I am trying to rework the example from An Introduction to R (p. 72)
for my case and am failing miserably. Could somebody glance over the
code below and nudge me into the right direction - I must have some
major conceptual problem which can't be solved by me staring at it ...
Since I'm repeating something I have done with gnuplot I know that 3 and
4e-3 as starting values for the fit are appropriate ...

Thanks for any hint,

Joh

setwd(~/Biology/R_versuch)
mydata-read.table(YJG45-7_Growth.dat)
x-mydata$V1
y-mydata$V2
VH - function(p) y ~ p[1]/(1+((p[1]-0.008)/0.008)*exp(-(p[2]*x)))
plot(x, y, xlab=Time (h),ylab=expression(OD[600][~nm]),las=1)
out - nlm(VH, p = c(3, 4e-3), hessian = TRUE)

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Adding labels to variables

2004-08-25 Thread Berton Gunter
May I also point out the following section title in the R1091 FAQ for
Windows:

3.1 Can I install packages (libraries) in this version?  

So I think that R's own documentation supports Rich's (gentle) comment.

-- Bert Gunter
Genentech

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Raubertas, Richard
Sent: Wednesday, August 25, 2004 3:51 PM
To: 'Peter Dalgaard'
Cc: '[EMAIL PROTECTED]'
Subject: RE: [R] Adding labels to variables

Sigh.  I thought I was making a small innocuous observation,
but it has apparently been taken as some kind of challenge.
Martin's efforts to correct this usage seem (to me) frequent 
enough to justify calling the mistake 'common', but I guess
others will disagree.

And what grounds do you have for your implication that it is 
a mistake I make?

Rich Raubertas

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Beginners Question: Make nlm work

2004-08-25 Thread Jim Brennan

- Original Message -
From: Johannes Graumann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 7:07 PM
Subject: [R] Beginners Question: Make nlm work


 Hello,

 I'm new to this and am trying to teach myself some R by plotting
 biological data. The growth curve in question is supposed to be fitted
 to the Verhulst equation, which may be transcribed as follows:
 f(x)=a/(1+((a-0.008)/0.008)*exp(-(b*x)))
 - for a known population density (0.008) at t(0).

 I am trying to rework the example from An Introduction to R (p. 72)
 for my case and am failing miserably. Could somebody glance over the
 code below and nudge me into the right direction - I must have some
 major conceptual problem which can't be solved by me staring at it ...
 Since I'm repeating something I have done with gnuplot I know that 3 and
 4e-3 as starting values for the fit are appropriate ...

 Thanks for any hint,

 Joh

 setwd(~/Biology/R_versuch)
 mydata-read.table(YJG45-7_Growth.dat)
 x-mydata$V1
 y-mydata$V2
 VH - function(p) y ~ p[1]/(1+((p[1]-0.008)/0.008)*exp(-(p[2]*x)))

Shouldn't this be
VH - function(p) sum((y - p[1]/(1+((p[1]-0.008)/0.008)*exp(-(p[2]*x^2)
Where you are minimizing the squared deviations from what your given
equation is when you pass it to nlm?

Maybe if you send some data that would make it more clear.

Jim


 plot(x, y, xlab=Time (h),ylab=expression(OD[600][~nm]),las=1)
 out - nlm(VH, p = c(3, 4e-3), hessian = TRUE)

 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] labels on secondary y axis

2004-08-25 Thread Patrick Connolly
On Thu, 26-Aug-2004 at 01:34AM +0100, Louize Hill wrote:

| Hi,
| I have plotted a graph and used a secondary axis as follows:
| 
| plot (d$Year, d$HrFishing, type='l', col='1', xlab='Year', ylab='Effort
| (hours/fishing)')
| par(new=TRUE)
| plot (d$Year, d$Landings, type='l', col='3', xlab='', ylab='')
| axis(4)
| 
| However, if I put a label in the 2nd ylab='' it is placed over the 1st ylab,
| on the left hand side.
| Clearly label in the axis command is not what I want as that erases my tick
| marks, and ylab generates errors here!
| Please can someone give me a pointer on what I should be using.

mtext is your friend.



-- 
Patrick Connolly
HortResearch
Mt Albert
Auckland
New Zealand 
Ph: +64-9 815 4200 x 7188
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~
I have the world`s largest collection of seashells. I keep it on all
the beaches of the world ... Perhaps you`ve seen it.  ---Steven Wright 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~

__
[EMAIL PROTECTED] 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] Re: brlr function

2004-08-25 Thread Min-Han Tan
Thank you all. 

The reason was because the dependent should have been 0 and 1, rather
than 1 and 2!

Apologies for any trouble.

Min-Han


On Wed, 25 Aug 2004 18:40:38 -0400, Min-Han Tan
[EMAIL PROTECTED] wrote:
 Hi,
 
 I'm trying the brlr function in a penalized logistic regression function.
 
 However, I am not sure why I am encountering errors. I hope to seek
 your advice here. (output below)
 
 Thank you! Your help is truly appreciated.
 
 Min-Han
 
 #No error here, the glm seems to work fine
  genes.cox1.glm1-glm(as.formula(paste(paste('as.integer(sim.cv.cox.yhat1)~'),paste('sim.dat.tst[',genes.cox1.rows,',]',sep=,collapse='+'
 
 #Something happened here ... I only substituted brlr for glm
  genes.cox1.glm1-brlr(as.formula(paste(paste('as.integer(sim.cv.cox.yhat1)~'),paste('sim.dat.tst[',genes.cox1.rows,',]',sep=,collapse='+'
 Error in eval(expr, envir, enclos) : y values must be 0 = y = 1
 
 #using the test data in brlr gives the same error if the dependent is
 reduced to one column, is it a problem with my dependent? It works
 fine as per the original vignette with
 brlr(cbind(grahami,opalinus)~height ...)
  brlr(grahami~height+diameter,data=lizards)
 Error in eval(expr, envir, enclos) : y values must be 0 = y = 1
 
 #This is how the objects look
  as.integer(sim.cv.cox.yhat1)
 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 2 2 1 1 2 2 1 1 1 2 1 2 2 2
 1 2 1 1 2 1 1 2 1 1 1 2 2 2 2
 
  as.formula(paste(paste('as.integer(sim.cv.cox.yhat1)~'),paste('sim.dat.tst[',genes.cox1.rows,',]',sep=,collapse='+')))
 as.integer(sim.cv.cox.yhat1) ~ sim.dat.tst[27, ] + sim.dat.tst[35,
] + sim.dat.tst[17, ] + sim.dat.tst[41, ] + sim.dat.tst[38,
] + sim.dat.tst[31, ] + sim.dat.tst[3, ] + sim.dat.tst[32,
] + sim.dat.tst[16, ] + sim.dat.tst[48, ] + sim.dat.tst[13,
] + sim.dat.tst[28, ]
 
  sim.dat.tst[27,]
 Sample 1  Sample 2  Sample 3  Sample 4  Sample 5  Sample 6  Sample 7
 Sample 8  Sample 9 Sample 10 Sample 11 Sample 12 Sample 13 Sample 14
 Sample 15
 5.79  6.72  6.11  5.58  6.32  6.50  6.45
5.77  7.46  6.32  5.64  5.77  5.44  5.83
   5.57
 Sample 16 Sample 17 Sample 18 Sample 19 Sample 20 Sample 21 Sample 22
 Sample 23 Sample 24 Sample 25 Sample 26 Sample 27 Sample 28 Sample 29
 Sample 30
 5.70  5.67  5.72  5.50  6.34  5.98  6.10
6.25  6.13  7.40  7.28  8.37  5.73  6.83
   5.72
 Sample 31 Sample 32 Sample 33 Sample 34 Sample 35 Sample 36 Sample 37
 Sample 38 Sample 39 Sample 40 Sample 41 Sample 42 Sample 43 Sample 44
 Sample 45
 6.12  6.74  6.64  6.13  7.74  6.70  7.37
6.54  6.49  5.75  6.18  6.41  7.68  5.36
   6.34
 Sample 46 Sample 47 Sample 48
 5.86  6.64  6.69


__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Beginners Question: Make nlm work

2004-08-25 Thread Johannes Graumann
Aaaa - there was my conceptual problem ... Thanks!
... but 'Oh, God!'! R sucks at fitting (when directed to do so by the
simple minded)! Or am I really that off?
I attach a plot that contains my data as well as two modeled curves:
- the nice one fitted by gnuplot (nonlinear least-squares (NLLS)
Marquardt-Levenberg)
- the nasty one fitted by the code below.

Both algorithms were started with the same values for p[1] and p[2].

Comments?

Is there any way to access the 2 elements of 'out$estimate' from the
program?

Joh

setwd(~/Biology/R_versuch)
mydata-read.table(YJG45-7_Growth.dat)
#plot(mydata$V1,mydata$V2,xlab=Time
(h),ylab=expression(OD[600][~nm]),las=1) x-mydata$V1
y-mydata$V2
VH - function(p) sum(
(y - p[1]/(1+((p[1]-0.008)/0.008)*exp(-(p[2]*x^2) 
plot(x, y,
axes=FALSE,
type=p,
xlab=Time (min),
ylab=expression(OD[600][~nm]),
las=1,
pch=20,
tck=0.015,
mgp=c(1.5,0.25,0),
)
axis(1,
at=NULL,
tick=TRUE,
tck=0.015,
mgp=c(1.5,0.25,0)
)
axis(2,
at=NULL,
tick=TRUE,
tck=0.015,
mgp=c(1.5,0.25,0)
)
axis(3,
at=c(300,600,900,1200,1500,1800,2100),
labels=c(5,10,15,20,25,30,35),
tick=TRUE,
tck=0.015,
mgp=c(1.5,0.25,0))
axis(4,
labels=FALSE,
at=NULL,
tick=TRUE,
tck=0.015,
mgp=c(1.5,0.25,0)
)
box() 
out - nlm(VH, p = c(3, 4e-3), hessian = TRUE)
#Plot Results from Gnuplot fit
yfit1 - 4.21632/(1+((4.21632-0.008)/0.008)*exp(-(0.00414403*x)))
lines(spline(x, yfit1))
#Plot Results from 'out'
yfit2 -
3.02050/(1+((3.02050-0.008)/0.008)*exp(-(0.004587924*x)))
lines(spline(x,yfit2))

On Wed, 25 Aug 2004 21:06:24 -0400
Jim Brennan [EMAIL PROTECTED] wrote:

 
 - Original Message -
 From: Johannes Graumann [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, August 25, 2004 7:07 PM
 Subject: [R] Beginners Question: Make nlm work
 
 
  Hello,
 
  I'm new to this and am trying to teach myself some R by plotting
  biological data. The growth curve in question is supposed to be
  fitted to the Verhulst equation, which may be transcribed as
  follows: f(x)=a/(1+((a-0.008)/0.008)*exp(-(b*x)))
  - for a known population density (0.008) at t(0).
 
  I am trying to rework the example from An Introduction to R (p.
  72) for my case and am failing miserably. Could somebody glance over
  the code below and nudge me into the right direction - I must have
  some major conceptual problem which can't be solved by me staring at
  it ... Since I'm repeating something I have done with gnuplot I know
  that 3 and 4e-3 as starting values for the fit are appropriate ...
 
  Thanks for any hint,
 
  Joh
 
  setwd(~/Biology/R_versuch)
  mydata-read.table(YJG45-7_Growth.dat)
  x-mydata$V1
  y-mydata$V2
  VH - function(p) y ~ p[1]/(1+((p[1]-0.008)/0.008)*exp(-(p[2]*x)))
 
 Shouldn't this be
 VH - function(p) sum((y -
 p[1]/(1+((p[1]-0.008)/0.008)*exp(-(p[2]*x^2) Where you are
 minimizing the squared deviations from what your given equation is
 when you pass it to nlm?
 
 Maybe if you send some data that would make it more clear.
 
 Jim
 
 
  plot(x, y, xlab=Time (h),ylab=expression(OD[600][~nm]),las=1)
  out - nlm(VH, p = c(3, 4e-3), hessian = TRUE)
 
  __
  [EMAIL PROTECTED] mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html
 


plot1.eps
Description: PostScript document
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

RE: [R] Adding labels to variables

2004-08-25 Thread John Fox
Dear Spencer et al.,

I agree with Spencer's point: It's one thing to introduce usePackage() and
encourage its use, another to remove library().

Regards,
 John

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Graves
 Sent: Wednesday, August 25, 2004 9:03 PM
 To: Peter Dalgaard
 Cc: Mike Prager; [EMAIL PROTECTED]
 Subject: Re: [R] Adding labels to variables
 
   Mon Dieu! 
 
   I realize that I'm not part of r-devel, but for what 
 it's worth, I vastly prefer commands and programming styles 
 that produce code that can run without change in both S-Plus 
 and R.  Any move to obsolete in R a command commonly used in 
 S-Plus would just make life more difficult for those of us 
 who have to live in both the S-Plus and R worlds.  In my 
 judgment, where S-Plus and R currently differ, there usually 
 seems to be a good reason, and R is usually superior.  One 
 example is the log 
 options in the probability functions. 
 
   The suggestion to introduce usePackage and obsolete library 
 reminds me of a 6 week delay in the introduction in France of 
 a US automobile, because the French Royal Academy failed to 
 produce without a substantial delay an official French word 
 for a new technical term.  The automobile could not be sold 
 without the User's Manual in French, and it could not be 
 printed without the approval of the French Royal Academy for 
 new words. 
 
   just my 2e-12 cents.  spencer graves
 
 Peter Dalgaard wrote:
 
 Mike Prager [EMAIL PROTECTED] writes:
 
   
 
 At 01:01 PM 08/25/2004, Raubertas, Richard wrote:
 
 
 As long as the function to load a package is called *library*, I 
 think your campaign to change common usage is doomed to failure.
   
 
 
 Who says it's common usage? It is of course a common fallacy 
 to think 
 that everyone else makes the same mistakes as you do...
  
   
 
 Yes, and it's also annoyingly hard to remember -- at least 
 for those 
 of us who don't eat, sleep, and breathe R.
 
 
 
 There's a good chance that R-2.x will introduce usePackage() and 
 eventually remove library() as a tool for loading packages.
 
   
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Adding labels to variables

2004-08-25 Thread Gabor Grothendieck
Peter Dalgaard p.dalgaard at biostat.ku.dk writes:

 There's a good chance that R-2.x will introduce usePackage() and
 eventually remove library() as a tool for loading packages. 

We already have require().

__
[EMAIL PROTECTED] 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] Difficulties in starting up with its package

2004-08-25 Thread Ajay Shah
Folks,

I'm trying to learn `its' and am stuck on many basics. Could you
please help? I am on R 1.9.1 (2004-06-21) on Linux 2.4.17 #2. My its
version says
  Packaged: Tue Apr 27 13:38:25 2004; HeywoodG
  Built: R 1.9.0; ; 2004-04-28 15:03:13; unix

This part flows fine --
  library(its)
  x1 - newIts(start=2000-01-01, end=2000-01-10, 1:30, ncol=3)
  print(x1)
  x2 - newIts(start=2000-01-01, end=2000-01-10, 1:30, ncol=3,
extract=T, weekday=T)
  print(x2)

Now I get into trouble --
  str(x1)# works
  str(x2)# BREAKS

For the str(x2) it says Error in object[1:ile] : subscript out of bounds
Is this a bug?


I try to go on.
  # Let's try writing and reading --
  writecsvIts(x1, filename=/tmp/try.1)
  y - its(readcsvIts(filename=/tmp/try.1))
  print(y)  # looks fine
  print(x1) # looks fine
  y-x1   # BREAKS

For the y-x1 command, he says Error in y - x1 : dates must match.
But when I look at y and x1, the dates do seem to match.


I read in two of my own data files like this --
  nifty.its - readcsvIts(filename=nifty.d, header=F, sep= ,
  col.names=c(date, r.nifty),
  informat=its.format(%Y%m%d),
  outformat=its.format(%Y-%m-%d))
  inrusd.its - readcsvIts(filename=inrusd.d, header=F, sep= ,
  col.names=c(date, r.inrusd),
  informat=its.format(%Y%m%d),
  outformat=its.format(%Y-%m-%d))

These seem to be fine. To help you diagnose my problem, I have put the
results of dput() for both these at the end. Now when I say:

   union(nifty.its, inrusd.its)
[1] 1.0149431 1.0093692 1.0126526 0.9845319 0.9804095 0.9846924 1.0105904
[8] 1.0311819 0.9986636 0.9950831 0.9922442 0.9510527 0.9833306 1.0131162
[15] 0.9966518 0.9970885 1.000 1.0065139 1.0093729 0.9991156 0.9975658
[22] 1.0042147 1.0039761 0.9988999 0.9955947 0.9953540 1.0046677 0.9993363
[29] 1.0015497 1.0022104 0.9984561

I find this odd: I thought union() was supposed to give me an its
object.

   intersect(nifty.its, inrusd.its)
numeric(0)

I find this odd: the two series have plenty of dates in common. And, I
thought intersect() would produce an its object.

Here's the dput results for nifty.its and inrusd.its --

 dput(nifty.its)
structure(c(1.01494311428086, 1.00936924878702, 1.01265263274214, 
0.984531863814928, 0.980409543074067, 0.98469241317728, 1.01059040709914, 
1.03118189975644, 0.998663641731672, 0.995083089562457, 0.992244183137353, 
0.951052697932426, 0.983330571665286), .Dim = as.integer(c(13, 
1)), .Dimnames = list(c(2004-05-04, 2004-05-05, 2004-05-06, 
2004-05-07, 2004-05-10, 2004-05-20, 2004-05-21, 2004-05-24, 
2004-05-25, 2004-05-26, 2004-05-27, 2004-05-28, 2004-05-31),
r.nifty))
 dput(inrusd.its)
structure(c(1.01311623699683, 0.996651785714286, 0.997088465845465, 
1, 1.00651392632525, 1.00937290783307, 0.999115631218218, 0.997565833148927, 
1.00421472937001, 1.00397614314115, 0.998899889989, 0.995594713656388, 
0.995353982300885, 1.00466770393421, 0.99933628318584, 1, 1.00154970112907, 
1.00221043324492, 0.998456109395677), .Dim = as.integer(c(19, 
1)), .Dimnames = list(c(2004-05-03, 2004-05-05, 2004-05-06, 
2004-05-07, 2004-05-10, 2004-05-11, 2004-05-12, 2004-05-13, 
2004-05-14, 2004-05-17, 2004-05-18, 2004-05-19, 2004-05-20, 
2004-05-21, 2004-05-24, 2004-05-25, 2004-05-26, 2004-05-27, 
2004-05-28), r.inrusd))

-- 
Ajay Shah   Consultant
[EMAIL PROTECTED]  Department of Economic Affairs
http://www.mayin.org/ajayshah   Ministry of Finance, New Delhi

__
[EMAIL PROTECTED] 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] Plotting groupedData objects

2004-08-25 Thread David Scott

I am trying to create a plot similar to Figure 3.2 in Bates and Pinheiro.

I have repeated measurements on about 80 subjects from 2 treatment groups.  
I would like to have the panels for the two treatment groups in separate
groups and within those groups have the panels ordered on maximum value
(as is the default).

I am ok with getting plots similar to Figs 3.1 and 3.2, but can't see how 
to change the ordering of the panels to what I want.

Here is the definition of my groupedData object

RAWlmeData - groupedData(RAW~Elapsed|ID,
  data=RAWData,
  labels=list(x=Elapsed time,y=Airways resistance),
  units=list(x=(hours),y=cm H20/L/sec))

I guess I could just plot the two treatment groups separately in turn but 
I feel there is something I am missing.

I am using 1.9.1 on Windows XP.

David Scott


_
David Scott Department of Statistics, Tamaki Campus
The University of Auckland, PB 92019
AucklandNEW ZEALAND
Phone: +64 9 373 7599 ext 86830 Fax: +64 9 373 7000
Email:  [EMAIL PROTECTED] 


Graduate Officer, Department of Statistics

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Difficulties in starting up with its package

2004-08-25 Thread Gabor Grothendieck
Ajay Shah ajayshah at mayin.org writes:

: 
: Folks,
: 
: I'm trying to learn `its' and am stuck on many basics. 


Not sure about those issues but I am familiar with zoo and you could do
the above in zoo like this. 

require(zoo)

d - seq(as.Date(2000-01-01), as.Date(2000-01-10), by = day)
x1 - zoo(matrix(1:30,ncol=3), d)

dw - d[as.numeric(format(d,%w)) %in% 1:5]
x2 - zoo(matrix(1:30,ncol=3), dw)
print(x2)

str(x1)
str(x2)

write.table(data.frame(time = time(x1), unclass(x1)), file = /mytest.txt)
y - read.table(/mytest.txt, header = T, as.is = T)
y - zoo(data.matrix(y[,-1]),as.Date(y[,1]))
print(y)
print(x1)

# this works since y and x1 same times and are conformable but in general 
# you need to do a merge first to align them
y-x1 

nifty.its -
structure(c(1.01494311428086, 1.00936924878702, 1.01265263274214, 
0.984531863814928, 0.980409543074067, 0.98469241317728, 1.01059040709914, 
1.03118189975644, 0.998663641731672, 0.995083089562457, 0.992244183137353, 
0.951052697932426, 0.983330571665286), .Dim = as.integer(c(13, 
1)), .Dimnames = list(c(2004-05-04, 2004-05-05, 2004-05-06, 
2004-05-07, 2004-05-10, 2004-05-20, 2004-05-21, 2004-05-24, 
2004-05-25, 2004-05-26, 2004-05-27, 2004-05-28, 2004-05-31),
r.nifty))

inrusd.its -
structure(c(1.01311623699683, 0.996651785714286, 0.997088465845465, 
1, 1.00651392632525, 1.00937290783307, 0.999115631218218, 0.997565833148927, 
1.00421472937001, 1.00397614314115, 0.998899889989, 0.995594713656388, 
0.995353982300885, 1.00466770393421, 0.99933628318584, 1, 1.00154970112907, 
1.00221043324492, 0.998456109395677), .Dim = as.integer(c(19, 
1)), .Dimnames = list(c(2004-05-03, 2004-05-05, 2004-05-06, 
2004-05-07, 2004-05-10, 2004-05-11, 2004-05-12, 2004-05-13, 
2004-05-14, 2004-05-17, 2004-05-18, 2004-05-19, 2004-05-20, 
2004-05-21, 2004-05-24, 2004-05-25, 2004-05-26, 2004-05-27, 
2004-05-28), r.inrusd))

nifty.zoo - zoo(nifty.its, as.Date(rownames(nifty.its)))
rownames(nifty.zoo) - NULL

inrusd.zoo - zoo(inrusd.its, as.Date(rownames(inrusd.its)))
rownames(inrusd.zoo) - NULL

# merge.zoo is similar to union in its
merge(nifty.zoo, inrusd.zoo)

# merge.zoo with all = FALSE is similar to intersect in its
merge(nifty.zoo, inrusd.zoo, all = FALSE)

__
[EMAIL PROTECTED] 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] Order with scientific notations

2004-08-25 Thread Kevin Wang
Hi,
If a value like 8e-04 is in a data frame, is the following behaviour normal?
   final.df
 Chr P.values
  11   0.0379
  260.068
  32   0.0025
  4   138e-04
  5   14   0.0244
  63   0.0279
  74   0.1561
  85   0.9261
  97   0.0011
  10   9   0.5125
  11  10   0.2196
  12  11   0.6457
  13  18   0.9272
   final.sorted - data.frame(final.df[order(final.df$P.values), ],
  +row.names = 1:13)
   final.sorted
 Chr P.values
  17   0.0011
  22   0.0025
  3   14   0.0244
  43   0.0279
  51   0.0379
  660.068
  74   0.1561
  8   10   0.2196
  99   0.5125
  10  11   0.6457
  11   5   0.9261
  12  18   0.9272
  13  138e-04
I'd think 8e-04 should be the smallest value...?  It's R 1.9.1 on 
Windows XP if that helps.

Cheers,
Kevin
--
Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200
Australia
Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] library() (was Adding labels to variables)

2004-08-25 Thread Prof Brian Ripley
Can I remind people to use a relevant subject line -- this has gone way 
off the original topic.

It is not proposed to just rename library() to usePackage() or similar.
The need is for a new interface to the loading of packages, one that
returns useful information in an object.  We also need to sort out the
mess of require() vs library(), especially as `require' does not actually
require its argument (and almost no one tests the return value).  I don't 
think it is going to make 2.0.0, though.

Incidentally, the section heading Bert Gunter quoted does not indicate 
that `library' is a synonym for `package', but that packages are installed 
into libraries.  In S, `library sections' are installed into libraries.

Spencer should be very happy that data() will be almost completely 
optional come 2.0.0: that's the R/S difference that most hurts writing 
common documentation in my experience.


On Wed, 25 Aug 2004, John Fox wrote:

 Dear Spencer et al.,
 
 I agree with Spencer's point: It's one thing to introduce usePackage() and
 encourage its use, another to remove library().
 
 Regards,
  John
 
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Graves
  Sent: Wednesday, August 25, 2004 9:03 PM
  To: Peter Dalgaard
  Cc: Mike Prager; [EMAIL PROTECTED]
  Subject: Re: [R] Adding labels to variables
  
Mon Dieu! 
  
I realize that I'm not part of r-devel, but for what 
  it's worth, I vastly prefer commands and programming styles 
  that produce code that can run without change in both S-Plus 
  and R.  Any move to obsolete in R a command commonly used in 
  S-Plus would just make life more difficult for those of us 
  who have to live in both the S-Plus and R worlds.  In my 
  judgment, where S-Plus and R currently differ, there usually 
  seems to be a good reason, and R is usually superior.  One 
  example is the log 
  options in the probability functions. 
  
The suggestion to introduce usePackage and obsolete library 
  reminds me of a 6 week delay in the introduction in France of 
  a US automobile, because the French Royal Academy failed to 
  produce without a substantial delay an official French word 
  for a new technical term.  The automobile could not be sold 
  without the User's Manual in French, and it could not be 
  printed without the approval of the French Royal Academy for 
  new words. 
  
just my 2e-12 cents.  spencer graves
  
  Peter Dalgaard wrote:
  
  Mike Prager [EMAIL PROTECTED] writes:
  

  
  At 01:01 PM 08/25/2004, Raubertas, Richard wrote:
  
  
  As long as the function to load a package is called *library*, I 
  think your campaign to change common usage is doomed to failure.

  
  
  Who says it's common usage? It is of course a common fallacy 
  to think 
  that everyone else makes the same mistakes as you do...
   

  
  Yes, and it's also annoyingly hard to remember -- at least 
  for those 
  of us who don't eat, sleep, and breathe R.
  
  
  
  There's a good chance that R-2.x will introduce usePackage() and 
  eventually remove library() as a tool for loading packages.
  

  
  
  __
  [EMAIL PROTECTED] mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide! 
  http://www.R-project.org/posting-guide.html
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
 
 

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

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html