[R] Octave scale transformation

Dr Andrew Wilson eia018 at comp.lancs.ac.uk
Tue Oct 28 10:34:15 CET 2003


Is it possible to convert a data table in "R" to an octave scale (as
done, for example, in the MVSP multivariate stats program)?

I work with tables of word or category frequencies across a number of
texts or text segments, e.g.:

Token	sect_1	sect_2	sect_3	sect_4	sect_5	sect_6	sect_7	sect_8
sect_9	sect_10	sect_11	sect_12	sect_13	sect_14	sect_15	sect_16	sect_17
sect_18	sect_19	sect_20	sect_21	sect_22	sect_23
advance	0	0	0	0	0	1	0	0	0
0	4	0	0	0	2	0	0	0	0
0	0	0	0
aed	0	1	3	0	0	1	0	0	0
0	4	0	0	0	0	4	2	3	0
0	0	1	1
agree	0	0	0	1	0	0	0	0	0
0	0	1	0	0	0	0	0	0	0
0	0	1	0
antibiotics	0	0	0	0	0	0	0	0
0	0	0	3	1	0	0	0	0	0
0	1	0	0	0

However, the texts/segments are typically of different lengths and the
analysis program doesn't calculate proportional frequencies.  (NB: It also
doesn't select *all* words in the texts, so it is not possible to
calculate true percentages "after the fact".) 

What I want to do is to transform the data before calculating distances
and carrying out clustering or multidimensional scaling, so that the
differences in text/segment size don't (heavily) bias the results.

Many thanks,
Andrew Wilson




More information about the R-help mailing list