An eb_sightings object is just a data frame with the additional class eb_sightings. When working with these S3 objects using functions outside this package, it is possible that the class will be dropped and they will be reverted to plain data frames. Use df_to_eb to convert a data frame back to an eb_sightings object. Checks are performed to ensure that column names, ordering, and data types have been preserved.

df_to_eb(x)

Arguments

x

data.frame; eBird sightings stored as a data frame.

Value

An eb_sightings object.

Examples

# convert sightings to plain data frame eb_data <- system.file("extdata/MyEBirdData.csv", package = "auklet") %>% eb_sightings() %>% as.data.frame() class(eb_data)
#> [1] "data.frame"
class(df_to_eb(eb_data))
#> [1] "eb_sightings" "tbl_df" "tbl" "data.frame"