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 |
|---|---|---|---|---|---|---|---|---|---|
# Load a set of HTseq output files and return a matrix
LoadHTseq<-function(fns, remove_unassigned=TRUE) {
# fns String vector of name of output files from HTseq. If the strings were named, the names will be used as column names of return matrix.
# remove_unassigned Whether to remove reads assigned... | /R/LoadHTseq.R | no_license | shijianasdf/Rnaseq | R | false | false | 1,251 | r | # Load a set of HTseq output files and return a matrix
LoadHTseq<-function(fns, remove_unassigned=TRUE) {
# fns String vector of name of output files from HTseq. If the strings were named, the names will be used as column names of return matrix.
# remove_unassigned Whether to remove reads assigned... |
# TEST summary.mulTree
# Testing is.wholenumber works
test_that("is.wholenumber works", {
# Error
expect_error(
is.wholenumber("a")
)
# Testing which number is whole
# Not this one
expect_false(
is.wholenumber(1.1)
)
# But this one is
expect_true(
is.wholenumber(roun... | /tests/testthat/test-summary.mulTree.R | no_license | TGuillerme/mulTree | R | false | false | 5,613 | r | # TEST summary.mulTree
# Testing is.wholenumber works
test_that("is.wholenumber works", {
# Error
expect_error(
is.wholenumber("a")
)
# Testing which number is whole
# Not this one
expect_false(
is.wholenumber(1.1)
)
# But this one is
expect_true(
is.wholenumber(roun... |
# Survey sampling code for final project on Islands Data
# Aidan Draper
# December 4, 2018
library(googlesheets)
set.seed(1337)
#authorize data sheet
gs_auth()
survey.df <- data.frame(gs_read(gs_key("1H-nJggWpOutHZG8YScab5UgrWqlnNDvaMWTDdtCytDA")))
sample_size = 61
samples = c(rep(1,14),rep(2,20),rep(3,27))
vill... | /final_survey.R | no_license | adraper2/stats-code | R | false | false | 2,526 | r | # Survey sampling code for final project on Islands Data
# Aidan Draper
# December 4, 2018
library(googlesheets)
set.seed(1337)
#authorize data sheet
gs_auth()
survey.df <- data.frame(gs_read(gs_key("1H-nJggWpOutHZG8YScab5UgrWqlnNDvaMWTDdtCytDA")))
sample_size = 61
samples = c(rep(1,14),rep(2,20),rep(3,27))
vill... |
# 明るさの対比
library(grid)
grid.newpage()
selfvector <- function () {
vec <- readline("適当なベクトルを入力(,で区切り) : ")
as.numeric(unlist(strsplit(vec, ",")))
}
x1 <- selfvector()
y1 <- selfvector()
color1 <- selfvector()
color2 <- as.numeric(readline("適当な数値を入力:"))
grid.rect(x1, y1, 1/2, 1/2, gp = gpar(col = NA, fill = gray(colo... | /expt/brightness-contrast.r | no_license | T-Oxy/illusion-of-illusion | R | false | false | 449 | r | # 明るさの対比
library(grid)
grid.newpage()
selfvector <- function () {
vec <- readline("適当なベクトルを入力(,で区切り) : ")
as.numeric(unlist(strsplit(vec, ",")))
}
x1 <- selfvector()
y1 <- selfvector()
color1 <- selfvector()
color2 <- as.numeric(readline("適当な数値を入力:"))
grid.rect(x1, y1, 1/2, 1/2, gp = gpar(col = NA, fill = gray(colo... |
# Prepare the internal datasets
#
# This function will create and save the datasets in the \code{R/systada.rda}
# file.
#
# param force If TRUE, the inst/extdata file will be created, even if it
# exists. Default: \code{FALSE}.
#
# examples
# prepare_internal_datasets
prepare_internal_datasets <- function(... | /data-raw/data.R | no_license | CharlesJB/FantomEnhancers.mm9 | R | false | false | 3,534 | r | # Prepare the internal datasets
#
# This function will create and save the datasets in the \code{R/systada.rda}
# file.
#
# param force If TRUE, the inst/extdata file will be created, even if it
# exists. Default: \code{FALSE}.
#
# examples
# prepare_internal_datasets
prepare_internal_datasets <- function(... |
library(datasets)
# Define a server for the Shiny app
function(input, output) {
# Fill in the spot we created for a plot
output$phonePlot <- renderPlot({
# Render a barplot
barplot(WorldPhones[,input$region]*1000,
main=input$region,
ylab="Number of Telephones",
... | /Shiny_app_assignment/server.R | no_license | guchiguchi/course9_Shiny_Application_and_Reproducible_Pitch | R | false | false | 351 | r | library(datasets)
# Define a server for the Shiny app
function(input, output) {
# Fill in the spot we created for a plot
output$phonePlot <- renderPlot({
# Render a barplot
barplot(WorldPhones[,input$region]*1000,
main=input$region,
ylab="Number of Telephones",
... |
#Packages
library(shiny)
library(tidyverse)
library(ggplot2)
#set working directory
setwd("/Users/User_2/Desktop/bees")
#loading data
bees_raw <- read.csv("bees_raw.csv")
#filter to us records
bees_us <- bees_raw %>%
filter(place_country_name == "United States")
#map data for polygons
usa <- map_data("state")
#... | /bee_map_app/app.R | no_license | maggieklope/Bee_size | R | false | false | 1,493 | r | #Packages
library(shiny)
library(tidyverse)
library(ggplot2)
#set working directory
setwd("/Users/User_2/Desktop/bees")
#loading data
bees_raw <- read.csv("bees_raw.csv")
#filter to us records
bees_us <- bees_raw %>%
filter(place_country_name == "United States")
#map data for polygons
usa <- map_data("state")
#... |
# Jojo Emerson
# March 27, 2019
# Star Dog scatter plot maker
# Purpose: create star/dog graphs for restaurant menu analytics
# Version: 1.4.0
# Changes:
# - improve ggplot download
# - add credit
library(shiny)
library(readxl)
library(ggplot2)
library(ggrepel)
library(writexl)
library(plotly)
library(tidyverse)
libra... | /app.R | no_license | jgemerson/StarDog | R | false | false | 9,385 | r | # Jojo Emerson
# March 27, 2019
# Star Dog scatter plot maker
# Purpose: create star/dog graphs for restaurant menu analytics
# Version: 1.4.0
# Changes:
# - improve ggplot download
# - add credit
library(shiny)
library(readxl)
library(ggplot2)
library(ggrepel)
library(writexl)
library(plotly)
library(tidyverse)
libra... |
#' @export
makeRLearner.classif.IBk = function() {
makeRLearnerClassif(
cl = "classif.IBk",
package = "RWeka",
par.set = makeParamSet(
makeLogicalLearnerParam(id = "I"),
makeLogicalLearnerParam(id = "F"),
makeIntegerLearnerParam(id = "K", lower = 1L, default = 1L),
makeLogicalLearn... | /R/RLearner_classif_IBk.R | no_license | mmadsen/mlr | R | false | false | 1,140 | r | #' @export
makeRLearner.classif.IBk = function() {
makeRLearnerClassif(
cl = "classif.IBk",
package = "RWeka",
par.set = makeParamSet(
makeLogicalLearnerParam(id = "I"),
makeLogicalLearnerParam(id = "F"),
makeIntegerLearnerParam(id = "K", lower = 1L, default = 1L),
makeLogicalLearn... |
library(shiny)
library(ggplot2)
library(grid)
source("../../GetData.R")
source("../../GetImagesForCompound.R")
source("explore_compound.R")
source("explore_target.R")
source("explore_pathway.R")
source("explore_QC.R")
source("explore_QQ_density_plots.R")
source("explore_early_vs_late_acting.R")
source("lists.R")
# WA... | /Scripts/shiny_scripts/explore/server.R | no_license | mas29/ClarkeLab_github | R | false | false | 7,978 | r | library(shiny)
library(ggplot2)
library(grid)
source("../../GetData.R")
source("../../GetImagesForCompound.R")
source("explore_compound.R")
source("explore_target.R")
source("explore_pathway.R")
source("explore_QC.R")
source("explore_QQ_density_plots.R")
source("explore_early_vs_late_acting.R")
source("lists.R")
# WA... |
# sim by pastor
sim.pastor=function(seed) {
set.seed(seed)
n=2000
x=rbeta(n,4,4)
x.expit=1/(exp(60*(x-.5))+1)
x.bin.med=ifelse(x>median(x),1,0)
eta = .5*(1-2*x.expit)
y=rbern(n, expit(eta))
ind = c(which(y==1)[1:500], which(y==0)[1:500])
dat=data.frame(y,x.star=x,x.star.exp... | /R/simulations.R | no_license | ChuangWan/chngpt | R | false | false | 2,724 | r | # sim by pastor
sim.pastor=function(seed) {
set.seed(seed)
n=2000
x=rbeta(n,4,4)
x.expit=1/(exp(60*(x-.5))+1)
x.bin.med=ifelse(x>median(x),1,0)
eta = .5*(1-2*x.expit)
y=rbern(n, expit(eta))
ind = c(which(y==1)[1:500], which(y==0)[1:500])
dat=data.frame(y,x.star=x,x.star.exp... |
testlist <- list(lims = structure(c(-Inf, NaN, Inf, -Inf), .Dim = c(2L, 2L )), points = structure(c(7.62592113861733e-315, NA, 0, 1.34178029629947e-309, 0, NaN), .Dim = 3:2))
result <- do.call(palm:::pbc_distances,testlist)
str(result) | /palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612987577-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 236 | r | testlist <- list(lims = structure(c(-Inf, NaN, Inf, -Inf), .Dim = c(2L, 2L )), points = structure(c(7.62592113861733e-315, NA, 0, 1.34178029629947e-309, 0, NaN), .Dim = 3:2))
result <- do.call(palm:::pbc_distances,testlist)
str(result) |
#' Calculate temporal trends of synchrony
#'
#' @description The function calculates temporal trends of spatial synchrony from a \code{data.frame} with tree-ring width chronologies using a moving window as described in Shestakova et al. (2016). This method splits the time variable (\code{varTime}) in 30 years window... | /R/sync.trend.R | no_license | cran/DendroSync | R | false | false | 11,515 | r | #' Calculate temporal trends of synchrony
#'
#' @description The function calculates temporal trends of spatial synchrony from a \code{data.frame} with tree-ring width chronologies using a moving window as described in Shestakova et al. (2016). This method splits the time variable (\code{varTime}) in 30 years window... |
## Neurosynth RecommendR HelpRs (could I be any lameR? [clearly yes]) ####
## This function is stolen from here: http://lamages.blogspot.com/2013/04/how-to-change-alpha-value-of-colours-in.html
## With some slight modifcations.
add.alpha <- function(col, alpha=0.65){
apply(
sapply(col, col2rgb)/255,
2,
... | /NeurosynthRecommendR/Helpers2.R | permissive | fahd09/neurosynth_semantic_map | R | false | false | 6,746 | r | ## Neurosynth RecommendR HelpRs (could I be any lameR? [clearly yes]) ####
## This function is stolen from here: http://lamages.blogspot.com/2013/04/how-to-change-alpha-value-of-colours-in.html
## With some slight modifcations.
add.alpha <- function(col, alpha=0.65){
apply(
sapply(col, col2rgb)/255,
2,
... |
#' ---
#' title: "Optimized version of GNG"
#' author: ""
#' date: ""
#' output:
#' html_document:
#' self_contained: false
#' ---
# For advanced used you might want to consider using OptimizedGNG
# , which asymptotically much faster implementation without
# sacrifying quality of the graph
# GNG unique capability... | /demo/samples/gng.optimized.R | no_license | Silveryu/gng.r | R | false | false | 1,001 | r | #' ---
#' title: "Optimized version of GNG"
#' author: ""
#' date: ""
#' output:
#' html_document:
#' self_contained: false
#' ---
# For advanced used you might want to consider using OptimizedGNG
# , which asymptotically much faster implementation without
# sacrifying quality of the graph
# GNG unique capability... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ergoInfo.R
\name{ergoInfo}
\alias{ergoInfo}
\title{Ergodicity Information Index}
\usage{
ergoInfo(dynEGA.object, use = c("edge.list", "unweighted", "weighted"))
}
\arguments{
\item{dynEGA.object}{A \code{\link[EGAnet]{dynEGA.ind.pop}} object}... | /man/ergoInfo.Rd | no_license | cran/EGAnet | R | false | true | 1,986 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ergoInfo.R
\name{ergoInfo}
\alias{ergoInfo}
\title{Ergodicity Information Index}
\usage{
ergoInfo(dynEGA.object, use = c("edge.list", "unweighted", "weighted"))
}
\arguments{
\item{dynEGA.object}{A \code{\link[EGAnet]{dynEGA.ind.pop}} object}... |
# MAE5870 - Análise de Séries Temporais
# Rodrigo da Silva Cunha
# NUSP 7631302
# ------------------------------------------------------------------------------
# Bibliotecas necessárias
library(latex2exp)
library(astsa)
library(gridExtra)
library(dplyr)
# ---------------------------------------------------------------... | /seminario_spectral_analysis.R | no_license | rodra-go/mae5870_seminario | R | false | false | 11,221 | r | # MAE5870 - Análise de Séries Temporais
# Rodrigo da Silva Cunha
# NUSP 7631302
# ------------------------------------------------------------------------------
# Bibliotecas necessárias
library(latex2exp)
library(astsa)
library(gridExtra)
library(dplyr)
# ---------------------------------------------------------------... |
library(sqldf)
library(plyr)
library(dplyr)
print("cleanup variables before starting")
rm(list = ls())
print("Reading data file")
file <- c("household_power_consumption.txt")
data_subset <- read.csv.sql(file, header = T, sep=";", sql = "select * from file where (Date == '1/2/2007' OR Date == '2/2/2007')" )
##close al... | /ExData_Plotting1/plot1.R | no_license | sheelarani/-datasciencecoursera | R | false | false | 984 | r | library(sqldf)
library(plyr)
library(dplyr)
print("cleanup variables before starting")
rm(list = ls())
print("Reading data file")
file <- c("household_power_consumption.txt")
data_subset <- read.csv.sql(file, header = T, sep=";", sql = "select * from file where (Date == '1/2/2007' OR Date == '2/2/2007')" )
##close al... |
library(Cairo);
data_means <- aggregate(labkey.data, list(ParticipantID =
labkey.data$participantid), mean, na.rm = TRUE);
Cairo(file="${imgout:multiplot.png}", type="png")
op <- par(mfcol = c(2, 2)) # 2 x 2 pictures on one plot
c11 <- plot(data_means$diastolicbloodpressure, data_means$weight_kg, ,
xlab="Diastolic ... | /sampledata/FolderExport/SampleWithSubfolders.folder/reports/R MultiPlot Regressions_ Diastolic BP.db_979.R | no_license | scchess/LabKey | R | false | false | 1,217 | r | library(Cairo);
data_means <- aggregate(labkey.data, list(ParticipantID =
labkey.data$participantid), mean, na.rm = TRUE);
Cairo(file="${imgout:multiplot.png}", type="png")
op <- par(mfcol = c(2, 2)) # 2 x 2 pictures on one plot
c11 <- plot(data_means$diastolicbloodpressure, data_means$weight_kg, ,
xlab="Diastolic ... |
# function nested or function inside the other function.
# in this case we have inverse functions.
resu = log(exp(1))
print(resu)
# to show information about the function.
?log
# to show args about the function.
args(log)
print( log(8,base=2) )
# or compiler R assumes args are exactly order shown in the help file(x... | /functions.R | no_license | baleeiro17/HarvardX-s-Data-Science- | R | false | false | 426 | r |
# function nested or function inside the other function.
# in this case we have inverse functions.
resu = log(exp(1))
print(resu)
# to show information about the function.
?log
# to show args about the function.
args(log)
print( log(8,base=2) )
# or compiler R assumes args are exactly order shown in the help file(x... |
#!/usr/bin/env Rscript
#############
# LIBRARIES #
#############
library(data.table)
library(tidyverse)
########
# MAIN #
########
blast_res <- fread("output/03_deseq2/tissue_itWT_LRT/meiosis_sp/dmc1_rec8/dmc1_rec8_nr_blastx.outfmt6")
trinotate <- fread('data/mh-transcriptome/output/trinotate/sorted/longest_isoform_... | /src/meiosis_sp/dmc1_rec8_nrblastx_res.R | no_license | sarahinwood/mh-rnaseq | R | false | false | 1,434 | r | #!/usr/bin/env Rscript
#############
# LIBRARIES #
#############
library(data.table)
library(tidyverse)
########
# MAIN #
########
blast_res <- fread("output/03_deseq2/tissue_itWT_LRT/meiosis_sp/dmc1_rec8/dmc1_rec8_nr_blastx.outfmt6")
trinotate <- fread('data/mh-transcriptome/output/trinotate/sorted/longest_isoform_... |
extractTSinfo <- function(x){
ortholog <- strsplit(x,"target=new>")
ortholog <- strsplit(ortholog[[1]][2],"</a></td>")[[1]][1]
geneName <- strsplit(x,"<td nowrap>")
geneName <- strsplit(geneName[[1]][2],"</td>")[[1]][1]
totalSites <- strsplit(x,"<B>")
consSites <- strsplit(totalSites[[1]][2],"</B>"... | /R/targetScan.R | no_license | cran/hoardeR | R | false | false | 5,469 | r | extractTSinfo <- function(x){
ortholog <- strsplit(x,"target=new>")
ortholog <- strsplit(ortholog[[1]][2],"</a></td>")[[1]][1]
geneName <- strsplit(x,"<td nowrap>")
geneName <- strsplit(geneName[[1]][2],"</td>")[[1]][1]
totalSites <- strsplit(x,"<B>")
consSites <- strsplit(totalSites[[1]][2],"</B>"... |
#Step 1: "Merges the training and the test sets to create one data set."
# read subject training data
subject_train = read.table("UCI HAR Dataset/train/subject_train.txt", col.names=c("subject_id"))
# assign row number as the values of ID column
subject_train$ID <- as.numeric(rownames(subject_train))
# read training da... | /run_analysis.R | no_license | Paritaoza/Getting-and-Cleaning-Data_Project | R | false | false | 3,331 | r | #Step 1: "Merges the training and the test sets to create one data set."
# read subject training data
subject_train = read.table("UCI HAR Dataset/train/subject_train.txt", col.names=c("subject_id"))
# assign row number as the values of ID column
subject_train$ID <- as.numeric(rownames(subject_train))
# read training da... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geodimension_complete_relation_by_geography.R
\name{complete_relation_by_geography}
\alias{complete_relation_by_geography}
\alias{complete_relation_by_geography.geodimension}
\title{Complete relation by geography}
\usage{
complete_relation_by... | /man/complete_relation_by_geography.Rd | permissive | josesamos/geodimension | R | false | true | 1,815 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geodimension_complete_relation_by_geography.R
\name{complete_relation_by_geography}
\alias{complete_relation_by_geography}
\alias{complete_relation_by_geography.geodimension}
\title{Complete relation by geography}
\usage{
complete_relation_by... |
## Exploratory
initTable <- read.table("household_power_consumption.txt",nrows =10,sep = ";",header = TRUE)
tbClasses <- sapply(initTable,class)
## Loading the table
initTable <- read.table("household_power_consumption.txt",nrows =103000,sep = ";",header = TRUE,stringsAsFactors = FALSE)
## Loading the data on
pow... | /plot2.R | no_license | caramirezal/ExData_Plotting1 | R | false | false | 1,025 | r |
## Exploratory
initTable <- read.table("household_power_consumption.txt",nrows =10,sep = ";",header = TRUE)
tbClasses <- sapply(initTable,class)
## Loading the table
initTable <- read.table("household_power_consumption.txt",nrows =103000,sep = ";",header = TRUE,stringsAsFactors = FALSE)
## Loading the data on
pow... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tt_afun_utils.R
\name{make_afun}
\alias{make_afun}
\title{Create custom analysis function wrapping existing function}
\usage{
make_afun(
fun,
.stats = NULL,
.formats = NULL,
.labels = NULL,
.indent_mods = NULL,
.ungroup_stats = NU... | /man/make_afun.Rd | permissive | jcheng5/rtables | R | false | true | 4,169 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tt_afun_utils.R
\name{make_afun}
\alias{make_afun}
\title{Create custom analysis function wrapping existing function}
\usage{
make_afun(
fun,
.stats = NULL,
.formats = NULL,
.labels = NULL,
.indent_mods = NULL,
.ungroup_stats = NU... |
# Adobe Experience Manager OSGI config (AEM) API
#
# Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API
#
# OpenAPI spec version: 1.0.0-pre.0
# Contact: opensource@shinesolutions.com
# Generated by: https://openapi-generator.tech
#' ComDayCqWcmUndoUndoConfigInfo Cl... | /clients/r/generated/R/ComDayCqWcmUndoUndoConfigInfo.r | permissive | shinesolutions/swagger-aem-osgi | R | false | false | 5,261 | r | # Adobe Experience Manager OSGI config (AEM) API
#
# Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API
#
# OpenAPI spec version: 1.0.0-pre.0
# Contact: opensource@shinesolutions.com
# Generated by: https://openapi-generator.tech
#' ComDayCqWcmUndoUndoConfigInfo Cl... |
/Normalidad shapiro wilk.R | no_license | JonathanF5/Prueba-shapiro-wilk-en-r | R | false | false | 1,551 | r | ||
#!/usr/bin/env Rscript
#
# @license Apache-2.0
#
# Copyright (c) 2018 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | /lib/node_modules/@stdlib/stats/pcorrtest/test/fixtures/r/runner.R | permissive | doc22940/stdlib | R | false | false | 3,342 | r | #!/usr/bin/env Rscript
#
# @license Apache-2.0
#
# Copyright (c) 2018 The Stdlib Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... |
setMethod("CenteredTTest", "oos.forecast",
function(object,...)
mapply(function(e, mu)
t.test(e^2, mu = mu, ...)$statistic,
e = ForecastErrors(object),
mu = expected.loss.test(object),...))
## returns the p-value for a t-test that the difference in... | /package/fwPackage_1.0_source/R/CenteredTTest.R | no_license | grayclhn/oos-overfit | R | false | false | 805 | r | setMethod("CenteredTTest", "oos.forecast",
function(object,...)
mapply(function(e, mu)
t.test(e^2, mu = mu, ...)$statistic,
e = ForecastErrors(object),
mu = expected.loss.test(object),...))
## returns the p-value for a t-test that the difference in... |
\name{TopicModelcontrol-class}
\docType{class}
\alias{OPTcontrol-class}
\alias{TopicModelcontrol-class}
\alias{CTM_VEMcontrol-class}
\alias{LDAcontrol-class}
\alias{LDA_VEMcontrol-class}
\alias{LDA_Gibbscontrol-class}
\alias{coerce,NULL,LDA_VEMcontrol-method}
\alias{coerce,list,LDA_VEMcontrol-method}
\alias{coerce,NULL... | /man/tmcontrol-class.Rd | no_license | cran/topicmodels | R | false | false | 5,051 | rd | \name{TopicModelcontrol-class}
\docType{class}
\alias{OPTcontrol-class}
\alias{TopicModelcontrol-class}
\alias{CTM_VEMcontrol-class}
\alias{LDAcontrol-class}
\alias{LDA_VEMcontrol-class}
\alias{LDA_Gibbscontrol-class}
\alias{coerce,NULL,LDA_VEMcontrol-method}
\alias{coerce,list,LDA_VEMcontrol-method}
\alias{coerce,NULL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitModels.R
\name{fitOneModel}
\alias{fitOneModel}
\title{fitOneModel
Train a single subtype model.}
\usage{
fitOneModel(Xbin, Ybin, params = list(max_depth = 2, eta = 0.5, nrounds =
33, nthread = 5))
}
\arguments{
\item{Xbin}{Ge... | /man/fitOneModel.Rd | permissive | biodan25/ImmuneSubtypeClassifier | R | false | true | 587 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitModels.R
\name{fitOneModel}
\alias{fitOneModel}
\title{fitOneModel
Train a single subtype model.}
\usage{
fitOneModel(Xbin, Ybin, params = list(max_depth = 2, eta = 0.5, nrounds =
33, nthread = 5))
}
\arguments{
\item{Xbin}{Ge... |
# Infectious Disease Laboratory Statistical Data Analysis Script
# Written by: Christopher Sinclair - Research Programmer
# Supervisors: Dr. William Mattingly and Stephen Furmanek
# Install any necessary packages
install.packages('tidyverse')
install.packages('forecast')
library(tidyverse)
library(forecast)
# Set any... | /lab_data_analysis.r | no_license | christophersinclair/Lab-Revenue-Analysis | R | false | false | 5,800 | r | # Infectious Disease Laboratory Statistical Data Analysis Script
# Written by: Christopher Sinclair - Research Programmer
# Supervisors: Dr. William Mattingly and Stephen Furmanek
# Install any necessary packages
install.packages('tidyverse')
install.packages('forecast')
library(tidyverse)
library(forecast)
# Set any... |
########################################
# processing large-scale data
# date: 2021.01.25 - 01.25
# author: Jing Xiao
# ref: https://jieandze1314.osca.top/03/03-14
########################################
# rm all objects --------------------------------------------------------------
rm(list = ls())
# set work dire... | /scRNA-seq/codes/processing_large_data_14.R | no_license | hsuh001/project | R | false | false | 10,926 | r | ########################################
# processing large-scale data
# date: 2021.01.25 - 01.25
# author: Jing Xiao
# ref: https://jieandze1314.osca.top/03/03-14
########################################
# rm all objects --------------------------------------------------------------
rm(list = ls())
# set work dire... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{gibbsHMM_2}
\alias{gibbsHMM_2}
\title{gibbsHMM_PT}
\usage{
gibbsHMM_2(YZ, M = 2000, K = 10, alphaMAX = 1, alphaMin = 1e-30,
lab = "sim", type = "First")
}
\arguments{
\item{x,}{alpha, log=False}
}
\description{
density of dirichlet
}
\examples{
dDirichlet(c(.... | /man/gibbsHMM_2.Rd | no_license | zoevanhavre/Zhmm.0 | R | false | false | 363 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{gibbsHMM_2}
\alias{gibbsHMM_2}
\title{gibbsHMM_PT}
\usage{
gibbsHMM_2(YZ, M = 2000, K = 10, alphaMAX = 1, alphaMin = 1e-30,
lab = "sim", type = "First")
}
\arguments{
\item{x,}{alpha, log=False}
}
\description{
density of dirichlet
}
\examples{
dDirichlet(c(.... |
#' ---
#' title: "CS2102/19 Earthquake Structure Analysis"
#' author: "Francisco Castro (fgcastro@wpi.edu)"
#' date: "18 April 2016"
#' ---
#==================================================
# NOTES AND DEPENDENCIES
#==================================================
# This script is for plotting the code structure... | /analysis/data-analysis-earthquake.r | no_license | franciscastro/research-plan-composition | R | false | false | 22,293 | r | #' ---
#' title: "CS2102/19 Earthquake Structure Analysis"
#' author: "Francisco Castro (fgcastro@wpi.edu)"
#' date: "18 April 2016"
#' ---
#==================================================
# NOTES AND DEPENDENCIES
#==================================================
# This script is for plotting the code structure... |
##' Compute the minimum sample size to reach a specified target confidence using either the
##' exact method or the asymptotic approximation.
##'
##' @author Alex Venzin
##' @export
##' @param N The total number of items in the population
##' @param nh The number of judgmental samples
##' @param fnr The false ... | /cjr/R/sampleSize.fnr.R | no_license | lhsego/sUtils | R | false | false | 4,885 | r | ##' Compute the minimum sample size to reach a specified target confidence using either the
##' exact method or the asymptotic approximation.
##'
##' @author Alex Venzin
##' @export
##' @param N The total number of items in the population
##' @param nh The number of judgmental samples
##' @param fnr The false ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{imagebuilder}
\alias{imagebuilder}
\title{EC2 Image Builder}
\usage{
imagebuilder(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.
\itemize{
\item{\strong{access_key_id}... | /man/imagebuilder.Rd | no_license | cran/paws | R | false | true | 10,080 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{imagebuilder}
\alias{imagebuilder}
\title{EC2 Image Builder}
\usage{
imagebuilder(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.
\itemize{
\item{\strong{access_key_id}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vec_dmeasure.R
\name{vec_dmeasure.internal}
\alias{vec_dmeasure.internal}
\title{Evaluate the unit measurement model density function for each unit}
\usage{
vec_dmeasure.internal(object, y, x, times, params, log = FALSE,
.gnsi = TRUE, ...)
... | /man/vec_dmeasure.Rd | no_license | nanyyyyyy/spatPomp | R | false | true | 405 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vec_dmeasure.R
\name{vec_dmeasure.internal}
\alias{vec_dmeasure.internal}
\title{Evaluate the unit measurement model density function for each unit}
\usage{
vec_dmeasure.internal(object, y, x, times, params, log = FALSE,
.gnsi = TRUE, ...)
... |
#### About ----
# This code prepares data and generates maps for Census tracts and ZCTAs by their RUCA code classification.
#### Set up ----
library(tmap)
library(sf)
library(tidyverse)
setwd("~/git/rural-urban-classification")
#### Projections -----
# Set CRS, lower 48 - EPSG 102003 USA_Contiguous_Albers_Equal_... | /code/rsu_maps.R | no_license | spaykin/rural-urban-classification | R | false | false | 9,033 | r | #### About ----
# This code prepares data and generates maps for Census tracts and ZCTAs by their RUCA code classification.
#### Set up ----
library(tmap)
library(sf)
library(tidyverse)
setwd("~/git/rural-urban-classification")
#### Projections -----
# Set CRS, lower 48 - EPSG 102003 USA_Contiguous_Albers_Equal_... |
#' @rdname rocCurve
#'
#' @description
#' A method to visualize the performance in the classification of synthesis, degradation
#' and processing rates based on the comparison of the original simulated rates and the one
#' obtained by the function \code{\link{modelRates}}. For each rate, classification performance is m... | /R/rocCurve-methods.R | no_license | mfurla/INSPEcT | R | false | false | 15,633 | r | #' @rdname rocCurve
#'
#' @description
#' A method to visualize the performance in the classification of synthesis, degradation
#' and processing rates based on the comparison of the original simulated rates and the one
#' obtained by the function \code{\link{modelRates}}. For each rate, classification performance is m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-dams.R
\docType{data}
\name{dams}
\alias{dams}
\title{dams}
\format{A tibble with 511 rows and 9 variables:
\describe{
\item{city}{The city closest to the dam}
\item{state}{The state the dam is in}
\item{river}{The river that the dam is ... | /man/dams.Rd | no_license | uncoast-unconf/ggcart | R | false | true | 855 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-dams.R
\docType{data}
\name{dams}
\alias{dams}
\title{dams}
\format{A tibble with 511 rows and 9 variables:
\describe{
\item{city}{The city closest to the dam}
\item{state}{The state the dam is in}
\item{river}{The river that the dam is ... |
### implement methods for PLS ####
setMethod("PLS", signature = c(x = "SImageSet", y = "matrix"),
function(x, y, ncomp = 3,
method = "nipals",
center = TRUE,
scale = FALSE,
iter.max = 100, ...)
{
method <- match.arg(method)
ncomps <- sort(ncomp)
if ( max(ncomps) > nrow(x) )
.stop("PLS: Can't fit m... | /R/stats-PLS.R | no_license | EmilySekera/Cardinal | R | false | false | 9,904 | r |
### implement methods for PLS ####
setMethod("PLS", signature = c(x = "SImageSet", y = "matrix"),
function(x, y, ncomp = 3,
method = "nipals",
center = TRUE,
scale = FALSE,
iter.max = 100, ...)
{
method <- match.arg(method)
ncomps <- sort(ncomp)
if ( max(ncomps) > nrow(x) )
.stop("PLS: Can't fit m... |
#' A function to load a module function from url or disk.
#'
#' Loads a module function into the global environment ready to be used in a
#' zoon workflow. This function is mostly for use while developing modules.
#' Workflows run with modules defined locally are no longer reproducible and
#' so are discouraged and... | /R/zoonHelpers.R | no_license | rdpalacio/zoon | R | false | false | 27,497 | r |
#' A function to load a module function from url or disk.
#'
#' Loads a module function into the global environment ready to be used in a
#' zoon workflow. This function is mostly for use while developing modules.
#' Workflows run with modules defined locally are no longer reproducible and
#' so are discouraged and... |
## collections-dashboard-prep
# Prep accessions data from EMu for dashboard-prep
#
# 1) In EMu, retrieve Accession records for dashboard,
# 05-May-2017 dataset includes all efmnhtransactions records retrieved in this query:
#
# select all
# from efmnhtransactions
# where true and... | /dash026LoansPrep.R | permissive | magpiedin/collections-dashboard-prep | R | false | false | 4,163 | r | ## collections-dashboard-prep
# Prep accessions data from EMu for dashboard-prep
#
# 1) In EMu, retrieve Accession records for dashboard,
# 05-May-2017 dataset includes all efmnhtransactions records retrieved in this query:
#
# select all
# from efmnhtransactions
# where true and... |
\name{magnifSeven}
\alias{magnifSeven}
\title{This is a function to compute the 7 statistics of daily streamflow
used by Archfield et al., under revision (June 2013). Input to the function is a
time series of streamflow with date in the format Y-m-d. Data should be arranged in
two columns with names: 1) date and 2) di... | /man/magnifSeven.Rd | no_license | tsangyp/EflowStats | R | false | false | 1,450 | rd | \name{magnifSeven}
\alias{magnifSeven}
\title{This is a function to compute the 7 statistics of daily streamflow
used by Archfield et al., under revision (June 2013). Input to the function is a
time series of streamflow with date in the format Y-m-d. Data should be arranged in
two columns with names: 1) date and 2) di... |
context("add elements in slides")
source("utils.R")
test_that("add text into placeholder", {
doc <- read_pptx() %>%
add_slide("Title and Content", "Office Theme") %>%
ph_empty(type = "body")
sm <- slide_summary(doc)
expect_equal(nrow(sm), 1)
small_red <- fp_text(color = "red", font.size = 14)
doc ... | /tests/testthat/test-pptx-add.R | no_license | Kill3rbee/officer | R | false | false | 7,988 | r | context("add elements in slides")
source("utils.R")
test_that("add text into placeholder", {
doc <- read_pptx() %>%
add_slide("Title and Content", "Office Theme") %>%
ph_empty(type = "body")
sm <- slide_summary(doc)
expect_equal(nrow(sm), 1)
small_red <- fp_text(color = "red", font.size = 14)
doc ... |
sanitizeInput <- function(conc,
viability,
Hill_fit,
conc_as_log = FALSE,
viability_as_pct = TRUE,
trunc = TRUE,
verbose = TRUE) # Set to 2 to see debug printouts
... | /R/SanityCheck.R | no_license | cran/ToxicoGx | R | false | false | 6,007 | r | sanitizeInput <- function(conc,
viability,
Hill_fit,
conc_as_log = FALSE,
viability_as_pct = TRUE,
trunc = TRUE,
verbose = TRUE) # Set to 2 to see debug printouts
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GitConnectionTest.r
\docType{data}
\name{GitConnectionTest}
\alias{GitConnectionTest}
\title{GitConnectionTest Class}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
GitConnectionTest
}
\description{
GitConnectionTes... | /man/GitConnectionTest.Rd | permissive | tynesjo/lookr | R | false | true | 452 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GitConnectionTest.r
\docType{data}
\name{GitConnectionTest}
\alias{GitConnectionTest}
\title{GitConnectionTest Class}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
GitConnectionTest
}
\description{
GitConnectionTes... |
start <- as.POSIXlt(Sys.time())
library(testthat)
library(EuPathDB)
context("011_txdb_fungidb
12\n")
webservice <- "fungidb"
wanted <- "pombe"
testing <- download_eupath_metadata(overwrite=FALSE, webservice=webservice)
entry <- get_eupath_entry(species=wanted, metadata=testing)
txdb <- make_eupath_txdb(entry=entry... | /tests/testthat/test_021_txdb_fungidb.R | no_license | khughitt/EuPathDB | R | false | false | 1,027 | r | start <- as.POSIXlt(Sys.time())
library(testthat)
library(EuPathDB)
context("011_txdb_fungidb
12\n")
webservice <- "fungidb"
wanted <- "pombe"
testing <- download_eupath_metadata(overwrite=FALSE, webservice=webservice)
entry <- get_eupath_entry(species=wanted, metadata=testing)
txdb <- make_eupath_txdb(entry=entry... |
#Getting and Cleaning Data
#Project
# Here are the data for the project:
#
# https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
#
# This file create ./data folder in the working directory and download the zip files there.
#create ./data folder
if(!file.exists("data")){dir.cr... | /download_file.R | no_license | superpapper/Getting-and-Cleaning-Data-Project | R | false | false | 527 | r | #Getting and Cleaning Data
#Project
# Here are the data for the project:
#
# https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
#
# This file create ./data folder in the working directory and download the zip files there.
#create ./data folder
if(!file.exists("data")){dir.cr... |
# Eric Cartaya
library(dplyr)
library(tidyverse) #declarations
library(psych)
library(olsrr)
library(rrcov)
library(ggpubr)
library(HDtest)
library(cluster)
library(lmtest)
library(fpc)
library(ggplot2)
corona_mental <- read.csv("F:/School/Multivariate Stat/Indicators_of_Anxiety_or_Depression_Based_on_R... | /project_code.R | no_license | ericcartaya/CovidDepressionMultivariateStatEC2020 | R | false | false | 672 | r | # Eric Cartaya
library(dplyr)
library(tidyverse) #declarations
library(psych)
library(olsrr)
library(rrcov)
library(ggpubr)
library(HDtest)
library(cluster)
library(lmtest)
library(fpc)
library(ggplot2)
corona_mental <- read.csv("F:/School/Multivariate Stat/Indicators_of_Anxiety_or_Depression_Based_on_R... |
#' Perform Analyses
#'
#' Performs batch jags analyses. It goes through the folders defined by \code{...}
#' and pulls out the data of name \code{name} (by default \code{"data"} and then fits
#' the models defined in \code{models}. Note \code{beep = TRUE} has caused
#' crashed with RStudio on windows.
#'
#' @param mo... | /R/perform-analyses.R | no_license | poissonconsulting/poiscon | R | false | false | 2,410 | r | #' Perform Analyses
#'
#' Performs batch jags analyses. It goes through the folders defined by \code{...}
#' and pulls out the data of name \code{name} (by default \code{"data"} and then fits
#' the models defined in \code{models}. Note \code{beep = TRUE} has caused
#' crashed with RStudio on windows.
#'
#' @param mo... |
nGrid = c(50,100,250,1000)
regressionF = function(X){
return(sin(X*2*pi))
}
pGridF = function(n,exponential=F){
if(exponential){
return(round(exp(seq(0,log(n/100),length=11)))[-1])
}else{
return(2:10)
}
}
PhiF = function(X,p){
return(X^(1:p))
}
varAndBiasF = function(featureMat,f_star){
svd.out =... | /SML2015/polynomial.R | no_license | darrenho/darrenho.github.io | R | false | false | 995 | r | nGrid = c(50,100,250,1000)
regressionF = function(X){
return(sin(X*2*pi))
}
pGridF = function(n,exponential=F){
if(exponential){
return(round(exp(seq(0,log(n/100),length=11)))[-1])
}else{
return(2:10)
}
}
PhiF = function(X,p){
return(X^(1:p))
}
varAndBiasF = function(featureMat,f_star){
svd.out =... |
### Data Visualization Lab
# 1/7/2016
## you will need the charm city circulator dataset:
library(ggplot2)
library(tidyr)
library(dplyr)
library(lubridate)
library(stringr)
# read in data
circ = read.csv("http://www.aejaffe.com/winterR_2016/data/Charm_City_Circulator_Ridership.csv",
header=TRUE,as.is=TRUE... | /Data_Visualization/lab/Data_Visualization_Lab_key.R | permissive | anhnguyendepocen/summerR_2016 | R | false | false | 2,491 | r | ### Data Visualization Lab
# 1/7/2016
## you will need the charm city circulator dataset:
library(ggplot2)
library(tidyr)
library(dplyr)
library(lubridate)
library(stringr)
# read in data
circ = read.csv("http://www.aejaffe.com/winterR_2016/data/Charm_City_Circulator_Ridership.csv",
header=TRUE,as.is=TRUE... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utils.R
\name{GetPageImage}
\alias{GetPageImage}
\title{Get a raster image of a selected page}
\usage{
GetPageImage(i)
}
\arguments{
\item{i}{index of the selected subject}
}
\value{
raster of the image.
}
\description{
Download the i... | /packages/oldWeather5/man/GetPageImage.Rd | no_license | oldweather/oldWeather5 | R | false | false | 375 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utils.R
\name{GetPageImage}
\alias{GetPageImage}
\title{Get a raster image of a selected page}
\usage{
GetPageImage(i)
}
\arguments{
\item{i}{index of the selected subject}
}
\value{
raster of the image.
}
\description{
Download the i... |
\name{smooth.spec}
\alias{smooth.spec}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Smooth a spectrum using loess.
}
\description{
Performs a smothing over a spectrum using loess and a desired smoothing scale
}
\usage{
smooth.spec(spec, sc)
}
%- maybe also 'usage' for other objects documented ... | /man/smooth.spec.Rd | no_license | lukejdavies/spec.tools | R | false | false | 1,270 | rd | \name{smooth.spec}
\alias{smooth.spec}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Smooth a spectrum using loess.
}
\description{
Performs a smothing over a spectrum using loess and a desired smoothing scale
}
\usage{
smooth.spec(spec, sc)
}
%- maybe also 'usage' for other objects documented ... |
randEEG <-
function(n.classes=2,n.rec=10,n.channels = 20,n.signals=250,ar="default", ma="default", order="default", vars = c(1,2)) {
n.elec = n.channels
if(ar=="default")
ar = mat.or.vec(n.classes,1)
if(ma=="default")
ma = mat.or.vec(n.classes,1)
if(order=="default")
order = mat.or.vec(n.classes,3)
#----------... | /R/randEEG.R | no_license | cran/eegAnalysis | R | false | false | 5,556 | r | randEEG <-
function(n.classes=2,n.rec=10,n.channels = 20,n.signals=250,ar="default", ma="default", order="default", vars = c(1,2)) {
n.elec = n.channels
if(ar=="default")
ar = mat.or.vec(n.classes,1)
if(ma=="default")
ma = mat.or.vec(n.classes,1)
if(order=="default")
order = mat.or.vec(n.classes,3)
#----------... |
#' @importFrom log4r debug
#' @export
f2 <- function(x, logger=create.logger(NULL)) {
debug(logger, paste("f2() input is:", x))
y <- x-1
debug(logger, paste("f2() output is:", y))
y
}
| /R/f2.r | no_license | 00mjk/rseedpkg | R | false | false | 192 | r | #' @importFrom log4r debug
#' @export
f2 <- function(x, logger=create.logger(NULL)) {
debug(logger, paste("f2() input is:", x))
y <- x-1
debug(logger, paste("f2() output is:", y))
y
}
|
rm( list=ls() )
sink( 'Rout/setup.Rout' )
load( paste0( 'parsed_data/', 'base', '.Rdata' ) )
X <- scale(G)
Yb2Z <- function(yb){
Z <- t(sapply( yb, function(x){
if( is.na(x) ){
return( c( NA, NA ) )
} else if( x == 0 ){
return( c( 0, 1 ) )
} else if( x == 1 ){
return( c( 1, 0 ) )
}
}))
Z * sqr... | /converge/setup_data.R | no_license | andywdahl/gxemm-scripts | R | false | false | 2,441 | r | rm( list=ls() )
sink( 'Rout/setup.Rout' )
load( paste0( 'parsed_data/', 'base', '.Rdata' ) )
X <- scale(G)
Yb2Z <- function(yb){
Z <- t(sapply( yb, function(x){
if( is.na(x) ){
return( c( NA, NA ) )
} else if( x == 0 ){
return( c( 0, 1 ) )
} else if( x == 1 ){
return( c( 1, 0 ) )
}
}))
Z * sqr... |
#!/usr/local/bin/Rscript
library(caret)
library("fpc")
library(ROCR)
library(ipred)
library(rpart)
library(party)
library(e1071)
args <- commandArgs(TRUE)
model <- readRDS(args[1])
ind <- read.table(args[2],sep=';',header=FALSE)
goal <- as.numeric(args[3])
prediction <- predict(model, newdata=ind)
probability <- u... | /StructuralEntropy/tester.r | no_license | hdg7/EEE | R | false | false | 411 | r | #!/usr/local/bin/Rscript
library(caret)
library("fpc")
library(ROCR)
library(ipred)
library(rpart)
library(party)
library(e1071)
args <- commandArgs(TRUE)
model <- readRDS(args[1])
ind <- read.table(args[2],sep=';',header=FALSE)
goal <- as.numeric(args[3])
prediction <- predict(model, newdata=ind)
probability <- u... |
#Part 1: (Plot for 1960 and 2013)
#Execute below code to generate three new vectors
Country_Code <- c("ABW","AFG","AGO","ALB","ARE","ARG","ARM","ATG","AUS","AUT","AZE","BDI","BEL","BEN","BFA","BGD","BGR","BHR","BHS","BIH","BLR","BLZ","BOL","BRA","BRB","BRN","BTN","BWA","CAF","CAN","CHE","CHL","CHN","CIV","CMR","COG","C... | /Demographic_analysis.r | no_license | issoufkindo/Demographics-analysis | R | false | false | 8,361 | r | #Part 1: (Plot for 1960 and 2013)
#Execute below code to generate three new vectors
Country_Code <- c("ABW","AFG","AGO","ALB","ARE","ARG","ARM","ATG","AUS","AUT","AZE","BDI","BEL","BEN","BFA","BGD","BGR","BHR","BHS","BIH","BLR","BLZ","BOL","BRA","BRB","BRN","BTN","BWA","CAF","CAN","CHE","CHL","CHN","CIV","CMR","COG","C... |
#!/usr/bin/Rscript --no-save
# Compare the CERA20C and 20CR2c ensembles
# Print quality - A0 format
library(GSDF.TWCR)
library(GSDF.CERA20C)
library(GSDF.WeatherMap)
library(grid)
opt = list(
year = 1987,
month = 10,
day = 16,
hour = 0
)
Imagedir<-"."
Options<-WeatherMap.set.option(NULL)
Options<-Weather... | /CERA_v_20CR/spaghetti.R | no_license | philip-brohan/Posters | R | false | false | 22,744 | r | #!/usr/bin/Rscript --no-save
# Compare the CERA20C and 20CR2c ensembles
# Print quality - A0 format
library(GSDF.TWCR)
library(GSDF.CERA20C)
library(GSDF.WeatherMap)
library(grid)
opt = list(
year = 1987,
month = 10,
day = 16,
hour = 0
)
Imagedir<-"."
Options<-WeatherMap.set.option(NULL)
Options<-Weather... |
`ll.jRCI.A.cons1` =
function(par, yi, ind.lst, X, sex, ni, ni0, xs, iphi, theta){
par1 = c(par[1], par)
logL = ll.tRCI.A(par0=par1, yi=yi, ind.lst=ind.lst, X=X, twosex=FALSE, iphi=iphi)
logL = logL + ll.aRC(par0=par1[c(2, 3)], ni, ni0, xs, theta)
return(logL)
} | /R/ll.jRCI.A.cons1.R | no_license | cran/rxSeq | R | false | false | 280 | r | `ll.jRCI.A.cons1` =
function(par, yi, ind.lst, X, sex, ni, ni0, xs, iphi, theta){
par1 = c(par[1], par)
logL = ll.tRCI.A(par0=par1, yi=yi, ind.lst=ind.lst, X=X, twosex=FALSE, iphi=iphi)
logL = logL + ll.aRC(par0=par1[c(2, 3)], ni, ni0, xs, theta)
return(logL)
} |
#' Links layer
#'
#' @inheritParams ggplot2::layer
#' @inheritParams ggplot2::geom_curve
#' @section Aesthetics:
#' \code{geom_links2()} understands the following aesthetics (required aesthetics are in bold):
#' \itemize{
#' \item \strong{\code{x}}
#' \item \strong{\code{y}}
#' \item \strong{\code... | /R/geom-link2.R | no_license | catherian-cat/ggcor | R | false | false | 4,027 | r | #' Links layer
#'
#' @inheritParams ggplot2::layer
#' @inheritParams ggplot2::geom_curve
#' @section Aesthetics:
#' \code{geom_links2()} understands the following aesthetics (required aesthetics are in bold):
#' \itemize{
#' \item \strong{\code{x}}
#' \item \strong{\code{y}}
#' \item \strong{\code... |
# usage:
# R --vanilla --args "/data/myHistogram.png" "1,2,3,4"
makeHistogram = function(filename, lifespans) {
png(filename=filename, width=250, height=150, units="px", pointsize=16, bg="white" );
par(mar=c(3,3,0.5,1)); # trim margin around plot [b,l,t,r]
par(tcl=0.35); # switch tick marks to insides of a... | /src/Application/Model/PlotService/makeHistogram.R | no_license | bradyo/rls-db-builder | R | false | false | 930 | r | # usage:
# R --vanilla --args "/data/myHistogram.png" "1,2,3,4"
makeHistogram = function(filename, lifespans) {
png(filename=filename, width=250, height=150, units="px", pointsize=16, bg="white" );
par(mar=c(3,3,0.5,1)); # trim margin around plot [b,l,t,r]
par(tcl=0.35); # switch tick marks to insides of a... |
library(Vennerable)
V4a <- Venn(SetNames=month.name[1:4],Weight=1:16)
CR4a <- compute.Venn(V4a,type="ChowRuskey")
VennGetFaceLabels(CR4a)
| /tests/bug0524CR1100.R | no_license | JeremyBowyer/Vennerable | R | false | false | 139 | r | library(Vennerable)
V4a <- Venn(SetNames=month.name[1:4],Weight=1:16)
CR4a <- compute.Venn(V4a,type="ChowRuskey")
VennGetFaceLabels(CR4a)
|
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lines Annotation — anno_lines • ComplexHeatmap</title>
<!-- jquery -... | /docs/reference/anno_lines.rd | permissive | jokergoo/ComplexHeatmap | R | false | false | 13,682 | rd | <!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lines Annotation — anno_lines • ComplexHeatmap</title>
<!-- jquery -... |
#' @title Hydraulic drilling experiment.
#'
#' @description A data set concerning hydraulic drilling in rock
#'
#' @details The time \code{TIME} to drill five feet in rock is measured at different depths \code{DEPTH}
#'
#' @format A data frame with 17 rows and 2 variables:
#' \describe{
#' \item{DEPTH}{Depth at whi... | /R/drill.R | permissive | lilyraye/Intro2R-COVID | R | false | false | 551 | r | #' @title Hydraulic drilling experiment.
#'
#' @description A data set concerning hydraulic drilling in rock
#'
#' @details The time \code{TIME} to drill five feet in rock is measured at different depths \code{DEPTH}
#'
#' @format A data frame with 17 rows and 2 variables:
#' \describe{
#' \item{DEPTH}{Depth at whi... |
context( "distance" )
test_that( "distance works with Rcpp", {
sourceCpp( "cpp/distance.cpp" )
n = 1000
m = matrix(runif(n*10), ncol = 10)
m = m/rowSums(m)
expect_equal(
rcpp_js_distance(m),
rcpp_parallel_js_distance(m)
)
})
| /testthat/test-distance.R | no_license | RcppCore/RcppParallelTests | R | false | false | 293 | r | context( "distance" )
test_that( "distance works with Rcpp", {
sourceCpp( "cpp/distance.cpp" )
n = 1000
m = matrix(runif(n*10), ncol = 10)
m = m/rowSums(m)
expect_equal(
rcpp_js_distance(m),
rcpp_parallel_js_distance(m)
)
})
|
nFix<- function(data){
sub<- NULL; item<- NULL; seq<- NULL; cond<- NULL; word<- NULL; p<- NULL
nitems<- NULL; n<- NULL; p1<- NULL; p2<- NULL;
dataN<- NULL; dataT<- NULL;
nfix1<- NULL; nfix2<-NULL; nfix<- NULL; sound<- NULL
cat("Processing data for subject... ");
for(i in 1:length(unique(data$sub))... | /Experiment 1a/functions/nFix.R | no_license | martin-vasilev/preview_costs | R | false | false | 1,122 | r | nFix<- function(data){
sub<- NULL; item<- NULL; seq<- NULL; cond<- NULL; word<- NULL; p<- NULL
nitems<- NULL; n<- NULL; p1<- NULL; p2<- NULL;
dataN<- NULL; dataT<- NULL;
nfix1<- NULL; nfix2<-NULL; nfix<- NULL; sound<- NULL
cat("Processing data for subject... ");
for(i in 1:length(unique(data$sub))... |
#' cofeatureR: Generate Cofeature Matrices
#'
#' Generate cofeature (feature by sample) matrices. The package
#' utilizes ggplot2::geom_tile to generate the matrix allowing for easy
#' customization of additions from the base matrix.
#'
#' @docType package
#' @name cofeatureR
#' @importFrom stats setNames
NULL
| /R/cofeatureR-package.R | no_license | tinyheero/cofeatureR | R | false | false | 314 | r | #' cofeatureR: Generate Cofeature Matrices
#'
#' Generate cofeature (feature by sample) matrices. The package
#' utilizes ggplot2::geom_tile to generate the matrix allowing for easy
#' customization of additions from the base matrix.
#'
#' @docType package
#' @name cofeatureR
#' @importFrom stats setNames
NULL
|
require(foreach)
require(doMC)
require(GenomicRanges)
set.seed(20180102)
SSHFS <- F
setDir <- ifelse(SSHFS, "/media/electron", "")
registerDoMC(ifelse(SSHFS, 2, 30))
outFold <- "check_shuff_sizegene0"
system(paste0("mkdir -p ", outFold))
### generate randomTADs using the shuffle randomization
shuffle_sourceFile <-... | /check_shuff_sizegene0.R | no_license | marzuf/TAD_DE_pipeline_v2 | R | false | false | 12,069 | r | require(foreach)
require(doMC)
require(GenomicRanges)
set.seed(20180102)
SSHFS <- F
setDir <- ifelse(SSHFS, "/media/electron", "")
registerDoMC(ifelse(SSHFS, 2, 30))
outFold <- "check_shuff_sizegene0"
system(paste0("mkdir -p ", outFold))
### generate randomTADs using the shuffle randomization
shuffle_sourceFile <-... |
library(tester)
### Name: is_scalar
### Title: Is scalar
### Aliases: is_negative_scalar is_not_scalar is_positive_scalar is_scalar
### ** Examples
is_scalar(1) # TRUE
is_scalar(pi) # TRUE
is_scalar(1:5) # FALSE
is_scalar(matrix(runif(4), 2, 2)) # FALSE
is_not_scalar(1:5) # TRUE
is_not_scalar(NULL) # TRUE
is... | /data/genthat_extracted_code/tester/examples/is_scalar.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 709 | r | library(tester)
### Name: is_scalar
### Title: Is scalar
### Aliases: is_negative_scalar is_not_scalar is_positive_scalar is_scalar
### ** Examples
is_scalar(1) # TRUE
is_scalar(pi) # TRUE
is_scalar(1:5) # FALSE
is_scalar(matrix(runif(4), 2, 2)) # FALSE
is_not_scalar(1:5) # TRUE
is_not_scalar(NULL) # TRUE
is... |
#' A simple function for removing cookies
#'
#' This function looks for cookies used for logging into the NBN. Sometimes
#' this login process can go wrong, using this function you can delete cookies
#' resolving some issues.
#'
#' @export
#' @param path The directory where the cookies are stored, this is your workin... | /R/NBNCookies.r | no_license | JNCC-UK/rnbn | R | false | false | 1,047 | r | #' A simple function for removing cookies
#'
#' This function looks for cookies used for logging into the NBN. Sometimes
#' this login process can go wrong, using this function you can delete cookies
#' resolving some issues.
#'
#' @export
#' @param path The directory where the cookies are stored, this is your workin... |
library(fitPoly)
### Name: fitOneMarker
### Title: Function to fit multiple mixture models to signal ratios of a
### single bi-allelic marker
### Aliases: fitOneMarker
### ** Examples
## No test:
# These examples run for a total of about 9 sec.
data(fitPoly_data)
# triploid, no specified populations
fp <- ... | /data/genthat_extracted_code/fitPoly/examples/fitOneMarker.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,297 | r | library(fitPoly)
### Name: fitOneMarker
### Title: Function to fit multiple mixture models to signal ratios of a
### single bi-allelic marker
### Aliases: fitOneMarker
### ** Examples
## No test:
# These examples run for a total of about 9 sec.
data(fitPoly_data)
# triploid, no specified populations
fp <- ... |
#' print attribute.profile.class
#'
#' @param x \code{\link{attribute.profile.class}} input object
#' @method print attribute.profile.class
#' @export
setMethod(
f = "print",
signature = signature(x = 'attribute.profile.class'),
definition = function(x)
{
print(x@results)
}
)
#' head attribute.profile.... | /dcmr/R/attribute_profile_class_methods.R | no_license | ingted/R-Examples | R | false | false | 3,444 | r | #' print attribute.profile.class
#'
#' @param x \code{\link{attribute.profile.class}} input object
#' @method print attribute.profile.class
#' @export
setMethod(
f = "print",
signature = signature(x = 'attribute.profile.class'),
definition = function(x)
{
print(x@results)
}
)
#' head attribute.profile.... |
load('networks_list_global.Rdata')
#Simulacao generalizada das cursvas de adocao, indice de mooran e outros
qtd_simulacoes_validas <- length(networks_list_global$limiteinferior_)
qtd_anos_simulacao<- length(networks_list_global$moran_obs_[1,])
qtd_cidades<-length(networks_list_global$infection_[1,])
names_cidades<-at... | /arquivo/plotagemCurvas.R | no_license | acgabriel3/difusaoDeUmaInovacao | R | false | false | 4,480 | r | load('networks_list_global.Rdata')
#Simulacao generalizada das cursvas de adocao, indice de mooran e outros
qtd_simulacoes_validas <- length(networks_list_global$limiteinferior_)
qtd_anos_simulacao<- length(networks_list_global$moran_obs_[1,])
qtd_cidades<-length(networks_list_global$infection_[1,])
names_cidades<-at... |
#set the work directory
setwd('/Users/fiona/RWorkspace/iris')
#read iris data
iris <- read.csv('iris.csv',header = F)
#select the two kind of iris and two variable to train the model
iris.train <- iris[1:100,c(1,2,5)]
#data process,replace the name of the iris with 0,1,Iris-setosa=1, Iris-versicolor=0
iris.train$V5 <- ... | /PatternRecognition/iris/homework.R | no_license | Fiona-Gao/StudyWork | R | false | false | 1,638 | r | #set the work directory
setwd('/Users/fiona/RWorkspace/iris')
#read iris data
iris <- read.csv('iris.csv',header = F)
#select the two kind of iris and two variable to train the model
iris.train <- iris[1:100,c(1,2,5)]
#data process,replace the name of the iris with 0,1,Iris-setosa=1, Iris-versicolor=0
iris.train$V5 <- ... |
\name{plot.correlation}
\alias{plot.correlation}
\title{Plot a correlation matrix}
\usage{
\method{plot}{correlation}(x, y=NULL, ...)
}
\arguments{
\item{x}{A result of \link{correlation} function;}
\item{y}{Not used;}
\item{...}{Not used.}
}
\description{
Plot a correlation matrix.
}
\details{
Plot... | /man/plot.correlation.Rd | no_license | dpasqualin/sfreemap | R | false | false | 536 | rd | \name{plot.correlation}
\alias{plot.correlation}
\title{Plot a correlation matrix}
\usage{
\method{plot}{correlation}(x, y=NULL, ...)
}
\arguments{
\item{x}{A result of \link{correlation} function;}
\item{y}{Not used;}
\item{...}{Not used.}
}
\description{
Plot a correlation matrix.
}
\details{
Plot... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ggplot2)
library(shinydashboard)
#install.packages("shinythemes")
library(shinythemes)
mat... | /Postworks/Postwork8/Post8/app.R | no_license | LeonarZuma/Postworks | R | false | false | 3,796 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ggplot2)
library(shinydashboard)
#install.packages("shinythemes")
library(shinythemes)
mat... |
###########################################################################/**
# @RdocFunction WHInit
#
# @title "Initialization of the W and H matrices"
#
# \description{
# @get "title".
# }
#
# @synopsis
#
# \arguments{
# \item{V}{An KxI @matrix where I is the number of arrays and
# K is the number of probes whe... | /R/WHInit.R | no_license | HenrikBengtsson/ACNE | R | false | false | 3,921 | r | ###########################################################################/**
# @RdocFunction WHInit
#
# @title "Initialization of the W and H matrices"
#
# \description{
# @get "title".
# }
#
# @synopsis
#
# \arguments{
# \item{V}{An KxI @matrix where I is the number of arrays and
# K is the number of probes whe... |
/rscript/textmining.R | no_license | r3dmaohong/TextMining | R | false | false | 6,106 | r | ||
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/ISOMetaIdentifier.R
\docType{class}
\name{ISOMetaIdentifier}
\alias{ISOMetaIdentifier}
\title{ISOMetaIdentifier}
\format{\code{\link{R6Class}} object.}
\usage{
ISOMetaIdentifier
}
\value{
Object of \code{\link{R6Class}} for modelling ... | /man/ISOMetaIdentifier.Rd | no_license | sebkopf/geometa | R | false | false | 765 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/ISOMetaIdentifier.R
\docType{class}
\name{ISOMetaIdentifier}
\alias{ISOMetaIdentifier}
\title{ISOMetaIdentifier}
\format{\code{\link{R6Class}} object.}
\usage{
ISOMetaIdentifier
}
\value{
Object of \code{\link{R6Class}} for modelling ... |
# Exercise 3: interactive Shiny apps
# Load the shiny, ggplot2, and dplyr libraries
library("shiny")
library("ggplot2")
library("dplyr")
# You will once again be working with the `diamonds` data set provided by ggplot2
# Use dplyr's `sample_n()` function to get a random 3000 rows from the data set
# Store this sample... | /chapter-19-exercises/exercise-3/app.R | permissive | emilyliu1999/book-exercises | R | false | false | 3,508 | r | # Exercise 3: interactive Shiny apps
# Load the shiny, ggplot2, and dplyr libraries
library("shiny")
library("ggplot2")
library("dplyr")
# You will once again be working with the `diamonds` data set provided by ggplot2
# Use dplyr's `sample_n()` function to get a random 3000 rows from the data set
# Store this sample... |
#' Make predictor level bubble plots
#'
#' @param dat A data frame with the columns area, year
#' @param variable The column to summarize (character value)
#' @param group_id The events to count over (e.g. `"fishing_event_id"` or `"trip_id"`)
#' @param ncol Number of facetted columns (facets by area)
#'
#' @return A gg... | /R/plot_predictor_bubbles.R | no_license | pbs-assess/gfplot | R | false | false | 2,340 | r | #' Make predictor level bubble plots
#'
#' @param dat A data frame with the columns area, year
#' @param variable The column to summarize (character value)
#' @param group_id The events to count over (e.g. `"fishing_event_id"` or `"trip_id"`)
#' @param ncol Number of facetted columns (facets by area)
#'
#' @return A gg... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_lr.R
\name{create_lr}
\alias{create_lr}
\title{Create Linear Regression Model}
\usage{
create_lr(data = data, param, param2, line = "white",
points = "green", theme = "dark", multi = T)
}
\arguments{
\item{data}{a dataframe of a user... | /man/create_lr.Rd | no_license | brodriguez97/spotiverseR | R | false | true | 1,215 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_lr.R
\name{create_lr}
\alias{create_lr}
\title{Create Linear Regression Model}
\usage{
create_lr(data = data, param, param2, line = "white",
points = "green", theme = "dark", multi = T)
}
\arguments{
\item{data}{a dataframe of a user... |
\name{.requestEFetchMethod}
\title{Calls the appropriate interface method for this operation and stores the results.}
\usage{.requestEFetchMethod(EFObj)}
\description{Calls the appropriate interface method for this operation and stores the results.}
\section{Warning}{
This function should not be called by the user... | /RNCBI-0.9/R-Source-Win/man/requestEFetchMethod.Rd | no_license | MartinUndDerWolf/rncbi | R | false | false | 608 | rd | \name{.requestEFetchMethod}
\title{Calls the appropriate interface method for this operation and stores the results.}
\usage{.requestEFetchMethod(EFObj)}
\description{Calls the appropriate interface method for this operation and stores the results.}
\section{Warning}{
This function should not be called by the user... |
#' log likelihood function for microbiome mixture
#'
#' Calculate log likelihood function for microbiome sample mixture model at particular values of `p` and `e`.
#'
#' @param tab Dataset of read counts as 3d array of size 3x3x2, genotype in first sample x genotype in second sample x allele in read.
#' @param p Contami... | /R/mbmix_loglik.R | permissive | kbroman/mbmixture | R | false | false | 1,611 | r | #' log likelihood function for microbiome mixture
#'
#' Calculate log likelihood function for microbiome sample mixture model at particular values of `p` and `e`.
#'
#' @param tab Dataset of read counts as 3d array of size 3x3x2, genotype in first sample x genotype in second sample x allele in read.
#' @param p Contami... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CAPM.beta.R
\name{SFM.beta}
\alias{SFM.beta}
\alias{CAPM.beta}
\alias{CAPM.beta.bull}
\alias{CAPM.beta.bear}
\alias{TimingRatio}
\alias{SFM.beta.bull}
\alias{SFM.beta.bear}
\title{Calculate single factor model (CAPM) beta}
\usage{
SFM.beta(
... | /man/SFM.beta.Rd | no_license | braverock/PerformanceAnalytics | R | false | true | 5,079 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CAPM.beta.R
\name{SFM.beta}
\alias{SFM.beta}
\alias{CAPM.beta}
\alias{CAPM.beta.bull}
\alias{CAPM.beta.bear}
\alias{TimingRatio}
\alias{SFM.beta.bull}
\alias{SFM.beta.bear}
\title{Calculate single factor model (CAPM) beta}
\usage{
SFM.beta(
... |
# Themes
# Theme functions -------------------------------------------------------------
#' pilot ggplot theme
#'
#' This ggplot theme implements the pilot chart style. The theme
#' offers various options for easily controlling plot settings so that you
#' don't need to resort to additional uses of the ggplot2 \code{... | /R/themes.R | permissive | olihawkins/pilot | R | false | false | 19,129 | r | # Themes
# Theme functions -------------------------------------------------------------
#' pilot ggplot theme
#'
#' This ggplot theme implements the pilot chart style. The theme
#' offers various options for easily controlling plot settings so that you
#' don't need to resort to additional uses of the ggplot2 \code{... |
check = function(a, b)
{
print(match.call())
stopifnot(all.equal(a, b, check.attributes=FALSE, check.names=FALSE))
}
library("scidb")
host = Sys.getenv("SCIDB_TEST_HOST")
test_with_security = ifelse(Sys.getenv("SCIDB_TEST_WITH_SECURITY") == 'true',
TRUE, FALSE)
if (nchar(host) > 0)
{
... | /tests/a.R | no_license | arko-bhattacharya/SciDBR | R | false | false | 7,605 | r | check = function(a, b)
{
print(match.call())
stopifnot(all.equal(a, b, check.attributes=FALSE, check.names=FALSE))
}
library("scidb")
host = Sys.getenv("SCIDB_TEST_HOST")
test_with_security = ifelse(Sys.getenv("SCIDB_TEST_WITH_SECURITY") == 'true',
TRUE, FALSE)
if (nchar(host) > 0)
{
... |
# AFGR May 4 2017
# This script is going to be used to run simulate data with different noise
# and corellation structures. The alpha tuning function will then be used to
# observe any patterns in data with known structure.
# First thing we need to do is load our library(s)
source('/home/adrose/hiLo/scripts/04_Cogniti... | /scripts/04_CognitiveModels/scripts/validateAlphaSelection.R | no_license | PennBBL/hiLo | R | false | false | 1,556 | r | # AFGR May 4 2017
# This script is going to be used to run simulate data with different noise
# and corellation structures. The alpha tuning function will then be used to
# observe any patterns in data with known structure.
# First thing we need to do is load our library(s)
source('/home/adrose/hiLo/scripts/04_Cogniti... |
#----------------------------------------------------------------------------
# RSuite
# Copyright (c) 2017, WLOG Solutions
#----------------------------------------------------------------------------
library(RSuite)
library(testthat)
source("R/test_utils.R")
source("R/project_management.R")
context("Testing if bui... | /tests/test_stringr_dep_build.R | permissive | gitter-badger/RSuite-1 | R | false | false | 853 | r | #----------------------------------------------------------------------------
# RSuite
# Copyright (c) 2017, WLOG Solutions
#----------------------------------------------------------------------------
library(RSuite)
library(testthat)
source("R/test_utils.R")
source("R/project_management.R")
context("Testing if bui... |
############################################################
### Power Simulation code
############################################################
#edit 5/21/20 added in ability to standardize scores and weight scores
#to obtain the arguments from the bash files (chr, ss)
args <- commandArgs()
chr <- args[6]
numPair... | /JST_sPVE_Code/MainPipeline_Power_Ghat_RSNPs.R | no_license | arthurvickie/Multi-Marker_Method | R | false | false | 1,525 | r | ############################################################
### Power Simulation code
############################################################
#edit 5/21/20 added in ability to standardize scores and weight scores
#to obtain the arguments from the bash files (chr, ss)
args <- commandArgs()
chr <- args[6]
numPair... |
\name{facet_gridx}
\alias{FacetGridx}
\alias{facet_gridx}
\title{Lay out panels in a rectangular/tabular manner, with added options}
\description{
This is an enhanced version of ggplot2's
\code{facet_grid}. It adds options to control whether
the facet rows and/or columns are associated with the
axes, and displ... | /man/facet_gridx.Rd | no_license | RmeanyMAN/ggplothacks | R | false | false | 376 | rd | \name{facet_gridx}
\alias{FacetGridx}
\alias{facet_gridx}
\title{Lay out panels in a rectangular/tabular manner, with added options}
\description{
This is an enhanced version of ggplot2's
\code{facet_grid}. It adds options to control whether
the facet rows and/or columns are associated with the
axes, and displ... |
source( "masternegloglikereduced1.R" )
source("eudicottree.R" )
library( "expm" )
source( "Qmatrixwoodherb3.R" )
source("Pruning2.R")
bichrom.dataset<-read.table( "eudicotvals.txt",header=FALSE,sep=",",stringsAsFactors=FALSE)
last.state=50
uniform.samples<-read.csv("sample429.csv",header=FALSE)
a<- as.numeric(t(unif... | /Reduced model optimizations/explorelikereduced429.R | no_license | roszenil/Bichromdryad | R | false | false | 750 | r | source( "masternegloglikereduced1.R" )
source("eudicottree.R" )
library( "expm" )
source( "Qmatrixwoodherb3.R" )
source("Pruning2.R")
bichrom.dataset<-read.table( "eudicotvals.txt",header=FALSE,sep=",",stringsAsFactors=FALSE)
last.state=50
uniform.samples<-read.csv("sample429.csv",header=FALSE)
a<- as.numeric(t(unif... |
library(sqldf)
data<-read.csv.sql("./household_power_consumption.txt", sql = "select * from file where Date IN ('1/2/2007','2/2/2007')", header = TRUE, sep = ";")
closeAllConnections()
datetime<-as.POSIXct(paste(data$Date, data$Time), format="%d/%m/%Y %H:%M:%S")
dataDT<- cbind(data, datetime)
str(dataDT)
png(file = "p... | /plot2.R | no_license | noname2use/ExData_Plotting1 | R | false | false | 452 | r | library(sqldf)
data<-read.csv.sql("./household_power_consumption.txt", sql = "select * from file where Date IN ('1/2/2007','2/2/2007')", header = TRUE, sep = ";")
closeAllConnections()
datetime<-as.POSIXct(paste(data$Date, data$Time), format="%d/%m/%Y %H:%M:%S")
dataDT<- cbind(data, datetime)
str(dataDT)
png(file = "p... |
library(grankp, lib.loc="~newton/Rlibs")
## code to look at parameters where modal ordering differs from posterior mean ordering
# example (found by Nick when we were revising the rvalue paper)
t <- c(0.2, 1.9, 0.8)
mu <- c(0.85, 1.55, 0.95)/( 1 + t)
t <- c(0.2, 1.9, 0.8)
sigma2 <- t/(1+t)
n <- 2000
ss <- as.in... | /manuscript/R/bayes1.R | no_license | wiscstatman/GammaRank | R | false | false | 1,453 | r |
library(grankp, lib.loc="~newton/Rlibs")
## code to look at parameters where modal ordering differs from posterior mean ordering
# example (found by Nick when we were revising the rvalue paper)
t <- c(0.2, 1.9, 0.8)
mu <- c(0.85, 1.55, 0.95)/( 1 + t)
t <- c(0.2, 1.9, 0.8)
sigma2 <- t/(1+t)
n <- 2000
ss <- as.in... |
library(ggplot)
frag <- read.table('/home/thuy/gitrepo/Umberjack_Benchmark/simulations/data/benchmark_art_profile/seq_error_rate.fraglen.csv', sep=",", header=TRUE)
head(frag)
summary(frag)
#_indel0.00045_qs0_cover9_fragmean136_fragstd94_seed6298981545792848188.sam
samsplit <- strsplit(as.character(frag$Sam), "_")
f... | /R/benchmark_art_fraglen.R | no_license | tnguyencfe/Umberjack_Benchmark | R | false | false | 1,934 | r | library(ggplot)
frag <- read.table('/home/thuy/gitrepo/Umberjack_Benchmark/simulations/data/benchmark_art_profile/seq_error_rate.fraglen.csv', sep=",", header=TRUE)
head(frag)
summary(frag)
#_indel0.00045_qs0_cover9_fragmean136_fragstd94_seed6298981545792848188.sam
samsplit <- strsplit(as.character(frag$Sam), "_")
f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.