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 |
|---|---|---|---|---|---|---|---|---|---|
pos <- rbind(
c(11,4),
c(1,15)
#c(1,11),
#c(5,40)
)
tx <- as.table(
matrix(
pos,
nr=2,
dimnames=list(
#B=c("Active","Tun", "Rec_80m", "Rec_3h"),
B=c("Genome","Transcript"),
A=c("Match", "Mismatch")
)
)
)
for ( i in tx )
print (i)
chi <- chisq.test(tx)
fish... | /chisq.test.r | no_license | soh-i/Plotting_R | R | false | false | 400 | r | pos <- rbind(
c(11,4),
c(1,15)
#c(1,11),
#c(5,40)
)
tx <- as.table(
matrix(
pos,
nr=2,
dimnames=list(
#B=c("Active","Tun", "Rec_80m", "Rec_3h"),
B=c("Genome","Transcript"),
A=c("Match", "Mismatch")
)
)
)
for ( i in tx )
print (i)
chi <- chisq.test(tx)
fish... |
shopr_clean_datetime <- function(datetime){
# Validate datetimes and convert them to yyyy-mm-ddTHH:MM:SS-00:00
# format: 2014-04-25T16:15:47-04:00
if(is.null(datetime)){
# Early exit in case datetime is NULL
return(NULL)
} else if(length(datetime) != 1L){
# Make sure datetime is length 1
sto... | /R/shopr_clean_datetime.R | no_license | publicbull/shopr | R | false | false | 1,261 | r | shopr_clean_datetime <- function(datetime){
# Validate datetimes and convert them to yyyy-mm-ddTHH:MM:SS-00:00
# format: 2014-04-25T16:15:47-04:00
if(is.null(datetime)){
# Early exit in case datetime is NULL
return(NULL)
} else if(length(datetime) != 1L){
# Make sure datetime is length 1
sto... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table_title.R
\name{table_title}
\alias{table_title}
\title{Conditionally apply a function}
\usage{
table_title(...)
}
\arguments{
\item{...}{formating instructions}
}
\value{
format list
}
\description{
Conditionally apply a function
}
| /man/table_title.Rd | permissive | ccrandall07/mmtable2 | R | false | true | 315 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table_title.R
\name{table_title}
\alias{table_title}
\title{Conditionally apply a function}
\usage{
table_title(...)
}
\arguments{
\item{...}{formating instructions}
}
\value{
format list
}
\description{
Conditionally apply a function
}
|
#######################################################################################################################
# Analyze correlations between 5hmC/5mC abundance and gene expression in normal breast tissue
# (using available gene expression data collected on NanoString nCounter panel)
#########################... | /04.Gene_expression/Scripts/expression_&_correlation_testing.R | no_license | owenwilkins/Normal-breast-5hmC | R | false | false | 15,851 | r | #######################################################################################################################
# Analyze correlations between 5hmC/5mC abundance and gene expression in normal breast tissue
# (using available gene expression data collected on NanoString nCounter panel)
#########################... |
#' @importFrom stats runif setNames
#' @importFrom methods is
#' @importFrom tibble tribble
NULL
#' Sentinel Values for Recipes
#' @export
#' @rdname sentinelS
no_key <- character()
#' @export
#' @rdname sentinelS
no_deps <- character()
#' @export
#' @rdname sentinelS
no_rec <- list()
#' @export
#' @rdname sentinelS
n... | /R/create_data.R | no_license | waddella/respectables | R | false | false | 14,290 | r | #' @importFrom stats runif setNames
#' @importFrom methods is
#' @importFrom tibble tribble
NULL
#' Sentinel Values for Recipes
#' @export
#' @rdname sentinelS
no_key <- character()
#' @export
#' @rdname sentinelS
no_deps <- character()
#' @export
#' @rdname sentinelS
no_rec <- list()
#' @export
#' @rdname sentinelS
n... |
library("kernelboot")
if ( future::availableCores() > 1L ) {
# simply check if it fails
stopifnot( kernelboot(mtcars, function(data) coef(lm(mpg ~ disp + hp + drat, data = data)),
R = 10, parallel = TRUE)$param$parallel )
# check reproducibility
set.seed(0xBEEF)
s1 <- kernelboot(... | /data/genthat_extracted_code/kernelboot/tests/test_parallel.R | no_license | surayaaramli/typeRrh | R | false | false | 625 | r |
library("kernelboot")
if ( future::availableCores() > 1L ) {
# simply check if it fails
stopifnot( kernelboot(mtcars, function(data) coef(lm(mpg ~ disp + hp + drat, data = data)),
R = 10, parallel = TRUE)$param$parallel )
# check reproducibility
set.seed(0xBEEF)
s1 <- kernelboot(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fct_1_input.R
\name{init_types}
\alias{init_types}
\title{Init types}
\usage{
init_types(assay_df, assay_type = "pMN")
}
\arguments{
\item{assay_df}{dataframe, containing biological assay data from plate reader}
\item{assay_type}{character, ... | /man/init_types.Rd | permissive | DIOSVax/AutoPlate | R | false | true | 552 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fct_1_input.R
\name{init_types}
\alias{init_types}
\title{Init types}
\usage{
init_types(assay_df, assay_type = "pMN")
}
\arguments{
\item{assay_df}{dataframe, containing biological assay data from plate reader}
\item{assay_type}{character, ... |
library(plumber)
r <- plumb("HW13A/myapi.r")
r$run(port=80)
| /HW13/HW13A.R | no_license | xiliangyan123/ST558HWs | R | false | false | 65 | r | library(plumber)
r <- plumb("HW13A/myapi.r")
r$run(port=80)
|
library(glmnet)
mydata = read.table("./TrainingSet/Correlation/pancreas.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.6,family="gaussian",standardize=FALSE)
sink('./Model/EN/Correlation/pancreas/pancreas_066.t... | /Model/EN/Correlation/pancreas/pancreas_066.R | no_license | leon1003/QSMART | R | false | false | 366 | r | library(glmnet)
mydata = read.table("./TrainingSet/Correlation/pancreas.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.6,family="gaussian",standardize=FALSE)
sink('./Model/EN/Correlation/pancreas/pancreas_066.t... |
install.packages("twitteR") #these packages are needed to extract data from twitter
library("twitteR")
install.packages("ROAuth") #this package is required for authentication
library("ROAuth")
cred <- OAuthFactory$new(consumerKey='43hHJkZa4snEM8vbikYur2C0V', # Consumer Key (API Key)
consum... | /TEXTMINING.R | no_license | Hareeshkay/DSA | R | false | false | 4,350 | r | install.packages("twitteR") #these packages are needed to extract data from twitter
library("twitteR")
install.packages("ROAuth") #this package is required for authentication
library("ROAuth")
cred <- OAuthFactory$new(consumerKey='43hHJkZa4snEM8vbikYur2C0V', # Consumer Key (API Key)
consum... |
##############################################################################
#' lists links on a Wikipedia page
#'
#' @description lists all links (to wikipedia and to external url) that are present in a specific wikipedia page.
#'
#' @param page numeric identifier or character title of the specific wikipedia pag... | /R/links.R | no_license | fxjollois/WikipediaR | R | false | false | 10,440 | r | ##############################################################################
#' lists links on a Wikipedia page
#'
#' @description lists all links (to wikipedia and to external url) that are present in a specific wikipedia page.
#'
#' @param page numeric identifier or character title of the specific wikipedia pag... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/IAT.R, R/iat.score.R
\name{iat_findOrder}
\alias{iat_findOrder}
\alias{iat_findOrder}
\title{Find compatibility order of IAT}
\usage{
iat_findOrder(df)
iat_findOrder(df)
}
\arguments{
\item{df}{same as scoring frame}
\item{df}{same as scori... | /man/iat_findOrder.Rd | no_license | michaelpmcdonald/noggin | R | false | true | 492 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/IAT.R, R/iat.score.R
\name{iat_findOrder}
\alias{iat_findOrder}
\alias{iat_findOrder}
\title{Find compatibility order of IAT}
\usage{
iat_findOrder(df)
iat_findOrder(df)
}
\arguments{
\item{df}{same as scoring frame}
\item{df}{same as scori... |
library(NetworkToolbox)
### Name: depend
### Title: Dependency Network Approach
### Aliases: depend
### ** Examples
D <- depend(neoOpen)
Dindex <- depend(neoOpen, index = TRUE)
| /data/genthat_extracted_code/NetworkToolbox/examples/depend.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 186 | r | library(NetworkToolbox)
### Name: depend
### Title: Dependency Network Approach
### Aliases: depend
### ** Examples
D <- depend(neoOpen)
Dindex <- depend(neoOpen, index = TRUE)
|
library(Momocs)
### Name: coo_align
### Title: Aligns coordinates
### Aliases: coo_align
### ** Examples
coo_plot(bot[1])
coo_plot(coo_align(bot[1]))
# on a Coo
stack(bot)
stack(coo_align(bot))
| /data/genthat_extracted_code/Momocs/examples/coo_align.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 201 | r | library(Momocs)
### Name: coo_align
### Title: Aligns coordinates
### Aliases: coo_align
### ** Examples
coo_plot(bot[1])
coo_plot(coo_align(bot[1]))
# on a Coo
stack(bot)
stack(coo_align(bot))
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ppt_ph_manipulate.R
\name{ph_add_text}
\alias{ph_add_text}
\title{append text}
\usage{
ph_add_text(x, str, type = "body", id = 1, id_chr = NULL,
ph_label = NULL, style = fp_text(font.size = 0), pos = "after",
href = NULL, slide_index = NU... | /man/ph_add_text.Rd | no_license | cest-ijsn/officer | R | false | true | 2,464 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ppt_ph_manipulate.R
\name{ph_add_text}
\alias{ph_add_text}
\title{append text}
\usage{
ph_add_text(x, str, type = "body", id = 1, id_chr = NULL,
ph_label = NULL, style = fp_text(font.size = 0), pos = "after",
href = NULL, slide_index = NU... |
train_url <- "http://s3.amazonaws.com/assets.datacamp.com/course/Kaggle/train.csv"
train <- read.csv(train_url)
test_url <- "http://s3.amazonaws.com/assets.datacamp.com/course/Kaggle/test.csv"
test <- read.csv(test_url)
train
test
str(train)
str(test)
table(train$Survived)
prop.table(table(train$Survived))
table(train$... | /src/r/kernels/srinivasarajui-srini-s-r-titanic-solution/script/srini-s-r-titanic-solution.R | no_license | PRL-PRG/trustworthy-titanic | R | false | false | 2,979 | r | train_url <- "http://s3.amazonaws.com/assets.datacamp.com/course/Kaggle/train.csv"
train <- read.csv(train_url)
test_url <- "http://s3.amazonaws.com/assets.datacamp.com/course/Kaggle/test.csv"
test <- read.csv(test_url)
train
test
str(train)
str(test)
table(train$Survived)
prop.table(table(train$Survived))
table(train$... |
# This function takes a qual and returns c(post_alpha, post_beta)
# Increments by prior alpha and prior distribution beta, uniform by default
parseQual <- function(qual, prior_alpha=1, prior_beta=1) {
if(is.na(qual) || !grepl("@", qual)) { return(c(prior_alpha, prior_beta)) } ## for INT NA Columns
res <- unlist... | /R/get_beta_ci.R | permissive | jtapial/psiplot | R | false | false | 3,673 | r |
# This function takes a qual and returns c(post_alpha, post_beta)
# Increments by prior alpha and prior distribution beta, uniform by default
parseQual <- function(qual, prior_alpha=1, prior_beta=1) {
if(is.na(qual) || !grepl("@", qual)) { return(c(prior_alpha, prior_beta)) } ## for INT NA Columns
res <- unlist... |
# Rscript ratio_genePval_tadPval.R
source("../Cancer_HiC_data_TAD_DA/utils_fct.R")
script_name <- "ratio_genePval_tadPval.R"
cat("... start ", script_name, "\n")
startTime <- Sys.time()
require(foreach)
require(doMC)
registerDoMC(40)
outFolder <- "RATIO_GENEPVAL_TADPVAL"
dir.create(outFolder)
script0_name <- "0_pr... | /ratio_genePval_tadPval.R | no_license | marzuf/CORRECT_Yuanlong_Cancer_HiC_data_TAD_DA | R | false | false | 11,988 | r | # Rscript ratio_genePval_tadPval.R
source("../Cancer_HiC_data_TAD_DA/utils_fct.R")
script_name <- "ratio_genePval_tadPval.R"
cat("... start ", script_name, "\n")
startTime <- Sys.time()
require(foreach)
require(doMC)
registerDoMC(40)
outFolder <- "RATIO_GENEPVAL_TADPVAL"
dir.create(outFolder)
script0_name <- "0_pr... |
#-------------------------------------------------------------------------
# Roseric Azondekon,
# December 17, 2018
# Last Update: May 21, 2019
# ZSPH, Milwaukee, WI, USA
#-------------------------------------------------------------------------
system("source ~/.bashrc",wait = F)
system("LCYAN='\033[1;36m' && NC=... | /linux/global.R | no_license | rosericazondekon/irnaa | R | false | false | 4,809 | r | #-------------------------------------------------------------------------
# Roseric Azondekon,
# December 17, 2018
# Last Update: May 21, 2019
# ZSPH, Milwaukee, WI, USA
#-------------------------------------------------------------------------
system("source ~/.bashrc",wait = F)
system("LCYAN='\033[1;36m' && NC=... |
###########################
##### Input variable ######
###########################
#### T_soil, T_air: soil temperature, air temperature (Kelvin)
#### delta_L, delta_air: isotopic composition (permil)
#### RH_air 0~100: relative humidity percent from 1-100 (%)
#### theta_soil: ... | /delta_E/source/craig_gordon_model.R | no_license | sunxm19/ET_Partitioning_tallgrass_prairie | R | false | false | 3,767 | r | ###########################
##### Input variable ######
###########################
#### T_soil, T_air: soil temperature, air temperature (Kelvin)
#### delta_L, delta_air: isotopic composition (permil)
#### RH_air 0~100: relative humidity percent from 1-100 (%)
#### theta_soil: ... |
##devuelve todas las combinaciones de distancia hamming 2, y devuelve tambien la distancia G
combinaciones.base<- function(base,orden=1,distanciaH=2){
lbas<-length(base)
j<-1
listaBases<-list()
listaDisG<-c()
if(orden==1){
for(it1 in 1:(lbas-1)){
for(it2 in (it1+1):(lbas)){
listaBases[[j]]<-... | /combinaciones.base.R | no_license | Rafata8/TFM | R | false | false | 924 | r | ##devuelve todas las combinaciones de distancia hamming 2, y devuelve tambien la distancia G
combinaciones.base<- function(base,orden=1,distanciaH=2){
lbas<-length(base)
j<-1
listaBases<-list()
listaDisG<-c()
if(orden==1){
for(it1 in 1:(lbas-1)){
for(it2 in (it1+1):(lbas)){
listaBases[[j]]<-... |
##############################################
# WASH Benefits Bangladesh STH Kato-Katz Study
# Primary outcome analysis
# STH adjusted analysis
# Eggs per gram
# Effect modification by percentage of latrine
# mud floor > 0%
# by Jade Benjamin-Chung
# jadebc@berkeley.edu
##########################################... | /analysis/5-epg-effectmod/5ku-PR-epg-unadj-lmud.R | no_license | LaKwong/WBB-STH-Kato-Katz | R | false | false | 8,776 | r | ##############################################
# WASH Benefits Bangladesh STH Kato-Katz Study
# Primary outcome analysis
# STH adjusted analysis
# Eggs per gram
# Effect modification by percentage of latrine
# mud floor > 0%
# by Jade Benjamin-Chung
# jadebc@berkeley.edu
##########################################... |
#' Make a vector of the lower half of a square distance matrix
#'
#' This function will prepare and compile objects and commands for optimization with the GA package
#'
#' @param matrix Square distance matrix with no row names.
#' @return A vector of the lower half of the matrix
#'
#' @details This is a convenience fun... | /R/lower_matrix.R | no_license | rmarrotte/ResistanceGA | R | false | false | 721 | r | #' Make a vector of the lower half of a square distance matrix
#'
#' This function will prepare and compile objects and commands for optimization with the GA package
#'
#' @param matrix Square distance matrix with no row names.
#' @return A vector of the lower half of the matrix
#'
#' @details This is a convenience fun... |
# Getting and Cleaning Data
# Course Project
# run_analysis.R should:
# 1. Merge the training and the test sets
# 2. Extract the measurements on the mean and standard deviation
# 3. Use descriptive activity names to name the activities
# 4. label the data set with descriptive variable names
# 5. Create a second, indep... | /run_analysis.R | no_license | swissconfetti/tidy-data-project | R | false | false | 3,198 | r | # Getting and Cleaning Data
# Course Project
# run_analysis.R should:
# 1. Merge the training and the test sets
# 2. Extract the measurements on the mean and standard deviation
# 3. Use descriptive activity names to name the activities
# 4. label the data set with descriptive variable names
# 5. Create a second, indep... |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library("shinyAce") # for showing text files, code
library(shinyBS) # for popup figures
shinyUI(
# fluidPage(
navbarPage("iDEP... | /shinyapps/idep73/old/ui_v.17.R | no_license | iDEP-SDSU/idep | R | false | false | 13,805 | r |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library("shinyAce") # for showing text files, code
library(shinyBS) # for popup figures
shinyUI(
# fluidPage(
navbarPage("iDEP... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% GenomeInformation.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{getUnitIndices.G... | /man/getUnitIndices.GenomeInformation.Rd | no_license | HenrikBengtsson/aroma.affymetrix | R | false | false | 1,159 | rd | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% GenomeInformation.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{getUnitIndices.G... |
library(tidyverse)
library(lme4)
random_formulas = list(
null = " + (1 | id)",
cu = " + (1 + congruent + update | id)",
cus = " + (1 + congruent + update + sleepy | id)"
)
fixed_formulas = list(
null = " ~ 1",
c = " ~ congruent",
u = " ~ update",
s = " ~ sleepy",
c_u = " ~ congruent + update",
c... | /_3_main_models.R | permissive | micing/sleepy_brain_stroop | R | false | false | 4,345 | r | library(tidyverse)
library(lme4)
random_formulas = list(
null = " + (1 | id)",
cu = " + (1 + congruent + update | id)",
cus = " + (1 + congruent + update + sleepy | id)"
)
fixed_formulas = list(
null = " ~ 1",
c = " ~ congruent",
u = " ~ update",
s = " ~ sleepy",
c_u = " ~ congruent + update",
c... |
library(readxl)
June16 <- read_excel("~/June16.xls")
June17 <- read_excel("~/June17.xls")
June18 <- read_excel("~/June18.xls")
June19 <- read_excel("~/June19.xls")
June20 <- read_excel("~/June20.xls")
June21 <- read_excel("~/June21.xls")
June22 <- read_excel("~/June22.xls")
June23 <- read_excel("~/June23.xls")
... | /Practice/TS-Assign 4 ARNAB.R | no_license | eitrheim/Time-Series-Forecasting | R | false | false | 4,298 | r | library(readxl)
June16 <- read_excel("~/June16.xls")
June17 <- read_excel("~/June17.xls")
June18 <- read_excel("~/June18.xls")
June19 <- read_excel("~/June19.xls")
June20 <- read_excel("~/June20.xls")
June21 <- read_excel("~/June21.xls")
June22 <- read_excel("~/June22.xls")
June23 <- read_excel("~/June23.xls")
... |
data("ToothGrowth")
#TipoAdministracao = 'Suco de Laranja', quando supp == 'OJ'
#TipoAdministracao = 'Ácido Ascórbico', quando supp == 'VC'
ToothGrowth$TipoAdministracao = ifelse(
ToothGrowth$supp == 'OJ',
'Suco de Laranja',
'Ácido Ascórbico'
)
# converter_tipo_administracao = function (tipoDieta) {
# if (tip... | /exercicios/resolução segunda parte.R | no_license | ahxsahxs/EDA-with-R | R | false | false | 3,107 | r | data("ToothGrowth")
#TipoAdministracao = 'Suco de Laranja', quando supp == 'OJ'
#TipoAdministracao = 'Ácido Ascórbico', quando supp == 'VC'
ToothGrowth$TipoAdministracao = ifelse(
ToothGrowth$supp == 'OJ',
'Suco de Laranja',
'Ácido Ascórbico'
)
# converter_tipo_administracao = function (tipoDieta) {
# if (tip... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apply_filters.R
\name{apply_filters}
\alias{apply_filters}
\title{Apply consecutive filter expressions to a data frame and return results}
\usage{
apply_filters(
data,
filters,
summary_fun = function(data) {
dplyr::summarise(data)
... | /man/apply_filters.Rd | permissive | jbkunst/risk3r | R | false | true | 1,077 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apply_filters.R
\name{apply_filters}
\alias{apply_filters}
\title{Apply consecutive filter expressions to a data frame and return results}
\usage{
apply_filters(
data,
filters,
summary_fun = function(data) {
dplyr::summarise(data)
... |
GEP <- read.csv("/mnt/data1/weixu/HiDe/ST_data/GSE150580_Li_Brugge_10XscRNAseq_GeneCellMatrix_RNAcounts_GEO.csv",header=TRUE,row.names=1)
metadata <- read.csv("GSE150580_Li_Brugge_10XscRNAseq_Metadata_GEO.csv",header=TRUE,row.names=1)
metadata <- subset(metadata,m.CellTypes %in% c("Luminal-AV","Fibroblast","Myoepit... | /ENIGMA_analysis/ENIGMA_Script/Simulate.R | permissive | WWXkenmo/ENIGMA | R | false | false | 4,407 | r | GEP <- read.csv("/mnt/data1/weixu/HiDe/ST_data/GSE150580_Li_Brugge_10XscRNAseq_GeneCellMatrix_RNAcounts_GEO.csv",header=TRUE,row.names=1)
metadata <- read.csv("GSE150580_Li_Brugge_10XscRNAseq_Metadata_GEO.csv",header=TRUE,row.names=1)
metadata <- subset(metadata,m.CellTypes %in% c("Luminal-AV","Fibroblast","Myoepit... |
#makecachematrix
#create 'matrix' object that can cache its inverse
makecachematrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function () x
setinverse <- function(inverse) i <<- inverse
getinverse <- function() i
list (set=set, get=get, setinverse=setinverse, getinverse=g... | /cachematrix.R | no_license | igrosu1/ProgrammingAssignment2 | R | false | false | 770 | r | #makecachematrix
#create 'matrix' object that can cache its inverse
makecachematrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function () x
setinverse <- function(inverse) i <<- inverse
getinverse <- function() i
list (set=set, get=get, setinverse=setinverse, getinverse=g... |
load_stock_data <- function(file) {
data <- read_stock_data(file)
# Add archived prices
archived_prices <- get_archived_prices()
data <- rbind(archived_prices, data, fill = TRUE)
# Add Neodaq composite index
index <- calc_market_index(data)
data <- rbind(data, index)
data
}
# Calculate Neodaq composi... | /R/stocks.R | permissive | glin/neostocks | R | false | false | 5,052 | r | load_stock_data <- function(file) {
data <- read_stock_data(file)
# Add archived prices
archived_prices <- get_archived_prices()
data <- rbind(archived_prices, data, fill = TRUE)
# Add Neodaq composite index
index <- calc_market_index(data)
data <- rbind(data, index)
data
}
# Calculate Neodaq composi... |
testlist <- list(ExpressionSet = structure(c(3.10503529625691e+231, 1.23181983389617e+58, 1.52478221747831e+245, 6.36967296041789e+178, 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)), Phylostratum = numeric(0))
result <- do.call(myTAI:::cpp_TAI,testlis... | /myTAI/inst/testfiles/cpp_TAI/AFL_cpp_TAI/cpp_TAI_valgrind_files/1615763157-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 334 | r | testlist <- list(ExpressionSet = structure(c(3.10503529625691e+231, 1.23181983389617e+58, 1.52478221747831e+245, 6.36967296041789e+178, 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)), Phylostratum = numeric(0))
result <- do.call(myTAI:::cpp_TAI,testlis... |
library(leaflet)
m <- leaflet() %>%
addTiles() %>%
addMarkers(lng = 4.831719, lat = 45.757812, popup= "Place Bellecour")%>%
addMarkers(lng = 4.835302, lat = 45.767662, popup = "Hôtel de ville")
m | /test_leaflet.R | no_license | Mkys/activite_1 | R | false | false | 203 | r | library(leaflet)
m <- leaflet() %>%
addTiles() %>%
addMarkers(lng = 4.831719, lat = 45.757812, popup= "Place Bellecour")%>%
addMarkers(lng = 4.835302, lat = 45.767662, popup = "Hôtel de ville")
m |
# This file is a part of zonator package
# Copyright (C) 2012-2014 Joona Lehtomaki <joona.lehtomaki@gmai.com>. All rights
# reserved.
# This program is open source software; you can redistribute it and/or modify
# it under the terms of the FreeBSD License (keep this notice):
# http://en.wikipedia.org/wiki/BSD_license... | /R/zresults-methods.R | no_license | MirzaCengic/zonator | R | false | false | 6,368 | r | # This file is a part of zonator package
# Copyright (C) 2012-2014 Joona Lehtomaki <joona.lehtomaki@gmai.com>. All rights
# reserved.
# This program is open source software; you can redistribute it and/or modify
# it under the terms of the FreeBSD License (keep this notice):
# http://en.wikipedia.org/wiki/BSD_license... |
# Dependencies
library(plotly)
library(tidyverse)
library(forcats)
library(shiny)
library(stringr)
library(treemapify)
library(scales)
library(colorspace)
library(DT)
# Import and clean datasets
source(file = 'src/import-clean.R')
###################
# Shiny App Server
##################
server <- function(input, ou... | /server.R | no_license | LeeYinYing/movies_vis_shiny | R | false | false | 10,269 | r | # Dependencies
library(plotly)
library(tidyverse)
library(forcats)
library(shiny)
library(stringr)
library(treemapify)
library(scales)
library(colorspace)
library(DT)
# Import and clean datasets
source(file = 'src/import-clean.R')
###################
# Shiny App Server
##################
server <- function(input, ou... |
\name{str_C.expand.grid}
\alias{str_C.expand.grid}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
\R Utilities: String Paste Combined with \code{expand.grid}
}
\description{
String paste combined with \code{expand.grid}
}
\usage{
str_C.expand.grid(xlist , indices=NULL)
}
%- maybe als... | /man/str_C.expand.grid.Rd | no_license | clbustos/miceadds | R | false | false | 2,164 | rd | \name{str_C.expand.grid}
\alias{str_C.expand.grid}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
\R Utilities: String Paste Combined with \code{expand.grid}
}
\description{
String paste combined with \code{expand.grid}
}
\usage{
str_C.expand.grid(xlist , indices=NULL)
}
%- maybe als... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cran_stats.R
\name{set_cran_start_year}
\alias{set_cran_start_year}
\title{set_cran_start_year}
\usage{
set_cran_start_year(year)
}
\arguments{
\item{year}{start year}
}
\description{
set query start year for `cran_stats`
}
\aut... | /man/set_cran_start_year.Rd | no_license | cran/dlstats | R | false | true | 345 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cran_stats.R
\name{set_cran_start_year}
\alias{set_cran_start_year}
\title{set_cran_start_year}
\usage{
set_cran_start_year(year)
}
\arguments{
\item{year}{start year}
}
\description{
set query start year for `cran_stats`
}
\aut... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{toWebGL}
\alias{toWebGL}
\title{Convert trace types to WebGL}
\usage{
toWebGL(p)
}
\arguments{
\item{p}{a plotly or ggplot object.}
}
\description{
Convert trace types to WebGL
}
\examples{
# currently no bargl trace type
toW... | /man/toWebGL.Rd | permissive | MhAmine/plotly | R | false | true | 368 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{toWebGL}
\alias{toWebGL}
\title{Convert trace types to WebGL}
\usage{
toWebGL(p)
}
\arguments{
\item{p}{a plotly or ggplot object.}
}
\description{
Convert trace types to WebGL
}
\examples{
# currently no bargl trace type
toW... |
\name{dateToEpiweek}
\alias{dateToEpiweek}
\title{
Convert Calendar Dates to Epidemiological Weeks
}
\description{
This function calculates the year and epidemiological week for a given calendar date. By definition, the first epidemiological week of the year contains at least four days in January.
}
\usage{
... | /man/dateToEpiweek.Rd | no_license | cran/EpiWeek | R | false | false | 1,131 | rd | \name{dateToEpiweek}
\alias{dateToEpiweek}
\title{
Convert Calendar Dates to Epidemiological Weeks
}
\description{
This function calculates the year and epidemiological week for a given calendar date. By definition, the first epidemiological week of the year contains at least four days in January.
}
\usage{
... |
graphics.off()
rm(list=ls(all=TRUE))
fileNameRoot="FilconJags" # for constructing output filenames
source("openGraphSaveGraph.R")
require(rjags) # Kruschke, J. K. (2011). Doing Bayesian Data Analysis:
# A Tutorial with R and BUGS. Academic Press / Elsevier.
#------------------------------... | /code-data/FilconJags.R | no_license | durtal/dba-ed1 | R | false | false | 6,846 | r | graphics.off()
rm(list=ls(all=TRUE))
fileNameRoot="FilconJags" # for constructing output filenames
source("openGraphSaveGraph.R")
require(rjags) # Kruschke, J. K. (2011). Doing Bayesian Data Analysis:
# A Tutorial with R and BUGS. Academic Press / Elsevier.
#------------------------------... |
library(tidyverse)
library(sf)
library(leaflet)
# leyendo los barrios informales del repo nacional ------------------------
villas <- st_read(dsn = "/Users/demian/Downloads/CABA Datos",
layer = "CABA_GA_WGS84")
#barrios_populares <- st_read(dsn = "/Users/demian/Downloads/barrios-populares",
... | /Modulo 3/trabajopractico.R | no_license | Demzayat/varios | R | false | false | 7,929 | r | library(tidyverse)
library(sf)
library(leaflet)
# leyendo los barrios informales del repo nacional ------------------------
villas <- st_read(dsn = "/Users/demian/Downloads/CABA Datos",
layer = "CABA_GA_WGS84")
#barrios_populares <- st_read(dsn = "/Users/demian/Downloads/barrios-populares",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_server.R
\name{store_raw_data_filepath}
\alias{store_raw_data_filepath}
\title{Server-side utility for \code{ibiVizEdit} that observes and updates raw data paths file paths}
\usage{
store_raw_data_filepath(input, input_name = NULL)
}
\a... | /man/store_raw_data_filepath.Rd | no_license | dr-consulting/ibi_VizEdit | R | false | true | 530 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_server.R
\name{store_raw_data_filepath}
\alias{store_raw_data_filepath}
\title{Server-side utility for \code{ibiVizEdit} that observes and updates raw data paths file paths}
\usage{
store_raw_data_filepath(input, input_name = NULL)
}
\a... |
LogLik.weibullGH <-
function (thetas) {
thetas <- relist(thetas, skeleton = list.thetas)
betas <- thetas$betas
sigma <- exp(thetas$log.sigma)
gammas <- thetas$gammas
alpha <- thetas$alpha
Dalpha <- thetas$Dalpha
sigma.t <- if (is.null(scaleWB)) exp(thetas$log.sigma.t) else scaleWB
... | /R/LogLik.weibullGH.R | no_license | cran/JM | R | false | false | 2,154 | r | LogLik.weibullGH <-
function (thetas) {
thetas <- relist(thetas, skeleton = list.thetas)
betas <- thetas$betas
sigma <- exp(thetas$log.sigma)
gammas <- thetas$gammas
alpha <- thetas$alpha
Dalpha <- thetas$Dalpha
sigma.t <- if (is.null(scaleWB)) exp(thetas$log.sigma.t) else scaleWB
... |
testlist <- list(bytes1 = c(0L, 0L, 0L, 0L, 0L, 0L), pmutation = 0)
result <- do.call(mcga:::ByteCodeMutation,testlist)
str(result) | /mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612802720-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 131 | r | testlist <- list(bytes1 = c(0L, 0L, 0L, 0L, 0L, 0L), pmutation = 0)
result <- do.call(mcga:::ByteCodeMutation,testlist)
str(result) |
# Homwework 4
# ---- C1 ----
library("ggplot2")
library("GGally")
# Must load other packages first
library("sand")
library("scales")
library("intergraph")
# ---- C2 ----
setwd("F:/Fall Quarter 2018/DSC 480/Week 4/hwk4/hwk4")
lesmis <- read.graph("les-mis-full.graphml", format="graphml")
# ---- C3 -... | /hwk4.R | no_license | aboyd20/Social-Network-Analysis | R | false | false | 1,639 | r | # Homwework 4
# ---- C1 ----
library("ggplot2")
library("GGally")
# Must load other packages first
library("sand")
library("scales")
library("intergraph")
# ---- C2 ----
setwd("F:/Fall Quarter 2018/DSC 480/Week 4/hwk4/hwk4")
lesmis <- read.graph("les-mis-full.graphml", format="graphml")
# ---- C3 -... |
################################################################
################################################################
D.penalty<- function(tt) {
rtt<-diff(tt)
hh<--(1/mean(1/rtt))/rtt
Dmat1<-diag(hh)
p<-length(tt)
mat<-matrix(rep(0,p-1),ncol=1)
Dmat12<-cbind(Dmat1,mat)
Dmat22<-cbind(mat,-Dma... | /fda.usc/R/fregre.PPC.PPLS.R | no_license | ingted/R-Examples | R | false | false | 28,494 | r | ################################################################
################################################################
D.penalty<- function(tt) {
rtt<-diff(tt)
hh<--(1/mean(1/rtt))/rtt
Dmat1<-diag(hh)
p<-length(tt)
mat<-matrix(rep(0,p-1),ncol=1)
Dmat12<-cbind(Dmat1,mat)
Dmat22<-cbind(mat,-Dma... |
# Get updated information about champions
champion_constants <<- get_champion_constants() %>%
ldply(data.frame)
champion_constants[, "key"] <-
as.numeric(as.character(champion_constants[, "key"]))
champion_constants <<-
champion_constants[!duplicated(champion_constants$key), ] | /app_initialData.R | permissive | Kevinjchang98/INFO201-Final-Project-LoL-Stats | R | false | false | 285 | r | # Get updated information about champions
champion_constants <<- get_champion_constants() %>%
ldply(data.frame)
champion_constants[, "key"] <-
as.numeric(as.character(champion_constants[, "key"]))
champion_constants <<-
champion_constants[!duplicated(champion_constants$key), ] |
# author: Denis O'Hora
# inspired by notBoxPlot by raacampbell
# https://github.com/raacampbell/notBoxPlot
# see also https://helenajambor.wordpress.com/2018/08/28/pick-n-mix-plots/
# Purpose
# An alternative to a box plot, where the focus is on showing raw
# data. Plots columns of y as different groups located at p... | /notboxplot.R | no_license | denohora/data_vis | R | false | false | 3,109 | r | # author: Denis O'Hora
# inspired by notBoxPlot by raacampbell
# https://github.com/raacampbell/notBoxPlot
# see also https://helenajambor.wordpress.com/2018/08/28/pick-n-mix-plots/
# Purpose
# An alternative to a box plot, where the focus is on showing raw
# data. Plots columns of y as different groups located at p... |
\name{data2excel}
\alias{data2excel}
\title{Save data with data.frame structure into Excel file}
\usage{
data2excel(data, filename, sheetname, create =TRUE)
}
\description{
The function could be used as saving R data into Excel.
}
\arguments{
\item{data} {a dataframe file.}
\item{filename} {file name on an excel ou... | /man/data2excel.Rd | no_license | panx125/figsci | R | false | false | 804 | rd | \name{data2excel}
\alias{data2excel}
\title{Save data with data.frame structure into Excel file}
\usage{
data2excel(data, filename, sheetname, create =TRUE)
}
\description{
The function could be used as saving R data into Excel.
}
\arguments{
\item{data} {a dataframe file.}
\item{filename} {file name on an excel ou... |
library(ROI.plugin.ecos)
### Name: Example-2
### Title: SOCP 2
### ** Examples
library(ROI)
obj <- L_objective(c(1, -1))
L <- chol(rbind(c(3, -1), c(-1, 1)))
con <- C_constraint(L = rbind(0, -L),
cones = K_soc(3),
rhs = c(1, 0, 0))
op <- OP(objective = obj, constraints = c... | /data/genthat_extracted_code/ROI.plugin.ecos/examples/Example_02.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 530 | r | library(ROI.plugin.ecos)
### Name: Example-2
### Title: SOCP 2
### ** Examples
library(ROI)
obj <- L_objective(c(1, -1))
L <- chol(rbind(c(3, -1), c(-1, 1)))
con <- C_constraint(L = rbind(0, -L),
cones = K_soc(3),
rhs = c(1, 0, 0))
op <- OP(objective = obj, constraints = c... |
require(data.table)
dtTokenSplit <- function(dt){
#INPUT: datatable with two columns (dt$token, dt$count)
#RETURNS: a larger datatable with a single column for each word in the token, split by " ",
# and the count as the final column.
dt.split <- data.table(do.call(rbind, strsplit(as.vector(d... | /importRDS_dt.R | no_license | Libardo1/predictive-text-analysis | R | false | false | 2,877 | r | require(data.table)
dtTokenSplit <- function(dt){
#INPUT: datatable with two columns (dt$token, dt$count)
#RETURNS: a larger datatable with a single column for each word in the token, split by " ",
# and the count as the final column.
dt.split <- data.table(do.call(rbind, strsplit(as.vector(d... |
#' Get Quarterly Free Cash Flow from Statementdog
#'
#' This function will return quarterly free cash flow of a certain stock.
#' @param x Stock ticker.
#' @param recent_n Recent n quarters, default 16.
#' @keywords get_quarterly_free_cf
#' @export
#' @examples
#' get_quarterly_free_cf(2330)
#' get_quarterly_free_cf(30... | /R/get_quarterly_free_cf.R | no_license | yaojenkuo/stockreenr | R | false | false | 917 | r | #' Get Quarterly Free Cash Flow from Statementdog
#'
#' This function will return quarterly free cash flow of a certain stock.
#' @param x Stock ticker.
#' @param recent_n Recent n quarters, default 16.
#' @keywords get_quarterly_free_cf
#' @export
#' @examples
#' get_quarterly_free_cf(2330)
#' get_quarterly_free_cf(30... |
# Plot 5
# How have emissions from motor vehicle sources changed from 1999–2008 in Baltimore City?
# To answer this question we will look at
# 1) total baltimore MV emissions over the period
# 2) the composition of baltimore MV emissions sectors over the period
# Step 0: Data Import and package load
NEI <- readRDS("... | /Exploratory Data Analysis/Project 2/Plot5.R | no_license | JoshuaSlocum/Data-Science-Coursera | R | false | false | 2,074 | r | # Plot 5
# How have emissions from motor vehicle sources changed from 1999–2008 in Baltimore City?
# To answer this question we will look at
# 1) total baltimore MV emissions over the period
# 2) the composition of baltimore MV emissions sectors over the period
# Step 0: Data Import and package load
NEI <- readRDS("... |
# LatticeKrig is a package for analysis of spatial data written for
# the R software environment .
# Copyright (C) 2012
# University Corporation for Atmospheric Research (UCAR)
# Contact: Douglas Nychka, nychka@ucar.edu,
# National Center for Atmospheric Research, PO Box 3000, Boulder, CO 80307-3000
#
# This program i... | /LatticeKrig/R/LKRectangleFastNormalization.R | no_license | ingted/R-Examples | R | false | false | 2,255 | r | # LatticeKrig is a package for analysis of spatial data written for
# the R software environment .
# Copyright (C) 2012
# University Corporation for Atmospheric Research (UCAR)
# Contact: Douglas Nychka, nychka@ucar.edu,
# National Center for Atmospheric Research, PO Box 3000, Boulder, CO 80307-3000
#
# This program i... |
## app.R ##
# ******** This program creates the RDS files for the EPIC app ******************************
##Self Directed EPIC 1/07/2020
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
library(shinyWidgets)
library(markdown)
library(tidyverse)
library(DT)
library(tools)
library(shinyjs)
library(sodi... | /EPIC_BLS_IPEDS.R | no_license | nvs-group/EPIC_Data_Extractor | R | false | false | 41,401 | r | ## app.R ##
# ******** This program creates the RDS files for the EPIC app ******************************
##Self Directed EPIC 1/07/2020
library(shiny)
library(shinydashboard)
library(shinydashboardPlus)
library(shinyWidgets)
library(markdown)
library(tidyverse)
library(DT)
library(tools)
library(shinyjs)
library(sodi... |
# Utility functions
#' Rank features by univariate glm
#'
#' Fits a glm in each predictor and returns the p-value for \eqn{\beta_1} in
#' each glm.
#'
#' @param x A predictor matrix with samples in the rows.
#' @param y A response vector.
#' @param family A description of the error distribution/link function for the
#... | /R/utility.R | no_license | congca/einr | R | false | false | 1,921 | r | # Utility functions
#' Rank features by univariate glm
#'
#' Fits a glm in each predictor and returns the p-value for \eqn{\beta_1} in
#' each glm.
#'
#' @param x A predictor matrix with samples in the rows.
#' @param y A response vector.
#' @param family A description of the error distribution/link function for the
#... |
#' savePlot.plotSummaryAlphaPart.R
#'
#' Save plot objects on the disk for permanent storage. Function \code{\link[grDevices]{savePlot}} from the \pkg{grDevices} package
#' works for current page on graphical device. This is an attempt to make this
#' function generic so that one can define \code{savePlot} methods for ... | /fuzzedpackages/AlphaPart/R/savePlot.plotSummaryAlphaPart.R | no_license | akhikolla/testpackages | R | false | false | 3,832 | r | #' savePlot.plotSummaryAlphaPart.R
#'
#' Save plot objects on the disk for permanent storage. Function \code{\link[grDevices]{savePlot}} from the \pkg{grDevices} package
#' works for current page on graphical device. This is an attempt to make this
#' function generic so that one can define \code{savePlot} methods for ... |
# This script delineates the upstream catchments of the arcHydro output shapefile.
rm(list=ls())
# Load libraries
library(tcltk)
library(foreign)
# ======================
# Specify base directory
# ======================
baseDirectory <- 'C:/KPONEIL/GitHub/projects/basinCharacteristics/zonalStatistics'
# Read user-... | /zonalStatistics/scripts/HRD2_delineateUpstreamCatchments.R | no_license | Conte-Ecology/basinCharacteristics | R | false | false | 2,383 | r | # This script delineates the upstream catchments of the arcHydro output shapefile.
rm(list=ls())
# Load libraries
library(tcltk)
library(foreign)
# ======================
# Specify base directory
# ======================
baseDirectory <- 'C:/KPONEIL/GitHub/projects/basinCharacteristics/zonalStatistics'
# Read user-... |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Dynamic filtering of diamonds dataset"),
# Sidebar with a slider input ... | /ui.R | no_license | UNFAOstatistics/shiny_forestry | R | false | false | 1,054 | r |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Dynamic filtering of diamonds dataset"),
# Sidebar with a slider input ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/size.R
\name{size}
\alias{size}
\title{Shape and Size Function}
\usage{
size(x)
}
\arguments{
\item{x}{a dataframe}
}
\value{
a dataframe
}
\description{
Gives the shape and size of a dataframe
}
\examples{
data <- data.frame("names" = c("Rac... | /man/size.Rd | permissive | UBC-MDS/exploreR | R | false | true | 469 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/size.R
\name{size}
\alias{size}
\title{Shape and Size Function}
\usage{
size(x)
}
\arguments{
\item{x}{a dataframe}
}
\value{
a dataframe
}
\description{
Gives the shape and size of a dataframe
}
\examples{
data <- data.frame("names" = c("Rac... |
#create special "matrix" that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setinv <- function(inv) i <<- inv
getinv <- function() i
list (set=set, get=get, setinv=setinv, getinv=getinv)
}
#Compute the i... | /CacheMatrix_b.R | no_license | jstarks75/jsProgrammingAssignment2 | R | false | false | 1,271 | r | #create special "matrix" that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setinv <- function(inv) i <<- inv
getinv <- function() i
list (set=set, get=get, setinv=setinv, getinv=getinv)
}
#Compute the i... |
library(ape)
testtree <- read.tree("9201_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9201_1_unrooted.txt") | /codeml_files/newick_trees_processed/9201_1/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("9201_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9201_1_unrooted.txt") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis.R
\name{cutoff.select}
\alias{cutoff.select}
\title{To select appropriate cutoff values for number of cells given gexp data
input- data: gene expression data; vector of integer values with number of cells; vector of integer values wi... | /man/cutoff.select.Rd | no_license | samychillara/ScRB | R | false | true | 811 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis.R
\name{cutoff.select}
\alias{cutoff.select}
\title{To select appropriate cutoff values for number of cells given gexp data
input- data: gene expression data; vector of integer values with number of cells; vector of integer values wi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dimred_pcoa.R
\name{dimred_pcoa}
\alias{dimred_pcoa}
\title{Dimensionality reduction through PCoA}
\usage{
dimred_pcoa(MAE, tax_level, color, shape = NULL, axx = 1, axy = 2,
axz = NULL, method = c("bray", "jaccard"))
}
\arguments{
\item{MAE... | /man/dimred_pcoa.Rd | permissive | it-fm/animalcules | R | false | true | 1,233 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dimred_pcoa.R
\name{dimred_pcoa}
\alias{dimred_pcoa}
\title{Dimensionality reduction through PCoA}
\usage{
dimred_pcoa(MAE, tax_level, color, shape = NULL, axx = 1, axy = 2,
axz = NULL, method = c("bray", "jaccard"))
}
\arguments{
\item{MAE... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Main.R
\name{execute}
\alias{execute}
\title{Execute the Study}
\usage{
execute(connectionDetails, cdmDatabaseSchema,
cohortDatabaseSchema = cdmDatabaseSchema, cohortTable = "cohort",
oracleTempSchema = cohortDatabaseSchema, outputFolder,... | /TenofovirVsEntecavir/man/execute.Rd | no_license | NEONKID/StudyProtocolSandbox | R | false | true | 3,086 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Main.R
\name{execute}
\alias{execute}
\title{Execute the Study}
\usage{
execute(connectionDetails, cdmDatabaseSchema,
cohortDatabaseSchema = cdmDatabaseSchema, cohortTable = "cohort",
oracleTempSchema = cohortDatabaseSchema, outputFolder,... |
# Yige Wu @WashU March 2020
## for each individual sample tumor cell reclustered, plot UMAP
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
sou... | /findmarkers/tumor_subclusters/plotting/violinplot_C3N-1200_integration_tumormanualsubcluster_selected_degs.R | no_license | ding-lab/ccRCC_snRNA_analysis | R | false | false | 3,623 | r | # Yige Wu @WashU March 2020
## for each individual sample tumor cell reclustered, plot UMAP
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
sou... |
library(keras)
reuters <- dataset_reuters(num_words = 10000)
c(c(train_data, train_labels), c(test_data, test_labels)) %<-% reuters
length(train_data)
length(test_data)
train_data[[1]]
# # Dekodowanie indeksow
# # Sprawdz z orginalem!
# word_index = dataset_reuters_word_index()
# reverse_word_index = names(word_inde... | /reuters.R | permissive | awerroes/keRas | R | false | false | 3,751 | r | library(keras)
reuters <- dataset_reuters(num_words = 10000)
c(c(train_data, train_labels), c(test_data, test_labels)) %<-% reuters
length(train_data)
length(test_data)
train_data[[1]]
# # Dekodowanie indeksow
# # Sprawdz z orginalem!
# word_index = dataset_reuters_word_index()
# reverse_word_index = names(word_inde... |
library(testthat)
library(blma)
library(tictoc)
library(parallel)
cores <- detectCores()
test_that('eyeData produces correct results liang_g1', {
set.seed(2019)
eyeData <- get_eyeData()
vy <- eyeData$vy
mX <- eyeData$mX
p <- ncol(mX)
tic('eyeData produces correct results liang_g1')
result <- sa... | /tests/testthat/test-eyeData_produces_correct_results_liang_g1.R | no_license | certifiedwaif/blma | R | false | false | 4,769 | r |
library(testthat)
library(blma)
library(tictoc)
library(parallel)
cores <- detectCores()
test_that('eyeData produces correct results liang_g1', {
set.seed(2019)
eyeData <- get_eyeData()
vy <- eyeData$vy
mX <- eyeData$mX
p <- ncol(mX)
tic('eyeData produces correct results liang_g1')
result <- sa... |
library(XML)
conn <- url('http://biostat.jhsph.edu/~jleek/contact.html')
html <- readLines(conn)
close(conn)
c(nchar(html[10]), nchar(html[20]), nchar(html[30]), nchar(html[100]))
| /Getting and Cleaning Data/Quiz/quiz 2 Q4.R | no_license | cheryonthetop/coursera | R | false | false | 180 | r | library(XML)
conn <- url('http://biostat.jhsph.edu/~jleek/contact.html')
html <- readLines(conn)
close(conn)
c(nchar(html[10]), nchar(html[20]), nchar(html[30]), nchar(html[100]))
|
#' Convert Temperature 2
#'
#' Converts temperature from speed of sound to Celcius
#'
#' @param d column of data
#'
#' @export
convert_temp_sos_c_2 = function(d){
#mask NA
d[is.na(d)] = -5667.9
#Convert Speed of sound to degrees celcius
d = (d - 331.5)/0.6
#d = (d - 323.44)/0.5564
#Unmask NA
d[d =... | /R/func_convert_sos_c2.R | no_license | nemochina2008/wsdmiscr | R | false | false | 353 | r | #' Convert Temperature 2
#'
#' Converts temperature from speed of sound to Celcius
#'
#' @param d column of data
#'
#' @export
convert_temp_sos_c_2 = function(d){
#mask NA
d[is.na(d)] = -5667.9
#Convert Speed of sound to degrees celcius
d = (d - 331.5)/0.6
#d = (d - 323.44)/0.5564
#Unmask NA
d[d =... |
# CLEAR MEMORY
rm(list=ls())
install.packages ("readr")
install.packages ("dplyr")
install.packages ("ggplot2")
install.packages ("pastecs")
install.packages ("arm")
install.packages("DataCombine")
install.packages("descr")
install.packages("mfx")
library(arm)
library(descr)
library(pastecs)
library(readr)
library(dpl... | /DA1/DA1_smoking_mortality_oldage_eu_HW2.R | no_license | lucakeresztesi/Data-Analysis | R | false | false | 8,585 | r | # CLEAR MEMORY
rm(list=ls())
install.packages ("readr")
install.packages ("dplyr")
install.packages ("ggplot2")
install.packages ("pastecs")
install.packages ("arm")
install.packages("DataCombine")
install.packages("descr")
install.packages("mfx")
library(arm)
library(descr)
library(pastecs)
library(readr)
library(dpl... |
#R: sampling from conditionals for both variance and mean
x=as.matrix(read.table("c:\\education.dat",header=F)[,1])
mu=matrix(0,2000); sig=matrix(1,2000)
for(i in 2:2000)
{
sig[i]=rgamma(1,(length(x)/2),rate=sum((x-mu2[i-1])^2)/2)
sig[i]=1/sig2[i]
mu[i]=rnorm(1,mean=mean(x),sd=(sqrt(sig2[i]/length(x))))... | /R/Lynch_IntroAppliedBayesian/p103.R | no_license | wmmurrah/BayesianAnalysis | R | false | false | 326 | r | #R: sampling from conditionals for both variance and mean
x=as.matrix(read.table("c:\\education.dat",header=F)[,1])
mu=matrix(0,2000); sig=matrix(1,2000)
for(i in 2:2000)
{
sig[i]=rgamma(1,(length(x)/2),rate=sum((x-mu2[i-1])^2)/2)
sig[i]=1/sig2[i]
mu[i]=rnorm(1,mean=mean(x),sd=(sqrt(sig2[i]/length(x))))... |
# Tanzania pH data setup
# M. Walsh, October 2017
# Required packages
# install.packages(c("downloader","rgdal","raster")), dependencies=TRUE)
suppressPackageStartupMessages({
require(downloader)
require(rgdal)
require(raster)
})
# Data downloads -----------------------------------------------------------
# set... | /TZ_pH_data.R | no_license | iSDAgri/Acidity | R | false | false | 1,785 | r | # Tanzania pH data setup
# M. Walsh, October 2017
# Required packages
# install.packages(c("downloader","rgdal","raster")), dependencies=TRUE)
suppressPackageStartupMessages({
require(downloader)
require(rgdal)
require(raster)
})
# Data downloads -----------------------------------------------------------
# set... |
#######################################################################
# TSP - Traveling Salesperson Problem
# Copyrigth (C) 2011 Michael Hahsler and Kurt Hornik
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | /R/cut_tour.R | no_license | amrrs/TSP | R | false | false | 1,292 | r | #######################################################################
# TSP - Traveling Salesperson Problem
# Copyrigth (C) 2011 Michael Hahsler and Kurt Hornik
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... |
\name{tcm}
\alias{tcm}
\title{Tail Conditional Mean Due To Kou et al. (2013)}
\description{Computes tail conditional median for a given ditribution}
\usage{
tcm(spec, alpha, ...)
}
\arguments{
\item{spec}{a character string specifying the distribution (for example, "norm" corresponds to the standard normal)}
... | /man/tcm.Rd | no_license | cran/Risk | R | false | false | 884 | rd | \name{tcm}
\alias{tcm}
\title{Tail Conditional Mean Due To Kou et al. (2013)}
\description{Computes tail conditional median for a given ditribution}
\usage{
tcm(spec, alpha, ...)
}
\arguments{
\item{spec}{a character string specifying the distribution (for example, "norm" corresponds to the standard normal)}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functionals.R
\name{flatmap}
\alias{flatmap}
\title{Apply a map and then flatten the result.}
\usage{
flatmap(xs, f)
}
\arguments{
\item{xs}{list. The list to map over.}
\item{f}{function. The mapping function to apply to each element of the... | /man/flatmap.Rd | permissive | peterhurford/funtools | R | false | true | 387 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functionals.R
\name{flatmap}
\alias{flatmap}
\title{Apply a map and then flatten the result.}
\usage{
flatmap(xs, f)
}
\arguments{
\item{xs}{list. The list to map over.}
\item{f}{function. The mapping function to apply to each element of the... |
## Curate dataset to answer questions about thyroid function
## and physical and mental health.
## Written by R. Glavin May/14/ 2020
## HS614
## Data taken from NHANES 20152016 dataset.
## Quantitative data for relationship between comorbid risk conditions
## for COVID
## Used Tutorials on NHANES Website as starti... | /NHANES/CollectRawdata2015.R | no_license | roseglavin/CausalCovid | R | false | false | 19,797 | r | ## Curate dataset to answer questions about thyroid function
## and physical and mental health.
## Written by R. Glavin May/14/ 2020
## HS614
## Data taken from NHANES 20152016 dataset.
## Quantitative data for relationship between comorbid risk conditions
## for COVID
## Used Tutorials on NHANES Website as starti... |
## Top-level script for generating the figures and table corrssponding to
## Ledberg (2020) Mortality of the COVID-19 outbreak in Sweden in relation to previous severe disease outbreaks
##
##
## A. Ledberg, 2020-12-04
## This code in this file load the mortality data and calls scripts to do the plotting
## and tabul... | /main.R | no_license | aledberg/outbreaks | R | false | false | 729 | r | ## Top-level script for generating the figures and table corrssponding to
## Ledberg (2020) Mortality of the COVID-19 outbreak in Sweden in relation to previous severe disease outbreaks
##
##
## A. Ledberg, 2020-12-04
## This code in this file load the mortality data and calls scripts to do the plotting
## and tabul... |
library(alphabetr)
### Name: bagpipe
### Title: Identify candidate alpha/beta pairs.
### Aliases: bagpipe
### ** Examples
# see the help for create_clones() and create_data()
clones <- create_clones(numb_beta = 1000,
dual_alpha = .3,
dual_beta = .06,
... | /data/genthat_extracted_code/alphabetr/examples/bagpipe.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,166 | r | library(alphabetr)
### Name: bagpipe
### Title: Identify candidate alpha/beta pairs.
### Aliases: bagpipe
### ** Examples
# see the help for create_clones() and create_data()
clones <- create_clones(numb_beta = 1000,
dual_alpha = .3,
dual_beta = .06,
... |
library(shiny)
#Import packages
function(input, output,session) {
#select the data for the plots K-meas
selectedData <- reactive({
df <- readData()
return (df[, c(input$xcol, input$ycol)])
})
#HC
scaled_data <- reactive({
# get all data
data <- readData()
# scale data, with trans... | /ML2_toolbox-master/server.R | no_license | pandorrasland/MasterCode-ToolSet | R | false | false | 3,632 | r |
library(shiny)
#Import packages
function(input, output,session) {
#select the data for the plots K-meas
selectedData <- reactive({
df <- readData()
return (df[, c(input$xcol, input$ycol)])
})
#HC
scaled_data <- reactive({
# get all data
data <- readData()
# scale data, with trans... |
df <- filter(df, is.before(mdy(Date),ymd("2021-07-05")))
df.before <- filter(df, is.before(mdy(df$Date),ymd("2021-06-14")))
df.while <- filter(df, is.strictly.after(mdy(df$Date),ymd("2021-06-14")), is.strictly.before(mdy(df$Date),ymd("2021-06-19")))
df.after <- filter(df, is.after(mdy(df$Date),ymd("2021-06-19")))
df.b... | /Analysis/Exp_1/Experiment_1.R | no_license | maxgotts/Rubenstein_Mpala | R | false | false | 954 | r | df <- filter(df, is.before(mdy(Date),ymd("2021-07-05")))
df.before <- filter(df, is.before(mdy(df$Date),ymd("2021-06-14")))
df.while <- filter(df, is.strictly.after(mdy(df$Date),ymd("2021-06-14")), is.strictly.before(mdy(df$Date),ymd("2021-06-19")))
df.after <- filter(df, is.after(mdy(df$Date),ymd("2021-06-19")))
df.b... |
# Calculate probabilites and mass shifts of element combinations
# With the probabilities and mass shifts of the different
# isotope combinations calculated, the next step is to combine
# the isotope combination probabilities and mass shifts of
# the different elements (and the tracer impurity, if checked) using the f... | /R/ElementCombinations.R | no_license | spang-lab/IsoCorrectoR | R | false | false | 7,022 | r | # Calculate probabilites and mass shifts of element combinations
# With the probabilities and mass shifts of the different
# isotope combinations calculated, the next step is to combine
# the isotope combination probabilities and mass shifts of
# the different elements (and the tracer impurity, if checked) using the f... |
# EDA
# 데이터를 수집,이해 -> 전처리 -> 데이터셋 생성 ->분석모델
dataset<-read.csv("E:/RData/Part-II/dataset.csv")
summary(dataset)
plot(dataset$price,ylim = c(-10,20))
install.packages("carData")
library(carData)
room.calss<-TitanicSurvival$passengerClass
room.calss %>% str()
tbl<-table(room.calss) #도수분포
sum(tbl)
... | /2021-07-25/20210725_2.R | no_license | kyuyounglee/7.11-R- | R | false | false | 4,185 | r | # EDA
# 데이터를 수집,이해 -> 전처리 -> 데이터셋 생성 ->분석모델
dataset<-read.csv("E:/RData/Part-II/dataset.csv")
summary(dataset)
plot(dataset$price,ylim = c(-10,20))
install.packages("carData")
library(carData)
room.calss<-TitanicSurvival$passengerClass
room.calss %>% str()
tbl<-table(room.calss) #도수분포
sum(tbl)
... |
# creates plot1.png file 480*480 pixels
#
# read data
power <- read.table("data\\household_power_consumption.txt", header=TRUE, sep=";", as.is = TRUE)
# filter and transform
power12 <- power[power$Date == "1/2/2007" | power$Date == "2/2/2007", ]
power12 <- transform(power12, Global_active_power = as.numeric(Global_ac... | /plot1.R | no_license | mvadym/ExData_Plotting1 | R | false | false | 660 | r | # creates plot1.png file 480*480 pixels
#
# read data
power <- read.table("data\\household_power_consumption.txt", header=TRUE, sep=";", as.is = TRUE)
# filter and transform
power12 <- power[power$Date == "1/2/2007" | power$Date == "2/2/2007", ]
power12 <- transform(power12, Global_active_power = as.numeric(Global_ac... |
#############
#set up
library(Logolas)
readprotein=function(file,skip=3,nrows,nsites,bg=bg,adash,mat){
library(Logolas)
rawdata=read.table(file = file,skip = skip,nrows = nrows)
if(mat=='pfm'){
pwm=as.matrix(rawdata[,23:42]/100)
pfm=round(pwm*nsites)
colnames(pfm)=c('A' ,'R','N','D', 'C' , 'Q', ... | /code/paper/Suppfig11/suppfig1.R | no_license | kkdey/Logolas-pages | R | false | false | 2,816 | r | #############
#set up
library(Logolas)
readprotein=function(file,skip=3,nrows,nsites,bg=bg,adash,mat){
library(Logolas)
rawdata=read.table(file = file,skip = skip,nrows = nrows)
if(mat=='pfm'){
pwm=as.matrix(rawdata[,23:42]/100)
pfm=round(pwm*nsites)
colnames(pfm)=c('A' ,'R','N','D', 'C' , 'Q', ... |
## create a data directory for downloading the file
if(!file.exists("power_data")) {
dir.create("power_data")
## move into the data directory and download and unzip the file
setwd("./power_data")
fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(... | /plot3.R | no_license | AliGall/ExData_Plotting1 | R | false | false | 1,472 | r | ## create a data directory for downloading the file
if(!file.exists("power_data")) {
dir.create("power_data")
## move into the data directory and download and unzip the file
setwd("./power_data")
fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(... |
## Bodo Winter
## October 21, 2016; Adapted June 2, 2017
## Analysis of /r/, with major snippets taken from PhD thesis:
## https://github.com/bodowinter/phd_thesis/
## Code for phonemic features
##------------------------------------------------------------------
## Preprocessing:
##-----------------------------------... | /mantel_tests.R | no_license | chirila/roughness_iconicity | R | false | false | 22,058 | r | ## Bodo Winter
## October 21, 2016; Adapted June 2, 2017
## Analysis of /r/, with major snippets taken from PhD thesis:
## https://github.com/bodowinter/phd_thesis/
## Code for phonemic features
##------------------------------------------------------------------
## Preprocessing:
##-----------------------------------... |
installation_flowSOMworkshop <- function(){
install.packages("devtools")
install.packages("Rtsne")
install.packages("tidyverse")
install.packages("openxlsx")
install.packages("mvtnorm")
# Bioconductor packages , to be installed through BiocManager:
install.packages("BiocManager")
BiocManager::install(... | /R/installation.R | no_license | saeyslab/FlowSOM_workshop | R | false | false | 686 | r | installation_flowSOMworkshop <- function(){
install.packages("devtools")
install.packages("Rtsne")
install.packages("tidyverse")
install.packages("openxlsx")
install.packages("mvtnorm")
# Bioconductor packages , to be installed through BiocManager:
install.packages("BiocManager")
BiocManager::install(... |
library(Rmpfr)
library(circlize)
library(RColorBrewer)
CreateAdjacencyMatrix = function(x) {
s = gsub("\.", "", x)
m = matrix(0, 10, 10)
for (i in 1:(nchar(s) - 1))
m[as.numeric(substr(s, i, i)) + 1,
as.numeric(substr(s, i + 1, i + 1)) +
1]
=
m[as.numeric(substr(s, i, ... | /scripts/circlize.R | no_license | mauriziogibin/pi | R | false | false | 1,909 | r | library(Rmpfr)
library(circlize)
library(RColorBrewer)
CreateAdjacencyMatrix = function(x) {
s = gsub("\.", "", x)
m = matrix(0, 10, 10)
for (i in 1:(nchar(s) - 1))
m[as.numeric(substr(s, i, i)) + 1,
as.numeric(substr(s, i + 1, i + 1)) +
1]
=
m[as.numeric(substr(s, i, ... |
#### Preamble ####
# Purpose: Prepare and clean the survey data downloaded from [...UPDATE ME!!!!!]
# Author: Rohan Alexander and Sam Caetano [CHANGE THIS TO YOUR NAME!!!!]
# Data: 22 October 2020
# Contact: rohan.alexander@utoronto.ca [PROBABLY CHANGE THIS ALSO!!!!]
# License: MIT
# Pre-requisites:
# - Need to... | /01-data_cleaning-post-strat1.R | permissive | SHENGHANZHAO/miaomiao | R | false | false | 12,509 | r | #### Preamble ####
# Purpose: Prepare and clean the survey data downloaded from [...UPDATE ME!!!!!]
# Author: Rohan Alexander and Sam Caetano [CHANGE THIS TO YOUR NAME!!!!]
# Data: 22 October 2020
# Contact: rohan.alexander@utoronto.ca [PROBABLY CHANGE THIS ALSO!!!!]
# License: MIT
# Pre-requisites:
# - Need to... |
load(url("https://github.com/LucyMcGowan/dr-example-code/raw/master/df_binary.rda"))
## Fit the propensity score ----
df_binary$p_1 <- predict(glm(z ~ x_1 + x_2, data = df_binary, family = binomial),
type = "response")
## Create weights ----
## Calculate the probability of receiving control
df... | /dr-binary-example.R | no_license | LucyMcGowan/dr-example-code | R | false | false | 1,614 | r | load(url("https://github.com/LucyMcGowan/dr-example-code/raw/master/df_binary.rda"))
## Fit the propensity score ----
df_binary$p_1 <- predict(glm(z ~ x_1 + x_2, data = df_binary, family = binomial),
type = "response")
## Create weights ----
## Calculate the probability of receiving control
df... |
x = seq(0,6,by=0.1)
y = df(x,10,20)
par(family="HiraMaruProN-W4")
plot(x,y,type='l',xlab='x',ylab='y',main='F 分布')
| /chap5/RINT511.R | no_license | Daigo1009/r_introduction | R | false | false | 137 | r | x = seq(0,6,by=0.1)
y = df(x,10,20)
par(family="HiraMaruProN-W4")
plot(x,y,type='l',xlab='x',ylab='y',main='F 分布')
|
`%n%` <- function (x, y){
if (is.null(x)) y else x
}
#' @importFrom details details
#' @importFrom slackcalls upload_slack
#' @importFrom slackteams validate_channel
eng_slack <- function (options) {
type <- options$type %n% "slack"
options$type <- 'r'
code <- details::details(eval(parse(text = options$... | /R/engine.R | permissive | ClaireGyn/slackreprex | R | false | false | 1,495 | r | `%n%` <- function (x, y){
if (is.null(x)) y else x
}
#' @importFrom details details
#' @importFrom slackcalls upload_slack
#' @importFrom slackteams validate_channel
eng_slack <- function (options) {
type <- options$type %n% "slack"
options$type <- 'r'
code <- details::details(eval(parse(text = options$... |
test_that("as_metric() conversions are correct", {
kdigo_factors <- tibble::tribble(
~parameter, ~factor, ~si_units,
# General
"Age", 12, "months",
"height", 100, "cm",
# 2012 AKI Guideline
"SAmk", 1.708, "umol/l",
"BUN", 0.357, "mmol/l",
"SiCa", 0.25, "mmol/l",
"SCr", 88.4, "umol/... | /tests/testthat/test-utils.R | permissive | alwinw/epocakir | R | false | false | 8,731 | r | test_that("as_metric() conversions are correct", {
kdigo_factors <- tibble::tribble(
~parameter, ~factor, ~si_units,
# General
"Age", 12, "months",
"height", 100, "cm",
# 2012 AKI Guideline
"SAmk", 1.708, "umol/l",
"BUN", 0.357, "mmol/l",
"SiCa", 0.25, "mmol/l",
"SCr", 88.4, "umol/... |
library(shiny)
library(randomForest)
library(unbalanced)
library(e1071)
library(caret)
library(class)
library(ggplot2)
library(corrplot)
library(ROCR)
library(xgboost)
####Base de données####
bdd <- readRDS(file = 'base.rds')
bdd$Class <- as.factor(bdd$Class)
form <- Class~.
idx <- sample(1:nrow(bdd... | /server.R | no_license | ML-1234/Shiny_SVM | R | false | false | 26,584 | r | library(shiny)
library(randomForest)
library(unbalanced)
library(e1071)
library(caret)
library(class)
library(ggplot2)
library(corrplot)
library(ROCR)
library(xgboost)
####Base de données####
bdd <- readRDS(file = 'base.rds')
bdd$Class <- as.factor(bdd$Class)
form <- Class~.
idx <- sample(1:nrow(bdd... |
##' Adapted Simulation Island Filter (ASIF)
##'
##' An algorithm for estimating the filter distribution of a spatiotemporal partially-observed Markov process (SpatPOMP for short).
##' Running \code{asif} causes the algorithm to run independent island jobs which each yield an imperfect adapted simulation. Simulating fro... | /R/asif.R | no_license | nanyyyyyy/spatPomp | R | false | false | 12,875 | r | ##' Adapted Simulation Island Filter (ASIF)
##'
##' An algorithm for estimating the filter distribution of a spatiotemporal partially-observed Markov process (SpatPOMP for short).
##' Running \code{asif} causes the algorithm to run independent island jobs which each yield an imperfect adapted simulation. Simulating fro... |
\name{jm_bamlss}
\alias{jm_bamlss}
\alias{sam_JM}
\alias{opt_JM}
\alias{jm_mode}
\alias{jm_mcmc}
\alias{jm_transform}
\alias{jm_survplot}
\alias{jm_predict}
\title{
Fit Flexible Additive Joint Models
}
\description{
Family object to fit a flexible additive joint model for longitudinal and survival
data under a ... | /man/jm_bamlss.Rd | no_license | juliancg24/bamlss | R | false | false | 16,131 | rd | \name{jm_bamlss}
\alias{jm_bamlss}
\alias{sam_JM}
\alias{opt_JM}
\alias{jm_mode}
\alias{jm_mcmc}
\alias{jm_transform}
\alias{jm_survplot}
\alias{jm_predict}
\title{
Fit Flexible Additive Joint Models
}
\description{
Family object to fit a flexible additive joint model for longitudinal and survival
data under a ... |
library(testthat)
library(CERMBffdi)
test_check("CERMBffdi")
| /tests/testthat.R | permissive | mbedward/CERMBffdi | R | false | false | 62 | r | library(testthat)
library(CERMBffdi)
test_check("CERMBffdi")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.