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
c0f319a3f4d16741efe0f364dd7f439ae67c6013
Update R3-GUI download URL used in LOAD-GUI
zsx/r3,Pointillistic/rebol-lang,Pointillistic/rebol-lang,Pointillistic/rebol-lang,zsx/r3,zsx/r3,Pointillistic/rebol-lang,zsx/r3
src/mezz/rma-patches.r
src/mezz/rma-patches.r
REBOL [ Title: "REBOL Graphics - load-gui patch" ] load-gui: func [ "Download current Spahirion's R3-GUI module from web." /local data ][ print "Fetching GUI..." either error? data: try [load http://development.saphirion.com/resources/r3-gui.r3] [ either data/id = 'protocol [print "C...
REBOL [ Title: "REBOL Graphics - load-gui patch" ] load-gui: func [ "Download current Spahirion's R3-GUI module from web." /local data ][ print "Fetching GUI..." either error? data: try [load http://www.saphirion.com/development/downloads-2/files/r3-gui.r3] [ either data/id = 'protoc...
apache-2.0
R
f6445381994679eef6a3b378bfd8dd2e9ede57f0
add url
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 library(shiny) #install_github('AndySouth/coverage') library(coverage) library(png) shinyServer(function(input, output, session) { ################################ output$plot_feed <- renderPlot({ #add dependency on the button #if ( input$aBut...
mit
R
a854f591af8463f257a43a50e64bbfcade7a9d27
Add VCF download
GreatEmerald/geoscripting,GreatEmerald/geoscripting,GreatEmerald/geoscripting,GreatEmerald/geoscripting
Lesson8/Main.r
Lesson8/Main.r
# Team Rython, Dainius Masiliunas and Tim Weerman # Date: 11 January, 2016 # Apache License 2.0 # Needed packages # Source # Download/load information download.file("https://github.com/GeoScripting-WUR/AdvancedRasterAnalysis/raw/gh-pages/data/GewataB1.rda", "data/GewataB1.rda", "wget") download.file("https://githu...
# Team Rython, Dainius Masiliunas and Tim Weerman # Date: 11 January, 2016 # Apache License 2.0 # Needed packages # Source # Download/load information download.file("https://github.com/GeoScripting-WUR/AdvancedRasterAnalysis/raw/gh-pages/data/GewataB1.rda", "data/GewataB1.rda", "wget") download.file("https://githu...
apache-2.0
R
b3efef66d0f3428b2739fb28a9fe4997f8327c6c
Replace (non macOS non-existent) `realpath`
klmr/modules,klmr/modules
tests/testthat/helper-paths.r
tests/testthat/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
47cbe68c19036d096b01cb6e33673d1766f7862c
Update banner
draegtun/ren-c,kealist/ren-c,kealist/ren-c,rgchris/ren-c,rgchris/ren-c,codebybrett/ren-c,draegtun/ren-c,giuliolunati/ren-c,codebybrett/ren-c,kealist/ren-c,hostilefork/rebol,draegtun/ren-c,hostilefork/rebol,kealist/ren-c,codebybrett/ren-c,codebybrett/ren-c,rgchris/ren-c,kealist/ren-c,rgchris/ren-c,codebybrett/ren-c,host...
src/mezz/mezz-banner.r
src/mezz/mezz-banner.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Startup Banner" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http://www.apache.org/licenses/LICENS...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Startup Banner" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http://www.apache.org/licenses/LICENS...
apache-2.0
R
baa383ef3c9c66002f6b9de31dd9ca74e6683c1f
Set paths apppropriately.
owainkenwayucl/stats-plus-plus,owainkenwayucl/stats-plus-plus,owainkenwayucl/stats-plus-plus,owainkenwayucl/stats-plus-plus
r/pyconfconv.r
r/pyconfconv.r
#!/usr/bin/env Rscript # This is a wrapper for doing the less pleasant parts of calling the converter # from R. # To use it, source this script and then: # eval(parse(text=pyconfconverts(filename, section))) # or eval(parse(text=pyconfconvert(filename))) # Owain Kenway # Where this is distributed it is done so under t...
#!/usr/bin/env Rscript # This is a wrapper for doing the less pleasant parts of calling the converter # from R. # To use it, source this script and then: # eval(parse(text=pyconfconverts(filename, section))) # or eval(parse(text=pyconfconvert(filename))) # Owain Kenway # Where this is distributed it is done so under t...
mit
R
ae552479b6a9d7503d1bae0553bf34a2152bd5b7
Correct LAUNCH for unset refinement args
hostilefork/rebol,rgchris/ren-c,kealist/ren-c,draegtun/ren-c,rgchris/ren-c,kealist/ren-c,draegtun/ren-c,codebybrett/ren-c,codebybrett/ren-c,hostilefork/rebol,codebybrett/ren-c,hostilefork/rebol,giuliolunati/ren-c,hostilefork/rebol,kealist/ren-c,draegtun/ren-c,giuliolunati/ren-c,giuliolunati/ren-c,draegtun/ren-c,codebyb...
src/mezz/mezz-control.r
src/mezz/mezz-control.r
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Control" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http:...
REBOL [ System: "REBOL [R3] Language Interpreter and Run-time Environment" Title: "REBOL 3 Mezzanine: Control" Rights: { Copyright 2012 REBOL Technologies REBOL is a trademark of REBOL Technologies } License: { Licensed under the Apache License, Version 2.0 See: http:...
apache-2.0
R
174f84177cc624937e5d77f965c7d4a5f2d96e56
add repo source for init.r
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('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
508b6f862a1215550a6012173bd7c5f269972db5
Add needed packages
drosofff/tools-artbio,drosofff/tools-artbio,ARTbio/tools-artbio,ARTbio/tools-artbio,chamaelj/tools-artbio,ARTbio/tools-artbio,chamaelj/tools-artbio,ARTbio/tools-artbio,chamaelj/tools-artbio,drosofff/tools-artbio,drosofff/tools-artbio
tools/small_rna_map/test.r
tools/small_rna_map/test.r
# Table is the data frame library("ggplot2") library("gridExtra") library("RColorBrewer") library("gtable") library("grid") theme_set(theme_bw()) #Table=read.delim(your_input, header=T, row.names=NULL) Table <- within(Table[1:27,], Nbr_reads[Polarity=="R"] <- (Nbr_reads[Polarity=="R"]*-1)) p1 <- ggplot(Table, aes(x=...
# Table is the data frame library("ggplot2") library("gridExtra") library(ggplus) theme_set(theme_bw()) #Table=read.delim(your_input, header=T, row.names=NULL) Table <- within(Table[1:27,], Nbr_reads[Polarity=="R"] <- (Nbr_reads[Polarity=="R"]*-1)) p1 <- ggplot(Table, aes(x=Coordinate, y=Nbr_reads, colour=Polarity)) ...
mit
R
144ca31db071d402ce2ddb6cff0532a25df3c9ff
Add GetAddresses
Nektar-io/LvWS
R/api-methods.r
R/api-methods.r
library(XML) library(httr) # General methods get_xml <- function(path, query) { url <- modify_url(url = .url, path = file.path(.path, path), query = query ) x <- paste(readLines(url, warn = FALSE), collapse="") xmlParse(x) } # API methods GetAddresses <- fu...
library(XML) library(httr) # General methods fetch_data <- function(path, query, nodes) { url <- modify_url(url = .url, path = file.path(.path, path), query = query ) get_xml(url, nodes) } get_xml <- function(url, nodes) { x <- paste(readLines(url, warn = FA...
agpl-3.0
R
168706c14639f14c559f2c8b5fd988c90aba4c91
Update 2016_report_config.r
PSC-CoTC/PSC-FRAM-Admin,PSC-CoTC/PSC-FRAM-Admin
config/2016_report_config.r
config/2016_report_config.r
run.year <- 2016 post.season.fram.db <- "./fram db/Final pre and post databases/2018PFMC_NOF_ForPSC-Coho-Backwards-thru2016_compact.mdb" post.season.run.name <- "bc-Coho1637 Final + BP27" post.season.tamm <- "./fram db/TAMM_Files_Postseason/coho BK 2015 Final Feb 15th.xlsm" pre.season.fram.db <- "./fram db/Fi...
run.year <- 2016 post.season.fram.db <- "./fram db/Final pre and post databases/2018PFMC_NOF_ForPSC-Coho-Backwards-thru2016_compact.mdb" post.season.run.name <- "bc-Coho1637 Final + BP27" post.season.tamm <- "./fram db/TAMM_Files_Postseason/coho BK 2015 Final Feb 15th.xlsm" pre.season.fram.db <- "./fram db/Fi...
mit
R
425e02535c0fb5c70eaf70408b01c0f0f77f342e
fix paste
mynameisvinn/rstae
R/util.r
R/util.r
#' @export test <- function(woof){ print(woof) } #' @export fetch_trips <-function(municipalId){ uri = paste("https://municipal.systems/v1/municipalities/", municipalId, "/trips", sep="") r <- GET(uri) e = content(r)$results f = as.data.frame(do.call(rbind, e)) f }
#' @export test <- function(woof){ print(woof) } #' @export fetch_trips <-function(municipalId){ uri = paste("https://municipal.systems/v1/municipalities/", municipalId, "/trips") r <- GET(uri) e = content(r)$results f = as.data.frame(do.call(rbind, e)) f }
mit
R
1c6aad7c786c73fd451800f994e5c6804616f134
Document cache module
klmr/codons,klmr/codons
scripts/cache.r
scripts/cache.r
decorate = modules::import('decorate', attach = TRUE) modules::import('ebits/base', attach = c('closure', 'match_call_defaults')) #' Make function cached #' #' Cache a function call’s result so that subsequent calls of the function with #' the same arguments do not re-evaluate the function: the cached result is #' ret...
decorate = modules::import('decorate', attach = TRUE) modules::import('ebits/base', attach = c('closure', 'match_call_defaults')) cache = decorator %@% function (f) { cache = new.env() g = function (...) { call = match_call_defaults() args = call[-1] # Use a helper to evaluate all argum...
apache-2.0
R
c91534b1be3c890e64fe2f45615a3cd7b9ad1170
Fix font imports
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_set(theme_minimal() ...
#' Pretty plotting module export = import('./export', attach = 'export_from') gg = import_package('ggplot2') export_from(gg) # # Set a very minimal theme. Avoid chartjunk. # fonts = import('./fonts') fonts$register_fonts(c('Roboto', 'Roboto Condensed')) theme_set(theme_minimal() + theme(panel.grid = elem...
apache-2.0
R
6b239c33903b44edb6dd11032201758201c83980
change plot
sdwalsh/mst,sdwalsh/mst
plot.r
plot.r
library(car) d <- read.csv("~/Documents/io/mirango/mst/max-edge-mst.txt") ls <- loess(y ~ x, data=d) pr.loess <- predict(ls) m <-lm(y ~ x, data=d) abline(coef(m), col="blue") pr.abline <- predict(m) plot(y ~ x, data=d, xlab="vertices", ylab="largest edge in mst", main="Largest Edge by Number of Vertices") lines(pr.l...
library(car) d <- read.csv("~/Documents/io/mirango/mst/max-edge-mst.txt") scatterplot(y ~ x, data = d, xlab="number of vertices", ylab="largest edge in mst", main="Largest Edge by # of Vertices", labels=row.names(d), reg.line=TRUE) fit <- lm(y ~ x, data=d) summary(fit)
mit
R
d57fdc3a4236fca54e47880bc010ae61179ea5fc
fix error in Butter-fly.r
foreverbell/parakeet
tests/Butter-fly/Butter-fly.r
tests/Butter-fly/Butter-fly.r
Gokigen na chou ni natte kirameku kaze ni notte Ima sugu kimi ni ai ni yukou Yokei na koto nante wasureta hou ga mashi sa Kore ijou shareteru jikan wa nai Nani ga wow wow~ kono sora ni todoku no darou Dakedo wow wow~ ashita no yotei mo wakaranai Mugendai na yume no ato no nanimo nai yo no naka ja Sou sa itoshi...
Gokigen na chou ni natte kirameku kaze ni notte Ima sugu kimi ni ai ni yukou Yokei na koto nante wasureta hou ga mashi sa Kore ijou shareteru jikan wa nai Nani ga wow wow~ kono sora ni todoku no darou Dakedo wow wow~ ashita no yotei mo wakaranai Mugendai na yume no ato no nanimo nai yo no naka ja Sou sa itoshi...
mit
R
2c9e8998a37b4f393bf2b352aee48d9ca683bad1
Install reticulate from github
ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub
deployments/r/image/extras.d/ph-w250fg.r
deployments/r/image/extras.d/ph-w250fg.r
#!/usr/bin/env Rscript # From https://github.com/berkeley-dsep-infra/datahub/issues/881 print("Installing packages for PHW250F+G") source("/tmp/class-libs.R") # dplyr requires 0.2.1...cran only has 0.2.0 print("Installing assertthat...") devtools::install_github('hadley/assertthat', ref='v0.2.1', upgrade_dependencies...
#!/usr/bin/env Rscript # From https://github.com/berkeley-dsep-infra/datahub/issues/881 print("Installing packages for PHW250F+G") source("/tmp/class-libs.R") # dplyr requires 0.2.1...cran only has 0.2.0 print("Installing assertthat...") devtools::install_github('hadley/assertthat', ref='v0.2.1', upgrade_dependencies...
bsd-3-clause
R
c43efbc1356f02aa1231d3b3efe23b22b58047f9
Fix grammar errors
FTAsr/wordvet,FTAsr/wordvet,FTAsr/wordvet,FTAsr/wordvet
trainGloveModel.r
trainGloveModel.r
args = commandArgs(trailingOnly=TRUE) if (length(args) != 3) { cat("trainGloveModel.R <size> <window> <iters>\n") } else { suppressMessages(library("text2vec")) vectorSize <- as.numeric(args[1]) window <- as.numeric(args[2]) iters <- as.numeric(args[3]) print("started running trainGloveModel.r") text...
print("started running trainGloveModel.r") library("text2vec") args = commandArgs(trailingOnly=TRUE) if (length(args) != 3) { cat("trainGloveModel.R <size> <window> <iters>\n") } else { vectorSize <- as.numeric(args[1]) window <- as.numeric(args[2]) iters <- as.numeric(args[3]) text8_file = "/data/...
apache-2.0
R
3bdbd9d07acda21e17e541c7b68e4b6837f407da
Add sample grouping. Refactoring.
thehyve/naa-SmartR,agapow/smartr,agapow/smartr,agapow/smartr,agapow/smartr,thehyve/heim-SmartR,thehyve/naa-SmartR,thehyve/heim-SmartR,thehyve/naa-SmartR,thehyve/heim-SmartR,thehyve/heim-SmartR
web-app/HeimScripts/heatmap/run.r
web-app/HeimScripts/heatmap/run.r
library(gplots) dataset1color <- "coral3" dataset2color <- "chartreuse3" labelColumns <- c("Row.Label","Bio.marker") #Input expected 1 or 2 dataframes ofwith columns: Row.Label, Bio.marker, ASSAY_0001 ASSAY_0002 ... main <- function(){ datasets <- parseInput(loaded_variables) #this will just make sure we have eith...
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) } ...
apache-2.0
R
46c37c02e10eb42065a8e45c75697c2bc4363422
Update extracterDB.r
svobodam/Deep-Learning-Text-Summariser,svobodam/Deep-Learning-Text-Summariser,svobodam/Deep-Learning-Text-Summariser
PreProcessingScript/extracterDB.r
PreProcessingScript/extracterDB.r
# Data Frame exploration. # Extract data from Documents and document summaries into new subset and prepare them for extarction to table in DB. # Extract Documents from df > dfData counter = 1 while(counter <= 25){ for (m in doc) { if ((exists("dfData"))==TRUE) { dfEdit=data.frame(with(df, paste0(df[[m]])),...
# Data Frame exploration. # Extract data from Documents and document summaries into new subset and prepare them for extarction to table in DB. # Extract Documents from df > dfData counter = 1 while(counter <= 25){ for (m in doc) { if ((exists("dfData"))==TRUE) { dfEdit=data.frame(with(df, paste0(df[[m]])),...
mit
R
c549d6c79042c3ffe07b3a72ba72e0c8fd46f2ad
Add fix address lookup
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
20cfd9ead109beb3a6e7eee0c98b02f54cdfd4f7
use default umap and assay for visualization
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/Signac.r
lib/scRNA/Signac.r
library(SignacX) library(Seurat) finalList=readRDS(parFile1) obj=finalList$obj defaultAssay = DefaultAssay(obj) if(defaultAssay == "integrated"){ if("SCT" %in% names(obj@assays)){ DefaultAssay(obj)="SCT" }else{ DefaultAssay(obj)="RNA" } obj <- SCTransform(obj, verbose = FALSE) obj <- RunPCA(obj, ver...
library(SignacX) library(Seurat) finalList=readRDS(parFile1) obj=finalList$obj if(DefaultAssay(obj) == "integrated"){ if("SCT" %in% names(obj@assays)){ DefaultAssay(obj)="SCT" }else{ DefaultAssay(obj)="RNA" } obj <- SCTransform(obj, verbose = FALSE) obj <- RunPCA(obj, verbose = FALSE) obj <- RunUM...
apache-2.0
R
8b0009cfdebdcf20b709575f700aa971f7aa5213
add color for zone
hansthompson/shiny-server,hansthompson/shiny-server,hansthompson/shiny-server
muniexplorer/app.r
muniexplorer/app.r
library(shiny) library(leaflet) library(dplyr) load("data/all_the_data.rda") precincts <- levels(factor(all_the_data$NAME)) #input <- list(select = "Spenard") ui <- bootstrapPage( tags$style(type = "text/css", "html, body {width:100%;height:100%}"), leafletOutput("map", width = "100%", height = "100%"), ...
library(shiny) library(leaflet) library(dplyr) load("data/all_the_data.rda") precincts <- levels(factor(all_the_data$NAME)) #input <- list(select = "Spenard") ui <- bootstrapPage( tags$style(type = "text/css", "html, body {width:100%;height:100%}"), leafletOutput("map", width = "100%", height = "100%"), ...
mit
R
5c342a0f270bfb951b8525832813ce4cf71c9d57
UPDATE onUnload method
RBigData/pbdADIOS,RBigData/pbdADIOS,go-ski/pbdADIOS,RBigData/pbdADIOS,YupingLu/pbdADIOS,YupingLu/pbdADIOS,go-ski/pbdADIOS,RBigData/pbdADIOS,go-ski/pbdADIOS,YupingLu/pbdADIOS
R/zzz.r
R/zzz.r
# Hooks for Name Space events # triggered by library() .onLoad <- function(libname, pkgname) { pbdMPI::init() # pbdMPI initilization if(.Platform$OS.type == "windows") print("windows") else print("others") } # triggered by detach(2, unload=TRUE) .onUnload <- function(libpath) { pbdMPI::finalize() ...
# Hooks for Name Space events # triggered by library() .onLoad <- function(libname, pkgname) { pbdMPI::init() # pbdMPI initilization if(.Platform$OS.type == "windows") print("windows") else print("others") } # triggered by detach() .onUnload <- function(libpath) { pbdADIOS::finalize() print("B...
mpl-2.0
R
5f0040ff2c912d980711acead68ee7d11e2530d0
Update zzz.r
syberia/syberia
R/zzz.r
R/zzz.r
.onAttach <- function(...) { load_github_packages(.github_packages) if (exists('run')) rm('run') makeActiveBinding('run', function() build_model, .GlobalEnv) }
.onAttach <- function(...) { load_github_packages(.github_packages) if (!exists('run')) makeActiveBinding('run', function() build_model, .GlobalEnv) }
mit
R
73327fd7589a45d8f0289a7ccf33e7dab76407ad
fix load_dependency
robertzk/Ramd
R/load_dependency.r
R/load_dependency.r
#' Load a bunch of dependencies by filename #' #' @param dep Name of dependency, e.g., relative filename (without .r) #' \dontrun{ #' helper <- load_dependency('path/to/helper') #' } load_dependency <- function(dep) { path <- suppressWarnings(base::normalizePath(file.path(current_directory(), dep))) if (!file.exi...
#' Load a bunch of dependencies by filename #' #' @param dep Name of dependency, e.g., relative filename (without .r) #' \dontrun{ #' helper <- load_dependency('path/to/helper') #' } load_dependency <- function(dep) { path <- suppressWarnings(base::normalizePath( paste(current_directory(), "/", dep, sep ...
mit
R
81893f9c19ee6fb74e187cdb9cf69257a27ce8d3
Fix documentation of import.attach option
klmr/modules,klmr/modules
R/modules-package.r
R/modules-package.r
#' An alternative module system for R #' #' Use \code{module = import('module')} to import a module for usage. #' Fully qualified names are supported for nested modules, reminiscent of #' Python’s module mechanism. #' @section Package options: #' #' \itemize{ #' \item \code{import.path}: #' A vector of paths whic...
#' An alternative module system for R #' #' Use \code{module = import('module')} to import a module for usage. #' Fully qualified names are supported for nested modules, reminiscent of #' Python’s module mechanism. #' @section Package options: #' #' \itemize{ #' \item \code{import.path}: #' A vector of paths whic...
apache-2.0
R
feab8974e380134e8bd350b8462ae05aeba1a98a
Fix url generation code
hadley/sfhousing,hadley/sfhousing,hadley/sfhousing
house-sales.r
house-sales.r
# Human readable url # http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2007/12/30/REHS_alameda.txt # Machine readable url # http://www.sfgate.com/c/a/2008/06/15/REHS.tb # Get the data ----------------------- start <- as.Date("2003-04-27") end <- as.Date("2008-10-05") sundays <- as.POSIXlt(seq.Date(start, end, "week...
# Human readable url # http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2007/12/30/REHS_alameda.txt # Machine readable url # http://www.sfgate.com/c/a/2008/06/15/REHS.tb # Get the data ----------------------- start <- as.Date("2003-04-27") end <- as.Date("2008-10-05") sundays <- as.POSIXlt(seq.Date(start, end, "week...
mit
R
1e58cbe49a834fc9528e73793e33fa4510c7dde0
Unify documentation spelling
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
3d154f95e8a413c34a85d455d2cd4f422fd1c0d0
modify relative paths
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
fab2b19faab943f55ef6e188d4d10b1b5786ea9d
Fix the syntax error in printf.r
giuliolunati/ren-c,codebybrett/ren-c,giuliolunati/ren-c,codebybrett/ren-c,rgchris/ren-c,kealist/ren-c,draegtun/ren-c,codebybrett/ren-c,hostilefork/rebol,giuliolunati/ren-c,hostilefork/rebol,draegtun/ren-c,kealist/ren-c,hostilefork/rebol,kealist/ren-c,hostilefork/rebol,codebybrett/ren-c,kealist/ren-c,draegtun/ren-c,drae...
tests/misc/printf.r
tests/misc/printf.r
REBOL [] recycle/torture libc: make library! %libc.so.6 x64?: 40 = fifth system/version size_t: either x64? ['int64]['int32] printf: make-routine libc "printf" compose/deep [ return: [int32] f [pointer] ... ] ;(printf "hello^/" 0 [pointer]) (printf "hello %s^/" "world" [pointer]) (printf "hello^/") (pr...
REBOL [] recycle/torture libc: make library! %libc.so.6 x64?: 40 = fifth system/version size_t: either x64? ['int64]['int32] printf: make-routine compose/deep [ [ f [pointer] ... ] (libc) "printf" ] printf ["hello"] print "hi"
apache-2.0
R
c8fb75fd80ccfabcf17cb468e9af1a847d03d32c
change theme to spacelab
hansthompson/shiny-server,hansthompson/shiny-server,hansthompson/shiny-server
CannabisZoning/App.r
CannabisZoning/App.r
library(shinythemes) library(rgeos) library(rgdal) library(leaflet) library(geojsonio) load("map.rda") ui <- bootstrapPage(theme = shinytheme("spacelab"), title = "Cannabis Business Zoning", tags$head(includeScript("google-analytics.js")), tags$style(type = ...
library(shinythemes) library(rgeos) library(rgdal) library(leaflet) library(geojsonio) load("map.rda") ui <- bootstrapPage(theme = shinytheme("Spacelab"), title = "Cannabis Business Zoning", tags$head(includeScript("google-analytics.js")), tags$style(type = ...
mit
R
20622176265342ccbc81106d0f381b10bd0ac456
Update utci_class.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/utci_class.r
R/utci_class.r
#' utci_class #' #' Calculate ten (10) thermal class 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 temperat...
#' utci_class #' #' Calculate ten (10) thermal class 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 temperat...
mit
R
b48e99f5ee6f5262fc6cb7c52ecd423bf70942fa
Test that `module_name` keeps working globally
klmr/modules,klmr/modules
inst/tests/test-name.r
inst/tests/test-name.r
context('Module names') test_that('the global namespace has no module name', { expect_null(module_name()) }) test_that('modules have a name', { a = import('a') expect_equal(module_name(a), 'a') expect_equal(a$get_modname(), 'a') }) test_that('module names can be read inside functions', { a = impo...
context('Module names') test_that('the global namespace has no module name', { expect_null(module_name()) }) test_that('modules have a name', { a = import('a') expect_equal(module_name(a), 'a') expect_equal(a$get_modname(), 'a') }) test_that('module names can be read inside functions', { a = impo...
apache-2.0
R
15d4330c13ab557296eac2ebd16082944a9f7637
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
cb6478a9de2e41af22879407cba801747250d2ad
Add write_submit_script SlurmBashScript method
jmousseau/Stain
R/slurm-bash-script.r
R/slurm-bash-script.r
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container, main_file, copy_back = c("*")) { private$write_slurm_script(container$dir) ...
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container, main_file, copy_back = "*") { private$write_slurm_script(container$dir) } ...
mit
R
5f5a73923fc51756de9be9f7e1af8e144d695d1f
Update PACo.r
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 margin The margin to sample (1 to sample rows, 2 to sample columns) #' @export #' @examples #' data(gopherlice) #' library(ape) #' gdist <- cophenet...
#' 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
a816ccf01b36645cac58140ad1f4c0eebfe855b9
use absolute path
robertzk/syberiaStructure
R/traversal.r
R/traversal.r
# All functions related to traversal of file system for grabbing Syberia related files # # By convention, the structure from a syberia root project will look like this: # # - data # Data preparation for data sources coming from an external API # - sources # - data_source1 # - data_source1.r # - h...
# All functions related to traversal of file system for grabbing Syberia related files # # By convention, the structure from a syberia root project will look like this: # # - data # Data preparation for data sources coming from an external API # - sources # - data_source1 # - data_source1.r # - h...
mit
R
473f2fa1af1237554962caad1f826c83c6bd252c
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_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'
mit
R
ac044be8730ef29274b7afe783169ecea129e10b
Update ggplot2_formatter.r
fdryan/R,jezdata/R,1R151-1/R
ggplot2_formatter.r
ggplot2_formatter.r
require(scales) # --------------------------------------------------------------------------------------------- # Formatting functions for ggplot graph axis # --------------------------------------------------------------------------------------------- #' Human Numbers: Format numbers so they're legible for humans ...
require(scales) # --------------------------------------------------------------------------------------------- # Formatting functions for ggplot graph axis # --------------------------------------------------------------------------------------------- #' Human Numbers: Format numbers so they're legible for humans ...
unlicense
R
0590b263117aca8548b283971d4acf6d416257bd
Add co-owner.
IndyActuaries/epic-fhir,IndyActuaries/epic-fhir
r/models.r
r/models.r
#' ## Code Owners: Kyle Baird, Shea Parkes #' ### OWNERS ATTEST TO THE FOLLOWING: #' * The `master` branch will meet Milliman QRM standards at all times. #' * Deliveries will only be made from code in the `master` branch. #' * Review/Collaboration notes will be captured in Pull Requests (prior to merging). #' #'...
#' ## Code Owners: Kyle Baird #' ### OWNERS ATTEST TO THE FOLLOWING: #' * The `master` branch will meet Milliman QRM standards at all times. #' * Deliveries will only be made from code in the `master` branch. #' * Review/Collaboration notes will be captured in Pull Requests (prior to merging). #' #' #' ### Obje...
mit
R
cb2a02f2327a546eaf4331110e50f680605609ee
use is instead of is.trigger
robertzk/syberiaStages,FeiYeYe/syberiaStages
R/data_stage.r
R/data_stage.r
#' Data stage for syberia models #' #' TODO: Document this more #' #' @param modelenv an environment. The persistent modeling environment. #' @param munge_procedure a list. A list of mungepiece arguments, #' first preprocessed then passed to munge. #' @export data_stage <- function(modelenv, munge_procedure) { # ...
#' Data stage for syberia models #' #' TODO: Document this more #' #' @param modelenv an environment. The persistent modeling environment. #' @param munge_procedure a list. A list of mungepiece arguments, #' first preprocessed then passed to munge. #' @export data_stage <- function(modelenv, munge_procedure) { # ...
mit
R
ed88feead73a2c6154050ecda6c09c014ddc8c79
Update processingDF.r
svobodam/Deep-Learning-Text-Summariser,svobodam/Deep-Learning-Text-Summariser,svobodam/Deep-Learning-Text-Summariser
PreProcessingScript/processingDF.r
PreProcessingScript/processingDF.r
# Data Frame processing # Dataset used as .db file to allow managing DF from Python and R. # This process process dataset to remove html tags. # ***FUNCTIONS*** # Function which transorm DS to Corpus and preprocess it. dfCorpusFN = function(data_frame) { c = Corpus(VectorSource(data_frame)) removeText = funct...
# Author: Matej Svoboda # Data Frame processing # Dataset used as .db file to allow managing DF from Python and R. # This process process dataset to remove html tags. # ***FUNCTIONS*** # Function which transorm DS to Corpus and preprocess it. dfCorpusFN = function(data_frame) { c = Corpus(VectorSource(data_frame))...
mit
R
bbbed89be9fb0e04500bf1bbcf22b6fe9b79f6de
Fix typo in R modules path
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 = '~/.R/modules', 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 = '~/R/modules', devtools.name = 'Konrad Rudolph', devtools.desc....
apache-2.0
R
d56442105aabe4b36919165aacab2858c1b9e804
rename group_id to job_group
mschubert/clustermq,mschubert/clustermq,mschubert/clustermq
template_LSF.r
template_LSF.r
infuser = import_package('infuser') #' A template string used to submit jobs template = "#BSUB-J {{ job_name }} # name of the job / array jobs #BSUB-g {{ job_group | /rzmq }} # group the job belongs to #BSUB-o {{ log_file | /dev/null }} # output is sent to logfile, stdout + stderr by default #B...
infuser = import_package('infuser') #' A template string used to submit jobs template = "#BSUB-J {{ job_name }} # name of the job / array jobs #BSUB-g {{ job_group | /rzmq }} # group the job belongs to #BSUB-o {{ log_file | /dev/null }} # output is sent to logfile, stdout + stderr by default #B...
apache-2.0
R
05e763150d108cddb29346ff5bc25c7e49a3aad3
Add note about how find_globals only runs on main
jmousseau/Stain
R/globals.r
R/globals.r
#' Find unassigned global variables. #' #' This funciton sources files and loads objects into an environment #' and then runs \code{codetools::findGlobals} on the environment. #' #' NOTE: Globals are determined for the \code{main()} function only! #' #' @param source_files R files containing globals to exclude such as ...
#' Find unassigned global variables. #' #' This funciton sources files and loads objects into an environment #' and then runs \code{codetools::findGlobals} on the environment. #' #' @param source_files R files containing globals to exclude such as #' function declarations. #' #' @param object_files Rdata files that con...
mit
R
3fbdd6f24b814205aabf4ce33001758e803c8ae3
update very outdated README
doudou/modelkit-component,doudou/modelkit-component
README.rd
README.rd
= Orogen: easy component building for Orocos/RTT http://rock-robotics.org/stable/documentation/orogen == What is oroGen ? oroGen is a specification language and code generator for the Orocos Realtime Toolkit (RTT). The Orocos/Real Time Toolkit is a C++ library allowing to build component-based systems (http://www....
= Orogen: easy component building for Orocos/RTT * http://doudou.github.com/orogen * http://github.com/doudou/orogen * git://github.com/doudou/orogen.git == What is oroGen ? oroGen is a specification language and code generator for the Orocos Realtime Toolkit (RTT). The Orocos/Real Time Toolkit is a C++ library allo...
mit
R
571870767ba9cdf7e5ad1c7ac9bace40d342de4e
Copy all but original files back to submit dir
jmousseau/Stain
R/slurm-bash-script.r
R/slurm-bash-script.r
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container, main_file) { private$cat_main_file_magic(container$dir, main_file) priv...
#' SlurmBashScript R6 object. #' #' Generates the necessary bash script to submit through #' the `sbatch` command. SlurmBashScript <- R6::R6Class("SlurmBashScript", public = list( initialize = function(container, main_file, copy_back = c("*")) { private$cat_main_file_magic(container$dir, main_fi...
mit
R
d5747d3670a765b0a88287967b9c9236b6d08da9
Update classifier.r
suraj-deshmukh/myCodes,suraj-deshmukh/myCodes,suraj-deshmukh/myCodes
ml-ui/classifier.r
ml-ui/classifier.r
get_results<-function(input){ if(input$cv>1){ folds = createFolds(y,k=input$cv) acc_matrix = NULL #confusion matrix variable if(identical(input$class_algo,"c_svm")){ for(i in folds){ model = svm(x[-i,],y[-i],cost=input$cost,kernel=input$kernel,degree=input$degree,...
get_results<-function(){ if(input$cv>1){ if(identical(input$class_algo,"c_svm")){ folds = createFolds(y,k=input$cv) c_matrix = NULL #confusion matrix variable for(i in folds){ model = svm(x[-i,]) } } } else{ } }
mit
R
2fa358d7c40426203aaed144a99c2c02820332c3
Fix typo in test for deprecation
klmr/modules,klmr/modules
R/export_submodule.r
R/export_submodule.r
#' Export a given submodule from the current module #' #' @param submodule character string of length 1 with the name of the submodule #' @note Sometimes, a module may want to export all or some of its submodules in #' bulk. Simply doing \code{import('submodule', attach = TRUE)} won’t work, #' however, since \code{atta...
#' Export a given submodule from the current module #' #' @param submodule character string of length 1 with the name of the submodule #' @note Sometimes, a module may want to export all or some of its submodules in #' bulk. Simply doing \code{import('submodule', attach = TRUE)} won’t work, #' however, since \code{atta...
apache-2.0
R
e63ca1b16833e86817df9e3aea44dd02ae983619
Add channel argument
jkarl/LandscapeToolbox,jkarl/LandscapeToolbox,jkarl/LandscapeToolbox
DIMA_Queries-Reports/DIMA_count_HAF_species.r
DIMA_Queries-Reports/DIMA_count_HAF_species.r
library(dplyr) library(readr) library(RODBC) DIMA <- "filepath and filename to DIMA" ## This reduces it to forbs only in the process haf.list <- read_csv("HAF_preferred_species_by_code.csv") %>% subset(GROWTH.HABIT == "FORB") channel <- odbcConnectAccess(DIMA) ## Assumes 32-bit R and 32-bit Access. Use odbcConnectAc...
library(dplyr) library(readr) library(RODBC) DIMA <- "filepath and filename to DIMA" ## This reduces it to forbs only in the process haf.list <- read_csv("HAF_preferred_species_by_code.csv") %>% subset(GROWTH.HABIT == "FORB") channel <- odbcConnectAccess(DIMA) ## Assumes 32-bit R and 32-bit Access. Use odbcConnectAc...
cc0-1.0
R
e78d39fb83fbb7ad55ebadfc42ac9afde25ea672
Add patient_coef function.
pschulam-attic/sclero
R/mixed-effects.r
R/mixed-effects.r
fit_mixed_effects <- function(fixed, random, data) { require(nlme) fixed <- as.formula(fixed) random <- as.formula(random) lme.fit <- lme(fixed = fixed, random = random, data = data) return(lme.fit) } patient_coef <- function(lme.fit) { cf <- coef(lme.fit) new.names <- if (length(cf) == 1) { c("in...
fit_mixed_effects <- function(fixed, random, data) { require(nlme) fixed <- as.formula(fixed) random <- as.formula(random) lme.fit <- lme(fixed = fixed, random = random, data = data) return(lme.fit) }
mit
R
47fb440e2de181a409e0db2faae0c6fb479c7d82
Add some more plot types - first draft only
tambora-org/tamboRapi
R/drawIndexBoxPlot.r
R/drawIndexBoxPlot.r
source("R/tmbImportPackages.R") installDrawPackages <- function() { # define needed packages packages <- c("extrafont", "ggmap", "ggplot2") tmbImportPackages(packages) } #' Draw summary of all tambora data to a map #' #' This function allows you to draw data inquired from tambora.org to a map #' @param tamboraD...
source("R/tmbImportPackages.R") installDrawPackages <- function() { # define needed packages packages <- c("extrafont", "ggmap", "ggplot2") tmbImportPackages(packages) } #' Draw summary of all tambora data to a map #' #' This function allows you to draw data inquired from tambora.org to a map #' @param tamboraD...
apache-2.0
R
9633b48a6b4f8527d51fc60532b0da3d5c74ee75
Update a document.
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͂񂪁Ã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...
=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
15f2ff439dd8b9e379af72e73a896aba110742e7
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
bf2b7f9b675dfb5e7a17d347dfa38281a130f63c
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
a3b52c36ba0b26bd04f11a81536d040a4db43840
Load helper libraries by default
klmr/codons,klmr/codons
scripts/knit.r
scripts/knit.r
library = function (...) suppressMessages(base::library(...)) assign('library', library, globalenv()) library(knitr) library(modules) options(stringsAsFactors = FALSE, import.path = c('scripts', file.path(Sys.getenv('HOME'), 'Projects/R'))) #opts_chunk$set(cache = TRUE) # Pretty-print tables library(pander...
library = function (...) suppressMessages(base::library(...)) assign('library', library, globalenv()) library(knitr) library(modules) options(stringsAsFactors = FALSE, import.path = file.path(Sys.getenv('HOME'), 'Projects/R')) #opts_chunk$set(cache = TRUE) # Pretty-print tables library(pander) panderOptio...
apache-2.0
R
61e32291420aafd98d04b1275c4e39d93f3ca674
Update shiny.r
aleksandrov2/APPR-2015-16
shiny/shiny.r
shiny/shiny.r
library(shiny) source("lib/libraries.r", encoding = "UTF-8") source("uvoz/uvoz.r", encoding = "UTF-8") runApp("shiny")
library(shiny) source("lib/uvozi.zemljevid.r", encoding = "UTF-8") library(ggplot2) library(dplyr) pretvori.zemljevid <- function(zemljevid) { fo <- fortify(zemljevid) data <- zemljevid@data data$id <- as.character(0:(nrow(data)-1)) return(inner_join(fo, data, by="id")) } # 1. Slovenske občine obcine <- uvo...
mit
R
8641813768265bfc7e15bb8df1752f9a4a6feada
correct tanimoto measurement formula
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
22c1d056392fa385f5e4bb7c9cdc02c6b833e727
Update model_stage.r
syberia/syberia
R/model_stage.r
R/model_stage.r
#' Model stage for syberia models #' #' TODO: Document this more #' #' @param modelenv an environment. The persistent modeling environment. #' @param model_parameters a list. Model-specific parameters, with the first #' parameter always being the model keyword for the tundra container #' (e.g., glm, gbm, etc.) #...
#' Model stage for syberia models #' #' TODO: Document this more #' #' @param modelenv an environment. The persistent modeling environment. #' @param model_parameters a list. Model-specific parameters, with the first #' parameter always being the model keyword for the tundra container #' (e.g., glm, gbm, etc.) #...
mit
R
1a4239bd56c88d49f47bd45a24b2c1b6a9500d79
Fix bug in plot
ewels/NGI-ChIPseq,ewels/NGI-ChIPseq,ewels/NGI-ChIPseq,ewels/NGI-ChIPseq,ewels/NGI-ChIPseq
bin/plot_peak_intersect.r
bin/plot_peak_intersect.r
#!/usr/bin/env Rscript ################################################ ################################################ ## LOAD LIBRARIES ## ################################################ ################################################ library(optparse) library(UpSetR) ###############...
#!/usr/bin/env Rscript ################################################ ################################################ ## LOAD LIBRARIES ## ################################################ ################################################ library(optparse) library(UpSetR) ###############...
mit
R
91abeb64ef7d8f7da4728addcbbbdfd8b8ce948b
Refactor loading of helpers at R startup
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
da067e4a01a48f3870cc8e6fcac89a6a7765953b
Update TwitterSupport.r
xxu26/how-to-use
How-to/TwitterSupport.r
How-to/TwitterSupport.r
#connect Rstudio to Twitter library(twitteR) library(RJSONIO) library(ROAuth) library(RCurl) library(bitops) options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))) download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem") api_key <- "yZ6xhaxgTrMT3vbGyJE3x...
rm(list=ls()) library(twitteR) library(RJSONIO) library(ROAuth) library(RCurl) library(bitops) options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl"))) download.file(url="http://curl.haxx.se/ca/cacert.pem", destfile="cacert.pem") api_key <- "yZ6xhaxgTrMT3vbGyJE3xwbAe" api_secre...
isc
R
be094aad97af1534a259cfa0527f0ccdafb308ed
add case of gov't having all bargaining power to DGH.r
kbuzard/SOP_repeated
DGH.r
DGH.r
#Solve for optimal lobby effort under DGH97-style model with obj fcn W + e #reserve space for loop output tau = seq(0.001,.166,0.001) #this will be counter variable in loop PSx = matrix(NA,length(tau),1) CSx = matrix(NA,length(tau),1) TR = matrix(NA,length(tau),1) PSy = matrix(NA,length(tau),1) CSy = matrix(NA,length(...
#Solve for optimal lobby effort under DGH97-style model with obj fcn W + e #reserve space for loop output tau = seq(0.001,.166,0.001) #this will be counter variable in loop PSx = matrix(NA,length(tau),1) CSx = matrix(NA,length(tau),1) TR = matrix(NA,length(tau),1) PSy = matrix(NA,length(tau),1) CSy = matrix(NA,length(...
mit
R
3185c72cd590ff67859812d9d3a97b50f0f54006
update 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
c569dd27d1fddc1229e2746eb2b181020942b44b
Rework reshape
vikjam/bcstatsR
R/bcstats.r
R/bcstats.r
#' Join two data frames together #' #' @param surveydata The survey data #' @param bcdata The back check data #' @param id the unique ID #' @param t1vars The list of "type 1" variables #' @param t2vars The list of "type 2" variables #' @param t3vars The list of "type 3" variables #' @return A data.frame with the erro...
#' Join two data frames together #' #' @param surveydata The survey data #' @param bcdata The back check data #' @param id the unique ID #' @param t1vars The list of "type 1" variables #' @param t2vars The list of "type 2" variables #' @param t3vars The list of "type 3" variables #' @return A data.frame with the erro...
mit
R
fdd1b3117427740167cbaf2b29fca966c6185d74
Update splitSupermatrices.r
NathanWhelan/Split_supermatrix_into_partitions,NathanWhelan/Split_supermatrix_into_partitions
splitSupermatrices.r
splitSupermatrices.r
######################################################################################################################### #This script was written by Nathan Whelan. # THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY...
######################################################################################################################### #This script was written by Nathan Whelan. # THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY...
mit
R
b74222131cf7a164588469a1c0da6e9b1e05684f
add more debugging
snowch/biginsight-examples,snowch/biginsight-examples
examples/BigR/connect.r
examples/BigR/connect.r
################################################################################ # environment variables ################################################################################ libdir <- Sys.getenv("libdir") hostname <- Sys.getenv("hostname") username <- Sys.getenv("username") password <- Sys.getenv("passwor...
################################################################################ # environment variables ################################################################################ libdir <- Sys.getenv("libdir") hostname <- Sys.getenv("hostname") username <- Sys.getenv("username") password <- Sys.getenv("passwor...
apache-2.0
R
bea08f3cb846fbfdaf84b4cbed376cae02554413
Update extracterDB.r
svobodam/Deep-Learning-Text-Summariser,svobodam/Deep-Learning-Text-Summariser,svobodam/Deep-Learning-Text-Summariser
PreProcessingScript/extracterDB.r
PreProcessingScript/extracterDB.r
# Data Frame exploration. # Extract data from Documents and document summaries into new subset and prepare them for extarction to table in DB. # Extract Documents from df > dfData counter = 1 while(counter <= 25){ for (m in doc) { if ((exists("dfData"))==TRUE) { dfEdit=data.frame(with(df, paste0(df[[m]])),...
# Author: Matej Svoboda # Data Frame exploration. # Extract data from Documents and summaries into rewsum1 to table in DB # SUBSET CREATION # Create Subset and merge all columns into one column called "Documents". Column "Summaries" = summary of document dfData = with(df, paste0(Document1, Document2, Document3, Docu...
mit
R
c8db3319b3eaec20a674751b59a7a3906c5d9b1b
fix ouput assigment error in small_rna_map.r
drosofff/tools-artbio,ARTbio/tools-artbio,ARTbio/tools-artbio,drosofff/tools-artbio,chamaelj/tools-artbio,chamaelj/tools-artbio,ARTbio/tools-artbio,drosofff/tools-artbio,chamaelj/tools-artbio,drosofff/tools-artbio,ARTbio/tools-artbio
tools/small_rna_map/small_rna_map.r
tools/small_rna_map/small_rna_map.r
library(optparse) library(ggplot2) library(gridExtra) option_list <- list( make_option(c("-r", "--output_tab"), type="character", help="path to tabular file"), make_option("--output_pdf", type = "character", help="path to the pdf file with plot") ) parser <- OptionParser(usage = "%prog [options] file", op...
library(optparse) library(ggplot2) library(gridExtra) option_list <- list( make_option(c("-r", "--output_tab"), type="character", help="path to tabular file"), make_option("--output_pdf", type = "character", help="path to the pdf file with plot") ) parser <- OptionParser(usage = "%prog [options] file", op...
mit
R
d1c140dd675123696c1487f02444402690f7d90d
fix data aggregation bugs
wikimedia-research/Blockr
functions.r
functions.r
# functions.r centralises miscellaneous functions used throughout the Blockr project # # Copyright (c) 2013 Oliver Keyes # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restrict...
# functions.r centralises miscellaneous functions used throughout the Blockr project # # Copyright (c) 2013 Oliver Keyes # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restrict...
mit
R
5648f4a3f290fd65433ba3c3446cab11e19bb68a
fix typos
johnrfleck/water-tools
flow_threshold.r
flow_threshold.r
# For drought analysis, determines the number of days in each year # of the historic record in which flow at a USGS river gauge # fell below an arbitrary threshold. # Uses USGS's excellent dataRetrieval package # tutorial here: https://owi.usgs.gov/R/dataRetrieval.html#1 # Albuquerque gauge to use as example: 08330000 ...
# For drought analysis, determines the number of days in each year # of the historic record in which flow at a USGS river gauge # fell below an arbitrary threshold. # Uses USGS's excelelent dataRetrieval package # tutorial here: https://owi.usgs.gov/R/dataRetrieval.html#1 # Albuquerque gauge to use as example: 08330000...
mit
R
a37766e380c6922c991315e3ec1f1da0c971689e
set filename
khufkens/phenor
tests/testthat/test_data_downloads.r
tests/testthat/test_data_downloads.r
# Phenor unit tests # test all data downloads test_that("test data downloads",{ # download npn data npn_data = try(download_npn(species = 3, path = paste0(tempdir(),"/npn_test.rds"), internal = FALSE)) # download npn data internal npn_data_internal ...
# Phenor unit tests # test all data downloads test_that("test data downloads",{ # download npn data npn_data = try(download_npn(species = 3, path = tempdir(), internal = FALSE)) # download npn data internal npn_data_internal = try(download_npn(speci...
agpl-3.0
R
3858af14754207a262d450f4156bee6820af23bd
Add support for email settings
jmousseau/Stain
R/slurm-settings.r
R/slurm-settings.r
#' SlurmSettings R6 object. #' #' An interface to SBATCH settings. #' #' @export SlurmSettings <- R6::R6Class("SlurmSettings", public = list( nodes = NA, cpus_per_task = NA, time = NA, memory = NA, mail_to = NA, mail_type = NA, initialize = function(nodes = 1,...
#' SlurmSettings R6 object. #' #' An interface to SBATCH settings. #' #' @export SlurmSettings <- R6::R6Class("SlurmSettings", public = list( nodes = NA, cpus_per_task = NA, time = NA, memory = NA, initialize = function(nodes = 1, cpus_per_task = 12, ...
mit
R
e47dbeafbf0493cdc203bd81994a0be5026423b6
revise comment
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
2000bd589775f286221a08a02026a5c0cd2a87e1
Bump version to 3.0.99
zsx/r3,zsx/r3,zsx/r3,zsx/r3
src/boot/version.r
src/boot/version.r
3.0.99.3.1
3.0.91.3.1
apache-2.0
R
abb60f880284056e9cb4d4945fa469e53e18ceb0
remove verboses and fix predict value
syberia/tundra,robertzk/tundra
inst/tests/test-tundra_ensemble.r
inst/tests/test-tundra_ensemble.r
context('tundra ensemble') # A very simple model mock for testing tundra containers assign('tundra_simple', function(mp = list(), defaults = list()) { tundra_container$new('simple', function(dataframe) output$val <<- dataframe[1, 1] + input$twiddle, function(dataframe) if (input$master) output$val + ap...
context('tundra ensemble') # A very simple model mock for testing tundra containers assign('tundra_simple', function(mp = list(), defaults = list()) { tundra_container$new('simple', function(dataframe) output$val <<- dataframe[1, 1] + input$twiddle, function(dataframe) if (input$master) apply(dataframe...
mit
R
6c154c90e6db7a1b6e9289f7f5b4a4cecfd03e55
read object
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/scRNA/gene_localization_map.r
lib/scRNA/gene_localization_map.r
library(Seurat) library(ggplot2) library(ggpubr) obj<-read_object(parFile1) groups_tbl<-read.table(parSampleFile2, sep="\t", stringsAsFactors = F) groups=split(groups_tbl$V2, groups_tbl$V1) obj$group = unlist(groups[obj$orig.ident]) ngroup=length(unique(groups_tbl$V2)) #using RNA assay for visualization DefaultAss...
source("scRNA_func.r") library(Seurat) library(ggplot2) library(ggpubr) finalList<-readRDS(parFile1) obj<-finalList$obj groups_tbl<-read.table(parSampleFile2, sep="\t", stringsAsFactors = F) groups=split(groups_tbl$V2, groups_tbl$V1) obj$group = unlist(groups[obj$orig.ident]) ngroup=length(unique(groups_tbl$V2)) ...
apache-2.0
R
ea1408cea3d3c4290fbfab6a042e78fe33a364b1
Modify args example
tisp-lang/tisp,tisp-lang/tisp,raviqqe/tisp,raviqqe/tisp,raviqqe/tisp
examples/args.r
examples/args.r
(let kwargs {'y5 123 'y6 456}) ((\ (x1 x2 (x3 123) (x4 456) args.. y1 (y2 123) y3 (y4 456) kwargs...) x) 1 2 3 4 list.. . y1 123 y3 456 kwargs...) ; We don't have to support neither `*[123 456]` nor `**{'y5 123 'y6 456}` ; because they can just be expanded into arguments directly. ; (e.g. `(func 123 456 * y5 123 y6 ...
(let kwargs {'y5 123 'y6 456}) ((\ (x1 x2 (x3 123) (x4 456) *args y1 (y2 123) y3 (y4 456) **kwargs) x) 1 2 3 4 *list * y1 123 y3 456 **kwargs) ; We don't have to support neither `*[123 456]` nor `**{'y5 123 'y6 456}` ; because they can just be expanded into arguments directly. ; (e.g. `(func 123 456 * y5 123 y6 456)...
mit
R
5d35f9524702a05ce5ae9583c9acae37b5934397
clean up comments
mschubert/narray,mschubert/narray
R/construct.r
R/construct.r
#' A wrapper around reshape2::acast using a more intuitive formula syntax #' #' The construct() function can be called either with the data.frame as the #' first argument or the formula and then specify `data=<data.frame>` #' #' @param data A data frame #' @param formula A formula: value ~ axis1 [+ axi...
#' A wrapper around reshape2::acast using a more intuitive formula syntax #' #' The construct() function can be called either with the data.frame as the #' first argument or the formula and then specify `data=<data.frame>` #' #' @param data A data frame #' @param formula A formula: value ~ axis1 [+ axi...
apache-2.0
R
0276ead2f2fc3ef69f5c378880bfabbde89d3365
use base::rep, not narray::rep (#27)
mschubert/narray,mschubert/narray
R/construct.r
R/construct.r
#' Transform a data.frame with axes and value into an array #' #' The construct() function can be called either with the data.frame as the #' first argument or the formula and then specify `data=<data.frame>` #' #' @param data A data frame #' @param formula A formula: value ~ axis1 [+ axis2 + axis n .....
#' Transform a data.frame with axes and value into an array #' #' The construct() function can be called either with the data.frame as the #' first argument or the formula and then specify `data=<data.frame>` #' #' @param data A data frame #' @param formula A formula: value ~ axis1 [+ axis2 + axis n .....
apache-2.0
R
16b1784b255f08e23ccd918c4970b80e9486e063
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(axis.text.x = element_text(a...
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. library(shiny) if ("server.R" %in% dir()) { setwd("..") }
mit
R
229d0527c48722a0f6423570ecb75cd73e5174be
Add plot line
thoolihan/GoogleAnalyticsRExample
explore.r
explore.r
data <- read.csv("~/workspace/data/ga2-hoolihan.csv", sep=",") with(data, { Day.Index <- as.Date(Day.Index, format="%m/%d/%Y") plot(Day.Index, Pageviews, xlab = "Date", type = "b", col = "blue", main = "Google Analytics", ylim = c(0, 200)) ...
data <- read.csv("~/workspace/data/ga2-hoolihan.csv", sep=",") with(data, { Day.Index <- as.Date(Day.Index, format="%m/%d/%Y") plot(Day.Index, Pageviews, xlab = "Date", type = "b", col = "blue", main = "Google Analytics", ylim = c(0, 200)) ...
unlicense
R
53780650785f05c64d8c1bcd324960d651fd7493
Change input to folder where dtm is
HIIT/digivaalit-2015,HIIT/digivaalit-2015,HIIT/digivaalit-2015
topics/create_topics.r
topics/create_topics.r
source('topics.r') args <- commandArgs(trailingOnly = TRUE) print( args[1] ) load( paste( args[1] , 'dtm.rdata', sep='' ) ) k <- as.integer( args[2] ) model <- create_model( dtm , k ) path <- paste( args[1] , '/topic-', args[2], '.rdata' , sep = '' ) save( model , file = path )
source('topics.r') args <- commandArgs(trailingOnly = TRUE) load( args[1] ) k <- as.integer( args[2] ) model <- create_model( dtm , k ) path <- paste( args[1] , '-', args[2], '.rdata' , sep = '' ) save( model , file = path )
mit
R
2d3e369c9dffdbc22fc9fa7322fa0e4c0900ca97
Update polyester.r
sains1/UTRonsProject,sains1/UTRonsProject
scripts/polyester.r
scripts/polyester.r
################################################################################################################### # R script to simulate rna-seq reads from hg38 transcriptome reference using polyester simulator # ########################################################################################...
library(Biostrings) library(polyester) #Set num of repeats num_repeats = 4 the_seed = 1 # Path to cdna file fastapath <- '../../refiles/transcripts.fa' # Read DNA file into var transcripts transcripts = readDNAStringSet(fastapath) # splitting the fasta into chunks based on the number of trnascripts chunks = 50 tra...
mit
R
f31739924ff7c485c5a82be66184394335b1e21d
update calcor.r
isezen/sahra,isezen/sahra
code/calcor.r
code/calcor.r
# Saharan Dust Transport Research # 2016-05-04 Ismail SEZEN # sezenismail@gmail.com source("code/correlation.r") calcor <- function(files = stop("'file' must be specified")) { pm <- read_pm10() dir_out <- "data/cor" dir.create(dir_out, showWarnings = F) nof <- length(files) i <- 1 for (f in files) { f...
# Saharan Dust Transport Research # 2016-05-04 Ismail SEZEN # sezenismail@gmail.com source("code/correlation.r") calcor <- function(files = stop("'file' must be specified")) { pm <- read_pm10() dir_out <- "data/cor" dir.create(dir_out, showWarnings = F) nof <- length(files) i <- 1 for (f in files) { w...
mit
R
b6f06e88db25aab98c3466b68130b0ef8743c632
Remove some unecessary arguments
metagraf/rVega
R/geopath.r
R/geopath.r
#' Vega geopath #' #' Create a geopath visualization #' #' @export geopath <- function( fill.color = "pink", hover.color = "lightblue", border.color = "black", url = "data/us-states.json", projection = "albersUsa", scale = 500, translate = c(a$opt$width / 2, a$opt$height / 2), # as defa...
#' Vega geopath #' #' Create a geopath visualization #' #' @export geopath <- function( data, labels = names(data), width = 600, height = 400, font = "Helvetica Neue", font.size = 14, fill.color = "pink", hover.color = "lightblue", border.color = "black", padding = c(0, 0...
agpl-3.0
R
2930def36522c9001082f2ff06c25f65797fb015
Update uvoz_tabela1.r
ZavbiA/APPR-2017
uvoz/uvoz_tabela1.r
uvoz/uvoz_tabela1.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 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...
mit
R
588db6c246764a43844ae65dbfdbbd8b7a378bb6
Add even more bands!
GreatEmerald/geoscripting,GreatEmerald/geoscripting,GreatEmerald/geoscripting,GreatEmerald/geoscripting
Lesson8/Main.r
Lesson8/Main.r
# Team Rython, Dainius Masiliunas and Tim Weerman # Date: 11 January, 2016 # Apache License 2.0 # Needed packages # Source # Download/load information download.file("https://github.com/GeoScripting-WUR/AdvancedRasterAnalysis/raw/gh-pages/data/GewataB1.rda", "data/GewataB1.rda", "wget") download.file("https://githu...
# Team Rython, Dainius Masiliunas and Tim Weerman # Date: 11 January, 2016 # Apache License 2.0 # Needed packages # Source # Download/load information download.file("https://github.com/GeoScripting-WUR/AdvancedRasterAnalysis/raw/gh-pages/data/GewataB1.rda", "data/GewataB1.rda", "wget") download.file("https://githu...
apache-2.0
R
202f7748beb7b0450d19e40155acb69cfcceeeb3
add pie exposure and stop feed indoors > feed man
AndySouth/coverage
inst/shiny/coverage1/server.r
inst/shiny/coverage1/server.r
#coverage/inst/shiny/coverage1/server.r #andy south 12/5/16 library(shiny) #install_github('AndySouth/coverage') library(coverage) library(png) shinyServer(function(input, output, session) { ################################ output$plot_feed <- renderPlot({ #add dependency on the button #if ( input$aBut...
#coverage/inst/shiny/coverage1/server.r #andy south 12/5/16 library(shiny) #install_github('AndySouth/coverage') library(coverage) library(png) shinyServer(function(input, output, session) { ################################ output$plot_feed <- renderPlot({ #add dependency on the button #if ( input$aBut...
mit
R
91c0705d323cb1345f94cede302fb84e11e1a82f
fix a uninitialized word in run-all.r.
NikolayShubenkovProgSchool/red,red-eco/red,vehar/red,red-eco/red,rheber/red,NikolayShubenkovProgSchool/red,rheber/red,vehar/red
tests/run-all.r
tests/run-all.r
REBOL [ Title: "Builds and Runs the Red Tests" File: %run-all.r Author: "Peter W A Wood" Version: 0.5.0 License: "BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt" ] ;; should we run non-interactively? each-mode: no if args: any [system/script/args system/options/args][ batch-mode: fi...
REBOL [ Title: "Builds and Runs the Red Tests" File: %run-all.r Author: "Peter W A Wood" Version: 0.5.0 License: "BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt" ] ;; should we run non-interactively? if args: any [system/script/args system/options/args][ batch-mode: find args "--batc...
bsd-3-clause
R
b8edf972bd52c0f29c4d63c966801c486503f3d5
Update onLoad.r
alfcrisci/rBiometeo,alfcrisci/rBiometeo
R/onLoad.r
R/onLoad.r
#' .onLoad #' #' @importFrom V8 new_context ct <- NULL .onLoad <- function(libname, pkgname){ ct <- V8::new_context() ct$source(system.file("js/biometeo.js", package = pkgname)) }
#' .onLoad #' #' @importFrom V8 new_context ct <- NULL .onLoad <- function(libname, pkgname){ ct <<- V8::new_context() ct$source(system.file("js/biometeo.js", package = pkgname)) }
mit
R
8e2a3ef5c3d9c1815378783eac153b2e510b1f40
Modify plotting script to handle drop stats.
draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco,draios/falco
test/plot-live.r
test/plot-live.r
require(jsonlite) library(ggplot2) library(GetoptLong) initial.options <- commandArgs(trailingOnly = FALSE) file.arg.name <- "--file=" script.name <- sub(file.arg.name, "", initial.options[grep(file.arg.name, initial.options)]) script.basename <- dirname(script.name) if (substr(script.basename, 1, 1) != '/') { sc...
require(jsonlite) library(ggplot2) library(GetoptLong) initial.options <- commandArgs(trailingOnly = FALSE) file.arg.name <- "--file=" script.name <- sub(file.arg.name, "", initial.options[grep(file.arg.name, initial.options)]) script.basename <- dirname(script.name) if (substr(script.basename, 1, 1) != '/') { sc...
apache-2.0
R
16860a944166415c86905e7b50f36fb422e50419
Update test.r
snowch/biginsight-examples,snowch/biginsight-examples
examples/BigR/test.r
examples/BigR/test.r
.libPaths('lib') # create directory to hold libraries dir.create('./lib') # install libraries install.packages('rJava', repos='http://cran.us.r-project.org', lib='./lib', quiet=TRUE) install.packages('base64enc', repos='http://cran.us.r-project.org', lib='./lib', quiet=TRUE) install.packages('data.table', repos...
# 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'...
apache-2.0
R
d5d0a5e9c8b76ac36b2722a6140d0cdf0b005b78
Add test cases for detach on unload
klmr/modules,klmr/modules
inst/tests/test-z-attach.r
inst/tests/test-z-attach.r
context('Test attach') # File name starts with `z` so that the test is executed last. test_that('attach works locally', { c = import('c') # c attaches `a`. So check that `a` is *not* attached here. expect_that(length(grep('^module:a$', search())), equals(0)) }) test_that('module can be attached to global...
context('Test attach') # File name starts with `z` so that the test is executed last. test_that('attach works locally', { c = import('c') # c attaches `a`. So check that `a` is *not* attached here. expect_that(length(grep('^module:a$', search())), equals(0)) }) test_that('module can be attached to global...
apache-2.0
R
d58677404c20a0d3a52513713598c398bef4cbbd
fix object name
sestaton/sesbio,sestaton/sesbio,sestaton/sesbio,sestaton/sesbio
transposon_annotation/r_scripts/hann_lines_analysis.r
transposon_annotation/r_scripts/hann_lines_analysis.r
library(plyr) library(ggplot2) setwd("Desktop/Hannuus_lines_repeat_analysis") lines <- read.table("all_lines_family_stats_6-30.tsv",header=T,sep="\t",comment.char="") lines.filtered <- lines[lines$GenomeFrac >= 0.01,] ggplot(lines.filtered, aes(x=reorder(Identifier, GenomeFrac), y=GenomeFrac)) + geom_bar(aes(fill=Fa...
library(plyr) library(ggplot2) setwd("Desktop/Hannuus_lines_repeat_analysis") lines <- read.table("all_lines_family_stats_6-30.tsv",header=T,sep="\t",comment.char="") lines.filtered <- lines[lines$GenomeFrac >= 0.01,] ggplot(alllines.filt, aes(x=reorder(Identifier, GenomeFrac), y=GenomeFrac)) + geom_bar(aes(fill=Family...
mit
R
6efc0ad8150f3f5ae83c726ababb3e8183c5bc13
Make GSA less verbose
klmr/codons,klmr/codons
scripts/gsa.r
scripts/gsa.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 gsa_de = function (data, col_data, contrast, go_genes) { stopifnot(inherits(go_g...
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 gsa_de = function (data, col_data, contrast, go_genes) { stopifnot(inherits(go_g...
apache-2.0
R
e17d6ddf169ee2f99d30d63e8d70aaddf074e99f
add package
ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,berkeley-dsep-infra/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.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
9cbf47373edfb84520efc335983662b69d4c8fe4
Fix typo
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
c81ff404384fa3a21dab221748c9c559b8fead11
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