Skip to content

Commit 5d4ffbb

Browse files
committed
small edits
1 parent 407a1d1 commit 5d4ffbb

File tree

4 files changed

+33
-7
lines changed

4 files changed

+33
-7
lines changed

R/plotly-package.r

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#' quality figures. This API allows R users to generate plot.ly graphs from their desktop
33
#' R environment.
44
#'
5-
#' Here is an example of an interactive graph made from the R API: https://plot.ly/ ~chris/407/
5+
#' An example of an interactive graph made from the R API: https://plot.ly/ ~chris/407/
66
#'
77
#' \itemize{
88
#' \item Package: plotly
@@ -12,6 +12,17 @@
1212
#' \item License: MIT
1313
#' }
1414
#'
15+
#' @section Authentication:
16+
#'
17+
#' There are a few different options. First, you can pass in your username and key
18+
#' to the \code{plotly} function as parameters, like \code{plotly(<yourusername>,
19+
#' <yourkey>)}. Second, you can set your username and key as options temporarily
20+
#' within each R session by executing \code{options(plotlyUsername='<yourusername>')}
21+
#' and \code{options(plotlyKey='<yourkey>')}. Third, you set your username and key
22+
#' permanently (until removed) in your .Rprofile file. Put entries in for each of
23+
#' username and password: \code{options(plotlyUsername='<yourusername>')} and
24+
#' \code{options(plotlyKey='<yourkey>')}.
25+
#'
1526
#' @author Chris Parmer chris@@plot.ly
1627
#' @references Documentation and examples at https://plot.ly/API
1728
#' @name plotly-package

R/plotly.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#' @param username plotly username
1717
#' @param key plotly API key
1818
#'
19-
#' @return An object of class PlotlyClass
19+
#' @return An object of class PlotlyClass, except for the final object after adding
20+
#' layers becomes a list class.
2021
#' @details See documentation and examples at https://plot.ly/API
2122
#' @references https://plot.ly/API
2223
#' @author Chris Parmer chris@@plot.ly
@@ -36,8 +37,8 @@
3637
#' ## This call sends data to Plotly, Plotly renders an interactive
3738
#' ## graph, and returns a URL where you can view your plot
3839
#' response <- py$plot(x,y)
39-
#' url = response$url # view your plot at this URL
40-
#' browseURL(url)
40+
#' response$url # view your plot at this URL
41+
#' browseURL(response$url) # use browseURL to go to the URL in your browser
4142
#' }
4243

4344
plotly <- function(username=NULL, key=NULL){

man/plotly-package.Rd

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,25 @@ API allows R users to generate plot.ly graphs from their
99
desktop R environment.
1010
}
1111
\details{
12-
Here is an example of an interactive graph made from the R
13-
API: https://plot.ly/ ~chris/407/
12+
An example of an interactive graph made from the R API:
13+
https://plot.ly/ ~chris/407/
1414

1515
\itemize{ \item Package: plotly \item Type: Package \item
1616
Version: 0.3.4 \item Date: 2014-03-06 \item License: MIT }
1717
}
18+
\section{Authentication}{
19+
There are a few different options. First, you can pass in
20+
your username and key to the \code{plotly} function as
21+
parameters, like \code{plotly(<yourusername>,
22+
<yourkey>)}. Second, you can set your username and key as
23+
options temporarily within each R session by executing
24+
\code{options(plotlyUsername='<yourusername>')} and
25+
\code{options(plotlyKey='<yourkey>')}. Third, you set
26+
your username and key permanently (until removed) in your
27+
.Rprofile file. Put entries in for each of username and
28+
password: \code{options(plotlyUsername='<yourusername>')}
29+
and \code{options(plotlyKey='<yourkey>')}.
30+
}
1831
\author{
1932
Chris Parmer chris@plot.ly
2033
}

man/plotly.Rd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ plotly(username = NULL, key = NULL)
1010
\item{key}{plotly API key}
1111
}
1212
\value{
13-
An object of class PlotlyClass
13+
An object of class PlotlyClass, except for the final object
14+
after adding layers becomes a list class.
1415
}
1516
\description{
1617
A call to \code{plotly(username, key)} creates an object of

0 commit comments

Comments
 (0)