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
library(reshape2) library(ncdf4) library(MuMIn) library(zoo) library(nlme) library(dplyr) library(chron) library(fields) library(maps) library(mapdata) library(tidyr) # load and process the PDO names <- read.table("~pdo", skip=30, nrows=1, as.is = T) pdo <- read.table("~pdo", skip=31, nrows=119, fill=T, col.names = na...
/code_archive/NCEP NCAR wind stress regression on PDO.R
no_license
OcnAtmCouplingAndClimateForcing/non-som
R
false
false
11,178
r
library(reshape2) library(ncdf4) library(MuMIn) library(zoo) library(nlme) library(dplyr) library(chron) library(fields) library(maps) library(mapdata) library(tidyr) # load and process the PDO names <- read.table("~pdo", skip=30, nrows=1, as.is = T) pdo <- read.table("~pdo", skip=31, nrows=119, fill=T, col.names = na...
#' Get the weight-at-age data frame for the acoustic survey #' #' @param d #' #' @return a data frame #' @export get_surv_wa <- function(d){ keep_yrs <- c(1995, 1998, 2001, 2003, 2009, 2011, 2012) all_yrs <- unique(d$year) remain_yrs <- all_yrs[all_yrs > 2012] keep_yrs <- sort(c(keep_yrs, remain_yrs[as.logical...
/R/get-wa.R
no_license
pbs-assess/hakedata
R
false
false
2,734
r
#' Get the weight-at-age data frame for the acoustic survey #' #' @param d #' #' @return a data frame #' @export get_surv_wa <- function(d){ keep_yrs <- c(1995, 1998, 2001, 2003, 2009, 2011, 2012) all_yrs <- unique(d$year) remain_yrs <- all_yrs[all_yrs > 2012] keep_yrs <- sort(c(keep_yrs, remain_yrs[as.logical...
library(tm) #Chargement des données de la saga Harry potter: hp=VCorpus(DirSource("/home/abdelali/Documents/ETU/Logiciel R/tm_Harrypotter/tm/",encoding = "UTF-8")) inspect(hp) #netoyage des données : hp=tm_map(hp,stripWhitespace) hp=tm_map(hp, removePunctuation) hp=tm_map(hp, content_transformer(tolower)) hp=tm_map(...
/textMining_Harry potter.R
no_license
alimanager/Rproject
R
false
false
6,110
r
library(tm) #Chargement des données de la saga Harry potter: hp=VCorpus(DirSource("/home/abdelali/Documents/ETU/Logiciel R/tm_Harrypotter/tm/",encoding = "UTF-8")) inspect(hp) #netoyage des données : hp=tm_map(hp,stripWhitespace) hp=tm_map(hp, removePunctuation) hp=tm_map(hp, content_transformer(tolower)) hp=tm_map(...
#Placar do jogo library(rvest) library(xml2) library(stringr) url<- 'https://noticias.bol.uol.com.br/esporte/campeonato/brasileirao/2016/jogos/' webpage<- read_html(url) res_html <- html_nodes(webpage,'.confronto') res_data <- html_text(res_html) res_data<- str_replace_all(res_data, "[\r\n]", "") head(res_data) ...
/web-scrapping.R
no_license
acf77/web-scrapping
R
false
false
328
r
#Placar do jogo library(rvest) library(xml2) library(stringr) url<- 'https://noticias.bol.uol.com.br/esporte/campeonato/brasileirao/2016/jogos/' webpage<- read_html(url) res_html <- html_nodes(webpage,'.confronto') res_data <- html_text(res_html) res_data<- str_replace_all(res_data, "[\r\n]", "") head(res_data) ...
res.p = predict(m.res,n.ahead=12)$pred se = predict(m.res,n.ahead=12)$se ures = res.p+1.96*se lres = res.p-1.96*se C = summary(m.employ)$coefficients sigma = sqrt(deviance(m.employ)) Xt1P <- read.table("~/Dropbox/R/Time Series Project/Xt1.p", quote="\"") Xt1.p <- ts(Xt1P$V1,start = c(193), end = c(204)) Xt2p = C[2...
/predict.R
no_license
zwangcode/R_at_UC
R
false
false
795
r
res.p = predict(m.res,n.ahead=12)$pred se = predict(m.res,n.ahead=12)$se ures = res.p+1.96*se lres = res.p-1.96*se C = summary(m.employ)$coefficients sigma = sqrt(deviance(m.employ)) Xt1P <- read.table("~/Dropbox/R/Time Series Project/Xt1.p", quote="\"") Xt1.p <- ts(Xt1P$V1,start = c(193), end = c(204)) Xt2p = C[2...
DisableHIT <- disable <- function(hit = NULL, hit.type = NULL, annotation = NULL, response.group = NULL, verbose = getOption('MTurkR.verbose', TRUE), ...) { operation <- "DisableHIT" if(!is.null(response.group)) { if(any(!response.group %in% ...
/MTurkR/R/DisableHIT.R
no_license
ingted/R-Examples
R
false
false
2,859
r
DisableHIT <- disable <- function(hit = NULL, hit.type = NULL, annotation = NULL, response.group = NULL, verbose = getOption('MTurkR.verbose', TRUE), ...) { operation <- "DisableHIT" if(!is.null(response.group)) { if(any(!response.group %in% ...
\name{NMES1988} \alias{NMES1988} \title{Demand for Medical Care in NMES 1988} \description{ Cross-section data originating from the US National Medical Expenditure Survey (NMES) conducted in 1987 and 1988. The NMES is based upon a representative, national probability sample of the civilian non-institutionalized popul...
/man/NMES1988.Rd
no_license
arubhardwaj/AER
R
false
false
5,508
rd
\name{NMES1988} \alias{NMES1988} \title{Demand for Medical Care in NMES 1988} \description{ Cross-section data originating from the US National Medical Expenditure Survey (NMES) conducted in 1987 and 1988. The NMES is based upon a representative, national probability sample of the civilian non-institutionalized popul...
# ~/github/dora/notebooks/AD-family.UM0463F/src/fimoUtils.R #------------------------------------------------------------------------------------------------------------------------ library(RPostgreSQL) library(GenomicRanges) library(TReNA) library(FimoClient) library(RUnit) library(BSgenome.Hsapiens.UCSC.hg38) hg38 = ...
/datasets/AD-family.UM0463F/fimoUtils.R
no_license
PriceLab/dora
R
false
false
16,107
r
# ~/github/dora/notebooks/AD-family.UM0463F/src/fimoUtils.R #------------------------------------------------------------------------------------------------------------------------ library(RPostgreSQL) library(GenomicRanges) library(TReNA) library(FimoClient) library(RUnit) library(BSgenome.Hsapiens.UCSC.hg38) hg38 = ...
#' Conformal Grid #' #' Given a polygon, find the orthogonal grid from a square projected into the #' polygon. #' #' Given a orthogonal grid in (u, v) space, \code{conformal_grid} finds and #' allows one to plot the mapped grid into the polygon in (x, y) space. The (u, #' v) space is a square with vertices at (-1, -1)...
/R/conformal_grid.R
no_license
dewittpe/sccm
R
false
false
2,848
r
#' Conformal Grid #' #' Given a polygon, find the orthogonal grid from a square projected into the #' polygon. #' #' Given a orthogonal grid in (u, v) space, \code{conformal_grid} finds and #' allows one to plot the mapped grid into the polygon in (x, y) space. The (u, #' v) space is a square with vertices at (-1, -1)...
#plot4.R #input csv and select dates 2007-02-01 and 2007-02-02 dat=read.csv("./data/household_power_consumption.txt",as.is=T, sep=";",na.strings = "?") dat=dat[dat$Date %in% c("1/2/2007","2/2/2007"),] #convert coloumn Date and time to new coloumn time classess (waktu) dat$waktu=strptime(paste(dat$Date,dat$...
/plot4.R
no_license
mfarkhann/ExData_Plotting1
R
false
false
1,175
r
#plot4.R #input csv and select dates 2007-02-01 and 2007-02-02 dat=read.csv("./data/household_power_consumption.txt",as.is=T, sep=";",na.strings = "?") dat=dat[dat$Date %in% c("1/2/2007","2/2/2007"),] #convert coloumn Date and time to new coloumn time classess (waktu) dat$waktu=strptime(paste(dat$Date,dat$...
library(randomForest) library(caret) library(aws.s3) FundRatings <- read_csv("~/R_workspaces/AI_Targetting/FundRatings.csv", col_types = cols(AverageMarketValueRating = col_double(), NumberPositions = col_double(), OIPRating = col_double(), ...
/VariableImportance_FundAnalysis.R
no_license
ahmed-Q4/AI_Targetting
R
false
false
15,574
r
library(randomForest) library(caret) library(aws.s3) FundRatings <- read_csv("~/R_workspaces/AI_Targetting/FundRatings.csv", col_types = cols(AverageMarketValueRating = col_double(), NumberPositions = col_double(), OIPRating = col_double(), ...
## # dada2 processing of 096 pilot study ## following tutorial at ## https://benjjneb.github.io/dada2/tutorial.html ## Two changes had to happen from last time ## https://benjjneb.github.io/dada2/faq.html#can-i-use-dada2-with-my-454-or-ion-torrent-data ## filterAndTrim(..., maxLen=XXX) # XXX depends on the chemistry ...
/scripts/dada2work-March2018Run.R
permissive
cramjaco/Nyvac_096_Microbiome
R
false
false
2,229
r
## # dada2 processing of 096 pilot study ## following tutorial at ## https://benjjneb.github.io/dada2/tutorial.html ## Two changes had to happen from last time ## https://benjjneb.github.io/dada2/faq.html#can-i-use-dada2-with-my-454-or-ion-torrent-data ## filterAndTrim(..., maxLen=XXX) # XXX depends on the chemistry ...
#################################################################### #' Compare Variables with their Distributions #' #' Compare the distribution of a target variable vs another variable. This #' function automatically splits into quantiles for numerical variables. #' Custom and tidyverse friendly. #' #' @param data...
/R/distribution.R
no_license
Transconnectome/lares
R
false
false
12,531
r
#################################################################### #' Compare Variables with their Distributions #' #' Compare the distribution of a target variable vs another variable. This #' function automatically splits into quantiles for numerical variables. #' Custom and tidyverse friendly. #' #' @param data...
################################################## # Summarize analyses of CNBSS-I, and CNBSS-II ################################################## ################################################## # CNBSS-I data: ################################################## cnbss40 <- matrix(c(98, 19, 25214, ...
/trials_FU.R
no_license
roman-gulati/FH_Duke
R
false
false
1,973
r
################################################## # Summarize analyses of CNBSS-I, and CNBSS-II ################################################## ################################################## # CNBSS-I data: ################################################## cnbss40 <- matrix(c(98, 19, 25214, ...
# Copyright 2021 Province of British Columbia # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
/R/glance.R
permissive
beckyfisher/ssdtools
R
false
false
1,659
r
# Copyright 2021 Province of British Columbia # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
############################################################################################## ############################################################################################## ##### CREATED 1/28/2018 ##### #install.packages("lqa") ###predictors correlation of 0.2 rm(list=ls()) library("lqa") # version 1.0...
/simulation/case2b/sampleSize1000/allLasso_high_start_1.R
no_license
TingtingKayla/Stats_Robust_Causal_Estimation
R
false
false
8,699
r
############################################################################################## ############################################################################################## ##### CREATED 1/28/2018 ##### #install.packages("lqa") ###predictors correlation of 0.2 rm(list=ls()) library("lqa") # version 1.0...
# source('src/final.models.r') # # Real and fake cross-tabulations by model # # How many replications is the simulation? n <- 2 n <- 100 set.seed(202) crosstabs.real.1 <- dcast(expected.posture.df, sex + task + privacy + cleanliness ~ as.numeric(expected), value.var = 'sex', fun.aggregate = length) crosstabs.real....
/analyze/src/model.fit.r
no_license
tlevine/toilet-posture-release
R
false
false
1,575
r
# source('src/final.models.r') # # Real and fake cross-tabulations by model # # How many replications is the simulation? n <- 2 n <- 100 set.seed(202) crosstabs.real.1 <- dcast(expected.posture.df, sex + task + privacy + cleanliness ~ as.numeric(expected), value.var = 'sex', fun.aggregate = length) crosstabs.real....
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## X=makeCacheMatrix() creates a reassignable matrix that is meant to hold its inverse matrix ## X$set(x) allows us to reset the stored matrix ## X$get() returns the stored matrix ## ge...
/cachematrix.R
no_license
skiadas/ProgrammingAssignment2
R
false
false
2,934
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## X=makeCacheMatrix() creates a reassignable matrix that is meant to hold its inverse matrix ## X$set(x) allows us to reset the stored matrix ## X$get() returns the stored matrix ## ge...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_game.R, R/montyhall.R \name{create_game} \alias{create_game} \title{Create a new Monty Hall Problem game.} \usage{ create_game() create_game() } \arguments{ \item{...}{no arguments are used by the function.} } \value{ The function ret...
/man/create_game.Rd
no_license
AhmedRashwanASU/montyhallgame
R
false
true
1,886
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_game.R, R/montyhall.R \name{create_game} \alias{create_game} \title{Create a new Monty Hall Problem game.} \usage{ create_game() create_game() } \arguments{ \item{...}{no arguments are used by the function.} } \value{ The function ret...
remove(list = ls()) graphics.off() data <- read.csv("mbp_NQR_AIR12_XTT.csv", header = TRUE) ############# ###CALCULS### ############# data$result <- (data$pente * 60 * 10^6)/ (24200 * 43.6) mean <- aggregate(data$result, list(data$ajout), mean) StandErr <- function(x){ return(sd(x) / sqrt(length(x))) } se <- agg...
/mbp/XTT.R
no_license
CathyCat88/thesis
R
false
false
1,806
r
remove(list = ls()) graphics.off() data <- read.csv("mbp_NQR_AIR12_XTT.csv", header = TRUE) ############# ###CALCULS### ############# data$result <- (data$pente * 60 * 10^6)/ (24200 * 43.6) mean <- aggregate(data$result, list(data$ajout), mean) StandErr <- function(x){ return(sd(x) / sqrt(length(x))) } se <- agg...
## Libraries ---------------------------------------------------------------- library(DataExplorer) library(e1071) library("kernlab") library(neuralnet) library(caret) ## Load Dataset ---------------------------------------------------------------- mushroom_df <- read.csv("http://archive.ics.uci.edu/ml/mac...
/Supervised_Learning/SVM_ANN.R
no_license
tshrode37/Machine-Learning
R
false
false
6,654
r
## Libraries ---------------------------------------------------------------- library(DataExplorer) library(e1071) library("kernlab") library(neuralnet) library(caret) ## Load Dataset ---------------------------------------------------------------- mushroom_df <- read.csv("http://archive.ics.uci.edu/ml/mac...
/10-Previsao.R
no_license
vitorsouzzas/AAULA10
R
false
false
3,309
r
a<- c(6,5,7,4) b<- c("mama","papa","hijo")
/vectores.R
no_license
cristhianfgy/Practica2
R
false
false
43
r
a<- c(6,5,7,4) b<- c("mama","papa","hijo")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/s3.R \name{haystack} \alias{haystack} \alias{haystack.matrix} \alias{haystack.data.frame} \alias{haystack.Seurat} \alias{haystack.SingleCellExperiment} \title{The main Haystack function} \usage{ haystack(x, ...) \method{haystack}{matrix}( ...
/man/haystack.Rd
permissive
JunjuanZheng/singleCellHaystack
R
false
true
2,515
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/s3.R \name{haystack} \alias{haystack} \alias{haystack.matrix} \alias{haystack.data.frame} \alias{haystack.Seurat} \alias{haystack.SingleCellExperiment} \title{The main Haystack function} \usage{ haystack(x, ...) \method{haystack}{matrix}( ...
#==============================================================================# # # # Title : Automate Git # # Purpose : Define function for automating Git processes. ...
/AutomateGit.R
no_license
rmasiniexpert/VanillaNeuralNetworksInR
R
false
false
11,953
r
#==============================================================================# # # # Title : Automate Git # # Purpose : Define function for automating Git processes. ...
/data/man.r
no_license
unix-history/tropix-cmd
R
false
false
2,569
r
mcmcplot <- function(mcmcout, parms=NULL, regex=NULL, random=NULL, leaf.marker="[\\[_]", dir=tempdir(), filename="MCMCoutput", extension="html", title=NULL, heading=title, col=NULL, lty=1, xlim=NULL, ylim=NULL, style=c("gray", "plain"), greek=FALSE){ ## This must come before mcmcout is evaluated in any other expre...
/R/mcmcplot.R
no_license
cran/mcmcplots
R
false
false
3,674
r
mcmcplot <- function(mcmcout, parms=NULL, regex=NULL, random=NULL, leaf.marker="[\\[_]", dir=tempdir(), filename="MCMCoutput", extension="html", title=NULL, heading=title, col=NULL, lty=1, xlim=NULL, ylim=NULL, style=c("gray", "plain"), greek=FALSE){ ## This must come before mcmcout is evaluated in any other expre...
#++++++++++++++++++++++++++++++++++ # Captação de erros de codificacao: catch.error = function(x){ # let us create a missing value for test purpose y = NA # Try to catch that error (NA) we just created catch_error = tryCatch(tolower(x), error=function(e) e) # if not an error if (!inherits(catch_erro...
/catch_error.R
no_license
dtpapp/wordcloud2
R
false
false
477
r
#++++++++++++++++++++++++++++++++++ # Captação de erros de codificacao: catch.error = function(x){ # let us create a missing value for test purpose y = NA # Try to catch that error (NA) we just created catch_error = tryCatch(tolower(x), error=function(e) e) # if not an error if (!inherits(catch_erro...
# TOOL acgh-survival-test.R: "Survival test for called copy number data" (Statistical test for survival and called copy number data. The testing is recommended to be performed after running the Identify common regions from called copy number data tool.) # INPUT regions.tsv: regions.tsv TYPE GENE_EXPRS # INPUT META p...
/Chipster/Rscripts/acgh12-survival-test.R
no_license
thehyve/arraycgh-galaxy
R
false
false
2,763
r
# TOOL acgh-survival-test.R: "Survival test for called copy number data" (Statistical test for survival and called copy number data. The testing is recommended to be performed after running the Identify common regions from called copy number data tool.) # INPUT regions.tsv: regions.tsv TYPE GENE_EXPRS # INPUT META p...
# test_ISOLocalName.R # Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com> # # Description: Unit tests for ISOLocalName.R #======================= require(geometa, quietly = TRUE) require(testthat) context("ISOLocalName") test_that("encoding",{ testthat::skip_on_cran() #encoding md <- ISOLocalN...
/tests/testthat/test_ISOLocalName.R
no_license
cran/geometa
R
false
false
617
r
# test_ISOLocalName.R # Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com> # # Description: Unit tests for ISOLocalName.R #======================= require(geometa, quietly = TRUE) require(testthat) context("ISOLocalName") test_that("encoding",{ testthat::skip_on_cran() #encoding md <- ISOLocalN...
#' @title Closure #' #' @description #' \code{clo} divides each row of \code{X} by its row sum #' #' @details If \code{check} is \code{TRUE} then this function will stop if #' there are any negative or \code{NA} values in \code{X} #' @param X A matrix or dataframe of positive numeric values #' @param check A logical sc...
/chunk/R/propr-functions.R
no_license
maunadasari/CoDa_microbiome_tutorial
R
false
false
10,203
r
#' @title Closure #' #' @description #' \code{clo} divides each row of \code{X} by its row sum #' #' @details If \code{check} is \code{TRUE} then this function will stop if #' there are any negative or \code{NA} values in \code{X} #' @param X A matrix or dataframe of positive numeric values #' @param check A logical sc...
#Lab 9 Questions library(here) library(palmerpenguins) penguins<- penguins ##---------Question 1---------------- bartlett.test(body_mass_g ~ species, data = penguins) ##---------Question 2----------------- bartlett.test(body_mass_g ~ sex, data = penguins) ##----------Question 3---------------- par(mar = c(8, 4, 2, 2...
/individual_assignment/Lab 9 Questions.R
no_license
hparry/ECo_602_2020
R
false
false
712
r
#Lab 9 Questions library(here) library(palmerpenguins) penguins<- penguins ##---------Question 1---------------- bartlett.test(body_mass_g ~ species, data = penguins) ##---------Question 2----------------- bartlett.test(body_mass_g ~ sex, data = penguins) ##----------Question 3---------------- par(mar = c(8, 4, 2, 2...
library(lmomco) ### Name: lmomsRCmark ### Title: Sample L-moments Moments for Right-Tail Censoring by a Marking ### Variable ### Aliases: lmomsRCmark ### Keywords: L-moment (sample) data censoring ### ** Examples # Efron, B., 1988, Logistic regression, survival analysis, and the # Kaplan-Meier curve: Journal of t...
/data/genthat_extracted_code/lmomco/examples/lmomsRCmark.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
2,337
r
library(lmomco) ### Name: lmomsRCmark ### Title: Sample L-moments Moments for Right-Tail Censoring by a Marking ### Variable ### Aliases: lmomsRCmark ### Keywords: L-moment (sample) data censoring ### ** Examples # Efron, B., 1988, Logistic regression, survival analysis, and the # Kaplan-Meier curve: Journal of t...
#setwd("~/Dropbox/ChihPingWang/Model1/abc_V2/simulation64V2/oubmbm/") setwd("~/Dropbox/FCU/Teaching/Mentoring/2019Spring/ChihPingWang/Model1/abc_V2/simulation_32_bciV2/ououcir/") rm(list=ls()) library(TreeSim) library(EasyABC) library(coda) library(Sim.DiffProc) library(MCMCpack) library(ape) library(abc) library(nlme...
/simulation_32_bciV2/ououcir/ououcirabcSimV2size32bci.alpha.x.r
no_license
djhwueng/ououcir
R
false
false
1,632
r
#setwd("~/Dropbox/ChihPingWang/Model1/abc_V2/simulation64V2/oubmbm/") setwd("~/Dropbox/FCU/Teaching/Mentoring/2019Spring/ChihPingWang/Model1/abc_V2/simulation_32_bciV2/ououcir/") rm(list=ls()) library(TreeSim) library(EasyABC) library(coda) library(Sim.DiffProc) library(MCMCpack) library(ape) library(abc) library(nlme...
# # PART 1: Instace level library(DALEX) library(modelStudio) library(randomForest) library(rms) library(gbm) johny_d <- archivist::aread("pbiecek/models/e3596") henry <- archivist::aread("pbiecek/models/a6538") new_obs <- rbind(johny_d = johny_d, henry = henry) # restore models for titanic titanic_lmr_v6 <- archi...
/modelStudio/generateModelStudio.R
no_license
pbiecek/ema
R
false
false
1,500
r
# # PART 1: Instace level library(DALEX) library(modelStudio) library(randomForest) library(rms) library(gbm) johny_d <- archivist::aread("pbiecek/models/e3596") henry <- archivist::aread("pbiecek/models/a6538") new_obs <- rbind(johny_d = johny_d, henry = henry) # restore models for titanic titanic_lmr_v6 <- archi...
library(vcfR);library(ape);library(progress);library(data.table) library(plyr);library(ggplot2);library(ggrepel);library(zoo);library(cowplot) setwd("~/selasphorus_evolution/") vcf <- read.vcfR("~/Dropbox/selasphorus/called_snps/selasphorus_het_depth_mq30_biallel_nomd.recode.vcf.gz") #concatenated NJ tree dna <- vcfR2...
/scripts/wgs_nj_tree.R
no_license
cjbattey/selasphorus_evolution
R
false
false
7,028
r
library(vcfR);library(ape);library(progress);library(data.table) library(plyr);library(ggplot2);library(ggrepel);library(zoo);library(cowplot) setwd("~/selasphorus_evolution/") vcf <- read.vcfR("~/Dropbox/selasphorus/called_snps/selasphorus_het_depth_mq30_biallel_nomd.recode.vcf.gz") #concatenated NJ tree dna <- vcfR2...
#' Builds a table of summary statistics #' #' @param mocis_object A list returned from \code{MoCiS::mocis} #' @return A tibble with #' @export #' @examples mocis_table <- function(data, dec = 2){ print_ci <- function(estimate, lower, upper){ ifelse(is.numeric(estimate), paste0(round(estimate, dec), "...
/R/mocis_table.R
no_license
NRM-MOC/MoCiS.tools
R
false
false
4,161
r
#' Builds a table of summary statistics #' #' @param mocis_object A list returned from \code{MoCiS::mocis} #' @return A tibble with #' @export #' @examples mocis_table <- function(data, dec = 2){ print_ci <- function(estimate, lower, upper){ ifelse(is.numeric(estimate), paste0(round(estimate, dec), "...
########################################################################## ### ### generate simulated survival data with predefiend censoring rate ### Author: Zihang Zhong ### Date: Aug 2020 ### Specifications: ### - the main aim here is to root-find the censoring parameter for censoring distribution and g...
/predefined censoring rate.R
no_license
zihang1012/simulated-survival-data-with-predefiend-censoring-rate-
R
false
false
12,636
r
########################################################################## ### ### generate simulated survival data with predefiend censoring rate ### Author: Zihang Zhong ### Date: Aug 2020 ### Specifications: ### - the main aim here is to root-find the censoring parameter for censoring distribution and g...
# Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R should be filled at start. # 02_dev.R should be used to keep track of your development during the project. # 03_deploy.R should b...
/dev/01_start.R
no_license
JohnCoene/berlinxbikes
R
false
false
2,006
r
# Building a Prod-Ready, Robust Shiny Application. # # README: each step of the dev files is optional, and you don't have to # fill every dev scripts before getting started. # 01_start.R should be filled at start. # 02_dev.R should be used to keep track of your development during the project. # 03_deploy.R should b...
##---------------------------------------------------------------------- # Volcano plot ##---------------------------------------------------------------------- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= # Handling visibility #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= shinyjs:...
/inst/app/server/volcano.R
no_license
inambioinfo/TCGAbiolinksGUI
R
false
false
16,626
r
##---------------------------------------------------------------------- # Volcano plot ##---------------------------------------------------------------------- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= # Handling visibility #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--= shinyjs:...
shinyServer(function(input, output, session) { dt <- reactive({ dt <- readRDS("table.rds") }) dt_filter <- reactive({ dt <- dt() if(!is.null(input$placeholder)) { dt <- dt %>% } } dt }) output$selected_grp <- rende...
/server.R
no_license
octonana/personal_wip2
R
false
false
861
r
shinyServer(function(input, output, session) { dt <- reactive({ dt <- readRDS("table.rds") }) dt_filter <- reactive({ dt <- dt() if(!is.null(input$placeholder)) { dt <- dt %>% } } dt }) output$selected_grp <- rende...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/export_results.R \name{export_results} \alias{export_results} \title{Export experiment results to a dataframe or file.} \usage{ export_results(experiment, strategies = NULL, tracks = "all", file = NULL) } \arguments{ \item{experiment}{An \cod...
/man/export_results.Rd
no_license
rupertoverall/Rtrack
R
false
true
2,792
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/export_results.R \name{export_results} \alias{export_results} \title{Export experiment results to a dataframe or file.} \usage{ export_results(experiment, strategies = NULL, tracks = "all", file = NULL) } \arguments{ \item{experiment}{An \cod...
dataPath <- system.file("test_data", package="TPP") # Load function input: dat2 <- readRDS(file.path(dataPath, "panobinostat_2D_normResults2.rds")) # example input from an older experiment (12 rows) # Start tests: test_that("find_norm_fc_col", code={ # if both options are given, pick the column prefix for normalize...
/tests/testthat/test_obtain_fcStr_from_df_annotation.R
no_license
andreaschrader/TPP
R
false
false
2,727
r
dataPath <- system.file("test_data", package="TPP") # Load function input: dat2 <- readRDS(file.path(dataPath, "panobinostat_2D_normResults2.rds")) # example input from an older experiment (12 rows) # Start tests: test_that("find_norm_fc_col", code={ # if both options are given, pick the column prefix for normalize...
\name{ASMap-package} \alias{ASMap-package} \docType{package} \title{ Additional functions for linkage map construction and manipulation of R/qtl objects. } \description{ Additional functions for linkage map construction and manipulation of R/qtl objects. This includes extremely fast linkage map clustering and ...
/man/ASMap-package.Rd
no_license
cran/ASMap
R
false
false
4,532
rd
\name{ASMap-package} \alias{ASMap-package} \docType{package} \title{ Additional functions for linkage map construction and manipulation of R/qtl objects. } \description{ Additional functions for linkage map construction and manipulation of R/qtl objects. This includes extremely fast linkage map clustering and ...
#' Plot brain parcellations #' #' \code{ggseg} plots and returns a ggplot object of plotted #' aparc areas. #' @author Athanasia Mowinckel and Didac Pineiro #' #' @param data A data.frame to use for plot aesthetics. Must include a #' column called "area" corresponding to aparc areas. #' #' @param atlas Either a string ...
/R/ggseg.R
permissive
brennanpincardiff/ggseg
R
false
false
5,503
r
#' Plot brain parcellations #' #' \code{ggseg} plots and returns a ggplot object of plotted #' aparc areas. #' @author Athanasia Mowinckel and Didac Pineiro #' #' @param data A data.frame to use for plot aesthetics. Must include a #' column called "area" corresponding to aparc areas. #' #' @param atlas Either a string ...
# 3/9/2018 JHZ setwd("u:/work") mmp12 <- read.table("MMP12.dat",as.is=TRUE, col.names=c("MarkerName", "Allele1", "Allele2", "Effect", "StdErr", "logP")) mmp12 <- within(mmp12, {phen <- "MMP12";P <- 10^logP;N <- 3400}) library(TwoSampleMR) exposure_dat <- format_data(mmp12, type="exposure", snp_col = "MarkerName", eff...
/CAD/MMP12.R
no_license
jinghuazhao/Omics-analysis
R
false
false
1,900
r
# 3/9/2018 JHZ setwd("u:/work") mmp12 <- read.table("MMP12.dat",as.is=TRUE, col.names=c("MarkerName", "Allele1", "Allele2", "Effect", "StdErr", "logP")) mmp12 <- within(mmp12, {phen <- "MMP12";P <- 10^logP;N <- 3400}) library(TwoSampleMR) exposure_dat <- format_data(mmp12, type="exposure", snp_col = "MarkerName", eff...
library(forecast) library(zoo) Amtrak.data <- read.csv("Amtrak data.csv") ridership.ts <- ts(Amtrak.data$Ridership, start = c(1991, 1), end = c(2004, 3), freq = 12) # Figure 5-4 par(mfrow = c(2,2)) plot(ridership.ts, ylab = "Ridership", xlab = "Time", bty = "l", xlim = c(1991,2004.25), main = "Ridership") plot(diff(r...
/samples/Amtrak Fig 5-4.R
permissive
bmoretz/Time-Series-Forecasting
R
false
false
855
r
library(forecast) library(zoo) Amtrak.data <- read.csv("Amtrak data.csv") ridership.ts <- ts(Amtrak.data$Ridership, start = c(1991, 1), end = c(2004, 3), freq = 12) # Figure 5-4 par(mfrow = c(2,2)) plot(ridership.ts, ylab = "Ridership", xlab = "Time", bty = "l", xlim = c(1991,2004.25), main = "Ridership") plot(diff(r...
library(edgeR) library(limma) library(Glimma) DE_results <- read.delim("Trans.raw.counts.matrix.sample1_vs_sample2.edgeR.DE_results", row.names=1, stringsAsFactors=FALSE, check.names=F) DE_results <- DE_results[order(row.names(DE_results)),] rawcounts <- read.table("Trans.raw.counts.matrix", header=T, row.names=1, com=...
/script_backup/Trinity/Rscript/glimma.R
no_license
kent5438/sharing-github
R
false
false
2,211
r
library(edgeR) library(limma) library(Glimma) DE_results <- read.delim("Trans.raw.counts.matrix.sample1_vs_sample2.edgeR.DE_results", row.names=1, stringsAsFactors=FALSE, check.names=F) DE_results <- DE_results[order(row.names(DE_results)),] rawcounts <- read.table("Trans.raw.counts.matrix", header=T, row.names=1, com=...
\name{fread} \alias{fread} \title{ Fast and friendly file finagler } \description{ Similar to \code{read.table} but faster and more convenient. All controls such as \code{sep}, \code{colClasses} and \code{nrows} are automatically detected. \code{bit64::integer64} types are also detected and read directly without nee...
/man/fread.Rd
no_license
vmugue/data.table
R
false
false
18,403
rd
\name{fread} \alias{fread} \title{ Fast and friendly file finagler } \description{ Similar to \code{read.table} but faster and more convenient. All controls such as \code{sep}, \code{colClasses} and \code{nrows} are automatically detected. \code{bit64::integer64} types are also detected and read directly without nee...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/segmentation.R \name{extractSegmentSummary} \alias{extractSegmentSummary} \title{extractSegmentSummary()} \usage{ extractSegmentSummary(final.objects) } \arguments{ \item{final.objects}{list of casper object} } \value{ list of los...
/man/extractSegmentSummary.Rd
no_license
derekN-um/CaSpER
R
false
true
504
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/segmentation.R \name{extractSegmentSummary} \alias{extractSegmentSummary} \title{extractSegmentSummary()} \usage{ extractSegmentSummary(final.objects) } \arguments{ \item{final.objects}{list of casper object} } \value{ list of los...
library(dplyr) library(tidyverse) library(DT) library(shinydashboard) library(shiny) library(ggplot2) library(gganimate) library(plotly) library(colourpicker) library(viridis) library(RColorBrewer) library(shinyWidgets) library(devtools) library(animation) library(cowplot) library(magick) library(praise) library(testth...
/global.R
no_license
AidenFather/US-Cancer-Statistics
R
false
false
1,228
r
library(dplyr) library(tidyverse) library(DT) library(shinydashboard) library(shiny) library(ggplot2) library(gganimate) library(plotly) library(colourpicker) library(viridis) library(RColorBrewer) library(shinyWidgets) library(devtools) library(animation) library(cowplot) library(magick) library(praise) library(testth...
library(pracma) library(tidyverse) library(Directional) cross <- pracma::cross radius <- 3.5 height_list <- c(-1/sqrt(2), -1/2, 1/2, 1/sqrt(2)) view_angle <- c(0.108, 0.073, -0.073, -0.108) num_per <- length(height_list) rot_matrix <- function(height){ angle <- view_angle[height] return(rot.matrix(c(0, 0), ...
/Updated_Kid_IGEO/r_code/matching_conditions_40stim.R
no_license
mattyj612/IGEO
R
false
false
2,962
r
library(pracma) library(tidyverse) library(Directional) cross <- pracma::cross radius <- 3.5 height_list <- c(-1/sqrt(2), -1/2, 1/2, 1/sqrt(2)) view_angle <- c(0.108, 0.073, -0.073, -0.108) num_per <- length(height_list) rot_matrix <- function(height){ angle <- view_angle[height] return(rot.matrix(c(0, 0), ...
library(shiny) library(shinyWidgets) library(ggplot2) library(dplyr) library(patchwork) library(rsconnect) library(base) library(lubridate) library(shinyjs) library(shinydashboard) library(plotly) library(htmlwidgets) library(rlang) library(forcats) library(tidyr) library(rlang) library(survival) library(ranger) librar...
/shiny_app/app.R
no_license
KhiabanianLab/TuBA-Portal
R
false
false
29,850
r
library(shiny) library(shinyWidgets) library(ggplot2) library(dplyr) library(patchwork) library(rsconnect) library(base) library(lubridate) library(shinyjs) library(shinydashboard) library(plotly) library(htmlwidgets) library(rlang) library(forcats) library(tidyr) library(rlang) library(survival) library(ranger) librar...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/center.R \name{lawn_center} \alias{lawn_center} \title{Get center point} \usage{ lawn_center(features, lint = FALSE) } \arguments{ \item{features}{input featurs, as a \code{\link{data-FeatureCollection}}} \item{lint}{(logical) Lint or not. U...
/man/lawn_center.Rd
permissive
jbousquin/lawn
R
false
true
1,265
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/center.R \name{lawn_center} \alias{lawn_center} \title{Get center point} \usage{ lawn_center(features, lint = FALSE) } \arguments{ \item{features}{input featurs, as a \code{\link{data-FeatureCollection}}} \item{lint}{(logical) Lint or not. U...
/* File: Controls.r Contains: Control Manager interfaces Version: Technology: MacOS 7.x Release: Universal Interfaces 3.0.1 Copyright: © 1985-1997 by Apple Computer, Inc., all rights reserved Bugs?: Please include the the file and version information (from above) with the problem descripti...
/3.0.1/Universal/Interfaces/RIncludes/Controls.r
no_license
elliotnunn/UniversalInterfaces
R
false
false
3,188
r
/* File: Controls.r Contains: Control Manager interfaces Version: Technology: MacOS 7.x Release: Universal Interfaces 3.0.1 Copyright: © 1985-1997 by Apple Computer, Inc., all rights reserved Bugs?: Please include the the file and version information (from above) with the problem descripti...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rsk.R \docType{class} \name{rsk-class} \alias{rsk-class} \title{Class to Store Rsk Data} \description{ Class for data stored in the ``Ruskin'' format used by RBR [1], including both \code{rsk} SQLite files and the ASCII \code{txt} exported fi...
/pkgs/oce/man/rsk-class.Rd
no_license
vaguiar/EDAV_Project_2017
R
false
true
1,890
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rsk.R \docType{class} \name{rsk-class} \alias{rsk-class} \title{Class to Store Rsk Data} \description{ Class for data stored in the ``Ruskin'' format used by RBR [1], including both \code{rsk} SQLite files and the ASCII \code{txt} exported fi...
## create any required directories for the project checkdir <- function (directory) { ifelse (!dir.exists(directory), dir.create(directory), FALSE) }
/R/checkdir.R
no_license
SophieSt/Drilling-Rigs-from-Nightlights
R
false
false
158
r
## create any required directories for the project checkdir <- function (directory) { ifelse (!dir.exists(directory), dir.create(directory), FALSE) }
celltype enrichment celltr<-function(clusters_list,runname="",inpath='~/Dropbox/SHARED/tools/Data_to_load_CellFET/',outpath=getwd(),selection=F){ #inpath="~/Dropbox/SHARED/tools/Data_to_load_CellFET", cat('\tNOTE:\tclusters_list only ENSG ids currently supported') cat("\tCell background is the genes with one2one huma...
/R/celltr.R
no_license
ks4471/celltr
R
false
false
4,891
r
celltype enrichment celltr<-function(clusters_list,runname="",inpath='~/Dropbox/SHARED/tools/Data_to_load_CellFET/',outpath=getwd(),selection=F){ #inpath="~/Dropbox/SHARED/tools/Data_to_load_CellFET", cat('\tNOTE:\tclusters_list only ENSG ids currently supported') cat("\tCell background is the genes with one2one huma...
context("Get NSF awards") test_that("get_awards runs with only from_date specified", { award_info <- get_awards(from_date = "11/01/2017") expect_is(award_info, "data.frame") }) test_that("get_awards runs with from_date and to_date specified", { award_info <- get_awards(from_date = "11/01/2017", ...
/tests/testthat/test_get_awards.R
permissive
NCEAS/datamgmt
R
false
false
1,055
r
context("Get NSF awards") test_that("get_awards runs with only from_date specified", { award_info <- get_awards(from_date = "11/01/2017") expect_is(award_info, "data.frame") }) test_that("get_awards runs with from_date and to_date specified", { award_info <- get_awards(from_date = "11/01/2017", ...
\name{get_nom_scale} \alias{get_nom_scale} \title{Non-Metric Nominal Scale} \usage{ get_nom_scale(y, x, Xdummy) } \arguments{ \item{y}{vector of values} \item{x}{vector of the natural number series 1, 2, ..., p obtained by means of the function myRank} \item{Xdummy}{dummy matrix corresponding to x} } \value...
/man/get_nom_scale.Rd
no_license
gastonstat/plspm
R
false
false
766
rd
\name{get_nom_scale} \alias{get_nom_scale} \title{Non-Metric Nominal Scale} \usage{ get_nom_scale(y, x, Xdummy) } \arguments{ \item{y}{vector of values} \item{x}{vector of the natural number series 1, 2, ..., p obtained by means of the function myRank} \item{Xdummy}{dummy matrix corresponding to x} } \value...
## Data Science Capstone library(NLP) library(tm) library(qdapRegex) library(ggplot2) library(plyr) library(RColorBrewer) library(wordcloud) library(sqldf) library(akmeans) library(NbClust) library(lsa) library(ape) library(arules) library(fpc) library(gridExtra) library(dendextend) ##library(gridExtra) ## Mac setwd(...
/Code.R
no_license
jpmoraga/DataScienceCapstone
R
false
false
30,756
r
## Data Science Capstone library(NLP) library(tm) library(qdapRegex) library(ggplot2) library(plyr) library(RColorBrewer) library(wordcloud) library(sqldf) library(akmeans) library(NbClust) library(lsa) library(ape) library(arules) library(fpc) library(gridExtra) library(dendextend) ##library(gridExtra) ## Mac setwd(...
setwd("D://GitHub//powerfamily//to server//classrate2") setwd(paste(getwd(),"/breast",sep="")) # lambda2 in c(1e-4,1e-3,1e-2,1e-1,1,5,10) load("ans0.5.rda") (ans.avg_05 = ans.avg) load("ans1.rda") (ans.avg_1 = ans.avg) load("ans2.rda") (ans.avg_2 = ans.avg) load("ans5.rda") (ans.avg_5 = ans.avg) load("nzo0.5.rda") (...
/to server/classrate2/1breast/T_classification_summary_breast.R
no_license
boxiang-wang/powerfamilyold
R
false
false
1,139
r
setwd("D://GitHub//powerfamily//to server//classrate2") setwd(paste(getwd(),"/breast",sep="")) # lambda2 in c(1e-4,1e-3,1e-2,1e-1,1,5,10) load("ans0.5.rda") (ans.avg_05 = ans.avg) load("ans1.rda") (ans.avg_1 = ans.avg) load("ans2.rda") (ans.avg_2 = ans.avg) load("ans5.rda") (ans.avg_5 = ans.avg) load("nzo0.5.rda") (...
#'Read the wind data from HKW #'@description Function to read the wind speed and direction from the HKZ lidar. Data can be #'downloaded from \url{https://www.windopzee.net/meet-locaties/hollandse-kust-zuid-hkz/data/}. #'@param dir directory of the files (allowed to be stored in subfolders). #'@param h height of the mea...
/R/read_K13a.R
no_license
MariekeDirk/WINS50_Lidar
R
false
false
2,890
r
#'Read the wind data from HKW #'@description Function to read the wind speed and direction from the HKZ lidar. Data can be #'downloaded from \url{https://www.windopzee.net/meet-locaties/hollandse-kust-zuid-hkz/data/}. #'@param dir directory of the files (allowed to be stored in subfolders). #'@param h height of the mea...
#Valuation Analysis library(rgdal) source("data_prep_and_joins.R") GEF.seq.dta = readOGR("/home/aiddata/Desktop/Github/GEF/Data/GEF_treatment_centroids_carbon_extract.geojson", "OGRGeoJSON") GEF.noUS.trt <- GEF.noUS[GEF.noUS$treatment == 1,] GEF.noUS.seq <- merge(GEF.noUS.trt@data, GEF.seq.dta, by="id") #Carbon se...
/CarbonSequestration.R
no_license
DanRunfola/gef-analysis-01
R
false
false
792
r
#Valuation Analysis library(rgdal) source("data_prep_and_joins.R") GEF.seq.dta = readOGR("/home/aiddata/Desktop/Github/GEF/Data/GEF_treatment_centroids_carbon_extract.geojson", "OGRGeoJSON") GEF.noUS.trt <- GEF.noUS[GEF.noUS$treatment == 1,] GEF.noUS.seq <- merge(GEF.noUS.trt@data, GEF.seq.dta, by="id") #Carbon se...
setwd("/datascience/projects/statisticallyfit/github/learningprogramming/R/RStats/learneconometrics/CarterHill_PrinciplesOfEconometrics/Chapter9_TimeSeries") rm(list=ls()) #install.packages("nlts") #install.packages("spdep") #library(nlts) #library(spdep) library(lmtest) library(foreign) library(ggfortify) # Data from...
/CarterHill_PrinciplesOfEconometrics/Chapter9_StationaryTimeSeries/exercise9.21.R
no_license
statisticallyfit/REconometrics
R
false
false
2,902
r
setwd("/datascience/projects/statisticallyfit/github/learningprogramming/R/RStats/learneconometrics/CarterHill_PrinciplesOfEconometrics/Chapter9_TimeSeries") rm(list=ls()) #install.packages("nlts") #install.packages("spdep") #library(nlts) #library(spdep) library(lmtest) library(foreign) library(ggfortify) # Data from...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_predx_colnames.R \name{get_predx_colnames} \alias{get_predx_colnames} \title{Internal function returns the names of columns used for conversion to predx objects} \usage{ get_predx_colnames(classes) } \arguments{ \item{classes}{A vector of...
/man/get_predx_colnames.Rd
no_license
cdcepi/predx
R
false
true
559
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_predx_colnames.R \name{get_predx_colnames} \alias{get_predx_colnames} \title{Internal function returns the names of columns used for conversion to predx objects} \usage{ get_predx_colnames(classes) } \arguments{ \item{classes}{A vector of...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CanonicalFunctions.r \name{Canonical.Rsq} \alias{Canonical.Rsq} \title{Internal function for rdacca.hp() to calculate the Rsquared, adjusted Rsquared, Pseudo-F value, AIC and AICc for canonical analysis (RDA, db-RDA and CCA)} \usage{ Canonica...
/man/Canonical.Rsq.Rd
no_license
laijiangshan/rdacca.hp
R
false
true
902
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CanonicalFunctions.r \name{Canonical.Rsq} \alias{Canonical.Rsq} \title{Internal function for rdacca.hp() to calculate the Rsquared, adjusted Rsquared, Pseudo-F value, AIC and AICc for canonical analysis (RDA, db-RDA and CCA)} \usage{ Canonica...
#Step 1 x= read.table("Assignment 6 Dataset.txt", header=TRUE, sep=",") install.packages("plyr") library(plyr) y = ddply(x, "Sex", transform, Grade.Average=mean(Grade)) y write.table(y, "Sorted_Average") write.table(y, "Sorted_Average", sep=",") newx = subset(x, grepl("[iI]", x$Name)) newx write.table(newx,"DataSu...
/module_08.R
no_license
gfoster4/LIS5937
R
false
false
336
r
#Step 1 x= read.table("Assignment 6 Dataset.txt", header=TRUE, sep=",") install.packages("plyr") library(plyr) y = ddply(x, "Sex", transform, Grade.Average=mean(Grade)) y write.table(y, "Sorted_Average") write.table(y, "Sorted_Average", sep=",") newx = subset(x, grepl("[iI]", x$Name)) newx write.table(newx,"DataSu...
#****************************************************************************************************************************************************model sidebarLayout( sidebarPanel( tags$head(tags$style("#formula {height: 50px; background: ghostwhite; color: blue;word-wrap: break-word;}")), tags$head(tags$style("#s...
/7_1MFSlr_cn/ui_model.R
permissive
ricciardi/mephas_web
R
false
false
4,601
r
#****************************************************************************************************************************************************model sidebarLayout( sidebarPanel( tags$head(tags$style("#formula {height: 50px; background: ghostwhite; color: blue;word-wrap: break-word;}")), tags$head(tags$style("#s...
#makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse getinverse <- function() m lis...
/cachematrix.R
no_license
singrisone/ProgrammingAssignment2
R
false
false
890
r
#makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse getinverse <- function() m lis...
# Consistency check.R # Author: Yunchen Xiao # This .R file assesses the consistency of the parameter estimates obtained on # the main reference dataset by calculating the Monte-Carlo errors. rm(list = ls()) paras.final.ori <- as.matrix(read.table("Round 5 parameters 10000 all 3 ori.txt", ...
/ABC-BCD/Consistency analysis/Consistency check.R
permissive
ycx12341/Data-Code-Figures-RSOS-rev
R
false
false
1,451
r
# Consistency check.R # Author: Yunchen Xiao # This .R file assesses the consistency of the parameter estimates obtained on # the main reference dataset by calculating the Monte-Carlo errors. rm(list = ls()) paras.final.ori <- as.matrix(read.table("Round 5 parameters 10000 all 3 ori.txt", ...
library(SMVar) ### Name: Spleendata ### Title: Spleendata ### Aliases: Spleendata ### Keywords: datasets ### ** Examples data(Spleendata) attach(Spleendata)
/data/genthat_extracted_code/SMVar/examples/Spleendata.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
164
r
library(SMVar) ### Name: Spleendata ### Title: Spleendata ### Aliases: Spleendata ### Keywords: datasets ### ** Examples data(Spleendata) attach(Spleendata)
# |----------------------------------------------------------------------------------| # | Project: Study of Diabetes in MES13 cells | # | Script: Analysis of microarray data from a LNCap/SETD7 KD experiment | # | Scientist: Chao Wang ...
/source/lncap_setd7kd_venn_diagram_v1.R
no_license
KongLabRUSP/lncap.setd7kd
R
false
false
3,816
r
# |----------------------------------------------------------------------------------| # | Project: Study of Diabetes in MES13 cells | # | Script: Analysis of microarray data from a LNCap/SETD7 KD experiment | # | Scientist: Chao Wang ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setup_font.R \name{setup_font} \alias{setup_font} \title{Setup a font to be used in Shiny or Markdown} \usage{ setup_font(id, output_dir, variants = NULL) } \arguments{ \item{id}{Id of the font, correspond to column \code{id} from \code{\link...
/man/setup_font.Rd
no_license
marinamerlo/gfonts
R
false
true
881
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setup_font.R \name{setup_font} \alias{setup_font} \title{Setup a font to be used in Shiny or Markdown} \usage{ setup_font(id, output_dir, variants = NULL) } \arguments{ \item{id}{Id of the font, correspond to column \code{id} from \code{\link...
# Boxplots input <- mtcars[,c('mpg','cyl')] print(head(input)) png(file = "boxplot.png") boxplot(mpg ~ cyl, data = mtcars, xlab = "Number of Cylinders",ylab = "Miles Per Gallon", main = "Mileage Data") dev.off() # Boxplot with Notch png(file = "boxplot_with_notch.png") boxplot(mpg ~ cyl, data = mtcars, xlab =...
/R_WorkSpace/learning/chart/box_plot_demo.R
no_license
jk983294/Explore
R
false
false
556
r
# Boxplots input <- mtcars[,c('mpg','cyl')] print(head(input)) png(file = "boxplot.png") boxplot(mpg ~ cyl, data = mtcars, xlab = "Number of Cylinders",ylab = "Miles Per Gallon", main = "Mileage Data") dev.off() # Boxplot with Notch png(file = "boxplot_with_notch.png") boxplot(mpg ~ cyl, data = mtcars, xlab =...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/results_vm_sev_ols_mc.mvn_ci.R \docType{data} \name{results_vm_sev_ols_mc.mvn_ci} \alias{results_vm_sev_ols_mc.mvn_ci} \title{Results: Simple Mediation Model - Vale and Maurelli (1983) - Skewness = 3, Kurtosis = 21 - Complete Data - Monte Car...
/man/results_vm_sev_ols_mc.mvn_ci.Rd
permissive
jeksterslabds/jeksterslabRmedsimple
R
false
true
9,644
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/results_vm_sev_ols_mc.mvn_ci.R \docType{data} \name{results_vm_sev_ols_mc.mvn_ci} \alias{results_vm_sev_ols_mc.mvn_ci} \title{Results: Simple Mediation Model - Vale and Maurelli (1983) - Skewness = 3, Kurtosis = 21 - Complete Data - Monte Car...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/roommate.R \name{roommate.checkPreferences} \alias{roommate.checkPreferences} \title{Check if preference order for a one-sided market is complete} \usage{ roommate.checkPreferences(pref) } \arguments{ \item{pref}{is a matrix with the ...
/man/roommate.checkPreferences.Rd
no_license
trinker/matchingR
R
false
false
1,036
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/roommate.R \name{roommate.checkPreferences} \alias{roommate.checkPreferences} \title{Check if preference order for a one-sided market is complete} \usage{ roommate.checkPreferences(pref) } \arguments{ \item{pref}{is a matrix with the ...
source("data.R") doPlot4 <- function() { tbl <- ExData() png(filename = "plot4.png", width = 480, height = 480, units = "px") par (mfrow = c(2,2), mar = c(4,4,2,1), oma = c(0,0,2,0)) with(tbl, { plot(DateTime, Global_active_power, xlab="", ylab="Global Active Power", type="l") plot...
/plot4.r
no_license
labbyjr/ExData_Plotting1
R
false
false
922
r
source("data.R") doPlot4 <- function() { tbl <- ExData() png(filename = "plot4.png", width = 480, height = 480, units = "px") par (mfrow = c(2,2), mar = c(4,4,2,1), oma = c(0,0,2,0)) with(tbl, { plot(DateTime, Global_active_power, xlab="", ylab="Global Active Power", type="l") plot...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expr-lang.R \name{lang_standardise} \alias{lang_standardise} \title{Standardise a call.} \usage{ lang_standardise(call = caller_frame()) } \arguments{ \item{call}{Can be a call, a formula quoting a call in the right-hand side, or a frame obje...
/man/lang_standardise.Rd
no_license
dpastoor/rlang
R
false
true
749
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expr-lang.R \name{lang_standardise} \alias{lang_standardise} \title{Standardise a call.} \usage{ lang_standardise(call = caller_frame()) } \arguments{ \item{call}{Can be a call, a formula quoting a call in the right-hand side, or a frame obje...
## Lattice Functions # # `xyplot`: this is the main function for creating scatterplots # `bwplot`: box-and-whiskers plots (???boxplots???) # `histogram`: histograms # `stripplot`: like a boxplot but with actual points #- `dotplot`: plot dots on "violin strings" #- `splom`: scatterplot matrix; like `pairs` in b...
/4. Exploratory Data Analysis/5.R
no_license
shubhamjanhere/Coursera-Data-Science-Specialization
R
false
false
2,071
r
## Lattice Functions # # `xyplot`: this is the main function for creating scatterplots # `bwplot`: box-and-whiskers plots (???boxplots???) # `histogram`: histograms # `stripplot`: like a boxplot but with actual points #- `dotplot`: plot dots on "violin strings" #- `splom`: scatterplot matrix; like `pairs` in b...
#load R package for OMX (may require installing it before) require(rhdf5) #set own work directory setwd("Z:/indiv/carlos/travel time/auto") #read CSV file and extract 2 vectors for zone number and intrazonal time intrazonalTTime<-read.csv("intrazonalInternalZones.csv") origin <-intrazonalTTime$Origin tt <- intrazona...
/omxManipulation/intrazonalToSkim.R
no_license
cllorca1/mtoEstimation
R
false
false
7,869
r
#load R package for OMX (may require installing it before) require(rhdf5) #set own work directory setwd("Z:/indiv/carlos/travel time/auto") #read CSV file and extract 2 vectors for zone number and intrazonal time intrazonalTTime<-read.csv("intrazonalInternalZones.csv") origin <-intrazonalTTime$Origin tt <- intrazona...
#Utility functions #lmp #readBinary #readMetadata #loadPackages # # # # lmp <- function (modelobject) { if (class(modelobject) != "lm") stop("Not an object of class 'lm' ") f <- summary(modelobject)$fstatistic p <- pf(f[1], f[2], f[3], lower.tail = F) attributes(p) <- NULL return(p) } .trak <- setCl...
/R/utils.R
no_license
Wolfffff/RATrak
R
false
false
23,977
r
#Utility functions #lmp #readBinary #readMetadata #loadPackages # # # # lmp <- function (modelobject) { if (class(modelobject) != "lm") stop("Not an object of class 'lm' ") f <- summary(modelobject)$fstatistic p <- pf(f[1], f[2], f[3], lower.tail = F) attributes(p) <- NULL return(p) } .trak <- setCl...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 3.83014228852198e+294, 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), .Dim = c(8L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) st...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615784827-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
329
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 3.83014228852198e+294, 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), .Dim = c(8L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) st...
bc7a726c423bc5f4513df8a26f1bbaaf biu.mv.xl_ao.bb-b003-p020-IPF02-c05.blif-biu.inv.prop.bb-bmc.with-IOC.unfold-002.qdimacs 1417 1747
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/A1/Database/Herbstritt/blackbox-01X-QBF/biu.mv.xl_ao.bb-b003-p020-IPF02-c05.blif-biu.inv.prop.bb-bmc.with-IOC.unfold-002/biu.mv.xl_ao.bb-b003-p020-IPF02-c05.blif-biu.inv.prop.bb-bmc.with-IOC.unfold-002.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
131
r
bc7a726c423bc5f4513df8a26f1bbaaf biu.mv.xl_ao.bb-b003-p020-IPF02-c05.blif-biu.inv.prop.bb-bmc.with-IOC.unfold-002.qdimacs 1417 1747
\name{bdoc} \alias{bdoc} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Bayesian Discrete Ordered Classification of DNA Barcodes } \description{ This package contains the "bdoc" function that will classify DNA barcodes in a test data set to a species in the reference data set of DNA barc...
/man/bdoc.Rd
no_license
cran/bdoc
R
false
false
7,091
rd
\name{bdoc} \alias{bdoc} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Bayesian Discrete Ordered Classification of DNA Barcodes } \description{ This package contains the "bdoc" function that will classify DNA barcodes in a test data set to a species in the reference data set of DNA barc...
context("rsurv.R unit tests") library("data.table") # Replication of exponential distribution -------------------------------------- test_that("rsurv() produces correct output for exponential distribution" , { set.seed(10) N_REP <- 10000 rates <- c(.25, .5, 2) N <- length(rates) MAX_T <- 50 sc <- exa...
/tests/testthat/test-rsurv.R
no_license
PeterJemley/rsurv
R
false
false
686
r
context("rsurv.R unit tests") library("data.table") # Replication of exponential distribution -------------------------------------- test_that("rsurv() produces correct output for exponential distribution" , { set.seed(10) N_REP <- 10000 rates <- c(.25, .5, 2) N <- length(rates) MAX_T <- 50 sc <- exa...
\name{rdistaz} \alias{rdistaz} \title{Distance and Azimuth from two points } \description{ Calculate distance, Azimuth and Back-Azimuth from two points on Globe. } \usage{ rdistaz(olat, olon, tlat, tlon) } \arguments{ \item{olat}{origin latitude, degrees } \item{olon}{origin longitude, degrees } \item{tlat}{tar...
/man/rdistaz.Rd
no_license
Lluis76/RSEIS
R
false
false
1,886
rd
\name{rdistaz} \alias{rdistaz} \title{Distance and Azimuth from two points } \description{ Calculate distance, Azimuth and Back-Azimuth from two points on Globe. } \usage{ rdistaz(olat, olon, tlat, tlon) } \arguments{ \item{olat}{origin latitude, degrees } \item{olon}{origin longitude, degrees } \item{tlat}{tar...
library(aws.s3) library(jsonlite) library(curl) library(glue) ## Need to have AWS credentials set in .Renviron already! ## Compute the 95% confidence interval for the median using ## a remote server median_CI <- function(x, N = 1000) { bucket <- "confint" buckets_available <- bucketlist()$Bucket ...
/confmedian_client.R
no_license
rdpeng/plumberdemo
R
false
false
1,336
r
library(aws.s3) library(jsonlite) library(curl) library(glue) ## Need to have AWS credentials set in .Renviron already! ## Compute the 95% confidence interval for the median using ## a remote server median_CI <- function(x, N = 1000) { bucket <- "confint" buckets_available <- bucketlist()$Bucket ...
rm(list=ls()) setwd("/Users/ivor.williams/Documents/CRED/CRCP/NCRMP/Report Card Workshop/Fish Indicators 2017") # SET UP ------------------------------------------------------------------ library(gdata) # needed for drop_levels() library(reshape) # reshape library inclues the cast() function use...
/munge_RepCard/W17 RepCard Fish Data.R
no_license
kaylynmccoy/fish-paste
R
false
false
31,942
r
rm(list=ls()) setwd("/Users/ivor.williams/Documents/CRED/CRCP/NCRMP/Report Card Workshop/Fish Indicators 2017") # SET UP ------------------------------------------------------------------ library(gdata) # needed for drop_levels() library(reshape) # reshape library inclues the cast() function use...
library(e1071) m1 <- matrix( c( 0, 0, 0, 1, 1, 2, 1, 2, 3, 2, 3, 3, 0, 1,2,3, 0, 1, 2, 3, 1, 2, 3, 2, 3, 3, 0, 0, 0, 1, 1, 2, 4, 4,4,4, 0, 1, 2, 3, 1, 1, 1, 1, 1, 1, -1,-1, -1,-1,-1,-1, 1 ,1,1,1, 1, 1,-1,-1 ), ncol = 3 ) ...
/lab7/lab1_svm5.R
no_license
jj960708/Spring2020_DataAnalytics
R
false
false
994
r
library(e1071) m1 <- matrix( c( 0, 0, 0, 1, 1, 2, 1, 2, 3, 2, 3, 3, 0, 1,2,3, 0, 1, 2, 3, 1, 2, 3, 2, 3, 3, 0, 0, 0, 1, 1, 2, 4, 4,4,4, 0, 1, 2, 3, 1, 1, 1, 1, 1, 1, -1,-1, -1,-1,-1,-1, 1 ,1,1,1, 1, 1,-1,-1 ), ncol = 3 ) ...
## Put comments here that give an overall description of what your ## functions do ## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setinverse <- function...
/cachematrix.R
no_license
na-da/ProgrammingAssignment2
R
false
false
951
r
## Put comments here that give an overall description of what your ## functions do ## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setinverse <- function...
## Imports library(here) library(fs) library(furrr) library(future) library(tidyverse) source(here("code", "utils.R")) ## Get data user_studies <- readRDS(here("data_working", "list_of_users_and_studies.RDS")) user_df <- readRDS("./data_working/user_data_with_demographics.RDS") all_groupings <- dir_ls("./data_strippe...
/code/03_create_accel_working_df.R
no_license
mkiang/beiwe_missing_data
R
false
false
2,155
r
## Imports library(here) library(fs) library(furrr) library(future) library(tidyverse) source(here("code", "utils.R")) ## Get data user_studies <- readRDS(here("data_working", "list_of_users_and_studies.RDS")) user_df <- readRDS("./data_working/user_data_with_demographics.RDS") all_groupings <- dir_ls("./data_strippe...
\name{replace_dollar} \alias{$<-} \alias{$<-,SpatExtent-method} \alias{$<-,SpatVector-method} \alias{$<-,SpatRaster-method} \title{Replace with $<-} \description{ Replace a layer of a SpatRaster, or an attribute variable of a SpatVector } \usage{ \S4method{$}{SpatRaster}(x, name) <- value \S4meth...
/man/replace_dollar.Rd
no_license
cran/terra
R
false
false
1,122
rd
\name{replace_dollar} \alias{$<-} \alias{$<-,SpatExtent-method} \alias{$<-,SpatVector-method} \alias{$<-,SpatRaster-method} \title{Replace with $<-} \description{ Replace a layer of a SpatRaster, or an attribute variable of a SpatVector } \usage{ \S4method{$}{SpatRaster}(x, name) <- value \S4meth...
# wp stands for web play # # It is a global object that manages the state of play # possible for several human players # # A specific app object has a reference to an wp # and a player field wp.game = function(wp=get_wp()) { wp$play$game } wp.stage = function(wp=get_wp()) { stage.num = wp$stage.num if (stage.num...
/R/wp.R
no_license
skranz/gtreeWebPlay
R
false
false
7,073
r
# wp stands for web play # # It is a global object that manages the state of play # possible for several human players # # A specific app object has a reference to an wp # and a player field wp.game = function(wp=get_wp()) { wp$play$game } wp.stage = function(wp=get_wp()) { stage.num = wp$stage.num if (stage.num...
##funcao que define a idade de registros de ocorrencia a partir do intervalo de erro das suas idades. ##06/Setembro/2018 ##Anderson Aires Eduardo dataInstance = function(x, col_names, tempRes=1000, n=2*nrow(x)){ if (class(x) != "data.frame"){ stop("O dataset de entrada precisa ser um objeto da classe 'da...
/dataInstance.R
no_license
AndersonEduardo/R-Scripts
R
false
false
3,044
r
##funcao que define a idade de registros de ocorrencia a partir do intervalo de erro das suas idades. ##06/Setembro/2018 ##Anderson Aires Eduardo dataInstance = function(x, col_names, tempRes=1000, n=2*nrow(x)){ if (class(x) != "data.frame"){ stop("O dataset de entrada precisa ser um objeto da classe 'da...
## Creating a special "matrix" object that caches its inverse ##and then computing the inverse of that special "matrix" object ##Creating a special matrix object that caches its inverse makeCacheMatrix <- function(x = matrix()) { invert<-null set<-function(y){ x<<-y in...
/cachematrix.R
no_license
mt86/Cache-Matrix
R
false
false
881
r
## Creating a special "matrix" object that caches its inverse ##and then computing the inverse of that special "matrix" object ##Creating a special matrix object that caches its inverse makeCacheMatrix <- function(x = matrix()) { invert<-null set<-function(y){ x<<-y in...
midwest <- read.csv("http://goo.gl/G1K41K") options(scipen=999) # used to initialize the ggplot # aes specifies x and y axes # geom point gives scatter plot # geom smooth gives a line , in this case linear model g <- ggplot(data = midwest, aes(x=area,y=poptotal)) + geom_point() + geom_smooth(method = "lm", se = F...
/ggplot_experiments.R
no_license
mahtuog/R
R
false
false
1,924
r
midwest <- read.csv("http://goo.gl/G1K41K") options(scipen=999) # used to initialize the ggplot # aes specifies x and y axes # geom point gives scatter plot # geom smooth gives a line , in this case linear model g <- ggplot(data = midwest, aes(x=area,y=poptotal)) + geom_point() + geom_smooth(method = "lm", se = F...
#' Download shape files of micro region as sf objects #' #' Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674) #' #' @param year Year of the data (defaults to 2010) #' @param code_micro 5-digit code of a micro region. If the two-digit code or a two-letter uppercase abbreviation of #' a...
/r-package/R/read_micro_region.R
no_license
limanalytics/geobr
R
false
false
2,759
r
#' Download shape files of micro region as sf objects #' #' Data at scale 1:250,000, using Geodetic reference system "SIRGAS2000" and CRS(4674) #' #' @param year Year of the data (defaults to 2010) #' @param code_micro 5-digit code of a micro region. If the two-digit code or a two-letter uppercase abbreviation of #' a...
## Read data data <- read.table("household_power_consumption.txt", sep=";", header=T, stringsAsFactors=F, na.strings="?") data$Date <- as.Date(data$Date, "%d/%m/%Y") ##Convert date from "character" to "Date" ## Create a dataframe by filtering the date 02/01/2007 or 02/02/2007 myData <- subset(data, data$Date == "2007-0...
/plot1.R
no_license
jing-olemiss/ExData_Plotting1
R
false
false
698
r
## Read data data <- read.table("household_power_consumption.txt", sep=";", header=T, stringsAsFactors=F, na.strings="?") data$Date <- as.Date(data$Date, "%d/%m/%Y") ##Convert date from "character" to "Date" ## Create a dataframe by filtering the date 02/01/2007 or 02/02/2007 myData <- subset(data, data$Date == "2007-0...
# https://google.github.io/CausalImpact/CausalImpact.html library(CausalImpact) setwd("set_directory") eurusd<-read.csv("eurusd.csv") gbpusd<-read.csv("gbpusd.csv") set.seed(1) x1 <- eurusd$Value y <- gbpusd$Value data <- cbind(y, x1) dim(data) head(data) matplot(data, type = "l") pre.period <- c(1, 230) post.peri...
/CausalImpact_currencies.R
no_license
dranatom120/economics-time-series
R
false
false
464
r
# https://google.github.io/CausalImpact/CausalImpact.html library(CausalImpact) setwd("set_directory") eurusd<-read.csv("eurusd.csv") gbpusd<-read.csv("gbpusd.csv") set.seed(1) x1 <- eurusd$Value y <- gbpusd$Value data <- cbind(y, x1) dim(data) head(data) matplot(data, type = "l") pre.period <- c(1, 230) post.peri...