Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mgcdanny
mgcdanny / Front End HTML
Last active August 29, 2015 13:56
File Upload with User Generated Metadata
<h1> Upload Your Data (CSV Only) </h1>
<form role="form" method="post" name="formData">
<input type="file" onchange="angular.element(this).scope().setFile(this)" ng-model="upFileDisplayName"/>
<input type="text" ng-model="upFileTitle" placeholder="Type The Title"/>
<textarea ng-model="upFileDesc" placeholder="Type Description"> </textarea>
<button ng-click='uploadAll()' type="submit" class="btn btn-default">Submit</button>
</form>
@mgcdanny
mgcdanny / DotPlot
Created October 3, 2012 22:11
Overlapping Dot Chart
set.seed(1)
performance = rnorm(10,10,3)
effort = rnorm(10,10,3)
model = LETTERS[seq(1,10)]
Db = data.frame(Performance = performance, Effort = effort, Model = model)
@mgcdanny
mgcdanny / FuzzyVar
Created October 2, 2012 03:00
Fuzzy Variable Name Check
###Variable Name Checking ##########
pop = read.csv("H:\\file1.csv", head=T, as.is=T)
sam = read.csv("H:\\file2_vars_10.csv", head=T, as.is=T)
p = pop$NAME[!(pop$NAME %in% sam$NAME)]
s = sam$NAME[!(sam$NAME %in% pop$NAME)]
res = data.frame()
for (i in 1:length(p)) {
for (j in 1:length(s)) {