Skip to content

Commit

Permalink
Fixing colnames for citation_index.
Browse files Browse the repository at this point in the history
  • Loading branch information
muschellij2 committed Oct 1, 2017
1 parent 6845d53 commit 8f4858a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion R/gcite_citation_index.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ gcite_citation_index <- function(doc, ...){
#' @rdname gcite_citation_index
#' @export
gcite_citation_index.xml_node = function(doc, ...) {
rvest::html_table(doc)
df = rvest::html_table(doc)
if (ncol(df) > 0) {
colnames(df)[1] = "index"
}
return(df)
}

#' @rdname gcite_citation_index
Expand Down
2 changes: 1 addition & 1 deletion man/gcite_user_info.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f4858a

Please sign in to comment.