options(width = 90)
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  cache = TRUE
)

healthforum

CRAN status Lifecycle: experimental Travis build status AppVeyor build status

A package for scraping patientforum discussion threads.

Installation

You can install the released version of healthforum from CRAN with:

install.packages("healthforum")

And the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("LingshuHu/healthforum")

Example

This is a basic example which shows you how to scrape this discussion thread from patient.info.

## load healthforum
library(healthforum)

## scrape pages 1-2 from thread about gastritis
gas <- scrape_one_post(
  url = "https://patient.info/forums/discuss/can-gastritis-be-cured--613999",
  From = 1, To = 2)

Preview the returned data frame

tibble::as_tibble(gas)

Disclaimer

healthforum was developed to collect publicly available data from the website patient.info. The purpose of this package is to facilitate academic research. It is the final user's responsibility to store the data securely and obey all applicable local, state, and federal laws and ethical guidelines. For informed consent procedures for using patients.info forum data, please contact their Data Protection Officer at privacy@emishealth.com. Their address is Fulford Grange, Micklefield Lane, Rawdon, Leeds, LS19 6BA. You may also want to contact your local IRB to obtain information about privacy policy.



LingshuHu/patientforum documentation built on Oct. 23, 2020, 5:51 a.m.