Re: [R] Normality tests

From: Peter Ehlers <ehlers_at_ucalgary.ca>
Date: Tue, 26 Apr 2011 13:44:16 -0700

On 2011-04-26 13:15, Bruce Kindseth wrote:
> I have a large amount of data which I break down into a collection of
> vectors of 100-125 values each. I would like to test the normality of the
> vectors and compare them. In the interactive mode I can test any one vector
> using the Shapiro-Wilk test or the Kolmogorov-Smirnov test. My problem is
> that when I try to write out the results to a file, the term output is a
> mixture of alpha characters along with the number value that I really want.
> How can I get it to write out just the p-values by themselves?

Try

   shapiro.test(rnorm(100))$p.value

Put all your p.values into a vector and write that out.

While you're at it, check ?str to see how handy the str() function is in identifying the pieces of an R object.

Peter Ehlers

>
> Thank you very much for your time.
>
> Bruce Kindseth
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 26 Apr 2011 - 20:48:44 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 26 Apr 2011 - 20:50:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive