[R] combine venn diagram and pie chart

2009-08-02 Thread kevinchang
Hi R users, I am wondering if it there is R's function that can help integrate venn diagram and pie chart to compare two related datasets. I know the package limma has something built-in for making venn diagram, but I guess it would be very painful to use line and text to specify the

[R] locate substring in the string it belong to

2009-07-20 Thread kevinchang
Hi R users, I am trying generate the indices for locating a in the string it come from. Given the length of the string, it will take too long using the combn() for further comparison. I am wondering if R has any built-in function for this purpose. To make it concrete: this.substring=cc

[R] save the layout using igraph

2009-03-03 Thread kevinchang
Hi R users, I am using built-in functions in igraph package to draw networks . I need to compare several network with exactly the same structure but with edge hightlighted differently. I am wondering if there is a way to save the layout so that every graph will look the same as each other

[R] layout of igraph

2009-02-26 Thread kevinchang
Dear R users, I am trying to draw a network using igraph package. I intend to place the hub nodes (the ones with the relatively more connection with other nodes) in the center of the graph. Also, the graph need to be in the fashion that the higher the correlation between two nodes is , the

Re: [R] layout of igraph

2009-02-26 Thread kevinchang
nodes. You mean that the graph is weighted? If you have a small graph, then you can refine the layout interactively by using 'tkplot'. Gabor On Thu, Feb 26, 2009 at 4:20 PM, kevinchang shu...@seas.upenn.edu wrote: Dear R users, I am trying to draw a network using igraph package. I

[R] conversion of data structure between R and Perl

2008-08-27 Thread kevinchang
Dear R users, I am trying to call a Perl subroutine from R . The subroutine returns an arrray contaning three elements wihch are all strings. But the calling in R return an integer which is 0. I have no idea how this could happen. Maybe becasue I shouldn't use system() in R or I should load a

[R] flops calculation

2007-10-28 Thread kevinchang
Hi all, Since proc.time return three different kind of times (user, system and elapsed) , I am wondering which one is right for calculating flops. In New S Language (Becker et. al. ) , it seems to be the user because the user time measures the processor time used in S and the system time

Re: [R] Newton method iteration problem

2007-10-27 Thread kevinchang
the root by Newton method rootFinding-function(initialX,setAlpha,maxIter){ while((target(initialX,setAlpha)!=0) maxIter0){ initialX-initialX-(target(initialX,setAlpha)/firstDerivative(initialX)) maxIter-maxIter-1 } initialX } Charles C. Berry wrote: On Fri, 26 Oct 2007, kevinchang

[R] Newton method iteration problem

2007-10-26 Thread kevinchang
Hi all, I am coding for finding the root of f(x)= phi(x) -alpha where phi(x) is the cumulative density function and alpha is constant . The problem right now is I can't get the initialX representing the root out of the while loop when ending , it seems to me it disappear when the loop ends

[R] inverse of matrix made by low.tri function

2007-10-03 Thread kevinchang
Hi all, I am using R trying to get a inverse matrix of (X^T)X , but I keep getting the error message like: no b argument and no default value for sprintf(gettext(fmt, domain = domain), ...) . # my code

[R] stalled loop

2007-09-16 Thread kevinchang
Hey everyone, The code I wrote executes correctly but is stalled seriously. Is there a way to hasten execution without coming up with a brand new algorithm ?please help. Thanks a lot for your time. #a simplified version of the code a-c(superman , xman , spiderman ,wolfman

[R] starting with a capital letter

2007-09-15 Thread kevinchang
Hi everyone, I am wondering if there is any built-in funcion that can determine whether words in a character vector start with a captial letter or not. Help, please. Thanks. -- View this message in context: http://www.nabble.com/starting-with-a-capital-letter-tf4447302.html#a12689105 Sent from

[R] naming columns of data frame

2007-09-15 Thread kevinchang
Hey, I am trying to make a data frame and the name of a column is composed of a number, a dot, and a word, such as 1.whatever. But I always get this error message:syntax error, unexpected SYMBOL, expecting ',' in: while printing data frame out . When I rename the column with purely letter,

[R] locate word in vector

2007-09-14 Thread kevinchang
Hey All, I am wondering if there is a built-in function allowing us to locate a particular word in a character vector. ex: vector a a [1] superman xamn spiderman superman superman xman [7] spiderman Is there any built-in function that can show superman are the first, fourth and