Simplifies removing the pathr class for situations where the custom class, pathr, is causing issues with workflows.

remove_pathr(x)

Arguments

x

Object to remove pathr class from.

Value

This function handles two things

  • Single object: The object, x, returned with unclass() called if the class pathr existed

  • List of objects: The list of objects, x, returned with unclass() called on each object if the class of all items in the list of objects are pathr

Examples

url <- "https://github.com/KoderKow/pathr"

x <- parse_url(url)

class(x)
#> [1] "list"  "pathr"

y <- remove_pathr(x)

class(y)
#> [1] "list"