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

stri_dup, stri_paste, ... should fail more graciously on attempts to generate strings of length >= 2^31 each #397

Closed
gagolews opened this issue Aug 21, 2020 · 0 comments

Comments

@gagolews
Copy link
Owner

R Internals says that Elements of character vectors (CHARSXPs) remain limited to 2^31 - 1 bytes.

Base R has:

> library(stringi); x<-stri_dup("a", 2**30); y <- paste(c(x, x), collapse="")
#Error in paste(c(x, x), collapse = "") : result would exceed 2^31-1 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant