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 |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{bin_mean}
\alias{bin_mean}
\title{Binomial Mean}
\usage{
bin_mean(trials, prob)
}
\arguments{
\item{trials}{trials}
\item{prob}{probability}
}
\value{
binmean
}
\description{
Calculates mean of a binomial distribution of a ... | /binomial/man/bin_mean.Rd | no_license | stat133-sp19/hw-stat133-J-V-H | R | false | true | 382 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{bin_mean}
\alias{bin_mean}
\title{Binomial Mean}
\usage{
bin_mean(trials, prob)
}
\arguments{
\item{trials}{trials}
\item{prob}{probability}
}
\value{
binmean
}
\description{
Calculates mean of a binomial distribution of a ... |
getwd()
setwd("/Users/Michael/Udacity/Project 5/Data Visualization/Final Project/R Sketches")
#Import GGPlot Libray
library(ggplot2)
#Read Data
titanic <- read.csv('titanic1.csv')
summary(titanic)
#Bar Chart Age
ggplot(aes(x=Age, fill = Status), data = titanic) + geom_bar() +
ggsave('Age.png')
#Bar Chart Passe... | /R Plots/plots.R | no_license | michaelstrobl90/Udacity-Project-5 | R | false | false | 651 | r | getwd()
setwd("/Users/Michael/Udacity/Project 5/Data Visualization/Final Project/R Sketches")
#Import GGPlot Libray
library(ggplot2)
#Read Data
titanic <- read.csv('titanic1.csv')
summary(titanic)
#Bar Chart Age
ggplot(aes(x=Age, fill = Status), data = titanic) + geom_bar() +
ggsave('Age.png')
#Bar Chart Passe... |
setwd('C:/Users/Nithin/Desktop')
install.packages('xgboost')
install.packages("tidyverse")
library(xgboost) # for xgboost
library(tidyverse) # general utility functions
install.packages('readr')
install.packages("DiagrammeR")
install.packages("stringr")
library(DiagrammeR)
library(stringr)
library('readr')
d... | /xgboost.R | no_license | nithinrajkairali/XGBoost | R | false | false | 6,398 | r | setwd('C:/Users/Nithin/Desktop')
install.packages('xgboost')
install.packages("tidyverse")
library(xgboost) # for xgboost
library(tidyverse) # general utility functions
install.packages('readr')
install.packages("DiagrammeR")
install.packages("stringr")
library(DiagrammeR)
library(stringr)
library('readr')
d... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 2263
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 2262
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 2262
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Basler/wmiforward/stmt1_919_920/stmt1_919_920.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 707 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 2263
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 2262
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 2262
c
c Input Parameter (command line, fil... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bdc-package.R
\docType{data}
\name{merraclim_2.5m_bav_tk25}
\alias{merraclim_2.5m_bav_tk25}
\title{MerraClim bioclimatic data of bavaria}
\format{A \code{data.frame} with 20412 observations and 23 variables.}
\source{
This data has been obtai... | /man/merraclim_2.5m_bav_tk25.Rd | permissive | cszang/bdc | R | false | true | 959 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bdc-package.R
\docType{data}
\name{merraclim_2.5m_bav_tk25}
\alias{merraclim_2.5m_bav_tk25}
\title{MerraClim bioclimatic data of bavaria}
\format{A \code{data.frame} with 20412 observations and 23 variables.}
\source{
This data has been obtai... |
#' Estimate Recovery Rate
#'
#' This function provides a first estimate of the recovery rate, to faciliate
#' convergence of the main algorithm.
#' @param tTarget target time vector
#' @param Q target time-histories of the quarantined cases
#' @param R target time-histories of the recovered cases
#' @param guess initi... | /R/getLambdaFun.R | no_license | cran/genSEIR | R | false | false | 3,063 | r | #' Estimate Recovery Rate
#'
#' This function provides a first estimate of the recovery rate, to faciliate
#' convergence of the main algorithm.
#' @param tTarget target time vector
#' @param Q target time-histories of the quarantined cases
#' @param R target time-histories of the recovered cases
#' @param guess initi... |
## Download and unzip the files, if they do not exist yet.
## Else, skip this step.
getFiles <- function(dest) {
if(!file.exists(dest)) {
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip",
destfile=dest)
unzip(dest)
} else if(!file.exists("UCI HAR Dataset... | /Clean_activity_tracker/run_analysis.R | no_license | Ziconin/Data_Science | R | false | false | 3,181 | r | ## Download and unzip the files, if they do not exist yet.
## Else, skip this step.
getFiles <- function(dest) {
if(!file.exists(dest)) {
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip",
destfile=dest)
unzip(dest)
} else if(!file.exists("UCI HAR Dataset... |
1+2
#lalalala
#bozenko
#nowa Bozenka | /wk4/prac4_script/prac_4.R | no_license | SPadlewski/GIS_code | R | false | false | 41 | r | 1+2
#lalalala
#bozenko
#nowa Bozenka |
library(iglu)
data_test = c(101,121,141,151,161,171,191,201,231,251)
test_that("range_glu equivalent to max - min", {
expect_equal((range_glu(data_test)), max(data_test) - min(data_test), tolerance = 1e-04)
expect_equal((range_glu(example_data_1_subject)), max(example_data_1_subject$gl) - min(example_data_1_subjec... | /tests/testthat/test-range_glu.R | no_license | trippsapientae/iglu | R | false | false | 349 | r | library(iglu)
data_test = c(101,121,141,151,161,171,191,201,231,251)
test_that("range_glu equivalent to max - min", {
expect_equal((range_glu(data_test)), max(data_test) - min(data_test), tolerance = 1e-04)
expect_equal((range_glu(example_data_1_subject)), max(example_data_1_subject$gl) - min(example_data_1_subjec... |
## Functions that demonstrates the lexical scoping rules of R
## and how they are used for implementing caching functionality
## Functions specifically calculates the inverse of a matrix if
## not done already and caches the same.
## This function creates a vector with list of following functions
## set -> set the va... | /cachematrix.R | no_license | rajnani/ProgrammingAssignment2 | R | false | false | 1,725 | r | ## Functions that demonstrates the lexical scoping rules of R
## and how they are used for implementing caching functionality
## Functions specifically calculates the inverse of a matrix if
## not done already and caches the same.
## This function creates a vector with list of following functions
## set -> set the va... |
## Use SIMPER analysis to identify ASVs that are contributing to incongruency between sites/species
# Paul A. O'Brien
# paul.obrien@my.jcu.edu.au
setwd("~/Documents/R/Ramaciotti_16S_dataset/Phylosymbiosis/")
library(vegan)
taxonomy <- read.table("~/Documents/R/Ramaciotti_16S_dataset/taxonomy_silva.tsv", sep = "\t",... | /R_scripts/SIMPER_analysis.R | no_license | paobrien/Phylosymbiosis-in-coral-reef-invertebrates | R | false | false | 1,814 | r | ## Use SIMPER analysis to identify ASVs that are contributing to incongruency between sites/species
# Paul A. O'Brien
# paul.obrien@my.jcu.edu.au
setwd("~/Documents/R/Ramaciotti_16S_dataset/Phylosymbiosis/")
library(vegan)
taxonomy <- read.table("~/Documents/R/Ramaciotti_16S_dataset/taxonomy_silva.tsv", sep = "\t",... |
#this script gives 'sumcall', a vector of the expression of a particular gene, summed across all genomic positions of a particular big wigs. The vector is 500 values long, containing one summed value for each bigWig file.
#'sumcall' can be used to holistically measure gene expression.
library(rtracklayer)
library(m... | /files for github/sumcall.R | no_license | nishika/SRA_Annotation | R | false | false | 1,505 | r | #this script gives 'sumcall', a vector of the expression of a particular gene, summed across all genomic positions of a particular big wigs. The vector is 500 values long, containing one summed value for each bigWig file.
#'sumcall' can be used to holistically measure gene expression.
library(rtracklayer)
library(m... |
x <-c(15,12,8,8,7,7,7,6,5,3) # physics
y <-c(10,25, 17,11,13,17,20,13,9,15) #history
#Karl Pearson's correlation coefficient = covariance(X, Y) / (stdv(X) * stdv(Y))
Karl<- cov(x,y)/(sd(x)*sd(y))
cat(round (Karl,3)) | /Correlation and Regression Lines - A Quick Recap #1.R | no_license | golpiraelmi/HackerRank | R | false | false | 217 | r | x <-c(15,12,8,8,7,7,7,6,5,3) # physics
y <-c(10,25, 17,11,13,17,20,13,9,15) #history
#Karl Pearson's correlation coefficient = covariance(X, Y) / (stdv(X) * stdv(Y))
Karl<- cov(x,y)/(sd(x)*sd(y))
cat(round (Karl,3)) |
NLQuit <-
function(nl.obj=NULL, all=FALSE)
{
if (all) {
# object names
#objs <- names(.rnetlogo$objects)
objs <- .rnetlogo$objects
# handle gui obj as last, to prevent java.lang.InterruptionException
guiobj <- NULL
if ((!is.null(.rnetlogo$guiobj)) && (.rnetlogo$guiobj %in% objs)... | /R/NLQuit.R | no_license | cran/RNetLogo | R | false | false | 1,944 | r | NLQuit <-
function(nl.obj=NULL, all=FALSE)
{
if (all) {
# object names
#objs <- names(.rnetlogo$objects)
objs <- .rnetlogo$objects
# handle gui obj as last, to prevent java.lang.InterruptionException
guiobj <- NULL
if ((!is.null(.rnetlogo$guiobj)) && (.rnetlogo$guiobj %in% objs)... |
getCall.HLfit <- function(x,...) {
# only one of these call may be present in the object: HLCorcall is removed by fitme and corrHLfit
if ( ! is.null(call <- attr(x,"fitmecall"))) return(call)
if ( ! is.null(call <- attr(x,"HLCorcall"))) return(call) ## eg confint on an HLCor object
if ( ! is.null(call <- a... | /CRAN/contrib/spaMM/R/update.HL.R | no_license | PRL-PRG/dyntrace-instrumented-packages | R | false | false | 4,284 | r | getCall.HLfit <- function(x,...) {
# only one of these call may be present in the object: HLCorcall is removed by fitme and corrHLfit
if ( ! is.null(call <- attr(x,"fitmecall"))) return(call)
if ( ! is.null(call <- attr(x,"HLCorcall"))) return(call) ## eg confint on an HLCor object
if ( ! is.null(call <- a... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615835645-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,048 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
install.packages("tidyverse")
install.packages("pdftools")
library(tidyverse)
library(pdftools)
text <-read_delim(file = "Z:/GIT/Assignment1.txt",delim=" ",col_names = FALSE,
col_types = cols(.default = col_number()) )
text
risk_free <-t(text[1,])
sp500 <-t(text[2,])
apple <-t(text[3,])... | /Assignment1.R | no_license | albolea/econ5100 | R | false | false | 730 | r | install.packages("tidyverse")
install.packages("pdftools")
library(tidyverse)
library(pdftools)
text <-read_delim(file = "Z:/GIT/Assignment1.txt",delim=" ",col_names = FALSE,
col_types = cols(.default = col_number()) )
text
risk_free <-t(text[1,])
sp500 <-t(text[2,])
apple <-t(text[3,])... |
testlist <- list(b = c(50400896L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) | /mcga/inst/testfiles/ByteVectorToDoubles/AFL_ByteVectorToDoubles/ByteVectorToDoubles_valgrind_files/1613101640-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 182 | r | testlist <- list(b = c(50400896L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) |
#' @export
getTrainPerf <- function(x) {
bestPerf <- x$bestTune
colnames(bestPerf) <- gsub("^\\.", "", colnames(bestPerf))
out <- merge(x$results, bestPerf)
out <- out[, colnames(out) %in% x$perfNames, drop = FALSE]
colnames(out) <- paste("Train", colnames(out), sep = "")
out$method <- x$method
out
}
| /pkg/caret/R/getTrainPerf.R | no_license | topepo/caret | R | false | false | 317 | r | #' @export
getTrainPerf <- function(x) {
bestPerf <- x$bestTune
colnames(bestPerf) <- gsub("^\\.", "", colnames(bestPerf))
out <- merge(x$results, bestPerf)
out <- out[, colnames(out) %in% x$perfNames, drop = FALSE]
colnames(out) <- paste("Train", colnames(out), sep = "")
out$method <- x$method
out
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{municipality}
\alias{municipality}
\title{Municipality data with keys and polygon-geoms for municipalities of Denmark}
\format{
A data frame with 39,230 rows and 7 columns:
\describe{
\item{long}{Longitude coor... | /man/municipality.Rd | permissive | kristianSN/plotDK | R | false | true | 727 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{municipality}
\alias{municipality}
\title{Municipality data with keys and polygon-geoms for municipalities of Denmark}
\format{
A data frame with 39,230 rows and 7 columns:
\describe{
\item{long}{Longitude coor... |
#####
# Helper file with functions that construct ROC curves for glm and penfit objects
#####
# Build a function that makes a ROC curve for a given model (GLM or penfit)
constructROC <- function(model, ...) {
UseMethod("constructROC", model)
}
constructROC.logistf <- function(model, test = TRUE, thr = seq(from = 0... | /Logistic Regression/helperROCfunctions.R | no_license | thuijskens/MSc-projects | R | false | false | 4,629 | r | #####
# Helper file with functions that construct ROC curves for glm and penfit objects
#####
# Build a function that makes a ROC curve for a given model (GLM or penfit)
constructROC <- function(model, ...) {
UseMethod("constructROC", model)
}
constructROC.logistf <- function(model, test = TRUE, thr = seq(from = 0... |
read_raw_reads <- function(read_ending){
sort(list.files(raw_reads_dirs, pattern = read_ending, full.names = TRUE))
} | /R/read_raw_reads.R | no_license | ryjohnson09/SSTI090 | R | false | false | 125 | r | read_raw_reads <- function(read_ending){
sort(list.files(raw_reads_dirs, pattern = read_ending, full.names = TRUE))
} |
library(data.table)
library(dplyr)
##########Reading data from folder###################################
featureNames <- read.table("UCI HAR Dataset/features.txt")
activityLabels <- read.table("UCI HAR Dataset/activity_labels.txt", header = FALSE)
subjectTrain <- read.table("UCI HAR Dataset/train/subject_train.txt",... | /run_analysis.R | no_license | Morf883/Prjoject-4 | R | false | false | 2,599 | r | library(data.table)
library(dplyr)
##########Reading data from folder###################################
featureNames <- read.table("UCI HAR Dataset/features.txt")
activityLabels <- read.table("UCI HAR Dataset/activity_labels.txt", header = FALSE)
subjectTrain <- read.table("UCI HAR Dataset/train/subject_train.txt",... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cimp5_2041_2060_cv.R
\docType{data}
\name{cimp5_2041_2060_cv}
\alias{cimp5_2041_2060_cv}
\title{Coefficient Variation of the Mean Seafloor Climatic Data among CIMP5 Models during 2041 to 2060}
\format{
A RasterBrick object of 4 raster layers:... | /man/cimp5_2041_2060_cv.Rd | no_license | chihlinwei/SCC85 | R | false | true | 2,424 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cimp5_2041_2060_cv.R
\docType{data}
\name{cimp5_2041_2060_cv}
\alias{cimp5_2041_2060_cv}
\title{Coefficient Variation of the Mean Seafloor Climatic Data among CIMP5 Models during 2041 to 2060}
\format{
A RasterBrick object of 4 raster layers:... |
#' write_pao
#'
#' Write occupancy and climate data for program Presence
#' @param counts Data frame containing the buffered BBS counts obtained from the function `buffer_BBS()`
#' @param clim Data frame containing the annual bioclim values obtained from the function 'GetBioVars()`
#' @param alpha Four letter alpha cod... | /R/write_pao.R | no_license | SMBC-NZP/BBSclim | R | false | false | 7,453 | r | #' write_pao
#'
#' Write occupancy and climate data for program Presence
#' @param counts Data frame containing the buffered BBS counts obtained from the function `buffer_BBS()`
#' @param clim Data frame containing the annual bioclim values obtained from the function 'GetBioVars()`
#' @param alpha Four letter alpha cod... |
# read source file
d <- read.csv2("household_power_consumption.txt", na.strings = "?", sep = ";", header=T, stringsAsFactor=F)
d_subset <- subset(d, Date == "1/2/2007")
d_subset <- rbind(d_subset, subset(d, Date == "2/2/2007"))
# set datetime from date and time
d_subset$DateTime <- strptime(paste(d_subset$Date, d_subs... | /Exploratory Data Analysis/Project 1/plot2.R | no_license | marcin1213/dataScience | R | false | false | 646 | r | # read source file
d <- read.csv2("household_power_consumption.txt", na.strings = "?", sep = ";", header=T, stringsAsFactor=F)
d_subset <- subset(d, Date == "1/2/2007")
d_subset <- rbind(d_subset, subset(d, Date == "2/2/2007"))
# set datetime from date and time
d_subset$DateTime <- strptime(paste(d_subset$Date, d_subs... |
context("Prune superfluous taxonomic ranks.")
test_that("Superfluous ranks get pruned.", {
Cyperus <- subset(Easplist, TaxonName == "Cyperus", slot = "taxonNames")
expect_true(length(levels(Cyperus)) >=
length(levels(prune_levels(Cyperus))))
})
| /tests/testthat/test-prune_levels.R | no_license | ropensci/taxlist | R | false | false | 254 | r | context("Prune superfluous taxonomic ranks.")
test_that("Superfluous ranks get pruned.", {
Cyperus <- subset(Easplist, TaxonName == "Cyperus", slot = "taxonNames")
expect_true(length(levels(Cyperus)) >=
length(levels(prune_levels(Cyperus))))
})
|
# Problem on Outlier Treatment
library(readr)
# Importing dataset
boston_data <- read_csv("C:/Users/WIN10/Desktop/LEARNING/DS/DPP/datasets/boston_data.csv")
View(boston_data) #to view the data
attach(boston_data) # By attaching file there is no need to call it using $ operator every time
# Checking for NA values
... | /outlier treatment.R | no_license | priyankaankireddypalli/Data-Preprocessing | R | false | false | 8,275 | r | # Problem on Outlier Treatment
library(readr)
# Importing dataset
boston_data <- read_csv("C:/Users/WIN10/Desktop/LEARNING/DS/DPP/datasets/boston_data.csv")
View(boston_data) #to view the data
attach(boston_data) # By attaching file there is no need to call it using $ operator every time
# Checking for NA values
... |
rm(list=ls())
library(rjags)
library(jagsUI)
library(dplyr)
# Run model 8.2 in MECAL dataset
# Take only 2014-2017 to see what is the trend only when there is the 2 measures (AES and SG)
# - If include it before 2014, I am including years when abundance is high in places where there is
# no SG (because the m... | /Ch. 2-3/Ch. 3/Data/Species-specific/ALRUF/8.3. D_14-17_ALRUF500_x[dcat_area_integralBin]_sigma[obs(j,t)_covZone(j)]_lambda[alpha(j)_covZone(j)_covArea(j,t)].r | no_license | anasanz/MyScripts | R | false | false | 19,136 | r |
rm(list=ls())
library(rjags)
library(jagsUI)
library(dplyr)
# Run model 8.2 in MECAL dataset
# Take only 2014-2017 to see what is the trend only when there is the 2 measures (AES and SG)
# - If include it before 2014, I am including years when abundance is high in places where there is
# no SG (because the m... |
################# ~~~~~~~~~~~~~~~~~ ######## ~~~~~~~~~~~~~~~~~ #################
## ##
## Data Science Capstone Project 2016 ##
## ... | /server.R | no_license | teedinchai/m10_Capstone | R | false | false | 5,108 | r | ################# ~~~~~~~~~~~~~~~~~ ######## ~~~~~~~~~~~~~~~~~ #################
## ##
## Data Science Capstone Project 2016 ##
## ... |
calcTripTime <- function(data, velocity) {
#Input: Trip Data and a velocity vector
#
#Output: Trip time in seconds
#
#Find the first positive velocity
count = 1; checkZero = TRUE; indexStart = numeric()
while (count < length(velocity) & checkZero) {
checkZero = velocity[count] == 0
count = count + 1
index... | /calcTripTime.R | no_license | Lycanthrope1/tripDataAnalysis | R | false | false | 812 | r | calcTripTime <- function(data, velocity) {
#Input: Trip Data and a velocity vector
#
#Output: Trip time in seconds
#
#Find the first positive velocity
count = 1; checkZero = TRUE; indexStart = numeric()
while (count < length(velocity) & checkZero) {
checkZero = velocity[count] == 0
count = count + 1
index... |
library(gtalibrary)
library(ggplot2)
rm(list = ls())
# font_import()
loadfonts(device="postscript")
loadfonts(device="win")
setwd("C:/Users/jfrit/Desktop/Dropbox/GTA cloud")
#Settings
chapter.number=11
chapter.name="What's new"
output.path=paste("0 report production/GTA 24/tables & figures/", paste(chapter.number, ... | /code/11 - What's new/11 What's new.R | no_license | global-trade-alert/gta-24 | R | false | false | 3,366 | r | library(gtalibrary)
library(ggplot2)
rm(list = ls())
# font_import()
loadfonts(device="postscript")
loadfonts(device="win")
setwd("C:/Users/jfrit/Desktop/Dropbox/GTA cloud")
#Settings
chapter.number=11
chapter.name="What's new"
output.path=paste("0 report production/GTA 24/tables & figures/", paste(chapter.number, ... |
leadingSpPlotsCaribou <- function(years = c(2011, 2100),
pathData,
pathOutputs,
Scenarios = c("LandR_SCFM", "LandR.CS_SCFM",
"LandR_fS", "LandR.CS_fS"),
runs = paste0("run", 1:10),... | /posthocFunctions/leadingSpPlotsCaribou.R | no_license | tati-micheletti/NWT | R | false | false | 12,032 | r | leadingSpPlotsCaribou <- function(years = c(2011, 2100),
pathData,
pathOutputs,
Scenarios = c("LandR_SCFM", "LandR.CS_SCFM",
"LandR_fS", "LandR.CS_fS"),
runs = paste0("run", 1:10),... |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /_check/test_code/use/r_codes/avgEVT_education_ind_2015.R | permissive | HHS-AHRQ/MEPS-summary-tables | R | false | false | 3,422 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
library("edgeR")
library("ggplot2")
library("dplyr")
setwd("/home/yiliao/Documents/Pepper_2021/Final/3_Hicheatmaps")
distance <- read.table("All.tsv.bed.bed", header=T)
distance
distance$Tissues <- as.factor(distance$Tissues)
mydata <-distance %>% filter(Tissues=='HL2' | Tissues=='GR1' | Tissues=='TZ1' | Tissues=='YP1... | /Bin/Rscript/Figure3.r | no_license | yiliao1022/Pepper3Dgenome | R | false | false | 2,512 | r | library("edgeR")
library("ggplot2")
library("dplyr")
setwd("/home/yiliao/Documents/Pepper_2021/Final/3_Hicheatmaps")
distance <- read.table("All.tsv.bed.bed", header=T)
distance
distance$Tissues <- as.factor(distance$Tissues)
mydata <-distance %>% filter(Tissues=='HL2' | Tissues=='GR1' | Tissues=='TZ1' | Tissues=='YP1... |
##
## copied from combAna but here we're only going to use the
## lum data, ont the lum+mat included in combAna
## want to try and figure out why adding the mat makes it much
## worse
##
## perhaps need to parcoord the model design to check the "spacing" in some sense
source("~/local/include/libRbind/EmuRbind.R") # lo... | /msu-chemtreeN-analysis/exp-analysis/wave-1/comb-obs/combAnaLum.R | no_license | scottedwardpratt/stat | R | false | false | 4,137 | r | ##
## copied from combAna but here we're only going to use the
## lum data, ont the lum+mat included in combAna
## want to try and figure out why adding the mat makes it much
## worse
##
## perhaps need to parcoord the model design to check the "spacing" in some sense
source("~/local/include/libRbind/EmuRbind.R") # lo... |
#' @title EcoData - A collection of ecological datasets for teaching
#' @name EcoData
#' @author Florian Hartig
#' @docType package
#' @description A collection of ecological datasets for teaching
#' @details See index / vignette for details
#' @examples
#' vignette("EcoData", package="EcoData")
NULL
| /EcoData.Rcheck/00_pkg_src/EcoData/R/EcoData.R | no_license | EttnerAndreas/ecodata | R | false | false | 304 | r | #' @title EcoData - A collection of ecological datasets for teaching
#' @name EcoData
#' @author Florian Hartig
#' @docType package
#' @description A collection of ecological datasets for teaching
#' @details See index / vignette for details
#' @examples
#' vignette("EcoData", package="EcoData")
NULL
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_summarize_years.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{fars_summarize_years}
\usage{
fars_summarize_years(years)
}
\arguments{
\item{years}{a vector of character or numeric years}
}
\value{
a tibble
}
\descript... | /man/fars_summarize_years.Rd | no_license | leonardskynyrd/fars_package | R | false | true | 617 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_summarize_years.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{fars_summarize_years}
\usage{
fars_summarize_years(years)
}
\arguments{
\item{years}{a vector of character or numeric years}
}
\value{
a tibble
}
\descript... |
simulate_error <-
function(samplesize, errordensity)
{
if(errordensity == "normal")
{
err = rnorm(samplesize)
}
if(errordensity == "asyclaw")
{
err = simasyclaw(samplesize)
}
if(errordensity == "asydoubleclaw")
{
err = simasydoubleclaw(samplesize)
}
if(er... | /bbefkr/R/simulate_error.R | no_license | ingted/R-Examples | R | false | false | 1,375 | r | simulate_error <-
function(samplesize, errordensity)
{
if(errordensity == "normal")
{
err = rnorm(samplesize)
}
if(errordensity == "asyclaw")
{
err = simasyclaw(samplesize)
}
if(errordensity == "asydoubleclaw")
{
err = simasydoubleclaw(samplesize)
}
if(er... |
# This example shows how to use alternative/custom CDF environments
# for Affy chips (c) Leo Lahti 2009-2010
# Instructions for creating your own custom CDFs are available at
# http://masker.nci.nih.gov/ev/instructions.html
# Ready-made custom CDFs are available at
# http://brainarray.mbni.med.umich.edu/Brainarray/Da... | /R/customCDF.R | no_license | antagomir/scripts | R | false | false | 1,294 | r | # This example shows how to use alternative/custom CDF environments
# for Affy chips (c) Leo Lahti 2009-2010
# Instructions for creating your own custom CDFs are available at
# http://masker.nci.nih.gov/ev/instructions.html
# Ready-made custom CDFs are available at
# http://brainarray.mbni.med.umich.edu/Brainarray/Da... |
#SAMPLER: PERFORMING METROPOLIS-HASTINGS SAMPLING FOR A LINEAR MODEL SPECIFIED #
#OVER POINT-REFERENCED GEOSPATIAL DATA
### LAST UPDATE: 11/08/2020; Le Bao
#' Sampling Technique Using Metropolis-Hastings
#'
#' This function performs Metropolis-Hastings sampling for a linear model specified
#' over point-referenced ge... | /krige/R/metropolis.krige.R | no_license | akhikolla/InformationHouse | R | false | false | 20,423 | r | #SAMPLER: PERFORMING METROPOLIS-HASTINGS SAMPLING FOR A LINEAR MODEL SPECIFIED #
#OVER POINT-REFERENCED GEOSPATIAL DATA
### LAST UPDATE: 11/08/2020; Le Bao
#' Sampling Technique Using Metropolis-Hastings
#'
#' This function performs Metropolis-Hastings sampling for a linear model specified
#' over point-referenced ge... |
test_that("dm_from_src supports 'Pool'", {
# expect no error
conn <- pool::dbPool(RSQLite::SQLite(), "", timeout = 10)
DBI::dbWriteTable(conn, "mtcars", mtcars)
dm <- dm::dm_from_src(conn, learn_keys = FALSE)
expect_identical(names(dm), "mtcars")
})
| /tests/testthat/test-pool-support.R | permissive | brancengregory/dm | R | false | false | 260 | r | test_that("dm_from_src supports 'Pool'", {
# expect no error
conn <- pool::dbPool(RSQLite::SQLite(), "", timeout = 10)
DBI::dbWriteTable(conn, "mtcars", mtcars)
dm <- dm::dm_from_src(conn, learn_keys = FALSE)
expect_identical(names(dm), "mtcars")
})
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paramplot.OEFPIL.R
\name{paramplot.OEFPIL}
\alias{paramplot.OEFPIL}
\title{Plot parameters of an OEFPIL object}
\usage{
paramplot.OEFPIL(object)
}
\arguments{
\item{object}{an object or a \code{list} of objects of class \code{"OEFPIL"} (a res... | /man/paramplot.OEFPIL.Rd | no_license | stazam/OEFPIL- | R | false | true | 1,822 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paramplot.OEFPIL.R
\name{paramplot.OEFPIL}
\alias{paramplot.OEFPIL}
\title{Plot parameters of an OEFPIL object}
\usage{
paramplot.OEFPIL(object)
}
\arguments{
\item{object}{an object or a \code{list} of objects of class \code{"OEFPIL"} (a res... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/redshift_operations.R
\name{redshift_create_cluster_parameter_group}
\alias{redshift_create_cluster_parameter_group}
\title{Creates an Amazon Redshift parameter group}
\usage{
redshift_create_cluster_parameter_group(ParameterGroupName,
Para... | /cran/paws.database/man/redshift_create_cluster_parameter_group.Rd | permissive | johnnytommy/paws | R | false | true | 2,450 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/redshift_operations.R
\name{redshift_create_cluster_parameter_group}
\alias{redshift_create_cluster_parameter_group}
\title{Creates an Amazon Redshift parameter group}
\usage{
redshift_create_cluster_parameter_group(ParameterGroupName,
Para... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/base_data.R
\docType{data}
\name{data_mekko}
\alias{data_mekko}
\title{Random data for plotting mekko chart examples}
\format{
Dataset of 2 columns and 1000 rows
\describe{
\item{var1}{\code{character}}
\item{var2}{\code{numeric}}
}
}
\us... | /man/data_mekko.Rd | no_license | datastorm-open/rAmCharts | R | false | true | 471 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/base_data.R
\docType{data}
\name{data_mekko}
\alias{data_mekko}
\title{Random data for plotting mekko chart examples}
\format{
Dataset of 2 columns and 1000 rows
\describe{
\item{var1}{\code{character}}
\item{var2}{\code{numeric}}
}
}
\us... |
# Part of the mi package for multiple imputation of missing data
# Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Trustees of Columbia University
#
# 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 Soft... | /R/missing_variable.R | no_license | gbiele/mi | R | false | false | 6,960 | r | # Part of the mi package for multiple imputation of missing data
# Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Trustees of Columbia University
#
# 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 Soft... |
#' apply a gating method to the \code{GatingSet}
#'
#' When interacting with the existing gated data, this function provides the alternative way to interact with he GatingSet
#' by supplying the gating description directly through arguments without the need to write the compelete
#' csv gating template.
#'
#' @par... | /R/add_pop.R | no_license | biodev/openCyto | R | false | false | 3,875 | r | #' apply a gating method to the \code{GatingSet}
#'
#' When interacting with the existing gated data, this function provides the alternative way to interact with he GatingSet
#' by supplying the gating description directly through arguments without the need to write the compelete
#' csv gating template.
#'
#' @par... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/de_analysis.R
\name{get_healthy_position}
\alias{get_healthy_position}
\title{To always get the same "fold change direction" we have to set the healthy comparison as first condition
return position of comparison}
\usage{
get_healthy_position(... | /gToolbox/man/get_healthy_position.Rd | no_license | aqibrahimbt/BioMarkerAnalysis | R | false | true | 528 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/de_analysis.R
\name{get_healthy_position}
\alias{get_healthy_position}
\title{To always get the same "fold change direction" we have to set the healthy comparison as first condition
return position of comparison}
\usage{
get_healthy_position(... |
#' @title Create a Proportional Euler Diagram
#' @description Create a 2-way Proportional Euler Diagram
#' @param mytab1 First table with objects and effect sizes to compare
#' @param mytab2 Secib table with objects and effect sizes to compare
#' @param titletext Plot Title, Default: ''
#' @param legendtext Plot legend... | /R/makeEuler.R | no_license | holgerman/toolboxH | R | false | false | 4,630 | r | #' @title Create a Proportional Euler Diagram
#' @description Create a 2-way Proportional Euler Diagram
#' @param mytab1 First table with objects and effect sizes to compare
#' @param mytab2 Secib table with objects and effect sizes to compare
#' @param titletext Plot Title, Default: ''
#' @param legendtext Plot legend... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{model_log_likelihood}
\alias{model_log_likelihood}
\alias{bpr_log_likelihood}
\alias{bpr_gradient}
\alias{betareg_log_likelihood}
\alias{betareg_gradient}
\alias{sum_weighted_bpr_lik}
\alias{sum_weighted_bpr_grad}
\alias{s... | /man/model_log_likelihood.Rd | permissive | geneprophet/BSDMR | R | false | true | 1,083 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{model_log_likelihood}
\alias{model_log_likelihood}
\alias{bpr_log_likelihood}
\alias{bpr_gradient}
\alias{betareg_log_likelihood}
\alias{betareg_gradient}
\alias{sum_weighted_bpr_lik}
\alias{sum_weighted_bpr_grad}
\alias{s... |
# Exercise 4: Creating and operating on vectors
# Create a vector `names` that contains your name and the names of 2 people next to you.
names=c("Jayanth","Amogh","Somesh")
# Use the colon operator : to create a vector `n` of numbers from 10:49
n=10:49
print(n)
# Use `length()` to get the number of elements in `n`
... | /exercise-4/exercise.R | permissive | amoghdave/module7-vectors | R | false | false | 956 | r | # Exercise 4: Creating and operating on vectors
# Create a vector `names` that contains your name and the names of 2 people next to you.
names=c("Jayanth","Amogh","Somesh")
# Use the colon operator : to create a vector `n` of numbers from 10:49
n=10:49
print(n)
# Use `length()` to get the number of elements in `n`
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bgee.R
\docType{class}
\name{Bgee-class}
\alias{Bgee}
\alias{Bgee-class}
\title{Retrieving the Bgee database data}
\value{
\itemize{
\item{A \code{get_annotation()} list, lists the annotation of experiments for chosen species.}
\item{A \cod... | /2016-SIB/data/rnaseq/BgeeDB-master/man/Bgee-class.Rd | no_license | wurmlab/genomicscourse | R | false | true | 3,305 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bgee.R
\docType{class}
\name{Bgee-class}
\alias{Bgee}
\alias{Bgee-class}
\title{Retrieving the Bgee database data}
\value{
\itemize{
\item{A \code{get_annotation()} list, lists the annotation of experiments for chosen species.}
\item{A \cod... |
#' Filters loci that show significant departure from Hardy-Weinberg Equilibrium
#'
#' Calculates the probabilities of agreement with H-W equilibrium based on observed
#' frequencies of reference homozygotes, heterozygotes and alternate homozygotes.
#' Uses the exact calculations contained in function prob.hwe() as de... | /R/gl.filter.hwe.r | no_license | hakancengiz1/dartR | R | false | false | 3,461 | r | #' Filters loci that show significant departure from Hardy-Weinberg Equilibrium
#'
#' Calculates the probabilities of agreement with H-W equilibrium based on observed
#' frequencies of reference homozygotes, heterozygotes and alternate homozygotes.
#' Uses the exact calculations contained in function prob.hwe() as de... |
context("Quick tests for survey factors")
library(srvyr)
library(survey)
source("utilities.R")
data(api)
dstrata <- apistrat %>%
as_survey_design(strata = stype, weights = pw)
# One group
out_survey <- svymean(~awards, dstrata)
out_srvyr <- dstrata %>%
group_by(awards) %>%
summarize(pct = survey_mean())
test... | /tests/testthat/test_survey_mean_factor.r | no_license | tilltnet/srvyr | R | false | false | 5,219 | r | context("Quick tests for survey factors")
library(srvyr)
library(survey)
source("utilities.R")
data(api)
dstrata <- apistrat %>%
as_survey_design(strata = stype, weights = pw)
# One group
out_survey <- svymean(~awards, dstrata)
out_srvyr <- dstrata %>%
group_by(awards) %>%
summarize(pct = survey_mean())
test... |
#!/usr/bin/env Rscript
# don't run lines 3-13 if running from R workspace
args = commandArgs(trailingOnly = T)
# check if there are exactly 3 arguments. If not, return an error
if (length(args) < 3 | length(args) > 3) {
stop("Exactly three arguments must be supplied: projectDir, procDataSubdir and graphSubdir.", cal... | /analysisScripts/hiFT4a.R | permissive | arjunrajlaboratory/P3_public_analysis | R | false | false | 12,623 | r | #!/usr/bin/env Rscript
# don't run lines 3-13 if running from R workspace
args = commandArgs(trailingOnly = T)
# check if there are exactly 3 arguments. If not, return an error
if (length(args) < 3 | length(args) > 3) {
stop("Exactly three arguments must be supplied: projectDir, procDataSubdir and graphSubdir.", cal... |
tags$div(
h4("Filter Tab"),
p(
'The "Filter" tab allows the user to select a column in the',
"inventory and a feature or multiple features of that column to filter the data.",
'The filters will update data displayed in the "Map" and "Table" tabs.',
'If no filters are selected, then all the data will... | /shiny/shiny_wqdi/ui/ui_instructions.R | no_license | InterstateCommissionPotomacRiverBasin/wq_data_inventory | R | false | false | 2,758 | r | tags$div(
h4("Filter Tab"),
p(
'The "Filter" tab allows the user to select a column in the',
"inventory and a feature or multiple features of that column to filter the data.",
'The filters will update data displayed in the "Map" and "Table" tabs.',
'If no filters are selected, then all the data will... |
library(ggplot2)
library(dplyr)
df_raw <- read.csv("Desktop/git/STB_social_media_analytics/experimentation/jiaxin_experiment/descriptive_stats/2.csv")
#getting all ctrip data
#number of reviews by month
df <-df_raw[order(df_raw$REVIEW_DATE,df_raw$REVIEW_TIME),]
df$Yr_month=format(as.Date(df$REVIEW_DATE), "%Y-%m")
ov... | /experimentation/jiaxin_experiment/ctrip/codes/Gardens_by_the_bay.R | no_license | mtaziz/STB_social_media | R | false | false | 1,231 | r | library(ggplot2)
library(dplyr)
df_raw <- read.csv("Desktop/git/STB_social_media_analytics/experimentation/jiaxin_experiment/descriptive_stats/2.csv")
#getting all ctrip data
#number of reviews by month
df <-df_raw[order(df_raw$REVIEW_DATE,df_raw$REVIEW_TIME),]
df$Yr_month=format(as.Date(df$REVIEW_DATE), "%Y-%m")
ov... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper_functions.R
\name{parse_match}
\alias{parse_match}
\title{parse_match}
\usage{
parse_match(x)
}
\arguments{
\item{x}{[\code{list(2L)}]\cr}
}
\value{
list of two data.frames (matches & goals)
}
\description{
MISSING
}
| /man/parse_match.Rd | no_license | sfohr/openligadbR | R | false | true | 302 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper_functions.R
\name{parse_match}
\alias{parse_match}
\title{parse_match}
\usage{
parse_match(x)
}
\arguments{
\item{x}{[\code{list(2L)}]\cr}
}
\value{
list of two data.frames (matches & goals)
}
\description{
MISSING
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update_score.R
\name{update_score}
\alias{update_score}
\title{Update Score with Advantage Final Set}
\usage{
update_score(pointa, pointb, gamea, gameb, seta, setb, bestof3 = T)
}
\arguments{
\item{bestof3}{Logical indicator if best-of-3 matc... | /man/update_score.Rd | no_license | jotremblay/inmatch_api | R | false | true | 861 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update_score.R
\name{update_score}
\alias{update_score}
\title{Update Score with Advantage Final Set}
\usage{
update_score(pointa, pointb, gamea, gameb, seta, setb, bestof3 = T)
}
\arguments{
\item{bestof3}{Logical indicator if best-of-3 matc... |
library(readr)
library(dplyr)
library(magrittr)
library(leaps)
library(lars)
library(caret)
library(ROCR)
library(rpart)
library(randomForest)
library(pROC)
library(e1071)
HR_comma_sep <- read.csv("C:/Users/vasir/Downloads/HR_comma_sep.csv")
HR_comma_sep<-data.frame(HR_comma_sep)
#2.Renaming the variab... | /Project.R | no_license | nivimerla/HR_analytics | R | false | false | 10,503 | r | library(readr)
library(dplyr)
library(magrittr)
library(leaps)
library(lars)
library(caret)
library(ROCR)
library(rpart)
library(randomForest)
library(pROC)
library(e1071)
HR_comma_sep <- read.csv("C:/Users/vasir/Downloads/HR_comma_sep.csv")
HR_comma_sep<-data.frame(HR_comma_sep)
#2.Renaming the variab... |
# Chapter 6
# Example 6.16 page no. 192 from the pdf..
# Normal Approximation To the Binomial..
# to find the prob. that sheer guesswork yields from 25 to 30 correct answer for 80 of the 200
# problem about which student has no knowledge..
# since the sample size is large we can do normal approx.
p <- 0.... | /Probability_And_Statistics_For_Engineers_And_Scientists_by_Ronald_E._Walpole,_Raymond_H._Myers,_Sharon_L._Myers,_Keying_Ye/CH6/EX6.16/Ex6_16.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 589 | r |
# Chapter 6
# Example 6.16 page no. 192 from the pdf..
# Normal Approximation To the Binomial..
# to find the prob. that sheer guesswork yields from 25 to 30 correct answer for 80 of the 200
# problem about which student has no knowledge..
# since the sample size is large we can do normal approx.
p <- 0.... |
/cachematrix.R | no_license | TUrurahy/Assignment-Programming-Assignment-2-Lexical-Scoping | R | false | false | 1,926 | r | ||
\name{apci_spectrum}
\alias{apci_spectrum}
\docType{data}
\title{
apci_spectrum
}
\description{
Example spectrum of Glutamic acid (3TMS) measured on a Bruker impact II.
}
\usage{data("apci_spectrum")}
\format{
A data frame with 47 observations on the following 2 variables.
\describe{
\item{\code{mz... | /man/apci_spectrum.Rd | no_license | MetabolomicsHK/InterpretMSSpectrum | R | false | false | 511 | rd | \name{apci_spectrum}
\alias{apci_spectrum}
\docType{data}
\title{
apci_spectrum
}
\description{
Example spectrum of Glutamic acid (3TMS) measured on a Bruker impact II.
}
\usage{data("apci_spectrum")}
\format{
A data frame with 47 observations on the following 2 variables.
\describe{
\item{\code{mz... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/p1neurons-data.R
\docType{data}
\name{p1s}
\alias{p1s}
\title{List of 143 traced P1 neurons from Chiang et al 2011 as neuron objects}
\description{
This R list (which has additional class \code{neuronlist}) contains 143
traced \emph{D... | /man/p1s.Rd | no_license | jefferis/p1neurons | R | false | false | 1,609 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/p1neurons-data.R
\docType{data}
\name{p1s}
\alias{p1s}
\title{List of 143 traced P1 neurons from Chiang et al 2011 as neuron objects}
\description{
This R list (which has additional class \code{neuronlist}) contains 143
traced \emph{D... |
library(rJava)
if("memoise" %in% installed.packages("memoise") == FALSE)install.packages("memoise")
library(memoise)
if("KoNLP" %in% installed.packages("KoNLP") == FALSE)install.packages("KoNLP")
library(KoNLP)
if("tm" %in% installed.packages("tm") == FALSE)install.packages("tm")
library(tm)
if("wordcloud" %in% install... | /TM03.R | no_license | Arahansproject/Data_R_180929 | R | false | false | 2,762 | r | library(rJava)
if("memoise" %in% installed.packages("memoise") == FALSE)install.packages("memoise")
library(memoise)
if("KoNLP" %in% installed.packages("KoNLP") == FALSE)install.packages("KoNLP")
library(KoNLP)
if("tm" %in% installed.packages("tm") == FALSE)install.packages("tm")
library(tm)
if("wordcloud" %in% install... |
svg(paste(resultDir, '/context_detection_result.svg', sep='') ,width=6, height=3.5, bg=bg, family = family)
dp <- subset(devices_filtered_pre_context, device == 'phone')
dt <- subset(devices_filtered_pre_context, device == 'tablet')
plotData <- data.frame("data" = c(
nrow(subset(dp, dp$homeContextsWifi > 0)) / nrow... | /r/output/contextPlot.R | no_license | hintzed/mobile-device-usage-processing | R | false | false | 2,380 | r | svg(paste(resultDir, '/context_detection_result.svg', sep='') ,width=6, height=3.5, bg=bg, family = family)
dp <- subset(devices_filtered_pre_context, device == 'phone')
dt <- subset(devices_filtered_pre_context, device == 'tablet')
plotData <- data.frame("data" = c(
nrow(subset(dp, dp$homeContextsWifi > 0)) / nrow... |
features <- read.table("UCI HAR Dataset/features.txt", col.names = c("n","functions"))
subject_test <- read.table("UCI HAR Dataset/test/subject_test.txt", col.names = "subject")
x_test <- read.table("UCI HAR Dataset/test/X_test.txt", col.names = features$functions)
y_test <- read.table("UCI HAR Dataset/test/y_test.t... | /run_analysis.R | no_license | KamranAghayev/Getting-and-Cleaning-Data-Week | R | false | false | 1,733 | r | features <- read.table("UCI HAR Dataset/features.txt", col.names = c("n","functions"))
subject_test <- read.table("UCI HAR Dataset/test/subject_test.txt", col.names = "subject")
x_test <- read.table("UCI HAR Dataset/test/X_test.txt", col.names = features$functions)
y_test <- read.table("UCI HAR Dataset/test/y_test.t... |
#Boxplots A vs Z, after removing SBG
#Clear all states
rm(list=ls(all=TRUE))
dev.off()
############### Paths and folders
### Folder containind expression data before removing SBG
folder_1 <- "/crex/proj/uppstore2017185/b2014034_nobackup/Luis/3_DosageCompensation_LS/03_Normalized_libs"
### Folder containind exp... | /16A_boxplots_a_vs_z_after_removing_SBG.R | no_license | LLN273/Dosage_compensation_Lsinapis | R | false | false | 7,391 | r | #Boxplots A vs Z, after removing SBG
#Clear all states
rm(list=ls(all=TRUE))
dev.off()
############### Paths and folders
### Folder containind expression data before removing SBG
folder_1 <- "/crex/proj/uppstore2017185/b2014034_nobackup/Luis/3_DosageCompensation_LS/03_Normalized_libs"
### Folder containind exp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/process_ALDEx2.R
\name{process_ALDEx2}
\alias{process_ALDEx2}
\title{Process the DAF analysis through the ALDEx2 package}
\usage{
process_ALDEx2(data, ...)
}
\arguments{
\item{data}{the ouput of the \code{\link{build_DAF_data}} funct... | /man/process_ALDEx2.Rd | no_license | leonarDubois/metaDAF | R | false | true | 540 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/process_ALDEx2.R
\name{process_ALDEx2}
\alias{process_ALDEx2}
\title{Process the DAF analysis through the ALDEx2 package}
\usage{
process_ALDEx2(data, ...)
}
\arguments{
\item{data}{the ouput of the \code{\link{build_DAF_data}} funct... |
test_that("strings with varying widths", {
local_options(width = 80)
# Generated by data-raw/create-chr-tests.R
expect_snapshot({ options(width = 54); ctl_colonnade(df_str[c(28L, 34L, 16L, 29L, 47L, 25L, 42L, 27L, 44L, 20L, 14L, 36L, 43L, 41L, 26L, 45L, 22L, 9L, 13L, 32L, 31L, 12L, 19L, 48L, 49L, 35L, 3L, 11L, 2... | /tests/testthat/test-ctl_colonnade_2.R | permissive | Tubbz-alt/pillar | R | false | false | 4,972 | r | test_that("strings with varying widths", {
local_options(width = 80)
# Generated by data-raw/create-chr-tests.R
expect_snapshot({ options(width = 54); ctl_colonnade(df_str[c(28L, 34L, 16L, 29L, 47L, 25L, 42L, 27L, 44L, 20L, 14L, 36L, 43L, 41L, 26L, 45L, 22L, 9L, 13L, 32L, 31L, 12L, 19L, 48L, 49L, 35L, 3L, 11L, 2... |
setwd("C:\\Users\\Gemma\\Documents\\ExploratoryDataAnalysis")
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Across the United States, how have emissions from coal combustion-related sources changed
#from 1999-2008?
EISectorCoal <- grep("coal",SCC$EI.Sector, ignore.case = TR... | /Plot4.R | no_license | GARGVI/ExploratoryDataAnalysisProject2 | R | false | false | 965 | r | setwd("C:\\Users\\Gemma\\Documents\\ExploratoryDataAnalysis")
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Across the United States, how have emissions from coal combustion-related sources changed
#from 1999-2008?
EISectorCoal <- grep("coal",SCC$EI.Sector, ignore.case = TR... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.guardduty_operations.R
\name{list_filters}
\alias{list_filters}
\title{Returns a paginated list of the current filters}
\usage{
list_filters(DetectorId, MaxResults = NULL, NextToken = NULL)
}
\arguments{
\item{DetectorId}{[required] The ... | /service/paws.guardduty/man/list_filters.Rd | permissive | CR-Mercado/paws | R | false | true | 1,000 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.guardduty_operations.R
\name{list_filters}
\alias{list_filters}
\title{Returns a paginated list of the current filters}
\usage{
list_filters(DetectorId, MaxResults = NULL, NextToken = NULL)
}
\arguments{
\item{DetectorId}{[required] The ... |
library(igraph)
num = 1000
iteration = 50
p1 = 0.01
d1 = numeric()
count1 = numeric()
p2 = 0.05
d2 = numeric()
count2 = numeric()
p3 = 0.1
d3 = numeric()
count3 = numeric()
for (i in 1:iteration) {
g1 = random.graph.game(num, p1, directed = FALSE)
d1 = c(d1, diameter(g1))
count1 = c(count1, as.integer(is.connecte... | /HWK1/1_b.R | no_license | realmichaelzyy/Graphs_and_Network_Flows | R | false | false | 704 | r | library(igraph)
num = 1000
iteration = 50
p1 = 0.01
d1 = numeric()
count1 = numeric()
p2 = 0.05
d2 = numeric()
count2 = numeric()
p3 = 0.1
d3 = numeric()
count3 = numeric()
for (i in 1:iteration) {
g1 = random.graph.game(num, p1, directed = FALSE)
d1 = c(d1, diameter(g1))
count1 = c(count1, as.integer(is.connecte... |
\name{getLayoutNameMapping}
\alias{getLayoutNameMapping}
\alias{getLayoutNameMapping,CytoscapeConnectionClass-method}
\title{getLayoutNameMapping}
\description{
The Cytoscape 'Layout' menu lists many layout algorithms, but the
names presented there are different from the names by which these
algorithms are known to lay... | /man/getLayoutNameMapping.Rd | no_license | sebastianrossel/Bioconductor_RCy3_the_new_RCytoscape | R | false | false | 1,330 | rd | \name{getLayoutNameMapping}
\alias{getLayoutNameMapping}
\alias{getLayoutNameMapping,CytoscapeConnectionClass-method}
\title{getLayoutNameMapping}
\description{
The Cytoscape 'Layout' menu lists many layout algorithms, but the
names presented there are different from the names by which these
algorithms are known to lay... |
# |----------------------------------------------------------------------------------|
# | Project: ICD-9 Shiny App |
# | Script: ICD-9 Shiny App |
# | Authors: Davit Sargsyan ... | /app.R | no_license | CVIRU/shiny.icd | R | false | false | 17,742 | r | # |----------------------------------------------------------------------------------|
# | Project: ICD-9 Shiny App |
# | Script: ICD-9 Shiny App |
# | Authors: Davit Sargsyan ... |
set.seed(355)
library(caret); library(ggplot2); library(RANN); library(klaR)
setwd("D:/Coursera/MLFirst")
testing3<- read.csv("pml-testing.csv", na.strings=c("NA","#DIV/0!", ""))
training3<- read.csv("pml-training.csv", na.strings=c("NA","#DIV/0!", ""))
training3<-training3[ , apply( training3, 2, function(x) !any(is.n... | /Wearable.R | no_license | Peyman-Heidari/WearableML | R | false | false | 1,764 | r | set.seed(355)
library(caret); library(ggplot2); library(RANN); library(klaR)
setwd("D:/Coursera/MLFirst")
testing3<- read.csv("pml-testing.csv", na.strings=c("NA","#DIV/0!", ""))
training3<- read.csv("pml-training.csv", na.strings=c("NA","#DIV/0!", ""))
training3<-training3[ , apply( training3, 2, function(x) !any(is.n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_csvy.R
\name{extract_colclasses}
\alias{extract_colclasses}
\title{Extract column classes from metadata}
\usage{
extract_colclasses(meta_data, verbose = TRUE)
}
\arguments{
\item{meta_data}{Named list of metadata values returned by
\link... | /man/extract_colclasses.Rd | no_license | ashiklom/metar | R | false | true | 593 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_csvy.R
\name{extract_colclasses}
\alias{extract_colclasses}
\title{Extract column classes from metadata}
\usage{
extract_colclasses(meta_data, verbose = TRUE)
}
\arguments{
\item{meta_data}{Named list of metadata values returned by
\link... |
library(dementiaSunday2)
# Optional: specify where the temporary files (used by the ff package) will be created:
options(fftempdir = "s:/FFtemp")
# Maximum number of cores to be used:
maxCores <- parallel::detectCores()
# The folder where the study intermediate and result files will be written:
outputFolder <- "s:/d... | /OhdsiDataThonKorea2019/Studies/dementiaSunday2/extras/CodeToRun.R | permissive | ohdsi-korea/OhdsiKoreaTutorials | R | false | false | 2,937 | r | library(dementiaSunday2)
# Optional: specify where the temporary files (used by the ff package) will be created:
options(fftempdir = "s:/FFtemp")
# Maximum number of cores to be used:
maxCores <- parallel::detectCores()
# The folder where the study intermediate and result files will be written:
outputFolder <- "s:/d... |
#=====================================================================
# Filename: crossValGam_v1.R
# Objective: Build and score a gam using n-fold cross-validation
# Date: 2013-09-10
# Version: v1
# Depends: gam
# Author: Madhav Kumar
#
#
# Inputs: 01. Formula
# 02.... | /crossValGam_v1.R | no_license | madhavkumar2005/cross-validation | R | false | false | 4,819 | r |
#=====================================================================
# Filename: crossValGam_v1.R
# Objective: Build and score a gam using n-fold cross-validation
# Date: 2013-09-10
# Version: v1
# Depends: gam
# Author: Madhav Kumar
#
#
# Inputs: 01. Formula
# 02.... |
#Load Required Libraries
library(plyr)
#I had issues dowloading the .zip file wihout this.
library(RCurl)
#R will need write right to the current directory
filename <- "getdata_dataset.zip"
#Check if file exists, if not download it and unzip it
if (!file.exists(filename)){
download.file("http://d396qusza4... | /run_analysis.R | no_license | akitbalian/Coursera-Getting-and-Cleaning-Data-Course-Project | R | false | false | 2,381 | r | #Load Required Libraries
library(plyr)
#I had issues dowloading the .zip file wihout this.
library(RCurl)
#R will need write right to the current directory
filename <- "getdata_dataset.zip"
#Check if file exists, if not download it and unzip it
if (!file.exists(filename)){
download.file("http://d396qusza4... |
#' @description Generates multivariate mixed normal random variables
#' @export
#' @title rmvnmix
#' @name rmvnmix
#' @param n The number of observations
#' @param alpha m by 1 vector that represents proportions of components
#' @param mu d by m matrix that represents mu
#' @param sigma d by d*m matrix that represents ... | /R/mvn_methods.R | no_license | chiyahn/mvnMix | R | false | false | 1,317 | r | #' @description Generates multivariate mixed normal random variables
#' @export
#' @title rmvnmix
#' @name rmvnmix
#' @param n The number of observations
#' @param alpha m by 1 vector that represents proportions of components
#' @param mu d by m matrix that represents mu
#' @param sigma d by d*m matrix that represents ... |
rm(list = ls())
#add all packages
library(lme4)
library(reshape)
library(foreign)
library(ggplot2)
library(plyr)
library(data.table)
library(reshape2)
library(Hmisc)
library(mgcv)
library(gdata)
library(car)
library(dplyr)
library(ggmap)
library(broom)
library(splines)
library(DataCombine)
library(splines)
library(da... | /Archive/check_mod1_calibration.R | no_license | alexandrashtein/Model-code | R | false | false | 6,656 | r |
rm(list = ls())
#add all packages
library(lme4)
library(reshape)
library(foreign)
library(ggplot2)
library(plyr)
library(data.table)
library(reshape2)
library(Hmisc)
library(mgcv)
library(gdata)
library(car)
library(dplyr)
library(ggmap)
library(broom)
library(splines)
library(DataCombine)
library(splines)
library(da... |
#Construction of PNG Plot4 for House hold energy consumption
datafile <- "./household_power_consumption.txt"
power_data <- read.table(datafile, header=TRUE, sep=";")
subset_data <- power_data[power_data$Date %in% c("1/2/2007","2/2/2007") ,]
datetime <- strptime(paste(subset_data$Date, subset_data$Time, sep=... | /plot4.R | no_license | siddu138/Exp_Data | R | false | false | 1,341 | r | #Construction of PNG Plot4 for House hold energy consumption
datafile <- "./household_power_consumption.txt"
power_data <- read.table(datafile, header=TRUE, sep=";")
subset_data <- power_data[power_data$Date %in% c("1/2/2007","2/2/2007") ,]
datetime <- strptime(paste(subset_data$Date, subset_data$Time, sep=... |
# # The purpose of this script is to create a data object (dto) which will hold all data and metadata.
# # Run the lines below to stitch a basic html output.
# knitr::stitch_rmd(
# script="./manipulation/map2016/Level1_models_full_workingmem.R",
# output="./manipulation/map2016/output/level1_models_wm_full.md"
# )
... | /manipulation/map2016/archived/5-models.R | no_license | beccav8/psy564_longitudinal_models | R | false | false | 7,659 | r | # # The purpose of this script is to create a data object (dto) which will hold all data and metadata.
# # Run the lines below to stitch a basic html output.
# knitr::stitch_rmd(
# script="./manipulation/map2016/Level1_models_full_workingmem.R",
# output="./manipulation/map2016/output/level1_models_wm_full.md"
# )
... |
#
source("textFunctions.R")
source("TopicFunctions.R")
#Specify Working Folder
getwd()
workingfolder<-"../Ag.Nutrition.Grants"
messages<-readMails("../Fullset/Fullset_Demo","../mails")
table(reader::get.ext(list.files("../Fullset/Fullset_Demo")))
#removed .bmp and .db files manually
filelist<-list.files("../Fullset/... | /working/new_topic_script.R | permissive | ryscott5/eparTextTools | R | false | false | 18,044 | r | #
source("textFunctions.R")
source("TopicFunctions.R")
#Specify Working Folder
getwd()
workingfolder<-"../Ag.Nutrition.Grants"
messages<-readMails("../Fullset/Fullset_Demo","../mails")
table(reader::get.ext(list.files("../Fullset/Fullset_Demo")))
#removed .bmp and .db files manually
filelist<-list.files("../Fullset/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{is.POSIX}
\alias{is.POSIX}
\title{Srhoads wrote this to allow you to...}
\usage{
is.POSIX(v)
}
\description{
Srhoads wrote this to allow you to...
}
\examples{
is.POSIX(v)
}
| /man/is.POSIX.Rd | no_license | srhoads/srhoads | R | false | true | 270 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{is.POSIX}
\alias{is.POSIX}
\title{Srhoads wrote this to allow you to...}
\usage{
is.POSIX(v)
}
\description{
Srhoads wrote this to allow you to...
}
\examples{
is.POSIX(v)
}
|
test_that("tf_graph_new() works", {
expect_s3_class(tf_graph_new(), "tf_graph")
})
test_that("tf_graph_list_operations() works", {
expect_identical(
tf_graph_list_operations(tf_graph_new()),
data.frame(
name = character(),
op_type = character(),
device = character(),
num_inputs = i... | /tests/testthat/test-tf-graph.R | permissive | paleolimbot/tf | R | false | false | 1,045 | r |
test_that("tf_graph_new() works", {
expect_s3_class(tf_graph_new(), "tf_graph")
})
test_that("tf_graph_list_operations() works", {
expect_identical(
tf_graph_list_operations(tf_graph_new()),
data.frame(
name = character(),
op_type = character(),
device = character(),
num_inputs = i... |
library(car)
model = lm(dist ~ speed, data = cars)
sSq = sum(model$residuals^2)/model$df.residual
p = 2
newdata = data.frame(speed=cars$speed)
yhat = predict(object = model, newdata = newdata)
cooksD = cooks.distance(model = model)
n = dim(cars)[1]
cooksD1 = vector(mode = 'numeric', length = n)
df_mini = data.frame(... | /CooksDistance.R | no_license | doobops/Machine-Learning-in-R | R | false | false | 589 | r |
library(car)
model = lm(dist ~ speed, data = cars)
sSq = sum(model$residuals^2)/model$df.residual
p = 2
newdata = data.frame(speed=cars$speed)
yhat = predict(object = model, newdata = newdata)
cooksD = cooks.distance(model = model)
n = dim(cars)[1]
cooksD1 = vector(mode = 'numeric', length = n)
df_mini = data.frame(... |
xvals <- 1:100
yvals <- rnorm(100)
data <- data.frame(xvals,yvals)
library(manipulate)
library(ggplot2)
manipulate({
#define plotting function
ggplot(data,aes(xvals,yvals)) +
geom_smooth(method="loess",span=span.val) +
browser()
geom_point()},
#define variable that will be changed in plo... | /testMan.R | no_license | saminehbagheri/SOCU | R | false | false | 350 | r | xvals <- 1:100
yvals <- rnorm(100)
data <- data.frame(xvals,yvals)
library(manipulate)
library(ggplot2)
manipulate({
#define plotting function
ggplot(data,aes(xvals,yvals)) +
geom_smooth(method="loess",span=span.val) +
browser()
geom_point()},
#define variable that will be changed in plo... |
# 01_read_data
## Reads data and reshapes into various arrays for JAGS analysis
## Later in program selects which trials to include for main and sensitivity analyses
## based on whether data_choose is specified
# Packages ----
library(dplyr)
library(reshape2)
library(glmmBUGS)
# Source functions (for all th... | /scripts/01_read_data.R | no_license | dmcalli2/gender_dapt_manuscript | R | false | false | 6,778 | r | # 01_read_data
## Reads data and reshapes into various arrays for JAGS analysis
## Later in program selects which trials to include for main and sensitivity analyses
## based on whether data_choose is specified
# Packages ----
library(dplyr)
library(reshape2)
library(glmmBUGS)
# Source functions (for all th... |
test_that("rename returns an error on duplicated names", {
expect_error(rename(c(letters[1:4],"a()","a["), check_dup = TRUE), fixed = TRUE,
paste("Internal renaming of variables led to duplicated names.",
"\nOccured for variables: a, a(), a["))
expect_error(rename(c("aDb","a... | /brms/tests/testthat/tests.rename.R | no_license | ingted/R-Examples | R | false | false | 4,455 | r | test_that("rename returns an error on duplicated names", {
expect_error(rename(c(letters[1:4],"a()","a["), check_dup = TRUE), fixed = TRUE,
paste("Internal renaming of variables led to duplicated names.",
"\nOccured for variables: a, a(), a["))
expect_error(rename(c("aDb","a... |
#' Find Duplicated Words in a Text String
#'
#' Find duplicated word/word chunks in a string. Intended for internal use.
#' @param string A character string.
#' @param threshold An integer of the minimal number of repeats.
#' @return Returns a vector of all duplicated words/chunks.
#' @export
#' @examples
#' \dontrun... | /R/duplicates.R | no_license | abresler/qdap | R | false | false | 616 | r | #' Find Duplicated Words in a Text String
#'
#' Find duplicated word/word chunks in a string. Intended for internal use.
#' @param string A character string.
#' @param threshold An integer of the minimal number of repeats.
#' @return Returns a vector of all duplicated words/chunks.
#' @export
#' @examples
#' \dontrun... |
source('pval_correction.R')
ParsePASCALFilePermuted <- function(resultPaths,clusterPaths,appendInfo=T,empirical){
#Load all PASCAL results
studyNames <- sapply(resultPaths,function(x){
splitStr <- unlist(strsplit(x,'/'));
fileName <- splitStr[length(splitStr)];
fileNameSplit <- unlist(strsplit(f... | /PASCAL/analyze_PASCAL_output_permuted.R | no_license | zmx21/GSK_NI | R | false | false | 5,297 | r | source('pval_correction.R')
ParsePASCALFilePermuted <- function(resultPaths,clusterPaths,appendInfo=T,empirical){
#Load all PASCAL results
studyNames <- sapply(resultPaths,function(x){
splitStr <- unlist(strsplit(x,'/'));
fileName <- splitStr[length(splitStr)];
fileNameSplit <- unlist(strsplit(f... |
# Extended data set from Thompson (1990)
# -------------------------
# Function mainACS
# --------------------
mainACS <- function(first.sample=c(0,2),choose20=T){
yi <- c(1,0,20,2,10,1000)
N <- length(yi)
n <- 2
pri <- n/N
idx_F <- yi
idx_omega <- yi
# Strategy with B
edgeik <- data.frame... | /ISI2021_PS_Day1/Day1_PS_ACS_R-codes.R | no_license | moguzalper/Graph_Sampling_ISI2021 | R | false | false | 4,719 | r | # Extended data set from Thompson (1990)
# -------------------------
# Function mainACS
# --------------------
mainACS <- function(first.sample=c(0,2),choose20=T){
yi <- c(1,0,20,2,10,1000)
N <- length(yi)
n <- 2
pri <- n/N
idx_F <- yi
idx_omega <- yi
# Strategy with B
edgeik <- data.frame... |
#' exp.fit.all.log.lin
#'
#' Function takes a list of calcium imaging files by filenames in the current working directory (.mat files)
#' and performs a simple exponential regression fit to normalize the deltaF/F signal. This function incorporates a linear
#' to account for gradual rise in signal, which can alter the s... | /R/exp.fit.all.log.lin.R | no_license | aphilbrook/MF.matR | R | false | false | 3,617 | r | #' exp.fit.all.log.lin
#'
#' Function takes a list of calcium imaging files by filenames in the current working directory (.mat files)
#' and performs a simple exponential regression fit to normalize the deltaF/F signal. This function incorporates a linear
#' to account for gradual rise in signal, which can alter the s... |
" posterior distribution:
p(μ,σ^2∣yi) ∝ p(yi|μ,σ^2).p(μ).p(σ^2)
Likelihood:
p(yi|μ,σ^2) iid~ N(μ,σ^2) ; i = 1,...,n
Here, we consider both mean and variance to be unknown.
In Gibbs sampling, the values for both will be simulated and used as inputs for generating
full conditionals of each other.
P... | /5_gibbs.R | no_license | udbj/UCSC-Bayesian-Statistics-II | R | false | false | 4,191 | r | " posterior distribution:
p(μ,σ^2∣yi) ∝ p(yi|μ,σ^2).p(μ).p(σ^2)
Likelihood:
p(yi|μ,σ^2) iid~ N(μ,σ^2) ; i = 1,...,n
Here, we consider both mean and variance to be unknown.
In Gibbs sampling, the values for both will be simulated and used as inputs for generating
full conditionals of each other.
P... |
# originally by Ruben Garrido-Oter
# garridoo@mpipz.mpg.de
# cleanup
rm(list=ls())
# SynCom flask dataset
source("load_data_SC_comp_flowpot.R")
# subset samples of interest
idx <- design$system %in% c("FP", "FPL") &
# design$condition %in% c("At+Full", "C+Full", "Full", "Full_MS", "Full_TP") &
desi... | /scripts/diversity_SC_comp_flowpot.R | no_license | garridoo/crsphere | R | false | false | 6,253 | r |
# originally by Ruben Garrido-Oter
# garridoo@mpipz.mpg.de
# cleanup
rm(list=ls())
# SynCom flask dataset
source("load_data_SC_comp_flowpot.R")
# subset samples of interest
idx <- design$system %in% c("FP", "FPL") &
# design$condition %in% c("At+Full", "C+Full", "Full", "Full_MS", "Full_TP") &
desi... |
`ensemble.zones` <- function(
presence.raster=NULL, centroid.object=NULL, x=NULL, ext=NULL,
RASTER.species.name=centroid.object$name, RASTER.stack.name = x@title,
RASTER.format="GTiff", RASTER.datatype="INT2S", RASTER.NAflag=-32767,
# KML.out=FALSE, KML.maxpixels=100000, KML.blur=10,
CATCH.OFF=FALSE
... | /R/ensemble.zones.R | no_license | cran/BiodiversityR | R | false | false | 5,346 | r | `ensemble.zones` <- function(
presence.raster=NULL, centroid.object=NULL, x=NULL, ext=NULL,
RASTER.species.name=centroid.object$name, RASTER.stack.name = x@title,
RASTER.format="GTiff", RASTER.datatype="INT2S", RASTER.NAflag=-32767,
# KML.out=FALSE, KML.maxpixels=100000, KML.blur=10,
CATCH.OFF=FALSE
... |
# first we might need to install a couple packages
if(! is.element("rgl", installed.packages()[,1]))
install.packages("rgl")
if(! is.element("ca", installed.packages()[,1]))
install.packages("ca")
library(ca)
# Get the Data
x = read.table("/research/projects/Sponges/Molecuclar_clock/2012_analysis/support_files/71tax... | /R_skripts/coa.r | no_license | dlavrov/my-scripts | R | false | false | 2,193 | r | # first we might need to install a couple packages
if(! is.element("rgl", installed.packages()[,1]))
install.packages("rgl")
if(! is.element("ca", installed.packages()[,1]))
install.packages("ca")
library(ca)
# Get the Data
x = read.table("/research/projects/Sponges/Molecuclar_clock/2012_analysis/support_files/71tax... |
#' Vaal River Annual Flow Data
#'
#' @description The annual flow data of Vaal River at Standerton as given by Table 1.1 of Linhart and Zucchini
#' (1986) give the flow in millions of cubic metres.
#'
#' @docType data
#' @keywords datasets
#' @name Vaal.Flow
#' @usage data(Vaal.Flow)
#' @format The format i... | /R/Vaal-Flow.r | no_license | cran/mable | R | false | false | 639 | r | #' Vaal River Annual Flow Data
#'
#' @description The annual flow data of Vaal River at Standerton as given by Table 1.1 of Linhart and Zucchini
#' (1986) give the flow in millions of cubic metres.
#'
#' @docType data
#' @keywords datasets
#' @name Vaal.Flow
#' @usage data(Vaal.Flow)
#' @format The format i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.