0

Does that exist? A basic R script or package that just needs the data, and it spits lots of “basic” statistics (like the mean, the median, quartiles, make a plot, a boxplot, a histogram, a cumulative histogram, stem-leaf plot, $α_1$, $α_2$, $β_1$, $β_1$, the variance, etc.).

I mean, you give the script lots of numbers (in a vector), and it gives you everything you need and more in a .txt, and a few pdfs with small plots.

This could be useful to people who needs to do basic data treatment but doesn't want to click one thousand times to get everything with SPSS or Statgraphics. But (also) doesn't need to learn R language.

In case it doesn't exist, I'm not asking you to make it, a plain “no” would be accepted as an answer. But in that case, it would be great idea if someone wants to write it :P

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Manuel
  • 101
  • 2
  • 2
    This question is only about R functionality & not about any related statistical concepts. Thus it is off-topic for CV (see our [help center](http://stats.stackexchange.com/help/on-topic)). It might be best asked on the r-help-listserv. If you have a question about the substantive statistical issues here, please edit to clarify; if not, this Q may be closed. – gung - Reinstate Monica Mar 27 '14 at 20:52
  • 3
    This question appears to be off-topic because it is about R functionality. – gung - Reinstate Monica Mar 27 '14 at 20:52
  • You might be interested in reading this old thread: [Is there an R equivalent of SAS PROC FREQ?](http://stats.stackexchange.com/q/13855/7290) – gung - Reinstate Monica Mar 27 '14 at 20:54
  • Thank you. I had to try, may be there was some package that did that. `summary` (from the link you provided) works, but it's too little. May be there is a function like `xsummary` that does a little more? – Manuel Mar 27 '14 at 21:04
  • There are some such functions in several CRAN packages (e.g. `stat.desc` in `pastecs`, describe in `Hmisc` and `psych`, and a number of others) but usually I just make my own summary with exactly what I need each time. – Glen_b Mar 27 '14 at 23:21
  • @Glen_b That's true. And I understand your point absolutely. At first point I wanted to learn R, but I don't really need anything but some basic descriptive statistics, and some plots. I don't think it's worth it to learn R right now (just for that basic data treatment, and I'm not full of free time :P). I will look into those you suggested. – Manuel Mar 28 '14 at 10:37

1 Answers1

3

The pastecs package returns most of what you mentioned. Not sure what you meant by those $\alpha$ and $\beta$.

> library(pastecs)
> 
> set.seed(121)
> y1 <- rnorm(100)
> y2 <- rnorm(100)
> 
> stat.desc(cbind(y1,y2))
                       y1           y2
nbr.val      100.00000000 100.00000000
nbr.null       0.00000000   0.00000000
nbr.na         0.00000000   0.00000000
min           -3.21551021  -2.26262801
max            1.61533208   3.08124573
range          4.83084228   5.34387374
sum           -9.65469994  -3.02696571
median        -0.01899477   0.03549059
mean          -0.09654700  -0.03026966
SE.mean        0.08899350   0.09853204
CI.mean.0.95   0.17658241   0.19550894
var            0.79198425   0.97085623
std.dev        0.88993497   0.98532037
coef.var      -9.21763467 -32.55142151

For graph, there isn't one as far as I know, but the command is extremely easy to make using mfrow option in par().

Penguin_Knight
  • 11,078
  • 29
  • 48
  • That's a step further :D Thank you. By the way, I don't know their names in english $\alpha_n = \operatorname{E}[X^n]$ and $\beta_n = \operatorname{E}[(X-\mu)^n]$. – Manuel Mar 27 '14 at 21:12
  • 1
    @Manuel: your $\alpha_n$ and $\beta_n$ are $n$-th moments, about zero and centred about the mean respectively – Henry Mar 27 '14 at 21:27
  • Those are called raw $n^\text{th}$ moments and central $n^\text{th}$ moments respectively. But it looks like you want the sample equivalents of what you defined, which are population moments. – Glen_b Mar 28 '14 at 22:59