On Jun 28, 2015, at 10:03 AM, David Winsemius wrote: > > On Jun 27, 2015, at 8:06 PM, JAVAD BAYAT wrote: > >> Dear Bill Venables; >> >> Hi, I am using "cor" command to get the correlation coefficients for my data >> frame. I found somthing in the following site: " >> <https://stat.ethz.ch/pipermail/r-help/2000-January/009758.html> >> https://stat.ethz.ch/pipermail/r-help/2000-January/009758.html" . I used >> your functions to get the p-values for each variables. But I want to use >> Spearman method for my data frame. > > You should read the help page for the `cor` function. The adjustment to that > code will be very minor once you understand the available parameters.
I probably should have added a caution about necessarily assuming that the significance probability of the Spearman correlation being different than 0 would be distributed exactly as the Pearson correlation coefficient. There is a cor.test function that includes an option for "spearman". There is also an `rcorr` function in pkg:Hmisc that would do this on one line. > >> >> [[alternative HTML version deleted]] >> > > Now that you have subscribed, you should take the time to read the Posting > Guide and learn to set you mail-client to plain-text. > >> 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. > > -- > > David Winsemius > Alameda, CA, USA > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. David Winsemius Alameda, CA, USA ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.