Skip to content

Catch error when step_dummy() tries to create too many columns #828

@EmilHvitfeldt

Description

@EmilHvitfeldt

Should there be a catch for this particular error that gets produced in step_dummy() when it tries to calculate too big of a matrix? I realise this will eventually get fixed by #420, but is vector memory exhausted (limit reached?) enough of a hint that x has too many levels/too many rows

library(recipes)

dat <- data.frame(x = as.character(1:100000))

recipe(~ ., data = dat) %>%
  step_dummy(x) %>%
  prep()
#> Error: vector memory exhausted (limit reached?)

Metadata

Metadata

Assignees

Labels

featurea feature request or enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions