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
library(nnet) | |
library(ggplot2) | |
neuralNetScoreTime<-function(var, score){ | |
modelset<-NULL | |
for (i in 1:var) { | |
eval(parse(text=paste0("temp.", i, "<-rnorm(150, mean=1, sd=1)"))) | |
eval(parse(text=paste0("modelset<-cbind(modelset, temp.", i, ")"))) |
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
bpi_genre_sales_perc <- read.csv("http://myinspirationinformation.com/wp-content/uploads/2014/08/bpi_genre_sales_perc.csv") | |
bpi_sales_revenue <- read.csv("http://myinspirationinformation.com/wp-content/uploads/2014/08/bpi_sales_revenue.csv") | |
library(ggplot2) | |
library(reshape2) | |
library(ggthemes) | |
library(plotly) | |
sales_perc_melt<-melt(bpi_genre_sales_perc) | |
sales_perc_albums<-sales_perc_melt[sales_perc_melt$Type=="Albums",] |
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
data(counties) | |
JSON<-jsonNestedData(structure=counties[,1:3], values=counties[,4], top_label="UK") | |
D3Tree(JSON, file_out="Tree.html") | |
hc.ave <- hclust(dist(USArrests), "ave") | |
hc.single <- hclust(dist(USArrests), "single") | |
hc.ward <- hclust(dist(USArrests), "ward.D") | |
cut.ave<-cutree(hc.ave, k=6) |
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
library(SpotifyAPI) | |
out<-visDiscography(artist="Shuggie Otis", output_file="Shuggie Disco.html") |
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
install.packages("devtools") | |
library("devtools") | |
install_github("jamesthomson/R2D3") |
NewerOlder