Closed courtiol closed 3 years ago
Going through old bug reports to check if they are still applicable.
It seems colour scale setting is best left to the user, since if inlabru::gg also did it, there would be warnings about duplicate scales etc. Better to let gg do one job only, so the referred code won't be used.
quo_name
seems to be out of favour now, referring to as_name
instead, but the other deparse
calls in the code seem to do their intended base-R job.
Dear developers,
In inlabru 2.1.9 (but not in the current devel), there is a bug in
gg.SpatialPixelsDataFrame()
. The conditionif (!inherits(data[[deparse(dmap$fill)]], "factor"))
is never TRUE because a call todeparse()
does not return the original name when being evaluated on a quosure (withdeparse
a tilda is added to the name, since closure are actually formulas).Ex:
That makes the function
gg.SpatialPixelsDataFrame()
crash:There is a very easy fix: use
quo_name()
instead ofdeparse()
. Luckilyquo_name()
is re-exported fromrlang
inggplot2
so you don't even need another dependence.BUT all that may be useless since the whole chunck of code is currently commented on the devel version, so I won't PR.
I did not check if the other calls to deparse in the code are problematic or not. ++
Alex