I have scraped text and have placed it into a tibble with one character variable "value" and one observation of this variable ""this is a character variable".
I want to print the contents of character_variable$value as text in the output of an Rmarkdown document that is knitted to a Word document.
This is similar in essence to printing the contents of numerical variables in a line of text. For an example, see: https://www.earthdatascience.org/courses/earth-analytics/multispectral-remote-sensing-modis/add-variables-to-rmarkdown-report/
However, the code snippets used in this and similar examples don't appear to be applicable to character variables.
What I would like to see in the Word document output:
This is the text I have scraped: this is a character variable.
# Text scraped from somewhere and placed into the variable "value" in the tibble "character_variable" character_variable <- ("this is a character variable") character_variable <- as_tibble(character_variable) character_variable # value # <chr> # this is a character variable # 1 row #code snippet that appears to be applicable to numerical variables but not character variables: text 'This is the text I have scraped: `r character_variable`.'
Does anyone have any experience with this or insight in how to accomplish it?
Thanks in advance.