diff --git a/DESCRIPTION b/DESCRIPTION index 0137f1e..b540af8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: anthro -Version: 1.0.1.9000 +Version: 1.1.0.9000 Title: Computation of the WHO Child Growth Standards Description: Provides WHO Child Growth Standards (z-scores) with confidence intervals and standard errors around the @@ -15,8 +15,8 @@ Authors@R: c(person("Dirk", "Schumacher", , person(given = "World Health Organization", role = "cph")) License: GPL-3 Encoding: UTF-8 -URL: https://github.com/worldhealthorganization/anthro -BugReports: https://github.com/worldhealthorganization/anthro/issues +URL: https://github.com/WorldHealthOrganization/anthro +BugReports: https://github.com/WorldHealthOrganization/anthro/issues ByteCompile: true Depends: R (>= 3.2) Imports: diff --git a/NEWS.md b/NEWS.md index 575f698..22525eb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # anthro (development version) +# anthro 1.1.0 + ## Method * The `Weight-for-length/height (zwfl)` z-score indicator is now also computed diff --git a/cran-comments.md b/cran-comments.md index 8e88a34..18b2398 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,11 +1,13 @@ ## Test environments -* local Mac OS install, R 4.3.1 * Mac OS (on Github Actions), R release * ubuntu latest (on Github Actions), R oldrel, devel, release * Windows (on Github Actions), R release -* win-builder (devel and release) +* win-builder (devel) ## R CMD check results -0 errors | 0 warnings | 0 notes +0 errors | 0 warnings | 1 note +## New mainainer + +The package has a new maintainer: Elaine Borghi diff --git a/docs/404.html b/docs/404.html index 1389e2b..eb90c9a 100644 --- a/docs/404.html +++ b/docs/404.html @@ -6,7 +6,7 @@ Page not found (404) • anthro - + @@ -18,7 +18,7 @@ - +
@@ -47,9 +47,9 @@ @@ -60,7 +60,7 @@
- +
@@ -83,21 +83,21 @@

Page not found (404)

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/LICENSE.html b/docs/LICENSE.html index eb751a1..2587caa 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -1,9 +1,9 @@ -NA • anthroNA • anthro - +
@@ -29,16 +29,16 @@ Changelog
- +
@@ -47,10 +47,10 @@

NA

-
                GNU GENERAL PUBLIC LICENSE
-                   Version 3, 29 June 2007
+
                GNU GENERAL PUBLIC LICENSE
+                   Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. http://fsf.org/ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

-
                        Preamble
+
                        Preamble

The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program–to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

@@ -61,7 +61,7 @@

NA

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users’ freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

The precise terms and conditions for copying, distribution and modification follow.

-
                   TERMS AND CONDITIONS
+
                   TERMS AND CONDITIONS
  1. Definitions.

“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

@@ -90,69 +90,69 @@

NA

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

  1. Conveying Modified Source Versions.

You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

-
a) The work must carry prominent notices stating that you modified
-it, and giving a relevant date.
-
-b) The work must carry prominent notices stating that it is
-released under this License and any conditions added under section
-7.  This requirement modifies the requirement in section 4 to
-"keep intact all notices".
-
-c) You must license the entire work, as a whole, under this
-License to anyone who comes into possession of a copy.  This
-License will therefore apply, along with any applicable section 7
-additional terms, to the whole of the work, and all its parts,
-regardless of how they are packaged.  This License gives no
-permission to license the work in any other way, but it does not
-invalidate such permission if you have separately received it.
-
-d) If the work has interactive user interfaces, each must display
-Appropriate Legal Notices; however, if the Program has interactive
-interfaces that do not display Appropriate Legal Notices, your
-work need not make them do so.
+
a) The work must carry prominent notices stating that you modified
+it, and giving a relevant date.
+
+b) The work must carry prominent notices stating that it is
+released under this License and any conditions added under section
+7.  This requirement modifies the requirement in section 4 to
+"keep intact all notices".
+
+c) You must license the entire work, as a whole, under this
+License to anyone who comes into possession of a copy.  This
+License will therefore apply, along with any applicable section 7
+additional terms, to the whole of the work, and all its parts,
+regardless of how they are packaged.  This License gives no
+permission to license the work in any other way, but it does not
+invalidate such permission if you have separately received it.
+
+d) If the work has interactive user interfaces, each must display
+Appropriate Legal Notices; however, if the Program has interactive
+interfaces that do not display Appropriate Legal Notices, your
+work need not make them do so.

A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation’s users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

  1. Conveying Non-Source Forms.

You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

-
a) Convey the object code in, or embodied in, a physical product
-(including a physical distribution medium), accompanied by the
-Corresponding Source fixed on a durable physical medium
-customarily used for software interchange.
-
-b) Convey the object code in, or embodied in, a physical product
-(including a physical distribution medium), accompanied by a
-written offer, valid for at least three years and valid for as
-long as you offer spare parts or customer support for that product
-model, to give anyone who possesses the object code either (1) a
-copy of the Corresponding Source for all the software in the
-product that is covered by this License, on a durable physical
-medium customarily used for software interchange, for a price no
-more than your reasonable cost of physically performing this
-conveying of source, or (2) access to copy the
-Corresponding Source from a network server at no charge.
-
-c) Convey individual copies of the object code with a copy of the
-written offer to provide the Corresponding Source.  This
-alternative is allowed only occasionally and noncommercially, and
-only if you received the object code with such an offer, in accord
-with subsection 6b.
-
-d) Convey the object code by offering access from a designated
-place (gratis or for a charge), and offer equivalent access to the
-Corresponding Source in the same way through the same place at no
-further charge.  You need not require recipients to copy the
-Corresponding Source along with the object code.  If the place to
-copy the object code is a network server, the Corresponding Source
-may be on a different server (operated by you or a third party)
-that supports equivalent copying facilities, provided you maintain
-clear directions next to the object code saying where to find the
-Corresponding Source.  Regardless of what server hosts the
-Corresponding Source, you remain obligated to ensure that it is
-available for as long as needed to satisfy these requirements.
-
-e) Convey the object code using peer-to-peer transmission, provided
-you inform other peers where the object code and Corresponding
-Source of the work are being offered to the general public at no
-charge under subsection 6d.
+
a) Convey the object code in, or embodied in, a physical product
+(including a physical distribution medium), accompanied by the
+Corresponding Source fixed on a durable physical medium
+customarily used for software interchange.
+
+b) Convey the object code in, or embodied in, a physical product
+(including a physical distribution medium), accompanied by a
+written offer, valid for at least three years and valid for as
+long as you offer spare parts or customer support for that product
+model, to give anyone who possesses the object code either (1) a
+copy of the Corresponding Source for all the software in the
+product that is covered by this License, on a durable physical
+medium customarily used for software interchange, for a price no
+more than your reasonable cost of physically performing this
+conveying of source, or (2) access to copy the
+Corresponding Source from a network server at no charge.
+
+c) Convey individual copies of the object code with a copy of the
+written offer to provide the Corresponding Source.  This
+alternative is allowed only occasionally and noncommercially, and
+only if you received the object code with such an offer, in accord
+with subsection 6b.
+
+d) Convey the object code by offering access from a designated
+place (gratis or for a charge), and offer equivalent access to the
+Corresponding Source in the same way through the same place at no
+further charge.  You need not require recipients to copy the
+Corresponding Source along with the object code.  If the place to
+copy the object code is a network server, the Corresponding Source
+may be on a different server (operated by you or a third party)
+that supports equivalent copying facilities, provided you maintain
+clear directions next to the object code saying where to find the
+Corresponding Source.  Regardless of what server hosts the
+Corresponding Source, you remain obligated to ensure that it is
+available for as long as needed to satisfy these requirements.
+
+e) Convey the object code using peer-to-peer transmission, provided
+you inform other peers where the object code and Corresponding
+Source of the work are being offered to the general public at no
+charge under subsection 6d.

A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

@@ -163,28 +163,28 @@

NA

“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

-
a) Disclaiming warranty or limiting liability differently from the
-terms of sections 15 and 16 of this License; or
-
-b) Requiring preservation of specified reasonable legal notices or
-author attributions in that material or in the Appropriate Legal
-Notices displayed by works containing it; or
-
-c) Prohibiting misrepresentation of the origin of that material, or
-requiring that modified versions of such material be marked in
-reasonable ways as different from the original version; or
-
-d) Limiting the use for publicity purposes of names of licensors or
-authors of the material; or
-
-e) Declining to grant rights under trademark law for use of some
-trade names, trademarks, or service marks; or
-
-f) Requiring indemnification of licensors and authors of that
-material by anyone who conveys the material (or modified versions of
-it) with contractual assumptions of liability to the recipient, for
-any liability that these contractual assumptions directly impose on
-those licensors and authors.
+
a) Disclaiming warranty or limiting liability differently from the
+terms of sections 15 and 16 of this License; or
+
+b) Requiring preservation of specified reasonable legal notices or
+author attributions in that material or in the Appropriate Legal
+Notices displayed by works containing it; or
+
+c) Prohibiting misrepresentation of the origin of that material, or
+requiring that modified versions of such material be marked in
+reasonable ways as different from the original version; or
+
+d) Limiting the use for publicity purposes of names of licensors or
+authors of the material; or
+
+e) Declining to grant rights under trademark law for use of some
+trade names, trademarks, or service marks; or
+
+f) Requiring indemnification of licensors and authors of that
+material by anyone who conveys the material (or modified versions of
+it) with contractual assumptions of liability to the recipient, for
+any liability that these contractual assumptions directly impose on
+those licensors and authors.

All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

@@ -223,32 +223,32 @@

NA

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

  1. Interpretation of Sections 15 and 16.

If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

-
                 END OF TERMS AND CONDITIONS
-
-        How to Apply These Terms to Your New Programs
+
                 END OF TERMS AND CONDITIONS
+
+        How to Apply These Terms to Your New Programs

If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

-
{one line to give the program's name and a brief idea of what it does.}
-Copyright (C) {year}  {name of author}
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
{one line to give the program's name and a brief idea of what it does.}
+Copyright (C) {year}  {name of author}
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:

-
{project}  Copyright (C) {year}  {fullname}
-This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-This is free software, and you are welcome to redistribute it
-under certain conditions; type `show c' for details.
+
{project}  Copyright (C) {year}  {fullname}
+This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type `show c' for details.

The hypothetical commands show w' andshow c’ should show the appropriate parts of the General Public License. Of course, your program’s commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see http://www.gnu.org/licenses/.

The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read http://www.gnu.org/philosophy/why-not-lgpl.html.

@@ -265,19 +265,19 @@

NA

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/authors.html b/docs/authors.html index 77fac70..de23362 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,9 +1,9 @@ -Authors and Citation • anthroAuthors and Citation • anthro - +
@@ -29,60 +29,64 @@ Changelog
- +
- +
  • -

    Dirk Schumacher. Author, maintainer. +

    Dirk Schumacher. Author.

  • -

    Elaine Borghi. Contributor. +

    Elaine Borghi. Contributor, maintainer.

  • -

    Jonathan Polonsky. Contributor. +

    Jonathan Polonsky. Contributor.

  • -

    World Health Organization. Copyright holder. +

    Giovanna Gatica Dominguez. Contributor. +

    +
  • +
  • +

    World Health Organization. Copyright holder.

Citation

- Source: DESCRIPTION + Source: DESCRIPTION
-

Schumacher D (2023). +

Schumacher D (2026). anthro: Computation of the WHO Child Growth Standards. -R package version 1.0.1, https://github.com/worldhealthorganization/anthro. +R package version 1.1.0, https://github.com/WorldHealthOrganization/anthro.

@Manual{,
   title = {anthro: Computation of the WHO Child Growth Standards},
   author = {Dirk Schumacher},
-  year = {2023},
-  note = {R package version 1.0.1},
-  url = {https://github.com/worldhealthorganization/anthro},
+  year = {2026},
+  note = {R package version 1.1.0},
+  url = {https://github.com/WorldHealthOrganization/anthro},
 }
@@ -92,19 +96,19 @@

Citation

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/index.html b/docs/index.html index ac4192a..812c768 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,25 +6,20 @@ Computation of the WHO Child Growth Standards • anthro - + - + - +
@@ -53,9 +48,9 @@ @@ -66,7 +61,7 @@
- +
@@ -89,7 +84,7 @@

InstallationExamples

+library(anthro)

Z-Score

@@ -101,16 +96,16 @@

Z-Score weight = c(18, 15, 10, 15), lenhei = c(120, 80, 100, 100) ) -#> clenhei cbmi cmeasure csex zlen flen zwei fwei zwfl fwfl zbmi fbmi zhc -#> 1 120 12.5000 <NA> 1 7.31 1 2.20 0 -2.39 0 -3.01 0 NA -#> 2 80 23.4375 <NA> 2 -3.50 0 0.95 0 4.13 0 4.66 0 NA -#> 3 100 10.0000 <NA> 1 1.62 0 -2.76 0 -5.19 1 -5.61 1 NA -#> 4 100 15.0000 <NA> 1 1.70 0 0.69 0 -0.29 0 -0.58 0 NA -#> fhc zac fac zts fts zss fss -#> 1 NA NA NA NA NA NA NA -#> 2 NA NA NA NA NA NA NA -#> 3 NA NA NA NA NA NA NA -#> 4 NA NA NA NA NA NA NA

+#> clenhei cmeasure c9mo_flag cbmi csex zlen flen zwei fwei zwfl fwfl +#> 1 120 <NA> 0 12.5000 1 7.31 1 2.20 0 -2.39 0 +#> 2 80 <NA> 0 23.4375 2 -3.50 0 0.95 0 4.13 0 +#> 3 100 <NA> 0 10.0000 1 1.62 0 -2.76 0 -5.19 1 +#> 4 100 <NA> 0 15.0000 1 1.70 0 0.69 0 -0.29 0 +#> zbmi fbmi zhc fhc zac fac zts fts zss fss +#> 1 -3.01 0 NA NA NA NA NA NA NA NA +#> 2 4.66 0 NA NA NA NA NA NA NA NA +#> 3 -5.61 1 NA NA NA NA NA NA NA NA +#> 4 -0.58 0 NA NA NA NA NA NA NA NA

The returned value is a data.frame that can further be processed or saved as a .csv file as in the original function.

You can also use the function with a given dataset with with

@@ -180,8 +175,8 @@ 

Using the package in your own an

Links

@@ -204,7 +199,8 @@

Citation

Developers

@@ -217,21 +213,21 @@

Developers

- - + + diff --git a/docs/news/index.html b/docs/news/index.html index 89c1bd1..2e24389 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -1,9 +1,9 @@ -Changelog • anthroChangelog • anthro - +
@@ -29,26 +29,45 @@ Changelog
- +
- + +
+

Method

+
  • The Weight-for-length/height (zwfl) z-score indicator is now also computed for observations where weight or lenhei is outside the plausible ranges. The plausible ranges were 0.9-58 for weight and 38-150 for lenhei.
  • +
+
+

Z-scores

+
  • The resulting data frame of anthro_zscores has a new column c9mo_flag to indicate whether an incorrect measurement position was observed with children younger than 9 months.
  • +
+
+

Performance

+
  • For inputs with cluster/strata = NULL a faster method was added for this special case to compute anthro_prevalence. This method yields the same results within an observed tolerance of < 0.0001 on test data.
  • +
+
+

Bugfix

+
  • Fixed a bug during prevalence computation when a value used as a group (like sex) contains NA and at the same time all values in that group are NA as well. Previously this resulted in a hard stop of the computation, now the code gracefully handles it.
  • +
+
+
+
  • Fixed the package documentation to adhere to CRAN guidelines.
@@ -95,10 +114,10 @@

Bugfix -
  • Age in days is now rounded half to even (e.g. 730.5 days = 731) before joining the data with the reference values. This is in line with previous implementations and in particularly relevant for data points with age exactly 24 months. Previously the example above was converted to 730 days and with this release it is converted to 731 days (#17).
  • -
  • The cleaned measure and sex variables are now part of the output data.frame of anthro_zscores (#20, #24).
  • +
    • Age in days is now rounded half to even (e.g. 730.5 days = 731) before joining the data with the reference values. This is in line with previous implementations and in particularly relevant for data points with age exactly 24 months. Previously the example above was converted to 730 days and with this release it is converted to 731 days (#17).
    • +
    • The cleaned measure and sex variables are now part of the output data.frame of anthro_zscores (#20, #24).
    • Removed covr from suggests dependencies.
    • -
    • Fixed a typo in the docs (#15).
    • +
    • Fixed a typo in the docs (#15).

@@ -114,19 +133,19 @@
- - + + diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 2c9ab67..97138aa 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,6 +1,5 @@ -pandoc: '2.18' -pkgdown: 2.0.7 +pandoc: 3.6.3 +pkgdown: 2.2.0 pkgdown_sha: ~ articles: {} -last_built: 2023-09-17T06:02Z - +last_built: 2026-01-29T15:15Z diff --git a/docs/reference/anthro-package.html b/docs/reference/anthro-package.html index 5232e9d..e7e9638 100644 --- a/docs/reference/anthro-package.html +++ b/docs/reference/anthro-package.html @@ -1,5 +1,5 @@ -Compute the WHO Child Growth Standards — anthro-package • anthroCompute the WHO Child Growth Standards — anthro-package • anthro - +
@@ -33,22 +33,22 @@ Changelog
- +
@@ -63,15 +63,16 @@

Compute the WHO Child Growth Standards

See also

-

Author

-

Maintainer: Dirk Schumacher mail@dirk-schumacher.net

-

Other contributors:

@@ -83,19 +84,19 @@

Author

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/reference/anthro_api_compute_prevalence.html b/docs/reference/anthro_api_compute_prevalence.html index f6e7799..be854af 100644 --- a/docs/reference/anthro_api_compute_prevalence.html +++ b/docs/reference/anthro_api_compute_prevalence.html @@ -1,9 +1,9 @@ -Compute prevalence of zscores — anthro_api_compute_prevalence • anthroCompute prevalence of zscores — anthro_api_compute_prevalence • anthro - +
@@ -29,22 +29,22 @@ Changelog
- +
@@ -58,11 +58,13 @@

Compute prevalence of zscores

Arguments

-
data
+ + +
data

a data frame containing the underlying data

-
zscores_to_compute
+
zscores_to_compute

a list of zscore indicators that should be computed. The list needs to have 4 named values:

name

The name or abbreviation of the indicator. @@ -87,7 +89,7 @@

Arguments

-
survey_subsets
+
survey_subsets

subsets for which the prevalence values should be computed. It is a named list of characters, where the values correspond to columns and the names to labels in the output.

@@ -108,19 +110,19 @@

Note

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/reference/anthro_api_compute_zscore.html b/docs/reference/anthro_api_compute_zscore.html index 9461090..441fd70 100644 --- a/docs/reference/anthro_api_compute_zscore.html +++ b/docs/reference/anthro_api_compute_zscore.html @@ -1,9 +1,9 @@ -Helper function to compute zscores — anthro_api_compute_zscore • anthroHelper function to compute zscores — anthro_api_compute_zscore • anthro - +
@@ -29,22 +29,22 @@ Changelog
- +
@@ -58,19 +58,21 @@

Helper function to compute zscores

Arguments

-
y
+ + +
y

a numeric vector

-
m
+
m

a numeric vector

-
l
+
l

a numeric vector

-
s
+
s

a numeric vector

@@ -93,19 +95,19 @@

References

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/reference/anthro_api_compute_zscore_adjusted.html b/docs/reference/anthro_api_compute_zscore_adjusted.html index 688a6cf..15672a2 100644 --- a/docs/reference/anthro_api_compute_zscore_adjusted.html +++ b/docs/reference/anthro_api_compute_zscore_adjusted.html @@ -1,9 +1,9 @@ -Helper function to compute the adjusted zscore — anthro_api_compute_zscore_adjusted • anthroHelper function to compute the adjusted zscore — anthro_api_compute_zscore_adjusted • anthro - +
@@ -29,22 +29,22 @@ Changelog
- +
@@ -58,19 +58,21 @@

Helper function to compute the adjusted zscore

Arguments

-
y
+ + +
y

a numeric vector

-
m
+
m

a numeric vector

-
l
+
l

a numeric vector

-
s
+
s

a numeric vector

@@ -93,19 +95,19 @@

References

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/reference/anthro_api_standardize_oedema_var.html b/docs/reference/anthro_api_standardize_oedema_var.html index 4edbdd7..8a88f33 100644 --- a/docs/reference/anthro_api_standardize_oedema_var.html +++ b/docs/reference/anthro_api_standardize_oedema_var.html @@ -1,9 +1,9 @@ -Standardize the Oedema input values — anthro_api_standardize_oedema_var • anthroStandardize the Oedema input values — anthro_api_standardize_oedema_var • anthro - +
@@ -29,22 +29,22 @@ Changelog
- +
@@ -58,7 +58,9 @@

Standardize the Oedema input values

Arguments

-
oedema
+ + +
oedema

a vector of values

@@ -77,19 +79,19 @@

Note

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/reference/anthro_api_standardize_sex_var.html b/docs/reference/anthro_api_standardize_sex_var.html index fbacbbf..250cded 100644 --- a/docs/reference/anthro_api_standardize_sex_var.html +++ b/docs/reference/anthro_api_standardize_sex_var.html @@ -1,9 +1,9 @@ -Standardize the Sex input values — anthro_api_standardize_sex_var • anthroStandardize the Sex input values — anthro_api_standardize_sex_var • anthro - +
@@ -29,22 +29,22 @@ Changelog
- +
@@ -58,7 +58,9 @@

Standardize the Sex input values

Arguments

-
sex
+ + +
sex

a vector of values

@@ -77,19 +79,19 @@

Note

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/reference/anthro_prevalence.html b/docs/reference/anthro_prevalence.html index 1fe0eba..293ddf0 100644 --- a/docs/reference/anthro_prevalence.html +++ b/docs/reference/anthro_prevalence.html @@ -1,5 +1,5 @@ -Compute prevalence estimates — anthro_prevalence • anthroCompute prevalence estimates — anthro_prevalence • anthro - +
@@ -37,22 +37,22 @@ Changelog
- +
@@ -90,7 +90,9 @@

Compute prevalence estimates

Arguments

-
sex
+ + +
sex

A numeric or text variable containing gender information. If it is numeric, its values must be: 1 for males and 2 for females. If it is character, it must be "m" or "M" for males @@ -98,7 +100,7 @@

Arguments

if sex is missing.

-
age
+
age

A numeric variable containing age information; age can be in either days or months (if optional argument is_age_in_month is set to TRUE). An exact age in days is expected and should @@ -106,7 +108,7 @@

Arguments

NOT be calculated if age is missing (NA).

-
is_age_in_month
+
is_age_in_month

A logical flag; if TRUE, variable age unit will be treated as months. The function converts it to days by dividing age by 30.4375 and rounding it to integer so that reference @@ -114,13 +116,13 @@

Arguments

is used and age unit is treated as days.

-
weight
+
weight

A numeric variable containing body weight information, which must be in kilograms. Weight-related z-scores are not calculated if body weight is missing.

-
lenhei
+
lenhei

A numeric variable containing length (recumbent length) or height (standing height) information, which must be in centimeters. Length/height-related z-scores will not be @@ -137,7 +139,7 @@

Arguments

the resulting data.frame.

-
measure
+
measure

A character variable indicating whether recumbent length or standing height was measured for each observation. The values of this variable must be "L" or "l" for recumbent @@ -157,7 +159,7 @@

Arguments

-
oedema
+
oedema

The values of this character variable must be "n", "N" or "2" for non-oedema, and "y", "Y", "1" for oedema. Although it is highly recommended that this variable is provided by the survey, @@ -172,41 +174,41 @@

Arguments

estimation.

-
sw
+
sw

An optional numeric vector containing the sampling weights. If NULL, no sampling weights are used.

-
cluster
+
cluster

An optional integer vector representing clusters. If the value is NULL this is treated as a survey without a cluster. This is also the case if all values are equal, then we assume there is also no cluster.

-
strata
+
strata

An optional integer vector representing strata. Pass NULL to indicate that there are no strata.

-
typeres
+
typeres

An optional integer or character vector representing a type of residence. Any values are accepted, however, “Rural” or “Urban” are preferable for outputs purposes.

-
gregion
+
gregion

An optional integer or character vector representing a geographical region.

-
wealthq
+
wealthq

An optional integer or character vector representing wealth quintiles where (1=poorest; 2,3,4,5=richest). All values can either be NA, or 1, 2, 3, 4, 5 or Q1, Q2, Q3, Q4, Q5.

-
mothered
+
mothered

An optional integer or character vector representing the education of the mother. Any number of categories is accepted for the analysis, provided @@ -217,19 +219,15 @@

Arguments

attained by the mother

-
othergr
+
othergr

An optional integer or character vector that is of interest for stratified analysis.

Value

- - -

Returns a data.frame with prevalence estimates for the various +

Returns a data.frame with prevalence estimates for the various groups.

- -

The output data frame includes prevalence estimates with corresponding standard errors and confidence intervals, and z-score summary statistics (mean and standard deviation) with most @@ -239,16 +237,9 @@

Value

geographical regions, wealth quintiles, mother education and one additional factor the user is interested in and for which data are available).

- -

The resulting columns are coded with a prefix, a prevalence indicator and a suffix:

- - -

Prefix:

- - -
HA
+

Prefix:

HA

Height-for-age

WA
@@ -267,10 +258,7 @@

Value

Height-for-age and weight-for-height combined

-

Prevalence indicator:

- - -
_3
+

Prevalence indicator:

_3

Prevalence corresponding to < -3 SD

_2
@@ -289,10 +277,7 @@

Value

Prevalence corresponding to > +3 SD

-

Suffix:

- - -
_pop
+

Suffix:

_pop

Weighted sample size

_unwpop
@@ -314,10 +299,7 @@

Value

Standard error

-

For example:

- - -
WHZ_pop
+

For example:

WHZ_pop

Weight-for-height weighted sample size

HA_r
@@ -345,7 +327,16 @@

Value

interval limit

-
+

Methods:

+

The survey package is used to compute all estimates. +Confidence intervals are computed with a significance level of 0.05. +svymean is used the z-score mean and CIs, while for the +prevalence estimates svyciprop is used with the logit +method.

+

For cases where cluster/strata/sw is NULL a fast approximation +is used that does not use the survey package but computes the same +results within bounds (maximum empirical difference is < 0.0001).

+

Details

In this function, all available (non-missing and non-flagged) z-score values @@ -359,12 +350,17 @@

Details

repeated to match the maximum length of all arguments except is_age_in_month using rep_len. This happens without warnings.

+
+

References

+

T. Lumley (2024) "survey: analysis of complex survey samples". +R package version 4.4.

+

Examples

-
if (FALSE) {
+    
if (FALSE) { # \dontrun{
 # because it takes too long for CRAN checks
-library(anthro)
+library(anthro)
 
 # compute the prevalence estimates for 100 random children
 # with weight around 15kg and height around 100cm
@@ -386,7 +382,7 @@ 

Examples

# note that we only generated data for one age group res -} +} # }
@@ -397,19 +393,19 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/reference/anthro_zscores.html b/docs/reference/anthro_zscores.html index 26d161a..83a5fc0 100644 --- a/docs/reference/anthro_zscores.html +++ b/docs/reference/anthro_zscores.html @@ -1,5 +1,5 @@ -Calculate z-scores for the eight anthropometric indicators — anthro_zscores • anthroCalculate z-scores for the eight anthropometric indicators — anthro_zscores • anthro - +
@@ -33,22 +33,22 @@ Changelog
- +
@@ -78,7 +78,9 @@

Calculate z-scores for the eight anthropometric indicators

Arguments

-
sex
+ + +
sex

A numeric or text variable containing gender information. If it is numeric, its values must be: 1 for males and 2 for females. If it is character, it must be "m" or "M" for males @@ -86,7 +88,7 @@

Arguments

if sex is missing.

-
age
+
age

A numeric variable containing age information; age can be in either days or months (if optional argument is_age_in_month is set to TRUE). An exact age in days is expected and should @@ -94,7 +96,7 @@

Arguments

NOT be calculated if age is missing (NA).

-
is_age_in_month
+
is_age_in_month

A logical flag; if TRUE, variable age unit will be treated as months. The function converts it to days by dividing age by 30.4375 and rounding it to integer so that reference @@ -102,13 +104,13 @@

Arguments

is used and age unit is treated as days.

-
weight
+
weight

A numeric variable containing body weight information, which must be in kilograms. Weight-related z-scores are not calculated if body weight is missing.

-
lenhei
+
lenhei

A numeric variable containing length (recumbent length) or height (standing height) information, which must be in centimeters. Length/height-related z-scores will not be @@ -125,7 +127,7 @@

Arguments

the resulting data.frame.

-
measure
+
measure

A character variable indicating whether recumbent length or standing height was measured for each observation. The values of this variable must be "L" or "l" for recumbent @@ -145,31 +147,31 @@

Arguments

-
headc
+
headc

A numeric variable containing head circumference information, which must be in centimeters. Head circumference-for-age z-scores are not calculated if head circumference is missing.

-
armc
+
armc

A numeric variable containing arm circumference information, which must be in centimeters. Arm circumference-for-age z-scores are not calculated if arm circumference is missing.

-
triskin
+
triskin

A numeric variable containing triceps skinfold information, which must be in millimeters. Triceps skinfold-for-age z-scores are not calculated if triceps skinfold is missing.

-
subskin
+
subskin

A numeric variable containing subscapular skinfold information, which must be in millimeters. Subscapular skinfold-for-age z-scores are not calculated if subscapular skinfold is missing.

-
oedema
+
oedema

The values of this character variable must be "n", "N" or "2" for non-oedema, and "y", "Y", "1" for oedema. Although it is highly recommended that this variable is provided by the survey, @@ -186,18 +188,15 @@

Arguments

Value

- - -

A data.frame with three types of columns. Columns starting with a -"c" are cleaned versions of the input arguments. Columns beginning with -a "z" are the respective z-scores and columns prefixed by a "f" indicate -if these z-scores are flagged (integers). -The number of rows is given by the length +

A `data.frame` with three types of columns: columns starting with a +"c" are cleaned versions of the input arguments +(i.e., `clenhei`, `cmeasure`, `cbmi`). Columns prefixed by "z" contain the respective z-scores, while columns prefixed by "f" indicate whether these z-scores are flagged (integers). +Additional derived flags based on input arguments, such as `c9mo_flag`, flag children under 9 months with incorrect measurement position. The number of rows is given by the length of the input arguments.

- - -

The following columns are returned:

  • clenhei converted length/height for deriving z-score

  • -
  • cbmi BMI value based on length/height given by clenhei

  • +

    The returned columns are:

    • clenhei converted length/height for deriving z-scores.

    • +
    • cmeasure cleaned measurement position used in the computation; for children under 9 months measured incorrectly, the value is replaced by `NA`.

    • +
    • c9mo_flag a value of 0 means the measurement position is appropriate, while 1 means it is incorrect.

    • +
    • cbmi BMI value based on length/height given by `clenhei`.

    • zlen Length/Height-for-age z-score

    • flen 1, if abs(zlen) > 6

    • zwei Weight-for-age z-score

    • @@ -217,8 +216,6 @@

      Value

    If not all parameter values have equal length, parameter values will be repeated to match the maximum length of all arguments except is_age_in_month using rep_len. This happens without warnings.

    - -

    Z-scores are only computed for children younger than 60 months (age in months < 60)

@@ -233,24 +230,24 @@

References

Examples

# you can either use the function to compute zscores for specific values
 anthro_zscores(sex = "f", age = 10, is_age_in_month = TRUE, weight = 10)
-#>   clenhei cbmi cmeasure csex zlen flen zwei fwei zwfl fwfl zbmi fbmi zhc fhc
-#> 1      NA   NA     <NA>    2   NA   NA 1.33    0   NA   NA   NA   NA  NA  NA
-#>   zac fac zts fts zss fss
-#> 1  NA  NA  NA  NA  NA  NA
+#>   clenhei cmeasure c9mo_flag cbmi csex zlen flen zwei fwei zwfl fwfl zbmi fbmi
+#> 1      NA     <NA>         0   NA    2   NA   NA 1.33    0   NA   NA   NA   NA
+#>   zhc fhc zac fac zts fts zss fss
+#> 1  NA  NA  NA  NA  NA  NA  NA  NA
 
 # values will be recycled so not all input values need to be of the same length
 anthro_zscores(sex = "f", age = c(10, 20, 30), weight = 10)
-#>   clenhei cbmi cmeasure csex zlen flen  zwei fwei zwfl fwfl zbmi fbmi zhc fhc
-#> 1      NA   NA     <NA>    2   NA   NA 10.46    1   NA   NA   NA   NA  NA  NA
-#> 2      NA   NA     <NA>    2   NA   NA  9.14    1   NA   NA   NA   NA  NA  NA
-#> 3      NA   NA     <NA>    2   NA   NA  8.01    1   NA   NA   NA   NA  NA  NA
-#>   zac fac zts fts zss fss
-#> 1  NA  NA  NA  NA  NA  NA
-#> 2  NA  NA  NA  NA  NA  NA
-#> 3  NA  NA  NA  NA  NA  NA
+#>   clenhei cmeasure c9mo_flag cbmi csex zlen flen  zwei fwei zwfl fwfl zbmi fbmi
+#> 1      NA     <NA>         0   NA    2   NA   NA 10.46    1   NA   NA   NA   NA
+#> 2      NA     <NA>         0   NA    2   NA   NA  9.14    1   NA   NA   NA   NA
+#> 3      NA     <NA>         0   NA    2   NA   NA  8.01    1   NA   NA   NA   NA
+#>   zhc fhc zac fac zts fts zss fss
+#> 1  NA  NA  NA  NA  NA  NA  NA  NA
+#> 2  NA  NA  NA  NA  NA  NA  NA  NA
+#> 3  NA  NA  NA  NA  NA  NA  NA  NA
 
 # or use it with a compute dataset
-if (FALSE) {
+if (FALSE) { # \dontrun{
 your_data_set <- read.csv("<your survey>.csv")
 with(
   your_data_set,
@@ -259,7 +256,7 @@ 

Examples

weight = weight, lenhei = lenhei ) ) -} +} # }
@@ -270,19 +267,19 @@

Examples

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.2.0.

- - + + diff --git a/docs/reference/index.html b/docs/reference/index.html index fcf20ed..03a115f 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,9 +1,9 @@ -Function reference • anthroPackage index • anthro - +
@@ -29,16 +29,16 @@ Changelog
- +
- - + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 8a9ac31..2206882 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -1,48 +1,17 @@ - - - - /404.html - - - /LICENSE.html - - - /authors.html - - - /index.html - - - /news/index.html - - - /reference/anthro-package.html - - - /reference/anthro.html - - - /reference/anthro_api_compute_prevalence.html - - - /reference/anthro_api_compute_zscore.html - - - /reference/anthro_api_compute_zscore_adjusted.html - - - /reference/anthro_api_standardize_oedema_var.html - - - /reference/anthro_api_standardize_sex_var.html - - - /reference/anthro_prevalence.html - - - /reference/anthro_zscores.html - - - /reference/index.html - + +/404.html +/LICENSE.html +/authors.html +/index.html +/news/index.html +/reference/anthro-package.html +/reference/anthro_api_compute_prevalence.html +/reference/anthro_api_compute_zscore.html +/reference/anthro_api_compute_zscore_adjusted.html +/reference/anthro_api_standardize_oedema_var.html +/reference/anthro_api_standardize_sex_var.html +/reference/anthro_prevalence.html +/reference/anthro_zscores.html +/reference/index.html + diff --git a/man/anthro-package.Rd b/man/anthro-package.Rd index 88e97ea..79b0c37 100644 --- a/man/anthro-package.Rd +++ b/man/anthro-package.Rd @@ -15,8 +15,8 @@ More information on the methods is available online: \seealso{ Useful links: \itemize{ - \item \url{https://github.com/worldhealthorganization/anthro} - \item Report bugs at \url{https://github.com/worldhealthorganization/anthro/issues} + \item \url{https://github.com/WorldHealthOrganization/anthro} + \item Report bugs at \url{https://github.com/WorldHealthOrganization/anthro/issues} } }