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 |
|---|---|---|---|---|---|---|---|---|---|
#
# Exercise 3
#
d <- 3
ans <- NULL
for (i in 1:length(out)) {
dd.i <- out[[i]]$table
grA <- paste0(dd.i[1,2], "(", round(dd.i[1,3], d), ")")
grB <- paste0(dd.i[2,2], "(", round(dd.i[2,3], d), ")")
p <- out[[i]]$pvalue
ans.i <- c(grA, grB, formatC(p))
ans <- rbind(ans, ans.i)
}
| /answer_exercises/answer_compareGroups_3.R | no_license | isglobal-brge/Curso_R_avanzado | R | false | false | 314 | r | #
# Exercise 3
#
d <- 3
ans <- NULL
for (i in 1:length(out)) {
dd.i <- out[[i]]$table
grA <- paste0(dd.i[1,2], "(", round(dd.i[1,3], d), ")")
grB <- paste0(dd.i[2,2], "(", round(dd.i[2,3], d), ")")
p <- out[[i]]$pvalue
ans.i <- c(grA, grB, formatC(p))
ans <- rbind(ans, ans.i)
}
|
library("VennDiagram")
setwd("/NJPROJ2/MICRO/PROJ/yangfenglong/yanfa/dandan/bar_errbar/vdjData/venngroup/Jgene")
pdf('/NJPROJ2/MICRO/PROJ/yangfenglong/yanfa/dandan/bar_errbar/vdjData/venngroup/Jgene/TGD_HT_NC.pdf',width=4,height=4)
draw.triple.venn(category = c("TGD","HT","NC"),
fill=c("lightblue","cadetblue","yellowg... | /immune repertoire/customDraw/Fig4_venn/V_D_J_gene_Venn/Jgene/TGD_HT_NC.R | no_license | gda7090/bulk_RNAseq | R | false | false | 541 | r | library("VennDiagram")
setwd("/NJPROJ2/MICRO/PROJ/yangfenglong/yanfa/dandan/bar_errbar/vdjData/venngroup/Jgene")
pdf('/NJPROJ2/MICRO/PROJ/yangfenglong/yanfa/dandan/bar_errbar/vdjData/venngroup/Jgene/TGD_HT_NC.pdf',width=4,height=4)
draw.triple.venn(category = c("TGD","HT","NC"),
fill=c("lightblue","cadetblue","yellowg... |
## Get the data
# Download the file and put the file in data folder
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileUrl, destfile = "./data/Dataset.zip", method = "curl")
# Unzip the file
unzip(zipfil... | /run_analysis.R | no_license | Kovani09/Getting-and-Cleaning-Data-Week-4-Course-Project | R | false | false | 3,540 | r | ## Get the data
# Download the file and put the file in data folder
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileUrl, destfile = "./data/Dataset.zip", method = "curl")
# Unzip the file
unzip(zipfil... |
testlist <- list(ExpressionSet = structure(c(3.10503529562433e+231, 1.23181983389617e+58, 1.52478221747831e+245, 6.36970078508806e+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/1615763642-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 334 | r | testlist <- list(ExpressionSet = structure(c(3.10503529562433e+231, 1.23181983389617e+58, 1.52478221747831e+245, 6.36970078508806e+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... |
#set the working directory.
#PLEASE SET TO YOUR WORKING DIRECTORY FOR THIS TO WORK
setwd("/Users/kindaixin/Dropbox-work/Dropbox/coursera/04 Exploratory Data Analysis/Project 1/ExData_Plotting1")
#Unzip the file
unzip("exdata-data-household_power_consumption.zip")
#Read the data
data_all <- read.table("household_power... | /plot2.R | no_license | jaxxie/ExData_Plotting1 | R | false | false | 1,011 | r | #set the working directory.
#PLEASE SET TO YOUR WORKING DIRECTORY FOR THIS TO WORK
setwd("/Users/kindaixin/Dropbox-work/Dropbox/coursera/04 Exploratory Data Analysis/Project 1/ExData_Plotting1")
#Unzip the file
unzip("exdata-data-household_power_consumption.zip")
#Read the data
data_all <- read.table("household_power... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/io.R
\name{append.dim}
\alias{append.dim}
\title{Append matrix dimensions to filename}
\usage{
append.dim(ofile, mat, extension = "gct")
}
\arguments{
\item{ofile}{the file name}
\item{mat}{the matrix}
\item{extension}{the file extension}
}... | /man/append.dim.Rd | permissive | rintukutum/cmapR | R | false | true | 920 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/io.R
\name{append.dim}
\alias{append.dim}
\title{Append matrix dimensions to filename}
\usage{
append.dim(ofile, mat, extension = "gct")
}
\arguments{
\item{ofile}{the file name}
\item{mat}{the matrix}
\item{extension}{the file extension}
}... |
## ================== tubular reactor with axial dispersion ===================
## y''=Pe(y'+Ry^n) Pe=1,R=2,n=2
## y'(0) = Pe (y(0)-1),
## y'(1)=0
##
## dy=y2
## dy2=Pe(dy-Ry^n)
##
## The initial condition y'(0) is a function of y(0)
## =============================================================================
requ... | /inst/doc/inlineBVP/reactor_inline_2nd order.r | permissive | karlines/ccSolve | R | false | false | 1,149 | r | ## ================== tubular reactor with axial dispersion ===================
## y''=Pe(y'+Ry^n) Pe=1,R=2,n=2
## y'(0) = Pe (y(0)-1),
## y'(1)=0
##
## dy=y2
## dy2=Pe(dy-Ry^n)
##
## The initial condition y'(0) is a function of y(0)
## =============================================================================
requ... |
require(dplyr)
require(stringr)
require(devtools)
#install_github("bmschmidt/wordVectors")
require(wordVectors)
#downloading data
students.ids <- students.data %>%
lapply(function(x)
sapply(x, function(y)
y$uid
)
)
students.walls <- lapply(students.ids, function(x)
lapply(x, function(y){
... | /code/word2vec.R | no_license | matthewstifler/firstyearstudentsresearch | R | false | false | 4,687 | r | require(dplyr)
require(stringr)
require(devtools)
#install_github("bmschmidt/wordVectors")
require(wordVectors)
#downloading data
students.ids <- students.data %>%
lapply(function(x)
sapply(x, function(y)
y$uid
)
)
students.walls <- lapply(students.ids, function(x)
lapply(x, function(y){
... |
\name{AIC.t.mixture}
\alias{AIC.t.mixture}
\title{
Calculate the AIC
}
\description{
Calculate the AIC
}
\usage{
AIC.t.mixture(n, j, pi, mu, s, df)
}
\arguments{
\item{n}{Frequencies (integer vector of length J; non-negative entries)}
\item{j}{Possible values (numeric vector of length J > 0)}
\item{pi}{Mixture pr... | /man/AIC_t_mixture.Rd | no_license | sp2019-antibiotics/Team-Student | R | false | false | 704 | rd | \name{AIC.t.mixture}
\alias{AIC.t.mixture}
\title{
Calculate the AIC
}
\description{
Calculate the AIC
}
\usage{
AIC.t.mixture(n, j, pi, mu, s, df)
}
\arguments{
\item{n}{Frequencies (integer vector of length J; non-negative entries)}
\item{j}{Possible values (numeric vector of length J > 0)}
\item{pi}{Mixture pr... |
#' @title total time on test
#'
#' @description Function 'totaltest' computes total-time-on-test.
#'
#' @param time event/censoring times
#' @param censor censoring status
#'
#' @usage totaltest(time,censor)
#' @return
#' time_die time points where events occur (in ascending order)
#' ttot total time on test correspon... | /R/totaltest.R | no_license | zhangyuwinnie/RPEXE.RPEXT | R | false | false | 3,037 | r | #' @title total time on test
#'
#' @description Function 'totaltest' computes total-time-on-test.
#'
#' @param time event/censoring times
#' @param censor censoring status
#'
#' @usage totaltest(time,censor)
#' @return
#' time_die time points where events occur (in ascending order)
#' ttot total time on test correspon... |
#install and load necessary packages
install.packages("plyr")
install.packages("dplyr")
library(plyr)
library(dplyr)
#download & unzip data - assumes that "data" directory exists
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileUrl, destfile = "GACDd... | /run_analysis.R | no_license | jorgrimstad/GetAndCleanDataCourseProject | R | false | false | 3,515 | r | #install and load necessary packages
install.packages("plyr")
install.packages("dplyr")
library(plyr)
library(dplyr)
#download & unzip data - assumes that "data" directory exists
fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileUrl, destfile = "GACDd... |
proc main () is
x : int := 5;
arr : Array<Array<int>(3)>(2):= [[1,2,3],[4,5,6]];
fint(arr);
end main
proc fint(a : Array<Array<int>(3)>(2)) is
z : int := a[1][1];
end fint
| /ourtests/tac/test12.r | permissive | IdrissRio/RNB-Compiler | R | false | false | 177 | r | proc main () is
x : int := 5;
arr : Array<Array<int>(3)>(2):= [[1,2,3],[4,5,6]];
fint(arr);
end main
proc fint(a : Array<Array<int>(3)>(2)) is
z : int := a[1][1];
end fint
|
# Set the working directory
setwd("~/Development/DKE/Project22/experiments/a_star/data")
# Import the data
data <- read.csv("astar_total.csv")
# Split the data based on the complexity of the map
a_path <- split(data$a_path_length, data$map_complexity)
l_path <- split(data$robStar_path_length, data$map_complexity)
#... | /experiments/scripts/a_star_vs_angry_a_star.R | no_license | probject22/SneakyThief4 | R | false | false | 1,367 | r |
# Set the working directory
setwd("~/Development/DKE/Project22/experiments/a_star/data")
# Import the data
data <- read.csv("astar_total.csv")
# Split the data based on the complexity of the map
a_path <- split(data$a_path_length, data$map_complexity)
l_path <- split(data$robStar_path_length, data$map_complexity)
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phyloEMMLi.R
\name{phyloEmmli}
\alias{phyloEmmli}
\title{phyloEmmli}
\usage{
phyloEmmli(landmarks, phylo, method = "pgls", EMMLi = FALSE, ...)
}
\arguments{
\item{landmarks}{The landmarks. These can be in a 2D format with species as rownames,... | /man/phyloEmmli.Rd | no_license | marta-vidalgarcia/EMMLiv2 | R | false | true | 1,525 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phyloEMMLi.R
\name{phyloEmmli}
\alias{phyloEmmli}
\title{phyloEmmli}
\usage{
phyloEmmli(landmarks, phylo, method = "pgls", EMMLi = FALSE, ...)
}
\arguments{
\item{landmarks}{The landmarks. These can be in a 2D format with species as rownames,... |
#' Calculates p(s) for the design selecting from quartiles 1 and 4
#'
#' This function returns the probability p(s) of an entire sample being selected
#' for the design with n/2 selected from first quartile and n/2 selected from fourth quartile
#' of the population values of the dependent variable
#'
#' @details
#' I... | /R/p_s_extreme_quartiles.R | no_license | rgcstats/ODS | R | false | false | 1,264 | r | #' Calculates p(s) for the design selecting from quartiles 1 and 4
#'
#' This function returns the probability p(s) of an entire sample being selected
#' for the design with n/2 selected from first quartile and n/2 selected from fourth quartile
#' of the population values of the dependent variable
#'
#' @details
#' I... |
#------------------
library('tidyverse')
library('dplyr')
library('stringr')
library('tidyr')
library("readr")
library('ggplot2')
library('lubridate')
library('AER')
library('moments')
library('fastDummies')
#------------------
# Reading data
setwd('C:/Users/ddd/Downloads/Econ613_A3')
crimelong <- ... | /A3_alternative.R | no_license | hc291hwc/A3 | R | false | false | 12,927 | r | #------------------
library('tidyverse')
library('dplyr')
library('stringr')
library('tidyr')
library("readr")
library('ggplot2')
library('lubridate')
library('AER')
library('moments')
library('fastDummies')
#------------------
# Reading data
setwd('C:/Users/ddd/Downloads/Econ613_A3')
crimelong <- ... |
\alias{gtkUIManagerGetUi}
\name{gtkUIManagerGetUi}
\title{gtkUIManagerGetUi}
\description{Creates a UI definition of the merged UI.}
\usage{gtkUIManagerGetUi(object)}
\arguments{\item{\verb{object}}{a \code{\link{GtkUIManager}}}}
\details{Since 2.4}
\value{[character] A newly allocated string containing an XML represen... | /RGtk2/man/gtkUIManagerGetUi.Rd | no_license | lawremi/RGtk2 | R | false | false | 417 | rd | \alias{gtkUIManagerGetUi}
\name{gtkUIManagerGetUi}
\title{gtkUIManagerGetUi}
\description{Creates a UI definition of the merged UI.}
\usage{gtkUIManagerGetUi(object)}
\arguments{\item{\verb{object}}{a \code{\link{GtkUIManager}}}}
\details{Since 2.4}
\value{[character] A newly allocated string containing an XML represen... |
# Year Specific
firstyr <- Repr.plot.data[which(Repr.plot.data$Year == "2015to2016"), ]
z <- firstyr$z # stand along object
# Plotting frame
Repr.plot.dataF <- within(firstyr, {
z.quantiles <- quantile(z, probs=seq(0,1,length=16))# make up vals to plot qq of size range
z.quantiles[1] <- z.q... | /Delete/functions/02.4.extraplotsRepr.R | no_license | mattjbayly/transplant_analysis | R | false | false | 8,665 | r | # Year Specific
firstyr <- Repr.plot.data[which(Repr.plot.data$Year == "2015to2016"), ]
z <- firstyr$z # stand along object
# Plotting frame
Repr.plot.dataF <- within(firstyr, {
z.quantiles <- quantile(z, probs=seq(0,1,length=16))# make up vals to plot qq of size range
z.quantiles[1] <- z.q... |
# Ian Castillo Rosales (BANXICO\T41348)
# Gerencia de Informacion del Sistema Financiero
# Subgerencia de Informacion de Moneda Extranjera y Derivados
#
# Validacion de informacion para operaciones con swaps (contraparte)
# 100614 - 300414
swaps2_contra <- function(ruta){
# ENTRADA
# ruta = Ruta do... | /Validacion/Contra/swaps2_contra.R | no_license | donelianc/prof-xp-banxico | R | false | false | 10,054 | r | # Ian Castillo Rosales (BANXICO\T41348)
# Gerencia de Informacion del Sistema Financiero
# Subgerencia de Informacion de Moneda Extranjera y Derivados
#
# Validacion de informacion para operaciones con swaps (contraparte)
# 100614 - 300414
swaps2_contra <- function(ruta){
# ENTRADA
# ruta = Ruta do... |
cLepage <-
function(alpha,m,n, method=NA, n.mc=10000){
outp<-list()
outp$stat.name<-"Lepage D"
if(alpha>1||alpha<0||!is.numeric(alpha)){
cat('Error: Check alpha value! \n')
return(alpha)
}
outp$alpha<-alpha
outp$m<-m
outp$n<-n
outp$n.mc<-n.mc
N<-m+n
##When the user doesn't ... | /R/cLepage.R | no_license | cran/NSM3 | R | false | false | 2,449 | r | cLepage <-
function(alpha,m,n, method=NA, n.mc=10000){
outp<-list()
outp$stat.name<-"Lepage D"
if(alpha>1||alpha<0||!is.numeric(alpha)){
cat('Error: Check alpha value! \n')
return(alpha)
}
outp$alpha<-alpha
outp$m<-m
outp$n<-n
outp$n.mc<-n.mc
N<-m+n
##When the user doesn't ... |
testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80034848067692e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615853098-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 659 | r | testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80034848067692e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/util_solve.R
\name{nlsolve}
\alias{nlsolve}
\title{Thin wrapper around nleqslv and dfsane}
\usage{
nlsolve(x, fn, tol = 1e-06, maxit = 100, solver = "nleqslv")
}
\arguments{
\item{x}{Starting point}
\item{fn}{Function to solve}
\ite... | /man/nlsolve.Rd | no_license | EGO-123/plant | R | false | false | 651 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/util_solve.R
\name{nlsolve}
\alias{nlsolve}
\title{Thin wrapper around nleqslv and dfsane}
\usage{
nlsolve(x, fn, tol = 1e-06, maxit = 100, solver = "nleqslv")
}
\arguments{
\item{x}{Starting point}
\item{fn}{Function to solve}
\ite... |
# old.dir <- getwd() # BMAP workdirectory # dir.create("EDA1")
# setwd("EDA1") # getwd()
.path_outc <- file.path("household_power_consumption.txt")
elec <- read.table(.path_outc, na.string = "?", sep=";", skip=66637, nrows=2881, stringsAsFactors=FALSE)
names(elec) <- c("Date", "Time", "Global_active_power", "Global_... | /plot1.R | no_license | ewingt/ExData_Plotting1 | R | false | false | 646 | r | # old.dir <- getwd() # BMAP workdirectory # dir.create("EDA1")
# setwd("EDA1") # getwd()
.path_outc <- file.path("household_power_consumption.txt")
elec <- read.table(.path_outc, na.string = "?", sep=";", skip=66637, nrows=2881, stringsAsFactors=FALSE)
names(elec) <- c("Date", "Time", "Global_active_power", "Global_... |
#### Packages ####
library(maptools) #includes sp
library(dismo) #includes raster
library(randomForest)
#library(raster) #already activated through dismo
#library(sp) #already acktivated through maptools
#### Environmental data ####
# loading Predictor Files, used to predict a feature (Merkmal) variable
p_files <- ... | /presentations/Random_Forst_Mandy/Random Forest/2. RF - Bradypus.R | permissive | dirkzeuss/bsc-sdm-2019-sharing | R | false | false | 10,136 | r | #### Packages ####
library(maptools) #includes sp
library(dismo) #includes raster
library(randomForest)
#library(raster) #already activated through dismo
#library(sp) #already acktivated through maptools
#### Environmental data ####
# loading Predictor Files, used to predict a feature (Merkmal) variable
p_files <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nl_reverse.R
\name{nl_reverse}
\alias{nl_reverse}
\title{experimental reverse api}
\usage{
nl_reverse()
}
\description{
experimental reverse api
}
| /man/nl_reverse.Rd | no_license | cran/nlgeocoder | R | false | true | 225 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nl_reverse.R
\name{nl_reverse}
\alias{nl_reverse}
\title{experimental reverse api}
\usage{
nl_reverse()
}
\description{
experimental reverse api
}
|
# version Etienne Lord
# Last version november 2014
#
#function sample_path
# n: number of path
# max_len: maximum number of nodes
# old_path: already sampled paths
sample_path<-function(n, max_len=10, old_path=c()) {
paths=array(0, n*2);
#cat("Total possibles path:", total_to_find,"\n");
#cat("=== new ====\n");
... | /SDDE/R/sample_network.R | no_license | ingted/R-Examples | R | false | false | 21,245 | r | # version Etienne Lord
# Last version november 2014
#
#function sample_path
# n: number of path
# max_len: maximum number of nodes
# old_path: already sampled paths
sample_path<-function(n, max_len=10, old_path=c()) {
paths=array(0, n*2);
#cat("Total possibles path:", total_to_find,"\n");
#cat("=== new ====\n");
... |
library('AER')
library(plyr)
affairs1 <- affairs #transfer because changes are going to be made in the dataset
summary(affairs1)
table(affairs1$affairs)#shows how many values are there in how many rows eg: 0 has appeared 451 times
affairs1$ynaffairs[affairs1$affairs > 0] <- 1 # if values are greater that 0... | /Assignment 7 affairs data logistic regression.R | no_license | vishwapandya/Data-Science-Program | R | false | false | 1,467 | r | library('AER')
library(plyr)
affairs1 <- affairs #transfer because changes are going to be made in the dataset
summary(affairs1)
table(affairs1$affairs)#shows how many values are there in how many rows eg: 0 has appeared 451 times
affairs1$ynaffairs[affairs1$affairs > 0] <- 1 # if values are greater that 0... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CLfdr.R
\name{CLfdr}
\alias{CLfdr}
\title{Conditional local FDR (CLfdr)}
\usage{
CLfdr(x, y, pval = NULL, pi0.method = "RB", bw.init = NULL,
bw = NULL, reltol = 1e-04, n.subsample = NULL, check.gam = FALSE,
k.gam = NULL, info = TRUE)
... | /man/CLfdr.Rd | no_license | k22liang/calm | R | false | true | 4,743 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CLfdr.R
\name{CLfdr}
\alias{CLfdr}
\title{Conditional local FDR (CLfdr)}
\usage{
CLfdr(x, y, pval = NULL, pi0.method = "RB", bw.init = NULL,
bw = NULL, reltol = 1e-04, n.subsample = NULL, check.gam = FALSE,
k.gam = NULL, info = TRUE)
... |
#Reading the dataset
diabetes <- read.csv("F:/Courses/MVA/diabetes.csv")
#Lets have 0/1 as No/Yes
diabetes$Outcome <- as.factor(diabetes$Outcome)
levels(diabetes$Outcome) <- c("No","Yes")
colnames(diabetes)[colnames(diabetes)=="Outcome"] <- "Diabetic"
library(PerformanceAnalytics)
library(ggplot2)
libra... | /MAVAssignPCA.R | no_license | audacious10/Pima-diabetes- | R | false | false | 4,869 | r | #Reading the dataset
diabetes <- read.csv("F:/Courses/MVA/diabetes.csv")
#Lets have 0/1 as No/Yes
diabetes$Outcome <- as.factor(diabetes$Outcome)
levels(diabetes$Outcome) <- c("No","Yes")
colnames(diabetes)[colnames(diabetes)=="Outcome"] <- "Diabetic"
library(PerformanceAnalytics)
library(ggplot2)
libra... |
#Semiconductor wafers(Pg no. 51)
contamination = 0.01
no_contamination = 1- contamination
wafers = 15
total_probability = no_contamination^wafers
cat("The probability that no large particles are found is ",total_probability)
#The answer may slightly vary due rounding off values | /Applied_Statistics_And_Probability_For_Engineers_by_Douglas_C._Montgomery_And_George_C._Runger/CH2/EX2.33/EX2_33.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 282 | r | #Semiconductor wafers(Pg no. 51)
contamination = 0.01
no_contamination = 1- contamination
wafers = 15
total_probability = no_contamination^wafers
cat("The probability that no large particles are found is ",total_probability)
#The answer may slightly vary due rounding off values |
# Functions to run the correlation analysis
#
# Analyze -----------------------------------------------------------------
#' Correlation analysis.
#'
#' @param data Project data
#' @param x The covariates and outcomes
#' @param y The fatty acids.
#'
#' @export
analyze_corr <-
function(data = project_data,
... | /R/corr.R | no_license | lwjohnst86/seminar2016 | R | false | false | 1,372 | r | # Functions to run the correlation analysis
#
# Analyze -----------------------------------------------------------------
#' Correlation analysis.
#'
#' @param data Project data
#' @param x The covariates and outcomes
#' @param y The fatty acids.
#'
#' @export
analyze_corr <-
function(data = project_data,
... |
source("./My Thesis Functions/my.library.loader.R")
seed <- 15
set.seed(seed)
num.edges <- 5200
num.nodes <- 300
eps <- c(0.3, 0.4, 0.5)
a <- 1.7
t.transient <- 20# %>% as.vector()
num.epochs <- 1000#10000
tol <- 0.001
conn <- make.random.graph(size = num.nodes, num.links = num.edges,
... | /Thesis_R_Codes/scripts/20190606_Hellrigel2019.R | no_license | psyguy/Thesis-Codes | R | false | false | 1,341 | r | source("./My Thesis Functions/my.library.loader.R")
seed <- 15
set.seed(seed)
num.edges <- 5200
num.nodes <- 300
eps <- c(0.3, 0.4, 0.5)
a <- 1.7
t.transient <- 20# %>% as.vector()
num.epochs <- 1000#10000
tol <- 0.001
conn <- make.random.graph(size = num.nodes, num.links = num.edges,
... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 5326
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 5326
c
c Input Parameter (command line, file):
c input filename QBFLIB/Herbstritt/blackbox_design/biu.mv.xl_ao.bb-b001-p010-IPF... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Herbstritt/blackbox_design/biu.mv.xl_ao.bb-b001-p010-IPF05-c05.blif-biu.inv1.prop.bb-bmc.with-IOC.unfold-003/biu.mv.xl_ao.bb-b001-p010-IPF05-c05.blif-biu.inv1.prop.bb-bmc.with-IOC.unfold-003.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 777 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 5326
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 5326
c
c Input Parameter (command line, file):
c input filename QBFLIB/Herbstritt/blackbox_design/biu.mv.xl_ao.bb-b001-p010-IPF... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/remove.ui2.R
\name{remove.ui2}
\alias{remove.ui2}
\title{remove.ui2}
\usage{
remove.ui2()
}
\arguments{
\item{Click}{here and there}
}
\description{
check nominal if they are nominal
}
\examples{
checking.nominal()
}
\keyword{nominal}
| /man/remove.ui2.Rd | no_license | senickel/surveycleanup | R | false | true | 313 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/remove.ui2.R
\name{remove.ui2}
\alias{remove.ui2}
\title{remove.ui2}
\usage{
remove.ui2()
}
\arguments{
\item{Click}{here and there}
}
\description{
check nominal if they are nominal
}
\examples{
checking.nominal()
}
\keyword{nominal}
|
pollutantmean <- function(directory, pollutant, id = 1:332){
allFiles <- list.files(path = directory, pattern = ".csv", full.names = TRUE)
values <- numeric()
for (i in id) {
data <- read.csv(allFiles[i])
values <- c(values, data[[pollutant]])
}
mean(values, na.rm = TRUE)
} | /R_Programming/pollutantmean.R | no_license | Ecologo/datasciencecoursera | R | false | false | 292 | r | pollutantmean <- function(directory, pollutant, id = 1:332){
allFiles <- list.files(path = directory, pattern = ".csv", full.names = TRUE)
values <- numeric()
for (i in id) {
data <- read.csv(allFiles[i])
values <- c(values, data[[pollutant]])
}
mean(values, na.rm = TRUE)
} |
## dataVSresiduesPlot.R :: create data versus residues plot
## last edited sep-03-2013
##
## sep-03-2013 (exe) created
dataVSresiduesPlot <- function(data, resIndices, secondaryStructure=NULL, MainTitle="RMSF per Residue", yTitle=expression(RMSF(ring(A))) ) {
plotData <- data[resIndices]
plotData <- data.frame(re... | /new_funs/dataVSresiduesPlot.R | no_license | Grantlab/bio3d | R | false | false | 2,328 | r | ## dataVSresiduesPlot.R :: create data versus residues plot
## last edited sep-03-2013
##
## sep-03-2013 (exe) created
dataVSresiduesPlot <- function(data, resIndices, secondaryStructure=NULL, MainTitle="RMSF per Residue", yTitle=expression(RMSF(ring(A))) ) {
plotData <- data[resIndices]
plotData <- data.frame(re... |
library(gwerAM)
### Name: gwerAM
### Title: Calculates signifance thresholds for mixed-model association
### mapping
### Aliases: gwerAM
### ** Examples
data(maizeA)
data(maizeQ)
data(maizeW)
data(maizevarianceA)
data(maizevarianceE)
gwerAM(A=maizeA,
Q=maizeQ[,-ncol(maizeQ)],
W=maizeW[,1:10],
... | /data/genthat_extracted_code/gwerAM/examples/gwerAM.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 966 | r | library(gwerAM)
### Name: gwerAM
### Title: Calculates signifance thresholds for mixed-model association
### mapping
### Aliases: gwerAM
### ** Examples
data(maizeA)
data(maizeQ)
data(maizeW)
data(maizevarianceA)
data(maizevarianceE)
gwerAM(A=maizeA,
Q=maizeQ[,-ncol(maizeQ)],
W=maizeW[,1:10],
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/doc-QR.R
\name{QR-argument}
\alias{QR-argument}
\title{The \code{QR} argument}
\description{
Details about the \code{QR} argument to \pkg{rstanarm}'s modeling
functions.
}
\details{
The \code{QR} argument is a logical scalar defaulting to
\... | /fuzzedpackages/rstanarm/man/QR-argument.Rd | no_license | akhikolla/testpackages | R | false | true | 2,314 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/doc-QR.R
\name{QR-argument}
\alias{QR-argument}
\title{The \code{QR} argument}
\description{
Details about the \code{QR} argument to \pkg{rstanarm}'s modeling
functions.
}
\details{
The \code{QR} argument is a logical scalar defaulting to
\... |
#Created on 30.11.2017
#Eric Coles
#RStudio exercise 5 -- Data wrangling
#Data source, United Nations Development Programme.
hd <- read.csv("http://s3.amazonaws.com/assets.datacamp.com/production/course_2218/datasets/human_development.csv", stringsAsFactors = F)
gii <- read.csv("http://s3.amazonaws.com/assets.datac... | /data/create_human.R | no_license | Ericcoles/IODS-project | R | false | false | 2,049 | r |
#Created on 30.11.2017
#Eric Coles
#RStudio exercise 5 -- Data wrangling
#Data source, United Nations Development Programme.
hd <- read.csv("http://s3.amazonaws.com/assets.datacamp.com/production/course_2218/datasets/human_development.csv", stringsAsFactors = F)
gii <- read.csv("http://s3.amazonaws.com/assets.datac... |
#' ---
#' title: "Why nesting is worth the awkwardness"
#' author: "Jenny Bryan"
#' date: "`r format(Sys.Date())`"
#' output: github_document
#' ---
#+ setup, include = FALSE, cache = FALSE
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
error = TRUE
)
options(tidyverse.quiet = TRUE)
#+ body
# ----
libr... | /B_analysts_sources_github/jennybc/row-oriented-workflows/ex08_nesting-is-good.R | no_license | Irbis3/crantasticScrapper | R | false | false | 3,719 | r | #' ---
#' title: "Why nesting is worth the awkwardness"
#' author: "Jenny Bryan"
#' date: "`r format(Sys.Date())`"
#' output: github_document
#' ---
#+ setup, include = FALSE, cache = FALSE
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
error = TRUE
)
options(tidyverse.quiet = TRUE)
#+ body
# ----
libr... |
#' \code{vehdf} selects information about vehicle \code{veh}
#' of the \code{df} matrix for analysis with the \code{brktrials2} function.
#'
#' @param veh vehicle, a number
#' @param nveh number of vehicle in \code{df}, a number
#' @param df a data frame created in\code{bk2trials}, a data frame
#' @usage vehdf(veh, nve... | /R/vehdf.R | permissive | PJOssenbruggen/Basic | R | false | false | 648 | r | #' \code{vehdf} selects information about vehicle \code{veh}
#' of the \code{df} matrix for analysis with the \code{brktrials2} function.
#'
#' @param veh vehicle, a number
#' @param nveh number of vehicle in \code{df}, a number
#' @param df a data frame created in\code{bk2trials}, a data frame
#' @usage vehdf(veh, nve... |
#Loading Required Packages
library(shiny)
library(shinydashboard)
library(tidyverse)
library(dplyr)
library(data.table) #needed to read large files fast
library(DT)
library(knitr)
library(arules)#for Rule Mining
library(arulesViz)
library(visNetwork)#network net
library(igraph)
library(RColorBrewer)
librar... | /global.R | no_license | Ibrokhimsadikov/ARM_interactive | R | false | false | 618 | r | #Loading Required Packages
library(shiny)
library(shinydashboard)
library(tidyverse)
library(dplyr)
library(data.table) #needed to read large files fast
library(DT)
library(knitr)
library(arules)#for Rule Mining
library(arulesViz)
library(visNetwork)#network net
library(igraph)
library(RColorBrewer)
librar... |
#' Build an active URL for WebHDFS
#'
#' Full WebHDFS URL is built dynamically from an active namenode for the current
#' cluster.
#'
#' It is possible to define an array including primary and backup namenodes for
#' use by the \code{clusterconf} package. This function will check the provided
#' namenodes until an ... | /R/namenode_utilities.R | permissive | mitre/webhdfs | R | false | false | 3,406 | r |
#' Build an active URL for WebHDFS
#'
#' Full WebHDFS URL is built dynamically from an active namenode for the current
#' cluster.
#'
#' It is possible to define an array including primary and backup namenodes for
#' use by the \code{clusterconf} package. This function will check the provided
#' namenodes until an ... |
#' @title Capturing Effects for Continuous Outcomes
#' with Multiple Treatment Groups
#' @description This function calculates the effect of a splitting
#' node in a linear regression model with multiple treatment
#' groups
#'
#' @param X A list containing:
#' the vector of outcomes Y,
#' t... | /R/lm_R_to_C.R | no_license | chenvict/dipm | R | false | false | 2,412 | r | #' @title Capturing Effects for Continuous Outcomes
#' with Multiple Treatment Groups
#' @description This function calculates the effect of a splitting
#' node in a linear regression model with multiple treatment
#' groups
#'
#' @param X A list containing:
#' the vector of outcomes Y,
#' t... |
##Loading Libraries
library(data.table)
library(plyr)
library(dplyr)
library(tidyr)
library(mice)
library(ggplot2)
library(mlr)
library(VIM)
### load the dataset of the titanic disaster ###
#Loading the train $ test data set
train_df = read.csv('C:/Users/kaelo/Desktop/train.csv')
test_df = read.csv('C:/Users/kaelo/Des... | /titanic.R | no_license | kcmbonu15/Titanic-Disaster | R | false | false | 6,113 | r | ##Loading Libraries
library(data.table)
library(plyr)
library(dplyr)
library(tidyr)
library(mice)
library(ggplot2)
library(mlr)
library(VIM)
### load the dataset of the titanic disaster ###
#Loading the train $ test data set
train_df = read.csv('C:/Users/kaelo/Desktop/train.csv')
test_df = read.csv('C:/Users/kaelo/Des... |
1:500
2 * 2 - (4 + 4) / 2
# adição
1 + 1
## [1] 2
# subtração
4 - 2
## [1] 2
# multiplicação
2 * 3
## [1] 6
# divisão
5 / 3
## [1] 1.666667
# potência
4 ^ 2
## [1] 16
# resto da divisão de 5 por 3
5 %% 3
## [1] 2
# parte inteira da divisão de 5 por 3
5 %/% 3
## [1] 1
# adição
1 + 3
# subtração
4 - 2
# multip... | /Scripts/R Basico Parte 1 - R Console - Operações Classes e RStudio.r | no_license | Ealenc4r/Analise_Dados_Linguagem_R | R | false | false | 1,187 | r | 1:500
2 * 2 - (4 + 4) / 2
# adição
1 + 1
## [1] 2
# subtração
4 - 2
## [1] 2
# multiplicação
2 * 3
## [1] 6
# divisão
5 / 3
## [1] 1.666667
# potência
4 ^ 2
## [1] 16
# resto da divisão de 5 por 3
5 %% 3
## [1] 2
# parte inteira da divisão de 5 por 3
5 %/% 3
## [1] 1
# adição
1 + 3
# subtração
4 - 2
# multip... |
##
ss <- read.table("superset.nums.bed")
## Using these values to construct a Venn diagriam by hand.
## dREG is ss[,4]
sum(ss[,4] == 1 & ss[,5] == 1 & ss[,6] == 1) # 22254
sum(ss[,4] == 1 & ss[,5] == 0 & ss[,6] == 0) # 6784
sum(ss[,4] == 1 & ss[,5] == 1 & ss[,6] == 0) # 645
sum(ss[,4] == 1 & ss[,5] == 0 & ss[,6] ==... | /dREG_paper_analyses/train_svm/run_svm/venn.R | no_license | omsai/dREG | R | false | false | 1,801 | r |
##
ss <- read.table("superset.nums.bed")
## Using these values to construct a Venn diagriam by hand.
## dREG is ss[,4]
sum(ss[,4] == 1 & ss[,5] == 1 & ss[,6] == 1) # 22254
sum(ss[,4] == 1 & ss[,5] == 0 & ss[,6] == 0) # 6784
sum(ss[,4] == 1 & ss[,5] == 1 & ss[,6] == 0) # 645
sum(ss[,4] == 1 & ss[,5] == 0 & ss[,6] ==... |
# Deliverable 1
# Load dplyr package
library(dplyr)
# Import MechaCar dataset as a dateframe
MechaCar_df <- read.csv('MechaCar_mpg.csv',check.names = F,stringsAsFactors = F)
# Run a linear regression
lm(mpg ~ vehicle_length + vehicle_weight + spoiler_angle + ground_clearance + AWD, data=MechaCar_df)
# Regression m... | /MechaCarChallenge.RScript.R | no_license | tysonseang/MechaCar_Statistical_Analysis | R | false | false | 1,464 | r | # Deliverable 1
# Load dplyr package
library(dplyr)
# Import MechaCar dataset as a dateframe
MechaCar_df <- read.csv('MechaCar_mpg.csv',check.names = F,stringsAsFactors = F)
# Run a linear regression
lm(mpg ~ vehicle_length + vehicle_weight + spoiler_angle + ground_clearance + AWD, data=MechaCar_df)
# Regression m... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 2.32838706584708e-308, 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)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_row... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613117502-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 343 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 2.32838706584708e-308, 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)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_row... |
calculate_parameter_temporal_derivative_polynomial <- function(in_file, temporal_derivative = 1, polynomial = 2, out_file, overwrite = F) {
# check inputs
if (!file.exists(in_file)) {
stop(glue("{in_file} does not exist."))
}
if (file.exists(out_file) & overwrite == F) {
stop(glue("{out_file} alre... | /bash/calculate_parameter_derivative_polynomial.R | permissive | epongpipat/ppi | R | false | false | 990 | r | calculate_parameter_temporal_derivative_polynomial <- function(in_file, temporal_derivative = 1, polynomial = 2, out_file, overwrite = F) {
# check inputs
if (!file.exists(in_file)) {
stop(glue("{in_file} does not exist."))
}
if (file.exists(out_file) & overwrite == F) {
stop(glue("{out_file} alre... |
#limma tutorial
#from: RNA-seq analysis is easy as 1-2-3 with limma, Glimma and edgeR (https://www.bioconductor.org/help/workflows/RNAseq123/#introduction)
#setup
source("http://bioconductor.org/biocLite.R")
library(limma)
library(Glimma)
library(edgeR)
library(Mus.musculus)
library(gplots)
#To get started with this ... | /limma_tutorial.R | no_license | jsacco1/R-bioinformatics | R | false | false | 28,905 | r | #limma tutorial
#from: RNA-seq analysis is easy as 1-2-3 with limma, Glimma and edgeR (https://www.bioconductor.org/help/workflows/RNAseq123/#introduction)
#setup
source("http://bioconductor.org/biocLite.R")
library(limma)
library(Glimma)
library(edgeR)
library(Mus.musculus)
library(gplots)
#To get started with this ... |
#' manage_dashboard_body UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS
mod_manage_dashboard_body_ui <- function(id) {
ns <- NS(id)
uiOutput(ns("body_ui"))
}
#' manage_dashboard_body Server Function
#'
#' ... | /R/mod_manage_dashboard_body.R | no_license | divyansh997/rsqliteadmin | R | false | false | 1,455 | r | #' manage_dashboard_body UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS
mod_manage_dashboard_body_ui <- function(id) {
ns <- NS(id)
uiOutput(ns("body_ui"))
}
#' manage_dashboard_body Server Function
#'
#' ... |
# Function used for estimating marginal of y
int_fun_cnd <- function(theta, y, sigma_orig, n, prior_fit, t) {
dnorm(y, theta, sigma_orig / sqrt(n)) * prior_fit(theta) /
Pr_S_cnd(theta, sigma_orig / sqrt(n), t)
}
int_fun_cnd1 <- function(theta, y, sigma_orig, n, prior_fit, t) {
dnorm(y, theta, sigma_orig / sqr... | /R/pr_fitter_split.R | no_license | spencerwoody/saFAB | R | false | false | 4,090 | r |
# Function used for estimating marginal of y
int_fun_cnd <- function(theta, y, sigma_orig, n, prior_fit, t) {
dnorm(y, theta, sigma_orig / sqrt(n)) * prior_fit(theta) /
Pr_S_cnd(theta, sigma_orig / sqrt(n), t)
}
int_fun_cnd1 <- function(theta, y, sigma_orig, n, prior_fit, t) {
dnorm(y, theta, sigma_orig / sqr... |
\name{HESmanip-package}
\alias{HESmanip-package}
\alias{HESmanip}
\docType{package}
\title{Hospital length of stay data preprocessing and analysis}
\description{Hospital length of stay data preprocessing and analysis}
\details{
\tabular{ll}{
Package: \tab HESmanip\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \ta... | /man/HESmanip-package.Rd | no_license | n8thangreen/HESmanip | R | false | false | 1,140 | rd | \name{HESmanip-package}
\alias{HESmanip-package}
\alias{HESmanip}
\docType{package}
\title{Hospital length of stay data preprocessing and analysis}
\description{Hospital length of stay data preprocessing and analysis}
\details{
\tabular{ll}{
Package: \tab HESmanip\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \ta... |
#transform data into numeric
subdata$Sub_metering_1<-as.numeric(as.character(subdata$Sub_metering_1))
subdata$Sub_metering_2<-as.numeric(as.character(subdata$Sub_metering_2))
subdata$Sub_metering_3<-as.numeric(as.character(subdata$Sub_metering_3))
plot(subdata$DateTime,subdata$Sub_metering_1,type="l",ylab="Energy sub m... | /plot3.R | no_license | lg257/ExData_Plotting1 | R | false | false | 664 | r | #transform data into numeric
subdata$Sub_metering_1<-as.numeric(as.character(subdata$Sub_metering_1))
subdata$Sub_metering_2<-as.numeric(as.character(subdata$Sub_metering_2))
subdata$Sub_metering_3<-as.numeric(as.character(subdata$Sub_metering_3))
plot(subdata$DateTime,subdata$Sub_metering_1,type="l",ylab="Energy sub m... |
#' The building block of all `expect_` functions
#'
#' Use this if you are writing your own expectation. See
#' `vignette("custom-expectation")` for details
#'
#' @param ok Was the expectation successful?
#' @param failure_message What message should be shown if the expectation was
#' not successful?
#' @param info A... | /R/expectation.R | no_license | rintukutum/testthat | R | false | false | 6,403 | r | #' The building block of all `expect_` functions
#'
#' Use this if you are writing your own expectation. See
#' `vignette("custom-expectation")` for details
#'
#' @param ok Was the expectation successful?
#' @param failure_message What message should be shown if the expectation was
#' not successful?
#' @param info A... |
#' Search for ERDDAP tabledep or griddap datasets
#'
#' @export
#'
#' @param query (character) Search terms
#' @param page (integer) Page number
#' @param page_size (integer) Results per page
#' @param which (character) One of tabledep or griddap.
#' @param url A URL for an ERDDAP server. Default:
#' \url{https://upwel... | /R/search.R | permissive | ilnamkang/rerddap | R | false | false | 3,067 | r | #' Search for ERDDAP tabledep or griddap datasets
#'
#' @export
#'
#' @param query (character) Search terms
#' @param page (integer) Page number
#' @param page_size (integer) Results per page
#' @param which (character) One of tabledep or griddap.
#' @param url A URL for an ERDDAP server. Default:
#' \url{https://upwel... |
chartUI <- function(id, label = "Chart UI") {
ns <- NS(id)
tagList(
div(
plotOutput(ns("distance_hist"))
)
)
} | /ShipTracker/R/chart_ui.R | no_license | radbasa/shiptracker | R | false | false | 155 | r | chartUI <- function(id, label = "Chart UI") {
ns <- NS(id)
tagList(
div(
plotOutput(ns("distance_hist"))
)
)
} |
library(RDS)
### Name: rds.interval.estimate
### Title: An object of class rds.interval.estimate
### Aliases: rds.interval.estimate
### Keywords: manip survey
### ** Examples
data(faux)
RDS.I.estimates(rds.data=faux,outcome.variable='X',smoothed=TRUE)
| /data/genthat_extracted_code/RDS/examples/rds.interval.estimate.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 261 | r | library(RDS)
### Name: rds.interval.estimate
### Title: An object of class rds.interval.estimate
### Aliases: rds.interval.estimate
### Keywords: manip survey
### ** Examples
data(faux)
RDS.I.estimates(rds.data=faux,outcome.variable='X',smoothed=TRUE)
|
library(tidyverse)
library(patchwork)
# parameters
mu_ab <- 223/94 # pfizer normalised neutralisation titre, linear scale
mu_ab <- 32/59 # az normalised neutralisation titre, linear scale
mu_ab <- 28/164 # sinovac
mu_ab_list <- data.frame(name = c("Pfizer", "AstraZeneca", "Sinovac"),
titre = ... | /old/main_v2.R | permissive | mrc-ide/covid-titre-efficacy | R | false | false | 5,728 | r | library(tidyverse)
library(patchwork)
# parameters
mu_ab <- 223/94 # pfizer normalised neutralisation titre, linear scale
mu_ab <- 32/59 # az normalised neutralisation titre, linear scale
mu_ab <- 28/164 # sinovac
mu_ab_list <- data.frame(name = c("Pfizer", "AstraZeneca", "Sinovac"),
titre = ... |
/fundflow and risktaking/02-data-capm.R | no_license | shenfan2018/shenfan2018 | R | false | false | 4,402 | r | ||
#' Hypothetical Impairment data of 123 European banks which took part in the EBA
#' transparency exercise 2020.
#'
#' A dataset containing hypothetical impairment data of 123 European banks who
#' took part in the EBA transparency exercise. The data are postulated with
#' reference to the paper "Rules of Thumb for Bank... | /R/eba_impairments_2020.R | permissive | Martin-Summer-1090/syslosseval | R | false | false | 2,242 | r | #' Hypothetical Impairment data of 123 European banks which took part in the EBA
#' transparency exercise 2020.
#'
#' A dataset containing hypothetical impairment data of 123 European banks who
#' took part in the EBA transparency exercise. The data are postulated with
#' reference to the paper "Rules of Thumb for Bank... |
mylist=as.list(Phase23[1:10,5:8])
Train1 <- function(.) {2*mean(.)}
sapply(mylist,Train1)
Train2 <- function(x) {2*mean(x)}
sapply(mylist,Train2)
2*mean(mylist[[2]])
#oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... | /Rcodes/training/functions.R | no_license | MonikaNovackova/FoodSystemGitH | R | false | false | 521 | r | mylist=as.list(Phase23[1:10,5:8])
Train1 <- function(.) {2*mean(.)}
sapply(mylist,Train1)
Train2 <- function(x) {2*mean(x)}
sapply(mylist,Train2)
2*mean(mylist[[2]])
#oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo... |
#' My custom ggplot theme
#'
#' Provides a modified version of \code{\link{theme_bw}}.
#'
#' @param base_size base font size (defaults to 12)
#' @param base_family base font family
#' @param legend_bottom set this to TRUE to place the legend at the bottom of the plot
#' @param margin_bottom bottom plot margin, in lin... | /R/theme_ath.R | permissive | andrewheiss/rath | R | false | false | 1,177 | r | #' My custom ggplot theme
#'
#' Provides a modified version of \code{\link{theme_bw}}.
#'
#' @param base_size base font size (defaults to 12)
#' @param base_family base font family
#' @param legend_bottom set this to TRUE to place the legend at the bottom of the plot
#' @param margin_bottom bottom plot margin, in lin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drop_edge_attrs.R
\name{drop_edge_attrs}
\alias{drop_edge_attrs}
\title{Drop an edge attribute column}
\usage{
drop_edge_attrs(graph, edge_attr)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph}.}
\item{edge_attr}{the name ... | /man/drop_edge_attrs.Rd | no_license | pcuthbert/DiagrammeR | R | false | true | 1,463 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drop_edge_attrs.R
\name{drop_edge_attrs}
\alias{drop_edge_attrs}
\title{Drop an edge attribute column}
\usage{
drop_edge_attrs(graph, edge_attr)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph}.}
\item{edge_attr}{the name ... |
##### Gibbs Sampling for Problem 4 #####
sample4_x = function(y, n) {
probs = rep(0, n+1);
c = 1; # C_{n}^{x};
ycon = 1; # y^x * (1-y)^(nx);
for(i in 1:(n+1)) {
probs[i] = c * ycon;
c = c*(n-i)/(i+1);
ycon = ycon * y * (1-y)^n;
}
normalized_probs = rep(0, n+1);
sums = 0;
total_sum = sum(prob... | /Statistical Computing/homework4/gibbs_sampling_4.R | no_license | Orcuslc/Learning | R | false | false | 1,788 | r | ##### Gibbs Sampling for Problem 4 #####
sample4_x = function(y, n) {
probs = rep(0, n+1);
c = 1; # C_{n}^{x};
ycon = 1; # y^x * (1-y)^(nx);
for(i in 1:(n+1)) {
probs[i] = c * ycon;
c = c*(n-i)/(i+1);
ycon = ycon * y * (1-y)^n;
}
normalized_probs = rep(0, n+1);
sums = 0;
total_sum = sum(prob... |
1 + 1
(4*6)+5
x <- 2
5 -> y
y
y <- z <- 6
y
z
z <- as.Date("2013-10-04")
z <- as.POSIXct("2013-10-04 10:09")
z
x <- c(3, 5, 1, 5, 4)
x
y <- 1:5
z <- 1:2
x*z
ls()
rm(list=ls())
A <- matrix(1:10, nrow=5)
A
B <- matrix(21:30, nrow=5)
B
D <- matrix(11:20, nrow=5)
D <- matrix(11:20, nrow=2... | /R/intro_class/first.R | no_license | karoljohnston/data-analysis-examples | R | false | false | 1,070 | r | 1 + 1
(4*6)+5
x <- 2
5 -> y
y
y <- z <- 6
y
z
z <- as.Date("2013-10-04")
z <- as.POSIXct("2013-10-04 10:09")
z
x <- c(3, 5, 1, 5, 4)
x
y <- 1:5
z <- 1:2
x*z
ls()
rm(list=ls())
A <- matrix(1:10, nrow=5)
A
B <- matrix(21:30, nrow=5)
B
D <- matrix(11:20, nrow=5)
D <- matrix(11:20, nrow=2... |
"boxcox.nls" <- function(object, x, lambda = seq(-2, 2, 1/10), plotit = TRUE, start,
eps = 1/50, bcAdd = 0, level = 0.95, xlab = expression(lambda), ylab = "log-likelihood", ...)
{
## Defining the Box-Cox modified power transformations
bfFct <- function(lv)
{
function(x) {if (abs(lv) < eps) {return(... | /nmprista/000_Auxiliary_Funs/Sim_Modeling/func_boxcox.nls2.R | no_license | ices-eg/wk_WKBIOPTIM3 | R | false | false | 4,824 | r | "boxcox.nls" <- function(object, x, lambda = seq(-2, 2, 1/10), plotit = TRUE, start,
eps = 1/50, bcAdd = 0, level = 0.95, xlab = expression(lambda), ylab = "log-likelihood", ...)
{
## Defining the Box-Cox modified power transformations
bfFct <- function(lv)
{
function(x) {if (abs(lv) < eps) {return(... |
a<-read.csv("C:\\Drive E\\Spring2016\\CSC510_Data\\groupCommit\\group-m_commits.csv",sep=",",header=F)
weeks<-vector("numeric",30)# total weeks
totalCommits<-nrow(a)
weekTime<-604800
commitWeek<-vector("numeric",totalCommits) # week which commit occur
start<-a[totalCommits,2]
end<-a[1,2]
i<-0
whil... | /may1/scripts/rscripts/LineChart.R | no_license | cleebp/csc-510-group-g | R | false | false | 926 | r | a<-read.csv("C:\\Drive E\\Spring2016\\CSC510_Data\\groupCommit\\group-m_commits.csv",sep=",",header=F)
weeks<-vector("numeric",30)# total weeks
totalCommits<-nrow(a)
weekTime<-604800
commitWeek<-vector("numeric",totalCommits) # week which commit occur
start<-a[totalCommits,2]
end<-a[1,2]
i<-0
whil... |
library( "ape" )
library( "geiger" )
library( "expm" )
library( "nloptr" )
source( "masternegloglikeeps1.R" )
source( "Qmatrixwoodherb2.R" )
source("Pruning2.R")
sim.tree<-read.tree("tree75time76.txt")
sim.chrom<-read.table("chrom75time76.txt", header=FALSE)
last.state=50
x.0<- log(c(0.12, 0.001, 0.25, 0.002,0.036, ... | /Simulations tree height/75 my/optim75tree76.R | no_license | roszenil/Bichromdryad | R | false | false | 821 | r | library( "ape" )
library( "geiger" )
library( "expm" )
library( "nloptr" )
source( "masternegloglikeeps1.R" )
source( "Qmatrixwoodherb2.R" )
source("Pruning2.R")
sim.tree<-read.tree("tree75time76.txt")
sim.chrom<-read.table("chrom75time76.txt", header=FALSE)
last.state=50
x.0<- log(c(0.12, 0.001, 0.25, 0.002,0.036, ... |
setwd("C:/Users/Ythie/Documents/Github/RepData_PeerAssessment1")
act <- read.csv('activity.csv', header = T)
acttot <- aggregate(act$steps ~ act$date, act, sum, na.action = na.pass)
hist(acttot$`act$steps`, xlab = 'Total Number of Steps per Day', main =
'Histogram of Total Number of Steps per Day', col = 'Red'... | /activity.R | no_license | ythie/RepData_PeerAssessment1 | R | false | false | 2,744 | r | setwd("C:/Users/Ythie/Documents/Github/RepData_PeerAssessment1")
act <- read.csv('activity.csv', header = T)
acttot <- aggregate(act$steps ~ act$date, act, sum, na.action = na.pass)
hist(acttot$`act$steps`, xlab = 'Total Number of Steps per Day', main =
'Histogram of Total Number of Steps per Day', col = 'Red'... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 5.15179127351233e-218, 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_... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615768997-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 5.15179127351233e-218, 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_... |
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | /advanced_functionality/r_bring_your_own/mars.R | permissive | marc-cabocel/amazon-sagemaker-examples | R | false | false | 2,797 | r | # Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shiny-tree.R
\name{shinyTree}
\alias{shinyTree}
\title{Create a Shiny Tree}
\usage{
shinyTree(outputId, checkbox = FALSE, search = FALSE,
searchtime = 250, dragAndDrop = FALSE, types = NULL,
theme = "default", themeIcons = TRUE, themeDots... | /man/shinyTree.Rd | permissive | nanxstats/shinyTree | R | false | true | 2,721 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shiny-tree.R
\name{shinyTree}
\alias{shinyTree}
\title{Create a Shiny Tree}
\usage{
shinyTree(outputId, checkbox = FALSE, search = FALSE,
searchtime = 250, dragAndDrop = FALSE, types = NULL,
theme = "default", themeIcons = TRUE, themeDots... |
get_trait = function(str) {
str_remove(str_remove(str, 'imputed_'), '.txt.gz')
} | /code/helpers/rlib_doc.R | permissive | yangchuhua/gtex-gwas-analysis | R | false | false | 82 | r | get_trait = function(str) {
str_remove(str_remove(str, 'imputed_'), '.txt.gz')
} |
context("Factors")
dataset <- readLines("dataset.json")
test_that("factors are factors", {
expect_is(fromJSONstat(dataset, naming = "label",
use_factors = TRUE)[[1]][[1]],
"factor")
expect_is(fromJSONstat(dataset, naming = "id",
use_factors =... | /rjstat/tests/testthat/test-factors.R | no_license | ingted/R-Examples | R | false | false | 3,483 | r | context("Factors")
dataset <- readLines("dataset.json")
test_that("factors are factors", {
expect_is(fromJSONstat(dataset, naming = "label",
use_factors = TRUE)[[1]][[1]],
"factor")
expect_is(fromJSONstat(dataset, naming = "id",
use_factors =... |
##for mainz7g:
library(beeswarm)
library(survcomp)
library(Biobase)
data(breastCancerData)
par(mfrow=c(1,3))
breast2 <- NULL
breast2$ER <- as.factor(pData(mainz7g)[,"er"])
breast2$ESR1 <- as.numeric(exprs(mainz7g)[1,])
breast2$ERBB2 <- as.numeric(exprs(mainz7g)[2,])
breast2$time_survival <- as.integer(pDa... | /R/beeswarmPlots.r | no_license | mschroed/oncosurf | R | false | false | 8,897 | r | ##for mainz7g:
library(beeswarm)
library(survcomp)
library(Biobase)
data(breastCancerData)
par(mfrow=c(1,3))
breast2 <- NULL
breast2$ER <- as.factor(pData(mainz7g)[,"er"])
breast2$ESR1 <- as.numeric(exprs(mainz7g)[1,])
breast2$ERBB2 <- as.numeric(exprs(mainz7g)[2,])
breast2$time_survival <- as.integer(pDa... |
library(tidyverse)
library(fitzRoy)
# First lets load afldata provided
load(here::here("data-raw", "afl_tables_playerstats", "afltables_playerstats_provided.rda"))
# Select out the columns we want
afldata <- afldata %>%
select(
-X, -year, -month, -day,
-Home.coach, -Home.coach.DOB, -Away.coach, -Away.coach.... | /data-raw/afl_tables_playerstats/afltables_intial_scrape.R | no_license | mickbail/fitzRoy | R | false | false | 6,132 | r | library(tidyverse)
library(fitzRoy)
# First lets load afldata provided
load(here::here("data-raw", "afl_tables_playerstats", "afltables_playerstats_provided.rda"))
# Select out the columns we want
afldata <- afldata %>%
select(
-X, -year, -month, -day,
-Home.coach, -Home.coach.DOB, -Away.coach, -Away.coach.... |
\name{causalForest}
\alias{causalForest}
%\alias{causalTreecallback}
\title{
Causal Effect Regression and Estimation Forests (Tree Ensembles)
}
\description{
Build a random forest by fitting a user selected number of \code{causalTree} models to get an ensemble of \code{rpart} objects.
}
\usage{
causalFore... | /man/causalForest.Rd | no_license | NeuRonXE999999/causalTree | R | false | false | 8,962 | rd | \name{causalForest}
\alias{causalForest}
%\alias{causalTreecallback}
\title{
Causal Effect Regression and Estimation Forests (Tree Ensembles)
}
\description{
Build a random forest by fitting a user selected number of \code{causalTree} models to get an ensemble of \code{rpart} objects.
}
\usage{
causalFore... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/derive_date_vars.R
\name{compute_dtf}
\alias{compute_dtf}
\title{Derive the Date Imputation Flag}
\usage{
compute_dtf(dtc, dt)
}
\arguments{
\item{dtc}{The date character vector ('--DTC').
A character date is expected in a format like yyyy-m... | /man/compute_dtf.Rd | no_license | rajkboddu/admiral | R | false | true | 833 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/derive_date_vars.R
\name{compute_dtf}
\alias{compute_dtf}
\title{Derive the Date Imputation Flag}
\usage{
compute_dtf(dtc, dt)
}
\arguments{
\item{dtc}{The date character vector ('--DTC').
A character date is expected in a format like yyyy-m... |
##tinytex::install_tinytex()
##tinytex:::is_tinytex()
library(tidyverse)
load("rda/murders.rda")
murders %>% mutate(abb = reorder(abb, rate)) %>%
ggplot(aes(abb, rate)) +
geom_bar(width = 0.5, stat = "identity", color = "black") +
coord_flip()
ggsave("figs/barplot.png") | /analysis.R | no_license | swilliamc/murders | R | false | false | 278 | r | ##tinytex::install_tinytex()
##tinytex:::is_tinytex()
library(tidyverse)
load("rda/murders.rda")
murders %>% mutate(abb = reorder(abb, rate)) %>%
ggplot(aes(abb, rate)) +
geom_bar(width = 0.5, stat = "identity", color = "black") +
coord_flip()
ggsave("figs/barplot.png") |
# descarregar srtm
# dados SE Portugal
HTTP<-"http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/N37W008.hgt.zip" # SE
download.file(url=HTTP,destfile="N37W008.hgt.zip",mode="wb") # faz download para pasta de trabalho
unzip(zipfile="N37W008.hgt.zip") # ficheiro .hgt
srtm8<-raster("N37W008.hgt")
HTTP<-"http://dds.cr... | /restar_mde_terrain_functions.r | no_license | manuelcampagnolo/raster_datasets_R | R | false | false | 2,793 | r | # descarregar srtm
# dados SE Portugal
HTTP<-"http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/N37W008.hgt.zip" # SE
download.file(url=HTTP,destfile="N37W008.hgt.zip",mode="wb") # faz download para pasta de trabalho
unzip(zipfile="N37W008.hgt.zip") # ficheiro .hgt
srtm8<-raster("N37W008.hgt")
HTTP<-"http://dds.cr... |
#----------------------------------------------------------------------------#
#' @title Generate DFCI diagnosis-related features (dia_oncdrs data).
#'
#' @description \
#'
#' @export
#' @param cohort
#' @param cohort_key_var_merge
#' @param cohort_key_var
#' @return
#' @examples
dia_oncdrs_feature_gen <- function(... | /R/dia_oncdrs_feature_gen_F.R | permissive | sysmedlab/featuristic | R | false | false | 1,846 | r | #----------------------------------------------------------------------------#
#' @title Generate DFCI diagnosis-related features (dia_oncdrs data).
#'
#' @description \
#'
#' @export
#' @param cohort
#' @param cohort_key_var_merge
#' @param cohort_key_var
#' @return
#' @examples
dia_oncdrs_feature_gen <- function(... |
#' Profile a function
#'
#' Gives details about how linear it is.
#'
#' @param func A function with a single output
#' @param d The number of input dimensions for the function
#' @param n The number of points to use for the linear model.
#' @param bins Number of bins in histogram.
#'
#' @importFrom stats sd predict lm
... | /R/funcprofile.R | no_license | CollinErickson/TestFunctions | R | false | false | 2,626 | r | #' Profile a function
#'
#' Gives details about how linear it is.
#'
#' @param func A function with a single output
#' @param d The number of input dimensions for the function
#' @param n The number of points to use for the linear model.
#' @param bins Number of bins in histogram.
#'
#' @importFrom stats sd predict lm
... |
shinyServer(function(input, output){
#by Date
filteredcrime <- reactive({
crime.type.grp %>%
filter(rdate >= input$dateC[1] & rdate <=input$dateC[2])
# %>% group_by(crime.type) %>%
# summarise(n= n()) %>%
na.omit()
# print(x)
})
output$hist <- renderPlot({
filteredcri... | /server.R | no_license | TKHDatSci/ShinyProject | R | false | false | 5,455 | r |
shinyServer(function(input, output){
#by Date
filteredcrime <- reactive({
crime.type.grp %>%
filter(rdate >= input$dateC[1] & rdate <=input$dateC[2])
# %>% group_by(crime.type) %>%
# summarise(n= n()) %>%
na.omit()
# print(x)
})
output$hist <- renderPlot({
filteredcri... |
datas<-read.table("household_power_consumption.txt",header=TRUE,sep=";",colClasses = c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric'),na.strings = "?")
datas$Date<-as.Date(datas$Date,"%d/%m/%Y")
datas<-subset(datas,Date>=as.Date("2007-2-1")&Date<=as.Date("2007-2-2"))
d... | /plot2.r | no_license | TheShivamChand/datasciencecoursera | R | false | false | 674 | r | datas<-read.table("household_power_consumption.txt",header=TRUE,sep=";",colClasses = c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric'),na.strings = "?")
datas$Date<-as.Date(datas$Date,"%d/%m/%Y")
datas<-subset(datas,Date>=as.Date("2007-2-1")&Date<=as.Date("2007-2-2"))
d... |
source("R/functions.R")
#'Get Comtrade values from Trading Economics API
#'@export getComtradeCategories
#'
#' @param category string.
#' @param page string.
#' @param outType string.
#''df' for data frame,
#''raw'(default) for list of unparsed data.
#'
#'@return Returns a list or data from World Bank.
#'@section Not... | /R/tradingeconomics/R/comtrade.R | no_license | molodiuc/tradingeconomics | R | false | false | 4,670 | r | source("R/functions.R")
#'Get Comtrade values from Trading Economics API
#'@export getComtradeCategories
#'
#' @param category string.
#' @param page string.
#' @param outType string.
#''df' for data frame,
#''raw'(default) for list of unparsed data.
#'
#'@return Returns a list or data from World Bank.
#'@section Not... |
library(ggplot2)
library(RMKdiscrete)
setwd("/Users/julianbertini/Desktop/BSD-QBio5/tutorials/reproducibility")
arth.data <- read.csv("data/cole_arthropod_Data_1946.csv")
weevil.data <- read.csv("data/mitchell_weevil_egg_data_1975.csv")
names(arth.data) <- c("k_arthropods","c_boards_with_k_spiders","c_boards_with_k_... | /challenge.R | no_license | julianbertini/Reproducibility | R | false | false | 4,671 | r | library(ggplot2)
library(RMKdiscrete)
setwd("/Users/julianbertini/Desktop/BSD-QBio5/tutorials/reproducibility")
arth.data <- read.csv("data/cole_arthropod_Data_1946.csv")
weevil.data <- read.csv("data/mitchell_weevil_egg_data_1975.csv")
names(arth.data) <- c("k_arthropods","c_boards_with_k_spiders","c_boards_with_k_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dafsFilter.R
\name{dafsFilter}
\alias{dafsFilter}
\title{dafsFilter Function to filter expression data within an object.}
\usage{
dafsFilter(se, PLOT=TRUE)
}
\arguments{
\item{se}{A SummarizedExperiment object.}
\item{PLOT}{Boolea... | /man/dafsFilter.Rd | no_license | WaltersLab/doseR | R | false | true | 1,259 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dafsFilter.R
\name{dafsFilter}
\alias{dafsFilter}
\title{dafsFilter Function to filter expression data within an object.}
\usage{
dafsFilter(se, PLOT=TRUE)
}
\arguments{
\item{se}{A SummarizedExperiment object.}
\item{PLOT}{Boolea... |
library(rgbif)
#' @title Occurrence Citations
#'
#' @description Harvests citations from GBIF for occurrence data
#'
#' @param x An object of class \code{\link{bridgeTreeData}}
#'
#' @return A vector with citations for occurrences
#'
#' @examples
#' myCitations <- occCitation(x = myBridgeTreeObject);
#'
#' @export
oc... | /R/occCitation.R | no_license | cmerow/BridgeTree | R | false | false | 1,129 | r | library(rgbif)
#' @title Occurrence Citations
#'
#' @description Harvests citations from GBIF for occurrence data
#'
#' @param x An object of class \code{\link{bridgeTreeData}}
#'
#' @return A vector with citations for occurrences
#'
#' @examples
#' myCitations <- occCitation(x = myBridgeTreeObject);
#'
#' @export
oc... |
globalVariables(c("country", "exporter", "importer", "name", "type", "value"))
.onAttach <- function(...) {
needed <- core[!is_attached(core)]
if (length(needed) == 0) {
return()
}
msg(cli::rule(crayon::bold(paste0("yotover ", package_version("yotover")))))
msg(crayon::green(paste(cli::symbol$star,
... | /R/zzz.R | no_license | cran/yotover | R | false | false | 1,538 | r | globalVariables(c("country", "exporter", "importer", "name", "type", "value"))
.onAttach <- function(...) {
needed <- core[!is_attached(core)]
if (length(needed) == 0) {
return()
}
msg(cli::rule(crayon::bold(paste0("yotover ", package_version("yotover")))))
msg(crayon::green(paste(cli::symbol$star,
... |
library(assertive.datetimes)
### Name: assert_all_are_after
### Title: Is the input in the past/future?
### Aliases: assert_all_are_after assert_all_are_before
### assert_all_are_in_future assert_all_are_in_past assert_any_are_after
### assert_any_are_before assert_any_are_in_future assert_any_are_in_past
### i... | /data/genthat_extracted_code/assertive.datetimes/examples/is_in_past.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 568 | r | library(assertive.datetimes)
### Name: assert_all_are_after
### Title: Is the input in the past/future?
### Aliases: assert_all_are_after assert_all_are_before
### assert_all_are_in_future assert_all_are_in_past assert_any_are_after
### assert_any_are_before assert_any_are_in_future assert_any_are_in_past
### i... |
library(testthat)
library(flamingo)
test_check("flamingo")
| /BFE_RShiny/flamingo/tests/testthat.R | permissive | miraisolutions/OasisUI | R | false | false | 60 | r | library(testthat)
library(flamingo)
test_check("flamingo")
|
# Homework 10 R code
require(survival)
# Problem 1
# take a look at the data - it is not that big
aml
# Problem 2 - I give the result you need
# in the problem but go ahead and run this
# code as you will use aml.obj below.
# Create the survival object
aml.obj<-Surv(aml$time,aml$status)
# Maintained ti... | /hw10/Hmwk10.r | no_license | kflagg/stat525 | R | false | false | 1,164 | r | # Homework 10 R code
require(survival)
# Problem 1
# take a look at the data - it is not that big
aml
# Problem 2 - I give the result you need
# in the problem but go ahead and run this
# code as you will use aml.obj below.
# Create the survival object
aml.obj<-Surv(aml$time,aml$status)
# Maintained ti... |
# Resources; https://ourcodingclub.github.io/2018/04/17/stan-intro.html
#------------------------------------------------------------------
#load libraries
library(rstan)
library(gdata)
library(bayesplot)
#------------------------------------------------------------------
# simulate some data
b0 <- 2.3
b1 <- 1.5
... | /OLD/Example 1.R | no_license | neko1010/DDeSup | R | false | false | 1,762 | r | # Resources; https://ourcodingclub.github.io/2018/04/17/stan-intro.html
#------------------------------------------------------------------
#load libraries
library(rstan)
library(gdata)
library(bayesplot)
#------------------------------------------------------------------
# simulate some data
b0 <- 2.3
b1 <- 1.5
... |
# Copyright 2018 Observational Health Data Sciences and Informatics
#
# This file is part of EvidenceSynthesis
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/... | /R/EvidenceSynthesis.R | permissive | alondhe/EvidenceSynthesis | R | false | false | 821 | r | # Copyright 2018 Observational Health Data Sciences and Informatics
#
# This file is part of EvidenceSynthesis
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/... |
context("FUNCTION NAME")
test_that("function property under test", {
})
| /tests/testthat/TEMPLATE.R | no_license | lbraglia/lbmisc | R | false | false | 81 | r | context("FUNCTION NAME")
test_that("function property under test", {
})
|
# write AdaBoost algorithm
adaboost<-function(x,y,b){
alpha<-c()
allpars<-matrix(nrow = b,ncol = 3)
n<-nrow(x)
w<-c(rep((1/n),times=n))
for(i in 1:b){
pars<-train(x,w,y)
allpars[i,]<-c(pars[[1]][1],pars[[2]][1],pars[[3]][1])
label<-classify(x,pars)
wrong<-0
temp<-c()
count<-1
for(... | /AdaBoost algorithm.R | no_license | Weik-Zhu/Boosting | R | false | false | 1,566 | r | # write AdaBoost algorithm
adaboost<-function(x,y,b){
alpha<-c()
allpars<-matrix(nrow = b,ncol = 3)
n<-nrow(x)
w<-c(rep((1/n),times=n))
for(i in 1:b){
pars<-train(x,w,y)
allpars[i,]<-c(pars[[1]][1],pars[[2]][1],pars[[3]][1])
label<-classify(x,pars)
wrong<-0
temp<-c()
count<-1
for(... |
library(RPPairwiseDesign)
### Name: PPdiv
### Title: Group divisible RPPBD
### Aliases: PPdiv
### Keywords: ~kwd1 ~kwd2
### ** Examples
n<-3
l<-3
PPdiv(n,l)
| /data/genthat_extracted_code/RPPairwiseDesign/examples/PPdiv.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 164 | r | library(RPPairwiseDesign)
### Name: PPdiv
### Title: Group divisible RPPBD
### Aliases: PPdiv
### Keywords: ~kwd1 ~kwd2
### ** Examples
n<-3
l<-3
PPdiv(n,l)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SIRIKeepClosestStop.R
\name{SIRIKeepClosestStop}
\alias{SIRIKeepClosestStop}
\title{Keep only the closest stop to each SIRI observation}
\usage{
SIRIKeepClosestStop(SIRIdf)
}
\arguments{
\item{SIRIdf}{A SIRI df with a distance field ... | /man/SIRIKeepClosestStop.Rd | no_license | cran/SIRItoGTFS | R | false | true | 983 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SIRIKeepClosestStop.R
\name{SIRIKeepClosestStop}
\alias{SIRIKeepClosestStop}
\title{Keep only the closest stop to each SIRI observation}
\usage{
SIRIKeepClosestStop(SIRIdf)
}
\arguments{
\item{SIRIdf}{A SIRI df with a distance field ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.