Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factors are coerced to numeric on print #9

Closed
dereckmezquita opened this issue Jul 6, 2024 · 0 comments
Closed

Factors are coerced to numeric on print #9

dereckmezquita opened this issue Jul 6, 2024 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@dereckmezquita
Copy link
Owner

# Define a basic interface
SimpleDataset <- interface("SimpleDataset",
    id = "integer",
    value = "numeric",
    category = "factor"
)

# Implement the interface
valid_data <- implement(SimpleDataset,
    id = 1L,
    value = 10.5,
    category = factor("A", levels = c("A", "B", "C"))
)

print(valid_data)
#> Object implementing SimpleDataset interface:
#>   id: 1 
#>   value: 10.5 
#>   category: 1 
#> Validation on access: Enabled
@dereckmezquita dereckmezquita self-assigned this Jul 6, 2024
@dereckmezquita dereckmezquita added the bug Something isn't working label Jul 6, 2024
@dereckmezquita dereckmezquita added this to the v0.1.0 milestone Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant