Re: Help: about numAsciiRow() and readAsciiTable

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 6 Apr 2009 14:58:49 -0600 (MDT)

I didn't see see a response to this. I asked Dennis about it offline,
and he thinks it may be that your ASCII file doesn't have an
end-of-line character after the last line in your file.

--Mary

On Tue, 31 Mar 2009, Wang Wenshan wrote:

> Hi,
> I am trying to read some txt files with the function readAsciiTable(). It seems this function doesn't read the last row of my data file.
>
> the data(Test.txt):
> v01000 V04001 V04002 V04003 V10201 V10202 V12001 V12052 V12053 V13003 V13007 V13201 V11002 V11042 V11212 V11041 V11043 V14032 V10004
> 53782,2005,12,23,9359,9284,41,104,-1,21,14,0,28,56,15,144,15,79,9324,
> 53772,2005,12,30,9368,9338,-11,35,-72,46,26,0,19,53,5,86,5,0,9357,
> 53772,2005,12,31,9379,9336,-30,3,-45,91,45,4,14,48,5,70,5,0,9357,
>
> the code:
> begin
> ncol=numAsciiCol("Test.txt")
> nrow=numAsciiRow("Test.txt")
>
> print(nrow)
>
> old=readAsciiTable("Test.txt",ncol,"float",1)
> printVarSummary(old)
>
> print("done!")
> end
>
> Results:
> nrow=3
> old: [2]*[19]
>
> Do I get it wrong or use it in a wrong way?
> Thank you!
> Best wishes,
> Wang Wenshan
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Apr 06 2009 - 14:58:49 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 07 2009 - 10:01:36 MDT