s-news
[Top] [All Lists]

Re: Help with the data manipulation

To: "Chen,Sichong" <sichong.chen@postgrad.manchester.ac.uk>
Subject: Re: Help with the data manipulation
From: David L Lorenz <lorenz@usgs.gov>
Date: Thu, 29 Jun 2006 07:36:47 -0500
Cc: s-news@lists.biostat.wustl.edu, s-news-owner@lists.biostat.wustl.edu
In-reply-to: <20060628230655.99DA31007139@mailgate.biostat.wustl.edu>

Sichong,
  The USGS library for S-PLUS has a function that will do just that. It is called group2row. The library can be obtained from http://water.usgs.gov/software/library.html. Installation instructions are included. The library was designed for version 6.1 and greater for Windows only. Documentation is available under Help | Available help | USGS.
  For the group2row function for your data, the carryColumns is column 2, the splitColumn is column 1, and collectColumns is column 3. There is a GUI interface for this function too.
Dave



"Chen,Sichong" <sichong.chen@postgrad.manchester.ac.uk>
Sent by: s-news-owner@lists.biostat.wustl.edu

06/28/2006 06:06 PM

To
<s-news@lists.biostat.wustl.edu>
cc
Subject
[S] Help with the data manipulation





Dear User

Could you be so kind to help me with this question.

I have data set (11*3) like this:

1001                 19950101                 123                
1001                 19950102                 234                
1001                 19950103                 345                
1002                 19950101                 1234                
1002                 19950102                 2345                
1002                 19950103                 3456                
1002                 19950104                 4567                
1003                 19950101                 12345                
1003                 19950102                 23456                
1003                 19950103                 34567                
1003                 19950104                 45678                

I would like to transfer it to

                1001                 1002                 1003                
19950101                 123                 1234                 12345                
19950102                 234                 2345                 23456                
19950103                 345                 3456                 34567                
19950104                 NA                 4567                 45678                


1001, 1002, 1003 could be column names, or just ignore them as they are used
to identify which column the data should be allocated.

Function merger is unlikely to be used in my case because I have thousands
of blocks, which means from 1001 to 7000.

Any suggestion is appreciated.

Many thanks,
Sichong
SPlus 7.0 & FinMetrics 2.0 User
Windows XP


--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>