AlexsLemonade / AlexsLemonade/training-modules

Fix rendering of character vectors

Open
#443 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
77
Forks
35
Avg merge
1d 13h
Merged PRs (30d)
4

Description

There seems to be a bug (or at least behavior unexpected to me) with Rmarkdown::render() that results in character vectors printing oddly when called on their own. You can see this at the following htmlpreview link:
https://htmlpreview.github.io/?https://github.com/AlexsLemonade/training-modules/blob/7517d4d1b1d288fe8920e337ee8f21c0d71db8fe/RNA-seq/02-gastric_cancer_tximeta.nb.html#file-names

In particular, the character vector prints twice, once with no quotes and _lots of space_. I have posted a couple places to see if there is a quick fix, but have gotten no response as yet.

_Originally posted by @jashapiro in https://github.com/AlexsLemonade/training-modules/issues/441#issuecomment-799803378_

A potential workaround is to use `print(myvector)` instead of bare `myvector` when we want to show a character vector, but this might be a pain to explain, and does not matter for general use, so I would rather not do this. Hopefully a solution will be proposed somewhere.

[My Stack Overflow posting](https://stackoverflow.com/questions/66645695/rendering-differences-with-character-vectors-in-rmarkdown-notebooks-between-rstu)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the character-vector output in the linked RNA-seq/02-gastric_cancer_tximeta.nb.html preview and compare it with the reported Rmarkdown::render() behavior. Review the linked Stack Overflow discussion and the original issue context; done means identifying the source of the duplicate, widely spaced rendering and documenting a confirmed resolution or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.