Popup notification from R on Windows

After R is done running a long process, you may need to notify the operator to check the R console and provide the next commands. Without installing any more software or creating any batch files or VBS scripts, here is a simple way to create the popup notice in Windows

Word could not create the work file. Check the temp environment variable

Encrypting the Microsoft Windows temporary folder causes Microsoft Outlook 2010 to not open Word file attachments because of these “cryptic” errors: Word could not create the work file. Check the temp environment variable The file (filename) cannot be opened because there are problems with the contents. Unspecified error Location: Part: /word/document.xml, Line:2, Column:0 Run this…

100% stacked bar chart in SAS’s SGPLOT

A 100% stacked bar chart is useful for comparing the relative frequencies of an m x n table where frequencies in m are very different. While this is easy to do in Excel, SAS requires an extra step, which you could call a hack or a trick. First, let’s create an example data set. Say…

Comparing continuous distributions with R

In R we’ll generate similar continuous distributions for two groups and give a brief overview of statistical tests and visualizations to compare the groups. Though the fake data are normally distributed, we use methods for various kinds of continuous distributions. I put this together while working with data from an odd distribution involving money where…

Plotting individual growth charts

This R code draws individual growth plots as shown in “Applied Longitudinal Data Analysis: Modeling Change and Event Occurrence” by Judith D. Singer and John B. Willett, an excellent book on multilevel modeling and survival analysis. This code recreates figure 2.5 on page 32 with the caption, “OLS summaries of how individuals change over time.…