Description Usage Arguments Details Value Author(s) See Also Examples
This function will take a pubMedAbst
object, or a list of these
objects and generate a web page that will list the titles of
the abstracts and link to their full page on PubMed
1 | pmAbst2HTML(absts, filename, title, frames = FALSE, table.center = TRUE)
|
absts |
A list of |
filename |
The output filename. If |
title |
Extra title information for your listing |
frames |
If |
table.center |
If TRUE, will center the listing of abstracts |
This function uses the Entrez
functionality provided by NCBI to
retrieve the abstract URL at the PubMed site. It will then create a
tabular webpage which will list the titles of the abstracts provided
and have them link to the appropriate PubMed page. If frames
is TRUE
, the table of links will be on the left hand side of
the page and the right hand will link directly to the appropriate
PubMed page.
If frames
is FALSE
, a simple HTML file is created with
the name specified by filename
.
If frames
is TRUE
, then there are four HTML files
created, of the form XXXtop.html
, XXXside.html
,
XXXmain.html
and XXXindex.html
, where XXX
is the
string provided by filename
.
Jeff Gentry
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | x <- pubmed("9695952","8325638","8422497")
a <- xmlRoot(x)
numAbst <- length(xmlChildren(a))
absts <- list()
for (i in 1:numAbst) {
absts[[i]] <- buildPubMedAbst(a[[i]])
}
## First try it w/o frames - using a temporary
## file for the output
fname <- tempfile()
pmAbst2HTML(absts,filename=fname)
if (interactive())
browseURL(paste("file://",fname,sep=""))
## Now try it w/ frames, using temporary files again.
fnameBase <- tempfile()
pmAbst2HTML(absts,filename=fnameBase, frames=TRUE)
if (interactive())
browseURL(paste("file://",fnameBase,"index.html",sep=""))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.