rms
rms copied to clipboard
Error in htmlSpecial("part") : illegal character name:part
After updating to the Github version following #52, I get a new error:
> (ols_fit = rms::ols(f, data = d2, x = T, y = T))
Error in htmlSpecial("part") : illegal character name:part
The formula is quite complex because it consists of some 400 terms:
> f
S ~ .a + .b + .c + .d + .e + .f + .g + .h + .i + .j + .k + .l +
.m + .n + .o + .ø + .p + .r + .s + .t + .u + .v + .w + .x +
.y + .z + .aa + .ab + .ac + .ad + .ae + .ag + .ah + .ai +
.aj + .ak + .al + .am + .an + .ar + .as + .at + .au + .av +
.aw + .ay + .az + .bd + .be + .bi + .bj + .bo + .br + .ce +
.ch + .ci + .ck + .cl + .co + .dd + .de + .di + .do + .dr +
.ds + .dt + .du + .dy + .ee + .ef + .eg + .eh + .ei + .ej +
.ek + .el + .em + .en + .eo + .ep + .er + .es + .et + .ev +
.ew + .ex + .ey + .ff + .fi + .fr + .gi + .gn + .go + .gr +
.gu + .hi + .hm + .hn + .ho + .hr + .hu + .ik + .il + .im +
.in + .io + .ir + .is + .it + .iu + .iv + .iz + .jo + .jø +
.ju + .kk + .kl + .ko + .kr + .ks + .ll + .lm + .lo + .ls +
.lt + .lu + .lv + .ly + .mm + .mo + .mu + .my + .nn + .no +
.nr + .ns + .nt + .nu + .ny + .op + .or + .os + .ot + .ou +
.ør + .rr + .rs + .rt + .ru + .ry + .rz + .ss + .st + .su +
.sv + .sy + .sz + .tt + .ty + .tz + .abd + .abe + .abi +
.abr + .ach + .adi + .agn + .ahm + .all + .alt + .amm + .ann +
.ans + .ant + .anu + .ars + .art + .ast + .bel + .ben + .ber +
.bet + .bir + .bjø + .chr + .cil + .der + .din + .dit +
.dor + .eil + .ein + .ell + .elm + .els + .enn + .enr + .ens +
.ent + .ert + .ess + .est + .ett + .fin + .git + .gor + .hil +
.hor + .iko + .ill + .imo + .inn + .ino + .irs + .iss + .ist +
.itt + .itz + .jos + .jør + .lly + .lot + .lou + .nny +
.nor + .ort + .ott + .rst + .abel + .bert + .bjør + .dort +
.gitt + .lott + ._a + ._b + ._c + ._d + ._e + ._f + ._g +
._h + ._i + ._j + ._k + ._l + ._m + ._n + ._o + ._p + ._r +
._s + ._t + ._u + ._v + ._w + ._y + ._z + ._ab + ._ad + ._ag +
._al + ._am + ._an + ._ar + ._as + ._ay + ._be + ._bi + ._bj +
._bo + ._br + ._ce + ._ch + ._cl + ._co + ._de + ._di + ._do +
._ei + ._ej + ._el + ._em + ._er + ._es + ._ev + ._fi + ._fr +
._gi + ._gr + ._gu + ._hi + ._in + ._ir + ._is + ._iv + ._jo +
._ju + ._kr + ._lo + ._lu + ._mo + ._mu + ._no + ._ru + ._st +
._su + ._sv + ._sy + ._abd + ._agn + ._ann + ._ben + ._ber +
._bet + ._bir + ._chr + ._dor + ._ell + ._els + ._hil + ._jos +
.a_ + .b_ + .d_ + .e_ + .f_ + .g_ + .h_ + .i_ + .j_ + .k_ +
.l_ + .m_ + .n_ + .o_ + .r_ + .s_ + .t_ + .u_ + .v_ + .w_ +
.y_ + .z_ + .ad_ + .ah_ + .ai_ + .aj_ + .al_ + .am_ + .an_ +
.ar_ + .as_ + .aw_ + .ce_ + .ch_ + .ck_ + .co_ + .de_ + .di_ +
.dy_ + .ek_ + .el_ + .en_ + .er_ + .es_ + .et_ + .ik_ + .il_ +
.im_ + .in_ + .ir_ + .is_ + .it_ + .iz_ + .ll_ + .ly_ + .my_ +
.nn_ + .no_ + .nt_ + .ny_ + .or_ + .rt_ + .ry_ + .st_ + .sz_ +
.tt_ + .ann_ + .ben_ + .ert_ + .itt_ + .lly_ + .nny_ + length +
vowel_frac + stop_frac + nasal_frac + has_dash
Note that this error is in the print
function. The actual object is returned without issues.
> ols_fit
Error in htmlSpecial("part") : illegal character name:part
> traceback()
6: stop(paste0("illegal character name:", x))
5: htmlSpecial("part")
4: prStats(obj[[1]], obj[[2]], lang = lang)
3: prModFit(x, title = title, z, digits = digits, coefs = coefs,
...)
2: print.ols(x)
1: function (x, ...)
UseMethod("print")(x)
I installed the CRAN version (5.1-1) and confirmed that this does not have the bug, though it has the validate
issue. (#52)
Note that this error also replicates in the minimal example from before:
> iris2 = iris
> set.seed(1)
> iris2$letter1 = sample(letters, size = 150, replace = T)
> iris2$letter2 = sample(letters, size = 150, replace = T)
> iris2$letter3 = sample(letters, size = 150, replace = T)
>
> #fit
> fit = rms::ols(Sepal.Width ~ letter1 + letter2 + letter3 + Petal.Width, Petal.Length, data = iris2, x = T, y = T)
> fit
Error in htmlSpecial("part") : illegal character name:part
I can't reproduce the htmlSpecial
error with the current codeset that is committed to Github. And when I run in open code htmlSpecial('part')
all is well. I wonder if you need to bring in the latest code from Hmisc
while running development versions of rms
functions.