[R] Mapping file-Legend- from 2 Files/Tables

From: Edwin Sendjaja <edwin7_at_web.de>
Date: Sat, 12 Apr 2008 05:19:16 +0100

Hello,

I have got 2 Tables from different files:

Table 1 (lets say file: Salesman.data)


| ID | User_ID


1    | 1   |   4
2    | 2   |   6
3    | 3   |   7
4    | 4   |   2
5    | 5   |   3


############################

Table2 (file: Employee.data)

| User_ID | Name


1    |       1      |   Donna
2    |       2      |   John
3    |       3      |   Michael
4    |       4      |   Wolf
5    |       5      |   Tim
6    |       6      |   Edward
7    |       7      |   Shaun



What i want do is:

I want to map the table 2 into table 1.
instead of User_ID I want to use the name of the person which is related to the User_ID.

The legend should look like this


 |        LEGEND       |
 |-----------------------------|
 |   -2-         John       |
 |   -3-         Michael  |
 |   -4-         Wolf       |
 |   -6-        Edward    |
 |   -7-       Shaun      |
  ------------------------------


Does anyone know how I can create such a mapping legend? Is there any good command to do this?

I've tried using "replace" but this is not a good solution. because it replaces only 1 values.

Kind Regards,

Edwin Sendjaja



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 12 Apr 2008 - 03:24:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 12 Apr 2008 - 19:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive