Re: [R] data manipulation for plotting

2008-02-15 Thread Jim Lemon
[EMAIL PROTECTED] wrote: >Hi, > >i'd like to plot some data that I have with the value on the x axis and > freq >on the y axis. > >So, I need to calculate the freq a value is seen within my data vector > >for example, say i have a vector of data > >data=c(1,1,1,4,5,5,6)

Re: [R] data manipulation for plotting

2008-02-14 Thread Henrique Dallazuanna
Try this: values <- c(1,1,1,4,5,5,6) with(rle(values), plot(values, lengths)) But I think that you can use barplot: barplot(table(values)) On 14/02/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >Hi, > >i'd like to plot some data that I have with the value on the x axis and > fr

Re: [R] data manipulation for plotting

2008-02-14 Thread John Kane
Here are a couple of ways depending on what you want. data1=c(1,1,1,4,5,5,6) plot(table(data1)) --- plotvec <- as.vector(aa) nns <- names(aa) plot(plotvec, xaxt="n") mtext(nns, at=1:4, side=1) --- --- "[EMAIL PROTECTED]" <[EMA

Re: [R] data manipulation for plotting

2008-02-14 Thread Abi Ghanem josephine
Hi rich, >data <- c(1,1,1,4,5,5,6) >table(data) data 1 4 5 6 3 1 2 1 hope it helps josephine [EMAIL PROTECTED] wrote: >Hi, > >i'd like to plot some data that I have with the value on the x axis and > freq >on the y axis. > >So, I need to calculate the freq a value is seen withi

Re: [R] data manipulation for plotting

2008-02-14 Thread Gavin Simpson
On Thu, 2008-02-14 at 14:35 +, [EMAIL PROTECTED] wrote: > Hi, > >i'd like to plot some data that I have with the value on the x axis and > freq >on the y axis. > >So, I need to calculate the freq a value is seen within my data vector > >for example, say i have a vector of d

[R] data manipulation for plotting

2008-02-14 Thread [EMAIL PROTECTED]
Hi, i'd like to plot some data that I have with the value on the x axis and freq on the y axis. So, I need to calculate the freq a value is seen within my data vector for example, say i have a vector of data data=c(1,1,1,4,5,5,6) I want values<-c(1,4,5,6) freq<-c(