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
#!/usr/bin/env Rscript # description--------------------------------------------------------- # Inputs (not in argument order) # 1 Path to an "BELD-data-less" input *.nc from EPIC # (via, e.g., computeCropSum.sh) with # dim(datavar) == [TSTEP, LAY, ROW, COL], where # * [ROW, COL] is the gridspace # * one layer p...
/writeBELDlayer.r
no_license
gc13141112/ioapi-hack-R
R
false
false
8,448
r
#!/usr/bin/env Rscript # description--------------------------------------------------------- # Inputs (not in argument order) # 1 Path to an "BELD-data-less" input *.nc from EPIC # (via, e.g., computeCropSum.sh) with # dim(datavar) == [TSTEP, LAY, ROW, COL], where # * [ROW, COL] is the gridspace # * one layer p...
#------------------------------------------------------------------------------- # Copyright (c) 2012 University of Illinois, NCSA. # All rights reserved. This program and the accompanying materials # are made available under the terms of the # University of Illinois/NCSA Open Source License # which accompanies this d...
/modules/rtm/R/prospect5.R
permissive
rgknox/pecan
R
false
false
5,361
r
#------------------------------------------------------------------------------- # Copyright (c) 2012 University of Illinois, NCSA. # All rights reserved. This program and the accompanying materials # are made available under the terms of the # University of Illinois/NCSA Open Source License # which accompanies this d...
rm(list=ls()) library(WebGestaltR) WebGestaltR(enrichMethod="NTA", organism="hsapiens", enrichDatabase="network_PPI_BIOGRID", interestGeneFile="HALLMARK_APICAL_SURFACE.geneset.txt", interestGeneType="ensembl_gene_id",sigMethod="fdr", outputDirectory=getwd(), highlightType = 'Neighbors', neighborNum = 10, ...
/Data/MSigDB.go.pathway/HALLMARK_APICAL_SURFACE/WebGestalt.R
no_license
haoboguo/NetBAS
R
false
false
370
r
rm(list=ls()) library(WebGestaltR) WebGestaltR(enrichMethod="NTA", organism="hsapiens", enrichDatabase="network_PPI_BIOGRID", interestGeneFile="HALLMARK_APICAL_SURFACE.geneset.txt", interestGeneType="ensembl_gene_id",sigMethod="fdr", outputDirectory=getwd(), highlightType = 'Neighbors', neighborNum = 10, ...
mydata <- data.frame(dose=numeric(0), drugA=numeric(0), drugB=numeric(0)) fix(mydata) dose <- mydata$dose drugA <- mydata$drugA drugB <- mydata$drugB opar <- par(no.readonly = TRUE) par(pin = c(2,3)) par(lwd=2,cex=1.5) par(cex.axis=.75,font.axis=3) plot(dose,drugA,type = "b",pc...
/R与数据可视化/R学习笔记/4/chapter3.R
no_license
oocarain/Learning
R
false
false
3,652
r
mydata <- data.frame(dose=numeric(0), drugA=numeric(0), drugB=numeric(0)) fix(mydata) dose <- mydata$dose drugA <- mydata$drugA drugB <- mydata$drugB opar <- par(no.readonly = TRUE) par(pin = c(2,3)) par(lwd=2,cex=1.5) par(cex.axis=.75,font.axis=3) plot(dose,drugA,type = "b",pc...
\name{render_choropleth} \alias{render_choropleth} \title{Render a choropleth} \usage{ render_choropleth(choropleth.df, lod, title = "", scaleName = "", showLabels = TRUE, states = state.abb) } \arguments{ \item{choropleth.df}{A data.frame with a column named "region" and a column named "value". If lod is "state...
/man/render_choropleth.Rd
no_license
omerkara/choroplethr
R
false
false
1,946
rd
\name{render_choropleth} \alias{render_choropleth} \title{Render a choropleth} \usage{ render_choropleth(choropleth.df, lod, title = "", scaleName = "", showLabels = TRUE, states = state.abb) } \arguments{ \item{choropleth.df}{A data.frame with a column named "region" and a column named "value". If lod is "state...
setwd("/Users/fangshu/Desktop/course/Spring\ 2021/IE\ 592/Output_all/v26/Evaluation") filenames <- list.files() # filenames eg: evaluation_2011-04-01_2012-03-30.csv # get 2011-04-01_2012-03-30 from filenames names <- substr(filenames,12,32) # get the date dat <- data.frame(names) for(i in 1:length(filenames)){ dat_...
/Visualization/Plot.R
no_license
lynnh20/Principal-Interaction-Modeling-ISU
R
false
false
1,007
r
setwd("/Users/fangshu/Desktop/course/Spring\ 2021/IE\ 592/Output_all/v26/Evaluation") filenames <- list.files() # filenames eg: evaluation_2011-04-01_2012-03-30.csv # get 2011-04-01_2012-03-30 from filenames names <- substr(filenames,12,32) # get the date dat <- data.frame(names) for(i in 1:length(filenames)){ dat_...
#' Get indegree values for all nodes #' @description Get the indegree values for all #' nodes in a graph. #' @param graph a graph object of class #' \code{dgr_graph}. #' @param normalized set as \code{FALSE} (the default), #' the indegree will be provided for each of #' the nodes (as a count of edges to each node). Whe...
/R/get_degree_in.R
permissive
ktaranov/DiagrammeR
R
false
false
2,465
r
#' Get indegree values for all nodes #' @description Get the indegree values for all #' nodes in a graph. #' @param graph a graph object of class #' \code{dgr_graph}. #' @param normalized set as \code{FALSE} (the default), #' the indegree will be provided for each of #' the nodes (as a count of edges to each node). Whe...
#!/usr/bin/env Rscript # Load useful libraries ---- suppressMessages( library(crayon) ) cat(cyan("Loading packages...\n")) suppressMessages( library(dplyr) ) suppressMessages( library(readr) ) suppressMessages( library(rlang) ) suppressMessages( library(readxl) ) suppressMessages( library(stringr) ) suppressMessage...
/MRI_schedule_report.R
no_license
MichiganADC/MRI_schedule_report
R
false
false
15,205
r
#!/usr/bin/env Rscript # Load useful libraries ---- suppressMessages( library(crayon) ) cat(cyan("Loading packages...\n")) suppressMessages( library(dplyr) ) suppressMessages( library(readr) ) suppressMessages( library(rlang) ) suppressMessages( library(readxl) ) suppressMessages( library(stringr) ) suppressMessage...
library(glmnet) mydata = read.table("./TrainingSet/AvgRank/upper_aerodigestive_tract.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.15,family="gaussian",standardize=TRUE) sink('./Model/EN/AvgRank/upper_aerodige...
/Model/EN/AvgRank/upper_aerodigestive_tract/upper_aerodigestive_tract_029.R
no_license
leon1003/QSMART
R
false
false
409
r
library(glmnet) mydata = read.table("./TrainingSet/AvgRank/upper_aerodigestive_tract.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.15,family="gaussian",standardize=TRUE) sink('./Model/EN/AvgRank/upper_aerodige...
install.packages ("coala") install.packages ("phytools") library (coala) library (phytools) model <- coal_model (sample_size = 5, loci_number = 10, loci_length = 500, ploidy = 2) + feat_mutation (10) + feat_recombination (10) + sumstat_trees () + sumstat_nucleotide_div () stats <- simulate (model, nsim = 1) Div...
/Task_02/task02.r
no_license
kenziecook/Tasks
R
false
false
1,355
r
install.packages ("coala") install.packages ("phytools") library (coala) library (phytools) model <- coal_model (sample_size = 5, loci_number = 10, loci_length = 500, ploidy = 2) + feat_mutation (10) + feat_recombination (10) + sumstat_trees () + sumstat_nucleotide_div () stats <- simulate (model, nsim = 1) Div...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/copy_file.R \name{copy_files} \alias{copy_files} \title{copy multiple files from a windows directory} \usage{ copy_files(source_files, dest_dir, overwrite = FALSE, timestamp = FALSE) } \arguments{ \item{source_files}{\code{data.frame} with fi...
/man/copy_files.Rd
no_license
ces0491/fileR
R
false
true
731
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/copy_file.R \name{copy_files} \alias{copy_files} \title{copy multiple files from a windows directory} \usage{ copy_files(source_files, dest_dir, overwrite = FALSE, timestamp = FALSE) } \arguments{ \item{source_files}{\code{data.frame} with fi...
#data1 = read.csv("C:\\Users\\Abhinav Raj\\Downloads\\Data sets\\breast-cancer-wisconsin.data",header = TRUE) #-------------------------Reading data-------------------------------------------------------------------- x=data.matrix(iris[-c(1:50),]) y=x[sample(100,replace=FALSE),] train=y[1:80,] test=y[81:100,] knn<-func...
/knnWmcc.r
no_license
abhinavraj12345/Machine-Learning-R
R
false
false
2,053
r
#data1 = read.csv("C:\\Users\\Abhinav Raj\\Downloads\\Data sets\\breast-cancer-wisconsin.data",header = TRUE) #-------------------------Reading data-------------------------------------------------------------------- x=data.matrix(iris[-c(1:50),]) y=x[sample(100,replace=FALSE),] train=y[1:80,] test=y[81:100,] knn<-func...
# 学生テーブル読み込み students <- read.csv("sampledata_student.csv", header = T, stringsAsFactors = F) # 試験成績テーブル読み込み kokugo <- read.csv("sampledata_KOKUGO.csv", header = T, stringsAsFactors = F) suugaku <- read.csv("sampledata_SUUGAKU.csv", header = T, stringsAsFactors = F) shakai <- read.csv("sampledata_SHAKAI.csv", header =...
/k_means.R
no_license
kaznishi/r_sample
R
false
false
3,105
r
# 学生テーブル読み込み students <- read.csv("sampledata_student.csv", header = T, stringsAsFactors = F) # 試験成績テーブル読み込み kokugo <- read.csv("sampledata_KOKUGO.csv", header = T, stringsAsFactors = F) suugaku <- read.csv("sampledata_SUUGAKU.csv", header = T, stringsAsFactors = F) shakai <- read.csv("sampledata_SHAKAI.csv", header =...
rm(list =ls()) library(readxl) library(dplyr) library(RWeka) library(lubridate) library(stringr) library(qdapRegex) # import all tweet data#### fin <- list.files(path = "data/", full.names = T) ds.list <- lapply(fin, read_excel, col_names = F) ds <- unique(do.call(rbind.data.frame, ds.list)) # change column names nam...
/twitterEmojiProject/EDA.R
no_license
laurenancona/twimoji
R
false
false
3,594
r
rm(list =ls()) library(readxl) library(dplyr) library(RWeka) library(lubridate) library(stringr) library(qdapRegex) # import all tweet data#### fin <- list.files(path = "data/", full.names = T) ds.list <- lapply(fin, read_excel, col_names = F) ds <- unique(do.call(rbind.data.frame, ds.list)) # change column names nam...
#' Get list of classes of data that have been #' exposed in breaches #' #' @param verbose whether to message about http errors and re-tries #' @param agent agent to be used as header in calls, by default "HIBPwned R pkg". # nolint #' #' @details Note that the package uses \code{memoise} #' (\url{https://github.com/r-li...
/R/data_classes.R
no_license
holisticinfosec/HIBPwned
R
false
false
722
r
#' Get list of classes of data that have been #' exposed in breaches #' #' @param verbose whether to message about http errors and re-tries #' @param agent agent to be used as header in calls, by default "HIBPwned R pkg". # nolint #' #' @details Note that the package uses \code{memoise} #' (\url{https://github.com/r-li...
allspeeches <- readRDS("./data/asa_data.rds") allspeeches$decade <- paste0(substr(as.character(allspeeches$year),1,3),"0") allspeeches$num_neg_words <- unlist(lapply(allspeeches$neg.words, length)) allspeeches$num_pos_words <- unlist(lapply(allspeeches$pos.words, length)) entities <- readRDS("./data/entities.rds") loc...
/jsm_2020_app/global.R
no_license
brandonkopp/ASA-Presidents-Shiny
R
false
false
18,584
r
allspeeches <- readRDS("./data/asa_data.rds") allspeeches$decade <- paste0(substr(as.character(allspeeches$year),1,3),"0") allspeeches$num_neg_words <- unlist(lapply(allspeeches$neg.words, length)) allspeeches$num_pos_words <- unlist(lapply(allspeeches$pos.words, length)) entities <- readRDS("./data/entities.rds") loc...
library(BayesSingleSub) ### Name: trendtest.MC.AR ### Title: Obtain Bayesian trend test or single case data ### Aliases: trendtest.MC.AR ### Keywords: htest models ### ** Examples ## Define data data = c(87.5, 82.5, 53.4, 72.3, 94.2, 96.6, 57.4, 78.1, 47.2, 80.7, 82.1, 73.7, 49.3, 79.3, 73.3, 57.3, 31.7, 50.4, 77....
/data/genthat_extracted_code/BayesSingleSub/examples/trendtest.MC.AR.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
438
r
library(BayesSingleSub) ### Name: trendtest.MC.AR ### Title: Obtain Bayesian trend test or single case data ### Aliases: trendtest.MC.AR ### Keywords: htest models ### ** Examples ## Define data data = c(87.5, 82.5, 53.4, 72.3, 94.2, 96.6, 57.4, 78.1, 47.2, 80.7, 82.1, 73.7, 49.3, 79.3, 73.3, 57.3, 31.7, 50.4, 77....
# Yige Wu @ WashU 2021 Jun ## annotate sample copy number profile (3p, 5q, 14q) ## CNV: https://wustl.box.com/s/vlde6w791k81q1aibvgs0a487zxleij6 # Purity and ploidy: https://wustl.box.com/s/jel5krgvnvlq5z32vdg4itdcq6znuqzn # From UMich # set up libraries and output directory ----------------------------------- ## set ...
/snatac/da_peaks/annotate_peaks/map_cnvnex_lr_by_BAP1_comparison_prefilteredpeaks_by_barcode.R
no_license
ding-lab/ccRCC_snRNA_analysis
R
false
false
3,956
r
# Yige Wu @ WashU 2021 Jun ## annotate sample copy number profile (3p, 5q, 14q) ## CNV: https://wustl.box.com/s/vlde6w791k81q1aibvgs0a487zxleij6 # Purity and ploidy: https://wustl.box.com/s/jel5krgvnvlq5z32vdg4itdcq6znuqzn # From UMich # set up libraries and output directory ----------------------------------- ## set ...
library(tidyverse) library(scales) library(ggthemes) df <- tidytuesdayR::tt_load('2021-02-09') retire <- df$retirement retire %>% ggplot(aes(x = year, y = retirement, group = race, colour = race)) + geom_smooth(size = 1.5, se = FALSE) + theme_fivethirtyeight() + scale_x_continuous(breaks = c(1990, 1995, 200...
/code/2021-02-09.R
no_license
alexlusco/tidy-tuesday
R
false
false
724
r
library(tidyverse) library(scales) library(ggthemes) df <- tidytuesdayR::tt_load('2021-02-09') retire <- df$retirement retire %>% ggplot(aes(x = year, y = retirement, group = race, colour = race)) + geom_smooth(size = 1.5, se = FALSE) + theme_fivethirtyeight() + scale_x_continuous(breaks = c(1990, 1995, 200...
#By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. #What is the 10 001st prime number? timestart <- Sys.time() isprimenumber <- function(x){ if(x == 1){ return(FALSE) }else{ y <- as.integer(sqrt(x)) + 1 for(i in 2:y){ if(x %% i == 0 & x != 2){ ...
/Project Euler/007-nst_prime_number.R
no_license
QiliWu/leetcode-and-Project-Euler
R
false
false
1,259
r
#By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. #What is the 10 001st prime number? timestart <- Sys.time() isprimenumber <- function(x){ if(x == 1){ return(FALSE) }else{ y <- as.integer(sqrt(x)) + 1 for(i in 2:y){ if(x %% i == 0 & x != 2){ ...
# R code to illustrate K-nearest neighbors (KNN) classifier and the Bayes optimal classifier. # This code accompanies Lecture 3: Measuring performance. # # Author: Jeffrey W. Miller # Date: Feb 3, 2019 # ____________________________________________________________________________________________ # KNN classif...
/knn-classifier.r
no_license
Celaeno1017/Statistical-Learning
R
false
false
5,525
r
# R code to illustrate K-nearest neighbors (KNN) classifier and the Bayes optimal classifier. # This code accompanies Lecture 3: Measuring performance. # # Author: Jeffrey W. Miller # Date: Feb 3, 2019 # ____________________________________________________________________________________________ # KNN classif...
#' Summarize tests of directed separation using Fisher's C statistic #' #' @param dTable a \code{data.frame} containing tests of directed separation from \code{dSep} #' @param add.claims an optional vector of additional independence claims (i.e., P-values) #' to be added to the basis set #' @param basis.set An op...
/R/fisherC.R
no_license
ecustwy/piecewiseSEM
R
false
false
1,813
r
#' Summarize tests of directed separation using Fisher's C statistic #' #' @param dTable a \code{data.frame} containing tests of directed separation from \code{dSep} #' @param add.claims an optional vector of additional independence claims (i.e., P-values) #' to be added to the basis set #' @param basis.set An op...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bic_util.R \name{bic.write.dat} \alias{bic.write.dat} \title{Write file containing tab delimited data} \usage{ bic.write.dat(dat, file.name, add.rownames = F, col.names = T, quote = F, sep = "\\t") } \arguments{ \item{dat}{matrix containing...
/man/bic.write.dat.Rd
no_license
caitlinjones/bicrnaseq
R
false
true
688
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bic_util.R \name{bic.write.dat} \alias{bic.write.dat} \title{Write file containing tab delimited data} \usage{ bic.write.dat(dat, file.name, add.rownames = F, col.names = T, quote = F, sep = "\\t") } \arguments{ \item{dat}{matrix containing...
## DATA PREP TITLE ## Data Source # Source Name # Link: # Downloaded: # Timeseries: # Format: # Notes here ## Summary library(tidyverse) library(plotly) library(viridis) library(validate) ## Read in Data ## Tidy: Select subset, clean up data tables, fix strings, fix class ## Wrangle: Join, combine, ## S...
/dataprep/dataprep-template.R
no_license
iwensu0313/us-aquaculture
R
false
false
345
r
## DATA PREP TITLE ## Data Source # Source Name # Link: # Downloaded: # Timeseries: # Format: # Notes here ## Summary library(tidyverse) library(plotly) library(viridis) library(validate) ## Read in Data ## Tidy: Select subset, clean up data tables, fix strings, fix class ## Wrangle: Join, combine, ## S...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/initialize_module.R \name{initialize_module} \alias{initialize_module} \title{Title} \usage{ initialize_module(x, param, init, control, s) } \arguments{ \item{x}{A number.} \item{y}{A number.} } \value{ return value here. } \description{ Des...
/man/initialize_module.Rd
no_license
EvoNetHIV/RoleSPVL
R
false
true
407
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/initialize_module.R \name{initialize_module} \alias{initialize_module} \title{Title} \usage{ initialize_module(x, param, init, control, s) } \arguments{ \item{x}{A number.} \item{y}{A number.} } \value{ return value here. } \description{ Des...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/zone_utility_functions.R \name{powerset_zones} \alias{powerset_zones} \title{Creates a set of all non-empty subsets of the integers from 1 to \eqn{n}.} \usage{ powerset_zones(n) } \arguments{ \item{n}{An integer larger than 0.} } \value{ A li...
/man/powerset_zones.Rd
no_license
rfsaldanha/scanstatistics
R
false
true
471
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/zone_utility_functions.R \name{powerset_zones} \alias{powerset_zones} \title{Creates a set of all non-empty subsets of the integers from 1 to \eqn{n}.} \usage{ powerset_zones(n) } \arguments{ \item{n}{An integer larger than 0.} } \value{ A li...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LongituRF.R \name{sig.fbm} \alias{sig.fbm} \title{Title} \usage{ sig.fbm(Y, sigma, id, Z, epsilon, Btilde, time, sigma2, h) } \arguments{ \item{h}{} } \description{ Title } \keyword{internal}
/man/sig.fbm.Rd
no_license
mseyna/LongituRF
R
false
true
270
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LongituRF.R \name{sig.fbm} \alias{sig.fbm} \title{Title} \usage{ sig.fbm(Y, sigma, id, Z, epsilon, Btilde, time, sigma2, h) } \arguments{ \item{h}{} } \description{ Title } \keyword{internal}
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datasets.R \docType{data} \name{mn_iceout} \alias{mn_iceout} \title{Minnesota Department of Natural Resources State Ice-out Data} \format{A data frame with 19,261 rows and 10 variables} \usage{ data(mn_iceout) } \description{ This dataset con...
/man/mn_iceout.Rd
permissive
BigelowLab/iceout
R
false
true
1,055
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datasets.R \docType{data} \name{mn_iceout} \alias{mn_iceout} \title{Minnesota Department of Natural Resources State Ice-out Data} \format{A data frame with 19,261 rows and 10 variables} \usage{ data(mn_iceout) } \description{ This dataset con...
dataPrep <- function(lData) { n <- length(lData[[1]]) retList <- list() tmp <- rep(list(NA), 5) names(tmp) <- c("title", "subtitle", "ranges", "measures", "markers") retList[[1]] <- tmp for (i in 1:n) { tmp[[1]] <- lData$title[[i]] tmp[[2]] <- lData$subtitle[[i]] tmp[[3]] <- lData$range[[i]] ...
/R/utils.R
no_license
smartinsightsfromdata/d3Dashboard
R
false
false
440
r
dataPrep <- function(lData) { n <- length(lData[[1]]) retList <- list() tmp <- rep(list(NA), 5) names(tmp) <- c("title", "subtitle", "ranges", "measures", "markers") retList[[1]] <- tmp for (i in 1:n) { tmp[[1]] <- lData$title[[i]] tmp[[2]] <- lData$subtitle[[i]] tmp[[3]] <- lData$range[[i]] ...
####### #Author: Nashipae Waweru #Date: 28/MARCH/2020 #Title: Objects ####### # Before we continue, make sure you know what objects you have in your environment. Use a function to get a list of the object in your environment ???? #Solution ls() # Create a variable called lvl that contains the following ...
/Day 12/Exercise 3.R
no_license
Nashie-R/100DaysOfCodingR.
R
false
false
1,386
r
####### #Author: Nashipae Waweru #Date: 28/MARCH/2020 #Title: Objects ####### # Before we continue, make sure you know what objects you have in your environment. Use a function to get a list of the object in your environment ???? #Solution ls() # Create a variable called lvl that contains the following ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MixedGraph.R \name{tianComponent} \alias{tianComponent} \alias{tianComponent.MixedGraph} \title{Returns the Tian c-component of a node} \usage{ tianComponent(this, node) \method{tianComponent}{MixedGraph}(this, node) } \arguments{ \item{this...
/man/tianComponent.Rd
no_license
Lucaweihs/SEMID
R
false
true
462
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MixedGraph.R \name{tianComponent} \alias{tianComponent} \alias{tianComponent.MixedGraph} \title{Returns the Tian c-component of a node} \usage{ tianComponent(this, node) \method{tianComponent}{MixedGraph}(this, node) } \arguments{ \item{this...
## R accepts a variety of compressed file formats for ASCII files: #> scan.txt.Renishaw ("txt.Renishaw/chondro.gz") #> scan.txt.Renishaw ("txt.Renishaw/chondro.xz") #> scan.txt.Renishaw ("txt.Renishaw/chondro.lzma") #> scan.txt.Renishaw ("txt.Renishaw/chondro.gz") #> scan.txt.Renishaw ("txt.Renishaw/chondro.bz2") ##V...
/DATA/Spectroscopy/formats.r
no_license
Aurametrix/R
R
false
false
1,292
r
## R accepts a variety of compressed file formats for ASCII files: #> scan.txt.Renishaw ("txt.Renishaw/chondro.gz") #> scan.txt.Renishaw ("txt.Renishaw/chondro.xz") #> scan.txt.Renishaw ("txt.Renishaw/chondro.lzma") #> scan.txt.Renishaw ("txt.Renishaw/chondro.gz") #> scan.txt.Renishaw ("txt.Renishaw/chondro.bz2") ##V...
library(R.utils) library(EIEvent) appStem <- cmdArg("app",NULL) if (FALSE) { appStem <- "SummerCamp" } source("/usr/local/share/Proc4/EIini.R") EI.config <- fromJSON(file.path(config.dir,"config.json"),FALSE) app <- as.character(Proc4.config$apps[appStem]) if (length(app)==0L || any(app=="NULL")) { stop("Could ...
/bin/RunEIEvent.R
no_license
ralmond/PP-EI
R
false
false
718
r
library(R.utils) library(EIEvent) appStem <- cmdArg("app",NULL) if (FALSE) { appStem <- "SummerCamp" } source("/usr/local/share/Proc4/EIini.R") EI.config <- fromJSON(file.path(config.dir,"config.json"),FALSE) app <- as.character(Proc4.config$apps[appStem]) if (length(app)==0L || any(app=="NULL")) { stop("Could ...
################################################################# ###################### 0. PREREQUISITES ######################### ################################################################# #Loading required packages library(tidyverse) library(plyr) library(gridExtra) library(plyr) library(MASS) #SET YOUR W...
/main.R
no_license
BartJanBoverhof/Bayesian-Regression
R
false
false
10,790
r
################################################################# ###################### 0. PREREQUISITES ######################### ################################################################# #Loading required packages library(tidyverse) library(plyr) library(gridExtra) library(plyr) library(MASS) #SET YOUR W...
## METHODOLOGY & RESEARCH DESIGN: QUANTITATIVE METHODS ## Session 5: BIVARIATE STATISTIC I ## March 19, 2020 ###################################################################### # LET'S CALCULATE THE AVERAGE AGE OF THE PORTUGUESE POPULATION #################################################################...
/Seminar in Quantitative Methods/session5_script.R
no_license
beatrizmaciel/seminarquantitativemethods
R
false
false
1,548
r
## METHODOLOGY & RESEARCH DESIGN: QUANTITATIVE METHODS ## Session 5: BIVARIATE STATISTIC I ## March 19, 2020 ###################################################################### # LET'S CALCULATE THE AVERAGE AGE OF THE PORTUGUESE POPULATION #################################################################...
# test-paper-workflow.R - Bill White - 4/27/17 # # Test replicating the Bioinformatics paper simulated and real data analysis. library(privateEC) context("Paper Workflows") test_that("run one workflow of a simulation plus an analysis step", { num.samples <- 100 num.variables <- 100 pct.signals <- 0.1 upd.frq ...
/tests/testthat/test-paper-workflow.R
no_license
saeid651/privateEC
R
false
false
1,228
r
# test-paper-workflow.R - Bill White - 4/27/17 # # Test replicating the Bioinformatics paper simulated and real data analysis. library(privateEC) context("Paper Workflows") test_that("run one workflow of a simulation plus an analysis step", { num.samples <- 100 num.variables <- 100 pct.signals <- 0.1 upd.frq ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setters.R \name{nTotalEntries<-} \alias{nTotalEntries<-} \title{Set total number database entries} \usage{ nTotalEntries(this) <- value } \arguments{ \item{this}{Object of class \code{MiRNANameConverter}} \item{value}{An \code{integer} value...
/man/nTotalEntries-set.Rd
no_license
StefanHaunsberger/miRNAmeConverter
R
false
true
665
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setters.R \name{nTotalEntries<-} \alias{nTotalEntries<-} \title{Set total number database entries} \usage{ nTotalEntries(this) <- value } \arguments{ \item{this}{Object of class \code{MiRNANameConverter}} \item{value}{An \code{integer} value...
# Error testing # Unarine Singo # 6 January 2021 # import R functions ------------ source("R/plotter.R") source("R/simulate.R") source("R/segmentation.R") source("R/simulate.R") #source("R/stylisedFacts.R") source("R/05_ICC.R") source("R/NohAnzatsStateSimulation.R") # libraries --------------------- library('tidyve...
/tests/ErrorTesting.R
no_license
Una95Singo/MarketStates
R
false
false
7,811
r
# Error testing # Unarine Singo # 6 January 2021 # import R functions ------------ source("R/plotter.R") source("R/simulate.R") source("R/segmentation.R") source("R/simulate.R") #source("R/stylisedFacts.R") source("R/05_ICC.R") source("R/NohAnzatsStateSimulation.R") # libraries --------------------- library('tidyve...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pnbd.R \name{pnbd.PlotFrequencyInCalibration} \alias{pnbd.PlotFrequencyInCalibration} \title{Pareto/NBD Plot Frequency in Calibration Period} \usage{ pnbd.PlotFrequencyInCalibration( params, cal.cbs, censor, hardie = TRUE, plotZero ...
/man/pnbd.PlotFrequencyInCalibration.Rd
no_license
cran/BTYD
R
false
true
2,496
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pnbd.R \name{pnbd.PlotFrequencyInCalibration} \alias{pnbd.PlotFrequencyInCalibration} \title{Pareto/NBD Plot Frequency in Calibration Period} \usage{ pnbd.PlotFrequencyInCalibration( params, cal.cbs, censor, hardie = TRUE, plotZero ...
\name{sdb} \alias{sdb} \docType{package} \title{sdb: an R-MySQL interface} \description{ \pkg{sdb} is a meta-package on top of RMySQL, RODBC and mysql CLI } \note{ \itemize{ \item Under Windows \pkg{sdb} needs \pkg{RODBC} and the \href{https://dev.mysql.com/downloads/connector/odbc}{ODBC connector...
/man/000_sdb.Rd
no_license
alrutten/sdb
R
false
false
1,589
rd
\name{sdb} \alias{sdb} \docType{package} \title{sdb: an R-MySQL interface} \description{ \pkg{sdb} is a meta-package on top of RMySQL, RODBC and mysql CLI } \note{ \itemize{ \item Under Windows \pkg{sdb} needs \pkg{RODBC} and the \href{https://dev.mysql.com/downloads/connector/odbc}{ODBC connector...
###이상치 정제하기 - 정상범주에서 크게 벗어난 값 ##이상치 제거하기 - 존재할 수 없는 값(sex:3,score:6) outlier <- data.frame(sex=c(1,2,1,3,2,1), score=c(5,4,3,4,2,6)) #이상치 확인 table(outlier$sex) table(outlier$score) #결측 처리하기-sex #sex가 3이면 NA할당 outlier$sex <- ifelse(outlier$sex==3,NA,outlier$sex) outlier #score가 1~5 아니면 NA 할당 outlie...
/Basic/day5-이상치 정제하기.R
no_license
qkqwof/R
R
false
false
1,380
r
###이상치 정제하기 - 정상범주에서 크게 벗어난 값 ##이상치 제거하기 - 존재할 수 없는 값(sex:3,score:6) outlier <- data.frame(sex=c(1,2,1,3,2,1), score=c(5,4,3,4,2,6)) #이상치 확인 table(outlier$sex) table(outlier$score) #결측 처리하기-sex #sex가 3이면 NA할당 outlier$sex <- ifelse(outlier$sex==3,NA,outlier$sex) outlier #score가 1~5 아니면 NA 할당 outlie...
## generate random graph(DAG) of G genes and their correspond differential network ## B_1 & B_2 ## @param Ng gene number nodes ## @param e Expected number of edges per node ## @param d Expected ratio of differential edges per node (0.1) ## @param dag DAG or not require(igraph) require(Matrix) require(glmnet) getrandDAG...
/inst/00_SparsemaximumLiklihood.R
no_license
Ivis4ml/fssemR
R
false
false
131,665
r
## generate random graph(DAG) of G genes and their correspond differential network ## B_1 & B_2 ## @param Ng gene number nodes ## @param e Expected number of edges per node ## @param d Expected ratio of differential edges per node (0.1) ## @param dag DAG or not require(igraph) require(Matrix) require(glmnet) getrandDAG...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/eml.R \name{pid_to_eml_entity} \alias{pid_to_eml_entity} \title{Create EML entity with physical section from a DataONE PID} \usage{ pid_to_eml_entity(mn, pid, entity_type = "otherEntity", ...) } \arguments{ \item{mn}{(MNode) Member Node where...
/man/pid_to_eml_entity.Rd
permissive
kristenpeach/arcticdatautils
R
false
true
1,069
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/eml.R \name{pid_to_eml_entity} \alias{pid_to_eml_entity} \title{Create EML entity with physical section from a DataONE PID} \usage{ pid_to_eml_entity(mn, pid, entity_type = "otherEntity", ...) } \arguments{ \item{mn}{(MNode) Member Node where...
# Report # Data = TmbData # ParHat = Obj$env$parList() # SD = Opt$SD # category_order = 1:Data$n_c # category_names = 1:Data$n_c # plotdir = diag_dir # figname = "Cov" # plotTF = NULL # plot_cor = TRUE # mgp = c(2, 0.5, 0) # tck = -0.02 # oma = c(0, 5, 2, 0) summarize_covariance = function (Report, Data, ParHat, SD ...
/data/operating_model/diagnostics/summarize_covariance.r
no_license
garonen/Optimal_Allocation_GoA_Manuscript
R
false
false
6,058
r
# Report # Data = TmbData # ParHat = Obj$env$parList() # SD = Opt$SD # category_order = 1:Data$n_c # category_names = 1:Data$n_c # plotdir = diag_dir # figname = "Cov" # plotTF = NULL # plot_cor = TRUE # mgp = c(2, 0.5, 0) # tck = -0.02 # oma = c(0, 5, 2, 0) summarize_covariance = function (Report, Data, ParHat, SD ...
\name{geneFilter} \alias{geneFilter} \title{geneFilter} \description{the function to filter genes by Intergrative Correlation} \usage{geneFilter(obj, cor.cutoff = 0.5)} \arguments{ \item{obj}{a list of ExpressionSet, matrix or SummarizedExperiment objects. If its elements are matrices, columns represent...
/man/geneFilter.Rd
no_license
lwaldron/simulatorZ
R
false
false
2,477
rd
\name{geneFilter} \alias{geneFilter} \title{geneFilter} \description{the function to filter genes by Intergrative Correlation} \usage{geneFilter(obj, cor.cutoff = 0.5)} \arguments{ \item{obj}{a list of ExpressionSet, matrix or SummarizedExperiment objects. If its elements are matrices, columns represent...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_met_data.R \name{get_met_data} \alias{get_met_data} \title{Get data from a meteorological station} \usage{ get_met_data(station_id, years = NULL, full_data = FALSE, add_fields = NULL, make_hourly = TRUE, local_file_dir = NULL) } \argume...
/man/get_met_data.Rd
permissive
dondealban/stationaRy
R
false
true
3,529
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_met_data.R \name{get_met_data} \alias{get_met_data} \title{Get data from a meteorological station} \usage{ get_met_data(station_id, years = NULL, full_data = FALSE, add_fields = NULL, make_hourly = TRUE, local_file_dir = NULL) } \argume...
# Read data in R # Note that data is separated by ; electric <- read.table("household_power_consumption.txt", sep = ";", header = TRUE,na.strings ="?") # convert date electric$Date <- as.Date(electric$Date,"%d/%m/%Y") # convert time electric$datetime <- paste(electric$Date, electric$Time) electric$Time <- strptime(e...
/plot1.R
no_license
davidrip83/ExData_Plotting1
R
false
false
761
r
# Read data in R # Note that data is separated by ; electric <- read.table("household_power_consumption.txt", sep = ";", header = TRUE,na.strings ="?") # convert date electric$Date <- as.Date(electric$Date,"%d/%m/%Y") # convert time electric$datetime <- paste(electric$Date, electric$Time) electric$Time <- strptime(e...
m<-lm(formula=Satisfaction~Age+Gender+Airline.Status+Price.Sensitivity+Year.of.First.Flight+ No.of.Flights.p.a.+Percentage.of.Flight.with.other.Airlines+Type.of.Travel+ No.of.other.Loyalty.Cards+Shopping.Amount.at.Airport+Eating.and.Drinking.at.Airport+Class+ Day.of.Month+Scheduled.Departure.Ho...
/LinearModelling.R
no_license
fall2018-saltz/group2_ist687_ec
R
false
false
504
r
m<-lm(formula=Satisfaction~Age+Gender+Airline.Status+Price.Sensitivity+Year.of.First.Flight+ No.of.Flights.p.a.+Percentage.of.Flight.with.other.Airlines+Type.of.Travel+ No.of.other.Loyalty.Cards+Shopping.Amount.at.Airport+Eating.and.Drinking.at.Airport+Class+ Day.of.Month+Scheduled.Departure.Ho...
# Factor Sampling --------------------------------------------------------- test_that("Sample TEF", { set.seed(1234) tef <- sample_tef(n = 10, params = list(1, 10, 100)) expect_is(tef, "list") # ensure that the list has the required elements expect_equal(names(tef), c("type", "samples", "details")) # ens...
/tests/testthat/test-openfair.R
permissive
abdullahalbyati/evaluator
R
false
false
11,489
r
# Factor Sampling --------------------------------------------------------- test_that("Sample TEF", { set.seed(1234) tef <- sample_tef(n = 10, params = list(1, 10, 100)) expect_is(tef, "list") # ensure that the list has the required elements expect_equal(names(tef), c("type", "samples", "details")) # ens...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/plot.versionTest.R \name{plot.versionTest} \alias{plot.versionTest} \title{plot.versionTest} \usage{ \method{plot}{versionTest}(x, versions = setdiff(names(x), "test")) } \arguments{ \item{x}{a data frame of the type returned by compa...
/man/plot.versionTest.Rd
no_license
davetgerrard/kanute
R
false
false
523
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/plot.versionTest.R \name{plot.versionTest} \alias{plot.versionTest} \title{plot.versionTest} \usage{ \method{plot}{versionTest}(x, versions = setdiff(names(x), "test")) } \arguments{ \item{x}{a data frame of the type returned by compa...
funboot<-function(data,iter){ estar=matrix(NA,length(data[,1]),iter) ystar=matrix(NA,length(data[,1]),iter) u=matrix(NA,dim(data)[2],iter) bsresvar <- rep(NA,iter) w<-(1/abs(lasso(y~.,data)$coef))[-1] if(sum(w!=Inf)==0) w<-NULL LASSO<-lasso( y ~ . , data=data, weights=w ) coef<-(LASSO$coef)[-1...
/Functions/fun.R
no_license
Allisterh/Forecasting-ProjetEZ
R
false
false
851
r
funboot<-function(data,iter){ estar=matrix(NA,length(data[,1]),iter) ystar=matrix(NA,length(data[,1]),iter) u=matrix(NA,dim(data)[2],iter) bsresvar <- rep(NA,iter) w<-(1/abs(lasso(y~.,data)$coef))[-1] if(sum(w!=Inf)==0) w<-NULL LASSO<-lasso( y ~ . , data=data, weights=w ) coef<-(LASSO$coef)[-1...
# # 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) source("funcoes.R", encoding = 'UTF-8') source("texto.R", encoding = 'UTF-8') ui <- fluidPage( ...
/testes_de_app.R
permissive
GabrielReisR/est_lat_var_por_shiny
R
false
false
4,377
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) source("funcoes.R", encoding = 'UTF-8') source("texto.R", encoding = 'UTF-8') ui <- fluidPage( ...
df <- read.csv("./output/example.csv") # Only use observations with no intervention tmp <- subset(df, df$group == 'base') # Cashflow per phase tmp$cash0 <- tmp$revenue0 - tmp$cost0 tmp$cash1 <- tmp$revenue1 - tmp$cost1 tmp$cash2 <- tmp$revenue2 - tmp$cost2 tmp$cash3 <- tmp$revenue3 - tmp$cost3 tmp$cash4 <- tmp$revenu...
/examples/multiple/stats/cumulative-cashflow-01.R
permissive
chrokh/mc-rndsim
R
false
false
1,803
r
df <- read.csv("./output/example.csv") # Only use observations with no intervention tmp <- subset(df, df$group == 'base') # Cashflow per phase tmp$cash0 <- tmp$revenue0 - tmp$cost0 tmp$cash1 <- tmp$revenue1 - tmp$cost1 tmp$cash2 <- tmp$revenue2 - tmp$cost2 tmp$cash3 <- tmp$revenue3 - tmp$cost3 tmp$cash4 <- tmp$revenu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nodes.R \name{build_ranged_derived_field_apply_node} \alias{build_ranged_derived_field_apply_node} \title{Build Apply node with interval nodes for DerivedField node.} \usage{ build_ranged_derived_field_apply_node(var_details_row, db_nam...
/man/build_ranged_derived_field_apply_node.Rd
permissive
cran/recodeflow
R
false
true
571
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nodes.R \name{build_ranged_derived_field_apply_node} \alias{build_ranged_derived_field_apply_node} \title{Build Apply node with interval nodes for DerivedField node.} \usage{ build_ranged_derived_field_apply_node(var_details_row, db_nam...
# Social capital and the success of economic sanctions # # Data Collection # Variables - IV and DV # Analysis # # Taehee whang # 02/09/2016 # 06/12/2017 library(foreign) library(haven) ## Data = sanctions + sc + KimYW_NGO data = sanctions_sc_KimYW_merge.dta sanctions_sc_KimYW_merge <- read_dta("C:/Users/thwha/D...
/rdo/Rcode.R
no_license
pherephobia/SCEconSanction
R
false
false
7,498
r
# Social capital and the success of economic sanctions # # Data Collection # Variables - IV and DV # Analysis # # Taehee whang # 02/09/2016 # 06/12/2017 library(foreign) library(haven) ## Data = sanctions + sc + KimYW_NGO data = sanctions_sc_KimYW_merge.dta sanctions_sc_KimYW_merge <- read_dta("C:/Users/thwha/D...
library(rgee) # ee_reattach() # reattach ee as a reserved word ee_Initialize() dataset <- ee$Image("CSP/ERGo/1_0/US/landforms") landforms <- dataset$select("constant") landformsVis <- list( min = 11.0, max = 42.0, palette = c( "141414", "383838", "808080", "EBEB8F", "F7D311", "AA0000", "D89382", "DDC9C9...
/examples/Datasets/Terrain/us_ned_landforms.R
permissive
benardonyango/rgee
R
false
false
494
r
library(rgee) # ee_reattach() # reattach ee as a reserved word ee_Initialize() dataset <- ee$Image("CSP/ERGo/1_0/US/landforms") landforms <- dataset$select("constant") landformsVis <- list( min = 11.0, max = 42.0, palette = c( "141414", "383838", "808080", "EBEB8F", "F7D311", "AA0000", "D89382", "DDC9C9...
library(dplyr) library(jsonlite) library(Hmisc) library(stringr) trans_level <- function(x,nsep=" to ") { n <- str_extract_all(x,"\\d+")[[1]] ## extract numbers v <- formatC(as.numeric(n), big.mark = ",", format = 'd') ## change format x <- as.character(x) paste0( substring(x, 1, 1), paste(v,collapse=...
/shinyApp/gman-viz/choroOutput.R
no_license
michaelDemertzi/GMAN
R
false
false
1,682
r
library(dplyr) library(jsonlite) library(Hmisc) library(stringr) trans_level <- function(x,nsep=" to ") { n <- str_extract_all(x,"\\d+")[[1]] ## extract numbers v <- formatC(as.numeric(n), big.mark = ",", format = 'd') ## change format x <- as.character(x) paste0( substring(x, 1, 1), paste(v,collapse=...
library(pracma) # on the cluster # library(pracma,lib='~/R') Pi=read.table('Pi',header=FALSE) F=diag(c(t(Pi))) Q=read.table('Q',header=FALSE) ev <- eigen(Q) Lambda=ev$values S=ev$vectors inv_S=solve(S) n_mats = scan('t.mat',what = double(0)) num_aln = 100 list_dis=c(0) for (i in 2:num_aln){ j=i*160000 n_ma...
/cath/sum_cao_dis.R
no_license
heichiyidui/dev
R
false
false
672
r
library(pracma) # on the cluster # library(pracma,lib='~/R') Pi=read.table('Pi',header=FALSE) F=diag(c(t(Pi))) Q=read.table('Q',header=FALSE) ev <- eigen(Q) Lambda=ev$values S=ev$vectors inv_S=solve(S) n_mats = scan('t.mat',what = double(0)) num_aln = 100 list_dis=c(0) for (i in 2:num_aln){ j=i*160000 n_ma...
\name{check_hyperpar_gaussian} \alias{check_hyperpar_gaussian} \title{check hyperpar gaussian} \usage{check_hyperpar_gaussian(hyperpar)} \arguments{ \item{hyperpar}{ } } \author{Thiago Guerrera Martins}
/functions/priorSens/man/check_hyperpar_gaussian.Rd
permissive
kassteele/Contact-patterns
R
false
false
232
rd
\name{check_hyperpar_gaussian} \alias{check_hyperpar_gaussian} \title{check hyperpar gaussian} \usage{check_hyperpar_gaussian(hyperpar)} \arguments{ \item{hyperpar}{ } } \author{Thiago Guerrera Martins}
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tools.R \name{get.gr.lagsat} \alias{get.gr.lagsat} \title{Extract exponential growth rate assuming lagged exponential growth that saturates} \usage{ get.gr.lagsat(x, y, plotQ = F, fpath = NA, id = "") } \arguments{ \item{x}{Time steps} \item...
/man/get.gr.lagsat.Rd
permissive
ctkremer/growthTools
R
false
true
908
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tools.R \name{get.gr.lagsat} \alias{get.gr.lagsat} \title{Extract exponential growth rate assuming lagged exponential growth that saturates} \usage{ get.gr.lagsat(x, y, plotQ = F, fpath = NA, id = "") } \arguments{ \item{x}{Time steps} \item...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dasl.R \docType{data} \name{dasl.erp_effectiveness} \alias{dasl.erp_effectiveness} \title{ERP Effectiveness} \format{8 observations} \source{ DASL – The Data And Story Library: \href{https://dasl.datadescription.com/datafile/erp-effectiveness...
/man/dasl.erp_effectiveness.Rd
no_license
sigbertklinke/mmstat.data
R
false
true
988
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dasl.R \docType{data} \name{dasl.erp_effectiveness} \alias{dasl.erp_effectiveness} \title{ERP Effectiveness} \format{8 observations} \source{ DASL – The Data And Story Library: \href{https://dasl.datadescription.com/datafile/erp-effectiveness...
# leave-one-out and 10-fold cross-validation prediction error for # the mcycle data set data(mcycle, package="MASS") mcycle.glm <- glm(mcycle$accel, mcycle$times, data = mcycle) (cv.err <- cv.glm(mcycle, mcycle.glm)$delta) (cv.err.10 <- cv.glm(mcycle, mcycle.glm, K = 10)$delta) # As this is a linea model we could cal...
/AsignaturaMineriadeDatos/tarea/foo.r
no_license
pbarbero/MasterModelizacionMatematica
R
false
false
624
r
# leave-one-out and 10-fold cross-validation prediction error for # the mcycle data set data(mcycle, package="MASS") mcycle.glm <- glm(mcycle$accel, mcycle$times, data = mcycle) (cv.err <- cv.glm(mcycle, mcycle.glm)$delta) (cv.err.10 <- cv.glm(mcycle, mcycle.glm, K = 10)$delta) # As this is a linea model we could cal...
library(RJDBC) library(tidyverse) library(scales) library(psych) library(countrycode) library(xtable) setwd("C:/Users/Anna/Documents/MSBA/Capstone/SubmitterProfile_Capstone/LaTeX_Files") driver <- JDBC("com.amazon.redshift.jdbc42.Driver", "~/RedshiftJDBC42-1.2.12.1017.jar", identifier.quote="`") url <...
/Descriptive Stats.R
no_license
amarbut/SubmitterProfile_Capstone
R
false
false
11,007
r
library(RJDBC) library(tidyverse) library(scales) library(psych) library(countrycode) library(xtable) setwd("C:/Users/Anna/Documents/MSBA/Capstone/SubmitterProfile_Capstone/LaTeX_Files") driver <- JDBC("com.amazon.redshift.jdbc42.Driver", "~/RedshiftJDBC42-1.2.12.1017.jar", identifier.quote="`") url <...
build.lm.model <- lm(price ~ carat + color + clarity + cut + channel + store, data = train.tmsalary)
/build_lm_model_script.R
no_license
DarrelDent/P412-Assignment-2
R
false
false
160
r
build.lm.model <- lm(price ~ carat + color + clarity + cut + channel + store, data = train.tmsalary)
library(stats) library(MASS) library(CompQuadForm) rm(list= ls()) set.seed(4) #--------------------------- Load functions ---------------------------------- RealisticSimulation <- function(Sample_size,SNP_posi,Risk_Model, risk_effect){ #------------------------------ 1.1. Load the data ----------------------------...
/Codes/Simulation/type I error/HPC2011-10-21/HPC_epi_average.r
no_license
seahearman/Jung-Ying
R
false
false
7,484
r
library(stats) library(MASS) library(CompQuadForm) rm(list= ls()) set.seed(4) #--------------------------- Load functions ---------------------------------- RealisticSimulation <- function(Sample_size,SNP_posi,Risk_Model, risk_effect){ #------------------------------ 1.1. Load the data ----------------------------...
library(ape) library(adegraphics) library(treespace) treefiles <- list.files(file.path(getwd(), "datasets", "ch4", "gene_trees"),full.names = TRUE) tree_list <- lapply(treefiles, read.tree) class(tree_list) <- "multiPhylo" comparisons <- treespace(tree_list, nf = 3) adegraphics::table.image(comparisons$D, ncla...
/example_code_files/Chapter04/recipe_3.R
no_license
jakesauter/R_Bioinformatics_Cookbook
R
false
false
454
r
library(ape) library(adegraphics) library(treespace) treefiles <- list.files(file.path(getwd(), "datasets", "ch4", "gene_trees"),full.names = TRUE) tree_list <- lapply(treefiles, read.tree) class(tree_list) <- "multiPhylo" comparisons <- treespace(tree_list, nf = 3) adegraphics::table.image(comparisons$D, ncla...
add2 <- function(x, y) { x + y } above10 <- function(x){ use <- x > 10 x[use] } above <- function(x, n = 10){ use <- x > n x[use] } columnmean <- function(y, removeNA = TRUE){ nc <- ncol(y) means <- numeric(nc) #numeric vector equal to length of the column for(i in 1:nc){ means[i] <- mean(y[, i], na.rm = r...
/functions.R
no_license
abasu1007/R-Programming
R
false
false
340
r
add2 <- function(x, y) { x + y } above10 <- function(x){ use <- x > 10 x[use] } above <- function(x, n = 10){ use <- x > n x[use] } columnmean <- function(y, removeNA = TRUE){ nc <- ncol(y) means <- numeric(nc) #numeric vector equal to length of the column for(i in 1:nc){ means[i] <- mean(y[, i], na.rm = r...
# test time complexity require(Matrix) source("jacobi.R") nn <- ceiling(exp(log(10)/4 * 1:17)) nreps <- floor(max(nn)/nn) nn.times <- rep(1,length(nn)) for(i in seq_along(nn)){ # declare transition/generating matrix n <- nn[i] rightii <- 1:(n*(n-1)) rightjj <- rightii + n upii <- 1:(n^2) upii <- upii[...
/inference-testing/test_time_jacobi.R
no_license
petrelharp/tortoisescape
R
false
false
1,259
r
# test time complexity require(Matrix) source("jacobi.R") nn <- ceiling(exp(log(10)/4 * 1:17)) nreps <- floor(max(nn)/nn) nn.times <- rep(1,length(nn)) for(i in seq_along(nn)){ # declare transition/generating matrix n <- nn[i] rightii <- 1:(n*(n-1)) rightjj <- rightii + n upii <- 1:(n^2) upii <- upii[...
#' @importFrom magrittr %>% #' @title Current Probability of Failure for LV switchgear and others #' @description This function calculates the current #' annual probability of failure for LV switchgear and others #' The function is a cubic curve that is based on #' the first three terms of the Taylor series for an #' e...
/R/pof_lv_switchgear_and_other.R
permissive
scoultersdcoe/CNAIM
R
false
false
14,670
r
#' @importFrom magrittr %>% #' @title Current Probability of Failure for LV switchgear and others #' @description This function calculates the current #' annual probability of failure for LV switchgear and others #' The function is a cubic curve that is based on #' the first three terms of the Taylor series for an #' e...
# LatticeKrig # Copyright 2004-2011, Institute for Mathematics Applied Geosciences # University Corporation for Atmospheric Research # Licensed under the GPL -- www.gpl.org/licenses/gpl.html library( LatticeKrig) options( echo=FALSE) ########################################## test.for.zero.flag<- 1 data( ozone2) ...
/LatticeKrig/tests/LKrig.test.R
no_license
ingted/R-Examples
R
false
false
12,204
r
# LatticeKrig # Copyright 2004-2011, Institute for Mathematics Applied Geosciences # University Corporation for Atmospheric Research # Licensed under the GPL -- www.gpl.org/licenses/gpl.html library( LatticeKrig) options( echo=FALSE) ########################################## test.for.zero.flag<- 1 data( ozone2) ...
## -------------------------------------------------------------------------------------------------------------------- ## ## Function: rankall ## Input: Quality of care data from over 4,000 Medicare-certified hospitals in the United States. ## Source of data is the Hospital Compare website run by the U...
/rankall.R
no_license
Mshraddha26/Project-3
R
false
false
2,245
r
## -------------------------------------------------------------------------------------------------------------------- ## ## Function: rankall ## Input: Quality of care data from over 4,000 Medicare-certified hospitals in the United States. ## Source of data is the Hospital Compare website run by the U...
library(tidyverse) library(TDA) library(TSclust) lands <- read_csv("data/mazda/processed/lands.csv") lands %>% ggplot(aes(tseq, land_1, group=number))+ geom_line(size=.3)+ facet_grid(name ~ type, scales="free_y")+ labs(x = "radius", y="landscape")+ theme_bw()+ theme(text = element_text(size=5)) ggsave("...
/report/landscape.R
no_license
kur0cky/TDA
R
false
false
703
r
library(tidyverse) library(TDA) library(TSclust) lands <- read_csv("data/mazda/processed/lands.csv") lands %>% ggplot(aes(tseq, land_1, group=number))+ geom_line(size=.3)+ facet_grid(name ~ type, scales="free_y")+ labs(x = "radius", y="landscape")+ theme_bw()+ theme(text = element_text(size=5)) ggsave("...
library(httr) x= POST( 'https://www.iso-ne.com/isoexpress/web/reports/load-and-demand?p_p_id=operdataviewdetails_WAR_isoneoperdataviewportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-2&p_p_col_count=1', encod='json', body=list( '_operdataviewdetails_WAR_...
/data-science-scripts/zach/ts_charts.R
no_license
mcohenmcohen/DataRobot
R
false
false
1,052
r
library(httr) x= POST( 'https://www.iso-ne.com/isoexpress/web/reports/load-and-demand?p_p_id=operdataviewdetails_WAR_isoneoperdataviewportlet&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_cacheability=cacheLevelPage&p_p_col_id=column-2&p_p_col_count=1', encod='json', body=list( '_operdataviewdetails_WAR_...
################################################################## ## MODEL FREE ESTIMATES FOR SURVIVAL ANALYSIS ## ################################################################## # 01/04/2021 # This rscript is a supplement to the paper: # Model-free estimates that complement information obtained ...
/supplement_rscript.R
permissive
svd09/RMST-part4
R
false
false
6,380
r
################################################################## ## MODEL FREE ESTIMATES FOR SURVIVAL ANALYSIS ## ################################################################## # 01/04/2021 # This rscript is a supplement to the paper: # Model-free estimates that complement information obtained ...
## trains the emulator on the given round-robin folder. ## further functions can be used to generate the implausibility slices etc ## this is designed to be called by something that has defined mwString and ## is of course in the right place for the paths to work :) source("~/local/include/libRbind/EmuRbind.R") # loa...
/msu-chemtreeN-analysis/exp-analysis/round-robin-5param/combAna.R
no_license
scottedwardpratt/stat
R
false
false
2,372
r
## trains the emulator on the given round-robin folder. ## further functions can be used to generate the implausibility slices etc ## this is designed to be called by something that has defined mwString and ## is of course in the right place for the paths to work :) source("~/local/include/libRbind/EmuRbind.R") # loa...
######r code for run MCMC for estimating the Discrete Normal distribution parameters######## ## see definition for normal distribution in Kemp, Characterizations of a discrete normal distribution ## Journal of statistical planning and inference 63(1997) p223 ########################################### #define var...
/CellDivCmd/bin/Debug/mcmc_division_denstiny.r
no_license
ffeng23/CellDiv
R
false
false
4,278
r
######r code for run MCMC for estimating the Discrete Normal distribution parameters######## ## see definition for normal distribution in Kemp, Characterizations of a discrete normal distribution ## Journal of statistical planning and inference 63(1997) p223 ########################################### #define var...
## Caching the Inverse of a Matrix: ## Matrix inversion is usually a costly computation and there may be some ## benefit to caching the inverse of a matrix rather than compute it repeatedly. ## Below are a pair of functions that are used to create a special object that ## stores a matrix and caches its inverse. ## C...
/cachematrix.R
no_license
MohannadNafee/ProgrammingAssignment2
R
false
false
2,426
r
## Caching the Inverse of a Matrix: ## Matrix inversion is usually a costly computation and there may be some ## benefit to caching the inverse of a matrix rather than compute it repeatedly. ## Below are a pair of functions that are used to create a special object that ## stores a matrix and caches its inverse. ## C...
## Jonah Simon ## Import Arc Outputs and DHS data # Load libraries library(tidyverse) library(haven) library(readxl) # Import DHS data files children2010 <- read_dta("~/Google Drive/Middlebury/Econ Research/symposium/DHSData/DHS2010/TZKR63DT/TZKR63FL.DTA") individual2010 <- read_dta("~/Google Drive/Middlebury/Econ R...
/importingData.R
no_license
jonahsimon36/tanzania
R
false
false
1,817
r
## Jonah Simon ## Import Arc Outputs and DHS data # Load libraries library(tidyverse) library(haven) library(readxl) # Import DHS data files children2010 <- read_dta("~/Google Drive/Middlebury/Econ Research/symposium/DHSData/DHS2010/TZKR63DT/TZKR63FL.DTA") individual2010 <- read_dta("~/Google Drive/Middlebury/Econ R...
library(stringr) data.lib="/Users/xuehan/Desktop/Spr2017-proj4-team-9/data/nameset" data.files=list.files(path=data.lib, "*.txt") data.files ## remove "*.txt" query.list=substring(data.files, 1, nchar(data.files)-4) query.list ## add a space query.list=paste(substring(query.list, 1, 1), ...
/lib/data cleaner.R
no_license
TZstatsADS/Spr2017-proj4-team-9
R
false
false
3,308
r
library(stringr) data.lib="/Users/xuehan/Desktop/Spr2017-proj4-team-9/data/nameset" data.files=list.files(path=data.lib, "*.txt") data.files ## remove "*.txt" query.list=substring(data.files, 1, nchar(data.files)-4) query.list ## add a space query.list=paste(substring(query.list, 1, 1), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mda.R \name{getmdr} \alias{getmdr} \title{Get the raw Mass Defect} \usage{ getmdr(mz) } \arguments{ \item{mz}{numeric vector for exact mass} } \value{ raw Mass Defect } \description{ Get the raw Mass Defect } \examples{ getmdr(getmass('C2H4')...
/man/getmdr.Rd
no_license
yufree/enviGCMS
R
false
true
324
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mda.R \name{getmdr} \alias{getmdr} \title{Get the raw Mass Defect} \usage{ getmdr(mz) } \arguments{ \item{mz}{numeric vector for exact mass} } \value{ raw Mass Defect } \description{ Get the raw Mass Defect } \examples{ getmdr(getmass('C2H4')...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model.matrix.R \docType{methods} \name{model.matrix,BFBayesFactor-method} \alias{model.matrix,BFBayesFactor} \alias{model.matrix,BFBayesFactor-method} \alias{model.matrix,BFBayesFactorTop-method} \title{Design matrices for Bayes factor linear...
/pkg/BayesFactor/man/model.matrix-methods.Rd
no_license
jonathon-love/BayesFactor
R
false
true
1,410
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model.matrix.R \docType{methods} \name{model.matrix,BFBayesFactor-method} \alias{model.matrix,BFBayesFactor} \alias{model.matrix,BFBayesFactor-method} \alias{model.matrix,BFBayesFactorTop-method} \title{Design matrices for Bayes factor linear...
install.packages("tidyverse") install.packages("data.table") install.packages("remotes") install.packages("rlang") install.packages("SuperLearner") remotes::install_github("osofr/condensier@master") remotes::install_github("jeremyrcoyle/origami@master") remotes::install_github("jeremyrcoyle/sl3@master")
/install.R
permissive
chenweichen/lab_05
R
false
false
306
r
install.packages("tidyverse") install.packages("data.table") install.packages("remotes") install.packages("rlang") install.packages("SuperLearner") remotes::install_github("osofr/condensier@master") remotes::install_github("jeremyrcoyle/origami@master") remotes::install_github("jeremyrcoyle/sl3@master")
#' Add a fourth "ID" column to bed-style files #' #' There are three required BED fields: chr, chromStart #' and chromEnd. The fourth (optional) column is reserved #' for name which this function generates as "chr-chromStart". #' #' @export #' #' @param bed_file either a dataframe or filename to be read #' #' @exa...
/R/bioinfo_fns.R
permissive
blmoore/blmR
R
false
false
3,473
r
#' Add a fourth "ID" column to bed-style files #' #' There are three required BED fields: chr, chromStart #' and chromEnd. The fourth (optional) column is reserved #' for name which this function generates as "chr-chromStart". #' #' @export #' #' @param bed_file either a dataframe or filename to be read #' #' @exa...
require(plot3D) epsilon.rad <- 3*pi/4 phase.periods <- 0.1 time <- 0 x.waveplateStart <- 0 x.waveplateEnd <- 2 waveplate.shiftPeriods <- 0.5 x <- seq(from=-1,to=2,by=0.01) Ex <- function(x=0, t=time) { shift <- sapply(x, function(x) { if(x < x.waveplateStart) shift <- 0 else if(x > x.waveplateEnd) shift <...
/sketches/betterWaveplate.R
no_license
AlreadyTakenJonas/bachelorThesisSummary
R
false
false
3,000
r
require(plot3D) epsilon.rad <- 3*pi/4 phase.periods <- 0.1 time <- 0 x.waveplateStart <- 0 x.waveplateEnd <- 2 waveplate.shiftPeriods <- 0.5 x <- seq(from=-1,to=2,by=0.01) Ex <- function(x=0, t=time) { shift <- sapply(x, function(x) { if(x < x.waveplateStart) shift <- 0 else if(x > x.waveplateEnd) shift <...
require(Matrix) bestEigen <- function(x=x,a1=NULL,a2=NULL,tol=1.0e-6,maxiter=100) { # set.seed(12345) n <- nrow(x) s1 <- colSums(x)/n s2 <- colSums(x^2)/n z <- s2-s1*s1 # bad <- which(z==0) good <- setdiff(1:n,bad) x <- x[-bad,-bad] for (i in 1:3) junk <- gc() k <- nrow(x) s1 <- colSums(x)/k s2 <- colSums(x^...
/bestEigen3.R
no_license
zozo123/EigenVector
R
false
false
1,432
r
require(Matrix) bestEigen <- function(x=x,a1=NULL,a2=NULL,tol=1.0e-6,maxiter=100) { # set.seed(12345) n <- nrow(x) s1 <- colSums(x)/n s2 <- colSums(x^2)/n z <- s2-s1*s1 # bad <- which(z==0) good <- setdiff(1:n,bad) x <- x[-bad,-bad] for (i in 1:3) junk <- gc() k <- nrow(x) s1 <- colSums(x)/k s2 <- colSums(x^...
library(RCurl) library(XML) library(xml2) library(rvest) require(plyr) form <- read.table("clipboard", sep="\t") names(form) <- "BoardGameGeek Username" fulldata <- data.frame(matrix(nrow = 1, ncol=16, data = 0)) user_temp_data <- data.frame(matrix(nrow = 1, ncol=16, data = 0)) names(fulldata) <- c( "user", ...
/bgg_group_data.R
no_license
ScottBurger/bgg_group_data
R
false
false
3,079
r
library(RCurl) library(XML) library(xml2) library(rvest) require(plyr) form <- read.table("clipboard", sep="\t") names(form) <- "BoardGameGeek Username" fulldata <- data.frame(matrix(nrow = 1, ncol=16, data = 0)) user_temp_data <- data.frame(matrix(nrow = 1, ncol=16, data = 0)) names(fulldata) <- c( "user", ...
# Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate context("Test DriverDailyLogResponse") model.instance <- DriverDailyLogResponse$new() test_that("days", { # tests for the property `days` (DriverDailyLogResponseDays) # uncomment below to test ...
/openapi-generator/r/tests/testthat/test_driver_daily_log_response.R
no_license
silverspace/samsara-sdks
R
false
false
396
r
# Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate context("Test DriverDailyLogResponse") model.instance <- DriverDailyLogResponse$new() test_that("days", { # tests for the property `days` (DriverDailyLogResponseDays) # uncomment below to test ...
##librairies needed install.packages("dplyr") install.packages("tidyverse") library(dplyr) library(tidyverse) library(ggplot2) library(ggpubr) ### cenus<- read.csv("DEC_10_SF1_GCTPH1.ST05_with_ann.csv",header=T) head(cenus) colnames(cenus)<- c("ID","ID2","Geog","Geoid1","Geoid2","Geographicarea", "...
/infectious-disease copy.R
no_license
vratchaudhary/Infectious_Diseases_California
R
false
false
4,744
r
##librairies needed install.packages("dplyr") install.packages("tidyverse") library(dplyr) library(tidyverse) library(ggplot2) library(ggpubr) ### cenus<- read.csv("DEC_10_SF1_GCTPH1.ST05_with_ann.csv",header=T) head(cenus) colnames(cenus)<- c("ID","ID2","Geog","Geoid1","Geoid2","Geographicarea", "...
## Get full dataset data_full <- read.csv("./DATA/household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y") ## Subsetting the data data <- subset...
/plot1.R
no_license
bezoza/Course_Project_1
R
false
false
746
r
## Get full dataset data_full <- read.csv("./DATA/household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y") ## Subsetting the data data <- subset...
############################################################################### ## Version 0.6: ## ## Corrected snow melt in fortran code ## Add elevation require(foreach) require(doParallel) require(raster) require(ncdf4) source("helpers.R") ## Climate ## Set climate data files climdir = "~/Dropbox/Data/climate/cru_...
/calcRunoff_WBM.R
no_license
simonbrewer/safricaro
R
false
false
6,095
r
############################################################################### ## Version 0.6: ## ## Corrected snow melt in fortran code ## Add elevation require(foreach) require(doParallel) require(raster) require(ncdf4) source("helpers.R") ## Climate ## Set climate data files climdir = "~/Dropbox/Data/climate/cru_...
#0>>Global Setup-------- #0.Load libraries ----------------------------------------------------------------------------- #netcdy libraries library(ncdf4) #spatial libraries library(sp) library(geosphere) library(rgdal) library(raster) library(RStoolbox) #plotting libraries library(ggplot2) #spatial plotting lib...
/V5-CMFD-ANT-PDF-TESTS.R
no_license
joaquin-ferrer/V5-FSLAMR-CCM
R
false
false
11,264
r
#0>>Global Setup-------- #0.Load libraries ----------------------------------------------------------------------------- #netcdy libraries library(ncdf4) #spatial libraries library(sp) library(geosphere) library(rgdal) library(raster) library(RStoolbox) #plotting libraries library(ggplot2) #spatial plotting lib...
################################# ### FRE7241 Test #1 Solutions 06/16/15 ################################# # Max score 50pts # The below solutions are examples, # Slightly different solutions are also possible. ################################## # 1. (15pts) subset "zoo_series" to Mondays, # download file "zoo_ser...
/FRE7241_test1 solution.R
no_license
PsaksuMeRap/FRE6871
R
false
false
4,157
r
################################# ### FRE7241 Test #1 Solutions 06/16/15 ################################# # Max score 50pts # The below solutions are examples, # Slightly different solutions are also possible. ################################## # 1. (15pts) subset "zoo_series" to Mondays, # download file "zoo_ser...
#' @title Subtyping multi-omics data #' @description Perform subtyping using multiple types of data #' #' @param dataList a list of data matrices. Each matrix represents a data type where the rows are items and the columns are features. The matrices must have the same set of items. #' @param kMax The maximum number of...
/R/subtyping-omics-data.R
no_license
cran/PINSPlus
R
false
false
26,889
r
#' @title Subtyping multi-omics data #' @description Perform subtyping using multiple types of data #' #' @param dataList a list of data matrices. Each matrix represents a data type where the rows are items and the columns are features. The matrices must have the same set of items. #' @param kMax The maximum number of...
\name{south_carolina.cdp} \Rdversion{1.1} \alias{south_carolina.cdp} \docType{data} \title{ south_carolina.cdp } \description{ south_carolina.cdp is a \code{\link[sp:SpatialPolygonsDataFrame]{SpatialPolygonsDataFrame}} with polygons made from the 2000 US Census tiger/line boundary files (\url{http://www.census.gov/geo...
/man/south_carolina.cdp.Rd
no_license
cran/UScensus2000cdp
R
false
false
9,642
rd
\name{south_carolina.cdp} \Rdversion{1.1} \alias{south_carolina.cdp} \docType{data} \title{ south_carolina.cdp } \description{ south_carolina.cdp is a \code{\link[sp:SpatialPolygonsDataFrame]{SpatialPolygonsDataFrame}} with polygons made from the 2000 US Census tiger/line boundary files (\url{http://www.census.gov/geo...
setwd("C:/Users/brecre01/Documents/Coursera") mydata <- read.csv("household_power_consumption.txt", header=TRUE, sep=';', check.names=FALSE, na.strings="?", stringsAsFactors=FALSE, comment.char="", quote='\"') mydata$Date <- as.Date(mydata$Date, format="%d/%m/%Y") datasm <- subset(mydata, subset=(Date >= "2007-02-01" &...
/plot1.R
no_license
Brent-Crews/ExData_Plotting1
R
false
false
638
r
setwd("C:/Users/brecre01/Documents/Coursera") mydata <- read.csv("household_power_consumption.txt", header=TRUE, sep=';', check.names=FALSE, na.strings="?", stringsAsFactors=FALSE, comment.char="", quote='\"') mydata$Date <- as.Date(mydata$Date, format="%d/%m/%Y") datasm <- subset(mydata, subset=(Date >= "2007-02-01" &...
args = commandArgs(trailingOnly=TRUE) library(edgeR) library(ggplot2) library(ggthemes) library(reshape) library(cowplot) eqtl_comparison_to_reference_bar_plot <- function(file_stem, output_file) { # First extract data. And get into nice data format pvalues <- c() version <- c() time_step <- c() ...
/visualize_eqtls_across_time_steps.R
no_license
BennyStrobes/ipsc_qtl_pipelines
R
false
false
7,332
r
args = commandArgs(trailingOnly=TRUE) library(edgeR) library(ggplot2) library(ggthemes) library(reshape) library(cowplot) eqtl_comparison_to_reference_bar_plot <- function(file_stem, output_file) { # First extract data. And get into nice data format pvalues <- c() version <- c() time_step <- c() ...
# Exercise 1: ggplot2 basics # Install and load `ggplot2` # You will also want to load `dplyr` library("ggplot2") library("dplyr") # For this exercise you'll be working with the `diamonds` data set included in the ggplot2 library # Use `?diamonds` to get more information about this data set (including the column desc...
/exercise-1/exercise.R
permissive
josh3396/module13-ggplot2
R
false
false
3,907
r
# Exercise 1: ggplot2 basics # Install and load `ggplot2` # You will also want to load `dplyr` library("ggplot2") library("dplyr") # For this exercise you'll be working with the `diamonds` data set included in the ggplot2 library # Use `?diamonds` to get more information about this data set (including the column desc...
library(data.table) # temp <- tempfile() # download.file("https://cdn.scribbr.com/wp-content/uploads//2020/03/crop.data_.anova_.zip",temp) # data <- read.table(unz(temp, "a1.csv")) # unlink(temp) # # data #read data from url diet <- read.csv("https://www.sheffield.ac.uk/polopoly_fs/1.570199!/file/stcp-Rd...
/Annova.R
no_license
pradyumngupta/Data_analysis_algos
R
false
false
4,481
r
library(data.table) # temp <- tempfile() # download.file("https://cdn.scribbr.com/wp-content/uploads//2020/03/crop.data_.anova_.zip",temp) # data <- read.table(unz(temp, "a1.csv")) # unlink(temp) # # data #read data from url diet <- read.csv("https://www.sheffield.ac.uk/polopoly_fs/1.570199!/file/stcp-Rd...
# Polynomial Regression # Importing the dataset dataset = read.csv('Position_Salaries.csv') dataset = dataset[2:3] # Splitting the dataset into the Training set and Test set # install.packages('caTools') # library(caTools) # set.seed(123) # split = sample.split(dataset$Profit, SplitRatio = 0.8) # training_...
/Part 2/Section 6 - Polynomial Regression/polynomial_regression.R
no_license
Itsu004/Machine-Learning
R
false
false
1,862
r
# Polynomial Regression # Importing the dataset dataset = read.csv('Position_Salaries.csv') dataset = dataset[2:3] # Splitting the dataset into the Training set and Test set # install.packages('caTools') # library(caTools) # set.seed(123) # split = sample.split(dataset$Profit, SplitRatio = 0.8) # training_...
x <- read.table("ESC.PC1.bedGraph") y <- read.table("2CLC.PC1.bedGraph") mydata <- data.frame(x=x$V4,y=y$V4) mydata <- na.omit(mydata) atob <- mydata[mydata$x>0 & mydata$y<0,] btoa <- mydata[mydata$x<0 & mydata$y>0,] s <- c(55,368)/5321 data <- data.frame(type=c("AtoB","BtoA"),value=s) library(ggplot2) ggplot(data,...
/Hi-C/FigS2C.R
no_license
shenlab423/2CLC-Project-Code
R
false
false
409
r
x <- read.table("ESC.PC1.bedGraph") y <- read.table("2CLC.PC1.bedGraph") mydata <- data.frame(x=x$V4,y=y$V4) mydata <- na.omit(mydata) atob <- mydata[mydata$x>0 & mydata$y<0,] btoa <- mydata[mydata$x<0 & mydata$y>0,] s <- c(55,368)/5321 data <- data.frame(type=c("AtoB","BtoA"),value=s) library(ggplot2) ggplot(data,...