Hi, Is there a way to create a list of all statistical test functions in base R? For example, there's t.test, ks.test, chisq.test, etc. I'd like to create a list of these test names because I keep looking for different tests but never know what's available. I'm thinking of a regular expression statement but I'm not sure how this would work for functions. Or is there a list already available? Any suggestions? Thanks, Walt ________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 ________________________ (V) 609-936-8999 (F) 609-936-3733 walt at dataanalyticscorp.com www.dataanalyticscorp.com
listing all test functions in base R
4 messages · Data Analytics Corp., Brian Ripley, M.Gagolewski +1 more
On 02/01/2013 12:40, Data Analytics Corp. wrote:
Hi, Is there a way to create a list of all statistical test functions in base R? For example, there's t.test, ks.test, chisq.test, etc. I'd like to create a list of these test names because I keep looking for different tests but never know what's available. I'm thinking of a regular expression statement but I'm not sure how this would work for functions. Or is there a list already available? Any suggestions?
help.search(keyword="htest") may be what you are looking for: in any case, help.search was the place to start.
Thanks, Walt
________________________ Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 ________________________ (V) 609-936-8999 (F) 609-936-3733 walt at dataanalyticscorp.com www.dataanalyticscorp.com
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On 02.01.2013 13:40, Data Analytics Corp. wrote:
Is there a way to create a list of all statistical test functions in base R? For example, there's t.test, ks.test, chisq.test, etc. I'd like to create a list of these test names because I keep looking for different tests but never know what's available. I'm thinking of a regular expression statement but I'm not sure how this would work for functions. Or is there a list already available? Any suggestions?
Hello,
Perhaps you could operate on function names.
Maybe something like:
funs <- getNamespaceExports("stats")
funs[grep(".*test$", funs)]
Regards,
Marek Gagolewski, Ph.D. Systems Research Institute, Polish Academy of Sciences ul. Newelska 6, 01-447 Warsaw, Poland phone: +48 22 3810 393, fax: +48 22 3810 105 www: http://www.ibspan.waw.pl/~gagolews
Certainly apropos() is easier, no? Michael
On Jan 2, 2013, at 1:56 PM, "M.Gagolewski" <egzaltowany at gmail.com> wrote:
On 02.01.2013 13:40, Data Analytics Corp. wrote:
Is there a way to create a list of all statistical test functions in base R? For example, there's t.test, ks.test, chisq.test, etc. I'd like to create a list of these test names because I keep looking for different tests but never know what's available. I'm thinking of a regular expression statement but I'm not sure how this would work for functions. Or is there a list already available? Any suggestions?
Hello,
Perhaps you could operate on function names.
Maybe something like:
funs <- getNamespaceExports("stats")
funs[grep(".*test$", funs)]
Regards,
--
Marek Gagolewski, Ph.D.
Systems Research Institute, Polish Academy of Sciences
ul. Newelska 6, 01-447 Warsaw, Poland
phone: +48 22 3810 393, fax: +48 22 3810 105
www: http://www.ibspan.waw.pl/~gagolews
______________________________________________ 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.