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 |
|---|---|---|---|---|---|---|---|---|---|
rm(list=ls())
# This script makes forest plots for the MID task
# relationships with phenotypic covariates
# load data
sum.dat<-read.csv("pheno_bayes_cor.csv")
# replace name of first variable for consisitency with the rest
sum.dat$ROI<-as.character(sum.dat$ROI)
sum.dat[sum.dat$ROI=="ACC1","ROI"]<-"ACC.1"
... | /Aim3_ROI_Beh/Bayes-Beh Forest Plots.R | no_license | demidenm/MIDContrasts | R | false | false | 2,682 | r | rm(list=ls())
# This script makes forest plots for the MID task
# relationships with phenotypic covariates
# load data
sum.dat<-read.csv("pheno_bayes_cor.csv")
# replace name of first variable for consisitency with the rest
sum.dat$ROI<-as.character(sum.dat$ROI)
sum.dat[sum.dat$ROI=="ACC1","ROI"]<-"ACC.1"
... |
# test_summary.R
# WRE says "using if(requireNamespace("pkgname")) is preferred, if possible."
# even in tests:
assertError <- function(expr, ...)
if(requireNamespace("tools")) tools::assertError(expr, ...) else invisible()
assertWarning <- function(expr, ...)
if(requireNamespace("tools")) tools::assertWarning(exp... | /tests/test_summary.R | no_license | runehaubo/lmerTestR | R | false | false | 4,272 | r | # test_summary.R
# WRE says "using if(requireNamespace("pkgname")) is preferred, if possible."
# even in tests:
assertError <- function(expr, ...)
if(requireNamespace("tools")) tools::assertError(expr, ...) else invisible()
assertWarning <- function(expr, ...)
if(requireNamespace("tools")) tools::assertWarning(exp... |
## boyancy-driven ventilation
f <- function(u){
rho <- 1.205 # density at 20C, kg/m3
g <- 9.8
H <- 5 # height difference, m
L <- 200 # tunnel length, m
Q <- 139 # heat generation rate, kW/s
U.out <- 10 # wind velocity, m/s
a <- 2.7 # size of duct, m
b <- 2.8 # size of duct, m
mu <- 1.88e-5 # dynamic (absolute) vi... | /funcForm.R | no_license | alpertSnow/tunnelVent | R | false | false | 1,393 | r | ## boyancy-driven ventilation
f <- function(u){
rho <- 1.205 # density at 20C, kg/m3
g <- 9.8
H <- 5 # height difference, m
L <- 200 # tunnel length, m
Q <- 139 # heat generation rate, kW/s
U.out <- 10 # wind velocity, m/s
a <- 2.7 # size of duct, m
b <- 2.8 # size of duct, m
mu <- 1.88e-5 # dynamic (absolute) vi... |
# !! PLEASE DO NOT EDIT THIS FILE !!
# ** make a copy and edit that instead **
# ________________________________________________
# input parameters
# sigma2: 0 < value < 5
sig2 <- 3
# e.g. "anas_krystallinus"
species.name <- "adriana_sarasosaurius"
# e.g. "red"
color <- '#00FF00'
# tip: pic... | /params/adriana_sarasosaurius.R | permissive | JackMcMinn/Collaborative-RStudio-GitHub | R | false | false | 439 | r | # !! PLEASE DO NOT EDIT THIS FILE !!
# ** make a copy and edit that instead **
# ________________________________________________
# input parameters
# sigma2: 0 < value < 5
sig2 <- 3
# e.g. "anas_krystallinus"
species.name <- "adriana_sarasosaurius"
# e.g. "red"
color <- '#00FF00'
# tip: pic... |
#!/usr/bin/env Rscript
library(e1071)
library(purrr)
library(dplyr)
library(numbers)
set.seed(123)
x <- seq(0.1, 5, by = 0.5)
y <- dnorm(log10(x), sd = 0.3)
png(file = "normal_distribution.png")
plot(x,y, main = "Normal Distribution", col = "blue")
data_nd <- data.frame(x=x, y=y)
head(data_nd)
svmfit <- svm(y ~ x, ... | /Lab 9/ex_9.2.r | no_license | UTBM-AGH-courses/agh-data-mining | R | false | false | 407 | r | #!/usr/bin/env Rscript
library(e1071)
library(purrr)
library(dplyr)
library(numbers)
set.seed(123)
x <- seq(0.1, 5, by = 0.5)
y <- dnorm(log10(x), sd = 0.3)
png(file = "normal_distribution.png")
plot(x,y, main = "Normal Distribution", col = "blue")
data_nd <- data.frame(x=x, y=y)
head(data_nd)
svmfit <- svm(y ~ x, ... |
# helper functions to define climate scenarios
# Scenario options:
# - wet
# - dry
# - ave
# - dry punctuated by wet
# - alternating wet and dry
#
# Based on data for wet, average, and dry years
# transition <- matrix(c(dry_to_dry, dry_to_ave, dry_to_wet,
# ave_to_dry, ave_to_ave,... | /code/climate-scenarios.R | permissive | jdyen/dendrobands | R | false | false | 8,197 | r | # helper functions to define climate scenarios
# Scenario options:
# - wet
# - dry
# - ave
# - dry punctuated by wet
# - alternating wet and dry
#
# Based on data for wet, average, and dry years
# transition <- matrix(c(dry_to_dry, dry_to_ave, dry_to_wet,
# ave_to_dry, ave_to_ave,... |
require(graphics)
library(DBI)
library(RSQLite)
drv <- dbDriver("SQLite")
conn <- dbConnect(drv, dbname = "s.sqlite3")
query <- function(con, query) {
rs <- dbSendQuery(con, query)
data <- fetch(rs, n = -1)
dbClearResult(rs)
data
}
to_fahrenheit <- function(c) { ((c * 9) / 5) + 32 }
box <- query(conn, "
SEL... | /graphing.r | no_license | tenderlove/rsausage | R | false | false | 901 | r | require(graphics)
library(DBI)
library(RSQLite)
drv <- dbDriver("SQLite")
conn <- dbConnect(drv, dbname = "s.sqlite3")
query <- function(con, query) {
rs <- dbSendQuery(con, query)
data <- fetch(rs, n = -1)
dbClearResult(rs)
data
}
to_fahrenheit <- function(c) { ((c * 9) / 5) + 32 }
box <- query(conn, "
SEL... |
i = 280
library(isoform, lib.loc="/nas02/home/w/e/weisun/R/Rlibs/")
bedFile = "/nas02/home/w/e/weisun/research/data/human/Homo_sapiens.GRCh37.66.nonoverlap.exon.bed"
setwd("/lustre/scr/w/e/weisun/TCGA/bam/")
cmd = "ls *_asCounts_hetSNP_EA_hap1.bam"
ffs = system(cmd, intern=TRUE)
length(ffs)
head(ffs)
sams = gsub(... | /data_preparation/R_batch3/_step3/step3_countReads_EA.279.R | no_license | jasa-acs/Mapping-Tumor-Specific-Expression-QTLs-in-Impure-Tumor-Samples | R | false | false | 651 | r | i = 280
library(isoform, lib.loc="/nas02/home/w/e/weisun/R/Rlibs/")
bedFile = "/nas02/home/w/e/weisun/research/data/human/Homo_sapiens.GRCh37.66.nonoverlap.exon.bed"
setwd("/lustre/scr/w/e/weisun/TCGA/bam/")
cmd = "ls *_asCounts_hetSNP_EA_hap1.bam"
ffs = system(cmd, intern=TRUE)
length(ffs)
head(ffs)
sams = gsub(... |
#' Summarize gene expression data
#' @description
#' Summarize gene expression data by computing some descriptive statistics.
#' \itemize{
#' \item summarize(): computes descriptive statistics for expression data.
#' \item summarizeby(): summarizes expression data by groups and by \bold{one descriptive statistic}.
#' F... | /R/summarize.R | no_license | kassambara/ezRNAseq | R | false | false | 3,468 | r | #' Summarize gene expression data
#' @description
#' Summarize gene expression data by computing some descriptive statistics.
#' \itemize{
#' \item summarize(): computes descriptive statistics for expression data.
#' \item summarizeby(): summarizes expression data by groups and by \bold{one descriptive statistic}.
#' F... |
context("utils")
testthat::setup({
`%>%` <- dplyr::`%>%`
if (!file.exists("parrot_sub.rds")) {
parrotpath <- system.file("extdata", "parrots.png", package = "imager")
parrots <- imager::load.image(parrotpath) %>%
imager::crop.bbox(., (imager::Xc(.) > 190 & imager::Yc(.) > 190 &
... | /tests/testthat/test_utils.R | no_license | srvanderplas/ImageAlignR | R | false | false | 2,281 | r | context("utils")
testthat::setup({
`%>%` <- dplyr::`%>%`
if (!file.exists("parrot_sub.rds")) {
parrotpath <- system.file("extdata", "parrots.png", package = "imager")
parrots <- imager::load.image(parrotpath) %>%
imager::crop.bbox(., (imager::Xc(.) > 190 & imager::Yc(.) > 190 &
... |
#CCES
cces <- read.csv("cces2012.csv")
summary(model1 <- lm(ideology ~ as.factor(inputstate) + donor + vote + attend.event + put.up.sign + work.for.cand + attend.event + news.interest + income + male + education + white, data = cces[(cces$donate.other == 0 | cces$donate.state == 1) & cces$pid3 == "Republican",]))
leng... | /data/Barber/dataverse_files/Table_3.R | no_license | markchand/Money-in-Politics | R | false | false | 632 | r | #CCES
cces <- read.csv("cces2012.csv")
summary(model1 <- lm(ideology ~ as.factor(inputstate) + donor + vote + attend.event + put.up.sign + work.for.cand + attend.event + news.interest + income + male + education + white, data = cces[(cces$donate.other == 0 | cces$donate.state == 1) & cces$pid3 == "Republican",]))
leng... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ops.R
\name{nsa}
\alias{nsa}
\title{No strings attached mode}
\usage{
nsa(.self, enabled = TRUE)
}
\arguments{
\item{.self}{Data frame}
\item{enabled}{TRUE to enable, FALSE to disable. Defaults to TRUE.}
}
\value{
Data frame
}
\description{
... | /man/nsa.Rd | no_license | privefl/multiplyr | R | false | true | 1,027 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ops.R
\name{nsa}
\alias{nsa}
\title{No strings attached mode}
\usage{
nsa(.self, enabled = TRUE)
}
\arguments{
\item{.self}{Data frame}
\item{enabled}{TRUE to enable, FALSE to disable. Defaults to TRUE.}
}
\value{
Data frame
}
\description{
... |
dataFile <- "./data/household_power_consumption.txt"
data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
#Reads in data from file then subsets data for specified dates
subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
globalActivePower <- as.numeric(subSetData$Global_active_... | /plot1.R | no_license | eyadwin/ExData_Plotting1 | R | false | false | 490 | r | dataFile <- "./data/household_power_consumption.txt"
data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
#Reads in data from file then subsets data for specified dates
subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
globalActivePower <- as.numeric(subSetData$Global_active_... |
dataRead <- "//mizazaycensql01/SCMBIR/Client Dashboard/DataIn"
setwd(dataRead)
tl <- list.files(getwd())
tl <- tl[grep("Clients", tl)]
tl <- tl[order(tl)]
tl <- tl[length(tl)]
Clients <- read.csv(tl)
Clients$Date <- as.Date(Clients$Date, format = "%Y-%m-%d")
Clients$ProductHouseDesc <- toupper(Clients$P... | /graphs/ClientsGraph.R | no_license | andrubrown/ClientDashboard | R | false | false | 935 | r | dataRead <- "//mizazaycensql01/SCMBIR/Client Dashboard/DataIn"
setwd(dataRead)
tl <- list.files(getwd())
tl <- tl[grep("Clients", tl)]
tl <- tl[order(tl)]
tl <- tl[length(tl)]
Clients <- read.csv(tl)
Clients$Date <- as.Date(Clients$Date, format = "%Y-%m-%d")
Clients$ProductHouseDesc <- toupper(Clients$P... |
#SIX AIRLINES DATA
#Reading the data into R
SixAirlines.df <- read.csv(paste("SixAirlinesData.csv"))
#Summary statistics
summary(SixAirlines.df)
#AIRFRANCE AIRLINES
#Creating subset of AirFrance airlines
AirFrance.df <- subset(SixAirlines.df, Airline=="AirFranc... | /Pricing Analysis.R | no_license | yashrj73/Arline-Price-Analysis | R | false | false | 7,060 | r | #SIX AIRLINES DATA
#Reading the data into R
SixAirlines.df <- read.csv(paste("SixAirlinesData.csv"))
#Summary statistics
summary(SixAirlines.df)
#AIRFRANCE AIRLINES
#Creating subset of AirFrance airlines
AirFrance.df <- subset(SixAirlines.df, Airline=="AirFranc... |
## makeCacheMatrix creates a list of functions: set the matrix, get the matrix, set inverse of
## the matrix, and gets inverse of the matrix
## cacheSolve computes the inverse of the matrix created with makeCacheMatrix. It first checks to see if the inverse
## has already been calculated. If so, it gets the inverse ... | /cachematrix.R | no_license | sw2015/ProgrammingAssignment2 | R | false | false | 1,697 | r | ## makeCacheMatrix creates a list of functions: set the matrix, get the matrix, set inverse of
## the matrix, and gets inverse of the matrix
## cacheSolve computes the inverse of the matrix created with makeCacheMatrix. It first checks to see if the inverse
## has already been calculated. If so, it gets the inverse ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_daymet_apsim_met.R
\name{get_daymet2_apsim_met}
\alias{get_daymet2_apsim_met}
\title{Get DAYMET data for an APSIM met file}
\source{
The data is retrieved using the \CRANpkg{daymetr} package. For the original
source see: https://daymet.or... | /man/get_daymet2_apsim_met.Rd | no_license | dcammarano/apsimx | R | false | true | 1,821 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_daymet_apsim_met.R
\name{get_daymet2_apsim_met}
\alias{get_daymet2_apsim_met}
\title{Get DAYMET data for an APSIM met file}
\source{
The data is retrieved using the \CRANpkg{daymetr} package. For the original
source see: https://daymet.or... |
\name{invTranPlot}
\alias{invTranPlot}
\alias{invTranPlot.default}
\alias{invTranPlot.formula}
\alias{invTranEstimate}
\title{ Choose a Predictor Transformation Visually or Numerically }
\description{
\code{invTranPlot}
draws a two-dimensional scatterplot of \eqn{Y}{Y} versus
\eqn{X}{X}, along with the OLS
fit from t... | /man/invTranPlot.Rd | no_license | jonathon-love/car3 | R | false | false | 4,665 | rd | \name{invTranPlot}
\alias{invTranPlot}
\alias{invTranPlot.default}
\alias{invTranPlot.formula}
\alias{invTranEstimate}
\title{ Choose a Predictor Transformation Visually or Numerically }
\description{
\code{invTranPlot}
draws a two-dimensional scatterplot of \eqn{Y}{Y} versus
\eqn{X}{X}, along with the OLS
fit from t... |
#' Plot conditional density and conditional histogram.
#'
#' @param frame data frame to get values from
#' @param xvar name of the indepement (input or model) column in frame
#' @param truthVar name of the dependent (output or result to be modeled) column in frame
#' @param title title to place on plot
#' @param ... ... | /R/ConditionalDistribution.R | no_license | xtmgah/WVPlots | R | false | false | 1,678 | r |
#' Plot conditional density and conditional histogram.
#'
#' @param frame data frame to get values from
#' @param xvar name of the indepement (input or model) column in frame
#' @param truthVar name of the dependent (output or result to be modeled) column in frame
#' @param title title to place on plot
#' @param ... ... |
gradpsiT <- function(y, L, l, u, nu)
{
# implements gradient of psi(x) to find optimal exponential twisting;
# assumes scaled 'L' with zero diagonal;
d <- length(u)
co <- x <- mu <- rep(0, d)
x[-d] <- y[1:(d-1)]
r <- exp(y[d])
mu[-d] <- y[(d+1):(2*d-1)]
eta <- y[2*d]
l <- l/sqrt(nu);
u <- u/sqrt(nu)... | /R/gradpsiT.R | no_license | danmackinlay/TruncatedNormal | R | false | false | 916 | r | gradpsiT <- function(y, L, l, u, nu)
{
# implements gradient of psi(x) to find optimal exponential twisting;
# assumes scaled 'L' with zero diagonal;
d <- length(u)
co <- x <- mu <- rep(0, d)
x[-d] <- y[1:(d-1)]
r <- exp(y[d])
mu[-d] <- y[(d+1):(2*d-1)]
eta <- y[2*d]
l <- l/sqrt(nu);
u <- u/sqrt(nu)... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
cossimVec <- function(x, y, narm) {
.Call('_ribiosMath_cossimVec', PACKAGE = 'ribiosMath', x, y, narm)
}
#' Cluster rows of a Kappa-statistic-matrix by the hierarhical fuzzy multi-linkage ... | /R/RcppExports.R | no_license | bedapub/ribiosMath | R | false | false | 7,186 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
cossimVec <- function(x, y, narm) {
.Call('_ribiosMath_cossimVec', PACKAGE = 'ribiosMath', x, y, narm)
}
#' Cluster rows of a Kappa-statistic-matrix by the hierarhical fuzzy multi-linkage ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getset.R
\name{initial.model}
\alias{initial.model}
\title{Get Model Initial Estimates}
\usage{
\method{initial}{model}(x, ...)
}
\arguments{
\item{x}{model}
\item{...}{dots}
}
\description{
Gets model initial estimates.
}
\e... | /man/initial.model.Rd | no_license | cran/nonmemica | R | false | true | 593 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getset.R
\name{initial.model}
\alias{initial.model}
\title{Get Model Initial Estimates}
\usage{
\method{initial}{model}(x, ...)
}
\arguments{
\item{x}{model}
\item{...}{dots}
}
\description{
Gets model initial estimates.
}
\e... |
testlist <- list(A = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:5), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613103234-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 211 | r | testlist <- list(A = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:5), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
pathGrob <- function(controls, pathIndex=1, units="bigpts") {
BezierGrob(controls$x, controls$y,
open=is.null(attr(controls, "cycle")),
default.units=units,
name=paste0("path-", pathIndex))
}
#############################################################################... | /R/grid.R | no_license | pmur002/metapost | R | false | false | 6,982 | r |
pathGrob <- function(controls, pathIndex=1, units="bigpts") {
BezierGrob(controls$x, controls$y,
open=is.null(attr(controls, "cycle")),
default.units=units,
name=paste0("path-", pathIndex))
}
#############################################################################... |
library(rjson)
library(purrr)
library(dplyr)
library(zoo)
library(plotrix)
library(ggplot2)
library(scales)
library(knitr)
library(kableExtra) | /R analysis/Scripts/Lib.R | no_license | stevenwaterman/EDA-Horror-Game | R | false | false | 142 | r | library(rjson)
library(purrr)
library(dplyr)
library(zoo)
library(plotrix)
library(ggplot2)
library(scales)
library(knitr)
library(kableExtra) |
rm(list=ls())
getwd()
setwd("C:/Users/eunse/Desktop/DM/month")
dir()
data = read.csv("newdata.csv")
str(data)
dim(data) # 230 x 39
View(data)
#기타 물가지수는 알아보기 힘드므로 제거
data = data[,-8]
data$대학교납입금 =data$전문대학납입금 + data$국공립대학교납입금 + data$사립대학교납입금
data$청소년학원비 = data$초등학생학원비 + data$고등학생학원비
data$예체능학원비 = data$음악학원비 +data$미술... | /regreession_month.R | no_license | SilverwestKim/DM | R | false | false | 4,041 | r | rm(list=ls())
getwd()
setwd("C:/Users/eunse/Desktop/DM/month")
dir()
data = read.csv("newdata.csv")
str(data)
dim(data) # 230 x 39
View(data)
#기타 물가지수는 알아보기 힘드므로 제거
data = data[,-8]
data$대학교납입금 =data$전문대학납입금 + data$국공립대학교납입금 + data$사립대학교납입금
data$청소년학원비 = data$초등학생학원비 + data$고등학생학원비
data$예체능학원비 = data$음악학원비 +data$미술... |
# Project 2 : Exploratory Data Analysis
#Plot5
# Data Dictionary
# fips: A five-digit number (represented as a string) indicating the U.S. county
# SCC: The name of the source as indicated by a digit string (see source code classification table)
# Pollutant: A string indicating the pollutant
# Emissions: Amount of P... | /code/Plot5.R | no_license | pi-georgia/Explortory-Data-Analysis---2015-Project-2 | R | false | false | 1,630 | r | # Project 2 : Exploratory Data Analysis
#Plot5
# Data Dictionary
# fips: A five-digit number (represented as a string) indicating the U.S. county
# SCC: The name of the source as indicated by a digit string (see source code classification table)
# Pollutant: A string indicating the pollutant
# Emissions: Amount of P... |
# ----------------------------------------- #
# NC DETECT Spatial Project #
# Zip Code Influenza Data #
# Run rsatscan #
# July 18, 2019 #
# K. Sumner #
# ----------------------------------------- ... | /Kelsey/influenza_data/ncdetect_influenza_data_rsatscan.R | no_license | kelseysumner/nc_detect_spatial_clustering | R | false | false | 7,800 | r | # ----------------------------------------- #
# NC DETECT Spatial Project #
# Zip Code Influenza Data #
# Run rsatscan #
# July 18, 2019 #
# K. Sumner #
# ----------------------------------------- ... |
######################################################################################################################################
# This code will assign the logn run forward PD values for securities and loans using the public firm converter
#########################################################################... | /SupportableTermAndLongRunPDLGDFunctionWithAssigningLGDOneYearAndPortfolioFilterAndDateConversion.R | no_license | YIFAN-ZHANG-AEGON/IFRS9LongTermPDLGDConverter | R | false | false | 4,415 | r | ######################################################################################################################################
# This code will assign the logn run forward PD values for securities and loans using the public firm converter
#########################################################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fasta-utils.R
\name{unmapped_read}
\alias{unmapped_read}
\title{Extract unmapped reads with a mapped mate from a bam file}
\usage{
unmapped_read(
bam.file,
query,
yield_size = 1e+06,
maxgap = 500,
what = scanBamWhat()
)
}
\arguments... | /man/unmapped_read.Rd | no_license | cancer-genomics/trellis | R | false | true | 2,196 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fasta-utils.R
\name{unmapped_read}
\alias{unmapped_read}
\title{Extract unmapped reads with a mapped mate from a bam file}
\usage{
unmapped_read(
bam.file,
query,
yield_size = 1e+06,
maxgap = 500,
what = scanBamWhat()
)
}
\arguments... |
#q1
library(AppliedPredictiveModeling)
data(segmentationOriginal)
library(caret)
data=segmentationOriginal
#1. Subset the data to a training set and testing set based on the
# Case variable in the data set.
testIndex=which(data$Case == "Train")
training = data[testIndex,]
testing = data[!testIndex,]
# 2. Set the s... | /class_08_Practical_Machine_Learning/Quiz_3.R | no_license | JeffreyUslan/Coursera_Data_Science_JH | R | false | false | 2,554 | r |
#q1
library(AppliedPredictiveModeling)
data(segmentationOriginal)
library(caret)
data=segmentationOriginal
#1. Subset the data to a training set and testing set based on the
# Case variable in the data set.
testIndex=which(data$Case == "Train")
training = data[testIndex,]
testing = data[!testIndex,]
# 2. Set the s... |
#' Disease Ontology Semantic and Enrichment analysis
#' Implemented five methods proposed by Resnik, Schlicker, Jiang, Lin and Wang respectively for measuring DO semantic similarities, and hypergeometric test for enrichment analysis.
#'
#' This package is designed to estimate DO-based semantic similarity
#' measurement... | /R/DOSE-package.R | no_license | huerqiang/DOSE | R | false | false | 1,304 | r | #' Disease Ontology Semantic and Enrichment analysis
#' Implemented five methods proposed by Resnik, Schlicker, Jiang, Lin and Wang respectively for measuring DO semantic similarities, and hypergeometric test for enrichment analysis.
#'
#' This package is designed to estimate DO-based semantic similarity
#' measurement... |
# Full Dataset Creation, will do all the required steps to achieve the final
# result, thus allowing step by step running
finalDataset <- function (workingDir = FALSE, save = TRUE) {
if (!loadDependencies()) return (FALSE)
dataset <- createDataset (workingDir)
if (any(dataset == FALSE)) return (FALSE)
f... | /run_analysis.R | no_license | guiligan/GCDAssignment | R | false | false | 8,299 | r | # Full Dataset Creation, will do all the required steps to achieve the final
# result, thus allowing step by step running
finalDataset <- function (workingDir = FALSE, save = TRUE) {
if (!loadDependencies()) return (FALSE)
dataset <- createDataset (workingDir)
if (any(dataset == FALSE)) return (FALSE)
f... |
## ----For detailed comments on code snippets , please refer to reading material----------------------------------------------------------
## setwd(" Here/Goes/Path/To/Your/Data/Folder/")
## windows users will need to replace "\" with "/" or "\\"
getwd()
setwd("/media/dell/D_PROJECTS/Edvancer_Class/DataScienceWith... | /Edvancer_Class/DataScienceWithR/DataPreeparation/DP with R.R | no_license | srinivas1982/DS_R_Language | R | false | false | 13,104 | r | ## ----For detailed comments on code snippets , please refer to reading material----------------------------------------------------------
## setwd(" Here/Goes/Path/To/Your/Data/Folder/")
## windows users will need to replace "\" with "/" or "\\"
getwd()
setwd("/media/dell/D_PROJECTS/Edvancer_Class/DataScienceWith... |
#Data Processing
#Importing DataSet
dataset = read.csv("Salary_Data.csv")
#splitting the dataset into training set and testing set
#install.packages('caTools')
library(caTools)
#generate random number
set.seed(123)
#create split pattern based on random number generated
split = sample.split(dataset$Salary, 2/3)
#subse... | /Part 2 - Regression/Section 4 - Simple Linear Regression/Hao_Simple_LM.R | permissive | HaoLiangPao/MachineLearningA-Z | R | false | false | 1,454 | r | #Data Processing
#Importing DataSet
dataset = read.csv("Salary_Data.csv")
#splitting the dataset into training set and testing set
#install.packages('caTools')
library(caTools)
#generate random number
set.seed(123)
#create split pattern based on random number generated
split = sample.split(dataset$Salary, 2/3)
#subse... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sms.R
\name{createLexicon}
\alias{createLexicon}
\title{createLexicon}
\usage{
createLexicon()
}
\value{
dataLexicon A data.frame holding the associated column names.
}
\description{
Create a data lexicon for holding the associated column nam... | /man/createLexicon.Rd | no_license | cran/sms | R | false | true | 606 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sms.R
\name{createLexicon}
\alias{createLexicon}
\title{createLexicon}
\usage{
createLexicon()
}
\value{
dataLexicon A data.frame holding the associated column names.
}
\description{
Create a data lexicon for holding the associated column nam... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting_functions.R
\name{impPlotsByChr}
\alias{impPlotsByChr}
\title{Graph imputed metrics: by chromosome boxplots}
\usage{
impPlotsByChr(out_dir, start_chr, end_chr, parX = FALSE, mets_all)
}
\arguments{
\item{out_dir}{Output directory}
\... | /man/impPlotsByChr.Rd | permissive | sarahcn/impplotr | R | false | true | 662 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting_functions.R
\name{impPlotsByChr}
\alias{impPlotsByChr}
\title{Graph imputed metrics: by chromosome boxplots}
\usage{
impPlotsByChr(out_dir, start_chr, end_chr, parX = FALSE, mets_all)
}
\arguments{
\item{out_dir}{Output directory}
\... |
library(mvtnorm)
library(Rcpp)
library(parallel)
source("utils.r")
source("kernels.r")
source("gpvi.r")
VSBC.SAMPLES <- 1e3
MC.CORES <- 4
theta <- c(2, 3, 1.5) # default hyperparmeters
d <- read.csv("data.csv")
X <- d$X
Y <- d$Y
f <- d$f
num.params <- length(X)
V <- function(Y, x, eta) {
- log(... | /R/gpvi/main.r | no_license | mkomod/variational-inference | R | false | false | 3,822 | r | library(mvtnorm)
library(Rcpp)
library(parallel)
source("utils.r")
source("kernels.r")
source("gpvi.r")
VSBC.SAMPLES <- 1e3
MC.CORES <- 4
theta <- c(2, 3, 1.5) # default hyperparmeters
d <- read.csv("data.csv")
X <- d$X
Y <- d$Y
f <- d$f
num.params <- length(X)
V <- function(Y, x, eta) {
- log(... |
# The following section create a cache for storing matrixes and their inverse,
# which is used to save computing time by accessing caches solution instead
# of recalculating it.
# The first function, makeCacheMatrix, creates a special "vector",
# which is really a list containing a function to
# 1) set the value of th... | /cachematrix.R | no_license | ChrisOKay/ProgrammingAssignment2 | R | false | false | 1,340 | r | # The following section create a cache for storing matrixes and their inverse,
# which is used to save computing time by accessing caches solution instead
# of recalculating it.
# The first function, makeCacheMatrix, creates a special "vector",
# which is really a list containing a function to
# 1) set the value of th... |
context("jetpack")
library(withr)
createDir <- function(path) {
if (!dir.exists(path)) {
dir.create(path)
}
}
contains <- function(file, x) {
grepl(x, paste(readLines(file), collapse=""))
}
expectFile <- function(name) {
expect(file.exists(name), paste(name, "does not exist"))
}
expectContains <- funct... | /tests/testthat/test-jetpack.R | no_license | jimsforks/jetpack | R | false | false | 1,376 | r | context("jetpack")
library(withr)
createDir <- function(path) {
if (!dir.exists(path)) {
dir.create(path)
}
}
contains <- function(file, x) {
grepl(x, paste(readLines(file), collapse=""))
}
expectFile <- function(name) {
expect(file.exists(name), paste(name, "does not exist"))
}
expectContains <- funct... |
#' MGC Test
#'
#' The main function that computes the MGC measure between two datasets:
#' It first computes all local correlations, then use the maximal statistic
#' among all local correlations based on thresholding.
#'
#' @references Joshua T. Vogelstein, et al. "Discovering and deciphering relationships across disp... | /R/MGCSampleStat.R | permissive | ssabrii/r-mgc | R | false | false | 9,737 | r | #' MGC Test
#'
#' The main function that computes the MGC measure between two datasets:
#' It first computes all local correlations, then use the maximal statistic
#' among all local correlations based on thresholding.
#'
#' @references Joshua T. Vogelstein, et al. "Discovering and deciphering relationships across disp... |
library(daewr)
### Name: bha
### Title: mouse liver enzyme experiment
### Aliases: bha
### Keywords: datasets
### ** Examples
data(bha)
| /data/genthat_extracted_code/daewr/examples/bha.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 143 | r | library(daewr)
### Name: bha
### Title: mouse liver enzyme experiment
### Aliases: bha
### Keywords: datasets
### ** Examples
data(bha)
|
#' dv vs ivar with overlaid pred
#' @param df
#' @export
dv_pred_ivar <- function(df) {
ggout <- df %>%
dplyr::select(ID5, IVAR, PRED, DV, ObsName) %>%
ggplot(aes(x = IVAR, y = DV, group = ID5)) +
geom_line() + geom_point() +
geom_line(aes(y = PRED), color = "red", size = 1.25) +
them... | /R/dv_pred_ivar.R | no_license | dpastoor/phmxplore | R | false | false | 1,072 | r | #' dv vs ivar with overlaid pred
#' @param df
#' @export
dv_pred_ivar <- function(df) {
ggout <- df %>%
dplyr::select(ID5, IVAR, PRED, DV, ObsName) %>%
ggplot(aes(x = IVAR, y = DV, group = ID5)) +
geom_line() + geom_point() +
geom_line(aes(y = PRED), color = "red", size = 1.25) +
them... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_genes.R
\name{heatmSpatialCorGenes}
\alias{heatmSpatialCorGenes}
\title{heatmSpatialCorGenes}
\usage{
heatmSpatialCorGenes(
gobject,
spatCorObject,
use_clus_name = NULL,
show_cluster_annot = TRUE,
show_row_dend = T,
show_c... | /man/heatmSpatialCorGenes.Rd | permissive | lihpsg/Giotto | R | false | true | 1,517 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_genes.R
\name{heatmSpatialCorGenes}
\alias{heatmSpatialCorGenes}
\title{heatmSpatialCorGenes}
\usage{
heatmSpatialCorGenes(
gobject,
spatCorObject,
use_clus_name = NULL,
show_cluster_annot = TRUE,
show_row_dend = T,
show_c... |
#==================================================
# DESCRIPCIoN: Correlación y estimación de datos faltantes entre las 5 estaciones
#Udep y Senamhi
# AUTOR(ES): Nohelia e Isabella
#==================================================
## Establecer el Working Directory
setwd("C:/R/Tesis")
install.packages("gtools")
#... | /Script/DataEstimada,v1.R | no_license | NohePS/Tesis | R | false | false | 7,284 | r | #==================================================
# DESCRIPCIoN: Correlación y estimación de datos faltantes entre las 5 estaciones
#Udep y Senamhi
# AUTOR(ES): Nohelia e Isabella
#==================================================
## Establecer el Working Directory
setwd("C:/R/Tesis")
install.packages("gtools")
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/applicationautoscaling_operations.R
\name{applicationautoscaling_register_scalable_target}
\alias{applicationautoscaling_register_scalable_target}
\title{Registers or updates a scalable target}
\usage{
applicationautoscaling_register_scalable... | /cran/paws.management/man/applicationautoscaling_register_scalable_target.Rd | permissive | johnnytommy/paws | R | false | true | 9,783 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/applicationautoscaling_operations.R
\name{applicationautoscaling_register_scalable_target}
\alias{applicationautoscaling_register_scalable_target}
\title{Registers or updates a scalable target}
\usage{
applicationautoscaling_register_scalable... |
\name{Menu.pickcube}
\alias{Menu.pickcube}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Pick the cube portion from a central composite design}
\description{
This help file describes how to use the menu for picking the cube portion from a central composite design.
}
%- maybe also 'usage... | /man/Menu.pickcube.Rd | no_license | cran/RcmdrPlugin.DoE | R | false | false | 1,987 | rd | \name{Menu.pickcube}
\alias{Menu.pickcube}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Pick the cube portion from a central composite design}
\description{
This help file describes how to use the menu for picking the cube portion from a central composite design.
}
%- maybe also 'usage... |
\name{Lintersect}
\alias{Lintersect}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Finder intersection of lines}
\description{
Determines intersection points of 2D vectors
}
\usage{
Lintersect(l1, l2)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{l1}{Line 1 }
\... | /man/Lintersect.Rd | no_license | cran/GEOmap | R | false | false | 1,176 | rd | \name{Lintersect}
\alias{Lintersect}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Finder intersection of lines}
\description{
Determines intersection points of 2D vectors
}
\usage{
Lintersect(l1, l2)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{l1}{Line 1 }
\... |
#' @title Pseudo-time ordering based on Model-based clusters
#' @description This function takes the exact output of exprmclust function and
#' construct Pseudo-time ordering by mapping all cells onto the path that
#' connects cluster centers.
#' @export
#' @param object \code{DISCBIO} class object.
#' @param quiet... | /R/MB_Order.R | permissive | dami82/DIscBIO | R | false | false | 1,801 | r | #' @title Pseudo-time ordering based on Model-based clusters
#' @description This function takes the exact output of exprmclust function and
#' construct Pseudo-time ordering by mapping all cells onto the path that
#' connects cluster centers.
#' @export
#' @param object \code{DISCBIO} class object.
#' @param quiet... |
#' Plot seasonal rates of change in quarters based on average estimates for multiple window widths
#'
#' Plot seasonal rates of change in quarters based on average estimates for multiple window widths
#'
#' @param mod input model object as returned by \code{\link{anlz_gam}}
#' @param justify chr string indicating the ... | /R/show_sumtrndseason2.R | permissive | tbep-tech/wqtrends | R | false | false | 3,535 | r | #' Plot seasonal rates of change in quarters based on average estimates for multiple window widths
#'
#' Plot seasonal rates of change in quarters based on average estimates for multiple window widths
#'
#' @param mod input model object as returned by \code{\link{anlz_gam}}
#' @param justify chr string indicating the ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/manage.R
\name{cb2connect}
\alias{cb2connect}
\title{connect to circBase2}
\usage{
cb2connect(host = "localhost", db.user = getOption("db.username"),
password = rstudioapi::askForPassword("cb2 password"),
dbname = getOption("mysql.db"))
}... | /man/cb2connect.Rd | permissive | retaj/cb2tools | R | false | true | 665 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/manage.R
\name{cb2connect}
\alias{cb2connect}
\title{connect to circBase2}
\usage{
cb2connect(host = "localhost", db.user = getOption("db.username"),
password = rstudioapi::askForPassword("cb2 password"),
dbname = getOption("mysql.db"))
}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_main_indel_contexts.R
\name{plot_main_indel_contexts}
\alias{plot_main_indel_contexts}
\title{Plot the main indel contexts}
\usage{
plot_main_indel_contexts(counts, same_y = FALSE)
}
\arguments{
\item{counts}{A tibble containing the numb... | /man/plot_main_indel_contexts.Rd | permissive | UMCUGenetics/MutationalPatterns | R | false | true | 1,516 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_main_indel_contexts.R
\name{plot_main_indel_contexts}
\alias{plot_main_indel_contexts}
\title{Plot the main indel contexts}
\usage{
plot_main_indel_contexts(counts, same_y = FALSE)
}
\arguments{
\item{counts}{A tibble containing the numb... |
#' Generalized Linear Model
#'
#' Fits generalized linear models, specified by giving a symbolic description of
#' the linear predictor and a description of the error distribution.
#'
#' @rdname GLMModel
#'
#' @param family optional error distribution and link function to be used in the
#' model. Set automatically a... | /R/ML_GLMModel.R | no_license | Drbuxie/MachineShop | R | false | false | 6,926 | r | #' Generalized Linear Model
#'
#' Fits generalized linear models, specified by giving a symbolic description of
#' the linear predictor and a description of the error distribution.
#'
#' @rdname GLMModel
#'
#' @param family optional error distribution and link function to be used in the
#' model. Set automatically a... |
#source('http://www.bioconductor.org/biocLite.R')
#update.packages()
#biocLite()
install.packages("BiocManager")
library(BiocManager)
source("install_bioc.R")
source("install_cran.R")
source("install_github.R")
| /R/installR.R | no_license | lxy1993/scripts | R | false | false | 213 | r | #source('http://www.bioconductor.org/biocLite.R')
#update.packages()
#biocLite()
install.packages("BiocManager")
library(BiocManager)
source("install_bioc.R")
source("install_cran.R")
source("install_github.R")
|
\name{kronecker-methods}
\docType{methods}
\title{Methods for Function 'kronecker()' in Package 'Matrix'}
\alias{kronecker-methods}
%
\alias{kronecker,ANY,Matrix-method}
\alias{kronecker,ANY,diagonalMatrix-method}
\alias{kronecker,ANY,sparseMatrix-method}
\alias{kronecker,Matrix,ANY-method}
\alias{kronecker,Matrix,diag... | /branches/Matrix-pre-R-2.15/man/kronecker-methods.Rd | no_license | LTLA/Matrix | R | false | false | 2,227 | rd | \name{kronecker-methods}
\docType{methods}
\title{Methods for Function 'kronecker()' in Package 'Matrix'}
\alias{kronecker-methods}
%
\alias{kronecker,ANY,Matrix-method}
\alias{kronecker,ANY,diagonalMatrix-method}
\alias{kronecker,ANY,sparseMatrix-method}
\alias{kronecker,Matrix,ANY-method}
\alias{kronecker,Matrix,diag... |
# File downloaded from blackboad into data farme
#
managers_data <- read.csv("managers.csv", na = "")
# Viw the structure of data frame
str(managers_data)
# Convert date to a date variable
# It is currently in mm/dd/yy
converted_date <- as.Date(managers_data$Date, "%m/%d/%y")
converted_date
str(converted_date)
# R... | /week3demo.R | no_license | stevensonkm/Practicles | R | false | false | 2,053 | r |
# File downloaded from blackboad into data farme
#
managers_data <- read.csv("managers.csv", na = "")
# Viw the structure of data frame
str(managers_data)
# Convert date to a date variable
# It is currently in mm/dd/yy
converted_date <- as.Date(managers_data$Date, "%m/%d/%y")
converted_date
str(converted_date)
# R... |
eval.polyglot("ruby", "require %q(stringio)")
| /temp_test/dev/test.R | permissive | rbotafogo/galaaz | R | false | false | 46 | r | eval.polyglot("ruby", "require %q(stringio)")
|
`vrais.LD.add` <-
function(mu,alpha.Q,s,CD,perf,DL.d)
{
sd=sqrt(s)
stde = sd/CD
dnorm.Q = dnorm(perf,mu+alpha.Q,stde)
dnorm.q = dnorm(perf,mu-alpha.Q,stde)
dnorm.0 = dnorm(perf,mu,stde)
total = dnorm.Q*DL.d[,1]+ dnorm.q*DL.d[,2]+dnorm.0*DL.d[,3]+dnorm.0*DL.d[,4]
total[total <=0] = -750
total[total>0] = lo... | /HAPim/R/vrais.LD.add.R | no_license | ingted/R-Examples | R | false | false | 382 | r | `vrais.LD.add` <-
function(mu,alpha.Q,s,CD,perf,DL.d)
{
sd=sqrt(s)
stde = sd/CD
dnorm.Q = dnorm(perf,mu+alpha.Q,stde)
dnorm.q = dnorm(perf,mu-alpha.Q,stde)
dnorm.0 = dnorm(perf,mu,stde)
total = dnorm.Q*DL.d[,1]+ dnorm.q*DL.d[,2]+dnorm.0*DL.d[,3]+dnorm.0*DL.d[,4]
total[total <=0] = -750
total[total>0] = lo... |
\docType{methods}
\name{fnorm-methods}
\alias{fnorm-methods}
\alias{fnorm}
\alias{fnorm,DelayedArray-method}
\title{Tensor Frobenius Norm of DelayedArray}
\usage{
fnorm(darr)
\S4method{fnorm}{DelayedArray}(darr)
}
\arguments{
\item{darr}{DelayedArray object}
}
\value{
numeric Frobenius norm of \code{darr}
}
\descripti... | /man/fnorm.Rd | permissive | rikenbit/DelayedTensor | R | false | false | 561 | rd | \docType{methods}
\name{fnorm-methods}
\alias{fnorm-methods}
\alias{fnorm}
\alias{fnorm,DelayedArray-method}
\title{Tensor Frobenius Norm of DelayedArray}
\usage{
fnorm(darr)
\S4method{fnorm}{DelayedArray}(darr)
}
\arguments{
\item{darr}{DelayedArray object}
}
\value{
numeric Frobenius norm of \code{darr}
}
\descripti... |
#' Sentence Splitting
#'
#' \code{sentSplit} - Splits turns of talk into individual sentences (provided
#' proper punctuation is used). This procedure is usually done as part of the
#' data read in and cleaning process.
#'
#' @param dataframe A dataframe that contains the person and text variable.
#' @param text.v... | /R/sentSplit.R | no_license | cran/qdap | R | false | false | 14,397 | r | #' Sentence Splitting
#'
#' \code{sentSplit} - Splits turns of talk into individual sentences (provided
#' proper punctuation is used). This procedure is usually done as part of the
#' data read in and cleaning process.
#'
#' @param dataframe A dataframe that contains the person and text variable.
#' @param text.v... |
## Thesis DSS
## Isabelle van Olphen - u308140
## Preprocessing pitch data
## Multidimensional drpfromts analyses to calculate maximum recurrence rates
#-------------------------------------------------------------------------------
# LOAD LIBRARIES
library("dplyr")
library("tidyr")
library("crqa")
library... | /Year1_pitch5_HOTIDY.R | no_license | isabellevanolphen/Thesis-DSS-Rscripts-IsabelleVO | R | false | false | 9,886 | r |
## Thesis DSS
## Isabelle van Olphen - u308140
## Preprocessing pitch data
## Multidimensional drpfromts analyses to calculate maximum recurrence rates
#-------------------------------------------------------------------------------
# LOAD LIBRARIES
library("dplyr")
library("tidyr")
library("crqa")
library... |
##### SECTION 1: GEOSIMEX SIMULATION FUNCTION #####
#setwd("~/Desktop/AidData/MeasureErrorsInEx/geoSIMEX/geoSIMEX")
#roxygen2::roxygenise()
#devtools::document()
# devtools::missing_s3()
# http://r-pkgs.had.co.nz/namespace.html
# https://stackoverflow.com/questions/31988875/creating-an-rpackage-usemethod-cant-find-fu... | /R/geoSIMEX.R | permissive | LeyliG/geoSIMEX | R | false | false | 84,749 | r | ##### SECTION 1: GEOSIMEX SIMULATION FUNCTION #####
#setwd("~/Desktop/AidData/MeasureErrorsInEx/geoSIMEX/geoSIMEX")
#roxygen2::roxygenise()
#devtools::document()
# devtools::missing_s3()
# http://r-pkgs.had.co.nz/namespace.html
# https://stackoverflow.com/questions/31988875/creating-an-rpackage-usemethod-cant-find-fu... |
library(dplyr)
marker.list <- readRDS('results/recount/markers/pairwise_leiden_pc3sd_r25e-3_marker_list_filtered_5th_perc.RDS')
unique.marker.list <- readRDS('results/recount/markers/pairwise_leiden_r25e-3_marker_list_filtered.RDS')
## cellmarker.info <- readRDS('data/recount/gene_lists/cell_marker_gene_table.RDS')
#... | /src/recount/markers/make_pairwise_marker_table.R | no_license | bruggsy/random_scripts | R | false | false | 2,510 | r | library(dplyr)
marker.list <- readRDS('results/recount/markers/pairwise_leiden_pc3sd_r25e-3_marker_list_filtered_5th_perc.RDS')
unique.marker.list <- readRDS('results/recount/markers/pairwise_leiden_r25e-3_marker_list_filtered.RDS')
## cellmarker.info <- readRDS('data/recount/gene_lists/cell_marker_gene_table.RDS')
#... |
nodeid.tbl_tree <- utils::getFromNamespace("nodeid.tbl_tree", "tidytree")
rootnode.tbl_tree <- utils::getFromNamespace("rootnode.tbl_tree", "tidytree")
offspring.tbl_tree <- utils::getFromNamespace("offspring.tbl_tree", "tidytree")
child.tbl_tree <- utils::getFromNamespace("child.tbl_tree", "tidytree")
parent.tbl_tree ... | /R/tidytree.R | no_license | xiangpin/ggtree | R | false | false | 404 | r | nodeid.tbl_tree <- utils::getFromNamespace("nodeid.tbl_tree", "tidytree")
rootnode.tbl_tree <- utils::getFromNamespace("rootnode.tbl_tree", "tidytree")
offspring.tbl_tree <- utils::getFromNamespace("offspring.tbl_tree", "tidytree")
child.tbl_tree <- utils::getFromNamespace("child.tbl_tree", "tidytree")
parent.tbl_tree ... |
context("test SOmap")
p <- SOmap(trim = -45, graticules = TRUE, fronts = TRUE)
test_that("SOmap returns a SOmap object", {
expect_s3_class(p, "SOmap")
expect_silent(print(p))
})
test_that("adding data to a plot is fine", {
longitudes <- c(-180, -90, 0, 90)
latitudes <- c(-50, -60, -50,-60)
expect_message(SOpl... | /tests/testthat/test-SOmap.R | no_license | xichaow/SOmap | R | false | false | 539 | r | context("test SOmap")
p <- SOmap(trim = -45, graticules = TRUE, fronts = TRUE)
test_that("SOmap returns a SOmap object", {
expect_s3_class(p, "SOmap")
expect_silent(print(p))
})
test_that("adding data to a plot is fine", {
longitudes <- c(-180, -90, 0, 90)
latitudes <- c(-50, -60, -50,-60)
expect_message(SOpl... |
library(tidyverse)
library(stringr)
library(lubridate)
library(forcats)
# preparar datos ----------------------------------------------------------
df.listas <- read.csv("proyecto/listverse_20pags.csv", stringsAsFactors = F)%>%
dplyr::select(-page) %>%
mutate_each(funs(gsub("u'|'|,| \\]", "", .)) ) %>%
mutate... | /proyecto/0_eda/02_eda_20pags.R | no_license | jwzinser/dpa_djms | R | false | false | 1,056 | r | library(tidyverse)
library(stringr)
library(lubridate)
library(forcats)
# preparar datos ----------------------------------------------------------
df.listas <- read.csv("proyecto/listverse_20pags.csv", stringsAsFactors = F)%>%
dplyr::select(-page) %>%
mutate_each(funs(gsub("u'|'|,| \\]", "", .)) ) %>%
mutate... |
## R for miRNA bed and mature location
options(stringsAsFactors = F)
data_input <- read.table("final_table.txt", sep = "\t", header = T, stringsAsFactors = F)
if("Extended_stem_loop_loc" %in% colnames(data_input)){
pre_miRNAs <- do.call('rbind', strsplit(data_input$Extended_stem_loop_loc, ":"))
pre_miRNAs <- cbin... | /Source_code/moduleiv/scripts/precursor_extraction.R | no_license | cma2015/iwa-miRNA | R | false | false | 1,908 | r | ## R for miRNA bed and mature location
options(stringsAsFactors = F)
data_input <- read.table("final_table.txt", sep = "\t", header = T, stringsAsFactors = F)
if("Extended_stem_loop_loc" %in% colnames(data_input)){
pre_miRNAs <- do.call('rbind', strsplit(data_input$Extended_stem_loop_loc, ":"))
pre_miRNAs <- cbin... |
# Check age cutoff with biggest disparity
df <- read.csv(file = "2_raw data/taiwan-data/UCI_Credit_Card.csv")
colnames(df)[which(names(df) == "default.payment.next.month")] <- "TARGET" #Attention is the opposite of Target
disparity <- NULL
for (cutoff in unique(df$AGE)){
df$AGE_cut <- sapply(df$AGE, function(x) ife... | /15_ageCutoffTaiwan.R | no_license | JohannesJacob/fairCreditScoring | R | false | false | 539 | r | # Check age cutoff with biggest disparity
df <- read.csv(file = "2_raw data/taiwan-data/UCI_Credit_Card.csv")
colnames(df)[which(names(df) == "default.payment.next.month")] <- "TARGET" #Attention is the opposite of Target
disparity <- NULL
for (cutoff in unique(df$AGE)){
df$AGE_cut <- sapply(df$AGE, function(x) ife... |
trunc_mat_ <- function(x, n = NULL){
rows <- nrow(x)
if (!is.na(rows) && rows == 0)
return()
if (is.null(n)) {
if (is.na(rows) || rows > 100) { n <- 10 }
else { n <- rows }
}
df <- as.data.frame(head(x, n))
if (nrow(df) == 0)
return()
# is_list <- vapply(df, is.list, logical(1))
# df... | /R/utils.r | permissive | alancan/rnoaa | R | false | false | 3,565 | r | trunc_mat_ <- function(x, n = NULL){
rows <- nrow(x)
if (!is.na(rows) && rows == 0)
return()
if (is.null(n)) {
if (is.na(rows) || rows > 100) { n <- 10 }
else { n <- rows }
}
df <- as.data.frame(head(x, n))
if (nrow(df) == 0)
return()
# is_list <- vapply(df, is.list, logical(1))
# df... |
# v12: pca and bca results added
# v11: sample coverage filter added
# v10 changes: now can remove outliers (e.g. 1% of most distant samples)
# v9 changes:
# a. now has an additional argument driv.number (is 10 if not indicated) - number of drivers in drivers_n output element
# b. new output $obs_bet_result contains r... | /Enterotyping_Raes_noise_removed_v12.R | no_license | Lev-genetik/CEDAR_mt | R | false | false | 9,140 | r | # v12: pca and bca results added
# v11: sample coverage filter added
# v10 changes: now can remove outliers (e.g. 1% of most distant samples)
# v9 changes:
# a. now has an additional argument driv.number (is 10 if not indicated) - number of drivers in drivers_n output element
# b. new output $obs_bet_result contains r... |
library("ExomeDepth")
library("GenomicRanges")
load("/home/rebecca/ExomeDepth/TSC_controls.RData")
output_folder <- '/home/rebecca/ExomeDepth/Control_Validation_Data/FemalePos/BRCAtest/'
setwd(output_folder)
bams_folder <- '/home/rebecca/ExomeDepth/Control_Validation_Data/FemalePos/'
#TSCmanifest <- '/home/rebecca/Ex... | /R_codefiles/TSC_ExomeDepth_ControlsLoop_v1.R | no_license | BeccaLH/ExomeDepth | R | false | false | 3,972 | r | library("ExomeDepth")
library("GenomicRanges")
load("/home/rebecca/ExomeDepth/TSC_controls.RData")
output_folder <- '/home/rebecca/ExomeDepth/Control_Validation_Data/FemalePos/BRCAtest/'
setwd(output_folder)
bams_folder <- '/home/rebecca/ExomeDepth/Control_Validation_Data/FemalePos/'
#TSCmanifest <- '/home/rebecca/Ex... |
\name{position_dodgev}
\alias{position_dodgev}
\title{position_dodgev}
\usage{
position_dodgev(width = NULL, height = NULL)
}
\arguments{
\item{width}{Refer to ggplot2}
\item{height}{Refer to ggplot2}
}
\value{
Not sure
}
\description{
Vertical dodging internal
}
\details{
A hacky adaptation of ggplot's po... | /man/position_dodgev.Rd | permissive | jknowles/coefplot | R | false | false | 579 | rd | \name{position_dodgev}
\alias{position_dodgev}
\title{position_dodgev}
\usage{
position_dodgev(width = NULL, height = NULL)
}
\arguments{
\item{width}{Refer to ggplot2}
\item{height}{Refer to ggplot2}
}
\value{
Not sure
}
\description{
Vertical dodging internal
}
\details{
A hacky adaptation of ggplot's po... |
#' Tidy software table
#'
#' Convert the software table to tidy format
#'
#' @param swsheet Tibble containing software table
#'
#' @return Tidy swsheet tibble
tidy_swsheet_tech <- function(swsheet) {
`%>%` <- magrittr::`%>%`
futile.logger::flog.info("Tidying data for technologies...")
tidyr:... | /R/manipulation.R | permissive | long-reads/lrt_test | R | false | false | 3,070 | r | #' Tidy software table
#'
#' Convert the software table to tidy format
#'
#' @param swsheet Tibble containing software table
#'
#' @return Tidy swsheet tibble
tidy_swsheet_tech <- function(swsheet) {
`%>%` <- magrittr::`%>%`
futile.logger::flog.info("Tidying data for technologies...")
tidyr:... |
abundance.by.weeks <- read.csv("~/Data/abundance by weeks.csv")
library("cooccur", lib.loc="~/R/R-3.2.0/library")
######"plyr" is needed for count function#######
library("plyr", lib.loc="~/R/R-3.2.0/library")
KARA<-abundance.by.weeks
rownames(KARA)<-KARA[,1]
KARA<-KARA[,-1]
####colmns includes 0 and the number of obs... | /Kara's Data/cooccur.r | no_license | skosowsky/Cooccur | R | false | false | 3,722 | r | abundance.by.weeks <- read.csv("~/Data/abundance by weeks.csv")
library("cooccur", lib.loc="~/R/R-3.2.0/library")
######"plyr" is needed for count function#######
library("plyr", lib.loc="~/R/R-3.2.0/library")
KARA<-abundance.by.weeks
rownames(KARA)<-KARA[,1]
KARA<-KARA[,-1]
####colmns includes 0 and the number of obs... |
inFile <- read.csv(file.choose(),header=FALSE,sep=",") # file with info
outFile <- file.choose() # file to deposit summary
close(file(outFile, open="w")) # erasing all content in file
mon <- 0
tue <- 0
wed <- 0
thu <- 0
fri <- 0
sat <- 0
sun <- 0
for (var in 1:17) {
mon <- mon + mean(inFile[,(var*7-6)])
... | /analyze/analyzeSchooldays.r | no_license | ESS-IA-Eaton/ESS-IA | R | false | false | 691 | r | inFile <- read.csv(file.choose(),header=FALSE,sep=",") # file with info
outFile <- file.choose() # file to deposit summary
close(file(outFile, open="w")) # erasing all content in file
mon <- 0
tue <- 0
wed <- 0
thu <- 0
fri <- 0
sat <- 0
sun <- 0
for (var in 1:17) {
mon <- mon + mean(inFile[,(var*7-6)])
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/callbacks.R
\name{xgb.gblinear.history}
\alias{xgb.gblinear.history}
\title{Extract gblinear coefficients history.}
\usage{
xgb.gblinear.history(model, class_index = NULL)
}
\arguments{
\item{model}{either an \code{xgb.Booster} or a result of... | /R-package/man/xgb.gblinear.history.Rd | permissive | GAOSHENG5337/xgboost | R | false | true | 1,143 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/callbacks.R
\name{xgb.gblinear.history}
\alias{xgb.gblinear.history}
\title{Extract gblinear coefficients history.}
\usage{
xgb.gblinear.history(model, class_index = NULL)
}
\arguments{
\item{model}{either an \code{xgb.Booster} or a result of... |
| pc = 0xc003 | a = 0x00 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | MEM[0x0500] = 0x01 |
| pc = 0xc006 | a = 0x00 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | MEM[0x0500] = 0x02 |
| pc = 0xc009 | a = 0x00 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | MEM[0x0500] = ... | /res/inc_abs_2.r | permissive | JSpuri/EmuParadise | R | false | false | 436 | r | | pc = 0xc003 | a = 0x00 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | MEM[0x0500] = 0x01 |
| pc = 0xc006 | a = 0x00 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | MEM[0x0500] = 0x02 |
| pc = 0xc009 | a = 0x00 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 00110100 | MEM[0x0500] = ... |
packages = c('nortest', 'tidyr', 'jsonlite')
for(package in packages) {
if (!require(package, character.only = TRUE)) {
install.packages(package, dependencies = TRUE)
}
library(package, character.only = TRUE)
}
get_linear_intersection = function(y_int_1, gradient_1, y_int_2, gradient_2, x_int_2=NU... | /R_helpers.R | permissive | JasonThomasData/data_science_helpers | R | false | false | 6,623 | r |
packages = c('nortest', 'tidyr', 'jsonlite')
for(package in packages) {
if (!require(package, character.only = TRUE)) {
install.packages(package, dependencies = TRUE)
}
library(package, character.only = TRUE)
}
get_linear_intersection = function(y_int_1, gradient_1, y_int_2, gradient_2, x_int_2=NU... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/startup_utils.R
\name{parse.file_ext}
\alias{parse.file_ext}
\title{Parse a file extension from a relative path}
\usage{
parse.file_ext(files = NULL, with_paths = FALSE)
}
\arguments{
\item{files}{takes a string or list of file names.}
\item... | /man/parse.file_ext.Rd | no_license | Rterial/Rtbase | R | false | true | 1,142 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/startup_utils.R
\name{parse.file_ext}
\alias{parse.file_ext}
\title{Parse a file extension from a relative path}
\usage{
parse.file_ext(files = NULL, with_paths = FALSE)
}
\arguments{
\item{files}{takes a string or list of file names.}
\item... |
# General conclusion:
# 1. This simulation shows that, generally, correlation of T statistics
# are not the same as sample correlation after accounting for treatment effects.
library(MASS)
mu1 <- c(0, 8); mu2 <- c(8,0)
sig1 <- 2; sig2 <- 1.5; rho <- 0.5
sigma <- matrix(c(sig1^2, rho*sig1*sig2, rho*sig1*sig2,... | /Miscellaneous/X2Tcorrelation.R | no_license | zhuob/CorrelatedTest | R | false | false | 12,367 | r | # General conclusion:
# 1. This simulation shows that, generally, correlation of T statistics
# are not the same as sample correlation after accounting for treatment effects.
library(MASS)
mu1 <- c(0, 8); mu2 <- c(8,0)
sig1 <- 2; sig2 <- 1.5; rho <- 0.5
sigma <- matrix(c(sig1^2, rho*sig1*sig2, rho*sig1*sig2,... |
# Jake Yeung
# Date of Creation: 2020-02-06
# File: ~/projects/scchic/scripts/rstudioserver_analysis/BM_all_merged/8-downstream_LDA_varfilt_GLMPCA_correct_devmode_allmarks.KeepMorePlates.final.R
#
rm(list=ls())
jstart <- Sys.time()
library(parallel)
library(dplyr)
library(tidyr)
library(ggplot2)
library(data.tab... | /scripts/rstudioserver_analysis/BM_all_merged/8-downstream_LDA_varfilt_GLMPCA_correct_devmode_allmarks.KeepBestPlates.final.R | no_license | jakeyeung/sortchicAllScripts | R | false | false | 7,306 | r | # Jake Yeung
# Date of Creation: 2020-02-06
# File: ~/projects/scchic/scripts/rstudioserver_analysis/BM_all_merged/8-downstream_LDA_varfilt_GLMPCA_correct_devmode_allmarks.KeepMorePlates.final.R
#
rm(list=ls())
jstart <- Sys.time()
library(parallel)
library(dplyr)
library(tidyr)
library(ggplot2)
library(data.tab... |
library(LSMonteCarlo)
### Name: firstValueRow
### Title: Returning the first >0 value in each row of a matrix
### Aliases: firstValueRow
### Keywords: Monte Carlo Option pricing American put
### ** Examples
mat<-matrix(c(0,0,2,0,4,0,3,0,1,9,8,7), ncol=4)
mat
firstValueRow(mat)
| /data/genthat_extracted_code/LSMonteCarlo/examples/firstValueRow.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 285 | r | library(LSMonteCarlo)
### Name: firstValueRow
### Title: Returning the first >0 value in each row of a matrix
### Aliases: firstValueRow
### Keywords: Monte Carlo Option pricing American put
### ** Examples
mat<-matrix(c(0,0,2,0,4,0,3,0,1,9,8,7), ncol=4)
mat
firstValueRow(mat)
|
library(readr)
library(tidyverse)
nycflights13 <- read_csv("D:/Downloads/nycflights13.csv")
attach(nycflights13)
december <- filter(nycflights13, month==12)
canceled <- filter(december, is.na(december$dep_time))
by_day <- group_by(canceled, canceled$day)
summarise(by_day, canceled = sum(is.na(dep_delay)))
flights_ca... | /Data Analysis and Vis/2_12.R | no_license | TheeEmuu/School | R | false | false | 381 | r | library(readr)
library(tidyverse)
nycflights13 <- read_csv("D:/Downloads/nycflights13.csv")
attach(nycflights13)
december <- filter(nycflights13, month==12)
canceled <- filter(december, is.na(december$dep_time))
by_day <- group_by(canceled, canceled$day)
summarise(by_day, canceled = sum(is.na(dep_delay)))
flights_ca... |
##Plot2, Course Project 1, Exploring Data
## Read and convert data to useful formats for plotting
##Note: I extracted Feb1-2 2007 from file and am just reading that
hpc_data<-read.csv2("household_power_consumption_Feb1-2.txt", na.strings="?", colClasses="character")
hpc_data$DateTime<-paste(hpc_data$Date, hpc_data$Tim... | /plot2.r | no_license | tcecere/ExData_Plotting1 | R | false | false | 676 | r | ##Plot2, Course Project 1, Exploring Data
## Read and convert data to useful formats for plotting
##Note: I extracted Feb1-2 2007 from file and am just reading that
hpc_data<-read.csv2("household_power_consumption_Feb1-2.txt", na.strings="?", colClasses="character")
hpc_data$DateTime<-paste(hpc_data$Date, hpc_data$Tim... |
#' Pairwise correlation coefficients between signatures
#'
#' As a measure of signature bleed, this method computes the Spearman correlation coefficient
#' between each pair of mutation signatures across the MCMC sample space.
#'
#' @param exposures_mcmc_output Output from get_exposures()
#'
#' @return A dataframe ... | /R/get_exposure_pairwise_correlations.R | no_license | mnstaube/SignIT | R | false | false | 1,127 | r | #' Pairwise correlation coefficients between signatures
#'
#' As a measure of signature bleed, this method computes the Spearman correlation coefficient
#' between each pair of mutation signatures across the MCMC sample space.
#'
#' @param exposures_mcmc_output Output from get_exposures()
#'
#' @return A dataframe ... |
#' Supervised Principal Component Analysis
#'
#' Unlike original principal component analysis (\code{\link{do.pca}}), this algorithm implements
#' a supervised version using response information for feature selection. For each feature/column,
#' its normalized association with \code{response} variable is computed and t... | /R/linear_SPC.R | no_license | dungcv/Rdimtools | R | false | false | 4,265 | r | #' Supervised Principal Component Analysis
#'
#' Unlike original principal component analysis (\code{\link{do.pca}}), this algorithm implements
#' a supervised version using response information for feature selection. For each feature/column,
#' its normalized association with \code{response} variable is computed and t... |
library(testthat)
# most common expectations:
# equality: expect_equal() and expect_identical()
# regexp: expect_match()
# catch-all: expect_true() and expect_false()
# console output: expect_output()
# messages: expect_message()
# warning: expect_warning()
# errors: expe... | /tests/testthat/test-B-16-getCellsTests.R | no_license | invegat/pivottabler | R | false | false | 46,590 | r | library(testthat)
# most common expectations:
# equality: expect_equal() and expect_identical()
# regexp: expect_match()
# catch-all: expect_true() and expect_false()
# console output: expect_output()
# messages: expect_message()
# warning: expect_warning()
# errors: expe... |
plot2 <- function(datafile = "hpc.txt"){
# LOAD DATA
# datafile input parameter is the original file with the data
# If a file for the required dates already exists with name hpc2.txt takes that file
if(file.exists("hpc2.txt")){
hpc2 <- read.table("hpc2.txt", h... | /plot2.r | no_license | safontj/ExData_Plotting1 | R | false | false | 1,495 | r | plot2 <- function(datafile = "hpc.txt"){
# LOAD DATA
# datafile input parameter is the original file with the data
# If a file for the required dates already exists with name hpc2.txt takes that file
if(file.exists("hpc2.txt")){
hpc2 <- read.table("hpc2.txt", h... |
#' Google Play Developer API
#' Lets Android application developers access their Google Play accounts.
#'
#' Auto-generated code by googleAuthR::gar_create_api_skeleton
#' at 2016-09-03 22:35:20
#' filename: /Users/mark/dev/R/autoGoogleAPI/googleandroidpublisherv11.auto/R/androidpublisher_functions.R
#' api_json: api... | /googleandroidpublisherv11.auto/R/androidpublisher_functions.R | permissive | Phippsy/autoGoogleAPI | R | false | false | 4,540 | r | #' Google Play Developer API
#' Lets Android application developers access their Google Play accounts.
#'
#' Auto-generated code by googleAuthR::gar_create_api_skeleton
#' at 2016-09-03 22:35:20
#' filename: /Users/mark/dev/R/autoGoogleAPI/googleandroidpublisherv11.auto/R/androidpublisher_functions.R
#' api_json: api... |
source("R/transform.R")
source("R/analysis.R")
# course information
COURSE_ID = "TsinghuaX/30700313_2015X/2015_T1"
INSTRUCTORS = c("ruby-cai")
# read data
data = read_csv_files(c("data/threads.csv", "data/comments.csv"),
c("id", "create_time", "user_id", "user_name", "course_id", "parent_id"),
... | /siena2015.R | no_license | JingjingBNU/siena-forum | R | false | false | 2,265 | r | source("R/transform.R")
source("R/analysis.R")
# course information
COURSE_ID = "TsinghuaX/30700313_2015X/2015_T1"
INSTRUCTORS = c("ruby-cai")
# read data
data = read_csv_files(c("data/threads.csv", "data/comments.csv"),
c("id", "create_time", "user_id", "user_name", "course_id", "parent_id"),
... |
############### A #############
chisq.test(table(A$t,A$age.lvl))
chisq.test(table(A$t,A$Sex))
chisq.test(table(A$t,A$Education))
chisq.test(table(A$t,A$Marriage))
chisq.test(table(A$so.lvl,A$age.lvl))
chisq.test(table(A$so.lvl,A$Sex))
chisq.test(table(A$so.lvl,A$Education))
chisq.test(table(A$so.lvl,A$M... | /chisqtest.R | no_license | iantsuising/psydata | R | false | false | 5,279 | r | ############### A #############
chisq.test(table(A$t,A$age.lvl))
chisq.test(table(A$t,A$Sex))
chisq.test(table(A$t,A$Education))
chisq.test(table(A$t,A$Marriage))
chisq.test(table(A$so.lvl,A$age.lvl))
chisq.test(table(A$so.lvl,A$Sex))
chisq.test(table(A$so.lvl,A$Education))
chisq.test(table(A$so.lvl,A$M... |
library(recommenderlab)
source("recom_NBMiner.R")
#data(Epub)
#Epub_s <- Epub[size(Epub)>3 & size(Epub)<60]
#es <- evaluation_scheme(Epub_s, "cross", k=4, given=3)
#save(es, file = "es_epub.rda")
load("es_epub.rda")
Ns <- c(1,2,3,5,10)
## best
param <- list(
AR_maxlen3_c08 = list("AR", list(supp=0.01, conf=0.8,... | /Work/NBMiner/test_epub.R | no_license | mhahsler/recommenderlab | R | false | false | 7,583 | r | library(recommenderlab)
source("recom_NBMiner.R")
#data(Epub)
#Epub_s <- Epub[size(Epub)>3 & size(Epub)<60]
#es <- evaluation_scheme(Epub_s, "cross", k=4, given=3)
#save(es, file = "es_epub.rda")
load("es_epub.rda")
Ns <- c(1,2,3,5,10)
## best
param <- list(
AR_maxlen3_c08 = list("AR", list(supp=0.01, conf=0.8,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CST_RainFARM.R
\name{RainFARM}
\alias{RainFARM}
\title{RainFARM stochastic precipitation downscaling (reduced version)}
\usage{
RainFARM(
data,
lon,
lat,
nf,
weights = 1,
nens = 1,
slope = 0,
kmin = 1,
fglob = FALSE,
fsmoo... | /man/RainFARM.Rd | no_license | cran/CSTools | R | false | true | 5,120 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CST_RainFARM.R
\name{RainFARM}
\alias{RainFARM}
\title{RainFARM stochastic precipitation downscaling (reduced version)}
\usage{
RainFARM(
data,
lon,
lat,
nf,
weights = 1,
nens = 1,
slope = 0,
kmin = 1,
fglob = FALSE,
fsmoo... |
\name{jezioro}
\alias{jezioro}
\alias{jezioro}
\docType{package}
\title{
jezioro
}
\description{
The \env{jezioro} package is a collection of functions and datasets intended for use in paleolimnological analyses by members of the Paleoecological Environmental Assessment and Research Laboratory (PEARL).
}
\details{
\ta... | /man/jezioro.Rd | no_license | shiggo/jezioro | R | false | false | 5,323 | rd | \name{jezioro}
\alias{jezioro}
\alias{jezioro}
\docType{package}
\title{
jezioro
}
\description{
The \env{jezioro} package is a collection of functions and datasets intended for use in paleolimnological analyses by members of the Paleoecological Environmental Assessment and Research Laboratory (PEARL).
}
\details{
\ta... |
library(gsalib)
library(ggplot2)
library(gplots)
library(tools)
library(reshape)
#
# Standard command line switch. Can we loaded interactively for development
# or executed with RScript
#
args = commandArgs(TRUE)
onCMDLine = ! is.na(args[1])
if ( onCMDLine ) {
inputFileName = args[1]
outputPDF = args[2]
} else {
... | /public/R/scripts/org/broadinstitute/sting/queue/util/queueJobReport.R | no_license | johandahlberg/gatk | R | false | false | 7,200 | r | library(gsalib)
library(ggplot2)
library(gplots)
library(tools)
library(reshape)
#
# Standard command line switch. Can we loaded interactively for development
# or executed with RScript
#
args = commandArgs(TRUE)
onCMDLine = ! is.na(args[1])
if ( onCMDLine ) {
inputFileName = args[1]
outputPDF = args[2]
} else {
... |
#-------------------------------------------------------------------------------
# Environment Set-up
#-------------------------------------------------------------------------------
rm(list=ls(all=TRUE))
gc()
# Load required libraries
pkgs <- c("caret", "data.table", "R.utils", "doSNOW", "h2o", "xgboost", "pROC", "ca... | /model/xgboost_cv/xgboost_cv.R | no_license | vikasnitk85/Homesite | R | false | false | 6,347 | r | #-------------------------------------------------------------------------------
# Environment Set-up
#-------------------------------------------------------------------------------
rm(list=ls(all=TRUE))
gc()
# Load required libraries
pkgs <- c("caret", "data.table", "R.utils", "doSNOW", "h2o", "xgboost", "pROC", "ca... |
## QQQ { not optimized, need to be changed
get.file.basename<- function(filename) {
tempname<-strsplit( basename(filename),".RData")[[1]][1]
basename<-paste( strsplit(tempname, "_")[[1]][1],strsplit(tempname, "_")[[1]][2],
strsplit(tempname, "_")[[1]][3],strsplit(tempname, "_")[[1]][4],sep="_")
... | /IGM.MEA/R/utils.R | no_license | ingted/R-Examples | R | false | false | 2,214 | r |
## QQQ { not optimized, need to be changed
get.file.basename<- function(filename) {
tempname<-strsplit( basename(filename),".RData")[[1]][1]
basename<-paste( strsplit(tempname, "_")[[1]][1],strsplit(tempname, "_")[[1]][2],
strsplit(tempname, "_")[[1]][3],strsplit(tempname, "_")[[1]][4],sep="_")
... |
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a documen... | /Writing_reports_with_knitr.md | no_license | gittesttesting/SWC_fall2018 | R | false | false | 755 | md | ```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.
When you click the **Knit** button a documen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/em.R
\name{m_step_mn}
\alias{m_step_mn}
\title{Maximize multinomial parameters in EM}
\usage{
m_step_mn(x, r, psc = 1e-04)
}
\arguments{
\item{x}{An n x p count matrix.}
\item{r}{An n x k membership prob. matrix.}
\item{psc}{Pseudocount.}
}... | /man/m_step_mn.Rd | no_license | cran/diem | R | false | true | 659 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/em.R
\name{m_step_mn}
\alias{m_step_mn}
\title{Maximize multinomial parameters in EM}
\usage{
m_step_mn(x, r, psc = 1e-04)
}
\arguments{
\item{x}{An n x p count matrix.}
\item{r}{An n x k membership prob. matrix.}
\item{psc}{Pseudocount.}
}... |
#' Update summary text file
#'
#' Add text to log file and update text log file - used mostly for development
#'
#' @param newText new text to add to the log file
#' @param ... additional lines of text
#' @param logText character vector of existing text of log file
#'
#' @return Returns text for the log file
#' @export... | /R/UpdateLogText.R | no_license | ankitshah009/lcmsMetab | R | false | false | 679 | r | #' Update summary text file
#'
#' Add text to log file and update text log file - used mostly for development
#'
#' @param newText new text to add to the log file
#' @param ... additional lines of text
#' @param logText character vector of existing text of log file
#'
#' @return Returns text for the log file
#' @export... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.