Re: [R] Flow Cytometry Standard, fcs format in R.

2007-07-13 Thread Robert Gentleman
there is rflowcyt (older and on its way out) and flowCore, which 
contains a newer tool set
available at
www.bioconductor.org


Horacio Castellini wrote:
 Hi all.
 How do I extract date from fcs format file with R. I.e I'd like
 make statistical analysis using R-program, but I don't know if there
 are R-packets for fcs format file, and using examples.
 
 Thanks.
 
 Pta: In Linux SO exist any program that transform from fcs format to
 ASCII text file?
 
 __
 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
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Vignettes menu

2007-05-09 Thread Robert Gentleman
Hi,
   I don't think that advice given was quite correct. The addition of 
the menu is not a misfeature of Bioconductor packages, but rather an 
intentional act, I appreciate points of view differ, but there are times 
when you might choose slightly less pejorative language.

As for the question, it seems to me to be entirely an R question, if 
someone wants to know how to remove a menu item from the windows 
version, that seems to be a pretty general question about manipulating 
R, and has nothing to do with any specific package.

Robert

Prof Brian Ripley wrote:
 Please ask questions about Bioconductor packages of the maintainer or or 
 the Bioconductor list.  This is not a (mis-)feature of R, and does not 
 happen with most packages.
 
 On Wed, 9 May 2007, Alejandro wrote:
 
 Hello,
 when i try to load a library with library command (for example
 library(Biobase)) a new menu appears on R command console (Vignettes)
 with links to the help documents.
 Is it possible to eliminate this menu or avoid the appearance of this menu?

 Thanks in advance,
 Alejandro
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Gentleman and Ihaka , 2000 paper question

2007-04-18 Thread Robert Gentleman
not sure just what you want, but here are some snippets

newton -
   function(lfun, est, tol = 1e-7, niter = 500) {
 cscore - lfun$score(est)
 if (abs(cscore)  tol)
   return(est)
 for (i in 1:niter) {
   new - est - cscore / lfun$d2(est)
   cscore - lfun$score(new)
   if (abs(cscore)  tol)
 return(new)
   est - new
 }
 stop(exceeded allowed number of iterations)
   }

with the likelihood function

Rmklike -
   function(data) {
 n - length(data)
 sumx - sum(data)
 lfun - function(mu) n * log(mu) - mu * sumx
 score - function(mu) n / mu - sumx
 d2 - function(mu) -n / mu^2
 list(lfun = lfun, score = score, d2 = d2)
   }


Leeds, Mark (IED) wrote:
 In their paper, Lexical Scope and Statistical Computing, the authors (
 Gentleman and Ihaka ) go to great length explaining why R's use of
 lexical scoping creates advantages when doing statistical computations.
 
 If anyone has or is familiar with this paper, could they provide the
 main program code for how the newton function would be called in their
 example on page 500 of the paper.  The authors are extremely clear in
 their writing and the paper is quite an eye opener for me but it seems
 like lfun somehow needs to be initialized so that it grabs the
 environment of Rmklike. 

   Rmlike is called to create the likelihood function, and since that 
function is defined in the body of Rmlike, it has the evaluation 
environment by default. And any return value will have the correct 
environment.

 I'm not sure how one would go about doing this so I am wondering what
 the main program that calls newton would be
 if there was one. Thanks.
 

So,

   data=rexp(10, rate=.3)
   lf = Rmklike(data)
   newton(lf, .1)


seems to do the trick (and surprisingly still works, as written some 
unbelievably long time ago)

  Robert

 
   
 Mark
 
 
 This is not an offer (or solicitation of an offer) to buy/se...{{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
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problems with 'delay'/'delayedAssign' when installing data package

2007-02-15 Thread Robert Gentleman
Or you could check and see that this is several versions of Bioconductor 
in the past and rather than using the well documented and advertised 
method for obtaining data that are consistent with your version of R you 
have chosen to completely circumvent that procedure and loaded a package
for some obsolete version of R.

So, if you have newer R there are newer versions of this data from 
Bioconductor,
   http://bioconductor.org/packages/1.9/data/annotation/html/hgu95av2.html

shows that for a current R, we are at version 1.14.0 for this package.



Duncan Murdoch wrote:
 On 2/15/2007 3:57 AM, Wolfram Fischer wrote:
 I downloaded:
 http://www.bioconductor.org/data/metaData/hgu95av2_1.7.0.tar.gz
 described as:
 Package: hgu95av2 
 Title: A data package containing annotation data for hgu95av2 
 Version: 1.7.0 
 Created: Wed Jan 12 16:57:23 2005 
 Author: Lin,Chenwei 
 Description: Annotation data file for hgu95av2 assembled using data
from public data repositories 
Maintainer: Lin,Chenwei  [EMAIL PROTECTED]  
LazyLoad: yes 
Depends: R(= 2.0.0) 
License: LGPL 
Packaged: Thu Mar  3 15:43:00 2005; biocbuild

 It is an example database of the geneplotter library.

 Trying to install, I got:
  $ R CMD INSTALL hgu95av2_1.7.0.tar.gz 

  * Installing *source* package 'hgu95av2' ...
  ** R
  ** data
  ** preparing package for lazy loading
  Error: 'delay' is defunct.
  Use 'delayedAssign' instead.
  See help(Defunct)
  Execution halted
  ERROR: lazy loading failed for package 'hgu95av2'
  ** Removing '/usr/local/lib64/R-2.4.1/library/hgu95av2'

 How to by-pass this problem?
 
 There are two possibilities:  update the package to follow current R 
 usage (which is something the maintainer should do, but if the 
 maintainer is not active you may have to do it yourself), or run in an 
 old version of R (pre-2.2.0) from before delay() was made defunct.
 
 You may also use this as a sign that the package is not being actively 
 maintained, since this change happened in R 2.2.0 in 2005.  I don't know 
 if that's reasonable for a collection of annotation data or not.
 
 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
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Correlation to a Single Gene

2007-01-17 Thread Robert Gentleman
In the package genefilter, from www.bioconductor.org there is a function 
to do this (genefinder, if I recall correctly)
best wishes
  Robert


Charles C. Berry wrote:
 On Wed, 17 Jan 2007, Damion Colin Nero wrote:
 
 I am trying to find a way to perform pairwise correlations against one
 gene in a matrix rather than computing every pairwise correlation.  I am
 interested in how 1 transcription factor correlates to every gene in a
 matrix of 55 experiments (columns) by 23,000 genes (rows), performing
 the correlation by rows.  Trying to perform every pairwise correlation
 in this fashion is too memory intensive for any computer I am currently
 using so I am wondering if anyone had a method for doing pairwise
 correlations to a single gene or if there is a preexisting package in R
 that might address this.
 
 
 You measure the transcription factor once in each of 55 experiments and 
 you measure gene *expression* (or some other quantity) on each of 23000 
 genes?
 
   cor.vec - cor (transfac, t( gene.mat ) )
 
 will do.
 
 Questions like this might best be posted to the bioconductor mail list.
 
 
 Damion Nero
 Plant Molecular Biology Lab
 Department of Biology
 New York University

 __
 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
 and provide commented, minimal, self-contained, reproducible code.

 
 Charles C. Berry(858) 534-2098
   Dept of Family/Preventive Medicine
 E mailto:[EMAIL PROTECTED] UC San Diego
 http://biostat.ucsd.edu/~cberry/ La Jolla, San Diego 92093-0901
 
 __
 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
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] problem installing RdbiPgSQL for 2.4

2006-10-03 Thread Robert Gentleman


Oleg Bartunov wrote:
 I just upgraded R to version 2.4.0 and now I can't install packages
 RdbiPgSQL. I used the same procedure I did for previous versions of R !
 Actually, last time I installed RdbiPgSQL day before upgrading
 but now I got:
 
 downloaded 27Kb
 
 * Installing *source* package 'RdbiPgSQL' ...
 creating cache ./config.cache
 checking for PQconnectdb in -lpq... no
 
 I could not find your PostgreSQL client libraries!

Well it looks like you might have done more than that since the error is 
saying that the package cannot find your postgres client libraries and 
note in the text right below this are some suggestions on how to specify 
non-standard locations.

I have tried on two systems with postgres in its standard location and 
observed no such problem.


 Use --with-pgsql-libraries=PATH; if running R's INSTALL,
 use --configure-args='--with-pgsql-libraries=PATH'; or
 set PG_LIB_DIR in your environment to the library path,
 and rerun the configure/install.
 
 ERROR: configuration failed for package 'RdbiPgSQL'
 ** Removing '/usr/local/lib/R/library/RdbiPgSQL'
 
 The downloaded packages are in
  /tmp/RtmpA3Mdb4/downloaded_packages
 Warning message:
 installation of package 'RdbiPgSQL' had non-zero exit status in: 
 install.packages(RdbiPgSQL, repos = rS, configure.args = c(PGSQL = 
 --with-pgsql-libraries=/usr/local/pgsql/lib 
 --with-pgsql-includes=/usr/local/pgsql/include))
 
 Looks like install.packages doesn't pass configure.args to the package.
 
   Regards,
   Oleg
 _
 Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
 Sternberg Astronomical Institute, Moscow University, Russia
 Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
 phone: +007(495)939-16-83, +007(495)939-23-83
 
 __
 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
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Reserve and biobase

2006-09-05 Thread Robert Gentleman
You should ask questions about Bioconductor software on the Bioconductor 
list, you might also read the posting guide and provide version numbers 
for all packages you are using (the output of sessionInfo is useful).

Biobase does not do any plotting, so where ever the action is coming 
from it is unlikely to be Biobase that is doing it. I don't use Rserve 
so I cannot comment on how that might interact with other software. I 
have no idea what you are trying to do, but somehow you seem to be doing 
a lot more than just loading Biobase - so why not try just doing that 
and leave out all the other code opening devices (and why open two 
postscript devices and then close them?).

Robert


saeedeh maleki wrote:
 Hi 

   I am using Rserve for R2.3.1.
   every time after I load Biobase library, a new Graphics window  frame pops 
 up. Could any onw know how can avoid it.

   Best
   Saeede 

   class testReserve {
 public static void main(String[] args) {
 RServeConnection rsCon = null;
 Rconnection c = null;
 Process proc = null;
   try {
   Runtime rt = Runtime.getRuntime();
   proc = rt.exec(generalMetaData.rserveDir);
   try {
 c = new Rconnection();
 c.eval(library(grDevices));
 //c.eval(graphics.off());
 c.eval(postscript());
 //load library
 c.eval(library(tools));
 System.out.println( load library tools);
 c.eval( postscript('foo2.ps'));
 c.eval( library(Biobase));
 c.eval(graphics.off());
 System.out.println( load library Biobase);

 }
   catch (RSrvException ex1) {
 System.out.println(ex1.getMessage());
   }
   }
 catch (Exception e) {
   System.out.print(cannot run rserve);
 }
 //end of testing
 }
 }

 
   
 -
 
   [[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
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Bug/problem reporting: Possible to modify posting guide FAQ?

2006-08-28 Thread Robert Gentleman
Hi,
   I guess the question often comes down to whether it is a bug report, 
or a question. If you know it is a bug, and have a complete and correct 
example where the obviously incorrect behavior occurs and you are 
positive that the problem is the package then sending it to the 
maintainer is appropriate.  When I get these I try to deal with them. 
Real bug reports that go to the mailing list may be missed so in my 
opinion it would be best to cc the maintainer and we will amend the FAQ 
in that direction. If instead you are asking a question, of the form, is 
this a bug, or why is this happening, then for BioC at least, it is 
better to post directly to the list, as there are many folks who can 
help and you are more likely to get an answer.  When I get one of these 
emails I always refer the person to the mailing lists.  I see little 
problem with being redirected by a maintainer to the mailing list if 
they feel that the question is better asked there.

Bioconductor is different from R, clearly our mailing list has to be 
more about the constituent packages, since we will direct questions 
about R to the appropriate R mailing lists.  R mailing lists tend to be 
about R, so asking about a specific package there (among the 1000 or so) 
often does not get you very far, but sometimes it does.


  best wishes
Robert


Steven McKinney wrote:
 If users post a bug or problem issue to an R-based news group
 (R-devel, R-help, BioC - though BioC is far more forgiving)
 they get yelled at for not reading the posting guide
 and FAQ.
 
 Please *_do_* read the FAQ, the posting guide, ...
 the yellers do say.  So I read the BioC FAQ and it says...
 
 http://www.bioconductor.org/docs/faq/
 
 Bug reports on packages should perhaps be sent to the 
  package maintainer rather than to r-bugs.
 
 
 So I send email to a maintainer, who I believe rightly points out
 
best to send this kind of questions to the bioc mailing list, rather
 than to myself privately, because other people might (a) also have
 answers or (b) benefit from the questions  answers.
 
 Could the FAQ possibly be revised to some sensible combination
 that generates less finger pointing, such as
 
Bug reports on packages should be sent to the Bioconductor mailing list, 
 and sent or copied to the package maintainer, rather than to r-bugs.
 
 or
 
Bug reports on packages should be sent to the package maintainer, 
 and copied to the Bioconductor mailing list, rather than to r-bugs.
 
 
 Could the posting guides to R-help and R-devel do something
 similar?
 
 
 Sign me
 Tired of all the finger pointing
 
 
 http://www.r-project.org/posting-guide.html
 
  If the question relates to a contributed package , e.g., one downloaded 
   from CRAN, try contacting the package maintainer first. You can also 
   use find(functionname) and packageDescription(packagename) to 
   find this information. Only send such questions to R-help or R-devel if 
   you get no reply or need further assistance. This applies to both 
   requests for help and to bug reports.
 
 
 How about
 
 If the question relates to a contributed package , e.g., one downloaded 
 from CRAN, email the list and be sure to additionally send to or copy to 
 the package maintainer as well. You can use find(functionname) 
 and packageDescription(packagename) to find this information. 
 Only send such questions to one of R-help or R-devel. This applies to both 
 requests for help and to bug reports.
 
 __
 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
 and provide commented, minimal, self-contained, reproducible code.
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Clique technique-Package

2006-08-21 Thread Robert Gentleman
the graph, RBGL and Rgraphviz packages at www.bioconductor.org have a 
fairly substantial implementation of many different graph 
representations, algorithms (including clique finding) and layout
algorithms


j.joshua thomas wrote:
 Dear R Users,
 
  I am looking clique a graph technique, to identify the values from the
dataset.
I tried with help.search(graph) it show's the graphics related stuff
Is there any package that i can use to find Clique in a dataset?
Thanks in Advance
  JJ
 
 
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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
and provide commented, minimal, self-contained, reproducible code.


Re: [R] deal with R.package panel

2006-06-09 Thread Robert Gentleman
Hi,
  There should be a 20 page pdf document in the doc directory, 
distributed with the package. That answers most of these questions.

  Also, please read the posting guide so that you give enough 
information to actually have some chance of answering your questions,

  best wishes
   Robert

Pavel Khomski wrote:
 hello!
 
 my question conserns with use of panel package (written by R.C.Gentlman)
 (unfortunately the manual and help sites are very short)
 
 1. is it possible to do analysis  just without a(ny) covariate? i 
 suggest do it by introducing a covariate with level=0 in all 
 obervations, this because of Q(z)=Q_o exp(beta*z),  but it seemingly 
 doesn't work

  meaning what?
 
 2. in the option gamma in the call of panel function: do you mean an 
 initial value for parameter vector gamma?
 say if i have 3 theta-parameters, so i have to initialize 
 gamma=c(xxx,xxx,xxx), correct?

yes
 
 3. are the (first ) observed times =0 allowed (in $time vectors) or 
 schould in such a case begin with =1, if there are any?

  I suspect 0, but since you have said nothing about what you are 
actually trying to do, it is entirely a guess on my part

  best wishes
Robert

 
 
 thanks for your response
 
 
 
 
 __
 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

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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


Re: [R] deal with R.package panel

2006-06-09 Thread Robert Gentleman

I just realized that the pdf on CRAN is corrupt, a new package has been 
uploaded and will percolate through over the next few days, one supposes.

Robert Gentleman wrote:
 Hi,
   There should be a 20 page pdf document in the doc directory, 
 distributed with the package. That answers most of these questions.
 
   Also, please read the posting guide so that you give enough 
 information to actually have some chance of answering your questions,
 
   best wishes
Robert
 
 Pavel Khomski wrote:
 hello!

 my question conserns with use of panel package (written by R.C.Gentlman)
 (unfortunately the manual and help sites are very short)

 1. is it possible to do analysis  just without a(ny) covariate? i 
 suggest do it by introducing a covariate with level=0 in all 
 obervations, this because of Q(z)=Q_o exp(beta*z),  but it seemingly 
 doesn't work
 
   meaning what?
 2. in the option gamma in the call of panel function: do you mean an 
 initial value for parameter vector gamma?
 say if i have 3 theta-parameters, so i have to initialize 
 gamma=c(xxx,xxx,xxx), correct?
 
 yes
 3. are the (first ) observed times =0 allowed (in $time vectors) or 
 schould in such a case begin with =1, if there are any?
 
   I suspect 0, but since you have said nothing about what you are 
 actually trying to do, it is entirely a guess on my part
 
   best wishes
 Robert
 

 thanks for your response


 

 __
 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
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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


Re: [R] Weighted networks and multigraphs

2006-03-01 Thread Robert Gentleman
Hi,
  Some implementations are available in the packages graph and RBGL from 
Bioconductor (www.bioconductor.org). I think you will find that they do 
what you would like, but let the maintainers know if not.

  best wishes
Robert




Wilson, Andrew wrote:
 I would like to apply network measures (such as betweenness centrality,
 upper boundedness, etc.) to a weighted graph with non-integer weights,
 defined by a euclidean distance matrix.  The package sna provides the
 measures that I want to use, but seems only to operate on binary graphs.
 I have read work by Mark Newman
 (http://aps.arxiv.org/abs/cond-mat/0407503/), who suggests that a
 weighted graph can be transformed into an unweighted multigraph, to
 which such measures can be applied.  It seems that the package giRaph
 contains a function to handle multigraphs, but there is no example in
 the manual to show how it is used.  I am also not sure whether this
 multigraph structure can be used as input into the relevant functions in
 the sna package.  Can anyone advise?
 
 Many thanks,
 Andrew Wilson
 
 __
 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
 

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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


Re: [R] is library loaded

2005-09-13 Thread Robert Gentleman
Hi,

  Almost surely this is a bad name. With the advent of name spaces it is 
important to distinguish between loading and attaching. This function 
tests for attached packages. To test for loaded packages we already have
  loadedNamespaces.

  Best wishes,
Robert

John Fox wrote:
 Dear Omar,
 
 The following function tests whether a package is in the search path (with
 the package name given in quotes):
 
 packageLoaded - function(name) 0 != length(grep(paste(^package:, name,
 $, sep=), search()))
 
 I hope this helps,
  John
 
 
 John Fox
 Department of Sociology
 McMaster University
 Hamilton, Ontario
 Canada L8S 4M4
 905-525-9140x23604
 http://socserv.mcmaster.ca/jfox 
  
 
 
-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Omar Lakkis
Sent: Tuesday, September 13, 2005 2:09 PM
To: r-help@stat.math.ethz.ch
Subject: [R] is library loaded

Is there a way to test if a library has been loaded?

is.loaded does not give me what I want, I am looking to say:

if loaded(Rdbi) dbSendQuery(conn, q)
if loaded(RODBC) sqlQuery(conn, q)

I need this to support both unix and windows platforms as I 
could not find a windows distribution for RdbiPgSQL. I am 
using R 2.1.0 and postgresql. I will be connecting to the 
database using Rdbi and RdbiPgSQL and have other developers 
using windows connect with RODBC, unless someone can suggest 
a better solution.

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

-- 
Robert Gentleman, PhD
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
PO Box 19024
Seattle, Washington 98109-1024
206-667-7700
[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


Re: [R] Drawing a graph with vertices and edges using tcl/tk

2005-07-31 Thread Robert Gentleman
Rgraphviz is a fairly complete interface that works on all systems now, 
including Windows.
http://www.bioconductor.org/packages/bioc/devel/src/contrib/html/Rgraphviz.html

but not the absolute latest Graphviz (2.4) as it has gone through pretty 
extensive code rearrangements. We should have a version for Graphviz 2.4 
in the next few weeks.

Robert

Gabor Grothendieck wrote:
 Another approach is the Bell Labs graphviz system.  See
 
http://www.graphviz.com 
 
 For an example of using it from R, see the dot.proto function
 in the 'proto' package.  dot.proto generates dot language output 
 to draw a graphviz graph of the objects in any R program written 
 using 'proto'.
 
library(proto)
example(dot.proto)  
# see ?dot.proto for instructions on displaying graph
 
 The above approach should work on any OS supported by R
 (since graphviz works on all of them); however, on UNIX one
 could also use the Rgraphviz package that specifically
 interfaces R with graphviz:
 
   
 http://www.bioconductor.org/repository/release1.4/package/html/Rgraphviz.html
 
 
 On 7/31/05, Søren Højsgaard [EMAIL PROTECTED] wrote:
 
Dear all; I would like to draw a graph with vertices and edges, and I guess 
tcl/tk would be appropriate. I don't know tcl/tk but have googled for a 
10-page (or so) introduction to 'getting started with tcl/tk in R' but 
without any luck.
- Does anyone know of the existence of such a document or any other web-based 
material on the subject?
- Does anyone have an (informative) piece of code which does something 
similar to what I want?
Thanks in advance
Søren

__
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-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-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] Re: S4 method inheritance

2005-05-24 Thread Robert Gentleman



Duncan Murdoch wrote:

Ross Boylan wrote:


On Mon, 2005-05-23 at 14:41 -0700, Ross Boylan wrote:




Finally, I'm a bit concerned that one article mentioned that S4
inheritance, in practice, is used mostly for data, not methods (Thomas
Lumley, R News 4(1), June 2004: p. 36).  Am I going down a road I
shouldn't travel?



Hmm, maybe I just found out.  If B is an S4 subclass of A (aka extends
A), how does B's method foo invoke A's foo?



Your question doesn't make sense in S4.  In S4, classes don't have 
methods, generics have methods.  There's no such thing as B's method 
or A's method.


You might get what you want with foo(as(bObject, A)) if bObject is an 
instance of class B.



The question assumes that A's foo was defined as an in place function,
so there's no (obvious) named object for it, i.e,
setMethod(A, signature(blah=numeric), function(x) something)




In general it may be best to think of a generic function as a 
dispatching mechanism. For S4 methods are associated with a specific 
generic function. A generic knows about all methods that are associated 
with it, and about no others. Thus in S4, the little tiff over who owns 
label goes away - they both do - different packages can define generic 
functions for label, or anything else they care to, and users can write 
methods for specific generic functions and associate them with a 
generic. [Note that in the S3 system there is no real mechanism for 
saying that foo.bar is a method for one generic named foo, and not for 
another - but the language does allow for multiple generics named foo - 
one of the very many reasons that S3 does not really do what you want it 
to, but many seem convinced otherwise].


The class hierarchy of the actual supplied arguments, is used to 
determine the dispatch order (a linearization of the available methods) 
once the generic is invoked. The most specific method is used first. It 
may intiate a call to callNextMethod (S4) or NextMethod (S3) to transfer 
control to the next most specific method - the manual pages provide more 
specific details.


As Duncan said - classes do not own methods in this paradigm. Generic 
functions do.


 HTH
   Robert



I don't know what you mean by in place function, but I hope my answer 
helps anyway.


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




__
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] Re: S4 method inheritance

2005-05-24 Thread Robert Gentleman



Ross Boylan wrote:

On Tue, May 24, 2005 at 06:27:56AM -0700, Robert Gentleman wrote:



Duncan Murdoch wrote:


Ross Boylan wrote:



On Mon, 2005-05-23 at 14:41 -0700, Ross Boylan wrote:





Finally, I'm a bit concerned that one article mentioned that S4
inheritance, in practice, is used mostly for data, not methods (Thomas
Lumley, R News 4(1), June 2004: p. 36).  Am I going down a road I
shouldn't travel?



Hmm, maybe I just found out.  If B is an S4 subclass of A (aka extends
A), how does B's method foo invoke A's foo?



Your question doesn't make sense in S4.  In S4, classes don't have 
methods, generics have methods.  There's no such thing as B's method 
or A's method.


You might get what you want with foo(as(bObject, A)) if bObject is an 
instance of class B.




The question assumes that A's foo was defined as an in place function,
so there's no (obvious) named object for it, i.e,
setMethod(A, signature(blah=numeric), function(x) something)


In general it may be best to think of a generic function as a 
dispatching mechanism. For S4 methods are associated with a specific 
generic function. 


specific generic is a reference to the ability to define generics
 within the context of a particular package?



Well, more that you can identify one (either explicitly by its package 
[ie. fully-qualified name], or implicitly by the fact that it is first 
on the search path - the former being prefered). But the notion is that 
there is one and you have asked that your method be made available to 
that one generic function for dispatch. This is in contrast to S3 - 
where no such functionality exists - that I know of; under S3 any method 
is a method for all generic functions of the correct name and the 
programmer has no (easy) control. Under S4 methods are not really 
ordinary functions, should not be called directly and are invoked only 
via calls to the generic (you can of course break all of those rules).




A generic knows about all methods that are associated 
with it, and about no others. 


Presumably setMethod does the association.  Is the where argument
intended to identify which generic method to pick?  The fact that
there is not a package argument to setMethod, as there is to
setGeneric, is a little confusing to me.




 I believe that is the documented behavior. Yes the where argument 
should allow you complete specificity. I will leave it to the auther to 
clarify differences between the where and package arguments in the call 
to setGeneric (or you, if you care to explore the code).


Thus in S4, the little tiff over who owns 
label goes away - they both do - different packages can define
generic 


They is two different packages?  Or is this a reference to my
original confusion about class vs generic ownership of a method?



 It is the two packages. The S langauge allows for the same symbol to 
be bound to different values in different namespaces (in R that is 
becoming explicit, in SPlus it is less so, but still generally true). I 
can think of no good reason to treat generic functions, or any other 
first class object, differently.


HTH,
 Robert



functions for label, or anything else they care to, and users can write 
methods for specific generic

 functions and associate them with a

generic.


...


HTH
  Robert





__
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] string syntactic sugar in R? - long post

2005-05-07 Thread Robert Gentleman
Hi,
 In Bioconductor, we have something called copySubstitute, which does  
what you want, I believe,

 x=select @var1@ from @tab1@
 copySubstitute(textConnection(x), symbolValues= list(var1=Race,  
tab1=ReallyBigTable), dest=stdout())

yields
select Race from ReallyBigTable
you can read in from any connection and write out to any connection,  
change the delimiter, etc.
We use it to autogenerate manual pages and other documentation for  
packages that have lots of similar structure, as well as for things  
like what you want to do.

Best wishes,
 Robert

On May 7, 2005, at 1:36 AM, charles loboz wrote:
Currently in R, constructing a string containing
values of variables is done using 'paste' and can be
an error-prone and traumatic experience. For example,
when constructing a db query we have to write,
  paste(SELECT  value  FROM table  where
date =',cdate,')
we are getting null result from it, because without
(forgotten...) sep=  we get
 SELECT value FROM table where date='
2005-05-05 '
instead of
SELECT value FROM table where date='2005-05-05'
Adding sep= as a habit results in other errors, like
column names joined with keywords - because of
forgotten spaces. Not to mention mixing up or
unbalancing quote marks etc. The approach used by
paste is similar to that of many other languages (like
early Java, VB etc) and is inherently error-prone
because of poor visualization. There is a way to
improve it.
In the Java world gstrings were introduced
specifically for this purpose. A gstring is a string
with variable names embedded and replaced by values
(converted to strings, lazy eval) before use. An
example in R-syntax would be:
alpha - 8; beta=xyz
gstr - the result is ${alpha} with the comment
${beta}
cat(gstr)
  the result is 8 with the comment xyz
This syntactic sugar reduces significantly the number
of mistakes made with normal string concatenations.
Gstrings are used in ant and groovy - (for details see
http://groovy.codehaus.org/Strings, jump to GStrings).
They are particularly useful for creating readable and
error-free SQL statements, but obviously the simplify
'normal' string+value handling in all situations. [ps:
gstrings are not nestable]
I was wondering how difficult it would be to add such
syntactic sugar to R and would that create some
language problems? May be it is possible that it could
be done as some gpaste function, parsing the argument
for ${var}, extracting variables from the environment,
evaluating them and producing the final string?
I admit my bias - using ant for years and groovy for
months and having to do a lot of SQL queries does not
put me in the mainstream of R users - so it may be
that this idea is not usable to a wider group of
users.
__
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


+--- 
+
| Robert Gentleman  phone: (206) 667-7700
 |
| Head, Program in Computational Biology   fax:  (206) 667-1319   |
| Division of Public Health Sciences   office: M2-B865   
  |
| Fred Hutchinson Cancer Research Center 
 |
| email: [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


Re: [R] Windows List of Folders?

2005-04-30 Thread Robert Gentleman
Hi,
 We have some documentation of the file handling capabilities, among  
other things, at
 http://www.bioconductor.org/develPage/develPage.html

comments, improvements etc welcome.
Best wishes,
   Robert
On Apr 29, 2005, at 4:01 PM, Henrik Bengtsson wrote:
Example:
path - system.file(package=base)
pathnames - list.files(path, full.names=TRUE)
isDir - file.info(pathnames)$isdir
dirs - pathnames[isDir]
files - pathnames[!isDir]
If you don't get the 'isDir' line, think of it as
infos - file.info(pathnames)
isDir - infos$isdir
/Henrik
[EMAIL PROTECTED] wrote:
For windows, how can I list only the folders in some folder?
I was thinking that dir() and file.info() with isdir==TRUE being  
something
that might work.
These folders or directories are numerically named with no dot  
extension
names or other characters.  Typically, these are 3132, 3334, ...
Here is what I tried.  The last line is where I need more work.
pData=C:/Myfiles/R/Data/
setwd (pData)
x - dir(pData, all.files=F)
y - file.info(x, x$isdir==T)
TIA
Kenneth Ray Hobson, P.E.
Oklahoma DOT - QA  IAS Manager
200 N.E. 21st Street
Oklahoma City, OK  73105-3204
__
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-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


+--- 
+
| Robert Gentleman  phone: (206) 667-7700
 |
| Head, Program in Computational Biology   fax:  (206) 667-1319   |
| Division of Public Health Sciences   office: M2-B865   
  |
| Fred Hutchinson Cancer Research Center 
 |
| email: [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


Re: [R] interval censoring case 1 or current status data

2005-04-27 Thread Robert Gentleman
Yes, the Icens package handles all forms of censored data (1-dim)
On Apr 27, 2005, at 11:59 AM, Chao Zhu wrote:
Dear all,
Is there a function in R dealing with the NPMLE for current status  
data or interval censored case 1 data?

Thanks,
Jimmy
[[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


+--- 
+
| Robert Gentleman  phone: (206) 667-7700
 |
| Head, Program in Computational Biology   fax:  (206) 667-1319   |
| Division of Public Health Sciences   office: M2-B865   
  |
| Fred Hutchinson Cancer Research Center 
 |
| email: [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


Re: [R] Developing R classes

2004-12-28 Thread Robert Gentleman
And some notes on the Bioconductor developer page.
On Dec 28, 2004, at 9:38 AM, Thomas Lumley wrote:
On Tue, 28 Dec 2004, Gilvan Justino wrote:
Hi,
I´m trying to write some R classes but I din´t find documentation  
enought to develop them. I read there is 2 ways to write classes,  
using S3 ou S4 models. And it seems that S4 is the best model, so I  
thing I should use this one.
There's a small example in the R Newsletter, Volume 1, 2004.
	-thomas__
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
+--- 
+
| Robert Gentleman  phone: (206) 667-7700
 |
| Head, Program in Computational Biology   fax:  (206) 667-1319   |
| Division of Public Health Sciences   office: M2-B865   
  |
| Fred Hutchinson Cancer Research Center 
 |
| email: [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


Re: [R] How about a mascot for R?

2004-12-07 Thread Robert Gentleman
On Dec 6, 2004, at 3:15 PM, Richard A. O'Keefe wrote:
Thomas Yee [EMAIL PROTECTED] wrote:
ps. Ross has Maori origins, so a native NZ animal is a better idea
than usual.
The native animals of New Zealand include no mammals except for
- marine mammals in the coastal waters, such as the Hector's dolphin
- a few species of bat which got blown over from Australia.
Otherwise, there are birds, reptiles, insects, and a few oddballs.
The most notable oddballs would be Tuataras, famous for their third  
eye.
We have some onychophorans, of which it has been said that
Contemporary Onychophorans are able to predate organisms several times
larger than themselves (take _that_, SAS!)
Wetas are quite interesting; they are basically grasshoppers some of  
which
played the ecological role of (and are about the same size as) mice.

Hi,
  We had a brief discussion and narrowed it to two, coincidentally  
among those named by Richard. The tuatara (there is some charm in  
associating a software product with what is essentially a slow moving  
dinosaur) and the weta (for those unaware, one might also describe it  
as a grasshopper designed by the Pentagon - these have some serious  
armor plating and a ferocious grip). Of course this is one of many  
views, kiwis, kokakos etc have lots of charm as well - and I think New  
Zealand might lay some claim to the giant squid. No need to stick with  
non-extinct things either - I suspect the dodo is up for grabs. And on  
the NZ front the Moa or the Haast eagle.

Ross and Robert
I suspect that only birds have the cuddly appeal required of a  
mascot.
Perhaps it's worth pointing out that Kiwis are a kind of Ratite.

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


+--- 
+
| Robert Gentleman  phone: (206) 667-7700|
| Head, Program in Computational Biology   fax:  
|
| Division of Public Health Sciences   office: M2-B865   
|
| Fred Hutchinson Cancer Research Center   email: [EMAIL PROTECTED] 
|
+--- 
+

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


Re: [R] R Graphs

2004-10-20 Thread Robert Gentleman
From Bioconductor:
  graph, Rgraphviz, and RBGL..

On Wed, Oct 20, 2004 at 06:17:22PM +0200, Vito Ricci wrote:
 Dear R-users,
 
 I'm finding for a R-package concerning graphs. Is
 there some kind of that package? I've a set of
 correlation coeffients between several variable and I
 wish to built a graph to link variables correlated.
 
 Many thanks.
 
 Best,
 
 Vito
 
 =
 Diventare costruttori di soluzioni
 
 The business of the statistician is to catalyze 
 the scientific learning process.  
 George E. P. Box
 
 
 Visitate il portale http://www.modugno.it/
 e in particolare la sezione su Palese http://www.modugno.it/archivio/cat_palese.shtml
 
 __
 [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

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20|
| Harvard School of Public Health  email: [EMAIL PROTECTED]|
+---+

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


Re: [R] Error Using pm.getabst()

2004-08-12 Thread Robert Gentleman
You will almost surely do better to ask about Bioconductor packages on
the Bioconductor mailing list. Next, it is helpful to know what
versions of things you are using.

As for your problem, did you look to see what kind of object absts is?
There seems to be no default method for xmlRoot, and it is likely that
the call to create the absts object failed (prior to this). You might
want to try stepping through the commands, one at a time and checking
each step. Often, the problem arises because you have not properly set
up your connection to the internet and so none of the querying
software will work.

  Robert

On Thu, Aug 12, 2004 at 08:20:10PM +, [EMAIL PROTECTED] wrote:
 R Users:
 
 After installing Bioconductor, RSXML and all the relevant Win32 DLLs (libxml2, zlib, 
 iconv), I receive the following error message when using pm.getabst()
 
 Error in xmlRoot(absts) : no applicable method for xmlRoot
 
 I receive this when using the example from help(pm.getabst).  
 
 Downloading the target XML file, parsing it with xmlTreeParse and applying xmlRoot 
 returns no error.
 
 Your thoughts/suggestions are appreciated.
 
 Mark Larsen
 
 __
 [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

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20|
| Harvard School of Public Health  email: [EMAIL PROTECTED]|
+---+

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


Re: [R] Using permax with Data Frame Containing Missing Values

2004-07-07 Thread Robert Gentleman
There is currently no handling of NAs in permax. Your only simple
option is to drop those rows with NA's in them, or to perform some
sort of imputation.

I will mention it to the package's author, 
 Robert

On Wed, Jul 07, 2004 at 12:47:05PM +0100, Brian Lane wrote:
 I'm new to this site so I hope this isn't too naive a problem. I'm trying 
 to use the permax function with a data frame containing gene expression 
 measurements taken from 79 microarray experiments with 3000 genes per 
 array. The data contains missing values and every time I use permax with 
 the data frame I get the error:
 
 NA/NaN/Inf in foreign function call (arg 1)
 
 Could anyone suggest how I might get round this problem?
 
 Regards,
 Brian Lane
 Dept of Haematology
 University of Liverpool
 
 __
 [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

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20|
| Harvard School of Public Health  email: [EMAIL PROTECTED]|
+---+

__
[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] Creating and editing networks

2004-05-09 Thread Robert Gentleman
Or graph, RBGL and Rgraphviz from www.bioconductor.org

On Sun, May 09, 2004 at 02:35:02PM +0200, Uwe Ligges wrote:
 Gabor Grothendieck wrote:
  I want to draw and edit networks.  Currently I will do something like this  --
  my actual networks are larger and more complex:
  
  1. Plot network
  
  # use polygon with nodes as example network
  N - 20
  t. - 2*pi*seq(N+1)/N
  plot(cos(t.), sin(t.), type=b, pch=19, cex=5, col=blue, axes=F, ann=F)
  
  2. copy and paste the graphic as a metafile into Word.
  
  3. edit the network
  there.   The editing typically just involves moving nodes and the attached
  edges.  Of course, Word does not know the edges are attached to the nodes so I
  have to move the nodes and then move the attached edges, as well.
  
  The networks are too complex to create the diagrams by hand which is why
  I want to create them in R and then edit them by hand.
  
  The above strategy is marginally acceptable but 
  I was wondering if anyone had a better strategy which retains the
  simplicity of the present approach but gives me the capability to 
  have the edges move along with attached nodes when editing them.
  
  (Note that the strategy must consist of generating the network under program
  control, preferably in R, and then editing it afterwards.  I am not looking
  to create the entire network by hand since the networks are too complex for
  that.  I had tried specifying the networks in dot from Bell Labs but 1. its 
  still more work than generating the network in R   2. the automatic
  layout it chooses is so far from what I need that its a lot of work to 
  fix it up by hand in dotty and 3. I could never get them to look just how
  I like.  I have also tried Excel and Powerpoint, both
  of which support connectors, which are edges that move along with attached
  nodes, but to use them I have to create the entire network by hand and
  the networks have grown too complex to do that.)
  
  __
  [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
 
 
 Have you tried the CRAN package dynamicGraph by Jens Henrik Badsberg?
 
 Uwe Ligges
 
 __
 [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

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20|
| Harvard School of Public Health  email: [EMAIL PROTECTED]|
+---+

__
[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] Different missing links on Windows in 'check' vs. 'install'

2004-03-09 Thread Robert Gentleman
On Tue, Mar 09, 2004 at 12:38:33PM +, Prof Brian Ripley wrote:
 On Tue, 9 Mar 2004, Duncan Murdoch wrote:
 
  On Tue, 9 Mar 2004 08:03:44 + (GMT), you wrote:
  
  No, both will find links in the same library as installing into (plus
  those which are fixed up on installation, e.g. to the base package).
  
  Several of us have looked for years for a fix, and this is the best scheme 
  we have come up with.  You can't put in absolute paths in the HTML as e.g. 
  a private library may be used with more than one version of R (or R may be 
  updated later).  Short of adding symbolic links to Windows (and getting 
  browsers to follow them), how do you propose `we should fix' it?
  
  Here's a proposal:
  
  All of check and build and install should default to the same library
  location.  Check and build aren't meant to be permanent installs, so
  if the package already exists there, it'll have to be temporarily
  moved out of the way.
 
 You may not own the main library and so not have permission to 
 install/check/build there.  If you do, you can use check on an installed 
 copy of the package.  As for build, this is one of the reasons why
 Rcmd INSTALL --build was needed, as that installs in the standard place 
 and then wraps up the installed copy.

 Yes, but for automated checking of many packages (60+ in Bioconductor
 and over 200 in CRAN) it would be nice to be able to separate out the
 real issues from the supposed ones.

 Perhaps we need a mechanism to generate some sort of database of
 these (which is updated/modified by R INSTALL, for example). Then R
 CMD check could generate an index file of resolved/supplied 
 links for the library path that R is using, generally
 $R_HOME/library, and then we simply compare against that. It seems
 that we are currently making the wrong comparison. What might
 make more sense (it seems to me) is to check and see if the  links
 are resolved only against base R + any packages in the
 depends/suggests field of the package being  checked. Since these are
 the ones that we will try to ensure are  available at run
 time. References outside of that set could be warnings. 

 Here we are not trying to physically resolve the links, just make
 sure that they are resolvable given the version of R and the package
 dependencies. 

 Robert


 
 -- 
 Brian D. Ripley,  [EMAIL PROTECTED]
 Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
 University of Oxford, Tel:  +44 1865 272861 (self)
 1 South Parks Road, +44 1865 272866 (PA)
 Oxford OX1 3TG, UKFax:  +44 1865 272595
 
 __
 [EMAIL PROTECTED] mailing list
 https://www.stat.math.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20|
| Harvard School of Public Health  email: [EMAIL PROTECTED]|
+---+

__
[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] Object validation and formal classes

2004-01-29 Thread Robert Gentleman
On Thu, Jan 29, 2004 at 09:30:19PM +0100, Torsten Steuernagel wrote:
 I'm using R 1.8.1 (Win32, Linux) and have some difficulties using 
 validation functions for S4 classes. The problem is if I specify a 
 validation function with setValidity(myclass, validate.myclass) object 
 validation is only performed when I create an instance using 
 new(myclass), or when I explicitly call validObject(x) where x is of 
 class myclass, of course. 
 
 According to the reference docs, I would expect that validation always 
 takes place implicitly when I manipulate an object of myclass. This 
 especially includes implicit validation if I change slots directly, i.e. 
 [EMAIL PROTECTED] - 1:50 should call my validation function. Unfortunately, it 
 isn't called and instead of raising an error and leaving the object 
 unchanged in case validation fails, the object is always changed no 
 matter what I assign to the slot.

  There are some efficiency issues that prevent constant checking (at
  least at the present time). There are also some other issues that
  need to be adequately addressed too. For example, suppose I had an
  object with two slots
   a - a character string 
   b - the number of characters

  and I set my validity checker to make sure that the length of the
  string is the number in b. Now that basically means that I can never
  change the string (except to other strings of the same length) if
  validity checking happened after every change. I somehow need
  changing both a and b to be instantaneous (which they currently are
  not). We have not really gone far enough down that path yet to know
  what the right thing is, but we  are working on it. So for now
  validity checking occurs at a   few specific points and if/when you
  ask for it. 

  Robert


 
 I'm not sure if I'm missing something here or if I just didn't get the point 
 of validation functions, but I believe there must be a way to assure that 
 an object is in a consistent state.
 
 Thanks for your help,
 
 Torsten
 
 __
 [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

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20|
| Harvard School of Public Health  email: [EMAIL PROTECTED]|
+---+

__
[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] OO programming in R

2003-02-13 Thread Robert Gentleman
I have some notes and examples using S4 (for want of a better name)
at
http://biosun1.harvard.edu/courses/individual/bio271/
lectures 12 and 13 --
  Robert

On Thu, Feb 13, 2003 at 08:34:35AM -0800, Roger Peng wrote:
 You may want to look at the book Programming with Data by John Chambers,
 which describes the new-style classes.  It has yet to fail me.  Also the
 Bioconductor packages (http://www.bioconductor.org) use the new-style
 class system and provide a good source of code examples (even if you're
 not interested in bioinformatics).
 
 -roger
 ___
 UCLA Department of Statistics
 [EMAIL PROTECTED]
 http://www.stat.ucla.edu/~rpeng
 
 On Thu, 13 Feb 2003, Kris Nackaerts wrote:
 
  Dear,
  
  I'm looking for some examples on OO programming in R. I have the 
  programming manual with explanation on UseMethod and NextMethod but I 
  miss some practical examples to get me going (I hope). I searched the 
  web but could not find  a good independent tutorial on this.
  
  Any suggestions are welcome,
  
  Kris
  
  
  -- 
  
   
   http://perswww.kuleuven.ac.be/~u0027178/VCard/mycard.php?name=krisn
   
  
   Minds are like parachutes, they only work when open
  
  __
  [EMAIL PROTECTED] mailing list
  http://www.stat.math.ethz.ch/mailman/listinfo/r-help
 
 
 __
 [EMAIL PROTECTED] mailing list
 http://www.stat.math.ethz.ch/mailman/listinfo/r-help

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20|
| Harvard School of Public Health  email: [EMAIL PROTECTED]   |
+---+

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



Re: [R] Bus error with xyplot

2003-02-03 Thread Robert Gentleman
On Mon, Feb 03, 2003 at 10:00:46AM -0500, Liaw, Andy wrote:
  From: Martin Maechler [mailto:[EMAIL PROTECTED]]
  
   Giovanni == Giovanni Petris [EMAIL PROTECTED]
   on Mon, 3 Feb 2003 08:36:06 -0600 (CST) writes:
  
  Giovanni Has anybody else experienced something like the 
  example below? 
  not recently.
  Could it be that your version of the `grid' package (which is
  loaded by `lattice') or `lattice' are incompatible (i.e. older
  than) to your R version?
  After   library(lattice), use 
   .path.package()
  to see where it was loaded from.
 
 This brings up (IIRC) a topic that was discussed on R-devel a while ago:
 Version checks for required packages.  Is this feasible?  Seems quite
 worthwhile to me...

 And there has been some work on it (reposTools, under
 www.bioconductor.org), however, getting this right is not a small
 thing and has some fairly large implications that we are looking
 at. We too would like to be able to do this reliably.


  Robert

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

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20
| Harvard School of Public Health  email: [EMAIL PROTECTED]   |
+---+

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



Re: [R] substitute, eval and hastables

2003-01-29 Thread Robert Gentleman
On Wed, Jan 29, 2003 at 01:07:52PM +0100, Serge Boiko wrote:
 
 I have the following problem. I have an automatically generated named
 list with stringified names:
 
 a - list(A=..., B=..., C=..., )
 
 then I want to refer to the elements of the list, stored as an vector
 of names:
 
 nn - c(A, B, C), so that I could get list elements like
 
 a$nn[1], a$nn[2], etc. Obviously it doesn't work. Instead I do:
 
 nn.Exp - substitute(expression(a$b), list(b=nn[1]))
 eval(nn.Exp)
 
 in a result I get
 expession(a$A) but not the value stored in the list.
 Meanwhile if I manually construct expression as expression(a$A) and
 then evaluate it, it works fine.
 
 How do I solve that problem? Perhaps using such a list with
 stringified names are not very good programming style, but this is
 convenient to store and retrieve elements if list should be filled
 automatically from numerous sources. In this way I'm trying to emulate
 a hash-table behavior. Perhaps there is a better way?

 If you want hash table behavior you could try using environments (as
 that is really about all that they are). I have been spending some
 time thinking (and a little coding) about a hash table class but it
 is unlikely to appear before the summer.
  Robert


 
 Any help is highly appreciated
 Thanks, 
 -Serge
 
 __
 [EMAIL PROTECTED] mailing list
 http://www.stat.math.ethz.ch/mailman/listinfo/r-help

-- 
+---+
| Robert Gentleman phone : (617) 632-5250   |
| Associate Professor  fax:   (617)  632-2444   |
| Department of Biostatistics  office: M1B20
| Harvard School of Public Health  email: [EMAIL PROTECTED]   |
+---+

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