Git Product home page Git Product logo

hmsidwr's Introduction

hmsidwR - Health Metrics and the Spread of Infectious Diseases with R

DOI R-CMD-check CRAN status

The goal of {hmsidwR} is to provide the set of data used in the Health Metrics and the Spread of Infectious Diseases Machine Learning Applications and Spatial Modeling Analysis with R book.

Installation

install.packages("hmsidwR")

You can install the development version of hmsidwR from GitHub with:

# install.packages("devtools")
devtools::install_github("Fgazzelloni/hmsidwR")

Example

This is a basic example which shows you how to solve a common problem:

library(hmsidwR)
library(dplyr)
data(sdi90_19)
head(subset(sdi90_19, location == "Global"))
#> # A tibble: 6 × 3
#>   location  year value
#>   <chr>    <dbl> <dbl>
#> 1 Global    1990 0.511
#> 2 Global    1991 0.516
#> 3 Global    1992 0.521
#> 4 Global    1993 0.525
#> 5 Global    1994 0.529
#> 6 Global    1995 0.534
sdi_avg <- sdi90_19 |>
  group_by(location) |>
  reframe(sdi_avg = round(mean(value), 3))

head(sdi_avg)
#> # A tibble: 6 × 2
#>   location       sdi_avg
#>   <chr>            <dbl>
#> 1 Aceh             0.58 
#> 2 Acre             0.465
#> 3 Afghanistan      0.238
#> 4 Aguascalientes   0.606
#> 5 Aichi            0.846
#> 6 Akita            0.792
sdi90_19 |>
  filter(location %in% c("Global", "Italy", "France", "Germany")) |>
  group_by(location) |>
  reframe(sdi_avg = round(mean(value), 3)) |>
  head()
#> # A tibble: 4 × 2
#>   location sdi_avg
#>   <chr>      <dbl>
#> 1 France     0.79 
#> 2 Germany    0.863
#> 3 Global     0.58 
#> 4 Italy      0.763

hmsidwr's People

Contributors

fgazzelloni avatar

Watchers

Lucian avatar  avatar

hmsidwr's Issues

Release hmsidwR 0.1.0

First release:

Prepare for release:

  • git pull
  • urlchecker::url_check()
  • devtools::build_readme()
  • devtools::check(remote = TRUE, manual = TRUE)
  • devtools::check_win_devel()
  • git push
  • Draft blog post

Submit to CRAN:

  • usethis::use_version('minor')
  • devtools::submit_cran()
  • Approve email

Wait for CRAN...

  • Accepted 🎉
  • Finish & publish blog post
  • Add link to blog post in pkgdown news menu
  • usethis::use_github_release()
  • usethis::use_dev_version(push = TRUE)
  • usethis::use_news_md()
  • Tweet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.