Re: Dealing with large data sets
- To: mathgroup at smc.vnet.net
- Subject: [mg43049] Re: Dealing with large data sets
- From: Bill Rowe <listuser at earthlink.net>
- Date: Sat, 9 Aug 2003 02:57:50 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
On 8/8/03 at 12:26 AM, txdiversity at hotmail.com (txdiversity) wrote: > I want to talk about my trial on this topic, and give some questions > that are very simple but are not got to me, very beginner on this > Mathematica. > [James] According to your guidelines, I did it as below and seem well > done it. However, I got simple questions: how to use NumberQ[] to check > with imported data, and how to plot it. Below are my scripts: > ] << Statistics`DescriptiveStatistics` > ] Directory[] > ] SetDirectory["C:\users\mathematica"] > ] A = Import["test.txt", "List"] > ] Mean[A] > [James] It is almost well done until above line. > ] A[1] <-- I can not refer first element by this command, how to do it? The syntax you need is A[[1]] or Part[A,1] or First@A. > ] Plot(A) <-- Further, I can not draw graph it. To plot a list of numbers use ListPlot as in ListPlot[A] It isn't clear what you are asking about NumberQ. If you wanted to check that all of the elements of a one dimension list are numbers you could do And@@NumberQ/@list This will output False if one or more elements of list are not numbers and True if all of the elements are numbers Perhaps more useful is the function DropNonNumeric in the package Statistics`DataManipulation`. This will delete all non-numeric values from a one dimension list and all rows with non-numeric values in a two dimension list.