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
31ea9fcd32a4abbe86e6955e8439ecbc1ab20520
chendaniely/multidisciplinary-diffusion-model-experiments
staging/recurrent/src/helper-goodness.R
################################################################################ # # Goodness calculation functions # ################################################################################ get_input_i <- function(unit_number){ input <- 0 return(input) } get_bias_i <- function(i_j_index_number){ b...
2,494
mit
e22f543b37e4be7ccff548b5b2cf69d75c4c16b3
Monash-RNA-Systems-Biology-Laboratory/patseqers
Shiny_tutorial/helper.R
# Generates a data frame of random numbers make_df <- function(number_of_points){ x <- rnorm(number_of_points, mean = 20, sd = 5) y <- rnorm(number_of_points, mean = 50, sd = 50) df <- data.frame(x,y) return(df) }
251
gpl-2.0
b4681f5d4cccf3c2e7478898ef64c0940770a574
bwilbertz/kaggle_allen_ai
R/runFullModelPipeline.R
# The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, subl...
1,547
mit
849f3460ee05af84e210dd8c74a1ce45cc189065
eclee25/flu-SDI-exploratory-age
mapping_code/zipcode_maps_R_code/map-zipcodes_ECLedit.R
## Name: Elizabeth Lee ## Date: 7/19/13 ## Function: ### 1. draw OR map per season, popsize as bubble size ### 1b. draw log(OR map) per season 7/31/13, popsize as bubble size ### 1c. draw OR map per season, incidence as bubble size ### 2. draw incidence map per season ### 3) incidence maps by week 7/23/13 ## Note: nee...
42,043
mit
a3b9adf94893b3719f72a2540819286d0145e061
nextgenusfs/amptk
amptk/check_version.R
#!/usr/bin/env Rscript is.installed <- function(mypkg){ is.element(mypkg, installed.packages()[,1]) } Rversion <- R.Version()$version.string if (!is.installed("dada2")){ dadaversion <- '0.0.0' } else { dadaversion <- packageVersion("dada2") } if (!is.installed("phyloseq")){ phyloseqversion <- '0.0.0' ...
645
bsd-2-clause
e18dbca9e8c5d29c051cdf7f720c4babd14c660a
Tutuchan/morrisjs
R/morrisjs.R
#' morris.js plot #' #' This function prepares the widget to be drawn. #' #' In the case of a \code{data.frame} or a \code{tbl_df}, the first column must #' be a object that can be interpreted as a \code{Data}, the other columns being #' the data values. #' #' @param data the data to be drawn, can be a \code{ts}, \c...
1,751
mit
a3b9adf94893b3719f72a2540819286d0145e061
nextgenusfs/ufits
amptk/check_version.R
#!/usr/bin/env Rscript is.installed <- function(mypkg){ is.element(mypkg, installed.packages()[,1]) } Rversion <- R.Version()$version.string if (!is.installed("dada2")){ dadaversion <- '0.0.0' } else { dadaversion <- packageVersion("dada2") } if (!is.installed("phyloseq")){ phyloseqversion <- '0.0.0' ...
645
bsd-2-clause
c0900916ad10eaaf2acb8707ce3fde8d6294d5c9
andymememe/datasciencecoursera
R Programming/makepower.R
make.power <- function(n) { pow <- function (x) { x ^ n } pow }
73
gpl-2.0
74a3a14eb41cec2ddaf4fcc310849e749244c614
SMHendryx/quantifyBiomassFromPointClouds
R/watershedSegmentTrees.R
# Script segments a point cloud into clusters using watershed segmentation on rasterized point cloud # Clear workspace: rm(list=ls()) library(lidR) library(feather) library(data.table) #terminal output coloring library(crayon) error <- red $ bold warn <- magenta $ underline note <- cyan #cat(error("Error: subscript o...
3,011
gpl-3.0
dd2bd46f4e6d1172285b0e9f0bfe588705613428
andrewdefries/andrewdefries.github.io
FDA_Pesticide_Glossary/CMU.R
library("knitr") library("rgl") #knit("CMU.Rmd") #markdownToHTML('CMU.md', 'CMU.html', options=c("use_xhml")) #system("pandoc -s CMU.html -o CMU.pdf") knit2html('CMU.Rmd')
174
mit
263ffbd199b804c501306857ec77c01624ef8651
amschwinn/data_mining_lab
Lab 1/Schwinn_DataMining_Lab_1_Ex2.R
############################# #Data Mining Practical Session #Lab 1 Exercise 2 # #Subject: Clustering with Iris Dataset. #K-Means & Heirarchial Clustering # #Author: Austin Schwinn # #Jan 17, 2017 ############################# #install.packages('rstudioapi') library(rstudioapi) #Set working directory setwd(dirname(...
1,510
mit
cadfe7ab0699d8f30e3e85674ab4e70336aef4e2
PFgimenez/PhD
R-files/data_renault_small_header.R
library(ggplot2) #-------------------------------------------------------------------------------------------- #Parametres globaux dataset_name = "renault_small_header" taille_img_x = 1024/2 taille_img_y = 720/2 #fin parametres globaux #----------------------------------------------------------------------------------...
58,938
gpl-3.0
cadfe7ab0699d8f30e3e85674ab4e70336aef4e2
PFgimenez/thesis
R-files/data_renault_small_header.R
library(ggplot2) #-------------------------------------------------------------------------------------------- #Parametres globaux dataset_name = "renault_small_header" taille_img_x = 1024/2 taille_img_y = 720/2 #fin parametres globaux #----------------------------------------------------------------------------------...
58,938
gpl-3.0
29c062e99ea01825f3faf03a4bc83ed93dbb4827
rho-devel/rho
src/extra/testr/filtered-test-suite/format/tc_format_34.R
expected <- eval(parse(text="structure(c(\"213198964\", \" 652425\"), .Names = c(\"null.deviance\", \"deviance\"))")); test(id=0, code={ argv <- eval(parse(text="list(structure(c(213198964, 652424.52183908), .Names = c(\"null.deviance\", \"deviance\")), FALSE, 5L, 0L, NULL, 3L, TRUE, NA)")); ...
479
gpl-2.0
c710fd01f5b72f465ccba907066bc88f2fd967de
realviacauchy/shiny-court-grapher
reports/TDO_Qtrly_Long_FY08-FY15_PLOT.R
################## # Draws quarterly graph of adult TDOs from eMagistrate data # One line, with fiscal quarters on the x axis and counts on the y axis ################## #source("reports/emagistrate_prep.R") library(dplyr) library(pander) library(ggplot2) TDO <- emags %>% filter(Type=="TDO", FYear>2007) TDO_Qtr...
1,149
mit
29c062e99ea01825f3faf03a4bc83ed93dbb4827
cxxr-devel/cxxr
src/extra/testr/filtered-test-suite/format/tc_format_34.R
expected <- eval(parse(text="structure(c(\"213198964\", \" 652425\"), .Names = c(\"null.deviance\", \"deviance\"))")); test(id=0, code={ argv <- eval(parse(text="list(structure(c(213198964, 652424.52183908), .Names = c(\"null.deviance\", \"deviance\")), FALSE, 5L, 0L, NULL, 3L, TRUE, NA)")); ...
479
gpl-2.0
c710fd01f5b72f465ccba907066bc88f2fd967de
zhuoaprilfu/demo_fork
reports/TDO_Qtrly_Long_FY08-FY15_PLOT.R
################## # Draws quarterly graph of adult TDOs from eMagistrate data # One line, with fiscal quarters on the x axis and counts on the y axis ################## #source("reports/emagistrate_prep.R") library(dplyr) library(pander) library(ggplot2) TDO <- emags %>% filter(Type=="TDO", FYear>2007) TDO_Qtr...
1,149
mit
c710fd01f5b72f465ccba907066bc88f2fd967de
zhuoaprilfu/shiny-court-grapher
reports/TDO_Qtrly_Long_FY08-FY15_PLOT.R
################## # Draws quarterly graph of adult TDOs from eMagistrate data # One line, with fiscal quarters on the x axis and counts on the y axis ################## #source("reports/emagistrate_prep.R") library(dplyr) library(pander) library(ggplot2) TDO <- emags %>% filter(Type=="TDO", FYear>2007) TDO_Qtr...
1,149
mit
29c062e99ea01825f3faf03a4bc83ed93dbb4827
kmillar/cxxr
src/extra/testr/filtered-test-suite/format/tc_format_34.R
expected <- eval(parse(text="structure(c(\"213198964\", \" 652425\"), .Names = c(\"null.deviance\", \"deviance\"))")); test(id=0, code={ argv <- eval(parse(text="list(structure(c(213198964, 652424.52183908), .Names = c(\"null.deviance\", \"deviance\")), FALSE, 5L, 0L, NULL, 3L, TRUE, NA)")); ...
479
gpl-2.0
8a4578e2cbad84471373f96e3bb8e75bfca317a9
ADIRSE/maddata
app/global_functions.R
####################### # GLOBAL FUNCS ####################### # load air quality measure points fixStationCodes <- function(code) { # code <- as.character(code) if (code<10) { station_code <- paste('2807900', code, sep='') } else { station_code <- past...
7,213
mit
29c062e99ea01825f3faf03a4bc83ed93dbb4827
ArunChauhan/cxxr
src/extra/testr/filtered-test-suite/format/tc_format_34.R
expected <- eval(parse(text="structure(c(\"213198964\", \" 652425\"), .Names = c(\"null.deviance\", \"deviance\"))")); test(id=0, code={ argv <- eval(parse(text="list(structure(c(213198964, 652424.52183908), .Names = c(\"null.deviance\", \"deviance\")), FALSE, 5L, 0L, NULL, 3L, TRUE, NA)")); ...
479
gpl-2.0
29c062e99ea01825f3faf03a4bc83ed93dbb4827
kmillar/rho
src/extra/testr/filtered-test-suite/format/tc_format_34.R
expected <- eval(parse(text="structure(c(\"213198964\", \" 652425\"), .Names = c(\"null.deviance\", \"deviance\"))")); test(id=0, code={ argv <- eval(parse(text="list(structure(c(213198964, 652424.52183908), .Names = c(\"null.deviance\", \"deviance\")), FALSE, 5L, 0L, NULL, 3L, TRUE, NA)")); ...
479
gpl-2.0
5d622a1e4f8df46cbb031e94bf5701f6dbf5edc7
chichinabo/popyramids_shiny_apps
apps/resources/auto_check_and_install.R
#A short script to help installing packages on the go #Most useful if you are distributing a set of script files to people who may not be aware that the needed packages are not installed #Also useful if you use many packages and want to organise their loading at the beginning of a script need<-c("shiny", "shinydashboa...
754
gpl-3.0
5d622a1e4f8df46cbb031e94bf5701f6dbf5edc7
chichinabo/shiny_popyramids
apps/resources/auto_check_and_install.R
#A short script to help installing packages on the go #Most useful if you are distributing a set of script files to people who may not be aware that the needed packages are not installed #Also useful if you use many packages and want to organise their loading at the beginning of a script need<-c("shiny", "shinydashboa...
754
gpl-3.0
29c062e99ea01825f3faf03a4bc83ed93dbb4827
krlmlr/cxxr
src/extra/testr/filtered-test-suite/format/tc_format_34.R
expected <- eval(parse(text="structure(c(\"213198964\", \" 652425\"), .Names = c(\"null.deviance\", \"deviance\"))")); test(id=0, code={ argv <- eval(parse(text="list(structure(c(213198964, 652424.52183908), .Names = c(\"null.deviance\", \"deviance\")), FALSE, 5L, 0L, NULL, 3L, TRUE, NA)")); ...
479
gpl-2.0
9af149866568158694b0fb109721e6b128f6f663
cxxr-devel/cxxr-svn-mirror
src/library/stats/R/ppr.R
# File src/library/stats/R/ppr.R # Part of the R package, http://www.R-project.org # # Copyright (C) 1998 B. D. Ripley # Copyright (C) 2000-12 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...
6,929
gpl-2.0
9af149866568158694b0fb109721e6b128f6f663
glycerine/bigbird
r-3.0.2/src/library/stats/R/ppr.R
# File src/library/stats/R/ppr.R # Part of the R package, http://www.R-project.org # # Copyright (C) 1998 B. D. Ripley # Copyright (C) 2000-12 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...
6,929
bsd-2-clause
f27dff1e9c5600ef69ad527852fcbad68ac143ad
sc-camp/2016-R-data-analysis
course_data_modeling/courses/Mod_8_mixed_mods/Mixed effects models.R
#Mixed effects models #AdvInR #Script developed by Nils Bunnefeld, and modified by Luc Bussière November 2014 # clear workspace rm(list=ls()) # analysis of grouse # import data file GROUSE<-read.csv("grouse_shooting_mod.csv") str(GROUSE) # first will want to divide nr_shot by drive size to facilitate contrasts GROU...
10,963
gpl-3.0
b4e8232ce9a45f411ea82f491da7548a69152464
vinhqdang/my_mooc
MOOC-work/coursera/FINISHED/compdata-004 Computing for Data Analysis/Coursera-Computing-for-Data-Analysis-master/Week3/Assignment3.R
# Part 1 outcome <- read.csv(file="/.../data/outcome-of-care-measures.csv", colClasses = "character") # "..." is the directory in your computer; masked here for privacy head(outcome) names(outcome) outcome[, 11] <- as.numeric(outcome[, 11]) hist(outcome[, 11], xlab="30-day Dearth Rate", main="Heart Attack 30-day Death ...
3,251
mit
515fe2e7bfb53872808761cc68b8fe1c0a089df8
cxxr-devel/cxxr-svn-mirror
src/library/Recommended/Matrix/R/lsCMatrix.R
#### Logical Symmetric Sparse Matrices in Compressed column-oriented format ### contains = "lsparseMatrix" setAs("lsCMatrix", "matrix", function(from) as(as(from, "generalMatrix"), "matrix")) setAs("lsCMatrix", "lgCMatrix", function(from) .Call(Csparse_symmetric_to_general, from)) ## needed for indexing...
2,155
gpl-2.0
3083df7c840fe797c50f376957c908c0c7cb00c5
sjbonner/Truncated_CJS
TruncatedCJS/R/simulate_ms.R
simulateMS <- function(nstate,u,T,phi,p,debug=FALSE){ if(debug) browser() ## Generate complete state matrix Wfull <- sapply(1:(T-1),function(t){ Wfull.tmp <- matrix(NA,sum(u[,t]),T) Wfull.tmp[,t] <- rep(1:nstate,u[,t]) for(s in t:(T-1)){ for(m in 1:n...
1,240
gpl-3.0
5c6604e62c883df04b4c1f172f3211e1b5f876c7
freestone-lab/TSLibrary
TSExperiment/R/old_tsexperiment.R
##TODO(David): TSprotocol should attach a specific protocol to a subject/session # ## Note all outward facing functions take input as Data, all inward facing functions ## take input as df. # ##' Workhorse for creating and updating a TSExperiment ##' ##' @param ExperimentPath The path to the experiment folder ##' @param...
15,510
mit
d7a7a36ef05138fb86d705f79b430449b66fbb85
SchlossLab/Sze_FollowUps_Microbiome_2017
code/srn/srn_run_36_RF.R
### Build the best lesion model possible ### Try XG-Boost, RF, Logit (GLM), C5.0, SVM ### Find the best based on Jenna Wiens suggestions on test and training ## Marc Sze #Load needed libraries source('code/functions.R') loadLibs(c("dplyr", "caret","scales", "doMC")) load("exploratory/srn_RF_model_setup.RDa...
1,758
mit
02fe2ac01b2df3fa0ed87b8810834402cfbcf554
KellyBlack/R-Object-Oriented-Programming
chapter12/monteCarloS3.R
###################################################################### # Create the Monte Carlo class # # This class is used to make many simulations MonteCarlo <- function() { # Define the slots me = list( ## First define the parameters for the stochastic model N = 0, T ...
5,248
mit
69e851e89c73fc9f2bb94f65f29138769e4df026
zedoul/buildEssential
R/buildr.R
#' Get packages #' #' @param description_path a file path of DESCRIPTION #' @importFrom desc desc_get_deps #' @importFrom yaml yaml.load_file get_packages <- function(description_path) { stopifnot(file.exists(description_path)) # Do not consider miniCRAN::getCranDescription function, since this function # should...
2,435
mit
8b6cc736b0a4854f6aad575aff47792a3c844fd4
ChiWang/r-source
src/library/stats/R/arima.R
# File src/library/stats/R/arima.R # Part of the R package, http://www.R-project.org # # Copyright (C) 2002-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 ve...
18,997
gpl-2.0
20769a023b830ddef7c35ab7c099b5ac260e9f87
yufree/democode
plot/mass.R
source("http://bioconductor.org/biocLite.R") biocLite("mzR") library(mzR) all <- openMSfile('./FULL200.CDF') df <- header(all) bb <- peaks(all) aaaa <- sapply(bb,as.data.frame) oddvals <- seq(1, ncol(aaaa), by=2) aaaaa <- unlist(aaaa[oddvals]) ccc <- unique(c(aaaaa)) ccc <- ccc[order(ccc)] # bbb <- sapply(b...
1,185
mit
8b6cc736b0a4854f6aad575aff47792a3c844fd4
jagdeesh109/RRO
R-src/src/library/stats/R/arima.R
# File src/library/stats/R/arima.R # Part of the R package, http://www.R-project.org # # Copyright (C) 2002-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 ve...
18,997
gpl-2.0
8b6cc736b0a4854f6aad575aff47792a3c844fd4
limeng12/r-source
src/library/stats/R/arima.R
# File src/library/stats/R/arima.R # Part of the R package, http://www.R-project.org # # Copyright (C) 2002-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 ve...
18,997
gpl-2.0
20769a023b830ddef7c35ab7c099b5ac260e9f87
jpgroup/democode
plot/mass.R
source("http://bioconductor.org/biocLite.R") biocLite("mzR") library(mzR) all <- openMSfile('./FULL200.CDF') df <- header(all) bb <- peaks(all) aaaa <- sapply(bb,as.data.frame) oddvals <- seq(1, ncol(aaaa), by=2) aaaaa <- unlist(aaaa[oddvals]) ccc <- unique(c(aaaaa)) ccc <- ccc[order(ccc)] # bbb <- sapply(b...
1,185
mit
8b6cc736b0a4854f6aad575aff47792a3c844fd4
hadley/r-source
src/library/stats/R/arima.R
# File src/library/stats/R/arima.R # Part of the R package, http://www.R-project.org # # Copyright (C) 2002-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 ve...
18,997
gpl-2.0
b15aa7e269200525f9dc0ef7208abbcc33437c48
Monash-RNA-Systems-Biology-Laboratory/patseqers
adele/dev_timepoint_app/ui.R
library(shiny) source("helper.R") shinyUI(pageWithSidebar( headerPanel(h3("Changes in gene expression after C.albicans infection")), sidebarPanel( selectInput("select.experiment", label = "Select experiment", choices = list.dirs(full.names=F, recursive =F), selected =...
1,746
gpl-2.0
feb4037aed2d3e385f3bda1e581e3c02520b9716
uzh/ezRun
script/debug-bwa.R
# p2578 setwd("/scratch/gtan/debug/quickDebug") library(ezRun) param = list() param[['cores']] = '8' param[['ram']] = '16' param[['scratch']] = '100' param[['node']] = '' param[['process_mode']] = 'SAMPLE' param[['samples']] = 'C8102P,C5401P,C6701P,C8902-7P,C8301P' param[['refBuild']] = 'Homo_sapiens/Ensembl/GRCh38.p10...
2,964
gpl-3.0
a539dc810a518e58cf0368de42f854b0040d960e
debarros/CSIAccountabilityWkbk
crdc.R
#crdc.R # This prepares data for the CRDC (Civil Rights Data Collection) BEDSday = BedsDate(year = 2017) EndDay = schoolYear(x = "end", y = BEDSday) - 29 # Read in the last Student Lite file from the relevant year StudentLiteExtract = read.csv(file = file.choose(), header = F, stringsAsFactors = F) colnames(StudentL...
4,087
gpl-3.0
03eda555017ea544b50990732518082e4c9fd391
shraddhapai/Rutils
makeColorLighter.R
# ######################################### # makeColorLighter.R # An R utility to make an RGB colour lighter. Useful in situations where we want to # plot a lighter confidence interval band across the mean trendline of a dataseries. # # Requires: hsv2rgb.R also part of Rcolorutil # # Example usage: # > pal <- c("#D7...
1,728
gpl-3.0
bb3fa6fc52d8070e846e3b8d52c7afa20ea8bc38
rigreco/Runge-Kutta-Simulation
AppleX/GRAPHICS/DXBLOCK.R
null
1,024
gpl-3.0
80434261e701646071de7e79686f821a526936a7
andeek/conclique-gibbs-sampler
simulation/big-network/DSATUR.R
getNColors <- function(x) { if (is(x, "matrix")) { adj_mat <- x diag(adj_mat) <- FALSE } else if (is(x, "SpatialPolygons")) { adj_mat <- getAM(x) } else { stop("x must be an adjacency matrix or a SpatialPolygons* object.") } nColors <- length(unique(dsatur(adj_mat))) return(nColors...
5,249
gpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
malachig/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
dufeiyu/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
genome/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
gatoravi/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b68c3075f75d204aa26d808b5ce7a6d5879ec0f9
cran/eqtl
R/drop.peakfeat.R
##################################################################### # # drop.peakfeat.R # # copyright (c) 2008-3, Ahmid A Khalili # # last modified Jul, 2008 # first written Mar, 2008 # Licensed under the GNU General Public License version 2 (June, 1991) # # Part of the R/eqtl package # Contains: drop.peakfeat # ##...
1,534
gpl-2.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
ahwagner/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
kkrysiak/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
jasonwalker80/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
indraniel/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
ebelter/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
ernfrid/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
susannasiebert/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
chrisamiller/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
tmooney/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
iferguson90/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
mkiwala/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
brummett/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
gschang/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
14bf36635e0da79c482c2de97a23c12c59e71fd4
rahuldhote/jpmml-evaluator
pmml-rattle/src/test/R/ClusteringTest.R
library("amap") library("pmml") library("rattle") irisData = readCsv("csv/Iris.csv") irisData$Species = NULL writeIris = function(clusters, affinities, file){ result = data.frame("predictedValue" = clusters) if(!is.null(affinities)){ result = data.frame(result, affinities) } writeCsv(result, file) } generate...
1,926
agpl-3.0
b513e4ecbab9a10ddfc2b80b99d94caf2b8c7c1c
apregier/genome
lib/perl/Genome/Model/Tools/R/CallR.pm.U_test.R
######################################## ######## Draw Copy Number Graph ######## ######################################## utest <- function(name1=NULL,name2=NULL,nameAll=NULL,normalize=0,normalizedFile=NULL){ ############################ read data ############################## data1 <- read.table(name1,sep='\t') ...
789
lgpl-3.0
96d8ad61b7d641c7edd8bf06f0401ce63acc774b
USGS-VIZLAB/gages-through-ages
scripts/fetch/getData_siteRecords.R
#Run this independent of vizlab - will require 8 + hours of DL time #generates csv output currently retrieved from sciencebase #one part is parellized #get # years of record for every site library(dplyr) library(stringr) library(data.table) library(dataRetrieval) library(lubridate) library(parallel) source('scripts/f...
4,016
cc0-1.0
5c16d744f245ac0a371890b1a8c6e58cae77e480
sebastianueckert/mirt
R/createGroup.R
#' Create a user defined group-level object with correct generic functions #' #' Initializes the proper S4 class and methods necessary for mirt functions to use in estimation for defining #' customized group-level functions. To use the defined objects pass to the #' \code{mirt(..., customGroup = OBJECT)} command, and e...
5,276
gpl-2.0
b56af4788dcf2b74e723ba98e729eb182424722c
himalayajung/neuroR
data/caret_feature_selection.R
require(caret) require(randomForest) require(doParallel) require(foreach) source('../Rfunctions.R') # R helper functions ## Settings set.seed(123) # brain morphometric properties features=list('_volume','_area','_thickness$','_thicknessstd','_foldind','_meancurv','_gauscurv','_all') # features=list('_volume') scale_b...
2,948
mit
781a41d935d1390df1c2d68220a4af4f06c75a08
BlueGranite/Microsoft-R-Resources
Microsoft-R-Open/WebinarPurl.R
library(rmarkdown) library(knitr) knit("BlueGranite R Demo.Rmd") purl("BlueGranite R Demo.Rmd")
104
mit
bfeeebd655e70fd0f00a71cfc1b665663812b367
mizumot/chi
ui.R
library(shiny) library(shinyAce) shinyUI(bootstrapPage( headerPanel("Chi-square Test"), ########## Adding loading message ######### tags$head(tags$style(type="text/css", " #loadmessage { position: fixed; top: 0px; left: 0px; width: 100%; padding: 10px 0px 10px 0px; text-align: center; font-weight: bold; font...
9,215
unlicense
96d8ad61b7d641c7edd8bf06f0401ce63acc774b
jread-usgs/gages-through-ages
scripts/fetch/getData_siteRecords.R
#Run this independent of vizlab - will require 8 + hours of DL time #generates csv output currently retrieved from sciencebase #one part is parellized #get # years of record for every site library(dplyr) library(stringr) library(data.table) library(dataRetrieval) library(lubridate) library(parallel) source('scripts/f...
4,016
cc0-1.0
3b0b6b06cf20d57423b736735ba3567ea7038eae
flaneuse/llamar
website_examples.R
library(dplyr) library(haven) library(RColorBrewer) # data sets --------------------------------------------------------------- dhs_orig = read_dta('~/Documents/USAID/Rwanda/processeddata/DHS_2010_2015_analysis.dta') dhs = removeAttributes(dhs_orig) %>% filter(year == 2014) dhs = factorize(dhs, dhs_orig, 'lvdzon...
2,536
mit
96d8ad61b7d641c7edd8bf06f0401ce63acc774b
ldecicco-USGS/gages-through-ages
scripts/fetch/getData_siteRecords.R
#Run this independent of vizlab - will require 8 + hours of DL time #generates csv output currently retrieved from sciencebase #one part is parellized #get # years of record for every site library(dplyr) library(stringr) library(data.table) library(dataRetrieval) library(lubridate) library(parallel) source('scripts/f...
4,016
cc0-1.0
f6f70a59a134f07a54ba970122ed982675715fc6
rho-devel/rho
src/extra/testr/filtered-test-suite/unlist/tc_unlist_17.R
expected <- eval(parse(text="c(TRUE, TRUE, TRUE, TRUE)")); test(id=0, code={ argv <- eval(parse(text="list(list(TRUE, TRUE, TRUE, TRUE), FALSE, TRUE)")); .Internal(`unlist`(argv[[1]], argv[[2]], argv[[3]])); }, o=expected);
260
gpl-2.0
f6f70a59a134f07a54ba970122ed982675715fc6
ArunChauhan/cxxr
src/extra/testr/filtered-test-suite/unlist/tc_unlist_17.R
expected <- eval(parse(text="c(TRUE, TRUE, TRUE, TRUE)")); test(id=0, code={ argv <- eval(parse(text="list(list(TRUE, TRUE, TRUE, TRUE), FALSE, TRUE)")); .Internal(`unlist`(argv[[1]], argv[[2]], argv[[3]])); }, o=expected);
260
gpl-2.0
3dd40a8734a58418bd5208f7d01dc4196bb9490f
carlganz/survey
R/twophase.R
## ## twophase<-function(id,strata=NULL, probs=NULL, weights=NULL, fpc=NULL, subset, data, method=c("full","approx","simple")){ method<-match.arg(method) if(method=="full") { if (!is.null(weights)) stop("weights not accepted by method='full'") return(twophase2(id=id, strata=strata, probs=...
25,145
gpl-3.0
f6f70a59a134f07a54ba970122ed982675715fc6
kmillar/cxxr
src/extra/testr/filtered-test-suite/unlist/tc_unlist_17.R
expected <- eval(parse(text="c(TRUE, TRUE, TRUE, TRUE)")); test(id=0, code={ argv <- eval(parse(text="list(list(TRUE, TRUE, TRUE, TRUE), FALSE, TRUE)")); .Internal(`unlist`(argv[[1]], argv[[2]], argv[[3]])); }, o=expected);
260
gpl-2.0
f6f70a59a134f07a54ba970122ed982675715fc6
cxxr-devel/cxxr
src/extra/testr/filtered-test-suite/unlist/tc_unlist_17.R
expected <- eval(parse(text="c(TRUE, TRUE, TRUE, TRUE)")); test(id=0, code={ argv <- eval(parse(text="list(list(TRUE, TRUE, TRUE, TRUE), FALSE, TRUE)")); .Internal(`unlist`(argv[[1]], argv[[2]], argv[[3]])); }, o=expected);
260
gpl-2.0
f6f70a59a134f07a54ba970122ed982675715fc6
kmillar/rho
src/extra/testr/filtered-test-suite/unlist/tc_unlist_17.R
expected <- eval(parse(text="c(TRUE, TRUE, TRUE, TRUE)")); test(id=0, code={ argv <- eval(parse(text="list(list(TRUE, TRUE, TRUE, TRUE), FALSE, TRUE)")); .Internal(`unlist`(argv[[1]], argv[[2]], argv[[3]])); }, o=expected);
260
gpl-2.0
f6f70a59a134f07a54ba970122ed982675715fc6
krlmlr/cxxr
src/extra/testr/filtered-test-suite/unlist/tc_unlist_17.R
expected <- eval(parse(text="c(TRUE, TRUE, TRUE, TRUE)")); test(id=0, code={ argv <- eval(parse(text="list(list(TRUE, TRUE, TRUE, TRUE), FALSE, TRUE)")); .Internal(`unlist`(argv[[1]], argv[[2]], argv[[3]])); }, o=expected);
260
gpl-2.0
4f184a67481c62e86136bba02143e616bd46f94f
SoftFx/FDK
FDK2R/FdkRLib/RPackage/R/FdkBarPair.R
#' Gets the bars' low as requested #' #' @param symbol Symbol looked #' @param barPeriodStr (default 'M1') values like: S1, S10, M1, M5, M15, M30, H1, H4, D1, W1, MN1 #' @param startTime R time as start of interval #' @param endTime R time as end of interval #' @param barCountDbl Bar count #' @export ttBarsQuotesHist...
4,834
mit
f403d3cc80d96bb9d032068cabb16d96792776ad
tijoseymathew/mlr
todo-files/test_regr_randomUniformForest.R
context("regr_randomUniformForest") test_that("regr_randomUniformForest", { skip_on_travis() # FIXME: I dont know why this breaks on travis requirePackages("randomUniformForest", default.method = "load") parset.list = list( list(ntree = 5, mtry = 4) ) tsk.train = makeRegrTask(data = regr.train, target ...
1,224
bsd-2-clause
f403d3cc80d96bb9d032068cabb16d96792776ad
vinaywv/mlr
todo-files/test_regr_randomUniformForest.R
context("regr_randomUniformForest") test_that("regr_randomUniformForest", { skip_on_travis() # FIXME: I dont know why this breaks on travis requirePackages("randomUniformForest", default.method = "load") parset.list = list( list(ntree = 5, mtry = 4) ) tsk.train = makeRegrTask(data = regr.train, target ...
1,224
bsd-2-clause
71c5bb1c16e31e50b5a38baa1e64dc6ed53116de
guiastrennec/xpose
R/plot_residuals.R
#' Residuals plotted against population predictions #' #' @description Model residuals plotted against population predictions (PRED). #' #' The residuals can be one of: #' \itemize{ #' \item RES: model residuals #' \item WRES: weighted model residuals #' \item CWRES: conditional weighted model residuals #' \i...
10,260
lgpl-3.0
71c5bb1c16e31e50b5a38baa1e64dc6ed53116de
guiastrennec/ggxpose
R/plot_residuals.R
#' Residuals plotted against population predictions #' #' @description Model residuals plotted against population predictions (PRED). #' #' The residuals can be one of: #' \itemize{ #' \item RES: model residuals #' \item WRES: weighted model residuals #' \item CWRES: conditional weighted model residuals #' \i...
10,260
gpl-3.0
34a4a870fd7a95ac605c7b072f6fbd031e1341a1
magrai/URBAN-MV-VIE_UniBw
fun/computeActivityRates.R
# Objective --------------------------------------------------------------- ## Compute glance rates for each direction in two versions ## 1) As percentage of first glances ## 2) As percentage of overall glances computeActivityRates <- function(dat, col_name_act_level, ...
8,837
gpl-3.0
69dc476ae6309c2f6c8cfc9ca510157ed1ba3ad1
eddelbuettel/nanotime
tests/simpleTests.R
library(nanotime) z <- RcppCCTZ:::parseDouble("1970-01-01T00:00:00.000000001+00:00") cat("z is: ") print(z) x <- nanotime("1970-01-01T00:00:00.000000001+00:00") cat("x is: ") print(x) format(x) cat("x+1 is: ") x <- x + 1 print(x) format(x) cat("y is: ") y <- nanotime(z) print(y) #print(class(y)) format(y) cat("y+...
1,016
gpl-2.0
b10d1a211c120106c80fdad3d262cc257e4753eb
environmentalinformatics-marburg/Rsenal
R/roc.R
#' Calculation of ROC and AUC #' #' @param pred An object of type "RasterLayer" containing the probability of each pixel to belong to the class of investigation. #' @param obs An object of type "RasterLayer" containing 1 and 0 values with 1 indicating that a pixel belongs to the class of investigation. #' @param mask ...
4,668
gpl-3.0
e89793f1135a32879f08c483eb5de406cfc88fc2
keithschulze/supr
tests/testthat/test-localk-multi.R
context("Local multitype Ripley's K") test_that("the mean value of cross-type local K values should be the same as Kcross for a given r", { kc <- spatstat::Kcross(spatstat::amacrine, correction="isotropic", r=c(0, 0.05, 0.1, 0.15)) lkc0.05 <- local_k_cross(spatstat::amacrine, correction="isotropic", rvalue=0.05, v...
656
mit
f7b3e2e05f8ab250e5f20a1abb8df06b8c6e0b85
dcgerard/vicar
tests/testthat/test_ash.R
library(vicar) context("ASH Wrappers") test_that("ash_ruv4 works", { set.seed(21) n <- 11 p <- 113 k <- 2 q <- 3 pi_vals <- c(0.5, 0.3, 0.2) sd_seq <- c(0, 1, 2) X <- cbind(rep(1, n), sample(c(0, 1), size = n, replace = TRUE)) beta <- matrix(NA, nrow = k, ncol = p) beta[1, ] ...
1,182
gpl-3.0
ba7f54862c519e204f06e99f3ee8b06c8fff3741
citiususc/voila
demo/ornstein.R
library("voila") # simulate Ornstein-Uhlenbeck time series --------------------------------- h = 0.001 set.seed(1234) drift = "-x" diffusion = "sqrt(1.5)" x = simulate_sde(drift, diffusion, samplingPeriod = 0.001, tsLength = 20000) plot.ts(x, ylab = "x(t)", xlab = "Time t", main = "Ornstein-Uhlenbeck process") # do i...
3,606
gpl-3.0
caf19087e19219c9ae2dc7c2f1242d73fafe9944
jefferis/nat.examples
07-insectbraindb/01-download-neurons.R
## This script assumed that you have run the file "07-insectbraindb/00-setup.R" ## Functions to talk to insectbraindb.org, a site primarily curated by Prof. Stanley Heinze, are wrapped up into the package neuromorphr ## So let's use that ## What neurons does the insectbraindb.org host? available.neurons = insectbrai...
861
mit
86432a8c5ab3285ee12fa606aefa1e4a25fa1102
mmuscarella/StarvationTraits
analyses/tests/GrowthCurveTest.R
################################################################################ # # # Test Script for Analysis of Exponential Growth Curve Data # # This uses ModifiedGomp.R Version 2.0 ...
1,429
gpl-3.0
653696c813f91dc586ae31cdac73bc430ae093c7
JoshuaSlocum/model-log
R/generate_entry.R
# Header ------------------------------------------------------------------ # Created: 1/25/2016 # Author: Joshua Slocum # Purpose: Combine results to make entry #' Combine results from helper functions to create an entry for the model #' #' @param object The model object of the model to be logged #' @return Named li...
951
mit
3fb1d9c1a0a65557146796daff0ad8e65a5ec253
gersteinlab/exceRpt
mergePipelineRuns_functions.R
########################################################################################## ## ## ## Functions to combine pipeline runs for individual samples into something more useful ## ## ...
67,683
gpl-3.0
86432a8c5ab3285ee12fa606aefa1e4a25fa1102
jaytlennon/StarvationTraits
analyses/tests/GrowthCurveTest.R
################################################################################ # # # Test Script for Analysis of Exponential Growth Curve Data # # This uses ModifiedGomp.R Version 2.0 ...
1,429
gpl-3.0
86432a8c5ab3285ee12fa606aefa1e4a25fa1102
LennonLab/StarvationTraits
analyses/tests/GrowthCurveTest.R
################################################################################ # # # Test Script for Analysis of Exponential Growth Curve Data # # This uses ModifiedGomp.R Version 2.0 ...
1,429
gpl-3.0
502a51fe90d821322c9ccacb5bcbbda69ae0852f
XiaodanLyu/Lognormal-Extension
2_Zeros/Code/overlaysd_parallel.R
rm(list = ls(all = T)) setwd("C:/Users/lyux/Box Sync/SAEZeros") library("multidplyr") library("parallel") library("tidyverse") # library("raster") # library("sp") geo.proj <- "+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=GRS80 +towgs84=0,0,0" ## CDL raster...
4,254
mit