Histogram classwise

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Histogram classwise

arunkumar1111
Hi
I have a data class wise. I want to create a histogram class wise without using for loop as it takes a long time
my data looks like this

x class
27 1
93 3
65 5
1 2
69 5
2 1
92 4
49 5
55 4
46 1
51 3
100 4


Thanks in Advance
        Arun
Reply | Threaded
Open this post in threaded view
|

Re: Histogram classwise

Sarah Goslee
I'm not entirely sure what you mean, but maybe split() and lapply() would help?

Sarah

On Tue, Apr 3, 2012 at 8:20 AM, arunkumar1111 <[hidden email]> wrote:

> Hi
> I have a data class wise. I want to create a histogram class wise without
> using for loop as it takes a long time
> my data looks like this
>
> x       class
> 27      1
> 93      3
> 65      5
> 1       2
> 69      5
> 2       1
> 92      4
> 49      5
> 55      4
> 46      1
> 51      3
> 100     4
>
>
>
>
> -----
> Thanks in Advance
>        Arun
> --

--
Sarah Goslee
http://www.functionaldiversity.org

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: Histogram classwise

glsnow
In reply to this post by arunkumar1111
You might want to look at the lattice or ggplot2 packages, both of
which can create a graph for each of the classes.

On Tue, Apr 3, 2012 at 6:20 AM, arunkumar1111 <[hidden email]> wrote:

> Hi
> I have a data class wise. I want to create a histogram class wise without
> using for loop as it takes a long time
> my data looks like this
>
> x       class
> 27      1
> 93      3
> 65      5
> 1       2
> 69      5
> 2       1
> 92      4
> 49      5
> 55      4
> 46      1
> 51      3
> 100     4
>
>
>
>
> -----
> Thanks in Advance
>        Arun
> --
> View this message in context: http://r.789695.n4.nabble.com/Histogram-classwise-tp4528624p4528624.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.



--
Gregory (Greg) L. Snow Ph.D.
[hidden email]

______________________________________________
[hidden email] 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.