An alternative is to extract the .Data slot from the S4 object with @
. The code below will produce the same result as the code provided by Jari Oksanen.
library(phyloseq)
library(vegan)
data("GlobalPatterns")
GlobalPatterns %>%
otu_table() %>%
`@`(., ".Data") %>%
t() %>%
vegan::rarecurve(.,step = 10000)