I have a data frame that looks like this:
1058 <NA> <NA>
218 ZD/57/2020 2020-08-07 50
219 ZD/78/2020 2020-09-11 50
225 1059 <NA> <NA>
236 ZD/57/2020 2020-08-07 50
237 ZD/79/2020 2020-09-18 50
243 1060 <NA> <NA>
254 ZD/79/2020 2020-09-18 30
I would like the numbers in the first column with NA remaining columns to form a separate column.
218 ZD/57/2020 2020-08-07 50 1058
219 ZD/78/2020 2020-09-11 50 1058
236 ZD/57/2020 2020-08-07 50 1059
237 ZD/79/2020 2020-09-18 50 1059
254 ZD/79/2020 2020-09-18 30 1060
> dput(data)
structure(list(one = c("1003", "ZD/57/2020", "ZD/58/2020", "ZD/70/2020",
"ZD/78/2020", "1004", "ZD/58/2020", "ZD/78/2020"), three = structure(c(NA,
1596758400, 1597363200, 1599177600, 1599782400, NA, 1597363200,
1599782400), class = c("POSIXct", "POSIXt"), tzone = "UTC"),
`Ilość na mag Główny` = c(NA, "40", "50", "50", "50", NA,
"50", "50")), row.names = c(4L, 15L, 16L, 17L, 18L, 24L,
29L, 30L), class = "data.frame")