library(ggplot2)
packageVersion("vctrs")
#> [1] '0.2.0.9001'
df <- data.frame(x = 1:2, y = 1:2, z = factor(c("a", "b")))
# OK
ggplot(df, aes(x, y, colour = z)) +
geom_point() +
facet_grid(vars(x), vars(y))

# error
ggplot(df[1,], aes(x, y, colour = z)) +
geom_point() +
facet_grid(vars(x), vars(y))
#> Vector of length 2 cannot be recycled to length 1. Only vectors of length
#> one or of the same length can be recycled.