You could try:
merge(d,m, by.x="v2", by.y="v3")
v2 v1 v4
1 A 1 a
2 A 7 a
3 B 4 b
4 B 5 b
5 C 3 c
6 C 6 c
7 E 2 e
8 E 8 e
Edit
Here is another approach, to preserve the order:
data.frame(v1=d$v1, v4=m[match(d$v2, m$v3), 2])
v1 v4
1 1 a
2 2 e
3 3 c
4 4 b
5 5 b
6 6 c
7 7 a
8 8 e
Related Contents:
- How to replace NA values in a table for selected columns
- Replace all particular values in a data frame
- R: Replace multiple values in multiple columns of dataframes with NA
- Replace in a factor column
- Replace empty values with value from other column in a dataframe
- Extract a part of a data frame by selecting specific observations of a column in R [duplicate]
- How to sum a variable by group
- Quickly reading very large tables as dataframes
- Convert a list to a data frame
- How to combine multiple conditions to subset a data-frame using “OR”?
- Order data frame rows according to vector with specific order
- Fastest way to replace NAs in a large data.table
- Select groups based on number of unique / distinct values
- How to plot all the columns of a data frame in R
- subtract value from previous row by group
- Dictionary style replace multiple items
- Fastest way to add rows for missing time steps?
- Repeat rows of a data.frame [duplicate]
- How to drop columns by name in a data frame
- calculate the mean for each column of a matrix in R
- Select rows with min value by group
- How do I extract a single column from a data.frame as a data.frame?
- Combine two or more columns in a dataframe into a new column with a new name
- Create a data.frame where a column is a list
- dplyr: nonstandard column names (white space, punctuation, starts with numbers)
- Call apply-like function on each row of dataframe with multiple arguments from each row
- Last Observation Carried Forward In a data frame? [duplicate]
- Remove Rows From Data Frame where a Row matches a String
- Error – replacement has [x] rows, data has [y]
- Omit rows containing specific column of NA
- Collapsing data frame by selecting one row per group
- Count number of zeros per row, and remove rows with more than n zeros
- R list of lists to data.frame
- Get last row of each group in R [duplicate]
- Interpolate NA values in a data frame with na.approx
- Replace values in a vector based on another vector
- How to sort a data frame by date
- R self reference
- How to delete rows from a data.frame, based on an external list, using R?
- Using grep to help subset a data frame
- Subsetting a data frame based on contents of another data frame
- Remove all rows where length of string is more than n
- Divide each value by the sum of values by group
- Merge dataframes of different sizes
- Replacing occurrences of a number in multiple columns of data frame with another value in R
- Splitting a large data frame into smaller segments
- Read and rbind multiple csv files
- Split Data Frame into Rows of Fixed Size
- How can I change XTS to data.frame and keep Index?
- Select last non-NA value in a row, by row