Think aggregate should do the trick for both
PART 1
aggregate(Data$groupname,by=list(Data$timeblock,Data$someuser),
function(x) {
ux <- unique(x)
ux[which.max(tabulate(match(x, ux)))] })
PART 2
aggregate(Data$groupname,by=list(Data$timeblock,Data$someuser),
function(x) {
levels(Data$groupname)[max(as.numeric(x))] })