st: converting many rows into one

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

st: converting many rows into one

Arina Viseth
Dear Stata users,

I am trying to convert many rows into one row.
Any idea of how I could do it?

Thanks a lot in advance.

Arina
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

st: RE: converting many rows into one

Martin Weiss-5
Line for the server...

Remember the FAQ, 3.2:

"Many questions do not get answered because they are too short". Why do you
want to convert your data into a single row? It is hard to think of a
practical use for such a procedure...

HTH
Martin


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Arina Viseth
Sent: Tuesday, December 02, 2008 6:06 PM
To: [hidden email]
Subject: st: converting many rows into one

Dear Stata users,

I am trying to convert many rows into one row.
Any idea of how I could do it?

Thanks a lot in advance.

Arina
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

st: RE: converting many rows into one

Howard Lempel
In reply to this post by Arina Viseth
Arina,

As Martin mentioned, this posting's a bit too brief and it's hard to tell exactly what you want to do.  This is only a guess, but perhaps you want to -reshape- your data from long to wide.  See -help reshape- if that's what you'd like to do.

Howie


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Arina Viseth
Sent: Tuesday, December 02, 2008 12:06 PM
To: [hidden email]
Subject: st: converting many rows into one

Dear Stata users,

I am trying to convert many rows into one row.
Any idea of how I could do it?

Thanks a lot in advance.

Arina
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: st: converting many rows into one

Philipp Rehm
In reply to this post by Arina Viseth
.
Not sure what you mean, but perhaps -reshape- helps (in particular,
-reshape wide-).

HTH,
Philipp

Arina Viseth wrote:

> Dear Stata users,
>
> I am trying to convert many rows into one row.
> Any idea of how I could do it?
>
> Thanks a lot in advance.
>
> Arina
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: st: RE: converting many rows into one

Arina Viseth
In reply to this post by Martin Weiss-5
I apologize for such short question. Hopefully, I explain better what I am looking for below.


Here is how my dataset currently looks like:

"column 1"    "column 2"
Location A    goods1
Location A    goods2
Location A    goods3
Location B    goods2
Location B    goods3
Location B    goods4
Location B    goods6


I would like to have only one row for each location so the data would look like the following:

Location A    goods1/goods2/goods3
Location B    goods2/goods3/goods4/goods6


Any suggestion would be welcome. Thanks a lot again.

Arina

---- Original message ----

>Date: Tue, 2 Dec 2008 18:09:09 +0100
>From: [hidden email] (on behalf of "Martin Weiss" <[hidden email]>)
>Subject: st: RE: converting many rows into one  
>To: <[hidden email]>
>
>Line for the server...
>
>Remember the FAQ, 3.2:
>
>"Many questions do not get answered because they are too short". Why do you
>want to convert your data into a single row? It is hard to think of a
>practical use for such a procedure...
>
>HTH
>Martin
>
>
>-----Original Message-----
>From: [hidden email]
>[mailto:[hidden email]] On Behalf Of Arina Viseth
>Sent: Tuesday, December 02, 2008 6:06 PM
>To: [hidden email]
>Subject: st: converting many rows into one
>
>Dear Stata users,
>
>I am trying to convert many rows into one row.
>Any idea of how I could do it?
>
>Thanks a lot in advance.
>
>Arina
>*
>*   For searches and help try:
>*   http://www.stata.com/help.cgi?search
>*   http://www.stata.com/support/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/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Reply | Threaded
Open this post in threaded view
|

Re: st: RE: converting many rows into one

Arina Viseth
In reply to this post by Howard Lempel
Dear Howie,

I have looked help reshape and I think this is what I am looking for!

Thank you very much.

Arina

---- Original message ----

>Date: Tue, 2 Dec 2008 12:19:27 -0500
>From: [hidden email] (on behalf of Howard Lempel <[hidden email]>)
>Subject: st: RE: converting many rows into one  
>To: "[hidden email]" <[hidden email]>
>
>Arina,
>
>As Martin mentioned, this posting's a bit too brief and it's hard to tell exactly what you want to do.  This is only a guess, but perhaps you want to -reshape- your data from long to wide.  See -help reshape- if that's what you'd like to do.
>
>Howie
>
>
>-----Original Message-----
>From: [hidden email] [mailto:[hidden email]] On Behalf Of Arina Viseth
>Sent: Tuesday, December 02, 2008 12:06 PM
>To: [hidden email]
>Subject: st: converting many rows into one
>
>Dear Stata users,
>
>I am trying to convert many rows into one row.
>Any idea of how I could do it?
>
>Thanks a lot in advance.
>
>Arina
>*
>*   For searches and help try:
>*   http://www.stata.com/help.cgi?search
>*   http://www.stata.com/support/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/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/