You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
remove_nonwear() generates warnings when you try to save the non-wear plot into a file and the filename attribute of the impactr_data object has some special characters.
This is due to the fact that the pdf device opened to save the plot does not support some special characters and then throws the warning when it fails to convert them.
library(impactr)
# install_accdata()d<- import_dataset("daily_acc_3d")
# Make the data smaller to the code run fasterd<- define_region(
d,
start_time="2016-01-20 00:01:00",
end_time="2016-01-20 23:59:59"
)
# Force the filename to have some special characters
attributes(d)$filename<-"Sáv"invisible(remove_nonwear(d, save_plot= tempfile(fileext=".pdf")))
#> Warning in title(...): conversion failure on 'Sáv' in 'mbcsToSbcs': dot#> substituted for <cc>#> Warning in title(...): conversion failure on 'Sáv' in 'mbcsToSbcs': dot#> substituted for <81>#> Warning in title(...): conversion failure on 'Sáv' in 'mbcsToSbcs': dot#> substituted for <cc>#> Warning in title(...): conversion failure on 'Sáv' in 'mbcsToSbcs': dot#> substituted for <81>
Reopening this issue, reverting the commit that closed it (f0e68b8).
The previous choice to solve the issue was to replace the graphics device from grDevices::pdf() to grDevices::cairo_pdf(). However, the use of Cairo graphics on macOS depends on the installation of a X11 window sytem (like XQuartz). The absence of this installation caused an R CMD check failure on GH Actions (see link).
Also, this solution would require the {impactr} package user on macOS to install X11 if it's not previously installed, placing an unecessary burden on the user.
Another solution, therefore, needs to be implemented.
remove_nonwear()
generates warnings when you try to save the non-wear plot into a file and thefilename
attribute of theimpactr_data
object has some special characters.This is due to the fact that the pdf device opened to save the plot does not support some special characters and then throws the warning when it fails to convert them.
Created on 2022-01-20 by the reprex package (v2.0.1)
Session info
The text was updated successfully, but these errors were encountered: