I have a data.frame called d. In this data.frame, some columns consist of constant numbers across the rows of the first column: study.name (see bel
If you just want to remove repeated values across all columns unique() is base R
unique(d)
EDIT - Thanks for the clarification @CalumYou - I think this is what OP is looking for in base R.
is_constant = lapply(split(d, d$study.name), function(data){
unlist(lapply(data,function(col){
length(unique(col)) == 1
}))
})
is_constant = as.data.frame(do.call(rbind, is_constant))
all_constant = d[,unlist(lapply(is_constant,all))]
all_constant = unique(all_constant)