I performed a weighted t-test (with different samples) with following function:
wtd.t.test(data_1$VAR_1, data_2$VAR_1, weight = data_1$gew_total,