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
#ALTERNATE NORMALIZATION WITHOUT REGRESSION FOR SEX COVARIATE#### #IWAMOTO#### rm(list=ls()) options(stringsAsFactors=FALSE) library(WGCNA) library(affy) library(limma) library(biomaRt) library(sva) home= '~/GitHub/' rootdir = paste(home, "integrative-transcriptomics", sep="") setwd(rootdir) #02 normalization and re...
/10_unbiased_meta/01_single_datasets/02_sex_dependent/02_iwa_sex.R
no_license
slobentanzer/integrative-transcriptomics
R
false
false
2,439
r
#ALTERNATE NORMALIZATION WITHOUT REGRESSION FOR SEX COVARIATE#### #IWAMOTO#### rm(list=ls()) options(stringsAsFactors=FALSE) library(WGCNA) library(affy) library(limma) library(biomaRt) library(sva) home= '~/GitHub/' rootdir = paste(home, "integrative-transcriptomics", sep="") setwd(rootdir) #02 normalization and re...
library(shiny) library(shinythemes) library(shinycssloaders) library(shinydashboard) library(shinyWidgets) library(tidyverse) library(educationdata) library(ggminthemes) library(glue) library(ggtext) library(tigris) library(leaflet) library(sf) library(plotly) # Modify the ggplot theme! theme_set( theme_minima() +...
/app.R
no_license
ramorel/landscape-of-educational-opportunity
R
false
false
33,816
r
library(shiny) library(shinythemes) library(shinycssloaders) library(shinydashboard) library(shinyWidgets) library(tidyverse) library(educationdata) library(ggminthemes) library(glue) library(ggtext) library(tigris) library(leaflet) library(sf) library(plotly) # Modify the ggplot theme! theme_set( theme_minima() +...
nb.district <- poly2nb(BD.gen, queen=TRUE, row.names=as.character(BD.gen[["NAME_2"]])) neiCT <- nb2WB(nb.district) nb2INLA("BD.graph", nb.district) nb2INLA("BD.txt", nb.district) inla.geobugs2inla(neiCT$adj,neiCT$num,graph.file = "BD.graph") H <- inla.read.graph(filename="BD.txt") image(inla.graph2matrix(H),xlab="",yl...
/4 neighbouring structure.R
no_license
rifatzahan/Spatial-DHS
R
false
false
328
r
nb.district <- poly2nb(BD.gen, queen=TRUE, row.names=as.character(BD.gen[["NAME_2"]])) neiCT <- nb2WB(nb.district) nb2INLA("BD.graph", nb.district) nb2INLA("BD.txt", nb.district) inla.geobugs2inla(neiCT$adj,neiCT$num,graph.file = "BD.graph") H <- inla.read.graph(filename="BD.txt") image(inla.graph2matrix(H),xlab="",yl...
library(dash) library(dashCoreComponents) library(dashHtmlComponents) utils <- new.env() source('dash_docs/utils.R', local=utils) examples <- list( button = utils$LoadExampleCode('dash_docs/chapters/dash_core_components/Button/examples/button.R'), tabs = utils$LoadExampleCode('dash_docs/chapters/dash_core_compone...
/dash_docs/chapters/dash_core_components/index.R
permissive
plotly/dash-docs
R
false
false
13,834
r
library(dash) library(dashCoreComponents) library(dashHtmlComponents) utils <- new.env() source('dash_docs/utils.R', local=utils) examples <- list( button = utils$LoadExampleCode('dash_docs/chapters/dash_core_components/Button/examples/button.R'), tabs = utils$LoadExampleCode('dash_docs/chapters/dash_core_compone...
TransformCoords <- function(data) { parentcoordinates = data[,1:2] childcoordinates = data[,3:4] parentcentroid = c(mean(data[,1]), mean(data[,2])) childcentroid = c(mean(data[,3],na.rm = TRUE), mean(data[,4],na.rm = TRUE)) parentdist = sqrt((parentcoordinates[,1]-parentcentroid[1])^2 + (parentcoordinates[,2]-par...
/RCC_seurat.r
no_license
GenOnyx/RCC_test
R
false
false
9,697
r
TransformCoords <- function(data) { parentcoordinates = data[,1:2] childcoordinates = data[,3:4] parentcentroid = c(mean(data[,1]), mean(data[,2])) childcentroid = c(mean(data[,3],na.rm = TRUE), mean(data[,4],na.rm = TRUE)) parentdist = sqrt((parentcoordinates[,1]-parentcentroid[1])^2 + (parentcoordinates[,2]-par...
library(shiny) library(markdown) library(vembedr) library(tidyverse) library(shinythemes) mean_housing_data <- read_csv("mean_housing_data.csv", col_types = cols(.default = col_character(), date = col_date(format = "%Y-%m-%d"), ...
/housing-explorations-app/app.R
no_license
sophz55/housing-price-explorations
R
false
false
4,141
r
library(shiny) library(markdown) library(vembedr) library(tidyverse) library(shinythemes) mean_housing_data <- read_csv("mean_housing_data.csv", col_types = cols(.default = col_character(), date = col_date(format = "%Y-%m-%d"), ...
############## # QUESTION 1 # ############## library(httr) library(jsonlite) # 1. Find OAuth settings for github: # http://developer.github.com/v3/oauth/ oauth_endpoints("github") # 2. To make your own application, register at # https://github.com/settings/developers. Use any URL for the homepage URL # (ht...
/03_Getting_and_cleaning_data/quizz_week_2.R
no_license
danpon/coursera_jhu_datascience
R
false
false
2,377
r
############## # QUESTION 1 # ############## library(httr) library(jsonlite) # 1. Find OAuth settings for github: # http://developer.github.com/v3/oauth/ oauth_endpoints("github") # 2. To make your own application, register at # https://github.com/settings/developers. Use any URL for the homepage URL # (ht...
library(billboarder) ### Name: bb_bar ### Title: Bar property for a Billboard.js chart ### Aliases: bb_bar ### ** Examples billboarder() %>% bb_barchart(data = data.frame(v1 = c("a", "b", "c"), value = c(5, 6, 3))) %>% bb_bar(width = list(ratio = 0.95))
/data/genthat_extracted_code/billboarder/examples/bb_bar.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
269
r
library(billboarder) ### Name: bb_bar ### Title: Bar property for a Billboard.js chart ### Aliases: bb_bar ### ** Examples billboarder() %>% bb_barchart(data = data.frame(v1 = c("a", "b", "c"), value = c(5, 6, 3))) %>% bb_bar(width = list(ratio = 0.95))
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make_hexbin.R \docType{methods} \name{make_hexbin} \alias{make_hexbin} \alias{make_hexbin,SingleCellExperiment-method} \alias{make_hexbin,Seurat-method} \title{Bivariate binning of single cell data into hexagon cells.} \usage{ make_hexbin(sce...
/man/make_hexbin.Rd
no_license
robertoalvarezm/schex
R
false
true
2,445
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make_hexbin.R \docType{methods} \name{make_hexbin} \alias{make_hexbin} \alias{make_hexbin,SingleCellExperiment-method} \alias{make_hexbin,Seurat-method} \title{Bivariate binning of single cell data into hexagon cells.} \usage{ make_hexbin(sce...
source("prepare_dim_reduced.R") source("rsa_boot_source.R") source("ttest_source.R") library(MASS) # res <- prepare_gambling_data(dfile = "roi/data.rds",pca = FALSE, # stdz_within = TRUE, avg_subjects = FALSE, # div_sqrt_p = FALSE) ...
/analysis7.R
no_license
tongsong91/rsa_project
R
false
false
1,505
r
source("prepare_dim_reduced.R") source("rsa_boot_source.R") source("ttest_source.R") library(MASS) # res <- prepare_gambling_data(dfile = "roi/data.rds",pca = FALSE, # stdz_within = TRUE, avg_subjects = FALSE, # div_sqrt_p = FALSE) ...
library(data.table) library(stringr) library(dplyr) # cd setwd("/rds/projects/v/vianaj-genomics-brain-development/MATRICS/bismark_methylation_extractor/filtered") # list of files and names files <- list.files(pattern="*VMH_filtered.csv") names(files) <- str_match(Sys.glob("*VMH_filtered.csv"),paste0("BLB","(.*?.....)...
/scripts/old/BLB/R_scripts/6.linear_regression_VMH.R
no_license
jffpviana/aggression_RRBS
R
false
false
2,651
r
library(data.table) library(stringr) library(dplyr) # cd setwd("/rds/projects/v/vianaj-genomics-brain-development/MATRICS/bismark_methylation_extractor/filtered") # list of files and names files <- list.files(pattern="*VMH_filtered.csv") names(files) <- str_match(Sys.glob("*VMH_filtered.csv"),paste0("BLB","(.*?.....)...
library(dplyr) # source("~/Desktop/PalmTrees/Analysis/Code/ParseSVCallerData.R") # # #system("gzip -d ~/Desktop/PalmTrees/Data/EliasMail190125/Konstantin_results_Variant_Callers_24.1.19/*/*/*.vcf.gz") # # datapath = "~/Desktop/PalmTrees/Data/EliasMail190125/Konstantin_results_Variant_Callers_24.1.19/" # samples = dir...
/Analysis/Code/ParseAllSV.R
no_license
sunqiangzai/TreeShapedRearrangements
R
false
false
19,367
r
library(dplyr) # source("~/Desktop/PalmTrees/Analysis/Code/ParseSVCallerData.R") # # #system("gzip -d ~/Desktop/PalmTrees/Data/EliasMail190125/Konstantin_results_Variant_Callers_24.1.19/*/*/*.vcf.gz") # # datapath = "~/Desktop/PalmTrees/Data/EliasMail190125/Konstantin_results_Variant_Callers_24.1.19/" # samples = dir...
\name{testSGP} \alias{testSGP} \title{Test SGP Package functions} \description{ testSGP runs large scale tests of the SGP package to test for consistent performance across releases. } \usage{ testSGP(TEST_NUMBER, save.results=TRUE, memory.profile=FALSE) } \arguments{ \item{TEST_NUMBER}{An integer indicating the t...
/man/testSGP.Rd
no_license
shangyi/SGP
R
false
false
1,717
rd
\name{testSGP} \alias{testSGP} \title{Test SGP Package functions} \description{ testSGP runs large scale tests of the SGP package to test for consistent performance across releases. } \usage{ testSGP(TEST_NUMBER, save.results=TRUE, memory.profile=FALSE) } \arguments{ \item{TEST_NUMBER}{An integer indicating the t...
#' @export run <- function(debug = FALSE, stdin = "stdin", stdout = "stdout") { logger$set_mode(debug = debug) langserver <- LanguageServer$new(stdout = stdout) con <- file(stdin) open(con, blocking = TRUE) while (TRUE) { ret <- try({ header <- readLines(con, n = 1) i...
/R/server.R
no_license
Ikuyadeu/languageserver
R
false
false
1,000
r
#' @export run <- function(debug = FALSE, stdin = "stdin", stdout = "stdout") { logger$set_mode(debug = debug) langserver <- LanguageServer$new(stdout = stdout) con <- file(stdin) open(con, blocking = TRUE) while (TRUE) { ret <- try({ header <- readLines(con, n = 1) i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Class-Pop.R \name{cChr} \alias{cChr} \title{Combine MapPop chromosomes} \usage{ cChr(...) } \arguments{ \item{...}{\code{\link{MapPop-class}} or \code{\link{NamedMapPop-class}} objects to be combined} } \value{ Returns an object ...
/man/cChr.Rd
no_license
cran/AlphaSimR
R
false
true
683
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Class-Pop.R \name{cChr} \alias{cChr} \title{Combine MapPop chromosomes} \usage{ cChr(...) } \arguments{ \item{...}{\code{\link{MapPop-class}} or \code{\link{NamedMapPop-class}} objects to be combined} } \value{ Returns an object ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/501.Error-Failure_LimitBased_BASE_All.R \name{errAS} \alias{errAS} \title{Calculates error, long term power and pass/fail criteria for ArcSine method} \usage{ errAS(n, alp, phi, f) } \arguments{ \item{n}{- Number of trials} \item{alp}{- Alph...
/man/errAS.Rd
no_license
ElsevierSoftwareX/SOFTX-D-16-00020
R
false
true
1,634
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/501.Error-Failure_LimitBased_BASE_All.R \name{errAS} \alias{errAS} \title{Calculates error, long term power and pass/fail criteria for ArcSine method} \usage{ errAS(n, alp, phi, f) } \arguments{ \item{n}{- Number of trials} \item{alp}{- Alph...
#---DESC. # 1. 최초 SAP 데이터로 적재한 Excel 파일에 대한 Import 수행 # 2. List로 Import 된 데이터에 대한 병합 수행 #### data Import setwd("D:/order_raw/tmp") data.dir <- "D:/order_raw/tmp" # + /hera, /sulwhasoo, /primera, /liri, /ap folder data.subdir <- c("h", "s", "v", "p", "l", "a") data.dir2 <- glue('{data.dir}/{data.subdir}/')#...
/1_raw_data_load.R
no_license
mk-oh/raw_data_preprocessing
R
false
false
748
r
#---DESC. # 1. 최초 SAP 데이터로 적재한 Excel 파일에 대한 Import 수행 # 2. List로 Import 된 데이터에 대한 병합 수행 #### data Import setwd("D:/order_raw/tmp") data.dir <- "D:/order_raw/tmp" # + /hera, /sulwhasoo, /primera, /liri, /ap folder data.subdir <- c("h", "s", "v", "p", "l", "a") data.dir2 <- glue('{data.dir}/{data.subdir}/')#...
setwd('C:/study/my projects/depth') source('functions.R') # generate data library(VineCopula) library(copula) N = 1000; df=13 U = BiCopSim(N, family=1, par=.4) u = U[,1]; v = U[,2] # Generate empirical copula for the (pseudo-)data empC = C.n(U, U=U) # Given data, calculate ML parameters for different copula.. Gaussi...
/codes/bestcopula_gridsearch.R
no_license
shubhobm/Depth-copula-network
R
false
false
1,173
r
setwd('C:/study/my projects/depth') source('functions.R') # generate data library(VineCopula) library(copula) N = 1000; df=13 U = BiCopSim(N, family=1, par=.4) u = U[,1]; v = U[,2] # Generate empirical copula for the (pseudo-)data empC = C.n(U, U=U) # Given data, calculate ML parameters for different copula.. Gaussi...
# ###################################### # 4 # combine csv files that have MAPEs # create a column with region/marketing # ###################################### setwd(path) library(dplyr) # create a list of the filenames with the full path file.list <- list.files(pattern='MAPE_by_model.csv', recursive = TRUE, full.nam...
/combine_files.R
no_license
akuppam/timeS
R
false
false
1,621
r
# ###################################### # 4 # combine csv files that have MAPEs # create a column with region/marketing # ###################################### setwd(path) library(dplyr) # create a list of the filenames with the full path file.list <- list.files(pattern='MAPE_by_model.csv', recursive = TRUE, full.nam...
library(magrittr) # 3491: ETM+ Pan Mosaics (1999-2003) # 3492: TM Mosaics (1984-1997) # 2732: ETM+ Pan (1999-2003) # 2731: ETM+ (1999-2003) # 2733: TM (1984-1997) # 2871: MSS 1-5 (1972-1987) # 3211: Sys ETM+ L1G # # Retrieve granules (LANDSAT image ids) from shapefiles files <- "sources/tm" %>% list.files(pattern ...
/scripts/process.R
no_license
columbia-glacier/landsat-velocities
R
false
false
1,499
r
library(magrittr) # 3491: ETM+ Pan Mosaics (1999-2003) # 3492: TM Mosaics (1984-1997) # 2732: ETM+ Pan (1999-2003) # 2731: ETM+ (1999-2003) # 2733: TM (1984-1997) # 2871: MSS 1-5 (1972-1987) # 3211: Sys ETM+ L1G # # Retrieve granules (LANDSAT image ids) from shapefiles files <- "sources/tm" %>% list.files(pattern ...
update.formula2<-function(object, new, ...) { old <- as.formula(object) new <- as.formula(new) ii.old <- if(length(old)>2) 3 else 2 ii.new <- if(length(new)>2) 3 else 2 old.right <- deparse(old[[ii.old]]) new.right <- deparse(new[[ii.new]]) old.right <- sub("\\+$", "+ ", old.right) old.right <-...
/R/update.formula2.R
no_license
cran/compareGroups
R
false
false
1,143
r
update.formula2<-function(object, new, ...) { old <- as.formula(object) new <- as.formula(new) ii.old <- if(length(old)>2) 3 else 2 ii.new <- if(length(new)>2) 3 else 2 old.right <- deparse(old[[ii.old]]) new.right <- deparse(new[[ii.new]]) old.right <- sub("\\+$", "+ ", old.right) old.right <-...
source("/home/reitero/Arbeit/Rprogramming/npExact/npExact/R/npStochinUnpaired.R") context("npStochinUnpaired") ones <- rep(1, 20) zeros <- rep(0, 20) res <- npStochinUnpaired(ones, zeros) theta.1 <- res$theta test_that("correct rejection 1", expect_true(res$rejection)) res <- npStochinUnpaired(zeros, ones...
/npExact/tests/testthat/test_npStochinUnpaired.R
no_license
zauster/npExact-deprecated
R
false
false
5,319
r
source("/home/reitero/Arbeit/Rprogramming/npExact/npExact/R/npStochinUnpaired.R") context("npStochinUnpaired") ones <- rep(1, 20) zeros <- rep(0, 20) res <- npStochinUnpaired(ones, zeros) theta.1 <- res$theta test_that("correct rejection 1", expect_true(res$rejection)) res <- npStochinUnpaired(zeros, ones...
#Read File and clean data power <- read.csv("household_power_consumption.txt", sep=";") power$Date <- as.Date(power$Date,"%d/%m/%Y") power<- subset(power,Date >= "2007-02-01" & Date <= "2007-02-02") power$Date1 <- strptime(paste(power$Date,power$Time),format="%Y-%m-%d %H:%M:%S") power$Global_intensity <- as.numeri...
/plot2.r
no_license
kevinyang1704/ExData_Plotting1
R
false
false
1,053
r
#Read File and clean data power <- read.csv("household_power_consumption.txt", sep=";") power$Date <- as.Date(power$Date,"%d/%m/%Y") power<- subset(power,Date >= "2007-02-01" & Date <= "2007-02-02") power$Date1 <- strptime(paste(power$Date,power$Time),format="%Y-%m-%d %H:%M:%S") power$Global_intensity <- as.numeri...
# # Parsing H13 # context("parseRDBESexchange h13: read") data <- parseRDBESexchangeH13(system.file("testresources","herringlottery_trimmed_H13.csv", package="prepRECA")) expectedtables <- c("BV", "SA", "SS", "SL", "FO", "SD", "DE") expect_equal(length(data), length(expectedtables)) expect_true(all(names(data) %in% ...
/tests/testthat/testIO.R
no_license
edvinf/prepRECA
R
false
false
3,876
r
# # Parsing H13 # context("parseRDBESexchange h13: read") data <- parseRDBESexchangeH13(system.file("testresources","herringlottery_trimmed_H13.csv", package="prepRECA")) expectedtables <- c("BV", "SA", "SS", "SL", "FO", "SD", "DE") expect_equal(length(data), length(expectedtables)) expect_true(all(names(data) %in% ...
setwd("C:\\Users\\shangll\\Documents\\NCKU\\sub\\data_spl") dat = read.table(file = "o45.csv", head = TRUE, na.strings = "NA", sep = ",") ans = dat$anso l = dat$stim r = dat$stimb left = c( ) right = c( ) for (h in 1:length(l)) { left[h] = as.character(l[h]) } for (n in 1:length(r)) { right[n] = as.c...
/code/selectACC_OR.R
no_license
shangll/OData_ConvergThink
R
false
false
903
r
setwd("C:\\Users\\shangll\\Documents\\NCKU\\sub\\data_spl") dat = read.table(file = "o45.csv", head = TRUE, na.strings = "NA", sep = ",") ans = dat$anso l = dat$stim r = dat$stimb left = c( ) right = c( ) for (h in 1:length(l)) { left[h] = as.character(l[h]) } for (n in 1:length(r)) { right[n] = as.c...
## ----setup, include = FALSE--------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ---- eval = FALSE------------------------------------------------------------ # df <- read_rpr(col_positions=c(1,2,4), # widths=c(1,2,1), # c...
/inst/doc/readroper.R
no_license
cran/readroper
R
false
false
691
r
## ----setup, include = FALSE--------------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ---- eval = FALSE------------------------------------------------------------ # df <- read_rpr(col_positions=c(1,2,4), # widths=c(1,2,1), # c...
#logical true false 4 < 5 10 > 100 4==5 5==5 # == equal to # != not equal to # / or # & and # isTRUE(x) result <- 4<5 typeof(result) result2 <- !TRUE result3 <- (4<5) result2 & result3 alex <- read.csv(filechoose)
/Tutorial_03.R
no_license
rohitturankar/R_projects_udemy
R
false
false
226
r
#logical true false 4 < 5 10 > 100 4==5 5==5 # == equal to # != not equal to # / or # & and # isTRUE(x) result <- 4<5 typeof(result) result2 <- !TRUE result3 <- (4<5) result2 & result3 alex <- read.csv(filechoose)
install.packages("raster") library(raster) library(ggplot2) library(rgdal) dirR <- "/Users/erikglover/Documents/Environmental Data/a08/oneida" rdatB2 <- raster(paste0(dirR,"/sentinel/T18TVN_20190814T154911_B02_20m.tif")) rdatB3 <- raster(paste0(dirR,"/sentinel/T18TVN_20190814T154911_B03_20m.tif")) rdatB4 <- raster(p...
/activity8/activity8_script.R
no_license
ErikGlover/ENVST206
R
false
false
3,989
r
install.packages("raster") library(raster) library(ggplot2) library(rgdal) dirR <- "/Users/erikglover/Documents/Environmental Data/a08/oneida" rdatB2 <- raster(paste0(dirR,"/sentinel/T18TVN_20190814T154911_B02_20m.tif")) rdatB3 <- raster(paste0(dirR,"/sentinel/T18TVN_20190814T154911_B03_20m.tif")) rdatB4 <- raster(p...
/exercise1.R
no_license
chengran02/AdvancedR
R
false
false
1,489
r
library(rbmn) ### Name: order4chain ### Title: returns a topological order of a /chain/ or checks a proposed ### order. ### Aliases: order4chain ### ** Examples order4chain(rbmn0chain.02); order4chain(rbmn0chain.02, order4chain(rbmn0chain.02));
/data/genthat_extracted_code/rbmn/examples/order4chain.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
256
r
library(rbmn) ### Name: order4chain ### Title: returns a topological order of a /chain/ or checks a proposed ### order. ### Aliases: order4chain ### ** Examples order4chain(rbmn0chain.02); order4chain(rbmn0chain.02, order4chain(rbmn0chain.02));
## some convenience functions generally applicable to survreg ## hopefully in survival soon deviance.survreg <- function(object, ...) sum(residuals(object, type = "deviance")^2) fitted.survreg <- function(object, ...) predict(object, type = "response", se.fit = FALSE) nobs.survreg <- function(object, ...) leng...
/R/tobit.R
no_license
tpemartin/AER
R
false
false
8,723
r
## some convenience functions generally applicable to survreg ## hopefully in survival soon deviance.survreg <- function(object, ...) sum(residuals(object, type = "deviance")^2) fitted.survreg <- function(object, ...) predict(object, type = "response", se.fit = FALSE) nobs.survreg <- function(object, ...) leng...
TestMat = matrix(1:20, nrow=10) rearrange_rows_cols = function(M) { answer = matrix(M, nrow = dim(W)[[2]] ) } df = data.frame(matrix(1:100,nrow=10)) df[5, 5] = NA df[6, 6] = NA df df[is.na(df)] entries_divisible_by_k = function(df,k) { divisibility_mask = df %% k == 0 divisible = df[divisibility_mask] ...
/Week1/matrix_exercises.R
no_license
RokoMijic/Signal
R
false
false
1,089
r
TestMat = matrix(1:20, nrow=10) rearrange_rows_cols = function(M) { answer = matrix(M, nrow = dim(W)[[2]] ) } df = data.frame(matrix(1:100,nrow=10)) df[5, 5] = NA df[6, 6] = NA df df[is.na(df)] entries_divisible_by_k = function(df,k) { divisibility_mask = df %% k == 0 divisible = df[divisibility_mask] ...
LSMB <- function(x,p) { x <- as.matrix(x) n <- nrow(x) xmat <- matrix(1,nrow=n-p,ncol=p+1) index <- 2:(n-p+1) for(i in 1:p) {xmat[,i] <- x[index,1] index <- index+1 } y <- x[1:(n-p),1] b <- solve( t(xmat) %*% xmat) %*% t(xmat) %*% y e <- y - xmat %*% b r...
/R/LSMB.R
no_license
cran/BootPR
R
false
false
352
r
LSMB <- function(x,p) { x <- as.matrix(x) n <- nrow(x) xmat <- matrix(1,nrow=n-p,ncol=p+1) index <- 2:(n-p+1) for(i in 1:p) {xmat[,i] <- x[index,1] index <- index+1 } y <- x[1:(n-p),1] b <- solve( t(xmat) %*% xmat) %*% t(xmat) %*% y e <- y - xmat %*% b r...
.onAttach <- function(libname, pkgname){ # options(googleAuthR.cache_function = function(req){ # out <- TRUE # content <- jsonlite::fromJSON(httr::content(req, as = "text", encoding = "UTF8")) # # ## if an operation that is not DONE # check_content <- all(!is.null(content$kind), # ...
/R/options.R
no_license
sportebois/googleComputeEngineR
R
false
false
2,107
r
.onAttach <- function(libname, pkgname){ # options(googleAuthR.cache_function = function(req){ # out <- TRUE # content <- jsonlite::fromJSON(httr::content(req, as = "text", encoding = "UTF8")) # # ## if an operation that is not DONE # check_content <- all(!is.null(content$kind), # ...
# In this file, we plot the histogram of the Global Active Power # during February 1st and 2nd 2007. # Read the file household_power_consumption.txt ElectricityData <- read.table("household_power_consumption.txt", sep=";", header=TRUE, dec=".", na.string="?") # Keep data for February 1 and 2 2007 ElectricityData2007F...
/Plot1.R
no_license
TheClownBongo/ExploratoryDataAnalysisProject1
R
false
false
1,217
r
# In this file, we plot the histogram of the Global Active Power # during February 1st and 2nd 2007. # Read the file household_power_consumption.txt ElectricityData <- read.table("household_power_consumption.txt", sep=";", header=TRUE, dec=".", na.string="?") # Keep data for February 1 and 2 2007 ElectricityData2007F...
5c30cf127a5e2c0f95b0204680cb0409 ctrl.e#1.a#3.E#132.A#48.c#.w#7.s#7.asp.qdimacs 7571 22174
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#3.E#132.A#48.c#.w#7.s#7.asp/ctrl.e#1.a#3.E#132.A#48.c#.w#7.s#7.asp.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
90
r
5c30cf127a5e2c0f95b0204680cb0409 ctrl.e#1.a#3.E#132.A#48.c#.w#7.s#7.asp.qdimacs 7571 22174
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{stack_min} \alias{stack_min} \title{Compute the minimum defined element for each row and col in a 3D array} \usage{ stack_min(v) } \arguments{ \item{v}{3D array that may contain NA values} } \value{ a matrix with the minim...
/wsim.distributions/man/stack_min.Rd
permissive
isciences/wsim
R
false
true
440
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{stack_min} \alias{stack_min} \title{Compute the minimum defined element for each row and col in a 3D array} \usage{ stack_min(v) } \arguments{ \item{v}{3D array that may contain NA values} } \value{ a matrix with the minim...
testlist <- list(bytes1 = c(184L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853696L, 254L, -14556446L, -488447262L, -488447262L, -488447262L, -488447262L, -4...
/mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612886863-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
853
r
testlist <- list(bytes1 = c(184L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853640L, -1195853696L, 254L, -14556446L, -488447262L, -488447262L, -488447262L, -488447262L, -4...
#' Returns a character vector of common names using a vector of #' three character species codes (species_codes) #' #' @param conn database connection object to the animal database #' @param species_codes three character species codes (species_codes) #' @export get_common_name_for_species_code <- function(conn, species...
/R/get_common_name_for_species_code.R
permissive
rmsharp/animalr
R
false
false
410
r
#' Returns a character vector of common names using a vector of #' three character species codes (species_codes) #' #' @param conn database connection object to the animal database #' @param species_codes three character species codes (species_codes) #' @export get_common_name_for_species_code <- function(conn, species...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cimp5_1951_2000_cv.R \docType{data} \name{cimp5_1951_2000_cv} \alias{cimp5_1951_2000_cv} \title{Coefficient Variation of the Mean Seafloor Climatic Data among CIMP5 Models during 1951 to 2000} \format{ A RasterBrick object of 4 raster layers:...
/man/cimp5_1951_2000_cv.Rd
no_license
chihlinwei/SCC26
R
false
true
2,960
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cimp5_1951_2000_cv.R \docType{data} \name{cimp5_1951_2000_cv} \alias{cimp5_1951_2000_cv} \title{Coefficient Variation of the Mean Seafloor Climatic Data among CIMP5 Models during 1951 to 2000} \format{ A RasterBrick object of 4 raster layers:...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sap_general_functions.R \name{sap_file_load} \alias{sap_file_load} \title{A Function To Read STAD Unformated Exports The function reads SAP STAD exports} \usage{ sap_file_load(dir_name, pattern, cleanup, skip) } \arguments{ \item{dir_name}{Th...
/man/sap_file_load.Rd
no_license
thepks/sapr
R
false
true
682
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sap_general_functions.R \name{sap_file_load} \alias{sap_file_load} \title{A Function To Read STAD Unformated Exports The function reads SAP STAD exports} \usage{ sap_file_load(dir_name, pattern, cleanup, skip) } \arguments{ \item{dir_name}{Th...
##------------------------------------- ## model_coef.R ## ## Title: Extract model coefficients from mixed-model output ## Purpose: A single file to get a data frame of model coefficients from mixed models ## Author: ## ## ## ##------------------------------------- ## Notes: # This script stores a data frame with model...
/R/model_coefs.R
no_license
dhammarstrom/rnaseq-copd
R
false
false
879
r
##------------------------------------- ## model_coef.R ## ## Title: Extract model coefficients from mixed-model output ## Purpose: A single file to get a data frame of model coefficients from mixed models ## Author: ## ## ## ##------------------------------------- ## Notes: # This script stores a data frame with model...
#!/usr/local/bin/R ######################################### ## Description: Loads draws from the stgpr folder, if present, or the predicted model mean (if draws not present) ## then and saves a data frame with the mean values. ## Input(s)/Output(s): see individual functions ## How To Use: intende...
/cod_code/cancer/03_models/02_mi_ratio/mean_stgpr_draws.r
no_license
Nermin-Ghith/ihme-modeling
R
false
false
2,802
r
#!/usr/local/bin/R ######################################### ## Description: Loads draws from the stgpr folder, if present, or the predicted model mean (if draws not present) ## then and saves a data frame with the mean values. ## Input(s)/Output(s): see individual functions ## How To Use: intende...
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' ComAdobeCqSocialCommonsEmailrepl...
/clients/r/generated/R/ComAdobeCqSocialCommonsEmailreplyImplOutLookEmailClientProviderInfo.r
permissive
shinesolutions/swagger-aem-osgi
R
false
false
4,961
r
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' ComAdobeCqSocialCommonsEmailrepl...
# This is a script to analyze EC data # Author: John # Version: 1.0 # Date: 2018-10-25 # # Import data df <- read.csv('data/muka_head_data.csv')
/r/ec_analysis.R
no_license
jskayode/ec_cemacs
R
false
false
147
r
# This is a script to analyze EC data # Author: John # Version: 1.0 # Date: 2018-10-25 # # Import data df <- read.csv('data/muka_head_data.csv')
testlist <- list(Beta = 0, CVLinf = 2.53377010188392e-312, FM = 3.8195956615967e-313, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.97941197291525e-316, SL95 = -2.12248160522076e-314, nage = 682962941L...
/DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615830609-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
418
r
testlist <- list(Beta = 0, CVLinf = 2.53377010188392e-312, FM = 3.8195956615967e-313, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.97941197291525e-316, SL95 = -2.12248160522076e-314, nage = 682962941L...
library(ggplot2) library(reshape2) library(zoo) library(igraph) source("cleandata.r") bargraph <- function(yourData){ df = yourData df = cleanData(df) df = zoo(df) barplot(df, main = "Histogram Plot", beside = TRUE) } heatgraph <- function(yourData){ cormat <- round(cor(you...
/graphics.r
permissive
IssamMerikhi/EasyViz
R
false
false
802
r
library(ggplot2) library(reshape2) library(zoo) library(igraph) source("cleandata.r") bargraph <- function(yourData){ df = yourData df = cleanData(df) df = zoo(df) barplot(df, main = "Histogram Plot", beside = TRUE) } heatgraph <- function(yourData){ cormat <- round(cor(you...
# Applied hierarchical modeling in ecology # Modeling distribution, abundance and species richness using R and BUGS # Volume 2: Dynamic and Advanced models # Marc Kéry & J. Andy Royle # # Chapter 9 : SPATIAL MODELS OF DISTRIBUTION AND ABUNDANCE # ======================================================== # Code f...
/AHM2_ch09/AHM2_09.4.3.R
no_license
PrimulaLHD/AHM_code
R
false
false
6,590
r
# Applied hierarchical modeling in ecology # Modeling distribution, abundance and species richness using R and BUGS # Volume 2: Dynamic and Advanced models # Marc Kéry & J. Andy Royle # # Chapter 9 : SPATIAL MODELS OF DISTRIBUTION AND ABUNDANCE # ======================================================== # Code f...
path='F:/allen_cell_type' setwd(path) library(ggplot2) library(RColorBrewer) library(ggthemes) feature<-read.csv('features_all.csv') matadata<-read.csv('interneuron.csv') ISI_feature<-read.csv('features_ISI.csv') mergetable<-merge(feature,matadata,'Id') merge_ISI<-merge(ISI_feature,matadata,'Id') rownames(mer...
/density_plot.R
no_license
ZhouYing0818/interneuron-e-type-
R
false
false
1,585
r
path='F:/allen_cell_type' setwd(path) library(ggplot2) library(RColorBrewer) library(ggthemes) feature<-read.csv('features_all.csv') matadata<-read.csv('interneuron.csv') ISI_feature<-read.csv('features_ISI.csv') mergetable<-merge(feature,matadata,'Id') merge_ISI<-merge(ISI_feature,matadata,'Id') rownames(mer...
#Importing the data in R and printing first 5 observations. data=read.table("http://users.stat.ufl.edu/~winner/data/nuclear_time.dat") head(data,5) #Displaying the completion time of the task based on nationality by making box plot. names(data) boxplot(data$V3 ~ data$V2,xlab="nationality",ylab="time",col=c(3,4),mai...
/pro4.R
no_license
mariam2624/Developed-Multiple-Regression-Model-and-Parsimonious-Model
R
false
false
861
r
#Importing the data in R and printing first 5 observations. data=read.table("http://users.stat.ufl.edu/~winner/data/nuclear_time.dat") head(data,5) #Displaying the completion time of the task based on nationality by making box plot. names(data) boxplot(data$V3 ~ data$V2,xlab="nationality",ylab="time",col=c(3,4),mai...
# Code for plotting a map of the states and provinces with CC sites library(sf) library(tidyverse) library(tmap) source('code/reading_datafiles_without_users.r') # States with CC sites states = unique(sites$Region) #states <- c("NC", "MA", "MD", "CT", "MI", "ON", "VA", "SC", "TN", "NY", # "GA", "CA", "OR"...
/code/map_of_CC_states_provinces.r
no_license
cjcampbell/caterpillars-analysis-public
R
false
false
1,253
r
# Code for plotting a map of the states and provinces with CC sites library(sf) library(tidyverse) library(tmap) source('code/reading_datafiles_without_users.r') # States with CC sites states = unique(sites$Region) #states <- c("NC", "MA", "MD", "CT", "MI", "ON", "VA", "SC", "TN", "NY", # "GA", "CA", "OR"...
# R_quartile_computations ################################################################################ # This script shows how to use the R quantile function to computer the quartiles # of a distribution. We will use the data set USArrests which is p[rovided by # R. # # This data set contains statistics, in arre...
/Quantile_computation/Quantiles_Computation.R
no_license
gitHubSlinkman/Quora
R
false
false
2,799
r
# R_quartile_computations ################################################################################ # This script shows how to use the R quantile function to computer the quartiles # of a distribution. We will use the data set USArrests which is p[rovided by # R. # # This data set contains statistics, in arre...
# READ FILE, FORMAT IT, GET THE NECESSARY SUBSET setwd("D:\\Coursera\\course 4") hpc <- read.delim2("household_power_consumption.txt", sep=';', header=T, dec='.',na.strings='?', stringsAsFactor=F, colClasses=c(rep("character", 2), rep("numeric", 7))) # convert time and date charcter strings to time...
/plot2.R
no_license
tm2222/ExData_Plotting1
R
false
false
910
r
# READ FILE, FORMAT IT, GET THE NECESSARY SUBSET setwd("D:\\Coursera\\course 4") hpc <- read.delim2("household_power_consumption.txt", sep=';', header=T, dec='.',na.strings='?', stringsAsFactor=F, colClasses=c(rep("character", 2), rep("numeric", 7))) # convert time and date charcter strings to time...
library(tidyverse) setwd("/home/wrszemsrgyercqh/an_work/EU") pc.url <- readRDS("./data/work/pc_url.RDS") m.url <- readRDS("./data/work/m_url.RDS") pc.url <- pc.url %>% select(-c(url)) URL1 <- rbind(pc.url, m.url) rm(pc.url, m.url) # Need to make sure we only have logs before survey data collection URL1 <- URL1 %...
/src/01_prep/0_2_3_track_prep_durdomains.R
no_license
liyi3344520/euro_news
R
false
false
12,468
r
library(tidyverse) setwd("/home/wrszemsrgyercqh/an_work/EU") pc.url <- readRDS("./data/work/pc_url.RDS") m.url <- readRDS("./data/work/m_url.RDS") pc.url <- pc.url %>% select(-c(url)) URL1 <- rbind(pc.url, m.url) rm(pc.url, m.url) # Need to make sure we only have logs before survey data collection URL1 <- URL1 %...
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
/myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615764994-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,803
r
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
write_log<-function(log, folder, file = NULL){ if (is.null(file)){ out_dlgDir = dlgSave(default = folder, title = "Save as", gui = .GUI) out_txt = paste(strsplit(out_dlgDir$res,"/")[[1]],collapse = "/") } else { out_txt = file; } if (!endsWith(out_txt,".txt")){out_txt = paste(out_txt, ".txt...
/R/write_log.R
no_license
marcus-waldman/credicpp
R
false
false
516
r
write_log<-function(log, folder, file = NULL){ if (is.null(file)){ out_dlgDir = dlgSave(default = folder, title = "Save as", gui = .GUI) out_txt = paste(strsplit(out_dlgDir$res,"/")[[1]],collapse = "/") } else { out_txt = file; } if (!endsWith(out_txt,".txt")){out_txt = paste(out_txt, ".txt...
# Akash Lodha # Data Science Specialisation - Coursera # Course 3 - Getting and cleading data # Quiz 3 # Question 1 # The American Community Survey distributes downloadable data about United States communities. Download the 2006 microdata survey about housing for the state of Idaho using download.file() from here: # ...
/GEttingAndCleaningData/q3.R
no_license
lodhaakash07/DataScienceTrack
R
false
false
3,603
r
# Akash Lodha # Data Science Specialisation - Coursera # Course 3 - Getting and cleading data # Quiz 3 # Question 1 # The American Community Survey distributes downloadable data about United States communities. Download the 2006 microdata survey about housing for the state of Idaho using download.file() from here: # ...
##' Computes the Expected Feasible Improvement at current location. ##' The current feasible minimum of the observations can be replaced by an arbitrary value (plugin), which is usefull in particular in noisy frameworks. ##' ##' @title Expected Feasible Improvement ##' ##' @param x a vector representing the input fo...
/R/crit_EFI.R
no_license
cran/DiceOptim
R
false
false
10,538
r
##' Computes the Expected Feasible Improvement at current location. ##' The current feasible minimum of the observations can be replaced by an arbitrary value (plugin), which is usefull in particular in noisy frameworks. ##' ##' @title Expected Feasible Improvement ##' ##' @param x a vector representing the input fo...
#' Timeline #' #' Set timeline options #' #' @inheritParams e_bar #' @param axis_type Type of axis, \code{time}, \code{value}, or \code{category} #' @param ... Named options. #' #' @section Functions: #' \itemize{ #' \item{\code{e_timeline_opts}: Pass general timeline options, see \href{https://ecomfe.github.io/e...
/R/timeline.R
permissive
Aden2018/echarts4r
R
false
false
2,028
r
#' Timeline #' #' Set timeline options #' #' @inheritParams e_bar #' @param axis_type Type of axis, \code{time}, \code{value}, or \code{category} #' @param ... Named options. #' #' @section Functions: #' \itemize{ #' \item{\code{e_timeline_opts}: Pass general timeline options, see \href{https://ecomfe.github.io/e...
#' @title FUNCTION_TITLE #' @description FUNCTION_DESCRIPTION #' @param ras a rasterlayer or brick #' @return one layer or brick per non-NA value in the input raster. Don't use with floats. #' @details DETAILS #' @examples #' \dontrun{ #' if (interactive()) { #' # EXAMPLE1 #' } #' } #' @rdname create_categorical_rast...
/mbg/mbg_core_code/mbg_central/LBDCore/R/create_categorical_raster.R
no_license
The-Oxford-GBD-group/typhi_paratyphi_modelling_code
R
false
false
1,032
r
#' @title FUNCTION_TITLE #' @description FUNCTION_DESCRIPTION #' @param ras a rasterlayer or brick #' @return one layer or brick per non-NA value in the input raster. Don't use with floats. #' @details DETAILS #' @examples #' \dontrun{ #' if (interactive()) { #' # EXAMPLE1 #' } #' } #' @rdname create_categorical_rast...
## —————————————————————————————————————————————————————————————————————— ## Analyse de données compositionnelles ## par création d'un graphe et recherche de structures dans ce graphe ## ## © Emmanuel Curis, novembre 2017 ## ## Simuler le comportement sous H0 « complet » ## ————————————————————————————————————————————...
/R/simuler_H0.R
no_license
cran/SARP.compo
R
false
false
15,786
r
## —————————————————————————————————————————————————————————————————————— ## Analyse de données compositionnelles ## par création d'un graphe et recherche de structures dans ce graphe ## ## © Emmanuel Curis, novembre 2017 ## ## Simuler le comportement sous H0 « complet » ## ————————————————————————————————————————————...
################################################# ### SCRIPT TO ANALYZE CODON AUTOCORRELATION ### ################################################# # Eva Maria Novoa, August 2013 # STEPS: # 1. BUILD OBSERVED CODON CO-OCURRENCE MATRICES AND CODON COUNT VECTORS for each AA ### # 2. METHOD 1: COMPUTES for each pair, S...
/results_examples_fast/Saccharomyces_cerevisiae.CDS.fa.codon_counts.merged.FIXED.R
permissive
enovoa/codonAutocorrelation
R
false
false
27,300
r
################################################# ### SCRIPT TO ANALYZE CODON AUTOCORRELATION ### ################################################# # Eva Maria Novoa, August 2013 # STEPS: # 1. BUILD OBSERVED CODON CO-OCURRENCE MATRICES AND CODON COUNT VECTORS for each AA ### # 2. METHOD 1: COMPUTES for each pair, S...
#' @rdname plot.pred.accuracy #' @export plot.Diffepoce <- function(x,...) { if (!inherits(x, "Diffepoce")) stop("use only with \"Diffepoce\" objects") #if (is.null(ylim) & all(is.na(x$DiffEPOCE[,3]))|all(is.na(x$DiffEPOCE[,4]))) stop("can't produce the plot with missing differences in EPOCE") if (all(is.na(x$Dif...
/R/plot.Diffepoce.R
no_license
claire-d/lcmm
R
false
false
4,396
r
#' @rdname plot.pred.accuracy #' @export plot.Diffepoce <- function(x,...) { if (!inherits(x, "Diffepoce")) stop("use only with \"Diffepoce\" objects") #if (is.null(ylim) & all(is.na(x$DiffEPOCE[,3]))|all(is.na(x$DiffEPOCE[,4]))) stop("can't produce the plot with missing differences in EPOCE") if (all(is.na(x$Dif...
###Consolidates functions from Optmatch and Matchit and provides options to produce multiple types of matches. User can also use nonglm generated psm scores if desired but defaults to glm distances. ############Nearest Neighbor Matching################## Nearest_Match_fn<-function(Matchingcovs_PSM,Treatvar,ID_vars,incl...
/PSM_datatable_funs.R
no_license
MT-JJ/Propensity-Score-Matching
R
false
false
17,221
r
###Consolidates functions from Optmatch and Matchit and provides options to produce multiple types of matches. User can also use nonglm generated psm scores if desired but defaults to glm distances. ############Nearest Neighbor Matching################## Nearest_Match_fn<-function(Matchingcovs_PSM,Treatvar,ID_vars,incl...
# # 實例ch11_13.R # ch11_13 <- function( x, Xfun = round, ...) { x.percent <- Xfun(x * 100, ...) #執行轉換 paste(x.percent, sep = "", "%") #加上百分比和輸出 }
/R語言邁向Big Data之路程式範例/ch11/ch11_13.R
no_license
jtlai0921/XB1701-
R
false
false
194
r
# # 實例ch11_13.R # ch11_13 <- function( x, Xfun = round, ...) { x.percent <- Xfun(x * 100, ...) #執行轉換 paste(x.percent, sep = "", "%") #加上百分比和輸出 }
#' Update regimen list user #' @export update_regimen_list_user <- function(user = NULL) { regs <- dir(paste0("/data/tbsim/", user, "/regimens"), pattern = ".rds") regs_info <- list() for(i in seq(regs)) { tmp <- readRDS(file = paste0("/data/tbsim/", user, "/regimens", "/", regs[i])) regs_info[[tmp$name]]...
/tbsim_app/R/update_regimen_list_user.R
no_license
saviclab/TBsim
R
false
false
354
r
#' Update regimen list user #' @export update_regimen_list_user <- function(user = NULL) { regs <- dir(paste0("/data/tbsim/", user, "/regimens"), pattern = ".rds") regs_info <- list() for(i in seq(regs)) { tmp <- readRDS(file = paste0("/data/tbsim/", user, "/regimens", "/", regs[i])) regs_info[[tmp$name]]...
##' convert gv (grViz object, output of DiagrammeR) to image file ##' ##' ##' @title gv2file ##' @param gv grViz object ##' @param file output file ##' @param width width ##' @param height height ##' @return raw ##' @author Guangchuang ## @importFrom DiagrammeRsvg export_svg ##' @importFrom rsvg rsvg_pdf ##' @importFr...
/R/gv2file.R
no_license
GuangchuangYu/yyplot
R
false
false
1,071
r
##' convert gv (grViz object, output of DiagrammeR) to image file ##' ##' ##' @title gv2file ##' @param gv grViz object ##' @param file output file ##' @param width width ##' @param height height ##' @return raw ##' @author Guangchuang ## @importFrom DiagrammeRsvg export_svg ##' @importFrom rsvg rsvg_pdf ##' @importFr...
\name{r.pairs} \alias{r.pairs} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Observed and Random Repeated Pairs Coefficients } \description{ Function ``r.pairs'' calculates Observed and Random Repeated Pairs Coefficients starting from tables of observed couples of surnames frequencies in...
/man/r.pairs.Rd
no_license
cran/Biodem
R
false
false
3,256
rd
\name{r.pairs} \alias{r.pairs} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Observed and Random Repeated Pairs Coefficients } \description{ Function ``r.pairs'' calculates Observed and Random Repeated Pairs Coefficients starting from tables of observed couples of surnames frequencies in...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/codegurureviewer_operations.R \name{codegurureviewer_list_recommendation_feedback} \alias{codegurureviewer_list_recommendation_feedback} \title{Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedb...
/paws/man/codegurureviewer_list_recommendation_feedback.Rd
permissive
sanchezvivi/paws
R
false
true
2,151
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/codegurureviewer_operations.R \name{codegurureviewer_list_recommendation_feedback} \alias{codegurureviewer_list_recommendation_feedback} \title{Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedb...
validate_association <- function(entity.attribute, message=TRUE){ ### should have 2 columns err.msg <- 'The entity attribute structure must have only 2 columns: first representing the entities (genes) and the second the attributes !' if(is.null(dim(entity.attribute)) ){ stop(err.msg) } else { if( dim(ent...
/R/validate_association.R
no_license
pasculescu/ClusterJudge
R
false
false
745
r
validate_association <- function(entity.attribute, message=TRUE){ ### should have 2 columns err.msg <- 'The entity attribute structure must have only 2 columns: first representing the entities (genes) and the second the attributes !' if(is.null(dim(entity.attribute)) ){ stop(err.msg) } else { if( dim(ent...
#read the assigned data. data <- read.table("household_power_consumption.txt",sep = ";",header = TRUE,na.strings = "?") #redefine date variable and define datetime variable data$Date <- as.Date(data$Date, format = "%d/%m/%Y") data$DateTime <- strptime(paste(data$Date,data$Time), ...
/Plot1.R
no_license
egekamber/JHU-ExpDataAnalysis-PR-W1
R
false
false
816
r
#read the assigned data. data <- read.table("household_power_consumption.txt",sep = ";",header = TRUE,na.strings = "?") #redefine date variable and define datetime variable data$Date <- as.Date(data$Date, format = "%d/%m/%Y") data$DateTime <- strptime(paste(data$Date,data$Time), ...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 73221 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 73221 c c Input Parameter (command line, file): c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc03-nonuniform-...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/trafficlight-controller/tlc03-nonuniform-depth-77/tlc03-nonuniform-depth-77.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
695
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 73221 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 73221 c c Input Parameter (command line, file): c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc03-nonuniform-...
#' --- #' title: Note from Advanced R (Hadley Wickham and Thomas Mailund) #' output: #' html_document: #' toc: true #' highlight: zenburn #' --- #' <!-- rmarkdown::render("supervised_play/nice_code.R") --> #' <!-- [See here.](http://brooksandrew.github.io/simpleblog/articles/render-reports-directly-from-R-...
/blog/supervised_play/nice_code.R
no_license
chumbleycode/chumbleycode.github.io
R
false
false
16,532
r
#' --- #' title: Note from Advanced R (Hadley Wickham and Thomas Mailund) #' output: #' html_document: #' toc: true #' highlight: zenburn #' --- #' <!-- rmarkdown::render("supervised_play/nice_code.R") --> #' <!-- [See here.](http://brooksandrew.github.io/simpleblog/articles/render-reports-directly-from-R-...
context("cologne") ## Test the Cologne algorithm test <- read.csv("cologne.csv", comment.char="#", stringsAsFactors = FALSE, colClasses = c("character", "character"), encoding = "UTF-8") for(i in 1:nrow(test)) expect_true(cologne(test$word[i]) == test$value[i]) test$test <- cologne(test$word) for(i in 1:nrow(test))...
/tests/testthat/test-cologne.R
no_license
ipea/phonics
R
false
false
366
r
context("cologne") ## Test the Cologne algorithm test <- read.csv("cologne.csv", comment.char="#", stringsAsFactors = FALSE, colClasses = c("character", "character"), encoding = "UTF-8") for(i in 1:nrow(test)) expect_true(cologne(test$word[i]) == test$value[i]) test$test <- cologne(test$word) for(i in 1:nrow(test))...
# Exercise 2: writing and executing functions (II) # Write a function `CompareLength` that takes in 2 vectors, and returns the sentence: # "The difference in lengths is N" CompareLength <- function(v1, v2) { return (paste("The differenece in lengths is", length(v1) - length(v2))) } # Pass two vectors of different l...
/exercise-2/exercise.R
permissive
cmihran/m7-functions
R
false
false
1,537
r
# Exercise 2: writing and executing functions (II) # Write a function `CompareLength` that takes in 2 vectors, and returns the sentence: # "The difference in lengths is N" CompareLength <- function(v1, v2) { return (paste("The differenece in lengths is", length(v1) - length(v2))) } # Pass two vectors of different l...
# Load the ggplot2 package which provides # the 'mpg' dataset. library(ggplot2) fluidPage( titlePanel("Basic DataTable"), # Create a new Row in the UI for selectInputs fluidRow( column(4, selectInput("man", "Manufacturer:", c("All", uniqu...
/030-basic-datatable/ui.R
permissive
rstudio/shiny-examples
R
false
false
774
r
# Load the ggplot2 package which provides # the 'mpg' dataset. library(ggplot2) fluidPage( titlePanel("Basic DataTable"), # Create a new Row in the UI for selectInputs fluidRow( column(4, selectInput("man", "Manufacturer:", c("All", uniqu...
#function that returns the team's Efficiency Score #a metric based off of Points Per Game divided by Shot % taken by the team in a #game on average efficiency_score <- function(team) { team_var <- MLS_shot[ which(MLS_shot$Team==team), ] team_var2 <- MLS_shot[ which(MLS_shot$Opponent==team), ] SF <- sum(team_var...
/R/efficiency_score.R
no_license
BJamesLebo/MajorLeagueSoccR
R
false
false
568
r
#function that returns the team's Efficiency Score #a metric based off of Points Per Game divided by Shot % taken by the team in a #game on average efficiency_score <- function(team) { team_var <- MLS_shot[ which(MLS_shot$Team==team), ] team_var2 <- MLS_shot[ which(MLS_shot$Opponent==team), ] SF <- sum(team_var...
context("track.R") user <- c("platyjus", "slothsonian") tracks <- data.frame( track = c("King Kunta", "DNA", "Depreston"), artist = c("Kendrick Lamar", "Kendrick Lamar", "Courtney Barnett"), stringsAsFactors = FALSE ) test_that("`track_getCorrection` works", { res <- track_getCorrection("Mrbrownstone", "guns ...
/tests/testthat/test-track.R
no_license
juyeongkim/lastfmr
R
false
false
1,131
r
context("track.R") user <- c("platyjus", "slothsonian") tracks <- data.frame( track = c("King Kunta", "DNA", "Depreston"), artist = c("Kendrick Lamar", "Kendrick Lamar", "Courtney Barnett"), stringsAsFactors = FALSE ) test_that("`track_getCorrection` works", { res <- track_getCorrection("Mrbrownstone", "guns ...
alpha <- 0 beta1 <- 0 beta2 <- 0 sigma_sq <- 1 mu <- c(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,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,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,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...
/test/integration/example-models/bugs_examples/vol1/oxford/oxford.init.R
permissive
nhuurre/stanc3
R
false
false
605
r
alpha <- 0 beta1 <- 0 beta2 <- 0 sigma_sq <- 1 mu <- c(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,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,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,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...
.plot_side_cube <- function(ra, fi, side, col = colorRamp(palette(heat.colors(100))), ncol = ncol, nrow = nrow) { if (side == 1) { test <- spectra(getValuesBlock(ra, row = nrow[1], nrows = 1, col = 1)) png_height <- nrow(ra) } if (side == 2) { test <- spectra(getValuesBlock(ra, row = 1, nrows = n...
/R/plot_HyperSpec_cube.R
no_license
keltoskytoi/hsdar
R
false
false
3,715
r
.plot_side_cube <- function(ra, fi, side, col = colorRamp(palette(heat.colors(100))), ncol = ncol, nrow = nrow) { if (side == 1) { test <- spectra(getValuesBlock(ra, row = nrow[1], nrows = 1, col = 1)) png_height <- nrow(ra) } if (side == 2) { test <- spectra(getValuesBlock(ra, row = 1, nrows = n...
library(MVLM) ### Name: MVLM-package ### Title: Multivariate Linear Model with Analytic p-values ### Aliases: MVLM MVLM-package ### ** Examples data(mvlmdata) Y <- as.matrix(Y.mvlm) mvlm.res <- mvlm(Y ~ Cont + Cat + Ord, data = X.mvlm) summary(mvlm.res)
/data/genthat_extracted_code/MVLM/examples/MVLM-package.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
262
r
library(MVLM) ### Name: MVLM-package ### Title: Multivariate Linear Model with Analytic p-values ### Aliases: MVLM MVLM-package ### ** Examples data(mvlmdata) Y <- as.matrix(Y.mvlm) mvlm.res <- mvlm(Y ~ Cont + Cat + Ord, data = X.mvlm) summary(mvlm.res)
require (ggplot2) library (data.table) library(plyr) library(dplyr) library(gridExtra) library(TTR) library(zoo) library(RColorBrewer) library(reshape) library(lubridate) library(lme4) library(strucchange) library(tree) library(httr) #API library(jsonlite) #API library(rlist) library(googledrive) library(RCurl) library...
/NDVIGroundwater_paired.R
permissive
melrohde/CA_RiparianGDE
R
false
false
5,938
r
require (ggplot2) library (data.table) library(plyr) library(dplyr) library(gridExtra) library(TTR) library(zoo) library(RColorBrewer) library(reshape) library(lubridate) library(lme4) library(strucchange) library(tree) library(httr) #API library(jsonlite) #API library(rlist) library(googledrive) library(RCurl) library...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mvn_mar_10_nbbc.fiml.R \name{mvn_mar_10_nbbc.fiml_simulation} \alias{mvn_mar_10_nbbc.fiml_simulation} \title{Nonparametric Bootstrap with Bis-Corrected Confidence Intervals for Indirect Effect in a Simple Mediation Model for Data Generated fr...
/man/mvn_mar_10_nbbc.fiml_simulation.Rd
permissive
jeksterslabds/jeksterslabRmedsimple
R
false
true
13,957
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mvn_mar_10_nbbc.fiml.R \name{mvn_mar_10_nbbc.fiml_simulation} \alias{mvn_mar_10_nbbc.fiml_simulation} \title{Nonparametric Bootstrap with Bis-Corrected Confidence Intervals for Indirect Effect in a Simple Mediation Model for Data Generated fr...
\name{train_model_list} \alias{train_model_list} \alias{models} \title{A List of Available Models in train} \description{These models are included in the package via wrappers for \code{\link{train}}. Custom models can also be created. See the URL below. \strong{AdaBoost.M1} (\code{method = 'AdaBoost.M1'}) For classif...
/pkg/caret/man/models.Rd
no_license
terrytangyuan/caret
R
false
false
50,449
rd
\name{train_model_list} \alias{train_model_list} \alias{models} \title{A List of Available Models in train} \description{These models are included in the package via wrappers for \code{\link{train}}. Custom models can also be created. See the URL below. \strong{AdaBoost.M1} (\code{method = 'AdaBoost.M1'}) For classif...
outdegree2 <- function(y){ stopifnot(is.adjacency(y)) outdegree <- numeric(nrow(y)) tabrs <- table(rowSums(y)) not0 <- as.numeric(names(tabrs)) outdegree[not0 + 1] <- tabrs outdegree }
/R/outdegree2.R
no_license
igollini/lvm4net
R
false
false
199
r
outdegree2 <- function(y){ stopifnot(is.adjacency(y)) outdegree <- numeric(nrow(y)) tabrs <- table(rowSums(y)) not0 <- as.numeric(names(tabrs)) outdegree[not0 + 1] <- tabrs outdegree }
# og.file <- "LF82_B2_selected_fna/faa/Results_Dec21/Orthogroups.csv" # c.file <- "LF82_B2_graph/prob_window_complexity_contig_NC_011993.1.txt" # strain <- "GCF_000284495.1_ASM28449v1_genomic" calc_tab <- function(c.file, og.file, strain, logTranform){ og. <- fread(og.file, head=TRUE) og. <- data.frame(og.$V1, og...
/Figure_6/compare_strains/functions.r
no_license
paraslonic/GCBPaperCode
R
false
false
2,675
r
# og.file <- "LF82_B2_selected_fna/faa/Results_Dec21/Orthogroups.csv" # c.file <- "LF82_B2_graph/prob_window_complexity_contig_NC_011993.1.txt" # strain <- "GCF_000284495.1_ASM28449v1_genomic" calc_tab <- function(c.file, og.file, strain, logTranform){ og. <- fread(og.file, head=TRUE) og. <- data.frame(og.$V1, og...
/RVSWF/R/RWG.R
no_license
aneves76/R-VSWF
R
false
false
2,177
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{ortho.proj} \alias{ortho.proj} \title{Orthogonal projection of observed cases onto road network.} \format{A data frame with 5 variable that records the position of the orthogonal projection of the 578 cases onto th...
/man/ortho.proj.Rd
no_license
Adrian49/cholera
R
false
true
803
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{ortho.proj} \alias{ortho.proj} \title{Orthogonal projection of observed cases onto road network.} \format{A data frame with 5 variable that records the position of the orthogonal projection of the 578 cases onto th...
#################################################### # R code for processing MiniPAM data # # written by: Marguerite Mauritz # # and Maria Franco Saenz # # June 1, 2020 # #################################################### #...
/PAMData/PAM_data_Processing_20200818.R
no_license
MargueriteM/Jornada_Tweedie
R
false
false
89,595
r
#################################################### # R code for processing MiniPAM data # # written by: Marguerite Mauritz # # and Maria Franco Saenz # # June 1, 2020 # #################################################### #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/themes.r \name{theme_hrbrmstr_my} \alias{theme_hrbrmstr_my} \title{Myriad Pro theme} \usage{ theme_hrbrmstr_my(...) } \description{ Myriad Pro theme }
/man/theme_hrbrmstr_my.Rd
no_license
tpopenfoose/hrbrmisc
R
false
true
230
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/themes.r \name{theme_hrbrmstr_my} \alias{theme_hrbrmstr_my} \title{Myriad Pro theme} \usage{ theme_hrbrmstr_my(...) } \description{ Myriad Pro theme }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TopicFunctions.R \name{jgc} \alias{jgc} \title{Clean the java environment.} \usage{ jgc() } \description{ Function cleans the java environment. This is a great command. Run it whenever you feel like it. } \examples{ jgc() } \seealso{ \code{\l...
/man/jgc.Rd
permissive
qcmuu/eparTextTools
R
false
true
334
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TopicFunctions.R \name{jgc} \alias{jgc} \title{Clean the java environment.} \usage{ jgc() } \description{ Function cleans the java environment. This is a great command. Run it whenever you feel like it. } \examples{ jgc() } \seealso{ \code{\l...
#' str_detect_any #' #' @param x (character) Input vector. Either a character vector, or something coercible to one. #' @param patterns (character) One or more patterns to match. #' @param ignore_case (logical) Passed to [stringr::str_detect()]. #' @param negate (logical) Passed to [stringr::str_detect()]. #' #' @retur...
/R/str_detect_any.R
no_license
BAAQMD/strtools
R
false
false
701
r
#' str_detect_any #' #' @param x (character) Input vector. Either a character vector, or something coercible to one. #' @param patterns (character) One or more patterns to match. #' @param ignore_case (logical) Passed to [stringr::str_detect()]. #' @param negate (logical) Passed to [stringr::str_detect()]. #' #' @retur...
## plot2.R ## ## Author: Ted Randall ## Date: 2/5/2015 ## Setup filename constants data_source_url <- "https://d396qusza40orc.cloudfront.net/exdata/data/" data_zip_filename <- "household_power_consumption.zip" data_filename <- "household_power_consumption.txt" output_filename <- "plot2.png" ## Check if the data file ...
/plot2.R
no_license
theoco/ExData_Plotting1
R
false
false
1,593
r
## plot2.R ## ## Author: Ted Randall ## Date: 2/5/2015 ## Setup filename constants data_source_url <- "https://d396qusza40orc.cloudfront.net/exdata/data/" data_zip_filename <- "household_power_consumption.zip" data_filename <- "household_power_consumption.txt" output_filename <- "plot2.png" ## Check if the data file ...
library(project.init) project.init2("GBMatch") submission_dir="/data/groups/lab_bock/jklughammer/projects/Glioblastoma_match/forDataSubmission" out_dir=file.path(submission_dir) dir.create(file.path(out_dir,"christoph_bock/processed_data"), recursive=TRUE) dir.create(file.path(submission_dir,"raw_data"), recursive=T...
/R/sandbox/GBMatch-master/src/99-data_submission.R
no_license
mkyriak/FRONTIER
R
false
false
2,925
r
library(project.init) project.init2("GBMatch") submission_dir="/data/groups/lab_bock/jklughammer/projects/Glioblastoma_match/forDataSubmission" out_dir=file.path(submission_dir) dir.create(file.path(out_dir,"christoph_bock/processed_data"), recursive=TRUE) dir.create(file.path(submission_dir,"raw_data"), recursive=T...
function (x, y) { e <- get("data.env", .GlobalEnv) e[["Approx_Match_C"]][[length(e[["Approx_Match_C"]]) + 1]] <- list(x = x, y = y) .Call("_BoostMLR_Approx_Match_C", x, y) }
/valgrind_test_dir/Approx_Match_C-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
196
r
function (x, y) { e <- get("data.env", .GlobalEnv) e[["Approx_Match_C"]][[length(e[["Approx_Match_C"]]) + 1]] <- list(x = x, y = y) .Call("_BoostMLR_Approx_Match_C", x, y) }
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(readr) library(shiny) library(shinydashboard) library(shinyWidgets) library(shinythemes) li...
/app.R
no_license
MaybeT/Biotic
R
false
false
1,523
r
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(readr) library(shiny) library(shinydashboard) library(shinyWidgets) library(shinythemes) li...
library(ggplot2) library(plyr) library(dplyr) crimes <- read.csv("~/Documents/Data_science_Club/R_Tutorials/crime.csv") crimes <- crimes[, 2:ncol(crimes)] numberOfRows <- nrow(crimes) numberOfCols <- ncol(crimes) # distinct types of crimes crimeCategories <- unique(crimes$Category) # Don't touch this print(paste("T...
/heat map of crimes (sf).R
no_license
brandynm34/Crime-heat-map-R
R
false
false
2,663
r
library(ggplot2) library(plyr) library(dplyr) crimes <- read.csv("~/Documents/Data_science_Club/R_Tutorials/crime.csv") crimes <- crimes[, 2:ncol(crimes)] numberOfRows <- nrow(crimes) numberOfCols <- ncol(crimes) # distinct types of crimes crimeCategories <- unique(crimes$Category) # Don't touch this print(paste("T...
# Function to test inputs for tskrr etc. # This function tests the input for all fitting functions. # Put checkna = FALSE if NA values are allowed in y. # It returns a list with the following elements: # - lambda.k # - lambda.g # - homogenous .test_input <- function(y,k,g, lambda = 1e-4, ...
/R/test_input.R
no_license
MichielStock/xnet
R
false
false
1,901
r
# Function to test inputs for tskrr etc. # This function tests the input for all fitting functions. # Put checkna = FALSE if NA values are allowed in y. # It returns a list with the following elements: # - lambda.k # - lambda.g # - homogenous .test_input <- function(y,k,g, lambda = 1e-4, ...
# ------------------------------------------------------------------------------------------- #' @noRd # quiet from hadley # https://stackoverflow.com/questions/34208564/how-to-hide-or-disable-in-function-printed-message/34208658#34208658 quiet <- function(x) { sink(tempfile()) on.exit(sink()) invisible(force(...
/R/utils.R
permissive
nickbrazeau/polySimIBD
R
false
false
626
r
# ------------------------------------------------------------------------------------------- #' @noRd # quiet from hadley # https://stackoverflow.com/questions/34208564/how-to-hide-or-disable-in-function-printed-message/34208658#34208658 quiet <- function(x) { sink(tempfile()) on.exit(sink()) invisible(force(...
library(tidyverse) library(fs) # Load in data ---- polls_raw0 <- read_csv("data/input/surveys/538/polls_2020.csv") names_recode <- read_csv("data/input/surveys/538/pollster_name_recode.csv") # Main identifiers ------ polls_raw1 <- polls_raw0 %>% mutate( start_date = as.Date(start_date, "%m/%d/%y"), end_dat...
/code/04b_standardize-538-2020-polls.R
no_license
kuriwaki/ddi_polls_HDSR
R
false
false
2,357
r
library(tidyverse) library(fs) # Load in data ---- polls_raw0 <- read_csv("data/input/surveys/538/polls_2020.csv") names_recode <- read_csv("data/input/surveys/538/pollster_name_recode.csv") # Main identifiers ------ polls_raw1 <- polls_raw0 %>% mutate( start_date = as.Date(start_date, "%m/%d/%y"), end_dat...