Monthly Archives: May 2007

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

Read more »

Search R-bloggers


Sponsors

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)