[R] coulmns format

Martin Maechler maechler at stat.math.ethz.ch
Thu May 8 15:21:40 CEST 2003


>>>>> "FabDeA" == De Amicis Fabrizio (G I T ) <Fabrizio.DeAmicis at git.generali.ch>
>>>>>     on Thu, 8 May 2003 13:12:44 +0200  writes:

    >> HI, with the command,
    >> 
    >> jj<-tapply(j1,j2,sum)
    >> 
    >> the result is
    >> 
    >> > jj
    >> AUTOSTELLA             CAIZZONE CENTRO B PEL E C SNC
    >> CHROMOLI             CONSORZI 
    >> 308178               152183               120468
    >> 150658               325459 
    >> GIUNTIMA          LINEAGERMAI             MAN NORD
    >> PDM              RINALDI 
    >> 285285               403875               293926
    >> 145196               293923 
    >> 
    >> 
    >> question: there is a way to obtain the result in the following way?
    >> 
    >> 
    >> AUTOSTELLA		308178     
    >> CAIZZONE			152183
    >> CENTRO B PEL E C SNC	120468	
    >> CHROMOLI			150658
    >> CONSORZI			325459
    >> GIUNTIMA			285285
    >> LINEAGERMAI		403875
    >> MAN NORD			293926
    >> PDM			145196	
    >> RINALDI			293923
    >> 

cbind(jj)

makes a 1-column matrix
and will probably print the way you want.

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><




More information about the R-help mailing list