I have two data sets. One with only a registration number (A), and the other with a list of registration numbers and the type of model next to the registration number(B).
A
A
ircraft.reg.num Action Description Service.Type C/O Order.Type Created.on Actual.release.date
5Y-BX Re-Assembling of Aircraft C/O ZS08 40512 40532
5Y-BX Re-Assembling of Aircraft C/O ZS08 40512 40532
5Y-BX Re-Assembling of Aircraft C/O ZS08 40512 40532
5Y-BX Dual Control Collective Lever ZS08 40497 40550
5Y-BX Dual Control Collective Lever ZS08 40497 40550
5Y-BX Perform SB 63-10 MGB plug ZS08 40548 40550
5Y-BX Perform SB 63-10 MGB plug ZS08 40548 40550
5Y-BX Defect Pitot static cover burnt ZS08 40497 40550
5Y-CD Airworthiness Inspection & Test ZS08 40711 40711
5Y-CD Airworthiness Inspection & Test ZS08 40711 40711
5Y-CD Airworthiness Inspection & Test ZS08 40711 40711
B
Reg. Aircraft.Model
5O-MV AS 355
5O-Unknown SA 318
5O-Unknown SA 318
5T-Unlnown SA 318
5T-BF BO 105
5T-BW AS 350
5T-BX AS 350
5T-BY AS 350
5T-CA BK 117
5T-CC AS 350
5T-CD AS 350
5T-DK AS 350
5T-DS AS 350
5T-DS AS 350
I want know if the registration number in A equals to the registration number in B, what is the type of model?
I currently use:
if(A$Aircraft.reg.num -> B$Reg.){
model <- reg.no$Aircraft.Model
}
But it is not working because my data.frames aren't even in length.
Any suggestions to how I can get the result without using an "if" function?
Thanks, Carmen