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
8601930956f902225375148b67aa54cdfe9bd7b4
Use secure HTTPS CRAN mirror
klmr/.files,klmr/.files,klmr/.files
.R/config.r
.R/config.r
options(pager = file.path(Sys.getenv('HOME'), '.R/pager.sh'), # Imperial College London repos = c(CRAN = 'https://cran.ma.imperial.ac.uk/'), menu.graphics = FALSE, # Seriously, WHAT THE FUCK, R!? import.path = '~/.R/modules', devtools.name = 'Konrad Rudolph', devtools.des...
options(pager = file.path(Sys.getenv('HOME'), '.R/pager.sh'), # Imperial College London repos = c(CRAN = 'http://cran.ma.imperial.ac.uk/'), menu.graphics = FALSE, # Seriously, WHAT THE FUCK, R!? import.path = '~/.R/modules', devtools.name = 'Konrad Rudolph', devtools.desc...
apache-2.0
R
390f66629d807c2ece12b2032c3382972ace402a
Add #!/bin/bash comment to submit bash script
jmousseau/Stain
R/slurm-bash-script.r
R/slurm-bash-script.r
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container, main_file, copy_back = c("*")) { private$cat_main_file_magic(container$dir, main_fi...
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container, main_file, copy_back = c("*")) { private$cat_main_file_magic(container$dir, main_fi...
mit
R
d49d2cca527265b06f23fc7cc78dfbae95d3d7c9
Remove completed TODO item
mattm/active-user-cohort-analysis
active-users.r
active-users.r
CSV_PATH = "data/test-data.csv" CSV_SEPARATOR = "\t" Run <- function() { activities <- LoadActivityData() data <- AnalyzeActiveUserCohorts(activities) PlotActiveUserCohorts(data) } LoadActivityData <- function() { activities <- read.csv(CSV_PATH, sep = CSV_SEPARATOR, col.names = c("user.id", "date"), header = F...
CSV_PATH = "data/test-data.csv" CSV_SEPARATOR = "\t" Run <- function() { activities <- LoadActivityData() data <- AnalyzeActiveUserCohorts(activities) PlotActiveUserCohorts(data) } LoadActivityData <- function() { activities <- read.csv(CSV_PATH, sep = CSV_SEPARATOR, col.names = c("user.id", "date"), header = F...
mit
R
fb5bcc7c182c803fed74738083e51e22f7fcb25a
Make summaries and use cpi
mkuzak/RIntroBayarea
R/RIntroBayarea.r
R/RIntroBayarea.r
library(plyr) library(ggplot2) library(ggmap) library(dplyr) library(mgcv) # read in house sales data path = system.file(package='RIntroBayarea') sales_file <- paste0(path, "/extdata/house-sales.csv") sales <- read.csv(sales_file, stringsAsFactors=FALSE) # read in geolocation data ad_file <- paste0(path, '/extdata/ad...
library(plyr) library(ggplot2) # read in house sales data path = system.file(package='RIntroBayarea') sales_file <- paste0(path, "/extdata/house-sales.csv") sales <- read.csv(sales_file, stringsAsFactors=FALSE) # read in geolocation data ad_file <- paste0(path, '/extdata/addresses.csv') ad <- read.csv(ad_file, string...
apache-2.0
R
841aef5e9879c55ed0b5ce0edbd569be5efdc565
Add functions to generate test gene sets
klmr/codons,klmr/codons
scripts/translation-efficiency-test-sets.r
scripts/translation-efficiency-test-sets.r
define_relations = function (config) { all_celltypes = unique(data$mrna_design(config)$Celltype) healthy_celltypes = intersect(all_celltypes, c('Liver-Adult', 'E15.5')) cancer_celltypes = setdiff(all_celltypes, healthy_celltypes) all_relations = expand.grid(Codon = unique(all_celltypes), ...
define_relations = function (config) { all_celltypes = unique(data$mrna_design(config)$Celltype) healthy_celltypes = intersect(all_celltypes, c('Liver-Adult', 'E15.5')) cancer_celltypes = setdiff(all_celltypes, healthy_celltypes) all_relations = expand.grid(Codon = unique(all_celltypes), ...
apache-2.0
R
a0e15c6c5af83a803b2a6ac66978ff3c9efd16a5
Update 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(ibmdbR) ## initialize DB2 connectio...
########### 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
1e022ab4eb2e24e8a1c91a3d6562c60acdc25be4
make it also a unix command line script
teuben/astr288p,teuben/astr288p,teuben/astr288p
scripts/linearfit.r
scripts/linearfit.r
#! /usr/bin/env Rscript # # This is a script in the R language, # Adapted from # http://www.astro.umd.edu/~harris/ASTR610_F16/linearfit.r # # To run this within R, start R and type # source('linearfit.r') # and a plot should also appear on the screen. # # Or from the Unix commandline...
# This is a script in the R language, # Adapted from # http://www.astro.umd.edu/~harris/ASTR610_F16/linearfit.r # # To run this within R, start R and type # source('linearfit.r') # and a plot should also appear on the screen. # # Or from the Unix commandline # Rscript linea...
mit
R
f2ec23c6d0a01683d12e810b8fcf10915ba54363
Update runShinyApp.r
xiaodaigh/shinydistro
windows/runShinyApp.r
windows/runShinyApp.r
options(browser = "./GoogleChromePortable/GoogleChromePortable.exe") .libPaths("./R-Portable/App/R-Portable/library") shiny::runApp("./yourApp/Shiny/",port=8888,launch.browser=TRUE)
options(browser = "../../../../Apps/GoogleChromePortable/GoogleChromePortable.exe") .libPaths("../library") shiny::runApp("../../../../Apps/your_app/Shiny/",port=8888,launch.browser=TRUE)
mit
R
60156f33e3088821a4d8dd9cff5b64d0c2226341
Fix inconsistency in DESeq col data
klmr/codons,klmr/codons
scripts/gsea.r
scripts/gsea.r
deseq = modules::import_package('DESeq2') piano = modules::import_package('piano') modules::import_package('dplyr', attach = TRUE) #' @export prepare_gene_set = function (gene_set) piano$loadGSC(gene_set, 'data.frame') #' @export gsea_de = function (data, col_data, contrast, go_genes) { stopifnot(inherits(go_...
deseq = modules::import_package('DESeq2') piano = modules::import_package('piano') modules::import_package('dplyr', attach = TRUE) #' @export prepare_gene_set = function (gene_set) piano$loadGSC(gene_set, 'data.frame') #' @export gsea_de = function (data, col_data, contrast, go_genes) { stopifnot(inherits(go_...
apache-2.0
R
61ddd576e62385d6a06fb04e97489d83ec54e96b
Update model_stage.r
syberia/syberia
R/model_stage.r
R/model_stage.r
#' Model stage for syberia models #' #' TODO: Document this more #' #' @param modelenv an environment. The persistent modeling environment. #' @param model_parameters a list. Model-specific parameters, with the first #' parameter always being the model keyword for the tundra container #' (e.g., glm, gbm, etc.) #...
#' Model stage for syberia models #' #' TODO: Document this more #' #' @param modelenv an environment. The persistent modeling environment. #' @param model_parameters a list. Model-specific parameters, with the first #' parameter always being the model keyword for the tundra container #' (e.g., glm, gbm, etc.) #...
mit
R
055721446695f5d7bca914af3b92a3eafdc3b363
Update sum-aggr-na.r
SwedishPensionsAgency/Hierarchy
R/sum-aggr-na.r
R/sum-aggr-na.r
#' Aggregate sum function #' #' ... #' #' @param ... arguments passed to the sum function #' #' #' @export sum_aggr_na <- function(x) { if (length(x) == 1 && is.na(x)) { sum(x, na.rm = FALSE) } else { sum(x, na.rm = TRUE) } }
#' Aggregate sum function #' #' ... #' #' @param ... arguments passed to the sum function #' #' #' @export sum_aggr_na <- function(...) { if (length(x) == 1 && is.na(x)) { sum(..., na.rm = FALSE) } else { sum(..., na.rm = TRUE) } }
agpl-3.0
R
5229e48d2659717670c83018d4e68c56cc042b92
Add documentation to exported functions
klmr/ggplots
fonts.r
fonts.r
extrafontdb_path = try(system.file('metrics', package = 'extrafontdb', mustWork = TRUE), silent = TRUE) # FIXME: Make this work with un-gzipped font metrics as well. # FIXME: Make this work with incomplete fonts. complete_font_set = paste0(c('-Regular', '-Bold', '-Italic', '-BoldItalic'), '.afm.gz') rebuild_cache = fu...
extrafontdb_path = try(system.file('metrics', package = 'extrafontdb', mustWork = TRUE), silent = TRUE) # FIXME: Make this work with un-gzipped font metrics as well. # FIXME: Make this work with incomplete fonts. complete_font_set = paste0(c('-Regular', '-Bold', '-Italic', '-BoldItalic'), '.afm.gz') rebuild_cache = fu...
apache-2.0
R
5d7e63a147d418d6be03671990d970e09712fa91
Change dates so that they are consistent with used subset of data
hadley/ggplot2-bayarea
2-time-series.r
2-time-series.r
library(ggplot2) load("city-summary.rdata") ggplot(bigsum, aes(date, price / 1e6)) + geom_line() + facet_wrap(~ city) ggsave("cities-price.png", width = 8, height = 6, dpi = 128) # Smoothing ------------------------------------------------------------------ library(mgcv) smooth <- function(y, x) { as.numeri...
library(ggplot2) load("city-summary.rdata") ggplot(bigsum, aes(date, price / 1e6)) + geom_line() + facet_wrap(~ city) ggsave("cities-price.png", width = 8, height = 6, dpi = 128) # Smoothing ------------------------------------------------------------------ library(mgcv) smooth <- function(y, x) { as.numeri...
mit
R
3548176c6ce28c4861011a17b0f4cd0ccbb5a967
Fix terra tests
mnpopcenter/ripums,mnpopcenter/ripums
tests/testthat/test_terra.r
tests/testthat/test_terra.r
# Very basic tests for now context("IPUMS Terra") # This function helps find the data from the ipumsexamples package for us ex_file <- function(x) { system.file("extdata", x, package = "ipumsexamples") } test_that("Terra raster works", { raster_file <- ex_file("2552_bundle.zip") if (!file.exists(raster_file)) {...
# Very basic tests for now context("IPUMS Terra") # This function helps find the data from the ipumsexamples package for us ex_file <- function(x) { system.file("extdata", x, package = "ipumsexamples") } test_that("Terra raster works", { raster_file <- ex_file("2552_bundle.zip") if (!file.exists(raster_file)) {...
mpl-2.0
R
013ff0765a61b5c4c6fab4009f6bd73722ff6688
Update 1.r
glor/R,glor/R
aufgaben/blatt02/1.r
aufgaben/blatt02/1.r
tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=min) # minimum tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=max) # maximum tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=median) # median tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=mean) # mean tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=sd) # standardabweichung tappl...
tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=min) # minimum tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=max) # maximum tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=median) # median tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=mean) # mean tapply(potato$Ertrag, INDEX=potato$Sorte, FUN=sd) # standardabweichung tappl...
bsd-2-clause
R
c6b9b1e4e251d12b4bf0a53461167ab15ed91472
Change “RCU” and “RAA” to “CU” and “AA” in wobble TE
klmr/codons,klmr/codons
scripts/wobble_pairing.r
scripts/wobble_pairing.r
tai = import('./tai') # Rules for wobble pairing # Codon Anti i % 4 wobble_match_index # TTT --- AAA (1, 2) 1 1 # X/ # TTC -/- GAA (1, 2) 2 -1 # / # TTA --- TAA (1, 3) 3 -2 # / # TTG --- CAA (3, 4) 0 -1 rc_anticodons = data.frame(Codon = tai$rc_anticodons) %>% mutate(Or...
tai = import('./tai') # Rules for wobble pairing # Codon Anti i % 4 wobble_match_index # TTT --- AAA (1, 2) 1 1 # X/ # TTC -/- GAA (1, 2) 2 -1 # / # TTA --- TAA (1, 3) 3 -2 # / # TTG --- CAA (3, 4) 0 -1 rc_anticodons = data.frame(Codon = tai$rc_anticodons) %>% mutate(Or...
apache-2.0
R
817c035d3e79b4fd732165b686e30aee8abe5a3d
Update aggr-nodes.r
SwedishPensionsAgency/Hierarchy
R/aggr-nodes.r
R/aggr-nodes.r
#' Aggregate by #' #' A wrapper function to the path enumeration class to aggregate nodes. #' The hierarchical data set must have a path enumerated column. #' #' @param data data frame #' @param path column with path enumeration ids #' @param metrics metric columns #' @param ids node id (e.g. "1.2.1.3") #' @param by ...
#' Aggregate by #' #' A wrapper function to the path enumeration class to aggregate nodes. #' The hierarchical data set must have a path enumerated column. #' #' @param data data frame #' @param path column with path enumeration ids #' @param metrics metric columns #' @param ids node id (e.g. "1.2.1.3") #' @param by ...
agpl-3.0
R
87433754197c30e4fd1b31ee5049ee11dcf00a59
Update active_runner.r
syberia/syberia
R/active_runner.r
R/active_runner.r
#' Fetch active stagerunner #' #' @export active_runner <- function() { syberiaStructure:::get_cache('last_stagerunner') }
#' Fetch active stagerunner #' #' @export active_runner <- function() { get_cache('last_stagerunner') }
mit
R
4d9d2f500122db3d2b0436a235b3344dc0682e84
Refactor del test Test-Voto
Arguggi/Relazione-Stat
R/test.r
R/test.r
suddividi <- function(lista,punti) { split(lista,cut(lista,punti)) } # Test Logica-Matematica mateRange <- c(-5,19.99,34) logicaRange <- c(-5,11,22,34) # Divido i dati a seconda del voto in matematica e logica logicaDivisi <- split(dati$Matematica,cut(dati$Logica,logicaRange)) test_mate <- sapply(logicaDivisi,s...
suddividi <- function(lista,punti) { split(lista,cut(lista,punti)) } # Test Logica-Matematica mateRange <- c(-5,19.99,34) logicaRange <- c(-5,11,22,34) # Divido i dati a seconda del voto in matematica e logica logicaDivisi <- split(dati$Matematica,cut(dati$Logica,logicaRange)) test_mate <- sapply(logicaDivisi,s...
mit
R
98b204e5ab50aaa0b2d7448a683096264a2af0dc
verify data exists after uploading with bigr
snowch/biginsight-examples,snowch/biginsight-examples
examples/BigR/uploaddata.r
examples/BigR/uploaddata.r
projdir <- Sys.getenv("projdir") # connect.r will open the connection to the cluster source( paste( projdir, "/connect.r", sep="" ) ) ################# # 1. Data loading ################# # In order to try out any example, first run the following steps to upload # the aforementioned dataset to a BigInsights cluster....
projdir <- Sys.getenv("projdir") source( paste( projdir, "/connect.r", sep="" ) ) ################# # 1. Data loading ################# # In order to try out any example, first run the following steps to upload # the aforementioned dataset to a BigInsights cluster. airfile <- system.file("extdata", "airline.zip", ...
apache-2.0
R
6bfe2e2d4da6e31066cd5fcadb38689d06f65b4e
check tglobe
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/tglob_sphere.r
R/tglob_sphere.r
#' Tglob_sphere #' #' Calculate the globe temperature having sphere diameter. The author of procedure is James C. Liljegren Decision and Information Sciences Division Argonne National Laboratory. #' #' #' @param numeric t Air temperature in Celsius degrees. #' @param numeric rh Air Relative humidity in percentage. #' ...
#' Tglob_sphere #' #' Calculate the globe temperature having sphere diameter. The author of procedure is James C. Liljegren Decision and Information Sciences Division Argonne National Laboratory. #' #' #' @param numeric t Air temperature in Celsius degrees. #' @param numeric rh Air Relative humidity in percentage. #' ...
mit
R
6ddf42d5cf36d59caffd5f6ea8fb59e3f7b0d3d5
add t/sRNA ratio distribution
wangqinhu/tsRFinder,wangqinhu/tsRFinder,wangqinhu/tsRFinder,wangqinhu/tsRFinder
lib/draw_distribution.r
lib/draw_distribution.r
pdf(file="distribution.pdf", 6, 9) # read length file rls<-read.table("srna.len") rlt<-read.table("trna.len") rld[1:length(rls$V1),1]<-rls$V1 rld[1:length(rls$V1),2]<-rlt$V2 rld[1:length(rls$V1),3]<-rls$V2 - rlt$V2 # plot layout(c(1:3)) par(mar=(c(4.5,5,2,1))) barplot(rls$V2, col=2, main="Length distribution of sRNA re...
pdf(file="distribution.pdf", 6, 6) # read length file rls<-read.table("srna.len") rlt<-read.table("trna.len") # plot layout(c(1,2)) par(mar=(c(4.5,5,2,1))) barplot(rls$V2, col=2, main="Length distribution of sRNA reads", xlab="length (nt)", ylab="Frequency", names.arg=rls$V1) par(mar=(c(4.5,5,2,1))) barplot(rlt$V2, col...
mit
R
7807344ee7d124c74f42c532d9ab35e1330a2971
check clinical data
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/Annotation/mafReport.r
lib/Annotation/mafReport.r
library(mafreport) mafFileList = parSampleFile1 reportOutDir = "." if(parFile1 != ''){ clinicalData = parFile1 }else{ clinicalData = NULL clinicalFeatures = NULL } if(!is.null(interestedGeneStr)) { interestedGeneStr = gsub("\\s+", ",", interestedGeneStr) interestedGenes = unlist(strsplit(inte...
library(mafreport) mafFileList = parSampleFile1 reportOutDir = "." clinicalData = parFile1 if(!is.null(interestedGeneStr)) { interestedGeneStr = gsub("\\s+", ",", interestedGeneStr) interestedGenes = unlist(strsplit(interestedGeneStr, ",")) }else{ interestedGenes = NULL } mafFiles = read.table(mafFi...
apache-2.0
R
602034c10d1cf01099a99c2ae8eb90365b74631d
use .onUnload, not .Last.Lib
RBigData/pbdADIOS,go-ski/pbdADIOS,RBigData/pbdADIOS,YupingLu/pbdADIOS,go-ski/pbdADIOS,RBigData/pbdADIOS,YupingLu/pbdADIOS,go-ski/pbdADIOS,RBigData/pbdADIOS,YupingLu/pbdADIOS
R/zzz.r
R/zzz.r
.onUnload <- function(libpath) { pbdADIOS::adios.finalize(pbdMPI::comm.rank()) }
#' @export .Last.lib <- function(libpath){ pbdADIOS::adios.finalize(pbdMPI::comm.rank()) }
mpl-2.0
R
e44b7bb944359551e507d231d3a974ee633265a4
test working chunk
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
tests/testthat/test-worker.r
tests/testthat/test-worker.r
context("worker") context = rzmq::init.context() socket = rzmq::init.socket(context, "ZMQ_REP") rzmq::bind.socket(socket, "tcp://*:55443") Sys.sleep(0.5) start_worker = function(id="1", url="tcp://localhost:55443") { p = parallel::mcparallel(worker(id, url, 1024)) msg = rzmq::receive.socket(socket) testth...
context("worker") context = rzmq::init.context() socket = rzmq::init.socket(context, "ZMQ_REP") rzmq::bind.socket(socket, "tcp://*:55443") Sys.sleep(0.5) start_worker = function(id="1", url="tcp://localhost:55443") { p = parallel::mcparallel(worker(id, url, 1024)) msg = rzmq::receive.socket(socket) testth...
apache-2.0
R
cc4820b19dd1be036a6af7f8fca9c74bc0303aa0
Update ocir_7730.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/ocir_7730.r
R/ocir_7730.r
#' ocir_7730 #' #' Calculate ocir index consisting in range of clothing insulation in moderate thermal environments based on PMV ISO 7730. #' #' @param numeric t Air temperature in Celsius degrees. #' @param numeric rh Air Relative humidity in percentage. #' @param numeric wind Wind speed in meter per second. #' @param...
#' ocir_7730 #' #' Calculate ocir index consisting in range of clothing insulation in moderate thermal environments based on PMV ISO 7730. #' #' @param numeric t Air temperature in Celsius degrees. #' @param numeric rh Air Relative humidity in percentage. #' @param numeric wind Wind speed in meter per second. #' @param...
mit
R
59263da3ae3c4bb4f502049ebcb50006303e31ca
Improve glove model
FTAsr/wordvet,FTAsr/wordvet,FTAsr/wordvet,FTAsr/wordvet
trainGloveModel.r
trainGloveModel.r
##pre-requisites: #library(devtools) #load_all("text2vec") #install("text2vec") #build("text2vec") print("started running trainGloveModel.r") library("text2vec") text8_file = "/data/wiki.shuffled-norm1-phrase1" wiki = readLines(text8_file, n = 10000000, warn = FALSE) # Create iterator over tokens tokens <- space_...
##pre-requisites: #library(devtools) #load_all("text2vec") #install("text2vec") #build("text2vec") print("started running trainGloveModel.r") library("text2vec") text8_file = "/data/wordvet/wiki.shuffled-norm1-phrase1" wiki = readLines(text8_file, n = 10000000, warn = FALSE) # Create iterator over tokens tokens <...
apache-2.0
R
ab11d9c78cb4a54955893967affb5b3fbc957944
Add parameters messed when copypaste
HIIT/digivaalit-2015,HIIT/digivaalit-2015,HIIT/digivaalit-2015
topics/topics.r
topics/topics.r
create_dtm <- function( path ) { library(tm) a <- Corpus( DirSource( path ) ) a <- tm_map(a, removeNumbers) a <- tm_map(a , stripWhitespace) a <- tm_map(a, removePunctuation) a <- tm_map(a, content_transformer(tolower) ) a <- tm_map(a, removeWords, stopwords("finnish") ) dtm <-DocumentTermMatrix(a) ...
create_dtm <- function( path ) { library(tm) a <- Corpus( DirSource( path ) ) a <- tm_map(a, removeNumbers) a <- tm_map(a , stripWhitespace) a <- tm_map(a, removePunctuation) a <- tm_map(a, content_transformer(tolower) ) a <- tm_map(a, removeWords, stopwords("finnish") ) dtm <-DocumentTermMatrix(a) ...
mit
R
b626c5b75394fb41ea95691ceec2af7cfbdaa208
Synchronize string token table with lexer errors
hostilefork/rebol,draegtun/ren-c,rgchris/ren-c,draegtun/ren-c,kealist/ren-c,kealist/ren-c,rgchris/ren-c,hostilefork/rebol,giuliolunati/ren-c,hostilefork/rebol,kealist/ren-c,codebybrett/ren-c,giuliolunati/ren-c,hostilefork/rebol,codebybrett/ren-c,codebybrett/ren-c,codebybrett/ren-c,giuliolunati/ren-c,draegtun/ren-c,rgch...
src/boot/strings.r
src/boot/strings.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "Low-level strings" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0. See: http://www.ap...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "Low-level strings" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0. See: http://www.ap...
apache-2.0
R
56b3215751ef98ab9609668c06ed42d00858d8cd
Bump version for 3.1 beta
zsx/r3,Pointillistic/rebol-lang,zsx/r3,zsx/r3,Pointillistic/rebol-lang,Pointillistic/rebol-lang,Pointillistic/rebol-lang,zsx/r3
src/boot/version.r
src/boot/version.r
3.0.91.3.1
3.0.90.3.1
apache-2.0
R
26a69321c78a46cfdbba872ec3e6f5de779f7cea
add tests
TobCap/lambdass,TobCap/lambdass
tests/testthat/test-test.r
tests/testthat/test-test.r
context("test for lambda syntax-sugar") test_that("test", { expect_equal(function(x) x, f.(x, x)) expect_equal(function(x, y) x + y, f.(x, y, x + y)) expect_error(f.(x = 1, y = x+1)) # body should not be named expect_equal(function(..) .., ~~ ..) expect_equal(function(._1, ._2) ._1 + ._2, ~~ ..1 + ..2...
context("test for lambda syntax-sugar") test_that("test", { expect_equal(function(x) x, f.(x, x)) expect_equal(function(x, y) x + y, f.(x, y, x + y)) # expect_equal(function(..) .., ~~ ..) # expect_equal(function(._1, ._2) ._1 + ._2, ~~ ..1 + ..2) expect_equal(function(x) x, x %->% x) expect_equal(fu...
mit
R
419ceb17e8dc171671dc293c8a9f1d2e5bc3a2be
optimize again, slightly
david-beauchesne/Predict_interactions
Script/tanimoto.r
Script/tanimoto.r
tanimoto <- function(resource_x, resource_y) { # The Tanimoto similarity computes the sum of shared elements in vectors resource_x and resource_y and divides this by the length of the longest vector # If either length of resource_x or resource_y == 0, similarity == 0 # The order of vectors consumer_x or consumer_...
tanimoto <- function(resource_x, resource_y) { # The Tanimoto similarity computes the sum of shared elements in vectors resource_x and resource_y and divides this by the length of the longest vector # If either length of resource_x or resource_y == 0, similarity == 0 # The order of vectors consumer_x or consumer_...
mit
R
c004cd50118a2942c136913892bcc8b31782e8c9
Remove browser
tenforwardconsulting/crantastic,hadley/crantastic,tenforwardconsulting/crantastic,hadley/crantastic,tenforwardconsulting/crantastic,hadley/crantastic,tenforwardconsulting/crantastic
lib/r/update.r
lib/r/update.r
source("db.r") source("package-info.r") options(warn = 1) ## compare AP to EP and update db if necessary update.packages <- function() { known_versions <- load.packages() latest <- latest.versions() invisible(lapply(latest, function(pkg) { try(update.package(pkg, known_versions)) })) } update.package <- ...
source("db.r") source("package-info.r") options(warn = 1) ## compare AP to EP and update db if necessary update.packages <- function() { known_versions <- load.packages() latest <- latest.versions() invisible(lapply(latest, function(pkg) { try(update.package(pkg, known_versions)) })) } update.package <- ...
mit
R
be75ec174377878fa9e08ddb8d1a3d74b4a5e9b0
Support direct code for interactive R calls
klmr/modules,klmr/modules
tests/testthat/helper-callr.r
tests/testthat/helper-callr.r
rcmd = function (script_path) { cmd = 'R CMD BATCH --slave --no-restore --no-save --no-timing' output_file = 'output.rout' on.exit(unlink(output_file)) system(paste(cmd, script_path, output_file)) readLines(output_file) } rscript = function (script_path) { cmd = 'Rscript --slave --no-restore --...
rcmd = function (script_path) { cmd = 'R CMD BATCH --slave --no-restore --no-save --no-timing' output_file = 'output.rout' on.exit(unlink(output_file)) system(paste(cmd, script_path, output_file)) readLines(output_file) } rscript = function (script_path) { cmd = 'Rscript --slave --no-restore --...
apache-2.0
R
6ce787e564d92645d5c6dcc595fb34cb3ecead91
Add algorithm (backend) to the shiny server function
isithot/isithotrightnow,isithot/isithotrightnow,isithot/isithotrightnow,isithot/isithotrightnow,isithot/isithotrightnow
server.r
server.r
library(shiny) library(ggplot2) # IsItHotRightNow.com # Algorithm # Libraries library(jsonlite) library(lubridate) library(plotly) # server logic: calc output based on inputs function(input, output) { # Get Data # Get Climatology data # Pre-made BOM statistics available in data/ BOMstats.raw <- read.csv("d...
library(shiny) library(ggplot2) # server logic: calc output based on inputs function(input, output) { # use reactive() to ensure that dataset is updated whenever # inout$sampleSize changes # dataset <- reactive({ # diamonds[sample(nrow(diamonds), input$sampleSize), ] # }) # renderPlot() does the plot r...
mit
R
8c917e2c2179e7fe4f02b098366f2323f1816053
Update pp.r
robertzk/Ramd
R/pp.r
R/pp.r
# String interpolation in R! #' export pp <- function(..., envir = parent.frame(), sep = '', collapse = '') { string <- list(...) if (length(string) > 1) return(paste(sapply(string, function(s) { pp(s, envir = envir, sep = sep, collapse = collapse) } ), collapse = sep)) string <- string[[1]] if (l...
# String interpolation in R! pp <- function(..., envir = parent.frame(), sep = '', collapse = '') { string <- list(...) if (length(string) > 1) return(paste(sapply(string, function(s) { pp(s, envir = envir, sep = sep, collapse = collapse) } ), collapse = sep)) string <- string[[1]] if (length(stri...
mit
R
73861f89020939dee1925c6f9fdaf01cf133ae85
update reference to github
leeper/leeper.github.io
code/r/coefpaste.r
code/r/coefpaste.r
# FUNCTION TO PRODUCE MEAN/SE OR MEAN/SD COMBINATIONS FOR PRINTING # PRODUCES A VECTOR OF THE FORM "mean (SE)" FOR OUTPUT (e.g., IN xtable() ) # Copyright (C) 2012 Thomas J. Leeper # This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published...
# FUNCTION TO PRODUCE MEAN/SE OR MEAN/SD COMBINATIONS FOR PRINTING # PRODUCES A VECTOR OF THE FORM "mean (SE)" FOR OUTPUT (e.g., IN xtable() ) # Copyright (C) 2012 Thomas J. Leeper # This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published...
mit
R
64b340c5b98e0d76f9e9201eaca2159e9b7176fb
install map libraries if needed
hackoregon/nass-explore
getting-the-data.r
getting-the-data.r
#' --- #' title: "Downloading NASS/ARMSDB data" #' author: "M. Edward (Ed) Borasky" #' date: "September 3, 2015" #' output: #' html_document: #' keep_md: true #' --- #' #' References: #' #' 1. NASS data: <http://challengefiles2.blob.core.windows.net/pdf/MSR_Innovation_challenge_NASS_description.pdf> #' 2. ARMSDB ...
#' --- #' title: "Downloading NASS/ARMSDB data" #' author: "M. Edward (Ed) Borasky" #' date: "September 3, 2015" #' output: #' html_document: #' keep_md: true #' --- #' #' References: #' #' 1. NASS data: <http://challengefiles2.blob.core.windows.net/pdf/MSR_Innovation_challenge_NASS_description.pdf> #' 2. ARMSDB ...
agpl-3.0
R
374b20b809a963de30ab3fa10e831ccfd68517bc
annotate on GO and keggPathway only
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/Annotation/WebGestaltR.r
lib/Annotation/WebGestaltR.r
options(bitmapType='cairo') library(WebGestaltR) args = commandArgs(trailingOnly=TRUE) organism = args[1] #hsapiens sampleName=args[2] geneFile = args[3] outputDirectory = args[4] interestGeneType = args[5] referenceSet = args[6] cat("organism=", organism, "\n") cat("sampleName=", sampleName, "\n") cat...
options(bitmapType='cairo') library(WebGestaltR) args = commandArgs(trailingOnly=TRUE) organism = args[1] #hsapiens sampleName=args[2] geneFile = args[3] outputDirectory = args[4] interestGeneType = args[5] referenceSet = args[6] cat("organism=", organism, "\n") cat("sampleName=", sampleName, "\n") cat...
apache-2.0
R
34be0f03dbf60514a653dfdc1a20263a3669f2cd
Update vizualizacija.r
ZavbiA/APPR-2017
vizualizacija/vizualizacija.r
vizualizacija/vizualizacija.r
# 3. faza: Vizualizacija podatkov library(sp) library(maptools) library(digest) gpclibPermit() library(rvest) library(gsubfn) library(readr) library(dplyr) library(ggplot2) library(tibble) # Uvozim zemljevid. zemljevid <- uvozi.zemljevid("http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cul...
# 3. faza: Vizualizacija podatkov library(sp) library(maptools) library(digest) gpclibPermit() library(rvest) library(gsubfn) library(readr) library(dplyr) library(ggplot2) library(tibble) # Uvozim zemljevid. zemljevid <- uvozi.zemljevid("http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cul...
mit
R
95b8bc7050fe9213434ac2148906a03ab877f35d
update with links
davidmoten/rtree-3d,davidmoten/rtree-3d
src/main/r/source.r
src/main/r/source.r
#!/usr/bin/Rscript #X11(type="Xlib") library("plot3D") for (i in 0:10 ) { mat <- read.csv(file = paste("../../../target/out",i,".txt", sep=""), header = FALSE) png(paste("../../../target/plot",i,".png",sep=""), height = 700, width =1000 ) box3D( x0 = mat[,1], y0 = mat[,2], z0=mat[,3], x1 = mat[,...
#!/usr/bin/Rscript #X11(type="Xlib") library("plot3D") for (i in 0:10 ) { mat <- read.csv(file = paste("../../../target/out",i,".txt", sep=""), header = FALSE) png(paste("../../../target/plot",i,".png",sep=""), height = 700, width =1000 ) box3D( x0 = mat[,1], y0 = mat[,2], z0=mat[,3], x1 = mat[,4], y1 = mat...
apache-2.0
R
42850fa7ee42a9f2ef24e970e5a22b18eb451a85
Fix error in tAI
klmr/codons,klmr/codons
scripts/tai.r
scripts/tai.r
# Based on the paper by Dos Reis & al, 2004 s = list(naive = c(0, 0, 0, 0, 0.5, 0.5, 0.75, 0.5, 0.5, 0.5), ecoli = c(0, 0, 0, 0, 0.41, 0.28, 0.9999, 0.68, 0.89)) get_s = function (species) if (species %in% names(s)) s[[species]] else s$naive # Reverse complement of the anticodons, in the order of antico...
# Based on the paper by Dos Reis & al, 2004 s = list(naive = c(0, 0, 0, 0, 0.5, 0.5, 0.75, 0.5, 0.5, 0.5), ecoli = c(0, 0, 0, 0, 0.41, 0.28, 0.9999, 0.68, 0.89)) get_s = function (species) if (species %in% names(s)) s[[species]] else s$naive # Reverse complement of the anticodons, in the order of antico...
apache-2.0
R
2450447fa0e4017706605e7d64ed3c926c1a2d7e
Update wetbulb_stull.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/wetbulb_stull.r
R/wetbulb_stull.r
#' wetbulb_stull #' #' Compute natural wetbulb temperature by using Stull empirical formulation #' #' @param numeric t Air temperature in Celsius degrees. #' @param numeric rh Air Relative humidity in percentage. #' @param numeric press Air pressure in hPa or millibar. #' @return Wet bulb temperature in Celsius degre...
mit
R
c4e40ad0b8f550bf6ad3a697db4e8ccf86766de8
Update R3-GUI download URL used in LOAD-GUI
mbk/ren-c,kealist/ren-c,hostilefork/rebol,rgchris/ren-c,codebybrett/ren-c,mbk/ren-c,rgchris/ren-c,draegtun/ren-c,hostilefork/rebol,hostilefork/rebol,hostilefork/rebol,rgchris/ren-c,hostilefork/rebol,giuliolunati/ren-c,giuliolunati/ren-c,giuliolunati/ren-c,giuliolunati/ren-c,kealist/ren-c,rgchris/ren-c,codebybrett/ren-c...
src/mezz/rma-patches.r
src/mezz/rma-patches.r
REBOL [ Title: "REBOL Graphics - load-gui patch" ] load-gui: func [ "Download current Spahirion's R3-GUI module from web." /local data ][ print "Fetching GUI..." either error? data: try [load http://development.saphirion.com/resources/r3-gui.r3] [ either data/id = 'protocol [print "Cannot load...
REBOL [ Title: "REBOL Graphics - load-gui patch" ] load-gui: func [ "Download current Spahirion's R3-GUI module from web." /local data ][ print "Fetching GUI..." either error? data: try [load http://www.saphirion.com/development/downloads-2/files/r3-gui.r3] [ either data/id = 'protocol [print ...
apache-2.0
R
bdabe55b2a174c8e64d334a6563f9b99cd98157b
read from relative directory
davidmoten/rtree-3d,davidmoten/rtree-3d
src/main/r/source.r
src/main/r/source.r
#!/usr/bin/Rscript #X11(type="Xlib") library("plot3D") mat <- read.csv(file = "../../../target/out.txt", header = FALSE) png("../../../target/plot.png", height = 700, width =1000 ) box3D( # x0 = runif(3), y0 = runif(3),print z0 = runif(3), # x1 = runif(3), y1 = runif(3), z1 = runif(3), x0 = mat[,1], y0 = mat[,2], z...
#!/usr/bin/Rscript #X11(type="Xlib") library("plot3D") mat <- read.csv(file = "/home/dave/Development/ide/eclipse/workspace-4.4/rtree-3d/target/out.txt", header = FALSE) png("../../../target/plot.png", height = 700, width =1000 ) box3D( # x0 = runif(3), y0 = runif(3),print z0 = runif(3), # x1 = runif(3), y1 = runif(3...
apache-2.0
R
bb8fdca74fe64b8d41f192288832e42a6d4a661c
Update uvoz.r
UrosKrampelj/APPR-2015-16
uvoz/uvoz.r
uvoz/uvoz.r
library(rvest) library(dplyr) library(gsubfn) html <- html_session("https://en.m.wikipedia.org/wiki/List_of_Chelsea_F.C._players#List_of_players") %>% read_html() html_tabela <- html %>% html_nodes(xpath="//table[1]") %>% .[[1]] tabela <- html_tabela %>% html_table() tabela[grep(",", tabela[[1]]), 1] <- html_tabela %>...
library(rvest) library(dplyr) library(gsubfn) html <- html_session("https://en.m.wikipedia.org/wiki/List_of_Chelsea_F.C._players#List_of_players") %>% read_html() html_tabela <- html %>% html_nodes(xpath="//table[1]") %>% .[[1]] tabela <- html_tabela %>% html_table() tabela[grep(",", tabela[[1]]), 1] <- html_tabela %>...
mit
R
c39edb28215eeed22ea8b47558579bffbc5a6162
adjust figure after rename cluster
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/renameCluster.r
lib/scRNA/renameCluster.r
library(Seurat) library(ggplot2) finalList<-readRDS(parFile1) obj<-finalList$obj newnames<-read.table(parSampleFile2, stringsAsFactors = F, sep="\t", header=F) clusters<-data.frame("cell" = c(1:length(obj$seurat_clusters)), "seurat_clusters"=as.numeric(as.character(obj$seurat_clusters)), "cellactivity_cluste...
library(Seurat) library(ggplot2) finalList<-readRDS(parFile1) obj<-finalList$obj newnames<-read.table(parSampleFile2, stringsAsFactors = F, sep="\t", header=F) clusters<-data.frame("cell" = c(1:length(obj$seurat_clusters)), "seurat_clusters"=as.numeric(as.character(obj$seurat_clusters)), "cellactivity_clusters"=obj$...
apache-2.0
R
0a0bc3370867d5fad3fed55d02091e142ff5e7f1
Update 1.r
glor/R,glor/R
aufgaben/blatt05/1.r
aufgaben/blatt05/1.r
#Anpassungstest, da untersucht wird, ob die tatsaechliche Anzahl mit der vermuteten, theoretischen Anzahl der Erbsen uebereinstimmt. #1.2 #H0: Die Anzahl der Erbsen stimmt mit dem von Mendel aufgestellten Zahlenverhaeltnissen ueberein. #H1: Die Anzahl stimmt nicht ueberein. #1.3 chisq.test(c(60,16,20,4), c(9,3...
bsd-2-clause
R
e71f2b72fbe6bf88ca316a451d4eed3dd975028b
Update installRpackages.r
PascalLike/OSGeoLive,astroidex/OSGeoLive,PascalLike/OSGeoLive,astroidex/OSGeoLive,OSGeo/OSGeoLive,OSGeo/OSGeoLive,PascalLike/OSGeoLive,PascalLike/OSGeoLive,kalxas/OSGeoLive,PascalLike/OSGeoLive,OSGeo/OSGeoLive,guygriffiths/OSGeoLive,PascalLike/OSGeoLive,guygriffiths/OSGeoLive,OSGeo/OSGeoLive,OSGeo/OSGeoLive,guygriffith...
app-conf/R/installRpackages.r
app-conf/R/installRpackages.r
core <- c("classInt", "DCluster", "deldir", "geoR", "gstat", "maptools", "RandomFields", "raster", "RColorBrewer", "rgdal", "sp", "spatstat", "spdep", "splancs","spgrass6", "rgeos","ncdf", "RSAGA") #optional <- c("ade4", "adehabitat", "adehabitatHR", "adehabitatHS", "adehabitatLT", "adehabitatMA", "ads", "akima", "ash...
core <- c("classInt", "DCluster", "deldir", "geoR", "gstat", "maptools", "RandomFields", "raster", "RColorBrewer", "rgdal", "sp", "spatstat", "spdep", "splancs","spgrass6", "rgeos","ncdf", "RSAGA") #optional <- c("ade4", "adehabitat", "adehabitatHR", "adehabitatHS", "adehabitatLT", "adehabitatMA", "ads", "akima", "ash...
lgpl-2.1
R
5d58c8a1bc1d3745f0d8d60362769d01984503bb
use %||% list() here
syberia/syberia
R/model_stage.r
R/model_stage.r
#' Model stage for syberia models #' #' TODO: Document this more #' #' @param modelenv an environment. The persistent modeling environment. #' @param model_parameters a list. Model-specific parameters, with the first #' parameter always being the model keyword for the tundra container #' (e.g., glm, gbm, etc.) #...
#' Model stage for syberia models #' #' TODO: Document this more #' #' @param modelenv an environment. The persistent modeling environment. #' @param model_parameters a list. Model-specific parameters, with the first #' parameter always being the model keyword for the tundra container #' (e.g., glm, gbm, etc.) #...
mit
R
22ad0254b969bf635e91be68db4f2eb925aa0529
Update sum-aggr-na.r
SwedishPensionsAgency/Hierarchy
R/sum-aggr-na.r
R/sum-aggr-na.r
#' Aggregate sum function #' #' ... #' #' @param x data #' #' #' @export sum_aggr_na <- function(x) { if (length(x) == 1 && is.na(x)) { sum(x, na.rm = FALSE) } else { sum(x, na.rm = TRUE) } }
#' Aggregate sum function #' #' ... #' #' @param ... arguments passed to the sum function #' #' #' @export sum_aggr_na <- function(x) { if (length(x) == 1 && is.na(x)) { sum(x, na.rm = FALSE) } else { sum(x, na.rm = TRUE) } }
agpl-3.0
R
0141819bfdbe36615ab41e7e7e4bff0cc00941a2
convert download routine from curl to httr
khufkens/phenor
R/download_berkeley_earth.r
R/download_berkeley_earth.r
#' Download Berkeley Earth Gridded mean daily temperature data #' #' @param path a path where to save the gridded data #' @param year year to process (requires year - 1 to be present) #' @return nothing is returned to the R working environment, files are #' downloaded and stored on disk #' @keywords phenology, model, d...
#' Download Berkeley Earth Gridded mean daily temperature data #' #' @param path a path where to save the gridded data #' @param year year to process (requires year - 1 to be present) #' @return nothing is returned to the R working environment, files are #' downloaded and stored on disk #' @keywords phenology, model, d...
agpl-3.0
R
d04a325c372d714313e6d23762d7d10028067d07
check input file
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/clonotype_cluster.r
lib/scRNA/clonotype_cluster.r
library("tools") clonos<-read.csv(parFile1, stringsAsFactors=F) clonos<-clonos[order(clonos$frequency, decreasing=T),] clono_cells<-unique(clonos[,c("clonotype_id", "cells")]) if(file_ext(parFile2) == "rds"){ ct<-readRDS(parFile2) ct$ident_celltype<-paste0(ct$orig.ident, ":", ct$seurat_cluster, ":", ct$...
clonos<-read.csv(parFile1, stringsAsFactors=F) clonos<-clonos[order(clonos$frequency, decreasing=T),] clono_cells<-unique(clonos[,c("clonotype_id", "cells")]) ct<-read.csv(parFile2, row.names=1) ct$ident_celltype<-paste0(ct$orig.ident, ":", ct$seurat_cluster, ":", ct$cellactivity_clusters) clon_ic<-apply(clo...
apache-2.0
R
b3fc581d10b17779eb7f513b78bcf895438e53a5
Add geom_label #chunks
jpalardy/dotfiles,jpalardy/dotfiles,jpalardy/dotfiles,jpalardy/dotfiles,jpalardy/dotfiles
chunks/chunks.r
chunks/chunks.r
#------------------------------------------------- # manual colors #------------------------------------------------- colors = c("val1"="red", "val2"="darkgreen") scale_color_manual(values=colors) #------------------------------------------------- # labels #------------------------------------------------- # https:...
#------------------------------------------------- # manual colors #------------------------------------------------- colors = c("val1"="red", "val2"="darkgreen") scale_color_manual(values=colors) #------------------------------------------------- # color brewer #------------------------------------------------- # ...
mit
R
eae6b35eaec5fb48fb14dc16acb283d720f0c5d6
add comment about multicore+multiprocess test
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
tests/testthat/test-5-qsys_impl.r
tests/testthat/test-5-qsys_impl.r
context("qsys implementations") has_cmq = has_cmq() has_network = has_connectivity(Sys.info()["nodename"]) avail = Sys.which(c("bsub", "qsub", "sbatch", "fake_scheduler.sh")) avail = as.list(nchar(avail) != 0) fx = function(x) x*2 test_that("local, explicit", { w = workers(n_jobs=4, qsys_id="local") r = Q(fx,...
context("qsys implementations") has_cmq = has_cmq() has_network = has_connectivity(Sys.info()["nodename"]) avail = Sys.which(c("bsub", "qsub", "sbatch", "fake_scheduler.sh")) avail = as.list(nchar(avail) != 0) fx = function(x) x*2 test_that("local, explicit", { w = workers(n_jobs=4, qsys_id="local") r = Q(fx,...
apache-2.0
R
ef5f0fb3af8588ec1b1c2dcbc351b3bdbbcdd8f0
Add a second theme using Helvetica
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_font('Roboto') fonts$register_font('Roboto Condensed', 'RobotoCondensed') .theme_basic = theme_minim...
#' 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_font('Roboto') fonts$register_font('Roboto Condensed', 'RobotoCondensed') theme_set(theme_minimal() ...
apache-2.0
R
aa8ed8dbd98fd84738d5335bc8414272da27ade0
include importFrom %>%
khufkens/phenor
R/check_pep725_species.r
R/check_pep725_species.r
#' Checks if PEP725 species name or number exists or can be generated #' #' @param species A species to download, either specified by its #' species number or species name. #' @param list List all species numbers and names as verbose output #' @return a validated list of species numbers, if not a warning is thrown #' a...
#' Checks if PEP725 species name or number exists or can be generated #' #' @param species A species to download, either specified by its #' species number or species name. #' @param list List all species numbers and names as verbose output #' @return a validated list of species numbers, if not a warning is thrown #' a...
agpl-3.0
R
51f39d7902e3c9bba466f438ad7d36a809fe8c96
add namemap
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/split_samples_summary.r
lib/scRNA/split_samples_summary.r
library(ggplot2) library(reshape2) args = commandArgs(trailingOnly=TRUE) if (length(args) == 0) { inputFile = "/scratch/cqs/paula_hurley_projects/20201208_scRNA_split/split_samples_summary/result/scRNA__fileList1.list" nameMapFile = "/scratch/cqs/paula_hurley_projects/20201208_scRNA_split/split_samples_sum...
library(ggplot2) library(reshape2) args = commandArgs(trailingOnly=TRUE) if (length(args) == 0) { inputFile = "/scratch/cqs/alexander_gelbard_projects/20201202_5126_scRNA_split/split_samples_summary/result/scRNA_5126__fileList1.list" outputPrefix = "/scratch/cqs/alexander_gelbard_projects/20201202_5126_scR...
apache-2.0
R
4bf5efbcb6bc7fc2622140a345a8cb4b994b75a3
Add links to translations.
snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3
web/en/index.rd
web/en/index.rd
=begin =QMAIL3 ==What's QMAIL3 QMAIL3 is a mail client which runs on Windows and Windows CE families. It has features: *Supports POP3, SMTP, IMAP4, NNTP, RSS, Atom *Supports several authentication mechanism, such as APOP, SMTP *Supports SSL, STARTTLS *Supports S/MIME *Supports PGP/GnuPG (Windows version onl...
=begin =QMAIL3 ==What's QMAIL3 QMAIL3 is a mail client which runs on Windows and Windows CE families. It has features: *Supports POP3, SMTP, IMAP4, NNTP, RSS, Atom *Supports several authentication mechanism, such as APOP, SMTP *Supports SSL, STARTTLS *Supports S/MIME *Supports PGP/GnuPG (Windows version onl...
mit
R
e024a992dcdc8913572880ce778b5a830180225f
Add get_real_words function to remove non-words
petercarrjones/icc-data,petercarrjones/icc-data,petercarrjones/icc-data
load.r
load.r
#Load Packages library(XML) library(tidyr) library(stringr) library(magrittr) library(dplyr) library(RWeka) #load OCR'd ICC Deceisions data into R icc_dir <- "text" files <- dir(icc_dir, "*.txt") raw <- file.path(icc_dir, files) %>% lapply(., scan, "character", sep = "\n") names(raw) <- files icc_texts <- lapply(ra...
#Load Packages library(XML) library(tidyr) library(stringr) library(magrittr) library(dplyr) library(RWeka) #load OCR'd ICC Deceisions data into R icc_dir <- "text" files <- dir(icc_dir, "*.txt") raw <- file.path(icc_dir, files) %>% lapply(., scan, "character", sep = "\n") names(raw) <- files icc_texts <- lapply(ra...
mit
R
8601c08bd3dc7efc2ee053c5d71d09322c606fa9
fix variable names, add generalised source() call.
wikimedia-research/Blockr
main.r
main.r
# Copyright (c) 2013 Oliver Keyes # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dis...
# Copyright (c) 2013 Oliver Keyes # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, dis...
mit
R
ee750774b9b6b42ee740d10cfee5967338dc7565
remove outdated comments
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
R/ssh_proxy.r
R/ssh_proxy.r
#' SSH proxy for different schedulers #' #' Do not call this manually, the SSH qsys will do that #' #' @param master_port The master address (tcp://ip:port) ssh_proxy = function(master_port) { # network forwarding most likely disabled, so set up local SSH forward net_port = sample(8000:9999, 1) cmd = sprin...
#' SSH proxy for different schedulers #' #' Do not call this manually, the SSH qsys will do that #' #' @param master_port The master address (tcp://ip:port) ssh_proxy = function(master_port) { # network forwarding most likely disabled, so set up local SSH forward net_port = sample(8000:9999, 1) cmd = sprin...
apache-2.0
R
0fbe4c22368612ec5ef7e7b366a78080fca1c9a1
Update methylation-pcs.r
perishky/meffil,perishky/meffil
R/methylation-pcs.r
R/methylation-pcs.r
#' Compute principal components of a methylation matrix. #' #' @param beta Output from \code{\link{meffil.normalize.samples}()}, #' either a matrix or a GDS filename. #' @param probe.range Default = 50000. How many probes to be used in calculating PCs. #' @param sites Subset of CpG sites to consider (row names of beta)...
#' Compute principal components of a methylation matrix. #' #' @param beta Output from \code{\link{meffil.normalize.samples}()}, #' either a matrix or a GDS filename. #' @param probe.range Default = 50000. How many probes to be used in calculating PCs. #' @param sites Subset of CpG sites to consider (row names of beta)...
artistic-2.0
R
4fd27dbe708d76c9b7d7939a9a0b9074227eb35b
Add document about FileUninstallAction.
snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3
q3/docs/FileUninstallAction.rd
q3/docs/FileUninstallAction.rd
=begin =FileUninstallANV QMAIL3gp郌WXg폜܂B̓Iɂ́AHKEY_CURRENT_USER\Software\sn\q3ȉ̑SẴL[폜AȊOɎqL[Ȃ΁AHKEY_CURRENT_USER\Software\sn폜܂B OSւ̃[NCAgƂĂ̓o^mailto URLւ̊֘AtȂǂ͍폜܂BCXg[ōs邱̐ݒ̓ACXg[ɂč폜܂B == Ȃ ==LȃEBhEEr[ *CEBhE =end
=begin =FileUninstallANV // TODO =end
mit
R
19189e64bf6f43ce99ff6607055dbfa9a54f68f4
Add likelihood plot.
jtobin/bnp
finite-gaussian-mixture/src/simulation_conditional.r
finite-gaussian-mixture/src/simulation_conditional.r
set.seed(42) require(ggplot2) require(reshape2) source('fmm_conditional.r') config = list( k = 3 , a = 1 , l = 0 , r = 0.1 , b = 1 , w = 1 , n = 1000 ) origin = list( p = mixing_model(config$k, config$a) , m = location_model(config$k, config$l, config$r) , s = precision_model(config$k, con...
set.seed(42) require(ggplot2) require(reshape2) source('fmm_conditional.r') config = list( k = 3 , a = 1 , l = 0 , r = 0.1 , b = 1 , w = 1 , n = 500 ) origin = list( p = mixing_model(config$k, config$a) , m = location_model(config$k, config$l, config$r) , s = precision_model(config$k, conf...
mit
R
991ad55ade24635edf65673e02b0999785bcfe6e
bring back Ramd
syberia/syberia
R/config.r
R/config.r
.github_packages <- list( list('productivus', 'robertzk'), list('Ramd', 'robertzk'), list('frost', 'robertzk'), list('stagerunner', 'robertzk'), list('mungebitsTransformations', 'robertzk'), list('mungebits', 'robertzk'), list('tundra', 'robertzk') )
.github_packages <- list( list('productivus', 'robertzk'), # list('Ramd', 'robertzk'), list('frost', 'robertzk'), list('stagerunner', 'robertzk'), list('mungebitsTransformations', 'robertzk'), list('mungebits', 'robertzk'), list('tundra', 'robertzk') )
mit
R
2e2e4b85fe697346860505c9cc0fdbb15f3989ca
simplify only 1-col arrays
mschubert/narray,mschubert/narray
R/lambda.r
R/lambda.r
#' Lambda syntax for array iteration #' #' @param fml A call prefixed with a tilde #' @param along A named vector which objects to subset (eg: c(x=1)) #' @param group Not implemented #' @param simplify Return array instead of index+result if scalar #' @param envir Environment where variables can be f...
#' Lambda syntax for array iteration #' #' @param fml A call prefixed with a tilde #' @param along A named vector which objects to subset (eg: c(x=1)) #' @param group Not implemented #' @param simplify Return array instead of index+result if scalar #' @param envir Environment where variables can be f...
apache-2.0
R
cbbf86d2de83dfecad5d383f7f4a4f2da1538405
Update uvoz_tabele3.r
ZavbiA/APPR-2017
uvoz/uvoz_tabele3.r
uvoz/uvoz_tabele3.r
library(rvest) library(gsubfn) library(readr) library(dplyr) # Funkcija, ki uvozi tabele slovenskih medalistov link1 <- "http://www.olympic.si/olimpijski-wiki/olimpijske-igre" stran1 <- html_session(link1) %>% read_html(encoding = "UTF-8") tabele <- stran1 %>% html_nodes(xpath="//div[@id='vsebina259']/...
library(rvest) library(gsubfn) library(readr) library(dplyr) # Funkcija, ki uvozi tabele slovenskih medalistov link1 <- "http://www.olympic.si/olimpijski-wiki/olimpijske-igre" stran1 <- html_session(link1) %>% read_html(encoding = "UTF-8") tabele <- stran1 %>% html_nodes(xpath="//div[@id='vsebina259']/...
mit
R
03a29e86c2a0f19101044883ccf244b90bc5d76f
Move data files to top-level ./.data/ directory
jmousseau/Stain
R/slurm-bash-script.r
R/slurm-bash-script.r
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container, main_file, settings) { private$settings <- settings main_file <- paste...
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container, main_file, settings) { private$settings <- settings main_file <- paste...
mit
R
edc6ff70a7a7956703b902a7ed0849882be59f29
Add GitHub support
steinbaugh/seqcloudr,seqcloud/seqcloudR,steinbaugh/basejump
R/manage_pkg.r
R/manage_pkg.r
manage_bioc <- function(bioc_pkg) { install_bioc_pkg <- bioc_pkg[!(bioc_pkg %in% installed.packages()[, "Package"])] if (length(install_bioc_pkg) > 0) { source("https://bioconductor.org/biocLite.R") biocLite() biocLite(install_bioc_pkg) } invisible(lapply(bioc_pkg, require, character.only = TRUE...
manage_bioc <- function(bioc_pkg) { install_bioc_pkg <- bioc_pkg[!(bioc_pkg %in% installed.packages()[, "Package"])] if (length(install_bioc_pkg) > 0) { source("https://bioconductor.org/biocLite.R") biocLite() biocLite(install_bioc_pkg) } invisible(lapply(bioc_pkg, require, character.only = TRUE...
mit
R
a9034c9208799867cf30e61c7689b3f82539a11c
Use correct assignment operators.
bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adv...
2017/day-20/solution.r
2017/day-20/solution.r
#!/usr/bin/env Rscript data <- readLines("stdin") cleaned <- gsub(" $", "", gsub("^[^0-9-]+", "", gsub("[^0-9-]+", " ", data))) tc <- textConnection(cleaned) input <- read.csv(tc, header=FALSE, sep=" ") close(tc) accs <- rowSums(abs(input[,7:9])) speeds <- rowSums(abs(input[,4:6])) perm <- order(accs, speeds) prin...
#!/usr/bin/env Rscript data <- readLines("stdin") cleaned <- gsub(" $", "", gsub("^[^0-9-]+", "", gsub("[^0-9-]+", " ", data))) tc <- textConnection(cleaned) input <- read.csv(tc, header=FALSE, sep=" ") close(tc) accs <- rowSums(abs(input[,7:9])) speeds <- rowSums(abs(input[,4:6])) perm <- order(accs, speeds) prin...
mit
R
91d7fb3e4fccc0b9c14dc061eea20d935747e5a6
Fix pipeline if only one sample is provided
ewels/NGI-RNAseq,ewels/NGI-RNAseq,ewels/NGI-RNAseq,ewels/NGI-RNAseq,ewels/NGI-RNAseq
bin/salmon_summarizedexperiment.r
bin/salmon_summarizedexperiment.r
#!/usr/bin/env Rscript library(SummarizedExperiment) ## Create SummarizedExperiment (se) object from Salmon counts args = commandArgs(trailingOnly=TRUE) if (length(args) < 2) { stop("Usage: salmon_se.r <coldata> <counts> <tpm>", call.=FALSE) } coldata = args[1] counts_fn = args[2] tpm_fn = args[3] tx2gene = "s...
#!/usr/bin/env Rscript library(SummarizedExperiment) ## Create SummarizedExperiment (se) object from Salmon counts args = commandArgs(trailingOnly=TRUE) if (length(args) < 2) { stop("Usage: salmon_se.r <coldata> <counts> <tpm>", call.=FALSE) } coldata = args[1] counts_fn = args[2] tpm_fn = args[3] tx2gene = "s...
mit
R
9b46e568bba93ec17623bd704f4f2c4dc1410998
Add dependencies to suggestions script
amcat/amcat,amcat/amcat,amcat/amcat,amcat/amcat,amcat/amcat,amcat/amcat
amcat/scripts/query/r_plugins/suggestions.r
amcat/scripts/query/r_plugins/suggestions.r
formfields = djangoFormFields(n = IntegerField(initial=50, required=T)) dependencies = c("corpustools", "knitr") run = function(query, n, ...) { a = get_text(...) library(corpustools) tc = create_tcorpus(a, doc_column = "id") ass = tc$feature_associations(query=query) result = knitr::kable(head(ass, n=n), fo...
formfields = djangoFormFields(n = IntegerField(initial=50, required=T)) run = function(query, n, ...) { depends("corpustools", "knitr") a = get_text(...) library(corpustools) tc = create_tcorpus(a, doc_column = "id") ass = tc$feature_associations(query=query) result = knitr::kable(head(ass, n=n), format="...
agpl-3.0
R
13b51bbec4c6c26dbafccc1166a0a7ddf2c7b00a
add more debugging
snowch/biginsight-examples,snowch/biginsight-examples
examples/BigR/install_packages.r
examples/BigR/install_packages.r
libdir <- Sys.getenv("libdir") debug <- Sys.getenv("debug") quiet=TRUE if (debug) { quiet=FALSE } .libPaths(libdir) # create directory to hold libraries dir.create(libdir) # install libraries install.packages('rJava', repos='http://cran.us.r-project.org', lib=libdir, quiet=quiet) install.packages('base...
libdir <- Sys.getenv("libdir") .libPaths(libdir) # create directory to hold libraries dir.create(libdir) # install libraries install.packages('rJava', repos='http://cran.us.r-project.org', lib=libdir, quiet=TRUE) install.packages('base64enc', repos='http://cran.us.r-project.org', lib=libdir, quiet=TRUE) inst...
apache-2.0
R
48682d2c892a917f02a3131be9737cd176ee635c
write meta file
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/seurat_doublet_finder.r
lib/scRNA/seurat_doublet_finder.r
source("scRNA_func.r") library(dplyr) library(Seurat) library(ggplot2) library(ggpubr) library(DT) library(data.table) library(digest) library(heatmap3) library(cowplot) library(scales) library(stringr) library(htmltools) library(patchwork) library(glmGamPoi) library(DoubletFinder) options(future.globals.maxSize= 107...
source("scRNA_func.r") library(dplyr) library(Seurat) library(ggplot2) library(ggpubr) library(DT) library(data.table) library(digest) library(heatmap3) library(cowplot) library(scales) library(stringr) library(htmltools) library(patchwork) library(glmGamPoi) library(DoubletFinder) options(future.globals.maxSize= 107...
apache-2.0
R
7033a43247e2a63fcdbf96cd91008eec2deda989
use array module for splitting
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
process_args.r
process_args.r
.split = import('../array/split') .ll = import('../base/list') #' @param fun the function to call #' @param ... arguments to vectorise over #' @param const arguments not to vectorise over #' @param export objects to export to computing nodes #' @param get returns ...
.ll = import('base/list') #' @param fun the function to call #' @param ... arguments to vectorise over #' @param const arguments not to vectorise over #' @param export objects to export to computing nodes #' @param get returns the result of the run (default:T) #' ...
apache-2.0
R
7ea5676e7a06bbb79f8c6a623d6953062a1da7aa
Add missing ggplot2 scale primitives
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_font('Roboto') fonts$register_font('Roboto Condensed', 'RobotoCondensed') .theme_basic = theme_minim...
#' 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_font('Roboto') fonts$register_font('Roboto Condensed', 'RobotoCondensed') .theme_basic = theme_minim...
apache-2.0
R
56620932f647a835a3daebe5c169c29833964c4b
Add common slurm setting parameters
jmousseau/Stain
R/slurm-settings.r
R/slurm-settings.r
#' SlurmSettings R6 object. #' #' An interface to SBATCH settings. #' #' @export SlurmSettings <- R6::R6Class("SlurmSettings", public = list( nodes = NA, cpus_per_task = NA, time = NA, memory = NA, initialize = function(nodes = 1, cpus_per_task = 12, ...
#' SlurmSettings R6 object. #' #' An interface to SBATCH settings. #' #' @export SlurmSettings <- R6::R6Class("SlurmSettings")
mit
R
13d46c627b5e7f0219768836b851e1288846e661
Update 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) shinyUI(fluidPage( plotOutput("prvi_graf"), tableOutput("napoved.tabela"), plotOutput("enajsti_graf")))
# 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
224e90df74ab7edcb50e701d89b3ca532f4e157c
Move heatmap code inside a main function.
agapow/smartr,thehyve/naa-SmartR,thehyve/naa-SmartR,thehyve/heim-SmartR,thehyve/naa-SmartR,agapow/smartr,thehyve/heim-SmartR,thehyve/heim-SmartR,thehyve/heim-SmartR,agapow/smartr,agapow/smartr
web-app/HeimScripts/heatmap/run.r
web-app/HeimScripts/heatmap/run.r
library(gplots) main <- function(){ dataset <- loaded_variables[[1]] #dataframe with columns: Row.Label, Bio.marker, ASSAY_0001 ASSAY_0002 ... measurements <- subset(dataset,select=-c(Row.Label,Bio.marker)) # this will select all columns other than Row.Label,Bio.marker columns measurements <- data.matrix(measureme...
library(gplots) dataset <- loaded_variables[[1]] #dataframe with columns: Row.Label, Bio.marker, ASSAY_0001 ASSAY_0002 ... measurements <- subset(dataset,select=-c(Row.Label,Bio.marker)) # this will select all columns other than Row.Label,Bio.marker columns measurements <- data.matrix(measurements) measurements <-...
apache-2.0
R
1032bb6c108e9d6f62159cdccc83e6caee925956
Configure 2015 post season report
PSC-CoTC/PSC-FRAM-Admin,PSC-CoTC/PSC-FRAM-Admin
config/2015_report_config.r
config/2015_report_config.r
run.year <- 2015 post.season.fram.db <- "./fram db/FramVS2-PSC-Coho-Backwards-for 2015.mdb" post.season.run.name <- "bc-bkCoho2015 fw catch queets" post.season.tamm <- "./fram db/coho BK 2015 in process no tami step 3.xlsm" pre.season.fram.db <- "./fram db/CohoFRAMVB2015Pre&PostNew.mdb" pre.season.run.name <- "bc-Co...
run.year <- 2015 post.season.fram.db <- "./fram db/CohoFRAMVB2015Pre&PostNew.mdb" post.season.run.name <- "bkCoho2015Post" post.season.tamm <- "./fram db/Coho1523FinalwAttachCrevised and updated.xlsm" pre.season.fram.db <- "./fram db/CohoFRAMVB2015Pre&PostNew.mdb" pre.season.run.name <- "bc-Coho1523 Final" pre.seaso...
mit
R
fa0a0dcab4e3d723ffecdec2d7b642bf3b42bcaa
Add function for font embedding
klmr/ggplots
fonts.r
fonts.r
create_extrafontdb = function () { extrafontdb_path = function () system.file('metrics', package = 'extrafontdb', mustWork = TRUE) path = try(extrafontdb_path(), silent = TRUE) # If extrafontdb doesn’t exist, this means that the extrafont package isn’t # installed. Reinstalling it will re-crea...
create_extrafontdb = function () { extrafontdb_path = function () system.file('metrics', package = 'extrafontdb', mustWork = TRUE) path = try(extrafontdb_path(), silent = TRUE) # If extrafontdb doesn’t exist, this means that the extrafont package isn’t # installed. Reinstalling it will re-crea...
apache-2.0
R
a7ca3104ca70cfc5a46d2fad3fb778a50735732e
add new test for %then%
TobCap/walkast,TobCap/walkast
tests/testthat/test-then.r
tests/testthat/test-then.r
library(testthat) context("walkast %then%") test_that("walkast %then%", { keep_source <- options()$keep.source options(keep.source = FALSE) on.exit(options(keep.source = keep_source)) add1 <- make_visitor( leaf = function(x) if(is.numeric(x)) x + 1 else x ) mul2 <- make_visitor( leaf...
library(testthat) context("walkast %then%") test_that("walkast %then%", { keep_source <- options()$keep.source options(keep.source = FALSE) on.exit(options(keep.source = keep_source)) add1 <- make_visitor( leaf = function(x) if(is.numeric(x)) x + 1 else x ) mul2 <- make_visitor( leaf...
mit
R
9ac884c54f71318b517bec146bdb7485e2e34ebc
add more debugging
snowch/biginsight-examples,snowch/biginsight-examples
examples/BigR/install_packages.r
examples/BigR/install_packages.r
libdir <- Sys.getenv("libdir") debug <- Sys.getenv("debug") quiet=TRUE if (debug) { quiet=FALSE } .libPaths(libdir) # create directory to hold libraries dir.create(libdir) # install libraries install.packages('rJava', repos='http://cran.us.r-project.org', lib=libdir, quiet=quiet) install.packages('base...
libdir <- Sys.getenv("libdir") debug <- Sys.getenv("debug") quiet=TRUE if (debug) { quiet=FALSE } .libPaths(libdir) # create directory to hold libraries dir.create(libdir) # install libraries install.packages('rJava', repos='http://cran.us.r-project.org', lib=libdir, quiet=quiet) install.packages('base...
apache-2.0
R
3a256b6df311064d6e77a4760986a5674bfed196
Increase number of terms
FTAsr/wordvet,FTAsr/wordvet,FTAsr/wordvet,FTAsr/wordvet
trainGloveModel.r
trainGloveModel.r
args = commandArgs(trailingOnly=TRUE) if (length(args) != 3) { cat("trainGloveModel.R <size> <window> <iters>\n") } else { suppressMessages(library("text2vec")) vectorSize <- as.numeric(args[1]) window <- as.numeric(args[2]) iters <- as.numeric(args[3]) print("started running trainGloveModel.r") text...
args = commandArgs(trailingOnly=TRUE) if (length(args) != 3) { cat("trainGloveModel.R <size> <window> <iters>\n") } else { suppressMessages(library("text2vec")) vectorSize <- as.numeric(args[1]) window <- as.numeric(args[2]) iters <- as.numeric(args[3]) print("started running trainGloveModel.r") text...
apache-2.0
R
60c2ad502ef462a35ba899beb89f5e1af3bdfac8
Support for Plotting WLP added.
felixlindemann/HNUORTools,felixlindemann/HNUORTools
R/01.class.e.HNU.GeoSituation.r
R/01.class.e.HNU.GeoSituation.r
setClass( Class = "HNUGeoSituation", representation=representation( id = "character", label = "character", nodes = "list", links = "list", warehouses = "list", customers = "list", travelcosts = "numeri...
setClass( Class = "HNUGeoSituation", representation=representation( id = "character", label = "character", nodes = "list", links = "list", warehouses = "list", customers = "list", travelcosts = "numeri...
mit
R
32a7ec80317cbfe896ba386760ff651814149058
Support arm64
baku89/glslCanvas4AE,baku89/glslCanvas4AE,baku89/glslCanvas4AE,baku89/glslCanvas4AE
GLSLCanvasPiPL.r
GLSLCanvasPiPL.r
#include "AEConfig.h" #include "AE_EffectVers.h" #ifndef AE_OS_WIN #include <AE_General.r> #endif resource 'PiPL' (16000) { { /* array properties: 12 elements */ /* [1] */ Kind { AEEffect }, /* [2] */ Name { "GLSLCanvas" }, /* [3] */ Category { "Shader" }, #ifdef AE_OS_WIN #ifdef AE_PRO...
#include "AEConfig.h" #include "AE_EffectVers.h" #ifndef AE_OS_WIN #include <AE_General.r> #endif resource 'PiPL' (16000) { { /* array properties: 12 elements */ /* [1] */ Kind { AEEffect }, /* [2] */ Name { "GLSLCanvas" }, /* [3] */ Category { "Shader" }, #ifdef AE_OS_WIN #ifdef AE_PRO...
mit
R
9a5a093e3761c14e876596f764e8e4854689438a
Install slidify
daigotanaka/kawaraban,daigotanaka/kawaraban,daigotanaka/kawaraban,daigotanaka/kawaraban
init.r
init.r
install.packages("devtools", dependencies = TRUE) install.packages("methods", dependencies = TRUE) install.packages("ggplot2", dependencies = TRUE) install.packages("knitr", dependencies = TRUE) install.packages("base64enc", dependencies = TRUE) library(devtools) options(unzip = "internal") install_github('rCharts', 'r...
install.packages("methods", dependencies = TRUE) install.packages("ggplot2", dependencies = TRUE) install.packages("knitr", dependencies = TRUE) install.packages("base64enc", dependencies = TRUE) library(devtools) options(unzip = "internal") install_github("ramnathv/rCharts@dev")
mit
R
beda4161bd6074c8b0aa9bdf08637ad61739131b
Document function
klmr/modules,klmr/modules
R/export_submodule.r
R/export_submodule.r
#' Export a given submodule from the current module #' #' @param submodule character string of length 1 with the name of the submodule #' @note Sometimes, a module may want to export all or some of its submodules in #' bulk. Simply doing \code{import('submodul', attach = TRUE)} won’t work, #' however, since \code{attac...
export_submodule = function (submodule) { parent = parent.frame() module = import(submodule) expose_single = function (symbol) assign(symbol, get(symbol, envir = module), envir = parent) invisible(lapply(ls(module), expose_single)) }
apache-2.0
R
18836f567ac4360f0a35bd1e228b839e0b6bfc85
update testcase.r
skefi/SpatialStress,skefi/SpatialStress
R/testcase.r
R/testcase.r
source("R/functions.r") inittest <- init_landscape(c("+","0","-"), c(0.5,0.4,0.1)) mapping(50,50) summary(inittest) parmstest <- list( del = 0.9, b = 0.8, c_ = 0.2, m0 = 0.05, g = 0.2, r = 0.01, f = 0.9, d = 0.1, protect = 0.5 ) simtest <- ca(inittest, parmstest)
inittest <- init_landscape(c("+","0","-"), c(0.5,0.4,0.1)) mapping(50,50) summary(inittest) parmstest <- list( del = 0.9, b = 0.8, c_ = 0.2, m0 = 0.05, g = 0.2, r = 0.01, f = 0.9, d = 0.1, protect = 0.5 ) simtest <- ca(inittest, parmstest) update_grazing <- function(x_old, parms_temp, delta = 0.2, subs = 10, t...
mit
R
160f3c9a0f10af854b7a79dbbefba87ec0e8fe2f
Update 1.r
glor/R,glor/R
aufgaben/blatt03/1.r
aufgaben/blatt03/1.r
#Blatt 3 #1.1 Datei lokal speichern #1.2 maeuse = read.table(file="mice.txt", sep="t", dec=".", header=TRUE) #1.3 boxplot(maeuse$speed ~ maeuse$health, date = maeuse, main = "kranke Maeuse" ) # Beide Gruppen sind normalverteilt, es gibt keine Aussreisser. (diese wuerden als Punkte ausserhalb der Boxen darge...
#Blatt 3 #1.1 Datei lokal speichern #1.2 maeuse = read.table(file="mice.txt", sep="t", dec=".", header=TRUE) #1.3 boxplot(maeuse$speed ~ maeuse$health, date = maeuse, main = "kranke Maeuse" ) # Beide Gruppen sind normalverteilt, es gibt keine Aussreisser. (diese wuerden als Punkte ausserhalb der Boxen darge...
bsd-2-clause
R
5e28379377a4813db6d2fcfef435020a8299c372
Update 1.r
glor/R,glor/R
aufgaben/blatt09/1.r
aufgaben/blatt09/1.r
#9.1.1 Nein, es ist keine Korrektur erforderlich. #9.1.2 Bei einer initialen Vermutung (die neue Polymerase ist besser/schlechter), bräuchte ich nur zwei Vergleiche durchführen (mit geplanten Kontrasten). (Alt-Polymerase gegen Neu-Polymerasen in Gruppe, dann die Neu-Polymerasen gegeneinander). Bei keiner Vermutung mus...
bsd-2-clause
R
cd1c7094f51c2bd78144808d2c8c7c2d643a6818
add rename functionality
wikimedia-research/Blockr
functions.r
functions.r
# functions.r centralises miscellaneous functions used throughout the Blockr project # # Copyright (c) 2013 Oliver Keyes # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restrict...
# functions.r centralises miscellaneous functions used throughout the Blockr project # # Copyright (c) 2013 Oliver Keyes # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restrict...
mit
R
f1b627b375cb0f90b116a1db5e5c4a070fb069de
set progress bar to 1 when done
XSEDEScienceGateways/TAG,wrathematics/TAG,XSEDEScienceGateways/textgateway,XSEDEScienceGateways/TAG,wrathematics/TAG,XSEDEScienceGateways/textgateway,XSEDEScienceGateways/TAG,wrathematics/TAG,XSEDEScienceGateways/textgateway
inst/tag/shiny/pages/analyse/lda.r
inst/tag/shiny/pages/analyse/lda.r
output$analyse_lda_fit <- renderUI( sidebarLayout( sidebarPanel( h5("Latent Dirichlet Allocation"), sliderInput("lda_ntopics", "Number of Topics", min=1, max=20, value=3), selectizeInput("lda_method", "Method", c("Gibbs", "VEM"), "Gibbs"), actionButton("lda_button_fit", "Fit"), rende...
output$analyse_lda_fit <- renderUI( sidebarLayout( sidebarPanel( h5("Latent Dirichlet Allocation"), sliderInput("lda_ntopics", "Number of Topics", min=1, max=20, value=3), selectizeInput("lda_method", "Method", c("Gibbs", "VEM"), "Gibbs"), actionButton("lda_button_fit", "Fit"), rende...
agpl-3.0
R
de2d8578140ca9c97fb63c518c0f6fbfe3ffdaf2
Update banner
Pointillistic/rebol-lang,Pointillistic/rebol-lang,zsx/r3,zsx/r3,Pointillistic/rebol-lang,Pointillistic/rebol-lang,zsx/r3,zsx/r3
src/mezz/mezz-banner.r
src/mezz/mezz-banner.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Startup Banner" 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/LICENS...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Startup Banner" 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/LICENS...
apache-2.0
R
e113ec361d4f9c6c69cfaa7f1f395d8638234e2c
Fix species name for optimised s values
klmr/codons,klmr/codons
scripts/tai.r
scripts/tai.r
# Based on the paper by Dos Reis & al, 2004 s = list(naive = c(0, 0, 0, 0, 0.5, 0.5, 0.75, 0.5, 0.5, 0.5), ecoli = c(0, 0, 0, 0, 0.41, 0.28, 0.9999, 0.68, 0.89)) # Reverse complement of the anticodons, in the order of anticodons as given in # Figure 1 of dos Reis & al. rc_anticodons = c('TTT', 'TTC', 'TTA', ...
# Based on the paper by Dos Reis & al, 2004 s = list(naive = c(0, 0, 0, 0, 0.5, 0.5, 0.75, 0.5, 0.5, 0.5), human = c(0, 0, 0, 0, 0.41, 0.28, 0.9999, 0.68, 0.89)) # Reverse complement of the anticodons, in the order of anticodons as given in # Figure 1 of dos Reis & al. rc_anticodons = c('TTT', 'TTC', 'TTA', ...
apache-2.0
R
720ce77caf9aff7a594b81bbcd6bd721c79e243b
fix PRINT compilation test
NikolayShubenkovProgSchool/red,vehar/red,vehar/red,rheber/red,rheber/red,iArnold/red,NikolayShubenkovProgSchool/red,iArnold/red,red-eco/red,red-eco/red
red-system/tests/source/compiler/print-test.r
red-system/tests/source/compiler/print-test.r
REBOL [ Title: "Test print function from Red/System programs" File: %print-test.r License: "BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt" ] change-dir %../ ;; revert to tests/ directory from runnable/ ~~~start-file~~~ "print" --test-- "p1" --compile-and-r...
REBOL [ Title: "Test print function from Red/System programs" File: %print-test.r License: "BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt" ] change-dir %../ ;; revert to tests/ directory from runnable/ ~~~start-file~~~ "print" --test-- "p1" --compile-and-r...
bsd-3-clause
R
62130e5eaaed098ba2b821bb055272e761387fee
Update 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 udparm.ao_sovn') #td.stats(a, "Delinquency") #tdClose() #a1 <- as.td.data.frame(a, tableName = "ao_sovn2", d...
#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
b8592591ea702b2f12ead53677bfe603d0bc5940
fix up the plot a bit
rhansen/rpstir,rhansen/rpstir,rhansen/rpstir,rhansen/rpstir,rhansen/rpstir
bin/rpki-statistics/plots/run-times-over-time.r
bin/rpki-statistics/plots/run-times-over-time.r
data <- read.table('run-times-over-time.dat', sep="\t", header=TRUE) data$Start <- as.POSIXlt(read.table('times.dat', sep="\t", header=TRUE)$Start) png('run-times-over-time.png', width=1600, height=1200, pointsize=24) plot(data$Start, data$Duration/60, type="o", main="Combined Fetch and Validation Times", xlab...
data <- read.table('run-times-over-time.dat', sep="\t", header=TRUE) data$Start <- as.POSIXlt(read.table('times.dat', sep="\t", header=TRUE)$Start) png('run-times-over-time.png') plot(data) dev.off()
bsd-3-clause
R
058184685c60ab82a54a7c869bef9ceac2d059ae
Remove trailing slash
berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub,ryanlovett/datahub
deployments/r/image/extras.d/ph-w250fg.r
deployments/r/image/extras.d/ph-w250fg.r
#!/usr/bin/env Rscript # From https://github.com/berkeley-dsep-infra/datahub/issues/881 print("Installing packages for PHW250F+G") source("/tmp/class-libs.R") # dplyr requires 0.2.1...cran only has 0.2.0 print("Installing assertthat...") devtools::install_github('hadley/assertthat', ref='v0.2.1', upgrade_dependencies...
#!/usr/bin/env Rscript # From https://github.com/berkeley-dsep-infra/datahub/issues/881 print("Installing packages for PHW250F+G") source("/tmp/class-libs.R") # dplyr requires 0.2.1...cran only has 0.2.0 print("Installing assertthat...") devtools::install_github('hadley/assertthat', ref='v0.2.1', upgrade_dependencies...
bsd-3-clause
R