topic = c("Physical health", "Relationships", "Violence / crime", "Costs to society")
impact = c("- slurred speech\n- unsteady movement\n- disturbed perceptions\n- inability to react quickly",
"- causes the inability to feel pain\n- makes you feel “stupid”\n- negatively impacts relationships",
"- some people drink and drive\n - drinking and driving is extremely dangerous\n - alcohol makes you lose coordination and control.",
"- many people in society think it's cool to drink alcohol but it's wrong to do drugs - this is only half correct, as both drinking alcohol and doing drugs are wrong\n - alcohol has a lot of negative effects just like drugs do")
column_3 = c("Example text", "Example text", "Example text", "Example text")
alcohol = data.frame(topic, impact, column_3)
pander(alcohol, keep.line.breaks = TRUE, style = 'grid', justify = 'left', caption="Alcohol", col.name=c("Topic", "Impact", "Column 3"))
As you can see, in column 3, there are random pipe symbols in the cells.
This is weird, but I think I know why it's happening.
I put sublists in my cells by writing "\nTab- text".
The sublists work properly, but it causes pipe symbols to appear in the third column.
When I remove the sublists, the pipe symbols are gone.
Here is my code block:
Here is a screenshot of the output:\ https://imgur.com/Fo20A8M
As you can see, in column 3, there are random pipe symbols in the cells. This is weird, but I think I know why it's happening. I put sublists in my cells by writing "\nTab- text". The sublists work properly, but it causes pipe symbols to appear in the third column. When I remove the sublists, the pipe symbols are gone.