r:comandi:xtabs
Indice
xtabs
DRAFT
xtabs consente di produrre tabelle di contingenza, ma non distribuzioni di frequenza.
Ponderazione dei dati
Per ponderare i dati delle tabelle di contingenza, è sufficiente aggiungere, come primo parametro weight ~
, dove weight è il vettore numerico che contiene i pesi da attribuire ai casi.
xtabs(weight ~ opinion + gender + ...)
xtabs(V3 ~ V1 + V2, DF) ## V3 pesi ## DF Dataframe
http://stat.ethz.ch/R-manual/R-patched/library/stats/html/xtabs.html
r/comandi/xtabs.txt · Ultima modifica: 11/08/2025 14:37 da Agnese Vardanega