So I use gsub to remove the instances of \n and - from a corpus, which I've created from a pdf:
cassis1 <- pdf_text("Cassis_2022_1.pdf")
cassis_corpus <- cassis1
gsub("\n|-", "", cassis_corpus)
When I run this, the text is displayed exactly how I want it, with no more \n and -. However, if I run
show(cassis_corpus)
the text appears as it did before I removed the \n and -.
It seems like gsub makes no permanent change to the corpus. Why is that, and how is one supposed to work with the altered corpus if the changes are not permanent?
Thanks for any tip and help!