content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
#' unionGff #' unions two isoform gff files #' #' @param gff1 a list of data frame representing the junctions for each isoform #' @param gff2 a list of data frame representing the junctions for each isoform #' #' @return a combined list of unique isoforms #' @export #' #' @examples #' #' unionGff <- function( gff1 ,...
/R/unionGff.R
no_license
zhushijia/STAR2bSMRT
R
false
false
470
r
#' unionGff #' unions two isoform gff files #' #' @param gff1 a list of data frame representing the junctions for each isoform #' @param gff2 a list of data frame representing the junctions for each isoform #' #' @return a combined list of unique isoforms #' @export #' #' @examples #' #' unionGff <- function( gff1 ,...
SUV<-read.csv('monthly-sales-for-a-souvenir-sho.csv') suv<-ts(SUV$Sales) library(astsa) library(forecast) par(mfrow=c(2,2)) plot(suv, main='Monthly sales for a souvenir shop', ylab='', col='blue', lwd=3) plot(log(suv), main='Log-transorm of sales', ylab='', col='red', lwd=3) plot(diff(log(suv)), main='Differenced...
/SARIMA+code+for+Sales+at+a+souvenir+shop.r
permissive
NicholasN36/R-programming-New-York-University
R
false
false
1,276
r
SUV<-read.csv('monthly-sales-for-a-souvenir-sho.csv') suv<-ts(SUV$Sales) library(astsa) library(forecast) par(mfrow=c(2,2)) plot(suv, main='Monthly sales for a souvenir shop', ylab='', col='blue', lwd=3) plot(log(suv), main='Log-transorm of sales', ylab='', col='red', lwd=3) plot(diff(log(suv)), main='Differenced...
/JAGS_LAB7/Input + Código/Script LAB 7 Curaduría de datos JAGS.R
no_license
pensarfinanciero/RELACIONAMIENTO
R
false
false
1,694
r
library(tseries);library(PerformanceAnalytics);library(zoo) rm(list = ls()); init_investment = 10000; xus_prices = get.hist.quote("SPY", quote = c("AdjClose"), compression="d",retclass="zoo"); vcn_prices = get.hist.quote("XIU.TO", quote = c("AdjClose"), compression="d",retclass="zoo"); xid_prices = get.hist.quote("I...
/etfs/etf_portfolio.r
no_license
clueso/RScripts
R
false
false
4,645
r
library(tseries);library(PerformanceAnalytics);library(zoo) rm(list = ls()); init_investment = 10000; xus_prices = get.hist.quote("SPY", quote = c("AdjClose"), compression="d",retclass="zoo"); vcn_prices = get.hist.quote("XIU.TO", quote = c("AdjClose"), compression="d",retclass="zoo"); xid_prices = get.hist.quote("I...
library(R6) options(scipen = 20) source("euler/R/math.R") #' Add n zeros before or after string #' #' @param s: String #' @param n: Number of zeros to add #' @param right: Whether add 0 to right or left side #' @returns Origin string with n leading or trailing zeros #' @examples #' pad("123", 2) #' pad("123", 2, FALSE...
/euler/R/big_int.R
permissive
Dynortice/Project-Euler
R
false
false
16,192
r
library(R6) options(scipen = 20) source("euler/R/math.R") #' Add n zeros before or after string #' #' @param s: String #' @param n: Number of zeros to add #' @param right: Whether add 0 to right or left side #' @returns Origin string with n leading or trailing zeros #' @examples #' pad("123", 2) #' pad("123", 2, FALSE...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/BAStag.R \name{as.hour} \alias{as.hour} \alias{hourOffset} \title{Hour Manipulation} \usage{ as.hour(tm) hourOffset(hr, offset = 0) } \arguments{ \item{tm}{them timestamp as POSIXct.} \item{hr}{the decimal hour to be wrap.} \item{o...
/man/hours.Rd
no_license
eldarrak/BAStag
R
false
false
776
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/BAStag.R \name{as.hour} \alias{as.hour} \alias{hourOffset} \title{Hour Manipulation} \usage{ as.hour(tm) hourOffset(hr, offset = 0) } \arguments{ \item{tm}{them timestamp as POSIXct.} \item{hr}{the decimal hour to be wrap.} \item{o...
#application of lesson 09 source( file="scripts/reference.R" ); weatherData = read.csv( file="data/LansingNOAA2016-3.csv", stringsAsFactors = FALSE ); weatherData$precipNum=weatherData$precip weatherData$precipNum[weatherData$precipNum == "T"] = 0.005; #### Part 4: grep to find date indexes ...
/applications/app09.R
no_license
rojascon/GGPLOT_Course
R
false
false
2,240
r
#application of lesson 09 source( file="scripts/reference.R" ); weatherData = read.csv( file="data/LansingNOAA2016-3.csv", stringsAsFactors = FALSE ); weatherData$precipNum=weatherData$precip weatherData$precipNum[weatherData$precipNum == "T"] = 0.005; #### Part 4: grep to find date indexes ...
#'Bootstrapped Confidence Intervals for Effective Size #' #'Function for computing Effective Size (Malpass, 1981, as adjusted by Tredoux, 1998) #'with CIs from bootstrap df of lineups #'@param lineupsizes A dataframe of bootstrapped effective sizes #'@param perc Defaults to 0.5. Can be specified by user, according to d...
/gen_esize_m_ci.R
no_license
tmnaylor/lineupstat
R
false
false
571
r
#'Bootstrapped Confidence Intervals for Effective Size #' #'Function for computing Effective Size (Malpass, 1981, as adjusted by Tredoux, 1998) #'with CIs from bootstrap df of lineups #'@param lineupsizes A dataframe of bootstrapped effective sizes #'@param perc Defaults to 0.5. Can be specified by user, according to d...
library(glmnet) mydata = read.table("./TrainingSet/Correlation/central_nervous_system.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.6,family="gaussian",standardize=FALSE) sink('./Model/EN/Correlation/central_n...
/Model/EN/Correlation/central_nervous_system/central_nervous_system_066.R
no_license
leon1003/QSMART
R
false
false
408
r
library(glmnet) mydata = read.table("./TrainingSet/Correlation/central_nervous_system.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.6,family="gaussian",standardize=FALSE) sink('./Model/EN/Correlation/central_n...
#' Create an input file for the program NewHybrids and run it if NewHybrids is installed #' #' This function compares two sets of parental populations to identify loci #' that exhibit a fixed difference, returns an genlight object with the reduced data, #' and creates an input file for the program NewHybrids using the ...
/R/gl.nhybrids.r
no_license
davan690/dartR
R
false
false
18,996
r
#' Create an input file for the program NewHybrids and run it if NewHybrids is installed #' #' This function compares two sets of parental populations to identify loci #' that exhibit a fixed difference, returns an genlight object with the reduced data, #' and creates an input file for the program NewHybrids using the ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/col_comment_olvr_rplc.R \name{col_comment_olvr_rplc} \alias{col_comment_olvr_rplc} \title{Comment on a table column through a connection to \code{oliver_replica}} \usage{ col_comment_olvr_rplc(sch_name = NA, establish_con = FALSE, tbl_name = ...
/man/col_comment_olvr_rplc.Rd
no_license
the-rig/oliveR2
R
false
true
1,254
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/col_comment_olvr_rplc.R \name{col_comment_olvr_rplc} \alias{col_comment_olvr_rplc} \title{Comment on a table column through a connection to \code{oliver_replica}} \usage{ col_comment_olvr_rplc(sch_name = NA, establish_con = FALSE, tbl_name = ...
# # Copyright 2007-2017 The OpenMx Project # # 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 ...
/R/MxFlatModel.R
no_license
ktargows/OpenMx
R
false
false
9,275
r
# # Copyright 2007-2017 The OpenMx Project # # 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 ...
suppressPackageStartupMessages({ library(ggplot2) library(RColorBrewer) library(dplyr) library(dichromat) library(assertthat) library(fossil) }) args = commandArgs(trailingOnly = TRUE) # args kt = args[1] # kt = "g0" colour_palatte = c('#297AB1', '#57B5ED', '#71AB7F', '#FBBE4B', "#FF9...
/analysis/plot-umap.R
no_license
SamPassmore/Passmore_Kinspace
R
false
false
4,401
r
suppressPackageStartupMessages({ library(ggplot2) library(RColorBrewer) library(dplyr) library(dichromat) library(assertthat) library(fossil) }) args = commandArgs(trailingOnly = TRUE) # args kt = args[1] # kt = "g0" colour_palatte = c('#297AB1', '#57B5ED', '#71AB7F', '#FBBE4B', "#FF9...
require(rjags) # Generate random data from known parameter values: set.seed(47405) trueM1 = 100 N1 = 200 trueM2 = 145 # 145 for first example below; 130 for second example N2 = 200 trueSD = 15 effsz = abs( trueM2 - trueM1 ) / trueSD y1 = rnorm( N1 ) y1 = (y1-mean(y1))/sd(y1) * trueSD + trueM1 y2 = rnorm( N2 ) y2 = (y2...
/rjags/mixture.R
no_license
yama1968/Spikes
R
false
false
1,524
r
require(rjags) # Generate random data from known parameter values: set.seed(47405) trueM1 = 100 N1 = 200 trueM2 = 145 # 145 for first example below; 130 for second example N2 = 200 trueSD = 15 effsz = abs( trueM2 - trueM1 ) / trueSD y1 = rnorm( N1 ) y1 = (y1-mean(y1))/sd(y1) * trueSD + trueM1 y2 = rnorm( N2 ) y2 = (y2...
sales= c(4141,3842,3056,3519,4226, 4630,3507,3754, 5000,5120,4011, 5015,1916,675, 3636,3224,2295, 2730,2618,4421, 4113,3746, 3532, 3825,1096, 761,2088,820,2114, 1882,2159,1602,3354,2927) price = c(59,59,59,59,59,59,59,59,59,59,59,59, 79,79,79,79,79,79,79,79,79, 79,79,79,99,99, 99,99,99,99,99,99,99,99) promotion= c(200...
/LM/reg2.R
no_license
pratikkayal/Ranalytics
R
false
false
2,355
r
sales= c(4141,3842,3056,3519,4226, 4630,3507,3754, 5000,5120,4011, 5015,1916,675, 3636,3224,2295, 2730,2618,4421, 4113,3746, 3532, 3825,1096, 761,2088,820,2114, 1882,2159,1602,3354,2927) price = c(59,59,59,59,59,59,59,59,59,59,59,59, 79,79,79,79,79,79,79,79,79, 79,79,79,99,99, 99,99,99,99,99,99,99,99) promotion= c(200...
#' Simulate random data for SRR function #' #' Generate random two-group data for a spatial relative risk function. #' #' @param win Window in which to simulate the random data. An object of class "owin" or something acceptable to \code{\link[spatstat.geom]{as.owin}}. #' @param sim_total Integer, specifying the number ...
/R/spatial_data.R
permissive
machiela-lab/sparrpowR
R
false
false
14,733
r
#' Simulate random data for SRR function #' #' Generate random two-group data for a spatial relative risk function. #' #' @param win Window in which to simulate the random data. An object of class "owin" or something acceptable to \code{\link[spatstat.geom]{as.owin}}. #' @param sim_total Integer, specifying the number ...
# Exits if (!requireNamespace("caret", quietly = TRUE)) { exit_file("Package 'caret' missing") } # # Load required packages # suppressMessages({ # library(caret) # }) # Generate Friedman benchmark data friedman1 <- gen_friedman(seed = 101) # Fit model(s) fit <- caret::train(y ~ ., friedman1, method = "lm") # Co...
/inst/tinytest/test_pkg_caret.R
no_license
koalaverse/vip
R
false
false
665
r
# Exits if (!requireNamespace("caret", quietly = TRUE)) { exit_file("Package 'caret' missing") } # # Load required packages # suppressMessages({ # library(caret) # }) # Generate Friedman benchmark data friedman1 <- gen_friedman(seed = 101) # Fit model(s) fit <- caret::train(y ~ ., friedman1, method = "lm") # Co...
#' Write a deployable Plumber file for a vetiver model #' #' Use `vetiver_write_plumber()` to create a `plumber.R` file for a #' [vetiver_model()] that has been versioned and stored via #' [vetiver_pin_write()]. #' #' @inheritParams pins::pin_read #' @param ... Other arguments passed to [vetiver_pr_predict()] such as #...
/R/write-plumber.R
permissive
DavisVaughan/vetiver
R
false
false
4,210
r
#' Write a deployable Plumber file for a vetiver model #' #' Use `vetiver_write_plumber()` to create a `plumber.R` file for a #' [vetiver_model()] that has been versioned and stored via #' [vetiver_pin_write()]. #' #' @inheritParams pins::pin_read #' @param ... Other arguments passed to [vetiver_pr_predict()] such as #...
library("tidyverse") # Read in LGA and LHD data from other sources lga_map <- read_csv("Australia_lga_postcode_mappings_2016.csv") alcohol_hospitalisations <- read_csv("beh_alcafhos_lhn_trend.csv") alcohol_hospitalisations <- alcohol_hospitalisations %>% filter (year !="") lga_map <- filter(lga_map, State == "New S...
/LGAtoLHD.R
no_license
JKaur1992/STD_AT2
R
false
false
1,118
r
library("tidyverse") # Read in LGA and LHD data from other sources lga_map <- read_csv("Australia_lga_postcode_mappings_2016.csv") alcohol_hospitalisations <- read_csv("beh_alcafhos_lhn_trend.csv") alcohol_hospitalisations <- alcohol_hospitalisations %>% filter (year !="") lga_map <- filter(lga_map, State == "New S...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Do not modify this file since it was automatically generated from: % % HaarSegModel.R % % by the Rdoc compiler part of the R.oo package. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{HaarSegModel} \docTyp...
/man/HaarSegModel.Rd
no_license
HenrikBengtsson/aroma.core
R
false
false
3,253
rd
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Do not modify this file since it was automatically generated from: % % HaarSegModel.R % % by the Rdoc compiler part of the R.oo package. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{HaarSegModel} \docTyp...
# This script is used for plotting GLM results setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) suppressPackageStartupMessages(library(ComplexHeatmap)) suppressPackageStartupMessages(library(circlize)) suppressPackageStartupMessages(library(tidyverse)) suppressPackageStartupMessages(library(fmsb)) sup...
/R3.QRIS_Step1_Visualization.R
permissive
HouyuZhang/QRIS
R
false
false
6,835
r
# This script is used for plotting GLM results setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) suppressPackageStartupMessages(library(ComplexHeatmap)) suppressPackageStartupMessages(library(circlize)) suppressPackageStartupMessages(library(tidyverse)) suppressPackageStartupMessages(library(fmsb)) sup...
setwd("D:/Projects/R Studio/naloga5") source("common.R") source("readProblem.R") source("solutionCheck.R") source("typeCheck.R") source("lineCost.R") source("initialSolver.R") source("localSearch.R") source("mutators.R") source("readWriteSolution.R") #Reading file file <- "input/Problem6.txt" capSitesPaths <- read...
/run_jobs/run6.R
no_license
tomazlunder/aahps5
R
false
false
758
r
setwd("D:/Projects/R Studio/naloga5") source("common.R") source("readProblem.R") source("solutionCheck.R") source("typeCheck.R") source("lineCost.R") source("initialSolver.R") source("localSearch.R") source("mutators.R") source("readWriteSolution.R") #Reading file file <- "input/Problem6.txt" capSitesPaths <- read...
### data preprocessing for bert table(Train[,4]) aaa <- c(10,20,21,22,40,29,30,45,49,50,54,56,59,61,65,67,69,74,79) aaa <- setdiff(unique(Train[,4]),aaa) aaa smallsample <- which(Train[,4] %in% aaa ) length(smallsample) smallsample <- sample(smallsample, length(smallsample)) docs <- Train[smallsample,1] class(docs) ...
/Bert/data_clean_bert (1).R
no_license
xietian99/DiseaseTextClassification
R
false
false
1,645
r
### data preprocessing for bert table(Train[,4]) aaa <- c(10,20,21,22,40,29,30,45,49,50,54,56,59,61,65,67,69,74,79) aaa <- setdiff(unique(Train[,4]),aaa) aaa smallsample <- which(Train[,4] %in% aaa ) length(smallsample) smallsample <- sample(smallsample, length(smallsample)) docs <- Train[smallsample,1] class(docs) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/quantile_genlasso.R \name{get_lambda_max} \alias{get_lambda_max} \title{Lambda max for quantile generalized lasso} \usage{ get_lambda_max(x, y, d = NULL) } \description{ Compute lambda max for a quantile generalized lasso problem. } \details{...
/R-package/quantmod/man/get_lambda_max.Rd
no_license
elray1/quantmod
R
false
true
582
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/quantile_genlasso.R \name{get_lambda_max} \alias{get_lambda_max} \title{Lambda max for quantile generalized lasso} \usage{ get_lambda_max(x, y, d = NULL) } \description{ Compute lambda max for a quantile generalized lasso problem. } \details{...
## Given two functions to find and cache the inverse ## of an invertible square matrix # makeCacheMatrix function has four functions to create a special "matrix" # object (actually a list is returned with the required functions) # that caches its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL ...
/cachematrix.R
no_license
1shefalika9/Rprogramming_asg2
R
false
false
1,186
r
## Given two functions to find and cache the inverse ## of an invertible square matrix # makeCacheMatrix function has four functions to create a special "matrix" # object (actually a list is returned with the required functions) # that caches its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL ...
## Week 2 Lab Solution ## MFE Programming workshop 2016 library(lubridate) library(xts) ## To read in the data I copied it into a file using excel ## saved it to a csv and then imported it datain <- read.csv("./week2/lab/week2data.csv") ## just get a single subset of the data, the last row dataset <- datain[nrow(d...
/week2/lab/Solution2.R
no_license
mahyarkargar/mfeR
R
false
false
2,230
r
## Week 2 Lab Solution ## MFE Programming workshop 2016 library(lubridate) library(xts) ## To read in the data I copied it into a file using excel ## saved it to a csv and then imported it datain <- read.csv("./week2/lab/week2data.csv") ## just get a single subset of the data, the last row dataset <- datain[nrow(d...
#!/usr/bin/env Rscript args <- commandArgs(TRUE) # test if there is at least one argument: if not, return an error if (length(args) < 3) { stop("cp_list.R csv_with_ACCNO source_dir output_dir [iid_column] [key_column] [key2_column]\n", call.=F) } csv = args[1] dir1 = args[2] dir2 = args[3] if (length(args) >= 4) ...
/FEMH/sln_list.R
no_license
gnayyc/cyy.utils
R
false
false
1,245
r
#!/usr/bin/env Rscript args <- commandArgs(TRUE) # test if there is at least one argument: if not, return an error if (length(args) < 3) { stop("cp_list.R csv_with_ACCNO source_dir output_dir [iid_column] [key_column] [key2_column]\n", call.=F) } csv = args[1] dir1 = args[2] dir2 = args[3] if (length(args) >= 4) ...
################################################################################ # # tess.equations.R # # Copyright (c) 2012- Sebastian Hoehna # # This file is part of TESS. # See the NOTICE file distributed with this work for additional # information regarding copyright ownership and licensing. # # TESS is free softwa...
/fuzzedpackages/TESS/R/tess.equations.R
no_license
akhikolla/testpackages
R
false
false
37,731
r
################################################################################ # # tess.equations.R # # Copyright (c) 2012- Sebastian Hoehna # # This file is part of TESS. # See the NOTICE file distributed with this work for additional # information regarding copyright ownership and licensing. # # TESS is free softwa...
\name{ci.sas} \alias{ci.sas} \title{ Separate area scaling for upper Clopper-Pearson confidence limits } \description{ Function to compute upper Clopper-Pearson confidence limits of failure probabilities of follower products by means of separate area scaling (SAS). Furthermore, the validity of the SAS in comparison to ...
/man/ci.sas.Rd
no_license
cran/AdvBinomApps
R
false
false
3,487
rd
\name{ci.sas} \alias{ci.sas} \title{ Separate area scaling for upper Clopper-Pearson confidence limits } \description{ Function to compute upper Clopper-Pearson confidence limits of failure probabilities of follower products by means of separate area scaling (SAS). Furthermore, the validity of the SAS in comparison to ...
longi_to_matrix1 <- function(x){ nmx <- colnames(x) dimx <- dim(x) p <- dimx[2] t <- dimx[1] x <- matrix(x,ncol = p,nrow = t) return(x) }
/R/longi_to_matrix1.R
no_license
SpyBal/psychNET
R
false
false
157
r
longi_to_matrix1 <- function(x){ nmx <- colnames(x) dimx <- dim(x) p <- dimx[2] t <- dimx[1] x <- matrix(x,ncol = p,nrow = t) return(x) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataset.R \name{import_dataset} \alias{import_dataset} \title{Import dataset} \usage{ import_dataset(path = "/home/mmasson/data/mlops-wbr/uk-retailer-ii.xlsx") } \arguments{ \item{path}{: \code{character}. Path to xlsx file} } \value{ a da...
/MLOpsMonitoring/man/import_dataset.Rd
no_license
datastorm-open/demo_webinar_mlops
R
false
true
418
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataset.R \name{import_dataset} \alias{import_dataset} \title{Import dataset} \usage{ import_dataset(path = "/home/mmasson/data/mlops-wbr/uk-retailer-ii.xlsx") } \arguments{ \item{path}{: \code{character}. Path to xlsx file} } \value{ a da...
# Create Venn diagrams of the number of REC8-HA Rep1 peaks in each differential set # Usage: # Rscript peak_set_overlaps.R red blue green darkmagenta library(VennDiagram) futile.logger::flog.threshold(futile.logger::ERROR, name = "VennDiagramLogger") args <- commandArgs(trailingOnly = TRUE) myColours <- c(args[1],...
/peaks/PeakRanger1.18/ranger/MYC_Rep2_input_p0.001_q0.01/REC8_HA_Rep1/genome_wide/peak_set_overlaps_and_width_dists/peak_set_overlaps.R
no_license
ajtock/REC8_pooled
R
false
false
2,852
r
# Create Venn diagrams of the number of REC8-HA Rep1 peaks in each differential set # Usage: # Rscript peak_set_overlaps.R red blue green darkmagenta library(VennDiagram) futile.logger::flog.threshold(futile.logger::ERROR, name = "VennDiagramLogger") args <- commandArgs(trailingOnly = TRUE) myColours <- c(args[1],...
##' Empirical Distribution of the one-sided(max) Adaptive EMWA control chart ##' ##' Estimates the in-control empirical distribution of the one-sided(max) adaptive EWMA chart. ##' @title Empirical Distribution of the one-sided(max) Adaptive EMWA control chart ##' @param repl an integer; number of bootstrap replications...
/R/empr_aewma_max.R
no_license
samuelanyaso/DyAEWMA
R
false
false
810
r
##' Empirical Distribution of the one-sided(max) Adaptive EMWA control chart ##' ##' Estimates the in-control empirical distribution of the one-sided(max) adaptive EWMA chart. ##' @title Empirical Distribution of the one-sided(max) Adaptive EMWA control chart ##' @param repl an integer; number of bootstrap replications...
# standard normal without initialization tmp<-proc.time() sink(file("null_standard_normal_log_noninit.txt",open="wt"),type='message') options(warn=1) t<-c() N<-1000 for (i in 1:N){ beta1<-rnorm(1000,0,1) beta2<-rnorm(1000,0,1) s<-rep(1,1000) betahat1<-rnorm(1000,beta1,s) betahat2<-rnorm(1000,beta2,s) r12<-...
/simulation/null_noinit_init_comp.R
no_license
LSun/ash_null_initialization
R
false
false
3,608
r
# standard normal without initialization tmp<-proc.time() sink(file("null_standard_normal_log_noninit.txt",open="wt"),type='message') options(warn=1) t<-c() N<-1000 for (i in 1:N){ beta1<-rnorm(1000,0,1) beta2<-rnorm(1000,0,1) s<-rep(1,1000) betahat1<-rnorm(1000,beta1,s) betahat2<-rnorm(1000,beta2,s) r12<-...
rm(list = ls()) source("cls2/1_pars.R") # create cluster for parallel processing cl <- makeCluster(cores_l) registerDoParallel(cl) ols <- foreach(n = 1:length(fdate), .packages = c("hts","forecast")) %dopar% { dx <- fdate[n] lapply(fmethods, function(fx){ if(fx == "arima"){ # Run for...
/cls2/2_bt_ols.R
no_license
GalElgavish/hierarch_bayes
R
false
false
672
r
rm(list = ls()) source("cls2/1_pars.R") # create cluster for parallel processing cl <- makeCluster(cores_l) registerDoParallel(cl) ols <- foreach(n = 1:length(fdate), .packages = c("hts","forecast")) %dopar% { dx <- fdate[n] lapply(fmethods, function(fx){ if(fx == "arima"){ # Run for...
# This is the user-interface definition of a Shiny web application. shinyUI(navbarPage("", # "Analysis" Tab tabPanel(p(strong("Analysis"), style = "color:black"), titlePanel(p(span("Type and amount of the leading causes of death worldwide"), style = "...
/ui.R
no_license
dsasas/DDPapp
R
false
false
4,037
r
# This is the user-interface definition of a Shiny web application. shinyUI(navbarPage("", # "Analysis" Tab tabPanel(p(strong("Analysis"), style = "color:black"), titlePanel(p(span("Type and amount of the leading causes of death worldwide"), style = "...
# Measures of repressive shock # # 1. Change of X sd or pct in theta mean # 2. EPR downgrade # 3. Polity decrease # 4. VDEM regime score decrease # 5. VDEM torture/kill increase # 6. NAVCO repression # 7. Other events data? # 0. Load packages library(tidyverse) library(lubridate) library(readxl) library(haven) libra...
/analysis/defection_dataprep_sep19.R
no_license
dbowden/defection_manuscript
R
false
false
12,258
r
# Measures of repressive shock # # 1. Change of X sd or pct in theta mean # 2. EPR downgrade # 3. Polity decrease # 4. VDEM regime score decrease # 5. VDEM torture/kill increase # 6. NAVCO repression # 7. Other events data? # 0. Load packages library(tidyverse) library(lubridate) library(readxl) library(haven) libra...
/Lectures/Reading 4.4 Nonparametric spectral estimation.R
no_license
PyRPy/tsa4_textbook
R
false
false
3,707
r
#' Make a POST request to AzureML service #' #' @param datasets A named list of data frames to send to the web service. #' The names must match the names of the web inputs in Azure, eg. list(WebInput = data.frame(x=1, y=2)) #' @param url If you supply the full URL then other options are not required #' @param region T...
/R/makeRequest.R
permissive
MangoTheCat/azuremlweb
R
false
false
1,791
r
#' Make a POST request to AzureML service #' #' @param datasets A named list of data frames to send to the web service. #' The names must match the names of the web inputs in Azure, eg. list(WebInput = data.frame(x=1, y=2)) #' @param url If you supply the full URL then other options are not required #' @param region T...
library(ROCR) #Load dataset x <- read.csv("D:/GIS/Shapes/Temp/LSI_and_LS_test.csv", sep = ",") x1 <- data.frame(x$category, x$prediction) x2 <- round(x1, digits = 0) #Change names of columns colnames(x2) <- c("prediction", "category") # predict_rocr <- prediction(x2$prediction, x2$category) perf_rocr <- performance(...
/roc_with_ROCR.R
permissive
DenisKrivoguz/R_scripts
R
false
false
563
r
library(ROCR) #Load dataset x <- read.csv("D:/GIS/Shapes/Temp/LSI_and_LS_test.csv", sep = ",") x1 <- data.frame(x$category, x$prediction) x2 <- round(x1, digits = 0) #Change names of columns colnames(x2) <- c("prediction", "category") # predict_rocr <- prediction(x2$prediction, x2$category) perf_rocr <- performance(...
#################################################### # Deep Learning with R # # Poo Kuan Hoong # # Malaysia R User Group Meetup # # 13th July 2017 # # http://www.github.com/kuanhoong/deeplearning-r # ...
/mnist_TF2.R
no_license
kuanhoong/deeplearning-r
R
false
false
3,728
r
#################################################### # Deep Learning with R # # Poo Kuan Hoong # # Malaysia R User Group Meetup # # 13th July 2017 # # http://www.github.com/kuanhoong/deeplearning-r # ...
# Procmon runs this file. # # The spreadsheet PM_node_mark.xls is used ONLY for the hardcoded nodes! # # ############################################################################## # get the list of locations marked by PM # get_locations_marked <- function( asOfDate=Sys.Date() ) { fileName <- paste("S:/All/Str...
/R Extension/RMG/Energy/Trading/Congestion/Condor/overnightNepoolNodesMarks_PDS.R
no_license
uhasan1/QLExtension-backup
R
false
false
3,354
r
# Procmon runs this file. # # The spreadsheet PM_node_mark.xls is used ONLY for the hardcoded nodes! # # ############################################################################## # get the list of locations marked by PM # get_locations_marked <- function( asOfDate=Sys.Date() ) { fileName <- paste("S:/All/Str...
singleMatrixSummary <- function(m) { sourceAll("./R_Functions/analysis/matrixSummary") ## number of rows nr <- nrow(m) ## number of columns nc <- ncol(m) ## vector s contains the sum of each row s <- sum_row(m) ## total_score is the total number of points accumlated from all statements (sum ...
/R_Functions/analysisFunctions/singleMatrixSummary.R
no_license
dmcmill/4C_QuantWritingAnalysis
R
false
false
1,728
r
singleMatrixSummary <- function(m) { sourceAll("./R_Functions/analysis/matrixSummary") ## number of rows nr <- nrow(m) ## number of columns nc <- ncol(m) ## vector s contains the sum of each row s <- sum_row(m) ## total_score is the total number of points accumlated from all statements (sum ...
# nullmod: null model results # obj.glm.null: glm object, for example obj.glm.null = glm( y~x1+x2 , data=data, family=binomial) # score.result is the result from score test # SNP is the name of the markers # N is the sample size SAIGE_Pvalue <- function(nullmod, score.result, geno, SNP=NULL, N=NULL){ # if...
/R/saige.R
no_license
jiwonslee/GENESIS
R
false
false
3,867
r
# nullmod: null model results # obj.glm.null: glm object, for example obj.glm.null = glm( y~x1+x2 , data=data, family=binomial) # score.result is the result from score test # SNP is the name of the markers # N is the sample size SAIGE_Pvalue <- function(nullmod, score.result, geno, SNP=NULL, N=NULL){ # if...
library(hsphase) ### Name: co ### Title: Crossover Detection ### Aliases: co ### Keywords: crossover ### ** Examples genotype <- matrix(c( # Define a Half-sib Genotype Matrix 2,1,0, # Individual 1 2,0,2, # Individual 2 0,0,2 # Ind...
/data/genthat_extracted_code/hsphase/examples/co.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
439
r
library(hsphase) ### Name: co ### Title: Crossover Detection ### Aliases: co ### Keywords: crossover ### ** Examples genotype <- matrix(c( # Define a Half-sib Genotype Matrix 2,1,0, # Individual 1 2,0,2, # Individual 2 0,0,2 # Ind...
################### # server.R # # For all your server needs ################### library(shinydashboard) source('functions.R', local = T) server <- function(input, output, session) { queryDT <- eventReactive( input$submit, { result <- runsql(input$sql_code) print(result) result ...
/server.R
no_license
smsalaken/cad_viewer
R
false
false
891
r
################### # server.R # # For all your server needs ################### library(shinydashboard) source('functions.R', local = T) server <- function(input, output, session) { queryDT <- eventReactive( input$submit, { result <- runsql(input$sql_code) print(result) result ...
> add_three<-function(a,b,c) { + return(a+b+c) + } > source(“add_three.R”) > add_three(1,5,7) > >
/add_three.R
no_license
cewalley/chem160module10
R
false
false
106
r
> add_three<-function(a,b,c) { + return(a+b+c) + } > source(“add_three.R”) > add_three(1,5,7) > >
#' @export #' @name Windmill #' @title Update something in the terminal. #' @description Say something in the same line while updating a windmill text animation. Serves to give visual feedback. #' @param ... Variables to be sent to the console Windmill <- function(...) { # Create the windmill windmill <- c("|",...
/R/consoleWindmill.R
permissive
rvladimiro/dafR
R
false
false
792
r
#' @export #' @name Windmill #' @title Update something in the terminal. #' @description Say something in the same line while updating a windmill text animation. Serves to give visual feedback. #' @param ... Variables to be sent to the console Windmill <- function(...) { # Create the windmill windmill <- c("|",...
## -*- truncate-lines: t; -*- Shiller <- function(dest.dir, url = "http://www.econ.yale.edu/~shiller/data/ie_data.xls") { f.name <- paste0(format(Sys.Date(), "%Y%m%d_"), "ie_data.xls") f.path <- file.path(normalizePath(dest.dir), f.name) if (!file.exists(f.path)) ...
/R/market_data.R
no_license
minghao2016/NMOF
R
false
false
25,101
r
## -*- truncate-lines: t; -*- Shiller <- function(dest.dir, url = "http://www.econ.yale.edu/~shiller/data/ie_data.xls") { f.name <- paste0(format(Sys.Date(), "%Y%m%d_"), "ie_data.xls") f.path <- file.path(normalizePath(dest.dir), f.name) if (!file.exists(f.path)) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expmax.r \name{expmax} \alias{expmax} \title{Expectation-maximization framework for state-switching} \usage{ expmax(p.init, g, L, K1, K2, niter = 1000, threshold = 0.01, save = F) } \arguments{ \item{p.init}{a vector of length 2. The first is...
/man/expmax.Rd
no_license
cran/HMMoce
R
false
true
2,018
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expmax.r \name{expmax} \alias{expmax} \title{Expectation-maximization framework for state-switching} \usage{ expmax(p.init, g, L, K1, K2, niter = 1000, threshold = 0.01, save = F) } \arguments{ \item{p.init}{a vector of length 2. The first is...
#' Given a matrix of covarites, \code{identify_covariates} returns the top \code{keep_n_covars} or the indexes of those columns. #' #' Columns are sorted in descending order of \code{min(prevalence, 1-prevalence)} where \code{prevalence} is the the proportion of #' non-zero values in a given column. #' #' If \code{in...
/R/identify_covariates.R
no_license
himshikhadas/hdps
R
false
false
2,099
r
#' Given a matrix of covarites, \code{identify_covariates} returns the top \code{keep_n_covars} or the indexes of those columns. #' #' Columns are sorted in descending order of \code{min(prevalence, 1-prevalence)} where \code{prevalence} is the the proportion of #' non-zero values in a given column. #' #' If \code{in...
# truncateHouseholdPower.R # # Based on household_power_consumption.txt # The code below truncates the original data file to just the rows necessary. # The Date and Time column are combined, then converted to POSIXct for easy # handling of time. The smaller file is written to truncatedhouseholdpower.csv, # which turns...
/truncateHouseholdPower.R
no_license
keona1995/ExData_Plotting1
R
false
false
1,415
r
# truncateHouseholdPower.R # # Based on household_power_consumption.txt # The code below truncates the original data file to just the rows necessary. # The Date and Time column are combined, then converted to POSIXct for easy # handling of time. The smaller file is written to truncatedhouseholdpower.csv, # which turns...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colors.R \docType{data} \name{junebug_palettes} \alias{junebug_palettes} \title{Complete list of palettes} \format{ An object of class \code{list} of length 3. } \usage{ junebug_palettes } \description{ Complete list of palettes } \keyword{da...
/man/junebug_palettes.Rd
permissive
yjunechoe/junebug
R
false
true
328
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colors.R \docType{data} \name{junebug_palettes} \alias{junebug_palettes} \title{Complete list of palettes} \format{ An object of class \code{list} of length 3. } \usage{ junebug_palettes } \description{ Complete list of palettes } \keyword{da...
##################################Bioinformation Function Set
/ioinformationFunctionSet.R
no_license
tienan/Shsmu_tienanTools
R
false
false
62
r
##################################Bioinformation Function Set
install.packages("readxl") library(readxl) bronx1<-read_excel("rollingsales_bronx.xls") SALE.PRICE<-sub("\\$","",bronx1$`SALE PRICE`) SALE.PRICE<-as.numeric(gsub(",","", SALE.PRICE)) GROSS.SQUARE.FEET<-as.numeric(gsub(",","", bronx1$`GROSS SQUARE FEET`)) LAND.SQUARE.FEET<-as.numeric(gsub(",","", bronx1$`LAND SQUARE ...
/lab4/lab1_bronx.R
no_license
sirmammingtonham/DataAnalytics2021_Ethan_Joseph
R
false
false
1,311
r
install.packages("readxl") library(readxl) bronx1<-read_excel("rollingsales_bronx.xls") SALE.PRICE<-sub("\\$","",bronx1$`SALE PRICE`) SALE.PRICE<-as.numeric(gsub(",","", SALE.PRICE)) GROSS.SQUARE.FEET<-as.numeric(gsub(",","", bronx1$`GROSS SQUARE FEET`)) LAND.SQUARE.FEET<-as.numeric(gsub(",","", bronx1$`LAND SQUARE ...
simulateRespondents<-function (thetas, itemBank, responsesMatrix = NULL, model = NULL, genSeed = NULL, cbControl = NULL, rmax = 1, Mrmax = "restricted", start = list(fixItems = NULL, seed = NULL, nrItems = 1, theta = 0, D=1,randomesque = 1, random.seed = NULL, startSelect = "MFI", cb.control=FALSE...
/R/simulateRespondents.R
no_license
cran/catR
R
false
false
23,516
r
simulateRespondents<-function (thetas, itemBank, responsesMatrix = NULL, model = NULL, genSeed = NULL, cbControl = NULL, rmax = 1, Mrmax = "restricted", start = list(fixItems = NULL, seed = NULL, nrItems = 1, theta = 0, D=1,randomesque = 1, random.seed = NULL, startSelect = "MFI", cb.control=FALSE...
library(igraph) ### Name: predict_edges ### Title: Predict edges based on a hierarchical random graph model ### Aliases: predict_edges hrg.predict ### ** Examples ## We are not running these examples any more, because they ## take a long time (~15 seconds) to run and this is against the CRAN ## repository policy. C...
/data/genthat_extracted_code/igraph/examples/predict_edges.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
754
r
library(igraph) ### Name: predict_edges ### Title: Predict edges based on a hierarchical random graph model ### Aliases: predict_edges hrg.predict ### ** Examples ## We are not running these examples any more, because they ## take a long time (~15 seconds) to run and this is against the CRAN ## repository policy. C...
#!/bin/R .libPaths("/mnt/gaiagpfs/users/homedirs/smartinezarbas/R/x86_64-pc-linux-gnu-library/3.4") # path to install/load libraries packs <- c("tidyr", "dplyr", "readr", "stringr") for (i in 1:length(packs)) { if(packs[i] %in% rownames(installed.packages()) == FALSE) { install.packages(packs[i], repos="http:/...
/src/link_spacer_to_protospacer_contig.R
no_license
mlwright97/LAO_multiomics_CRISPR_iMGEs
R
false
false
3,569
r
#!/bin/R .libPaths("/mnt/gaiagpfs/users/homedirs/smartinezarbas/R/x86_64-pc-linux-gnu-library/3.4") # path to install/load libraries packs <- c("tidyr", "dplyr", "readr", "stringr") for (i in 1:length(packs)) { if(packs[i] %in% rownames(installed.packages()) == FALSE) { install.packages(packs[i], repos="http:/...
## This is my solution of makeCacheMatrix ## This function have four methods in her : ## Set & Get a matrix ## Set & Get the invert of the created matrix makeCacheMatrix <- function(my_mat = matrix()) { inv_mat <- NULL # First method : set a matrix set <- function(y) { my_mat <<- y ...
/cachematrix.R
no_license
msauvayre/ProgrammingAssignment2
R
false
false
1,312
r
## This is my solution of makeCacheMatrix ## This function have four methods in her : ## Set & Get a matrix ## Set & Get the invert of the created matrix makeCacheMatrix <- function(my_mat = matrix()) { inv_mat <- NULL # First method : set a matrix set <- function(y) { my_mat <<- y ...
library(lattice) exdata <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?") exdata$dateTime <- strptime(paste(exdata$Date, exdata$Time), "%d/%m/%Y %H:%M:%S") exdataSubset <- subset(exdata, dateTime >= strptime("2007-02-01 00:00:00", "%Y-%m-%d %H:%M:%S...
/Plot3.R
no_license
amcpharl63/ExData_Plotting1
R
false
false
898
r
library(lattice) exdata <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?") exdata$dateTime <- strptime(paste(exdata$Date, exdata$Time), "%d/%m/%Y %H:%M:%S") exdataSubset <- subset(exdata, dateTime >= strptime("2007-02-01 00:00:00", "%Y-%m-%d %H:%M:%S...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compare_to_field.R \name{compare_to_field} \alias{compare_to_field} \title{compare metric for GLM vs field observations} \usage{ compare_to_field(nc_file, field_file, nml_file, metric, as_value = FALSE, na.rm = TRUE, ...) } \arguments{ \ite...
/man/compare_to_field.Rd
no_license
klingerf2/glmtools
R
false
true
2,767
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compare_to_field.R \name{compare_to_field} \alias{compare_to_field} \title{compare metric for GLM vs field observations} \usage{ compare_to_field(nc_file, field_file, nml_file, metric, as_value = FALSE, na.rm = TRUE, ...) } \arguments{ \ite...
# ----------------------- # Supplementary Material for Deith and Brodie 2020; "Predicting defaunation - accurately mapping bushmeat hunting pressure over large areas" # doi: 10.1098/rspb.2019-2677 # ----------------------- # modelfitting.R # Code to fit data in a prepared unmarked data frame to # validate various...
/N-mixture models/NMixModel_Steps/modelfitting.R
no_license
mairindeith/DeithBrodie2020_PredictingDefaunationBorneo
R
false
false
6,123
r
# ----------------------- # Supplementary Material for Deith and Brodie 2020; "Predicting defaunation - accurately mapping bushmeat hunting pressure over large areas" # doi: 10.1098/rspb.2019-2677 # ----------------------- # modelfitting.R # Code to fit data in a prepared unmarked data frame to # validate various...
#opens multiple steps analysis files extracted from time-series files and pools them together #the resulting data frame is analysed with various statistics setwd("C:/Users/algis/Desktop/Algis/Algis_UoW/analysis") source("steps_and_dirs_compiled.R") filelist <- c(sub) directory <- c(d_sub) layout(matrix(c(1, 1, 1, 2)...
/Analysis/steps_compare_3.R
no_license
algyz200/R_portfolio
R
false
false
6,674
r
#opens multiple steps analysis files extracted from time-series files and pools them together #the resulting data frame is analysed with various statistics setwd("C:/Users/algis/Desktop/Algis/Algis_UoW/analysis") source("steps_and_dirs_compiled.R") filelist <- c(sub) directory <- c(d_sub) layout(matrix(c(1, 1, 1, 2)...
library(shiny) library(leaflet) library(shinydashboard) library(plotly) library(DT) dashboardPage(skin = "purple", dashboardHeader(title = "DTC Solution Toolkit", titleWidth = NULL, tags$li(class = "dropdown",style = "margin-top: 5px;" )), dashboardSidebar( width = 180, ...
/ui.R
no_license
RupaKumari1/DTC_Solution_Toolkit
R
false
false
6,096
r
library(shiny) library(leaflet) library(shinydashboard) library(plotly) library(DT) dashboardPage(skin = "purple", dashboardHeader(title = "DTC Solution Toolkit", titleWidth = NULL, tags$li(class = "dropdown",style = "margin-top: 5px;" )), dashboardSidebar( width = 180, ...
setwd("/Users/MengyingLiu/Documents/STAT4249") library("data.table") library("dplyr") library("plyr") library("ggplot2") colkeep<-c("ST","INDP","COW","OCCP","POBP","POWSP") dataa<- fread("/Users/MengyingLiu/Documents/STAT4249/ss13pusa.csv", select=colkeep ) datab<- fread("/Users/MengyingLiu/Documents/STAT424...
/lib/industry.R
no_license
TZstatsADS/Spr2016-Proj1-Grp8-InteractiveGraphs
R
false
false
4,747
r
setwd("/Users/MengyingLiu/Documents/STAT4249") library("data.table") library("dplyr") library("plyr") library("ggplot2") colkeep<-c("ST","INDP","COW","OCCP","POBP","POWSP") dataa<- fread("/Users/MengyingLiu/Documents/STAT4249/ss13pusa.csv", select=colkeep ) datab<- fread("/Users/MengyingLiu/Documents/STAT424...
#define a comment #define an object x <- 20
/RScriptfor_Github.R
no_license
MiguelCos/RStudio
R
false
false
45
r
#define a comment #define an object x <- 20
plot2 <- function() { ## dowload the original txt from the website into a folder named "data" ## unzip the zip file url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" if(!file.exists("data")) {dir.create("data")} download.file(url,destfile="./data/rawdata.zip",method="cur...
/ExploratoryDataAnalysisProj1/plot2.R
no_license
qtao913/ExData_Plotting1
R
false
false
1,305
r
plot2 <- function() { ## dowload the original txt from the website into a folder named "data" ## unzip the zip file url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" if(!file.exists("data")) {dir.create("data")} download.file(url,destfile="./data/rawdata.zip",method="cur...
#' Insurance Policy Data #' #' @format A data frame with 926 observations on the following 13 variables. #' \describe{ #' \item{\code{Year}}{The four digit year of the policy} #' \item{\code{PolicyNo}}{The policy number} #' \item{\code{TotalPremium}}{The total incurance premium} #' \item{\code{BonusMalus}}{Di...
/R/policyData.R
no_license
Esuene/mangoTraining
R
false
false
991
r
#' Insurance Policy Data #' #' @format A data frame with 926 observations on the following 13 variables. #' \describe{ #' \item{\code{Year}}{The four digit year of the policy} #' \item{\code{PolicyNo}}{The policy number} #' \item{\code{TotalPremium}}{The total incurance premium} #' \item{\code{BonusMalus}}{Di...
/白色家电/wgoods_cash.r
no_license
DanieljcFan/genial-flow-model
R
false
false
8,575
r
for (package in c("PearsonDS","gsl")) { if (!require(package, character.only=T, quietly=T)) { install.packages(package) library(package, character.only=T) } } ##### Function to load packages # Note: when kurtosis = 3 and skewness = 0, one has a normal distribution get_write <- function(object, ...
/Réflexion-extras/Simulations CI vs t test.R
no_license
mdelacre/Effect-sizes
R
false
false
8,307
r
for (package in c("PearsonDS","gsl")) { if (!require(package, character.only=T, quietly=T)) { install.packages(package) library(package, character.only=T) } } ##### Function to load packages # Note: when kurtosis = 3 and skewness = 0, one has a normal distribution get_write <- function(object, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gh.R \name{gh_packages_assigned_to} \alias{gh_packages_assigned_to} \title{Show packages assigned to a github user} \usage{ gh_packages_assigned_to(github_username) } \arguments{ \item{github_username}{The github username} } \value{ a data fr...
/man/gh_packages_assigned_to.Rd
no_license
Bioconductor/BiocContributions
R
false
true
479
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gh.R \name{gh_packages_assigned_to} \alias{gh_packages_assigned_to} \title{Show packages assigned to a github user} \usage{ gh_packages_assigned_to(github_username) } \arguments{ \item{github_username}{The github username} } \value{ a data fr...
#Yvonne Vasquez #Date: 7/15/19 #title: ss_cluster_outlier_genes_v1 library(readr) library(dplyr) library(tidyverse) library(xlsx) base_dir = "/Users/yvonnevasquez/Documents/GitHub/synovial_sarcoma_subtypes/synovial_sarcoma_outliers/" setwd(base_dir) path_to_data = "/Users/yvonnevasquez/Documents/GitHub/synovial_sarc...
/synovial_sarcoma_outliers/ss_cluster_outlier_genes_v2.R
no_license
UCSC-Treehouse/synovial_sarcoma_subtypes
R
false
false
4,606
r
#Yvonne Vasquez #Date: 7/15/19 #title: ss_cluster_outlier_genes_v1 library(readr) library(dplyr) library(tidyverse) library(xlsx) base_dir = "/Users/yvonnevasquez/Documents/GitHub/synovial_sarcoma_subtypes/synovial_sarcoma_outliers/" setwd(base_dir) path_to_data = "/Users/yvonnevasquez/Documents/GitHub/synovial_sarc...
#Clasius_Clapeyron Equation rm(list=ls()) #Octamethylcyclotetrasiloxane (D4) C = 6.01040189280479e-05; #gravity vs blades contributions Q = 0.5; # flow rate (ml/min) Q = Q*10^-6*60 Nb = 3; # n...
/WFE_performance_ExtremeLowFlowRate.R
no_license
Tornado128/R
R
false
false
2,459
r
#Clasius_Clapeyron Equation rm(list=ls()) #Octamethylcyclotetrasiloxane (D4) C = 6.01040189280479e-05; #gravity vs blades contributions Q = 0.5; # flow rate (ml/min) Q = Q*10^-6*60 Nb = 3; # n...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{coxprocess_gradlog_vi_proposal} \alias{coxprocess_gradlog_vi_proposal} \title{Evaluate gradient of VI Gaussian proposal density} \usage{ coxprocess_gradlog_vi_proposal(x) } \arguments{ \item{x}{evaluation points} } \value{...
/man/coxprocess_gradlog_vi_proposal.Rd
no_license
jeremyhengjm/GibbsFlow
R
false
true
405
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{coxprocess_gradlog_vi_proposal} \alias{coxprocess_gradlog_vi_proposal} \title{Evaluate gradient of VI Gaussian proposal density} \usage{ coxprocess_gradlog_vi_proposal(x) } \arguments{ \item{x}{evaluation points} } \value{...
library(tidyverse) ## Chi-square test click_rate <- read_csv('https://raw.githubusercontent.com/gedeck/practical-statistics-for-data-scientists/master/data/click_rates.csv') clicks <- matrix(click_rate$Rate, nrow=3, ncol=2, byrow=TRUE) ### Resampling chisq.test(clicks, simulate.p.value=TRUE) ### Chisq test chisq.test(...
/Chapter3/Chapter3_03_Chisq and Fisher test.R
no_license
kenyam1979/Practical-statistics-for-DS
R
false
false
425
r
library(tidyverse) ## Chi-square test click_rate <- read_csv('https://raw.githubusercontent.com/gedeck/practical-statistics-for-data-scientists/master/data/click_rates.csv') clicks <- matrix(click_rate$Rate, nrow=3, ncol=2, byrow=TRUE) ### Resampling chisq.test(clicks, simulate.p.value=TRUE) ### Chisq test chisq.test(...
# Tests the behaviour of the rescaleBatches function. # library(batchelor); library(testthat); source("test-rescale-batch.R") set.seed(130000) test_that("rescaleBatches works correctly", { means <- 2^rgamma(1000, 2, 1) A1 <- matrix(rpois(10000, lambda=means), ncol=50) # Batch 1 A2 <- matrix(rpois(20000, l...
/bin/batchelor/tests/testthat/test-rescale-batch.R
no_license
FowlerLab/vcs_2019
R
false
false
8,870
r
# Tests the behaviour of the rescaleBatches function. # library(batchelor); library(testthat); source("test-rescale-batch.R") set.seed(130000) test_that("rescaleBatches works correctly", { means <- 2^rgamma(1000, 2, 1) A1 <- matrix(rpois(10000, lambda=means), ncol=50) # Batch 1 A2 <- matrix(rpois(20000, l...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{get_clinical_associations_civic_cbmdb} \alias{get_clinical_associations_civic_cbmdb} \title{Function that appends clinical annotations for somatic cancer variants} \usage{ get_clinical_associations_civic_cbmdb(sample_calls, pcgr...
/src/R/pcgrr/man/get_clinical_associations_civic_cbmdb.Rd
permissive
wangdi2014/pcgr
R
false
true
716
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{get_clinical_associations_civic_cbmdb} \alias{get_clinical_associations_civic_cbmdb} \title{Function that appends clinical annotations for somatic cancer variants} \usage{ get_clinical_associations_civic_cbmdb(sample_calls, pcgr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/import_data.R \name{tabixFetchGWASCatalogSummary} \alias{tabixFetchGWASCatalogSummary} \title{Import a specific region from a tabix-indexed GWAS summary stats file} \usage{ tabixFetchGWASCatalogSummary(granges, summary_path) } \description{ I...
/colocWrapper/man/tabixFetchGWASCatalogSummary.Rd
permissive
kauralasoo/colocWrapper
R
false
true
391
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/import_data.R \name{tabixFetchGWASCatalogSummary} \alias{tabixFetchGWASCatalogSummary} \title{Import a specific region from a tabix-indexed GWAS summary stats file} \usage{ tabixFetchGWASCatalogSummary(granges, summary_path) } \description{ I...
###choose PREBAS version vPREBAS <- "v0.2.x" #### choose PREBAS verson to run the model "master" #####Settings#### testRun = T ####set to TRUE to test the code on a small raster proportion if(!exists("CSCrun")){ CSCrun = F ### set to TRUE if you are running on CSC } fracTest <- 0.2 ###fraction of test area maxSi...
/Rsrc/settings.r
no_license
jonathanholder/satRuns
R
false
false
7,185
r
###choose PREBAS version vPREBAS <- "v0.2.x" #### choose PREBAS verson to run the model "master" #####Settings#### testRun = T ####set to TRUE to test the code on a small raster proportion if(!exists("CSCrun")){ CSCrun = F ### set to TRUE if you are running on CSC } fracTest <- 0.2 ###fraction of test area maxSi...
############## ## Data Input: ## Exploring 'Monument' Dataset ############## # 1. Change the name of the "Location.1" column to "location" mon = read.csv("C:/Users/chisli/Desktop/Monuments.csv", header = TRUE, as.is = TRUE) names(mon) #[1] "name" "zipCode" "neighborhood" "councilDistrict" #[5] "p...
/R for Public Health/Data_input.R
no_license
herden/R-data-analysis
R
false
false
6,370
r
############## ## Data Input: ## Exploring 'Monument' Dataset ############## # 1. Change the name of the "Location.1" column to "location" mon = read.csv("C:/Users/chisli/Desktop/Monuments.csv", header = TRUE, as.is = TRUE) names(mon) #[1] "name" "zipCode" "neighborhood" "councilDistrict" #[5] "p...
## First, the short parameters class ## It is instantiated with a set of initial values ParametersClass=function(){ Baseline.Window.Minutes=3 Signal.Threshold = 50 Feeding.Threshold.Value=100 Feeding.Interval.Minimum=20 Tasting.Threshold.Interval=c(10,80) Use.Adaptive.Threshold=FALSE Adaptive.Threshold.M...
/FLIC/ParametersClass.R
no_license
zachgoldberg10/FLIC_R_Code
R
false
false
7,705
r
## First, the short parameters class ## It is instantiated with a set of initial values ParametersClass=function(){ Baseline.Window.Minutes=3 Signal.Threshold = 50 Feeding.Threshold.Value=100 Feeding.Interval.Minimum=20 Tasting.Threshold.Interval=c(10,80) Use.Adaptive.Threshold=FALSE Adaptive.Threshold.M...
setwd("~/manuscript/simplifyEnrichment") lt_foo = readRDS("random_BP_results.rds"); diff_score_df = lt_foo$diff_score_df cluster_number_df = lt_foo$cluster_number_df cluster_number2_df = lt_foo$cluster_number2_df block_mean_df = lt_foo$block_mean_df library(ggplot2) library(cowplot) p1 = ggplot(diff_score_df, aes(...
/figures/figure5.R
no_license
simplifyEnrichment/simplifyEnrichment_manuscript
R
false
false
2,551
r
setwd("~/manuscript/simplifyEnrichment") lt_foo = readRDS("random_BP_results.rds"); diff_score_df = lt_foo$diff_score_df cluster_number_df = lt_foo$cluster_number_df cluster_number2_df = lt_foo$cluster_number2_df block_mean_df = lt_foo$block_mean_df library(ggplot2) library(cowplot) p1 = ggplot(diff_score_df, aes(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/event.R \name{new_event} \alias{new_event} \alias{validate_event} \alias{event} \title{Event Constructor} \usage{ new_event(id = uuid::UUIDgenerate(), type, time = Sys.time(), ...) validate_event(id, type, time, ...) event(id = uuid::UUIDge...
/man/event.Rd
no_license
alvarofranq/eventr
R
false
true
1,374
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/event.R \name{new_event} \alias{new_event} \alias{validate_event} \alias{event} \title{Event Constructor} \usage{ new_event(id = uuid::UUIDgenerate(), type, time = Sys.time(), ...) validate_event(id, type, time, ...) event(id = uuid::UUIDge...
#' Get station IDs #' @description Obtain the station IDs needed as input #' for the \code{get_isd_station_data} function. #' @param stn_df a data frame of stations that is obtained #' with (and often filtered by) the \code{get_isd_stations} #' function. #' @return Returns a character vector of length #' \code{nrow(s...
/R/get_station_ids.R
no_license
pavlovc2/stationaRy
R
false
false
954
r
#' Get station IDs #' @description Obtain the station IDs needed as input #' for the \code{get_isd_station_data} function. #' @param stn_df a data frame of stations that is obtained #' with (and often filtered by) the \code{get_isd_stations} #' function. #' @return Returns a character vector of length #' \code{nrow(s...
#' Gmatrices #' #' Computes the derivatives of vec(C) wrt vec(A) based on Lütkepohl H. New introduction to multiple time series analysis. Springer, 2007. #' #' @param AL VAR model coefficients #' @param C MA representation coefficients #' @param p lag order #' @param hori forecast horizon #' @param n number of variable...
/R/Gmatrices.R
no_license
martinbaumgaertner/varexternal
R
false
false
1,546
r
#' Gmatrices #' #' Computes the derivatives of vec(C) wrt vec(A) based on Lütkepohl H. New introduction to multiple time series analysis. Springer, 2007. #' #' @param AL VAR model coefficients #' @param C MA representation coefficients #' @param p lag order #' @param hori forecast horizon #' @param n number of variable...
#' @title Ages of Morwong assigned from otoliths by two readers. #' #' @description Ages assigned by two different readers to the otoliths of Jackass Morwong (\emph{Nemadactylus macropterus}). #' #' @name Morwong3 #' #' @docType data #' #' @format A data frame with 58 paired observations on the following 2 ...
/FSAdata/R/Morwong3.R
no_license
ingted/R-Examples
R
false
false
1,198
r
#' @title Ages of Morwong assigned from otoliths by two readers. #' #' @description Ages assigned by two different readers to the otoliths of Jackass Morwong (\emph{Nemadactylus macropterus}). #' #' @name Morwong3 #' #' @docType data #' #' @format A data frame with 58 paired observations on the following 2 ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rds_operations.R \name{rds_modify_db_cluster_parameter_group} \alias{rds_modify_db_cluster_parameter_group} \title{Modifies the parameters of a DB cluster parameter group} \usage{ rds_modify_db_cluster_parameter_group(DBClusterParameterGroupN...
/cran/paws.database/man/rds_modify_db_cluster_parameter_group.Rd
permissive
TWarczak/paws
R
false
true
3,081
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rds_operations.R \name{rds_modify_db_cluster_parameter_group} \alias{rds_modify_db_cluster_parameter_group} \title{Modifies the parameters of a DB cluster parameter group} \usage{ rds_modify_db_cluster_parameter_group(DBClusterParameterGroupN...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Momocs-package.R \docType{package} \name{Momocs} \alias{Momocs} \alias{Momocs-package} \title{Momocs} \description{ A complete toolkit for morphometrics, from data extraction to multivariate analyses. Most common 2D morphometrics approaches a...
/man/Momocs.Rd
no_license
Alexis-D/Momocs
R
false
true
1,945
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Momocs-package.R \docType{package} \name{Momocs} \alias{Momocs} \alias{Momocs-package} \title{Momocs} \description{ A complete toolkit for morphometrics, from data extraction to multivariate analyses. Most common 2D morphometrics approaches a...
# The following block is used by usethis to automatically manage # roxygen namespace tags. Modify with care! ## usethis namespace: start #' @importFrom tibble tibble ## usethis namespace: end NULL
/R/palette2vec-package.R
permissive
EmilHvitfeldt/palette2vec
R
false
false
197
r
# The following block is used by usethis to automatically manage # roxygen namespace tags. Modify with care! ## usethis namespace: start #' @importFrom tibble tibble ## usethis namespace: end NULL
# The texreg package was written by Philip Leifeld. # Please use the issue tracker at http://github.com/leifeld/texreg # for bug reports, help, or feature requests. # a class for texreg objects setClass(Class = "texreg", representation = representation( coef.names = "character", # row names of the coeffi...
/R/classDefinition.R
no_license
eivindhammers/texreg
R
false
false
4,572
r
# The texreg package was written by Philip Leifeld. # Please use the issue tracker at http://github.com/leifeld/texreg # for bug reports, help, or feature requests. # a class for texreg objects setClass(Class = "texreg", representation = representation( coef.names = "character", # row names of the coeffi...
yadirGetKeyWords <- function(CampaignIds = NULL, AdGroupIds = NA, Ids = NA, States = c("OFF","ON","SUSPENDED"), WithStats = T, Login = NULL, ...
/utf8/R/yadirGetKeyWords.R
no_license
vitosbat/ryandexdirect
R
false
false
9,898
r
yadirGetKeyWords <- function(CampaignIds = NULL, AdGroupIds = NA, Ids = NA, States = c("OFF","ON","SUSPENDED"), WithStats = T, Login = NULL, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/generator.R \name{generate} \alias{generate} \title{Generate assembly code} \usage{ generate(nodes) } \arguments{ \item{nodes}{list of node} } \value{ assembly } \description{ Generate assembly code }
/man/generate.Rd
permissive
igjit/nrc
R
false
true
279
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/generator.R \name{generate} \alias{generate} \title{Generate assembly code} \usage{ generate(nodes) } \arguments{ \item{nodes}{list of node} } \value{ assembly } \description{ Generate assembly code }
library(spatstat) ### Name: headtail ### Title: First or Last Part of a Spatial Pattern ### Aliases: head.ppp head.ppx head.psp head.tess tail.ppp tail.ppx ### tail.psp tail.tess ### Keywords: spatial manip ### ** Examples head(cells) tail(as.psp(spiders), 10) head(dirichlet(cells), 4)
/data/genthat_extracted_code/spatstat/examples/headtail.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
302
r
library(spatstat) ### Name: headtail ### Title: First or Last Part of a Spatial Pattern ### Aliases: head.ppp head.ppx head.psp head.tess tail.ppp tail.ppx ### tail.psp tail.tess ### Keywords: spatial manip ### ** Examples head(cells) tail(as.psp(spiders), 10) head(dirichlet(cells), 4)
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) library(datasets) shinyServer(function(input, output) { data("chickwts") selectedChicks <- reactive({ chickwts[chickwts$feed %in% input...
/server.R
no_license
jar1218/Developing-Data-Products
R
false
false
1,031
r
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) library(datasets) shinyServer(function(input, output) { data("chickwts") selectedChicks <- reactive({ chickwts[chickwts$feed %in% input...
# 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 in writing, software # distributed under the ...
/R/phenotype.r
permissive
quanrd/SIMER
R
false
false
50,512
r
# 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 in writing, software # distributed under the ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{lib_read_plink_files_with_cov_facs} \alias{lib_read_plink_files_with_cov_facs} \title{Internal function} \usage{ lib_read_plink_files_with_cov_facs(inst, base_filename, covfilename, encoding) } \description{ Internal funct...
/fuzzedpackages/CASMAP/man/lib_read_plink_files_with_cov_facs.Rd
no_license
akhikolla/testpackages
R
false
true
345
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{lib_read_plink_files_with_cov_facs} \alias{lib_read_plink_files_with_cov_facs} \title{Internal function} \usage{ lib_read_plink_files_with_cov_facs(inst, base_filename, covfilename, encoding) } \description{ Internal funct...
require(seewave); data(tico); data(orni); data(pellucens) op1<-par(ask=TRUE) # different oscillograms of a tropical sparrow song oscillo(tico,f=22050) oscillo(tico,f=22050,k=2,j=2,byrow=TRUE) op<-par(bg="grey") oscillo(tico,f=22050,k=4,j=1,title=TRUE,colwave="black", coltitle="yellow",collab="red",colline="white"...
/packrat/lib-ext/seewave/demo/seewave.R
no_license
dwaynepaschall/soundR
R
false
false
2,233
r
require(seewave); data(tico); data(orni); data(pellucens) op1<-par(ask=TRUE) # different oscillograms of a tropical sparrow song oscillo(tico,f=22050) oscillo(tico,f=22050,k=2,j=2,byrow=TRUE) op<-par(bg="grey") oscillo(tico,f=22050,k=4,j=1,title=TRUE,colwave="black", coltitle="yellow",collab="red",colline="white"...
SubLikelihoods <- function(x,subject=c(1:x$nsubj)){ Lframe <- as.data.frame(cbind(round(x$evalpoints,4),as.data.frame(x$RCC)[,subject])) colnames(Lframe) <- c("Theta",paste("Subject:",subject,sep=" ")) return(Lframe) }
/fuzzedpackages/KernSmoothIRT/R/SubLikelihoods.R
no_license
akhikolla/testpackages
R
false
false
226
r
SubLikelihoods <- function(x,subject=c(1:x$nsubj)){ Lframe <- as.data.frame(cbind(round(x$evalpoints,4),as.data.frame(x$RCC)[,subject])) colnames(Lframe) <- c("Theta",paste("Subject:",subject,sep=" ")) return(Lframe) }
# load functions source("~/Dropbox/QRM/Project/Functions.R") #import all data Equity_CH <- qrm.load.data("~/Dropbox/QRM/Project/QRM_Project_Dataset/Equity_CH.csv", ";") Equity_CH_Infos <- qrm.load.data("~/Dropbox/QRM/Project/QRM_Project_Dataset/Equity_CH_Infos.csv", "\t") Equity_US <- qrm.load.data("~/Dropbox/QRM/Pro...
/script.R
no_license
tpopenfoose/qrm
R
false
false
24,229
r
# load functions source("~/Dropbox/QRM/Project/Functions.R") #import all data Equity_CH <- qrm.load.data("~/Dropbox/QRM/Project/QRM_Project_Dataset/Equity_CH.csv", ";") Equity_CH_Infos <- qrm.load.data("~/Dropbox/QRM/Project/QRM_Project_Dataset/Equity_CH_Infos.csv", "\t") Equity_US <- qrm.load.data("~/Dropbox/QRM/Pro...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ensr.R \name{preferable} \alias{preferable} \title{Preferable Elastic Net Model} \usage{ preferable(object, ...) } \arguments{ \item{object}{an ensr object} \item{...}{not currently used.} } \description{ Find the preferable Elastic Net Mode...
/man/preferable.Rd
no_license
cran/ensr
R
false
true
460
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ensr.R \name{preferable} \alias{preferable} \title{Preferable Elastic Net Model} \usage{ preferable(object, ...) } \arguments{ \item{object}{an ensr object} \item{...}{not currently used.} } \description{ Find the preferable Elastic Net Mode...