idpaperlist <- function(x){
a <- x %>%
html_nodes("tr td") %>%
html_text()
if (identical(a, character(0))) {
at <- data.frame(publicationyear = NA,
publicationtitle = NA,
publicationtype = NA,
publicationcitations = NA,
publicationjournal = NA)
} else {
lmin <- min(which(a %in% c("paper", "article", "chapter"))) - 2
lmax <- max(which(a %in% c("paper", "article", "chapter"))) + 1
amod <- a[lmin:lmax]
at <- as.data.frame(matrix(amod,ncol=4, byrow=TRUE))
colnames(at) <- c("publicationyear", "publicationtitle", "publicationtype", "publicationcitations")
repind <- grep("This paper has another version", at$publicationtitle)
if (length(repind)!=0) at <- at[-repind, ]
at$publicationcitations <- as.numeric(at$publicationcitations)
st <- at$publicationtitle
at$publicationtitle <- gsub("In:.*", "", st)
at$publicationjournal <- gsub(".*In:", "", st)
at$publicationjournal <- gsub("\\[.*?\\]", "", at$publicationjournal)
}
return(at)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.