[R] Summary
Henrique Dallazuanna
wwwhsd at gmail.com
Tue Sep 29 18:57:04 CEST 2009
Try this:
sapply(xc, summary)
On Tue, Sep 29, 2009 at 12:42 PM, Ashta <sewashm at gmail.com> wrote:
> My data is called xc and has more than 15 variables.
>
>
> When I used summary(xc) it gave me the detail description of each
> variable.
>
>
>
> Summary(xc)
>
>
>
> Y1 x1 x2
> x3 ..
>
> Min. :0.0000 Min. : 1.000 Min. : 1.000 Min. : 1.000
>
> 1st Qu. :0.0000 1st Qu.: 1.000 1st Qu.: 1.000 1st Qu.: 2.000
>
> Median :1.0000 Median : 1.000 Median : 1.000 Median : 3.000
>
> Mean :0.6505 Mean : 2.816 Mean : 3.542 Mean : 3.433
>
> 3rd Qu. :1.0000 3rd Qu.: 4.000 3rd Qu.: 6.000 3rd Qu.: 5.000
>
> Max. :1.0000 Max. :10.000 Max. :10.000 Max. :10.000
>
>
>
> But I want the output in the following way.
>
>
>
> Y1 x1 x2 x3 ..
>
> Min. :0.0000 1.000 1.000 1.000
>
> 1st Qu. :0.0000 1.000 1.000 2.000
>
> Median :1.0000 1.000 1.000 3.000
>
> Mean :0.6505 2.816 3.542 3.433
>
> 3rd Qu. :1.0000 4.000 6.000 5.000
>
> Max. :1.0000 10.000 10.000 :10.000
>
>
> Is it possible to do it in R?
>
>
> Thanks in advance
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>
--
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O
More information about the R-help
mailing list