id
stringlengths
40
40
repo_name
stringlengths
5
110
path
stringlengths
2
233
content
stringlengths
0
1.03M
size
int32
0
60M
license
stringclasses
15 values
7f32cb99adfedb0a79c1d812f2eb87bb5a003d5a
kingaa/pomp
examples/trajectory.R
\donttest{ ## The basic components needed to compute trajectories ## of a deterministic dynamical system are ## rinit and skeleton. ## The following specifies these for a simple continuous-time ## model: dx/dt = r (1+e cos(t)) x trajectory( t0 = 0, times = seq(1,30,by=0.1), rinit = function (x0, ....
1,013
gpl-3.0
5484bccf3c032d53a849f55eb7f3a3ee317d7f86
frareb/pqb
server.R
library(shiny) archivo<-"data/cuestionarioquinuarjj-2016-01-04-18-03-29.csv" tipoDatos<-c("factor","factor","Date","factor","factor","factor","factor","factor", "factor","character","character","factor","integer","character","factor", "logical","logical","logical","logical","logical","factor"...
1,925
gpl-2.0
495aeda45512dc212a93a260aa0ccac5961b7233
cboettig/pdg_control
R/active_adaptive_simulate.R
#' @export setmodel <- function(f, pars){ function(x_t1, x_t0){ mu = f(x_t0, 0, pars) (mu <= 0) * (x_t1 == 0) + (mu > 0) * dlnorm(x_t1, log(mu), sigma_g) } } # internal function bin <- function(v, v_grid){ v_grid[which.min(abs(v_grid - v))] # i = 1 # n = length(v_grid) # while(v_grid[i] < v & i < ...
5,211
cc0-1.0
6c8936770bb353f38cc483b597ced8c5a42c3a0e
Bioinformatics-Support-Unit/shiny
app1/global.R
source("profile_plot.R") load("deploy2.Rdata") data_names <- c('Raw Data', 'Normalised Data')
94
apache-2.0
ee3edda17ca237a7a0cdbe958a69cc75191935d7
kyoren/https-github.com-h2oai-h2o-3
h2o-r/tests/testdir_docexamples/runit_Rdoc_screeplot.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') test.rdoc_screeplot.golden <- function() { ausPath <- system.file("extdata", "australia.csv", package = "h2o") australia.hex <- h2o.uploadFile(path = ausPath) australia.pca <- h2o.prcomp(training_frame = australia.hex...
445
apache-2.0
eb2fddf7c8ab123c6845f5ce859fb22b637846c1
jkushida/BanditsBook
r/comparisons/plot_comparisons.R
library("plyr") library("ggplot2") annealing.results <- read.csv("julia/algorithms/epsilon_greedy/annealing_results.csv", header = FALSE) names(annealing.results) <- c("Sim", "T", "ChosenArm", "Reward", "CumulativeReward") annealing.results <- transform(annealing.results, Algorithm = "Annealing epsilon-Greedy") epsil...
3,631
mit
ed55a2315e7a2f7bbe43bedea369d9771b3a872f
datachand/h2o-3
h2o-r/tests/testdir_algos/glm/runit_GLM_offset_poisson_comparison1.R
### This tests offset in glm on real data ###### setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../../h2o-runit.R') test <- function(h) { insurance_h2o <- h2o.importFile(locate("smalldata/glm_test/insurance.csv")) insurance_h2o$logHolders <- log(insurance_h2o$Holders) insur...
2,274
apache-2.0
ed55a2315e7a2f7bbe43bedea369d9771b3a872f
printedheart/h2o-3
h2o-r/tests/testdir_algos/glm/runit_GLM_offset_poisson_comparison1.R
### This tests offset in glm on real data ###### setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../../h2o-runit.R') test <- function(h) { insurance_h2o <- h2o.importFile(locate("smalldata/glm_test/insurance.csv")) insurance_h2o$logHolders <- log(insurance_h2o$Holders) insur...
2,274
apache-2.0
eb2fddf7c8ab123c6845f5ce859fb22b637846c1
Mario-LopezTelecom/BanditsBook
r/comparisons/plot_comparisons.R
library("plyr") library("ggplot2") annealing.results <- read.csv("julia/algorithms/epsilon_greedy/annealing_results.csv", header = FALSE) names(annealing.results) <- c("Sim", "T", "ChosenArm", "Reward", "CumulativeReward") annealing.results <- transform(annealing.results, Algorithm = "Annealing epsilon-Greedy") epsil...
3,631
mit
6dadb96ece94b5602647f42c97ab6f1afdaabd71
definitelysean/sgaphd
R/data.R
#' All of the Gene Set Collections from the Broad Institutes MSigDB #' #' A collated version of all the gene set collections created by the Broad Institute. #' Generated by downloading the Entrez .gmt's for each gene set, parsing them with #' roller, and concatenating them al together. #' Useful for GSEA and GSVA shot...
807
mit
ed55a2315e7a2f7bbe43bedea369d9771b3a872f
junwucs/h2o-3
h2o-r/tests/testdir_algos/glm/runit_GLM_offset_poisson_comparison1.R
### This tests offset in glm on real data ###### setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../../h2o-runit.R') test <- function(h) { insurance_h2o <- h2o.importFile(locate("smalldata/glm_test/insurance.csv")) insurance_h2o$logHolders <- log(insurance_h2o$Holders) insur...
2,274
apache-2.0
ed55a2315e7a2f7bbe43bedea369d9771b3a872f
brightchen/h2o-3
h2o-r/tests/testdir_algos/glm/runit_GLM_offset_poisson_comparison1.R
### This tests offset in glm on real data ###### setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../../h2o-runit.R') test <- function(h) { insurance_h2o <- h2o.importFile(locate("smalldata/glm_test/insurance.csv")) insurance_h2o$logHolders <- log(insurance_h2o$Holders) insur...
2,274
apache-2.0
eb2fddf7c8ab123c6845f5ce859fb22b637846c1
SalemAmeen/BanditsBook
r/comparisons/plot_comparisons.R
library("plyr") library("ggplot2") annealing.results <- read.csv("julia/algorithms/epsilon_greedy/annealing_results.csv", header = FALSE) names(annealing.results) <- c("Sim", "T", "ChosenArm", "Reward", "CumulativeReward") annealing.results <- transform(annealing.results, Algorithm = "Annealing epsilon-Greedy") epsil...
3,631
mit
eb2fddf7c8ab123c6845f5ce859fb22b637846c1
sweaterr/BanditsBook
r/comparisons/plot_comparisons.R
library("plyr") library("ggplot2") annealing.results <- read.csv("julia/algorithms/epsilon_greedy/annealing_results.csv", header = FALSE) names(annealing.results) <- c("Sim", "T", "ChosenArm", "Reward", "CumulativeReward") annealing.results <- transform(annealing.results, Algorithm = "Annealing epsilon-Greedy") epsil...
3,631
mit
445cb2189e9a5ca7a6873d093b1c72c4d1670e77
chipster/chipster-tools
tools/microarray/R/stat-one-group.R
# TOOL stat-one-group.R: "One sample tests" (Tests whether genes are differentially expressed, i.e., whether their expression is significantly different from the expected.) # INPUT normalized.tsv: normalized.tsv TYPE GENE_EXPRS # OUTPUT one-sample.tsv: one-sample.tsv # PARAMETER test: "Test" TYPE [t-test: t-test, Wil...
3,460
mit
eb2fddf7c8ab123c6845f5ce859fb22b637846c1
johnmyleswhite/BanditsBook
r/comparisons/plot_comparisons.R
library("plyr") library("ggplot2") annealing.results <- read.csv("julia/algorithms/epsilon_greedy/annealing_results.csv", header = FALSE) names(annealing.results) <- c("Sim", "T", "ChosenArm", "Reward", "CumulativeReward") annealing.results <- transform(annealing.results, Algorithm = "Annealing epsilon-Greedy") epsil...
3,631
mit
86137d0770d3ce761a22b5248cc1112e2ffb6bac
Robinlovelace/twitter-sandy
R Scripts/loading-mysql-tweets.R
# load twitter db library(RMySQL) con <- dbConnect(dbDriver("MySQL"), user = "root", password = "NDean19", dbname = "twitter") ## list the tables in the database dbListTables(con) tweets1 <- dbReadTable(con, "tweets_1") head(tweets1) save.image("tweets1.RData")
263
mit
7e895b58d7841ed182a0a55ae559bc87d40cc6fc
marchtaylor/sinkr
R/shadowtext.R
#' Add border to plotted text #' #' @param x,y numeric vectors of coordinates where the text labels should #' be written. If the length of x and y differs, the shorter one is recycled. #' @param labels a character vector or expression specifying the text to be #' written. An attempt is made to coerce other langua...
2,194
gpl-3.0
7ed3b4d2cfb496074155084e9eae38c6fea0e151
andy-thomason/r-source
src/library/utils/R/aspell.R
# File src/library/utils/R/aspell.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2015 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either ...
39,670
gpl-2.0
4f14a238b5feb0978403112fef1ad9d7a3a5152d
kmillar/cxxr
src/extra/testr/filtered-test-suite/enc2native/tc_enc2native_3.R
expected <- eval(parse(text="\"José Pinheiro [aut] (S version)\"")); test(id=0, code={ argv <- eval(parse(text="list(\"José Pinheiro [aut] (S version)\")")); do.call(`enc2native`, argv); }, o=expected);
221
gpl-2.0
141fa3ae8801518a0e4fe0ce3b5831019bbb8199
JamesMcGuigan/datasciencecoursera
ExploratoryDataAnalysis/CourseProject2/plot4.R
# Exploratory Data Analysis - Course Project 2 # Author - James McGuigan # # Question 4: Across the United States, how have emissions # from coal combustion-related sources changed from 1999–2008? source("dataLoad.R") library("plyr") library("ggplot2") # Extract the list of SCC codes containing coal in t...
961
mit
4f14a238b5feb0978403112fef1ad9d7a3a5152d
cxxr-devel/cxxr
src/extra/testr/filtered-test-suite/enc2native/tc_enc2native_3.R
expected <- eval(parse(text="\"José Pinheiro [aut] (S version)\"")); test(id=0, code={ argv <- eval(parse(text="list(\"José Pinheiro [aut] (S version)\")")); do.call(`enc2native`, argv); }, o=expected);
221
gpl-2.0
7ed3b4d2cfb496074155084e9eae38c6fea0e151
LeifAndersen/R
src/library/utils/R/aspell.R
# File src/library/utils/R/aspell.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2015 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either ...
39,670
gpl-2.0
7ed3b4d2cfb496074155084e9eae38c6fea0e151
mathematicalcoffee/r-source
src/library/utils/R/aspell.R
# File src/library/utils/R/aspell.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2015 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either ...
39,670
gpl-2.0
b6ab08cc21acd6dccd3953bccfed108702650160
lbkchen/visual-reddit
fnetwork.R
list.of.packages <- c("bigrquery", "ggplot2", "dplyr", "lubridate", "mosaic", "tidyr", "knitr", "beepr", "igraph", "network") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) library(bigrquery) library(ggplot2) library(m...
7,002
mit
7ed3b4d2cfb496074155084e9eae38c6fea0e151
nathan-russell/r-source
src/library/utils/R/aspell.R
# File src/library/utils/R/aspell.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2015 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either ...
39,670
gpl-2.0
4f14a238b5feb0978403112fef1ad9d7a3a5152d
ArunChauhan/cxxr
src/extra/testr/filtered-test-suite/enc2native/tc_enc2native_3.R
expected <- eval(parse(text="\"José Pinheiro [aut] (S version)\"")); test(id=0, code={ argv <- eval(parse(text="list(\"José Pinheiro [aut] (S version)\")")); do.call(`enc2native`, argv); }, o=expected);
221
gpl-2.0
4f14a238b5feb0978403112fef1ad9d7a3a5152d
rho-devel/rho
src/extra/testr/filtered-test-suite/enc2native/tc_enc2native_3.R
expected <- eval(parse(text="\"José Pinheiro [aut] (S version)\"")); test(id=0, code={ argv <- eval(parse(text="list(\"José Pinheiro [aut] (S version)\")")); do.call(`enc2native`, argv); }, o=expected);
221
gpl-2.0
7ed3b4d2cfb496074155084e9eae38c6fea0e151
abiyug/r-source
src/library/utils/R/aspell.R
# File src/library/utils/R/aspell.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2015 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either ...
39,670
gpl-2.0
4f14a238b5feb0978403112fef1ad9d7a3a5152d
kmillar/rho
src/extra/testr/filtered-test-suite/enc2native/tc_enc2native_3.R
expected <- eval(parse(text="\"José Pinheiro [aut] (S version)\"")); test(id=0, code={ argv <- eval(parse(text="list(\"José Pinheiro [aut] (S version)\")")); do.call(`enc2native`, argv); }, o=expected);
221
gpl-2.0
4f14a238b5feb0978403112fef1ad9d7a3a5152d
krlmlr/cxxr
src/extra/testr/filtered-test-suite/enc2native/tc_enc2native_3.R
expected <- eval(parse(text="\"José Pinheiro [aut] (S version)\"")); test(id=0, code={ argv <- eval(parse(text="list(\"José Pinheiro [aut] (S version)\")")); do.call(`enc2native`, argv); }, o=expected);
221
gpl-2.0
7ed3b4d2cfb496074155084e9eae38c6fea0e151
WelkinGuan/r-source
src/library/utils/R/aspell.R
# File src/library/utils/R/aspell.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2015 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either ...
39,670
gpl-2.0
2dd5819431da6e88400d3681ec0dc7a0d981194d
mensxmachina/MXM-R-Package
R/gammabsreg.R
gammabsreg <- function(target, dataset, threshold = 0.05, wei = NULL) { threshold <- log(threshold) dm <- dim(dataset) if ( is.null(dm) ) { n <- length(target) p <- 1 } else { n <- dm[1] ## sample size p <- dm[2] ## number of variables } if ( p > n ) { res <- paste("T...
4,676
gpl-2.0
2a575a8c6cf243ee1b9104c2aba0610ceddcdbd0
cran/TIMP
R/kin.R
"kin" <- function(...){ new("kin", ...) }
44
gpl-2.0
fe0e66295bd9413f7770ef978b0ed8a7b80d5124
hodgeslab/workflows
velocyto/velocyto.R
#!~/usr/bin/Rscript library(methods) library(hodgeslabR) library(velocyto.R) library(pagoda2) library(igraph) library(pheatmap) library(grid) library(RColorBrewer) args <- commandArgs(TRUE) infile <- args[1] ldat <- read.loom.matrices(infile) emat <- ldat$spliced # filter on cells with large numbers of splicing even...
4,286
mit
f3972136d5429a4a31f96ba6bd06c2679bdb041f
gahoo/10010
ui.R
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) library(DT) library(ggvis) library(leaflet) shinyUI(bootstrapPage( tags$style(type = "text/css", "html, body {width:100%;height:100%...
2,209
gpl-2.0
30882d2cfed75134d50d657f70e0076364bc0ad2
bostasie/WFCTSI-Public
ACS/acs5yrextraction_Clean20180510.R
#Extract block and ZCTA level variables from ACS using tidy census #This file should be utilized as a templace with some modification necessary #Must extract block by calling intdividual counties or missing blocks if calling by state. #Code blocked in extractions due to memory restrictions #Package/Version inform...
5,376
mit
74d133fde86360c4591639e964c05ed5f41e23cd
mlhim/tb
src/models/BrazilianPublicHospitalDischargeSummary2012/ccdBrazilianPublicHospitalDischargeSummary201290c28fec7d00/R/CauseofDeath.R
# Copyright 2015, Timothy W. Cook <tim@mlhim.org> # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to ...
2,626
gpl-3.0
1f242bced8001e848137839fe74fbe4016935296
joshkeating/global-gag-rule
ui.R
library(shiny) library(dplyr) library(plotly) library(scales) UNyOpts1 <- c("CP_Any_Method", "CP_Any_Modern_Method", "CP_Any_Traditional_Method", "UN_Unmet_Need_Total", "Demand_Satisfied_By_Modern_Methods") names(UNyOpts1) <- c("Contraceptive Prevalence", "Contraceptive (Modern) Prevalence", "Contraceptive (Tradition...
26,346
mit
88cda0dbd26aa85271586e0923dc36c3c70c1591
momdadok/process_temp
peak3.R
invisible(readline("check file path. Press [enter] to continue...")) date<-as.POSIXct(readline("input date in yyyy-mm-dd format: ")) input_complete<-"n" while (input_complete=="n"){ data_source<-readline("input data source? ") path<-"c:/Users/Clai/Documents/Line_2/" file_date<-format(date,"%m%d%y...
8,342
mit
45299f4827f5af7cc53b1a98a177e43212562fd7
polmath/plot_ball
server.R
library(shiny) shinyServer(function(input, output, session) { xymax <- 100 output$text <- renderUI({ withMathJax(helpText(h4(paste0("The distance is defined on \\( \\mathbb{R}_+^2 \\) by \\( d_p(x, y) = \\| x - y \\|_p\\).")))) }) output$text0 <- renderUI({ withMathJax(helpText(h4(paste0("The dis...
2,310
mit
7ddcf5109daa5bdf7799fe1c36ad3b846ee76812
rozsasarpi/Interactive-snow-map-R
R/get_repr_values.R
get_repr_values = function(data, distr_type){ ## Exceptional snow check per EN:1991-1-3 background document (Sanpaolesi 1998) ## Characteristic value - 0.98 fractile based on the entire data # handle seasons with no snow P_snow = sum(data > 0)/length(data) idx_snow = !(data == 0) data = data[...
1,588
mit
9bac769e37974ec1fadf7664e154b796fd3b9e98
franticspider/bioarch
tests/ba_test_sheets.R
#MASTER TEST FUNCTION test_sheets <- function(){ } #This works on mammalian collagen seqences v0.1.1, which should be passed in test_colidx(sheet){ #Using sheet[1,ANQ] = 405 (but note, this might be a formula: ANK1 + 5) #We are interested in column ANU message("Column ANU is:) for(i in 6:...
344
gpl-3.0
59ed40a39bba8844f09d7e3b6c0b48f68c6d29d1
YzPaul3/h2o-3
h2o-r/demos/rdemo.not.equal.factor.R
library(h2o) h2o.init() filePath <- "https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" testFilePath <-"https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" # Uploading data file to h2o. air <- h2o.importFile(filePath, "air") # Print dataset size. dim(a...
442
apache-2.0
59ed40a39bba8844f09d7e3b6c0b48f68c6d29d1
nilbody/h2o-3
h2o-r/demos/rdemo.not.equal.factor.R
library(h2o) h2o.init() filePath <- "https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" testFilePath <-"https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" # Uploading data file to h2o. air <- h2o.importFile(filePath, "air") # Print dataset size. dim(a...
442
apache-2.0
59ed40a39bba8844f09d7e3b6c0b48f68c6d29d1
spennihana/h2o-3
h2o-r/demos/rdemo.not.equal.factor.R
library(h2o) h2o.init() filePath <- "https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" testFilePath <-"https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" # Uploading data file to h2o. air <- h2o.importFile(filePath, "air") # Print dataset size. dim(a...
442
apache-2.0
59ed40a39bba8844f09d7e3b6c0b48f68c6d29d1
michalkurka/h2o-3
h2o-r/demos/rdemo.not.equal.factor.R
library(h2o) h2o.init() filePath <- "https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" testFilePath <-"https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" # Uploading data file to h2o. air <- h2o.importFile(filePath, "air") # Print dataset size. dim(a...
442
apache-2.0
59ed40a39bba8844f09d7e3b6c0b48f68c6d29d1
h2oai/h2o-3
h2o-r/demos/rdemo.not.equal.factor.R
library(h2o) h2o.init() filePath <- "https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" testFilePath <-"https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" # Uploading data file to h2o. air <- h2o.importFile(filePath, "air") # Print dataset size. dim(a...
442
apache-2.0
59ed40a39bba8844f09d7e3b6c0b48f68c6d29d1
h2oai/h2o-dev
h2o-r/demos/rdemo.not.equal.factor.R
library(h2o) h2o.init() filePath <- "https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" testFilePath <-"https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" # Uploading data file to h2o. air <- h2o.importFile(filePath, "air") # Print dataset size. dim(a...
442
apache-2.0
33581e8aae0c51fa218e4c876f087f6190c68c7f
sammorris81/spatial-skew-t
code/analysis/ozone/US-all/us-all-6.R
source("./package_load.R", chdir = TRUE) setting <- 6 method <- "t" nknots <- 1 keep.knots <- F threshold <- 85 tau.init <- 0.05 thresh.quant <- F skew <- T outputfile <- paste("results/us-all-", setting, ".RData", sep="") start <- proc.time() fit <- vector(mode="list", length=2) for(val in 1:2){ set.seed(setting...
1,229
gpl-2.0
59ed40a39bba8844f09d7e3b6c0b48f68c6d29d1
jangorecki/h2o-3
h2o-r/demos/rdemo.not.equal.factor.R
library(h2o) h2o.init() filePath <- "https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" testFilePath <-"https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" # Uploading data file to h2o. air <- h2o.importFile(filePath, "air") # Print dataset size. dim(a...
442
apache-2.0
59ed40a39bba8844f09d7e3b6c0b48f68c6d29d1
mathemage/h2o-3
h2o-r/demos/rdemo.not.equal.factor.R
library(h2o) h2o.init() filePath <- "https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" testFilePath <-"https://raw.github.com/0xdata/h2o/master/smalldata/airlines/allyears2k_headers.zip" # Uploading data file to h2o. air <- h2o.importFile(filePath, "air") # Print dataset size. dim(a...
442
apache-2.0
ad2c41cbef582dbb097ba9e92293214a60e0100e
shuaimeng/r
thesis/chap5/fig5-9_2.R
#25G x1<-c(2,2.2) y1<-c(0.8,0.8) #30G x2<-c(1.6,1.8,2,2.2) y2<-c(0.8,1.8,2.8,2.9) #32G x3<-c(1.8,2,2.2) y3<-c(2.8,3.5,0.4) #34G x4<-c(1.8,2) y4<-c(2,3) data<-c(0,0.8,0,0, 0,1.8,2.8,2, 0.8,2.8,3.5,3, 0.8,2.9,0.4,0) mycolor<-c("red","blue","black","green3","red","blue","black","green3", "red","blue","blac...
936
mit
a1c5139653e8b99a390701c108348e3be876d4a8
johndharrison/webpagetestr
R/utils.R
WPTPaths <- list(testStatus = "testStatus.php", testResults = "jsonResult.php", locations = "getLocations.php", testers = "getTesters.php", test = "runtest.php", gzip = "getgzip.php", har = "export.php", waterfall = "waterfall.php", thumbnail = "thumbnai...
27,626
mit
8707891d89da745592f18ae818879def5aea8a91
russellkong/dissertation_model
cwm.R
library(readxl) library(xlsx) library(dplyr) library(data.table) library(lubridate) ## Coding of CWm's Small grain cereal phenology model ## Author: Russell Kong ## Date: 19 JUN 2017 ## version: 0 #'############################ #'# master script to execute #'############################ #' #' @param str_weather_file w...
19,038
apache-2.0
62f8b0c42f872f14d202d93e12cf6a4735fb3bb3
jonpage/r-course
beforeScript.R
rm(list = ls(all = TRUE)) knitr::opts_chunk$set(message = FALSE, warning = FALSE, error = FALSE, cache = TRUE)
111
cc0-1.0
2eb5163acfc5ec8a0061988172a9a06a6acdca93
erikjsolsen/AtlantisNEUS_R
NOBA/str_split.R
#' String split function #' by Alex Keth #' str_split_twice <- function(char, min_only){ patterns <- c(" ", "\t") if (all(!stringr::str_detect(string = char, pattern = patterns))) { stop("Neither space nor tab present in variable char (string)!") } for (i in seq_along(patterns)) { char <- unlist(stri...
571
mit
9480086df15217c5c7162dac6380f1d9d34d422a
TeamErlich/venter_response
no_face_value.R
#### run the main function by typing: # success_rate = test_venter(rounds, n) #n is the number of people in each group #rounds is the number of simulation rounds. #success_rate is the identifiability power of demographic iddentifiers # The function runs a simple procedure that matches the Venter et al. # definition o...
2,886
mit
15723164a1b15f7f9478aff44dde164a316382d1
tsackton/ratite-genomics
06_protein_coding_analysis/paml_branch/analyze_initial_perms.R
#analyze initial RER permutations library(tidyverse) data_path <- "../init_perms/" # path to the data files <- dir(data_path, pattern = "*.out") data <- data_frame(filename = files) %>% # create a data frame # holding the file names mutate(file_contents = map(filename, # read files into ...
835
gpl-3.0
d86e36810963390664169af3c75660eaffddb98e
ipmbook/first-edition
Rcode/c6/SizeQualityB2B.R
# R code illustrating Bin-to-Bin implementation of a size-quality IPM # using 5th order Gauss Legendre for initial and final bins rm(list=ls(all=TRUE)) root=ifelse(.Platform$OS.type=="windows","c:/repos","~/Repos"); setwd(paste(root,"/ipm_book/Rcode/c6",sep="")); require(Matrix); require(statmod); source("domEig...
7,435
gpl-2.0
5c57c9c16881b08fc74e192584b8e14078afcd85
nobel1154/edX-Learning-From-Data-Solutions
Final/Rcode/by_anant_sogani/final_q11.R
#!/usr/bin/env Rscript # Input. X = matrix(c(1, 0, 0, 1, 0, -1, -1, 0, 0, 2, 0, -2, -2, 0), ncol = 2, byrow = TRUE) # Labels. Y = c(-1, -1, -1, 1, 1, 1, 1) # Sample Size. N = length(Y) # Non-Linear Transform. Z = cbind(X[, 2]^2 - 2 * X[, 1] - 1, X[, 1]^2 - 2 * X[, 2] + 1) # # METHOD 1: Geometr...
1,330
apache-2.0
5c57c9c16881b08fc74e192584b8e14078afcd85
kirbs-/edX-Learning-From-Data-Solutions
Final/Rcode/by_anant_sogani/final_q11.R
#!/usr/bin/env Rscript # Input. X = matrix(c(1, 0, 0, 1, 0, -1, -1, 0, 0, 2, 0, -2, -2, 0), ncol = 2, byrow = TRUE) # Labels. Y = c(-1, -1, -1, 1, 1, 1, 1) # Sample Size. N = length(Y) # Non-Linear Transform. Z = cbind(X[, 2]^2 - 2 * X[, 1] - 1, X[, 1]^2 - 2 * X[, 2] + 1) # # METHOD 1: Geometr...
1,330
apache-2.0
5c57c9c16881b08fc74e192584b8e14078afcd85
JMill/edX-Learning-From-Data-Solutions-jm
Final/Rcode/by_anant_sogani/final_q11.R
#!/usr/bin/env Rscript # Input. X = matrix(c(1, 0, 0, 1, 0, -1, -1, 0, 0, 2, 0, -2, -2, 0), ncol = 2, byrow = TRUE) # Labels. Y = c(-1, -1, -1, 1, 1, 1, 1) # Sample Size. N = length(Y) # Non-Linear Transform. Z = cbind(X[, 2]^2 - 2 * X[, 1] - 1, X[, 1]^2 - 2 * X[, 2] + 1) # # METHOD 1: Geometr...
1,330
apache-2.0
2f295fc8fafa0e2898f32d6fce3a9de5837f5ad9
bjsmith/reversallearning
diagnostic-rev2aa-MCMC-group1-distribution-error.R
source("visualization/geom_hdi.R") source("diagnostics.R") #this file follows on from du_model_revised_2aa_4runs_mcmc_firstniterations.R for (i in 1:length(model.summaries)){ if(model.summaries[[i]]$m=="double_update_nov_rev2-a-a" & model.summaries[[i]]$g==1 ){ print("got it") m.g1.mcmc<-model.summaries[[i...
976
apache-2.0
203b0a56c508caf8728e25556cbf22d97ecd7c95
andrewhooker/xpose4
R/change.ab.graph.par.R
#' Functions changing variable definitions in Xpose 4 #' #' These functions allow customization of Xpose's graphics settings. #' #' Settings can be saved and loaded using \code{\link{export.graph.par}} and #' \code{\link{import.graph.par}}, respectively. #' #' @param object An \code{xpose.data} object. #' @param cl...
4,160
lgpl-3.0
930d6be7603c41a56fb0b46807b7b7b410a84db9
sainathadapa/rotmulaag
glimpse_output_as_org_table.R
library(dplyr) library(stringr) glimpse_output_as_org_table <- function(x) { capture.output(glimpse(x)) %>% str_replace_all('^\\$', '| ') %>% str_replace_all('(.*)<(.*)>(.*)', '\\1|<\\2>|\\3 |') %>% paste0(collapse = '\n') %>% cat }
252
mit
4ce7c4a72d4c02c78924493f701141ffadc8bf1e
gbasulto/mvdeconvolution
R/imported.R
#' @import reshape2 dplyr ggplot2 mvtnorm NULL ## @importFrom ggplot2 qplot
81
mit
8960948b11b862338188ac7c753a9e70d0d05cf6
gvlproject/tools-iuc
tools/scater/scater-manual-filter.R
#!/usr/bin/env Rscript # Manually filter SingleCellExperiment with user-defined parameters # Load optparse we need to check inputs library(optparse) library(workflowscriptscommon) library(LoomExperiment) library(scater) # parse options option_list = list( make_option( c("-i", "--input-loom"), action = "stor...
2,565
mit
2a6383931a5b56e76a61f44ae00b51cc27dd1db5
polde-live/getdata
q3/q3.R
# quiz 3 # question 1 u <- url("https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv") d <- read.csv(u) # ACR == 3: House on ten or more acres # AGS == 6: $10000+ agricultureLogical <- d$ACR == 3 & d$AGS == 6 head(d[which(agricultureLogical),]) # question 2 install.packages("jpeg") library(jpeg) u...
983
unlicense
942ef119eed42dfcbf8abf73f56490335b6cf429
iliastsergoulas/shinyapps
sector/en/honey_production_minagric/app.R
# Data: Honey production based on data by Greek Ministry of Agricultural Production and Food # This R script is created as a Shiny application to process data # from Hellenic Ministry of Agricultural Development and Food and create plots and maps. # The code is available under MIT license, as stipulated in https://git...
5,895
mit
97037338f07ae5b2a99e5eacaf22669cf145b909
elahi/bright_spots
R/BS_resFactors_examples.R
################################################# # O'Leary et al. 2015 # Bright spots of hope: resilience of nearshore # marine ecosystems to climatic impacts # Prepare expert examples data # (to plot factors that promote and prevent resilience) # Author: Robin Elahi # Date: 151211 ##################################...
4,882
mit
3c8e14b06af26b790af9383618e66ef0b7d1b767
marcianito/UmbrellaEffect
R/convert_gravity_response.R
#' @title Convert gravity data #' #' @description Converts gravity data from outside of the building to the gravity response #' below the building. This is done multiplying with factors 1 & 2, both #' obtained as a consequence of dominant hydrological scenario, SG position and SG building size. #' #' @param gravity_inp...
1,756
gpl-3.0
24d5bac800b506d730e8965e5568bd02b3c5ad1d
jlp2duke/EnsCat
Runoflowdimension.R
# Numerical analysis via R on low-dimensioal ######################### library(EnsCat) ######################### ######################### ######################### ######################### ###### Run on Zoo data ######################### ######################### ######################### data("zoo") DisALzoo0<...
2,381
gpl-3.0
def46d8c246d0332d9fdbf8ba6a86f746da6e3b2
earlbellinger/asteroseismology
forward/profile_interval.R
#### Determine how often a profile should be written. Also returns max year. #### Author: Earl Bellinger ( bellinger@mps.mpg.de ) #### Stellar predictions & Galactic Evolution Group #### Max-Planck-Institut fur Sonnensystemforschung DF <- read.table('LOGS/history.data', skip=5, header=1) decreasing_L <- which(diff...
1,027
gpl-2.0
c4a97456a13fa105b6e6b8d57fc114d82f91d326
hpiwowar/jdap
src/_plotLikert2.R
responses <- c("Strongly Agree","Agree","Somewhat Agree","Somewhat Disagree","Disagree","Strongly Disagree") # from top to bottom library(reshape2) x <- melt(d, measure.vars=c('Q4','Q5','Q17','Q21','Q22')) p <- plot_likert(x, response='value', var_x='PolicyAdoptedAtPublication', var_facet="variable", response_order=...
3,547
mit
32d02d499a134ceff27152d1622c9b1cf12d7888
earlbellinger/asteroseismology
mixmode/animate.R
#### Animate asteroseismological quantities across an evolutionary track #### Author: Earl Bellinger ( bellinger@mps.mpg.de ) #### Department of Astronomy, Yale University; #### Stellar Ages & Galactic Evolution Group, #### Max-Planck-Institut fur Sonnensystemforschung library(parallel) library(parallelMap) li...
31,125
gpl-2.0
453bed5443ec17f93a2b12f8fb1f2ac83d0167e2
eugenebell/R-scripts
R-samples/Chemical-data/corr.R
corr <- function(directory, threshold = 0) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'threshold' is a numeric vector of length 1 indicating the ## number of completely observed observations (on all ## variables) required to compute the correlation bet...
970
apache-2.0
20a251bf4a26eb70dad07a2093d39b7fd6cfb907
Sage-Bionetworks/SynapseShinyFacetedSearch
ui.R
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyUI( fluidPage( title = 'Faceted Data Search', mainPanel( tabsetPanel( tabPanel("All", ...
377
mit
20a251bf4a26eb70dad07a2093d39b7fd6cfb907
thomasyu888/beatAMLFacet
ui.R
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) shinyUI( fluidPage( title = 'Faceted Data Search', mainPanel( tabsetPanel( tabPanel("All", ...
377
mit
c30dacade377840e151e5a210d06466748498087
neuroconductor/extrantsr
R/reg_flip.R
#' @title Flip Image with Registration #' #' @description This function performs registration to a template #' using ANTsR and will run \code{\link{fslswapdim}} #' @param t1 filename (or nifti objects) of T1 image #' @param register Register image to template file #' @param native If images are registered, should the n...
11,942
gpl-3.0
05e06083596b876c83055a0bbb48b169ccbfea1c
gilestrolab/rethomics
rethomics/R/sleep.R
#@include NULL #' Determines whether an animal is asleep #' #' This function uses a motion classifier to first decide whether an animal is moving during a given time window. #' Then, it defines sleep as contiguous immobility for a minimal duration. #' #' @param data the data (i.e a data.table) from a \emph{single} re...
13,878
gpl-3.0
f58b5e91fdc7f6d894c08311747d74c053f3797d
luiscape/hdxscraper-who-gar-api
scripts/R/helpers/sw_status.R
## Functions to manipulate the status of ## ScraperWiki boxes. library(RCurl) changeSwStatus <- function(type = NULL, message = NULL, verbose = F) { if (!is.null(message)) { content = paste("type=", type, "&message=", message, sep="") } else content = paste("type=", type, sep="") curlPerform(postfields = conten...
424
mit
c30dacade377840e151e5a210d06466748498087
muschellij2/extrantsr
R/reg_flip.R
#' @title Flip Image with Registration #' #' @description This function performs registration to a template #' using ANTsR and will run \code{\link{fslswapdim}} #' @param t1 filename (or nifti objects) of T1 image #' @param register Register image to template file #' @param native If images are registered, should the n...
11,942
gpl-3.0
e7f0af72a33c62f4b0abd878ea932f07e4da5f9d
CartwrightLab/Cavefish2017
figures/fig-newgrid-k.R
#!/usr/bin/Rscript --vanilla #setup figure scriptname = sub("^--file=",'',grep("^--file=",commandArgs(),value=TRUE)[1]) pdfname = sub("\\.[^.]*$", ".pdf", scriptname) library(extrafont) library(RColorBrewer) library(reshape2) library(ggplot2) bcz = brewer.pal(10,"RdYlBu") keylevels = seq(0,1,length.out=length(bcz)+1)...
5,368
mit
2c578fdfc0b87d5409790ce075e48eb4d72170d8
douglasgscofield/readGenalex
R/old/is.genalex.R
#' Check to see if \code{data.frame} was created by the \code{readGenalex} #' package #' #' Check to see if \code{data.frame} was created by the \code{readGenalex} #' package. It specifically checks that the \code{genetic.data.format} #' attribute of the input \code{data.frame} is \code{"genalex"}. #' #' #' @param ...
1,144
lgpl-3.0
636396da6028279d61bd03f1b4dbb31ea5b51f14
greatgray/scorecard
R/strength_ROC.R
#' Creates a ranking of rate of change representing strength of asset returns. #' Uses the \code{TTR::ROC} function for rate-of-change value. #' Applies the \code{TTR::runSD} running standard deviations. #' Computes strength as \code{strength <- roc / rd}. #' Uses the discrete ROC type. #' @param x price history as XTS...
1,000
mit
7265263a4a02d1c30234693ab00cb90d9cde913a
michalkurka/h2o-3
h2o-r/tests/testdir_algos/sharedtree/runit_feature_frequencies.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.feature_frequencies <- function() { prostate_hex <- h2o.importFile(locate('smalldata/testng/prostate.csv')) prostate_hex$CAPSULE <- as.factor(prostate_hex$CAPSULE) prostate_hex$ID <- ...
1,109
apache-2.0
7265263a4a02d1c30234693ab00cb90d9cde913a
h2oai/h2o-3
h2o-r/tests/testdir_algos/sharedtree/runit_feature_frequencies.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.feature_frequencies <- function() { prostate_hex <- h2o.importFile(locate('smalldata/testng/prostate.csv')) prostate_hex$CAPSULE <- as.factor(prostate_hex$CAPSULE) prostate_hex$ID <- ...
1,109
apache-2.0
358a1116aab4863e8c09ce24d8ce7299793ed22f
scossin/IMthesaurusANSM
R/062015/R/thesaurus062015.R
##### Parsing le thesaurus de juin 2015 library(methods) source("../../parsing_POO_thesaurus.R") test <- new(Class = "Thesaurus",fichier_thesaurus_txt = "../TXT/thesaurus_2015.txt", fichier_mol_seules_csv = "../CSV/mol_thesaurus_seules2015.csv" ,fichier_mol_famille_csv="../CSV/mol_famille_thesa...
1,524
gpl-3.0
121f7299cf6ea47a2e5a33297d577f5fbabe6bc8
chitly852456/SeniorProject_Python
graph_similar/ui.R
library(shiny) shinyUI(fluidPage( titlePanel("Graph"), plotOutput("graphPlot",height="800px") ))
100
mit
d2409a28d8bd7d0ef804413ba3deae166215b826
acz-icm/coansys
document-similarity/document-similarity-logic/src/main/R/03.read_results-num-of-sims.R
vector_len <- read.csv("~/vector_len.csv", header=F) vector_len$V2 <- log10(vector_len$V2) #require('ggplot') plot(vector_len) data_type = "sim" sourcePath <- paste("/home/pdendek/icm_kod/Projects/CoAnSys/document-similarity/document-similarity-logic/src/main/resources/rd/number_of_docs_with_given_",data_type,"/",se...
1,454
agpl-3.0
d2409a28d8bd7d0ef804413ba3deae166215b826
CeON/CoAnSys
document-similarity/document-similarity-logic/src/main/R/03.read_results-num-of-sims.R
vector_len <- read.csv("~/vector_len.csv", header=F) vector_len$V2 <- log10(vector_len$V2) #require('ggplot') plot(vector_len) data_type = "sim" sourcePath <- paste("/home/pdendek/icm_kod/Projects/CoAnSys/document-similarity/document-similarity-logic/src/main/resources/rd/number_of_docs_with_given_",data_type,"/",se...
1,454
agpl-3.0
d2409a28d8bd7d0ef804413ba3deae166215b826
kuraju/CoAnSys
document-similarity/document-similarity-logic/src/main/R/03.read_results-num-of-sims.R
vector_len <- read.csv("~/vector_len.csv", header=F) vector_len$V2 <- log10(vector_len$V2) #require('ggplot') plot(vector_len) data_type = "sim" sourcePath <- paste("/home/pdendek/icm_kod/Projects/CoAnSys/document-similarity/document-similarity-logic/src/main/resources/rd/number_of_docs_with_given_",data_type,"/",se...
1,454
agpl-3.0
d2409a28d8bd7d0ef804413ba3deae166215b826
pdendek/CoAnSys
document-similarity/document-similarity-logic/src/main/R/03.read_results-num-of-sims.R
vector_len <- read.csv("~/vector_len.csv", header=F) vector_len$V2 <- log10(vector_len$V2) #require('ggplot') plot(vector_len) data_type = "sim" sourcePath <- paste("/home/pdendek/icm_kod/Projects/CoAnSys/document-similarity/document-similarity-logic/src/main/resources/rd/number_of_docs_with_given_",data_type,"/",se...
1,454
agpl-3.0
47a11cedc7eb2f1cbc8aa41500e2567fc28d5725
Lukaschen1986/rinds
R/utils.R
.installPkg <- function(pkg, lib.loc, install, ...) { tmp.load <- FALSE eval(parse(text = paste("tmp.load <- suppressWarnings(require(", pkg, ", lib.loc = '", lib.loc, "', warn.conflicts = FALSE))", sep = ""))) tmp.calls <- as.list(match.call()) tmp.calls[[1]] <- NULL tmp.calls[["pkg...
533
lgpl-3.0
47a11cedc7eb2f1cbc8aa41500e2567fc28d5725
snowdj/rinds
R/utils.R
.installPkg <- function(pkg, lib.loc, install, ...) { tmp.load <- FALSE eval(parse(text = paste("tmp.load <- suppressWarnings(require(", pkg, ", lib.loc = '", lib.loc, "', warn.conflicts = FALSE))", sep = ""))) tmp.calls <- as.list(match.call()) tmp.calls[[1]] <- NULL tmp.calls[["pkg...
533
lgpl-3.0
47a11cedc7eb2f1cbc8aa41500e2567fc28d5725
lijian13/rinds
R/utils.R
.installPkg <- function(pkg, lib.loc, install, ...) { tmp.load <- FALSE eval(parse(text = paste("tmp.load <- suppressWarnings(require(", pkg, ", lib.loc = '", lib.loc, "', warn.conflicts = FALSE))", sep = ""))) tmp.calls <- as.list(match.call()) tmp.calls[[1]] <- NULL tmp.calls[["pkg...
533
lgpl-3.0
b57d162db95418db12ae26520c59fa9357a5d409
vmikk/metagMisc
R/abbreviate_taxa_names.R
#' @title Abbreviate taxa names #' @param names Character vector of species names #' @param nlet Number of letters to take from genus-species parts #' @param totl Number of letters in the final abbreviation #' @param sep Which separator to use for genus-species case (default is underscore) #' @param seconditem Logical...
1,939
mit
4029baa214ef5b9eec5a315e21c2afccb5a3aa41
cemalley/ADRN-EH-Project
Genotyping/pca_with_ref.R
rm(list=ls()) library(psy) dat1=read.table("ADRN_499_plus_ref_CAAPA_MDS_data_smartPCA_clean_markers_04-16-14.txt", header=T, stringsAsFactors=F) m11=mean(dat1$PC2) s11=sd(dat1$PC2) m12=mean(dat1$PC3) s12=sd(dat1$PC3) mycol1=c("blue","red","green","coral") pdf("ADRN_plot_CAAPA_MDS_PCA_with_ref_clean_markers_PC2vsPC...
1,517
gpl-3.0
841c727cdf1fea5f5f8308cc06c66f673c9cdea6
privefl/mySO
vec-runif.R
lower <- c(0, 1, 2.5, 5, 12, 26, 40) upper <- c(lower[-1], 100) E <- data.frame(ACCNS = sample(lower, 50, replace = TRUE)) ind <- match(E$ACCNS, lower) E$ACCNSrandom <- runif(length(ind), lower[ind], upper[ind]) E
216
gpl-3.0