This file contains hidden or 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
# load libraries | |
library(ggplot2) | |
library(plyr) | |
library(reshape2) | |
# function to calculate monthly payments | |
paymnth=function(loanamt,irate,nyr,xtraprin,xtraprintime){ | |
# Calculate monthly payments |
This file contains hidden or 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
# | |
# Get appraised value of car from Edmunds.com using the developer API with R | |
# Reference: http://developer.edmunds.com/docs/read/The_Vehicle_API | |
# | |
# set working dir | |
setwd('~/R/carvalue') | |
#load libraries | |
library(RJSONIO) |
This file contains hidden or 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
pid | project | duedt | stage | updttime | |
---|---|---|---|---|---|
1 | Proj1 | 2013-12-01 | Stg0 | 2012-12-20 18:50:00 | |
2 | Proj2 | 2013-06-01 | Stg2 | 2012-12-20 18:50:00 | |
3 | Proj3 | 2014-03-01 | Stg0 | 2012-12-20 18:50:00 | |
4 | Proj4 | 2015-08-01 | Stg1 | 2012-12-20 18:50:00 | |
5 | Proj5 | 2013-12-01 | Stg1 | 2012-12-20 18:50:00 |
This file contains hidden or 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(shiny) | |
# load a very small projects file | |
# Eventually the idea is to have a database link to SQLite or access | |
projects=data.frame(pid=c(1,2,3,4,5),project=c("proj1","proj2","proj3","proj4","proj5")) | |
# Define server logic | |
shinyServer(function(input, output) { | |
# if Projects -> View Projects is selected, this outputs the lists in dataframe projects |
This file contains hidden or 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
# Here a set of instructions corresponding to each code lesson is made into a dataset codelist | |
ID=as.numeric() # id of code lesson | |
instruct=as.character() # instructions for code lesson | |
subhead=as.character() # subheading for code lesson | |
i=1 | |
ID[i]=i | |
subhead[i]="Simple R Expressions: Addition" | |
instruct[i]=paste('Try simple math','Type the command below','','1+1','',sep="\n") |