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
008d85de05817cca1521c3f531f01eac721d3fe9
fix merge conflicts
robertzk/s3mpi
R/s3store.r
R/s3store.r
#' Store an R object in S3 by key #' #' Any type of object that can be serialized as an RDS file #' is capable of being retrieved using this interface. #' #' @export #' @param obj ANY. An R object to save to S3. #' @param name character. The S3 key to save to. #' @param .path character. The S3 prefix, e.g., "s3://yourb...
#' Store an R object in S3 by key #' #' Any type of object that can be serialized as an RDS file #' is capable of being retrieved using this interface. #' #' @export #' @param obj ANY. An R object to save to S3. #' @param name character. The S3 key to save to. #' @param .path character. The S3 prefix, e.g., "s3://yourb...
mit
R
e2a5052e85e07a2122269630b2f6e616d0c7bdc9
更新:第七章fig7-11
shuaimeng/r
thesis/chap7/fig7-11.r
thesis/chap7/fig7-11.r
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib') library(rJava) setwd("/Users/mengmengjiang/all datas/print") library(xlsx) # reading ux and sy k1<-read.xlsx("doty.xlsx",sheetName="600",header=TRUE) k2<-read.xlsx("doty.xlsx",sheetName="1khz",header=TRUE) k3<-r...
mit
R
c699267ee17e76f60e71c35b20a22ee06f5b3fa8
Update runShinyApp.r
xiaodaigh/shinydistro
windows/runShinyApp.r
windows/runShinyApp.r
.libPaths("./R-Portable/App/R-Portable/library") # you need the full path to portable chrome browser.path <- file.path(getwd(),"GoogleChromePortable/GoogleChromePortable.exe") options(browser = "./GoogleChromePortable/GoogleChromePortable.exe") shiny::runApp("./yourApp/Shiny/",port=8888,launch.browser=TRUE)
options(browser = "./GoogleChromePortable/GoogleChromePortable.exe") .libPaths("./R-Portable/App/R-Portable/library") shiny::runApp("./yourApp/Shiny/",port=8888,launch.browser=TRUE)
mit
R
0cbb6269af8d44c96c4fd8157a582100483db9cd
Add test in global environment
klmr/modules,klmr/modules
inst/tests/test-path.r
inst/tests/test-path.r
context('Find module path relative files') test_that('module_file works in global namespace', { expect_that(module_file(), equals(getwd())) expect_true(nchar(module_file('run-all.r')) > 0) throws_error(module_file('XXX-does-not-exist', mustWork = TRUE), 'no file found') }) test_that('modu...
context('Find module path relative files') test_that('module_file works in global namespace', { expect_that(module_file(), equals(getwd())) expect_true(nchar(module_file('run-all.r')) > 0) throws_error(module_file('XXX-does-not-exist', mustWork = TRUE), 'no file found') }) test_that('modu...
apache-2.0
R
4fc64e95a9c0d9415b11315ccb03c2d45ca6a727
Change git repository list's URL
koji-to/effort_calculator,koji-to/effort_calculator,koji-to/effort_calculator
generate_git_clone_sh.r
generate_git_clone_sh.r
####### generate .sh script for "git clone" ##### Set git directory structure file path gitweb<-"http://git.chromium.org/gitweb/?a=project_index" ##### shell.df<-read.csv(gitweb,header=F) ### save git repository tree in local write.table(shell.df,"chromium_git_repo_tree.txt",col.names=F,row.names=F,quote=F,append=F) ...
####### generate .sh script for "git clone" ##### Set git directory structure file path gitweb<-"https://git.chromium.org/gitweb/?a=project_index" ##### shell.df<-read.csv(gitweb,header=F) ### save git repository tree in local write.table(shell.df,"chromium_git_repo_tree.txt",col.names=F,row.names=F,quote=F,append=F) ...
mit
R
5fbcc54a369737b9ebbd60f9ec5fc12e840bcdf3
add pre and post season model runs
PSC-CoTC/PSC-FRAM-Admin,PSC-CoTC/PSC-FRAM-Admin
config/create_import_config.r
config/create_import_config.r
#fram.db.name <- "./fram db/CohoFRAMVB2015Pre&PostNew.mdb" #fram.run.name <- "bkCoho2015Post" ########### 2015 Post Season Catch ################# #fram.db.name <- "./fram db/Final pre and post databases/FramVS2-PSC-Coho-PostSeason.mdb" #fram.run.name <- "bc-bkCoho2015 Final" #run.year <- 2015 ########### 2014 P...
fram.db.name <- "./fram db/CohoFRAMVB2015Pre&PostNew.mdb" fram.run.name <- "bkCoho2015Post"
mit
R
51f312a1667e76ae6387520e8f682b561ac001dc
Fix test check error
klmr/modules,klmr/modules
tests/testthat/test-basic.r
tests/testthat/test-basic.r
context('Basic import test') test_that('module can be imported', { a = import('a') expect_true(is_module_loaded(module_path(a))) expect_true('double' %in% ls(a)) }) test_that('import works in global namespace', { local({ # Necessary since private names are not exported to global environment ...
context('Basic import test') test_that('module can be imported', { a = import('a') expect_true(is_module_loaded(module_path(a))) expect_true('double' %in% ls(a)) }) test_that('import works in global namespace', { local({ a = import('a') on.exit(unload(a)) # To get rid of attached opera...
apache-2.0
R
9aceeb52320921f95ef7d41114ac935ac6971c0f
Fix test that unloads the knitr package
klmr/modules,klmr/modules
tests/testthat/test-knitr.r
tests/testthat/test-knitr.r
context('Test that modules works with knitr') check_knitr = function () skip_if_not_installed('knitr') safe_unload_namespace = function (ns) { users = getNamespaceUsers(ns) for (user in users) safe_unload_namespace(user) unloadNamespace(ns) } test_that('modules are found when knitr is not loaded', { ...
context('Test that modules works with knitr') check_knitr = function () skip_if_not_installed('knitr') test_that('modules are found when knitr is not loaded', { check_knitr() # Ensure knitr isn’t loaded unloadNamespace('knitr') expect_paths_equal(script_path(), getwd()) }) test_that('modules are foun...
apache-2.0
R
2ab36212046595a1268e2853d119b566136d90c0
fix factor df subset + add test
mschubert/narray,mschubert/narray
subset.r
subset.r
#' Subsets an array using a list with indices or names #' #' @param X The array to subset #' @param index A list of vectors to use for subsetting, or vector if along is given #' @param along Along which dimension to subset if index is a vector; default is last dimension #' @return The subset of the array s...
#' Subsets an array using a list with indices or names #' #' @param X The array to subset #' @param index A list of vectors to use for subsetting, or vector if along is given #' @param along Along which dimension to subset if index is a vector; default is last dimension #' @return The subset of the array s...
apache-2.0
R
9af45ce5e0b45a94ce56c6dbdc07f51b07182d0b
Update 2014_PR_config.r
PSC-CoTC/PSC-FRAM-Admin,PSC-CoTC/PSC-FRAM-Admin
config/2014_PR_config.r
config/2014_PR_config.r
#note: here "pre.season" means "original BK post-season" for the Periodic Report comparison tables run.year <- 2014 post.season.fram.db <- "./fram db/PeriodicReportdb/FramVS2-PSC-Coho-Backwards-redo 2010-2016 January 2019 products.mdb" post.season.run.name <- "bc-bkCoho2014 step 3" post.season.tamm <- "./fram db/Perio...
run.year <- 2014 post.season.fram.db <- "./fram db/PeriodicReportdb/FramVS2-PSC-Coho-Backwards-redo 2010-2016 January 2019 products.mdb" post.season.run.name <- "bc-bkCoho2014 step 3" post.season.tamm <- "./fram db/PeriodicReportdb/updated2010-2016TAMMfiles/BK 2014 January 2019 redo step 3.xlsm" post.season.tamm.fish...
mit
R
40a6df1eded6bf3d2850bd789a1e5f3945584a96
remove debugging statements
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 read using this interface. #' #' If you wish to read non-vanilla R objects, such as those #' containing external pointers to C structures, see #' \code{\link{s3normalize}}. #' #' @seealso \code{\link{s...
#' Read an R object in S3 by key #' #' Any type of object that can be serialized as an RDS file #' is capable of being read using this interface. #' #' If you wish to read non-vanilla R objects, such as those #' containing external pointers to C structures, see #' \code{\link{s3normalize}}. #' #' @seealso \code{\link{s...
mit
R
b7a8dd7b4f272af9d34445dbeea21dbe60663334
fix direction edge.data.frame problem
shiva1387/keggParser,etheleon/keggParser,etheleon/keggParser,shiva1387/keggParser
kegg.0500.igraphMetabolism.r
kegg.0500.igraphMetabolism.r
#!/usr/bin/env Rscript library(dplyr, warn.conflicts=FALSE) library(magrittr) library(igraph) args = commandArgs(T) args = "~/newMeta4j2/misc/" relationships <- list.files(args[1]) %>% grep("rels$", ., value=T) %>% paste(args[1], ., sep="/") ...
#!/usr/bin/env Rscript library(dplyr, warn.conflicts=FALSE) library(magrittr) library(igraph) args = commandArgs(T) args = "~/newMeta4j2/misc/" relationships <- list.files(args[1]) %>% grep("rels$", ., value=T) %>% paste(args[1], ., sep="/") ...
mit
R
e4714d0894e7e981a06795be59d63a70ae19ecbd
Make themes into functions
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 = function ()...
#' 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
5170b82ec68caaaf9df7b42aadf174fd6d4a2f38
add tbl_df class to lambda (fixes #19)
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
64966a1e02b82f676c8ed7f89ab250481cb01148
Update document.
snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3,snakamura/q3
q3/docs/FolderEmptyAction.rd
q3/docs/FolderEmptyAction.rd
=begin =FolderEmptyANV ݑIĂtH_̑SẴbZ[W폜܂B̃AJEgɃS~iS~tO̗tH_jꍇɂ́ÃtH_ɃbZ[WړAȂꍇɂ͒ڃbZ[W폜܂B AΏۂ̃bZ[WS~܂̓XptH_iXptO̗tH_jɂꍇAS~̗LɊւ炸ڃbZ[W폜܂B == Ȃ ==LȃEBhEEr[ *CEBhE =end
=begin =FolderEmptyANV ݑIĂtH_̑SẴbZ[W폜܂B == Ȃ ==LȃEBhEEr[ *CEBhE =end
mit
R
6a7436d26bdf1073bd4ba577dc7bd98f7c846c60
Update uvoz_tabel.r
ZavbiA/APPR-2017
uvoz/uvoz_tabel.r
uvoz/uvoz_tabel.r
# 2. faza: Uvoz podatkov 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(xpath="//table[@class...
# 2. faza: Uvoz podatkov # Funkcija, ki uvozi število medalj po državah iz Wikipedije uvozi.medalje <- function() { link <- "https://en.wikipedia.org/wiki/All-time_Olympic_Games_medal_table" stran <- html_session(link) %>% read_html() tabela <- stran %>% html_nodes(xpath="//table[@class='wikitable sortable']") %...
mit
R
449fe052a2b229dc18cd5e02a1a2a81d15199758
Update get_length_and_gc_content.r code for latest bioc change
SANBI-SA/tools-iuc,pavanvidem/tools-iuc,natefoo/tools-iuc,loraine-gueguen/tools-iuc,nekrut/tools-iuc,jj-umn/tools-iuc,pjbriggs/tools-iuc,galaxyproject/tools-iuc,dpryan79/tools-iuc,galaxyproject/tools-iuc,pavanvidem/tools-iuc,abretaud/tools-iuc,nsoranzo/tools-iuc,davebx/tools-iuc,dpryan79/tools-iuc,gregvonkuster/tools-i...
tools/goseq/get_length_and_gc_content.r
tools/goseq/get_length_and_gc_content.r
# originally by Devon Ryan, https://www.biostars.org/p/84467/ options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } ) # we need that to not crash galaxy with an UTF8 error on German LC settings. loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") suppressPackag...
# originally by Devon Ryan, https://www.biostars.org/p/84467/ options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } ) # we need that to not crash galaxy with an UTF8 error on German LC settings. loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8") suppressPackag...
mit
R
c4e5e869b2f2faf4fd73f14d9f703bf071b74709
Set up packages after loading
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 = 'http://cran.ma.imperial.ac.uk/'), menu.graphics = FALSE, # Seriously, WHAT THE FUCK, R!? import.path = '~/Projects/R', devtools.name = 'Konrad Rudolph', devtools.desc...
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 = '~/Projects/R', devtools.name = 'Konrad Rudolph', devtools.desc...
apache-2.0
R
68c15bc1e21d2ce0eecc7d31127cdd148de7bc3f
Add zoo lib
alexbbt/info370final,alexbbt/info370final
data-prep.r
data-prep.r
library(reshape2) library(zoo) ################# ### Data Prep ### ################# data <- read.csv('./data/training.csv') # Factorize numeric data points data$floors <- factor(data$floors) data$waterfront <- as.logical(data$waterfront) # could just be a factor data$view <- factor(data$view) data$condition <- facto...
library(reshape2) data <- read.csv('./data/training.csv') data$floors <- factor(data$floors) data$waterfront <- as.logical(data$waterfront) # could just be a factor data$view <- factor(data$view) data$condition <- factor(data$condition) data$grade <- factor(data$grade) data$yr_built <- factor(data$yr_built) data$yr_r...
mit
R
193874bda446c138272dc4691961c09435b2e3a4
Update ui.r
aleksandrov2/APPR-2015-16
shiny/ui.r
shiny/ui.r
library(shiny) shinyUI( ui <- fluidPage( titlePanel("Analiza dolga in primankljaja držav v Evropski uniji"), tabsetPanel( tabPanel("Dolg", sliderInput(inputId="leto_1",label="Leto",min=2006,max=2014,value=2007,sep=""), plotOutput("dolg")), tabPanel("Deficit", ...
library(shiny) shinyUI( ui <- fluidPage( titlePanel("Analiza dolga in primankljaja držav v Evropski uniji"), tabsetPanel( tabPanel("Dolg", sliderInput(inputId="leto_1",label="Leto",min=2006,max=2014,value=2007,sep=""), plotOutput("dolg")), tabPanel("Deficit", ...
mit
R
6fe2bb5e9bb4aec33bbc17bf8325cbc9d495ba5d
use biomart for lincs annotations
mschubert/narray,mschubert/narray
summarize.r
summarize.r
.b = import('../base') .s = import('./split') .m = import('./map') .bi = import('./bind') #' Summarize a matrix analogous to a grouped df in dplyr #' #' @param x A matrix #' @param from Names that match the dimension `along` #' @param to Names that this dimension should be summarized to #' @param along Alo...
.b = import('../base') .s = import('./split') .m = import('./map') .bi = import('./bind') `%>%` = magrittr::`%>%` #' Summarize a matrix analogous to a grouped df in dplyr #' #' @param x A matrix #' @param from Names that match the dimension `along` #' @param to Names that this dimension should be summarized...
apache-2.0
R
dd46db0bc7338c54072f7db072731763b126b2c3
update scrapte30min for full path
isithot/isithotrightnow,isithot/isithotrightnow,isithot/isithotrightnow,isithot/isithotrightnow,isithot/isithotrightnow
cronscripts/scrape30min.r
cronscripts/scrape30min.r
#!/usr/bin/R # File: scrape30min.r # stefan contractor, mat lipson and james goldie # Description: # This is a script run every half hour to scrape current observations # It is run through crontab, editable with: crontab for (state in c("D", "N", "Q", "S", "T", "V", "W")) { download.file( paste0("ftp://ftp.bom...
#!/usr/bin/R # File: scrape30min.r # stefan contractor, mat lipson and james goldie # Description: # This is a script run every half hour to scrape current observations # It is run through crontab, editable with: crontab for (state in c("D", "N", "Q", "S", "T", "V", "W")) { download.file( paste0("ftp://ftp.bom...
mit
R
95d10b76cd47acf49d73ae045fa987e4e0d3cb6e
Update uvoz.r
Anchiqua/APPR-2015-16
uvoz/uvoz.r
uvoz/uvoz.r
# 2. faza: Uvoz podatkov library(dplyr) library(ggplot2) require(jsonlite) require(httr) require(zoo) #uvozimo podatke r <- GET("http://www.nhl.com/stats/rest/grouped/skaters/season/skatersummary?cayenneExp=seasonId=20142015%20and%20gameTypeId=2") text <- content(r, "text") data <- fromJSON(content(r, "text")) tabela ...
# 2. faza: Uvoz podatkov #uvozimo podatke require(jsonlite) require(httr) r <- GET("http://www.nhl.com/stats/rest/grouped/skaters/season/skatersummary?cayenneExp=seasonId=20142015%20and%20gameTypeId=2") text <- content(r, "text") data <- fromJSON(content(r, "text")) tabela <- data.frame(data) #omejimo na manj kategori...
mit
R
61353b0bf0b1caf6cc7246474e6a597468c12fe7
Update fRH.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/fRH.r
R/fRH.r
#' fRH #' #' Return relative humidity from air temperature (Celsius) and Dew point (Celsius); #' #' @param t numeric Vector or value of air temperature in Celsius degree. #' @param td numeric Vector or value of dew point temperature in Celsius degree. #' @return res numeric relative humidity value #' #' #' @author Is...
#' fRH #' #' Return relative humidity from air temperature (Celsius) and Dew point (Celsius); #' #' @param t numeric Vector or value of air temperature in Celsius degree. #' @param td numeric Vector or value of dew point temperature in Celsius degree. #' @return res numeric relative humidity value #' #' #' @author Is...
mit
R
b3f7d28bcf9714b1b42ef587c09dc49a3b9408bc
Fix incorrect total calculation in run.r
metaeducation/ren-c-test,metaeducation/ren-c-test,rebolsource/rebol-test,rebolsource/rebol-test
run.r
run.r
Rebol [ Title: "Core tests run" File: %core-tests-run.r Author: "Ladislav Mecir" Date: 18-Nov-2010/11:23:15+1:00 Purpose: "Core tests" ] do %test-framework.r ; Example runner for the REBOL/Core tests which chooses ; appropriate flags depending on the interpreter version. do-core-tests: has [ flags crash-flags ...
Rebol [ Title: "Core tests run" File: %core-tests-run.r Author: "Ladislav Mecir" Date: 18-Nov-2010/11:23:15+1:00 Purpose: "Core tests" ] do %test-framework.r ; Example runner for the REBOL/Core tests which chooses ; appropriate flags depending on the interpreter version. do-core-tests: has [ flags crash-flags ...
apache-2.0
R
28af87384619bfef6524d93d9826cf963e071095
Update run_irods_msvc_test.r
leesab/irods,leesab/irods,leesab/irods,leesab/irods,leesab/irods,leesab/irods,leesab/irods
examples/microservices/run_irods_msvc_test.r
examples/microservices/run_irods_msvc_test.r
test { irods_msvc_test( "1", "2", "3", *out ); writeLine('stdout', *out); } input null output ruleExecOut
test { irods_msvc_test( "1", "2", "3" ); } input null output ruleExecOut
bsd-3-clause
R
c6bbc4e69d16a897d5f3453ce3b4963ecffe8914
fix construct
mschubert/narray,mschubert/narray
R/construct.r
R/construct.r
#' A wrapper around reshape2::acast using a more intuitive formula syntax #' #' @param formula A formula: value [+ value2 ..] ~ axis1 [+ axis2 + axis n ..] #' @param data A data frame (TODO: handle envs, NULL, etc.) #' @param fill Value to fill array with if undefined #' @param fun.aggregate ...
#' A wrapper around reshape2::acast using a more intuitive formula syntax #' #' @param formula A formula: value [+ value2 ..] ~ axis1 [+ axis2 + axis n ..] #' @param data A data frame (TODO: handle envs, NULL, etc.) #' @param fill Value to fill array with if undefined #' @param fun.aggregate ...
apache-2.0
R
e858818f6d0e898862a3d20aed4e47f5c0a98de9
Set the values of all gobals to NA & print globals
jmousseau/Stain
R/slurm-job.r
R/slurm-job.r
#' NOAARequest R6 object. #' #' An interface to SLURM bash scripts and their submissions. SlurmJob <- R6::R6Class("SlurmJob", public = list( main_file = NULL, params = list(), initialize = function(main_file, source_files = list()) { if (!missing(main_file)) { sel...
#' NOAARequest R6 object. #' #' An interface to SLURM bash scripts and their submissions. SlurmJob <- R6::R6Class("SlurmJob", public = list( main_file = NULL, params = list(), initialize = function(main_file, source_files = list()) { if (!missing(main_file)) { sel...
mit
R
c8f8c24786fc33f54d8a34fe1c423dfdaff300c4
fix previous commit.
akr/clockcount,akr/clockcount
README.rd
README.rd
= clockcount clockcount access processor specific clock counter. == Usage require 'clockcount' p ClockCount() == Sample Script to Mesure Clock Speed % ruby sample.rb 0x18a9c616f16d5 0x18a9caca6f864 1.2640276924433[GHz] 3.97282828038034[day] 0x18a9cf9ac9d9c 1.29211869909757[GHz] 3.88646950425614[da...
= clockcount clockcount access processor specific clock counter. == Usage require 'clockcount' p ClockCount() == Sample Script to Mesure Clock Speed % ruby sample.rb 0x18a9c616f16d5 0x18a9caca6f864 1.2640276924433[GHz] 3.97282828038034[day] 0x18a9cf9ac9d9c 1.29211869909757[GHz] 3.88646950425614[da...
bsd-2-clause
R
9062f268def25857880fdba5c74a2326f02a8316
use array module for splitting
mschubert/narray,mschubert/narray
split.r
split.r
.s = import('./subset') #' Splits and array along a given axis, either totally or only subsets #' #' @param X An array that should be split #' @param along Along which axis to split; use -1 for highest dimension #' @param subsets Whether to split each element or keep some together #' @return A list ...
.s = import('./subset') #' Splits and array along a given axis, either totally or only subsets #' #' @param X An array that should be split #' @param along Along which axis to split #' @param subsets Whether to split each element or keep some together #' @return A list of arrays that combined make u...
apache-2.0
R
44545885689363dc02f94af0d154072145ed88d0
remove margin, add method
efcaguab/paco
R/PACo.r
R/PACo.r
#' Performs PACo/procustes analysis #' @param D a list with the data #' @param nperm Number of permutations #' @param seed Seed if results need to be reproduced #' @param method The method to permute matrices with: "r0", "r1", "r2", "c0", "swap", "quasiswap" #' @export #' @examples #' data(gopherlice) #' library(ape) ...
#' Performs PACo/procustes analysis #' @param D a list with the data #' @param nperm Number of permutations #' @param seed Seed if results need to be reproduced #' @param margin The margin to sample (1 to sample rows, 2 to sample columns) #' @export #' @examples #' data(gopherlice) #' library(ape) #' gdist <- cophenet...
mpl-2.0
R
2a64fd9ef670b1bd5f6c6b9cecabf3aec984cde1
fix regular expression
koji-to/effort_calculator,koji-to/effort_calculator,koji-to/effort_calculator
generate_git_log_main_sh.r
generate_git_log_main_sh.r
######## generate .sh script for "git log" about main log ######## git log option: "%H%ae%ad%ce%cd" shell.df<-read.csv("chromium_git_repo_tree.txt",header=F) shell_top.df<-matrix(c("#!/bin/sh","logdir=\"`pwd`/git_log_main/\"","hmdir=\"`pwd`\""),3,1) write.table(shell_top.df,"git_log_main.sh",row.names=F,col.names=F,q...
######## generate .sh script for "git log" about main log ######## git log option: "%H%ae%ad%ce%cd" shell.df<-read.csv("chromium_git_repo_tree.txt",header=F) shell_top.df<-matrix(c("#!/bin/sh","logdir=\"`pwd`/git_log_main/\"","hmdir=\"`pwd`\""),3,1) write.table(shell_top.df,"git_log_main.sh",row.names=F,col.names=F,q...
mit
R
3f95cfc98de0dd9acea865c288d215aa57b81422
fix genecloud error
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/Annotation/mafReport.r
lib/Annotation/mafReport.r
library(mafreport) #https://github.com/PoisonAlien/maftools/issues/532 library("wordcloud") devtools::source_gist(id = "https://gist.github.com/PoisonAlien/3f8752a89c1d63f64afe55b441621223") mafFileList = parSampleFile1 #reportOutDir = "." reportOutDir = getwd() if(parFile1 != ''){ clinicalData = parFile1 #need ...
library(mafreport) mafFileList = parSampleFile1 #reportOutDir = "." reportOutDir = getwd() if(parFile1 != ''){ clinicalData = parFile1 #need also define clinicalFeatures in rCode }else{ clinicalData = NULL clinicalFeatures = NULL } if (!exists("genome")) { genome="hg19" } interestedGenes = NULL if(exists...
apache-2.0
R
bb08c1cdbd64dc8cc17e3c0cde8151c5110a0594
Fix problems with rename due to bug in dplyr
petercarrjones/icc-data,petercarrjones/icc-data,petercarrjones/icc-data
load.r
load.r
#Load Packages library(XML) library(tidyr) library(stringr) library(magrittr) library(plyr) library(dplyr) library(RWeka) #Remove non-words from the raw icc texts get_real_words <- function(word) { word[!stringr::str_detect(word, "[^a-z ]")] } #' Remove unreasonable n-grams containing characters other than letters...
#Load Packages library(XML) library(tidyr) library(stringr) library(magrittr) library(plyr) library(dplyr) library(RWeka) #Remove non-words from the raw icc texts get_real_words <- function(word) { word[!stringr::str_detect(word, "[^a-z ]")] } #' Remove unreasonable n-grams containing characters other than letters...
mit
R
7bd62e770c6ac4d8fe22931f34f10811b9c9f0e3
Fix module finding
klmr/modules,klmr/modules
R/find_module.r
R/find_module.r
#' Find a module’s source code location #' #' @param module Expression containing the fully qualified module name #' @return The full path to the corresponding module source code location. If #' multiple hits are found, return the one with the highest priority, that is #' coming earlier in the search path, with the loc...
#' Find a module’s source code location #' #' @param module Expression containing the fully qualified module name #' @return The full path to the corresponding module source code location. If #' multiple hits are found, return the one with the highest priority, that is #' coming earlier in the search path, with the loc...
apache-2.0
R
299e87100adf447438188d7627185a655c3eab2d
Update 1.r
glor/R,glor/R
aufgaben/blatt06/1.r
aufgaben/blatt06/1.r
#6.1 # Unabhängigkeit der Observation gegeben #Prüfen der Normalerverteilung mit Boxplot: boxplot(cattle$Widerrist, cattle$Rumpf) # —> Widerrist ist nicht normalerveteilt —> Spearman cor(cattle, use = "all.obs", method = "spearman”) #6.2 #Da hier bereits gerichtete Hypothesen sinnvoll sind: # H0: Die Korrelat...
bsd-2-clause
R
da9de162b4f62000bdef86c0a68e5554cea60a6e
use mapreduce for uploaddata.r example
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") # 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....
apache-2.0
R
e4de0aba1fb5ed379aeafd0e517b4ed4772efcb2
Update 2.r
glor/R,glor/R
aufgaben/blatt02/2.r
aufgaben/blatt02/2.r
#Blatt 2 #2.1 sorte = c(rep(1,15), rep(2,12), rep(3, 20)) gewicht = c(6.22,5.75,6.4,4.6,3.25,4.5,4.8,5.88,5.8,6.1,5.58,6.01,5.62,6.72,8.55,4.28,7.7,6.4,7.77,7.37,4.2,7.05,6.45,8.93,5.9,5.94,6.39, 7.13,8.78,6.06,7.93,9.1,8,7.55,8.32,8.8,12.63,8.19,6.5,6.84,7.02,9.39,7.38,7.39,6.99,8.27,6.7) tabelle = data.frame(So...
#Blatt 2 #2.1 sorte = c(rep(1,15), rep(2,12), rep(3, 20)) gewicht = c(6.22,5.75,6.4,4.6,3.25,4.5,4.8,5.88,5.8,6.1,5.58,6.01,5.62,6.72,8.55,4.28,7.7,6.4,7.77,7.37,4.2,7.05,6.45,8.93,5.9,5.94,6.39, 7.13,8.78,6.06,7.93,9.1,8,7.55,8.32,8.8,12.63,8.19,6.5,6.84,7.02,9.39,7.38,7.39,6.99,8.27,6.7) tabelle = data.frame(So...
bsd-2-clause
R
4e98dc48499ead94f8fb7345be79ab863c1b5b6f
Update test.r
snowch/biginsight-examples,snowch/biginsight-examples
examples/BigR/test.r
examples/BigR/test.r
if (!dir.exists('./lib')) { # 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', lib='./lib', quiet=FALSE) inst...
if (!dir.exists('./lib')) { # 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', lib='./lib', quiet=FALSE) inst...
apache-2.0
R
7f4fc6ca1a9471486676387e3d6e132d4309f684
Update HSI_index.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/HSI_index.r
R/HSI_index.r
#' HSI_index #' #' Computes the Heat Strain Index. HSI is the ratio of the demand for sweat evaporation to capacity of evaporation (Ereq on Emax). This denotes also the percent of skin wettedness, which is a good predictor of warm discomfort. #' #' @param numeric t Air temperature in Celsius degrees. #' @param numeric ...
#' HSI_index #' #' Computes the Heat Strain Index. HSI is the ratio of the demand for sweat evaporation to capacity of evaporation (Ereq on Emax). This denotes also the percent of skin wettedness, which is a good predictor of warm discomfort. #' #' @param numeric t Air temperature in Celsius degrees. #' @param numeric ...
mit
R
e2cd84ba600d3ac0e251b918488be89fd58f70f5
Update 2017_report_config.r
PSC-CoTC/PSC-FRAM-Admin,PSC-CoTC/PSC-FRAM-Admin
config/2017_report_config.r
config/2017_report_config.r
run.year <- 2017 post.season.fram.db <- "./fram db/Final pre and post databases/FramVS2-PSC-Coho-Backwards-redo 2010-2016 January 2019 products with BK2017 take2.mdb" post.season.run.name <- "bc-BK Coho 2017 final take2" post.season.tamm <- "./fram db/TAMM_Files_Postseason/BK Coho2017__Sht1Mtrx step 2 final take...
run.year <- 2017 post.season.fram.db <- "./fram db/Final pre and post databases/FramVS2-PSC-Coho-Backwards-redo 2010-2016 January 2019 products with BK2017 take2.mdb" post.season.run.name <- "bc-BK Coho 2017 final take2" post.season.tamm <- "./fram db/TAMM_Files_Postseason/BK Coho2017__Sht1Mtrx step 2 final take...
mit
R
b4602bc32e392091f67de5af7a0b785bd7437996
Fix typos
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(topicmodels) 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) ) stopwords("finnish") a <- tm_map(a, removeWords, stopword...
mit
R
0209d9d5c430a4d5e93c92ba7a7af64868466c5b
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
16ac1dab6c3333df1a1eb041f5d09bda3001edb7
test for CV and grid_search
chrinide/optunity,claesenm/optunity,chrinide/optunity,claesenm/optunity,chrinide/optunity,MarkAWard/optunity,MarkAWard/optunity,claesenm/optunity,chrinide/optunity,MarkAWard/optunity,MarkAWard/optunity,claesenm/optunity
wrappers/R/inst/tests/testthat/test-cv.r
wrappers/R/inst/tests/testthat/test-cv.r
context("Cross-validation") x <- matrix(runif(50*5), 50, 5) y <- x[,1] + 0.5*x[,2] + 0.1*runif(50) test_that("cv.setup can be created", { cv <- cv.setup(x, y, score=score.neg.mse, num_folds = 10, num_iter = 2) expect_equal( cv$supervised, TRUE ) expect_equal( nrow(cv$folds), 50 ) expect_equal( ncol(cv$folds)...
context("Cross-validation") x <- matrix(runif(50*5), 50, 5) y <- x[,1] + 0.5*x[,2] + 0.1*runif(50) test_that("cv.setup can be created", { cv <- cv.setup(x, y, score=score.neg.mse, num_folds = 10, num_iter = 2) expect_equal( cv$supervised, TRUE ) expect_equal( nrow(cv$folds), 50 ) expect_equal( ncol(cv$folds)...
bsd-3-clause
R
51d83bcec5877c440b43cebe7338341a4285cb31
Remove all output files after job completes
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
30064ce66674ca31d0bebf7c38c2a15fae3c0bf3
Rename function
mattm/active-user-cohort-analysis
active-users.r
active-users.r
CSV_PATH = "data/complete.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 = FA...
CSV_PATH = "data/complete.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 = FA...
mit
R
438e364ab7ffabc41d5b53bf519aca0492c84de5
remove sink for port binding
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
R/bind_avail.r
R/bind_avail.r
#' Binds an rzmq to an available port in given range #' #' @param socket An rzmq socket object #' @param range Numbers to consider (e.g. 6000:8000) #' @param iface Interface to listen on #' @param n_tries Number of ports to try in range #' @return The port the socket is bound to bind_avail = function(s...
#' Binds an rzmq to an available port in given range #' #' @param socket An rzmq socket object #' @param range Numbers to consider (e.g. 6000:8000) #' @param iface Interface to listen on #' @param n_tries Number of ports to try in range #' @return The port the socket is bound to bind_avail = function(s...
apache-2.0
R
165c8937da5839706e357036192d9ed70794c839
Update ui.r
aleksandrov2/APPR-2015-16
shiny/ui.r
shiny/ui.r
library(shiny) shinyUI( ui <- fluidPage( titlePanel("Analiza dolga in primankljaja držav v Evropski uniji"), sidebarLayout( sidebarPanel( sliderInput(inputId="leto_1",label="Leto",min=2006,max=2014,value=2007,sep=""), sliderInput(inputId="leto_2",label="Leto",min=2006,max=2014,value...
library(shiny) shinyUI( ui <- fluidPage( titlePanel("Analiza dolga in primankljaja držav v Evropski uniji"), sidebarLayout( sidebarPanel( sliderInput(inputId="leto_1",label="Leto",min=2006,max=2014,value=2007,sep=""), sliderInput(inputId="leto_2",label="Leto",min=2006,max=2014,value...
mit
R
d8bbd95c40c67658f1de4316d0f4addce6dfe450
order missed genes
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/scRNAMarkerGenes.r
lib/scRNA/scRNAMarkerGenes.r
library(Seurat) library(ggplot2) library(patchwork) finalList<-readRDS(parFile1) geneFile<-parFile2 obj<-finalList$obj celltypes<-read.table(geneFile, sep="\t", header=T, stringsAsFactors = F) celltypes$Gene<-gsub("\\s.+", "", celltypes$Gene) celltypes$Gene<-toupper(celltypes$Gene) missGenes<-celltypes[!(celltypes...
library(Seurat) library(ggplot2) finalList<-readRDS(parFile1) geneFile<-parFile2 obj<-finalList$obj celltypes<-read.table(geneFile, sep="\t", header=T, stringsAsFactors = F) celltypes$Gene<-gsub("\\s.+", "", celltypes$Gene) celltypes$Gene<-toupper(celltypes$Gene) missGenes<-celltypes[!(celltypes$Gene %in% rownames...
apache-2.0
R
e3b93529179b1be8f9204b1acd51656969354aea
Fix plot legend.
danluu/BitFunnel,danluu/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel,danluu/BitFunnel,BitFunnel/BitFunnel
src/Scripts/plot-qwords.r
src/Scripts/plot-qwords.r
library("ggplot2") library("reshape") setwd("~/dev/BitFunnel/src/Scripts") queries <- read.csv(header=TRUE, file="/tmp/QueryPipelineStatistics.csv") # Create column to graph vs. term position. pos = seq(1, length(queries$quadwords)) df_temp <- data.frame(pos, queries$quadwords, queries$cachelines) # Rename columns t...
library("ggplot2") library("reshape") setwd("~/dev/BitFunnel/src/Scripts") queries <- read.csv(header=TRUE, file="/tmp/QueryPipelineStatistics.csv") pos = seq(1, length(queries$quadwords)) df_temp <- data.frame(pos, queries$quadwords, queries$cachelines) df <- melt(df_temp, id=c("pos")) png(filename="qwords.png",wid...
mit
R
92dc92a28f46d567570ed233652d227b4d62a6db
fix localhost timeout: takes ms, not s
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
tests/testthat/helper-util.r
tests/testthat/helper-util.r
send = function(sock, data) { send_socket(sock, data) } recv = function(p, sock, timeout=3L) { event = poll_socket(list(sock), timeout=timeout * 1000) if (is.null(event)) return(recv(p, sock, timeout=timeout)) else if (event[1]) { re = receive_multipart(sock) if (length(re) == 1...
send = function(sock, data) { send_socket(sock, data) } recv = function(p, sock, timeout=3L) { event = poll_socket(list(sock), timeout=timeout * 1000) if (is.null(event)) return(recv(p, sock, timeout=timeout)) else if (event[1]) { re = receive_multipart(sock) if (length(re) == 1...
apache-2.0
R
68f0146fdf7c84346a48fbb7195613a14e36b896
Return WHAT-DIR location after a CD shell command
giuliolunati/ren-c,codebybrett/ren-c,hostilefork/rebol,rgchris/ren-c,hostilefork/rebol,draegtun/ren-c,draegtun/ren-c,giuliolunati/ren-c,draegtun/ren-c,kealist/ren-c,kealist/ren-c,codebybrett/ren-c,codebybrett/ren-c,hostilefork/rebol,rgchris/ren-c,kealist/ren-c,codebybrett/ren-c,hostilefork/rebol,codebybrett/ren-c,keali...
src/mezz/mezz-shell.r
src/mezz/mezz-shell.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Shell-like Command Functions" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Shell-like Command Functions" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2...
apache-2.0
R
150171d75bb5b6e2756d92fe7df653ff556a0276
Fix typos
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
44753dd99b53893084aa94f8ca3352044c30a8a2
Fix `module_name` bug
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
4bd825a323a5498d9d3576d79f947b2d2e50e444
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...
mit
R
e1468ef1fcfcb9799c170fefd5c05b28629d328e
Add RColorBrewer.
ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/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/install-class-libs.R") class_name = "2019 Fall Stat 131a" class_libs = c( "cran/alluvial", "0.1-2", "cran/DAAG", "1.22", "cran/faraway", "1.0.7", "cran/fdrtool", "1.2.15", "cran/gpairs", "1.2", "cran/gplots", "3.0.1.1", "cran/hexbin", "1.27.3", "cran/leaps", "2.9", ...
#!/usr/bin/env Rscript source("/tmp/install-class-libs.R") class_name = "2019 Fall Stat 131a" class_libs = c( "cran/alluvial", "0.1-2", "cran/DAAG", "1.22", "cran/faraway", "1.0.7", "cran/fdrtool", "1.2.15", "cran/gpairs", "1.2", "cran/gplots", "3.0.1.1", "cran/hexbin", "1.27.3", "cran/leaps", "2.9", ...
bsd-3-clause
R
653f18794e692938287a96fc01e550320a1e6ff4
include new climate drivers in flattening routine
khufkens/phenor
R/flat_format.r
R/flat_format.r
#' Flatten the format as generated by format_phenocam() #' and format_modis(). Flattening the file format allows #' for substantial speed increases in optimization however #' limits readability. Using the split functionality between #' the format_*() functions and this function allows for easy #' subsetting of datasets...
#' Flatten the format as generated by format_phenocam() #' and format_modis(). Flattening the file format allows #' for substantial speed increases in optimization however #' limits readability. Using the split functionality between #' the format_*() functions and this function allows for easy #' subsetting of datasets...
agpl-3.0
R
e13dd2452f0eed2b48623d89825b56337a687f6c
Edit help description for HandleOvertime function
mattmills49/CFBWinProbability
R/HandleOvertime.r
R/HandleOvertime.r
#' Structure plays correctly for games that went into overtime #' #' This function takes in overtime plays and gets them in the same structure as #' plays in regulation. This function is called from the DataPrep function. You #' really won't need this function on it's own ever. #' @param overtime a data frame contai...
#' Structure plays correctly for games that went into overtime #' #' This function takes in overtime plays and gets them in the same structure as #' plays in regulation. This function is called from the DataPrep function. #' @param overtime a data frame containing overtime plays from the CFB Stats play.csv file #' @r...
mit
R
116587b0c7671c344b3fb23910c2e0b8f10b4cdd
Update libraries.r
aleksandrov2/APPR-2015-16
lib/libraries.r
lib/libraries.r
library(knitr) library(ggplot2) library(dplyr) require(gsubfn) require(rvest) require(xml2) require(ggplot2) library(sp) library(maptools) library(dendextend) # Uvozimo funkcije za pobiranje in uvoz zemljevida. source("lib/uvozi.zemljevid.r", encoding = "UTF-8")
library(knitr) library(ggplot2) library(dplyr) require(gsubfn) require(rvest) require(xml2) require(ggplot2) library(sp) library(maptools) # Uvozimo funkcije za pobiranje in uvoz zemljevida. source("lib/uvozi.zemljevid.r", encoding = "UTF-8")
mit
R
4fe8ae6baea919b21c87ca5ddb9676d4cf1316e9
update read-binary-fixes.r
amsa-code/risky,amsa-code/risky,amsa-code/risky,amsa-code/risky,amsa-code/risky
formats/src/test/resources/read-binary-fixes.r
formats/src/test/resources/read-binary-fixes.r
file = file("target/123456790.track","rb") readSingle = function() readBin(file, single(), size=4, endian="big") readInteger = function() readBin(file, integer(), size=4, endian="big") readLong = function() { a = readBin(file, integer(), size=4, endian="big") b = readBin(file, integer(), size=4, endian="big") # ...
file = file("target/123456790.track","rb") readSingle = function() readBin(file, single(), size=4, endian="big") readLong = function() readBin(file, integer(), size=8, endian="big") readByte = function() readBin(file, integer(), size=1, endian="big") readShort = function() readBin(file, integer(), size=2, endian="big")...
apache-2.0
R
e98988fcda86ce579a9bfa93f933258efe960a45
Update test case for #66
klmr/modules,klmr/modules
inst/tests/test-path.r
inst/tests/test-path.r
context('Find module path relative files') test_that('module_file works in global namespace', { expect_that(module_file(), equals(getwd())) expect_true(nchar(module_file('run-all.r')) > 0) throws_error(module_file('XXX-does-not-exist', mustWork = TRUE), 'no file found') }) test_that('modu...
context('Find module path relative files') test_that('module_file works in global namespace', { expect_that(module_file(), equals(getwd())) expect_true(nchar(module_file('run-all.r')) > 0) throws_error(module_file('XXX-does-not-exist', mustWork = TRUE), 'no file found') }) test_that('modu...
apache-2.0
R
30b171b8161aeddf672206c7a09b5ba28c4711b0
Update steadman_class.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/steadman_class.r
R/steadman_class.r
#' steadman_class #' #' Computes the correspondent Steadman's apparent temperature class. #' #' @param numeric steadman_index Steadman index value. #' @return class of apparent temperature. #' #' #' @author Istituto di Biometeorologia Firenze Italy Alfonso Crisci \email{a.crisci@@ibimet.cnr.it} #' @keywords class, ...
#' steadman_class #' #' Computes the correspondent Steadman's apparent temperature class. #' #' @param numeric steadman_index Steadman index value. #' @return class of apparent temperature. #' #' #' @author Istituto di Biometeorologia Firenze Italy Alfonso Crisci \email{a.crisci@@ibimet.cnr.it} #' @keywords class, ...
mit
R
496cbadbb69d76ac136839f1704d86de939d111e
comment out an unnecessary output
koji-to/effort_calculator,koji-to/effort_calculator,koji-to/effort_calculator
calculate_metrics.r
calculate_metrics.r
#extract commit log from each relase cycle ##### setting section ##### release_cycle<-42#days(= 6 weeks = 1.5month) threshold<-2#commits/release_cycle newest_relase_date<-as.Date("2014-06-20")#ver37 num_release<-8#: a number of past release to trace ##### processing section ##### # import merged git log file git_log....
#extract commit log from each relase cycle ##### setting section ##### release_cycle<-42#days(= 6 weeks = 1.5month) threshold<-2#commits/release_cycle newest_relase_date<-as.Date("2014-06-20")#ver37 num_release<-8#: a number of past release to trace ##### processing section ##### # import merged git log file git_log....
mit
R
fe8b3e0ab737901c19e08ef21411196e43aee48d
Bump version
giuliolunati/ren-c,kealist/ren-c,kealist/ren-c,hostilefork/rebol,mbk/ren-c,kealist/ren-c,mbk/ren-c,rgchris/ren-c,hostilefork/rebol,kealist/ren-c,giuliolunati/ren-c,codebybrett/ren-c,kealist/ren-c,hostilefork/rebol,draegtun/ren-c,rgchris/ren-c,mbk/ren-c,codebybrett/ren-c,rgchris/ren-c,codebybrett/ren-c,draegtun/ren-c,ho...
src/boot/version.r
src/boot/version.r
3.0.0.3.1
2.101.0.3.1
apache-2.0
R
525bb105ad6e41e78bf67c04f7931268b6919400
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){ if (file.exists(filePath) == TRUE){ filePath <- paste(c(str1,"/I",j,...
mit
R
13089edcc2ce3d24e8fd257cf2cd1086354fc6d4
Fix issue #55.
marksteele/basho_bench,mrallen1/basho_bench,GabrielNicolasAvellaneda/basho_bench,basho/basho_bench,basho/basho_bench,basho/basho_bench,mrallen1/basho_bench,mrallen1/basho_bench,fogfish/basho_bench,marksteele/basho_bench,mrallen1/basho_bench,basho/basho_bench,GabrielNicolasAvellaneda/basho_bench,fogfish/basho_bench,Gabr...
priv/common.r
priv/common.r
# Load all the necessary packages, installing missing ones when necessary packages.to.install <- c("plyr", "grid", "getopt", "proto", "ggplot2") for(p in packages.to.install) { print(p) if (suppressWarnings(!require(p, character.only = TRUE))) { install.packages(p, repos = "http://lib.sta...
# Load all the necessary packages, installing missing ones when necessary packages.to.install <- c("plyr", "grid", "getopt", "proto", "ggplot2") for(p in packages.to.install) { print(p) if (suppressWarnings(!require(p, character.only = TRUE))) install.packages(p, repos = "http://lib.stat.cmu.edu/R/CR...
apache-2.0
R
d9212982953dca671b821fa2c1d7502da1dd9bea
Add symlink for stat20data.
berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub
deployments/stat20/image/r-packages/2022-spring-stat-20.r
deployments/stat20/image/r-packages/2022-spring-stat-20.r
#!/usr/bin/env Rscript source("/tmp/class-libs.R") class_name = "2022 Spring Stat 20" class_libs = c( "swirl", "2.4.5", "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", "palmerp...
#!/usr/bin/env Rscript source("/tmp/class-libs.R") class_name = "2022 Spring Stat 20" class_libs = c( "swirl", "2.4.5", "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", "palmerp...
bsd-3-clause
R
1a4ca27ac28d547cb311180363cb65418a79c42d
update openintro version
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.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
52a7d03f1fc43ff252f3d8f2900fb0e6c524ae3a
add library(png)
AndySouth/coverage
coverage_starting.r
coverage_starting.r
#coverage_starting.r #andy south 11/5/2016 #first go at creating some coverage visualisations #git remote add origin git@github.com:AndySouth/coverage.git #but because i set to wrong one first #git remote set-url origin git@github.com:AndySouth/coverage.git #git pull origin master #git push -u origin master dfv <...
#coverage_starting.r #andy south 11/5/2016 #first go at creating some coverage visualisations #git remote add origin https://github.com/AndySouth/coverage.git #git push -u origin master dfv <- data.frame( man = 0.7, cow = 0.3, indoor = 0.6, outdoor = 0.4 ) dfv <- data.frame( man = 0.8, cow = 0.2, in...
mit
R
380f39303ea5684e3b0b6ccff875dcd353d7a066
Update vizualizacija.r
nastja88/APPR-2017
vizualizacija/vizualizacija.r
vizualizacija/vizualizacija.r
# 3. faza: Vizualizacija podatkov library(ggplot2) library(dplyr) library(sp) library(maptools) library(digest) gpclibPermit() uvozi.zemljevid <- function(url, pot.zemljevida, mapa = "../zemljevidi", encoding = "UTF-8", force = FALSE) { ime.zemljevida <- digest(url, algo = "sha1") map ...
# 3. faza: Vizualizacija podatkov library(ggplot2) library(dplyr) library(sp) library(maptools) library(digest) gpclibPermit() source(lib/uvozi.zemljevid.r) uvozi.zemljevid("http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip", "ne_110m_...
mit
R
c15904a562eb1630329ab4e1dbc0d8f25557ce65
Fix x axis label
johnrfleck/water-tools
gauge_daily_five_year_boxplot.r
gauge_daily_five_year_boxplot.r
# box plot of daily flows at selected gauges, in five year bins # Uses USGS dataRetrieval package # tutorial here: https://owi.usgs.gov/R/dataRetrieval.html#1 # Albuquerque gauge to use as example: 08330000 # uses log scale - easier to visualize given variability, particularly # at low end library(dataRetrieval) libra...
# box plot of daily flows at selected gauges, in five year bins # Uses USGS dataRetrieval package # tutorial here: https://owi.usgs.gov/R/dataRetrieval.html#1 # Albuquerque gauge to use as example: 08330000 # uses log scale - easier to visualize given variability, particularly # at low end library(dataRetrieval) libra...
mit
R
1bc452892677b3c1b5a0f4aa2c72eed44258de78
Change the way JSON is served back to writing a file to the disk.
agapow/smartr,thehyve/heim-SmartR,agapow/smartr,thehyve/heim-SmartR,thehyve/heim-SmartR,agapow/smartr,thehyve/naa-SmartR,thehyve/naa-SmartR,thehyve/heim-SmartR,thehyve/naa-SmartR,agapow/smartr
web-app/HeimScripts/heatmap/run.r
web-app/HeimScripts/heatmap/run.r
library(jsonlite) library(reshape2) main <- function(){ df <- loaded_variables[[1]] # SmartR does not support multiple HDD nodes yet fields <- buildFields(df) geneSymbols <- unique(fields["GENESYMBOL"])[,1] #[,1] in order to get a vector, otherwise we get a dataframe patientIDs <-unique(fields["PATIENTID"]...
library(jsonlite) library(reshape2) main <- function(){ df <- loaded_variables[[1]] # SmartR does not support multiple HDD nodes yet fields <- buildFields(df) geneSymbols <- unique(fields["GENESYMBOL"])[,1] #[,1] in order to get a vector, otherwise we get a dataframe patientIDs <-unique(fields["PATIENTID"]...
apache-2.0
R
dd6761cc1cf448ff5810942735520f5b977a044d
Install ottr
berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub
deployments/publichealth/image/r-packages/ph-142.r
deployments/publichealth/image/r-packages/ph-142.r
#!/usr/bin/env Rscript # From https://github.com/berkeley-dsep-infra/datahub/issues/881 print("Installing packages for PH142") source("/tmp/class-libs.R") class_name = "PH142" class_libs = c( "fGarch", "3042.83.2", "SASxport", "1.7.0", "googlesheets", "0.3.0", "googledrive", "1.0.1", "ggrepel", "0.9.0", ...
#!/usr/bin/env Rscript # From https://github.com/berkeley-dsep-infra/datahub/issues/881 print("Installing packages for PH142") source("/tmp/class-libs.R") class_name = "PH142" class_libs = c( "fGarch", "3042.83.2", "SASxport", "1.7.0", "googlesheets", "0.3.0", "googled...
bsd-3-clause
R
f688f341e52417b0952ba675ed4cc49fa0ecdf06
Set new dimension tile
SteveViss/OuranosDB,SteveViss/OuranosDB
prg/fcts_hdf.r
prg/fcts_hdf.r
check_res <- function(lon,lat){ rs = 0 if(all(dim(lat) == dim(lon)) == FALSE){ write("lat/lon lattices with different dimensions...", stderr()) } reso <- round(get_res(lon,lat),digit=3) if(round((range(lat)[2]-range(lat)[1])/nrow(lat),digit=3) != reso){ write("lat resolution is not...
check_res <- function(lon,lat){ rs = 0 if(all(dim(lat) == dim(lon)) == FALSE){ write("lat/lon lattices with different dimensions...", stderr()) } reso <- round(get_res(lon,lat),digit=3) if(round((range(lat)[2]-range(lat)[1])/nrow(lat),digit=3) != reso){ write("lat resolution is not...
mit
R
961c9bf4398e4b23a7416ccd2143ed40fa848d2a
Update zzz.r
syberia/syberia
R/zzz.r
R/zzz.r
.onAttach <- function(...) { load_github_packages(.github_packages) if (exists('run', envir = .GlobalEnv, inherits = FALSE)) rm('run', envir = .GlobalEnv) makeActiveBinding('run', function() build_model, .GlobalEnv) }
.onAttach <- function(...) { load_github_packages(.github_packages) if (exists('run')) rm('run') makeActiveBinding('run', function() build_model, .GlobalEnv) }
mit
R
113b7ca2f2ef4504ac35237bfd4d373fe8659dbb
Modify formatting
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Regression/RandomForestRegression/regularRandomForestRegression.r
Regression/RandomForestRegression/regularRandomForestRegression.r
# Random Forest Regression for machine learning. # # Random forest algorithm is a supervised classification algorithm. As the name # suggest, this algorithm creates the forest with a number of decision trees. # # In general, the more trees in the forest the more robust the forest looks like. # In the same way in the ...
# Random Forest Regression for machine learning. # # Random forest algorithm is a supervised classification algorithm. As the name # suggest, this algorithm creates the forest with a number of decision trees. # # In general, the more trees in the forest the more robust the forest looks like. # In the same way in the ...
mit
R
31db0fbf13b806eeeca24d7beeb78dc5aa3a6379
Remove extra print statement
mattm/active-user-cohort-analysis
active-users.r
active-users.r
CSV_PATH = "data/complete.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 = FA...
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
61afa27681597e4cefdad6ef78c18b9bb78364dc
Add example with convexity issue.
mcmtroffaes/improb-redux
improb-redux-example-1.r
improb-redux-example-1.r
source("improb-redux.r") pmfs = c( 0.5, 0.5, 0.8, 0.2) getexpectations = getexpectationsfunc(2, pmfs) # 2 = size of possibility space getlowerprevisions = getlowerprevisionsfunc(getexpectations) getupperprevisions = getupperprevisionsfunc(getexpectations) isgammamaximin = isgammamaxisomethingfunc(getlowerprevisions...
source("improb-redux.r") pmfs = c( 0.5, 0.5, 0.8, 0.2) getexpectations = getexpectationsfunc(2, pmfs) # 2 = size of possibility space getlowerprevisions = getlowerprevisionsfunc(getexpectations) getupperprevisions = getupperprevisionsfunc(getexpectations) isgammamaximin = isgammamaxisomethingfunc(getlowerprevisions...
mit
R
5ec3a25554f2d3e8c633f0b39454a19d54b130aa
update quickstart to user more modern R libraries
shapiromatron/bmds-server,shapiromatron/bmds-server,shapiromatron/bmds-server,shapiromatron/bmds-server
docs/quickstart.r
docs/quickstart.r
# Load required libraries library(httr) library(dplyr) library(jsonlite) # Set the URL root to the address where BMDS server is currently running: url_root <- Sys.getenv('BMDS_SERVER_URL', 'http://bmds-server.com') # Create a data-frame that has two continuous dose-response datasets: datasetsDf = data.frame( id=...
# Load required libraries library(httr) library(plyr) library(rjson) # Set the URL root to the address where BMDS server is currently running url_root <- Sys.getenv('BMDS_SERVER_URL', 'http://bmds-server.com') # Create an example BMDS job. This example uses uses BMDS v2.6.0.1. with two # dichotomous datasets: inputs ...
mit
R
260f65d8ce392620988001488f7f6e8454535e83
remove shift option
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/Annotation/getGeneLocus.r
lib/Annotation/getGeneLocus.r
require(biomaRt) require(stringr) params_def=read.table(parSampleFile1, stringsAsFactor=F) params<-split(params_def$V1, params_def$V2) host=params$host dataset=params$dataset symbolKey=params$symbolKey genesStr<-params$genesStr addChr<-params$add_chr=="1" if(!file.exists(genesStr)){ genesStr = gsub(",", " ", gene...
require(biomaRt) require(stringr) params_def=read.table(parSampleFile1, stringsAsFactor=F) params<-split(params_def$V1, params_def$V2) host=params$host dataset=params$dataset symbolKey=params$symbolKey genesStr<-params$genesStr shift<-as.numeric(params$shift) addChr<-params$add_chr=="1" if(!file.exists(genesStr)){ ...
apache-2.0
R
ddb11edde2671bceedecae7a22fed28483c8b56e
Add plots.
jtobin/bnp
finite-gaussian-mixture/src/simulation_multivariate_conditional.r
finite-gaussian-mixture/src/simulation_multivariate_conditional.r
require(ggplot2) require(gridExtra) require(reshape2) source('fmm_multivariate_conditional.r') dimension = 2 config = list( k = 3 , m = dimension , a = 1 , l = rep(0, dimension) , r = diag(0.05, dimension) , b = 2 , w = diag(1, dimension) , n = 1000 ) set.seed(222) d = list( t(replicate(250...
require(ggplot2) require(gridExtra) require(reshape2) source('fmm_multivariate_conditional.r') dimension = 2 config = list( k = 3 , m = dimension , a = 1 , l = rep(0, dimension) , r = diag(0.05, dimension) , b = 2 , w = diag(1, dimension) , n = 1000 ) set.seed(222) d = list( t(replicate(250...
mit
R
bff788a5200edc64aa0f7d1c4f15531476ff51b7
add palmerpenguins
ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/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.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" ) cla...
bsd-3-clause
R
0c8a281a4e27d5c20ac131185d0ee72038a5a491
add bootStepAIC R package
felipenoris/AWSFinance,felipenoris/math-server-docker,felipenoris/math-server-docker,felipenoris/AWSFinance
libs/r-packages.r
libs/r-packages.r
pkgs <- c( "alabama", "base64enc", "bootStepAIC", "caret", "cubature", "data.table", "DEoptim", "devtools", "doParallel", "doSNOW", "dplyr", "dyn", "dynlm", "extrafont", "feather", "fAsianOptions", "fAssets", "fBasics", "fBonds", "fCopulae", "fExoticOptions", "fExtremes", "fGarch", "fImport", ...
pkgs <- c( "alabama", "base64enc", "caret", "cubature", "data.table", "DEoptim", "devtools", "doParallel", "doSNOW", "dplyr", "dyn", "dynlm", "extrafont", "feather", "fAsianOptions", "fAssets", "fBasics", "fBonds", "fCopulae", "fExoticOptions", "fExtremes", "fGarch", "fImport", "fMultivar", "f...
mit
R
e6a67f50974550d270ac67aad31915bc85ad815f
Install vioplot via install.packages.
ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/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
3854465ab62558ce63768c0fe2e965618d3dd03e
change busyIndicator class to shiny-busy
vrann/ShinySky,vrann/ShinySky,vrann/ShinySky,vrann/ShinySky,vrann/ShinySky
R/busy-indicator.r
R/busy-indicator.r
#' busyIndicator #' #' A busy indicator #' #' @param text The text to show #' @param img An anitmated gif #' @param wait The amount of time to wait before showing the busy indicator. The #' default is 1000 which is 1 second. #' #' @export busyIndicator <- function(text = "Calculation in progress..",img = "shinys...
#' busyIndicator #' #' A busy indicator #' #' @param text The text to show #' @param img An anitmated gif #' @param wait The amount of time to wait before showing the busy indicator. The #' default is 1000 which is 1 second. #' #' @export busyIndicator <- function(text = "Calculation in progress..",img = "shinys...
mit
R
648ba41c4df23f7eb9af388afc59808546024f90
Simplify tests
TobCap/demagrittr
tests/testthat/test-dplyr-adhoc.r
tests/testthat/test-dplyr-adhoc.r
context("adhoc dplyr") suppressMessages(library("dplyr")) test_that("equiv value3", { e1 <- quote(iris %>% filter(Sepal.Width %>% `>`(4.3))) expect_identical(eval(e1), eval(demagrittr(e1, FALSE))) e2 <- quote(filter(iris, Sepal.Width %>% `>`(4.3))) expect_identical(eval(e2), eval(demagrittr(e2, FALSE))) })
context("adhoc dplyr") suppressMessages(library("magrittr")) suppressMessages(library("dplyr")) test_that("equiv value3", { e1 <- quote(iris %>% filter(Sepal.Width %>% is_greater_than(4.3))) expect_identical(eval(e1), eval(demagrittr(e1, FALSE))) e2 <- quote(filter(iris, Sepal.Width %>% is_greater_than(...
mit
R
fb6e55470b8cca7e53ecf745bf41fc07639ebd58
Put variance in significance field.
thehyve/heim-SmartR,thehyve/naa-SmartR,agapow/smartr,thehyve/heim-SmartR,thehyve/heim-SmartR,agapow/smartr,thehyve/heim-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) # Calculating variance per probe df["SIGNIFICANCE"] <- variances df <- df[with(df, order(-SIGNIFIC...
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["variance"] <- variances df <- df[with(df, order(-variance)), ...
apache-2.0
R
1bdef2de0c99fad79226423bedd0c35e6bf33190
Update installRpackages.r
PascalLike/OSGeoLive,OSGeo/OSGeoLive,astroidex/OSGeoLive,kalxas/OSGeoLive,PascalLike/OSGeoLive,OSGeo/OSGeoLive,PascalLike/OSGeoLive,guygriffiths/OSGeoLive,kalxas/OSGeoLive,OSGeo/OSGeoLive,PascalLike/OSGeoLive,kalxas/OSGeoLive,astroidex/OSGeoLive,kalxas/OSGeoLive,OSGeo/OSGeoLive,OSGeo/OSGeoLive,guygriffiths/OSGeoLive,gu...
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
6a294ec8324b00540bfd9d0393a1c4fac27a13ef
Add an onDetach todo.
syberia/syberia
R/zzz.r
R/zzz.r
.onAttach <- function(...) { if (!isTRUE(getOption("syberia.silent"))) { packageStartupMessage(paste0("Loading ", crayon::red("Syberia"), "...\n")) } # We want to initialize a Syberia project in the current working directory # because 9 times out of 10 this is what the user wants. # # However, this h...
.onAttach <- function(...) { if (!isTRUE(getOption("syberia.silent"))) { packageStartupMessage(paste0("Loading ", crayon::red("Syberia"), "...\n")) } # We want to initialize a Syberia project in the current working directory # because 9 times out of 10 this is what the user wants. # # However, this h...
mit
R
7163b9a48f640d2f9ca360e2c472f0f23b4e83af
add a todo for smart interpolation test
robertzk/syberiaStructure
inst/tests/test-syberia_models.r
inst/tests/test-syberia_models.r
context('syberia_models') local({ syberia_objects <- force(syberia_objects) environment(syberia_objects) <- new.env(parent = environment(syberia_objects)) environment(syberia_objects)$is.syberia_project <- function(...) TRUE environment(syberia_objects)$file.exists <- function(...) TRUE environment(syberia_o...
context('syberia_models') local({ syberia_objects <- force(syberia_objects) environment(syberia_objects) <- new.env(parent = environment(syberia_objects)) environment(syberia_objects)$is.syberia_project <- function(...) TRUE environment(syberia_objects)$file.exists <- function(...) TRUE environment(syberia_o...
mit
R
8f568546b45952dd20ab7b1eb6043e65120ac6a2
set size of figures to reduce responsivity problems
AndySouth/coverage
inst/shiny/coverage1/server.r
inst/shiny/coverage1/server.r
#coverage/inst/shiny/coverage1/server.r #andy south 12/5/16 #https://andysouth.shinyapps.io/coverage1/ library(shiny) #library(devtools) #install_github('AndySouth/coverage') library(coverage) library(png) shinyServer(function(input, output, session) { ################################ output$plot_feed <- rende...
#coverage/inst/shiny/coverage1/server.r #andy south 12/5/16 #https://andysouth.shinyapps.io/coverage1/ library(shiny) #library(devtools) #install_github('AndySouth/coverage') library(coverage) library(png) shinyServer(function(input, output, session) { ################################ output$plot_feed <- rende...
mit
R
c1411519e5651f63c0c63b4a9534f5091e9f27e2
Refactor heatmap making and modularize processing the dataframe.
thehyve/naa-SmartR,agapow/smartr,thehyve/naa-SmartR,thehyve/heim-SmartR,thehyve/heim-SmartR,agapow/smartr,agapow/smartr,agapow/smartr,thehyve/heim-SmartR,thehyve/naa-SmartR,thehyve/heim-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 <- extractMeasurements(dataset) measurements <- assignNames(measurements,dataset) measurements <- transform(measurements) makeHeatmap(measurements) } ...
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.matr...
apache-2.0
R
3614abb4e122793463f37db1892cf5788ffe0628
add download section.
akr/clockcount,akr/clockcount
README.rd
README.rd
= clockcount clockcount access processor specific clock counter. == Usage require 'clockcount' p ClockCount() == Sample Script to Mesure Clock Speed % ruby sample.rb 0x18a9c616f16d5 0x18a9caca6f864 1.2640276924433[GHz] 3.97282828038034[day] 0x18a9cf9ac9d9c 1.29211869909757[GHz] 3.88646950425614[da...
= clockcount clockcount access processor specific clock counter. == Usage require 'clockcount' p ClockCount() == Sample Script to Mesure Clock Speed % ruby sample.rb 0x171faf0c3cbed 0x171fb3e46f666 1.30258316772774[GHz] 0x171fb8a2981c2 1.27298907227854[GHz] 0x171fbd7ae77dc 1.30054508000412[GHz] 0x...
bsd-2-clause
R
a13ec08701ceed17a41cd34693dcc4fb81f1e8de
add in dep_var
syberia/tundra,robertzk/tundra
R/tundra_ensemble.r
R/tundra_ensemble.r
#' Tundra ensemble wrapper fetch_submodel <- function(model_parameters) { stopifnot(length(model_parameters) > 0 && is.character(model_parameters[[1]])) if (!exists(model_fn <- paste0('tundra_', model_parameters[[1]]))) stop("Missing tundra container for keyword '", model_parameters[[1]], "'") get(model_fn)(m...
#' Tundra ensemble wrapper fetch_submodel <- function(model_parameters) { stopifnot(length(model_parameters) > 0 && is.character(model_parameters[[1]])) if (!exists(model_fn <- paste0('tundra_', model_parameters[[1]]))) stop("Missing tundra container for keyword '", model_parameters[[1]], "'") get(model_fn)(m...
mit
R
dd207be399ced6d80a0169bcd288f30c34ec1668
include commands to recreate empty plot_table.RDS
david-beauchesne/SurveyTool
init.r
init.r
# Run init.r before other scripts rm(list=ls()) # for use in R console. # set own relevant directory if working in R console, otherwise ignore if in terminal setwd("/Users/davidbeauchesne/Dropbox/PhD/Misc/SurveyTool") # ----------------------------------------------------------------------------- # PROJECT: # Surv...
# Run init.r before other scripts rm(list=ls()) # for use in R console. # set own relevant directory if working in R console, otherwise ignore if in terminal setwd("/Users/davidbeauchesne/Dropbox/PhD/Misc/SurveyTool") # ----------------------------------------------------------------------------- # PROJECT: # Surv...
mit
R
81232bd349217c71494a87677cdc51cd993fe68c
use yaml::yaml.load_file() instead of servr::jekyll_config()
yutannihilation/allYourFigureAreBelongToUs,yutannihilation/allYourFigureAreBelongToUs,yutannihilation/allYourFigureAreBelongToUs,yutannihilation/allYourFigureAreBelongToUs
knit.r
knit.r
#! /usr/bin/env Rscript # This script is a forked version of https://github.com/yihui/knitr-jekyll/blob/gh-pages/build.R " Usage: knit.r INPUT OUTPUT " -> doc opts <- docopt::docopt(doc) ifile <- opts[["INPUT"]] ofile <- opts[["OUTPUT"]] #---------------------------- # fall back on '/' if baseurl is...
#! /usr/bin/env Rscript # This script is a forked version of https://github.com/yihui/knitr-jekyll/blob/gh-pages/build.R " Usage: knit.r INPUT OUTPUT " -> doc opts <- docopt::docopt(doc) ifile <- opts[["INPUT"]] ofile <- opts[["OUTPUT"]] #---------------------------- # fall back on '/' if baseurl is...
mit
R
e59acd2faf385c83e3d9739193eadb89418bc52d
remove init
snoweye/pbdMPI,snoweye/pbdMPI,snoweye/pbdMPI
inst/examples/test_spmd/allgather.r
inst/examples/test_spmd/allgather.r
### SHELL> mpiexec -np 2 Rscript --vanilla [...].r suppressMessages(library(pbdMPI, quietly = TRUE)) .comm.size <- comm.size() .comm.rank <- comm.rank() N <- 5 x.total <- N * .comm.size x <- matrix((1:N) + N * .comm.rank, nrow = 1) y <- allgather(x) comm.print(y) y <- allgather(as.integer(x), integer(x.total)) comm.p...
### SHELL> mpiexec -np 2 Rscript --vanilla [...].r suppressMessages(library(pbdMPI, quietly = TRUE)) init() .comm.size <- comm.size() .comm.rank <- comm.rank() N <- 5 x.total <- N * .comm.size x <- (1:N) + N * .comm.rank y <- allgather(matrix(x, nrow = 1)) comm.print(y) y <- allgather(as.integer(x), integer(x.total))...
mpl-2.0
R
da7a1f281707702b3d4d1a1d1d24504a531da9fd
Add more cleaning techniques
ixaxaar/handyR
clean.r
clean.r
# Identify the dataset names(dat) = normVarNames(names(dat)) # Lower case variable names. vars = names(dat) target = "rain_tomorrow" risk = "risk_mm" id = c("date", "location") # Ignore the IDs and the risk variable. ignore = c(id, if (exists("risk")) risk) # Ignore variables which are completely missing. mvc = sapp...
# Identify the dataset names(dat) <- normVarNames(names(dat)) # Lower case variable names. vars <- names(dat) target <- "rain_tomorrow" risk <- "risk_mm" id <- c("date", "location") # Ignore the IDs and the risk variable. ignore <- c(id, if (exists("risk")) risk) # Ignore variables which are completely missing. mvc ...
mit
R
d654895d59c6d491eea64874840231124033cf33
remove unnecessary print
robertzk/s3mpi
R/s3store.r
R/s3store.r
#' Store an R object in S3 by key #' #' Any type of object that can be serialized as an RDS file #' is capable of being retrieved using this interface. #' #' @export #' @param obj ANY. An R object to save to S3. #' @param name character. The S3 key to save to. #' @param .path character. The S3 prefix, e.g., "s3://yourb...
#' Store an R object in S3 by key #' #' Any type of object that can be serialized as an RDS file #' is capable of being retrieved using this interface. #' #' @export #' @param obj ANY. An R object to save to S3. #' @param name character. The S3 key to save to. #' @param .path character. The S3 prefix, e.g., "s3://yourb...
mit
R
7db04f6b27320a8fc5c5d0f73e83b7a561a8f995
Correct the example in the comment
rgchris/ren-c,kealist/ren-c,giuliolunati/ren-c,draegtun/ren-c,hostilefork/rebol,codebybrett/ren-c,codebybrett/ren-c,kealist/ren-c,kealist/ren-c,draegtun/ren-c,hostilefork/rebol,giuliolunati/ren-c,giuliolunati/ren-c,giuliolunati/ren-c,giuliolunati/ren-c,rgchris/ren-c,codebybrett/ren-c,hostilefork/rebol,hostilefork/rebol...
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