Re: [R] creating a database

2007-12-18 Thread elw


 Can a simple matrix be used for this or would it be better and more 
 efficient to create an external database to hold the data.  If so, 
 should the database be created using C and how would I do this (seeing 
 as that I have never programmed in C)?

You don't want to be down at the C level, most likely:  it would be much 
more straightforward and programmer-efficient to use one of the available 
bindings to one of the available open-source databases.

R has useful / usable bindings to postgresql, sqlite, and mysql, among 
many others.

These are, however, more generally useful when you reach the point that 
you simply can't manage the volume of your data in R objects or in data 
frames. [And, well, you can go a LONG way with intelligently named R 
objects.  :-)]

--elijah

__
R-help@r-project.org 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] connection diagram

2007-11-26 Thread elw


On Wed, 14 Nov 2007, Manal Helal wrote:

 Dimn  Waves Tot.  Parts In Wave   Wave  NoSerial  Index   W Order 
 M
 Index DepTot. D1-Serial   D1-IndexD1-OrderD1-M
 Index D2-Serial   D2-IndexD2-OrderD2-M Index
 2 7   1   0   1   0   0   0, 0  2   2   
 18  0   4, 4  3   2   1   2, 0
 2 7   2   1   2   18  0   4, 4  2   4   
 20  0   2, 2  5   36  1   0, 4

 following the tutorial on SNA, I see that I need to convert that into 
 adjacency matrix to start plotting the graph, and I can not see how I 
 can do that,

Into one adjacency matrix -- you probably can't.  [And, I think, probably 
don't really want to do that...]

What you might be able to do is figure out what your actual actors are... 
the entities that are connected to each other... and use them (just 
them... or their relations...] to build your adjacency matrix.

With your matrix in hand, you will want to keep track of those other 
variables... there are a lotta ways you could go about this, and there are 
a lot of decisions to affect your implementation.

In the 'sna' package, look at the graph stack data structure.  [m x N x N 
dimension -- an array of adjacency matrices which could be attributed 
values rather than 0/1 boolean is-connected assertions.]

You might be best served by a series of plots, each taking into account a 
different combination of your available data variables.  It almost sounds 
fun, doesn't it?  :-)

Not really familiar enough with your data to make many more suggestions. 
It sounds like your data structure is pretty nontrivial... maybe there are 
ways you can break it down into pieces that you can manage more easily, 
for your own sake?

best,

--elijah

__
R-help@r-project.org 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] Any useR conference in US in YR2008

2007-11-25 Thread elw



Something like this - alternating among continents - happens with AoIR, 
the Association for Internet Research.  A real effort has been made to 
make sure that the conference is in North America no more than every other 
year, with alternating slots going to Europe and (once so far..) to 
Australia.  There is quite a lot of discussion of how to get that 
particular conference (and research-base) spun up in South America, as 
well - and I think that eventually we'll see a conference hosted there.

A good model to follow, I think; AoIR is, like useR, a relatively young 
and savvy conference/group, pretty close to the bleeding edge.

--elijah


On Fri, 23 Nov 2007, [EMAIL PROTECTED] wrote:

 Date: Fri, 23 Nov 2007 11:13:53 +1000
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Cc: R-help@r-project.org
 Subject: Re: [R] Any useR conference in US in YR2008
 
 Apropos this issue, the R Foundation has had an offer to host useR 2009
 from a European based group rather than a North American based one.  My
 understanding is that no decision has yet been taken, though.  If other
 groups had an interest in hosting useR 2009, it might not be a bad idea
 to register that interest fairly soon.

 There was a suggestion that alternating between the North America and
 Europe would be a good idea, but I don't know if this is a cosy
 understanding of what would be nice, or a reasonably firm policy
 decision.  (I'm also not sure in which camp little places like Brazil,
 New Zealand, Australia, Japan, China, India, ..., would fit in this
 rather occidental view of the world, too.  :-)

 Bill Venables.


 Bill Venables
 CSIRO Laboratories
 PO Box 120, Cleveland, 4163
 AUSTRALIA
 Office Phone (email preferred): +61 7 3826 7251
 Fax (if absolutely necessary):  +61 7 3826 7304
 Mobile: +61 4 8819 4402
 Home Phone: +61 7 3286 7700
 mailto:[EMAIL PROTECTED]
 http://www.cmis.csiro.au/bill.venables/

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 On Behalf Of Marc Schwartz
 Sent: Friday, 23 November 2007 3:54 AM
 To: Wensui Liu
 Cc: r-help@r-project.org
 Subject: Re: [R] Any useR conference in US in YR2008

 None sponsored by the R Foundation.

 There may be others, offered by the various companies who offer R/S-PLUS
 training. They do periodically post e-mails about them on these lists.

 Regards,

 Marc

 On Thu, 2007-11-22 at 12:44 -0500, Wensui Liu wrote:
 Thank you so much, Marc!
 So if I understand correctly, there is no conference related to R in
 US in the coming yr2008. Am I correct?

 On 11/22/07, Marc Schwartz [EMAIL PROTECTED] wrote:

 On Thu, 2007-11-22 at 11:58 -0500, Wensui Liu wrote:
 Dear usRs,
 Is there any conference for usR in US next year?
 Happy Turkey day!

 wensui

 R related conferences, at least those officially related to the R
 Foundation, are listed here:

   http://www.r-project.org/conferences.html

 This past August, the useR! conference was at Iowa State University.
 Next year's useR! conference is in Dortmund, Germany. If the pattern
 holds, the useR! conference in 2009 will be back in the U.S.

 HTH,

 Marc Schwartz


 __
 R-help@r-project.org 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.

 __
 R-help@r-project.org 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.


__
R-help@r-project.org 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] biocep project (R for the Web and the Virtual R Workbench)

2007-11-21 Thread elw



Some of the bits and pieces in this look like very strong candidates for 
breaking off into CRAN packages, if you haven't done so already.

This looks like very nice work - you should be proud!  :-)

--elijah


On Mon, 19 Nov 2007, Karim Chine wrote:

 Date: Mon, 19 Nov 2007 19:44:51 +
 From: Karim Chine [EMAIL PROTECTED]
 To: R-help@r-project.org
 Subject: [R] biocep project (R for the Web and the Virtual R Workbench)
 
 Dear all,

 I have been writing during last year at the European Bioinformatics
 Institute a general unified open source solution for R integration. This
 work is now available via this link:
 http://www.ebi.ac.uk/microarray-srv/frontendapp/
 The different frameworks and tools of the biocep project are now robust
 enough for production use. The different APIs are finalized but the
 documentation is incomplete.
 the last version of the biocep README file can be found here :
 http://www.ebi.ac.uk/microarray-srv/frontendapp/BIOCEP_README.txt

 Here are the major use cases I dealt with :

 - Generate java mappings for R Objects (Standard/S4).
 - Generate java mappings for selected packages' functions
 (Generic/TypeInfoed).
 - Use R and the R packages as a Java Toolkit via a Rich, High level,
 Object-Oriented API.
 - Deploy and use R as a remote component.
 - Expose automatically R packages and the R API as JAX-WS stateless or
 statefull Web Services.
 - Use R within a resource pooling infrastructure for scalable, web
 oriented, data analysis applications.
 - Use the Remote Resources Pooling framework (RPF) to deploy and use
 distributed computational resources (non R based, native libraries with
 JNI support or java code)
 - Use R for parallel computing via  a Java API or Web Services.
 - Create and use Remote R Instances from within R (snow' like fucntions
 : makeCluster, clusterEvalQ, clusterExport, clusterApply,  stopCluster ..)
 - Use the R API from within an applet (book, use and release a Remote R
 Instance via HTTP Tunneling)
 - Use R to generate Graphics on the fly for thin web clients
 - Use R from within a Workbench that includes an advanced script
 editor,  a Spreadsheet View fully connected to R data and functions, an
 R Object Inspector,
 composable and dockable Views, interactive R devices, clonable R
 Graphics..
 - Use the Workbench from within a browser or via Java Web Start to
 access a pool of Remote R Instances
 - Use the Workbench to control on demand any Remote R Instance
 - Provide a packaging for R Based Desktop applications that enables Web
 based, one click installation (Embedded R for Windows, detected R for
 other operating systems)

 This work uses extensively a large number of existing open source
 projects as is or patched.

 The public SVN url/login/pasword for the biocep project are in the
 README file

 You may want to try the Virtual R Workbench on your local machine, use
 the following link :
 http://www.ebi.ac.uk/microarray-srv/frontendapp/rworkbench.jnlp
 or type 'javaws
 http://www.ebi.ac.uk/microarray-srv/frontendapp/rworkbench.jnlp' from
 the command line.
 This is a one click installation process for Windows and Mac OS X. (You
 need to preinstall R on Mac OS X while on Widows an embedded R 2.6 can
 be deployed and used)
 The Java Web Start installer creates an RWorkbench directory in your
 home dir with all the files required. You may continue launching the
 application via the url (good for fetching updates automatically)
 or use the RWorkbench/VRWorkbench.txt to Run the application off line.
 rename it to VRWorkbench.bat on Windows or type 'source VRWorkbench.txt'
 on Mac OS X command line.
 use the sources of biocep to run the R Workbench on Unix-like operating
 systems.

 Best wishes,

 Karim

 __
 R-help@r-project.org 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.


__
R-help@r-project.org 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] connection diagram

2007-11-12 Thread elw


hi,

You should probably be looking at the functions in the following packages:

sna
network(s)
graph
dynamicgraph
mathgraph
igraph
Matrix

and a few others ;)

what you're describing sounds like, to my ear, a restricted social network 
diagram;  many of the problems you describe are typical of such problems, 
and are accounted for in the packages described above.

The most difficult part is likely to be the plots;  handling an annotated, 
weighted, complex network is fairly straightforward in terms of data 
handling and analytic tools (e.g. regressions on networks are common...).

--elijah




On Tue, 13 Nov 2007, Manal Helal wrote:

 Date: Tue, 13 Nov 2007 12:44:16 +1100
 From: Manal Helal [EMAIL PROTECTED]
 To: r-help@r-project.org
 Subject: [R] connection diagram
 
 Hi

 I am practically new to R, and need to construct connection diagrams,
 I have a table of data, of nodes in vertical rows, and horizontally
 the number of outgoing connections to other nodes, and the indices of
 these nodes, each in a column, so some columns are used, and some are
 not, based on how many connections I have

 the node is identified by these variables (dimension, wave number,
 partition number, index)

 the number of incoming and outgoing connections to each nodes varies,
 but obviously there is a relationship

 First: I need to draw diagrams of these connections
 Second: I need to apply regression analysis on this data, to predict a
 closed formula of how the 4 variables above decide how many incoming
 connections, and outgoing connections, and from/to which node(s)

 Am I making sense? if so, is this doable in R? or do I need to use
 other tools? If R can do it, I really need to find a tutorial or a
 starting link that I can follow to learn more how I can do these,

 sorry for being that ignorant about R, but I think I will need it a
 lot if it does what I need,

 thank you very much for your help in advance,




__
R-help@r-project.org 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] PVM error message

2007-11-07 Thread elw

 I am working with a Fedora Core 6 OS and R 2.5.  I have just finished

 I am using PVM3.4.5+6-WIN32.tar.gz

Isn't that supposed to be the wad of files for Windows machines?

there's a different link on the PVM homepage to the source for unices...

--elijah

__
R-help@r-project.org 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] Implementing R through Oracle

2007-11-05 Thread elw


 I have looked through all the ROracle documentation, R-help, R-dev, 
 Googled the world and still cannot figure out this issue. Everything I 
 read it is about connecting to an Oracle database and pulling data, 
 processing it, and then pushing it back to Oracle. I am running in 
 pl/sql code so I already have a Oracle session open. What I want to do 
 is from Oracle call R. I am having a mental challenge in seeing how this 
 can be done. Any words of wisdon?


EXTPROC in Oracle, calling an R CMD BATCH session?

Dirty but workable.

[p.s. I don't normally do Oracle but the stuff at

http://www.idevelopment.info/data/Oracle/DBA_tips/PL_SQL/PLSQL_1.shtml

shows basically how to do it...]


--elijah

__
R-help@r-project.org 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] DBI Package

2007-10-31 Thread elw




I have some problems with DBI package, I want to connect to PostgreSQL
database but I don't know the way to do it.

pg - dbDriver(PostgreSQL)


... nope.  That won't work.

you need the RdbiPgSQL package from Bioconductor.  Along with DBI, as I 
recall.


--elijah__
R-help@r-project.org 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.
__
R-help@r-project.org 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] Cluster Analysis

2007-10-29 Thread elw


 Subject: [R] Cluster Analysis
 
 Dear all,

  I would like to know if I can do a hierarchical cluster analysis in R 
 using my own similarity matrix and how. Thanks. Katia Freire.

Yes. ;)

Reading the help for dist() and hclust() should make the procedure for 
doing this appear fairly straightforward.  For interpreting the results, 
cutree() should be helpful..

--elijah

__
R-help@r-project.org 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] Cannot install 'rgl'

2007-10-29 Thread elw



Do you have the X11 devel packages installed?  You probably do not.

--elijah


On Mon, 29 Oct 2007, Metaxab wrote:

 Date: Mon, 29 Oct 2007 05:45:33 -0700 (PDT)
 From: Metaxab [EMAIL PROTECTED]
 To: r-help@r-project.org
 Subject: [R]  Cannot install 'rgl'
 

 Hello I have the following problem:

 I am trying to install the 'rgl' package by:

 sudo R
 install.packages('rgl',dependencies=TRUE)


 I get the following message

 checking for X... no
 configure: error: X11 not found but required, configure aborted.
 ERROR: configuration failed for package 'rgl'
 ** Removing '/usr/local/lib/R/site-library/rgl'



 How can I resolve this issue

 I run Ubuntu 7.10


 Thank you in advance


__
R-help@r-project.org 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] pseudo code

2007-10-09 Thread elw


 Requires: T = cluster(X): A hierarchical clustering algorithm
 L = cut-tree(T; k): produces a partition with k non-singleton clusters

The functions you'll want to read the documentation to, here, are 
hclust() and cutree().  They're fairly straightforward and nicely 
documented.

It looks like you are running cutree at multiple heights of the hclust 
object to get different numbers of clusters; am I interpreting that 
correctly?

--elijah

 s(L1;L2): a similarity between two partitions

 1: f = 0:8
 2: T =cluster(X) fthe reference clustering
 3: for i = 1 to num subsamples do
 4: subi =subsamp(X; f) fsub-sample a fraction f of the datag
 5: Ti=cluster(subi)
 6: end for
 7: for k = 2 to kmax do
 8: L1=cut-tree(T; k) fpartition the reference clusteringg
 9: for i = 1 to maximum iterations do
 10: L2 =cut-tree(Ti; k)
 11: S(i; k) = s(L2;L1) computed only on the patterns of subi.
 12: end for
 13: end for

 I am glad about any help, don't really know what to do!
 thanks, regards
 Julia
 --

 __
 R-help@r-project.org 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.


__
R-help@r-project.org 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] igraph and plotting connected components

2007-10-08 Thread elw


 Hello there,

   I am using the igraph package to build graphs from my data. If I plot 
 a graph though, it's not easy for me to see what's going on. Does 
 anybody know how to rearrange a graph to get a plot without too many 
 crossing lines? Maybe other packages?


Edge-crossing minimization is a research topic all in itself, for folks 
who deal with graph-style data on a regular basis.  ;-)  It is *hard* to 
construct sane graphs automatically, which is why software in this area so 
frequently produces what appear to be sub-par results.  [And it is 
difficult for human beings to evaluate the 'quality' of such graphs, 
comparatively - we just aren't good at this task.]


 Rgraphviz in Bioconductor does a great job of this.  It's a wrapper for 
 the Graphviz library, so the R docs are a little sparse, but there's a 
 tremendous amount of flexibility there.


Seconded - graphviz in general is quite good; getting your data into 
dot-file format is often a productive step in the viz process.

Dot-file format is also *ridiculously simple* to generate , which I think 
of as a factor well in its favor.  :-)

the dynamicGraph package (which I think lives in bioconductor as well) is 
reasonably useful for smallish graphs.

I hear that there's a tk-based interactive graph layouter available with 
graphviz's source - you might look there, too.

There's also Pajek, which is pretty and interactive but not R, 
for-Windows, and not even very compatible with the data formats usually 
used by folks with R.  ;)

There's also the pixelglow build of graphviz on OSX, which is beautiful 
and fun to mess with.

There are a couple other graph packages as well... most not interactive, 
which sounds like what you're likely wanting.

[With some of the iterative graph rendering algorithms - particularly the 
ones that deal with energy minimization algorithms and the like - 
nondeterministic mostly - you can sometimes re-run the layout function and 
get wildly different results, particularly for complex graphs.  You might 
try this.]


--elijah wright
school of library and information science
indiana university, bloomington

__
R-help@r-project.org 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] curvilinear grid

2007-09-27 Thread elw

 The idea is that you're modeling an irregular shaped object, a body of 
 water, a river or estuary, say.  It's fairly common practice to use a 
 grid squished and rotated so that the main flow is along one axis, and 
 the other axis spans the flow in most spots.  So there is a single 
 transformation that gets you from a rectangular grid to the shape of 
 your estuary, but there isn't a tidy analytical way to describe it, like 
 there is with a map projection.  Instead there is an x and y for each 
 grid point, and the cell dimensions vary all over the place.

 spplot, in the sp package seems almost to do what I'm after, but I can't 
 figure out if there is a way to invoke it that does what I want, or if 
 I'm barking up the wrong tree.


Ask on R-sig-geo?  I haven't seen a query from you come through over 
there... and that would be the logical place to ask questions about the sp 
package and similar bits...

--e

__
R-help@r-project.org 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] sprucing up the R homepage

2007-09-26 Thread elw


 http://www.broad.mit.edu/~finnyk/Rhome.jpg

 If you run Eric Lecoutre's code to produce the graphic, available at 
 http://www.r-project.org/misc/acpclust.R, unchanged except for the 
 addition of these lines:

 library(Cairo)
 Cairo(600,400,file=Rlogo_swiss.png,type=png,bg=white)

 then you get this:

 http://members.optusnet.com.au/tchur/Rlogo_swiss.png

 which I think looks even better. Kudos to Simon Urbanek and Jeffrey 
 Horner for the excellent Cairo device driver for R (and which works even 
 without an X server, which makes it great for web server applications).


It seems to have lost labels on the left, though... and there is some 
oddness on the right edge, too, where the number 45 found in the other 
two plot versions has been replaced with V. De Gen... - what looks like 
part of someone's name or some other descriptor.  The (1-3) 60% under 
the PCA 5 Vars section also intersects with part of a plot.

Overall the effect is better, but the fine details could use some 
tweaking.

--elijah

__
R-help@r-project.org 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] sprucing up the R homepage

2007-09-26 Thread elw



 So I applied my corrected margins to Tim's Cairo trick and voila:
 http://www.broad.mit.edu/~finnyk/Rlogo_swiss.png
 This is hands-down the best version, in my opinion!

Yes, it is definitely much nicer than the version on www.r-project.org 
now.  :-)

--e

__
R-help@r-project.org 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] Connecting R to PostgreSQL via RODBC, on Windows

2007-09-26 Thread elw

 I feel like I must be missing something rather plain, but I don't get 
 it. how is one supposed to use R as a PgSQL client on Windows?  Assume 
 my windows desktop is on the same network as a PgSQL server, and I just 
 need to use R to connect and pull down some data.

 The thing that is confusing me is that RODBC doesn't seem to know 
 anything about PgSQL, in that odbcDataSources(type = all) only returns 
 info about MS/Excell/Access/dBase stuff.  What does it take to get RODBC 
 to deal with PgSQL?


There's an odbc-to-pgsql driver for windows that will need to be 
installed.  You can find that here:

http://www.postgresql.org/ftp/odbc/versions/

Then, you set up your connection to postgresql via the Control Panel, 
under Administrative Tools, then Data Sources.

Then connect to that with R.

[I have mostly done this under Linux - it has been quite a while since 
I've needed to do it on Windows, but this is a broadly correct outline of 
the necessary steps.]

--e

__
R-help@r-project.org 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.