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
While I like to have inline html displays, I really hate the default rich display of vectors. It simply doesn't make any sense to display the vector as a table.
Is there any way to disable rich display only for specific classes?
Oh, I guess I understand why vectors are printed as html as default. Without the knowledge of the device width, R could only print up to the default width 80.
But still, I think it is way better than the html.
It used to look better in jupyter notebook because I attach a CSS class. This class is no longer available in jupyter lab. Do you have an idea how to improve that? Can I render a <style> tag next to each <ol> and it’ll work?
Activity
randy3k commentedon Jan 25, 2020
I finally came up with this workaround in my
~/.RprofilesetHook( packageEvent("IRkernel", "onLoad"), function(...) { repr_text <- function(obj, ...) paste0("<pre>", paste0(utils::capture.output(obj), collapse = "\n"), "</pre>") evalq(local({ registerS3method("repr_html", "integer", repr_text) registerS3method("repr_html", "double", repr_text) registerS3method("repr_html", "character", repr_text) }), envir = getNamespace("repr") ) } )randy3k commentedon Jan 25, 2020
Oh, I guess I understand why vectors are printed as html as default. Without the knowledge of the device width, R could only print up to the default width 80.
But still, I think it is way better than the html.
flying-sheep commentedon Jan 25, 2020
It used to look better in jupyter notebook because I attach a CSS class. This class is no longer available in jupyter lab. Do you have an idea how to improve that? Can I render a
<style>tag next to each<ol>and it’ll work?[-]disable rich_display for specific classes[/-][+]Improve vector rich display[/+]