s-news
[Top] [All Lists]

"really" formatted ASCII export

To: s-news@wubios.wustl.edu
Subject: "really" formatted ASCII export
From: sprice@usgs.gov
Date: Thu, 30 Nov 2000 18:38:30 -0500
Hi,

     Since S-Plus is so great for data manipulation,  I want to pose this
question with regard to data output.  As a simple example, if I have a
dataframe (5 x 3) with the fields: ID, X1, Y1, X2, Y2  and I want to create
an ASCII file in format with line feeds and the word END added as indicated
below (for the ESRI tribe - yes, I'm creating a generate file).  Is there a
way to do this in S-Plus or am I left with outputting a regular ASCII file
and then using awk/sed?  Any suggestions would be welcomed.  Thanks.
Susan

Data Frame
ID     X1     Y1     X2     Y2
1         3        3        4        4
2          5       5        6         6
3         7        7        8          8

Desired Output Ascii File Format
1
3,3
4,4
END
2
5,5
6,6
END
3
7,7
8,8
END
END


Susan D. Price
US Geological Survey
MS 521, National Center
Reston, VA 20192
703-648-6692
sprice@usgs.gov


<Prev in Thread] Current Thread [Next in Thread>
  • "really" formatted ASCII export, sprice <=