It's hard to be certain without seeing the data frame with the type information, but it sounds like a "join" might work here. For example, using the built-in iris data frame:
library(tidyverse)
# Fake data frame with "type" information that we want to add to iris
type.data = data.frame(Species=sort(unique(iris$Species)),
Type = c("A","B","C"))
iris = left_join(iris, type.data, by="Species")
head(iris)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species Type
1 5.1 3.5 1.4 0.2 setosa A
2 4.9 3.0 1.4 0.2 setosa A
3 4.7 3.2 1.3 0.2 setosa A
4 4.6 3.1 1.5 0.2 setosa A
5 5.0 3.6 1.4 0.2 setosa A
6 5.4 3.9 1.7 0.4 setosa A