Hi
I'm trying to subset rows of the column "LNUid" in "My dataset" that are equal to the columns of the second dataset of the same column. Any idea how to solve that? So, the result should be a dataset where I have only values 3, 4 and 5 as well as the the other information connected to that (Name, score)
#My dataset
data.frame(
stringsAsFactors = FALSE,
LNUid = c("value1","value2","value3",
"value4","value5","value6","value7","value8","value9",
"value10"),
Name = c("Ron","Jon","Mon","Kon",
"Fon","Bon","Son","Aon","Con","Eon"),
Score = c(5, 5, 3, 2, 4, 5, 2, 3, 4, 2)
)
#Second dataset
data.frame(
stringsAsFactors = FALSE,
LNUid = c("value3", "value4", "value5")
)
Thank you!