You can subset your df to only keep one group and then in the original data make all the groups the same. Combine the two data.frame
s so now you have the complete sample as one group and group one still separate. Then do the t-test.
library(dplyr)
df <- data.frame("id"=c(1,2,3,4,5),
"group"=c(0,0,1,1,1),
"score"=c(10,14,15,13,12))
#make group = 2 so this is the 'complete sample'
df2 <- mutate(df, group = 2)
#keep only group 1
df1 <- filter(df, group == 1)
#put together so that you have group 1 vs complete sample
df3 <- rbind(df1,df2)
#do t-test
t.test(df3$score,df3$group)