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 |
|---|---|---|---|---|---|---|---|---|---|
#' Prices of 50,000 round cut diamonds.
#'
#' A dataset containing one row per entry in the PRISMA diagram.
#'
#' @format A data frame with 10 rows and 4 variables:
#' \describe{
#' \item{Pub.ID}{Pubblication unique identifier}
#' \item{Source}{Source identifier}
#' \item{Filter}{Filter identifier}
#' }
"studySt... | /R/data.R | permissive | ltrainstg/prismadiagramR | R | false | false | 326 | r | #' Prices of 50,000 round cut diamonds.
#'
#' A dataset containing one row per entry in the PRISMA diagram.
#'
#' @format A data frame with 10 rows and 4 variables:
#' \describe{
#' \item{Pub.ID}{Pubblication unique identifier}
#' \item{Source}{Source identifier}
#' \item{Filter}{Filter identifier}
#' }
"studySt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/randomEffectsStructures.R
\name{setReTrm}
\alias{findReTrmClasses}
\alias{getAddArgs}
\alias{ranef.reTrmStruct}
\alias{setReTrm}
\alias{setReTrm.default}
\title{Set model matrix slice and relative covariance factor block for a
random effects ... | /man/setReTrm.Rd | no_license | bbolker/lme4ord | R | false | true | 2,949 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/randomEffectsStructures.R
\name{setReTrm}
\alias{findReTrmClasses}
\alias{getAddArgs}
\alias{ranef.reTrmStruct}
\alias{setReTrm}
\alias{setReTrm.default}
\title{Set model matrix slice and relative covariance factor block for a
random effects ... |
#this is broken right now. it only works for tcga data. other data needs to be appropriately wrangeled. if downloaded from github file pathws should be changeed for the local computer.
#add loop for output formats
dummy <- runif(5)
rm_list <- ls()
rm_list <- rm_list[!(rm_list %in% c("expression_data","tpm... | /scripts/load_data_normalize_joined_umap.R | no_license | jam1015/umap_survival_analysis | R | false | false | 25,789 | r |
#this is broken right now. it only works for tcga data. other data needs to be appropriately wrangeled. if downloaded from github file pathws should be changeed for the local computer.
#add loop for output formats
dummy <- runif(5)
rm_list <- ls()
rm_list <- rm_list[!(rm_list %in% c("expression_data","tpm... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/google_place_autocomplete.R
\name{google_place_autocomplete}
\alias{google_place_autocomplete}
\title{Google place autocomplete}
\usage{
google_place_autocomplete(place_input, location = NULL, radius = NULL,
language = NULL, place_type = NU... | /man/google_place_autocomplete.Rd | no_license | applied-statistic-using-r/googleway | R | false | true | 2,832 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/google_place_autocomplete.R
\name{google_place_autocomplete}
\alias{google_place_autocomplete}
\title{Google place autocomplete}
\usage{
google_place_autocomplete(place_input, location = NULL, radius = NULL,
language = NULL, place_type = NU... |
## Tests for .sampleBackgroundDistribution
## library(Rtpca); library(testthat)
context(".sampleBackgroundDistribution")
library(dplyr)
library(Biobase)
dist_mat <- as.matrix(dist(matrix(1:20, ncol = 4)))
set.seed(1)
backSampl <- Rtpca:::.sampleBackgroundDistribution(
distMat = dist_mat, nMem = 3)
expect_equal(... | /tests/testthat/test-sampleBackgroundDistribution.R | no_license | nkurzaw/Rtpca | R | false | false | 354 | r | ## Tests for .sampleBackgroundDistribution
## library(Rtpca); library(testthat)
context(".sampleBackgroundDistribution")
library(dplyr)
library(Biobase)
dist_mat <- as.matrix(dist(matrix(1:20, ncol = 4)))
set.seed(1)
backSampl <- Rtpca:::.sampleBackgroundDistribution(
distMat = dist_mat, nMem = 3)
expect_equal(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\name{books}
\alias{books}
\title{Book}
\usage{
books(text = "text1")
}
\arguments{
\item{text}{The text to return.}
}
\description{
Access data useful to follow along the \href{https://www.nltk.org/book}{NLTK Book}.
}
\examples{
\dont... | /man/books.Rd | permissive | news-r/nltk4r | R | false | true | 417 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\name{books}
\alias{books}
\title{Book}
\usage{
books(text = "text1")
}
\arguments{
\item{text}{The text to return.}
}
\description{
Access data useful to follow along the \href{https://www.nltk.org/book}{NLTK Book}.
}
\examples{
\dont... |
#################################################################
### Introdução à Estatística para Linguística, v2.0, fev/2021 ###
###### L. Oushiro ######
###### Lição 14: Regressão Logística Parte 1 ######
########################################################... | /Licao14-IEL.R | permissive | oushiro/IELv2.0 | R | false | false | 7,580 | r | #################################################################
### Introdução à Estatística para Linguística, v2.0, fev/2021 ###
###### L. Oushiro ######
###### Lição 14: Regressão Logística Parte 1 ######
########################################################... |
#analysing data from LA LMS
pacman::p_load(dplyr, ggplot2, ggplot2,tidyverse,magrittr, lubridate,wordcloud2, bupaR, processanimateR)
#from Adminer, export data from mdl_logstore_standard_log #into csv - gzip format
#data
folder = 'E:/data/LMSDU'
list.files(folder)
zz=gzfile('E:/data/LMSAU/mdl_logstore_standard_log.... | /LMS/lms_A1.R | no_license | loxavia/rphd | R | false | false | 7,516 | r | #analysing data from LA LMS
pacman::p_load(dplyr, ggplot2, ggplot2,tidyverse,magrittr, lubridate,wordcloud2, bupaR, processanimateR)
#from Adminer, export data from mdl_logstore_standard_log #into csv - gzip format
#data
folder = 'E:/data/LMSDU'
list.files(folder)
zz=gzfile('E:/data/LMSAU/mdl_logstore_standard_log.... |
## turn a proportion into a percentage with 2 decimal places rounding
prop_to_perc <- function(x, dec = 2) {
x_no_na <- x[!is.na(x)]
if (any(x_no_na < 0 | x_no_na >1)) stop("x is not a proportion")
round(100 * x, dec)
}
## isoyear and week as character
isoweek_char <- function(x) paste0(lubridate::isoyear(x)... | /assignment1/report_factories_templates/alerts/scripts/formatting.R | no_license | jamesmbaazam/sacema-smarties | R | false | false | 1,867 | r |
## turn a proportion into a percentage with 2 decimal places rounding
prop_to_perc <- function(x, dec = 2) {
x_no_na <- x[!is.na(x)]
if (any(x_no_na < 0 | x_no_na >1)) stop("x is not a proportion")
round(100 * x, dec)
}
## isoyear and week as character
isoweek_char <- function(x) paste0(lubridate::isoyear(x)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wpd.r
\name{wpd}
\alias{wpd}
\title{wpd}
\usage{
wpd(s, s_phylo, w = NULL, nested_set = NULL, metric = "Hp")
}
\arguments{
\item{s}{character vector. One species name per observation. If no species was
observed for a given datum, use NA. s ca... | /man/wpd.Rd | no_license | darcyj/specificity | R | false | true | 3,529 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wpd.r
\name{wpd}
\alias{wpd}
\title{wpd}
\usage{
wpd(s, s_phylo, w = NULL, nested_set = NULL, metric = "Hp")
}
\arguments{
\item{s}{character vector. One species name per observation. If no species was
observed for a given datum, use NA. s ca... |
## This code is part of the megaptera package
## © C. Heibl 2014 (last update 2014-12-17)
sql.wrap <- function(x, term = "spec", operator = "=", BOOL = "OR", regex = TRUE, by = 500) {
operator <- match.arg(operator, c("=", "~"))
if ( !is.numeric(x) ) {
if ( regex ){
x <- gsub("([(]|[)]|[+]|[.])", "[\\... | /R/sql.wrap.R | no_license | heibl/megaptera | R | false | false | 945 | r | ## This code is part of the megaptera package
## © C. Heibl 2014 (last update 2014-12-17)
sql.wrap <- function(x, term = "spec", operator = "=", BOOL = "OR", regex = TRUE, by = 500) {
operator <- match.arg(operator, c("=", "~"))
if ( !is.numeric(x) ) {
if ( regex ){
x <- gsub("([(]|[)]|[+]|[.])", "[\\... |
library(ggplot2)
require(devEMF)
emf('../log/idle/precopy/downtime0.03/ram1024/vcpu1/speed125/default/4.emf')
#png("../log/idle/precopy/downtime0.03/ram1024/vcpu1/speed125/default/4.emf")
#postscript("plot.eps")
#emf("plot.emf")
#cpus <- scan (pipe("awk '{print }' ../log/idle/precopy/downtime0.03/ram1024/vcpu1/speed... | /log/idle/precopy/downtime0.03/ram1024/vcpu1/speed32/default/4.R | no_license | david78k/migration | R | false | false | 2,676 | r | library(ggplot2)
require(devEMF)
emf('../log/idle/precopy/downtime0.03/ram1024/vcpu1/speed125/default/4.emf')
#png("../log/idle/precopy/downtime0.03/ram1024/vcpu1/speed125/default/4.emf")
#postscript("plot.eps")
#emf("plot.emf")
#cpus <- scan (pipe("awk '{print }' ../log/idle/precopy/downtime0.03/ram1024/vcpu1/speed... |
df <- read.csv("TV_by_network_daypart.csv")
str(births)
getwd()
df1 <- as.data.frame(unique(df$daypart))
df1[1:4,]
df2 <- as.data.frame(unique(df$network))
births$date
str(births$date)
birthstimeseries <- ts(births)
birthstimeseries
library(dplyr)
im <- function(df,i,j){
daypart1 <- df %>% filt... | /time_ser_prashant.R | no_license | ps5579611/Forecasting | R | false | false | 5,250 | r | df <- read.csv("TV_by_network_daypart.csv")
str(births)
getwd()
df1 <- as.data.frame(unique(df$daypart))
df1[1:4,]
df2 <- as.data.frame(unique(df$network))
births$date
str(births$date)
birthstimeseries <- ts(births)
birthstimeseries
library(dplyr)
im <- function(df,i,j){
daypart1 <- df %>% filt... |
R version 3.4.2 (2017-09-28) -- "Short Summer"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)
R ist freie Software und kommt OHNE JEGLICHE GARANTIE.
Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten.
Tippen Sie 'license()' or 'licence... | /plot2.r | no_license | AdelaAdela/ExData_Plotting1 | R | false | false | 1,797 | r |
R version 3.4.2 (2017-09-28) -- "Short Summer"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)
R ist freie Software und kommt OHNE JEGLICHE GARANTIE.
Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten.
Tippen Sie 'license()' or 'licence... |
library(tidyverse)
library(ggnewscale)
library(rgdal)
library(RColorBrewer)
library(sp)
library(sf)
library(viridisLite)
# environment for data caching
.STACYmap <- environment()
# style options
GLOBAL_STACY_OPTIONS <- list(
GLOBAL_CRS = list(equirectangular = 'fixed',
robinson = '+proj=robin',
... | /Functions/STACYmap_PMIL_NAgrid_discrete.R | no_license | ginnyweasleyIUP/202109_SISAL1k | R | false | false | 29,947 | r | library(tidyverse)
library(ggnewscale)
library(rgdal)
library(RColorBrewer)
library(sp)
library(sf)
library(viridisLite)
# environment for data caching
.STACYmap <- environment()
# style options
GLOBAL_STACY_OPTIONS <- list(
GLOBAL_CRS = list(equirectangular = 'fixed',
robinson = '+proj=robin',
... |
#'Finds Place of Peak Along PeakVetor
#'
#'given a starting location and a list of peaks, finds where a given connString would fit (i.e. a coordinate)
#'
#' @param connString the conn format peak you are looking to locate
#' @param peaksVector the numerically sorted list of peaks you're searching through
#' @param star... | /R/findCoord.R | no_license | samrosean/ciceroAddition | R | false | false | 1,206 | r | #'Finds Place of Peak Along PeakVetor
#'
#'given a starting location and a list of peaks, finds where a given connString would fit (i.e. a coordinate)
#'
#' @param connString the conn format peak you are looking to locate
#' @param peaksVector the numerically sorted list of peaks you're searching through
#' @param star... |
#Andrew Hawker
#Computing for Data Analysis (Winter 2013)
#Assignment #3 - Part 3
#https://class.coursera.org/compdata-002/assignment/view?assignment_id=4
#Read outcome data and coerce.
data <- read.csv("outcome-of-care-measures.csv", colClasses="character")
data[,11] <- as.numeric(data[,11])
#Number of observations ... | /HW3/hw3-part3.r | no_license | ahawker/data-analysis-coursera | R | false | false | 1,069 | r | #Andrew Hawker
#Computing for Data Analysis (Winter 2013)
#Assignment #3 - Part 3
#https://class.coursera.org/compdata-002/assignment/view?assignment_id=4
#Read outcome data and coerce.
data <- read.csv("outcome-of-care-measures.csv", colClasses="character")
data[,11] <- as.numeric(data[,11])
#Number of observations ... |
# Michael Huang
# Homework 7
# Adekoya
# Problem 5
# 5(b)
f <- function(x) {
-1*(x^5) - cos(x)
}
df <- function(x) {
-5*(x^4) + sin(x)
}
u <- 500
x <- 1
steps <- 0
while (abs(u)/abs(x) > 1e-4) {
u <- f(x) / df(x)
x <- x - u
steps <- steps + 1
}
x
steps
# 5(c)
# One change that we could make to the New... | /HW7/H7_P5.r | no_license | michaelghuang19/cfrm405 | R | false | false | 1,125 | r | # Michael Huang
# Homework 7
# Adekoya
# Problem 5
# 5(b)
f <- function(x) {
-1*(x^5) - cos(x)
}
df <- function(x) {
-5*(x^4) + sin(x)
}
u <- 500
x <- 1
steps <- 0
while (abs(u)/abs(x) > 1e-4) {
u <- f(x) / df(x)
x <- x - u
steps <- steps + 1
}
x
steps
# 5(c)
# One change that we could make to the New... |
/R_script_inventory/22035.R | no_license | ShawnPengxy/loupeman | R | false | false | 2,906 | r | ||
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "PhishingWebsites")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Result")
lrn = makeL... | /models/openml_PhishingWebsites/classification_Result/16050481ef799e35110d5cdd7b61da16/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 725 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "PhishingWebsites")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Result")
lrn = makeL... |
install.packages(c("arules","arulesViz","TSP","prabclus","Matrix","trimcluster"))
#######################
library(lattice)
library(ggplot2)
library(caret)
library(rpart)
library(rpart.plot)
library(corrplot)
library(RColorBrewer)
library(randomForest)
library(plotly)
library(data.table)
library(dplyr)
##... | /RScript 07.1 - AssociationProducts.R | no_license | Ubiqum-Data-Bcn-111/task2-4-basket-analysis-javiervillasmil | R | false | false | 24,374 | r | install.packages(c("arules","arulesViz","TSP","prabclus","Matrix","trimcluster"))
#######################
library(lattice)
library(ggplot2)
library(caret)
library(rpart)
library(rpart.plot)
library(corrplot)
library(RColorBrewer)
library(randomForest)
library(plotly)
library(data.table)
library(dplyr)
##... |
# Name: MCDA_Bangladesh.r
# Author: Chelsea Peters, PhD Candidate, Vanderbilt University
# Contact: chelsea.n.peters@vanderbilt.edu, chelspeters7@gmail.com
# Last updated: 6/9/17
# Purpose: Run each MCDA method (MAVT, AHP, ELECTRE I, ELECTRE III) and general plotting of ranking
# of different drinking water sources in ... | /MCDA_Bangladesh.R | no_license | chelspeters7/BanglaMCDA | R | false | false | 3,814 | r | # Name: MCDA_Bangladesh.r
# Author: Chelsea Peters, PhD Candidate, Vanderbilt University
# Contact: chelsea.n.peters@vanderbilt.edu, chelspeters7@gmail.com
# Last updated: 6/9/17
# Purpose: Run each MCDA method (MAVT, AHP, ELECTRE I, ELECTRE III) and general plotting of ranking
# of different drinking water sources in ... |
clus_grp <- function(x){
set.seed(7)
return(train(Level~., data=dhc1, method=x, trControl=control))
}
m1=clus_grp('enet')
m2=clus_grp('lars')
m3=clus_grp('rlm')
br=resamples(list(ENET=m1,LARS=m2,RLM=m3))
summary(br)
modelCor(br)
clus_grp_1 <- function(x){
set.seed(7)
return(train(Level~., data=dhc2, method... | /DDUS-Regression/Clust_corr.R | no_license | shahriariit/DDUS | R | false | false | 486 | r | clus_grp <- function(x){
set.seed(7)
return(train(Level~., data=dhc1, method=x, trControl=control))
}
m1=clus_grp('enet')
m2=clus_grp('lars')
m3=clus_grp('rlm')
br=resamples(list(ENET=m1,LARS=m2,RLM=m3))
summary(br)
modelCor(br)
clus_grp_1 <- function(x){
set.seed(7)
return(train(Level~., data=dhc2, method... |
#2장. 소셜 빅데이터 분석방법론
#2. 통계분석
#수집된 자료를 이해하기 쉬운 수치로 요약하는 기술통계
#모집단을 대표하는 표본을 추출해 표본의 특성값으로 모집단의 모수를 추정하는 추리통계가 있다
#1)기술통계분석: 변수들이 지닌 분포의 특성 파악해야 하는데, 수집된 자료를 요약/정리하여
# 자료의 특성 파악하기 위한 것(중심위치, 산포도, 왜도, 첨도 등)
#(1)중심위치(대푯값): 자료가 어느 위치에 집중되어 있는가
#ex)산술평균, 중앙값, 최빈값, 4분위수, 백분위수
#(2)산포도: 자료의 퍼짐 정도와 분... | /범죄예측2장/통계분석.R | no_license | jaehyunHa/hello | R | false | false | 35,302 | r | #2장. 소셜 빅데이터 분석방법론
#2. 통계분석
#수집된 자료를 이해하기 쉬운 수치로 요약하는 기술통계
#모집단을 대표하는 표본을 추출해 표본의 특성값으로 모집단의 모수를 추정하는 추리통계가 있다
#1)기술통계분석: 변수들이 지닌 분포의 특성 파악해야 하는데, 수집된 자료를 요약/정리하여
# 자료의 특성 파악하기 위한 것(중심위치, 산포도, 왜도, 첨도 등)
#(1)중심위치(대푯값): 자료가 어느 위치에 집중되어 있는가
#ex)산술평균, 중앙값, 최빈값, 4분위수, 백분위수
#(2)산포도: 자료의 퍼짐 정도와 분... |
library(dataonderivatives)
### Name: cme
### Title: Get CME SDR data
### Aliases: cme cme_field_specs
### ** Examples
## Not run:
##D library(lubridate)
##D cme(ymd(20150506), "CO")
## End(Not run)
| /data/genthat_extracted_code/dataonderivatives/examples/cme.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 206 | r | library(dataonderivatives)
### Name: cme
### Title: Get CME SDR data
### Aliases: cme cme_field_specs
### ** Examples
## Not run:
##D library(lubridate)
##D cme(ymd(20150506), "CO")
## End(Not run)
|
power <- read.delim("household_power_consumption.txt", header = TRUE, sep = ";", dec = ".", colClasses = c("character", "character", "numeric","numeric","numeric", "numeric", "numeric","numeric","numeric"), na.strings = "?")
power2day<- subset(power, (power$Date == "1/2/2007"| power$Date =="2/2/2007"))
power2day$date_t... | /Plot2.R | no_license | oyhx/ExData_Plotting1 | R | false | false | 704 | r | power <- read.delim("household_power_consumption.txt", header = TRUE, sep = ";", dec = ".", colClasses = c("character", "character", "numeric","numeric","numeric", "numeric", "numeric","numeric","numeric"), na.strings = "?")
power2day<- subset(power, (power$Date == "1/2/2007"| power$Date =="2/2/2007"))
power2day$date_t... |
library(data.table)
library(ggplot2)
library(scales)
###########
# GLOBALS #
###########
hist_before_file <- snakemake@input[["hist_before"]]
hist_after_file <- snakemake@input[["hist_after"]]
peak_file <- snakemake@input[["peaks"]]
plot_file <- snakemake@output[["plot"]]
log_file <- snakemake@log[["log"]]
# dev
# h... | /src/plot_kmer_coverage.R | no_license | TomHarrop/mh-illumina | R | false | false | 2,351 | r | library(data.table)
library(ggplot2)
library(scales)
###########
# GLOBALS #
###########
hist_before_file <- snakemake@input[["hist_before"]]
hist_after_file <- snakemake@input[["hist_after"]]
peak_file <- snakemake@input[["peaks"]]
plot_file <- snakemake@output[["plot"]]
log_file <- snakemake@log[["log"]]
# dev
# h... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RequestPattern.R
\name{HeadersPattern}
\alias{HeadersPattern}
\title{HeadersPattern}
\description{
headers matcher
}
\details{
\code{webmockr} normalises headers and treats all forms of same headers as equal:
i.e the following two sets of hea... | /man/HeadersPattern.Rd | permissive | aaronwolen/webmockr | R | false | true | 4,174 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RequestPattern.R
\name{HeadersPattern}
\alias{HeadersPattern}
\title{HeadersPattern}
\description{
headers matcher
}
\details{
\code{webmockr} normalises headers and treats all forms of same headers as equal:
i.e the following two sets of hea... |
## Copyright 2013 Nick Polson, James Scott, and Jesse Windle.
## This file is part of BayesLogit, distributed under the GNU General Public
## License version 3 or later and without ANY warranty, implied or otherwise.
norm.llh <- function(x, m, S)
{
n = length(x)
evd = eigen(S, symmetric=TRUE);
y = t(evd$vect... | /Code/R/MultLogitScott.R | no_license | lawmurray/BayesLogit | R | false | false | 2,277 | r | ## Copyright 2013 Nick Polson, James Scott, and Jesse Windle.
## This file is part of BayesLogit, distributed under the GNU General Public
## License version 3 or later and without ANY warranty, implied or otherwise.
norm.llh <- function(x, m, S)
{
n = length(x)
evd = eigen(S, symmetric=TRUE);
y = t(evd$vect... |
SHOWPLATES <-
function(vard='NumBins',p=1,txt='Tag',pathpdf=0,logv=F){
b.01=t(data.binary$data.binary)
b.height=t(data.binary$data.height)
b.size=t(data.binary$data.size)
### Prepare diagnostics
nbbin=rowSums(b.01)
binFreq=colMeans(b.01,na.rm=T)
binFR=t(t(b.01)*binFreq)
binFR[binFR==0]=NA
binFR=rowMe... | /RawGeno/R/SHOWPLATES.R | no_license | arrigon/RawGeno | R | false | false | 3,538 | r | SHOWPLATES <-
function(vard='NumBins',p=1,txt='Tag',pathpdf=0,logv=F){
b.01=t(data.binary$data.binary)
b.height=t(data.binary$data.height)
b.size=t(data.binary$data.size)
### Prepare diagnostics
nbbin=rowSums(b.01)
binFreq=colMeans(b.01,na.rm=T)
binFR=t(t(b.01)*binFreq)
binFR[binFR==0]=NA
binFR=rowMe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clinmon.R
\name{clinmon}
\alias{clinmon}
\title{Hemodynamic Indices Calculated From Clinical Monitoring (clinmon)}
\usage{
clinmon(df, variables,
trigger = NULL, deleter = NULL,
blocksize = 3, epochsize = 20,
overlapping = FALSE, freq = 1000,... | /man/clinmon.Rd | no_license | ClinicoPath/clintools | R | false | true | 10,534 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clinmon.R
\name{clinmon}
\alias{clinmon}
\title{Hemodynamic Indices Calculated From Clinical Monitoring (clinmon)}
\usage{
clinmon(df, variables,
trigger = NULL, deleter = NULL,
blocksize = 3, epochsize = 20,
overlapping = FALSE, freq = 1000,... |
library(BNSL)
### Name: mi
### Title: Bayesian Estimation of Mutual Information
### Aliases: mi
### ** Examples
n=100
x=rbinom(n,1,0.5); y=rbinom(n,1,0.5); mi(x,y)
z=rbinom(n,1,0.1); y=(x+z)
mi(x,y); mi(x,y,proc=1); mi(x,y,2)
x=rnorm(n); y=rnorm(n); mi(x,y,proc=10)
x=rnorm(n); z=rnorm(n); y=0.9*x+sqrt(1-0.9^2... | /data/genthat_extracted_code/BNSL/examples/mi.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 345 | r | library(BNSL)
### Name: mi
### Title: Bayesian Estimation of Mutual Information
### Aliases: mi
### ** Examples
n=100
x=rbinom(n,1,0.5); y=rbinom(n,1,0.5); mi(x,y)
z=rbinom(n,1,0.1); y=(x+z)
mi(x,y); mi(x,y,proc=1); mi(x,y,2)
x=rnorm(n); y=rnorm(n); mi(x,y,proc=10)
x=rnorm(n); z=rnorm(n); y=0.9*x+sqrt(1-0.9^2... |
# Yige Wu @ WashU 2018 Jan
# look at the intersections of consistently high/low kinase-substrate pairs in BRCA, OV and CO datasets
# source -------------------------------------------------------------------
source('/Users/yigewu/Box Sync/cptac2p_analysis/phospho_network/phospho_network_shared.R')
source(paste0(baseD... | /phospho_network/archives/classify/figures/upsetR_ks_pairs.R | no_license | ding-lab/phospho-signaling | R | false | false | 4,633 | r | # Yige Wu @ WashU 2018 Jan
# look at the intersections of consistently high/low kinase-substrate pairs in BRCA, OV and CO datasets
# source -------------------------------------------------------------------
source('/Users/yigewu/Box Sync/cptac2p_analysis/phospho_network/phospho_network_shared.R')
source(paste0(baseD... |
library(RMySQL)
library(readxl)
library(data.table)
db <- dbConnect(MySQL(), user='',password='', dbname='', host='')
dbListTables(db)
medicine <- dbSendQuery(db, "SELECT * FROM popmedicinecity")
medicine <- dbFetch(medicine, n = -1)
Encoding(medicine$sidoName)<- "UTF-8"
medicine
realPatient <- read_xlsx("./DataSet... | /Script/test2.R | no_license | LoveAndCode/DiseasePrediction_DALAB | R | false | false | 5,230 | r | library(RMySQL)
library(readxl)
library(data.table)
db <- dbConnect(MySQL(), user='',password='', dbname='', host='')
dbListTables(db)
medicine <- dbSendQuery(db, "SELECT * FROM popmedicinecity")
medicine <- dbFetch(medicine, n = -1)
Encoding(medicine$sidoName)<- "UTF-8"
medicine
realPatient <- read_xlsx("./DataSet... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_documentation.R
\docType{data}
\name{arat_pmm}
\alias{arat_pmm}
\alias{arat}
\title{The Arat measure of democracy}
\format{
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 3873 rows and 7 columns.
}
\s... | /man/arat_pmm.Rd | no_license | matthewstidham/democracyData | R | false | true | 4,795 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_documentation.R
\docType{data}
\name{arat_pmm}
\alias{arat_pmm}
\alias{arat}
\title{The Arat measure of democracy}
\format{
An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 3873 rows and 7 columns.
}
\s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predictions.R
\name{cond_sim}
\alias{cond_sim}
\title{Conditional Simulation using Vecchia's approximation}
\usage{
cond_sim(fit = NULL, locs_pred, X_pred, y_obs = fit$y,
locs_obs = fit$locs, X_obs = fit$X, beta = fit$betahat,
covparms = ... | /man/cond_sim.Rd | no_license | katzfuss/GpGp | R | false | true | 1,962 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predictions.R
\name{cond_sim}
\alias{cond_sim}
\title{Conditional Simulation using Vecchia's approximation}
\usage{
cond_sim(fit = NULL, locs_pred, X_pred, y_obs = fit$y,
locs_obs = fit$locs, X_obs = fit$X, beta = fit$betahat,
covparms = ... |
# from terminal
# docker run -p 25:25 --name smtp namshi/smtp
# Alternate 1 (From R):
# system("docker pull namshi/smtp")
# system("docker run -p 25:25 namshi/smtp", wait = FALSE)
# Alternate 1 (From R Studio):
# tid <- rstudioapi::terminalExecute("docker pull namshi/smtp")
# tid <- rstudioapi::terminalExecute(... | /week_8/setup_smtp.R | no_license | elmstedt/ucla_mas_discussion | R | false | false | 1,475 | r | # from terminal
# docker run -p 25:25 --name smtp namshi/smtp
# Alternate 1 (From R):
# system("docker pull namshi/smtp")
# system("docker run -p 25:25 namshi/smtp", wait = FALSE)
# Alternate 1 (From R Studio):
# tid <- rstudioapi::terminalExecute("docker pull namshi/smtp")
# tid <- rstudioapi::terminalExecute(... |
#====================================================================#
# Author: Damian Gwozdz (DG)
# Function: difs
# Creation date: 31AUG2017
# Last modified: -
# Description: Function to add differences of selected variables
# to the given dataset
# Required... | /difs.R | permissive | dgwozdz/OLS | R | false | false | 1,116 | r | #====================================================================#
# Author: Damian Gwozdz (DG)
# Function: difs
# Creation date: 31AUG2017
# Last modified: -
# Description: Function to add differences of selected variables
# to the given dataset
# Required... |
library(dcemriS4)
### Name: ADC.fast
### Title: Estimate the Apparent Diffusion Coefficient (ADC)
### Aliases: ADC.fast ADC.fast,array-method adc.lm
### Keywords: models
### ** Examples
S0 <- 10
b <- c(0, 50, 400, 800) # units?
D <- 0.7e-3 # mm^2 / sec (normal white matter)
## Signal intensities base... | /data/genthat_extracted_code/dcemriS4/examples/ADC-methods.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 895 | r | library(dcemriS4)
### Name: ADC.fast
### Title: Estimate the Apparent Diffusion Coefficient (ADC)
### Aliases: ADC.fast ADC.fast,array-method adc.lm
### Keywords: models
### ** Examples
S0 <- 10
b <- c(0, 50, 400, 800) # units?
D <- 0.7e-3 # mm^2 / sec (normal white matter)
## Signal intensities base... |
library(perform)
reconnect()
rivers<-c("wb jimmy","wb mitchell","wb obear","west brook")
r<-"west brook"
# for(sp in c("bkt","bnt")){
sp<-"bnt"
# for(sp in c("ats")){
if(sp=="bnt"&r=="wb obear") next
priors<-list(bkt=list(tOptMean=0,#14.2,
tOptPrecision=0.0001,
... | /vignettes/westBrook/wbCrossValidation.R | no_license | evanchildress/perform | R | false | false | 5,443 | r | library(perform)
reconnect()
rivers<-c("wb jimmy","wb mitchell","wb obear","west brook")
r<-"west brook"
# for(sp in c("bkt","bnt")){
sp<-"bnt"
# for(sp in c("ats")){
if(sp=="bnt"&r=="wb obear") next
priors<-list(bkt=list(tOptMean=0,#14.2,
tOptPrecision=0.0001,
... |
#' @name Pentosan
#' @docType data
#' @title Pentosan Dataset
#'
#' @description
#' A benchmark dataset of an interlaboratory study for
#' determining the precision of a test method
#' on several levels of the material Pentosan.
#'
#' @format A data frame with 189 obs. of 3 variables:
#' \describe{
#' \item{value}{nu... | /R/Pentosan.R | no_license | cran/PMCMRplus | R | false | false | 704 | r | #' @name Pentosan
#' @docType data
#' @title Pentosan Dataset
#'
#' @description
#' A benchmark dataset of an interlaboratory study for
#' determining the precision of a test method
#' on several levels of the material Pentosan.
#'
#' @format A data frame with 189 obs. of 3 variables:
#' \describe{
#' \item{value}{nu... |
# Code demonstrating how one could equalize the AP of Female and
# Male defendants by the min-PDF method.
library(grid)
library(gridExtra)
library(dplyr)
library(ggplot2)
# hyperparameter for plots
cex_factor = 1.7
# Load and clean the data selecting for the desired fields
raw_data <- read.csv("../new.csv")
df <- ... | /src/loan_minPDF.R | permissive | dsp-uga/team-mangalyaan | R | false | false | 3,867 | r | # Code demonstrating how one could equalize the AP of Female and
# Male defendants by the min-PDF method.
library(grid)
library(gridExtra)
library(dplyr)
library(ggplot2)
# hyperparameter for plots
cex_factor = 1.7
# Load and clean the data selecting for the desired fields
raw_data <- read.csv("../new.csv")
df <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/latex.R
\name{latex.cline}
\alias{latex.cline}
\title{Create a latex string to draw a horizontal line across the columns specified}
\usage{
latex.cline(cols)
}
\arguments{
\item{cols}{A string representing the columns to span e.g. "1-5"}
}
\v... | /man/latex.cline.Rd | no_license | pbs-assess/gfutilities | R | false | true | 523 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/latex.R
\name{latex.cline}
\alias{latex.cline}
\title{Create a latex string to draw a horizontal line across the columns specified}
\usage{
latex.cline(cols)
}
\arguments{
\item{cols}{A string representing the columns to span e.g. "1-5"}
}
\v... |
\name{Folder-class}
\alias{Folder-class}
\docType{class}
\title{
Folder
}
\format{An R6 class object.}
\description{
Represents a folder in Synapse.
Folders must have a name and a parent and can optionally have annotations.
}
\section{Methods}{
\itemize{
\item \code{Folder(name=NULL, parent=NULL, properties=NULL, anno... | /man/Folder-class.Rd | permissive | Sage-Bionetworks/synapser | R | false | false | 378 | rd | \name{Folder-class}
\alias{Folder-class}
\docType{class}
\title{
Folder
}
\format{An R6 class object.}
\description{
Represents a folder in Synapse.
Folders must have a name and a parent and can optionally have annotations.
}
\section{Methods}{
\itemize{
\item \code{Folder(name=NULL, parent=NULL, properties=NULL, anno... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 785165
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 721735
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 721735
c
c Input Parameter (command lin... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Kronegger-Pfandler-Pichler/dungeon/dungeon_i25-m12-u3-v0.pddl_planlen=116/dungeon_i25-m12-u3-v0.pddl_planlen=116.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 372,400 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 785165
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 721735
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 721735
c
c Input Parameter (command lin... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.99939408264402e-241, 1.02430812623105e-120, 5.49464572566663e+109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta... | /CNull/inst/testfiles/communities_individual_based_sampling_beta_interleaved_matrices/AFL_communities_individual_based_sampling_beta_interleaved_matrices/communities_individual_based_sampling_beta_interleaved_matrices_valgrind_files/1615838493-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 363 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.99939408264402e-241, 1.02430812623105e-120, 5.49464572566663e+109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta... |
#' Differential gene expression analysis
#'
#' A wrapper function to perform analysis of differential gene expression using DESeq2 method.
#'
#' @param feature_count_file A CSV file containing a table of counts for a particular feature type.
#' @param metadata_file A file outlining the experimental conditions for each ... | /R/differential_expression.R | permissive | irilenia/baerhunter | R | false | false | 3,887 | r | #' Differential gene expression analysis
#'
#' A wrapper function to perform analysis of differential gene expression using DESeq2 method.
#'
#' @param feature_count_file A CSV file containing a table of counts for a particular feature type.
#' @param metadata_file A file outlining the experimental conditions for each ... |
#'@title Metabolism calculated from the maximum likelihood estimates of the parameters in a standard linear regression model
#'@description Process-error-only model with parameters fitted via maximum likelihood estimation (MLE). This function runs the maximum likelihood metabolism model on the supplied gas concentratio... | /R/metab.mle.R | no_license | jzwart/LakeMetabolizer | R | false | false | 11,060 | r | #'@title Metabolism calculated from the maximum likelihood estimates of the parameters in a standard linear regression model
#'@description Process-error-only model with parameters fitted via maximum likelihood estimation (MLE). This function runs the maximum likelihood metabolism model on the supplied gas concentratio... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7590
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7590
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query44_trivial_1344n/query44_trivial_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 713 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7590
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7590
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q... |
\name{rLSsampGetDistrParam}
\alias{rLSsampGetDistrParam}
\title{Get the specified parameter of a given distribution.}
\description{
R interface function for LINDO API function \code{LSsampGetDistrParam}. For more information,
please refer to LINDO API User Manual.
}
\usage{
rLSsampGetDistrParam(sample... | /man/rLSsampGetDistrParam.Rd | no_license | cran/rLindo | R | false | false | 713 | rd | \name{rLSsampGetDistrParam}
\alias{rLSsampGetDistrParam}
\title{Get the specified parameter of a given distribution.}
\description{
R interface function for LINDO API function \code{LSsampGetDistrParam}. For more information,
please refer to LINDO API User Manual.
}
\usage{
rLSsampGetDistrParam(sample... |
#
# MOCS algorithm for a single location, nAFC possible with beeps.
#
# Author: Andrew Turpin
# (Based on discussions with Tony Redmond July 2012).
# Date: May 2015
# Modified Tue 21 Mar 2023: changed licence from gnu to Apache 2.0
#
# Copyright [2022] [Andrew Turpin]
#
# Licensed under the Apache License, Vers... | /pkg/OPI/R/mocs.r | permissive | turpinandrew/OPI | R | false | false | 16,308 | r | #
# MOCS algorithm for a single location, nAFC possible with beeps.
#
# Author: Andrew Turpin
# (Based on discussions with Tony Redmond July 2012).
# Date: May 2015
# Modified Tue 21 Mar 2023: changed licence from gnu to Apache 2.0
#
# Copyright [2022] [Andrew Turpin]
#
# Licensed under the Apache License, Vers... |
/scripts/R-scripts/data_cleaning_scripts/dwork_268_sjs.R | no_license | ethanwhite/core-transient | R | false | false | 27,950 | r | ||
data(hgsc)
dat <- hgsc[1:15, 1:5]
class <- attr(hgsc, "class.true")[1:15]
test_that("RFE-SVM works", {
expect_error(classification(dat, class, "svm", rfe = TRUE, sizes = 5), NA)
})
test_that("RF with no tuning and NULL trees uses randomForest defaults", {
rf_1 <- classification(dat, class, "rf", rfe = TRUE, tune ... | /tests/testthat/test-classification.R | permissive | AlineTalhouk/splendid | R | false | false | 2,618 | r | data(hgsc)
dat <- hgsc[1:15, 1:5]
class <- attr(hgsc, "class.true")[1:15]
test_that("RFE-SVM works", {
expect_error(classification(dat, class, "svm", rfe = TRUE, sizes = 5), NA)
})
test_that("RF with no tuning and NULL trees uses randomForest defaults", {
rf_1 <- classification(dat, class, "rf", rfe = TRUE, tune ... |
## install ribios packages from github
if(require("devtools")) {
install_github("Accio/ribios/ribiosBase")
install_github("Accio/ribios/ribiosUtils")
install_github("Accio/ribios/ribiosIO")
install_github("Accio/ribios/ribiosExpression")
install_github("Accio/ribios/ribiosAuth")
install_github("Accio/ribio... | /install_ribios_from_github.R | no_license | RCBiczok/ribios | R | false | false | 1,147 | r | ## install ribios packages from github
if(require("devtools")) {
install_github("Accio/ribios/ribiosBase")
install_github("Accio/ribios/ribiosUtils")
install_github("Accio/ribios/ribiosIO")
install_github("Accio/ribios/ribiosExpression")
install_github("Accio/ribios/ribiosAuth")
install_github("Accio/ribio... |
library(rstan)
options(mc.cores = 1)
rstan_options(auto_write = TRUE)
library(tidyverse)
library(simsurv)
library(broom)
library(bayesplot)
library(cowplot)
library(splines2)
#############################################################################
sm <- stan_model("~/Desktop/Stan/Within_Chain_Parallelisation/expon... | /test.R | no_license | ermeel86/withinchain_surv_stan | R | false | false | 5,387 | r | library(rstan)
options(mc.cores = 1)
rstan_options(auto_write = TRUE)
library(tidyverse)
library(simsurv)
library(broom)
library(bayesplot)
library(cowplot)
library(splines2)
#############################################################################
sm <- stan_model("~/Desktop/Stan/Within_Chain_Parallelisation/expon... |
library(glmmTMB)
## devtools::load_all("glmmTMB")
library(ordbetareg)
data(pew)
library(tidyverse)
library(cmdstanr)
library(broom.mixed)
do_slow <- TRUE
model_data <- select(pew,therm,age="F_AGECAT_FINAL",
sex="F_SEX_FINAL",
income="F_INCOME_FINAL",
... | /misc/ordbeta.R | no_license | glmmTMB/glmmTMB | R | false | false | 3,562 | r | library(glmmTMB)
## devtools::load_all("glmmTMB")
library(ordbetareg)
data(pew)
library(tidyverse)
library(cmdstanr)
library(broom.mixed)
do_slow <- TRUE
model_data <- select(pew,therm,age="F_AGECAT_FINAL",
sex="F_SEX_FINAL",
income="F_INCOME_FINAL",
... |
#summary
summary_fun <- function(x, ...)
{
min.x <- min(x, ...)
max.x <- max(x, ...)
median.x <- median(x, ...)
mean.x <- mean(x, ...)
out <- data.frame(min=min.x, max=max.x, median=median.x, mean=mean.x)
return(out)
} | /summary_fun.R | no_license | ssefick/R_scripts | R | false | false | 243 | r | #summary
summary_fun <- function(x, ...)
{
min.x <- min(x, ...)
max.x <- max(x, ...)
median.x <- median(x, ...)
mean.x <- mean(x, ...)
out <- data.frame(min=min.x, max=max.x, median=median.x, mean=mean.x)
return(out)
} |
#김은민
#2019-12-16 (HW)
#
#문제1) state.x77 데이터셋에서 문맹률(Illiteracy)을 이용해 범죄율(Murder)을 예측하는
# 단순선형 회귀모델을 만드시오. 그리고 문맹률이 0.5, 1.0, 1.5일 때 범죄율을 예측하여 보시오.
state.x77 <- as.data.frame(state.x77)
plot(Murder~Illiteracy,data=state.x77)
model <- lm(Murder~Illiteracy,data=state.x77)
model
abline(model)
coef(model)
new_Illiteracy... | /KimEunMin_20191216.R | no_license | Kim-EunMin/EUNMIN_BIGDATA | R | false | false | 1,317 | r | #김은민
#2019-12-16 (HW)
#
#문제1) state.x77 데이터셋에서 문맹률(Illiteracy)을 이용해 범죄율(Murder)을 예측하는
# 단순선형 회귀모델을 만드시오. 그리고 문맹률이 0.5, 1.0, 1.5일 때 범죄율을 예측하여 보시오.
state.x77 <- as.data.frame(state.x77)
plot(Murder~Illiteracy,data=state.x77)
model <- lm(Murder~Illiteracy,data=state.x77)
model
abline(model)
coef(model)
new_Illiteracy... |
#' Unbreak values using regex to match the broken half of the value
#'
#' @param df A data frame with one or more values within a variable broken up
#' across two rows.
#' @param regex Regular expression for matching the second half of the broken
#' values.
#' @param ogcol Variable to unbreak.
#' @param newcol Name... | /R/unbreak_fn.R | permissive | bedantaguru/unheadr | R | false | false | 2,088 | r | #' Unbreak values using regex to match the broken half of the value
#'
#' @param df A data frame with one or more values within a variable broken up
#' across two rows.
#' @param regex Regular expression for matching the second half of the broken
#' values.
#' @param ogcol Variable to unbreak.
#' @param newcol Name... |
/DDPSC/R_Scripts/PlantCV/TM009_plantcv_helper.R | no_license | calizarr/Misc | R | false | false | 21,339 | r | ||
library(s2dverification)
### Name: .LoadDataFile
### Title: Load Data From File Into Environment
### Aliases: .LoadDataFile
### Keywords: datagen internal
### ** Examples
## Not run:
##D data <- s2dverification:::.LoadDataFile(list(dataset_type = 'exp',
##D filename = system.file('sample_data/model/expe... | /data/genthat_extracted_code/s2dverification/examples/LoadDataFile.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 758 | r | library(s2dverification)
### Name: .LoadDataFile
### Title: Load Data From File Into Environment
### Aliases: .LoadDataFile
### Keywords: datagen internal
### ** Examples
## Not run:
##D data <- s2dverification:::.LoadDataFile(list(dataset_type = 'exp',
##D filename = system.file('sample_data/model/expe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classification_satellite-image.R
\name{buildClassMod}
\alias{buildClassMod}
\title{build image classification model (random forest)}
\usage{
buildClassMod(
rawdir,
image,
groundTruth,
groundTruthValues = list(roof = 1, street = 2, per... | /man/buildClassMod.Rd | permissive | KWB-R/kwb.ml | R | false | true | 3,597 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classification_satellite-image.R
\name{buildClassMod}
\alias{buildClassMod}
\title{build image classification model (random forest)}
\usage{
buildClassMod(
rawdir,
image,
groundTruth,
groundTruthValues = list(roof = 1, street = 2, per... |
\name{@ANNOBJPREFIX@.db}
\alias{@ANNOBJPREFIX@.db}
\alias{@ANNOBJPREFIX@}
\title{Bioconductor annotation data package}
\description{
Welcome to the @ANNOBJPREFIX@.db annotation Package. This is an
organism specific package. The purpose is to provide detailed
information about the species abbreviated in the seco... | /inst/AnnDbPkg-templates/MALARIA.DB/man/BASE.Rd | no_license | Bioconductor/AnnotationForge | R | false | false | 1,140 | rd | \name{@ANNOBJPREFIX@.db}
\alias{@ANNOBJPREFIX@.db}
\alias{@ANNOBJPREFIX@}
\title{Bioconductor annotation data package}
\description{
Welcome to the @ANNOBJPREFIX@.db annotation Package. This is an
organism specific package. The purpose is to provide detailed
information about the species abbreviated in the seco... |
#' A test function
#'
#' And this just a brief test documentation.
#'
#' @export
#' @param samples number of samples
normalMean <- function(samples=10){
data <- rnorm(samples)
message = paste("mean is: ", mean(data))
}
| /R/rnormMean.R | no_license | nancyirisarri/testOpencpu | R | false | false | 223 | r | #' A test function
#'
#' And this just a brief test documentation.
#'
#' @export
#' @param samples number of samples
normalMean <- function(samples=10){
data <- rnorm(samples)
message = paste("mean is: ", mean(data))
}
|
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/utilities.R
\name{HW}
\alias{HW}
\title{Create dataframe of Hardy-Weinberg values.}
\usage{
HW(x)
}
\arguments{
\item{x}{a genotype matrix}
}
\description{
Create dataframe of Hardy-Weinberg values.
}
| /man/HW.Rd | no_license | kate-crosby/ProgenyArray | R | false | false | 288 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/utilities.R
\name{HW}
\alias{HW}
\title{Create dataframe of Hardy-Weinberg values.}
\usage{
HW(x)
}
\arguments{
\item{x}{a genotype matrix}
}
\description{
Create dataframe of Hardy-Weinberg values.
}
|
library(regioneR)
library(karyoploteR)
gdBLCA <- read.csv("/Users/mar/BIO/PROJECTS/APOBEC/Project1_TranscriptionLevel/mutations/my/2014_Fredriksson_BLCA_21_WGS_mutations_adjusted_anz1_NOrepeats_sorted_anz5.txt",sep='\t')
gdBLCA <- data.table(gdBLCA)
gdBRCA <- read.csv("/Users/mar/BIO/PROJECTS/APOBEC/Project1_Transcrip... | /R/all/clusters.R | no_license | mkazanov/molcompbio | R | false | false | 3,720 | r | library(regioneR)
library(karyoploteR)
gdBLCA <- read.csv("/Users/mar/BIO/PROJECTS/APOBEC/Project1_TranscriptionLevel/mutations/my/2014_Fredriksson_BLCA_21_WGS_mutations_adjusted_anz1_NOrepeats_sorted_anz5.txt",sep='\t')
gdBLCA <- data.table(gdBLCA)
gdBRCA <- read.csv("/Users/mar/BIO/PROJECTS/APOBEC/Project1_Transcrip... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/obs_time_matrix.R
\name{obs_time_matrix}
\alias{obs_time_matrix}
\title{function that creates an obstime matrix}
\usage{
obs_time_matrix(obs_time, matrix_rows, matrix_cols)
}
\arguments{
\item{obs_time}{A data frame of total observation time
... | /man/obs_time_matrix.Rd | no_license | avrincon/phdfuns | R | false | true | 629 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/obs_time_matrix.R
\name{obs_time_matrix}
\alias{obs_time_matrix}
\title{function that creates an obstime matrix}
\usage{
obs_time_matrix(obs_time, matrix_rows, matrix_cols)
}
\arguments{
\item{obs_time}{A data frame of total observation time
... |
\name{getLocalPolymerizationRate}
\alias{getLocalPolymerizationRate}
\title{
Compute the local Polymerization Rate
}
\description{
'getLocalPolymerizationRate' computes the local polymerization rate
within each alignment by dividing each alignment into 10 sections.
}
\usage{
getLocalPolymerizationRate(cmpH5, idx ... | /man/getLocalPolymerizationRate.Rd | no_license | pb-jlee/R-pbh5 | R | false | false | 1,146 | rd | \name{getLocalPolymerizationRate}
\alias{getLocalPolymerizationRate}
\title{
Compute the local Polymerization Rate
}
\description{
'getLocalPolymerizationRate' computes the local polymerization rate
within each alignment by dividing each alignment into 10 sections.
}
\usage{
getLocalPolymerizationRate(cmpH5, idx ... |
# Multivariable Regression Examples
## Pairwise scatterplot of the data
library(datasets); data(swiss); require(stats); require(graphics)
pairs(swiss, panel = panel.smooth, main = "Swiss data", col = 3 + (swiss$Catholic > 50))
## Multiple Linear Regression (Agriculture is negatively related to Y)
summary(lm(Fertility... | /Regression Modelling Week 3/Multivariate Regression part 1 - Multicollinearity.R | no_license | CheeLoong/coursera-dss | R | false | false | 849 | r | # Multivariable Regression Examples
## Pairwise scatterplot of the data
library(datasets); data(swiss); require(stats); require(graphics)
pairs(swiss, panel = panel.smooth, main = "Swiss data", col = 3 + (swiss$Catholic > 50))
## Multiple Linear Regression (Agriculture is negatively related to Y)
summary(lm(Fertility... |
# function returns ADX Status
# state 0: ADX 0-15, 1: ADX 15-25, 2: ADX > 25
qADXStatus <- function (TS, n=14, threshold=c(15,25), maType="EMA"){
ADX <- ADX(cbind(Hi(TS), Lo(TS), Cl(TS)), n=n, maType=maType)
LAGADX <- LagMultiColumnXTS(ADX)
ADX_S <- rollapply(ADX[,"ADX"], 1, function(x) {
as.numeric(x > thr... | /R_packages/quantify/pkg/R/qADXStatus.R | permissive | wotuzu17/tronador | R | false | false | 992 | r | # function returns ADX Status
# state 0: ADX 0-15, 1: ADX 15-25, 2: ADX > 25
qADXStatus <- function (TS, n=14, threshold=c(15,25), maType="EMA"){
ADX <- ADX(cbind(Hi(TS), Lo(TS), Cl(TS)), n=n, maType=maType)
LAGADX <- LagMultiColumnXTS(ADX)
ADX_S <- rollapply(ADX[,"ADX"], 1, function(x) {
as.numeric(x > thr... |
# Code by Phisan Sookkhee
# Update 27 Dec 2016
library("gtools")
# Config values
setwd("~/ResearchCode/SNPsR")
snpsName_path <- "input/gen-snps/NameONLY13479.csv"
conclude_data <- read.csv(snpsName_path, header = TRUE)
outfile_conclusion <- "/Users/phisan/Dropbox/04.Research/NumvarnThesis/conclud_and_count/results/... | /misc/conclude-additive-model-V1.R | no_license | numvarn/SNPsR | R | false | false | 1,421 | r | # Code by Phisan Sookkhee
# Update 27 Dec 2016
library("gtools")
# Config values
setwd("~/ResearchCode/SNPsR")
snpsName_path <- "input/gen-snps/NameONLY13479.csv"
conclude_data <- read.csv(snpsName_path, header = TRUE)
outfile_conclusion <- "/Users/phisan/Dropbox/04.Research/NumvarnThesis/conclud_and_count/results/... |
##------------------------------------------------------------------
## From the kaggle website:
##------------------------------------------------------------------
##------------------------------------------------------------------
## Load libraries
##----------------------------------------------------------------... | /1000_GbmSubmission_V03.r | no_license | bishopsqueeze/k_hig | R | false | false | 11,161 | r | ##------------------------------------------------------------------
## From the kaggle website:
##------------------------------------------------------------------
##------------------------------------------------------------------
## Load libraries
##----------------------------------------------------------------... |
#-----------------------------------
# Assignment 3 - Mixed Model EDA
#
# Archel Aguilar (98081767)
#-----------------------------------
#install.packages("dplyr")
library(dplyr)
#install.packages("magrittr")
library(magrittr)
#install.packages("lubridate")
library(lubridate)
#install.packages("tibble")
library(tib... | /MM_EDA.R | no_license | 98081767/ST_Assignment3 | R | false | false | 12,912 | r | #-----------------------------------
# Assignment 3 - Mixed Model EDA
#
# Archel Aguilar (98081767)
#-----------------------------------
#install.packages("dplyr")
library(dplyr)
#install.packages("magrittr")
library(magrittr)
#install.packages("lubridate")
library(lubridate)
#install.packages("tibble")
library(tib... |
library(mecfa);library(lavaan)
maynesDat <-
read.csv(file = "C:/Users/araborn/Desktop/Personal Projects/Metaheuristic ECFA/MaynesData1.csv")
colnames(maynesDat) <-
paste0("Item", 1:ncol(maynesDat))
initialData <-
maynesDat
initialData$Outcome <-
rowSums(initialData)+rnorm(nrow(initialData))
realModel <-"
f1 =~... | /note/test.R | no_license | AnthonyRaborn/mecfa | R | false | false | 4,180 | r | library(mecfa);library(lavaan)
maynesDat <-
read.csv(file = "C:/Users/araborn/Desktop/Personal Projects/Metaheuristic ECFA/MaynesData1.csv")
colnames(maynesDat) <-
paste0("Item", 1:ncol(maynesDat))
initialData <-
maynesDat
initialData$Outcome <-
rowSums(initialData)+rnorm(nrow(initialData))
realModel <-"
f1 =~... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/permutationBenchmarkFunctions.R
\name{benchmarkGeneratorQAP}
\alias{benchmarkGeneratorQAP}
\title{Create Quadratic Assignment Problem (QAP) Benchmark}
\usage{
benchmarkGeneratorQAP(a, b)
}
\arguments{
\item{a}{distance matrix}
\item{b}{flow ... | /man/benchmarkGeneratorQAP.Rd | no_license | cran/CEGO | R | false | true | 945 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/permutationBenchmarkFunctions.R
\name{benchmarkGeneratorQAP}
\alias{benchmarkGeneratorQAP}
\title{Create Quadratic Assignment Problem (QAP) Benchmark}
\usage{
benchmarkGeneratorQAP(a, b)
}
\arguments{
\item{a}{distance matrix}
\item{b}{flow ... |
#this code is modified from 8.3_kl_body_rawcount.R & 9.1_Fstat_body_rawcount.R, but modified to applied to the dataset GSE129788
#this code calculate the permutation based manova or permanovaS
#The input are the dist_array from step 8.
# cluster_tag=1
# file_tag="1k"
# dist_method="jsd"
# fit_method="empirical"
# F_me... | /DE_Autism/12.1_Fstat_129788.R | permissive | changwn/scRNAseq_pipelines | R | false | false | 8,558 | r | #this code is modified from 8.3_kl_body_rawcount.R & 9.1_Fstat_body_rawcount.R, but modified to applied to the dataset GSE129788
#this code calculate the permutation based manova or permanovaS
#The input are the dist_array from step 8.
# cluster_tag=1
# file_tag="1k"
# dist_method="jsd"
# fit_method="empirical"
# F_me... |
## Output message
Execute_end_msg <- function(outret, msgOK, msgFail){
if(!inherits(outret, "try-error")){
if(!is.null(outret)){
if(outret == 0)
Insert.Messages.Out(msgOK, TRUE, "s")
else
Insert.Messages.Out(msgFail, TRUE, "e")
}else Insert.Me... | /R/cdtExecute_function.R | no_license | rijaf-iri/CDT | R | false | false | 11,212 | r |
## Output message
Execute_end_msg <- function(outret, msgOK, msgFail){
if(!inherits(outret, "try-error")){
if(!is.null(outret)){
if(outret == 0)
Insert.Messages.Out(msgOK, TRUE, "s")
else
Insert.Messages.Out(msgFail, TRUE, "e")
}else Insert.Me... |
#' Validation Index
#' @description Validation index for validating fuzzy clustering result
#' @param object fuzzy clustering object
#' @details This function provide several validation indexs that calculated from fuzzy clustering result. Validation index can be used for choose best optimum parameter.
#' @details There... | /R/validation.R | no_license | fauzipandya/advfclust | R | false | false | 3,427 | r | #' Validation Index
#' @description Validation index for validating fuzzy clustering result
#' @param object fuzzy clustering object
#' @details This function provide several validation indexs that calculated from fuzzy clustering result. Validation index can be used for choose best optimum parameter.
#' @details There... |
#Calculate overall model controlling for other factors
require(multiwayvcov)
require(car)
require(MASS)
require(pscl)
require(broom)
memory.size(max = FALSE)
memory.limit(size = NA)
#rm(list=ls())
# adjust to odds ratio and minus 100
relative_odds <- function(v){
return(exp(v) - 1)
}
random_values <- function(mea... | /photo_all.R | permissive | mysociety/research_fms_photo | R | false | false | 2,107 | r | #Calculate overall model controlling for other factors
require(multiwayvcov)
require(car)
require(MASS)
require(pscl)
require(broom)
memory.size(max = FALSE)
memory.limit(size = NA)
#rm(list=ls())
# adjust to odds ratio and minus 100
relative_odds <- function(v){
return(exp(v) - 1)
}
random_values <- function(mea... |
#Summary of data
numbers = c(5,85,97,14,65)
print(numbers)
#Maximum value in a vector
cat("Maximum Value is the vector is: ",max(numbers),"\n")
#Minimum value in a vector
cat("Minimum Value in the vector is : ",min(numbers),"\n")
#Length of values in a vector
cat("Length of values :",length(numbers)) | /DAY - 2/Class/MaxMinVectors.R | no_license | klmsathish/R_Programming | R | false | false | 301 | r | #Summary of data
numbers = c(5,85,97,14,65)
print(numbers)
#Maximum value in a vector
cat("Maximum Value is the vector is: ",max(numbers),"\n")
#Minimum value in a vector
cat("Minimum Value in the vector is : ",min(numbers),"\n")
#Length of values in a vector
cat("Length of values :",length(numbers)) |
##More details about the models can be found in the article
##"The statistical content and empirical testing of the MIDAS restrictions"
##by Virmantas Kvedaras and Vaidotas Zemlys
library(midasr)
data(rvsp500)
ii <- which(rvsp500$DateID=="20120522")
y <- log(as.numeric(rvsp500[1:ii,2]))
nlmn <- function(p,d,m) {
i... | /demo/logRV.R | no_license | snowdj/midasr | R | false | false | 2,750 | r | ##More details about the models can be found in the article
##"The statistical content and empirical testing of the MIDAS restrictions"
##by Virmantas Kvedaras and Vaidotas Zemlys
library(midasr)
data(rvsp500)
ii <- which(rvsp500$DateID=="20120522")
y <- log(as.numeric(rvsp500[1:ii,2]))
nlmn <- function(p,d,m) {
i... |
xdiscrete<-function(x){
if(length(unique(x))>3){
temp<-kmeans(x,3,nstart=25)
res<-temp$cluster-1
}else{
res<-x
}
return(res)
}
makeDiscrete<-function(C){
cc <- detectCores()-2
cl <- makeCluster(cc,type=ifelse(.Platform$OS.type=="unix","FORK","PSOCK"))
registerDoParallel(cl)
cat("Discretizin... | /R/screen.R | no_license | adelinelo/iscreen | R | false | false | 3,203 | r | xdiscrete<-function(x){
if(length(unique(x))>3){
temp<-kmeans(x,3,nstart=25)
res<-temp$cluster-1
}else{
res<-x
}
return(res)
}
makeDiscrete<-function(C){
cc <- detectCores()-2
cl <- makeCluster(cc,type=ifelse(.Platform$OS.type=="unix","FORK","PSOCK"))
registerDoParallel(cl)
cat("Discretizin... |
#Load Libraries
library("twitteR")
library("openssl")
library("httpuv")
library("twitteR")
library("tm")
library("stringr")
library("dplyr")
library(httr)
# 1. Find OAuth settings for twitter:
# https://dev.twitter.com/docs/auth/oauth
oauth_endpoints("twitter")
# 2. Register an application at https://apps.twitter... | /rtweet_check.R | no_license | abhirishisb/ISB_DAM | R | false | false | 3,578 | r | #Load Libraries
library("twitteR")
library("openssl")
library("httpuv")
library("twitteR")
library("tm")
library("stringr")
library("dplyr")
library(httr)
# 1. Find OAuth settings for twitter:
# https://dev.twitter.com/docs/auth/oauth
oauth_endpoints("twitter")
# 2. Register an application at https://apps.twitter... |
# P_{t+1} = P_t - C_t + 1.5 * (MSYR) * P_t(1-(P_t/P_0)^2)
# Inputs: P_0 and MSYR
# Output: P_{1993}
source("pooling_aux.r")
## Prior for P_0 is a Gamma(2.8085, 0.0002886) + 6400, i.e, with offset 6400.
M <- 1E5
P0.prior <- rgamma(M, shape = 2.8085, rate = 0.0002886) + 6400
hist(P0.prior, probability = TRUE)
## Prior ... | /code/bowhead_example_SpIR_alpha.r | no_license | gmendesb/opinion_pooling | R | false | false | 8,102 | r | # P_{t+1} = P_t - C_t + 1.5 * (MSYR) * P_t(1-(P_t/P_0)^2)
# Inputs: P_0 and MSYR
# Output: P_{1993}
source("pooling_aux.r")
## Prior for P_0 is a Gamma(2.8085, 0.0002886) + 6400, i.e, with offset 6400.
M <- 1E5
P0.prior <- rgamma(M, shape = 2.8085, rate = 0.0002886) + 6400
hist(P0.prior, probability = TRUE)
## Prior ... |
## hft2_connection.R
############### CONNECTION CODE ####################
# smart way to check we have specific libs installed or install them otherwise
usePackage <- function(p) {
if (!is.element(p, installed.packages()[,1])) {
install.packages(p, dep = TRUE);
}
require(p, character.only = TRUE)... | /Week 2- High Frequency Trading Stop-Loss/Real_Time2_HFT/hft2_connection.R | no_license | PrestonMWF/Real-Time-R-Programming | R | false | false | 8,818 | r | ## hft2_connection.R
############### CONNECTION CODE ####################
# smart way to check we have specific libs installed or install them otherwise
usePackage <- function(p) {
if (!is.element(p, installed.packages()[,1])) {
install.packages(p, dep = TRUE);
}
require(p, character.only = TRUE)... |
################################################################################
# TODO LIST
# TODO: ...
# NOTE:
# NB! pcr.prob fixed to 1 for the PCR simulation. Only the estimated number of
# molecules is currently affected in the calibration process as the PCR efficiency
# is reduced by step.size.
# Reducin... | /pcrsim/R/calibratePCRsim.r | no_license | ingted/R-Examples | R | false | false | 21,949 | r | ################################################################################
# TODO LIST
# TODO: ...
# NOTE:
# NB! pcr.prob fixed to 1 for the PCR simulation. Only the estimated number of
# molecules is currently affected in the calibration process as the PCR efficiency
# is reduced by step.size.
# Reducin... |
now_all.proj<-read.csv("ClimateSpace/Tables/now.proj.csv")
range(now_all.proj$PC1)
range(now_all.proj$PC2)
now_all.proj<-now_all.proj[!now_all.proj$PC1<(-4),]
write.csv(now_all.proj, "ClimateSpace/Tables/now.proj.csv", row.names=F)
assignBins<-function(col, binRange, nBins)
{
offset<-0-binRange[1]
scale<-(binRange... | /climateSpace_plotting.R | no_license | clarkhollenberg/climateanalogs | R | false | false | 1,107 | r | now_all.proj<-read.csv("ClimateSpace/Tables/now.proj.csv")
range(now_all.proj$PC1)
range(now_all.proj$PC2)
now_all.proj<-now_all.proj[!now_all.proj$PC1<(-4),]
write.csv(now_all.proj, "ClimateSpace/Tables/now.proj.csv", row.names=F)
assignBins<-function(col, binRange, nBins)
{
offset<-0-binRange[1]
scale<-(binRange... |
library(glmnet)
#' IBSS function
#'
#' This function allows you to express your love of cats.
#' @param y vector of phenotypes standardized and centered.
#' @param X SNP matrix of dimenstion n by p (centered and standardized)
#' @param sigma_0 prior probablity for beta
#' @param sigma prior sigma
#' @... | /R/ibss_fun.R | no_license | mdr56/finemapping_anot | R | false | false | 1,436 | r |
library(glmnet)
#' IBSS function
#'
#' This function allows you to express your love of cats.
#' @param y vector of phenotypes standardized and centered.
#' @param X SNP matrix of dimenstion n by p (centered and standardized)
#' @param sigma_0 prior probablity for beta
#' @param sigma prior sigma
#' @... |
/Resources/gal-sounds.r | no_license | fozolo/galactica-anno-dominari-3 | R | false | false | 1,545,345 | r | ||
#' Feature Transformation -- RFormula (Estimator)
#'
#' Implements the transforms required for fitting a dataset against an R model
#' formula. Currently we support a limited subset of the R operators,
#' including \code{~}, \code{.}, \code{:}, \code{+}, and \code{-}.
#'
#' @details The basic operators in the formu... | /R/ml_feature_r_formula.R | permissive | sparklyr/sparklyr | R | false | false | 5,357 | r | #' Feature Transformation -- RFormula (Estimator)
#'
#' Implements the transforms required for fitting a dataset against an R model
#' formula. Currently we support a limited subset of the R operators,
#' including \code{~}, \code{.}, \code{:}, \code{+}, and \code{-}.
#'
#' @details The basic operators in the formu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-gdist.r
\name{windowDistWeibull}
\alias{windowDistWeibull}
\title{Wrapper Function of Weibull Distribution Plot Subclass}
\usage{
windowDistWeibull()
}
\description{
\code{windowDistWeibull} function is a wrapper function of \co... | /man/plot-gdist-windowDistWeibull.Rd | no_license | ddsjoberg/RcmdrPlugin.KMggplot2 | R | false | true | 389 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-gdist.r
\name{windowDistWeibull}
\alias{windowDistWeibull}
\title{Wrapper Function of Weibull Distribution Plot Subclass}
\usage{
windowDistWeibull()
}
\description{
\code{windowDistWeibull} function is a wrapper function of \co... |
BART_MAX_MEM_MB_DEFAULT = 1100 #1.1GB is the most a 32bit machine can give without throwing an error or crashing
BART_NUM_CORES_DEFAULT = 1 #Stay conservative as a default
##build a BART model
build_bart_machine = function(X = NULL, y = NULL, Xy = NULL,
num_trees = 50, #found many times to not get better after this... | /bartMachine/R/bart_package_builders.R | permissive | BelindaHernandez/bartMachine | R | false | false | 24,768 | r | BART_MAX_MEM_MB_DEFAULT = 1100 #1.1GB is the most a 32bit machine can give without throwing an error or crashing
BART_NUM_CORES_DEFAULT = 1 #Stay conservative as a default
##build a BART model
build_bart_machine = function(X = NULL, y = NULL, Xy = NULL,
num_trees = 50, #found many times to not get better after this... |
## experiment: calculate the breakpoint error and show the curve that
## demonstrates what exponent we need to pick for the number of points.
source("data/precise.breakpoint.cost.R")
source("data/run.cghseg.R")
library(flsa)
sample.signal <- function(d){
locations <- round(seq(1,length(mu),l=d))
last <- as.intege... | /data/variable.density.signals.R | no_license | tdhock/breakpointError-orig | R | false | false | 4,554 | r | ## experiment: calculate the breakpoint error and show the curve that
## demonstrates what exponent we need to pick for the number of points.
source("data/precise.breakpoint.cost.R")
source("data/run.cghseg.R")
library(flsa)
sample.signal <- function(d){
locations <- round(seq(1,length(mu),l=d))
last <- as.intege... |
library(ggplot2)
library(tidyverse)
library(stringr)
library(forcats)
library(ggtext)
library(patchwork)
library(hrbrthemes)
# Get the data
tuesdata <- tidytuesdayR::tt_load(2021, week = 21)
survey <- tuesdata$survey
# Check the data
glimpse(survey)
dist <- survey %>%
filter(currency=="USD") %>%
count(indus... | /2021/week 21/salary.R | no_license | rocha02/tidytuesday | R | false | false | 5,740 | r | library(ggplot2)
library(tidyverse)
library(stringr)
library(forcats)
library(ggtext)
library(patchwork)
library(hrbrthemes)
# Get the data
tuesdata <- tidytuesdayR::tt_load(2021, week = 21)
survey <- tuesdata$survey
# Check the data
glimpse(survey)
dist <- survey %>%
filter(currency=="USD") %>%
count(indus... |
#' ERA5 data downloader
#'
#' Function for downloading ERA5.
#'
#' @importFrom utils download.file
#' @param folder_path a character string with the path where the data will be downloaded.
#' @return No return value, called to download the data set.
#' @keywords internal
download_era5 <- function(folder_path = "."){
... | /R/download_era5.R | no_license | imarkonis/pRecipe | R | false | false | 736 | r | #' ERA5 data downloader
#'
#' Function for downloading ERA5.
#'
#' @importFrom utils download.file
#' @param folder_path a character string with the path where the data will be downloaded.
#' @return No return value, called to download the data set.
#' @keywords internal
download_era5 <- function(folder_path = "."){
... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ggplot2)
read_full_input = function(input, output){
return(as.numeric(strsplit(input,"... | /app_SkillRating/app_skill_rating.r | no_license | DanaeMirel/Shiny-apps | R | false | false | 9,723 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ggplot2)
read_full_input = function(input, output){
return(as.numeric(strsplit(input,"... |
library(shiny)
library(plotly)
library(tidyverse)
library(ggplot2)
library(shinythemes)
add_average <- read.csv("../data/additions_average_2015_2016.csv")
subtract_average <- read.csv("../data/subtraction_average_2015_2016_v2.csv")
my_ui <- fluidPage(
sidebarLayout(
sidebarPanel(
h3("Addition"),
se... | /scripts/barplot_addsub_template.R | no_license | GgTran15/Shiny-project | R | false | false | 1,877 | r | library(shiny)
library(plotly)
library(tidyverse)
library(ggplot2)
library(shinythemes)
add_average <- read.csv("../data/additions_average_2015_2016.csv")
subtract_average <- read.csv("../data/subtraction_average_2015_2016_v2.csv")
my_ui <- fluidPage(
sidebarLayout(
sidebarPanel(
h3("Addition"),
se... |
library(plsRglm)
### Name: CorMat
### Title: Correlation matrix for simulating plsR datasets
### Aliases: CorMat
### Keywords: datasets
### ** Examples
data(CorMat)
str(CorMat)
| /data/genthat_extracted_code/plsRglm/examples/CorMat.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 184 | r | library(plsRglm)
### Name: CorMat
### Title: Correlation matrix for simulating plsR datasets
### Aliases: CorMat
### Keywords: datasets
### ** Examples
data(CorMat)
str(CorMat)
|
intv = function(low,hi) {
if (missing(low)) return("")
paste0("[", low, "+TO+", hi, "]")
}
zpad = function(x){ cx = as.character(x); ifelse(nchar(cx)==1,
paste0("0", cx), cx) }
datev = function(y0, m0, y1, m1) {
stopifnot(nchar(y0)==4)
paste0("[", y0, "-", zpad(m0), "-01T00:00:00Z+TO+", y1, "-",
zp... | /R/ebiquery.R | no_license | stankiewicz565/gwascat | R | false | false | 1,358 | r |
intv = function(low,hi) {
if (missing(low)) return("")
paste0("[", low, "+TO+", hi, "]")
}
zpad = function(x){ cx = as.character(x); ifelse(nchar(cx)==1,
paste0("0", cx), cx) }
datev = function(y0, m0, y1, m1) {
stopifnot(nchar(y0)==4)
paste0("[", y0, "-", zpad(m0), "-01T00:00:00Z+TO+", y1, "-",
zp... |
# INFO 201, Autumn 2016, Secton AB
# Team name: Not Really Sure
# Comtributors: Jason You
#
# Count the number of Universities in each country
# (hint: You can use this dataset in world map plot with Plotly, color = count)
source("scripts/installPackage.R")
source("scripts/factorToCharOrNum.R")
installPackage(c("dplyr... | /scripts/countUniversity.R | no_license | Jasonyou1995/not-really-sure-final-project | R | false | false | 2,034 | r | # INFO 201, Autumn 2016, Secton AB
# Team name: Not Really Sure
# Comtributors: Jason You
#
# Count the number of Universities in each country
# (hint: You can use this dataset in world map plot with Plotly, color = count)
source("scripts/installPackage.R")
source("scripts/factorToCharOrNum.R")
installPackage(c("dplyr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.