vctrs
vctrs copied to clipboard
S4 list columns do not work in tidyr::crossing
library(terra)
#> This is terra version 0.7.1 (alpha-release)
library(tidyr)
#>
#> Attaching package: 'tidyr'
#> The following objects are masked from 'package:terra':
#>
#> extract, pack
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
typeof(v)
#> [1] "S4"
crossing(tibble(v= list(v)),
tibble(v= list(v)))
#> Error: Unsupported type S4
Created on 2020-06-24 by the reprex package (v0.3.0)
related https://github.com/tidyverse/tidyr/issues/735
Duplicate of https://github.com/r-lib/vctrs/issues/1164
Oops, I just accidentally closed this as duplicate of itself 🤣 . Here's a more minimal vctrs reprex:
library(terra)
#> Warning: multiple methods tables found for 'rectify'
#> This is terra version 0.7.4 (alpha-release)
#>
#> NOTE: You are using GDAL version 2.4.2
#> For full functionality you need at least version 3.0.4
f <- system.file("ex/lux.shp", package="terra")
v <- vect(f)
vctrs::vec_unique(list(v))
#> Error: Unsupported type S4
Created on 2020-06-29 by the reprex package (v0.3.0)