I have a feature called windy and it has boolean values

```
   data<- data.frame(windy=c(FALSE,  TRUE, FALSE, FALSE, FALSE,  TRUE))

```

**I need to replace all Falses with 0 and all Trues with 100**

when i use

```
w<-setNames(c(100, 0), c(TRUE, FALSE))[data$Windy]

```

the result is

```
FALSE  <NA>  <NA>  <NA>  <NA>  <NA> 
    0    NA    NA    NA    NA    NA 

```

How can i resolve this issue?