[R-pkg-devel] no visible binding for global variable ‘degree_C’ - CRAN check note

Iñaki Ucar |uc@r @end|ng |rom |edor@project@org
Mon Dec 12 16:58:11 CET 2022


On Mon, 12 Dec 2022 at 16:43, EcoC2S - Irucka Embry <iembry using ecoccs.com> wrote:
>
> Hi Andrew, set_units(T, "degree_C") does not work;

Sorry, do you mean that the code fails? Or the code works but you
still see the NOTE? In this case, it is possible that you didn't
replace all the instances of set_units(T, degree_C) in your files.

Iñaki

> however, setting
> degree_C as a global variable does work.
>
> Thank you for your suggestion.
>
> Irucka
>
>
> On 11-12-2022 00:29, Andrew Simmons wrote:
> > You can declare degree_C as a variable before using set_units():
> >
> > degree_C <- NULL
> > set_units(T, degree_C)
> >
> > you could use globalVariables() somewhere at the top-level in your
> > package:
> >
> > utils::globalVariables("degree_C")
> >
> > or you could supply degree_C as a literal character string:
> >
> > set_units(T, "degree_C")
> >
> > On Sat, Dec 10, 2022 at 11:13 PM EcoC2S - Irucka Embry
> > <iembry using ecoccs.com> wrote:
> >>
> >> In my iemisc package, I am using the units package.
> >>
> >> This is an example of how I am using the set_units function:
> >>
> >> T <- 20
> >>
> >> set_units(T, degree_C)
> >>
> >> Upon checking iemisc with devtools for CRAN submission, I receive the
> >> following note under "checking R code for possible problems":
> >>
> >> no visible binding for global variable ‘degree_C’
> >>
> >> Please tell me how to avoid that note in my R packages.
> >>
> >> Thank you.
> >>
> >> Irucka
> >>
> >> --
> >> --
> >> No fear, Only Love! / ¡No temas, solamente amor!
> >> -Irucka Ajani Embry, 15 March 2020
> >>
> >> Family Partners:
> >> http://www.sustainlex.org/
> >> https://www.schoolingsolutions.com/
> >>
> >> ---------------------------------------------------------------------------------------------------------------
> >>
> >> The business collaboration between EConsulting (tm)
> >> [https://www.econsultingllc.org/] and EcoC^2S, is Getting Back to
> >> Nature.
> >>
> >> Getting Back to Nature LocalHarvest --
> >> https://www.localharvest.org/getting-back-to-nature-M73453
> >> Getting Back to Nature -- https://www.gettingback2nature.farm/
> >>
> >> -- Irucka and his twin brother, Obiora, are featured in the Middle
> >> Tennessee Local Table Magazine Annual issue. The article discusses
> >> their
> >> family farm history and the current work that they are doing under
> >> Getting
> >> Back to Nature. The full magazine can be found here [the article
> >> begins
> >> on
> >> page 18 of the PDF document]:
> >>
> >> https://media.gettingback2nature.farm/pdf/LocalTable_ANNUAL_2020_lo_res.pdf
> >>
> >> -- Obiora and Irucka were interviewed separately in early 2020 for the
> >> Natural Resources Defense Council's (NRDC) "Regenerative Agriculture:
> >> Farm
> >> Policy for the 21st Century: Policy Recommendations to Advance
> >> Regenerative
> >> Agriculture" report written By Arohi Sharma, Lara Bryant, and Ellen
> >> Lee.
> >> The PDF report is available below:
> >>
> >> https://www.nrdc.org/sites/default/files/regenerative-agriculture-farm-policy-21st-century-report.pdf
> >>
> >> EcoC2S -- https://www.ecoccs.com/
> >> Principal, Irucka Embry, EIT
> >>
> >> Services:
> >> Growing Food
> >> Healthy Living Mentor
> >> Data Analysis with R
> >> R Training
> >> Chemistry and Mathematics Tutoring
> >> Free/Libre and Open Source Software (FLOSS) Consultation
> >>
> >> ______________________________________________
> >> R-package-devel using r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> --
> --
> No fear, Only Love! / ¡No temas, solamente amor!
> -Irucka Ajani Embry, 15 March 2020
>
> Family Partners:
> http://www.sustainlex.org/
> https://www.schoolingsolutions.com/
>
> ---------------------------------------------------------------------------------------------------------------
>
> The business collaboration between EConsulting (tm)
> [https://www.econsultingllc.org/] and EcoC^2S, is Getting Back to
> Nature.
>
> Getting Back to Nature LocalHarvest --
> https://www.localharvest.org/getting-back-to-nature-M73453
> Getting Back to Nature -- https://www.gettingback2nature.farm/
>
> -- Irucka and his twin brother, Obiora, are featured in the Middle
> Tennessee Local Table Magazine Annual issue. The article discusses their
> family farm history and the current work that they are doing under
> Getting
> Back to Nature. The full magazine can be found here [the article begins
> on
> page 18 of the PDF document]:
>
> https://media.gettingback2nature.farm/pdf/LocalTable_ANNUAL_2020_lo_res.pdf
>
> -- Obiora and Irucka were interviewed separately in early 2020 for the
> Natural Resources Defense Council's (NRDC) "Regenerative Agriculture:
> Farm
> Policy for the 21st Century: Policy Recommendations to Advance
> Regenerative
> Agriculture" report written By Arohi Sharma, Lara Bryant, and Ellen Lee.
> The PDF report is available below:
>
> https://www.nrdc.org/sites/default/files/regenerative-agriculture-farm-policy-21st-century-report.pdf
>
> EcoC2S -- https://www.ecoccs.com/
> Principal, Irucka Embry, EIT
>
> Services:
> Growing Food
> Healthy Living Mentor
> Data Analysis with R
> R Training
> Chemistry and Mathematics Tutoring
> Free/Libre and Open Source Software (FLOSS) Consultation
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



-- 
Iñaki Úcar



More information about the R-package-devel mailing list