```
dt<-fread("ID 0 1 2 3 4 5 6 7 8 9 t1 t2
           b  10 11 12 13 14 15 16 17 18 19 4 8
           c  20 21 22 23 24 25 26 27 28 29 2 7
           d  30 31 32 33 34 35 36 37 38 39 7 9
           a  40 41  42 43 44 45 46 47 48 49 3 6" )

```

dt

```
   ID  0  1  2  3  4  5  6  7  8  9 t1 t2
1:  b 10 11 12 13 14 15 16 17 18 19  4  8
2:  c 20 21 22 23 24 25 26 27 28 29  2  7
3:  d 30 31 32 33 34 35 36 37 38 39  7  9
4:  a 40 41 42 43 44 45 46 47 48 49  3  6

```

I try to change values to NA with reference value t1,t2

I tried to use set function in data.table

> 
> col <- colnames(dt) for (i in 2:length(col)) { set(x = dt,
>  i = which(dt[["t1"]]<=i | i<= dt[["t2"]]),
>  j=j,
>  value = NA) }
> 
> 
> 

but it is not working

what I want is make table like this 

change values to NA with not in range t1:t2

```
   ID  0  1  2  3  4  5  6  7  8  9 t1 t2
1:  b NA NA NA NA 14 15 16 17 18 NA  4  8
2:  c NA NA 22 23 24 25 26 27 NA NA  2  7
3:  d NA NA NA NA NA NA NA 37 38 39  7  9
4:  a NA NA NA 43 44 45 46 NA NA NA  3  6

```

is there any way to use date.table set function?

because actual data is pretty big so I want use data.table