Re: [R] data manipulation for plotting

From: Abi Ghanem josephine <josephine.abighanem_at_ibpc.fr>
Date: Thu, 14 Feb 2008 16:42:39 +0100

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

rich_at_thevillas.eclipse.co.uk 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)
>
> I want
>
> values<-c(1,4,5,6)
>
> freq<-c(3,1,2,1)
>
> in order to enable me to plot this. Sorry, i'm new to R. What is standard
> procedure here for plotting the data vector?
>
> cheers
>
> Rich
>
>
>
>
>
>
> ______________________________________________
> R-help_at_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_at_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. Received on Thu 14 Feb 2008 - 15:47:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 14 Feb 2008 - 16:30:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive