You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The printing of the vector with very long texts blocks the R interpreter 1. As far as I know, there is no way to override the default printing method of character vector.
Of course, the community comes up with different solutions, e.g.
However, it would be good if there is a way to customize the print method of character vector, so that it can truncate the printing of very long texts.
Footnotes
In this case, it will print ultimately because the length of the vector is not that long. But for real life datasets, it blocks the interpreter so that one has to kill it. print(max = 10) works to cut the number of items to be printed, but not the length of the text itself. object.size(gibberish) in this case is just 98KB, real life text data can easily be a few MB per item. ↩
The text was updated successfully, but these errors were encountered:
The print method of character vector has been a major issue when text analysts deal with large text datasets.
To illustrate the issue:
The printing of the vector with very long texts blocks the R interpreter 1. As far as I know, there is no way to override the default printing method of character vector.
Of course, the community comes up with different solutions, e.g.
However, it would be good if there is a way to customize the print method of character vector, so that it can truncate the printing of very long texts.
Footnotes
In this case, it will print ultimately because the length of the vector is not that long. But for real life datasets, it blocks the interpreter so that one has to kill it.
print(max = 10)
works to cut the number of items to be printed, but not the length of the text itself.object.size(gibberish)
in this case is just 98KB, real life text data can easily be a few MB per item. ↩The text was updated successfully, but these errors were encountered: