Here's one approach using the qdap package. I made some tweaks based on the OP's comments. I'd operate out of the list but if you wanted them to be in the global environment I provide that as well.
L1 <- setNames(list(df1, df2), c("df1", "df2"))
library(qdap)
bot_scum <- function(x) identical(character(0), x)
FUN <- function(x) {
y <- bracketXtract(x)
y[sapply(y, bot_scum)] <- NA
as.numeric(unlist(y))
}
FUN2 <- function(x) gsub("[^*]", "", x)
FUN3 <- function(x) cbind.data.frame(FUN(x), FUN2(x))
(L2 <- lapply(L1, function(x) {
inds <- grep(".se", colnames(x), fixed=TRUE)
ninds <- grep(".se", colnames(x), fixed=TRUE, invert=TRUE)
out <- do.call(cbind.data.frame, lapply(inds, function(i) {
setNames(FUN3(x[, i]), c(colnames(x)[i], paste0(colnames(x)[i], ".ast")))
}))
cbind.data.frame(x[, ninds, drop=FALSE],out)
}))
list2env(L2, envir = .GlobalEnv)
df1
df2
## $df1
## var var.se.1 var.se.1.ast var.se.2 var.se.2.ast
## 1 item1 123 ** 1 ***
## 2 item2 456 45 *
##
## $df2
## var var.se.1 var.se.1.ast var.se.2 var.se.2.ast
## 1 item3 7 * 34 **
## 2 item4 89 *** 2