...@gmail.com]
Verzonden: zo 18-9-2011 2:27
Aan: Janssen, K.J.M.
CC: r-help@r-project.org
Onderwerp: Re: [R] Replacing matching values by related values
Try playing with match(). Something like
d[match(v,d[,1]),2]
Should work (untested bc I'm writing from my phone though)
Michael Weylandt
On Sep
Thanks.
Kristel
-Oorspronkelijk bericht-
Van: David Winsemius [mailto:dwinsem...@comcast.net]
Verzonden: zo 18-9-2011 15:20
Aan: Janssen, K.J.M.
CC: michael.weyla...@gmail.com; r-help@r-project.org
Onderwerp: Re: [R] Replacing matching values by related values
On Sep 18, 2011, at 3
I am trying to replace values of a vector (consisting of 15 values) by a value
that is related to a matching value in a dataset (consisting of 17 rows).
Here's an example
The vector:
v - c(f,a,e,d,m,o,e,f,i,n,e,i,b,a,o)
The dataset's columns consist of the following values
d[,1] -
3 matches
Mail list logo