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
#' Read GEM data from SAV files #' @export #' @param file path to a SAV file #' @param ... arguments passed to \code{\link[haven]{read_sav}} #' \dontrun{ #' files <- fs::dir_ls("~/Data/gem", regexp = ".sav$") #' gem_data <- read_gem_data(files[1]) #' } read_gem_data <- function(file, ...) { # Note that haven is fast...
/R/read.R
no_license
beanumber/gem
R
false
false
461
r
#' Read GEM data from SAV files #' @export #' @param file path to a SAV file #' @param ... arguments passed to \code{\link[haven]{read_sav}} #' \dontrun{ #' files <- fs::dir_ls("~/Data/gem", regexp = ".sav$") #' gem_data <- read_gem_data(files[1]) #' } read_gem_data <- function(file, ...) { # Note that haven is fast...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blaster.R \name{peak_blaster} \alias{peak_blaster} \title{MALDI-TOF MS peak "BLAST"er} \usage{ peak_blaster( query_peak_list, subject_peak_list, lowerMassCutoff = 3000, upperMassCutoff = 15000, chunksize = 10, similarity_cutoff = ...
/man/peak_blaster.Rd
no_license
chasemc/maldiblast
R
false
true
934
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/blaster.R \name{peak_blaster} \alias{peak_blaster} \title{MALDI-TOF MS peak "BLAST"er} \usage{ peak_blaster( query_peak_list, subject_peak_list, lowerMassCutoff = 3000, upperMassCutoff = 15000, chunksize = 10, similarity_cutoff = ...
/para anderson el gil.R
no_license
juandanielmedina/Prograaaaaaaa
R
false
false
5,392
r
################################################################################ ############## Analiza mjerenja na namotajima 2MVA 12.09.2020. ############### ################################################################################ # Source functions and objects file source('functions.R') # Plotting library(...
/2MVA/analysis_namotaji_2MVA.R
permissive
tbazina/transformer-measurement-analysis
R
false
false
46,678
r
################################################################################ ############## Analiza mjerenja na namotajima 2MVA 12.09.2020. ############### ################################################################################ # Source functions and objects file source('functions.R') # Plotting library(...
## functions in R " function_name <- function(arg_1, arg_2, ...) { Function body } " #Built-in #To calculate sum of numbers in R v<-c(1,2,3,4,5) #return the sum of the numbers in v sum(v) #returns the average value of the numbers in v mean(v) ##Custom functions #To write a cu...
/Day 4 R DataTypes, Data Structure, Apply functions/Basics 2 Functions.r
no_license
AyubQuadri/Data-Science-Sessions
R
false
false
4,095
r
## functions in R " function_name <- function(arg_1, arg_2, ...) { Function body } " #Built-in #To calculate sum of numbers in R v<-c(1,2,3,4,5) #return the sum of the numbers in v sum(v) #returns the average value of the numbers in v mean(v) ##Custom functions #To write a cu...
####this script is to read new file and update the data library(lubridate);library(shiny) library(data.table) library(ggplot2) library(dplyr) library(curl) ####update data allData <- fread( "https://www.dropbox.com/s/ngaexvxlazshb0j/allData.csv?dl=1") allData$dates <- as.POSIXct(allData$dates) # allData$longName[wh...
/shinyApp/updateData.r
no_license
ForModLabUHel/valeDaLama
R
false
false
796
r
####this script is to read new file and update the data library(lubridate);library(shiny) library(data.table) library(ggplot2) library(dplyr) library(curl) ####update data allData <- fread( "https://www.dropbox.com/s/ngaexvxlazshb0j/allData.csv?dl=1") allData$dates <- as.POSIXct(allData$dates) # allData$longName[wh...
#ui.R ui <- fluidPage( titlePanel("Wine Quality"), sidebarPanel( helpText("Show the information of chemical properties of wine."), selectInput("Var", label = "Choose a variable to display :", choices = c("Distribution of All Variables","Correlation","Outliers"...
/Data Mining Part 1/ui.R
no_license
playnice/Data-Mining-Project
R
false
false
427
r
#ui.R ui <- fluidPage( titlePanel("Wine Quality"), sidebarPanel( helpText("Show the information of chemical properties of wine."), selectInput("Var", label = "Choose a variable to display :", choices = c("Distribution of All Variables","Correlation","Outliers"...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utility_functions.R \name{deleteAnalysis} \alias{deleteAnalysis} \title{Delete Analysis} \usage{ deleteAnalysis(object, which.assay, which.analysis, verbose = TRUE) } \arguments{ \item{object}{calibration object} \item{which.assay}{specifies...
/man/deleteAnalysis.Rd
permissive
BWillieLab/XcalRep
R
false
true
500
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utility_functions.R \name{deleteAnalysis} \alias{deleteAnalysis} \title{Delete Analysis} \usage{ deleteAnalysis(object, which.assay, which.analysis, verbose = TRUE) } \arguments{ \item{object}{calibration object} \item{which.assay}{specifies...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/knutils.R \name{slimknclusters} \alias{slimknclusters} \title{Remove overlapping clusters} \usage{ slimknclusters(d, knresults, minsize = 1) } \arguments{ \item{d}{Data.frame with data used in the detection of clusters.} \item{knresults}{Obj...
/man/slimknclusters.Rd
no_license
cran/DClusterm
R
false
true
853
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/knutils.R \name{slimknclusters} \alias{slimknclusters} \title{Remove overlapping clusters} \usage{ slimknclusters(d, knresults, minsize = 1) } \arguments{ \item{d}{Data.frame with data used in the detection of clusters.} \item{knresults}{Obj...
testlist <- list(data = structure(c(3.94108708470682e-312, 1.72759795870984e-260, 4.94078866277842e+131, 7.00072806654748e-304, 3.52953696509973e+30, 3.52959258041992e+30, 4.46014903970612e+43, 0), .Dim = c(1L, 8L)), q = 0) result <- do.call(biwavelet:::rcpp_row_quantile,testlist) str(result)
/biwavelet/inst/testfiles/rcpp_row_quantile/libFuzzer_rcpp_row_quantile/rcpp_row_quantile_valgrind_files/1610557035-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
296
r
testlist <- list(data = structure(c(3.94108708470682e-312, 1.72759795870984e-260, 4.94078866277842e+131, 7.00072806654748e-304, 3.52953696509973e+30, 3.52959258041992e+30, 4.46014903970612e+43, 0), .Dim = c(1L, 8L)), q = 0) result <- do.call(biwavelet:::rcpp_row_quantile,testlist) str(result)
x<-1:10 x
/code.R
no_license
SabrinaGuy/productivitytools-0
R
false
false
10
r
x<-1:10 x
library(tidyverse) setwd('/Users/lancecundy/Documents/Research/Nielsen/EIS') mydata <- read.csv('UseData/SampleData.csv') # mydata %>% # group_by(household_code) %>% # count() %>% # ungroup() # # # For each household i, construct a gride of quantiles, /tau # # mydata.i <- mydata %>% # filter(household_cod...
/Code/identification_covariates.R
no_license
lancecundy/EIS
R
false
false
6,511
r
library(tidyverse) setwd('/Users/lancecundy/Documents/Research/Nielsen/EIS') mydata <- read.csv('UseData/SampleData.csv') # mydata %>% # group_by(household_code) %>% # count() %>% # ungroup() # # # For each household i, construct a gride of quantiles, /tau # # mydata.i <- mydata %>% # filter(household_cod...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataHelp.R \docType{data} \name{colorectalLongi} \alias{colorectalLongi} \title{Follow-up of metastatic colorectal cancer patients : longitudinal measurements of tumor size} \format{ This data frame contains the following columns: \de...
/man/colorectalLongi.Rd
no_license
cran/frailtypack
R
false
true
2,251
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataHelp.R \docType{data} \name{colorectalLongi} \alias{colorectalLongi} \title{Follow-up of metastatic colorectal cancer patients : longitudinal measurements of tumor size} \format{ This data frame contains the following columns: \de...
#' Chainable View #' #' A View that doesn't break a pipeline. Same thing as \code{utils::View()}, but returns the original data object invisibly to allow putting view commands anywhere in a pipeline. This also allows for adding a view command at the end of pipelines while also assigning the data object the pipeline ret...
/R/view.R
permissive
Paul-James/pjames
R
false
false
1,266
r
#' Chainable View #' #' A View that doesn't break a pipeline. Same thing as \code{utils::View()}, but returns the original data object invisibly to allow putting view commands anywhere in a pipeline. This also allows for adding a view command at the end of pipelines while also assigning the data object the pipeline ret...
# Here starts my R excercise ## H1
/SRC/analysis.R
permissive
FrankINBO/testfile
R
false
false
36
r
# Here starts my R excercise ## H1
#The deforestation in the dry tropical forests of Mato Grosso (NT0140) and the correlation with the increase in coverage to an agricultural one in Brazil 🏞️↪️🌾 #install.packages() is a function which download and install packages from CRAN-like repositories or from local files #The first package to install is raste...
/R_code_land_cover.r
no_license
AndreaCapponi/telerilevamento_2021
R
false
false
20,262
r
#The deforestation in the dry tropical forests of Mato Grosso (NT0140) and the correlation with the increase in coverage to an agricultural one in Brazil 🏞️↪️🌾 #install.packages() is a function which download and install packages from CRAN-like repositories or from local files #The first package to install is raste...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/genomation-classes.R \docType{class} \name{ScoreMatrixList-class} \alias{ScoreMatrixList-class} \title{An S4 class for storing a set of \code{ScoreMatrixList}} \description{ The resulting object is an extension of a \code{list} object, where ...
/man/ScoreMatrixList-class.Rd
no_license
katwre/genomation
R
false
true
996
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/genomation-classes.R \docType{class} \name{ScoreMatrixList-class} \alias{ScoreMatrixList-class} \title{An S4 class for storing a set of \code{ScoreMatrixList}} \description{ The resulting object is an extension of a \code{list} object, where ...
##Section: 3.1.4 Page No.:133 ##pnorm: Cumulative distribution function EdwardScore=1400 percentile=pnorm(1400,mean=1500,sd=300)*100 cat("Edward's percentile is",percentile)
/Distribution of random variables/Ex3_11.R
no_license
thesaltree/TBC_R
R
false
false
181
r
##Section: 3.1.4 Page No.:133 ##pnorm: Cumulative distribution function EdwardScore=1400 percentile=pnorm(1400,mean=1500,sd=300)*100 cat("Edward's percentile is",percentile)
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584303941804e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual_...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615768575-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
362
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584303941804e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wafregional_operations.R \name{wafregional_delete_size_constraint_set} \alias{wafregional_delete_size_constraint_set} \title{Permanently deletes a SizeConstraintSet} \usage{ wafregional_delete_size_constraint_set(SizeConstraintSetId, ChangeTo...
/cran/paws.security.identity/man/wafregional_delete_size_constraint_set.Rd
permissive
peoplecure/paws
R
false
true
1,826
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wafregional_operations.R \name{wafregional_delete_size_constraint_set} \alias{wafregional_delete_size_constraint_set} \title{Permanently deletes a SizeConstraintSet} \usage{ wafregional_delete_size_constraint_set(SizeConstraintSetId, ChangeTo...
#!/usr/bin/env Rscript DATAPATH <- Sys.getenv("DATAPATH") #R commands and output: ## Input data. x = c(-1.40, -0.44, -0.30, -0.24, -0.22, -0.13, -0.05, 0.06, 0.10, 0.18, 0.20, 0.39, 0.48, 0.63, 1.01) ## Specify k, the number of outliers being tested. k = 2 ## Generate normal probability plot. qqnor...
/03/xx/01-r/1_eda_explore/eda35h2_Tietjen-Moore_Test_for_Outliers.r
no_license
microgenios/cod
R
false
false
1,172
r
#!/usr/bin/env Rscript DATAPATH <- Sys.getenv("DATAPATH") #R commands and output: ## Input data. x = c(-1.40, -0.44, -0.30, -0.24, -0.22, -0.13, -0.05, 0.06, 0.10, 0.18, 0.20, 0.39, 0.48, 0.63, 1.01) ## Specify k, the number of outliers being tested. k = 2 ## Generate normal probability plot. qqnor...
library(tolerance) ### Name: normtol.int ### Title: Normal (or Log-Normal) Tolerance Intervals ### Aliases: normtol.int ### Keywords: file ### ** Examples ## 95%/95% 2-sided normal tolerance intervals for a sample ## of size 100. set.seed(100) x <- rnorm(100, 0, 0.2) out <- normtol.int(x = x, alpha = 0.05, P = 0...
/data/genthat_extracted_code/tolerance/examples/normtolint.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
477
r
library(tolerance) ### Name: normtol.int ### Title: Normal (or Log-Normal) Tolerance Intervals ### Aliases: normtol.int ### Keywords: file ### ** Examples ## 95%/95% 2-sided normal tolerance intervals for a sample ## of size 100. set.seed(100) x <- rnorm(100, 0, 0.2) out <- normtol.int(x = x, alpha = 0.05, P = 0...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distFuncs.R \name{binPDF} \alias{binPDF} \title{Probability mass function for binomial distribution} \usage{ binPDF(x, mu, var) } \arguments{ \item{x}{numeric, quantile} \item{mu}{numeric, mean} \item{var}{numeric, variance} } \value{ numer...
/man/binPDF.Rd
no_license
duncanrellis/SawTooth
R
false
true
447
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/distFuncs.R \name{binPDF} \alias{binPDF} \title{Probability mass function for binomial distribution} \usage{ binPDF(x, mu, var) } \arguments{ \item{x}{numeric, quantile} \item{mu}{numeric, mean} \item{var}{numeric, variance} } \value{ numer...
# Copyright 2014 Revolution Analytics # # 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...
/R/utils.R
no_license
orenov/ravro
R
false
false
2,965
r
# Copyright 2014 Revolution Analytics # # 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...
#R-script to analyze DNA-rmsd evolution library(ggplot2) library(fitdistrplus) library(gtools) library(png) library(grid) library(reshape2) library(gridExtra) library(plyr) #dfcryst$X<-as.factor(dfcryst$X) dna_prot<-read.csv('../analysis_data/dna_prot_raw_df.csv') rr<-read.csv('../analysis_data/resid_resname_df.csv'...
/MD/NAMD/nucl/nucleosome_CHARMM/simul/analysis_scripts_link_zw/pub_int_dna_anch_dyn.r
no_license
TienMPhan/MolModEdu
R
false
false
11,986
r
#R-script to analyze DNA-rmsd evolution library(ggplot2) library(fitdistrplus) library(gtools) library(png) library(grid) library(reshape2) library(gridExtra) library(plyr) #dfcryst$X<-as.factor(dfcryst$X) dna_prot<-read.csv('../analysis_data/dna_prot_raw_df.csv') rr<-read.csv('../analysis_data/resid_resname_df.csv'...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/large_intestine.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.3,family="gaussian",standardize=TRUE) sink('./large_intestine_041.txt'...
/Model/EN/AvgRank/large_intestine/large_intestine_041.R
no_license
esbgkannan/QSMART
R
false
false
363
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/large_intestine.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.3,family="gaussian",standardize=TRUE) sink('./large_intestine_041.txt'...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{pval_plot} \alias{pval_plot} \title{Plot one-tailed p-values} \usage{ pval_plot(yi, vi, sei, alpha_select = 0.05) } \arguments{ \item{yi}{A vector of point estimates to be meta-analyzed. The signs of the estimates should be chos...
/man/pval_plot.Rd
no_license
cran/PublicationBias
R
false
true
1,825
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{pval_plot} \alias{pval_plot} \title{Plot one-tailed p-values} \usage{ pval_plot(yi, vi, sei, alpha_select = 0.05) } \arguments{ \item{yi}{A vector of point estimates to be meta-analyzed. The signs of the estimates should be chos...
source("loadData.R") data <- loadData("1/2/2007", "2/2/2007") ### plot1 par(mfrow = c(1, 1), mar = c(5, 4, 4, 2)) hist(data[,3], col = "red", main ="Global reactive power" , xlab = "Global reactive power (kilowatts)") dev.copy(png, file = "plot1.png", width=480, height=480) dev.off()
/CourseProject1/plot1.R
no_license
togop/ExData_Plotting1
R
false
false
295
r
source("loadData.R") data <- loadData("1/2/2007", "2/2/2007") ### plot1 par(mfrow = c(1, 1), mar = c(5, 4, 4, 2)) hist(data[,3], col = "red", main ="Global reactive power" , xlab = "Global reactive power (kilowatts)") dev.copy(png, file = "plot1.png", width=480, height=480) dev.off()
# Fazendo Previsoes # ***** Esta é a versão 2.0 deste script, atualizado em 23/05/2017 ***** # ***** Esse script pode ser executado nas versões 3.3.1, 3.3.2, 3.3.3 e 3.4.0 da linguagem R ***** # ***** Recomendamos a utilização da versão 3.4.0 da linguagem R ***** # Configurando o diretório de trabalho # Coloque entre...
/RFundamentos/Part 11/05-ScoreModel.R
no_license
DaniloLFaria/DataScienceAcademy
R
false
false
792
r
# Fazendo Previsoes # ***** Esta é a versão 2.0 deste script, atualizado em 23/05/2017 ***** # ***** Esse script pode ser executado nas versões 3.3.1, 3.3.2, 3.3.3 e 3.4.0 da linguagem R ***** # ***** Recomendamos a utilização da versão 3.4.0 da linguagem R ***** # Configurando o diretório de trabalho # Coloque entre...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/calcWatZ.R \name{calcWatZ.gmacs} \alias{calcWatZ.gmacs} \title{Calculate weight-at-size by year, sex} \usage{ calcWatZ.gmacs(mc, showPlot = TRUE) } \arguments{ \item{mc}{- model configuration object} } \value{ W_yxmsz: 5d array with w...
/man/calcWatZ.gmacs.Rd
permissive
seacode/rsimGmacs
R
false
false
397
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/calcWatZ.R \name{calcWatZ.gmacs} \alias{calcWatZ.gmacs} \title{Calculate weight-at-size by year, sex} \usage{ calcWatZ.gmacs(mc, showPlot = TRUE) } \arguments{ \item{mc}{- model configuration object} } \value{ W_yxmsz: 5d array with w...
library(gMCP) ### Name: weighted.test.functions ### Title: Weighted Test Functions for use with gMCP ### Aliases: weighted.test.functions ### ** Examples # The test function 'bonferroni.test' is used in by gMCP in the following call: graph <- BonferroniHolm(4) pvalues <- c(0.01, 0.05, 0.03, 0.02) alpha <- 0.05 r <...
/data/genthat_extracted_code/gMCP/examples/weighted.test.functions.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
862
r
library(gMCP) ### Name: weighted.test.functions ### Title: Weighted Test Functions for use with gMCP ### Aliases: weighted.test.functions ### ** Examples # The test function 'bonferroni.test' is used in by gMCP in the following call: graph <- BonferroniHolm(4) pvalues <- c(0.01, 0.05, 0.03, 0.02) alpha <- 0.05 r <...
library(ggplot2) library(data.table) library(stringr) library(dplyr) #----------------------------- Wine Pairings: R code and Data Visualizations --------------------------# #use file.choose to find the file association_rules <- fread(file.choose()) #Pulls the food and wine names out, drops the unformatt...
/Data_Visualizations_Code.R
no_license
chelynl/Association_Analysis
R
false
false
3,753
r
library(ggplot2) library(data.table) library(stringr) library(dplyr) #----------------------------- Wine Pairings: R code and Data Visualizations --------------------------# #use file.choose to find the file association_rules <- fread(file.choose()) #Pulls the food and wine names out, drops the unformatt...
#' German credit dataset dictionary. #' #' This dataset can be used to build credit risk models #' There is enough observations and variables to analyze #' #' @format A data frame with 1000 rows and 21 variables: #' \describe{ #' \item{Creditability}{Response variable 0=Bad, 1=Good} #' ... #' } #' All other variabl...
/unobankproject/R/data.R
no_license
arunkumar4all/unobankproject
R
false
false
448
r
#' German credit dataset dictionary. #' #' This dataset can be used to build credit risk models #' There is enough observations and variables to analyze #' #' @format A data frame with 1000 rows and 21 variables: #' \describe{ #' \item{Creditability}{Response variable 0=Bad, 1=Good} #' ... #' } #' All other variabl...
#=============================================================================# # Name : cropZone # Author : Jorge Flores # Date : # Version: # Aim : # URL : #=============================================================================# cropZone <- function( input_path, output_path = input_path, patt...
/cropZone.R
no_license
NilsTeilher/chl_sat
R
false
false
2,570
r
#=============================================================================# # Name : cropZone # Author : Jorge Flores # Date : # Version: # Aim : # URL : #=============================================================================# cropZone <- function( input_path, output_path = input_path, patt...
#用来获取alluvial作图的数据 get_alluvial.data <- function(group){ #group = "COPD_smoker" query = paste0(" MATCH (A:Genes) return A.Symbols AS gene, A.",group,"_M0_module, A.",group,"_M3_module, A.",group,"_M6_module, A.",group,"_M12_mod...
/copd-shiny-docker/copd_shiny/FUNCTION/get_alluvial.data.R
no_license
xiaowei3223/docker_build
R
false
false
1,254
r
#用来获取alluvial作图的数据 get_alluvial.data <- function(group){ #group = "COPD_smoker" query = paste0(" MATCH (A:Genes) return A.Symbols AS gene, A.",group,"_M0_module, A.",group,"_M3_module, A.",group,"_M6_module, A.",group,"_M12_mod...
## rankall.R ## ## Bob George https://github.com/rwgeorge ############################################################################### ## Coursera R Programming (rprog-011) ## Assignment 3: Hospital Quality ## https://github.com/rwgeorge/ProgrammingAssignment3 #######################################################...
/rankall.R
no_license
rwgeorge/ProgrammingAssignment3
R
false
false
2,510
r
## rankall.R ## ## Bob George https://github.com/rwgeorge ############################################################################### ## Coursera R Programming (rprog-011) ## Assignment 3: Hospital Quality ## https://github.com/rwgeorge/ProgrammingAssignment3 #######################################################...
#' All dependencies for the material design packages #' #' \code{rt.setup} #' #' Read all of the dependency index tables and externals into the package #' data folder for package build and function dependency requirements. #' #' #' #' @aliases \code{mtrl.setup} #' #' rt.setup <- function(add_res = NULL){ base <- 'htt...
/R/rt_depends.R
no_license
Rterial/rtIcons
R
false
false
1,893
r
#' All dependencies for the material design packages #' #' \code{rt.setup} #' #' Read all of the dependency index tables and externals into the package #' data folder for package build and function dependency requirements. #' #' #' #' @aliases \code{mtrl.setup} #' #' rt.setup <- function(add_res = NULL){ base <- 'htt...
source("utils.R") # Remove Expired Files ---------------------------------------------------- idx_old <- list.files("messages/", full.names = TRUE) %>% lapply(function (x) file.mtime(x) < (Sys.Date()-5)) %>% do.call(rbind, .) list.files("messages/", full.names = TRUE)[idx_old] %>% file.remove() idx_old...
/src/32_cleanup.R
no_license
re-tradr/mom_portfolio_builder
R
false
false
1,115
r
source("utils.R") # Remove Expired Files ---------------------------------------------------- idx_old <- list.files("messages/", full.names = TRUE) %>% lapply(function (x) file.mtime(x) < (Sys.Date()-5)) %>% do.call(rbind, .) list.files("messages/", full.names = TRUE)[idx_old] %>% file.remove() idx_old...
rm(list = ls()) library("dplyr") library("readr") library("httr") library("rvest") library("geojsonio") map <- "https://raw.githubusercontent.com/johan/world.geo.json/master/countries/AUS.geo.json" %>% GET() %>% content() %>% jsonlite::fromJSON(simplifyVector = FALSE) # http://openflights.org/dat...
/devscripts/highmaps2.R
no_license
APKBridget/highcharter
R
false
false
1,539
r
rm(list = ls()) library("dplyr") library("readr") library("httr") library("rvest") library("geojsonio") map <- "https://raw.githubusercontent.com/johan/world.geo.json/master/countries/AUS.geo.json" %>% GET() %>% content() %>% jsonlite::fromJSON(simplifyVector = FALSE) # http://openflights.org/dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/metaPvalues.R \name{metaPvalues} \alias{metaPvalues} \title{Meta-analysis of p-values} \usage{ metaPvalues(x) } \arguments{ \item{x}{a \code{dsOmics} object obtained from \code{ds.limma}, \code{ds.GWAS} or \code{ds.PLINK} functions applied o ...
/man/metaPvalues.Rd
permissive
isglobal-brge/dsOmicsClient
R
false
true
537
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/metaPvalues.R \name{metaPvalues} \alias{metaPvalues} \title{Meta-analysis of p-values} \usage{ metaPvalues(x) } \arguments{ \item{x}{a \code{dsOmics} object obtained from \code{ds.limma}, \code{ds.GWAS} or \code{ds.PLINK} functions applied o ...
\name{kernelkc} \alias{kernelkc} \alias{kernelkcbase} \alias{getvolumeUDk} \alias{getvolumeUDs} \alias{getverticeshrk} \alias{getverticeshrs} \alias{exwc} \title{Kernel Smoothing in Space and Time of the Animals' Use of Space} \description{ These functions estimate the utilization distribution (UD) in space and tim...
/adehabitatHR/man/kernelkc.Rd
no_license
radfordneal/R-package-mods
R
false
false
16,304
rd
\name{kernelkc} \alias{kernelkc} \alias{kernelkcbase} \alias{getvolumeUDk} \alias{getvolumeUDs} \alias{getverticeshrk} \alias{getverticeshrs} \alias{exwc} \title{Kernel Smoothing in Space and Time of the Animals' Use of Space} \description{ These functions estimate the utilization distribution (UD) in space and tim...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TimeScale.r \name{TimeScale} \alias{TimeScale} \title{Time scale vector from 00:00:00 to 23:59:59.} \format{ A vector of characters with 86400 entries. } \description{ A vector of length 86400 containing the time scale characters fro...
/man/TimeScale.Rd
no_license
cran/ActivityIndex
R
false
true
350
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TimeScale.r \name{TimeScale} \alias{TimeScale} \title{Time scale vector from 00:00:00 to 23:59:59.} \format{ A vector of characters with 86400 entries. } \description{ A vector of length 86400 containing the time scale characters fro...
/* Hacks to match MacOS (most recent first): <Sys7.1> 8/3/92 Reverted <23>: restored '…' to About Keyboards strings. 9/2/94 SuperMario ROM source dump (header preserved below) */ /* File: International.r Contains: Rez-format international resources for the System file Written by: PKE Peter Edberg ...
/Toolbox/ScriptMgr/International.r
no_license
elliotnunn/sys7.1-doc-wip
R
false
false
31,323
r
/* Hacks to match MacOS (most recent first): <Sys7.1> 8/3/92 Reverted <23>: restored '…' to About Keyboards strings. 9/2/94 SuperMario ROM source dump (header preserved below) */ /* File: International.r Contains: Rez-format international resources for the System file Written by: PKE Peter Edberg ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gif.R \name{gif_plot} \alias{gif_plot} \title{Create a dynamic plot of fish detections} \usage{ gif_plot( sldf, detects, dir = "D:/Jordy/myplots/", extent = NA, type = "bing", darken = 2.5, col_by_fish = F, viterbi = F, widt...
/man/gif_plot.Rd
no_license
jBernardADFG/telprep
R
false
true
2,049
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gif.R \name{gif_plot} \alias{gif_plot} \title{Create a dynamic plot of fish detections} \usage{ gif_plot( sldf, detects, dir = "D:/Jordy/myplots/", extent = NA, type = "bing", darken = 2.5, col_by_fish = F, viterbi = F, widt...
source("A:/Machine_Learning/Basefolder/loadImage.R") ################################################################ # # Exercise 3.1.1 # # K-means clustering # ################################################################ ####### 1. Settings and preparation of training and test dataset ####### test_split=0.5 #h...
/Exercise3/exercise_3_1_nils.R
no_license
alkna13/SML
R
false
false
4,234
r
source("A:/Machine_Learning/Basefolder/loadImage.R") ################################################################ # # Exercise 3.1.1 # # K-means clustering # ################################################################ ####### 1. Settings and preparation of training and test dataset ####### test_split=0.5 #h...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tguh_decomp.R \name{tguh.decomp} \alias{tguh.decomp} \title{The Tail-Greedy Unbalanced Haar decomposition of a vector} \usage{ tguh.decomp(x, p = 0.01) } \arguments{ \item{x}{A vector you wish to decompose.} \item{p}{Specifies the number of ...
/man/tguh.decomp.Rd
no_license
ChuangWan/breakfast
R
false
true
1,804
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tguh_decomp.R \name{tguh.decomp} \alias{tguh.decomp} \title{The Tail-Greedy Unbalanced Haar decomposition of a vector} \usage{ tguh.decomp(x, p = 0.01) } \arguments{ \item{x}{A vector you wish to decompose.} \item{p}{Specifies the number of ...
testlist <- list(data = structure(c(4.84032536919862e-305, -1.867860512298e-35, 6.95335580788505e-310, -1.867860512298e-35, 4.61321311777405e-104 ), .Dim = c(1L, 5L)), q = -1.85984411421057e-35) result <- do.call(biwavelet:::rcpp_row_quantile,testlist) str(result)
/biwavelet/inst/testfiles/rcpp_row_quantile/libFuzzer_rcpp_row_quantile/rcpp_row_quantile_valgrind_files/1610556993-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
265
r
testlist <- list(data = structure(c(4.84032536919862e-305, -1.867860512298e-35, 6.95335580788505e-310, -1.867860512298e-35, 4.61321311777405e-104 ), .Dim = c(1L, 5L)), q = -1.85984411421057e-35) result <- do.call(biwavelet:::rcpp_row_quantile,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binarize.R \name{binarize} \alias{binarize} \title{Binarize digital PCR data} \usage{ binarize(input) } \arguments{ \item{input}{object of the class \code{\linkS4class{adpcr}} or \code{\linkS4class{dpcr}} with one of following types:\code{"ct...
/man/binarize.Rd
no_license
gaoce/dpcR
R
false
true
940
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binarize.R \name{binarize} \alias{binarize} \title{Binarize digital PCR data} \usage{ binarize(input) } \arguments{ \item{input}{object of the class \code{\linkS4class{adpcr}} or \code{\linkS4class{dpcr}} with one of following types:\code{"ct...
#https://ntguardian.wordpress.com/2017/03/27/introduction-stock-market-data-r-1/ #Stock Analysis # Get quantmod if (!require("quantmod")) { install.packages("quantmod") library(quantmod) } start <- as.Date("2018-01-01") end <- as.Date("2018-12-01") # Let's get Apple stock data; Apple's ticker symbol is AAPL. W...
/01-IIM/77a5-FA-quantmod.R
no_license
DUanalytics/rAnalytics
R
false
false
3,748
r
#https://ntguardian.wordpress.com/2017/03/27/introduction-stock-market-data-r-1/ #Stock Analysis # Get quantmod if (!require("quantmod")) { install.packages("quantmod") library(quantmod) } start <- as.Date("2018-01-01") end <- as.Date("2018-12-01") # Let's get Apple stock data; Apple's ticker symbol is AAPL. W...
#### ## ## name: 06-assessClassifiers.R ## date: 2017-01-26 ## what: this assesses various classifers ## #### setwd("F:/Dropbox/FSU/FSU_Fall_2017/Paper_2/Measure/") cat("06: now assessing classifiers.\n") source("fn-ccodeCleaner.R") #### packages #### library(dplyr) library(tidyr) library(data...
/Scripts/06-assessClassifers_update.R
no_license
phenrickson/threats
R
false
false
16,050
r
#### ## ## name: 06-assessClassifiers.R ## date: 2017-01-26 ## what: this assesses various classifers ## #### setwd("F:/Dropbox/FSU/FSU_Fall_2017/Paper_2/Measure/") cat("06: now assessing classifiers.\n") source("fn-ccodeCleaner.R") #### packages #### library(dplyr) library(tidyr) library(data...
# ************************************************** # Condições iniciais # ************************************************** N0 <- 1000 # População inicial rate_A <- 1.2 # Taxa de crescimento do alelo "A" rate_a <- 1.2 # Taxa de crescimento do alelo "a" fA <- 0.3 # Frequência do alelo "A" max_gen <- 2...
/evosimu.r
no_license
Squiercg/recologia
R
false
false
5,175
r
# ************************************************** # Condições iniciais # ************************************************** N0 <- 1000 # População inicial rate_A <- 1.2 # Taxa de crescimento do alelo "A" rate_a <- 1.2 # Taxa de crescimento do alelo "a" fA <- 0.3 # Frequência do alelo "A" max_gen <- 2...
#' y_probs #' #' Detection history probabilities, given model parameters #' @param psi Predicted route-level occupancy #' @param xpsi spatial correlation parameters #' @param p detection probability #' @export y_probs <- function(psi, xpsi, p){ pi <- xpsi[1] / (xpsi[1] + 1 - xpsi[2]) pr_y1 <- pi pr_y0 <- 1 - pi ...
/R/y_probs.R
no_license
crushing05/BayesCorrOcc
R
false
false
16,903
r
#' y_probs #' #' Detection history probabilities, given model parameters #' @param psi Predicted route-level occupancy #' @param xpsi spatial correlation parameters #' @param p detection probability #' @export y_probs <- function(psi, xpsi, p){ pi <- xpsi[1] / (xpsi[1] + 1 - xpsi[2]) pr_y1 <- pi pr_y0 <- 1 - pi ...
oliveOil <- read.csv("https://www.scss.tcd.ie/~arwhite/Teaching/STU33011/olive.csv") x = oliveOil[ ,3:10] library(mclust) ?mclust plot(Mclust(faithful)) ## Get 4 options # 1: Want to optimize BIC for this version, so higher value better ( Note Different signs in lecture notes) # 2: fit = Mclust(faithful) fit ##Tells y...
/MvLa Further Clustering Methods.R
no_license
haskinsm/R-projects
R
false
false
887
r
oliveOil <- read.csv("https://www.scss.tcd.ie/~arwhite/Teaching/STU33011/olive.csv") x = oliveOil[ ,3:10] library(mclust) ?mclust plot(Mclust(faithful)) ## Get 4 options # 1: Want to optimize BIC for this version, so higher value better ( Note Different signs in lecture notes) # 2: fit = Mclust(faithful) fit ##Tells y...
# various utility functions # # peter d smits # psmits@uchicago.edu ############################################################################### library(pacman) p_load(caret) data.maker <- function(gr, data, p = 0.75) { nd <- data[, colnames(data) %in% gr] out <- apply(nd, 2, createDataPartition, ...
/R/helper07_support_functions.r
no_license
psmits/shape_identification
R
false
false
1,686
r
# various utility functions # # peter d smits # psmits@uchicago.edu ############################################################################### library(pacman) p_load(caret) data.maker <- function(gr, data, p = 0.75) { nd <- data[, colnames(data) %in% gr] out <- apply(nd, 2, createDataPartition, ...
library(lubridate) setwd("~/R") ## download the data zip file and unzips it file_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(file_url, "dataset.zip") unzip("dataset.zip") ## reads the data file and chooses the records belonging to the speci...
/plot3.R
no_license
sypdatame/ExData_Plotting1
R
false
false
1,403
r
library(lubridate) setwd("~/R") ## download the data zip file and unzips it file_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(file_url, "dataset.zip") unzip("dataset.zip") ## reads the data file and chooses the records belonging to the speci...
library(Rnightlights) ### Name: ctryShpLyrName2Num ### Title: Get the integer number of the layer. ### Aliases: ctryShpLyrName2Num ### ** Examples ## Not run: ##D Rnightlights:::ctryShpLyrName2Num("KEN", "KEN_adm1") #returns 1 ## End(Not run)
/data/genthat_extracted_code/Rnightlights/examples/ctryShpLyrName2Num.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
254
r
library(Rnightlights) ### Name: ctryShpLyrName2Num ### Title: Get the integer number of the layer. ### Aliases: ctryShpLyrName2Num ### ** Examples ## Not run: ##D Rnightlights:::ctryShpLyrName2Num("KEN", "KEN_adm1") #returns 1 ## End(Not run)
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/find_dp_cautious.R \name{find_dp_cautious} \alias{find_dp_cautious} \title{Identify the best policy which harvests at P percent of optimum harvest} \usage{ find_dp_cautious(SDP_Mat, x_grid, h_grid, OptTime, xT, profit, delta, reward...
/man/find_dp_cautious.Rd
permissive
cboettig/pdg_control
R
false
false
1,419
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/find_dp_cautious.R \name{find_dp_cautious} \alias{find_dp_cautious} \title{Identify the best policy which harvests at P percent of optimum harvest} \usage{ find_dp_cautious(SDP_Mat, x_grid, h_grid, OptTime, xT, profit, delta, reward...
# This file contains all the helper funcitons that the outer exported # functions utilize. I try to have a pr at the start of the name for all # the private functions. # # Author: max ############################################################################### #' Looks for unique rowname match without grep #' #' Si...
/R/private_functions.R
no_license
guhjy/Greg
R
false
false
26,802
r
# This file contains all the helper funcitons that the outer exported # functions utilize. I try to have a pr at the start of the name for all # the private functions. # # Author: max ############################################################################### #' Looks for unique rowname match without grep #' #' Si...
\name{string.to.colors} \alias{string.to.color} \alias{string.to.colors} \alias{stringToColors} \alias{stringtocolor} \title{Convert between strings to colors} \usage{ string.to.colors(string, colors = NULL) } \arguments{ \item{string}{a vector of strings representing groups.} \item{colors}{a vector of colors, o...
/man/string.to.colors.Rd
no_license
mrdwab/fifer
R
false
false
970
rd
\name{string.to.colors} \alias{string.to.color} \alias{string.to.colors} \alias{stringToColors} \alias{stringtocolor} \title{Convert between strings to colors} \usage{ string.to.colors(string, colors = NULL) } \arguments{ \item{string}{a vector of strings representing groups.} \item{colors}{a vector of colors, o...
## Test rootograms() and related residuals functions ## load packages library("testthat") library("gratia") library("mgcv") ## Need a local wrapper to allow conditional use of vdiffr `expect_doppelganger` <- function(title, fig, ...) { testthat::skip_if_not_installed("vdiffr") vdiffr::expect_doppelganger(title, f...
/tests/testthat/test-rootograms.R
permissive
Memo1986/gratia
R
false
false
1,747
r
## Test rootograms() and related residuals functions ## load packages library("testthat") library("gratia") library("mgcv") ## Need a local wrapper to allow conditional use of vdiffr `expect_doppelganger` <- function(title, fig, ...) { testthat::skip_if_not_installed("vdiffr") vdiffr::expect_doppelganger(title, f...
# Part of R package 'stabledist' (part of the Rmetrics project). ## The stabledist R package is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) a...
/pkg/stabledist/R/dpqr-stable.R
no_license
xashely/rmetrics
R
false
false
33,303
r
# Part of R package 'stabledist' (part of the Rmetrics project). ## The stabledist R package is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) a...
works_with_R("3.2.0", ggplot2="1.0", dplyr="0.4.0") load("cheating.error.RData") load("step1.error.RData") load("step2.error.RData") load("weighted.error.RData") PeakSeg.results <- read.csv("PeakSeg-results.csv") %>% filter(learning != "unsupervised") %>% filter(!grepl("oracle.[13]", algo...
/figure-test-error-dots.R
no_license
tdhock/PeakSegJoint-paper
R
false
false
4,809
r
works_with_R("3.2.0", ggplot2="1.0", dplyr="0.4.0") load("cheating.error.RData") load("step1.error.RData") load("step2.error.RData") load("weighted.error.RData") PeakSeg.results <- read.csv("PeakSeg-results.csv") %>% filter(learning != "unsupervised") %>% filter(!grepl("oracle.[13]", algo...
context("A made-up context") test_that("1 + 1 = 2", { expect_equal(1 + 1, 2) })
/tests/testthat/test-something.R
no_license
pbs-assess/tmbpop
R
false
false
83
r
context("A made-up context") test_that("1 + 1 = 2", { expect_equal(1 + 1, 2) })
# s.XGB.R # ::rtemis:: # 2016 Efstathios D. Gennatas egenn.lambdamd.org # TODO: check if all objective functions must be minimized, or change which.min to variable # TODO: weights and ipw do not seem to work, upsample works, check weights passing # and add scale_pos_weight # TODO: change fittedClass.raw to fitted.prob ...
/R/s.XGB.R
no_license
zeta1999/rtemis
R
false
false
28,014
r
# s.XGB.R # ::rtemis:: # 2016 Efstathios D. Gennatas egenn.lambdamd.org # TODO: check if all objective functions must be minimized, or change which.min to variable # TODO: weights and ipw do not seem to work, upsample works, check weights passing # and add scale_pos_weight # TODO: change fittedClass.raw to fitted.prob ...
# working with text, combining and splitting. # sprintf and paste. paste('hello', 'Jared', 'and others') paste('hello', 'Jared', 'and others', sep = '/') paste(c('Hello', 'Hey', 'Howdy'), c('Jared', 'Bob', 'David')) paste(c('Hello', 'Hey', 'Howdy'), c('Jared', 'Bob', 'David'), sep = ', ') paste('Hello',...
/combine_strings.r
no_license
kimalaacer/Tutorial-on-R
R
false
false
5,569
r
# working with text, combining and splitting. # sprintf and paste. paste('hello', 'Jared', 'and others') paste('hello', 'Jared', 'and others', sep = '/') paste(c('Hello', 'Hey', 'Howdy'), c('Jared', 'Bob', 'David')) paste(c('Hello', 'Hey', 'Howdy'), c('Jared', 'Bob', 'David'), sep = ', ') paste('Hello',...
\name{tdeath_other} \alias{tdeath_other} \title{Predict the age at death from a cause other than lung cancer } \description{Function to predict the age (years) at which a person may die from a cause other than lung cancer given age, gender and smoking intensity, when relevant. } \usage{ tdeath_other(u1, u2, stat...
/man/tdeath_other.Rd
no_license
Qingys/MILC_backup
R
false
false
1,798
rd
\name{tdeath_other} \alias{tdeath_other} \title{Predict the age at death from a cause other than lung cancer } \description{Function to predict the age (years) at which a person may die from a cause other than lung cancer given age, gender and smoking intensity, when relevant. } \usage{ tdeath_other(u1, u2, stat...
fct_count <- function(f, sort = FALSE, prop = FALSE) { f2 <- check_factor(f) n_na <- sum(is.na(f)) df <- tibble::tibble( f = fct_inorder(c(levels(f2), if (n_na > 0) NA)), n = c(tabulate(f2, nlevels(f)), if (n_na > 0) n_na) ) if (sort) { df <- df[order(df$n, decreasing = TRUE), ] } if (prop)...
/R/count.R
no_license
sindribaldur/poorcats
R
false
false
364
r
fct_count <- function(f, sort = FALSE, prop = FALSE) { f2 <- check_factor(f) n_na <- sum(is.na(f)) df <- tibble::tibble( f = fct_inorder(c(levels(f2), if (n_na > 0) NA)), n = c(tabulate(f2, nlevels(f)), if (n_na > 0) n_na) ) if (sort) { df <- df[order(df$n, decreasing = TRUE), ] } if (prop)...
mod <- "model{ # -------- Priors -------- for (s in 1:n_seasons){ # Iterate over the season for (x in 1:n_x_vals){ # Iterate over the constraint categories S4[s,x] ~ dbeta(1,1) # Non-informative Beta Prior for the Survival Probability in PWS S8[s,x] ~ dbeta(1,1) # Non-informative Beta Prior for the Surv...
/R and JAGS Code Sample/JAGS.R
no_license
jordyBernard/herring
R
false
false
8,857
r
mod <- "model{ # -------- Priors -------- for (s in 1:n_seasons){ # Iterate over the season for (x in 1:n_x_vals){ # Iterate over the constraint categories S4[s,x] ~ dbeta(1,1) # Non-informative Beta Prior for the Survival Probability in PWS S8[s,x] ~ dbeta(1,1) # Non-informative Beta Prior for the Surv...
\name{scoreOverlap} \alias{cluster.cor} \alias{scoreOverlap} \title{Find correlations of composite variables (corrected for overlap) from a larger matrix.} \description{ Given a n x c cluster definition matrix of -1s, 0s, and 1s (the keys) , and a n x n correlation matrix, or an N x n data matrix, find the correlatio...
/man/cluster.cor.Rd
no_license
canshot/psych
R
false
false
7,258
rd
\name{scoreOverlap} \alias{cluster.cor} \alias{scoreOverlap} \title{Find correlations of composite variables (corrected for overlap) from a larger matrix.} \description{ Given a n x c cluster definition matrix of -1s, 0s, and 1s (the keys) , and a n x n correlation matrix, or an N x n data matrix, find the correlatio...
library(shiny) library(data.table) data <- fread("ReshHF.csv", encoding = "Latin-1") ui3 <- fluidPage( headerPanel("NTR Test"), sidebarLayout( sidebarPanel( uiOutput("valgEnhet"), uiOutput("valgEnhetNavn"), checkboxInput("compare", "Sammenligne med hele landet") ), mainPanel( ...
/publicapp/valgEnhet.R
no_license
ybkamaleri/traume
R
false
false
916
r
library(shiny) library(data.table) data <- fread("ReshHF.csv", encoding = "Latin-1") ui3 <- fluidPage( headerPanel("NTR Test"), sidebarLayout( sidebarPanel( uiOutput("valgEnhet"), uiOutput("valgEnhetNavn"), checkboxInput("compare", "Sammenligne med hele landet") ), mainPanel( ...
## Caching the Inverse of a Matrix: ## Matrix inversion is usually a costly computation and there may be some ## benefit to caching the inverse of a matrix rather than compute it repeatedly. ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { ...
/cachematrix.R
no_license
veronsj/ProgrammingAssignment2
R
false
false
1,059
r
## Caching the Inverse of a Matrix: ## Matrix inversion is usually a costly computation and there may be some ## benefit to caching the inverse of a matrix rather than compute it repeatedly. ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { ...
################################################################################ ## Ridge-augmented SCM ################################################################################ #' Ridge augmented weights (possibly with covariates) #' #' @param wide_data Output of `format_data` #' @param synth_data Output of `f...
/R/ridge.R
permissive
ebenmichael/augsynth
R
false
false
13,898
r
################################################################################ ## Ridge-augmented SCM ################################################################################ #' Ridge augmented weights (possibly with covariates) #' #' @param wide_data Output of `format_data` #' @param synth_data Output of `f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scales.R \name{as_scale} \alias{as_scale} \title{Convert variable to scale} \usage{ as_scale(var) } \arguments{ \item{var}{A \code{numeric} vector.} } \description{ Takes a character or factor variable and converts it to a factor with labels ...
/man/as_scale.Rd
no_license
itsdalmo/reporttoolDT
R
false
true
743
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scales.R \name{as_scale} \alias{as_scale} \title{Convert variable to scale} \usage{ as_scale(var) } \arguments{ \item{var}{A \code{numeric} vector.} } \description{ Takes a character or factor variable and converts it to a factor with labels ...
# Processing output ################### require(ggplot2) require(dplyr) # results <- read.csv("C:/Users/q19r165/Desktop/Model_Repo/25SSmod_pred.csv") plot_results <- function(results, conf.from, conf.to, length){ conf <- seq(conf.from, conf.to, length.out = length) right <- rep(NA, length) proportion <- rep(NA,...
/model_output_processing.R
no_license
will-rogers/Machine-Learning-ZCP
R
false
false
2,053
r
# Processing output ################### require(ggplot2) require(dplyr) # results <- read.csv("C:/Users/q19r165/Desktop/Model_Repo/25SSmod_pred.csv") plot_results <- function(results, conf.from, conf.to, length){ conf <- seq(conf.from, conf.to, length.out = length) right <- rep(NA, length) proportion <- rep(NA,...
# install.packages("qpcR") library(qpcR) # 1. 아리랑도서관 2020년 1월 추천도서 목록 csv 생성 arirang_list = readRDS('data/200103_19년12월_아리랑어린이도서관_인기도서별 추천도서 리스트.rds') arirang_df = data.frame(dummy=1:10) col_vec = c() for (tmp_list in arirang_list) { col_vec = c(col_vec, tmp_list$recommend_books[1]) arirang_df = qpcR:::cbind.na(a...
/200103_generateCSV_recommendList.R
no_license
sam351/Library_Book_Recommend
R
false
false
1,314
r
# install.packages("qpcR") library(qpcR) # 1. 아리랑도서관 2020년 1월 추천도서 목록 csv 생성 arirang_list = readRDS('data/200103_19년12월_아리랑어린이도서관_인기도서별 추천도서 리스트.rds') arirang_df = data.frame(dummy=1:10) col_vec = c() for (tmp_list in arirang_list) { col_vec = c(col_vec, tmp_list$recommend_books[1]) arirang_df = qpcR:::cbind.na(a...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dorem-package.R \docType{package} \name{dorem-package} \alias{dorem-package} \alias{_PACKAGE} \title{dorem: Dose Response Modeling} \description{ \if{html}{\figure{logo.png}{options: align='right' alt='logo' width='120'}} Understanding the e...
/man/dorem-package.Rd
permissive
mladenjovanovic/dorem
R
false
true
1,024
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dorem-package.R \docType{package} \name{dorem-package} \alias{dorem-package} \alias{_PACKAGE} \title{dorem: Dose Response Modeling} \description{ \if{html}{\figure{logo.png}{options: align='right' alt='logo' width='120'}} Understanding the e...
#' Get all releases of economic data #' #' @param realtime_start A `Date` indicating the start of the real-time period. #' Defaults to today's date. For more information, see #' [Real-Time Periods](https://research.stlouisfed.org/docs/api/fred/realtime_period.html). #' #' @param realtime_end A `Date` indicating the end...
/R/fredr_releases.R
no_license
tcweiss/fredr
R
false
false
2,099
r
#' Get all releases of economic data #' #' @param realtime_start A `Date` indicating the start of the real-time period. #' Defaults to today's date. For more information, see #' [Real-Time Periods](https://research.stlouisfed.org/docs/api/fred/realtime_period.html). #' #' @param realtime_end A `Date` indicating the end...
#ui.R require(shiny) require(shinydashboard) require(leaflet) dashboardPage( dashboardHeader(title="Final Project" ), dashboardSidebar( sidebarMenu( actionButton(inputId = "clicks1", label = "Update Data",width="100%"), menuItem("Non-Aggregate1", tabName = "Non-Aggregate1"), menuItem("Agg...
/04Shiny/UI.R
no_license
andrewnguyen42/DV_FinalProject
R
false
false
2,168
r
#ui.R require(shiny) require(shinydashboard) require(leaflet) dashboardPage( dashboardHeader(title="Final Project" ), dashboardSidebar( sidebarMenu( actionButton(inputId = "clicks1", label = "Update Data",width="100%"), menuItem("Non-Aggregate1", tabName = "Non-Aggregate1"), menuItem("Agg...
/Simulation_scripts/Table_2/BCT_tau_4.R
no_license
GFGhantous/Scripts
R
false
false
5,323
r
library(ggplot2) reddit <- read.csv("EDA_Course_Materials/lesson2/reddit.csv") str(reddit) levels(reddit$age.range) <- c("Under 18", "18-24", "25-34", "35-44", "45-54", "55-64", "65 or Above") qplot(reddit$age.range) reddit$age.range <- factor(reddit$age.range, ...
/EDA_Course_Materials/lesson2/reddit_question.R
no_license
808sAndBR/Udacity_Data_Analysis_with_R
R
false
false
515
r
library(ggplot2) reddit <- read.csv("EDA_Course_Materials/lesson2/reddit.csv") str(reddit) levels(reddit$age.range) <- c("Under 18", "18-24", "25-34", "35-44", "45-54", "55-64", "65 or Above") qplot(reddit$age.range) reddit$age.range <- factor(reddit$age.range, ...
#' Tests for Absolute Agreement #' @description The agree_test function calculates a variety of agreement statistics. The hypothesis test of agreement is calculated by the method described by Shieh (2019). Bland-Altman limits of agreement, and confidence intervals, are also provided (Bland & Altman 1999; Bland & Altman...
/R/agree_test.R
no_license
hyunsooseol/SimplyAgree
R
false
false
8,002
r
#' Tests for Absolute Agreement #' @description The agree_test function calculates a variety of agreement statistics. The hypothesis test of agreement is calculated by the method described by Shieh (2019). Bland-Altman limits of agreement, and confidence intervals, are also provided (Bland & Altman 1999; Bland & Altman...
library(simstudy) ### Name: addColumns ### Title: Add columns to existing data set ### Aliases: addColumns ### ** Examples # New data set def <- defData(varname = "xNr", dist = "nonrandom", formula=7, id = "idnum") def <- defData(def, varname="xUni", dist="uniform", formula="10;20") dt <- genData(10, def) # Add ...
/data/genthat_extracted_code/simstudy/examples/addColumns.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
505
r
library(simstudy) ### Name: addColumns ### Title: Add columns to existing data set ### Aliases: addColumns ### ** Examples # New data set def <- defData(varname = "xNr", dist = "nonrandom", formula=7, id = "idnum") def <- defData(def, varname="xUni", dist="uniform", formula="10;20") dt <- genData(10, def) # Add ...
##################################### # Helper functions for C interfaces # ##################################### #' Generic C interface #' #' Generic interface for C-functions with inputs (values, times, length(values), ...) and output (values_new). Example: sma, rolling_max, ema, ... #' #' @param x a numeric \code...
/R/C_interfaces.R
no_license
andreas50/utsOperators
R
false
false
1,582
r
##################################### # Helper functions for C interfaces # ##################################### #' Generic C interface #' #' Generic interface for C-functions with inputs (values, times, length(values), ...) and output (values_new). Example: sma, rolling_max, ema, ... #' #' @param x a numeric \code...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/select_nodes_by_degree.R \name{select_nodes_by_degree} \alias{select_nodes_by_degree} \title{Select nodes in the graph based on their degree values} \usage{ select_nodes_by_degree(graph, expressions, set_op = "union") } \arguments{ \item{grap...
/man/select_nodes_by_degree.Rd
permissive
rich-iannone/DiagrammeR
R
false
true
2,828
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/select_nodes_by_degree.R \name{select_nodes_by_degree} \alias{select_nodes_by_degree} \title{Select nodes in the graph based on their degree values} \usage{ select_nodes_by_degree(graph, expressions, set_op = "union") } \arguments{ \item{grap...
rm(list=ls()) # environment ==== if (!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes") #remotes::install_github("MRCIEU/genetics.binaRies", force = F) #remotes::install_github("explodecomputer/plinkbinr", force = F) #remotes::install_github("chr1swallace/coloc@main", force = F) #remotes::instal...
/scripts/011_colocalisation/002_coloc/002_coloc_joint_rectal_female.R
no_license
mattlee821/adiposity_proteins_colorectal_cancer
R
false
false
6,963
r
rm(list=ls()) # environment ==== if (!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes") #remotes::install_github("MRCIEU/genetics.binaRies", force = F) #remotes::install_github("explodecomputer/plinkbinr", force = F) #remotes::install_github("chr1swallace/coloc@main", force = F) #remotes::instal...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_predicted.glm.R \name{get_predicted.glm} \alias{get_predicted.glm} \title{Compute predicted values of lm models.} \usage{ \method{get_predicted}{glm}(fit, newdata = "model", prob = 0.95, odds_to_probs = TRUE, ...) } \arguments{ \item{fi...
/man/get_predicted.glm.Rd
permissive
HugoNjb/psycho.R
R
false
true
1,350
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_predicted.glm.R \name{get_predicted.glm} \alias{get_predicted.glm} \title{Compute predicted values of lm models.} \usage{ \method{get_predicted}{glm}(fit, newdata = "model", prob = 0.95, odds_to_probs = TRUE, ...) } \arguments{ \item{fi...
#' Search #' #' Search for NYT articles by keywords, filters and facets. #' #' @param q Search query. #' @param since,until Begin and start \code{Date} objects. #' @param pages Number of pages of results to return. Set to infinite (\code{Inf}) to retrieve all pages (\emph{not recommended}). #' @param sort Sort order ...
/R/search.R
permissive
news-r/nytimes
R
false
false
2,425
r
#' Search #' #' Search for NYT articles by keywords, filters and facets. #' #' @param q Search query. #' @param since,until Begin and start \code{Date} objects. #' @param pages Number of pages of results to return. Set to infinite (\code{Inf}) to retrieve all pages (\emph{not recommended}). #' @param sort Sort order ...
# assign 18s algae to custom database library(tidyverse) library(DECIPHER) library(here) algae_18s <- readDNAStringSet(here("data/asv_seq_data/algae_18s.fasta")) reference <- readDNAStringSet(here("reference_database/snow_algae_18s_taxonomy.fasta")) curated_ref <- readDNAStringSet(here("reference_database/select_sno...
/code/exploratory/assign_18s_algae_to_custom.R
no_license
cengstro/bc_snow_algae_amplicon
R
false
false
2,356
r
# assign 18s algae to custom database library(tidyverse) library(DECIPHER) library(here) algae_18s <- readDNAStringSet(here("data/asv_seq_data/algae_18s.fasta")) reference <- readDNAStringSet(here("reference_database/snow_algae_18s_taxonomy.fasta")) curated_ref <- readDNAStringSet(here("reference_database/select_sno...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/combine_data.R \name{combine_data} \alias{combine_data} \title{Combine datasets} \usage{ combine_data(d, levs = NULL) } \arguments{ \item{d}{A list of data frames to combine. Numbers of columns should match.} \item{levs}{Optional list repres...
/man/combine_data.Rd
no_license
rscherrer/egstools
R
false
true
500
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/combine_data.R \name{combine_data} \alias{combine_data} \title{Combine datasets} \usage{ combine_data(d, levs = NULL) } \arguments{ \item{d}{A list of data frames to combine. Numbers of columns should match.} \item{levs}{Optional list repres...
load.dynamic.libraries<-function(libnames) { for(libname in libnames) { found_file=libname; for(path in unlist(strsplit(Sys.getenv("LD_LIBRARY_PATH"),":",fixed=TRUE))) { try_file <- paste0(path,"/",libname); if( file.exists(try_file) ) { found_file = try_file;...
/lib/ros.R
no_license
andre-dietrich/rosR
R
false
false
10,224
r
load.dynamic.libraries<-function(libnames) { for(libname in libnames) { found_file=libname; for(path in unlist(strsplit(Sys.getenv("LD_LIBRARY_PATH"),":",fixed=TRUE))) { try_file <- paste0(path,"/",libname); if( file.exists(try_file) ) { found_file = try_file;...
# ================================================================================== # EXTRACT BUFFER 500 M CALCULATING Ha OF SG-AES-GREENING # ================================================================================== rm(list=ls()) library(rgdal) library(rgeos) library(raster) library(...
/Ch. 2-3/Ch. 3/Variables/Fallow/5.2.FIX_Calculo_Buffer500_AES_SG_GREEN.R
no_license
anasanz/MyScripts
R
false
false
8,690
r
# ================================================================================== # EXTRACT BUFFER 500 M CALCULATING Ha OF SG-AES-GREENING # ================================================================================== rm(list=ls()) library(rgdal) library(rgeos) library(raster) library(...
res <- read.table("https://raw.githubusercontent.com/Shicheng-Guo/PANC/master/results.txt", header=TRUE) head(res) # Make a basic volcano plot with(res, plot(log2FoldChange, -log10(padj), pch=20, main="Volcano plot", xlim=c(-1,1))) # Add colored points: red if padj<0.05, orange of log2FC>1, green if both) with(sub...
/mcri/volcano.R
no_license
Shicheng-Guo/GscRbasement
R
false
false
824
r
res <- read.table("https://raw.githubusercontent.com/Shicheng-Guo/PANC/master/results.txt", header=TRUE) head(res) # Make a basic volcano plot with(res, plot(log2FoldChange, -log10(padj), pch=20, main="Volcano plot", xlim=c(-1,1))) # Add colored points: red if padj<0.05, orange of log2FC>1, green if both) with(sub...
# neightborBasedValidation.r # # 12/18/09 cws Created # neightborBasedValidation <- function(df, keys, name, value, parameter, tbf, min, max) # Performs a context-based range check of a value based on neighboring values, # to find values that exceed their neighboring values by more than a specified # factor, o...
/neighborBasedValidation.r
no_license
jasonelaw/nrsa-epa
R
false
false
6,720
r
# neightborBasedValidation.r # # 12/18/09 cws Created # neightborBasedValidation <- function(df, keys, name, value, parameter, tbf, min, max) # Performs a context-based range check of a value based on neighboring values, # to find values that exceed their neighboring values by more than a specified # factor, o...
#' Extract YAML data from metadata.yml #' #' @param file Path to the YAML file #' #' @importFrom yaml yaml.load_file #' dontTouch <- function(file = NULL) { yaml <- yaml::yaml.load_file(file) yaml$affil1 <- paste(c(yaml$affiliation1$university_name, yaml$affiliation1$faculty_group, ...
/R/dontTouch.R
no_license
chris-twigg/AFIT
R
false
false
2,162
r
#' Extract YAML data from metadata.yml #' #' @param file Path to the YAML file #' #' @importFrom yaml yaml.load_file #' dontTouch <- function(file = NULL) { yaml <- yaml::yaml.load_file(file) yaml$affil1 <- paste(c(yaml$affiliation1$university_name, yaml$affiliation1$faculty_group, ...
testlist <- list(baseVector = numeric(0), binaryVector = c(-7.99666974103071e+304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nAttributes = 0L) result <- do.call(blatent:::bin2dec_Rcpp,testlist) str(result)
/blatent/inst/testfiles/bin2dec_Rcpp/libFuzzer_bin2dec_Rcpp/bin2dec_Rcpp_valgrind_files/1609878114-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
230
r
testlist <- list(baseVector = numeric(0), binaryVector = c(-7.99666974103071e+304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), nAttributes = 0L) result <- do.call(blatent:::bin2dec_Rcpp,testlist) str(result)
\name{nnlink} \alias{nnlink} \title{Construct similarity graph by 1-NNL} \description{This function provides the edges of the similarity graph constructed by 1-NNL.} \usage{ nnlink(distance) } \arguments{ \item{distance}{A K by K matrix, which is the distance matrix on the distinct values and K is the number ...
/man/nnlink.Rd
no_license
cran/gTests
R
false
false
707
rd
\name{nnlink} \alias{nnlink} \title{Construct similarity graph by 1-NNL} \description{This function provides the edges of the similarity graph constructed by 1-NNL.} \usage{ nnlink(distance) } \arguments{ \item{distance}{A K by K matrix, which is the distance matrix on the distinct values and K is the number ...
draw.dca <- function(display.in.diagram = c('sites'), display.species = c('none'), display.sites = c('points'), axes.shown = c(1,2), down.rare.spec = 0, display.EIV = FALSE, display.header = FAL...
/R/draw.dca.R
no_license
zdealveindy/ordijuice
R
false
false
3,381
r
draw.dca <- function(display.in.diagram = c('sites'), display.species = c('none'), display.sites = c('points'), axes.shown = c(1,2), down.rare.spec = 0, display.EIV = FALSE, display.header = FAL...
fileURL <- "http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/breast-cancer-wisconsin.data" download.file(fileURL, destfile="breast-cancer-wisconsin.data", method="curl") # read the data df <- read.table("breast-cancer-wisconsin.data", na.strings = "?", sep=",") str(df) # Name the co...
/Lab3_NaiveBayesian_VijayaShreeRajaSekaran.R
no_license
vjvijayashree/ML-in-R
R
false
false
3,108
r
fileURL <- "http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/breast-cancer-wisconsin.data" download.file(fileURL, destfile="breast-cancer-wisconsin.data", method="curl") # read the data df <- read.table("breast-cancer-wisconsin.data", na.strings = "?", sep=",") str(df) # Name the co...
# Title: Spectral Analysis of Time Series with R # Review: 2020-01-07T0926 AU ## Loading the data # Load in the nino3 sea surface temperature data. # These data are an average of monthly sea surface temperatures over the East Equatorial Pacific. nino <- read.table( "../2_raw-data/nino3data.asc" , skip = 3...
/times-series_analysis-master/7_sources/ts_spectral-analysis/1_code/ts_spectral-analysis.R
no_license
tarasevic-r/Vibro-acoustic
R
false
false
18,317
r
# Title: Spectral Analysis of Time Series with R # Review: 2020-01-07T0926 AU ## Loading the data # Load in the nino3 sea surface temperature data. # These data are an average of monthly sea surface temperatures over the East Equatorial Pacific. nino <- read.table( "../2_raw-data/nino3data.asc" , skip = 3...
#!/usr/bin/Rscript --no-save initDate = '2002-10-21' .from='2010-01-01' .to='2010-12-31' initEq = 100000 #### green = 'green' red = 'red' a = 'IB1' ### require(quantstrat) getSymbols('AAPL', from=.from, to=.to, verbose=FALSE) ### initPortf(green, symbols='AAPL', initDate=initDate, currency='USD') initPortf(re...
/quantstrat/open3.r
no_license
Jicheng-Yan/rfinance2012
R
false
false
4,038
r
#!/usr/bin/Rscript --no-save initDate = '2002-10-21' .from='2010-01-01' .to='2010-12-31' initEq = 100000 #### green = 'green' red = 'red' a = 'IB1' ### require(quantstrat) getSymbols('AAPL', from=.from, to=.to, verbose=FALSE) ### initPortf(green, symbols='AAPL', initDate=initDate, currency='USD') initPortf(re...