Re: [R] Row names and matrixs

2011-05-12 Thread jlemaitre
Nielsen, The numbers in the brackets reference a component of a matrix/data frame/vector. So if you have: > x <- c(1:10) # a vector of integers in sequence from 1-10 > x[3] # the third component of x [1] 3 For 2-way matrices or data frames, the formatting is [row,column]. So, for a 10 x 10 matrix

[R] subbing a string vector for another string vector

2010-09-08 Thread jlemaitre
I have a data frame with two columns: image pattern 1http://$IMAGE_ID$www.url.com/image.jpg 2$IMAGE_ID$ http://www.blah.com/image.gif ... I want to replace "$IMAGE_ID$" with the corresponding entry in the pattern column