Commit b6dc8435 authored by Karthik Ram's avatar Karthik Ram
Browse files

Several fixes

- Kurt Hornik requested removing some top level files. Those are now in .RBuildignore
- Rebuilt the package under new roxygen/devtools. This required some changes to roxygen tags. Replaced @S3method with @export.

All checks pass except for this note:

* checking sizes of PDF files under ‘inst/doc’ ... NOTE
parent 2e452871
# Generated by roxygen2 (4.0.2): do not edit by hand
S3method(plot,altmetric)
S3method(print,altmetric)
export(altmetric_data)
......
#' Print a summary for an altmetric object
#' @method print altmetric
#' @S3method print altmetric
#' @export
#' @param x An object of class \code{Altmetric}
#' @param ... additional arguments
print.altmetric <- function(x, ...) {
......@@ -23,8 +22,7 @@ print.altmetric <- function(x, ...) {
#' Plots metrics for an altmetric object
#'
#' @method plot altmetric
#' @S3method plot altmetric
#' @export
#' @param x An object of class \code{Altmetric}
#' @import ggplot2
#' @importFrom reshape2 melt
......
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{altmetric_data}
\alias{altmetric_data}
\title{Returns a data frame of metrics for a paper}
......@@ -5,7 +6,7 @@
altmetric_data(alt_obj)
}
\arguments{
\item{alt_obj}{altmetrics object}
\item{alt_obj}{altmetrics object}
}
\value{
data.frame
......
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{altmetrics}
\alias{altmetrics}
\title{Grab altmetric data on any paper}
......@@ -7,51 +8,29 @@ altmetrics(oid = NULL, id = NULL, doi = NULL, pmid = NULL,
curl = getCurlHandle(), ...)
}
\arguments{
\item{oid}{\code{oid} Any object ID. Any general object
identifier as long as the prefix is "doi","pmid",
"arXiv", or "id".}
\item{oid}{\code{oid} Any object ID. Any general object identifier as long as the prefix is "doi","pmid", "arXiv", or "id".}
\item{id}{The Altmetric \code{id} of a paper. If
specifiying directly, the "id" prefix is not necessary.}
\item{id}{The Altmetric \code{id} of a paper. If specifiying directly, the "id" prefix is not necessary.}
\item{doi}{The \code{doi} of a paper. If specifiying
directly, the "doi" prefix is not necessary.}
\item{doi}{The \code{doi} of a paper. If specifiying directly, the "doi" prefix is not necessary.}
\item{pmid}{The \code{pmid} of a paper.If specifiying
directly, the "pmid" prefix is not necessary.}
\item{pmid}{The \code{pmid} of a paper.If specifiying directly, the "pmid" prefix is not necessary.}
\item{arXiv}{The \code{arxiv} ID of a paper.If
specifiying directly, the "arXiv" prefix is not
necessary.}
\item{arXiv}{The \code{arxiv} ID of a paper.If specifiying directly, the "arXiv" prefix is not necessary.}
\item{apikey}{An API key obtained from altmetric. The key
for this application is
'37c9ae22b7979124ea650f3412255bf9' and you are free to
use it for academic non-commercial research. But if you
start seeing rate limits, please contact support at
altmetric.com to get your own.
\item{apikey}{An API key obtained from altmetric. The key for this application is '37c9ae22b7979124ea650f3412255bf9' and you are free to use it for academic non-commercial research. But if you start seeing rate limits, please contact support at altmetric.com to get your own.
The function returns detailed metrics. For more
information on all the fields returned by the function,
see the API documentation:
(\url{http://api.altmetric.com/docs/call_citations.html}).
If you get your own key, you can save it in your
\code{.rprofile} as
\code{options(altmetricKey="YOUR_KEY")}}
The function returns detailed metrics. For more information on all the fields returned by the function, see the API documentation: (\url{http://api.altmetric.com/docs/call_citations.html}). If you get your own key, you can save it in your \code{.rprofile} as \code{options(altmetricKey="YOUR_KEY")}}
\item{curl}{passes on curl handle in a vectorized
operation}
\item{curl}{passes on curl handle in a vectorized operation}
\item{...}{additional parameters}
\item{...}{additional parameters}
}
\value{
\code{list}
}
\description{
This function will retrieve data from Altmetric.com on any
paper with an appropriate object identifier. Acceptable
identifiers include dois, arXiv ids, pubmed ids and
altmetric ids.
This function will retrieve data from Altmetric.com on any paper with an appropriate object identifier. Acceptable identifiers include dois, arXiv ids, pubmed ids and altmetric ids.
}
\examples{
\dontrun{
......
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{plot.altmetric}
\alias{plot.altmetric}
\title{Plots metrics for an altmetric object}
......@@ -5,9 +6,9 @@
\method{plot}{altmetric}(x, ...)
}
\arguments{
\item{x}{An object of class \code{Altmetric}}
\item{x}{An object of class \code{Altmetric}}
\item{...}{additional arguments}
\item{...}{additional arguments}
}
\description{
Plots metrics for an altmetric object
......
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{print.altmetric}
\alias{print.altmetric}
\title{Print a summary for an altmetric object}
......@@ -5,9 +6,9 @@
\method{print}{altmetric}(x, ...)
}
\arguments{
\item{x}{An object of class \code{Altmetric}}
\item{x}{An object of class \code{Altmetric}}
\item{...}{additional arguments}
\item{...}{additional arguments}
}
\description{
Print a summary for an altmetric object
......
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{return_provider}
\alias{return_provider}
\title{Returns cleaner metric source names (mostly for internal use)}
......@@ -5,11 +6,10 @@
return_provider(provider)
}
\arguments{
\item{provider}{the data provider}
\item{provider}{the data provider}
}
\description{
Returns cleaner metric source names (mostly for internal
use)
Returns cleaner metric source names (mostly for internal use)
}
\examples{
\dontrun{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment