ddediu / AdhereR

Computation of adherence to medications from Electronic Healthcare Data in R
25 stars 6 forks source link

.svg.text text parameter being treated as a factor in older R versions #171

Closed dffyfe closed 2 years ago

dffyfe commented 3 years ago

Hi Dan,

In line 463 of plotting.R

.SVG.specialchars.2.XMLentities(text[i]),

When plotting the SVG it's sometimes returning 1 as it's being stored as a factor, obviously surrounding it in as.character or paste0 fixes it.

The problem is only occurring when using Rclient via MS SQL Server Management Studio which I think is essentially R3.5.2. Never once happened on the non microsoft versions of R.

Sent you an email with some screenshots.

David

ddediu commented 2 years ago

Probably fixed (can't test)