[R] How Aggegate Data in R

chao gai chaogai at duineveld.demon.nl
Thu Nov 16 20:07:57 CET 2006


Having no SPSS I have to resort to deductive inference. It seems that you want 
to make a frequency table of the occurence of these 25 digit strings, hence 
?xtab
?table
spring to mind. I have the faint suspicion that seeing this as 25 variables 
might be less efficient than seeing it as one 25 digit string, but having no 
idea about the purpose or background, that is as far as one may go.

Kees

On Thursday 16 November 2006 19:32, "Xavier Giovanni Ordóñez Camacho" wrote:
> Hello:
>
> When I use SPSS I execute the AGGREGATE DATA comand for the next data:
>
> 2112141123212213212213334
> 3143244113442312121213344
> 2114141123112214212113344
> 2112211122212413421213221
> 3114444123442414343413344
> 2312231223212222323223322
> 2143241123212313131213234
> 2113241113212313222213333
> 2113141123112214212113344
> 2114141123412111114413344
> 2113211122342314222313234
> 2114141123112414212113344
> 2114241123412414422313334
> 2343341333323233333343322
> 2213241223212322222223333
> 3113244123342212232312334
> 2113241123342213232313334
> 2114141123112214222113334
> .
> .
> .
> .
>
> The syntax is:
>
> AGGREGATE
>   /OUTFILE='C:\Documents and Settings\Corazón\Mis documentos\copia.sav'
>   /BREAK=i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19
> i20 i21 i22 i23 i24 i25 /N_BREAK=N.
>
> The results is:
>
> 1112241123312213222443444  1
> 2111141123112212312313334  1
> 2111141123112414212113344  2
> 2111241123112311124312231  1
> 2111341122112111412113341  1
> 2111341123312213312413334  1
> 2112141123212213212213334  1
> 2112211122212413421213221  1
> 2112241113312313334313333  1
> 2112341123312313434313331  1
> 2113141123112212414113334  1
> 2113141123112214212113344  2
> 2113141123112312212113244  1
> 2113141123112314312113344  1
> 2113141123112412212113334  1
> .
> .
> .
>
> Where the last column corresponds to count of cases present in the data.
> I need to obtain similar results in R, but I do not know. Please,
> Could any one suggest how to make this with R?
>
> Thanks in advance,
>
>
> Xavier
>
> =======================
> Xavier G. Ordoñez
> Doctoral Student
> Facultad de Educacion
> Departamento MIDE
> Universidad Complutense de Madrid
> C/ Rector Royo Villanova s/n
> 28040 - Madrid
> Spain
>
> Tel: +34-913946140
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.



More information about the R-help mailing list