Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Import of NIST ANOVA data sets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100042] Re: [mg100010] Import of NIST ANOVA data sets
  • From: Darren Glosemeyer <darreng at wolfram.com>
  • Date: Fri, 22 May 2009 01:46:42 -0400 (EDT)
  • References: <200905210417.AAA10078@smc.vnet.net>

Adrian wrote:
> Hello,
>
> I am using Mathematica 7 and if I bring the data set into Excel 2007
> then save it as an .xls file, Mathematica imports the data fine but
> the then the ANOVA fails (Error: "ANOVA::arg1:The 1st argument has
> unequal columns or rows.").  If I save the .xls file as a CSV file,
> import it into Mathematica and run the ANOVA, it runs successfully.
> Any ideas on why the xls import is breaking the ANOVA?
>
>
> Thanks,
> Adrian.
>   

I suspect this is because XLS files could have multiple sheets, and so 
the imported result is a list containing the data for each sheet. In 
your case, there may only be one sheet, but the result would still be a 
list containing the data for that one sheet. If this is the case, you 
could use

Import[file, {"Sheets", 1}]

to just import the contents of the first sheet, or use

Import[file][[1]]

to pick the first element (the first sheet) out of the imported result 
for the entire file.


Darren Glosemeyer
Wolfram Research


  • Prev by Date: Re: A question on Grid and nested lists
  • Next by Date: Re: Re: Are you wolfing tonight?
  • Previous by thread: Import of NIST ANOVA data sets
  • Next by thread: Re: Import of NIST ANOVA data sets