userfriendlyscience.com
Scientific research made accessible
Research tools | Explanations | R packages
 
Welcome to userfriendlyscience.com. In the future, this domain will strive to provide overviews of free or cheap instruments for research, as well as explanations of how to use those tools. For now, it only informs people about the userfriendlyscience R package, which you can install with:
install.packages('userfriendlyscience');
At this point, R will probably ask you to choose a mirror, and will then proceed to download packages that are required by the userfriendlyscience package, and the packages required by those packages, etc. Once it's done, you can load the package with:
require('userfriendlyscience');
You can get an overview of the userfriendlyscience package, with a link to the index with a list of the functions in the package, with:
?userfriendlyscience;
Or you can go ahead and testdrive some function. Then, first create a simple dataset:
dat <- data.frame(x1 = factor(rep(c(0,1), 20)), x2 = factor(c(rep(0, 20), rep(1, 20))), y=rep(c(4,5), 20) + rnorm(40));
Or simply load your own dataset from SPSS. This command displays a simple file dialog that allows you to select your datafile, which is then stored as 'dat' in R:
dat <- getData(use.value.labels=FALSE);
And then compare two means (replace 'x1' and 'y' with your own variable names):
meanDiff(x=dat$x1, y=dat$y);
Or for both predictors at the same time:
meanDiff.multi(dat, x=c("x1", "x2"), y=c("y"));
Or you can create a dot-line-violin plot:
dlvPlot(dat, x='x1', y='y', posDodge=.3);
Or a more complicated version with a moderator:
dlvPlot(dat, x='x1', y='y', z='x2', posDodge=.3);
Note that for some functionalities, such as itemInspection and scaleInspection, you will need an installation of LaTeX. See the help for more information:
?rnwString
You can download a portable version for Windows at http://miktex.org/portable and for Mac OS X at http://tug.org/mactex/.


If you have any questions, you can contact me through http://behaviorchange.eu.