Skip to content
Prev 15849 / 398500 Next

shapiro-wilks test

I believe that the problem that you are having is that in the first example,
you are trying to have the test performed on a data frame (data in the form
of rows and columns) rather than a data vector (a single column of data),
which is what the function requires.

In the second example, you need a different syntax to refer specifically to
"colB" as a data vector within your frame.

If you use the format:

shapiro.test(d$colB)

it should work.

Note the use of the "$" to refer to the column within the frame.

You can type "help(shapiro.test)" to access the help for this particular
function.  You will note that the "x" argument in the function syntax is
defined as a numeric vector.

You can also access the general documentation via the Help menu or by typing
"help.start()". These options will provide you with access to the .PDF and
.HTML manuals and associated documentation to review some of the basic R
concepts and examples. You may wish to start with the "Introduction to R",
which covers the basics.

Regards,

Marc

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._