|
Thanks for the help so far.
OK, a little more detail ....
I like to make graphs in R; my usual procedure is to write a .csv file, and then read that into R. This usually works with no p
What made me suspicious was that the variables have odd values in the R file; indeed, exactly one subject has odd values on a lot of variables.
Not missing, not a blank, just .... there somehow.
But maybe the error is elsewhere ....
In any case, I have another appointment, then I have to go .... will be back in this office on Thursday and will report back then with more detail
Peter
-----Original Message-----
>From: "Data _null_;" <iebupdte@gmail.com>
>Sent: Aug 11, 2009 10:10 AM
>To: Peter Flom <peterflomconsulting@mindspring.com>
>Cc: SAS-L@listserv.uga.edu
>Subject: Re: PROC EXPORT creating extra row
>
>The first record is the Variable names, which makes one more than
>number of records in data.
>
>Not sure about lrecl it may seem odd, but maybe not. What are
>attributes of variables?
>
>On 8/11/09, Peter Flom <peterflomconsulting@mindspring.com> wrote:
>> Hello
>>
>> I am running PROC EXPORT to convert a SAS data set to .csv format.
>>
>> The Export code is
>>
>> PROC EXPORT DATA= WORK.TODAY
>> OUTFILE= "C:\Analysis\Daniel OBrien\danny.csv"
>> DBMS=CSV LABEL REPLACE;
>> PUTNAMES=YES;
>> RUN;
>>
>> Start of LOG file is
>>
>> /**********************************************************************
>> 420 * PRODUCT: SAS
>> 421 * VERSION: 9.2
>> 422 * CREATOR: External File Interface
>> 423 * DATE: 11AUG09
>> 424 * DESC: Generated SAS Datastep Code
>> 425 * TEMPLATE SOURCE: (None Specified.)
>> 426 ***********************************************************************/
>> 427 data _null_;
>> 428 %let _EFIERR_ = 0; /* set the ERROR detection macro variable */
>> 429 %let _EFIREC_ = 0; /* clear export record count macro variable */
>> 430 file 'C:\Analysis\Daniel OBrien\danny.csv' delimiter=',' DSD DROPOVER lrecl=32767;
>> 431 if _n_ = 1 then /* write column names or labels */
>> 432 do;
>> 433 put
>> 434 '"' "ID" '"'
>> 435 ','
>> 436 '"' "Age" '"'
>> 437 ','
>> 438 '"' "Sex" '"'
>> 439 ','
>>
>> End of LOG is
>>
>>
>> NOTE: 126 records were written to the file 'C:\Analysis\Daniel OBrien\danny.csv'.
>> The minimum record length was 93.
>> The maximum record length was 1375.
>> NOTE: There were 125 observations read from the data set WORK.TODAY.
>> NOTE: DATA statement used (Total process time):
>> real time 0.13 seconds
>> cpu time 0.10 seconds
>>
>>
>> note that 126 were written, although only 125 were read, also the weird max record length.
>>
>>
>> any ideas what I am doing wrong?
>>
>> TIA
>>
>> Peter
>>
>> Peter L. Flom, PhD
>> Statistical Consultant
>> www DOT peterflomconsulting DOT com
>> I write some at:http://www.associatedcontent.com/user/582880/peter_flom.html
>> I trade books at http://www.bookmooch.com/
>>
Peter L. Flom, PhD
Statistical Consultant
www DOT peterflomconsulting DOT com
I write some at:http://www.associatedcontent.com/user/582880/peter_flom.html
I trade books at http://www.bookmooch.com/
|