csb_missingXY returns a logical vector indicating if an observation is missing in either of the coordinate columns that come with the CSB data.

csb_missingXY(.data, varX, varY, newVar)

Arguments

.data

A tibble or data frame

varX

Name of column containing x coordinate data

varY

Name of column containing y coordinate data

newVar

Name of new column that is TRUE if coordinate data are missing and FALSE otherwise.

Value

A tbl with a logical vector appended to it.

Examples

csb_missingXY(january_2018, srx, sry, newVar = "missingXY")
#> # A tibble: 1,554 x 18 #> requestid datetimeinit probaddress probaddtype callertype neighborhood #> <dbl> <dttm> <chr> <chr> <chr> <dbl> #> 1 1049265 2018-01-01 00:48:30 75 WILLMOR… A WEB 8 #> 2 1049265 2018-01-01 00:48:30 75 WILLMOR… A WEB 8 #> 3 1049266 2018-01-01 05:29:06 6739 VERMO… A WEB 1 #> 4 1049267 2018-01-01 08:53:07 5444 ITASK… A WEB 7 #> 5 1049268 2018-01-01 09:13:22 CASS AVE &… B PHONE 60 #> 6 1049269 2018-01-01 10:12:26 6441 LLOYD… A WEB 42 #> 7 1049270 2018-01-01 10:52:32 3100 WINNE… B PHONE 19 #> 8 1049271 2018-01-01 10:54:43 S GRAND AV… B PHONE 25 #> 9 1049272 2018-01-01 11:07:02 SIDNEY ST … B WEB 25 #> 10 1049273 2018-01-01 12:05:40 5400 N BRO… B PHONE 79 #> # … with 1,544 more rows, and 12 more variables: ward <dbl>, problemcode <chr>, #> # description <chr>, submitto <chr>, status <chr>, dateinvtdone <dttm>, #> # datetimeclosed <dttm>, prjcompletedate <dttm>, datecancelled <dttm>, #> # srx <dbl>, sry <dbl>, missingXY <lgl>