<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10px;">Hi,</span></div><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><br></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;">in R, is.finite() and is.infinite() always return FALSE for character():</span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><br></span></div><div style="background-color: transparent;"><font style="font-family: 'Courier New', courier, monaco, monospace,
sans-serif; font-size: 10px;">> is.finite(c('abc', NA_character_, 'efg'))</font></div><div style="background-color: transparent;"><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10px;">[1] FALSE FALSE FALSE</font></div><div style="background-color: transparent;"><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10px;">> is.infinite(c('abc', NA</font><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 12px;">_character_</span><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10px; background-color: transparent;">, 'efg'))</span></div><div style="background-color: transparent;"><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;">[1] FALSE FALSE FALSE</font></div><div><span style="font-family: 'Courier New', courier, monaco, monospace,
sans-serif; font-size: x-small;"><br></span></div><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;">so, we may need to change the template <span>is_finite<STRSXP> from:</span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><br></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-style: normal;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><span style="background-color: transparent;">template <></span><br></span></div><div><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: 10px;">inline bool is_finite<STRSXP>( SEXP x ){</font></div><div><font style="font-family: 'Courier New', courier, monaco,
monospace, sans-serif; font-size: x-small;"> return x != NA_STRING ;</font></div><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><span>}</span><br></span></div><div><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><br> </span></div><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;">to:</span></div><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><br></span></div><div><div style="background-color: transparent;"><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><span style="background-color: transparent;">template <></span><br></span></div><div><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;">inline bool
is_finite<STRSXP>( SEXP x ){</font></div><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><span> return false;</span><br></span></div><div><span style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"></span></div><div><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;">}</font></div><div><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><br></font></div><div><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;"><br></font></div><div><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size: x-small;">thanks,</font></div><div><font style="font-family: 'Courier New', courier, monaco, monospace, sans-serif; font-size:
x-small;">Thomas</font></div><div></div></div> </div> </div></body></html>