Hi, I want to filter two different variables and then realize a t test. Here is an example:

```
library (tidyverse)
library(weights)
my_data_2018 <- tibble(Var_1 = c(900, 1500, 350, 1200, 750, 100,125,250,300),
my_weights = c(2.2, 3.1, 8.2, 4.2, 5.3, 6.8, 12, 25, 1))
my_data_2019 <- tibble(Var_2 = c(32, 21, 21, 900, 1500, 350, 1200, 750, 100,125,250,300),
my_weights_2 = c(2.2, 3.1, 8.2, 2.2, 3.1, 8.2, 4.2, 5.3, 6.8, 12, 25, 1))
```

I tried:

```
filter(my_data_2018$Var_1 < 100 & my_data_2019< 100) %>%
wtd.t.test(my_data_2018$Var_1 , my_data_2019$Var_2 , weight = my_data_2018$my_weights, weighty= my_data_2019$my_weights_2)
```

And

```
select(my_data_2018$Var_1 < 100 & my_data_2019< 100) %>%
wtd.t.test(my_data_2018$Var_1 , my_data_2019$Var_2 , weight = my_data_2018$my_weights, weighty= my_data_2019$my_weights_2)
```

But it doesnÂ´t work