Hi useRs & developeRs,

I got stuck within a function of the Hmisc package. Sounds easy, hope it is:

I got 2 items (FamTyp.kurz, HGEW) of same length, no missings.

> length(FamTyp.kurz);summary(FamTyp.kurz)
[1] 14883
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  10.00   20.00   21.00   21.66   23.00   31.00 
> length(HGEW);summary(HGEW)
[1] 14883
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  104.5   409.6   489.4   549.8   623.3  3880.0   

Now I simply want to compute a table of unweighted and weighted values. But, 
...  the weights do not seem to be accepted ????

 
>   print("unweighted ....");print(table(FamTyp.kurz))
[1] "unweighted ...."
FamTyp.kurz
  10      11    20       21     22      23     30      31 
1755  683 3322 1683 2428 1440 1748 1824   

>   print("weighted   
> ....");print(wtd.table(FamTyp.kurz,weigths=HGEW,normwt=FALSE,na.rm=TRUE))
[1] "weighted   ...."
Error in wtd.table(FamTyp.kurz, weigths = HGEW, normwt = FALSE, na.rm = TRUE) : 
  unused arguments (weigths = c(495.55949, 495.55949, 678.16378, 678.16378,  
.....
  
  
any ideas ???  

thanx in advance,
    Norbert

______________________________________________
R-help@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.

Reply via email to