Re: [R] Boxplot problem

2011-03-09 Thread Gaurav Kumar
Dear Lao and Dennis, Thanks for your reply, now it is working as expected by using height=cbind(c(data[1,],data[2,],data[3,]) Gaurav Kumar www.gauravkumar.org PhD Student, Chemistry and Biomolecular Sciences, Macquarie , Sydney, Australia. MS (Computational Biology), NCBS-TIFR, Bangalore

[R] Boxplot problem

2011-03-08 Thread Gaurav Kumar
plot(height=c(data[1,],data[2,],data[3,]),       beside=TRUE,   space=c(.1,1),   border="black",   col=c("blue","red") ) Please help me where i'm doing wrong or some known issue is there with boxplot. Thanks in advance. Gaurav Kumar www.g

Re: [R] R help for read.table()

2010-01-20 Thread Gaurav Kumar
Thank Dennis!!!.it works regards Gaurav Kumar www.gauravkumar.org PhD Student, Chemistry and Biomolecular Sciences, Macquarie , Sydney, Australia. MS (Computational Biology), NCBS-TIFR, Bangalore, India. --- On Wed, 20/1/10, Dennis Murphy wrote: From: Dennis Murphy Subject: Re: [R

Re: [R] RES: R help for read.table()

2010-01-20 Thread Gaurav Kumar
Hi Leonard, Thanks for your quick response. i tired using the sep=" " in read.table() function, but still can't access the first column. checked , str(file), showing the $V1 variable...but can't access the first column inside the loop. regards Gaurav Kumar www.gauravku

[R] R help for read.table()

2010-01-20 Thread Gaurav Kumar
rst column as file[i,1]. file <- read.table("data.txt",header=FALSE) for ( i in 1:nrow(file)) {  cat(file[i,1],":")  pvalue <- 2*(1-pnorm(abs(file[i,2])))  cat(pvalue,"\n") } can anyone help  me how to read the first column. regards Gaurav Kum

[R] R igraph clusters component

2009-12-03 Thread Gaurav Kumar
Hi R-users, I'm using igraph for an undirected graph. i used clusters() igraph function to know the component size(subgraphs) as shown bellow: c <-clusters(g)    # component sizes size <- sort(c$csize, decreasing=TRUE) cat("Top 20 cluster of the graph","\n") for (i in 1:20) {   cat(i,"  size:",s

[R] How to provide list as an argument for the data.frame()

2009-07-14 Thread Gaurav Kumar
#3    A   x3   2 #4    B   x1   3 #5    B   x2   7 #6    B   x3   3 #7    C   x1   4 #8    C   x2   10 #9    C   x3   5 Help needed as how i should provide list as a third argument to data.frame(). Thanks in advance. Gaurav Kumar www.gauravkumar.org PhD Student, Chemistry and Biomolecular Scien

Re: [R] How to Populate List

2009-07-09 Thread Gaurav Kumar
(0:length(inp$comp));  myList=list();  for(i in n-1)  {     if(i < length(inp$comp))     {         j=i+1;         myList[[j]][1] <-c(as.numeric(myData$A[i]));         myList[[j]][2] <-c(as.numeric(myData$B[i]));         myList[[j]][2] <-c(as.numeric(myData$C[i]));     }  }  print(myList); Any idea