Re: [R] [External] Re: code for drawing the R logo

2025-07-04 Thread Jeffrey Dick
The OP's question might be interpreted as "draw the R logo in R", meaning base R graphics. This interpretation excludes packages like rsvg that use a rendering engine such as https://wiki.gnome.org/Projects/LibRsvg (the R here is for "Resplendent SVG", not the R language). Thanks to Barry for desc

[R] approxfun asymmetry

2025-07-04 Thread Timothy Earl (Cefas) via R-help
Hi, I'm seeing an asymmetry in how approxfun treats -Inf and Inf, which I don't understand from reading the help file. e.g. a simple step function tmp <- approxfun(x=c(-Inf, -0.2, 0.2, Inf), y=c(-1, -1, 1, 1)) tmp(c(-1, 0, 1)) # [1] NaN 0 1 I expected: # [1] -1 0 1 Clearly I can work r