Fix rendering of character vectors

Open
#443 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

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

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.

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

Dominant language
HTML
Stars
80
Forks
35
Avg merge
5h 54m
Merged PRs (30d)
19

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AlexsLemonade/training-modules

All issues in AlexsLemonade/training-modules

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.