Re: [R] Problems with heatmap.2 in the gregmisc package

2006-03-06 Thread Warnes, Gregory R
We're just about to relase a version of gregmisc that improves the code and 
documentation so that Rowv=FALSE and/or Colv=FALSE leaves the rows/columns in 
the original order.

-G

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Sean Davis
 Sent: Monday, March 06, 2006 9:25 AM
 To: michael watson (IAH-C); r-help
 Cc: Warnes, Gregory R
 Subject: Re: [R] Problems with heatmap.2 in the gregmisc package
 
 
 
 
 
 On 3/6/06 9:19 AM, michael watson (IAH-C) 
 [EMAIL PROTECTED]
 wrote:
 
  Hi
  
  Sorry to revisit an old problem, I seemed to solve this in 
 2004, only
  for it to resurface :-S
  
  I am trying to plot a heatmap, and I don't want the columns 
 of my matrix
  re-ordered.  The function doesn't seem to behave as the 
 help would have
  you believe:
  
  a - matrix(rnorm(100),nr=20)
  a.d  - dist(a)
  a.hc - hclust(a.d)
  a.de - as.dendrogram(a.hc)
  
  # columns are re-ordered
  heatmap.2(a, Rowv=a.de, Colv=FALSE)
  
  # columns are re-ordered
  heatmap.2(a, Rowv=a.de, Colv=1:5)
  
  # columns are re-ordered
  heatmap.2(a, Rowv=a.de, dendrogram=row)
  
  # error
  heatmap.2(a, Rowv=a.de, Colv=FALSE, dendrogram=row)
 
 How about:
 
  heatmap.2(a,Rowv=a.de,Colv=1:5,dendrogram=row)
 
 I thought Greg knew about this, but I'm not sure.  Have you 
 updated gregmisc
 recently?
 
 Sean
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
--
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


Re: [R] heatmap.2 in gplots package

2006-02-22 Thread Warnes, Gregory R
Hello Akkineni,

This bug has already been reported and we have a tentative solution that we are 
testing.  I'll send you a copy of the modified code once we finish testing.

-G

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 Akkineni,Vasundhara
 Sent: Wednesday, February 22, 2006 12:09 PM
 To: r-help@stat.math.ethz.ch
 Subject: [R] heatmap.2 in gplots package
 
 
 Hello all,
 
 I am using the heatmap.2 function in the gplots package. I 
 want to supress the reordering of the columns of the data 
 matrix i pass to the function. I used the statement,
 
 heatmap.2(z,Colv=FALSE,dendrogram=row,col=redgreen(75))
 
 where z, is the matrix of data. The output i want should have 
 the rows reordered along with the dendrogram and the columns 
 should be in the original order without any dendrogram. For 
 the above statement i am getting an error:
 
 Error in image.default(1:nc, 1:nr, x, xlim = 0.5 + c(0, nc), 
 ylim = 0.5 +  : 
 dimensions of z are not length(x)(+1) times length(y)(+1)
 
 I also tried using ,
 heatmap.2(z,Colv=NULL,dendrogram=row,col=redgreen(75))
 for which i am getting the output, but the columns are 
 reordered. How can this be done for the way in which i want 
 the map to appear?
 
 Thanks,
 svakki.
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
--
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


Re: [R] several plots in one

2006-02-01 Thread Warnes, Gregory R
If you want two series of plotted confidence intervals, first plot one series 
using plotCI with the standard arguments, then call plotCI a second time with 
add=TRUE.  For example:


   data(state)
   tmp   - split(state.area, state.region)
   means - sapply(tmp, mean)
   stdev - sqrt(sapply(tmp, var))
   n - sapply(tmp,length)
   ciw   - qt(0.975, n) * stdev / sqrt(n)

   # First series
   plotCI(x=means, uiw=ciw)

 # Second series
   plotCI(x=means+1e5, uiw=ciw, add=T)


Note that you may need to manually specify xlim and ylim to ensure that the 
second series fits on the plot.

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of JeeBee
 Sent: Wednesday, February 01, 2006 6:02 AM
 To: r-help@stat.math.ethz.ch
 Subject: [R] several plots in one
 
 
 Can anyone tell me how I can supply more than one graph to plotCI
 (gplots) at once?
 
 Below is what I tried, also with rbind instead of cbind.
 What is the way to do this (in general, I think)?
 
 Problem is that lines of 1-st and 2-nd series are mixed, 
 while they have
 nothing to do with each other.
 
 I also tried calling plotCI with argument add=TRUE, which 
 didn't seem to
 work (that is actually what I wanted I think).
 (It should look the same as if I called plotCI twice with same
 labels/xlim/ylim/etc.)
 
   plotCI(x = cbind(x1,x2),
  y = cbind(means1,means2), # means1 == ci1[Estimate,]
  xlim = c(0,100), #ylim = c(0.2,0.5),
  ylab = System welfare, 
  pch = 7, col = c(red,blue), type = b,
  uiw = cbind(uiw1,uiw2))
 
 Thanks in advance,
 JeeBee.
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html
--
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


Re: [R] beginner Q: hashtable or dictionary?

2006-02-01 Thread Warnes, Gregory R

Standard R vectors and list elements can given names, and can be accessed by 
them.  This allows them to be used like the dictionaries or hashes of other 
languages.

For example

  x = c(a=1, b=2, c=3)
  x[a]
a 
1 
 x[foo] = bar
 x[foo]
  foo 
bar 
 x
a b c   foo 
  1   2   3 bar 

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of context grey
 Sent: Sunday, January 29, 2006 8:35 PM
 To: r-help@stat.math.ethz.ch
 Subject: [R] beginner Q: hashtable or dictionary?
 
 
 Hi,
 
 Is there something like a hashtable or (python)
 dictionary in R/Splus?
 
 (If not, is there a reason why it's not needed /
 typical way to accomplish the same thing?)
 
 Thank you
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
--
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


Re: [R] gplots

2006-01-17 Thread Warnes, Gregory R

The plotmeans() function uses the order of the factor levels.  To change the 
order in the plot, change the order of the factor levels.

For example:

 data(state)
 plotmeans(state.area ~ state.region)   

Plots the groups in the order

levels(state.region)

 levels(state.region)
[1] Northeast South North Central West 

You can change the order of the levels using the gdata:::reorder.factor 
function:

 state.region - reorder.factor(state.region, c(Northeast, North Central, 
 South West)),

Now, doing 

 plotmeans(state.area ~ state.region)   

will show the plot with the new order.

-Greg


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Stephen
 Sent: Monday, January 16, 2006 11:26 AM
 To: r-help@stat.math.ethz.ch
 Subject: [R] gplots
 
 
 Hi 
  
 I am sure that this question has been asked before ... appologies in
 advance
  
 This - which comes out very nicely - better than the commercial stuff.
 plotmeans (cdpy~Dodefordpy, Data = Dataset, connect = False, 
 minbar = 1,
 mean.labels = FALSE, col = blue, barwidth = 1.5, barcol = red,
 ci.label = FALSE, xlab=Onset, pch = 15, par(las =2)).
 
 Only one snag I want to order the X axis by the way it is 
 sorted in the
 data not by the n size group categories.
 
 The data are sorted by the Dodefordpy categories - not mumeric -
 confering to the way I'd like the x axis.
 
 Hence how do I order the x axis not by n but by the way the file is
 ordered.
 
  
 
 Thanks 
 
 S
 
  
 
  version
  _  
 platform i386-pc-mingw32
 arch i386   
 os   mingw32
 system   i386, mingw32  
 status  
 major2  
 minor2.1
 year 2005   
 month12 
 day  20 
 svn rev  36812  
 language R  
  
 
 
 Nana Mail http://mail.nana.co.il - Get Your Free Personal 
 Outlook 2003
 Now
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
--
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


Re: [R] Can anyone please tell me how to strip the white spaces f rom a character vector?

2005-10-25 Thread Warnes, Gregory R

If you are interested in trimming leading and trailing whitespace (and not
interior whitespace), you can use the 'trim' function from the 'gdata'
package.

-G


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of roger bos
 Sent: Tuesday, October 25, 2005 8:52 AM
 To: ([EMAIL PROTECTED])
 Subject: [R] Can anyone please tell me how to strip the white spaces
 from a character vector?
 
 
 for example:
  a$tic[1:10]
 [1] AIR  ABCB  ABXA  ACMR  ADCT  ADEX 
 [7] ABM  AFCE  AG  ATG 
  Can anyone please tell me how to strip the white spaces from a$tic?
  Thanks,
  Roger
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 
--
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


Re: [R] glm contrasts (was: no subject)

2005-10-11 Thread Warnes, Gregory R
 estimable in bundle gregmisc (package gmodels) should do this.
 
 (Kiebitzers: Hope I got the bundle/package/library definition correct)

FWIW, we tried gregmisc as a bundle, but it proved to be too much of a pain,
so all of the component packages are now separately provided.

The 'gremgisc' package now simply depends on the individual components.
Thus, 

install.package('gregmisc',depend=TRUE) 

will get all of the packages.


-Greg
--
LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


Re: [R] Problem building/checking library that requires input fro m user

2005-10-03 Thread Warnes, Gregory R
What file are you putting these into?  

I believe this is the correct syntax for the \example{} section of an .Rd
file.

If you want to do this in a plain R file, (e.g. package/tests/somename.R),
you can use 

if(interactive)
{
 num_reps - readline(How many reps do you have... )
 num_reps - as.integer(num_reps)
}
else
 num_reps - 10

instead.

-G


 -Original Message-
 From: Ken Termiso [mailto:[EMAIL PROTECTED]
 Sent: Monday, October 03, 2005 11:42 AM
 To: Warnes, Gregory R; [EMAIL PROTECTED]
 Cc: r-help@stat.math.ethz.ch
 Subject: RE: [R] Problem building/checking library that requires input
 from user
 
 
 Thanks, Dr Warnes  Prof Ripley...
 
 However, upon following the instructions below, I'm getting 
 syntax errors on 
 the line that has \dontshow...below is my code...I get the 
 same error if i 
 omit the first block and just try \dontrun...
 
 \dontshow{
 num_reps - 10
 }
 
 \dontrun{
 num_reps - readline(How many reps do you have... )
 num_reps - as.integer(num_reps)
 }
 
 
 could this have anything to do with it running on OS X 10.3 ?? (long 
 shot...but i'm thoroughly lost)..
 
 thanks again,
 ken
 
 
 From: Warnes, Gregory R [EMAIL PROTECTED]
 To: 'Ken Termiso' [EMAIL PROTECTED]
 Subject: RE: [R] Problem building/checking library that 
 requires input from 
 user
 Date: Mon, 3 Oct 2005 10:11:15 -0400
 
 
 Try changing the example code to:
 
 \dontshow{
num_reps - 10
 }
 \dontrun{
num_reps - readline(How many reps do you have... )
num_reps - as.integer(num_reps)
 }
 
 -Greg
 
 
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] Behalf Of Ken Termiso
   Sent: Monday, October 03, 2005 9:41 AM
   To: r-help@stat.math.ethz.ch
   Subject: [R] Problem building/checking library that requires
   input from
   user
  
  
   Hi all,
  
   I've got a package i've written that i am trying to 
 check, build, and
   install. This is my 1st time doing this, so apologies in 
 advance... ;)
  
   The package that I've written requires input from the user.
   It needs to know
   sample sizes and then runs some calcs, (sample sizes are just
   integers), and
   it gets this info from the user as
  
   num_reps - readline(How many reps do you have... )
  
   num_reps - as.integer(num_reps)
  
   and then loops
  
   for(i in 1:num_reps)
   {
 #code
   }
  
  
   HOWEVER, I get this error msg when trying to check/build/install:
  
   Error in 1:num_con_biol_reps : NA/NaN argument
  
   Presumably this is because R thinks the variable is never
   initialized before
   i try to use it as a loop limit...
  
   Anyway around this?? I tried initializing the num_reps
   variable in the code
   before the readline, but get the same error...
  
  
   Thanks very much in advance,
   Ken
  
   __
   R-help@stat.math.ethz.ch mailing list
   https://stat.ethz.ch/mailman/listinfo/r-help
   PLEASE do read the posting guide!
   http://www.R-project.org/posting-guide.html
  
  
 -
 -
 LEGAL NOTICE
 Unless expressly stated otherwise, this message is 
 confidential and may be 
 privileged.  It is intended for the addressee(s) only.  
 Access to this 
 E-mail by anyone else is unauthorized.  If you are not an 
 addressee, any 
 disclosure or copying of the contents of this E-mail or any 
 action taken 
 (or not taken) in reliance on it is unauthorized and may be 
 unlawful.  If 
 you are not an addressee, please inform the sender immediately.
 
 
 


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


Re: [R] Advice about system for installing updating all R packa ge in a Linux Lab?

2005-08-31 Thread Warnes, Gregory R

If you have several different versions of R installed, you might want to use
a script like this one, which should work on (at least) 1.9.1 and newer.

script
#!/bin/sh

echo ##
echo ## This script will attempt to install all available R packages
echo ## from the package repositories:
echo ##
echo ##   - CRAN:  http://cran.r-project.org/;
echo ##   - BioCondictor:  http://www.bioconductor.org;
echo ##
echo ## As well as Pfizer custom packages
echo ## 
echo ##   - Rlsf:  ~warneg/src/R/Rlsf
echo ##   - AffyTool: nlvfs016:rstat-data/
echo ##   ExpressionAnalysis/StandardAffyAnalysis/AffyTool
echo ##
echo ##
echo ##

if [ -z '$1' ]; then
  RCMD=R
  echo ## Parameter 1 : R Command Name = $RCMD (Default)
else
  RCMD=$1
  echo ## Parameter 1 : R Command Name = $RCMD
fi
export RCMD
echo $RCMD

echo ##
echo ##
echo ##
echo ## Starting R ...
echo ##

$RCMD --vanilla EOF

##
## Update installed packages
##
update.packages (repos =http://cran.r-project.org,ask = FALSE,
installWithVers=TRUE )

##
## Install New Packages from CRAN
##
#
if (exists(new.packages,mode=function))
   {
 options(repos=http://cran.r-project.org;)
 new.list - new.packages(ask=FALSE)
   } else
   {
 CRAN.list - CRAN.packages()[,1]
 here.list - installed.packages()[,1]
 new.list - CRAN.list[ ! CRAN.list  %in% here.list ]
 
   }
   install.packages(pkgs=new.list, dependencies=TRUE, installWithVers=TRUE )

##
## Install (New) Bioconductor Packages
##
source(http://www.bioconductor.org/getBioC.R;) 
getBioC(groupName=all)
y

EOF

echo ##
echo ## All Done!
echo ##
echo ## *Check the log for failed package installs*
echo ##
echo ##
/script





 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Prof 
 Brian Ripley
 Sent: Saturday, August 20, 2005 1:28 AM
 To: Paul Johnson
 Cc: r-help@stat.math.ethz.ch
 Subject: Re: [R] Advice about system for installing  updating all R
 package in a Linux Lab?
 
 
 This is based on the pre-2.1.0 ideas.  Try
 
 update.packages(ask=FALSE)
 install.packages(new.packages(), dependencies=TRUE)
 
 However, I would suggest that you set up each student with a 
 library, say 
 ~/R/library, and point R_LIBS at it (set in Renviron.site).  
 That's what 
 we do for Windows, and it seems successful.  (We have other 
 reasons to 
 want very complete central Linux setups, one being that we 
 run more than 
 one archtecture where personal libraries are a little harder 
 to manage.)
 
 On Fri, 19 Aug 2005, Paul Johnson wrote:
 
  Good day:
 
  I'm administering 6 linux systems (FC4) in a student lab 
 and worry that
  users may want packages that are not installed.  I get 
 tired of adding
  them one by one.  Then I happened upon this page
 
  http://support.stat.ucla.edu/view.php?supportid=30
 
 Many of the commands there are now or about to be deprecated.  See my 
 article in the current R-News.
 
  about installing all R packages from CRAN.  That did not 
 run as it was,
  but after some fiddling I arrived at the following script, 
 which does
  run and it builds many packages and reports failures on the rest:
 
  #R_installAll.R
  options(repos = http://lib.stat.cmu.edu/R/CRAN/;)
  update.packages(ask=F)
  x - 
 packageStatus(repositories=http://cran.r-project.org/src/contrib;)
  st - x$avai[Status]
  install.packages(rownames(st)[which(st$Status==not installed)],
  dependencies=T)
 
  If I run that in batch mode (as root, of course)
 
R CMD BATCH R_installAll.R
 
  It produces some informative output. Some packages don't 
 build because
  they are for Windows.  As Prof Ripley mentioned recently, 
 some packages
  don't build because of gcc-4.0.1. Some fail because I don't 
 have some
  requisite libraries installed.  I try to deduce which FC 
 packages may be
  used to fix that and iterate the process now and then.
 
  But, for the most part, the packages to be OK (as far as I 
 can tell).
  The output of a recent update is posted on the net here, in 
 case you are
  interested to see (this lists the ones that don't build plus the
  successful updates):
 
  http://lark.cc.ku.edu/~pauljohn/software/R/R_installAll.Rout
 
  I can't see how this does any damage, since the packages that don't
  build are very graceful about erasing themselves, and the 
 ones that do
  build are automatically available for the users.
 
  Can you see any downside to scheduling this process to run as a cron
  job, say once per week, to keep packages up to date?
 
 None at all.  We do something similar (but based on 
 new.packages and with 
 a stoplist of packages that we know will not install).
 
 -- 
 Brian D. Ripley,  [EMAIL PROTECTED]
 Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595
 
 

[R] Unbundling gregmisc (was: loading gap package)

2005-05-04 Thread Warnes, Gregory R
Let me redirect the topic a bit.  I've been considering unbundling gregmisc.
The pro would be that people would find the component packages (i.e. gdata)
more easily.  The con is that the packages have a number of
interdependencies, so you pretty much will need to get most of them anyway.

As the latest gregmisc bundle contains a gregmisc package that is just a
stub that depends on and loads the individual packages, there would still be
a gregmisc object.

Comments?

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Constantinos
 Antoniou
 Sent: Wednesday, May 04, 2005 6:36 AM
 To: Prof Brian Ripley
 Cc: R-help@stat.math.ethz.ch; Uwe Ligges
 Subject: Re: [R] loading gap package
 
 
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 =-=-=-=-=
 !!! IMPORTANT NOTICE !!!
 This email was addressed to you from the Internet using a 
 legacy E-Mail Domain address.
 
 
 This email domain will no longer be in service on the 
 Internet after 15 July 2005.
 
 If this is legitimate business email, please inform the 
 sender to address all future correspondence to your 
 @pfizer.com address.
 
 The original text of this email appears below this notice.
 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 =-=-=-=-=
 
 
 On 4  2005, at 12:06 , Prof Brian Ripley wrote:
 
  On Wed, 4 May 2005, Constantinos Antoniou wrote:
 
 
  On 4  2005, at 11:35 , Uwe Ligges wrote:
 
  Eduwin Pakpahan wrote:
  Dear R users, I did install R. 2.0.1, and try to load gap
 
  package. However, below is the message shown when I did load it.
 
  Can anybody
  please let me know my mistakes?
  
  library()
  library(gap)
  Loading required package: MASS Loading required package: genetics
 
  Loading required package: combinat Loading required 
 package: gdata
 
  Error: package 'gdata' could not be loaded
  In addition: Warning message: There is no package called 'gdata'
 
  in: library(pkg, character.only =
  TRUE, logical = TRUE, lib.loc = lib.loc)
  
  Let me read the error message for you:
  There is no package 'gdata' simply means the package is not
 
  there...
  So what about installing it?
  Hint: it is part of the package bundle gregmisc.
 
  I have a similar problem with R 2.1.0 on Mac OSX 10.3.9.
 
  library(gregmisc)
  Loading required package: gdata
  Error: package 'gdata' could not be loaded
  In addition: Warning message:
  there is no package called 'gdata' in: library(pkg, 
 character.only =
 
  TRUE, logical = TRUE, lib.loc = lib.loc)
 
  At first I tried getting this gdata from somewhere else, 
 but I could
 
  not find it (evidence indicated that it is part of the 
 gregmisc, as I
 
  suspected originally... You email confirms this...)
 
  (For the record, my goal is to get read.xls, which is part (?) of
 
  gdata)
 
  The current version of gregmisc is 2.0.6.  That does contain gdata. 
 
  It looks to me as if the MacOS X binary is broken (2kb) so you will
 
  need to install from the sources.
 
 
 Thank you. I had the current  version (binary). Reinstalling from
 
 source fixed the issue
 
 Costas
 
  I think we have been here before: it seems the MacOS X binary
 
  packaging does not work for bundles.
 
  --
 
  Brian D. Ripley,  [EMAIL PROTECTED]
  Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
  University of Oxford, Tel:  +44 1865 272861 (self)
  1 South Parks Road, +44 1865 272866 (PA)
  Oxford OX1 3TG, UKFax:  +44 1865 272595
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


RE: [R] How could I catch the R data-output stream and presented by other software func

2005-03-10 Thread Warnes, Gregory R
There are quite a few packages which allow R to be accessed from other
software systems.  Examples include RDCOM (included with Windows R), RSOAP
(http://rsoap.sf.net), Rpy (Python, http://rpy.sf.net), RSPerl
(http://www.omegahat.org/RSPerl/).  Duncan Temple Lang, the developer of
RSPerl, has a whole pile of these tools, see http://www.omegahat.org for a
full list.

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Michael shen
 Sent: Thursday, March 10, 2005 1:37 AM
 To: r-help@stat.math.ethz.ch
 Subject: [R] How could I catch the R data-output stream and 
 presented by
 other software func 
 
 
 Dear All R-helper,
 
 I wonder to know that could I do the computation  staff in R 
 environment and 
 get the R data output stream ,then presented by other 
 software functions in 
 their GUI.(for example: get the R data output streamand 
 present the data 
 using SPSS function in SPSS output GUI). Is there some R 
 -packages in CRAN 
 already do this kind of function? and what kind of document 
 should I read?
 
 Thanks in advance
 
 Michael
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


RE: [R] 'combinations' in gtools and stack overflow

2005-02-14 Thread Warnes, Gregory R

The documentation for 'combinations' explicitly describes this problem:

  Details:

 Caution: The number of combinations and permutations increases
 rapidly with 'n' and 'r'!.

 To use values of 'n' above about 45, you will need to increase R's
 recursion limit.  See the 'expression' argument to the 'options'
 command for details on how to do this.

and gives an example of the solution:

 # To use large 'n', you need to change the default recusion limit
 options(expressions=1e5)
 cmat - combinations(300,2)
 dim(cmat) # 44850 by 2 

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Prof 
 Brian Ripley
 Sent: Monday, February 14, 2005 10:23 AM
 To: Ho-Joon Lee
 Cc: r-help@stat.math.ethz.ch
 Subject: Re: [R] 'combinations' in gtools and stack overflow
 
 
 On Mon, 14 Feb 2005, Ho-Joon Lee wrote:
 
  Dear R-users,
 
  Let me ask about the 'stack overflow' error which I got 
 when I used the 
  function 'combinations' in gtools.
 
  The following is what I did:
 
  -
  library(gtools)
  options(expressions=1e5)
  combinations(500, 3, 1:500)
  # or combinations(400, 2, 1:400)
  Error: protect(): stack overflow
  -
 
  How can I overcome this error? Is there perhaps any other 
 function to do this 
  more efficiently?
 
 R --help lists a flag that you can use to increase the size 
 of the protect 
 stack.  It is also described in `An Introduction to R'.
 
 -- 
 Brian D. Ripley,  [EMAIL PROTECTED]
 Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


RE: [R] parameter couldn't be set in high-level plot() function

2005-02-08 Thread Warnes, Gregory R
Thanks for your patch, I've modified the code of bandplot appropriately.
This change will be in the next release of the gregmisc bundle.

-G

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of R user
 Sent: Tuesday, January 25, 2005 1:02 PM
 To: r-help@stat.math.ethz.ch
 Subject: Re: [R] parameter couldn't be set in high-level 
 plot() function
 
 
 Think the problem I had with the bandplot (gplots) function 
 is solved by
 changing the expand.dots = FALSE to expand.dots = TRUE.
 Don't understand actually why it says FALSE here, because 
 that means it
 does *not* pass extra arguments to plot.
 If I change it to TRUE, my main/xlab/ylab arguments are 
 passed just like
 I wanted.
 
 fragment of bandplot[gplots]
 
 if (!add) {
 m - match.call(expand.dots = FALSE)
 m$width - m$add - m$sd - m$sd.col - NULL
 m$method - m$n - NULL
 m[[1]] - as.name(plot)
 mf - eval(m, parent.frame())
 }
 
 Jonne.
 
 
 On Mon, 2005-01-24 at 15:50 +0100, R user wrote:
  
  Dear R users,
  
  I am using function bandplot from the gplots package.
  To my understanding (viewing the source of bandplot) it calls
  function plot (add = FALSE) with the same parameters 
 (except for a few
  removed).
  
  I would like to give extra parameters 'xlab' and 'ylab' to function
  bandplot, but, as can be seen below, that raises warnings (and the
  labels do not show up at the end).
  
  It does work to call title(... xlab=blah, ylab=foo) 
 after bandplot
  (), but then I have two labels on top of each other, which 
 is even more
  ugly.
  
  Can anyone explain me why this goes wrong?
  
  Thanks in advance,
  Jonne.
  
  __
  R-help@stat.math.ethz.ch mailing list
  https://stat.ethz.ch/mailman/listinfo/r-help
  PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 -- 
 R user [EMAIL PROTECTED]
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


RE: [R] how to call R in delphi?

2005-01-19 Thread Warnes, Gregory R
You can also use SOAP to communicate with R via RSOAP (http://rsoap.sf.net).

-G

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Duncan Murdoch
 Sent: Wednesday, January 19, 2005 4:10 AM
 To: YiYao_Jiang
 Cc: r-help@stat.math.ethz.ch; Jack_Kang; Ivy_Li
 Subject: Re: [R] how to call R in delphi? 
 
 
 On Wed, 19 Jan 2005 10:12:07 +0800, YiYao_Jiang
 [EMAIL PROTECTED] wrote :
 
 Dear All:
 
 Now I am writing  program in delphi , found it is very 
 convenience to do anova, T-test, F-Test, etc in R , how to 
 call R in delphi? Thsnks.
 
 Tom referred you to a post about the COM interface.  
 
 You can also do some of what you want with direct calls to R.dll.  See
 the R API: entry points for C code section of the Writing R
 Extensions manual.  If you're unfamiliar with calling C entries from
 Delphi, my web page
 http://www.stats.uwo.ca/faculty/murdoch/software/compilingDLLs/
 might help, though it is aimed at writing DLLs, rather than using
 R.dll.  
 
 But that's another option:  let R be in charge, and just add some
 functions in a DLL written in Delphi.
 
 Duncan Murdoch
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


RE: [R] SAS or R software

2004-12-16 Thread Warnes, Gregory R


 - Output delivery system (ODS):  *Every* piece of SAS output is an 
 output object that can be captured as
 a dataset, rendered in RTF, LaTeX, HTML, PDF, etc. with a relatively 
 simple mechanism (including graphs)
 ods pdf file='mystuff.pdf'';
any sas stuff
 ods pdf close;

R now has this ability as well via the sinkplot and textplot commands
provided by the gplots package.

-G



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{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] How to save a complete image of the current state of R ?

2004-10-25 Thread Warnes, Gregory R
Date: Mon, 25 Oct 2004 14:10:15 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2654.89)
Content-Type: text/plain; charset=iso-8859-1


It is possible to save all of these items using the save.session and
restore.session functions provided by the 'session' package available from
CRAN.

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Andreas Buness
 Sent: Friday, October 22, 2004 1:05 PM
 To: [EMAIL PROTECTED]
 Subject: [R] How to save a complete image of the current state of R ? 
 
 
 Hello,
 
 I like to save the complete state of R, i.e. including
 all environments, objects/workspaces, loaded packages etc..
 
 This wish has arisen since I am not able to reproduce
 an error which occurs when running R CMD check.
 
 Many thanks for your advice in advance.
 Best Regards
 Andreas
 
 __
 [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
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{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] Problem with R version 2.0.0 (and patched)

2004-10-14 Thread Warnes, Gregory R

Yes, please provide an example of the data that can lead to the crash.
FWIW, the heatmap.2 function uses only standrd R calls and doesn't use any
external C code. (There isn't any C code in the entire library).  So, the
bug is likely to stem from something in base R.

-G

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Duncan Murdoch
 Sent: Thursday, October 14, 2004 5:01 PM
 To: Jean Vidal
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] Problem with R version 2.0.0 (and patched)
 
 
 On Thu, 14 Oct 2004 22:38:34 +0200, Jean Vidal
 [EMAIL PROTECTED] wrote :
 
 What I am doing : create a simple correlation matrix on 41 
 variables, then 
 plot an heatmap with this program :
 
 library(gplots)
 
 gplots is a package in the gregmisc bundle.
 
 mat-cor(temp.alln,use=pairwise.complete.obs)
 
 I've got no idea what temp.alln is.
 
  ... deletions ...
 
 Hope this can help  you to  track the problem.
 
 Can't track it if I can't reproduce it.  Please try to simplify it to
 the point where you can post a self-contained example that only uses
 base packages.  If you can't do that, then send a self-contained
 example to the package maintainer of the package containing the code
 that crashes.  In this case that looks like Greg Warnes
 [EMAIL PROTECTED].  It might be an R bug or it
 might be a bug in his package; he's in the best position to determine
 that.
 
 Duncan Murdoch
 
 __
 [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
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{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] displaying sample size in boxplots

2004-10-01 Thread Warnes, Gregory R

Also note that boxplot.n in the gplots library (part of the gregmisc bundle)
automatically adds the number of observations.

-Greg


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Patrick 
 Drechsler
 Sent: Wednesday, September 29, 2004 1:47 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [R] displaying sample size in boxplots
 
 
 
 Martin Maechler wrote on 29 Sep 2004 17:11:13 MET:
 
  Roger == Roger Bivand [EMAIL PROTECTED]
  on Wed, 29 Sep 2004 15:09:17 +0200 (CEST) writes:
 [snip]
 
  Roger Perhaps use the names= argument (width can help too):
  ^^
  Indeed!
  And that's why -- in the good ol' times when the box plot 
 was invented
  and enhanced, the inventors thought about it.
  For that reason there's the  'varwidth = TRUE/FALSE' argument
  in boxplot() 
 
  Note from help(boxplot) however that the inventors thought
  it wiser to make the width proportional to the SQRT of the
  sample size rather than the sample.size itself, i.e.,
  'varwidth = TRUE' and your proposal are not equivalent.
 
   boxplot(expend~stature, width=sample.size/length(expend), 
 + names=paste(levels(stature), , N=, 
 sample.size, sep=))
 
  Here are the current proposals [for cut  paste]:
 
  library(ISwR)
  data(energy)
  attach(energy)
 
  ## 1
  boxplot(expend~stature)
  sample.size - tapply(expend, stature, length)
  ss.ch - paste(N=, sample.size, sep=)
  mtext(ss.ch, at=1:length(unique(stature)), line=2, side=1)
 
  ## 2 (Roger)
  boxplot(expend~stature, width=sample.size/length(expend),
  names=paste(levels(stature), , N=, sample.size, sep=))
 
  ## 3 (Roger + Martin):
  boxplot(expend ~ stature, varwidth= TRUE,
  names=paste(levels(stature), , N=, sample.size, sep=))
 
 Thanks for the explanation and the nice summary Martin! I can see
 the point you're making about varwidth. I've read that part in
 the documentation before but I have to admit that up to now I
 didn't see the purpose of this parameter. Although there are
 situations were I prefer to see the number in print somewhere on
 the plot which I can now easily accomplish with `names'.
 
 Also thanks to Stephano for the pointer to the r-newsletter
 article and to Don for showing me how one implements user
 defined functions!
 
 Cheers
 
 Patrick
 -- 
 For animals, the entire universe has been neatly divided into things
 to (a) mate with, (b) eat, (c) run away from, and (d) rocks.
 -- (Terry Pratchett, Equal Rites)
 
 __
 [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
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{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] Contrast matrices for nested factors

2004-09-08 Thread Warnes, Gregory R
You should be able to get the behavior you want using the fit.glh()  (short
for fit general linear hypothesis) function from the gregmisc/gmodels
package.

-G

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of 
 Fernando Henrique
 Ferraz P. da Rosa
 Sent: Monday, September 06, 2004 11:02 PM
 To: r-help
 Subject: [R] Contrast matrices for nested factors
 
 
 Hi, I'd like to know if it's possible to specify different
 contrast matrices in lm() for a factor that is nested within 
 another one. This
 is useful when we have a model where the nested factor has a different
 number of levels, depending on the main factor.
 
 Let me illustrate with an example to make it clearer. Consider
 the following data set:
 
 set.seed(1)
 y - rnorm(14)
 a - factor(c(rep(1,7),rep(2,3),rep(3,4)))
 b - factor(c(1,1,1,2,2,3,3,1,1,2,1,1,2,2))
 k - factor(c(1,2,3,1,2,1,2,1,2,1,1,2,1,2))
 internal - data.frame(y,a,b,k)
 
 Where y is an arbitrary response, a is a main factor, b is a
 factor nested within a, and k is the replicate number. It is 
 easy to see
 that depending on the level of a, b has different numbers of 
 levels. For
 instance, when a = 1, we have that b might assume values 1, 2 or 3,
 while a = 2 or 3, b might assume only 1 or 2.
 
 I'd like then to use contrasts summing to 0, so I issue:
 
 z - lm(y ~ a + a/b,data=internal,contrasts=list(a=contr.sum,
 b=contr.sum))
 
 The problem is, the design matrix is not quite what I 
 expected.
 What happens is, instead of using a different contrast matrix for each
 level of a where b is nested, it's using the same contrast matrix for
 every b, namely:
 
  contr.sum(3)
   [,1] [,2]
 110
 201
 3   -1   -1
 
 So, when a=1, the columns of the design matrix are as 
 expected.
 It sums to 0, because there are levels of b 1, 2 and 3, when a=1. But,
 when a=2 or a=3, the same contrast matrix is being used, and then, the
 factor effects do not sum to 0. That's obviously because there are no
  values for b equal 3, when a != 1, and then the coding that 
 gets done is
  '0' or '1'.
 
 The design matrix lm() is creating is:
 
  model.matrix(z)
(Intercept) a1 a2 a1:b1 a2:b1 a3:b1 a1:b2 a2:b2 a3:b2
 11  1  0 1 0 0 0 0 0
 21  1  0 1 0 0 0 0 0
 31  1  0 1 0 0 0 0 0
 41  1  0 0 0 0 1 0 0
 51  1  0 0 0 0 1 0 0
 61  1  0-1 0 0-1 0 0
 71  1  0-1 0 0-1 0 0
 81  0  1 0 1 0 0 0 0
 91  0  1 0 1 0 0 0 0
 10   1  0  1 0 0 0 0 1 0
 11   1 -1 -1 0 0 1 0 0 0
 12   1 -1 -1 0 0 1 0 0 0
 13   1 -1 -1 0 0 0 0 0 1
 14   1 -1 -1 0 0 0 0 0 1
 
 
 What I would like to use is:
 
(Intercept) a1 a2 a1:b1 a2:b1 a3:b1 a1:b2
 11  1  0 1 0 0 0 0 0
 21  1  0 1 0 0 0 0 0
 31  1  0 1 0 0 0 0 0
 41  1  0 0 0 0 1 0 0
 51  1  0 0 0 0 1 0 0
 61  1  0-1 0 0-1 0 0
 71  1  0-1 0 0-1 0 0
 81  0  1 0 1 0 0 0 0
 91  0  1 0 1 0 0 0 0
 10   1  0  1 0-1 0 0 0 0
 11   1 -1 -1 0 0 1 0 0 0
 12   1 -1 -1 0 0 1 0 0 0
 13   1 -1 -1 0 0-1 0 0 0
 14   1 -1 -1 0 0-1 0 0 0
 
 (notice that in the second matrix all collumns sum to 
 0, in the
 first they don't).
 
 
 Thank you,
 
 --
 Fernando Henrique Ferraz P. da Rosa
 http://www.ime.usp.br/~feferraz
 
 __
 [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
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{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] confidence intervals

2004-09-08 Thread Warnes, Gregory R

You should be able to make small modifications to the ci.lme function
provided in the gregmisc/gmodels package.

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Spencer Graves
 Sent: Friday, September 03, 2004 11:58 AM
 To: [EMAIL PROTECTED]
 Cc: Robert Waters; [EMAIL PROTECTED]
 Subject: Re: [R] confidence intervals
 
 
 Hi, Robert: 
 
   While it may be difficult to program this in general 
 (as suggested 
 by it's position on Doug's To Do list), all the pieces should be 
 available to support a special script for your specific application.  
 What fixed and random model(s) interest you most? 
 
   hope this helps.  spencer graves
 
 Douglas Bates wrote:
 
  Robert Waters wrote:
 
  Dear R users;
 
  Im working with lme and Id like to have an idea of how
  can I get CI for the predictions made with the model.
  Im not a stats guy but, if Im not wrong, the CIs
  should be different if Im predicting a new data point
  or a new group. Ive been searching through the web and
  in help-lists with no luck. I know this topic had been
  asked before but without replies. Can anyone give an
  idea of where can I found information about this or
  how can I get it from R?
 
  Thanks for any hint
 
 
  That's not currently implemented in lme.  It's on the To 
 Do list but 
  it is not very close to the top.
 
  __
  [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
 
 
 -- 
 Spencer Graves, PhD, Senior Development Engineer
 O:  (408)938-4420;  mobile:  (408)655-4567
 
 __
 [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
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{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] how to add error bar to the data in R?

2004-09-07 Thread Warnes, Gregory R

Alternatively, use the plotCI() function from the gregmisc package.

-G

-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: 9/7/04 5:08 AM
Subject: Re: [R] how to add error bar to the data in R?


Hello,

Use the function xYplot from hmisc package
cheers,
Marta

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


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{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-pkgs] gregmisc 1.11.2 including read.xls()

2004-06-09 Thread Warnes, Gregory R

Release 1.11.2 of the gregmisc() package of functions is now available on
CRAN at http://cran.r-project.org/src/contrib/Descriptions/gregmisc.html for
both Unix and Windows systems.

The most notable enhancement provided by this release is:

- read.xls(), a function to read Microsoft Excel files by
  translating them to csv files via the xls2csv.pl script has
  been added.  I've also provided Unix and MS-Windows scripts 
  in R_LIBRARY_DIR/gregmisc/bin which allow you to call 
  xls2csv directly.  The code uses perl libraries which are
  included in the package, so perl must be in the execution path.

Other enhancements include:

- Improvements to CrossTable() by Marc Schwartz [EMAIL PROTECTED]

- Improvements to ooplot() by Lodewijk Bonebakker [EMAIL PROTECTED]

- plotCI() and plotmeans() now have improved argument handling.

- The running() function now has an additional parameter `simplify'
  which controls whether the returned values are simplified into a
  vector/matrix or left as a list.

- A makefile that will download and attempt to install all available
  packages from CRAN and Bioconductor is now provided in
  $PACKAGE$/gregmisc/tools/

- space() can now space points along the 'y' dimension.

- Fix an error in the permutations code for repeats.allow=T and r2.
  Both the bug report and fix are from Elizabeth Purdom
  [EMAIL PROTECTED].

- Various fixes for compatibility with R 1.9.X.

See the NEWS and ChangeLog files in the .tar.gz file for additional details.

-Greg

Gregory R. Warnes
Manager, Non-Clinical Statistics
Pfizer Global Research and Development



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

___
R-packages mailing list
[EMAIL PROTECTED]
https://www.stat.math.ethz.ch/mailman/listinfo/r-packages

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


RE: [R] Contrasts

2004-06-02 Thread Warnes, Gregory R

Try the fit.contrast() and estimable() functions from my gregmisc package,
or the contrasts() function in Frank Harrell's Design package.

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Kimberly Ann
 Fernandes
 Sent: Monday, May 31, 2004 1:10 PM
 To: [EMAIL PROTECTED]
 Subject: [R] Contrasts
 
 
 Hello,
 
 I am trying to figure out how to conduct a t-test on a 
 specific contrast
 for my data.  I have four factors in my data and would like 
 to conduct a
 t-test on the average of the data from the first two factors 
 against the
 average of the data on the second two factor (i.e. is the 
 average of the
 first two different from the average of the second two).  Is there a
 quick way to do this?  I found the contrast function, but wasn't sure
 how to apply it.
 
 Thank you,
 Kim
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] [JOB] Toxicogenomics Statistician

2004-04-20 Thread Warnes, Gregory R

 Toxicogenomics Statistician
 
 The successful candidate will provide statistical support to nonclinical
 areas of RD, especially in the areas of investigative toxicology, safety
 biomarkers, and toxicogenomics.  The candidate will collaborate with
 scientists to plan meaningful experimental studies, statistically analyze
 the results of those and other studies, and communicate results. Further,
 the candidate will work with programmers to create tools that facilitate
 use of advanced statistical methodology by Pfizer scientists. 
 
 A minimum of an M.S. - Statistics is required. A PhD - Statistics is
 desired. Two years statistical consulting experience, preferably in
 pharmaceutical environment using gene expression microarrays,  is
 required. Experience with other -omics technologies, such as RTPCR,
 Protein Mass-Spec, etc, is a strong plus. A Strong science background,
 with good working knowledge of biology, chemistry or pharmacology is also
 desired. Further, good computational skills in SAS, S-plus or R and good
 communication skills (written, oral presentation) are necessary.
 
 Other desirable attributes include: 
 
 Several years statistical experience in a scientific environment, with
 some pharmaceutical experience 
 Outstanding communication skills 
 Ability to balance many projects and clients simultaneously 
 Works independently, with minimal supervision 
 Learns new skills quickly 
 Good team player 
 Strong statistical knowledge in general linear models, experimental
 design, probability, categorical data analysis 
 Ability to identify and understand relevant scientific literature and
 apply knowledge gained from these sources 
 Ability to identify/develop and apply new quantitative methods as needed
 to solve problems in pharmaceutical research 
 Level will be determined by candidate's background and qualifications. 
 
 
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] [R-pkgs] New package: mcgibbsit, an MCMC run length diagnostic

2004-04-19 Thread Warnes, Gregory R

Package: mcgibbsit
Title: Warnes and Raftery's MCGibbsit MCMC diagnostic 
Version: 1.0
Author: Gregory R. Warnes [EMAIL PROTECTED]
Description: 
  mcgibbsit provides an implementation of Warnes  Raftery's MCGibbsit
  run-length diagnostic for a set of (not-necessarily independent) MCMC
  sampers.  It combines the estimate error-bounding approach of Raftery
  and Lewis with evaulate between verses within chain approach
  of Gelman and Rubin.
Maintainer: Gregory R. Warnes [EMAIL PROTECTED]
License: GPL
Depends: coda

References:

Warnes GR. The Normal Kernel Coupler: An adaptive Markov Chain Monte Carlo
method for efficiently sampling from multi-modal distributions
http://www.analytics.washington.edu/statcomp/projects/mcmc/nkc/, Ph.D.
thesis, Department of Biostatistics, University of Washington,
http://www.biostat.washington.edu/ October 2000.   (See Chapter 3, Using
the Normal Kernel Coupler)


Gregory R. Warnes
Manager, Non-Clinical Statistics
Pfizer Global Research and Development
Tel: 860-715-3536



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

___
R-packages mailing list
[EMAIL PROTECTED]
https://www.stat.math.ethz.ch/mailman/listinfo/r-packages

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


RE: [R] R apache and PHP

2004-04-14 Thread Warnes, Gregory R
We need to know what kind of error message you are getting before we can be
much help.

-Greg

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Marcello Verona
 Sent: Tuesday, April 13, 2004 12:37 PM
 To: [EMAIL PROTECTED]
 Subject: [R] R apache and PHP
 
 
 I've developed a web application in PHP and R
 
 my script is
 
 
 ?php
 
 ...
 exec(R CMD BATCH --silent /home/marcello/R_in/myfile.bat  
 /home/marcello/R_out/myfile.out);
 
 ...
 
 ?
 
 This script execute in R batch mode and write the myfile.out.
 
 On Win2000 the similar script is ok, but on linux I've a problem.
 
 I suppose is a permession problem because the same script on 
 shell run fine
 and on Zend debugger (my IDE for php) is also ok.
 In this case the owner is marcello , if I run the script by browser 
 the owner is apache.
 
 I've  overwritted all the ownerships of R directory and bin to apache 
 user but not work.
 
 If a run
 exec(ls  mydir.txt); is ok (is not a PHP general problem!)
 
 Someone can help me?
 
 Thanks
 (and excuse my for my poor english)
 
 Marcello Verona
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] Makefile for installing all available packages

2004-04-13 Thread Warnes, Gregory R

Below is a makefile I wrote to download and install all available R packages
from the CRAN and BioConductor package repositories.  

The primary advantage of using this makefile instead of R's built-in
install.package() and update.packages() is the creation of a separate
installation log for every package.   Further, if make is invoked with '-k',
failure to install a single package will not derail the installation of
other packages.

I hope that this script may be useful to other folks.  

-Greg

# Download and install all available R packages from the CRAN and
Bioconductor 
# package repositories
#
RCMD ?= R-1.9.0
WGET ?= wget -N -nd -r -A gz -r -l 1 -nv

PACKAGE_FILES = $(wildcard *.gz ) 
PACKAGE_LOGS  = $(addsuffix .log, $(basename $(basename $(PACKAGE_FILES

default: cran bioconductor install

cran: 
$(WGET) http://cran.r-project.org/src/contrib/PACKAGES.html;

bioconductor: bioCmain bioCcontrib bioCdata

bioCmain:
$(WGET)
http://www.bioconductor.org/repository/release1.3/package/html/index.html;

bioCcontrib:
$(WGET) http://www.bioconductor.org/contrib/index.html;

bioCdata:
$(WGET) http://www.bioconductor.org/data/metaData.html;

install: $(PACKAGE_LOGS)

%.log: %.tar.gz
$(RCMD) INSTALL $  [EMAIL PROTECTED] 21 
mv [EMAIL PROTECTED] $@



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] [JOB ADV] Computational Statistician

2004-04-12 Thread Warnes, Gregory R
 We've just opened a position for a computational statistician in the
 Non-Clinical Statistics group here at Pfizer.  
 
 We're looking for someone with strong computational skills in R and SAS,
 who is interested in creating real applications.  The focus will be on
 statistical genetics, but we handle almost every kind of statistics
 outside of Phase II and later clinical trials, so there will be plenty of
 opportunity to do other things as well.
 
 For further information or to submit an application, please visit
 http://pfizer.softshoe.com/cgi-bin/job-show?J_PINDEX=J974700KW.
 
 Thanks,
 
 -Greg
 
 Gregory R. Warnes
 Manager, Non-Clinical Statistics
 Pfizer Global Research and Development
 Tel: 860-715-3536
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] [R-pkgs] new version of gregmisc package

2004-04-12 Thread Warnes, Gregory R

gregmisc 0.10.1
---

gregmisc 0.10.1 is now available at ftp://cran.r-project.org/incoming/ and
will move to the regular contributed packages location
(http://cran.r-project.org/src/contrib/PACKAGES.html#gregmisc) as soon as
the CRAN administrators get caught up.

Recent Changes
---

Version 0.10.1

- Fixed bug in textplot() reported by Kevin Wright  kevin.d.wright at
pioneer
  dot com.

Version 0.10.0

- Now works with and requires R 1.9.0

- Added ooplot() function that mimics Open-Office style plots.
  Contributed by Lodewijk Bonebakker [EMAIL PROTECTED]

- Fixed bug in running() that arose when the called function
  really needed a minimum number of elements to work on.

- Added several new features to running(), it can now allow sequences
  shorter than the requested width to be present at the front, the back,
  or on both sides of the full lenth sequences.  This allows one to
  align the data so that the window is before, after, or around the
  indexed point.

- Add enhancements to estimable() provided by Søren Højsgaard
  [EMAIL PROTECTED]:

  The estimable function now
  1) also works on geese and gee objects and
  2) can test hypotheses af the forb L * beta = beta0 both as a
 single Wald test and row-wise for each row in L.

- Add colorpanel function, which generates a smoothly varying band of
  colors over a three color range (lo, mid, high).



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

___
R-packages mailing list
[EMAIL PROTECTED]
https://www.stat.math.ethz.ch/mailman/listinfo/r-packages

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


FW: [R] Gregmisc 'running' question

2004-03-26 Thread Warnes, Gregory R

[The new version of gregmisc will be showing up on CRAN shortly.]

-Original Message-
From: Warnes, Gregory R 
Sent: Friday, March 26, 2004 6:07 PM
To: 'Sean Davis'
Subject: RE: Quick running question

Hi Sean,

Congratulations, you found a bug!

My running function took an improper shortcut.  When allow.fewer=FALSE it
was still passing shorter lists of elements to the called function, and then
overwriting the results for the shorter lists with NAs.  I've now corrected
the code to skip evaluation of the function on lists shorter than the
specified length when allow.fewer=FALSE.

I'm attaching the latest version of the gregmisc package with the corrected
code.  I've also added a couple of other features while I was mucking
about...


-Greg


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Don MacQueen
 Sent: Friday, March 26, 2004 10:58 AM
 To: Sean Davis; r-help
 Subject: Re: [R] Gregmisc 'running' question
 
 
 It says not enough x observations. That's pretty clear.
 So ask yourself, what is the minimum number of observations one needs 
 to do a t test?
 
 Try this to see how many observations t.test was given each time.
 
 running(dat,width=50,fun=function(x) length(x),allow=T)
 
 or this
running(dat,width=50,fun=function(x) cat('x:',x,'\n\n'),allow=T)
 
 -Don
 
 At 9:31 AM -0500 3/26/04, Sean Davis wrote:
 Just a quick and probably simple question:
 
   dat - rnorm(500,sd=1+(1:500)/500)
   fun - function(x) t.test(x)$p.value
   running(dat,width=50,fun=fun,allow=T)
 Error in t.test.default(x) : not enough x observations
   running(dat,width=50,fun=fun,allow=F)
 Error in t.test.default(x) : not enough x observations
   fun2 - function(x) mean(x)
   running(dat,width=50,fun=fun2,allow=T)
   1:1  1:2  1:3  1:4  1:5
 1:6
 -0.334134613 -0.626595581 -0.368967457 -0.113737178 -0.057448771
 0.228643936
   1:7  1:8  1:9 1:10 1:11
 1:12
 -0.058807689  0.021762463 -0.063805657  0.031931121  0.080465708
 0.087062800
 
 
 However, this works fine.
 
   t.test(dat[1:50])$p.value
 [1] 0.1661845
 
 Why doesn't t.test work with running here?
 
 Thanks,
 Sean
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 
 -- 
 --
 Don MacQueen
 Environmental Protection Department
 Lawrence Livermore National Laboratory
 Livermore, CA, USA
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] Recall: Quick running question

2004-03-26 Thread Warnes, Gregory R
Warnes, Gregory R would like to recall the message, Quick running
question.


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] RE: Quick running question

2004-03-26 Thread Warnes, Gregory R
[The new version of gregmisc will be showing up on CRAN shortly.]

 -Original Message-
 From: Warnes, Gregory R 
 Sent: Friday, March 26, 2004 6:07 PM
 To: 'Sean Davis'
 Subject: RE: Quick running question
 
 Hi Sean,
 
 Congratulations, you found a bug!
 
 My running function took an improper shortcut.  When 
 allow.fewer=FALSE it was still passing shorter lists of 
 elements to the called function, and then overwriting the 
 results for the shorter lists with NAs.  I've now corrected 
 the code to skip evaluation of the function on lists shorter 
 than the specified length when allow.fewer=FALSE.
 
 I'm attaching the latest version of the gregmisc package with 
 the corrected code.  I've also added a couple of other 
 features while I was mucking about...
 
 
 
 -Greg
 
  -Original Message-
  From: Sean Davis [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 25, 2004 5:25 PM
  To: Warnes, Gregory R
  Subject: Quick running question
  
  
  Greg,
  
  I am starting to use running and do the following:
  
   running(1:10,function(h) {t.test(h)},width=5)
  Error in t.test.default(h) : not enough x observations
   running(1:10,function(h) {t.test(h)},width=5,allow.fewer=T)
  Error in t.test.default(h) : not enough x observations
  
  It works fine for mean, median, etc.  What am I missing?
  
  Thanks,
  Sean
  
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


RE: [R] writing text on graphics' window

2004-03-23 Thread Warnes, Gregory R

Another approach is to use the textplot() function and friends from the
gregmisc library.  From ?textplot:

textplot  package:gregmisc  R Documentation

Display text information in a graphics plot.

Description:

 This function displays text output in a graphics window.  It is
 the equivalent of 'print' except that the output is displayed as a
 plot.

-Greg


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Paul Murrell
 Sent: Monday, March 22, 2004 7:46 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Ray Brownrigg
 Subject: Re: [R] writing text on graphics' window
 
 
 Hi
 
 
 Ray Brownrigg wrote:
 From: Duncan Murdoch [EMAIL PROTECTED]
 Date: Sun, 21 Mar 2004 06:58:03 -0500
 
 On Sun, 21 Mar 2004 11:07:01 +, you 
 [EMAIL PROTECTED] wrote:
 
 
 Does anyone know of a method for writing text to the 
 graphics window, 
 where there is *no* plot? Basically, I have developed a 
 'significance 
 test' and I would like the output on the graphics window to say 
 something about the input parameters and the stats of the 
 significance test.
 
 You need to make sure a graphics device is active and establish a
 coordinate system there.  The easiest way to do that is to 
 make a call
 to plot() with everything turned off:
 
  plot(0:100,0:100,type='n',axes=FALSE,xlab=,ylab=)
 
 You may also want to reduce the margins if you want your output to
 take up the full frame, e.g.
 
  oldmargins - par(mar=c(0,0,0,0))
  plot(0:100,0:100,type='n',axes=FALSE,xlab=,ylab=)
 
  
  An easier way to activate a graphics device and establish a 
 coordinate
  system is to call plot.new().
  
  
  Try:
  
 plot.new()
 text(0, 0, ABC)
 par(usr)
  
  [1] -0.04  1.04 -0.04  1.04
 
 
 The grid package gives you the whole page to play with by default and 
 gives you more flexibility in how you place the text.  Try ...
 
 library(grid)
 grid.text(Here's some\ntext, x=unit(1, cm),
y=unit(1, npc) - unit(1, cm),
just=c(left, top))
 
 Paul
 -- 
 Dr Paul Murrell
 Department of Statistics
 The University of Auckland
 Private Bag 92019
 Auckland
 New Zealand
 64 9 3737599 x85392
 [EMAIL PROTECTED]
 http://www.stat.auckland.ac.nz/~paul/
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] xls2csv.pl: Script to translate Excel files into CSV

2004-02-16 Thread Warnes, Gregory R


I've created a Perl script that translates Microsoft Excel (.xls) files into
comma-delimited text files (.csv) using the Perl Spreadsheet::ParseExcel
module. 

Usage
-

perl xls2csv.pl excel file [output file] [worksheet number]

Translate the Microsoft Excel spreadsheet file contained in
excel file into comma separated value format (CSV) and store
in output file.

If output file is not specified, the output file will have the
same name as the input file with '.xls' or '.XLS' (if any)
removed and '.csv' appended.

If no worksheet number is given, each worksheet will be written to
a separate file with the name 'output file_worksheet name.csv'.

Dependencies


xls2csv.pl depends on the OLE::Storage-Lite and Spreadsheet::ParseExcel
packages which are available below or from the author's CPAN
http://search.cpan.org/author/KWITKNR/ site. 


Where to get it


http://www.analytics.washington.edu/Zope/projects/xls2csv.pl

Contacting the Author
-

The xls2csv.pl script is maintained by Gregory R. Warnes
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]. Questions, comments, patches,
etc. are welcome. 

-Greg

Gregory R. Warnes
Manager, Non-Clinical Statistics
Pfizer Global Research and Development
Tel: 860-715-3536



LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

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


[R] [R-pkgs] FW: Announce: RPy version 0.3.3

2004-01-16 Thread Warnes, Gregory R


  -Original Message-
 From: Warnes, Gregory R  
 Sent: Friday, January 16, 2004 3:52 AM
 To:   'r-packages'; 'python-announce '; 'rsoap-talk'; 'Dan Nathan'; 'RPy
 List'
 Subject:  Announce: RPy version 0.3.3
 
 
 RPy Version 0.3.3 is now available from the RPy home page at
 http://rpy.sf.net.   
 
 What is RPy?
 
 
 RPy is a very simple, yet robust, Python (http://www.python.org) interface
 to the R environment for statistical data analysis and graphics
 (http://www.r-project.org).  RPy can manages translation between python
 and R formats for all kinds of R objects and can execute arbitrary R
 functions (including the graphic functions).  All errors from the R
 language are converted to proper Python exceptions.  All module installed
 on the R system are available from Python.
 
 Consequently, RPy allows Python programmers to easily add advanced
 statistical functionality to Python programs.  It allows R programmers the
 ability to use Python to control R computations and to interface them with
 other systems.  Examples include RSOAP
 (http://www.analytics.washington.edu/Zope/projects/RSOAP),  RSessionDA
 (http://www.analytics.washington.edu/Zope/projects/RSOAP), and RStatServer
 (http://www.analytics.washington.edu/Zope/projects/RStatServer).   These
 products, which make heavy use of RPy have been used in a production
 environments for two years.
 
 New features in 0.3.3
 ---
 
 o Now works with R 1.8.X
 
 o Windows version merged into the Unix source tree
 
 o Added lcall() method for calling R functions using a list of (name,
   value) pairs for the parameters.  This is works around the python
   (mis-)feature of using unordered python dictionaries for named
   parameters, resulting in the loss of order for named parameters.
 
 o All reported bugs have been fixed.
 
 o New maintainer: Gregory R. Warnes [EMAIL PROTECTED]
 
 
 For more information visit the RPy home page at http://rpy.sf.net, or the
 RPy SourceForge project page at http://www.sf.net/projects/rpy.


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

___
R-packages mailing list
[EMAIL PROTECTED]
https://www.stat.math.ethz.ch/mailman/listinfo/r-packages

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


RE: [R] generic/method consistency

2003-12-19 Thread Warnes, Gregory R
Add '...' to the argument list of your methods.  

-G

 -Original Message-
 From: Matt Pocernich [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 19, 2003 12:18 PM
 To: [EMAIL PROTECTED]
 Subject: generic/method consistency
 
 
 Hi,
 
 I realize the answer is very likely in the section Generic 
 functions and
 methods  (or Adding new generics), but I'm not clear what to 
 do with the
 following.  Running R CMD check, I get the following warnings for my
 generic functions.  Does this mean I need the argument
 
 * checking generic/method consistency ... WARNING
 
 leps:
   function(x, ...)
 leps.default:
   function(x, pred, titl, plot)
 
 reliability.plot:
   function(x, ...)
 reliability.plot.default:
   function(x, obar.i, prob.y, titl, mod.names)
 
 summary:
   function(object, ...)
 summary.prob.bin:
   function(object)
 
 
 
 Matt Pocernich
 NCAR - Research Applications Program
 303-497-8312
 
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] Persistent state of R

2003-11-25 Thread Warnes, Gregory R

Starting up R and loading libraries can be very time consuming.  For my
RSOAP system (http://www.analytics.washington.edu/Zope/projects/RSOAP/)  I
took the step of pre-starting the R process, including the loading of some
libraries, and then handing work of to the pre-started process.  You should
be able to use RSOAP from perl, and it would be a simple change to have it
add the bioconductor packages to the pre-loaded set.

Alternatively, I suppose that one could force R to dump core and then start
it from the core image...

-G

-Original Message-
From: michael watson (IAH-C)
To: '[EMAIL PROTECTED]'
Sent: 11/25/03 8:54 AM
Subject: [R] Persistent state of R

Hi

I am using R as a back-end to some CGI scripts, written in Perl.  My
platform is Suse Linux 8.2, Apache 1.3.7.  So the CGI script takes some
form parameters, opens a pipe to an R process, loads up some
Bioconductor libraries, executes some R commands and takes the ouput and
creates a web page.  It is all very neat and works well.

I am trying to make my cgi scripts quicker and it turns out that the
bottle-neck is the loading of the libraries into R - for example loading
up marrayPlots into R takes 10-20 seconds, which although not long, is
long enough for users to imagine it is not working and start clicking
reload

So I just wondered if anyone had a neat solution whereby I could somehow
have the required libraries permanently loaded into R - perhaps I need a
persistent R process with the libraries in memory that I can pipe
commands to?  Is this possible?

Thanks
Mick

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] Contrast

2003-11-06 Thread Warnes, Gregory R
Or ?contrast in the Design library.

-G

 -Original Message-
 From: Simon Blomberg [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 04, 2003 8:32 PM
 To: Igor Roytberg; [EMAIL PROTECTED]
 Subject: RE: [R] Contrast
 
 
 see ?fit.contrast in library gregmisc.
 
 Cheers,
 
 Simon.
 
 Simon Blomberg, PhD
 Depression  Anxiety Consumer Research Unit
 Centre for Mental Health Research
 Australian National University
 http://www.anu.edu.au/cmhr/
 [EMAIL PROTECTED]  +61 (2) 6125 3379
 
 
  -Original Message-
  From: Igor Roytberg [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, 5 November 2003 12:04 PM
  To: [EMAIL PROTECTED]
  Subject: [R] Contrast
  
  
  Could anyone please explain how to set up contrasts between 
  means in R. I want to know if before I conduct an experiment 
  and believe the mean for 1 and 2 will be different from means 
  3 and 4, Is this true?  That is what I have to prove or 
  disprove, I thought that contrasts would be the way to go. 
  Thanks for the help. 
  
  Igor
  [[alternative HTML version deleted]]
  
  __
  [EMAIL PROTECTED] mailing list
  https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Off Topic: Good reference for sample size calculations

2003-09-10 Thread Warnes, Gregory R

Hi All,

This is off topic, but we're drawing a blank here..

 In a presentation I'll be giving next week, I want to include a reference
 to a good general text on computing sample sizes for standard experiments.
 Can anyone recommend a good book to use for this purpose?
 
 Thanks,
 
 -Greg


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] beginner's question: Graphical presentation of t test

2003-06-07 Thread Warnes, Gregory R
Take a look at the 'plotmeans' function in the gregmisc library.  It will
draw the means and error bars for you, allowing you to connect the means for
the paired control and treated groups with something like this:

R code
# sample source data 10 replicates for each enzyme for treated and control
x - rnorm(60)
enzyme - rep(c(ABC123, ABD124, CCF342), length=60)
treat  - rep(c(CONTROL,TREATED), length=60)

# create a enzyme by treatment label
group - interaction(enzyme, treat)

# plot the means and confidence intervals
library(gregmisc)
plotmeans( x ~ group, connect=list(1:2,3:4,5:6))

# add p-values
data - data.frame(x, enzyme, treat)
p.vals - by( data, enzyme, function(data) t.test( x ~ treat,
data=data)$p.value )
text(x=c(1.5, 3.5, 5.5), y=rep(0,3), paste(P-value:\n,
format.pval(p.vals)) )
/R code
 
-Greg

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Saturday, June 07, 2003 1:43 PM
 To: [EMAIL PROTECTED]
 Subject: [R] beginner's question: Graphical presentation of t test
 
 
 Hi,
 
 Is there any way to use R to present t test results for three 
 groups of 
 experiments, each of which involves several parallel 
 experiment series with 
 groups of control vs treated. I would like to present the 
 average fold change 
 of the experimental parameter (concentration of enzymes) as bars with 
 standard error and the p value above the bar. So, there 
 should be two groups 
 (control vs treated)  of three bars for the three enzymes.
 
 Thanks
 
 Peter
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is... {{dropped}}

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] round() seems inconsistent when rounding 5s

2003-03-15 Thread Warnes, Gregory R
Actually, under the default IEEE rounding mode, decimal values ending in 5
are always rounded to the nearest even value.   This intended to ensure that
rounding does not systematically bias computations in one direction, as
would happen if 5's were always rounded either up or down.

A very useful review of the issues in floating point computations on
computer and under IEEE standard arithmetic is the paper What Every
Computer Scientist Should Know About Floating-Point Arithmetic, by David
Goldberg, published in the March, 1991 issue of Computing Surveys.  This
paper is reprinted on the Sun website at
http://docs.sun.com/source/806-3568/ncg_goldberg.html.

-Greg

 -Original Message-
 From: Marc R. Feldesman [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 15, 2003 5:49 PM
 To: Rashid Nassar; r-help
 Subject: Re: [R] round() seems inconsistent when rounding 5s
 
 
 At 01:53 PM 3/15/2003, Rashid Nassar wrote:
  It may be my lack of unerstanding, but round() seems to me to give
  inconsistent results when rounding 5s as in the following examples?
 
 Not really.  Floating point numbers can't be precisely represented in 
 binary and so the internal representation of 1.5 might be 
 very different 
 from what you think it is.  If you've done any programming at 
 all, this is 
 one of the first lessons you learn about real numbers and computers.
 
 
 Dr. Marc R. Feldesman
 Professor and Chairman Emeritus
 Anthropology Department - Portland State University
 email:  [EMAIL PROTECTED]
 email:  [EMAIL PROTECTED]
 fax:503-725-3905
 
 
 Sometimes the lights are all shining on me, other times I 
 can barely see,
 lately it's occurred to me, what a long strange trip it's 
 been...  Jerry 
 the boys
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is... [[dropped]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] RSessionDA 1.0-rc1 released.

2003-03-14 Thread Warnes, Gregory R

Release 1.0-rc1 of RSessionDA is now available.  This version provides
significantly improved security and should now be usable on public internet
sites.

Description:

RSessionDA provides an interface to R from the open-source web application
development system Zope http://www.zope.org.  This interface permits
evaluation of functions in the R language using information in Zope.  R data
objects, graphics files, printed output, script transcripts, and data files
can be returned to Zope for display making it easy to create web
applications that include advanced statistical functionality.
 
See  http://software.biostat.washington.edu/statsoft/snake/RSessionDA for
details.

-Greg


LEGAL NOTICE\ Unless expressly stated otherwise, this message is... [[dropped]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] RE: Text Rotation (was: Take care with codes()!)

2003-03-08 Thread Warnes, Gregory R

I've just uploaded gregmisc_0.8.2.tar.gz to CRAN. It should show up in the
package repository in a day or two.  

This version of the gregmisc package provides an enhanced 'balloonplot'
function with 'rowsrt', 'colsrt' arguments to control rotation of the
labels, and 'rowmar', 'colmar' to control the amount of space reserved for
the labels.  

Here's an example:


# Create an Example Data Frame Containing Car x Color data, with long car
names
carnames - c(BMW: High End, German,
  Renault: Medium End, French,
  Mercedes: High End, German, 
  Seat: Imaginary, Unknown Producer)
carcolors - c(red,white,silver,green)
datavals - round(rnorm(16, mean=100, sd=60),1)
data - data.frame(Car=rep(carnames,4),
   Color=rep(carcolors, c(4,4,4,4) ),
   Value=datavals )

# generate balloon plot with default scaling, the column labels will overlap
balloonplot( data$Color, data$Car, data$Value)


# try again, with column labels rodated 90 degrees, and given more space
balloonplot( data$Car, data$Color, data$Value, colmar=3, colsrt=90)

-Greg

 -Original Message-
 From: Warnes, Gregory R 
 Sent: Saturday, March 08, 2003 10:12 AM
 To: 'Ramon Alonso-Allende'; Warnes, Gregory R
 Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
 Subject: RE: Text Rotation (was: Take care with codes()!)
 
 
 
 You can use the graphics parameter srt to rotate displayed 
 text by a specified number of degrees, e.g. srt=45 to put it 
 on an angle, srt=90 to put it vertical.  
 
 If you do this, may need to modify the call to text to 
 increase ylim and change the plot location to give you more room.
 
 I'm working to update the 'balloonplot' function in the 
 gregmisc package now to handle this case gracefully.
 
 -Greg
 
 
  -Original Message-
  From: Ramon Alonso-Allende [mailto:[EMAIL PROTECTED]
  Sent: Saturday, March 08, 2003 6:41 AM
  To: Warnes, Gregory R
  Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
  Subject: Re: Take care with codes()! (was [R] type of 
 representation)
  
  
  Hi
  
  I have been ussing this code displayed while a go to do 
  balloons plots.
  
  My problem is that the labels of the data i'm working on now 
  are to big 
  and they overlap in the X axis.
  
  Is there any way i can plot the text vertically or with some 
  inclination?
  
  
  Thanks
  
  Ramon
  
  Warnes, Gregory R wrote:
   Ahh yes, sorry about that.
   
   Here's the corrected snippet:
   
   # Create an Example Data Frame Containing Car x Color data
   carnames - c(bmw,renault,mercedes,seat)
   carcolors - c(red,white,silver,green)
   datavals - round(rnorm(16, mean=10, sd=4),1)
   data - data.frame(Car=rep(carnames,4),
  Color=rep(carcolors, c(4,4,4,4) ),
  Value=datavals )
   # show the data
   data
   
   # plot the Car x Color combinations, using 'cex' to specify 
  the dot size
   plot(x=as.numeric(data$Car), # as.numeric give numeric values
y=as.numeric(data$Color), 
cex=data$Value/max(data$Value)*12,  # standardize size 
  to (0,12)
pch=19,  # filled circle
col=skyblue, # dot color
xlab=Car, # x axis label
ylab=Color, # y axis label
xaxt=n, # no x axis lables
yaxt=n, # no y axis lables
bty=n,  # no box around the plot
xlim=c(0,nlevels(data$Car  )+0.5), # extra space on 
  either end of plot
ylim=c(0.5,nlevels(data$Color)+1.5)  # so dots don't 
  cross into margins
)
   
   # add text labels
   text(x=1:nlevels(data$Car), y=nlevels(data$Car)+1, 
  labels=levels(data$Car))
   text(x=0, y=1:nlevels(data$Color), labels=levels(data$Color) )
   
   # add borders between cells
   abline(v=(0:nlevels(data$Car)+0.5))
   abline(h=(0:nlevels(data$Color)+0.5))
   
   # annotate with actual values
   text(x=as.numeric(data$Car), # as.numeric give numeric values
y=as.numeric(data$Color), 
labels=format(data$Value),   # label value
col=black, # textt color
)
   
   # put a nice title
   title(main=Car by Color Popularity\n(Dot size proportional 
  to popularity))
   
   
   -Greg
   
   
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
  Sent: Friday, January 03, 2003 1:53 PM
  To: Warnes, Gregory R
  Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
  Subject: RE: Take care with codes()! (was [R] type of 
  representation)
  
  
  From the help page of codes():
  
   Normally `codes' is not the appropriate function to 
 use with an
   unordered factor.  Use `unclass' or `as.numeric' to 
 extract the
   codes used in the internal representation of the 
  factor, as these
   do not assume that the codes are sorted.
  
  and this is one of the `normally' cases.  Your code will only work
  correctly if the levels are in alphabetical order (in the 
  locale in use).
  
  On Fri, 3 Jan 2003, Warnes, Gregory R wrote:
  
  
  How about this snippet:
  
  # Create

RE: [R] Moving average

2003-03-07 Thread Warnes, Gregory R
Or look at the 'running' function in the gregmisc package.

-Greg

 -Original Message-
 From: Huntsinger, Reid [mailto:[EMAIL PROTECTED]
 Sent: Friday, March 07, 2003 10:13 AM
 To: 'Wayne Jones'; [EMAIL PROTECTED]
 Subject: RE: [R] Moving average
 
 
 Try filter in package ts.
 
 Reid Huntsinger
 
 -Original Message-
 From: Wayne Jones [mailto:[EMAIL PROTECTED] 
 Sent: Friday, March 07, 2003 9:37 AM
 To: [EMAIL PROTECTED]
 Subject: [R] Moving average
 
 
 Hi, 
 
 Does anyone know if R has the functionality to calculate a 
 simple moving
 average. I cant seem 
 to find it in the help menu. 
 
 thanks, 
 
 Wayne
 
 
 Dr Wayne R. Jones
 Statistician / Research Analyst
 KSS Group plc
 St James's Buildings
 79 Oxford Street
 Manchester M1 6SS
 Tel: +44(0)161 609 4084
 Mob: +44(0)7810 523 713
 
 
 
 KSS Ltd
 A division of Knowledge Support Systems Group plc
 Seventh Floor  St James's Buildings  79 Oxford Street  
 Manchester  M1 6SS
 England
 Company Registration Number 2800886 (Limited) 3449594 (plc)
 Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305
 mailto:[EMAIL PROTECTED]  http://www.kssg.com
 
 
 The information in this Internet email is confidential and 
 may b... [[dropped]]
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is... [[dropped]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


[R] Initial release of RSessionDA

2003-03-06 Thread Warnes, Gregory R

 Announcing the initial release of RSessionDA.
 
 RSessionDA provides objects for interacting with R from Zope
 www.zope.org, a full-featured web application development system.  These
 objects permit evaluation of functions in the R language using information
 in Zope.  R data objects, graphics files, printed output, script
 transcripts, and data files can be returned to Zope for display. These
 tools make it easy to create web applications that include advanced
 statistical functionality.
 
 RSessionDA is built on RSOAP package, which provides access to R via the
 SOAP http://www.w3.org/TR/SOAP/; communications protocol.  This allows
 Zope to access multiple independent R sessions running (if desired) on a
 separate compute server.
 
 For more information on or to download RSessionDA see:
 
 http://software.biostat.washington.edu/statsoft/snake/RSessionDA or
 http://www.zope.org/Members/warnes/RSessionDA/ 
 
 For more information on or to download RSOAP see:
 
 http://software.biostat.washington.edu/statsoft/snake/RSOAP or 
 
 For more information on Zope see:
 
 http://www.zope.org
 
 -Greg


LEGAL NOTICE\ Unless expressly stated otherwise, this message is... [[dropped]]

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


RE: [R] help

2003-02-21 Thread Warnes, Gregory R
Alternatively, use the 'plotCI' function (or for standard errors,
'plotmeans' function) in the gregmisc package.  

-Greg

 -Original Message-
 From: Marc Schwartz [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 21, 2003 8:38 AM
 To: 'Thanjavur Bragadeesh'; [EMAIL PROTECTED]
 Subject: RE: [R] help
 
 
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of Thanjavur 
 Bragadeesh
 Sent: Monday, February 10, 2003 4:08 PM
 To: [EMAIL PROTECTED]
 Subject: [R] help
 
 
 
 Hi,
 
 help.I would like to plot the mean and standard deviation 
 against a factor 
 in the xaxis- in other words I want an errorplot. I also want 
 to put the 
 standard deviation like a T on top of a barplot.  How can do 
 this in R
 
 Bragadeesh
 
 Look at the barplot2() function in the gregmisc package on CRAN.
 
 A quick example using barplot2() and faked numbers:
 
 
 library(gregmisc)
 barplot2(c(5, 8, 4, 6, 9), plot.ci = TRUE, ci.l = c(5, 8, 4, 6, 9),
 ci.u = c(5.5, 8.3, 4.25, 6.7, 10.5))
 
 
 This will give you 5 vertical bars, with the upper bounds of the
 confidence intervals plotted on top of the bars. Note that I have
 specified that the lower bounds are the same as the bar values, which
 results in no lower intervals being plotted.  If you want both upper
 and lower bounds plotted, use appropriate values for the 'ci.l'
 argument.
 
 There are other options for axis configuration, grid lines and so
 forth in barplot2() if you should need them.
 
 Hope that helps,
 
 Marc Schwartz
 
 __
 [EMAIL PROTECTED] mailing list
 http://www.stat.math.ethz.ch/mailman/listinfo/r-help
 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is ... [[dropped]]

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help



[R] pairlists (was: data manipulation function descriptions)

2003-02-14 Thread Warnes, Gregory R


 -Original Message-
 From: Luke Tierney [mailto:[EMAIL PROTECTED]]

 R does not provide a pairlist data structure. This creates a dilemma
 when translating some list-based xlispstat code, or, more
 importantly, when implementing an algorithm for which parilists are
 the natural data structure to use.
 ...
 Pairlists were and still are used internally for many things. 
 ...

Wouldn't it, therefore, make sense to provide a 'pairlist' package which
exposes the internal pairlist structure and provides appropriate functions
(car, cdr, ...), instead of expecting people to keep re-implementing these
features?

-Greg


LEGAL NOTICE\ Unless expressly stated otherwise, this message is ... [[dropped]]

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help



RE: [R] search contrasts tutorial

2003-02-13 Thread Warnes, Gregory R
You might also find the help pages for 'fit.contrasts', 'estimable', and
'glh.test' functions in the gregmisc library useful.

-Greg

 -Original Message-
 From: Tito de Morais Luis [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 13, 2003 8:52 AM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] search contrasts tutorial
 
 
 Hi,
 
 Did you look at :
 
 http://pbil.univ-lyon1.fr/R/enseignement.html
 
 There is a huge list of statistical courses based on R. You may find
 what you look for.
 
 It's in French but this should not be a problem for you ;-)
 
 HTH
 
 L. Tito
 
 Le jeu 13/02/2003 à 17:30, Robert Espesser a écrit :
  I'm looking for a tutorial or notes on the use of contrasts 
 factor in 
  linear model in R, 
  I've  found  some mails and infos about in various 
 documents about R,
  but I've probably missed
  a good review on this subject. 
 -- 
 L. Tito de Morais
   UR RAP
IRD de Dakar
   BP1386
Dakar
   Sénégal
 
 Tél: +221 849 33 31
 Fax: +221 832 16 75
 Courriel: [EMAIL PROTECTED]
 
 __
 [EMAIL PROTECTED] mailing list
 http://www.stat.math.ethz.ch/mailman/listinfo/r-help
 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is ... [[dropped]]

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help



RE: [R] testing slope

2003-02-05 Thread Warnes, Gregory R

For testing the hypothesis

Beta[X] + Beta[Vn3] + Beta[X:Vn3] = 0

you can use the estimable function from the gregmisc package:

estimable(m2, c(Intercept=0,
   X=1,
   Vn2=0,
   Vn3=1,
 X:Vn2=0,
   X:Vn3=1)
)

See the estimable help page for details.

-Greg




 -Original Message-
 From: Ronaldo Reis Jr. [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 2:51 PM
 To: R-Help
 Subject: [R] testing slope
 
 
 Hi all,
 
 I try to test a linear slope using offset.
 
 I have:
 
  m2 - glm(Y~X*V)
  summary(m2)
 
 Call:
 glm(formula = Y ~ X * V)
 
 Deviance Residuals: 
  Min1QMedian3Q   Max  
 -2.01688  -0.56028   0.05224   0.53213   3.60216  
 
 Coefficients:
 Estimate Std. Error t value Pr(|t|)
 (Intercept)   1.3673 0.8476   1.613 0.119788
 X 4.0235 0.1366  29.453   2e-16 ***
 Vn2   0.9683 1.1987   0.808 0.427131
 Vn3   4.6043 1.1987   3.841 0.000787 ***
 X:Vn2 4.1108 0.1932  21.279   2e-16 ***
 X:Vn3-4.0069 0.1932 -20.740   2e-16 ***
 ---
 Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 
 
 (Dispersion parameter for gaussian family taken to be 1.53955)
 
 Null deviance: 15303.977  on 29  degrees of freedom
 Residual deviance:36.949  on 24  degrees of freedom
 AIC: 105.39
 
 Number of Fisher Scoring iterations: 2
 
 It is clear that X slope is diferent of Zero.
 X 4.0235 0.1366  29.453   2e-16 ***
 
 It is too clear that X:Vn2's slope is diferent of X's slope 
 and diferent of 
 Zero, because is greater than X'slope.
 X:Vn2 4.1108 0.1932  21.279   2e-16 ***
 
 But, the X:Vn3' slope is different of X'slope, but not 
 necessarily different 
 of Zero.
 
 How I make to introduce this parameter in a new model for 
 test? An offset only 
 with Vn3 slope???
 
 I try:
 
 m2 - glm(Y~V*offset(0*X))
 m2 - glm(Y~X*V+V*offset(0*X))
 m2 - glm(Y~V:X+V*offset(0*X))
 
 but neither work :((
 
 Thanks for all.
 Ronaldo
 -- 
 If you live in a country run by committee, be on the committee.
   -- Graham Summer
 --
 |   //|\\   [*][***]
 || ( õ õ )  [Ronaldo Reis Júnior  ][PentiumIII-600 ]
 | V [ESALQ/USP-Entomologia, CP-09 ][HD: 30 + 10 Gb ]
 ||  / l \   [13418-900 Piracicaba - SP][RAM: 128 Mb]
 |  /(lin)\  [Fone: 19-429-4199 r.229  ][Video: SiS620-8Mb  ]
 ||/(linux)\ [[EMAIL PROTECTED]  ][Modem: Pctel-onboar]
 |/ (linux) \[ICQ#: 5692561][Kernel: 2.4.18 ]
 ||  ( x )   [*][***]
 ||| _/ \_Powered by Gnu/Debian Woody D+:) | Lxuser#: 205366
 
 __
 [EMAIL PROTECTED] mailing list
 http://www.stat.math.ethz.ch/mailman/listinfo/r-help
 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is ... [[dropped]]

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help



RE: [R] Decreasing my personal entropy ...

2003-01-31 Thread Warnes, Gregory R
Lattice plots and trellice plots are actually displayed by thier 'print'
methods.  So, to get ta plot to be displayed in a non-interactive context,
such as a script, explicitly call print on the results of the plot command.

-Greg

-Original Message-
From: Gunter, Bert
To: R-Help (E-mail)
Sent: 1/31/03 8:45 AM
Subject: [R] Decreasing my personal entropy ...

R-Listers:

A very minor -- and maybe silly -- question just for personal
enlightenment.

In S (either R or S-Plus, AFAIK) when one types or pastes a trellis
graphics
command into the commands/console window, the graph is automatically
produced:
e.g.,

trellis.device(...)
xyplot(y~x)

If one puts these in a function and calls the function, the same occurs.
However, if one sources in these command from a file (i.e., using
source()),
automatic printing does not occur; one must explicitly call
print(xyplot(y~x)) . Why do things work this way?  

Many thanks.

Bert Gunter
Biometrics Research RY 84-16
Merck  Company
P.O. Box 2000
Rahway, NJ 07065-0900
Phone: (732) 594-7765
mailto: [EMAIL PROTECTED]

The business of the statistician is to catalyze the scientific learning
process.  -- George E.P. Box



--

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help


LEGAL NOTICE\ Unless expressly stated otherwise, this message is ... [[dropped]]

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help



[R] Version 0.8.0 of the gregmisc package is now available

2003-01-31 Thread Warnes, Gregory R

Version 0.8.0 of the gregmisc package is now (or will shortly be) available
on CRAN.  

New in this release:

- Enhanced and bug-fixed 'CrossTable' function (contributed by
  Marc Schwartz)

- Augmented the 'barplot2' function with an 'add' argument to allow for 
  the addition of a barplot to an existing graphic. (contributed by
  Marc Schwartz)

- Added the 'baloonplot' function which creates a visual 2-way table 
  containing circles whose area corresponds to the size of the corresponding

  measurement. 
 
- Renamed 'contrast.lm' to 'fit.contrast'.  This new name is more
  descriptive and makes it easier to create and use methods for other
  classes, eg lme.

- New contrast.lm function which generates a 'depreciated' warning and
  calls fit.contrast.

- Enabled fit.contrast for lme object now that Doug Bates has provided
  the necessary support for contrasts in the nlme package. (Thanks Doug!)
  Requires the newly released nlme 3.1-37.

- 'make.contrasts' has been augmented to check for too many submitted 
   contrast rows

- Updated wapply.R to allow specification of evaluation points when
  method is 'width' or 'range' using the 'pts' argument.

- Updated wapply.Rd to add 'pts' argument

- Fixed typos, spelling errors, grammatical errors and lack of clarity
  in various help pages.

Description of the package:

Package: gregmisc
Description: Misc Functions written/maintained by Gregory R. Warnes
Title: Greg's Miscellaneous Functions
Version: 0.8.0
Date: 2003/01/30
Maintainer: Gregory R. Warnes [EMAIL PROTECTED]
Author: Gregory R. Warnes.  Includes code provided by Ben Bolker,
Bendix Carstensen, Don MacQueen, William Venables, Marc
Schwartz, Ben Bolker, Ian Wilson, and Kjetil Halvorsen
License: GPL (version 2 or later)
Depends: R (= 1.6.0), MASS, nlme (= 3.1-37)
Built: R 1.6.1; sparc-sun-solaris2.8; Thu Jan 30 17:13:52 EST 2003

Index:

CrossTable  Cross Tabulation with Tests for Factor
Independence
aggregate.table Create 2-Way Table of Summary Statistics
balloonplot Plot a graphical matrix where each cell
contains a dot whose size reflects the relative
magnitude of the corresponding component.
bandplotPlot x-y Points with Locally Smoothed Mean and
Standard Deviation
barplot2Enhanced Bar Plots
boxplot.n   Produce a Boxplot Annotated with the Number of
Observations
ci  Compute Confidence Intervals
combinationsEnumerate the Combinations or Permutations of
the Elements of a Vector
combine Combine R Objects With a Column Labeling the
Source
contrast.lm Compute and test arbitrary contrasts for
regression objects (Depreciated, use
'fit.contrasts' instead.)
rdirichlet  Functions for the Dirichlet Distribution
estimable   Compute and test estimable linear functions of
the fitted coefficients (including contrasts)
of regression objects
factorial   Compute factorial function
fast.prcomp Efficient computation of principal components
and singular value decompositions.
fit.contrastCompute and test arbitrary contrasts for
regression objects
glh.testTest a General Linear Hypothesis for a
Regression Model 
hist2d  Compute and Plot a 2-Dimensional Histogram 
interleave  Interleave Rows of Data Frames or Matrices 
lowess  Scatter Plot Smoothing
make.contrasts  Construct a User-Specified Contrast Matrix
nobsCompute the Number of Non-missing Observations 
permute Randomly Permute the Elements of a Vector
plotCI  Plot Error Bars
plotmeans   Plot Group Means and Confidence Intervals
qqnorm.aov  Makes a half or full normal plot for the
effects from an aov model 
quantcutCreate a Factor Variable Using the Quantiles of
a Continuous Variable
rename.vars Rename variables in a dataframe 
reorder Reorder the Levels of a Factor
running Apply a Function Over Adjacent Subsets of a
Vector
space   Space points in an x-y plot so they don't
overlap.
undocumentedUndocumented functions
wapply  Compute the Value of a Function Over a Local
Region Of An X-Y Plot




LEGAL NOTICE\ Unless expressly stated otherwise, this message is ... [[dropped]]

__
[EMAIL PROTECTED] mailing list

RE: [R] Downloading Package

2003-01-30 Thread Warnes, Gregory R
If your system is set up appropriately, you should be able to use the menu
Packages - Install Packages from Cran to get a list of packages, then
select the desired package and press OK.

-Greg

 -Original Message-
 From: Peter von Rohr [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, January 30, 2003 6:57 AM
 To: Vincent Stoliaroff
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] Downloading Package
 
 
 Hello Vincent,
  
  I am a beginner in using R so my question could seem very 
 simple. I would
  like to download the package multiv to do multivariate data 
 analysis. The
  package I download seems to be a file meant for UNIX and I 
 am using a Window
  OS. How could I download and install correctly this file?
 
 although i am not using R for windows, but there are binaries for
 windows available for multiv at:
 http://www.stat.math.ethz.ch/CRAN/bin/windows/contrib/multiv.zip
 
 you may want to read the documentation about how to install 
 pakages from 
 http://stat.ethz.ch/CRAN/doc/manuals/R-admin.pdf (chapter 5).
 
 depending on where you are physically, you may want to select another
 cran mirror for a list of mirrors see:
 http://cran.r-project.org/mirrors.html
 
 hth, peter
 
 -- 
 Peter von Rohr   http://www.inf.ethz.ch/~vonrohr
 Institute of Scientific Computing[EMAIL PROTECTED]
 ETH-Zentrum, HRS H23   phone: +41 1 632 7473 
 CH - 8092 Zurich fax: +41 1 632 1374
 
 __
 [EMAIL PROTECTED] mailing list
 http://www.stat.math.ethz.ch/mailman/listinfo/r-help
 


LEGAL NOTICE\ Unless expressly stated otherwise, this message is ... [[dropped]]

__
[EMAIL PROTECTED] mailing list
http://www.stat.math.ethz.ch/mailman/listinfo/r-help



RE: Take care with codes()! (was [R] type of representation)

2003-01-03 Thread Warnes, Gregory R
Ahh yes, sorry about that.

Here's the corrected snippet:

# Create an Example Data Frame Containing Car x Color data
carnames - c(bmw,renault,mercedes,seat)
carcolors - c(red,white,silver,green)
datavals - round(rnorm(16, mean=10, sd=4),1)
data - data.frame(Car=rep(carnames,4),
   Color=rep(carcolors, c(4,4,4,4) ),
   Value=datavals )
# show the data
data

# plot the Car x Color combinations, using 'cex' to specify the dot size
plot(x=as.numeric(data$Car), # as.numeric give numeric values
 y=as.numeric(data$Color), 
 cex=data$Value/max(data$Value)*12,  # standardize size to (0,12)
 pch=19,  # filled circle
 col=skyblue, # dot color
 xlab=Car, # x axis label
 ylab=Color, # y axis label
 xaxt=n, # no x axis lables
 yaxt=n, # no y axis lables
 bty=n,  # no box around the plot
 xlim=c(0,nlevels(data$Car  )+0.5), # extra space on either end of plot
 ylim=c(0.5,nlevels(data$Color)+1.5)  # so dots don't cross into margins
 )

# add text labels
text(x=1:nlevels(data$Car), y=nlevels(data$Car)+1, labels=levels(data$Car))
text(x=0, y=1:nlevels(data$Color), labels=levels(data$Color) )

# add borders between cells
abline(v=(0:nlevels(data$Car)+0.5))
abline(h=(0:nlevels(data$Color)+0.5))

# annotate with actual values
text(x=as.numeric(data$Car), # as.numeric give numeric values
 y=as.numeric(data$Color), 
 labels=format(data$Value),   # label value
 col=black, # textt color
 )

# put a nice title
title(main=Car by Color Popularity\n(Dot size proportional to popularity))


-Greg

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, January 03, 2003 1:53 PM
 To: Warnes, Gregory R
 Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
 Subject: RE: Take care with codes()! (was [R] type of representation)
 
 
 From the help page of codes():
 
  Normally `codes' is not the appropriate function to use with an
  unordered factor.  Use `unclass' or `as.numeric' to extract the
  codes used in the internal representation of the factor, as these
  do not assume that the codes are sorted.
 
 and this is one of the `normally' cases.  Your code will only work
 correctly if the levels are in alphabetical order (in the 
 locale in use).
 
 On Fri, 3 Jan 2003, Warnes, Gregory R wrote:
 
  How about this snippet:
 
  # Create an Example Data Frame Containing Car x Color data
  carnames - c(bmw,renault,mercedes,seat)
  carcolors - c(red,white,silver,green)
  datavals - round(rnorm(16, mean=10, sd=4),1)
  data - data.frame(Car=rep(carnames,4),
 Color=rep(carcolors, c(4,4,4,4) ),
 Value=datavals )
  # show the data
  data
 
  # plot the Car x Color combinations, using 'cex' to specify 
 the dot size
  plot(x=codes(data$Car), # codes give numeric values
   y=codes(data$Color),
   cex=data$Value/max(data$Value)*12,  # standardize size 
 to (0,12)
   pch=19,  # filled circle
   col=skyblue, # dot color
   xlab=Car, # x axis label
   ylab=Color, # y axis label
   xaxt=n, # no x axis lables
   yaxt=n, # no y axis lables
   bty=n,  # no box around the plot
   xlim=c(0,nlevels(data$Car  )+0.5), # extra space on 
 either end of plot
   ylim=c(0.5,nlevels(data$Color)+1.5)  # so dots don't 
 cross into margins
   )
 
  # add text labels
  text(x=1:nlevels(data$Car), y=nlevels(data$Car)+1, 
 labels=levels(data$Car))
  text(x=0, y=1:nlevels(data$Color), labels=levels(data$Color) )
 
  # add borders between cells
  abline(v=(0:nlevels(data$Car)+0.5))
  abline(h=(0:nlevels(data$Color)+0.5))
 
  # annotate with actual values
  text(x=codes(data$Car), # codes give numeric values
   y=codes(data$Color),
   labels=format(data$Value),   # label value
   col=black, # textt color
   )
 
  # put a nice title
  title(main=Car by Color Popularity\n(Dot size proportional 
 to popularity))
 
 
  -Greg
 
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Friday, January 03, 2003 4:46 AM
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Subject: [R] type of representation
  
  
   Hi
  
   I have some data that i want to plot but i don't find how to
   do it. I have car
   types (bmw,renault,mercedes,seat ...), colors and a number
   for each car
   type-color relation.I want to come up with a matrix
   representation of cars vs
   colors where in each intersection i could set a dot
   proportional in size to my
   third variable.
  
  
   Can anybody give me a clue of hoe to come up with such 
 representation.
  
   Thanks
  
   Ramon
  
   __
   [EMAIL PROTECTED] mailing list
   http://www.stat.math.ethz.ch/mailman/listinfo/r-help
  
 
 
  LEGAL NOTICE\ Unless expressly stated otherwise, this 
 message is ... [[dropped]]
 
  __
  [EMAIL PROTECTED] mailing list