Statistical Analysis Functions in R

[This article was first published on Optinalysis, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Lately, I’ve been using statistical tests on a daily basis. I’ve noticed that I have to format my data the same way in order to get it into R (tab-delimited flat file essentially). Every other change in order to prep that data structure for any sort of statistical analysis function require minimal modification to the data structure.


Why not kill several birds with the same stone? I’ve just written a wrapper function around a few smaller, independent R scripts which perform statistical analysis tests.


Get the code here:


https://github.com/ngopal/Statistical-Analysis-Functions


The input to the wrapper is a single, tab-delimited file (with the first row being the header). The output is a few PDF files, each complete with plots for different statistical analysis tests.


The statistical analysis tests which are currently performed are:
  • Principal Component Analysis (PCA)
  • K-means Clustering
  • Hierarchical Clustering
There are a few R scripts in the currently released package which require the user to download external libraries. These R scripts are turned off by default.

I am considering adding more statistical tests to the package–perhaps a t-test with a few box-and-whisker plots.

Now I can run one script and output several plots in one slick shot.

To leave a comment for the author, please follow the link and comment on their blog: Optinalysis.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)