vctrs icon indicating copy to clipboard operation
vctrs copied to clipboard

S4 list columns do not work in tidyr::crossing

Open kendonB opened this issue 4 years ago • 3 comments

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)

kendonB avatar Jun 23 '20 23:06 kendonB

related https://github.com/tidyverse/tidyr/issues/735

kendonB avatar Jun 23 '20 23:06 kendonB

Duplicate of https://github.com/r-lib/vctrs/issues/1164

hadley avatar Jun 29 '20 21:06 hadley

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)

hadley avatar Jun 29 '20 21:06 hadley