Please consider the following data:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str8 childid float information_network "IN010001" . "IN010001" 1 "IN010001" 0 "IN010001" 1 "IN010002" . "IN010002" 0 "IN010002" 0 "IN010002" 1 "IN010003" . "IN010003" 1 "IN010003" 1 "IN010003" 0 "IN010004" . "IN010004" 0 "IN010004" 0 "IN010004" 1 "IN010005" . "IN010005" 0 "IN010005" 0 "IN010005" 0 "IN010006" . "IN010006" 0 "IN010007" . "IN010007" 1 "IN010007" 0 "IN010007" 1 "IN010008" . "IN010008" 1 "IN010008" 1 "IN010008" 1 "IN010009" . "IN010009" 0 "IN010009" 1 "IN010009" 0 "IN010010" . "IN010010" 1 "IN010010" 0 "IN010010" 1 "IN010011" . "IN010011" 1 "IN010011" 0 "IN010011" 0 "IN010012" . "IN010012" 1 "IN010012" 1 "IN010012" 1 "IN010013" . "IN010013" 0 "IN010013" 1 "IN010013" 1 "IN010014" . "IN010014" 1 "IN010014" 1 "IN010014" 1 "IN010015" . "IN010015" 0 "IN010015" 0 "IN010015" 1 "IN010016" . "IN010016" 1 "IN010016" 1 "IN010016" 1 "IN010017" . "IN010017" 0 "IN010017" 0 "IN010017" 0 "IN010018" . "IN010018" 0 "IN010018" 0 "IN010018" 1 "IN010019" . "IN010019" 0 "IN010019" 0 "IN010019" 1 "IN010020" . "IN010020" 0 "IN010020" 0 "IN010020" 0 "IN010021" . "IN010021" 0 "IN010021" 1 "IN010021" 1 "IN010023" . "IN010023" 0 "IN010023" 1 "IN010023" 1 "IN010024" . "IN010024" 0 "IN010024" 1 "IN010024" 1 "IN010025" . "IN010025" 1 "IN010025" 1 "IN010025" 0 "IN010026" . "IN010026" 1 "IN010026" 0 "IN010026" 1 "IN010027" . "IN010027" 1 end
Code:
tab information_network return list putexcel A1=(r(N),r(r)) using Summary_stats_2
This generated the following results step wise:
Code:
information | _network | Freq. Percent Cum. ------------+----------------------------------- 0 | 1,808 31.47 31.47 1 | 3,938 68.53 100.00 ------------+----------------------------------- Total | 5,746 100.00 scalars: r(N) = 5746 r(r) = 2 using not allowed
Code:
putexcel A1=(r(N),r(r)) no Excel file specified
Thanks
0 Response to Exporting results of tabulate to excel
Post a Comment