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
3a1d99b7f5649e102e3f38278303cd167f684dc8
add main.r
wikimedia-research/Blockr
main.r
main.r
#Blockr - a project to accurately triage data on blocked Wikipedia users, identify #the underlying rationales and test various hypotheses as to any outcome # # @Year = 2013 # @Copyright: Oliver Keyes # @License = MIT (http://opensource.org/licenses/MIT) #Load in query-dependent config variables source(file = file.pat...
#Blockr - a project to accurately triage data on blocked Wikipedia users, identify #the underlying rationales and test various hypotheses as to any outcome # # @Year = 2013 # @Copyright: Oliver Keyes # @License = MIT (http://opensource.org/licenses/MIT) #Load in query-dependent config variables source(file = file.pat...
mit
R
6c7011b7c229c5682acf3b868c5f60885532cfc3
Revert "test"
JerryGuangXu/Spotify-Music-Data-Analysis,JerryGuangXu/Spotify-Music-Data-Analysis,GeorgiaTechGX/Spotify-Music-Data-Analysis,GeorgiaTechGX/Spotify-Music-Data-Analysis
plot.r
plot.r
## scatterplot matrix example p16 = ggplot(data=d,aes(x=album_popularity, y=track_popularity)) + geom_point(col=rgb(0,0,215,5,maxColorValue=255), pch=16) + geom_smooth(method=glm,se=TRUE,size=0.5,color="gold") + theme(panel.background = element_blank()) ## barplot ggplot(data=data, aes(fill=Class, y=Track_Num, x=reor...
## scatterplot matrix exampledddd p16 = ggplot(data=d,aes(x=album_popularity, y=track_popularity)) + geom_point(col=rgb(0,0,215,5,maxColorValue=255), pch=16) + geom_smooth(method=glm,se=TRUE,size=0.5,color="gold") + theme(panel.background = element_blank()) ## barplot ggplot(data=data, aes(fill=Class, y=Track_Num, x=...
mit
R
e3c5b328881def42872de27b949de4072b448092
Add brief description
mrcaps/wikimedia-analysis,mrcaps/wikimedia-analysis,mrcaps/wikimedia-analysis
plot.r
plot.r
#Create some basic summary plots for Wikimedia configuration changes library(plyr) library(ggplot2) library(RColorBrewer) library(grid) library(scales) setwd(dirname(sys.frame(1)$ofile)) theme_update(plot.margin = unit(c(0,0,0,0), "cm")) times = read.csv("times.csv", header=FALSE) times$date = as.Date(as.POSIXlt(tim...
library(plyr) library(ggplot2) library(RColorBrewer) library(grid) library(scales) setwd(dirname(sys.frame(1)$ofile)) theme_update(plot.margin = unit(c(0,0,0,0), "cm")) times = read.csv("times.csv", header=FALSE) times$date = as.Date(as.POSIXlt(times$V1, origin="1970-01-01"), tz="America/New_York") ggplot(times, aes...
bsd-3-clause
R
628bba5c64e66d10c531e54312503390de030ac0
Update sun_data.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/sun_data.r
R/sun_data.r
#' sun_data #' #' Calculate solar parameter for a location and a time. #' #' @param datetime Datetime in format YYYY-MM-DD HH:MM:SS. #' @param numeric lat Latitude in decimal degrees. #' @param numeric lon Longitude in decimal degrees. #' @param character parameter Six solar parameter are available by name "azimuth",...
#' sun_data #' #' Calculate solar parameter for a location and a time. #' #' @param datetime Datetime in format YYYY-MM-DD HH:MM:SS. #' @param numeric lat Latitude in decimal degrees. #' @param numeric lon Longitude in decimal degrees. #' @param character parameter Six solar parameter are available by name "azimuth",...
mit
R
5a05c3a72bf5529050608f313d0198b8ee69da73
correct to optimize calculation
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
c774dcbb4c605b2bfaa1e5dec7c13c500b06fd19
add Rcpp to required packages
OwnYourData/app-template,OwnYourData/app-template
init.r
init.r
# # Example R code to install packages # See http://cran.r-project.org/doc/manuals/R-admin.html#Installing-packages for details # ########################################################### # Update this line with the R packages to install: my_packages = c('Rcpp', 'xml2', 'shiny', ...
# # Example R code to install packages # See http://cran.r-project.org/doc/manuals/R-admin.html#Installing-packages for details # ########################################################### # Update this line with the R packages to install: my_packages = c('shiny', 'shinyBS', 'devtoo...
mit
R
9a9ecb3a93d661d7a90fd87e9b8d683591aa1125
Disable vioplot install.
ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub
deployments/r/image/extras.d/2019-fall-stat-131a.r
deployments/r/image/extras.d/2019-fall-stat-131a.r
#!/usr/bin/env Rscript source("/tmp/class-libs.R") class_name = "2019 Fall Stat 131a" class_libs = c( "alluvial", "0.1-2", "latticeExtra", "0.6-28", "DAAG", "1.22", "faraway", "1.0.7", "fdrtool", "1.2.15", "gpairs", "1.2", "gplots", "3.0.1.1", "hexbin", "1.27.3", "leaps", "2.9", "NMF", "0.21.0", ...
#!/usr/bin/env Rscript source("/tmp/class-libs.R") class_name = "2019 Fall Stat 131a" class_libs = c( "alluvial", "0.1-2", "latticeExtra", "0.6-28", "DAAG", "1.22", "faraway", "1.0.7", "fdrtool", "1.2.15", "gpairs", "1.2", "gplots", "3.0.1.1", "hexbin", "1.27.3", "leaps", "2.9", "NMF", "0.21.0", ...
bsd-3-clause
R
77d6e995baade6cf63e47f5359442771954d9d5a
Update zzz.r
syberia/syberia
R/zzz.r
R/zzz.r
.onAttach <- function(...) { load_github_packages(.github_packages) if (!exists('run')) makeActiveBinding('run', function() build_model, .GlobalEnv) }
.onAttach <- function(...) { load_github_packages(.github_packages) makeActiveBinding('run', function() build_model, .GlobalEnv) }
mit
R
7abf56f8b3f60820ef5075f1d772b03bae8f67ec
fix arg, list name
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
tests/testthat/test-proxy.r
tests/testthat/test-proxy.r
context("proxy") test_that("control flow", { skip_on_os("windows") # prerequesites context = rzmq::init.context() socket = rzmq::init.socket(context, "ZMQ_REP") port = bind_avail(socket, 50000:55000) Sys.sleep(0.5) common_data = list(fun = function(x) x*2, const=list(), export=list(), seed...
context("proxy") test_that("control flow", { skip_on_os("windows") # prerequesites context = rzmq::init.context() socket = rzmq::init.socket(context, "ZMQ_REP") port = bind_avail(socket, 50000:55000) Sys.sleep(0.5) common_data = list(fun = function(x) x*2, const=list(), export=list(), seed...
apache-2.0
R
356858e12eafd3c340b06a4ab64ac93f2eb3e2ef
Create auth_public.r
GalDrnovsek/Fuzbal
auth_public.r
auth_public.r
db = 'sem2017_janp' host = 'baza.fmf.uni-lj.si' user = 'javnost' password = 'javnogeslo' db = 'sem2017_gald' host = 'baza.fmf.uni-lj.si' user = 'javnost' password = 'javnogeslo' db = 'sem2017_zant' host = 'baza.fmf.uni-lj.si' user = 'javnost' password = 'javnogeslo'
db = 'sem2017_janp' host = 'baza.fmf.uni-lj.si' user = 'javnost' password = 'javnogeslo'
mit
R
3482364ab50713a199ce9c9f34a520e552e2949e
update tiles info
khufkens/daymetr
R/data.r
R/data.r
#' tile_outlines #' #' Large simple feature collection containing the outlines of all the #' Daymet tiles available as well as projection information. This data #' was converted from a shapefile as provided on the Daymet main website. #' #' @format SpatialPolygonDataFrame #' \describe{ #' \item{TileID}{tile ID numb...
#' tile_outlines #' #' Large SpatialPolygonDataFrame containing the outlines of all the #' Daymet tiles available as well as projection information. This data #' was converted from a shapefile as provided on the Daymet main website. #' #' @format SpatialPolygonDataFrame #' \describe{ #' \item{TileID}{tile ID number...
agpl-3.0
R
b82cb6ea04f9cc239d3fd26d70bb5bec0f1ff1d2
Update slavicreview.r
YaleDHLab/lab-workshops,YaleDHLab/lab-workshops,YaleDHLab/lab-workshops,YaleDHLab/lab-workshops,YaleDHLab/lab-workshops
rstudio_dfrtopics/slavicreview.r
rstudio_dfrtopics/slavicreview.r
# download: https://yale.box.com/s/icu69vs2m7ygww38lor7d3laoibpfk6x #Create a new project in the folder that has the JSTOR data. install.packages("devtools") library(devtools) install_github("agoldst/dfrtopics") install.packages("dplyr") install.packages("ggplot2") install.packages("lubridate") install.packages("stri...
# download: https://yale.box.com/s/icu69vs2m7ygww38lor7d3laoibpfk6x #Create a new project in the folder that has the JSTOR data. install.packages("devtools") install_github("agoldst/dfrtopics") install.packages("dplyr") install.packages("ggplot2") install.packages("lubridate") install.packages("stringr") install.pack...
mit
R
ba1b4e01898108de79645f0b285ecdc143d17257
Update slavicreview.r
YaleDHLab/lab-workshops,YaleDHLab/lab-workshops,YaleDHLab/lab-workshops,YaleDHLab/lab-workshops,YaleDHLab/lab-workshops
rstudio_dfrtopics/slavicreview.r
rstudio_dfrtopics/slavicreview.r
# download: https://yale.box.com/s/icu69vs2m7ygww38lor7d3laoibpfk6x #Create a new project in the folder that has the JSTOR data. install.packages("devtools") install_github("agoldst/dfrtopics") install.packages("dplyr") install.packages("ggplot2") install.packages("lubridate") install.packages("stringr") install.pack...
#Create a new project in the folder that has the JSTOR data. install.packages("devtools") install_github("agoldst/dfrtopics") install.packages("dplyr") install.packages("ggplot2") install.packages("lubridate") install.packages("stringr") install.packages("rJava") install.packages("mallet") library(devtools) options...
mit
R
a4d94d17fcca1f02fe34895ae9031150793515ce
Update module cache documentation
klmr/modules,klmr/modules
R/module_cache.r
R/module_cache.r
#' Environment of loaded modules #' #' Each module is stored as an environment inside \code{.loaded_modules} with #' the module’s code location path as its identifier. The path rather than the #' module name is used because module names are not unique: two modules called #' \code{a} can exist nested inside modules \cod...
#' Environment of loaded modules #' #' Each module is stored as an environment inside \code{.loaded_modules} with #' the module’s code location path as its identifier. The path rather than the #' module name is used because module names are not unique: two modules called #' \code{a} can exist nested inside modules \cod...
apache-2.0
R
57193474579d404f25590713089fd17a8aae75bc
Update documents.
snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3
q3/docs/NewFunction.rd
q3/docs/NewFunction.rd
=begin =@New Boolean @New() == U蕪gpĐU蕪ɁAReLXgbZ[WVbZ[W̏ꍇTrueAȊȌꍇɂFalseԂ܂BȊO̎Ɏgpꂽꍇɂ͏FalseԂ܂BU蕪Ŋ̃bZ[WU蕪ݒ̏ꍇɁÅ֐gp邱ƂŐVbZ[Wǂ𔻒f邱Ƃł܂B == Ȃ ==G[ *̐ĂȂꍇ == Ȃ == # VbZ[W @New() # ̃bZ[W @Not(@New()) =end
=begin =@New Boolean @New() == U蕪ŐU蕪ŃReLXgbZ[WVbZ[W̏ꍇTrueAȊȌꍇɂFalseԂ܂BU蕪Ŋ̃bZ[WU蕪ݒ̏ꍇɁÅ֐gp邱ƂŐVbZ[Wǂ𔻒f邱Ƃł܂B == Ȃ ==G[ *̐ĂȂꍇ == Ȃ == # VbZ[Wǂׂ @New() =end
mit
R
c827073ddae9b67dc1fd4b4c2ef1c2a0a9194162
Fix mistakes with renaming dtm in load()-function
HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core
hybra/analysis/topicmodel/create_topics.r
hybra/analysis/topicmodel/create_topics.r
source('topics.r') ##source('stm.r') args <- commandArgs(trailingOnly = TRUE) dtm_path <- args[1] if( ! grepl( '.rdata', dtm_path ) ) { dtm_path <- paste( dtm, 'dtm.rdata', sep='' ) } load( dtm_path ) k <- as.integer( args[2] ) model <- create_model( dtm , k ) path <- paste( dtm_path , 'topic-', args[2], '.rd...
source('topics.r') ##source('stm.r') args <- commandArgs(trailingOnly = TRUE) dtm <- args[1] if( ! grepl( '.rdata', dtm ) ) { dtm <- paste( dtm, 'dtm.rdata', sep='' ) } load( dtm ) k <- as.integer( args[2] ) model <- create_model( dtm , k ) path <- paste( dtm , '/topic-', args[2], '.rdata' , sep = '' ) save( ...
mit
R
55d76f43e82a2e09b195f7d19b3d7eeec9793b90
Update 2013_PR_config.r
PSC-CoTC/PSC-FRAM-Admin,PSC-CoTC/PSC-FRAM-Admin
config/2013_PR_config.r
config/2013_PR_config.r
#note: here "pre.season" means "original BK post-season" for the Periodic Report comparison tables run.year <- 2013 post.season.fram.db <- "./fram db/PeriodicReportdb/FramVS2-PSC-Coho-Backwards-redo 2010-2016 January 2019 products.mdb" post.season.run.name <- "bc-bkCoho2013 step 3" post.season.tamm <- "./fram db/Perio...
run.year <- 2013 post.season.fram.db <- "./fram db/PeriodicReportdb/FramVS2-PSC-Coho-Backwards-redo 2010-2016 January 2019 products.mdb" post.season.run.name <- "bc-bkCoho2013 step 3" post.season.tamm <- "./fram db/PeriodicReportdb/updated2010-2016TAMMfiles/BK 2013 January 2019 redo step 3.xlsm" post.season.tamm.fish...
mit
R
828a96417ee339074c6ea55c3c3a81a25528ffd2
Add the new metric 'virtual-screen-size to doc
giuliolunati/ren-c,codebybrett/ren-c,kealist/ren-c,rgchris/ren-c,rgchris/ren-c,codebybrett/ren-c,rgchris/ren-c,draegtun/ren-c,codebybrett/ren-c,rgchris/ren-c,giuliolunati/ren-c,hostilefork/rebol,hostilefork/rebol,mbk/ren-c,draegtun/ren-c,draegtun/ren-c,kealist/ren-c,hostilefork/rebol,kealist/ren-c,codebybrett/ren-c,giu...
src/boot/graphics.r
src/boot/graphics.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL Graphics" Author: ["Richard Smolak" "Carl Sassenrath"] Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies Additional code modifications and improvements Copyright 2012 Saphirion AG ...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL Graphics" Author: ["Richard Smolak" "Carl Sassenrath"] Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies Additional code modifications and improvements Copyright 2012 Saphirion AG ...
apache-2.0
R
be5c2f6574d4d73265bd062ca46e0e610e061090
use get_dim_plot
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/seurat_group_umap.r
lib/scRNA/seurat_group_umap.r
rm(list=ls()) outFile='AK6383' parSampleFile1='fileList1.txt' parSampleFile2='' parSampleFile3='' parFile1='C:/projects/nobackup/kirabo_lab/shengq2/20220506_6383_scRNA_human/seurat_merge_03_choose_res/result/AK6383.final.rds' parFile2='' parFile3='' setwd('C:/projects/nobackup/kirabo_lab/shengq2/20220506_6383_scRNA_...
rm(list=ls()) outFile='AK6383' parSampleFile1='fileList1.txt' parSampleFile2='' parSampleFile3='' parFile1='C:/projects/nobackup/kirabo_lab/shengq2/20220506_6383_scRNA_human/seurat_merge_03_choose_res/result/AK6383.final.rds' parFile2='' parFile3='' setwd('C:/projects/nobackup/kirabo_lab/shengq2/20220506_6383_scRNA_...
apache-2.0
R
5cbe21f1db413c853b692f15644f0b615f5e96a0
Fix the variable names for usr and sys max times
fpavageau/poor-man-pidstat,fpavageau/poor-man-pidstat
pmtimes.r
pmtimes.r
#!/usr/bin/env r # Copyright 2014 Frank Pavageau # # 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 required by applicable law or...
#!/usr/bin/env r # Copyright 2014 Frank Pavageau # # 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 required by applicable law or...
apache-2.0
R
9b9f7c464da352b6ba010d1c880d881bdaeed577
Update 2016_PR_config.r
PSC-CoTC/PSC-FRAM-Admin,PSC-CoTC/PSC-FRAM-Admin
config/2016_PR_config.r
config/2016_PR_config.r
#note: here "pre.season" means "original BK post-season" for the Periodic Report comparison tables run.year <- 2016 post.season.fram.db <- "./fram db/PeriodicReportdb/FramVS2-PSC-Coho-Backwards-redo 2010-2016 January 2019 products.mdb" post.season.run.name <- "bc-bkCoho2016 step 2" post.season.tamm <- "./fram db/...
run.year <- 2016 post.season.fram.db <- "./fram db/PeriodicReportdb/FramVS2-PSC-Coho-Backwards-redo 2010-2016 January 2019 products.mdb" post.season.run.name <- "bc-bkCoho2016 step 2" post.season.tamm <- "./fram db/PeriodicReportdb/updated2010-2016TAMMfiles/BK 2016 January 2019 redo.xlsm" post.season.tamm.fishe...
mit
R
2c593fc65a7debfae12a6723cb2d3a07ffd41a9e
Fix bug in GSEA DE
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
2c031551fc49828983a58d1dcc18d7c076c9ad84
add dbh to output dataframe
benquist/Peru_Analyses,benquist/Peru_Analyses
per_tree_chem.r
per_tree_chem.r
library(gemtraits) con = connect_gemtraits_db() photosyn = get_photosyn(con) library(plyr) per_tree_chem = ddply(photosyn, .(tree_id), summarize, mean_c_percent = mean(c_percent, na.rm = T), mean_n_percent = mean(n_percent, na.rm = T), ...
library(gemtraits) con = connect_gemtraits_db() photosyn = get_photosyn(con) library(plyr) per_tree_chem = ddply(photosyn, .(tree_id), summarize, mean_c_percent = mean(c_percent, na.rm = T), mean_n_percent = mean(n_percent, na.rm = T))
mit
R
640cfc1808af24a78da7994b48996ec4705636a2
scale essential genes
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/seurat_harmony.r
lib/scRNA/seurat_harmony.r
library(dplyr) library(Seurat) library(ggplot2) library(ggpubr) library(DT) library(data.table) library(cowplot) library(scales) library(stringr) library(harmony) library(patchwork) require(data.table) options(future.globals.maxSize= 10779361280) random.seed=20200107 options_table<-read.table(parSampleFile1, sep="\t"...
library(dplyr) library(Seurat) library(ggplot2) library(ggpubr) library(DT) library(data.table) library(cowplot) library(scales) library(stringr) library(harmony) library(patchwork) require(data.table) options(future.globals.maxSize= 10779361280) random.seed=20200107 options_table<-read.table(parSampleFile1, sep="\t"...
apache-2.0
R
3069f7a5c43e2787da696c7302f6247e1f7b3c08
Update mtcars.r
bgweber/RServer,bgweber/RServer,bgweber/RServer,bgweber/RServer
tasks/userDemo/mtcars.r
tasks/userDemo/mtcars.r
str(mtcars) print("Sleeping for 15 seconds") Sys.sleep(15) print("Saving RData file") dir.create("/var/www/html/RServer/reports/mtcars") save(mtcars, file = "/var/www/html/RServer/reports/mtcars/mtcars.RData") fit <- lm(mpg~am + wt + hp, data = mtcars) summary(fit) print("Saving Model") Sys.sleep(10) save(fit, ...
str(mtcars) print("Sleeping for 20 seconds") Sys.sleep(15) print("Saving RData file") dir.create("/var/www/html/RServer/reports/mtcars") save(mtcars, file = "/var/www/html/RServer/reports/mtcars/mtcars.RData") fit <- lm(mpg~am + wt + hp, data = mtcars) summary(fit) print("Saving Model") Sys.sleep(10) save(fit, ...
bsd-3-clause
R
6436d90ba31dadad613758a84faaf7527b028339
Update BlankFilter.r
phnmnl/workflow-demo,phnmnl/workflow-demo,phnmnl/workflow-demo,phnmnl/workflow-demo
BlankFilter/BlankFilter.r
BlankFilter/BlankFilter.r
AdvancedBlankFilter <- function(blanks, samples, cutoff) { blanks[is.na(blanks)] <- 0 samples[is.na(samples)] <- 0 blanks <- apply(blanks,1,median,na.rm=TRUE) samples <- apply(samples,1,max,na.rm=TRUE) to.remove <- which(blanks/samples >= cutoff) return(to.remove) } ###################### # ...
AdvancedBlankFilter <- function(blanks, samples, cutoff) { blanks[is.na(blanks)] <- 0 samples[is.na(samples)] <- 0 blanks <- apply(blanks,1,median,na.rm=TRUE) samples <- apply(samples,1,max,na.rm=TRUE) to.remove <- which(blanks/samples >= cutoff) return(to.remove) } ###################### # ...
apache-2.0
R
70f0e132e9fee7d53448d95c33f3b1b5f4b08071
Add articles optino to create codingjob
amcat/amcat-r
R/coding.r
R/coding.r
#' Create a new codingjob #' @param conn the connection object from \code{\link{amcat.connect}} #' @param project the project to add the articles to #' @param articleset the article set id of an existing set, or the name of a new set to create #' @param articlesarticle IDs to be added to this coding job. Ignored if art...
#' Create a new codingjob #' @param conn the connection object from \code{\link{amcat.connect}} #' @param project the project to add the articles to #' @param articleset the article set id of an existing set, or the name of a new set to create #' @param coder the ID of the coder to assign the job to #' @param articlesc...
mit
R
a629326172e914dbccee16d6850c48f68da2bb31
add tests for overlay
kirillseva/stagerunner,syberia/stagerunner,robertzk/stagerunner,davluangu/stagerunner,davluangu/stagerunner,syberia/stagerunner,robertzk/stagerunner
inst/tests/test-overlay.r
inst/tests/test-overlay.r
context('stageRunner overlaying') test_that('it can overlay a simple example correctly', { sr1 <- stageRunner$new(cx <- new.env(), list(a = function(x) x$x <- 1, b = function(y) x$x <- 3)) sr2 <- stageRunner$new(cx, list(a = function(y) y$x <- 2)) sr1$overlay(sr2) sr1$run(1) expect_identical(cx$x, 2) # Ch...
context('stageRunner overlaying') test_that('it can overlay a complicated example correctly', { #sr1 <- stageRunner$new(cx <- new.env(), list(c = function(x) x$x <- -1, a = function(x) { x$x <- 1; cat('setting x'); }, b = function(x) { x$x <- 2; cat('setting x to 2') }), remember = T) #sr2 <- stageRunner$new(cx, l...
mit
R
37d5164f57ff81adc4ba727b8e55cd4e350ba8c3
Use sparse matrix to solve scale challenges.
HIIT/digivaalit-2015,HIIT/digivaalit-2015,HIIT/digivaalit-2015
topics/topics.r
topics/topics.r
create_dtm <- function( path ) { library(tm) library(Matrix) 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 <-Docum...
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
a67de282746b7802124813f9413fa52cebd70cd3
improve analyze-hydra-builds.r
Fuuzetsu/cabal2nix,bennofs/cabal2nix
doc/analyze-hydra-builds.r
doc/analyze-hydra-builds.r
# cabal2nix/doc/analyze-hydra-builds.r # # Generate the input file "builds.csv" by running # # sudo -u hydra psql -c "Copy (select b.project, b.jobset, b.job, b.timestamp, b.drvpath, b.system, b.buildstatus, b.size, b.closuresize, bs.type, bs.starttime, bs.stoptime, bs.machine from builds b left join buildsteps bs ...
# cabal2nix/doc/analyze-hydra-builds.r # # Generate the input file "builds.csv" by running # # sudo -u hydra psql -c "Copy (select * from Builds) to stdout With CSV HEADER;" >builds.csv # # on Hydra. library(data.table) builds <- within(as.data.table(read.csv("builds.csv", header=T, stringsAsFactors=F)), { ti...
bsd-3-clause
R
6f3c177f9d903b5e4b89a8763c67207a5911d97c
Remove delay from rulemsiservermonperf so msi is tested
PaulVanSchayck/irods,PaulVanSchayck/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,PaulVanSchayck/irods,janiheikkinen/irods,janiheikkinen/irods,janiheikkinen/irods,janiheikkinen/irods,PaulVanSchayck...
iRODS/clients/icommands/test/rules3.0/rulemsiServerMonPerf.r
iRODS/clients/icommands/test/rules3.0/rulemsiServerMonPerf.r
acServerMonPerf { #This microservice invokes a command in iRODS/server/bin/cmd # irodsServerMonPerf - a perl script to get monitoring information msiServerMonPerf("default","default"); msiServerMonPerf("verbose","default"); } INPUT null OUTPUT ruleExecOut
acServerMonPerf { #This microservice invokes a command in iRODS/server/bin/cmd # irodsServerMonPerf - a perl script to get monitoring information delay("<PLUSET>30s</PLUSET>< EF>1h</EF>") { msiServerMonPerf("default","default"); } } INPUT null OUTPUT ruleExecOut
bsd-3-clause
R
531c184cb5dbdcdf45bda2f0fd4ebe230d8945fd
Update tglob_sphere.r
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
6b098785d980e53576537da63742a55d1fb5ff56
Update windspeed.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/windspeed.r
R/windspeed.r
#' windspeed #' #' @description Calculate meteorological wind speed. #' #' @param u numeric U zonal component #' @param v numeric V meridian component #' @return #' #' @references Istituto di Biometeorologia Firenze Italy. #' @author Alfonso crisci \email{a.crisci@@ibimet.cnr.it} Marco Morabito \email{m.morabito@@...
#' windspeed #' #' @description Calculate meteorological wind speed. #' #' @param u numeric U zonal component #' @param v numeric V meridian component #' @return #' #' @references Istituto di Biometeorologia Firenze Italy. #' @author Alfonso crisci \email{a.crisci@@ibimet.cnr.it} Marco Morabito \email{m.morabito@@...
mit
R
65a6dd85762f0e4a04a1c03ca3bfe108afc20c49
fix bug
syberia/syberia
R/import_stage.r
R/import_stage.r
#' Import data stage for Syberia model process. #' #' @param modelenv an environment. The current modeling environment. #' @param import_options a list. The available import options. Will differ #' depending on the adapter. (default is file adapter) #' @export import_stage <- function(modelenv, import_options) { #...
#' Import data stage for Syberia model process. #' #' @param modelenv an environment. The current modeling environment. #' @param import_options a list. The available import options. Will differ #' depending on the adapter. (default is file adapter) #' @export import_stage <- function(modelenv, import_options) { #...
mit
R
bb535d378ef9335a89d11b6368ab8240c7b18f36
add unvotes
berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub
deployments/datahub/images/default/r-packages/stat-20.r
deployments/datahub/images/default/r-packages/stat-20.r
#!/usr/bin/env Rscript print("Installing packages for stat-20") source("/tmp/class-libs.R") class_name = "stat-20" class_libs = c( "tidycensus", "1.0", "openintro", "2.0.0", "infer", "1.0.0", "patchwork", "1.1.1", "tigris", "1.0", "googlesheets4", "0.2.0", "xaringanthemer", "0.4.0", "...
#!/usr/bin/env Rscript print("Installing packages for stat-20") source("/tmp/class-libs.R") class_name = "stat-20" class_libs = c( "tidycensus", "1.0", "openintro", "2.0.0", "infer", "1.0.0", "patchwork", "1.1.1", "tigris", "1.0", "googlesheets4", "0.2.0", "xaringanthemer", "0.4.0", "...
bsd-3-clause
R
84b51dc2236ed7f5a5f5d0aa3b7a3589980868cd
add text and remove custom function
hansthompson/shiny-server,hansthompson/shiny-server,hansthompson/shiny-server
CannabisRetailZoning/App.r
CannabisRetailZoning/App.r
library(rgeos) library(rgdal) library(leaflet) library(geojsonio) load("map.rda") ui <- bootstrapPage(title = "Cannabis Cafe Zoning", tags$head(includeScript("google-analytics.js")), tags$style(type = "text/css", "html, body {width:100%;height:100%}"), leafletOutput("map", width = "100%", height = "100%")...
library(rgeos) library(rgdal) library(leaflet) load("map.rda") spToGeoJSON <- function(x){ tf<-tempfile() writeOGR(x, tf,layer = "geojson", driver = "GeoJSON") js <- paste(readLines(tf), collapse=" ") file.remove(tf) return(js) } ui <- bootstrapPage( tags$head(includeScript("google-analytics.js")), ...
mit
R
09adf6547dfcb85efb84296498b531c10ffffabe
Fix for ARM
Pointillistic/rebol-lang,Pointillistic/rebol-lang,zsx/r3,Pointillistic/rebol-lang,Pointillistic/rebol-lang,zsx/r3,zsx/r3,zsx/r3
make/tests/qsort.r
make/tests/qsort.r
REBOL [] recycle/torture f: func [ a [integer!] "pointer to an integer" b [integer!] "pointer to an integer" ][ i: make struct! compose/deep [ [raw-memory: (a)] int32 i ] j: make struct! compose/deep [ [raw-memory: (b)] int32 i ] case [ i/i = j/i [0...
REBOL [] recycle/torture f: func [ a [integer!] "pointer to an integer" b [integer!] "pointer to an integer" ][ i: make struct! compose/deep [ [raw-memory: (a)] int32 i ] j: make struct! compose/deep [ [raw-memory: (b)] int32 i ] case [ i/i = j/i [0...
apache-2.0
R
c1214f211e518a8d99364650dc04ffdae3d6c67d
Convert date times to POSIXct
IndyActuaries/epic-fhir,IndyActuaries/epic-fhir
r/load_data.r
r/load_data.r
#' ## Code Owners: Kyle Baird, Shea Parkes #' #' ### Objective: #' * Load the data for analytics into native R data structures so it is easy to work with #' #' ### Developer Notes: #' * <none> path.dir.source <- '../data/' #' ## LIBRARIES, LOCATIONS, LITERALS, ETC. GO ABOVE HERE df.labs <- read.csv( paste0(p...
#' ## Code Owners: Kyle Baird, Shea Parkes #' #' ### Objective: #' * Load the data for analytics into native R data structures so it is easy to work with #' #' ### Developer Notes: #' * <none> path.dir.source <- '../data/' #' ## LIBRARIES, LOCATIONS, LITERALS, ETC. GO ABOVE HERE df.labs <- read.csv( paste0(p...
mit
R
d81abf05f2b38ff4e924b34bcc6a9c515259455f
remove duplication
robertzk/s3mpi
R/s3read.r
R/s3read.r
#' Read an R object in S3 by key #' #' Any type of object that can be serialized as an RDS file #' is capable of being stored using this interface. #' #' @param name character. The key to grab from S3. #' @param .path. The location of your S3 bucket. #' @param cache logical. If true, use the local s3cache if available...
#' Read an R object in S3 by key #' #' Any type of object that can be serialized as an RDS file #' is capable of being stored using this interface. #' #' @param name character. The key to grab from S3. #' @param .path. The location of your S3 bucket. #' @param cache logical. If true, use the local s3cache if available...
mit
R
96894fb35ba768446ca32b7d44e6be74dc8cd161
Update CalcAlleleDiffs.r
wbooker/PloidyPal
R/CalcAlleleDiffs.r
R/CalcAlleleDiffs.r
#' @export CalcAlleleDiffs <- function(f){ infoTable <- as.matrix(read.csv(f, header=TRUE)) BEG1 <- as.numeric(infoTable[1,2]) END1 <- as.numeric(infoTable[2,2]) str1 <- toString(infoTable[4,2]) for(j in BEG1:END1){ filePath <- paste(c(str1,"/I",j,"/I",j,"_allelesFromPost_4.txt"), collapse = ""...
#' @export CalcAlleleDiffs <- function(f){ infoTable <- as.matrix(read.csv(f, header=TRUE)) BEG1 <- as.numeric(infoTable[1,2]) END1 <- as.numeric(infoTable[2,2]) str1 <- toString(infoTable[4,2]) for(j in BEG1:END1){ filePath <- paste(c(str1,"/I",j,"/I",j,"_allelesFromPost_4.txt"), collapse = ""...
mit
R
7e90a2a4fa714fa056a837e6b73d75a91fe84eba
save rds for chipqc
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/QC/ChipseqQC.r
lib/QC/ChipseqQC.r
options(bitmapType='cairo') options(expressions=102400) args = commandArgs(trailingOnly = TRUE) library(ChIPQC) library(BiocParallel) if(length(args) > 0){ configFile=args[1] annotationName=args[2] chromosomes=args[3] }else{ configFile=r"(C:\projects\jonathan_brown\20210321_cutrun_6048_human\macs2callpeak_na...
options(bitmapType='cairo') options(expressions=102400) args = commandArgs(trailingOnly = TRUE) library(ChIPQC) library(BiocParallel) if(length(args) > 0){ configFile=args[1] annotationName=args[2] chromosomes=args[3] }else{ configFile=r"(C:\projects\jonathan_brown\20210321_cutrun_6048_human\macs2callpeak_na...
apache-2.0
R
ab3746193d502d91589ac4ed09951421134ea745
update demo code
GilbertWatson/itsd-demo-project
mutliprocessingdemo.r
mutliprocessingdemo.r
require(snowfall) #make some fake data x <- data.frame(one = sample(x = seq(1, 100, 1),size = 2000000, replace = T), two = sample(x = seq(1, 100, 1),size = 2000000, replace = T), three = sample(x = seq(1, 100, 1),size = 2000000, replace = T), four = sample(x = seq(1, 100...
require(snowfall) #make some fake data x <- data.frame(one = sample(x = seq(1, 100, 1),size = 2000, replace = T), two = sample(x = seq(1, 100, 1),size = 2000, replace = T), three = sample(x = seq(1, 100, 1),size = 2000, replace = T), four = sample(x = seq(1, 100, 1),size...
mit
R
aac27a9352becc76ce02d641648ea0ab89b70de6
Fix instance where a vector might be used in an if clause
matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo
web/problems/templates/r/library.r
web/problems/templates/r/library.r
{% load i18n %}.error <- FALSE .errfun <- function(e) { warning(e) .error <<- TRUE } tryCatch({ library(rjson) }, error = .errfun) tryCatch({ library(httr) }, error = .errfun) if (.error) { stop("{% trans 'Required libraries are unavailable. Please make sure that rjson and httr are available.' %}")...
{% load i18n %}.error <- FALSE .errfun <- function(e) { warning(e) .error <<- TRUE } tryCatch({ library(rjson) }, error = .errfun) tryCatch({ library(httr) }, error = .errfun) if (.error) { stop("{% trans 'Required libraries are unavailable. Please make sure that rjson and httr are available.' %}")...
agpl-3.0
R
973c83c6d927e0c7d1743bde851bd92aaa509cf5
Add further path testing helper
klmr/modules,klmr/modules
inst/tests/helper-paths.r
inst/tests/helper-paths.r
#' Compute normalized logical paths #' #' \code{realpath(path)} will return the normalized logical path for #' \code{path}, similar to \code{normalizePath} but working correctly for #' nonexistent paths on Unix systems. #' @param path a character vector of paths #' @note This function doesn’t work with paths containing...
#' Compute normalized logical paths #' #' \code{realpath(path)} will return the normalized logical path for #' \code{path}, similar to \code{normalizePath} but working correctly for #' nonexistent paths on Unix systems. #' @param path a character vector of paths #' @note This function doesn’t work with paths containing...
apache-2.0
R
955f79a7fc6c9ef0aa3533495bb7baa6615b5250
add evaluation of similarity between resources based on set of consumers
david-beauchesne/Predict_interactions
Script/1-Similarity_matrix.r
Script/1-Similarity_matrix.r
# ----------------------------------------------------------------------------- # PROJECT: # Evaluating the structure of the communities of the estuary # and gulf of St.Lawrence # ----------------------------------------------------------------------------- # -----------------------------------------------------...
# ----------------------------------------------------------------------------- # PROJECT: # Evaluating the structure of the communities of the estuary # and gulf of St.Lawrence # ----------------------------------------------------------------------------- # -----------------------------------------------------...
mit
R
88893b7d4bdba03ef93491678ef1d5bd0322da34
Update Corselect_Perch.r
awhitten/corselect
Examples/Corselect_Perch.r
Examples/Corselect_Perch.r
################################################################################################ # # Corselect.r - Simultaneous estimation of selectivity parameters for Gillnets & Cormorants # Application to European Perch Data from Curonian Lagoon, Lithuania # # by Athol Whitten (awhitten@gmail.com) # Melbourne, A...
################################################################################################ # # Corselect.r - Simultaneous estimation of selectivity parameters for Gillnets & Cormorants # Application to European Perch Data from Curonian Lagoon, Lithuania # # by Athol Whitten (awhitten@gmail.com) # Melbourne, A...
bsd-2-clause
R
2322f1d7d467d7555ea56a029b9ea99c0c5ffbac
Update clomax_7730.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/clomax_7730.r
R/clomax_7730.r
#' clomax_7730 #' #' Calculate maximal clothing insulation value needed for thermal comfort 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. ...
#' clomax_7730 #' #' Calculate maximal clothing insulation value needed for thermal comfort 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. ...
mit
R
80f818bc63b50b0b46e78872231b1178e93e1ccb
Fix multivariate sim code.
jtobin/bnp
finite-gaussian-mixture/src/simulation_multivariate.r
finite-gaussian-mixture/src/simulation_multivariate.r
require(ggplot2) require(reshape2) require(scatterplot3d) source('fmm_multivariate_generative.r') # 2d config = list( k = 4 , l = rep(0, 2) , r = diag(0.05, 2) , b = 2 , w = diag(1, 2) , n = 10000 ) set.seed(42) d = model( config$k, config$l, config$r , config$b, config$w, config$n ) frame...
require(ggplot2) require(reshape2) require(scatterplot3d) source('fmm_multivariate_generative.r') # 2d config = list( m = 2 , v = 2 , k = 4 , n = 10000 ) set.seed(42) d = model(config$m, config$k, config$v, config$n) framed = lapply(d, function(mat) { data.frame(x = mat[,1], y = mat[,2]) }) melted...
mit
R
e459985b72c44719cb985372385a6c8bf97b6e87
Update vivo.query.r
mconlon17/vivo-r,mconlon17/vivo-r
sparql/vivo.query.r
sparql/vivo.query.r
vivo.query <- function(query, endpoint= 'http://localhost:8080/vivo/api/sparqlQuery', email= 'vivo_root@school.edu', password= '*******', format="tsv", ns = c( "rdf","<http://www.w3.org/1999/02/22-rdf-syntax-ns#>", "rdfs","<http://www.w3.org/2000/01/rdf-schema#>", "xsd","<http://www.w3.org/2001/XMLSchem...
vivo.query <- function(query, endpoint= 'http://localhost:8080/vivo/api/sparqlQuery', email= 'vivo_root@school.edu', password= 'v;bisons', format="tsv", ns = c( "rdf","<http://www.w3.org/1999/02/22-rdf-syntax-ns#>", "rdfs","<http://www.w3.org/2000/01/rdf-schema#>", "xsd","<http://www.w3.org/2001/XMLSche...
bsd-2-clause
R
83a85b83cba6a782fd362f262a1d3ee405ff0a3d
Fix R script
NTAP/warpcore,NTAP/warpcore,NTAP/warpcore,NTAP/warpcore
scripts/analyze.r
scripts/analyze.r
#! /usr/bin/env Rscript if ("data.table" %in% rownames(installed.packages()) == FALSE) { install.packages("data.table", repos="http://cran.r-project.org") } library(data.table) printf <- function(...) cat(sprintf(...)) import <- function(file) { dt <- data.table::fread(file) dt[, nsec:=nsec/1000] stats <- dt[ord...
#! /usr/bin/env Rscript if ("data.table" %in% rownames(installed.packages(lib="~/.R")) == FALSE) { install.packages("data.table", lib="~/.R", repos="http://cran.r-project.org") } library(data.table, lib="~/.R") printf <- function(...) cat(sprintf(...)) import <- function(file) { dt <- data.table:...
bsd-2-clause
R
30ae0ab08469c7eca1aabf8012537b9c1ac72f4b
save rdatafile before report
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/QC/ChipseqQC.r
lib/QC/ChipseqQC.r
options(bitmapType='cairo') options(expressions=102400) args = commandArgs(trailingOnly = TRUE) library(ChIPQC) configFile=args[1] annotationName=args[2] chromosomes=args[3] cat("configFile=", configFile, "\n") cat("annotationName=", annotationName, "\n") cat("chromosomes=", chromosomes, "\n") rdatafile = paste0(c...
options(bitmapType='cairo') options(expressions=102400) args = commandArgs(trailingOnly = TRUE) library(ChIPQC) configFile=args[1] annotationName=args[2] chromosomes=args[3] cat("configFile=", configFile, "\n") cat("annotationName=", annotationName, "\n") cat("chromosomes=", chromosomes, "\n") if(!is.na(chromosome...
apache-2.0
R
5ba42c687b3a6f7ff6a425fb7d404b5a0ca7f49e
Fix for ARM
codebybrett/ren-c,rgchris/ren-c,kealist/ren-c,hostilefork/rebol,kealist/ren-c,kealist/ren-c,hostilefork/rebol,mbk/ren-c,giuliolunati/ren-c,rgchris/ren-c,rgchris/ren-c,mbk/ren-c,codebybrett/ren-c,giuliolunati/ren-c,giuliolunati/ren-c,kealist/ren-c,giuliolunati/ren-c,hostilefork/rebol,kealist/ren-c,hostilefork/rebol,code...
make/tests/qsort.r
make/tests/qsort.r
REBOL [] recycle/torture f: func [ a [integer!] "pointer to an integer" b [integer!] "pointer to an integer" ][ i: make struct! compose/deep [ [raw-memory: (a)] int32 i ] j: make struct! compose/deep [ [raw-memory: (b)] int32 i ] case [ i/i = j/i [0...
REBOL [] recycle/torture f: func [ a [integer!] "pointer to an integer" b [integer!] "pointer to an integer" ][ i: make struct! compose/deep [ [raw-memory: (a)] int32 i ] j: make struct! compose/deep [ [raw-memory: (b)] int32 i ] case [ i/i = j/i [0...
apache-2.0
R
d714c6ed29b6f0876ad38db66351f81ac6efa298
Call the SSL wrappers to access annotations instead of directly calling the AT variants: no annotations is equivalent to the empty list of annotations. Has-annotation tests whether the result of get-annotations is not the empty list.
metaborg/strategoxt,Apanatshka/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,metaborg/strategoxt,metaborg/strategoxt,metaborg/strategoxt,lichtemo/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt,metaborg/strategoxt,Apanatshka/strategoxt,lichtemo/strategoxt
ssl/spec/annotations.r
ssl/spec/annotations.r
\literate[annotations] \begin{abstract} This module defines primitives for getting and setting term annotations. The preferred way to access annotations, however, is through the term syntax t1{t2}, which allows matching and building terms with annotations. \end{abstract} \begin{code} module annotations signat...
\literate[annotations] \begin{abstract} This module defines primitives for getting and setting term annotations. The preferred way to access annotations, however, is through the term syntax t1{t2}, which allows matching and building terms with annotations. \end{abstract} \begin{code} module annotations signat...
apache-2.0
R
596ba93582e4633294cbb6d5c2a32d00d74bf12a
Update windspeed.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/windspeed.r
R/windspeed.r
#' windspeed #' #' @description Calculate meteorological wind speed. #' #' @param u numeric U zonal component #' @param v numeric V meridian component #' @return #' #' @references Istituto di Biometeorologia Firenze Italy. #' @author Alfonso crisci \email{a.crisci@@ibimet.cnr.it} Marco Morabito \email{m.morabito@@...
#' windspeed #' #' @description Calculate meteorological wind speed. #' #' @param u numeric U zonal component #' @param v numeric V meridian component #' @return #' #' @references Istituto di Biometeorologia Firenze Italy. #' @author Alfonso crisci \email{a.crisci@@ibimet.cnr.it} Marco Morabito \email{m.morabito@@...
mit
R
7a19887e63223b3fc7659b86b399b8b199d650ee
Check edge case in compare_stage_keys
davluangu/stagerunner,robertzk/stagerunner,syberia/stagerunner,robertzk/stagerunner,kirillseva/stagerunner,davluangu/stagerunner,syberia/stagerunner
tests/testthat/test-compare_stage_keys.r
tests/testthat/test-compare_stage_keys.r
context('compare_stage_keys') test_that("it gives FALSE when keys are incomparable", { expect_false(compare_stage_keys("1/1", FALSE)) expect_false(compare_stage_keys(FALSE, "1/1")) }) test_that("it gives TRUE when keys are identical", { expect_true(compare_stage_keys(c(FALSE, TRUE), c(FALSE, TRUE))) }) test_th...
context('compare_stage_keys') test_that("it gives FALSE when keys are incomparable", { expect_false(compare_stage_keys("1/1", FALSE)) expect_false(compare_stage_keys(FALSE, "1/1")) }) test_that("it gives TRUE when keys are identical", { expect_true(compare_stage_keys(c(FALSE, TRUE), c(FALSE, TRUE))) }) test_th...
mit
R
bbebfb9945db553728776afb3a205ded7a60a486
Add na.rm = T to prevent NAs in variance calculation.
thehyve/heim-SmartR,thehyve/naa-SmartR,thehyve/heim-SmartR,thehyve/heim-SmartR,agapow/smartr,thehyve/heim-SmartR,agapow/smartr,thehyve/naa-SmartR,agapow/smartr,thehyve/naa-SmartR,agapow/smartr
web-app/HeimScripts/heatmap/run.r
web-app/HeimScripts/heatmap/run.r
library(jsonlite) library(reshape2) main <- function(max_rows=50){ df <- loaded_variables[[1]] # SmartR does not support multiple HDD nodes yet if(ncol(df) > 3){ variances <- apply(df[,3:ncol(df)],1,var, na.rm = T) # Calculating variance per probe df["SIGNIFICANCE"] <- variances df["MEAN"] <- rowMeans...
library(jsonlite) library(reshape2) main <- function(max_rows=50){ df <- loaded_variables[[1]] # SmartR does not support multiple HDD nodes yet if(ncol(df) > 3){ variances <- apply(df[,3:ncol(df)],1,var) # Calculating variance per probe df["SIGNIFICANCE"] <- variances df["MEAN"] <- rowMeans(df[,3:ncol...
apache-2.0
R
e1ba1754465b857ba38c89698e905a621da4f506
Update wbgt_full.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/wbgt_full.r
R/wbgt_full.r
#' wbgt_full #' #' Calculate wet bulb globe temperature index for outdoor environements by using globometric temperature and air pressure in hPa ( millibars). #' # #' @param numeric t Air temperature in Celsius degrees. #' @param numeric rh Air Relative humidity in percentage. #' @param numeric tg Solar Radiation Radi...
mit
R
68462cee34fe6d4e91a67d917bc3de875a4f11c3
Update vizualizacija.r
GalDrnovsek/APPR-2015-16
vizualizacija/vizualizacija.r
vizualizacija/vizualizacija.r
# 3. faza: Izdelava zemljevida # Uvozimo zemljevid. #zemljevid <- uvozi.zemljevid("http://e-prostor.gov.si/fileadmin/BREZPLACNI_POD/RPE/OB.zip", # "OB/OB", encoding = "Windows-1250") # Preuredimo podatke, da jih bomo lahko izrisali na zemljevid. #druzine <- preuredi(druzine, zemljevid, "OB...
# 3. faza: Izdelava zemljevida # Uvozimo zemljevid. #zemljevid <- uvozi.zemljevid("http://e-prostor.gov.si/fileadmin/BREZPLACNI_POD/RPE/OB.zip", # "OB/OB", encoding = "Windows-1250") # Preuredimo podatke, da jih bomo lahko izrisali na zemljevid. #druzine <- preuredi(druzine, zemljevid, "OB...
mit
R
68506421ae0f10bc876c36ff6e827637c206283b
Use standard format for function names
lmullen/religious-statistics,lmullen/demographics-religion,lmullen/demographics-religion,lmullen/religious-statistics
functions/get.year.r
functions/get.year.r
# Function to get the year from our data, using lubridate # Lincoln A. Mullen | lincoln@lincolnmullen.com | http://lincolnmullen.com # MIT License <http://lmullen.mit-license.org/> get_year <- function(date.string) { require(lubridate) result <- year(mdy(as.character(date.string))) return(result) }
# Function to get the year from our data, using lubridate # Lincoln A. Mullen | lincoln@lincolnmullen.com | http://lincolnmullen.com # MIT License <http://lmullen.mit-license.org/> get.year <- function(date.string) { require(lubridate) result <- year(mdy(as.character(date.string))) return(result) }
mit
R
c5f7478f6fb25fb9ef392b7e03b19222cda0febd
Remove slurm submission script SBATCH comments
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_dir, options) { private$options <- options private$cat_main_file_magic(...
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container_dir, options) { private$options <- options private$cat_main_file_magic(...
mit
R
64aa2290de7cfd405c7829b8c8a942cb673d7f0c
change hard coded size to param with 1000 as default
wkmor1/voiWoodland
R/sens_prepost_BI.r
R/sens_prepost_BI.r
sens_prepost_BI <- function(dir, newdata, manage, param, n, size=1000, px=FALSE, verbose=FALSE) { sensitivity_BI_obj <- vector('list', n) preposts <- lapply(param, function(x) pre_posterior(newdata[[manage]][, x], n, size) ) for (i in seq_len(n)) { inputs <- newdata for (m i...
sens_prepost_BI <- function(dir, newdata, manage, param, n, verbose=FALSE) { sensitivity_BI_obj <- vector('list', n) preposts <- lapply(param, function(x) pre_posterior(newdata[[manage]][, x], n, 1000) ) for (i in seq_len(n)) { inputs <- newdata for (m in seq_along(param)) {...
mit
R
63be0462c8923f6c0fca29943d56fe4531290162
Remove explicit dependencies.
ryanlovett/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub
deployments/r/image/extras.d/2019-fall-stat-131a.r
deployments/r/image/extras.d/2019-fall-stat-131a.r
#!/usr/bin/env Rscript source("/tmp/class-libs.R") class_name = "2019 Fall Stat 131a" class_libs = c( "alluvial", "0.1-2", "latticeExtra", "0.6-28", "DAAG", "1.22", "faraway", "1.0.7", "fdrtool", "1.2.15", "gpairs", "1.2", "gplots", "3.0.1.1", "hexbin", "1.27.3", "leaps", "2.9", "NMF", "0.21.0", ...
#!/usr/bin/env Rscript source("/tmp/class-libs.R") class_name = "2019 Fall Stat 131a" class_libs = c( "alluvial", "0.1-2", "latticeExtra", "0.6-28", "DAAG", "1.22", "faraway", "1.0.7", "fdrtool", "1.2.15", "barcode", "1.1", # dependency of gpairs "vcd", "1.4-4", # dependency of gpairs "gpairs", "1.2...
bsd-3-clause
R
cae635c349c089582988c4bbdcd4693a90beee60
Handle negative numbers >-1000 & < 0
1R151-1/R,fdryan/R
ggplot2_formatter.r
ggplot2_formatter.r
require(plyr) require(scales) # --------------------------------------------------------------------------------------------- # Formatting functions for ggplot graph axis # --------------------------------------------------------------------------------------------- #' Human Numbers: Format numbers so they're legibl...
require(plyr) require(scales) # --------------------------------------------------------------------------------------------- # Formatting functions for ggplot graph axis # --------------------------------------------------------------------------------------------- #' Human Numbers: Format numbers so they're legibl...
unlicense
R
56dd63380765f7f0ede5b2d2b4f9129001aa6612
fix indentation
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
R/create_worker_pool.r
R/create_worker_pool.r
#' Sets up workers for use in clustermq #' #' @param n_jobs Number of jobs to submit #' @param data Set common data (function, constant args, seed) #' @param template A named list of values to fill in template #' @param log_worker Write a log file for each worker #' @return An instance of the...
#' Sets up workers for use in clustermq #' #' @param n_jobs Number of jobs to submit #' @param data Set common data (function, constant args, seed) #' @param template A named list of values to fill in template #' @param log_worker Write a log file for each worker #' @return An instance of the...
apache-2.0
R
43a10f75184297681717499600ce38f162d3db3b
Add convience function to get 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)) 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)) # 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
060d5c2be510762a1a83426099fabfef171c5256
Update utci_class7.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/utci_class7.r
R/utci_class7.r
#' utci_class7 #' #' Calculate seven thermal classes of Universal Thermal Climate Index UTCI index. #' #' @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 numeric tmrt Mean radiant temperatur...
#' utci_class7 #' #' Calculate seven thermal classes of Universal Thermal Climate Index UTCI index. #' #' @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 numeric tmrt Mean radiant temperatur...
mit
R
9e0a1490d1e7fd9e17199897cefe24224c8f3576
Refactor plotting code to a function
gadomski/rivlib-utils
scripts/chart-inclinations.r
scripts/chart-inclinations.r
library(ggplot2) library(reshape2) filenames <- c("Zuma/140123_202748_inclinations.txt", "Zuma/140201_185848_inclinations.txt", "Zuma/140226_163837_inclinations.txt", "EastWall/140123_180026_inclination.txt", "EastWall/140201_205741_inclination.txt") plotInc...
library(ggplot2) library(reshape2) filenames <- c("140123_202748_inclinations.txt", "140201_185848_inclinations.txt", "140226_163837_inclinations.txt") FILENAME_INDEX <- 3 inclinations <- read.csv(paste0("~/Code/rivlib-development/data/Zuma/", filenames[FILENAME_INDEX])) inclinations <- ...
mit
R
f4f7927f58bc372eb8e722ea1269a54bce3dd366
Bump stat20data as in #2881.
berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub,ryanlovett/datahub
deployments/datahub/images/default/r-packages/stat-20.r
deployments/datahub/images/default/r-packages/stat-20.r
#!/usr/bin/env Rscript print("Installing packages for stat-20") source("/tmp/class-libs.R") class_name = "stat-20" class_libs = c( "tidycensus", "1.0", "openintro", "2.2.0", "infer", "1.0.0", "patchwork", "1.1.1", "tigris", "1.0", "googlesheets4", "0.2.0", "xaringanthemer", "0.4.0", "...
#!/usr/bin/env Rscript print("Installing packages for stat-20") source("/tmp/class-libs.R") class_name = "stat-20" class_libs = c( "tidycensus", "1.0", "openintro", "2.2.0", "infer", "1.0.0", "patchwork", "1.1.1", "tigris", "1.0", "googlesheets4", "0.2.0", "xaringanthemer", "0.4.0", "...
bsd-3-clause
R
c088e122ba1c591fb1712ef127f6095549c168e8
Update uvoz_tabela1.r
ZavbiA/APPR-2017
uvoz/uvoz_tabela1.r
uvoz/uvoz_tabela1.r
#tukaj opravim uvoz tabele iz wikipedije library(rvest) library(gsubfn) library(readr) library(dplyr) # Funkcija, ki uvozi število medalj po državah iz Wikipedije link <- "https://en.wikipedia.org/wiki/All-time_Olympic_Games_medal_table" stran <- html_session(link) %>% read_html() tabela <- stran %>% html_nodes(xpat...
#tukaj opravim uvoz tabele iz wikipedije library(rvest) library(gsubfn) library(readr) library(dplyr) # Funkcija, ki uvozi število medalj po državah iz Wikipedije link <- "https://en.wikipedia.org/wiki/All-time_Olympic_Games_medal_table" stran <- html_session(link) %>% read_html() tabela <- stran %>% html_nodes(xpat...
mit
R
9527b9f9d22f6be0320688e580a831d980aa29eb
Fix qsort for 32-bit systems
zsx/r3,zsx/r3,Pointillistic/rebol-lang,Pointillistic/rebol-lang,Pointillistic/rebol-lang,zsx/r3,zsx/r3,Pointillistic/rebol-lang
make/tests/qsort.r
make/tests/qsort.r
REBOL [] recycle/torture i386?: 4 = fifth system/version f: func [ a [integer!] "pointer to an integer" b [integer!] "pointer to an integer" ][ i: make struct! compose/deep [ [raw-memory: (a)] int32 i ] j: make struct! compose/deep [ [raw-memory: (b)] int32 i ]...
REBOL [] recycle/torture f: func [ a [integer!] "pointer to an integer" b [integer!] "pointer to an integer" ][ i: make struct! compose/deep [ [raw-memory: (a)] int32 i ] j: make struct! compose/deep [ [raw-memory: (b)] int32 i ] case [ i/i = j/i [0]...
apache-2.0
R
a81570bf68ca2f03c445eb480f28eb56d2306fa6
Make sure the output is a vector before injecting into raster format.
khufkens/phenor
R/shape_model_output.r
R/shape_model_output.r
#' (re)shape model output based upon the class of the input data #' and valid model estimates. Mainly, reshapes data to a spatial #' raster format when required. #' #' @param data input data generated using the format_*() functions #' @param doy phenophase estimates as a doy value #' @return raster or vector with esti...
#' (re)shape model output based upon the class of the input data #' and valid model estimates. Mainly, reshapes data to a spatial #' raster format when required. #' #' @param data input data generated using the format_*() functions #' @param doy phenophase estimates as a doy value #' @return raster or vector with esti...
agpl-3.0
R
56c9b2f22bd89467e55743e83ab1f600295ce72a
Modify path to be consistent with current folder layout
weecology/mete-energy,weecology/mete-energy
dist_par_est.r
dist_par_est.r
library(MASS) trunc_weibull = function(x, k, lmd, lower_bound){ return (dweibull(x, k, lmd) / (1 - pweibull(lower_bound, k, lmd))) } trunc_weibull_par_est = function(x, lower_bound){ trunc_weibull_lb = function(x, k, lmd){ return (trunc_weibull(x, k, lmd, lower_bound)) } weibull_est = as.numeric((fitdistr...
library(MASS) trunc_weibull = function(x, k, lmd, lower_bound){ return (dweibull(x, k, lmd) / (1 - pweibull(lower_bound, k, lmd))) } trunc_weibull_par_est = function(x, lower_bound){ trunc_weibull_lb = function(x, k, lmd){ return (trunc_weibull(x, k, lmd, lower_bound)) } weibull_est = as.numeric((fitdistr...
mit
R
81b84ea421d0216c32a645ad6e08a2e8c62af005
Bump version to prep for 3.1 alpha
zsx/r3,zsx/r3,zsx/r3,Pointillistic/rebol-lang,zsx/r3,Pointillistic/rebol-lang,Pointillistic/rebol-lang,Pointillistic/rebol-lang
src/boot/version.r
src/boot/version.r
3.0.90.3.1
3.0.0.3.1
apache-2.0
R
9a7ccb6c15c7d7ebfb6dad0b32e9853534f257db
improve analyze-hydra-builds.r
bennofs/cabal2nix,Fuuzetsu/cabal2nix
doc/analyze-hydra-builds.r
doc/analyze-hydra-builds.r
# cabal2nix/doc/analyze-hydra-builds.r # # Generate the input file "builds.csv" by running # # sudo -u hydra psql -c "Copy (select b.project, b.jobset, b.job, b.timestamp, b.drvpath, b.system, b.buildstatus, b.size, b.closuresize, bs.type, bs.starttime, bs.stoptime, bs.machine from builds b left join buildsteps bs ...
# cabal2nix/doc/analyze-hydra-builds.r # # Generate the input file "builds.csv" by running # # sudo -u hydra psql -c "Copy (select b.project, b.jobset, b.job, b.timestamp, b.drvpath, b.system, b.buildstatus, b.size, b.closuresize, bs.type, bs.starttime, bs.stoptime, bs.machine from builds b left join buildsteps bs ...
bsd-3-clause
R
46a4681de179ed0c5feac7898b8e0cf115520567
Fix demagrittr_source()
TobCap/demagrittr
R/demagrittr_source.r
R/demagrittr_source.r
#' Convert R's source file to non \%>\% code. #' @description read file and convert the code which uses %>% #' to flatten code #' #' @param in_ file path of input. #' @param out_ file path of output. #' @param mode transformed mode. #' @param ask ask to overwrite when `out_`` already exists #' #' @return no return. s...
#' Convert R's source file to non \%>\% code. #' @description read file and convert the code which uses %>% #' to flatten code #' #' @param in_ file path of input. #' @param out_ file path of output. #' @param ask ask to overwrite when `out_`` already exists #' #' @return no return. side effect on a file. #' #' @exam...
mit
R
6e99d52506bc5fe6451df27a400af8a883c62162
fix to number of trees in R
ryanbressler/ClassWar,ryanbressler/ClassWar
Rrf.r
Rrf.r
library("foreign") library("randomForest") args<-(commandArgs(TRUE)) train<-read.arff(args[[1]]) test<-read.arff(args[[2]]) target<-args[[3]] targets = colnames(train)==target y = train[targets] x = train[!targets] ptm <- proc.time() rf <- randomForest(x,as.factor(y[,1]),ntree=100) print(cat("Total training tim...
library("foreign") library("randomForest") args<-(commandArgs(TRUE)) train<-read.arff(args[[1]]) test<-read.arff(args[[2]]) target<-args[[3]] targets = colnames(train)==target y = train[targets] x = train[!targets] ptm <- proc.time() rf <- randomForest(x,as.factor(y[,1])) print(cat("Total training time (seconds...
bsd-3-clause
R
8226f71740f1006d7f15b37a8aa253f0ba3e956a
debug armhf packaging
OwnYourData/app-allergy,OwnYourData/app-allergy
init.r
init.r
# # Example R code to install packages # See http://cran.r-project.org/doc/manuals/R-admin.html#Installing-packages for details # ########################################################### # Update this line with the R packages to install: my_packages = c('shiny', 'shinyBS', 'devtoo...
# # Example R code to install packages # See http://cran.r-project.org/doc/manuals/R-admin.html#Installing-packages for details # ########################################################### # Update this line with the R packages to install: my_packages = c('shiny', 'shinyBS', 'devtoo...
mit
R
547e7f07f44e848c36c6f42831df098c8d83196d
tweak graphics parameters for Figure 2
khufkens/phenor
analysis/Figure_3_arrow_plot.r
analysis/Figure_3_arrow_plot.r
# Figure 3. # # Arrow plot comparing two model optimizations # and the difference in model output. # Mean differences are used across different runs within # a given model. library(phenor) # quick comparison with default settings (1 random seed) comparison = model_comparison(models = c("TT","PTT"), ...
# Figure 3. # # Arrow plot comparing two model optimizations # and the difference in model output. # Mean differences are used across different runs within # a given model. library(phenor) # quick comparison with default settings (1 random seed) comparison = model_comparison(models = c("TT","PTT"), ...
agpl-3.0
R
edf3e7caf0e84746fac7a970d648a147455f0a3f
comment on model env
syberia/syberia
R/export_stage.r
R/export_stage.r
#' Export stage for Syberia. #' #' Precise behavior depends on adapter. #' #' @param modelenv an environment. The current modeling environment. #' @param export_options a list. The available export options. Will differ #' depending on the adapter. (default is file adapter) #' @export export_stage <- function(modele...
#' Export stage for Syberia. #' #' Precise behavior depends on adapter. #' #' @param modelenv an environment. The current modeling environment. #' @param export_options a list. The available export options. Will differ #' depending on the adapter. (default is file adapter) #' @export export_stage <- function(modele...
mit
R
95c79aeba50e56e1e5321c2c5621d687aa005efd
Update documents.
snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3
q3/docs/AddressAutoComplete.rd
q3/docs/AddressAutoComplete.rd
=begin =AhX̎⊮ wb_GfBbgr[ŃAhX͂tB[hł́AAhX̎⊮s܂B ((<AhX̎⊮|"IMG:images/AddressAutoComplete.png">)) AhX̎⊮̑ΏۂɂȂ̂́AAhX̃GgAOAhX荞񂾃GgAŋߎgp[AhXłB͂╶񒆂̃hCÃGg̖OAhXAAhX̃hCɊ܂܂ƁA⊮p̃hbv_EXg\܂BgpAhXIƓ͒̕ɒu܂B͂̂܂ܑƎIɌ₪i荞܂܂B AhX̎⊮̓J[\L[̏㉺Xg̑IɎgp܂B⃊XgɂESC܂B AhXɓo^ĂȂ[AhXɃ[𑗐MƁÃAhXLA̎⊮ɌƂĎgp܂BftHgł͍ŐV10̃AhXL܂BLAhX̌((<qmail.xml|...
=begin =AhX̎⊮ wb_GfBbgr[ŃAhX͂tB[hł́AAhX̎⊮s܂B ((<AhX̎⊮|"IMG:images/AddressAutoComplete.png">)) AhX̎⊮̑ΏۂɂȂ̂́AAhX̃GgAOAhX荞񂾃GgAŋߎgp[AhXłB͂񂪁ÃGg̖OAhXɊ܂܂((-ۂɂ́A[AhX̐擪hC̐擪AO̐擪ȂǂɂȂĂꍇ̂-))A⊮p̃hbv_EXg\܂BgpAhXIƓ͒̕ɒu܂B͂̂܂ܑƎIɌ₪i荞܂܂B AhX̎⊮̓J[\L[̏㉺Xg̑IɎgp܂B⃊XgɂESC܂B AhXɓo^ĂȂ[AhXɃ[𑗐MƁÃAhXLA̎⊮ɌƂĎgp܂BftHgł͍ŐV10̃AhXL܂B...
mit
R
4067bd38661b7c77ba18d8c20838c15f78dc25e4
Update server.r
aleksandrov2/APPR-2015-16
shiny/server.r
shiny/server.r
library(shiny) shinyServer( server <- function(input, output) { output$dolg <- renderPlot({ ggplot(podatki1 %>% filter(Cas == input$leto_1), aes(x = Drzava, y = Dolg, fill=Dolg)) + scale_fill_continuous(low = "#69b8f6", high = "#142d45") + geom_bar(stat ="identity") + theme...
library(shiny) shinyServer( server <- function(input, output) { output$dolg <- renderPlot({ ggplot(podatki1 %>% filter(Cas == input$leto_1), aes(x = Drzava, y = Dolg, fill=Dolg)) + scale_fill_continuous(low = "#69b8f6", high = "#142d45") + geom_bar(stat ="identity") + theme(axis.text.x = element_text(a...
mit
R
41dd66c5c4884e27ff3d9d3b82e2c590f9774caf
check for DO_CHUNK msg id on worker
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
R/worker.r
R/worker.r
#' R worker submitted as cluster job #' #' Do not call this manually, the master will do that #' #' @param worker_id The ID of the worker (usually just numbered) #' @param master The master address (tcp://ip:port) #' @param memlimit Maximum memory before throwing an error worker = function(worker_id, master, mem...
#' R worker submitted as cluster job #' #' Do not call this manually, the master will do that #' #' @param worker_id The ID of the worker (usually just numbered) #' @param master The master address (tcp://ip:port) #' @param memlimit Maximum memory before throwing an error worker = function(worker_id, master, mem...
apache-2.0
R
3de7339d8ec37b8a517b674e3ccadc816744a67f
make sizes relative to configurable base_size
infotroph/DeLuciatoR
ggthemes.r
ggthemes.r
theme_ggEHD = function(base_size=18, ...){ (theme_bw(base_size=base_size) %+% theme( panel.grid.major = element_blank(), panel.grid.minor = element_blank(), axis.ticks.length = unit(-(base_size*0.75), "points"), axis.ticks.margin = unit((base_size*1.5), "points"), plot.margin = unit(base_size*c(1,1,1,1), "po...
theme_ggEHD = function(...){ (theme_bw() %+% theme( panel.grid.major = element_blank(), panel.grid.minor = element_blank(), axis.ticks.length = unit(-0.75, "lines"), axis.ticks.margin = unit(1.5, "lines"), plot.margin = unit(c(1,1,1,1), "lines"), text=element_text( # Can we inherit some of these? family...
mit
R
d2f67865a30a5dcecc7a46485abcb4d043af2c8c
Add a few select MIME types
earl/rebol3
scripts/shttpd.r
scripts/shttpd.r
REBOL [title: "A tiny static HTTP server" author: 'abolka date: 2009-11-04] code-map: make map! [200 "OK" 400 "Forbidden" 404 "Not Found"] mime-map: make map! [ "html" "text/html" "css" "text/css" "js" "application/javascript" "gif" "image/gif" "jpg" "image/jpeg" "png" "image/png" "r" "text/plain" "r3" "te...
REBOL [title: "A tiny static HTTP server" author: 'abolka date: 2009-11-04] code-map: make map! [200 "OK" 400 "Forbidden" 404 "Not Found"] mime-map: make map! ["html" "text/html" "jpg" "image/jpeg" "r" "text/plain"] error-template: { <html><head><title>$code $text</title></head><body><h1>$text</h1> <p>Requeste...
apache-2.0
R
4d7ac55d078707651937be777dfc70178863d8c7
Check range on final scaling parameter e in Rf.
khufkens/phenor
R/DP.r
R/DP.r
#' DormPhot model as defined in #' Caffarra, Donnelly and Chuine 2011 (Clim. Res.) #' parameter ranges are taken from Basler et al. 2016 #' #' @param data input data (see reference for detailed description), #' data should be formatted using flat_format() #' @param par a vector of parameter values, this is functions sp...
#' DormPhot model as defined in #' Caffarra, Donnelly and Chuine 2011 (Clim. Res.) #' parameter ranges are taken from Basler et al. 2016 #' #' @param data input data (see reference for detailed description), #' data should be formatted using flat_format() #' @param par a vector of parameter values, this is functions sp...
agpl-3.0
R
311e65897944028bfd65d74b07f6fc3c1297789e
Make data prep a function
alexbbt/info370final,alexbbt/info370final
data-prep.r
data-prep.r
library(reshape2) library(zoo) ################# ### Data Prep ### ################# data.prep <- function(path){ data <- read.csv(path, stringsAsFactors = FALSE) # Factorize numeric data points data$floors <- factor(data$floors) data$waterfront <- as.logical(data$waterfront) # could just be a factor dat...
library(reshape2) library(zoo) ################# ### Data Prep ### ################# data <- read.csv('./data/training.csv', stringsAsFactors = FALSE) # Factorize numeric data points data$floors <- factor(data$floors) data$waterfront <- as.logical(data$waterfront) # could just be a factor data$view <- factor(data$vi...
mit
R
8077cd71f153d9e9483f2ece93cd87863f191b39
allow "file", "filename", "name", and "path" to all reference the same thing
syberia/syberia
R/import_stage.r
R/import_stage.r
#' Import data stage for Syberia model process. #' #' @param modelenv an environment. The current modeling environment. #' @param import_options a list. The available import options. Will differ #' depending on the adapter. (default is file adapter) #' @export import_stage <- function(modelenv, import_options) { #...
#' Import data stage for Syberia model process. #' #' @param modelenv an environment. The current modeling environment. #' @param import_options a list. The available import options. Will differ #' depending on the adapter. (default is file adapter) #' @export import_stage <- function(modelenv, import_options) { #...
mit
R
af13f62da56c902aae5f5257ebf575a3daf7818d
Fix bugs
HIIT/digivaalit-2015,HIIT/digivaalit-2015,HIIT/digivaalit-2015
topics/check_k.r
topics/check_k.r
source('topics.r') print( commandArgs(trailingOnly=TRUE) ) for( path in commandArgs(trailingOnly=TRUE) ) { df = data.frame( k = integer(), ll =integer() ) for( f in list.files(path) ){ load( paste(path, f, sep = '') ) k <- model@k ll <- check_fitness_model( model ) row = c(k, ll) df[ nrow(df)+1,]...
source('topics.r') df = data.frame( k = integer(), ll =integer() ) for( path in commandArgs(trailingOnly=TRUE) ) { for( f in list.files(path) ){ load( paste(path, f, sep = '') ) k <- model@k ll <- check_fitness_model( model ) row = c(k, ll) df[ nrow(df)+1,] <- row } print("Examinging", path ) ...
mit
R
b9ae41ea5342b6a8faa499db18cba5b5cfb04962
Revert "s/#/'/g"
raviqqe/tisp,tisp-lang/tisp,tisp-lang/tisp,raviqqe/tisp,raviqqe/tisp
examples/data.r
examples/data.r
; Dictionary (let d {"foo" 1 "bar" 2}) ; Set (let s '{1 2 3}) ; List (let l [1 2 3]) ; Array? ;(let l '[1 2 3]) ; Closure (let l '(+ #1 #2))
; Dictionary (let d {"foo" 1 "bar" 2}) ; Set (let s '{1 2 3}) ; List (let l [1 2 3]) ; Array? ;(let l '[1 2 3]) ; Closure (let l '(+ '1 '2))
mit
R
d6f1dc0ae392f9c0ea05460b32befc172df8dfaf
Add na.strings fix
aserlich/VIP-LivedData,aserlich/VIP-LivedData
ErrorChecksViz.r
ErrorChecksViz.r
library(stringr) library(plyr) ##Detect problems with ward lookup ############################# workd <- "/Volumes/Optibay-1TB/RSA_RCT/QA/LiveData/VIP-LivedData/" exports <- list.files(path=workd, pattern ="contact_2014_[0-9].*") currentFile <- tail(exports,1)[1] setwd(paste0(workd,currentFile)) cat("Now loading th...
library(stringr) library(plyr) ##Detect problems with ward lookup ############################# workd <- "/Volumes/Optibay-1TB/RSA_RCT/QA/LiveData/VIP-LivedData/" exports <- list.files(path=workd, pattern ="contact_2014_[0-9].*") currentFile <- tail(exports,1)[1] setwd(paste0(workd,currentFile)) cat("Now loading th...
mit
R
8c915311ebad9b6f6ba904bdb36570579c7e3daf
Update uvoz_tabele5.r
ZavbiA/APPR-2017
uvoz/uvoz_tabele5.r
uvoz/uvoz_tabele5.r
library(rvest) library(gsubfn) library(readr) library(dplyr) library(tibble) library(reshape2) library(gsubfn) library(tidyr) tabela5.tidy <- read_csv("podatki/stroski.csv", locale = locale(encoding = "UTF-8")) names(tabela5.tidy) <- c("mesto","leto","drzava","tip","st_dogodkov","st...
library(rvest) library(gsubfn) library(readr) library(dplyr) library(tibble) library(reshape2) library(gsubfn) library(tidyr) tabela5.tidy <- read_csv("podatki/stroski.csv", locale = locale(encoding = "UTF-8")) names(tabela5.tidy) <- c("mesto","leto","drzava","tip","st_dogodkov","st...
mit
R
78b66fe1d57650c13849d6a06c5c8fff86c8b419
Update uvoz_tabele5.r
ZavbiA/APPR-2017
uvoz/uvoz_tabele5.r
uvoz/uvoz_tabele5.r
library(rvest) library(gsubfn) library(readr) library(dplyr) library(tibble) library(reshape2) library(gsubfn) library(tidyr) tabela5.tidy <- read_csv("podatki/stroski.csv", locale = locale(encoding = "UTF-8")) names(tabela5.tidy) <- c("mesto","leto","drzava","tip","st_dogodkov","st...
library(rvest) library(gsubfn) library(readr) library(dplyr) library(tibble) library(reshape2) library(gsubfn) library(tidyr) tabela5.tidy <- read_csv("podatki/stroski.csv", locale = locale(encoding = "UTF-8")) names(tabela5.tidy) <- c("mesto","leto","drzava","tip","st_dogodkov","st...
mit
R
1b2206ce1d00b8655e8449ca693cb900e15f950b
update get_percentiles_DGAP_all.r with deletion of _A and _B suffix from name column of input file
ibn-salem/position_effect,ibn-salem/position_effect,ibn-salem/position_effect
get_percentiles_DGAP_all.r
get_percentiles_DGAP_all.r
######################################################################################################################## ### Calculate percentiles of phenomatch scores for the analyzed gene values per DGAP case ### Input: phenomatch and max_phenomatch scores file. Remember to delete the _A and _B from the file before ...
######################################################################################################################## ### Calculate percentiles of phenomatch scores for the analyzed gene values per DGAP case ### Input: phenomatch and max_phenomatch scores file. Remember to delete the _A and _B from the file before ...
mit
R
c0ae89a11d69bc1a1d329a29f17b927beabd2af7
Make script work with several folders
HIIT/digivaalit-2015,HIIT/digivaalit-2015,HIIT/digivaalit-2015
topics/check_k.r
topics/check_k.r
source('topics.r') df = data.frame( k = integer(), ll =integer() ) for( path in commandArgs(trailingOnly=TRUE) ) { for( f in list.files(path) ){ load( paste(path, f, sep = '') ) k <- model@k ll <- check_fitness_model( model ) row = c(k, ll) df[ nrow(df)+1,] <- row } print("Examinging", path ) ...
source('topics.r') df = data.frame( k = integer(), ll =integer() ) path <- commandArgs(trailingOnly=TRUE)[0] for( f in list.files(path) ){ load(f) k <- model@k ll <- check_fitness_model( model ) row = c(k, ll) df[ nrow(df)+1,] <- row } print("Best fit log likelihood", which.max( df$ll ) ) print("Best fit k", d...
mit
R
aca8027422cd95e5241625036afbc1648f902e45
read obj
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/seurat_doublet_finder.r
lib/scRNA/seurat_doublet_finder.r
library(Seurat) library(DoubletFinder) options(future.globals.maxSize= 10779361280) random.seed=20200107 min.pct=0.5 logfc.threshold=0.6 options_table<-read.table(parSampleFile1, sep="\t", header=F, stringsAsFactors = F) myoptions<-split(options_table$V1, options_table$V2) by_sctransform<-ifelse(myoptions$by_sctran...
library(Seurat) library(DoubletFinder) options(future.globals.maxSize= 10779361280) random.seed=20200107 min.pct=0.5 logfc.threshold=0.6 options_table<-read.table(parSampleFile1, sep="\t", header=F, stringsAsFactors = F) myoptions<-split(options_table$V1, options_table$V2) by_sctransform<-ifelse(myoptions$by_sctran...
apache-2.0
R
5db83a8aa19598fa1439c7fb06a7882244f4ef09
Make thread graph shorter for paper submission.
danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,danluu/BitFunnel
src/Scripts/plot-qps.r
src/Scripts/plot-qps.r
library("ggplot2") setwd("~/dev/BitFunnel/src/Scripts") args = commandArgs(trailingOnly=TRUE) if (length(args) != 2) { stop("Required args: inputFilename, outputFilename", call.=FALSE) } inputName = args[1] outputName = args[2] print("Reading input") df <- read.csv(header=TRUE, file=inputName) print("Creating plo...
library("ggplot2") setwd("~/dev/BitFunnel/src/Scripts") args = commandArgs(trailingOnly=TRUE) if (length(args) != 2) { stop("Required args: inputFilename, outputFilename", call.=FALSE) } inputName = args[1] outputName = args[2] print("Reading input") df <- read.csv(header=TRUE, file=inputName) print("Creating plo...
mit
R
450cfb97eeb4c378e8729d036abbca64f2ff0a0b
Update test.r
snowch/biginsight-examples,snowch/biginsight-examples
examples/BigR/test.r
examples/BigR/test.r
# check if lib dir exists if("./lib" %in% dir() == FALSE) { # create directory to hold libraries dir.create('./lib') # install libraries install.packages('rJava', repos='http://cran.us.r-project.org', lib='./lib', quiet=FALSE) install.packages('base64enc', repos='http://cran.us.r-project.or...
# check if lib dir exists if("./lib" %in% dir() == FALSE) { # create directory to hold libraries dir.create('./lib') # install libraries install.packages('rJava', repos='http://cran.us.r-project.org', lib='./lib', quiet=FALSE) install.packages('base64enc', repos='http://cran.us.r-project.org', li...
apache-2.0
R
a6bba11b689c2524268af95a9d5b2c420b87f44e
Copy recursively for source and input files
jmousseau/Stain
R/slurm-container.r
R/slurm-container.r
#' SlurmContainer R6 object. #' #' A slurm container is simply a directory with a specific #' structure, particulary it has a submit.slurm script at the #' top level. SlurmContainer <- R6::R6Class("SlurmContainer", public = list( dir = NULL, initialize = function(dir = ".") { name <- pas...
#' SlurmContainer R6 object. #' #' A slurm container is simply a directory with a specific #' structure, particulary it has a submit.slurm script at the #' top level. SlurmContainer <- R6::R6Class("SlurmContainer", public = list( dir = NULL, initialize = function(dir = ".") { name <- pas...
mit
R
aae69435b61af4957d8b236518f3278ac4c7cf9e
add evaluation of similarity between resources based on set of consumers
david-beauchesne/Predict_interactions
Script/similarity_taxon.r
Script/similarity_taxon.r
#Similarity matrix as a single functions similarity_taxon <- function(S0, wt, taxa) { # Note: the similarity on the diagonal has to be set to 1 since it's all the same species. # taxa is either resource or consumer similarity.matrix <- matrix(nrow = nrow(S0), ncol = nrow(S0), dimnames = list(S0[, 'taxon'],...
#Similarity matrix as a single functions similarity_taxon <- function(S0, wt) { # Note: the similarity on the diagonal has to be set to 1 since it's all the same species. similarity.matrix <- matrix(nrow = nrow(S0), ncol = nrow(S0), dimnames = list(S0[, 'taxon'], S0[, 'taxon'])) taxonomy <- vector("list",...
mit
R
b988e8dbe0d7f58aa2a15a01bfe682407cdd7cf2
Make scale larger.
thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS,thomaskrause/graphANNIS
evaluation/evaluate-csv.r
evaluation/evaluate-csv.r
bench_getaql <- function(x, querydir) { aqlFile <- "" group <- x[1] problemSpace = as.numeric(x[2]) if(problemSpace == 0) { corpus <- sub("_[^_]+$", "", group) fn <- substr(group, nchar(corpus)+2, nchar(group)) aqlFile <- paste(querydir, "/", corpus,"/", fn, ".aql", sep='') } else { aqlFi...
bench_getaql <- function(x, querydir) { aqlFile <- "" group <- x[1] problemSpace = as.numeric(x[2]) if(problemSpace == 0) { corpus <- sub("_[^_]+$", "", group) fn <- substr(group, nchar(corpus)+2, nchar(group)) aqlFile <- paste(querydir, "/", corpus,"/", fn, ".aql", sep='') } else { aqlFi...
apache-2.0
R