Hello,
here's a draft of a solution. I hope it's not overly complicated.
# find all possible combinations
combi <- expand.grid(Dem$Nom, Rap$Nom); names(combi) <- c("Dem", "Rap")
# we need the corresponding departments and units
combi$DemDep <- apply(combi, 1, function(x) Dem$Departement[x[1] ==
I'm not sure I understood your problem, maybe like this:
# split identifiers into columns
df1 <- data.frame(cbind(X = 1:10, Y = rnorm(10)),
Z.identifierA.B1298712 = factor(rep(LETTERS[1:2], each = 5)))
id <- names(df1)[3]
x <- do.call(rbind, str_split(id, "\\."))
y <- sapply(x,
2 matches
Mail list logo