Posts Tagged ‘ functions ’

Example 8.8: more Hosmer and Lemeshow

October 5, 2010
By
Example 8.8: more Hosmer and Lemeshow

This is a special R-only entry.In Example 8.7, we showed the Hosmer and Lemeshow goodness-of-fit test. Today we demonstrate more advanced computational approaches for the test.If you write a function for your own use, it hardly matters what it looks l...

Read more »

Dumping functions from the global environment into an R script file

September 15, 2010
By

Looking at a project you didn’t touch for years poses many challenges. The less documentation and organization you had in your files, the more time you’ll have to spend tracing back what you did back when the code was written. I just opened up such a project, that was before I ever knew to split my .r files to...

Read more »

Clustergram: visualization and diagnostics for cluster analysis (R code)

June 15, 2010
By
Clustergram: visualization and diagnostics for cluster analysis (R code)

About Clustergrams In 2002, Matthias Schonlau published in “The Stata Journal” an article named “The Clustergram: A graph for visualizing hierarchical and . As explained in the abstract: In hierarchical cluster analysis dendrogram graphs are used to visualize how clusters are formed. I propose an alternative graph named “clustergram” to examine how cluster members are assigned to clusters as...

Read more »

Expressions in expresssion passed to functions that return functions

October 5, 2009
By

OK in the last two tips I explained how functions can return functions and how to leverage expressions. Now lets get complicated. This is really how my testing code works; expressions embeded in expressions that are passed to functions that return fu...

Read more »

Functions from functions

October 5, 2009
By

I've been really busy lately working on my dissertation and applying for jobs. But I've found a few really cool things that I'd like to share. These are pretty complex things so lets break it up into a few tips. First Tip: did you know that you can re...

Read more »

Getting at the internals of R functions

April 20, 2009
By

I got asked the question the other day about how to get to the internals of a function. I realized that this was not something that I had covered yet on my tips blog. read more

Read more »

Using partial name matching and match.arg

April 13, 2009
By

Sorry it has been so long to write an R tip. I've been really busy with my research, which you would think would produce lots of tips, but apparently not. Anyway here is a little tip to look at. read more

Read more »