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...]
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 ... [Read more...]