HI
thank you very much for the advice
the result, in R console, is more or less what I tried to do
but I'm not able to modify, in the right way, my script:

## read the data
devinp <- read.csv(textConnection(dev_input),header=FALSE,row.names=NULL)
dev_inp <- as.vector(devinp, mode="integer")
## plot the data
png(dist_plot, width=800);
#png(pie_, width=800);
datapoints <- as.table(summary.factor(dev_num))
dist_plot <- barplot(datapoints, col=rainbow(length(dev_inp)))
#pie_ <- pie(datapoints, col=rainbow(length(dev_inp), start=0.1, end=0.8), 
main="Pie Chart", clockwise=T)
#dist_plot <- 
plot(datapoints,xlim=range(dev_inp),col="blue",type="o",main="Distribution of 
Number of Codons",xlab="Number of Codons",ylab="Number of nodes",pch=20)
dev.off()


I think it depends especially on the first line about the metod to acquire the 
input 'file' "dev_input" for  strings 
cheers





On 02/01/2010 08:50 PM, A Z wrote:
> Hi all !
>
> I'm new in this list and newbie about R
> I'm trying to use R scripts (as in the attached file) for creating some 
> distributions plots of data retrieved by a workflow(with Rserve, to be 
> precise).
>
> I was able to do it (even if not in a beatiful way, I have to improve it 
> especially about labels and coordinates) with number inputs like :
> 110,248,245,151,175,165,163,52,213,315,164,276,273,273,175,220,284,216,213,278,245,157,278,248
>
> My problem appear when I want to create such plots with inputs composed by 
> strings like:
> CORPUS,CORPUS,CORPUS,CORPUS,CORPUS,CORPUS,CORPUS,CORPUS,OVARY,OVARY,OVARY,OVARY,PERITONEUM,PERITONEUM,PERITONEUM,PERITONEUM,PERITONEUM,PERITONEUM,PERITONEUM,PERITONEUM,PERITONEUM,UTERUS,UTERUS,UTERUS
> for creating plots of the distributions of the different 'words'.
> (e.g. bar named corpus that tell me how many time it is repeated, and so on).
>
Hi A Z,
Try this:

input_strings<-sample(c("CORPUS","OVARY","PERITONEUM"),100,TRUE)
input_table<-table(input_strings)
barplot(input_table,names.arg=names(input_table))

Jim


      
        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to