Re: [R] Width of a text

2018-12-12 Thread Duncan Murdoch
On 12/12/2018 6:55 AM, Christofer Bogaso wrote: Hi, In HTML there is a way to measure the width of a Text before printing it on screen as in https://www.w3schools.com/tags/canvas_measuretext.asp In R we have nchar() function which just measures the number of letters in a Text, but I wonder if w

Re: [R] Width of a text

2018-12-12 Thread Ben Tupper
Hi, Does strwidth() do the trick? https://www.rdocumentation.org/packages/graphics/versions/3.5.1/topics/strwidth Ben > On Dec 12, 2018, at 6:55 AM, Christofer Bogaso > wrote: > > Hi, > > In HTML there is a w

[R] Width of a text

2018-12-12 Thread Christofer Bogaso
Hi, In HTML there is a way to measure the width of a Text before printing it on screen as in https://www.w3schools.com/tags/canvas_measuretext.asp In R we have nchar() function which just measures the number of letters in a Text, but I wonder if we can measure the width of text as well. I have a