Learn R Programming

wikiTools (version 1.2.8)

urltoFrame: Convert an URL link to an HTML iframe.

Description

Convert an URL link to an HTML iframe.

Usage

urltoFrame(url)

Value

A character vector of HTML iframe for the given urls.

Arguments

url

Character vector of URLs.

Author

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Details

This function converts an available URL direction to the corresponding HTML iframe, i.e., "https://es.wikipedia.org/wiki/Socrates" changes into "<a href='https://es.wikipedia.org/wiki/Socrates' target='_blank'>Socrates</a>".

Examples

Run this code
## When you have a single URL:

urltoFrame("https://es.wikipedia.org/wiki/Socrates")

## It is possible to work with a vector of URL to obtain another vector of html frames:

A <- c("https://es.wikipedia.org/wiki/Socrates", 
       "https://es.wikipedia.org/wiki/Plato", 
       "https://es.wikipedia.org/wiki/Aristotle")
urltoHtml (A)

Run the code above in your browser using DataLab