Skip to content

using table function

4 messages · Ricardo Perrone, PIKAL Petr, John Kane +1 more

#
Hi,

How to join  two large vectors ordered, where one has the variable's levels and another has the frequencies, in way similar to that showing by table function in R console? and considering this two vectors how to use summary function to produce statistical informations like mean, sd, min, max and quartile?

Thanks
Ricardo




      ____________________________________________________________________________________
Looking for last minute shopping deals?
#
Hi

replicate your levels frequencies times and use mean, sd, max and quartile 
or summary.

Regards
Petr
petr.pikal at precheza.cz

r-help-bounces at r-project.org napsal dne 15.01.2008 18:55:15:
levels
summary
quartile?
____________________________________________________________________________________
http://www.R-project.org/posting-guide.html
#
Can you give a simple example.  I am not clear on what
you mean but table function in R console" when you
talk about two vectors.
--- Ricardo Perrone <perrone at rocketmail.com> wrote:

            
____________________________________________________________________________________
#
Ricardo Perrone <perrone at rocketmail.com> wrote:
Hi Ricardo,
I'll guess that you mean two vectors like this:

V1	1	2	3	4	5

V2	10	21	32	45	5

cat(formatC(V1,width=8),"\n",formatC(V2,width=8),"\n",sep="")

Then you might want:

datavec<-rep(V1,V2)

and perform the summaries on that vector.

Jim