[R] frequency distribution in figures....

Jim Lemon drj|m|emon @end|ng |rom gm@||@com
Sat Sep 8 12:45:57 CEST 2018


Hi Akshay,
Try this:

table(cut(xht,breaks=seq(0,10,by=2)))

Jim

On Sat, Sep 8, 2018 at 8:26 PM akshay kulkarni <akshay_e4 using hotmail.com> wrote:
>
> dear members,
>                              I am facing difficulties in plotting histograms in R in Linux CLI.
>
> Is there a function in R which produces a table of frequency distribution in figures rather than plot that distribution?
>
> Something like this:
>
> xht <- c(1,2,3,4,5,6,7,8,9,10)
>
> required table:
>                               bins:                   1-2     3-4    5-6     7-8     9-10
>                               frequency:          2          2       2         2        2
>
> Also is this possible:
>
> xhth <- hist(xht)
> summary(xhth)
>
> very many thanks for your time and effort....
> yours sincerely,
> AKSHAYM KULKARNI
>
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.




More information about the R-help mailing list