getElementText: A Webscrape Function

Description Usage Arguments Examples

Description

This function allows you to extract text from an element and returns vector

Usage

1
getElementText(html, cssSelector)

Arguments

html

html code of the page

cssSelector

css selector of the element

Examples

1
2
html <- xml2::read_html("https://www.drugshortagescanada.ca")
getElementText(html,"table tbody tr td")

kunal15abc/ezscrape documentation built on June 1, 2019, 5:01 a.m.