Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Beginner Q: 7mil obs - how to add variables


From   Scott Merryman <[email protected]>
To   [email protected]
Subject   Re: st: Beginner Q: 7mil obs - how to add variables
Date   Tue, 8 Oct 2013 14:03:31 -0500

-collapse (sum) sum_value = value, by(string)-

Scott


On Tue, Oct 8, 2013 at 1:46 PM, Coleman, Greg <[email protected]> wrote:
> Hi
> My data has 7 million observations and 29 variables. About 10 of the variables are string, and I am trying to get some patterns of the numerical values which are related to the strings. To clarify,
>
> String                    Value
> AB1234                 25
> CDE789                 44
> F9999                    126
> CDE789                 10
> AB1234                 3
> F9999                    100
>
> I would like to get output that looks like the sum of values, per string:
> AB1234 28
> CDE789 54
> F9999 226
>
> Some strings are just numbers, some are just letters, and some are a combination.
> Can anyone assist?
> Thanks!
> Greg
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index