4
Dear(as)
as given below:
nr <- c(100:199)
dt <- rep("data",100)
x <- data.frame(nr,dt)
y <- c(110:115)
I need to get,
the common numbers between the first column of the date.frame x and the list y
match <- x[x[1] == (lapply(x[1], function(z) which(y %in% z))),]
print(match)
but I’m wrong:
"Warning message:
In FUN(left, right) :
longer object length is not a multiple of shorter object length"
The expected result should be like this:
110 "data"
111 "data"
112 "data"
113 "data"
114 "data"
115 "data"
thanks. It worked, I’ll use it in my context.
– Fernando