[R] newbie: table,mean for all variables

About this list Date view Thread view Subject view Author view Attachment view

From: C. Schulz (ozric@web.de)
Date: Mon 14 Jan 2002 - 23:58:38 EST


Message-id: <200201141258.g0ECwbC18992@mailgate5.cinetic.de>

Hello,
(1)
what is the way to use
table for the hole dataSet ?

I would get a cross-table with x1 and other variables in the dataSet which have got 100 columns :

 table(x1,data[variable2 until variable 100])/length([variable2 until variable 100])*100

like this but it's wrong ?
 table(x1,data[,2:100])/length(data[,2:100])*100

if i type: table(data[,1:10])
to get the frequency distribution of the first 10 variables ,
i get not the wished tables ?

(2)
is it possible to set factors for
all variables in a dataSet in one step
i.e. levels are all similar(?=NA,0,20,40,60,80,100)?

Additional how can i get all mean's in one step,too ?
I know that i cannot use the mean-function, because
i have NA's and factor variables.
So have got anybody a good tip i.e.
is it possible to get only the mean from the "summary" procedure ?

thanks for advance,
regards, Christian Schulz

________________________________________________________________
Keine verlorenen Lotto-Quittungen, keine vergessenen Gewinne mehr!
Beim WEB.DE Lottoservice: http://tippen2.web.de/?x=13

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Thu 17 Jan 2002 - 11:10:11 EST