On Sat, 4 Nov 2023, wayne.w.jo...@shell.com wrote:
Hi Vladimir,
Thanks for the suggestions. I've considered both but I can't see a way of doing
what I'm trying to achieve without explicitly adding a call to win.metafile in
my code.
To explain a little more...
GWSDAT is a Shiny App so we don't use the traditional R graphics device - so
your suggestion #1 is not an option . Instead, the user is offered a range of
different plot options in a shiny list box as illustrated here in this windows
based example:
https://user-images.githubusercontent.com/61183826/280452267-c4287f8d-73cc-42a3-881a-4643bdb31689.png
The list of options presented to the users in the list box is modified
according to the platform - see code here:
https://github.com/WayneGitShell/GWSDAT/blob/master/R/server.R#L117-L118
So anyone using a non-windows platform will never be offered the choice of
"wmf" to begin with. For example, see the online LINUX version,
https://stats-glasgow.shinyapps.io/GWSDATV3-2/. You will see that this option doesn't
exist in the list of choices - see
https://user-images.githubusercontent.com/61183826/280453275-6da9b235-0387-47fd-b3a8-b0a949f0ec3e.png
Any suggestions on how I can modify this approach to make it automatically pass
the CRAN checks?
I see. Ideally, the CRAN checks should adjust to your use case - but it is
not obvious how.
As you discovered in a later e-mail, the check just looks for the presence
of win.metafile() so calling it in some other way satisfies the code.
best
Vladimir Dergachev
Thanks,
Wayne
-----Original Message-----
From: Vladimir Dergachev <volo...@mindspring.com>
Sent: 03 November 2023 20:03
To: Jones, Wayne R GSUK-PTX/D/S <wayne.w.jo...@shell.com>
Cc: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] [r-package-devel] Win.Metafile and package check - "Found
the platform-specific device:"
Think Secure. This email is from an external source.
On Fri, 3 Nov 2023, wayne.w.jo...@shell.com wrote:
Dear R-Package-Devel,
As part of GWSDAT package (https://github.com/waynegitshell/GWSDAT) we support
the option to output plots to a WMF
(https://r-graphics.org/recipe-output-vector-wmf) format if, and only if, the
user is on Windows. However, when I run the package checks on here it complains
about using a platform specific function with the following message:
Found the platform-specific device:
'win.metafile'
dev.new() is the preferred way to open a new device, in the unlikely
event one is needed.
In my opinion this is a false positive - and a similar issue has
previously been reported here:
https://stac/
koverflow.com%2Fquestions%2F70585796%2Funable-to-understand-1-note-in-
devtoolscheck-caused-by-a-platform-specific-d&data=05%7C01%7CWayne.W.J
ones%40shell.com%7C991ba83bef5648af7e8408dbdca7deea%7Cdb1e96a8a3da442a
930b235cac24cd5c%7C0%7C0%7C638346385789331058%7CUnknown%7CTWFpbGZsb3d8
eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3
000%7C%7C%7C&sdata=FLTuWH3yJq0sK%2FePWzv5ga%2FcXQGvHNmQOauw3x5RTXc%3D&
reserved=0
Any ideas on how I modify the code and package submission to automatically pass
the checks?
Two suggestions:
* let users specify the graphics device they want
* reading manpage for dev.new() it accepts a bunch of options - there is
probably a way to request the metafile device you want. But I could not find
that in documentation.
best
Vladimir Dergachev
Thanks,
Wayne
----------------------------------------------------------------------
------------------
Wayne Jones
Principal Data Scientist
Decarbonisation Data Science
Tel: +44 (0) 207 934 4330
Projects and Technology, Shell Research Limited, Shell Centre, York
Road, London, SE1 7NA
Email: wayne.w.jo...@shell.com<mailto:wayne.w.jo...@shell.com>
Intranet:
Shell.ai<https://eur02.safelinks.protection.outlook.com/?url=https%3A%25
2F%2Feu001-sp.shell.com%2Fsites%2FAAFAA6690%2FShell.ai%2Fhomepage.aspx
&data=05%7C01%7CWayne.W.Jones%40shell.com%7C991ba83bef5648af7e8408dbdc
a7deea%7Cdb1e96a8a3da442a930b235cac24cd5c%7C0%7C0%7C638346385789331058
%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6I
k1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=z9EBpBRKRttm2r5hJkEol54xSA
6hp76CTjZVvahYoso%3D&reserved=0>
Internet:
http://www.s/
hell.ai%2F&data=05%7C01%7CWayne.W.Jones%40shell.com%7C991ba83bef5648af
7e8408dbdca7deea%7Cdb1e96a8a3da442a930b235cac24cd5c%7C0%7C0%7C63834638
5789331058%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zaHgal1ZfA5%2B0l
FhpJoq2FEEJb1d5kQrogu9%2FLQt3Po%3D&reserved=0<https://eur02.safelinks/.
protection.outlook.com/?url=http%3A%2F%2Fwww.shell.ai%2F&data=05%7C01%
7CWayne.W.Jones%40shell.com%7C991ba83bef5648af7e8408dbdca7deea%7Cdb1e9
6a8a3da442a930b235cac24cd5c%7C0%7C0%7C638346385789331058%7CUnknown%7CT
WFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
6Mn0%3D%7C3000%7C%7C%7C&sdata=zaHgal1ZfA5%2B0lFhpJoq2FEEJb1d5kQrogu9%2
FLQt3Po%3D&reserved=0>
[[alternative HTML version deleted]]
______________________________________________
R-package-devel@r-project.org mailing list
https://stat/
.ethz.ch%2Fmailman%2Flistinfo%2Fr-package-devel&data=05%7C01%7CWayne.W.Jones%40shell.com%7C991ba83bef5648af7e8408dbdca7deea%7Cdb1e96a8a3da442a930b235cac24cd5c%7C0%7C0%7C638346385789487307%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QNipEDt1FYAnFH0ohACT780ijWX6vPufS9F37Mp8Cxw%3D&reserved=0
______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel