Created
October 29, 2015 10:43
-
-
Save Nicktz/147d23fe6eb43874c44f to your computer and use it in GitHub Desktop.
Installing plotly - Fairtreegists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Following [this](https://plot.ly/r/getting-started/) howto, go [here](https://plot.ly/) and sign up using github. | |
Once this has been done, take not of your username (same as github) and api key. | |
Then go to R and use the following code. | |
install.packages("viridis") # dependency | |
install.packages("devtools") | |
devtools::install_github("ropensci/plotly") | |
library(plotly) | |
Sys.setenv("plotly_username"="<<githubusername generated above>>") | |
Sys.setenv("plotly_api_key"="<<<apikeygenerated above>>>") | |
Now verify that you have successfully linked R to plotly: | |
plotly:::verify("username") | |
plotly:::verify("api_key") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To enable plotly at each opening of R, open Rprofile.site in this directory: C:\Program Files\R\R-3.2.2\etc.
Then, according to this link: http://www.statmethods.net/interface/customizing.html
Input:
.First <- function(){
library(fairtreeR)
load.packages()
library(plotly)
Sys.setenv("plotly_username"="Nicktz")
Sys.setenv("plotly_api_key"="a2gfekub28")
cat("\nWelcome at", date(), "\n")
}