Blog Archives

Variance-Covariance Matrix in glm

July 20, 2007
By

This is a small function Venables and Ripley provide in their MASS book. You don't need it anymore because vcov() has a method for the glm class. However, it is useful to see how to extract bits from a fitted model object.vcov.glm #return the variance-covariance matrix of a glm object #from p. 188 in Venables and Ripley....

Read more »

Visualizing Data

July 18, 2007
By

Sometimes it is helpful to see the plots created from the example files within R libraries. Of course you can paste them directly into R, but this web page allows you to view the images within the context of the help files:R Graphical ManualsAlso, chec...

Read more »

Repeat elements of a vector

May 17, 2007
By

Two methods. The first produces a vector, the second a one column matrix.x=1:10# Method 1rep(x,each=3)# Method 2matrix(t(matrix(x,length(x),3)))

Read more »

Convert image to matrix in R

May 17, 2007
By

This is how to use the Pixmap library to read in an image as a matrix.> library(pixmap)# the next command may only work on Linux> system("convert foo.tiff foo.ppm")> img To get info on your new object: > str(img)Although included in the previous output, the size of the image can be extracted by:>[email protected] to extract the red channel...

Read more »

Calculate turning angles and step lengths from location data

May 16, 2007
By

anglefun <- function(xx,yy,bearing=TRUE,as.deg=FALSE){ ## calculates the compass bearing of the line between two points ## xx and yy are the differences in x and y coordinates between two points ## Options: ## bearing = FALSE returns +/- pi inst...

Read more »

Sponsors

Mango solutions



RStudio homepage



Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training

datasociety

http://www.eoda.de





ODSC

ODSC

CRC R books series





Six Sigma Online Training









Contact us if you wish to help support R-bloggers, and place your banner here.

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)