knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(smokingPrevalence)

ONS public smoking prevalence data

Original wide form

The data is released in wide form and the following imports this data as it appears in the spreadsheet form:

get_smoking_wide(clean = FALSE)

To tidy the wide data which combines the 2 row headers to 1 and removes blank rows and columns:

get_smoking_wide() 

#or explicitly

get_smoking_wide(clean = TRUE) 


Lextuga007/smokingPrevalence documentation built on Dec. 18, 2021, 4:34 a.m.