I think the solution you mentioned last, should work the best. It does indeed ad a new column/variable as I wished for, but it does not count the NAs in my "pattern". I have tried to specify it in different ways, but it does not work.

```
WD$no_NA_values <- rowSums(x = is.na(x = WD[grepl(pattern = "<WD$steps_day1,WD$steps_day2,WD$steps_day3,WD$steps_day4,
WD$steps_day5,WD$steps_day6,WD$steps_day7,WD$steps_day8,WD$steps_day9,WD$steps_day10,WD$steps_day11,WD$steps_day12,WD$steps_day13,WD$steps_day14,
WD$steps_day15,WD$steps_day16,WD$steps_day17,WD$steps_day18,WD$steps_day19,WD$steps_day20,WD$steps_day21,WD$steps_day22,WD$steps_day23,WD$steps_day24,
WD$steps_day25,WD$steps_day26,WD$steps_day27,WD$steps_day28,WD$steps_day29,WD$steps_day30,WD$steps_day31,WD$steps_day32,WD$steps_day33,WD$steps_day34,
WD$steps_day35,WD$steps_day36,WD$steps_day37,WD$steps_day38,WD$steps_day39,WD$steps_day40,WD$steps_day41,WD$steps_day42,WD$steps_day43,WD$steps_day44,
WD$steps_day45,WD$steps_day46,WD$steps_day47,WD$steps_day48,WD$steps_day49,WD$steps_day50,WD$steps_day51,WD$steps_day52,WD$steps_day53,WD$steps_day54,
WD$steps_day55,WD$steps_day56,WD$steps_day57,WD$steps_day58,WD$steps_day59,WD$steps_day60,WD$steps_day61,WD$steps_day62,WD$steps_day63,WD$steps_day64,
WD$steps_day65,WD$steps_day66,WD$steps_day67,WD$steps_day68,WD$steps_day69,WD$steps_day70,WD$steps_day71,WD$steps_day72,WD$steps_day73,WD$steps_day74,
WD$steps_day75,WD$steps_day76,WD$steps_day77,WD$steps_day78,WD$steps_day79,WD$steps_day80,WD$steps_day81,WD$steps_day82,WD$steps_day83,WD$steps_day84,
WD$steps_day85,WD$steps_day86,WD$steps_day87,WD$steps_day88,WD$steps_day89,WD$steps_day90,WD$steps_day91>", x = names(x = WD))]))
```

or

¨

```
WD$no_NA_values <- rowSums(x = is.na(x = WD[grepl(pattern = "steps_day1,steps_day2,steps_day3,steps_day4,
steps_day5,steps_day6,steps_day7,steps_day8,steps_day9,steps_day10,steps_day11,steps_day12,steps_day13,steps_day14,
steps_day15,steps_day16,steps_day17,steps_day18,steps_day19,steps_day20,steps_day21,steps_day22,steps_day23,steps_day24,
steps_day25,steps_day26,steps_day27,steps_day28,steps_day29,steps_day30,steps_day31,steps_day32,steps_day33,steps_day34,
steps_day35,steps_day36,steps_day37,steps_day38,steps_day39,steps_day40,steps_day41,steps_day42,steps_day43,steps_day44,
steps_day45,steps_day46,steps_day47,steps_day48,steps_day49,steps_day50,steps_day51,steps_day52,steps_day53,steps_day54,
steps_day55,steps_day56,steps_day57,steps_day58,steps_day59,steps_day60,steps_day61,steps_day62,steps_day63,steps_day64,
steps_day65,steps_day66,steps_day67,steps_day68,steps_day69,steps_day70,steps_day71,steps_day72,steps_day73,steps_day74,
steps_day75,steps_day76,steps_day77,steps_day78,steps_day79,steps_day80,steps_day81,steps_day82,steps_day83,steps_day84,
steps_day85,steps_day86,steps_day87,steps_day88,steps_day89,steps_day90,steps_day91", x = names(x = WD))])
```

I believe I am doing something wrong with the pattern, but how should I specify the variables that I would like to use?

Thank you for your help.