"R provides Type I sequential SS, not the default Type III marginal SS reported by SAS and SPSS. In a nonorthogonal design with more than one term on the right hand side of the equation order will matter (i.e., A+B and B+A will produce different results)! We will need use the drop1( ) function to produce the familiar Type III results."

when adding a variable for residual values for all participants, na.omit gives an error as the number of residual values doesn't match the number of participants (i.e. 745 residual values and 1000 participants). Use na.exclude in lm.

I couldn't load a data frame saved inside an rdata file because the name started with a number. The solution was to do;
new.data <- `123old_data`
Make sure to use backticks.

Run code from beginning to the current line: Ctrl:Alt:b

Why as.numeric changes the numbers for character items.

Math and biostats are the shortest. History is the longest. Nobody is suprised.

Listing of classic R datasets used in various packages

How to delete rows under certain condigions

Add NA where there are no values.

Hadley Wickhams's GitHub page for his advanced R development courses. Includes useful material on advanced programming in R as well as package development.

Markdown package for the R statistical software environment. Handy for publishing R code (e.g. to Rpubs) and for integrating latex, comments and other text more seamlessly into code.