commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
1289f9637129af82f5349dbf587c21be568698be
Bump version to 3.0.99
rgchris/ren-c,mbk/ren-c,hostilefork/rebol,rgchris/ren-c,hostilefork/rebol,hostilefork/rebol,hostilefork/rebol,kealist/ren-c,kealist/ren-c,draegtun/ren-c,hostilefork/rebol,mbk/ren-c,hostilefork/rebol,giuliolunati/ren-c,giuliolunati/ren-c,kealist/ren-c,giuliolunati/ren-c,giuliolunati/ren-c,rgchris/ren-c,codebybrett/ren-c...
src/boot/version.r
src/boot/version.r
3.0.99.3.1
3.0.91.3.1
apache-2.0
R
ed98c0f0ce630f655122c05dad35ba12dcc3d9bc
Add patient sample demo.
pschulam-attic/sclero
demo/patient-sample.r
demo/patient-sample.r
require(sclero) require(ggplot2) require(plyr) data(pft) data(patient) set.seed(2) n.visits <- ddply(pft, ~ patient.id + test.type, summarize, visits = length(na.omit(test.result))) n.fvc.visits <- subset(n.visits, test.type == "fvc") patient.ids <- subset(n.fvc.visits, visits > 5)$patient.id some.patients <- samp...
mit
R
3ca6513b09ac21b1f05ea018421b5a45002fa167
Create area_under_curve.r
nairvinayv/random_scripts,nairvinayv/random_scripts
area_under_curve.r
area_under_curve.r
#Code for calculating the area under curve using Trapezoidal Integration #Input File has single column containing Values args <- commandArgs(trailingOnly = TRUE); raw_data = read.csv(args[1]) data <- cbind(1:dim(raw_data)[1],raw_data) require(pracma) AUC = trapz(as.vector(t(data[1])),as.vector(t(data[2]))) disp(AUC)
mit
R
cc251751cdf81a9401299e7caca58e369337aa67
Add slope.r as a simple demo
filipkral/slopeaspect
slope.r
slope.r
# Calculate slope and aspect of a digital terrain model slope<-function(r, res=1){ # returns a slope surface of elevation raster r of resolution res, # according to Burrough et McDonnell 2000, p. 191 newr<-matrix(0, nrow=nrow(r), ncol=ncol(r)) h<-nrow(r) w<-ncol(r) for(i in 2:(h-1)){ for(j in 2:(w-1)){...
mit
R
17fe555481b255d79197c21209709a5de8ad2641
Create get_jfg.r
lancezlin/rProject
firstPack/R/get_jfg.r
firstPack/R/get_jfg.r
get_jfg <- function(data){ family_group_name <- c() job_family_group <- data$"Job Family Group" len <- length(job_family_group) for (i in 1:len){ if (is.element(job_family_group[i], family_group_name)){ #if (any(family_group_name != job_family_group[i])){ #family_group_name <- append(family_group_na...
mit
R
e337c919c031b49bea3f2b63a87a0eb6e8d7018b
Implement doc parsing and display for modules
klmr/modules,klmr/modules
R/help.r
R/help.r
parse_documentation = function (module) { module_path = module_path(module) parsed = list(env = module, blocks = roxygen2:::parse_file(module_path, module)) rdfiles = roxygen2:::roc_process(rd_roclet(), parsed, dirname(module_path)) rdcontents = lapply(rdfiles, roxygen2:::format.rd_fil...
apache-2.0
R
ca36a3f2f866e4876afe3dbe029776a2edb9c6f2
Add Pitman-Yor style CRP.
jtobin/bnp
chinese-restaurant-process/src/generalized_crp.r
chinese-restaurant-process/src/generalized_crp.r
generalized_crp = function(n, a, b) { restaurant = data.frame(table = 1, customers = 1) for (j in seq(n - 1)) { restaurant = arrival(restaurant, a, b) } restaurant } arrival = function(r, a, b) { k = nrow(r) p = 1 - (b + k * a) / (sum(r$customers) + b) if (rbinom(1, 1, p)) { join_table(r, a) ...
mit
R
cf79e0975d19f1bf334fb1a81c864d3e98559925
更新:第六章fig6-15
shuaimeng/r
thesis/chap6/fig6-15.r
thesis/chap6/fig6-15.r
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib') setwd("/Users/mengmengjiang/all datas/conductivity") library(xlsx) #reading datas #compare d and ratio in qd-1 #sheetName = qd1-18,qd1-19,qd1-20; # 18nl/min下的液滴直径 # 或者1.8kv下,三种液体在两种qd下的表现; # qd1-18,qd2-18; # 液滴比...
mit
R
891333fb2eeb8bcf35872127570914718db9924e
Add DataPrep function
mattmills49/CFBWinProbability
R/DataPrep.r
R/DataPrep.r
#' Format data to be used in regression fitting #' #' This function takes in a data frame of plays read in from the CFB Stats #' play by play file after the time of each play has been added. The function #' determines a winner of each game, adjusts the down, distance, and spot #' for kickoffs, determines if the game i...
mit
R
a5078e8f8b51d697e8ff412a1933427f1a18d076
check and repair degenerated scenarios
felixlindemann/HNUORTools,felixlindemann/HNUORTools
R/HNU.OR.TPP.Prepare.r
R/HNU.OR.TPP.Prepare.r
setGeneric("HNU.OR.TPP.Prepare", function(object,...) standardGeneric("HNU.OR.TPP.Prepare") ) setMethod("HNU.OR.TPP.Prepare",signature(object="HNUGeoSituation"), function(object,...){ li<-list(...) if(is.null(li$checkDegenerated)) li$checkDegenerated <- TRUE if(li$checkDegenerated){ supply <...
mit
R
30c9be05c0561a76ece2a06bc366215f602c2aea
Add interactions demo to explore clinic and lab vars.
pschulam-attic/sclero
demo/interactions.r
demo/interactions.r
# Demo visualizing the interactions between the lab and clinical # variables recorded for the sclero project. options(warn = -1) require(ggplot2) require(GGally) require(plyr) require(sclero) data(list = c("clinic", "pft", "patientsplit")) dev.patients <- unique(subset(patientsplit, dev == 1)$patient.id) clinic <- ...
mit
R
26185d91d5129acc5c8a6730ad6afd6626975859
update Us临界速度拟合
shuaimeng/r
print/merge/fig2_fit.r
print/merge/fig2_fit.r
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib') library(rJava) setwd("/Users/mengmengjiang/all datas/max fp") library(xlsx) # reading execl k1<-read.xlsx("gly1.xlsx",sheetName="qd2-20",header=TRUE) plot(k1$fv,k1$deva,col="0",xlab = expression(italic(f["v"])...
mit
R
c5e2a01da3d3996c0d43ff1b029b69619f9eb127
Create newIndexColumn.r
jluzuria2001/codeSnippets,jluzuria2001/codeSnippets,jluzuria2001/codeSnippets,jluzuria2001/codeSnippets
newIndexColumn.r
newIndexColumn.r
# CREATE A NEW COLUMN OF INDEX # FROM 0 TO THE SIZE OF THE MATRIX MINUS 1 error1$index<-seq.int(0, nrow(error1)-1, 1) #COMPARE THE COLUMNS #AND CREATE A NEW COLUMN #PUTTING A 0 IF ARE EQUAL #PUTTING A 1 IF ARE DIFFERENT error1$order <- ifelse(error1$V6 == error1$index,0,1) #COUNT THE NUMBER OF ZERO IN A MATRIX...
mit
R
d288b9378f4e9f49c22860a53069b1b78bf1be1e
add script for running cn.mops
sestaton/sesbio,sestaton/sesbio,sestaton/sesbio,sestaton/sesbio
gene_annotation/gene_annotation_R_scripts/cnmops.r
gene_annotation/gene_annotation_R_scripts/cnmops.r
library(cn.mops) BAMFiles <- list.files(pattern=".bam$") bamDataRanges <- getReadCountsFromBAM(BAMFiles, refSeqName = c("Ha4", "Ha16"), mode = "paired", WL = 100) #bamDataRanges <- getReadCountsFromBAM(BAMFiles, refSeqName = c("Ha4", "Ha16"), mode = "paired") res <- cn.mops(bamDataRanges, normType = "mean") segm <- a...
mit
R
1d3c1af0cae7db8599facc993772a7105997d3f3
Create anothersimplecode.r
vj-ug/Data-Analysis-of-Human-Activity-
anothersimplecode.r
anothersimplecode.r
training = read.csv("UCI HAR Dataset/train/X_train.txt", sep="", header=FALSE) training[,562] = read.csv("UCI HAR Dataset/train/Y_train.txt", sep="", header=FALSE) training[,563] = read.csv("UCI HAR Dataset/train/subject_train.txt", sep="", header=FALSE) testing = read.csv("UCI HAR Dataset/test/X_test.txt", sep="", he...
apache-2.0
R
ca0c6ac6696ce78d60382b72074eeaa2f2941a3d
Implement stricter object access
klmr/modules,klmr/modules
R/access.r
R/access.r
#' Access an object inside a module #' @usage #' module$object #' @param module the module object #' @param object the name of the object #' @return Unlike the default \code{$} operator in R, access non-existent #' objects in modules yields an error rather than returning \code{NULL}. #' @export `$.module` = function (m...
apache-2.0
R
26e1a799dbdb8a6bd3e8aaf45711d28a3c24d770
Create ff.r
ActiveAnalytics/activeH5-dataframe-bench,ActiveAnalytics/activeH5-dataframe-bench
ff.r
ff.r
# Benchmark code for reading/writing data frames from/to file using ff package # Load the data set from CSV file data_path <- "../data/2007.csv" system.time(dat <- read.csv(data_path)) # Load the ff package require(ff) ff_file <-"../data/air_ff" system.time(ffsave(dat_ff, file = ff_file, compression_level = 0)) ...
mit
R
0413fe81c16f3a5f3fa7edce1eaf48b7acbc6990
Create south_sf.r
sequenceiq/r_datagen
clustering/south_sf.r
clustering/south_sf.r
#South SF, 6h, 12h and 18h clusters, #400000 #location n1<-400 multiplier<-1 dev<-0.03 x<-c(rnorm(n1,mean=37.65338,sd=dev)) y<-c(rnorm(n1,mean=-122.40555,sd=dev)) #datetime start<-as.POSIXct(strptime("2014/01/01", "%Y/%m/%d")) end<-as.POSIXct(strptime("2014/02/28", "%Y/%m/%d")) dt=end-start dd<-dt/2 t<-c(start+rnorm(...
apache-2.0
R
a17f62b2f13bd9eb49c0702bc389c0245e520174
Add R example
shekkbuilder/innodb_ruby,zhujzhuo/innodb_ruby,shekkbuilder/innodb_ruby,zhujzhuo/innodb_ruby
examples/analysis.r
examples/analysis.r
page_info = "edges_1_0025_edges" ; page_info_width=4000 page_info = "edges_test_d0p" ; page_info_width=1000 page_info = "edges_test_d1p" ; page_info_width=1000 page_info = "edges_test_d1p_a1p" ; page_info_width=1000 page_info = "t" ; page_info_width=1000 page_info_base = paste("~/git/innodb_ruby/", page_info, sep="") ...
bsd-3-clause
R
5e1da3ff197518e9add131380dec3541d2cfd153
Create lm-select.r
Sokel/R-shchu
lm-select.r
lm-select.r
rm(swiss) swiss <- data.frame(swiss) fit_full <- lm(Fertility ~ . , data = swiss) summary(fit_full) fit_reduced1 <- lm(Fertility ~ Infant.Mortality + Examination + Catholic + Education, data = swiss) summary(fit_reduced1) anova(fit_full, fit_reduced1) fit_reduced2 <- lm(Fertility ~ Infant.Mortality + Agriculture +...
apache-2.0
R
dd94f7a9211d620fd1b8e4d3697a30791dbfff89
Add rough code indicative of live coding we'll do
jennybc/ggplot2-tutorial,MaryHe/ggplot2-tutorial,MaryHe/ggplot2-tutorial
gapminder-ggplot2.r
gapminder-ggplot2.r
library(ggplot2) gdURL <- "http://tiny.cc/gapminder" gDat <- read.delim(file = gdURL) # pick one gDat <- read.delim("gapminderDataFiveYear.txt") str(gDat) ggplot(gDat, aes(x = gdpPercap, y = lifeExp)) # nothing to plot yet! p <- ggplot(gDat, aes(x = gdpPercap, y = lifeExp)) # just initializes p + geom_point() #p + ...
mit
R
96854ea5efdc04879affaff002c2c490fac7b2d1
Solve Difference in r
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1007/1007.r
solutions/uri/1007/1007.r
input <- file('stdin', 'r') a <- as.integer(readLines(input, n=1)) b <- as.integer(readLines(input, n=1)) c <- as.integer(readLines(input, n=1)) d <- as.integer(readLines(input, n=1)) result = sprintf("DIFERENCA = %d", a * b - c * d) write(result, "")
mit
R
4a942a4617256536a5cca691b3c1d8e7aa32abc6
format conversion function
khufkens/phenor
R/flat_format.r
R/flat_format.r
#' Flatten the format as generated by format_phenocam() #' and format_modis(). Flattening the file format allows #' for substantial speed increases in optimization however #' limits readability. Using the split functionality between #' the format_*() functions and this function allows for easy #' subsetting of datasets...
agpl-3.0
R
2cf587ad96d5e4ab1ea39aee93cb044da69379dd
Add receiveBin function (plus small repo edits).
oerdnj/rapache,oerdnj/rapache,oerdnj/rapache,oerdnj/rapache,oerdnj/rapache,oerdnj/rapache,jeffreyhorner/rapache,jeffreyhorner/rapache,jeffreyhorner/rapache,jeffreyhorner/rapache,jeffreyhorner/rapache,jeffreyhorner/rapache,oerdnj/rapache
test/recBin.r
test/recBin.r
# Canonical Test hrefify <- function(title) gsub('[\\.()]','_',title,perl=TRUE) scrub <- function(str){ if (is.null(str)) return('NULL') if (length(str) == 0) return('length 0 string') #cat("\n<!-- before as.character: (",str,")-->\n",sep='') str <- try(as.character(str)) if (inherits(str,'try-error')) return('t...
apache-2.0
R
3cdc1535fc26560cb8ef4399f0df9b1b8a821c3a
add demo.r
skefi/SpatialStress,skefi/SpatialStress
R/demo.r
R/demo.r
## Example ## install.packages(c("moments")) source("R/functions.r") # creating an initial landscape object initial <- init_landscape(states = c("+","0","-"), cover = c(0.4,0.1,0.5)) plot(initial) plot(initial, cols = c("darkgreen", "grey70", "white")) summary(initial) # run simulation parms_grazing <- list...
mit
R
73567de7fc29b3a48a5b52fef9daec499fc804e3
test parsing
rebolsource/rebol-test,metaeducation/ren-c-test,rebolsource/rebol-test,metaeducation/ren-c-test
test-parsing.r
test-parsing.r
Rebol [ Title: "Test parsing" File: %test-parsing.r Author: "Ladislav Mecir" Date: 30-Jan-2013/12:11:48+1:00 Purpose: "Test framework" ] do %line-numberq.r whitespace: charset [#"^A" - #" " "^(7F)^(A0)"] ; compatibility functions: unless value? 'transcode [transcode: :load] unless value? 'spec-of [spec-of: :th...
apache-2.0
R
767834e90cd1088f3f2ee1822963f44f069b0133
add regularization to master
robertzk/tundra,syberia/tundra
R/tundra_regularization.r
R/tundra_regularization.r
#' Tundra regularization wrapper # tundra_regularization_train_fn <- function(dataframe) { cat("Training Regularized Logistic Regression model...\n") library(glmnet) regularization_args <- list() indep_vars <- setdiff(colnames(dataframe), 'dep_var') stopifnot(length(indep_vars) > 0) defaults <- list...
mit
R
a2a443197c2389f1e412abf824f1308bfcdd485a
add R script for Ida Episperm 1 sRNA-seq
kqian/work
Work/Ida/sript.r
Work/Ida/sript.r
bamFls = list.files(path="./data/2013-10-11/bowtie/",pattern=".bam$",full.names=TRUE) bedFls = list.files(path="./annotation/",pattern="hsa",full.names=TRUE) source("scripts/dataAnalysis/snowCount.r") data = snowCount(bamFls,bedFls,cpus=4) ### gene.anno <- import("annotation/hsa_genome.gtf") #miRBase v20 miRNA.anno<...
artistic-2.0
R
0cf25ca62d8496b76acf0caac0ab4ee57b66f294
Add SVM algorithm in R
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Classification/SupportVectorMachine/regularSupportVectorMachine.r
Classification/SupportVectorMachine/regularSupportVectorMachine.r
# Support Vector Machine (SVM) classification for machine learning. # # SVM is a binary classifier. The objective of the SVM is to find the best # separating hyperplane in vector space which is also referred to as the # decision boundary. And it decides what separating hyperplane is the 'best' # because the distance f...
mit
R
0581f4f7507e24f6297da69eadb42b87c6c652b6
add tests for simple template filling
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
tests/testthat/test-0-util.r
tests/testthat/test-0-util.r
context("util") test_that("template filler", { tmpl = "this is my {{ template }}" values = list(template = "filled") filled = fill_template(tmpl, values) expect_equal(filled, "this is my filled") }) test_that("template default values", { tmpl = "this is my {{ template | default }}" values = li...
apache-2.0
R
53c53e58f908af179712068d63b1acebde269aab
add integrated qsys (#36)
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
tests/testthat/test-qsys.r
tests/testthat/test-qsys.r
context("qsys") w = create_worker_pool(1, qsys_id="multicore") test_that("control flow", { fx = function(x) x*2 result = Q(fx, x=1:3, workers=w) expect_equal(result, as.list(1:3*2)) }) test_that("common data", { fx = function(x, y) x*2 + y result = Q(fx, x=1:3, const=list(y=10), workers=w) ex...
apache-2.0
R
acea03bcc1b4c2252726458e5ee568d6ed84e565
Add utilities file.
pschulam-attic/sclero
R/util.r
R/util.r
dev_subset <- function(data, patientsplit) { dev.patients <- unique(subset(patientsplit, dev == 1)$PtID) subset(data, patient.id %in% dev.patients) } add_date_since <- function(data, date.var, since.var, patient.data, baseline.var) { patient.baseline <- structure(as.Date(patient.data[[baseline.var]]), ...
mit
R
ebc552f2d5e686bb4c6ce2b36c607c76221d85bf
Create try.xgboost.v1.r
minesh1291/MachineLearning,minesh1291/MachineLearning,minesh1291/MachineLearning
myPracticeGCE/try.xgboost.v1.r
myPracticeGCE/try.xgboost.v1.r
#library(caret) # for dummyVars #library(RCurl) # download https data library(Metrics) # calculate errors library(xgboost) # model MultiLogLoss <- function(act, pred) { eps = 1e-15; nr <- nrow(pred) pred = matrix(sapply( pred, function(x) max(eps,x)), nrow = nr) pred = matrix(sapply( pred, function(x) mi...
apache-2.0
R
4f8b1a894924923804d4e3d5b01365b2b6d1d2e4
Create remindo2qdnatool_conversion_script.r
ShKlinkenberg/remindo2qdnatool
remindo2qdnatool_conversion_script.r
remindo2qdnatool_conversion_script.r
# Remindo QDNA conversion script # In Remindo export the raw results through an admin account in the "beheer omgeving" # Select the opleiding of interest. # Select the exam of interest. # Click tab "Exporteren". # Click "Resultaten". # Select period exam startdate and time, end period current time. # Click "Download ...
cc0-1.0
R
7a82964a7f7b4a689f6da14b45b01df43e3f979c
Add main module file
klmr/ggplots
__init__.r
__init__.r
#' Pretty plotting module export = import('./export', attach = 'export_from') gg = import_package('ggplot2') export_from(gg) # # Set a very minimal theme. Avoid chartjunk. # fonts = import('./fonts') fonts$register_fonts(c('Roboto', 'Roboto Condensed')) theme_set(theme_minimal() + theme(panel.grid = elem...
apache-2.0
R
89eab726b7a06580ab4afffec2b4a08b2768644e
Add R classification template
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Classification/classificationTemplate.r
Classification/classificationTemplate.r
# R Classification template # Importing the data set dataset = read.csv('Social_Network_Ads.csv') dataset = dataset[, 3:5] # Splitting the Dataset into a Training set and a Test set # install.packages('caTools') # library(caTools) set.seed(123) # choose random number, only same number for debugging split = sample.spl...
mit
R
7587cb70cfe91587a49d452e5e92a9e607441824
Create ggplot2_formatter.r
1R151-1/R,jezdata/R,fdryan/R
ggplot2_formatter.r
ggplot2_formatter.r
# --------------------------------------------------------------------------------------------- # Formatting functions for ggplot graph axis # --------------------------------------------------------------------------------------------- #' Human Numbers: Format numbers so they're legible for humans #' Use this in gg...
unlicense
R
9f6e56e1a2021519cc4d45aad8a5ca558129c4fe
Fix LAUNCH to properly work with argv-based CALL
codebybrett/ren-c,rgchris/ren-c,mbk/ren-c,codebybrett/ren-c,rgchris/ren-c,hostilefork/rebol,mbk/ren-c,kealist/ren-c,hostilefork/rebol,draegtun/ren-c,kealist/ren-c,mbk/ren-c,draegtun/ren-c,hostilefork/rebol,giuliolunati/ren-c,draegtun/ren-c,codebybrett/ren-c,kealist/ren-c,codebybrett/ren-c,hostilefork/rebol,codebybrett/...
src/mezz/mezz-control.r
src/mezz/mezz-control.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Control" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http://www.apache.org/licenses/LICENSE-2.0 ...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Control" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http://www.apache.org/licenses/LICENSE-2.0 ...
apache-2.0
R
8f77d72e1df13ab75965a3ed1d97c86ce9585278
Add stick breaking process.
jtobin/bnp
stick-breaking-process/src/sbp.r
stick-breaking-process/src/sbp.r
sbp = function(n, a) { bundle = list(0, numeric(0)) for (j in seq(n)) { bundle = snap(bundle[[1]], bundle[[2]], a) } bundle[[2]] } snap = function(acc, bun, a) { b = rbeta(1, 1, a) stick = exp(log(b) + acc) nacc = log (1 - b) + acc nbun = c(bun, stick) list(nacc, nbun) }
mit
R
85679ea418e7f21f343c8462da09c2c92a52654f
Create scatterplot_with_histograms.r
hclimente/wisdom,hclimente/wisdom,hclimente/wisdom
r/examples/scatterplot_with_histograms.r
r/examples/scatterplot_with_histograms.r
library(ggplot2) library(grid) library(gridExtra) g <- ggplot(switch.psi,aes(x=Normal,y=Tumor,color=What,shape=Type)) + geom_point() + smartas_theme() + labs(x="", y="") + scale_color_manual(values=c("Tumor no switch"="#7fc97f", "Normal"="#beaed4", "Tumor switch"="#fdc086")) n <- ggplot(switch.psi,aes(x=Norm...
mit
R
5d79759e6be56b2251198b8ffbfb3d7c381b5d46
Create cfsv2_ts_ncdc_sqlite.r
dpbroman/hydroforecast
cfsv2_ts_ncdc_sqlite.r
cfsv2_ts_ncdc_sqlite.r
########################################### # cfsv2_ts_ncdc_sqlite.r # processes grib2 files from ncdc cfsv2 archive # saves data to sqlite database # saves data in rdata format ########################################### library(data.table) library(dplyr) library(ggplot2) library(lubridate) library(stringr) library(t...
mit
R
3ddd61c4a9db50c670643699245532b8e4a52397
add linear model
Chilverslab/Lunch_and_Learn,Chilverslab/Lunch_and_Learn,Chilverslab/Lunch_and_Learn
linearModel.r
linearModel.r
library(car)
mit
R
75d6287ade9aeddb7991843f1e78934cdb5cf134
Add WRAP function
codebybrett/ren-c,kealist/ren-c,codebybrett/ren-c,giuliolunati/ren-c,mbk/ren-c,giuliolunati/ren-c,draegtun/ren-c,hostilefork/rebol,draegtun/ren-c,rgchris/ren-c,rebolsource/r3,mbk/ren-c,mbk/ren-c,rebolsource/r3,rgchris/ren-c,draegtun/ren-c,giuliolunati/ren-c,rgchris/ren-c,kealist/ren-c,hostilefork/rebol,kealist/ren-c,rg...
src/mezz/mezz-control.r
src/mezz/mezz-control.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Control" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http://www.apache.org/licenses/LICENSE-2.0 ...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Control" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http://www.apache.org/licenses/LICENSE-2.0 ...
apache-2.0
R
0ea5fb3a2a9d78a9de7356779260e5332602bd2a
Add test cases for module file search
klmr/modules,klmr/modules
inst/tests/test-path.r
inst/tests/test-path.r
context('Find module path relative files') test_that('module_file works in global namespace', { expect_that(module_file(), equals(getwd())) expect_true(nchar(module_file('run-all.r')) > 0) throws_error(module_file('XXX-does-not-exist', mustWork = TRUE), 'no file found') }) test_that('modu...
apache-2.0
R
2d39fc68c3b1955b1d4aaf5f66b066408b4bb8e3
Create readme.rd
wgong/open_source_learning,wgong/open_source_learning,wgong/open_source_learning
projects/Open_Food/image/readme.rd
projects/Open_Food/image/readme.rd
apache-2.0
R
e0c3c45e43a95eae2cb26fb76bd74dbf0db1e8bc
Create 2stations.r
data-henrik/db2-bluemix-r
2stations.r
2stations.r
########### R script to analyze historic weather data for temperature ## Connection handle con to BLU for Cloud data warehouse is provided already ## For plotting, we are using ggplot2 package ## ## Data for multiple stations is shown in different colors ## library(ggplot2) library(bluR) ## initialize DB2 connection ...
apache-2.0
R
a7c64a67afcfcd0ed2b6963082c4b2faa16d66a5
test for listvar as term arg
metaborg/strategoxt,lichtemo/strategoxt,lichtemo/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,metaborg/strategoxt,Apanatshka/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,metaborg/strategoxt,Apanatshka/strategoxt,Apanatshka/strategoxt,metaborg/strategoxt,metaborg/strategoxt,lichtemo/strategoxt
strc/spec/test1/test45.r
strc/spec/test1/test45.r
module test45 strategies main = foo(|[1, 2, 3]) foo(|xs*) = !xs* bar(|xs*) : _ -> [xs*] foobar(|x) = !x ; {xs* : ?xs*; !xs*} foobar(|x) = !x ; ?xs*; !xs*
apache-2.0
R
5299b8ad86e2d0f85e75899895d5edac8e76ce38
Create trendyitunes.r
RuxuePeng/openCPUapp,RuxuePeng/openCPUapp,RuxuePeng/openCPUapp
R/trendyitunes.r
R/trendyitunes.r
# function to grab trendy itunes shows trendyitunes = function(){ iTunes = fromJSON("https://rss.itunes.apple.com/api/v1/us/tv-shows/top-tv-episodes/25/non-explicit/json") pool = data.frame(Name = iTunes$feed$results$artistName, Detail = paste("Episode:",iTunes$feed$results$name), ...
mit
R
6df86c4383378c0d27d902d512b9b1e61b44d2fa
Create ui.r
aleksandrov2/APPR-2015-16
shiny/ui.r
shiny/ui.r
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://www.rstudio.com/shiny/ # library(shiny) source("lib/uvozi.zemljevid.r", encoding = "UTF-8") source("podatki/podatki.r", encoding = "UTF-8") source("uvoz/uvozi.r", encod...
mit
R
1d90eeb63c577beb2cc40dda404d39b6ad0a7975
Create geom_boxplot_star.r
hclimente/ggstars
R/geom_boxplot_star.r
R/geom_boxplot_star.r
mit
R
43d3c6abde5fb41a7298a10edb8704b98c7023e6
Add script to make inputs for phast
e3bo/2015phylo,e3bo/2015phylo,e3bo/2015phylo
src/make-regression-inputs.r
src/make-regression-inputs.r
#!/usr/bin/Rscript library(ape) tree <- read.nexus('mcc.tree') nms <- tree$tip.label abs <- sapply(strsplit(nms, '_'), '[[', 1) ind <- match(abs, state.abb) reg <- state.region[ind] regDNA <- factor(reg, levels=c("Northeast", "South", "North Central", "West"), labels=c('A', 'T', 'C'...
cc0-1.0
R
54fb5bb5c87414c0a149e24f2cdd67b597452ce8
Create correlation.r
Sokel/R-shchu
correlation.r
correlation.r
df <- mtcars cor.test(df$mpg, df$hp) fit <- cor.test(df$mpg, df$hp) # OR fit <- cor.test(~ mpg + hp, df) fit$statistic fit$p.value str(fit) plot(df$mpg, df$hp) library(ggplot2) ggplot(df, aes(x = mpg, y = hp, col=factor(cyl)))+ geom_point(size = 5) df_numeric <- df[,c(1,3:7)] pairs(df_numeric) cor(df_numeric) ...
apache-2.0
R
b78f38820ffba22f0f8edc2f4dff5e99dacfb91f
Create R script for plotting results related to the master thesis.
monsendag/goldfish,ntnu-smartmedia/goldfish,ntnu-smartmedia/goldfish,monsendag/goldfish,monsendag/goldfish,ntnu-smartmedia/goldfish
rscripts/master-thesis.r
rscripts/master-thesis.r
#!/usr/bin/env Rscript source('functions.r') results_path <- '~/Projects/goldfish/results' graphs_path <- '~/Projects/goldfish/graphs' # list of data set files to plot vtt <- list() vtt$cluster7 <- "2013-11-28-142459-VTT36k-7 clusters.csv" vtt <- lapply(vtt, get_dataset, folder=results_path) #Threshold 0.4 Tanim...
mit
R
4fdea443828ab3ab8be1d9e2c30b80b3ff185a1c
Create app.r
suraj-deshmukh/myCodes,suraj-deshmukh/myCodes,suraj-deshmukh/myCodes
app.r
app.r
library(shiny) library(shinydashboard) library(shinyBS) header <- dashboardHeader(title="MlR") body <- dashboardBody( mainPanel( tabsetPanel( tabPanel("Classification") ) ) ) sidebar <- dashboardSidebar( fileInput("file","Upload CSV",accept=c("text/csv",".csv")), div(style="displa...
mit
R
33be65382da3005a442382fad1115296857f0442
convert string to seconds since epoch
willb/reminders
time/str2ts.r
time/str2ts.r
# converts a string representation of a time into seconds since the epoch str2ts <- function(s) { return(as.numeric(as.POSIXct(s), origin="1970-01-01")) } attr(str2ts, "docstring") <- "converts a string representation of a time into seconds since the epoch"
unlicense
R
73b373289caa2e323edd170af32015802ba5c562
Add index.
snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3
q3/docs/index.rd
q3/docs/index.rd
=QMAIL3のドキュメント ==目次 *((<スパムフィルタ|URL:JunkFilter.html>)) *設定 *((<スパムフィルタの設定|URL:ConfigJunkFilter.html>))
mit
R
864440abffc82e3fbdac5cfd9c47142b441fc363
Add multivariate posterior skeleton.
jtobin/bnp
finite-gaussian-mixture/src/fmm_multivariate_conditional.r
finite-gaussian-mixture/src/fmm_multivariate_conditional.r
require(dplyr) require(gtools) require(mvtnorm) require(reshape2) # FIXME move to sim module source('fmm_multivariate_generative.r') # FIXME (jtobin): move to simulation module set.seed(42) # FIXME (jtobin): move to simulation module dimension = 2 # FIXME (jtobin): move to simulation module config = list( k = 3...
mit
R
105d08f77adf736170f597d0bd7f4a3a51940094
Create DESeq_Tet1KD.r
crazyhottommy/some-unorganized-old-scripts,crazyhottommy/some-unorganized-old-scripts,crazyhottommy/some-unorganized-old-scripts
R_scripts/DESeq_Tet1KD.r
R_scripts/DESeq_Tet1KD.r
# read GEO data sets from NCBI by GEOquery setwd("/home/tommy/Tet1")# set the working directory library(Biobase) library(GEOquery) # only set the GSEMatrix to FALSE can it be parsed for later use of function like # Meta(gse) gse<- getGEO('GSE26830', GSEMatrix=FALSE, destdir=".") Meta(gse) names(GSMList(gse)) # I ...
mit
R
020d0334832d321dab8c1b151b10f4835812d1cc
Read Me.
Zaid-Al-Omari/Telegram.Bot.Mvc
Telegram.Bot.Mvc/README.rd
Telegram.Bot.Mvc/README.rd
An MVC-like framework to create Telegram Bots. - Just like Asp.net MVC. - Establish Command Routes. - Create Bot Controllers. - Create Actions To Handle Specific Commands. - Automatic Paramter Binding. - Works Both For WebHooks & Stand Alone.
mit
R
efa8d2438035dbcd3e45bc3a36e87c83e585d7b1
Add files via upload
saeedsk/twitter
retweets.r
retweets.r
packages <- c("ggplot2", "lubridate", "RTextTools", "bit64", "stringr", "date", "scales", "textcat", "NLP", "SnowballC", "textcat", "data.table", "tm.plugin.dc", "igraph") if (length(setdiff(packages, rownames(installed.packages()))) > 0) { install.packages(setdiff(packages, rowname...
mit
R
855b6c95702d16c2c6e56a2dc6a20b05da726b9d
Create AndersonDarlingBootstrap.r
bolus123/Statistical-Process-Control
AndersonDarlingBootstrap.r
AndersonDarlingBootstrap.r
AD.gamma.bootstrap.test <- function(X, pars, sim = 10000) { integrand.f <- function(u, Fn, pars) { (Fn(qgamma(u, shape = pars[1], scale = pars[2])) - u) ^ 2 / u / (1 - u) } A2.f <- function(n, Fn, pars) { n * integrate(integrand.f, 0, 1, Fn = Fn, pars = pars, subdivisions = ...
apache-2.0
R
44031587b68a3f85ea9d054189636e2095c9f5ff
Create area_under_curve.r
nairvinayv/Rscripts
area_under_curve.r
area_under_curve.r
#Code for calculating the area under curve using Trapezoidal Integration #Input File has single column containing Values args <- commandArgs(trailingOnly = TRUE); raw_data = read.csv(args[1]) data <- cbind(1:dim(raw_data)[1],raw_data) require(pracma) AUC = trapz(as.vector(t(data[1])),as.vector(t(data[2]))) disp(AUC)
mit
R
980f12d3d6f5d910d1d540341d672b9d82eb8b16
Add R Interpolation Research Document.
alexandre-normand/glukit,alexandre-normand/glukit,alexandre-normand/glukit,alexandre-normand/glukit
doc/glukit-score-interpolation.r
doc/glukit-score-interpolation.r
data <- c(xy.coords(0,100), xy.coords(2556288,0), xy.coords(1364832,30), xy.coords(711936,50), xy.coords(498816,60), xy.coords(362880,65), xy.coords(128640,75), xy.coords(88120,84)) data <- xy.coords(list(0, 88120, 128640, 362880, 498816, 711936, 1364832, 2556288), list(100, 84, 75, 65, 60, 50, 30, 0)) f <- splinefun(...
mit
R
95afa6b2afcd771fcd60928edd3f78107e68a772
Create MissingAge.r
lingcheng99/Kaggle-Titanic
MissingAge.r
MissingAge.r
> train=read.csv('train.csv',header=T) > train1=train > train1$Pclass=as.factor(train1$Pclass) > train1$Survived=as.factor(train1$Survived) > test=read.csv('test.csv',header=T) > Survived=rep('None',nrow(test)) > test1=data.frame(test,Survived) > test2=test1 > test2$Pclass=as.factor(test2$Pclass) #Write a function to...
mit
R
356f8131eff1f17a890aa87286918ced1bbaff29
Create treeMaps.r
tessam30/FoodForPeace
treeMaps.r
treeMaps.r
# Clear workspace rm(list=ls()) # load libraries library(ggplot2) library(dplyr) library(treemap) library(RColorBrewer ) C:\Users\t\Box Sync setwd("C:/Users/t/Box Sync/FoodForPeace/R/") d <- read.csv("FFPdata0912.csv", sep = ",", header = TRUE) names(d) d$Food.Aid <- round(d$decTotal/1000, 0) # d$Food.Aid <- format...
apache-2.0
R
5b19ec1804cfb9989101e485edfd2e0d022a21c2
Add a testing file for Windows
Pointillistic/rebol-lang,zsx/r3,zsx/r3,zsx/r3,zsx/r3,Pointillistic/rebol-lang,Pointillistic/rebol-lang,Pointillistic/rebol-lang
make/tests/ms-drives.r
make/tests/ms-drives.r
REBOL [] msvcrt: make library! %msvcrt.dll getdrives: make routine! compose/deep [ [return: [uint32]] (msvcrt) "_getdrives" ] maps: getdrives i: 0 while [i < 26] [ unless zero? maps and shift 1 i [ print rejoin [to char! (to integer! #"A") + i ":"] ] ++ i ] close msvcrt
apache-2.0
R
0652a82cc211b2ea7884c4e5db78903712c24673
Install script for most common/useful packages
jkarl/LandscapeToolbox,jkarl/LandscapeToolbox,jkarl/LandscapeToolbox
package_installation.r
package_installation.r
############################################### ### COMMONLY USED PACKAGES IN AIM R SCRIPTS ### ############################################### #### DATA WRANGLING #### install.packages( c( "dplyr", ## Notably useful for data frame manipulation with group_by(), summarize(), and mutate() and the piping operator %...
cc0-1.0
R
aab4b064b91f1a0ca4faa4fb5d2b413b26c4ba28
Solve Average 1 in r
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1005/1005.r
solutions/uri/1005/1005.r
input <- file('stdin', 'r') a <- as.double(readLines(input, n=1)) b <- as.double(readLines(input, n=1)) result = sprintf("MEDIA = %.5f", (a * 3.5 + b * 7.5) / 11.0) write(result, "")
mit
R
3fea6321cf8b0ad696de42dad1d60cd0cdab8dab
Add files via upload
Regional-Fish-Modeling/Sampling-Design,Regional-Fish-Modeling/Sampling-Design,Regional-Fish-Modeling/Sampling-Design
southern_Apps/bkt_trend_power_wo_weather_cov_model.r
southern_Apps/bkt_trend_power_wo_weather_cov_model.r
model{ # Abundance model for(i in 1:nSites){ for(j in 1:nYears){ N[i,j] ~ dpois(lambda[i,j]) log(lambda[i,j]) <- mu + trend*(j-1) + site.ran[i] + year.ran[j] + log(siteLength[i,j]) + eps[i,j] } } ## priors mu ~ dnorm(0, 0.01) # overall intercept tren...
mit
R
08275f80ff3a6d65d02a0e705658c3628f2fd2c5
Add tests for NHGIS
mnpopcenter/ripums,mnpopcenter/ripums
tests/testthat/test_nhgis.r
tests/testthat/test_nhgis.r
context("NHGIS") # Manually set these constants... rows <- 71 vars_data <- 17 vars_data_shape <- 24 d6z001_label <- "1989 to March 1990" d6z001_var_desc <- "Year Structure Built (D6Z)" pmsa_first2_sort <- c("Akron, OH PMSA", "Anaheim--Santa Ana, CA PMSA") test_that( "Can read NHGIS extract (data only)", { nhgis...
mpl-2.0
R
b0a4b4c11ec56ca29afcab71578947e219577341
Create wetbulb_stull.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/wetbulb_stull.r
R/wetbulb_stull.r
mit
R
a5d50a8b92b1bd72a523242b6fe21f4f5c450998
Create SQL_R.r
fdryan/R,1R151-1/R,jezdata/R
SQL_R.r
SQL_R.r
# --------------------------------------------------------------------------------------------- # Functions for working with SQL in R # --------------------------------------------------------------------------------------------- # Read in a SQL file from the wroking directory # e.g. read.sql("sql/test.sql") read.s...
unlicense
R
98e0200d80512d1acdc93f720a1a7cdceecf64ef
Create Main.r
bgweber/RServer,bgweber/RServer,bgweber/RServer,bgweber/RServer
src/samples/helloworld/Main.r
src/samples/helloworld/Main.r
cat("Hello World!")
bsd-3-clause
R
74ffd43baecb13d4555a13672c8821af2f464f39
Create BreastfeedingSleepFakeCleaningCode.r
wibeasley/RAnalysisSkeleton,wibeasley/RAnalysisSkeleton,wibeasley/RAnalysisSkeleton
BreastfeedingSleepFakeCleaningCode.r
BreastfeedingSleepFakeCleaningCode.r
#The following code is meant to provide the z-scores for the collection of sleep statistics within # each feeding scenario. sleepstats<-as.numeric(ds[,8]) sleepstats.scenario1<-sleepstats[1:45] sleepstats.scenario2<-sleepstats[46:90] sleepstats.scenario3<-sleepstats[91:135] sleepZscenario1<-as.numeric(scale(sleepsta...
mit
R
0916615890bd24e80bff2a2777e25b7aae821960
add code for filter coefficients to adc_recorder_trigger
pavel-demin/red-pitaya-notes,fbalakirev/red-pitaya-notes,pavel-demin/red-pitaya-notes,fbalakirev/red-pitaya-notes,fbalakirev/red-pitaya-notes,fbalakirev/red-pitaya-notes,pavel-demin/red-pitaya-notes,pavel-demin/red-pitaya-notes,pavel-demin/red-pitaya-notes,pavel-demin/red-pitaya-notes,fbalakirev/red-pitaya-notes,fbalak...
projects/adc_recorder_trigger/fir_0.r
projects/adc_recorder_trigger/fir_0.r
library(signal) # CIC filter parameters R <- 32 # Decimation factor M <- 1 # Differential delay N <- 6 # Number of stages Fo <- 0.22 # Pass band edge # fir2 parameters k <- kaiserord(c(Fo, Fo+0.02), c(1, 0), 1/(2^16), 1) L <- ...
mit
R
b6a681ba72b2b3e29533cc2902488903a9e4aa49
Create ggplot_significance.r
hclimente/wisdom,hclimente/wisdom,hclimente/wisdom
r/ggplot_significance.r
r/ggplot_significance.r
geom_bar_significance <- function(categories,ranges,barsize=2, pairAxis=0.5){ # categories: all factors to be plotted # ranges: contains the data for the categories for which an arc will be drawn # category: name of the category # y: height of the two bars require(ggplot) require(plyr) # create base...
mit
R
c2a24eac1f03c97d00a415057828a49edfc9b090
Create runtopicmodel.r
kasperwelbers/corpus-tools,kasperwelbers/corpus-tools
runtopicmodel.r
runtopicmodel.r
# 'command line' script to run a topic model # Usage: Rscript runtopicmodel.r /path/to/dtm.rdata /path/to/model.out.rdata K alpha # # dtm.rdata should be an R data file containing a dtm variable (e.g. created by save(dtm, file="dtm.rdata")) # model.out will be an R data containing a variable m with the fitted model # K...
mit
R
7889ce223288fe8e78d90e5b92dab03e266c9d27
Create ggplot_tiles_fisher-test.r
hclimente/wisdom,hclimente/wisdom,hclimente/wisdom
r/examples/ggplot_tiles_fisher-test.r
r/examples/ggplot_tiles_fisher-test.r
ggplot() + geom_tile(data=subset(test, Significant==0),aes(x=tumor,y=feature,fill=oddsratio), color = "white") + geom_tile(data=subset(test, Significant==1),aes(x=tumor,y=feature,fill=oddsratio), color = "black", size=2) + scale_fill_gradient2(low = "#2166ac", high = "#d94801", mid = "white", space = "Lab", midp...
mit
R
7422fc8fa8a384074ca99fe10b14a2129c1498ba
add copy number calc method
sestaton/sesbio,sestaton/sesbio,sestaton/sesbio,sestaton/sesbio
gene_annotation/gene_annotation_R_scripts/cnmops.r
gene_annotation/gene_annotation_R_scripts/cnmops.r
library(cn.mops) BAMFiles <- list.files(pattern="sort.bam$") # Setting the window length is important because the default will be extremely large. bamDataRanges <- getReadCountsFromBAM(BAMFiles, refSeqName = c("Ha4", "Ha16"), mode = "paired", WL = 100) res <- cn.mops(bamDataRanges, normType = "mean") res <- calcInteg...
library(cn.mops) BAMFiles <- list.files(pattern=".bam$") bamDataRanges <- getReadCountsFromBAM(BAMFiles, refSeqName = c("Ha4", "Ha16"), mode = "paired", WL = 100) #bamDataRanges <- getReadCountsFromBAM(BAMFiles, refSeqName = c("Ha4", "Ha16"), mode = "paired") res <- cn.mops(bamDataRanges, normType = "mean") segm <- a...
mit
R
d236b810779a6788c03dc36470f0ff1b80b4a01a
Add arguments example
tisp-lang/tisp,raviqqe/tisp,tisp-lang/tisp,raviqqe/tisp,raviqqe/tisp
examples/args.r
examples/args.r
((\ (x1 x2 (x3 123) (x4 456) *args y1 (y2 123) y3 (y4 456) **kwargs) x) 1 2 3 4 *list * y1 123 y3 456 ** {'y5 123 'y6 456})
mit
R
35e19b891f7d5cbf5cd3ced7af1d5a981e6a9612
add data prepping script to begin deduplication
e3bo/2015pedv,e3bo/2015pedv,e3bo/2015pedv,e3bo/2015pedv
src/data-prep.r
src/data-prep.r
#!/usr/bin/Rscript library(igraph) library(maps) # for state.fips library(sp) Sys.setlocale("LC_TIME", "C") #Needed for identical() Sys.setlocale("LC_COLLATE", "C") ## Get case data dataDir <- '.' GetCaseData <- function(){ fn <- file.path(dataDir, 'PEDvweeklyreport-state-ts-01-08-14.csv') ret <- read.csv(fn) ...
mit
R
062cd696480186b26b852ee177e8df893fc7eced
Implement `module_file` function
klmr/modules,klmr/modules
R/module_file.r
R/module_file.r
#' Find the full file names of files in modules #' #' @param ... character vectors of files or subdirectories inside a module; if #' none is given, returns the root directory of the module #' @param module a module environment (default: current module) #' @param mustWork logical; if \code{TRUE}, an error is raised if ...
apache-2.0
R
41c28dc5c307893de6235ae051a2a5d99ee8f715
Create answer.r
neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu/Paiza-POH-MyAnswers,neetsdkasu...
POH6plus/answer.r
POH6plus/answer.r
strConcat <- function(x,y) { paste(c(x,y), collapse="") } strReverse <- function(x) { paste(rev(strsplit(x, NULL)[[1]]), collapse='') } zz <- file("stdin") ww <- readLines(zz) n <- as.integer(ww[1]) ww <- sort(ww[2:(n+1)]) f <- "" e <- "" cc <- array("", dim=c(n)) ci <- 1 for (i in 1:n) { if (ident...
mit
R
bf7444b6d4c6b6ef1cbb3b6f86bdf836d9548898
Create batch-consistency-plot.r
ShaopengLiu1/Atac-seq_Quality_Control_pipe,ShaopengLiu1/Atac-seq_Quality_Control_pipe,ShaopengLiu1/Atac-seq_Quality_Control_pipe
code_collection/idr_folder/batch-consistency-plot.r
code_collection/idr_folder/batch-consistency-plot.r
# 1-20-10 Qunhua Li # # This program first plots correspondence curve and IDR threshold plot # (i.e. number of selected peaks vs IDR) for each pair of sample # # usage: # Rscript batch-consistency-plot-merged.r [npairs] [output.dir] [input.file.prefix 1, 2, 3 ...] # [npairs]: integer, number of consistency analyses # ...
mit
R
4d373e571d23ae75e9e44f3e1927e799f97f24a7
add tests placeholder
robertzk/syberiaStages,FeiYeYe/syberiaStages
inst/tests/test-placeholder.r
inst/tests/test-placeholder.r
# placeholder
mit
R
82de3b8b98290a99a19fef6017aaa3d28faa8e50
Create get_cfsv2_ncdc.r
dpbroman/hydroforecast
get_cfsv2_ncdc.r
get_cfsv2_ncdc.r
########################################### # get_cfsv2.r # pulls cfsv2 forecasts from NCDC archive # subsets to gbm and africa domains # pulls out precip. surface temp, winds, and latent # heat flux # pulling all runs, 0-18z init times, out to 60 days (1440 hours) ########################################### start_time...
mit
R
d7c296f19ffd108a5f0c8a1bed94e3cc76775a53
Create mtcars.r
bgweber/RServer,bgweber/RServer,bgweber/RServer,bgweber/RServer
tasks/userDemo/mtcars.r
tasks/userDemo/mtcars.r
str(mtcars) print("Sleeping for 20 seconds") Sys.sleep(15) print("Saving RData file") dir.create("C:/wamp/www/RServer/reports/mtcars") save(mtcars, file = "C:/wamp/www/RServer/reports/mtcars/mtcars.RData") fit <- lm(mpg~am + wt + hp, data = mtcars) summary(fit) print("Saving Model") Sys.sleep(10) save(fit, file...
bsd-3-clause
R
6ba633aba399735a8f4a6299678639010e828516
Create altimetry_processing.r
dpbroman/floodforecasting
altimetry_processing.r
altimetry_processing.r
#######DESCRIPTION############################### #processes raw altimetry data from Charon Birkett UMd #outputs rdata object and csv ################################################# ##load libraries library(dplyr) library(data.table) library(readr) library(tidyr) nasa_base_date = as.Date('1958-01-01') ##user inputs #...
mit
R
f533b6899ddc40165b8a915b6c38e613eba0f8eb
更新:第四章fig4-15
shuaimeng/r
thesis/chap4/fig4-15.r
thesis/chap4/fig4-15.r
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib') library(rJava) setwd("/Users/mengmengjiang/all datas/chap4") library(xlsx) #读取数据 q2 <- read.xlsx("dvsfv.xlsx", sheetName = "q15", header = TRUE) #q3 <- read.xlsx("dvsfv.xls", sheetName = "q27", header = TRUE) #q4 <...
mit
R
2b0843c9872ced8b51666fa46a425c3dea6331ae
Add "annual_gauge.r", which displays column chart for annual flow, in acre feet, at the specified gauge, compared to mean and median for historic record
johnrfleck/water-tools
annual_gauge.r
annual_gauge.r
# download and summarize annual flow at any gauge # tutorial here: https://owi.usgs.gov/R/dataRetrieval.html#1 library(dataRetrieval) library(tidyverse) library(lubridate) #get gauge number siteNo <- readline(prompt="Enter a gauge number: ") #siteNo <- "08330000" # get station metadata gauge_meta <- readNWISsite(s...
mit
R
457c5c5f07e1a5c9b8c5f33878cc46e4f6a71c34
Add HDP.
jtobin/bnp
hierarchical-dirichlet-process/src/hdp.r
hierarchical-dirichlet-process/src/hdp.r
BNP_DIR = "/Users/jtobin/projects/bnp" DP_SRC = paste(BNP_DIR, "dirichlet-process/src/dp.r", sep = "/") source(DP_SRC) hdp = function(n, a, h, n1, n2, a1, a2) { g0 = dp(n, a, h) h0 = function() { sample(g0[[1]], size = 1) } g1 = dp(n1, a1, h0) g2 = dp(n1, a1, h0) h1 = function() { sample(g1[[1]], size = 1)...
mit
R
27a2b5ae39333035d43a1de13603155366d6341d
add bind tests
mschubert/narray,mschubert/narray
tests/testthat/test_bind.r
tests/testthat/test_bind.r
context("bind") test_that("vector", { expect_equal(bind(list(1:2, 3:4), along=1), t(bind(list(1:2, 3:4), along=2)), cbind(1:2, 3:4)) }) test_that("keep names", { x = setNames(1:2, letters[1:2]) m = bind(list(x,x), along=2) expect_equal(names(x), rownames(m)) col...
apache-2.0
R
73a7eb761aa824c714642a5d634d069a4378f17e
Create src_teradata.r
xiaodaigh/teradata.dplyr
R/src_teradata.r
R/src_teradata.r
#library("teradataR") # library("RODBC") # library("dplyr") # library(data.table) # library("assertthat") #' td.table - a R reference to Teradata table td.table <- function(con, table, database = "") { if (missing(database) || is.null(database) || nchar(database) == 0) { obj <- gettextf("\"%s\"", table) } els...
mit
R
2e06c638c36b4694034c6308c7d2fff3c0e65ca9
Add regression template for R
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Regression/regressionTemplate.r
Regression/regressionTemplate.r
# Regression template for machine learning. # Importing the data set dataset = read.csv('Position_Salaries.csv') dataset = dataset[2:3] # Splitting the Dataset into a Training set and a Test set # install.packages('caTools') # library(caTools) set.seed(123) # choose random number, only same number for debugging split...
mit
R
a15cd60f6bac9b2794708aaa040f391f468c7f01
Use last "."-separated path component as extension
earl/rebol3
scripts/shttpd.r
scripts/shttpd.r
REBOL [title: "A tiny static HTTP server" author: 'abolka date: 2009-11-04] code-map: make map! [200 "OK" 400 "Forbidden" 404 "Not Found"] mime-map: make map! [ "html" "text/html" "css" "text/css" "js" "application/javascript" "gif" "image/gif" "jpg" "image/jpeg" "png" "image/png" "r" "text/plain" "r3" "te...
REBOL [title: "A tiny static HTTP server" author: 'abolka date: 2009-11-04] code-map: make map! [200 "OK" 400 "Forbidden" 404 "Not Found"] mime-map: make map! [ "html" "text/html" "css" "text/css" "js" "application/javascript" "gif" "image/gif" "jpg" "image/jpeg" "png" "image/png" "r" "text/plain" "r3" "te...
apache-2.0
R
92c5969f1766107258622a1d2ef8b6cf03b09258
Create README.rd
acm-csuf/icpc,acm-csuf/icpc,acm-csuf/icpc
2013-10-10-Playing_With_Wheels/README.rd
2013-10-10-Playing_With_Wheels/README.rd
Link to problem on UVa: <a href="http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1008" target="_blank">10067 - Playing with Wheels</a>
mit
R
8cac9db6d961a73d0cfffea45edb34da51c89b74
Add new report template
hkaju/Ising2D,hkaju/Ising2D,hkaju/Ising2D
templates/report.template.r
templates/report.template.r
pdf("{filename}") data <- read.csv("results.csv", header=T) par(mfrow=c(2,2)) plot(data$T, data$M, xlab="Temperature", ylab="Magnetization") plot(data$T, data$E, xlab="Temperature", ylab="Energy") plot(data$T, data$Xb, xlab="Temperature", ylab="Magnetic susceptibility") plot(data$T, data$Xt, xlab="Temperature...
mit
R
2ab8ab4200d59ef1af2db70d7c7b8c7eb8778a7d
Add some finite mixture model spec.
jtobin/bnp
dirichlet-process-mixture/src/fmm.r
dirichlet-process-mixture/src/fmm.r
# finite gaussian mixture model # # a ~ inverse-gamma(1, 1) # p | a ~ symmetric-dirichlet(a) # c | p ~ multinomial(p) # l ~ gaussian(mu_y, var_y) # r ~ gamma(1, prec_y) # mu | c, l, r ~ gaussian(l, r^-1) # s | c, b, w ~ gamma(b, w^-1) # b ...
mit
R
5f10fd5dc4c6409364d57815c6cfc0ee1eb9958b
add R example code
dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerleau/yarra-valley,dustypomerle...
code-examples/r.r
code-examples/r.r
tbl <- read.table(file.choose(),header=TRUE,sep=',') population <- tbl[c("NAME","POPESTIMATE2009","NPOPCHG_2009")] smallest.state.pop <- min(population$POPESTIMATE2009) print(population[population$POPESTIMATE2009==smallest.state.pop,]) #utility functions readinteger <- function() { n <- readline(prompt="Enter an in...
mit
R
6fae2984da1917ec90ea343f579784cac43dd168
Add quick and dirty match count vs. cache misses plot.
danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel
src/Scripts/match-vs-cachelines.r
src/Scripts/match-vs-cachelines.r
library("ggplot2") library("reshape2") setwd("~/dev/BitFunnel/src/Scripts") # See # https://www.r-bloggers.com/choosing-colour-palettes-part-ii-educated-choices/ # for color information. df <- read.csv(header=TRUE, file="/tmp/QueryPipelineStatistics.csv") # queries <- read.csv(header=TRUE, file="/tmp/QueryPipelineSt...
mit
R