File tree 4 files changed +33
-7
lines changed
4 files changed +33
-7
lines changed Original file line number Diff line number Diff line change 2
2
# ' quality figures. This API allows R users to generate plot.ly graphs from their desktop
3
3
# ' R environment.
4
4
# '
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/
6
6
# '
7
7
# ' \itemize{
8
8
# ' \item Package: plotly
12
12
# ' \item License: MIT
13
13
# ' }
14
14
# '
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
+ # '
15
26
# ' @author Chris Parmer chris@@plot.ly
16
27
# ' @references Documentation and examples at https://plot.ly/API
17
28
# ' @name plotly-package
Original file line number Diff line number Diff line change 16
16
# ' @param username plotly username
17
17
# ' @param key plotly API key
18
18
# '
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.
20
21
# ' @details See documentation and examples at https://plot.ly/API
21
22
# ' @references https://plot.ly/API
22
23
# ' @author Chris Parmer chris@@plot.ly
36
37
# ' ## This call sends data to Plotly, Plotly renders an interactive
37
38
# ' ## graph, and returns a URL where you can view your plot
38
39
# ' 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
41
42
# ' }
42
43
43
44
plotly <- function (username = NULL , key = NULL ){
Original file line number Diff line number Diff line change @@ -9,12 +9,25 @@ API allows R users to generate plot.ly graphs from their
9
9
desktop R environment.
10
10
}
11
11
\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 /
14
14
15
15
\itemize { \item Package : plotly \item Type : Package \item
16
16
Version : 0.3.4 \item Date : 2014 - 03 - 06 \item License : MIT }
17
17
}
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
+ }
18
31
\author {
19
32
Chris Parmer chris @ plot.ly
20
33
}
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ plotly(username = NULL, key = NULL)
10
10
\item {key }{plotly API key }
11
11
}
12
12
\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.
14
15
}
15
16
\description {
16
17
A call to \code {plotly(username , key )} creates an object of
You can’t perform that action at this time.
0 commit comments