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
7b4e13bf3162ee27081e10a06e1cb6b21fb22eea
Create regression.r
andrewjabara/airbnb_santa_cruz
regression.r
regression.r
#Using data from insideairbnb.com - data from the Santa Cruz, CA area, last updated October 2015 santacruz = read.csv("documents/airbnb_santacruz.csv") attach(santacruz) #thanks to http://www.geodatasource.com/developers/javascript for ideas behind this function #Note that "West" and "South" need negative signs for la...
mit
R
265f2cb439a683370cefd9241f82c8ca2eecd2c3
Add script for plotting history.
BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel
src/Scripts/plot-history.r
src/Scripts/plot-history.r
library("ggplot2") setwd("~/dev/BitFunnel/src/Scripts") df <- read.csv(header=TRUE, file="history.csv") png(filename="bitfunnel-progress.png",width=1600,height=1200) df$date <- as.Date(df$date) ggplot(df, aes(date, wc)) + geom_line(size=3) + scale_x_date() + labs(x = "Date", y = "Lines of code") + stat_smooth(...
mit
R
c675860d5539e7500dab6886426fad797ed6bd9a
Add function to parse csv file better
AcidLeroy/OpticalFlow,AcidLeroy/OpticalFlow,AcidLeroy/OpticalFlow,AcidLeroy/OpticalFlow
src/r_code/load_video_features.r
src/r_code/load_video_features.r
LoadVideoFeatures <- function(csv_file){ options( stringsAsFactors=F ) df = read.csv(csv_file) data_to_numeric_list = function(col) lapply(col, function(x) as.numeric(strsplit(x, "\\s+")[[1]])) return(apply(df, 2, data_to_numeric_list)) }
mit
R
e545d6c1151aff66cb8f2e998abf8f02bb12c4f7
Add manual plot.r
arturocastro/portable-performance,arturocastro/portable-performance,arturocastro/portable-performance,arturocastro/portable-performance
axle/plot.r
axle/plot.r
library("Rmisc") library("ggplot2") get_positions_labels <- function(positions) { labels <- vector() for (pos in positions) { dims <- strsplit(pos, "x")[[1]] labels <- c(labels, paste0(pos, "\n", as.integer(dims[1]) * as.integer(dims[2]))) } return(labels) } results_path ...
mit
R
0a7c551b6963b1fb99a63190f4685d84288d6df4
Add unicode tests to all images docker-exec/dexec#27
docker-exec/r
test/unicode.r
test/unicode.r
cat("hello unicode 👾\n")
mit
R
c838fb09f062663330a08d88214f6d2c048872f7
Add pattern count function
dennis95stumm/bioinformatics_algorithms,dennis95stumm/bioinformatics_algorithms
pattern_count.r
pattern_count.r
pattern_count <- function(text, pattern) { count <- 0 pattern_length <- nchar(pattern) for (i in 0:(nchar(text) - pattern_length)) { if (substr(rep(text), i + 1, i + pattern_length) == pattern) count <- count + 1 } return(count) } message("Text") text <- scan("stdin", what="character", nlines=1) me...
mit
R
a0787acd606e43c131adf06d945436b0e9e82fb1
Add R script for plotting smoothed Precision/Recall curves.
ntnu-smartmedia/goldfish,monsendag/goldfish,monsendag/goldfish,ntnu-smartmedia/goldfish,ntnu-smartmedia/goldfish,monsendag/goldfish
scripts/top10.r
scripts/top10.r
#!/usr/bin/env Rscript library(data.table) library(ggplot2) irPlot <- function(df, type="Precision", n=10, selection="") { # filter out NaN df <- df[complete.cases(df), ] # add grp for indexing df$grp <- paste(df$Recommender,df$KTL, df$Similarity) # set index df <- data.table(df, key='grp')...
mit
R
2b35cdc291ff275fbb32adaf9ed186abeaed6efc
Add test for viewer
mnpopcenter/ripums,mnpopcenter/ripums
tests/testthat/test_viewer.r
tests/testthat/test_viewer.r
context("ipums_view is fault tolerant") ipums_view_error_check <- function(x) { out <- purrr::safely(ipums_view)(x, launch = FALSE) is.null(out$error) } test_that("normal ddi doesn't error", { ddi <- read_ipums_ddi(ripums_example("cps_00006.xml")) expect_true(ipums_view_error_check(ddi)) }) test_that("empty ...
mpl-2.0
R
e48a2079917b4b868166ed082f86233fd898e43c
Add HTS data normalisation helper functions
klmr/codons,klmr/codons
scripts/norm.r
scripts/norm.r
# Implement various helpers to normalise data. # All these functions expect tidy data. # TODO: All functions require documentation. transform_counts = function (counts, fs, ...) dplyr::mutate_each_(counts, dplyr::funs_(lazyeval::lazy(fs)), dplyr:::dots(...)) fpkm = function (counts, transc...
apache-2.0
R
2ee877acc8e225f88c627d895f1add36067bba78
Create bigbang.r
zonination/galaxies
other/bigbang.r
other/bigbang.r
# Simulate some kind of explosion. # This program will generate two plots. # Load the only necessary library to complete this simulation: library(ggplot2) # Number of particles to simulate n=200 # Simulates a vector explosion bigbang<-data.frame("x"=rnorm(n),"y"=rnorm(n)) bigbang$dx<-bigbang$x*.1+.05*rnorm(n) bigban...
mit
R
9711e9983c71a1e6a47e8fcb36d791b586b708bd
Create random-test.r
iArnold/red,iArnold/red
tests/source/units/random-test.r
tests/source/units/random-test.r
REBOL [ Title: "Testprogram for the random function for the Red Programming Language" Author: "Arnold van Hofwegen" File: %random-test.r Tabs: 4 Rights: "Copyright (C) 2014 Arnold van Hofwegen. All rights reserved." License: { Distributed under the Boost Software License, Version 1.0. See htt...
bsd-3-clause
R
0a98fe10c92b02a4816423e073c23f55bdda96a1
Add tests for ipums_info
mnpopcenter/ripums,mnpopcenter/ripums
tests/testthat/test_ipums_info.r
tests/testthat/test_ipums_info.r
context("IPUMS Info") nvars <- 8 first_three_vars <- c("YEAR", "SERIAL", "HWTSUPP") year_label <- "Survey year" year_var_desc <- "YEAR reports the year in which the survey was conducted. YEARP is repeated on person records." file_info_types <- c("ipums_project", "extract_date", "extract_notes", "conditions", "citati...
mpl-2.0
R
3570b45f13a302137831c2d1c88b43366d31c679
Add R script for Polynomial regression
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Regression/PolynomialRegression/regularPolynomialRegression.r
Regression/PolynomialRegression/regularPolynomialRegression.r
# Polynomial regression for machine learning. # # polynomial regression is a form of regression analysis in which the # relationship between the independent variable x and the dependent variable y is # modelled as an nth degree polynomial in x. Polynomial regression fits a # nonlinear relationship between the value of...
mit
R
89ef5cc8d10e1051f656e29ecd28346d03e180d9
Add draft R code to measure SWIFT runtime performance
jmp75/hwrs2015,jmp75/hwrs2015
draft/runtime_benchmark.r
draft/runtime_benchmark.r
library(ophct) # Create tree-catchments, to have a measurement baseline in O(n^2) to check how runtime scales # daily and hourly operation defineNetwork <- function(streamOrder=1, runoffModel='AWBM') { # o o o o # \ / \ / stream order 2 # o o # \ / stream order 1 # o # nu...
agpl-3.0
R
9c7037e152e7f7b7d4fb7f16ddfe908805360362
update fig3 and fig4
shuaimeng/r
print/fig4_sd_d.r
print/fig4_sd_d.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/print") library(xlsx) # reading ux and sd k1<-read.xlsx("dotx.xlsx",sheetName="600",header=TRUE) k2<-read.xlsx("dotx.xlsx",sheetName="1khz",header=TRUE) k3<-r...
mit
R
a868837b71813864293cf5154b4ad8f6f6e9774c
add init.r
nasebanal/nb-bitcoin,nasebanal/nb-bitcoin,nasebanal/nb-bitcoin,nasebanal/nb-bitcoin
init.r
init.r
install.packages("Rserve") install.packages("ggplot2") library("ggplot2")
apache-2.0
R
828a5503f127e976f93de27b2752f43f71ee6dad
Create convert_new_hybrids.r
jdmanthey/conversion_files
convert_new_hybrids.r
convert_new_hybrids.r
# USAGE: # Place structure file and this script in a directory, and set the R # current working directory to be the same. Then type the following # commands, where "file" is the name of your structure file: # source("convert_new_hybrids.r") # convert_snapp("file") convert_nh <- function(file) { x <- read.table(fi...
bsd-3-clause
R
9d72acb721ad19a7bbfa4ba2ce1348839de688a2
add r code
softgrow/MFS-Modelling,softgrow/MFS-Modelling
dorelogit.r
dorelogit.r
using(Zelig) mfs <- read.csv("/Users/alex/Documents/MFS-Modelling/comb.csv", header=TRUE) my.out1 <- zelig(Fire ~ dayofweek + hour + month, data = mfs, model = "relogit", tau=30446/(365.25*24*60*5)) summary(my.out1)
mit
R
30d2a886d735d7cbf1db44e1d5b2cd88d414bfe4
Add setwidth helper for R
klmr/.files,klmr/.files,klmr/.files
.R/interactive/sw.r
.R/interactive/sw.r
local({ setwidth = function () options(width = as.integer(Sys.getenv('COLUMNS'))) makeActiveBinding('sw', setwidth, baseenv()) })
apache-2.0
R
46889994379d33cdb77bf1b26675a6a2e27c3f71
Add plotting snippets in R
gunesacar/tbb-fp,gunesacar/tbb-fp
plot.r
plot.r
library(RColorBrewer) rf <- colorRampPalette(rev(brewer.pal(11,'Spectral'))) r <- rf(32) read.csv("/home/gunes/dev/tor/tbb-fp/scr.txt.csv", header = TRUE) -> res wrep= as.vector(rep(res$w, res$freq)) hrep= as.vector(rep(res$h, res$freq)) crep= as.vector(rep(res$c, res$freq)) df = data.frame(wrep, hrep) library(ggplot2...
agpl-3.0
R
5454c34d6855283551c5f2d3d6731934ab61a2b5
Add a testing file for wrapping variadic functions
zsx/r3,Pointillistic/rebol-lang,Pointillistic/rebol-lang,zsx/r3,zsx/r3,Pointillistic/rebol-lang,zsx/r3,Pointillistic/rebol-lang
make/tests/varargs.r
make/tests/varargs.r
REBOL [] recycle/torture libc: switch fourth system/version [ 3 [ make library! %msvcrt.dll ] 4 [ make library! %libc.so.6 ] ] printf: make routine! [ [ "An example of wrapping variadic functions" fmt [pointer] "fixed" ... "variadic" return: [int32] ] libc "printf" ] sprintf: make routine! [ [ ...
apache-2.0
R
5cafbb24e0e3fc109000499c282357a59e1df889
Create t_test.r
Sapphirine/Big-Data-Analysis-on-Log-Data-of-Standardized-IBT-Test-Toefl-Taker-for-Effects-of-Selection-Changing,Sapphirine/Big-Data-Analysis-on-Log-Data-of-Standardized-IBT-Test-Toefl-Taker-for-Effects-of-Selection-Changing
t_test.r
t_test.r
male <- c(1.7,3.2,1.8,1.9,2.0,2.1,2.0, 1.4,1.7) female <- c(1.7,3.1,1.3,1.2,2.5,2.2,2.1, 1.8,1.9) t.text(male,female)
apache-2.0
R
03c3e9386b3a35703ea232968a507da4736faed2
build mapping statistical table from bam
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/Samtools/BamStat.r
lib/Samtools/BamStat.r
filelist<-read.table(parSampleFile1, sep="\t", header=F, stringsAsFactor=F) filecounts<-apply(filelist, 1, function(x){ dat<-read.table(x[1], sep="\t") #dat<-read.table(filelist[1,1], sep="\t") counts<-sapply(strsplit(as.vector(dat$V1), ' \\+ '), "[", 1) names<-sapply(strsplit(as.vector(dat$V1), ' \\+ '), "[",...
apache-2.0
R
f0e64daabe0b18bc63a26433b195863ea8de9c7b
set up empty overall package doc #124
maxheld83/pensieve,maxheld83/pensieve,maxheld83/pensieve
R/pensieve-package.r
R/pensieve-package.r
#' pensieve. #' #' @name pensieve #' @docType package NULL
agpl-3.0
R
384495d6ab56795c505e7f127baa63072f6a4cbf
Create ball-games.r
ActiveAnalytics/ball-games
ball-games.r
ball-games.r
require(deSolve) ball <- function(t, y, parms) { with(as.list(c(parms, y)), { W <- c(W1, W2, W3) v_W = y[c(2, 4, 6)] - W nv_W = norm(v_W, "2") coeff <- (-.5/m)*rho*A*nv_W dy1 <- y[2] spin1 <- coeff*CL*(vw[2]*(y[6] - W[3]) - vw[3]*(y[4] - W[2]))/w if(is.na(spin1)) spin1 <- 0 #dy2...
mit
R
9133a503b7ce3ec13b9c2330a4c37735de60f4e4
Create pollutantmean.r
evohnave/R-Programming-Course
pollutantmean.r
pollutantmean.r
pollutantmean <- function(directory, pollutant, id = 1:332) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## For this exercise the location is assumed to be in a ## sub-directory of the working directory, getwd() ## 'pollutant' is a character vector of ...
unlicense
R
483376120cb768c061f957816e15895508d0ca52
Add a missing file.
snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3
web/en/_nav.rd
web/en/_nav.rd
=begin ((<QMAIL3|URL:./>))|((<Download|URL:download.html>))|((<Release Notes|URL:releasenotes.html>))|((<Documents|URL:/doc/>))|((<FAQ|URL:/doc/FAQ.html>))|((<ML|URL:http://qs.snak.org/cgi-bin/mailman/listinfo/qs>))|((<BTS|URL:/bts/guest.cgi?project=Q3&action=top>))|((<Lingr|URL:http://www.lingr.com/room/bJETSwHp1e5>)...
mit
R
c5fcf9e0b306b4abdc56ee6026896c8ae9a694e4
Add plotting R script for priorities
vhotspur/spl-java,vhotspur/spl-java,vhotspur/spl-java,vhotspur/spl-java,vhotspur/spl-java
bench/sandbox/priorities/plot_summary.r
bench/sandbox/priorities/plot_summary.r
# # Copyright 2013 Charles University in Prague # Copyright 2013 Vojtech Horky # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
apache-2.0
R
658df9db181195c083866ccb2b835255df61073a
Create teste.r
MatheusRabetti/MatheusRabetti.github.io,MatheusRabetti/MatheusRabetti.github.io,MatheusRabetti/MatheusRabetti.github.io
assets/posts/integrate-r-python/teste.r
assets/posts/integrate-r-python/teste.r
mit
R
ada5d9e2fbb5745b7b4f92a03c12f6022e4926c9
Solve Simple Product 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/1004/1004.r
solutions/uri/1004/1004.r
input <- file('stdin', 'r') a <- as.integer(readLines(input, n=1)) b <- as.integer(readLines(input, n=1)) write(paste("PROD =", a * b), '')
mit
R
bfdbf97cdf2f2cdd9b3c3e986595de1e51948d80
Create 2.r
glor/R,glor/R
aufgaben/blatt03/2.r
aufgaben/blatt03/2.r
#3 Aufgabe 2: #3.1 laus = read.table(file = "lice.txt", sep="\t", dec = ".", header = TRUE) # H1: Kita2 hat weniger Kopflaeuse gehabt # H0: Kita2 hat gleich viel oder mehr Kopflaeuse als Kita1 gehabt
bsd-2-clause
R
74104ba5b91e8ede607bb3797046d4123d7fa714
Add calibration plot function
paulinshek/paulinshek.github.io,paulinshek/paulinshek.github.io,paulinshek/paulinshek.github.io,paulinshek/paulinshek.github.io,paulinshek/paulinshek.github.io
_source/2016-02-14-relationship-prediction/calibrationPlotModelFitting.r
_source/2016-02-14-relationship-prediction/calibrationPlotModelFitting.r
######### Calibration Plot function CalibrationPlot = function(prob, result,bins=100, detail = FALSE,range = c(0,1)) { # creates breaks and sets up the vectors breaks = quantile(prob,seq(0,1,1/bins),na.rm=T)#seq(0,1-1/bins,1/bins) prediction = rep(NA,length(breaks)) observedprop = rep(NA,length(breaks)) meanprob...
mit
R
7a0717d5ec5018389eb7618cc90d7eb853f0ba57
Add Decision Tree Regression in R
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Regression/DecisionTreeRegression/regularDecisionTreeRegression.r
Regression/DecisionTreeRegression/regularDecisionTreeRegression.r
# Decision Tree regression for machine learning. # # Decision tree builds regression or classification models in the form of a tree # structure. It brakes down a dataset into smaller and smaller subsets while at # the same time an associated decision tree is incrementally developed. The final # result is a tree with d...
mit
R
1d6c23231200fc5536462c4c583e6aedfd232552
Create EarlyDropouts.r
pmcrosta/eps
EarlyDropouts.r
EarlyDropouts.r
####################### # INPUT DATASETS: termpat.Rdata # OUTPUT DATASETS: TBD # PREVIOUS PROGRAMS: EnrollmentPatterns.r # FOLLOWING PROGRAMS: TBD # $Id: EarlyDropouts.r 79 2012-08-10 17:29:37Z crosta $ ############################################### stop("Don't run this all at once.") library(ggplot2) library(descr) l...
mit
R
ce9bee8e18200da876072bd407ea3a06d78083d2
Add Brier Score function
mattmills49/CFBWinProbability
R/brierB.r
R/brierB.r
#' Cost function for using \code{cv.glm} fitting procedure #' #' This function just provides a way to get the Brier Score for a model used #' in the \code{cv.glm} function. Of course, this is just the \code{MSE} but #' I didn't realize that until later. So here it is. #' #' @param y the dependent binary variable #' ...
mit
R
71b04aa48a7a7a9d8fd1c2d387e49f00cb2df29e
Create cycles.r
Sokel/R-shchu
cycles.r
cycles.r
mydata <- read.csv('evals.csv') a <- -11 # simple if if(a > 0){ print('positive') }else if(a == 0){ print('null') }else{ print('not positive') } # smart ifelse ifelse(a > 0, 'positive','not positive') #and vector too a <- c(-1,1) ifelse(a > 0, 'positive','not positive') # simple for for(i in 1:100){ prin...
apache-2.0
R
76cb7be959040a00ee77110161ac331dffca62db
Fix interactive legacy data.frame output in R
klmr/.files,klmr/.files,klmr/.files
.R/print-data-frame.r
.R/print-data-frame.r
print.data.frame = function (x, ..., digits = NULL, quote = FALSE, right = TRUE, row.names = TRUE) { if (! isTRUE(all.equal(rownames(x), as.character(seq_len(nrow(x)))))) x = tibble::rownames_to_column(x) print(dplyr::tbl_df(x)) }
apache-2.0
R
16e3a851a0b2e308953718d2666a4599b2973196
Create server.r
aleksandrov2/APPR-2015-16
shiny/server.r
shiny/server.r
library(knitr) library(ggplot2) library(dplyr) require(gsubfn) require(rvest) require(xml2) require(ggplot2) library(sp) library(maptools) library(dendextend) # Uvozimo funkcije za pobiranje in uvoz zemljevida. source("lib/uvozi.zemljevid.r", encoding = "UTF-8") source("podatki/podatki.r", encoding = "UTF-8") source(...
mit
R
d8e5a838165e31fd56df83bce7cfb3e31c5ffe8e
Create Server.r
mmjazzar/TimeSeries_Forecasting,mmjazzar/Load_dashboard
Server.r
Server.r
apache-2.0
R
56f1e35e1195d0af31cd95f4067ec52fe17706eb
更新:第四章fig4-13
shuaimeng/r
thesis/chap4/fig4-13-2.r
thesis/chap4/fig4-13-2.r
## fvc和fpmax fvc2<-c(300,300,200,200) fvc3<-c(300,500,310,200) fvc4<-c(400,600,600,700) fvc5<-c(400,711,800,1110) fpmax2<-c(1000,600,500,600) fpmax3<-c(600,500,800,800) fpmax4<-c(400,600,1000,2000) fpmax5<-c(400,700,1000,3500) par(mfrow = c(2,1), mar = c(2,2.2,0.3,1), oma = c(1,1,1,1)) ## yan<-c("red","blue","black"...
mit
R
0aaf5c7f38aa7f7ad78fd53057575138bdb286a9
add bubblemap
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/seurat_bubblemap.r
lib/scRNA/seurat_bubblemap.r
source("scRNA_func.r") library("Seurat") library("readxl") library(ggplot2) options_table<-read.table(parSampleFile1, sep="\t", header=F, stringsAsFactors = F) myoptions<-split(options_table$V1, options_table$V2) assay=ifelse(myoptions$by_sctransform == "0", "RNA", "SCT") finalList<-readRDS(parFile1) obj=finalList$...
apache-2.0
R
7c582a84ad6c1bfd65d31f4368c8dd6802743aef
add revigo r script
CJ-Chen/TBtools-Manual,CJ-Chen/TBtools-Manual,CJ-Chen/TBtools-Manual,CJ-Chen/TBtools-Manual
BioScripts/Rscript/Revigo本地可视化代码.r
BioScripts/Rscript/Revigo本地可视化代码.r
library(ggrepel) p1 <- ggplot( data = one.data ); p1 <- p1 + geom_point( aes( plot_X, plot_Y, colour = log10_p_value, size = plot_size), alpha = I(0.6) ) + scale_size_area(); p1 <- p1 + scale_colour_gradientn( colours = c("blue", "green", "yellow", "red"), limits = c( min(one.data$log10_p_value), 0) ); p1 <- p1 ...
mit
R
dcb0c8a50270dfb3439827a43458cf04688ce903
Add Support Vector regression with R
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Regression/SupportVectorRegression/regularSVMRegression.r
Regression/SupportVectorRegression/regularSVMRegression.r
# Support Vector regression for machine learning. # # Support Vector Machine can also be used as a regression method, maintaining all # the main features that characterize the algorithm (maximal margin). The Support # Vector Regression (SVR) uses the same principles as the SVM for classification, # with only a few min...
mit
R
dbcc9527ee1b5eca24f09f898e2c3a7470e29861
Create script_hadoop.r
coatless/stat490uiuc,coatless/stat490uiuc,coatless/stat490uiuc
rexamples/script_hadoop.r
rexamples/script_hadoop.r
#!/usr/bin/env Rscript f = file("stdin") open(f) state_data = read.delim(f, header=FALSE) colnames(state_data) = c("State","City","Population") summary(state_data)
mit
R
0c962342b7d521da710befd69632dd6d156b4b04
Add a testing file for wrapping variadic functions
rgchris/ren-c,giuliolunati/ren-c,draegtun/ren-c,kealist/ren-c,draegtun/ren-c,mbk/ren-c,mbk/ren-c,draegtun/ren-c,codebybrett/ren-c,rgchris/ren-c,hostilefork/rebol,mbk/ren-c,hostilefork/rebol,giuliolunati/ren-c,kealist/ren-c,rgchris/ren-c,draegtun/ren-c,giuliolunati/ren-c,rgchris/ren-c,codebybrett/ren-c,giuliolunati/ren-...
make/tests/varargs.r
make/tests/varargs.r
REBOL [] recycle/torture libc: switch fourth system/version [ 3 [ make library! %msvcrt.dll ] 4 [ make library! %libc.so.6 ] ] printf: make routine! [ [ "An example of wrapping variadic functions" fmt [pointer] "fixed" ... "variadic" return: [int32] ] libc "printf" ] sprintf: make routine! [ [ ...
apache-2.0
R
a15d3a3f9a679897f48780b15c11ae37955f850c
Add last version benchmark
SteveViss/OuranosDB,SteveViss/OuranosDB
benchmarks.r
benchmarks.r
### Assess PostgreSQL performance on Ouranos_db setwd("./") #install.packages("RPostgreSQL") require("RPostgreSQL") ## use when on campus dbname <- "mffp" dbuser <- "svissault" dbhost <- "132.219.137.38" dbport <- 5432 drv <- dbDriver("PostgreSQL") con <- dbConnect(drv, host=dbhost, port=dbport, dbname=dbname, ...
mit
R
83487f4b5e615a6454e22b7220ad2dee996babad
Update Package for easier developing created
felixlindemann/HNUORTools,felixlindemann/HNUORTools
update-package.r
update-package.r
setwd("/Volumes/Daten/FelixLindemann/Documents/git/HNUORToolsForRProject") # update package library(devtools) check() test()
mit
R
8ff8548eb2f6bd7e694b4ee4669e6e7f8bd1ed56
Add an option to embed script without compression
draegtun/ren-c,rgchris/ren-c,draegtun/ren-c,codebybrett/ren-c,draegtun/ren-c,kealist/ren-c,codebybrett/ren-c,hostilefork/rebol,giuliolunati/ren-c,kealist/ren-c,kealist/ren-c,mbk/ren-c,mbk/ren-c,draegtun/ren-c,kealist/ren-c,giuliolunati/ren-c,rgchris/ren-c,rgchris/ren-c,hostilefork/rebol,hostilefork/rebol,rgchris/ren-c,...
make/encap.r
make/encap.r
REBOL[] args: parse system/script/args "" exe: none payload: none output: none as-is: false ;don't compress, in case people try to avoid decompression to speed up bootup windows?: 3 = fourth system/version while [not tail? args] [ arg: first args case [ any [arg = "/rebol" arg = "/r"] [ exe: second ar...
REBOL[] args: parse system/script/args "" exe: none payload: none output: none windows?: 3 = fourth system/version while [not tail? args] [ arg: first args case [ any [arg = "/rebol" arg = "/r"] [ exe: second args args: next args ] any [arg = "/payload" arg = "/p"] [ payload: seco...
apache-2.0
R
d6d96d702b79199eaaf527593c3bdd0397271691
Add readme
busterjs/fs-watch-tree
README.rd
README.rd
# watch-tree - Recursive directory watch (for Linux) # **watch-tree** is a small tool to watch directories for changes recursively. It uses [node-inotify](https://github.com/c4milo/node-inotify) to watch for changes, thus only works on Linux at the moment. Help adding support for [NodeJS-FSEvents](https://github.com/p...
bsd-3-clause
R
337c1a6999bf0d00346db761b02ca6f18615a3ad
Create run_analysis.r
mgazzar/GetNCleanData
run_analysis.r
run_analysis.r
if (!file.info("UCI HAR Dataset")$isdir) { dataFile <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" dir.create("assignment") download.file(dataFile, "assignment/UCI-HAR-dataset.zip", method="curl") unzip("assignment/UCI-HAR-dataset.zip") } # 1. Merges the training an...
apache-2.0
R
13f5cceadfaf0043aff44ecb03284c8eca94f0c2
test for bug in normalize-spec
Apanatshka/strategoxt,metaborg/strategoxt,Apanatshka/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,metaborg/strategoxt,metaborg/strategoxt,metaborg/strategoxt,metaborg/strategoxt,lichtemo/strategoxt,Apanatshka/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,lichtemo/strategoxt,lichtemo/strategoxt
strc/spec/test1/test46.r
strc/spec/test1/test46.r
module test46 imports dynamic-rules strategies main = <dyn-test(|2)> 3 dyn-test(|x) = ?y ; rules( DynTest : y -> x)
apache-2.0
R
341c31f1db3d81c4a5b9b25e53d9fe7476575570
deal with missing value in posterior function
MikeXL/bayes
R/poi.r
R/poi.r
poisson.fun <- function(theta, x, y) { # parameters lambda1 <- theta[1] lambda2 <- theta[2] # priors log.priors <- dgamma(lambda1, .5, 1e-5, log=T) + dgamma(lambda2, .5, 1e-5, log=T) # likelihood log.like <- dpois(x, lambda1, log=T) + dpois(y, lambda2, log=T) ll <- log.priors + log.like ifelse(i...
poisson.fun <- function(theta, x, y) { # parameters lambda1 <- theta[1] lambda2 <- theta[2] # priors priors <- dgamma(lambda1, .5, 1e-5, log=T) + dgamma(lambda2, .5, 1e-5, log=T) # likelihood ll <- dpois(x, lambda1, log=T) + dpois(y, lambda2, log=T) return (ll + priors) } bayes.poisson.test <- func...
mit
R
d013b31d7b139398cdd39d8e6946e00827c897af
Add script to generate final report
hkaju/Ising2D,hkaju/Ising2D,hkaju/Ising2D
final_report.r
final_report.r
pdf("report.pdf") cols <- rainbow(10) data1 <- read.csv("data/10x10-B0.0/results.csv", header=T) data2 <- read.csv("data/20x20-B0.0/results.csv", header=T) data3 <- read.csv("data/30x30-B0.0/results.csv", header=T) data4 <- read.csv("data/40x40-B0.0/results.csv", header=T) data5 <- read.csv("data/50x50-B0.0/results.c...
mit
R
973181aa6381f5796938e0e715a0f0d8ec885a4d
Create wbgt_full.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/wbgt_full.r
R/wbgt_full.r
mit
R
65fdf0358905830d0aed81f00945ecf92406c336
rename test file
janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkinen/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkine...
iRODS/clients/icommands/test/rules3.0/test_no_memory_error_patch_2242.r
iRODS/clients/icommands/test/rules3.0/test_no_memory_error_patch_2242.r
test{ *a="hello/world"; for(*i=0;*i<1000;*i=*i+1) { test2(*a,*b,*c); } } test2(*a,*b,*c){ msiSplitPath(*a,*b,*c); } input null output null
bsd-3-clause
R
942c9e2df1b2b7bc488928a92e0bd8d09c656472
Add mandelbrot.r
theDrake/r-experiments
mandelbrot.r
mandelbrot.r
# Calculates the Mandelbrot set (https://en.wikipedia.org/wiki/Mandelbrot_set) # through the first 20 iterations of the equation z = z^2 + c plotted for # different complex constants c. install.packages("caTools") library(caTools) # for write.gif jet.colors <- colorRampPalette(c("green", "blue", "red", "cyan", "#7FFF...
mit
R
85170bc7efbc07206d9e4d5ae979d56c5456919d
Add helper to export package submodules
klmr/ggplots
export.r
export.r
#' Export symbols from a module environment #' #' @param env the module environment to export from. #' @param symbols a character vector of symbol names to export. If \code{NULL} #' (the default), export every public symbol. #' @param target the environment to import the symbols into; default: the #' calling environmen...
apache-2.0
R
1f599c04dd09b3beaa4a63330749351e9f54c998
Create script to repair (as best as possible) faulty encodings
tenforwardconsulting/crantastic,hadley/crantastic,hadley/crantastic,tenforwardconsulting/crantastic,tenforwardconsulting/crantastic,tenforwardconsulting/crantastic,hadley/crantastic
lib/r/repair-db.r
lib/r/repair-db.r
# This script repairs broken encodings in the base database. These # flawed encodings are produced by non-utf changelogs and news files. library(plyr) source("db.r") update_sql <- function(table, values) { id <- values$id changes <- paste(names(values[, -1]), "= ?", collapse = ", ") paste( "UPDATE ", ta...
mit
R
036cf1d4edfba450ce910505714d95c98933cb44
Create mtcars.r
bgweber/RServer,bgweber/RServer,bgweber/RServer,bgweber/RServer
userRdemo/mtcars.r
userRdemo/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
7ef8ba2984928ff9484d3a2457f97f1cf02d0717
Create a quick analysis file to load and peak at FRC data
supertetelman/frc-data-analysis,supertetelman/frc-data-analysis,supertetelman/frc-data-analysis
quick-analysis.r
quick-analysis.r
#Install dependencies install.packages("reshape2") install.package("ggplot2") #Requires require("reshape2") require("ggplot2") #Import the data teams <- read.csv("./the-blue-alliance-data-master/the-blue-alliance-data-master/teams/teams.csv", header=FALSE) names(teams) <- c("number", "name", "sponsors", "location", "...
apache-2.0
R
b46794cadb3187a9952ae2a2714acf217f1151a0
Create try.xgboost.v2.r
minesh1291/MachineLearning,minesh1291/MachineLearning,minesh1291/MachineLearning
myPracticeGCE/try.xgboost.v2.r
myPracticeGCE/try.xgboost.v2.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
c001a966d0bde8d14bd823313104bfb3513eec6d
convert bed to gff3
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/Bedtools/bed2gff3.r
lib/Bedtools/bed2gff3.r
library(rtracklayer) args <- commandArgs(TRUE) print(args) bedfile=args[1] gff3file=args[2] ## import the bed file bed.ranges <- import.bed(bedfile) ## export as a gff3 file export.gff3(bed.ranges, gff3file) gf<-read.table(gff3file, sep="\t", header=F) gf$V2<-paste0("Peak", c(1:nrow(gf))) write.table(gf, file=gf...
apache-2.0
R
47ea4d17738702898cdf1264e5f6d0895725dc1c
Test Programm Nullstellensuche Hochaufgelöstes Modell
sebaki/clim-jet-stream,sebaki/clim-jet-stream,sebaki/clim-jet-stream,sebaki/clim-jet-stream
test-code.r
test-code.r
## source('~/Master_Thesis/Code/test-code.r') ## variablen für test x <- seq(0:29) d <- rnorm(30, mean = 0, sd = 2) n <- 4 split <- 6 dx.hr <- 0.01 ## test nullstellensuche library(rootSolve) fun <- function(x) cos(2*x) ** 3 curve(fun, from = -1, to = 1) curve(cheb.poly.val(x, coeff.cheb = m.cheb.seq), from = (-1),...
mit
R
a0e6335bd6e21922fd0b644695bf6c5d6590852a
Create DataMartCube.r
KKONZ/DatamartProject
DataMartCube.r
DataMartCube.r
revenue_cube <- tapply(sales_fact$amount_of_time, sales_fact[,c("prod", "month", "year", "lvl")], FUN=function(x){return(sum(x))}) dimnames(revenue_cube) #slice revenue_cube[, "1", "2012",] revenue_cube["Book", "1", "2012",] # Dice revenue_cube[c("Room","Book"), ...
mit
R
d6afa102abd293a8ceace43169abaa9488fc5d27
Add slurm-job.r
jmousseau/Stain
R/slurm-job.r
R/slurm-job.r
#' NOAARequest R6 object. #' #' An interface to SLURM bash scripts and their submissions. SlurmJob <- R6::R6Class("SlurmJob")
mit
R
582d9683e1531b72180711746dc72fd9abb4b563
Create visual.r
andrewjabara/airbnb_santa_cruz
visual.r
visual.r
#Using data from insideairbnb.com - data from the Santa Cruz, CA area, last updated October 2015 #Focus is on visualizing the data by room type santacruz = read.csv("documents/airbnb_santacruz.csv") head(santacruz) #Find out types of rooms unique(santacruz$room_type) #price per night based on room type private <- su...
mit
R
1dc3ae11bfdd3749095801d96281b7a58a3c5ead
Create README.rd
aru132/google-drive-on-fuse
README.rd
README.rd
= Requirements * FUSE (>= 2.6) * libfuse * json-c * glib-2.0 * libmagic * libcurl = Installation 1. Clone from github. $ git clone https://github.com/aru132/google-drive-on-fuse.git 2. Register this program with google developers console ( https://code.google.com/apis/console#access ) . 3. Download client_secret.json...
bsd-3-clause
R
ce50780aa82c74b6fb7a7396655453b1e4a994f5
add codes (even if we don't use them yet)
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
R/codes.r
R/codes.r
#' Message ID indicating worker is accepting jobs WORKER_UP = -13L #' Message ID indicating worker is accepting jobs WORKER_READY = 0L #' Message ID indicating worker is shutting down WORKER_DONE = -1L #' Message ID indicating worker is requesting data REQ_DATA = -2L #' Message ID telling worker to stop WORKER_STOP...
apache-2.0
R
9939c1ccac4fc6ca7ac54aa3c3f6a2c107b5eba6
Create Script.r
OliviaZhu26/Single_virion_seq,OliviaZhu26/Single_virion_seq,OliviaZhu26/Single_virion_seq
BAsE-Seq_scripts/Script.r
BAsE-Seq_scripts/Script.r
#!/usr/bin/Rscript ##Author: ZHU O. Yuan ##Script name: Script.r ##Generate 2 QC figures from output files of 01_BAsE-Seq_alignment.sh ##Run as: ./Script.r (from within sample folder) #A plot of genome-wide coverage plots for the first 9 barcodes #Check if coverage is even, if there are glaring patterns of uneveness ...
mit
R
769124c92db6cac58b48882fcfcb92cfeafe6b0b
Add faster implementation of frequent_words
dennis95stumm/bioinformatics_algorithms,dennis95stumm/bioinformatics_algorithms
faster_frequent_words.r
faster_frequent_words.r
source("computing_frequencies.r") source("number_to_pattern.r") faster_frequent_words <- function(text, k) { frequent_patterns <- {} frequency_array <- computing_frequencies(text, k) max_count <- max(frequency_array) for (i in 0:(4^k-1)) { if (frequency_array[i + 1] == max_count) { pattern <- number_...
mit
R
48a17c43cd0d4500874726b909a1814d596fc53c
Create initial.r
xiaodaigh/teradata.dplyr
initial.r
initial.r
#' @import teradataR #' @export #' @example src_teradata <- function(dbname = NULL, host = NULL, port = NULL, user = NULL, password = NULL, dType = c("odbc", "jdbc"), database = "", ...) { tdConnection <- NULL dsn <- host uid <- user pwd <- password dType <- match.arg(dType) # cod...
mit
R
55579c1dfc5f7b91e6989ea356b106a7eeec9400
Create rankall.r
evohnave/R-Programming-Course
rankall.r
rankall.r
rankall <- function(outcome, num = "best") { ## For each state, find the hospital of the given rank ## Return a data frame with the hospital names and the ## (abbreviated) state name ## Read outcome data data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") states<-unique(read.csv...
unlicense
R
3c54e5cc9c53fd8c7f970be60985142a5fb4ac5d
Add binomial_coefficient function
dennis95stumm/bioinformatics_algorithms,dennis95stumm/bioinformatics_algorithms
binomial_coefficient.r
binomial_coefficient.r
library(Brobdingnag) factorial <- function(n) { if (n <= 1) return(1) return(n * factorial(n - 1)) } binomial_coefficient <- function(m, k) { return(factorial(m)/(factorial(k)*factorial(m-k))); } message("m") m <- scan("stdin", nlines=1) message("k") k <- scan("stdin", nlines=1) print(as.numeric(binomial...
mit
R
572f89c2594597183df7afcd18319b36a5af1362
Create GenePix_microarray.r
crazyhottommy/scripts-general-use,crazyhottommy/scripts-general-use,crazyhottommy/scripts-general-use,crazyhottommy/scripts-general-use
R/GenePix_microarray.r
R/GenePix_microarray.r
### limma for GenePix microarray data ## read https://www.bioconductor.org/packages/3.3/bioc/vignettes/limma/inst/doc/usersguide.pdf ## http://biocourse.wp.sanbi.ac.za/wp-content/uploads/sites/7/2013/01/day3.pdf ## read here on how to install bioconductor packages https://www.bioconductor.org/install/ source("https:/...
mit
R
637921fff8f25f37b30e4f06f4fe67b9a573f4fe
Create Model_Diagnostics_and_Transformation.r
lancezlin/Applied_Linear_Model_with_R
Model_Diagnostics_and_Transformation.r
Model_Diagnostics_and_Transformation.r
## 7.1 bl <- baeskel y <- bl$Tension x <- bl$Sulfur plot(x, y) abline(lm(y ~ x, data=bl)) lam <- c(-1, 0, 1) new <- with(bl, seq(min(x), max(x), length=12)) with(bl, plot(x, y)) with(bl, for (j in 1:3){ m1 <- lm(y ~ bcPower(x, lam[j])) lines(new, predict(m1, data.frame(x=new)), lty=j, col=j, lwd...
mit
R
543ded5c9a9277d599a136e75cbcc794d57363b1
Create hellloWorld.r
phase/refract,phase/refract
examples/hellloWorld.r
examples/hellloWorld.r
!v"hello world"! >m?;o
mit
R
6ccda83e3cb7542ba80b30903e8127982d3d3da0
Add support system for command line tools
klmr/codons,klmr/codons
scripts/sys/__init__.r
scripts/sys/__init__.r
args = commandArgs(trailingOnly = TRUE) exit = function (code = 0) quit(save = 'no', status = if (is.null(code)) 0 else code)
apache-2.0
R
a639f8df7242b9d5ede0fb68968803dd017e0c99
Create anova.r
Sokel/R-shchu
anova.r
anova.r
### ANOVA library(ggplot2) # formulae DV ~ IV # One-way DV ~ IV1 + IV2 # Two-way DV ~ IV1:IV2 # Two-way interaction DV ~ IV1 + IV2 + IV1:IV2 # Main effects + interaction DV ~ IV1 * IV2 # The same: Main effects + interaction DV ~ IV1 + IV2 + IV3 + IV1:IV2 DV ~ (IV1 + IV2 + IV3)^2 # main effects and all possib...
apache-2.0
R
a62284eade844e4ee29365214817fb2af7367717
add r script
Marcnuth/DataScienceInterestGroup,Marcnuth/DataScienceInterestGroup
algorithms/perceptron.r
algorithms/perceptron.r
## NOTE: the function in current file is not perceptron at all ## The intention we do this is to distinguish python & R ## You will find the model of lm or sgd in R gives a confused function for given data ## And this function is so different with Python's ## Why, does R make mistake? ## No! The package we used here, ...
apache-2.0
R
b339b0fedb4dd170e2cde67f5058784e6575384c
Make CLOSURE a FUNCT for closures (#2002)
giuliolunati/ren-c,giuliolunati/ren-c,codebybrett/ren-c,giuliolunati/ren-c,hostilefork/rebol,draegtun/ren-c,hostilefork/rebol,kealist/ren-c,draegtun/ren-c,mbk/ren-c,rgchris/ren-c,rgchris/ren-c,draegtun/ren-c,kealist/ren-c,codebybrett/ren-c,draegtun/ren-c,codebybrett/ren-c,rgchris/ren-c,hostilefork/rebol,codebybrett/ren...
src/mezz/mezz-func.r
src/mezz/mezz-func.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Function Helpers" 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/LICE...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Function Helpers" 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/LICE...
apache-2.0
R
a51fbb73922f40d0321b061fcd2b73cf430bea7e
Create stage_weight_processing.r
dpbroman/floodforecasting
stage_weight_processing.r
stage_weight_processing.r
#######DESCRIPTION############################### #processes area, prcp, et, qavg table for use as weights in #rating curve fits #outputs rdata object and csv ################################################# ##load libraries library(dplyr) library(data.table) library(stringr) library(tidyr) library(readr) ##user inp...
mit
R
ed16f5933e58152ddf598cfe2164756df532bd5f
Create kriging_qgis_r.r
leandromet/Geoprocessamento---Geoprocessing,leandromet/Geoprocessamento---Geoprocessing,leandromet/Geoprocessamento---Geoprocessing,leandromet/Geoprocessamento---Geoprocessing,leandromet/Geoprocessamento---Geoprocessing
kriging_qgis_r.r
kriging_qgis_r.r
##Basic statistics=group ##Layer=vector ##Field=Field Layer ## by= number 0.1 ##Output=output raster Bibliotecas utilizadas para a krigagem library(gstat) library(rgl) library("spatstat") library("maptools") install.packages("pls") library (pls) library(automap) library(raster) Abertura de dados e alocação de variávei...
mit
R
d0b7814be2a6b40418cd5142119f36793213d7b6
Create Keshav_PrimeSieve.r
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs...
math/prime_sieve/R/Keshav_PrimeSieve.r
math/prime_sieve/R/Keshav_PrimeSieve.r
sieve <- function(n) { n <- as.integer(n) if(n > 1e6) stop("n too large") # restricting for larger values of n primes <- rep(TRUE, n) # initially all false primes[1] <- FALSE # trivial case last.prime <- 2L for(i in last.prime:floor(sqrt(n))) # looping through the array { primes[seq.int(2L*...
cc0-1.0
R
2a6433e1024c04772f677270907db4a5cf1c9871
更新:第六章fig7-6
shuaimeng/r
thesis/chap7/fig7-6.r
thesis/chap7/fig7-6.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/print") library(xlsx) # reading ux and sd k1<-read.xlsx("dotx.xlsx",sheetName="600",header=TRUE) k2<-read.xlsx("dotx.xlsx",sheetName="1khz",header=TRUE) k3<-r...
mit
R
83711c5e27ab7437e1432b335c1a17e8860a1a3b
Create getNormalizedFoldChange.r
mahmoudibrahim/timeless,mahmoudibrahim/timeless
getNormalizedFoldChange.r
getNormalizedFoldChange.r
rm(list = ls()) library(limma) countsFile="allCounts.txt" l = read.table(countsFile) k27ac = normalizeQuantiles(cbind(l[[5]], l[[6]], l[[7]], l[[8]])) #H3K27ac k27me3 = normalizeQuantiles(cbind(l[[9]], l[[10]], l[[11]], l[[12]])) #H3K27me3 me3 = normalizeQuantiles(cbind(l[[13]], l[[14]], l[[15]], l[[16]])) #H3K4me3 ...
mit
R
50473701750f6334eb3fe109af91ff6eeb2843ae
Solve Salary with Bonus 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/1009/1009.r
solutions/uri/1009/1009.r
input <- file('stdin', 'r') a <- readLines(input, n=1) b <- as.integer(readLines(input, n=1)) c <- as.double(readLines(input, n=1)) write(sprintf("TOTAL = R$ %.2f", b + (c * 0.15)), "")
mit
R
c9737879744403ea4f6e0d34eaed07fad6126fdf
Add intorduction to R basics
mkuzak/RIntroBayarea
RBasics.r
RBasics.r
# Introduction to data structures in R # atomic vector # ------------- v <- c(1,2.0,3.5) v1 <- c('foo', 'bar') # always flat c(1, c(2, c(3,4))) # homogenous -- all elements need to be of one type # values will be coerced to more flexible type c("a", 1) # list # ---- # heterogenous x <- list(1:3, "a", c(TRUE, FALSE,...
apache-2.0
R
9a985cc3a51ec9391d74e4f9ba7b82bc6b024691
Add correlation test
PoDiGG/podigg,PoDiGG/podigg
stats/correlation.r
stats/correlation.r
library(psych) region_cells <- read.csv('../input_data/region_cells.csv') subset <- region_cells[which(region_cells$density>0 & region_cells$density<30),] biserial(region_cells$density, region_cells$hasstop) # 0.1756958 biserial(subset$density, subset$hasstop) # 0.4397582 # Outliers distort the correlation a lot! # W...
mit
R
535e302b96c0fc7ecbaefee84ce5ba725e69a273
Create polar_plot.r
nairvinayv/Rscripts
polar_plot.r
polar_plot.r
#R-Code for generating Polar plots using the plotrix library library(plotrix) data<-read.csv('15T-epsilon.dat') setEPS() png("15T-epsilon.png") polar.plot(data[1:14999,1],data[1:14999,2],rp.type="p",start=90,clockwise=TRUE,main=expression(paste("Torsion Angles: 1,5T-",epsilon))) dev.off()
mit
R
f2640e24f937b661031f919c549f885f975319e4
Add R packages for IAS-C188
berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub
deployments/r/image/extras.d/ias-c188.r
deployments/r/image/extras.d/ias-c188.r
#!/usr/bin/env Rscript # From https://github.com/berkeley-dsep-infra/datahub/issues/814 devtools::install_github('cran/stargazer', ref='5.2.2', upgrade_dependencies=FALSE) devtools::install_github('cran/lm.beta', ref='1.5-1', upgrade_dependencies=FALSE) devtools::install_github('cran/multcomp', ref='1.4-8', upgrade_de...
bsd-3-clause
R
3a51f3d30ab23a48146c2d14c5dffad5c93fbe61
Create uvoz_tabela1.r
ZavbiA/APPR-2017
uvoz/uvoz_tabela1.r
uvoz/uvoz_tabela1.r
# 2. faza: Uvoz podatkov # Funkcija, ki uvozi število medalj po državah iz Wikipedije uvozi.medalje <- function() { link <- "https://en.wikipedia.org/wiki/All-time_Olympic_Games_medal_table" stran <- html_session(link) %>% read_html() tabela <- stran %>% html_nodes(xpath="//table[@class='wikitable sortable']")...
mit
R
7e536ed41fd4c20df08d58a89e3d1b08826ade2c
Create lm-double.r
Sokel/R-shchu
lm-double.r
lm-double.r
?swiss swiss <- data.frame(swiss) str(swiss) hist(swiss$Fertility,col="Red") fit <- lm(Fertility ~ Examination + Catholic, data = swiss) summary(fit) fit <- lm(Fertility ~ Examination * Catholic, data = swiss) summary(fit) confint(fit) # trouble №1 x1 <- rnorm(50) # создадим случайную выборку из 50 элементов x2 <...
apache-2.0
R
02f45f781cd97d5788a34926420836be2f9ca015
Add R/measurements.r with lifetime_worst function.
pschulam-attic/sclero
R/measurements.r
R/measurements.r
lifetime_worst <- function(measurements, low = TRUE) { quant <- if (low) 0.1 else 0.9 worst.set <- quantile(measurements, quant, na.rm = TRUE) worst <- median(worst.set) # median returns infinity if length(worst.set) == 0 if (is.infinite(worst)) NA else worst }
mit
R
08bb83192d9b9f0a14dee9eeaa33f9a0ec52e6b1
Add test-sbatch.r
jmousseau/Stain
tests/testthat/test-sbatch.r
tests/testthat/test-sbatch.r
context("sbatch") test_that("All options are formated correctly", { expect_equal(sbatch_opts$begin("00:00:01"), "--begin=00:00:01") expect_equal(sbatch_opts$cpus_per_task(12), "--cpus-per-task=12") expect_equal(sbatch_opts$mail_user("user@address"), "--mail-user=user@address") expect_...
mit
R
6aff7bcdd6c9b27987f20f41695c2b02747ba26d
add sylcount test
wrathematics/sylcount,wrathematics/sylcount,wrathematics/sylcount
Rpkg/tests/sylcount.r
Rpkg/tests/sylcount.r
library(sylcount) a = "I am the very model of a modern major general." b = "I have information vegetable, animal, and mineral." x = c(a, b) y = paste0(a, b, collapse=" ") test = sum(sylcount(a)[[1]]) truth = 16L stopifnot(identical(truth, test)) test = sum(sylcount(b)[[1]]) truth = 17L stopifnot(identical(truth, tes...
bsd-2-clause
R
60f11b3cc7ae1370120d44f1afc0adb6617a8193
test for worker-wrapper-split bug
metaborg/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,Apanatshka/strategoxt,metaborg/strategoxt,Apanatshka/strategoxt,metaborg/strategoxt,Apanatshka/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,lichtemo/strategoxt,lichtemo/strategoxt,lichtemo/strategoxt,metaborg/strategoxt,metaborg/strategoxt
strc/spec/test1/test47.r
strc/spec/test1/test47.r
module test47 strategies hd : [x | xs] -> x tl : [x | xs] -> xs main = where(foo(|<hd>)) ; bar(|<hd>,[<tl>]) foo(|prog) = ?[prog | args] ; !(prog, args) ; swap bar(|prog,args2) = ?[prog | args] ; !(prog, args2) ; swap swap : (x, y) -> (y, x)
apache-2.0
R
a190d85dc97b1bf564dcac8e396d53b080778ddd
Create parsefile.r
shrib/NlpViaRAndWordNet
parsefile.r
parsefile.r
library("wordnet") setwd("c:/data/r/") loadWork <- function (what) { rl <- readLines("foo.txt") words <- c("") cnt <- 0 for (i in 1:length(rl)) { splitSentence = c(unlist(strsplit(rl[i], " "))) if (length(splitSentence) > 0) { for (n in 1:length(splitSentence)) { words[cnt] <- splitSentence[n] cnt...
mit
R
a74051f43c057d6f6363370719311f63a33fe18c
Create test.r
xiaodaigh/teradata.dplyr
test/test.r
test/test.r
#library("teradataR") library("RODBC") library("dplyr") library("assertthat") #con <- tdConnect(dsn, uid = uid, pwd = pwd, database = database) #a <- td.data.frame(test_table) # tdQuery('select count(*) from airlines') #tdClose() #a1 <- as.td.data.frame(a, tableName = "airlines", database = "") st <- src_teradata(h...
mit
R
50ee4b911ebcd13f84105d9073eafdb45e769dc2
Create aov.r
Sokel/R-shchu
aov.r
aov.r
library(ggplot2) DV ~IV # one-way DV ~ IV1 + IV2 # Two-way DV ~ IV1:IV2 # Two-way interaction DV ~ IV1 + IV2 + IV1:IV2 # Main effects + interaction DV ~ IV1 * IV2 # The same: Main effects + interaction DV ~ IV1 + IV2 + IV3 + IV1:IV2 DV ~ (IV1 + IV2 + IV3)^2 # main effect and all possible interaction DV ~ IV1 ...
apache-2.0
R
ce447a06fc82841df0ae6de38d9add2b387297d3
add jquery.fullPage.js
yuhualingfeng/jquery-study,yuhualingfeng/jquery-study
site.rd
site.rd
/** useful jquery plug-in copyright 2015,puhuasheng */ # jquery.fullPage.js # gitHub:https://github.com/alvarotrigo/fullPage.js
mit
R