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 |
|---|---|---|---|---|---|---|---|---|---|
#
# greense.R, 18 Jan 16
#
# Data from:
#
# How Does Code Obfuscation Impact Energy Usage?
# Cagri Sahin, Philip Tornquist, Ryan McKenna, Zachary Pearson, and James Clause
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
library(MASS)
eud=read.csv(paste0(ESEUR_dir,... | /regression/misc/greense.R | no_license | Makarand87/ESEUR-code-data | R | false | false | 774 | r | #
# greense.R, 18 Jan 16
#
# Data from:
#
# How Does Code Obfuscation Impact Energy Usage?
# Cagri Sahin, Philip Tornquist, Ryan McKenna, Zachary Pearson, and James Clause
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
library(MASS)
eud=read.csv(paste0(ESEUR_dir,... |
destination_file = "human_matrix.h5"
# Check if gene expression file was already downloaded, if not in current directory download file form repository
if (!file.exists(destination_file)) {
print("Downloading compressed gene expression matrix.")
url = 'https://s3.amazonaws.com/mssm-seq-matrix/human_matrix.h5'
dow... | /src/main/resources/Supplementary_scripts/Benchmarking/ARCHS4_TF_LOFGOF_mining/tf_mining.R | no_license | MaayanLab/chea3web | R | false | false | 1,974 | r | destination_file = "human_matrix.h5"
# Check if gene expression file was already downloaded, if not in current directory download file form repository
if (!file.exists(destination_file)) {
print("Downloading compressed gene expression matrix.")
url = 'https://s3.amazonaws.com/mssm-seq-matrix/human_matrix.h5'
dow... |
## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(echo = TRUE,
comment = "#>",
collapse = TRUE
)
## -----------------------------------------------------------------------------
string <- c("lo... | /inst/doc/introducing-the-snakecase-package.R | no_license | cran/snakecase | R | false | false | 1,196 | r | ## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(echo = TRUE,
comment = "#>",
collapse = TRUE
)
## -----------------------------------------------------------------------------
string <- c("lo... |
### sub functions to merge clusters during iterations
# compute projected new subspace and projected energy merge of two clusters
compute.projen <- function(ij, x, act.clustering){
if (is.null(ij[[2]])){
pair <- ij[[1]]
mergedx <- x[c(which(act.clustering$cluster == pair[1]), which(act.cluster... | /R/clmerge.R | no_license | lailaghani/orclus | R | false | false | 5,457 | r | ### sub functions to merge clusters during iterations
# compute projected new subspace and projected energy merge of two clusters
compute.projen <- function(ij, x, act.clustering){
if (is.null(ij[[2]])){
pair <- ij[[1]]
mergedx <- x[c(which(act.clustering$cluster == pair[1]), which(act.cluster... |
#' @name HorvitzDataRealSurvey
#' @aliases HorvitzDataRealSurvey
#' @docType data
#' @title Randomized Response Survey on a sensitive questions
#'
#' @description This data set contains observations from a randomized response survey conducted in a university to sensitive questions described below.
#' The sample... | /R/HorvitzDataRealSurvey.R | no_license | cran/RRTCS | R | false | false | 2,335 | r | #' @name HorvitzDataRealSurvey
#' @aliases HorvitzDataRealSurvey
#' @docType data
#' @title Randomized Response Survey on a sensitive questions
#'
#' @description This data set contains observations from a randomized response survey conducted in a university to sensitive questions described below.
#' The sample... |
works_with_R("3.0.1",rankSVMcompare="2013.9.3",quadmod="2013.8.23",
proto="0.3.10")
data(separable)
source("tikz.R")
source("colors.R")
only <- 1:50
one <- with(separable, list(yi=yi[only],Xi=Xi[only,],Xip=Xip[only,]))
is.one <- one$yi==1
is.zero <- one$yi == 0
Di <- with(one, Xip - Xi)
Di[,"angle"] <- D... | /figure-hard-margin.R | no_license | tdhock/compare-poster | R | false | false | 7,985 | r | works_with_R("3.0.1",rankSVMcompare="2013.9.3",quadmod="2013.8.23",
proto="0.3.10")
data(separable)
source("tikz.R")
source("colors.R")
only <- 1:50
one <- with(separable, list(yi=yi[only],Xi=Xi[only,],Xip=Xip[only,]))
is.one <- one$yi==1
is.zero <- one$yi == 0
Di <- with(one, Xip - Xi)
Di[,"angle"] <- D... |
piaac.reg.pv <-
function(x, pvlabel="LIT", by, data, export=FALSE, name= "output", std=FALSE, folder=getwd()) {
intsvy.reg.pv(x=x, pvnames = paste("PV", pvlabel, 1:10, sep=""), by=by, data=data, std=std, export=export,
name= name, folder=folder, config=piaac_conf)
}
| /R/piaac.reg.pv.R | no_license | eldafani/intsvy | R | false | false | 292 | r | piaac.reg.pv <-
function(x, pvlabel="LIT", by, data, export=FALSE, name= "output", std=FALSE, folder=getwd()) {
intsvy.reg.pv(x=x, pvnames = paste("PV", pvlabel, 1:10, sep=""), by=by, data=data, std=std, export=export,
name= name, folder=folder, config=piaac_conf)
}
|
library(ykmeans)
### Name: kmeansN
### Title: kmeansN
### Aliases: kmeansN
### ** Examples
## Not run:
##D data(actData)
##D act.kmn <- kmeansN(actData, 3, paste0("x",1:17),"y")
##D table(act.kmn$cluster)
## End(Not run)
| /data/genthat_extracted_code/ykmeans/examples/kmeansN.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 229 | r | library(ykmeans)
### Name: kmeansN
### Title: kmeansN
### Aliases: kmeansN
### ** Examples
## Not run:
##D data(actData)
##D act.kmn <- kmeansN(actData, 3, paste0("x",1:17),"y")
##D table(act.kmn$cluster)
## End(Not run)
|
#' Estimation of the palaeodose (Q) with the MAAD protocol
#'
#' Internal function called by \link{analyse_TL.MAAD}. \cr
#' This function makes a first estimation of the palaeodose based on a doses vector and a Lx/Tx vector provided. \cr
#' See details for more information.
#'
#'
#'
#' @param LxTx
#' \link{nu... | /R/calc_TL.MAAD.fit.Q.R | no_license | cran/TLdating | R | false | false | 6,948 | r | #' Estimation of the palaeodose (Q) with the MAAD protocol
#'
#' Internal function called by \link{analyse_TL.MAAD}. \cr
#' This function makes a first estimation of the palaeodose based on a doses vector and a Lx/Tx vector provided. \cr
#' See details for more information.
#'
#'
#'
#' @param LxTx
#' \link{nu... |
library(ENCODExplorer)
library(DT)
library(reshape2)
library(htmlwidgets)
library(visNetwork)
library(beepr)
library(AnnotationDbi)
library(Rcpp)
library(gplots)
library(edgeR)
library(org.Mm.eg.db)
library(gplots)
library(pheatmap)
library(xlsx)
library(gage)
library(gageData)
library(topGO)
library(ggplot2)
library(R... | /master scripts/DEFlow_for_all_samples_mouse_MASTER.R | no_license | nemochina2008/bioinformatics | R | false | false | 48,997 | r | library(ENCODExplorer)
library(DT)
library(reshape2)
library(htmlwidgets)
library(visNetwork)
library(beepr)
library(AnnotationDbi)
library(Rcpp)
library(gplots)
library(edgeR)
library(org.Mm.eg.db)
library(gplots)
library(pheatmap)
library(xlsx)
library(gage)
library(gageData)
library(topGO)
library(ggplot2)
library(R... |
###############################################################################################
############### MEDSL Healthy Elections COVID Rate CleanR #################################
##########################################################################################
library(ggplot2)
library(ggalt)
library(g... | /covid_plot_cleanR.R | no_license | dcao12/healthy_elections | R | false | false | 9,012 | r | ###############################################################################################
############### MEDSL Healthy Elections COVID Rate CleanR #################################
##########################################################################################
library(ggplot2)
library(ggalt)
library(g... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Tcols.R
\docType{data}
\name{Tcols}
\alias{Tcols}
\title{A palette of 17 diverging colors}
\format{Vector of 17 diverging colors.}
\source{
R Color brewer: \code{c(brewer.pal(9, "Set1"), brewer.pal(8, "Dark2"))}.
}
\usage{
Tcols
}
\descriptio... | /man/Tcols.Rd | no_license | gmaubach/Tmisc | R | false | true | 560 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Tcols.R
\docType{data}
\name{Tcols}
\alias{Tcols}
\title{A palette of 17 diverging colors}
\format{Vector of 17 diverging colors.}
\source{
R Color brewer: \code{c(brewer.pal(9, "Set1"), brewer.pal(8, "Dark2"))}.
}
\usage{
Tcols
}
\descriptio... |
require(glmnet)
rankRidgeModelExp <- setRefClass(Class = "rankRidgeModelExp",
contains="PredictiveModel",
fields="model",
methods = list(
initialize = function(...){
... | /survival_analysis/serialModel/M/rankRidgeModelExp.R | no_license | insockjang/DrugResponse | R | false | false | 7,066 | r | require(glmnet)
rankRidgeModelExp <- setRefClass(Class = "rankRidgeModelExp",
contains="PredictiveModel",
fields="model",
methods = list(
initialize = function(...){
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glue_operations.R
\name{glue_create_workflow}
\alias{glue_create_workflow}
\title{Creates a new workflow}
\usage{
glue_create_workflow(Name, Description, DefaultRunProperties, Tags,
MaxConcurrentRuns)
}
\arguments{
\item{Name}{[required] Th... | /cran/paws.analytics/man/glue_create_workflow.Rd | permissive | sanchezvivi/paws | R | false | true | 1,221 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glue_operations.R
\name{glue_create_workflow}
\alias{glue_create_workflow}
\title{Creates a new workflow}
\usage{
glue_create_workflow(Name, Description, DefaultRunProperties, Tags,
MaxConcurrentRuns)
}
\arguments{
\item{Name}{[required] Th... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lightsail_operations.R
\name{lightsail_get_relational_database_master_user_password}
\alias{lightsail_get_relational_database_master_user_password}
\title{Returns the current, previous, or pending versions of the master user
password for a Li... | /cran/paws.compute/man/lightsail_get_relational_database_master_user_password.Rd | permissive | sanchezvivi/paws | R | false | true | 1,475 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lightsail_operations.R
\name{lightsail_get_relational_database_master_user_password}
\alias{lightsail_get_relational_database_master_user_password}
\title{Returns the current, previous, or pending versions of the master user
password for a Li... |
# Virgin SSB
ssb0 = format(model$derived_quants[model$derived_quants$Label == "SSB_Virgin", 2], digits = 0, scientific = FALSE, big.mark = ",")
# Spawning Biomass at 25%
ssb_targ = round(0.25 * model$derived_quants[model$derived_quants$Label == "SSB_Virgin", 2], 0)
# Final Year SSB
ssb_2021 = format(model$derived_q... | /OR/write_up/derived_quants.R | no_license | shcaba/Vermilion-rockfish-OR-WA-2021-assessment | R | false | false | 2,457 | r |
# Virgin SSB
ssb0 = format(model$derived_quants[model$derived_quants$Label == "SSB_Virgin", 2], digits = 0, scientific = FALSE, big.mark = ",")
# Spawning Biomass at 25%
ssb_targ = round(0.25 * model$derived_quants[model$derived_quants$Label == "SSB_Virgin", 2], 0)
# Final Year SSB
ssb_2021 = format(model$derived_q... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\encoding{UTF-8}
\name{IB}
\alias{IB}
\title{Spreading measure based on Moran's \eqn{I} index}
\usage{
IB(W, s)
}
\arguments{
\item{W}{a stratification matrix inheriting from \code{\link[Matrix]{sparseMatrix}} that represents th... | /man/IB.Rd | no_license | RJauslin/WaveSampling | R | false | true | 2,166 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\encoding{UTF-8}
\name{IB}
\alias{IB}
\title{Spreading measure based on Moran's \eqn{I} index}
\usage{
IB(W, s)
}
\arguments{
\item{W}{a stratification matrix inheriting from \code{\link[Matrix]{sparseMatrix}} that represents th... |
#' Generic autoplot function
#'
#' The following is imported and then re-exported to avoid conflicts with \code{ggplot2}
#' @importFrom ggplot2 autoplot labs
#' @name autoplot
#' @export
NULL
#' Plots for emfrail objects using \code{ggplot2}
#' @importFrom ggplot2 autoplot theme_minimal ggplot geom_step geom_path geom... | /R/autoplot.emfrail.R | no_license | snoweye/frailtyEM | R | false | false | 15,516 | r | #' Generic autoplot function
#'
#' The following is imported and then re-exported to avoid conflicts with \code{ggplot2}
#' @importFrom ggplot2 autoplot labs
#' @name autoplot
#' @export
NULL
#' Plots for emfrail objects using \code{ggplot2}
#' @importFrom ggplot2 autoplot theme_minimal ggplot geom_step geom_path geom... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_table.R
\name{template_alleles.read_table}
\alias{template_alleles.read_table}
\title{Return all alleles matching a read template}
\usage{
template_alleles.read_table(template, df, match = F)
}
\arguments{
\item{template}{A logical vecto... | /man/template_alleles.read_table.Rd | no_license | stephenshank/RegressHaplo | R | false | true | 833 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_table.R
\name{template_alleles.read_table}
\alias{template_alleles.read_table}
\title{Return all alleles matching a read template}
\usage{
template_alleles.read_table(template, df, match = F)
}
\arguments{
\item{template}{A logical vecto... |
## This function set Matrix, get Matrix, set Inverse of the matrix and get Invers ## of the matrix provided.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse
getinverse <- function() i... | /cachematrix.R | no_license | inspiron1420/ProgrammingAssignment2 | R | false | false | 895 | r | ## This function set Matrix, get Matrix, set Inverse of the matrix and get Invers ## of the matrix provided.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse
getinverse <- function() i... |
# DEMTU demonstrates dynamical chipCHIP on Tu data.
# CHIPDYNO toolbox
# demTu.R version 1.0.1
# FORMAT
# DESC demonstrates dynamical chipCHIP on Tu data.
# COPYRIGHT : Neil D. Lawrence, 2006
# COPYRIGHT : Guido Sanguinetti, 2006
# MODIFICATIONS : Muhammad A. Rahman, 2013
# SEEALSO : demSpellmanDynoStat
rm(list = ls(... | /R/demTu.R | no_license | lawrennd/chipdyno | R | false | false | 2,781 | r | # DEMTU demonstrates dynamical chipCHIP on Tu data.
# CHIPDYNO toolbox
# demTu.R version 1.0.1
# FORMAT
# DESC demonstrates dynamical chipCHIP on Tu data.
# COPYRIGHT : Neil D. Lawrence, 2006
# COPYRIGHT : Guido Sanguinetti, 2006
# MODIFICATIONS : Muhammad A. Rahman, 2013
# SEEALSO : demSpellmanDynoStat
rm(list = ls(... |
options( width=150, max.print=1000000 )
library(samon, lib.loc="../../samlib")
data("samonPANSS1")
data("samonPANSS2")
# Check data
chk1 <- samonDataCheck( samonPANSS1 )
chk2 <- samonDataCheck( samonPANSS2 )
NT <- ncol(samonPANSS1)
means1 <- matrix(NA, NT, NT )
means2 <- matrix(NA, NT, NT )
for ( l in 1:NT ... | /inst/Examples/Example1/checkData.R | no_license | cran/samon | R | false | false | 1,672 | r | options( width=150, max.print=1000000 )
library(samon, lib.loc="../../samlib")
data("samonPANSS1")
data("samonPANSS2")
# Check data
chk1 <- samonDataCheck( samonPANSS1 )
chk2 <- samonDataCheck( samonPANSS2 )
NT <- ncol(samonPANSS1)
means1 <- matrix(NA, NT, NT )
means2 <- matrix(NA, NT, NT )
for ( l in 1:NT ... |
run_tests <- function(x, y, n, nbeta = 1000, bayes_prior = c(1,1), CI = 0.95, calculate_coverage = F){
#create contingency table
d <- matrix(c(length(intersect(x,y)), length(setdiff(x,y)), length(setdiff(y,x)), n - length(union(x,y))), 2, 2)
#find posterior dist of difference in p
rb1 <- rbeta(nbeta, baye... | /postdoc/test_binomial_hypergeometric.R | no_license | NikVetr/minor_scripts | R | false | false | 3,559 | r | run_tests <- function(x, y, n, nbeta = 1000, bayes_prior = c(1,1), CI = 0.95, calculate_coverage = F){
#create contingency table
d <- matrix(c(length(intersect(x,y)), length(setdiff(x,y)), length(setdiff(y,x)), n - length(union(x,y))), 2, 2)
#find posterior dist of difference in p
rb1 <- rbeta(nbeta, baye... |
# This script builds both the HTML and PDF versions of your CV
# If you wanted to speed up rendering for googlesheets driven CVs you could use
# this script to cache a version of the CV_Printer class with data already
# loaded and load the cached version in the .Rmd instead of re-fetching it twice
# for the HTML and P... | /render_cv.r | no_license | AnaSBarreira/CV | R | false | false | 1,006 | r | # This script builds both the HTML and PDF versions of your CV
# If you wanted to speed up rendering for googlesheets driven CVs you could use
# this script to cache a version of the CV_Printer class with data already
# loaded and load the cached version in the .Rmd instead of re-fetching it twice
# for the HTML and P... |
# When there is only one taxonomy level known.
uniqueKnownTaxaLevel="Class" # Put here the level of the taxonomy of the values given.
taxmat = matrix(nrow=ntaxa(OTU),ncol=7)
rownames(taxmat) <- taxa_names(OTU)
colnames(taxmat) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species")
# To complete ... | /ScriptsNotebooks/CompleteBlanksInTaxonomyDictionary.r | no_license | Ana-MAV/DataResultsTFM | R | false | false | 2,393 | r | # When there is only one taxonomy level known.
uniqueKnownTaxaLevel="Class" # Put here the level of the taxonomy of the values given.
taxmat = matrix(nrow=ntaxa(OTU),ncol=7)
rownames(taxmat) <- taxa_names(OTU)
colnames(taxmat) <- c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species")
# To complete ... |
library(ggplot2)
library(RColorBrewer)
df<-read.csv("Facet_Data.csv", header = TRUE)
p1<-ggplot(df, aes(x=SOD,y=tau,size=age)) +
geom_point(shape=21,color="black",fill="#E53F2F",stroke=0.25,alpha=0.8)+
scale_size(range = c(1, 8))
p2<-ggplot(df, aes(SOD,tau,fill=age,size=age)) +
geom_point(shape=21,colour="b... | /第1章 R语言编程与绘图基础/图1-6-9 不同的度量调整效果.R | no_license | EasyChart/Beautiful-Visualization-with-R | R | false | false | 934 | r |
library(ggplot2)
library(RColorBrewer)
df<-read.csv("Facet_Data.csv", header = TRUE)
p1<-ggplot(df, aes(x=SOD,y=tau,size=age)) +
geom_point(shape=21,color="black",fill="#E53F2F",stroke=0.25,alpha=0.8)+
scale_size(range = c(1, 8))
p2<-ggplot(df, aes(SOD,tau,fill=age,size=age)) +
geom_point(shape=21,colour="b... |
length_longest_sequence <- function(sequences){
return (max(nchar(sequences)))
}
padding_sequence <- function(sequence, len) {
newseq <- sequence
if (nchar(sequence) < len){
to_pad <- len - nchar(sequence)
for (i in 1:to_pad){
newseq <- paste0(newseq,"X")
}
}
else if (nchar(sequence) > le... | /R/CustomFunctions.R | no_license | JaimeMLegaz/setup-sequences | R | false | false | 5,844 | r | length_longest_sequence <- function(sequences){
return (max(nchar(sequences)))
}
padding_sequence <- function(sequence, len) {
newseq <- sequence
if (nchar(sequence) < len){
to_pad <- len - nchar(sequence)
for (i in 1:to_pad){
newseq <- paste0(newseq,"X")
}
}
else if (nchar(sequence) > le... |
design_example <- tibble::tribble(
~ID, ~Weight, ~Age, ~Height, ~Eyes, ~Hair,
1, 125, 14, 65, 'Green', 'Light',
2, 107, 12, 62, 'Brown', 'Dark',
3, 143, 16, 69, 'Green', 'Dark',
4, 126, 14, 68, 'Blue', 'Light',
5, 155, 18, 68, 'Brown', 'Dark',
6, 153, 17, 67, 'Blue', 'Dark',
7, 146, 17, ... | /prep/design_example.r | no_license | jaredlander/coursedata | R | false | false | 483 | r | design_example <- tibble::tribble(
~ID, ~Weight, ~Age, ~Height, ~Eyes, ~Hair,
1, 125, 14, 65, 'Green', 'Light',
2, 107, 12, 62, 'Brown', 'Dark',
3, 143, 16, 69, 'Green', 'Dark',
4, 126, 14, 68, 'Blue', 'Light',
5, 155, 18, 68, 'Brown', 'Dark',
6, 153, 17, 67, 'Blue', 'Dark',
7, 146, 17, ... |
## functions do
makeCacheMatrix <- function(x = matrix()){
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() {x}
setInverse <- function(inverse) {inv <<- inverse}
getInverse <- function() {inv}
list(set = set, get = get, setInverse = setInverse, getInve... | /cachematrix.R | no_license | sucharanreddy/ProgrammingAssignment2 | R | false | false | 805 | r | ## functions do
makeCacheMatrix <- function(x = matrix()){
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() {x}
setInverse <- function(inverse) {inv <<- inverse}
getInverse <- function() {inv}
list(set = set, get = get, setInverse = setInverse, getInve... |
setwd("~/Desktop/Coll_100_WP/RScript/Data")
x <- 1:100
y <- 1:100
east <- sample(x, size = 10, replace = TRUE)
north <- sample(y, size = 10, replace = TRUE)
symbols(east, north, squares = rep(.75,10), inches = FALSE)
symbols(sample(x, 10, replace = TRUE), sample(y, 10, replace = TRUE), circles = rep(.75,10), inches = F... | /A_Persons_Path_Between_Homes_Work.R | no_license | elbenesh/wicked_problems | R | false | false | 1,828 | r | setwd("~/Desktop/Coll_100_WP/RScript/Data")
x <- 1:100
y <- 1:100
east <- sample(x, size = 10, replace = TRUE)
north <- sample(y, size = 10, replace = TRUE)
symbols(east, north, squares = rep(.75,10), inches = FALSE)
symbols(sample(x, 10, replace = TRUE), sample(y, 10, replace = TRUE), circles = rep(.75,10), inches = F... |
#' Generate Seasons
#'
#' Identify the hours, days or months in a (monthly, daily or hourly) temperature dataset that belong to a particular season.
#' Seasons are defined according to the `mrange` argument, which specifies the start and end month of
#' the season. The `years` argument specifies the year, in which... | /fuzzedpackages/chillR/R/genSeason.R | no_license | akhikolla/testpackages | R | false | false | 2,964 | r | #' Generate Seasons
#'
#' Identify the hours, days or months in a (monthly, daily or hourly) temperature dataset that belong to a particular season.
#' Seasons are defined according to the `mrange` argument, which specifies the start and end month of
#' the season. The `years` argument specifies the year, in which... |
y <-
c(0, 3, 5, 0, 4, 5, 6, 3, 4, 3, 4, 0, 5, 5, 0, 4, 0, 4, 4, 6, 3, 3,
4, 2, 0, 1, 0, 1, 5, 4, 4, 2, 3, 6, 4, 5, 0, 1, 4, 0, 4, 5, 4, 6, 4, 3,
5, 6, 6, 6, 5, 3, 1, 6, 5, 0, 6, 0, 3, 4, 4, 5, 5, 0, 5, 2, 6, 4, 6, 5,
0, 3, 5, 0, 6, 4, 5, 5, 3, 3, 3, 5, 3, 1, 5, 4, 0, 3, 4, 6, 3, 0, 3, 0,
1, 2, 6, 5, 4, 0, 4, 0, 4, 4, ... | /count-data.R | no_license | jgabry/toronto | R | false | false | 1,517 | r | y <-
c(0, 3, 5, 0, 4, 5, 6, 3, 4, 3, 4, 0, 5, 5, 0, 4, 0, 4, 4, 6, 3, 3,
4, 2, 0, 1, 0, 1, 5, 4, 4, 2, 3, 6, 4, 5, 0, 1, 4, 0, 4, 5, 4, 6, 4, 3,
5, 6, 6, 6, 5, 3, 1, 6, 5, 0, 6, 0, 3, 4, 4, 5, 5, 0, 5, 2, 6, 4, 6, 5,
0, 3, 5, 0, 6, 4, 5, 5, 3, 3, 3, 5, 3, 1, 5, 4, 0, 3, 4, 6, 3, 0, 3, 0,
1, 2, 6, 5, 4, 0, 4, 0, 4, 4, ... |
# library(xxx): load all allowed libraries, e.g., lubridate, tidyverse.
source("mymain.R")
start.time <- Sys.time()
# read in train / test dataframes
train <- readr::read_csv('train_ini.csv')
test <- readr::read_csv('test.csv')
# save weighted mean absolute error WMAE
num_folds <- 10
wae <- rep(0, num_fol... | /eval.R | no_license | srvchetry/PSL | R | false | false | 1,088 | r | # library(xxx): load all allowed libraries, e.g., lubridate, tidyverse.
source("mymain.R")
start.time <- Sys.time()
# read in train / test dataframes
train <- readr::read_csv('train_ini.csv')
test <- readr::read_csv('test.csv')
# save weighted mean absolute error WMAE
num_folds <- 10
wae <- rep(0, num_fol... |
lm_patho <- read.csv("df.csv")
dir.create("../data")
save(lm_patho, file = "../data/lm_patho.rda")
| /data-raw/make-df.r | no_license | yingnan-lyu/bis557 | R | false | false | 104 | r | lm_patho <- read.csv("df.csv")
dir.create("../data")
save(lm_patho, file = "../data/lm_patho.rda")
|
###want to confirm that there are no major changes in distribution, mean, sd, etc of RMSE when we change lambda 3. We know that there are small changes in overall RMSE, but need to check out lake specific RMSE to make sure there aren't certain lakes that get huge. Also generally interested inw hether some lakes have ... | /R/RMSE_histos.R | no_license | smc322/LAGOSclimate | R | false | false | 7,018 | r | ###want to confirm that there are no major changes in distribution, mean, sd, etc of RMSE when we change lambda 3. We know that there are small changes in overall RMSE, but need to check out lake specific RMSE to make sure there aren't certain lakes that get huge. Also generally interested inw hether some lakes have ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convenienceWrappers.R
\name{plotTranscriptsFromEnsembldb}
\alias{plotTranscriptsFromEnsembldb}
\title{Plot transcripts directly from ensembldb object.}
\usage{
plotTranscriptsFromEnsembldb(ensembldb, gene_names, transcript_ids = NULL,
...)
... | /man/plotTranscriptsFromEnsembldb.Rd | permissive | guokai8/wiggleplotr | R | false | true | 905 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convenienceWrappers.R
\name{plotTranscriptsFromEnsembldb}
\alias{plotTranscriptsFromEnsembldb}
\title{Plot transcripts directly from ensembldb object.}
\usage{
plotTranscriptsFromEnsembldb(ensembldb, gene_names, transcript_ids = NULL,
...)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/permutation.R
\name{output}
\alias{output}
\title{output}
\usage{
output(data = data.frame(), null.value = c(),
alternative = "two-sided", method = "Two-sided permutation test",
estimate = c(), data.name = "", statistic = c(),
parameter... | /man/output.Rd | no_license | aumath-advancedr2019/Sampling | R | false | true | 488 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/permutation.R
\name{output}
\alias{output}
\title{output}
\usage{
output(data = data.frame(), null.value = c(),
alternative = "two-sided", method = "Two-sided permutation test",
estimate = c(), data.name = "", statistic = c(),
parameter... |
#' Simulated Responses to Knowledge Questions With Don't Know
#'
#' Simulate Pre- and Post-Process Responses to Knowledge Questions with Don't Know
#' @name alldat
#' @docType data
#' @keywords data
#'
#' @format A data frame with 500 rows and 4000 variables:
"alldat_dk"
| /R/alldat_dk.R | permissive | soodoku/guess | R | false | false | 272 | r | #' Simulated Responses to Knowledge Questions With Don't Know
#'
#' Simulate Pre- and Post-Process Responses to Knowledge Questions with Don't Know
#' @name alldat
#' @docType data
#' @keywords data
#'
#' @format A data frame with 500 rows and 4000 variables:
"alldat_dk"
|
summary.VFS <-
function(object, ...) {
# summarizes a VFS object
# averages across all b values
runoff <- matrix(object$daily$runoff, nrow=365, byrow=FALSE)
runoffd <- runoff
runoffd[runoffd > 0] <- 1
if(all(is.na(object$MassOut)))
modeltype <- "Erosion"
else
modeltype <- "VFS"
... | /R/summary.VFS.R | no_license | cran/VFS | R | false | false | 2,924 | r | summary.VFS <-
function(object, ...) {
# summarizes a VFS object
# averages across all b values
runoff <- matrix(object$daily$runoff, nrow=365, byrow=FALSE)
runoffd <- runoff
runoffd[runoffd > 0] <- 1
if(all(is.na(object$MassOut)))
modeltype <- "Erosion"
else
modeltype <- "VFS"
... |
rm(list=ls())
options(width=100)
source('funcs.R')
library(xtable)
load("sdss_out.RData")
## get stars and tmss in same order
stars <- stars[order(stars[,1]),]
for(ii in 1:length(out)){
out[[ii]] <- out[[ii]][order(names(out[[ii]]))]
}
## is the estimate within 1\% of truth
is_correct <- function(truth,estimate){... | /code/sdss_results.R | no_license | longjp/hetero_approx | R | false | false | 3,985 | r | rm(list=ls())
options(width=100)
source('funcs.R')
library(xtable)
load("sdss_out.RData")
## get stars and tmss in same order
stars <- stars[order(stars[,1]),]
for(ii in 1:length(out)){
out[[ii]] <- out[[ii]][order(names(out[[ii]]))]
}
## is the estimate within 1\% of truth
is_correct <- function(truth,estimate){... |
library(maptools)
library(rgdal)
plot.heat <- function(counties.map,state.map,z,title=NULL,breaks=NULL,reverse=FALSE,cex.legend=1,bw=.2,col.vec=NULL,plot.legend=TRUE) {
##Break down the value variable
if (is.null(breaks)) {
breaks=
seq(
floor(min(counties.map@data[,z],na.rm=TRUE)*10)/10
,... | /map_grapher.R | no_license | Innoviox/edudata | R | false | false | 1,929 | r | library(maptools)
library(rgdal)
plot.heat <- function(counties.map,state.map,z,title=NULL,breaks=NULL,reverse=FALSE,cex.legend=1,bw=.2,col.vec=NULL,plot.legend=TRUE) {
##Break down the value variable
if (is.null(breaks)) {
breaks=
seq(
floor(min(counties.map@data[,z],na.rm=TRUE)*10)/10
,... |
#' @name rownor
#' @title Row normalisation
#'
#' @description Row normalisation of a spatial weights matrix.
#'
#' @param W spatial weights matrix
#'
#' @return
#' \describe{\emph{W}} row normalised spatial weights matrix
#'
#' @author Rozeta Simonovska
#'
#' @seealso \code{\link{eignor}}
#'
#' @example... | /R/rownor.R | no_license | shizelong1985/SDPDmod | R | false | false | 686 | r | #' @name rownor
#' @title Row normalisation
#'
#' @description Row normalisation of a spatial weights matrix.
#'
#' @param W spatial weights matrix
#'
#' @return
#' \describe{\emph{W}} row normalised spatial weights matrix
#'
#' @author Rozeta Simonovska
#'
#' @seealso \code{\link{eignor}}
#'
#' @example... |
tar_test("run verbose reporter", {
pipeline <- pipeline_init(list(target_init("x", quote(0))))
for (index in seq_len(2L)) {
local <- algorithm_init("local", pipeline, reporter = "verbose")
expect_message(local$run())
}
})
tar_test("run verbose reporter with a error", {
pipeline <- pipeline_init(list(ta... | /tests/testthat/test-class_verbose.R | permissive | kendonB/targets | R | false | false | 566 | r | tar_test("run verbose reporter", {
pipeline <- pipeline_init(list(target_init("x", quote(0))))
for (index in seq_len(2L)) {
local <- algorithm_init("local", pipeline, reporter = "verbose")
expect_message(local$run())
}
})
tar_test("run verbose reporter with a error", {
pipeline <- pipeline_init(list(ta... |
# Instructions for use of these functions
# The "do.liftover()" function requires 3 dataframes with very specific names. Here "target" genome refers to genome to which chromosomal linkage is being assigned and "reference" is the genome for which linkage mapping has already assigned scaffolds & genes to chromosomes.
... | /analysis_scripts/liftover_bubble_functions.R | no_license | WaltersLab/Danaus_NeoZ-Public | R | false | false | 11,049 | r | # Instructions for use of these functions
# The "do.liftover()" function requires 3 dataframes with very specific names. Here "target" genome refers to genome to which chromosomal linkage is being assigned and "reference" is the genome for which linkage mapping has already assigned scaffolds & genes to chromosomes.
... |
data <- read.table("household_power_consumption.txt",header=TRUE,sep=";") ## read data
data[,'Date'] <- as.Date(data[,'Date'],"%d/%m/%Y")
useddates <- as.Date(c("01/02/2007","02/02/2007"),"%d/%m/%Y")
used <- data[data$Date %in% useddates,] ## choose needed dates
x <- paste(used$Date,used$Time)
timeline <- strptime(x... | /plot2.R | no_license | asialab/ExData_Plotting1 | R | false | false | 687 | r | data <- read.table("household_power_consumption.txt",header=TRUE,sep=";") ## read data
data[,'Date'] <- as.Date(data[,'Date'],"%d/%m/%Y")
useddates <- as.Date(c("01/02/2007","02/02/2007"),"%d/%m/%Y")
used <- data[data$Date %in% useddates,] ## choose needed dates
x <- paste(used$Date,used$Time)
timeline <- strptime(x... |
#Script to collect all the tweets from London in an hour and then save them to a file. Repeats a number of times based on how the loop is set.
library(streamR)
load("twitCred.Rdata")
for (i in 1:6){
filterStream(file="LondonAreaTweetsMay6th.json",language="en",location=c("-81.8344116211,42.5662301764, -80.5160522... | /Social Media/R/GetLondonTweets.R | no_license | PhiLabWestern/Data-Mining-Scripts | R | false | false | 463 | r | #Script to collect all the tweets from London in an hour and then save them to a file. Repeats a number of times based on how the loop is set.
library(streamR)
load("twitCred.Rdata")
for (i in 1:6){
filterStream(file="LondonAreaTweetsMay6th.json",language="en",location=c("-81.8344116211,42.5662301764, -80.5160522... |
#
# Calculate and show trends in the share of earnings earned by earners throughout the distribution
#
library(shiny)
library(htmltab)
library(tidyverse)
library(stringr)
library(forcats)
# scrape SSA data
ssa_wage_data <- seq(1990, 2016, 1) %>%
map(~ htmltab::htmltab(doc = paste0("https://www.ssa.gov/cgi-bin/netco... | /earnings-shares/app.R | no_license | nalsalam/shiny-apps | R | false | false | 3,791 | r | #
# Calculate and show trends in the share of earnings earned by earners throughout the distribution
#
library(shiny)
library(htmltab)
library(tidyverse)
library(stringr)
library(forcats)
# scrape SSA data
ssa_wage_data <- seq(1990, 2016, 1) %>%
map(~ htmltab::htmltab(doc = paste0("https://www.ssa.gov/cgi-bin/netco... |
.libPaths('../lib')
library(qapply)
library(parallel)
library(lmmlasso)
library(lmmen)
system.time(out<-mclapply(sim.data[201:210],cv.lmmlasso,startValue=2,mc.cores = detectCores()-1))
system.time(p<-qapply(X = sim.data[401:600],
FUN = cv.lmmlasso,fargs = list(startValue=0),
... | /other_functions/new_sims.R | no_license | yonicd/lmmen | R | false | false | 6,101 | r | .libPaths('../lib')
library(qapply)
library(parallel)
library(lmmlasso)
library(lmmen)
system.time(out<-mclapply(sim.data[201:210],cv.lmmlasso,startValue=2,mc.cores = detectCores()-1))
system.time(p<-qapply(X = sim.data[401:600],
FUN = cv.lmmlasso,fargs = list(startValue=0),
... |
#Code by Caitlin Diddams for "Textual Analysis with R For Humanists," SUNY Buffalo April 18 2014
# Operations
#Expressions
# from command line
1+1
"hello world"
(10*5)/2
# Logical values (Boolean)
5<6
x=10
5+5==10
# Objects
x<-42
x/2
x<-"hello world"
help(sum)
?help
sum(1,2,3)
#Vectors
c(1,2,3)
... | /lesson plan.R | no_license | trinker/spinDemo | R | false | false | 1,447 | r | #Code by Caitlin Diddams for "Textual Analysis with R For Humanists," SUNY Buffalo April 18 2014
# Operations
#Expressions
# from command line
1+1
"hello world"
(10*5)/2
# Logical values (Boolean)
5<6
x=10
5+5==10
# Objects
x<-42
x/2
x<-"hello world"
help(sum)
?help
sum(1,2,3)
#Vectors
c(1,2,3)
... |
# Clear workspace
rm(list = ls())
# Setup
################################################################################
# Packages
library(maps)
library(mapdata)
library(rgdal)
library(plyr)
library(dplyr)
library(freeR)
library(reshape2)
library(RColorBrewer)
library(fields) # colorbar.plot()
# Directories
data... | /code/figures/Fig6_theta_msy_hindcast_map.R | no_license | cfree14/sst_productivity | R | false | false | 10,975 | r |
# Clear workspace
rm(list = ls())
# Setup
################################################################################
# Packages
library(maps)
library(mapdata)
library(rgdal)
library(plyr)
library(dplyr)
library(freeR)
library(reshape2)
library(RColorBrewer)
library(fields) # colorbar.plot()
# Directories
data... |
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
library(ggplot2)
# Compare emissions from motor vehicle sources in Baltimore City with emissions from motor
# vehicle sources in Los Angeles County, California (fips == "06037").
# Which city has seen greater changes over time i... | /plot6.R | no_license | GokhanArpakci/coursera-exploratory-data-analysis-course-project-2 | R | false | false | 1,330 | r | NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
library(ggplot2)
# Compare emissions from motor vehicle sources in Baltimore City with emissions from motor
# vehicle sources in Los Angeles County, California (fips == "06037").
# Which city has seen greater changes over time i... |
############################
## Define I/O and options ##
############################
library(data.table)
library(purrr)
io <- list()
io$acc_dnaseq <- "/Users/ricard/data/encode/DNAse-seq/parsed/encode_DNAseq.tsv.gz"
io$acc_scnmt <- "/Users/ricard/data/NMT-seq_EB/acc/parsed/acc_data.tsv.gz"
###############
## Load ... | /serum_cells/bulk_comparison/acc/comparison_scNMT.R | no_license | chrmaniatis/scNMT-seq | R | false | false | 1,922 | r | ############################
## Define I/O and options ##
############################
library(data.table)
library(purrr)
io <- list()
io$acc_dnaseq <- "/Users/ricard/data/encode/DNAse-seq/parsed/encode_DNAseq.tsv.gz"
io$acc_scnmt <- "/Users/ricard/data/NMT-seq_EB/acc/parsed/acc_data.tsv.gz"
###############
## Load ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/frcc.R
\name{frcc}
\alias{frcc}
\title{This function implements the Fast Regularized Canonical Correlation Analysis}
\usage{
frcc(X, Y)
}
\arguments{
\item{X}{numeric matrix (n by p) which contains the observations on the X variables.}
\item... | /man/frcc.Rd | no_license | cran/FRCC | R | false | true | 3,025 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/frcc.R
\name{frcc}
\alias{frcc}
\title{This function implements the Fast Regularized Canonical Correlation Analysis}
\usage{
frcc(X, Y)
}
\arguments{
\item{X}{numeric matrix (n by p) which contains the observations on the X variables.}
\item... |
#this code processes raw deer migration data by herd file
#first sampling individuals and than
#using Visvalingam’s algorithm for line simplification and resampling of specific
#individuals at 4 km points
#the first part is based off Ellen Aiken's R script
#'ManuallyIdMigration_WithAppendixFig
#load packages
library(... | /process_migration_data_lander.R | no_license | bermane/climate-pheno-wy | R | false | false | 23,013 | r | #this code processes raw deer migration data by herd file
#first sampling individuals and than
#using Visvalingam’s algorithm for line simplification and resampling of specific
#individuals at 4 km points
#the first part is based off Ellen Aiken's R script
#'ManuallyIdMigration_WithAppendixFig
#load packages
library(... |
## 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
## (there are also alternatives to matrix inversion that we will not discuss here).
## Your assignment is to write a pair of functions that cache the inverse of a ... | /cachematrix.R | no_license | yimeixiang/ProgrammingAssignment2 | R | false | false | 1,273 | r | ## 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
## (there are also alternatives to matrix inversion that we will not discuss here).
## Your assignment is to write a pair of functions that cache the inverse of a ... |
library(reshape2)
library(reshape)
smiths <- data.frame(
subject = c("John Smith","Mary Smith"),
time = c(1 ,1 ),
age = c(33, 2),
weight = c(90, NA),
height = c(2,NA)
)
str(smiths)
melt(smiths, id=c("subject","time"), measured=c("age","weight","height"))
melt(smiths, id=c("subject","... | /scripts/Reshaping_data_with_the_reshape_package.r | no_license | mar71n/cursoR | R | false | false | 1,047 | r | library(reshape2)
library(reshape)
smiths <- data.frame(
subject = c("John Smith","Mary Smith"),
time = c(1 ,1 ),
age = c(33, 2),
weight = c(90, NA),
height = c(2,NA)
)
str(smiths)
melt(smiths, id=c("subject","time"), measured=c("age","weight","height"))
melt(smiths, id=c("subject","... |
## Usage:
## 1) create the functions to cache matrix and inverse matrix:
## <cache functions vector> <- makeCacheMatrix(<your matrix>)
##
## 2) calculate the matrix inverse and store it in cache or retrieve it from cache, and return it:
## call function cacheSolve(<cache functions vector>)
## Creates a vec... | /cachematrix.R | no_license | ManelNavarro/ProgrammingAssignment2 | R | false | false | 1,226 | r | ## Usage:
## 1) create the functions to cache matrix and inverse matrix:
## <cache functions vector> <- makeCacheMatrix(<your matrix>)
##
## 2) calculate the matrix inverse and store it in cache or retrieve it from cache, and return it:
## call function cacheSolve(<cache functions vector>)
## Creates a vec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tcx_loading.R
\name{load_tcx_file}
\alias{load_tcx_file}
\title{Process a single tcx file}
\usage{
load_tcx_file(filename)
}
\arguments{
\item{filename}{A filepath to a tcx file (.tcx)}
}
\value{
The energies dataframe from the file at \code{... | /man/load_tcx_file.Rd | permissive | VCCRI/CardiacProfileR | R | false | true | 1,568 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tcx_loading.R
\name{load_tcx_file}
\alias{load_tcx_file}
\title{Process a single tcx file}
\usage{
load_tcx_file(filename)
}
\arguments{
\item{filename}{A filepath to a tcx file (.tcx)}
}
\value{
The energies dataframe from the file at \code{... |
\name{plot.rf}
\alias{plot.rf}
\title{Plot recombination fractions}
\description{
Plot a grid showing the recombination fractions for all pairs of
markers, and/or the LOD scores for tests of linkage between pairs of
markers.
}
\usage{
plot.rf(x, chr, what=c("both","lod","rf"), alternate.chrid=FALSE,
z... | /man/plot.rf.Rd | no_license | pjotrp/rqtl | R | false | false | 2,702 | rd | \name{plot.rf}
\alias{plot.rf}
\title{Plot recombination fractions}
\description{
Plot a grid showing the recombination fractions for all pairs of
markers, and/or the LOD scores for tests of linkage between pairs of
markers.
}
\usage{
plot.rf(x, chr, what=c("both","lod","rf"), alternate.chrid=FALSE,
z... |
############################################################################
## File Name: user_options.R
## File Purpose: Specify inputs for run_file.R
## Author: Jeanette Birnbaum
## Date: 10/14/2014
## Edited on:
## Additional Comments:
############################################################################... | /examples/breast_ER-HER2_6SensitivityExp2/input/user_options.R | no_license | netterie/screentreat | R | false | false | 5,205 | r | ############################################################################
## File Name: user_options.R
## File Purpose: Specify inputs for run_file.R
## Author: Jeanette Birnbaum
## Date: 10/14/2014
## Edited on:
## Additional Comments:
############################################################################... |
#' Conduct high-dimensional longitudinal principal component analysis
#'
#'
#' For V-by-J dimensional matrix of Y, HDLPCA first reduce the dimension of p to J if V>J:
#' `Y = UDV`. Then, longitudinal PCA is applied to the projected scores of Y on the p-dimensional subspace: Y1=DY.
#' The dimension of the subspace is se... | /R/hd_lfpca.R | no_license | seonjoo/HDLFPCA | R | false | false | 12,822 | r | #' Conduct high-dimensional longitudinal principal component analysis
#'
#'
#' For V-by-J dimensional matrix of Y, HDLPCA first reduce the dimension of p to J if V>J:
#' `Y = UDV`. Then, longitudinal PCA is applied to the projected scores of Y on the p-dimensional subspace: Y1=DY.
#' The dimension of the subspace is se... |
source( "masternegloglikeeps1.R" )
source("eudicottree.R" )
library( "expm" )
source( "Qmatrixwoodherb2.R" )
source("Pruning2.R")
bichrom.dataset<-read.table( "eudicotvals.txt",header=FALSE,sep=",",stringsAsFactors=FALSE)
last.state=50
uniform.samples<-read.csv("sample353.csv",header=FALSE)
a<- as.numeric(t(uniform.... | /Full model optimizations/explorelikeuni353.R | no_license | roszenil/Bichromdryad | R | false | false | 745 | r | source( "masternegloglikeeps1.R" )
source("eudicottree.R" )
library( "expm" )
source( "Qmatrixwoodherb2.R" )
source("Pruning2.R")
bichrom.dataset<-read.table( "eudicotvals.txt",header=FALSE,sep=",",stringsAsFactors=FALSE)
last.state=50
uniform.samples<-read.csv("sample353.csv",header=FALSE)
a<- as.numeric(t(uniform.... |
# Exploratory analysis of joined BBS and LAGOS datasets
# For now, use the by-route data since the by-stop data takes forever to work with.
load('/mnt/research/aquaxterra/DATA/raw_data/BBS/BBS_LAGOS_byroute_join.r')
load('/mnt/research/aquaxterra/DATA/raw_data/BBS/BBS_LAGOS_bystop_join.r')
# Ridiculous fishing exped... | /code/exploratory/lagos_bbs_fishing.r | no_license | qdread/aquaxterra | R | false | false | 6,571 | r | # Exploratory analysis of joined BBS and LAGOS datasets
# For now, use the by-route data since the by-stop data takes forever to work with.
load('/mnt/research/aquaxterra/DATA/raw_data/BBS/BBS_LAGOS_byroute_join.r')
load('/mnt/research/aquaxterra/DATA/raw_data/BBS/BBS_LAGOS_bystop_join.r')
# Ridiculous fishing exped... |
countries1 <- c("United.Kingdom", "Italy","France","Germany", "Spain", "United.States")
countries2 <- c("Italy","France","Germany", "Spain", "United.Kingdom", "United.States")
# David (Italy and UK deaths)
covid.deaths <-
read.csv("UK-italy-covid-deaths.csv") # read data into dataframe
data <- read.csv("https://c... | /winton-covid/david_preamble.R | no_license | gmp26/covid-plots | R | false | false | 4,010 | r |
countries1 <- c("United.Kingdom", "Italy","France","Germany", "Spain", "United.States")
countries2 <- c("Italy","France","Germany", "Spain", "United.Kingdom", "United.States")
# David (Italy and UK deaths)
covid.deaths <-
read.csv("UK-italy-covid-deaths.csv") # read data into dataframe
data <- read.csv("https://c... |
# install.packages("caTools") #
library("caTools") # for write.gif
# install.packages("grid") #
library(grid) # for grid.raster to plot RGB
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
Sys.setlocale("LC_CTYPE", "russian")
source("../png.R")
g_bin.path <- "C:/Program Files"
g_cex.main <- 4... | /Lection/11/lection11.R | no_license | tkachenia/multimedia_course | R | false | false | 48,931 | r | # install.packages("caTools") #
library("caTools") # for write.gif
# install.packages("grid") #
library(grid) # for grid.raster to plot RGB
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
Sys.setlocale("LC_CTYPE", "russian")
source("../png.R")
g_bin.path <- "C:/Program Files"
g_cex.main <- 4... |
## reference: https://www.cell.com/cell-stem-cell/pdf/S1934-5909(19)30166-3.pdf
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
source("./ccRCC... | /snatac/da_peaks/bap1/plotting/volcano/volcano_BAP1_vs_nonmutant_daps.R | no_license | GenomicsNX/ccRCC_snRNA_analysis | R | false | false | 9,221 | r | ## reference: https://www.cell.com/cell-stem-cell/pdf/S1934-5909(19)30166-3.pdf
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
source("./ccRCC... |
######################################################################
# Copyright (c) 2016 Northrop Grumman.
# All rights reserved.
######################################################################
# ImmPort FCS conversion program
# Authors: Yue Liu and Yu "Max" Qian
#
# ... | /flowtools/fcs_gate_trans/FCSGateTrans.R | no_license | cristhomas/immport-galaxy-tools | R | false | false | 14,982 | r | ######################################################################
# Copyright (c) 2016 Northrop Grumman.
# All rights reserved.
######################################################################
# ImmPort FCS conversion program
# Authors: Yue Liu and Yu "Max" Qian
#
# ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cache-helpers.R
\name{.prepareFileBackedRaster}
\alias{.prepareFileBackedRaster}
\title{Copy the file-backing of a file-backed Raster* object}
\usage{
.prepareFileBackedRaster(obj, repoDir = NULL, overwrite = FALSE, ...)
}
\arguments{
\item{o... | /man/prepareFileBackedRaster.Rd | no_license | RafaMariano/reproducible | R | false | true | 1,595 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cache-helpers.R
\name{.prepareFileBackedRaster}
\alias{.prepareFileBackedRaster}
\title{Copy the file-backing of a file-backed Raster* object}
\usage{
.prepareFileBackedRaster(obj, repoDir = NULL, overwrite = FALSE, ...)
}
\arguments{
\item{o... |
#' Create a new streamgraph
#'
#' \code{streamgraph()} initializes the streamgraph html widget
#' and takes a data frame in "long" format with columns for the
#' category (by default, it looks for \code{key}) and its associated
#' \code{date} and \code{value}. You can supply the names for those
#' columns if they aren... | /R/streamgraph.R | no_license | erichilarysmithsr/streamgraph | R | false | false | 16,771 | r | #' Create a new streamgraph
#'
#' \code{streamgraph()} initializes the streamgraph html widget
#' and takes a data frame in "long" format with columns for the
#' category (by default, it looks for \code{key}) and its associated
#' \code{date} and \code{value}. You can supply the names for those
#' columns if they aren... |
epc_data <- read.delim("./data/exdata_data_household_power_consumption/household_power_consumption.txt", header = TRUE, sep = ";");
epc_data$Date <- as.Date(epc_data$Date, "%d/%m/%Y")
epc_data$Global_active_power <- as.numeric(levels(epc_data$Global_active_power))[epc_data$Global_active_power]
png(filename = "Plot1.p... | /plot1.R | no_license | acr99/ExData_Plotting1 | R | false | false | 660 | r | epc_data <- read.delim("./data/exdata_data_household_power_consumption/household_power_consumption.txt", header = TRUE, sep = ";");
epc_data$Date <- as.Date(epc_data$Date, "%d/%m/%Y")
epc_data$Global_active_power <- as.numeric(levels(epc_data$Global_active_power))[epc_data$Global_active_power]
png(filename = "Plot1.p... |
function(input, output){
#===SALES===
#Line Plot
output$plotsales <- renderPlotly({
datasales <- datasales %>%
filter(Date >= input$idsales1[1],
Date <= input$idsales1[2])
plotsales <- ggplot(datasales, aes(x = Date, y = Total, color = City)) +
... | /server.R | no_license | gashasp/Visualization-Shiny-with-Supermarket-Data | R | false | false | 7,174 | r | function(input, output){
#===SALES===
#Line Plot
output$plotsales <- renderPlotly({
datasales <- datasales %>%
filter(Date >= input$idsales1[1],
Date <= input$idsales1[2])
plotsales <- ggplot(datasales, aes(x = Date, y = Total, color = City)) +
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_dot.R
\name{dot_graph}
\alias{dot_graph}
\alias{dot_graph.cfa_model}
\alias{dot_graph.cbsem_model}
\alias{dot_graph.measurement_model}
\alias{dot_graph.structural_model}
\alias{dot_graph.specified_model}
\alias{dot_graph.boot_seminr_mode... | /man/dot_graph.Rd | no_license | sem-in-r/seminr | R | false | true | 4,909 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_dot.R
\name{dot_graph}
\alias{dot_graph}
\alias{dot_graph.cfa_model}
\alias{dot_graph.cbsem_model}
\alias{dot_graph.measurement_model}
\alias{dot_graph.structural_model}
\alias{dot_graph.specified_model}
\alias{dot_graph.boot_seminr_mode... |
# Run multiple caret models in parallel using lapply
# https://github.com/tobigithub/caret-machine-learning
# Tobias Kind (2015)
# -------------------------------------------------------------------------
# FIRST sequential code (not parallel one CPU core):
# -----------------------------------------------------------... | /caret-parallel/caret-parallel-train.R | permissive | linliliaabbcc1024/caret-machine-learning | R | false | false | 896 | r | # Run multiple caret models in parallel using lapply
# https://github.com/tobigithub/caret-machine-learning
# Tobias Kind (2015)
# -------------------------------------------------------------------------
# FIRST sequential code (not parallel one CPU core):
# -----------------------------------------------------------... |
#!/share/nas2/genome/biosoft/R/3.1.1/lib64/R/bin/Rscript
#************************section 1 usage and some init function***********************************************
usage=function(){
cat("
Descript:
Email: wangmin@biomarker.com.cn
Options:
infile: character ... | /ref_trans/bin/DEG_Analysis/DEU/bin/DEU_DEXSeq.R | no_license | zm-git-dev/research_pipline | R | false | false | 5,851 | r | #!/share/nas2/genome/biosoft/R/3.1.1/lib64/R/bin/Rscript
#************************section 1 usage and some init function***********************************************
usage=function(){
cat("
Descript:
Email: wangmin@biomarker.com.cn
Options:
infile: character ... |
# nolint start
context("nlm_distancegradient")
test_that("nlm_distancegradient behaves like it should", {
suppressWarnings(distance_gradient <- nlm_distancegradient(ncol = 9,
nrow = 12,
origin = c(5, 5, 5, 5)))
expect_that(dist... | /tests/testthat/test_distancegradient.R | no_license | BorjaZ/NLMR | R | false | false | 1,319 | r | # nolint start
context("nlm_distancegradient")
test_that("nlm_distancegradient behaves like it should", {
suppressWarnings(distance_gradient <- nlm_distancegradient(ncol = 9,
nrow = 12,
origin = c(5, 5, 5, 5)))
expect_that(dist... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClasses.R
\docType{class}
\name{Zresults}
\alias{Zresults}
\alias{Zresults-class}
\title{The Zresults class}
\description{
\code{Zresults} class represents a full set of Zonation results associated
with a single variant (instance of class
... | /man/Zresults-class.Rd | no_license | cbig/zonator | R | false | true | 1,330 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClasses.R
\docType{class}
\name{Zresults}
\alias{Zresults}
\alias{Zresults-class}
\title{The Zresults class}
\description{
\code{Zresults} class represents a full set of Zonation results associated
with a single variant (instance of class
... |
# Q1 a) -----------------------------------------------------------
load("snps.RData")
load("mat.gtex.RData")
load("gwas.als.RData")
# Quality control checks
expression.df <- as.data.frame(mat.gtex)
class(snps)
class(mat.gtex)
nSNPs <- ncol(snps)
nSNPs
samples.GenoData <- rownames(snps)
samples.ExprData <- row... | /Drafts/Assignment 1 Draft 2.R | no_license | RichardBekoe/Advanced-Computational-Biology-Assignment-1 | R | false | false | 19,691 | r |
# Q1 a) -----------------------------------------------------------
load("snps.RData")
load("mat.gtex.RData")
load("gwas.als.RData")
# Quality control checks
expression.df <- as.data.frame(mat.gtex)
class(snps)
class(mat.gtex)
nSNPs <- ncol(snps)
nSNPs
samples.GenoData <- rownames(snps)
samples.ExprData <- row... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/redshift_operations.R
\name{redshift_modify_custom_domain_association}
\alias{redshift_modify_custom_domain_association}
\title{Contains information for changing a custom domain association}
\usage{
redshift_modify_custom_domain_association(
... | /cran/paws.database/man/redshift_modify_custom_domain_association.Rd | permissive | paws-r/paws | R | false | true | 952 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/redshift_operations.R
\name{redshift_modify_custom_domain_association}
\alias{redshift_modify_custom_domain_association}
\title{Contains information for changing a custom domain association}
\usage{
redshift_modify_custom_domain_association(
... |
library(rjson)
pref47_ja <- fromJSON(file="data/jisx0401-ja.json")
pid <- 1:47
names(pid) <- unlist(pref47_ja)
pref47 <- fromJSON(file="data/jisx0401-en.json")
fidtable <- read.table("data/fid.txt")
pref47.tested <- matrix(0,nrow=0,ncol=50)
pref47.infected <- matrix(0,nrow=0,ncol=50)
pref47.recovered <- matrix(0,nr... | /prefecture.R | no_license | naono-git/covid19 | R | false | false | 3,084 | r | library(rjson)
pref47_ja <- fromJSON(file="data/jisx0401-ja.json")
pid <- 1:47
names(pid) <- unlist(pref47_ja)
pref47 <- fromJSON(file="data/jisx0401-en.json")
fidtable <- read.table("data/fid.txt")
pref47.tested <- matrix(0,nrow=0,ncol=50)
pref47.infected <- matrix(0,nrow=0,ncol=50)
pref47.recovered <- matrix(0,nr... |
fnFolder <- "~/Projects/VRC332/Code/fh-vrc332/Functions"
source(file.path(fnFolder, "ConvertToLongData.r"))
AggregateData <- function(fcData, predSummary) {
longData <- ConvertToLongData(fcData, predSummary)
aggAgData <- longData %>%
mutate(tp=paste("tp", tp, sep="")) %>%
unite(aggName, tp, a... | /Functions/AggregateData.r | no_license | wmchad/fh-VRC332 | R | false | false | 1,152 | r | fnFolder <- "~/Projects/VRC332/Code/fh-vrc332/Functions"
source(file.path(fnFolder, "ConvertToLongData.r"))
AggregateData <- function(fcData, predSummary) {
longData <- ConvertToLongData(fcData, predSummary)
aggAgData <- longData %>%
mutate(tp=paste("tp", tp, sep="")) %>%
unite(aggName, tp, a... |
library(deSolve)
LotVmod <- function (Time, State, Pars) {
with(as.list(c(State, Pars)), {
dx = x*(alpha - beta*y)
dy = -y*(gamma - delta*x)
return(list(c(dx, dy)))
})
}
LV_rhs <- function(r,K,alpha,X) #RHS of discrete-time approximation of L-V equations
# X: current (at time t) populations of all ... | /L-V_eqs_deSolve.R | no_license | youph/Lotka-Volterra_censored | R | false | false | 1,094 | r | library(deSolve)
LotVmod <- function (Time, State, Pars) {
with(as.list(c(State, Pars)), {
dx = x*(alpha - beta*y)
dy = -y*(gamma - delta*x)
return(list(c(dx, dy)))
})
}
LV_rhs <- function(r,K,alpha,X) #RHS of discrete-time approximation of L-V equations
# X: current (at time t) populations of all ... |
#### Remove out-of-boundary years
data_till_Jan <- data_till_Jan %>% filter(!(year == 1949 & month == 1))
data_till_Feb <- data_till_Feb %>% filter(!(year == 1949 & month == 1))
data_till_Feb <- data_till_Feb %>% filter(!(year == 1949 & month == 2))
#
# remove the turning point from historical to RCP stuff
#
data_til... | /chilling/03_frost_bloom_aeolus/d_correct_dayofyear.R | permissive | aacharyakaushik/Ag | R | false | false | 1,345 | r |
#### Remove out-of-boundary years
data_till_Jan <- data_till_Jan %>% filter(!(year == 1949 & month == 1))
data_till_Feb <- data_till_Feb %>% filter(!(year == 1949 & month == 1))
data_till_Feb <- data_till_Feb %>% filter(!(year == 1949 & month == 2))
#
# remove the turning point from historical to RCP stuff
#
data_til... |
#Store current working directory
projdir <- getwd()
projdir
#Change working directory to covid-19-data folder
setwd("./covid-19-data/")
US <- read.csv("us.csv")
setwd(projdir)
| /Read Data.R | no_license | hannahkaufmannn/COVID-19_Project | R | false | false | 177 | r | #Store current working directory
projdir <- getwd()
projdir
#Change working directory to covid-19-data folder
setwd("./covid-19-data/")
US <- read.csv("us.csv")
setwd(projdir)
|
library(pestim)
profvis({
alphas <- c(1, 5, 10, 100, 1000)
mode <- 35
df <- lapply(alphas, function(alpha){
x <- 0:100
y <- dgamma(x, shape = alpha + 1, scale = mode / alpha)
z <- as.character(alpha)
output <- data.frame(x = x, y = y, alpha = z)
return(output)
})
df <- Reduce(rbind, df)
ggplot(df, aes(x, y,... | /test2.R | no_license | bogdanoancea/pop_test | R | false | false | 451 | r | library(pestim)
profvis({
alphas <- c(1, 5, 10, 100, 1000)
mode <- 35
df <- lapply(alphas, function(alpha){
x <- 0:100
y <- dgamma(x, shape = alpha + 1, scale = mode / alpha)
z <- as.character(alpha)
output <- data.frame(x = x, y = y, alpha = z)
return(output)
})
df <- Reduce(rbind, df)
ggplot(df, aes(x, y,... |
library("testthat")
source("marketm.R")
#dissaggregate by governorate, if sell petrol, average price. sell desil, average price | do with urban rural too
#fuction will take DISAG, and the dataset as arguments
test_that("test that data types are correct", {
marketDATA<-dataFILE
expect_that(marketDATA, is_a("dat... | /test_marketm.R | no_license | nara907/gwsT | R | false | false | 561 | r | library("testthat")
source("marketm.R")
#dissaggregate by governorate, if sell petrol, average price. sell desil, average price | do with urban rural too
#fuction will take DISAG, and the dataset as arguments
test_that("test that data types are correct", {
marketDATA<-dataFILE
expect_that(marketDATA, is_a("dat... |
chooseCRANmirror(ind = 81)
# Needed <- c('tm', 'SnowballCC', 'RColorBrewer', 'ggplot2', 'wordcloud',
# 'biclust', 'cluster', 'igraph', 'fpc') install.packages(Needed, dependencies =
# TRUE) install.packages('Rcampdf', repos = 'http://datacube.wu.ac.at/', type =
# 'source') install.packages('pdftools')
library(pdftools)... | /process.R | no_license | codefornl/raadsinformatie | R | false | false | 830 | r | chooseCRANmirror(ind = 81)
# Needed <- c('tm', 'SnowballCC', 'RColorBrewer', 'ggplot2', 'wordcloud',
# 'biclust', 'cluster', 'igraph', 'fpc') install.packages(Needed, dependencies =
# TRUE) install.packages('Rcampdf', repos = 'http://datacube.wu.ac.at/', type =
# 'source') install.packages('pdftools')
library(pdftools)... |
#' @description
#' Function that reads a directory full of files and reports the number of
#' completely observed cases in each data file.
#'
#' @param directory Character vector of length 1 indicating the location of CSV files
#' @param id Integer vector indicating the monitor ID numbers to be used
#'
#' @r... | /coursera/dscjhu/R/week2/complete.R | no_license | nssubramanya/courses | R | false | false | 1,103 | r | #' @description
#' Function that reads a directory full of files and reports the number of
#' completely observed cases in each data file.
#'
#' @param directory Character vector of length 1 indicating the location of CSV files
#' @param id Integer vector indicating the monitor ID numbers to be used
#'
#' @r... |
plot1<-function(){
skip<-66637
finish<-69517
names<-scan("household_power_consumption.txt",nlines=1,what="character",sep=";")
Data<-read.table("household_power_consumption.txt",header=F,sep=";",col.names=names,na.strings="?",nrows=finish-skip,skip=skip)
Data[["Date"]]<-as.Date(Data[["Date"]],"%d/%m/%Y")
datetime<-strpt... | /plot1.R | no_license | N17051983/ExData_Plotting1 | R | false | false | 529 | r | plot1<-function(){
skip<-66637
finish<-69517
names<-scan("household_power_consumption.txt",nlines=1,what="character",sep=";")
Data<-read.table("household_power_consumption.txt",header=F,sep=";",col.names=names,na.strings="?",nrows=finish-skip,skip=skip)
Data[["Date"]]<-as.Date(Data[["Date"]],"%d/%m/%Y")
datetime<-strpt... |
library(sf)
library(fs)
library(magrittr)
library(leaflet)
x = st_read("tha.kmz/tha_adm1/doc.kml") | /spatial/read-kml.R | no_license | piyayut-ch/tutorial | R | false | false | 99 | r | library(sf)
library(fs)
library(magrittr)
library(leaflet)
x = st_read("tha.kmz/tha_adm1/doc.kml") |
shinyServer(function(input, output) {
output$reference <- renderUI({
tabsetPanel(
tabPanel(
"Reference",
h3("Reference Content"))
)
})
output$comparison <- renderUI({
req(input$slider)
myTabs <- lapply(1:input$sli... | /shinyapp-in-docker/example-app/server.R | permissive | STATWORX/blog | R | false | false | 515 | r | shinyServer(function(input, output) {
output$reference <- renderUI({
tabsetPanel(
tabPanel(
"Reference",
h3("Reference Content"))
)
})
output$comparison <- renderUI({
req(input$slider)
myTabs <- lapply(1:input$sli... |
# Create a simple stochastic SIR model with constant population size
# and parameters on the exponential scale
#
# This is based on the determinstic SIR model, contained in
# example-sir-deter.r
sirExpName <- paste0(
"SIR with constant population size, parameters transformed to the ",
"exponential scale"
)
sirExp... | /scripts/models/example-SIR-exp-deter.r | permissive | sbfnk/mfiidd | R | false | false | 1,657 | r | # Create a simple stochastic SIR model with constant population size
# and parameters on the exponential scale
#
# This is based on the determinstic SIR model, contained in
# example-sir-deter.r
sirExpName <- paste0(
"SIR with constant population size, parameters transformed to the ",
"exponential scale"
)
sirExp... |
message("This material has been included in MTurkR since v0.3.5")
assignment <-
assignments <-
GetAssignment <-
GetAssignments <-
function (assignment = NULL, hit = NULL, hit.type = NULL, status = NULL,
return.all = FALSE, pagenumber = "1", pagesize = "10", sortproperty = "SubmitTime",
sortdirection = "Ascen... | /code/r/GetAssignment.R | permissive | giancarlovisconti/leeper.github.io | R | false | false | 8,291 | r | message("This material has been included in MTurkR since v0.3.5")
assignment <-
assignments <-
GetAssignment <-
GetAssignments <-
function (assignment = NULL, hit = NULL, hit.type = NULL, status = NULL,
return.all = FALSE, pagenumber = "1", pagesize = "10", sortproperty = "SubmitTime",
sortdirection = "Ascen... |
gitpath = "/Users/sjifradeleeuw/GitHub/"
basedir = paste0(gitpath, "Replication-Code-Explaining-Citizen-Attitudes-to-Strategies-of-Democratic-Defense/")
# Data directories
datadir = paste0(basedir, "Data/")
# Output directories
figdir = paste0(basedir, "Output/Figures/")
tabdir = paste0(basedir, "Output/Tables/")
... | /Code/source_file.R | no_license | Whitneyisland/Replication-Code-Explaining-Citizen-Attitudes-to-Strategies-of-Democratic-Defense | R | false | false | 512 | r |
gitpath = "/Users/sjifradeleeuw/GitHub/"
basedir = paste0(gitpath, "Replication-Code-Explaining-Citizen-Attitudes-to-Strategies-of-Democratic-Defense/")
# Data directories
datadir = paste0(basedir, "Data/")
# Output directories
figdir = paste0(basedir, "Output/Figures/")
tabdir = paste0(basedir, "Output/Tables/")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{delta.optim.scqe}
\alias{delta.optim.scqe}
\title{Delta optimization method for \code{scqe} 1 cohort, summary statistics}
\usage{
delta.optim.scqe(
Y_T0,
untreated,
Y_untreated,
treated,
Y_treated,
obj,
specifi... | /man/delta.optim.scqe.Rd | permissive | jbdatascience/scqe | R | false | true | 905 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{delta.optim.scqe}
\alias{delta.optim.scqe}
\title{Delta optimization method for \code{scqe} 1 cohort, summary statistics}
\usage{
delta.optim.scqe(
Y_T0,
untreated,
Y_untreated,
treated,
Y_treated,
obj,
specifi... |
\name{ptw-package}
\alias{ptw-package}
\docType{package}
\title{
\packageTitle{ptw}
}
\description{
\packageDescription{ptw}
}
\details{
The DESCRIPTION file:
\packageDESCRIPTION{ptw}
}
\author{
\packageAuthor{ptw}
Maintainer: \packageMaintainer{ptw}
}
\references{
@Article{Bloemberg2010,
title = {Improved Parametri... | /Rscript/R/ptw/man/ptw-package.Rd | permissive | xieguigang/mzkit | R | false | false | 1,020 | rd | \name{ptw-package}
\alias{ptw-package}
\docType{package}
\title{
\packageTitle{ptw}
}
\description{
\packageDescription{ptw}
}
\details{
The DESCRIPTION file:
\packageDESCRIPTION{ptw}
}
\author{
\packageAuthor{ptw}
Maintainer: \packageMaintainer{ptw}
}
\references{
@Article{Bloemberg2010,
title = {Improved Parametri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization-functions.R
\name{correlate_and_plot}
\alias{correlate_and_plot}
\title{Calculate correlation between covariates and principal components (PCs)}
\usage{
correlate_and_plot(
principal_components,
clean_metadata,
correlation... | /man/correlate_and_plot.Rd | permissive | tmonjo/sageseqr | R | false | true | 1,723 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualization-functions.R
\name{correlate_and_plot}
\alias{correlate_and_plot}
\title{Calculate correlation between covariates and principal components (PCs)}
\usage{
correlate_and_plot(
principal_components,
clean_metadata,
correlation... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{nyc_taxi}
\alias{nyc_taxi}
\title{New York Taxis}
\format{An object of class \code{"data.frame"}.}
\source{
\href{https://github.com/numenta/nupic}{Nupic}
}
\usage{
data(nyc_taxi)
}
\description{
New York Taxis... | /man/nyc_taxi.Rd | no_license | javierluraschi/nupic | R | false | true | 389 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{nyc_taxi}
\alias{nyc_taxi}
\title{New York Taxis}
\format{An object of class \code{"data.frame"}.}
\source{
\href{https://github.com/numenta/nupic}{Nupic}
}
\usage{
data(nyc_taxi)
}
\description{
New York Taxis... |
#' Create and export headings
#'
#' @param hdg A heading in degrees, where 0 is north,
#' 90 is east, 180 is south, and 270 is west. Values
#' outside the range [0-360) are coerced to this range
#' using [hdg_norm()].
#' @param uv,u,v A data.frame with columns `u` (magnitude east)
#' and `v` (magnitude north).... | /R/heading.R | permissive | paleolimbot/headings | R | false | false | 6,988 | r |
#' Create and export headings
#'
#' @param hdg A heading in degrees, where 0 is north,
#' 90 is east, 180 is south, and 270 is west. Values
#' outside the range [0-360) are coerced to this range
#' using [hdg_norm()].
#' @param uv,u,v A data.frame with columns `u` (magnitude east)
#' and `v` (magnitude north).... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subt.R
\name{subt}
\alias{subt}
\title{[+] Add bold title and subtitle to a plot}
\usage{
subt(Title = NULL, subTitle = NULL)
}
\arguments{
\item{Title}{The first line of title, which will be in bold.}
\item{subTitle}{The second line of titl... | /man/subt.Rd | no_license | Ignnn/spHelper | R | false | true | 2,295 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subt.R
\name{subt}
\alias{subt}
\title{[+] Add bold title and subtitle to a plot}
\usage{
subt(Title = NULL, subTitle = NULL)
}
\arguments{
\item{Title}{The first line of title, which will be in bold.}
\item{subTitle}{The second line of titl... |
context("MRFcov")
#### Test basic error and warning messages using sample data ####
data("Bird.parasites")
test_that("family must be correctly specified", {
expect_success(expect_error(MRFcov(data = Bird.parasites, n_nodes = 4, family = 'binmial'),
'Please select one of the thre... | /tests/testthat/test-MRFcov.R | no_license | cran/MRFcov | R | false | false | 3,282 | r | context("MRFcov")
#### Test basic error and warning messages using sample data ####
data("Bird.parasites")
test_that("family must be correctly specified", {
expect_success(expect_error(MRFcov(data = Bird.parasites, n_nodes = 4, family = 'binmial'),
'Please select one of the thre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.