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 |
|---|---|---|---|---|---|---|---|---|---|
# Download the data
dataset_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
if(!file.exists("power.zip")){download.file(dataset_url,"power.zip")}
if(!file.exists("power")){unzip("power.zip",exdir="power")}
# Use data.table package to read the data
library(data.table... | /plot3.R | no_license | ngkimfong/ExData_Plotting1 | R | false | false | 1,604 | r | # Download the data
dataset_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
if(!file.exists("power.zip")){download.file(dataset_url,"power.zip")}
if(!file.exists("power")){unzip("power.zip",exdir="power")}
# Use data.table package to read the data
library(data.table... |
library('recount') # to process gene expression
colDataRse=colData(rse_gene) # rse_gene_breast.Rdata
setwd('/Users/mab8354/granddb/static/data')
databreast=read.csv('metadata_breast_01232021.csv')
a=databreast['gdc_cases.samples.portions.analytes.aliquots.submitter_id']
b=colDataRse@listData$gdc_cases.samples.portio... | /src/builddbDf/cancer/addPhenoVar.r | no_license | QuackenbushLab/grand | R | false | false | 831 | r | library('recount') # to process gene expression
colDataRse=colData(rse_gene) # rse_gene_breast.Rdata
setwd('/Users/mab8354/granddb/static/data')
databreast=read.csv('metadata_breast_01232021.csv')
a=databreast['gdc_cases.samples.portions.analytes.aliquots.submitter_id']
b=colDataRse@listData$gdc_cases.samples.portio... |
sink("reproIfeoma.txt")
.timeStart <- Sys.time()
path <- "/home/exacloud/lustre1/users/chanb"
f <- grep("episodes.*201[0-3]\\.txt", list.files(path), ignore.case=TRUE, value=TRUE)
f <- file.path(path, f)
file.info(f)[c("size", "mtime")]
library(data.table)
varnames <- names(fread(f[1], nrows=0))
names(varnames) <- 1:... | /ParallelizedFread/reproIfeoma.R | permissive | benjamin-chan/ExacloudPractice | R | false | false | 1,942 | r | sink("reproIfeoma.txt")
.timeStart <- Sys.time()
path <- "/home/exacloud/lustre1/users/chanb"
f <- grep("episodes.*201[0-3]\\.txt", list.files(path), ignore.case=TRUE, value=TRUE)
f <- file.path(path, f)
file.info(f)[c("size", "mtime")]
library(data.table)
varnames <- names(fread(f[1], nrows=0))
names(varnames) <- 1:... |
library(hutils)
### Name: longest_affix
### Title: Longest common prefix/suffix
### Aliases: longest_affix trim_common_affixes longest_suffix
### longest_prefix
### ** Examples
longest_prefix(c("totalx", "totaly", "totalz"))
longest_suffix(c("ztotal", "ytotal", "xtotal"))
| /data/genthat_extracted_code/hutils/examples/longest_affix.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 282 | r | library(hutils)
### Name: longest_affix
### Title: Longest common prefix/suffix
### Aliases: longest_affix trim_common_affixes longest_suffix
### longest_prefix
### ** Examples
longest_prefix(c("totalx", "totaly", "totalz"))
longest_suffix(c("ztotal", "ytotal", "xtotal"))
|
#' Only emergency admissions
#'
#' Keeps only emergency admissions in the sample
#' @param study.sample Data frame. The study sample. No default.
#' @param admission.type.variable.name Character vector of length 1. The name of
#' the admission type variable. Defaults to "ad_type".
#' @param emergency.value Characte... | /R/OnlyEmergencyAdmissions.R | permissive | martingerdin/bengaltiger | R | false | false | 2,530 | r | #' Only emergency admissions
#'
#' Keeps only emergency admissions in the sample
#' @param study.sample Data frame. The study sample. No default.
#' @param admission.type.variable.name Character vector of length 1. The name of
#' the admission type variable. Defaults to "ad_type".
#' @param emergency.value Characte... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geer.R
\docType{data}
\name{aids}
\alias{aids}
\title{Aids Data}
\format{A data frame with 2376 rows and 8 variables}
\usage{
data(aids)
}
\description{
The aids dataset comprises a total of 2376 CD4+ cell counts for 369 HIV
infec... | /fuzzedpackages/gee4/man/aids.Rd | no_license | akhikolla/testpackages | R | false | true | 677 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geer.R
\docType{data}
\name{aids}
\alias{aids}
\title{Aids Data}
\format{A data frame with 2376 rows and 8 variables}
\usage{
data(aids)
}
\description{
The aids dataset comprises a total of 2376 CD4+ cell counts for 369 HIV
infec... |
testlist <- list(data = structure(c(0, 0, 8.28879260278178e-317, 2.41737052621236e+35, 1.17570999667719e+26, 2.12743751473313e+223, 6.75413975356041e+38, 3.94604863549254e-114, 1.16674439868909e+224, 1.49181102216358e-154, 2.02613064886767e+179, 6.44920162434206e-314, 2.51332283756558e-307, 3.52953696963763e+30, 3.... | /biwavelet/inst/testfiles/rcpp_row_quantile/libFuzzer_rcpp_row_quantile/rcpp_row_quantile_valgrind_files/1610554643-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 462 | r | testlist <- list(data = structure(c(0, 0, 8.28879260278178e-317, 2.41737052621236e+35, 1.17570999667719e+26, 2.12743751473313e+223, 6.75413975356041e+38, 3.94604863549254e-114, 1.16674439868909e+224, 1.49181102216358e-154, 2.02613064886767e+179, 6.44920162434206e-314, 2.51332283756558e-307, 3.52953696963763e+30, 3.... |
#' Transform files with transformer functions
#'
#' `transform_files` applies transformations to file contents and writes back
#' the result.
#' @param files A character vector with paths to the file that should be
#' transformed.
#' @inheritParams make_transformer
#' @section Value:
#' Invisibly returns a data frame... | /R/transform-files.R | no_license | davidklaing/styler | R | false | false | 10,770 | r | #' Transform files with transformer functions
#'
#' `transform_files` applies transformations to file contents and writes back
#' the result.
#' @param files A character vector with paths to the file that should be
#' transformed.
#' @inheritParams make_transformer
#' @section Value:
#' Invisibly returns a data frame... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module_generation.R
\name{get_monte_carlo_simulation_p_values}
\alias{get_monte_carlo_simulation_p_values}
\title{Do Monte Carlo simulation}
\usage{
get_monte_carlo_simulation_p_values(module_graphs_, n_monte_carlo_ = 1000,
n_threads_ = 1, ... | /man/get_monte_carlo_simulation_p_values.Rd | no_license | hrk2109/NMFEM | R | false | true | 531 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module_generation.R
\name{get_monte_carlo_simulation_p_values}
\alias{get_monte_carlo_simulation_p_values}
\title{Do Monte Carlo simulation}
\usage{
get_monte_carlo_simulation_p_values(module_graphs_, n_monte_carlo_ = 1000,
n_threads_ = 1, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/process-optimizer.R
\name{optimize_effect}
\alias{optimize_effect}
\title{Run the Balke optimizer}
\usage{
optimize_effect(obj)
}
\arguments{
\item{obj}{Object as returned by \link{analyze_graph}}
}
\value{
An object of class "bal... | /man/optimize_effect.Rd | no_license | cran/causaloptim | R | false | true | 976 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/process-optimizer.R
\name{optimize_effect}
\alias{optimize_effect}
\title{Run the Balke optimizer}
\usage{
optimize_effect(obj)
}
\arguments{
\item{obj}{Object as returned by \link{analyze_graph}}
}
\value{
An object of class "bal... |
#' Calculate euclidean norm of a numerical vector.
#'
#' @param x vector of numeric values.
#' @return the square root of the sum of squared values in \code{x}.
#' @examples
#' euclidNorm(c(1, 3, 0, 4))
#' euclidNorm(c(-1, 0, 5))
#' @export
euclidNorm <- function(x) {sqrt(sum(x ^ 2))}
#' Determine sign of distance fr... | /R/nnetr.R | no_license | MPEP/nnetr-project | R | false | false | 11,144 | r | #' Calculate euclidean norm of a numerical vector.
#'
#' @param x vector of numeric values.
#' @return the square root of the sum of squared values in \code{x}.
#' @examples
#' euclidNorm(c(1, 3, 0, 4))
#' euclidNorm(c(-1, 0, 5))
#' @export
euclidNorm <- function(x) {sqrt(sum(x ^ 2))}
#' Determine sign of distance fr... |
#Multiple Linear regression
#install.packages('catools')
sampledata = read.csv('50_Startups.csv')
#Handling Catagorical Data
sampledata$State = factor(x = sampledata$State ,levels = c('New York','California','Florida'), labels = c(1,2,3))
#Splitting into Training and test data
library(caTools)
set.seed(123)
split =... | /Multiple Linear Regression/Practice_multiple_linear_regression.R | no_license | rbgautam/MachineLearning | R | false | false | 570 | r | #Multiple Linear regression
#install.packages('catools')
sampledata = read.csv('50_Startups.csv')
#Handling Catagorical Data
sampledata$State = factor(x = sampledata$State ,levels = c('New York','California','Florida'), labels = c(1,2,3))
#Splitting into Training and test data
library(caTools)
set.seed(123)
split =... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/fitTimeSeries.R
\name{plotTimeSeries}
\alias{plotTimeSeries}
\title{Plot difference function for particular bacteria}
\usage{
plotTimeSeries(res, C = 0, xlab = "Time",
ylab = "Difference in abundance",
main = "SS difference functi... | /man/plotTimeSeries.Rd | no_license | emcgi/metagenomeSeq-1 | R | false | false | 1,029 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/fitTimeSeries.R
\name{plotTimeSeries}
\alias{plotTimeSeries}
\title{Plot difference function for particular bacteria}
\usage{
plotTimeSeries(res, C = 0, xlab = "Time",
ylab = "Difference in abundance",
main = "SS difference functi... |
library(testthat)
precipDeviation <- terra::rast(system.file("extdata/precipDeviation.asc",
package = "climateStability"))
test_that("rescale0to1 works", {
expect_error(climateStability::stabilityCalc())
expect_warning(climateStability::stabilityCalc("a"))
testResult ... | /tests/testthat/test-stabilityCalc.R | no_license | hannahlowens/climateStability | R | false | false | 472 | r | library(testthat)
precipDeviation <- terra::rast(system.file("extdata/precipDeviation.asc",
package = "climateStability"))
test_that("rescale0to1 works", {
expect_error(climateStability::stabilityCalc())
expect_warning(climateStability::stabilityCalc("a"))
testResult ... |
########################################################
# NEW PHASE #
########### Vector Error correction Model ##############
library(bvartools)
library(urca)
begin_date= as.Date("2020-08-05")
ending_date = as.Date("2020-09-08")
## Mobility datae from Feb 15 to Aug 31
data... | /test-only/vecm.R | no_license | VOICE-TONE/covid19-risk-modelling | R | false | false | 6,943 | r | ########################################################
# NEW PHASE #
########### Vector Error correction Model ##############
library(bvartools)
library(urca)
begin_date= as.Date("2020-08-05")
ending_date = as.Date("2020-09-08")
## Mobility datae from Feb 15 to Aug 31
data... |
library(NISTunits)
### Name: NISTnewtonPerMeterTOpoundForcePerFt
### Title: Convert newton per meter to pound-force per foot
### Aliases: NISTnewtonPerMeterTOpoundForcePerFt
### Keywords: programming
### ** Examples
NISTnewtonPerMeterTOpoundForcePerFt(10)
| /data/genthat_extracted_code/NISTunits/examples/NISTnewtonPerMeterTOpoundForcePerFt.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 263 | r | library(NISTunits)
### Name: NISTnewtonPerMeterTOpoundForcePerFt
### Title: Convert newton per meter to pound-force per foot
### Aliases: NISTnewtonPerMeterTOpoundForcePerFt
### Keywords: programming
### ** Examples
NISTnewtonPerMeterTOpoundForcePerFt(10)
|
###
#get the PCBC samples geneExp normalized counts
###
flog.info('Reading the PCBC normalized mRNA Exp data from Synapse', name='synapse')
mRNA_NormCounts <- synGet('syn2701943')
#read in the file
mRNA_NormCounts <- read.delim(mRNA_NormCounts@filePath, header=T, sep='\t',
as.is=T, strin... | /mRNA_data_prep.R | no_license | rlesca01/PCBC_DataExplorer_ShinyApp | R | false | false | 1,223 | r | ###
#get the PCBC samples geneExp normalized counts
###
flog.info('Reading the PCBC normalized mRNA Exp data from Synapse', name='synapse')
mRNA_NormCounts <- synGet('syn2701943')
#read in the file
mRNA_NormCounts <- read.delim(mRNA_NormCounts@filePath, header=T, sep='\t',
as.is=T, strin... |
################################################################################
##' @title Plot snail sizes by tide
##' @author Robin Elahi
##' @contact elahi.robin@gmail.com
##' @date 2017-01-16
##' @log
################################################################################
source("3_analyse_data/01_sbs_b... | /4_plot_data/plot_size_era_tide.R | permissive | elahi/sbs_analysis | R | false | false | 2,344 | r | ################################################################################
##' @title Plot snail sizes by tide
##' @author Robin Elahi
##' @contact elahi.robin@gmail.com
##' @date 2017-01-16
##' @log
################################################################################
source("3_analyse_data/01_sbs_b... |
library("XML")
library("stringr")
library("ggplot2")
library("data.table")
#Functions
source(paste(getwd(),"/R Scripts/Functions/Functions.R", sep=""))
source(paste(getwd(),"/R Scripts/Functions/League Settings.R", sep=""))
#Suffix
suffix <- "yahoo"
#Download fantasy football projections from Yahoo.com
baseurl <-"ht... | /Weekly.R | no_license | ethielg/Projections | R | false | false | 3,885 | r |
library("XML")
library("stringr")
library("ggplot2")
library("data.table")
#Functions
source(paste(getwd(),"/R Scripts/Functions/Functions.R", sep=""))
source(paste(getwd(),"/R Scripts/Functions/League Settings.R", sep=""))
#Suffix
suffix <- "yahoo"
#Download fantasy football projections from Yahoo.com
baseurl <-"ht... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/mergeClusters.R
\docType{methods}
\name{mergeClusters}
\alias{mergeClusters}
\alias{mergeClusters,daFrame,character,data.frame,character-method}
\title{Manual cluster merging}
\usage{
mergeClusters(x, k, table, id)
\S4method... | /man/mergeClusters.Rd | no_license | sukath/CATALYST | R | false | true | 1,936 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/mergeClusters.R
\docType{methods}
\name{mergeClusters}
\alias{mergeClusters}
\alias{mergeClusters,daFrame,character,data.frame,character-method}
\title{Manual cluster merging}
\usage{
mergeClusters(x, k, table, id)
\S4method... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_negative_cases.R
\name{get_negative_cases}
\alias{get_negative_cases}
\title{Find all observations with negative incidence in a
given data frame}
\usage{
get_negative_cases(data)
}
\arguments{
\item{data}{a data frame with location, date,... | /man/get_negative_cases.Rd | no_license | reichlab/covidData | R | false | true | 477 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_negative_cases.R
\name{get_negative_cases}
\alias{get_negative_cases}
\title{Find all observations with negative incidence in a
given data frame}
\usage{
get_negative_cases(data)
}
\arguments{
\item{data}{a data frame with location, date,... |
#BASIC DESCRPTIVES:
#Read INPUT DATA
seattle_merged_reduced= fread("C:/Users/isabe/Documents/isabel/R_HU_Statistik/Course_StatisticalProgramming/Projects_SPL/
bikeRental/Rawdata_bikeRental/Seattle.csv")#seattleMerged_reduced.csv")
#
seattle_data = seattle_merged_reduced #working with seattle_data
################... | /Q2_Descriptives_BikeRentalSeattle/Q2_Descriptives_BikeRentalSeattle.r | no_license | isabelchaquire/SPL_HU | R | false | false | 2,411 | r | #BASIC DESCRPTIVES:
#Read INPUT DATA
seattle_merged_reduced= fread("C:/Users/isabe/Documents/isabel/R_HU_Statistik/Course_StatisticalProgramming/Projects_SPL/
bikeRental/Rawdata_bikeRental/Seattle.csv")#seattleMerged_reduced.csv")
#
seattle_data = seattle_merged_reduced #working with seattle_data
################... |
data_path <- "/project/huff/huff/TCGA_AML/siSTAB1_data/RNAseq-analysis/result/2.Analysis_result/Single_Sample"
fileNames <- dir(data_path,pattern = "count$")
# load expression data ----------------------------------------------------
for (x in fileNames) {
assign(x,readr::read_tsv(file.path(data_path,x),col_names... | /R-pac-learning/edgeR.R | no_license | Huffyphenix/hello-world | R | false | false | 6,758 | r | data_path <- "/project/huff/huff/TCGA_AML/siSTAB1_data/RNAseq-analysis/result/2.Analysis_result/Single_Sample"
fileNames <- dir(data_path,pattern = "count$")
# load expression data ----------------------------------------------------
for (x in fileNames) {
assign(x,readr::read_tsv(file.path(data_path,x),col_names... |
context("sync")
cf <- read_repo_config(local_config_file = NULL)
cf <- subset(cf, name == "NSIDC SMMR-SSM/I Nasateam sea ice concentration")
cf$do_sync <- TRUE
tok <- "--accept=\"*nt_200703*\""
cf$method_flags <- paste(cf$method_flags, "--accept=\"*nt_2016*\"", "--accept=\"*nt_2015*\"")
lfr <- tempdir()
cf$local_file... | /tests/testthat/test-sync.R | no_license | AustralianAntarcticDataCentre/raadsync | R | false | false | 572 | r | context("sync")
cf <- read_repo_config(local_config_file = NULL)
cf <- subset(cf, name == "NSIDC SMMR-SSM/I Nasateam sea ice concentration")
cf$do_sync <- TRUE
tok <- "--accept=\"*nt_200703*\""
cf$method_flags <- paste(cf$method_flags, "--accept=\"*nt_2016*\"", "--accept=\"*nt_2015*\"")
lfr <- tempdir()
cf$local_file... |
# First set up the working directory
setwd('./RealData/Data')
######################################################################################################################
# Bottomly
# Bottomly, Daniel, et al. "Evaluating gene expression in C57BL/6J and DBA/2J mouse striatum using RNA-Seq and
# microarrays."... | /RealData/Code/1.RealDataProcess.R | no_license | jchen1981/CAMT | R | false | false | 6,850 | r | # First set up the working directory
setwd('./RealData/Data')
######################################################################################################################
# Bottomly
# Bottomly, Daniel, et al. "Evaluating gene expression in C57BL/6J and DBA/2J mouse striatum using RNA-Seq and
# microarrays."... |
# ACF plot in ggplot2 ---------------------------------------------------------
#Note that this code is heavily based on the following code:
#https://github.com/dewittpe/qwraps2/blob/master/R/qacf.R#L79
ggacf = function(x, conf_level = 0.95, type = "acf"){
library(dplyr); library(stats); library(ggplot2);libra... | /Descriptive Function.R | no_license | laranea/Bachelor | R | false | false | 3,908 | r | # ACF plot in ggplot2 ---------------------------------------------------------
#Note that this code is heavily based on the following code:
#https://github.com/dewittpe/qwraps2/blob/master/R/qacf.R#L79
ggacf = function(x, conf_level = 0.95, type = "acf"){
library(dplyr); library(stats); library(ggplot2);libra... |
#' Convert a tile coordinate to a lon/lat coordinate
#'
#' Convert a tile coordinate to a lon/lat coordinate for a given zoom. Decimal
#' tile coordinates are accepted.
#'
#' @param X horizontal map-tile coordinate (0 is map-left)
#' @param Y vertical map-tile coordinate (0 is map-top)
#' @param zoom zoom
#' @param x ... | /R/XY2LonLat.R | permissive | erhard1/ggmap | R | false | false | 1,336 | r | #' Convert a tile coordinate to a lon/lat coordinate
#'
#' Convert a tile coordinate to a lon/lat coordinate for a given zoom. Decimal
#' tile coordinates are accepted.
#'
#' @param X horizontal map-tile coordinate (0 is map-left)
#' @param Y vertical map-tile coordinate (0 is map-top)
#' @param zoom zoom
#' @param x ... |
######################################
#Calculate MSY--------------------------------------------------
#This code runs CatchMSY on fisheries
######################################
RunCatchMSY <-
function(Data,
ErrorSize = 0.85,
sigR = 0,
Smooth = F,
Display = F,
... | /Functions/RunCatchMSY.R | no_license | kmillage/Global-Fishery-Potential | R | false | false | 6,722 | r | ######################################
#Calculate MSY--------------------------------------------------
#This code runs CatchMSY on fisheries
######################################
RunCatchMSY <-
function(Data,
ErrorSize = 0.85,
sigR = 0,
Smooth = F,
Display = F,
... |
censIndCR = function(target, dataset, xIndex, csIndex, wei = NULL, dataInfo=NULL, univariateModels=NULL, hash = FALSE, stat_hash=NULL, pvalue_hash=NULL,robust=FALSE){
# Conditional independence test based on the Log Likelihood ratio test
if ( !survival::is.Surv(target) ) stop('The survival test can not be perfo... | /R/censIndCR.R | no_license | JokerWhy233/MXM | R | false | false | 2,661 | r | censIndCR = function(target, dataset, xIndex, csIndex, wei = NULL, dataInfo=NULL, univariateModels=NULL, hash = FALSE, stat_hash=NULL, pvalue_hash=NULL,robust=FALSE){
# Conditional independence test based on the Log Likelihood ratio test
if ( !survival::is.Surv(target) ) stop('The survival test can not be perfo... |
library(PracTools)
### Name: pclass
### Title: Form nonresponse adjustment classes based on propensity scores
### Aliases: pclass
### Keywords: methods survey
### ** Examples
# classes based on unweighted logistic regression
require(PracTools)
data(nhis)
out <- pclass(formula = resp ~ age + as.factor(sex) + as.... | /data/genthat_extracted_code/PracTools/examples/pclass.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 870 | r | library(PracTools)
### Name: pclass
### Title: Form nonresponse adjustment classes based on propensity scores
### Aliases: pclass
### Keywords: methods survey
### ** Examples
# classes based on unweighted logistic regression
require(PracTools)
data(nhis)
out <- pclass(formula = resp ~ age + as.factor(sex) + as.... |
exampleDatasets <- c("mouseBrainSubset", "maits", "campBrainSubset")
if ("scRNAseq" %in% rownames(installed.packages())){
exampleDatasets <- c(exampleDatasets, "fluidigm_pollen_et_al",
"th2_mahata_et_al", "allen_tasic_et_al")
}
shinyPanelUpload <- fluidPage(
useShinyjs(),
tags$style(appCSS... | /inst/shiny/ui_01_upload.R | permissive | aleshchyk/singleCellTK | R | false | false | 9,553 | r | exampleDatasets <- c("mouseBrainSubset", "maits", "campBrainSubset")
if ("scRNAseq" %in% rownames(installed.packages())){
exampleDatasets <- c(exampleDatasets, "fluidigm_pollen_et_al",
"th2_mahata_et_al", "allen_tasic_et_al")
}
shinyPanelUpload <- fluidPage(
useShinyjs(),
tags$style(appCSS... |
# UCM
# Prof. Lorenzo Escot
# Alumno: Caio Fernandes Moreno (caiofern@ucm.es)
# Brazil Stock Market Analysis
setwd("~/git/Bitbucket/ucm/SCORE/tareas/Lorenzo-Escot")
library(tseries) # adf.test, kpss.test, bds.test, get.hist.quote, portfolio.optim, surrogate, arma, garch
#install.packages("forecast")
library(foreca... | /score/ucm-lorenzo-task01-caio-brazil-stock-market-with-stock-param.R | no_license | joaopauloramos/ucm | R | false | false | 6,316 | r | # UCM
# Prof. Lorenzo Escot
# Alumno: Caio Fernandes Moreno (caiofern@ucm.es)
# Brazil Stock Market Analysis
setwd("~/git/Bitbucket/ucm/SCORE/tareas/Lorenzo-Escot")
library(tseries) # adf.test, kpss.test, bds.test, get.hist.quote, portfolio.optim, surrogate, arma, garch
#install.packages("forecast")
library(foreca... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/movement.R
\name{move_iTags}
\alias{move_iTags}
\title{Movement function for individual tags}
\usage{
move_iTags(dat, om)
}
\arguments{
\item{dat}{Object with individual tags}
\item{om}{operating model object}
}
\description{
Movement of ind... | /man/move_iTags.Rd | no_license | AustralianAntarcticDivision/planetfish | R | false | true | 524 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/movement.R
\name{move_iTags}
\alias{move_iTags}
\title{Movement function for individual tags}
\usage{
move_iTags(dat, om)
}
\arguments{
\item{dat}{Object with individual tags}
\item{om}{operating model object}
}
\description{
Movement of ind... |
#### Here is the R script you will use: (remember that # indicates a comment) ####
#Lab5: Sequential Regression
devtools::install_github("MichaelJMahometa/SDSRegressionR")
library(SDSRegressionR)
#import data...
int <- read.csv("data/introverts.csv", stringsAsFactors=FALSE)
names(int)
library(psych)
describe(int$Happ... | /Lab5/Lab 5 R syntax.R | no_license | mehranaman/Applied-Regression | R | false | false | 1,452 | r | #### Here is the R script you will use: (remember that # indicates a comment) ####
#Lab5: Sequential Regression
devtools::install_github("MichaelJMahometa/SDSRegressionR")
library(SDSRegressionR)
#import data...
int <- read.csv("data/introverts.csv", stringsAsFactors=FALSE)
names(int)
library(psych)
describe(int$Happ... |
#### Data loading and setup ####
rm(list=ls(all=TRUE)) #Clears console
options(digits=7)
setwd("/Users/hrobbins827/Documents/PhD/NCI overflow/NLST/Analysis")
# Read in my personal defined functions and the Kovalchik prediction function
source("/Users/hrobbins827/Documents/PhD/Textbooks Resources/R functions/hilary_... | /R/old/analysis_nlst_split_v24_negatives_only_Hilaryannotation.R | no_license | marskar/nlst | R | false | false | 45,591 | r |
#### Data loading and setup ####
rm(list=ls(all=TRUE)) #Clears console
options(digits=7)
setwd("/Users/hrobbins827/Documents/PhD/NCI overflow/NLST/Analysis")
# Read in my personal defined functions and the Kovalchik prediction function
source("/Users/hrobbins827/Documents/PhD/Textbooks Resources/R functions/hilary_... |
#' Create a subgraph based on a selection of nodes
#' or edges
#' @description Create a subgraph based on a
#' selection of nodes or edges extant in the graph
#' object.
#' @param graph a graph object of class
#' \code{dgr_graph} that is created using
#' \code{create_graph}.
#' @examples
#' # Create a simple graph
#' n... | /R/create_subgraph_ws.R | no_license | julianflowers/DiagrammeR | R | false | false | 3,124 | r | #' Create a subgraph based on a selection of nodes
#' or edges
#' @description Create a subgraph based on a
#' selection of nodes or edges extant in the graph
#' object.
#' @param graph a graph object of class
#' \code{dgr_graph} that is created using
#' \code{create_graph}.
#' @examples
#' # Create a simple graph
#' n... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% File.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{mkdirs.File}
\alias... | /man/mkdirs.File.Rd | no_license | HenrikBengtsson/R.io | R | false | false | 1,120 | rd | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% File.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{mkdirs.File}
\alias... |
library(doParallel)
library(foreach)
getDoParWorkers()
detectCores()
cl=makeCluster(detectCores()-2)
registerDoParallel(cl)
getDoParWorkers()
myfunc = function(i)
{
source("simdatDAG1LMD.R")
library(geepack)
set.seed(60)
seeds = floor(runif(1000)*10^8);
EXPIT <- function(term) ... | /DAG1/sample_500/aipw_stratD.R | no_license | lw499/mortalcohort_github | R | false | false | 22,107 | r | library(doParallel)
library(foreach)
getDoParWorkers()
detectCores()
cl=makeCluster(detectCores()-2)
registerDoParallel(cl)
getDoParWorkers()
myfunc = function(i)
{
source("simdatDAG1LMD.R")
library(geepack)
set.seed(60)
seeds = floor(runif(1000)*10^8);
EXPIT <- function(term) ... |
library(GO.db)
library(ggplot2)
library(shiny)
library(DT)
# Gets the ancestor and children data
bpAncestors <- as.list(GOBPANCESTOR)
ccAncestors <- as.list(GOCCANCESTOR)
mfAncestors <- as.list(GOMFANCESTOR)
ancestors <- append(bpAncestors, ccAncestors)
ancestors <- append(ancestors, mfAncestors)
bpChildren <- as.li... | /goApp.R | no_license | zuhaibGit/goTermVisualizer | R | false | false | 3,466 | r | library(GO.db)
library(ggplot2)
library(shiny)
library(DT)
# Gets the ancestor and children data
bpAncestors <- as.list(GOBPANCESTOR)
ccAncestors <- as.list(GOCCANCESTOR)
mfAncestors <- as.list(GOMFANCESTOR)
ancestors <- append(bpAncestors, ccAncestors)
ancestors <- append(ancestors, mfAncestors)
bpChildren <- as.li... |
# Association Rules for Market Basket Analysis (R)
library(arules) # association rules
library(arulesViz) # data visualization of association rules
library(RColorBrewer) # color palettes for plots
data(Groceries) # grocery transactions object from arules package
# show the dimensions of the transactions ... | /Association_Rules_for_Market_Basket_Analysis.R | no_license | YangLei2586/Association-Rules-for-Market-Basket-Analysis | R | false | false | 3,498 | r | # Association Rules for Market Basket Analysis (R)
library(arules) # association rules
library(arulesViz) # data visualization of association rules
library(RColorBrewer) # color palettes for plots
data(Groceries) # grocery transactions object from arules package
# show the dimensions of the transactions ... |
library(glmnet)
library(useful)
library(coefplot)
library(magrittr)
land_train <- readr::read_csv('data/manhattan_Train.csv')
land_test <- readRDS('data/manhattan_Test.rds')
View(land_train)
valueFormula <- TotalValue ~ FireService +
ZoneDist1 + ZoneDist2 + Class + LandUse +
OwnerType + LotArea + BldgArea ... | /code/glmnet.r | no_license | brooklynbagel/LiveMLAugust18 | R | false | false | 950 | r | library(glmnet)
library(useful)
library(coefplot)
library(magrittr)
land_train <- readr::read_csv('data/manhattan_Train.csv')
land_test <- readRDS('data/manhattan_Test.rds')
View(land_train)
valueFormula <- TotalValue ~ FireService +
ZoneDist1 + ZoneDist2 + Class + LandUse +
OwnerType + LotArea + BldgArea ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{get_sequences}
\alias{get_sequences}
\title{Title Get fasta sequences from PANGEA dataframe}
\usage{
get_sequences(all_data, country_name, outfile_name, add_unknown)
}
\arguments{
\item{all_data}{Dataframe containing all data}
\... | /man/get_sequences.Rd | no_license | thednainus/pangeaZA | R | false | true | 781 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{get_sequences}
\alias{get_sequences}
\title{Title Get fasta sequences from PANGEA dataframe}
\usage{
get_sequences(all_data, country_name, outfile_name, add_unknown)
}
\arguments{
\item{all_data}{Dataframe containing all data}
\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layers-convolutional.R
\name{layer_conv_lstm_2d}
\alias{layer_conv_lstm_2d}
\title{Convolutional LSTM.}
\usage{
layer_conv_lstm_2d(object, filters, kernel_size, strides = c(1L, 1L),
padding = "valid", data_format = NULL, dilation_rate = c(1... | /man/layer_conv_lstm_2d.Rd | no_license | MrfksIv/keras | R | false | true | 6,188 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layers-convolutional.R
\name{layer_conv_lstm_2d}
\alias{layer_conv_lstm_2d}
\title{Convolutional LSTM.}
\usage{
layer_conv_lstm_2d(object, filters, kernel_size, strides = c(1L, 1L),
padding = "valid", data_format = NULL, dilation_rate = c(1... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{changepoints}
\alias{changepoints}
\alias{changepoints.sbs}
\alias{changepoints.wbs}
\title{Change-points detected by WBS or BS}
\usage{
changepoints(object, ...)
\method{changepoints}{sbs}(object, th = NULL, th.const = 1.3, Kmax = NULL,
...)
\method{change... | /man/changepoints.Rd | no_license | pra1981/wbs | R | false | false | 4,211 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{changepoints}
\alias{changepoints}
\alias{changepoints.sbs}
\alias{changepoints.wbs}
\title{Change-points detected by WBS or BS}
\usage{
changepoints(object, ...)
\method{changepoints}{sbs}(object, th = NULL, th.const = 1.3, Kmax = NULL,
...)
\method{change... |
rm(list=ls())
source(file = "./package_load.R", chdir = T)
# Number of bases: 5, 10, 15, 20
process <- "ebf" # ebf: empirical basis functions, gsk: gaussian kernels
margin <- "gsk" # ebf: empirical basis functions, gsk: gaussian kernels
time <- "current" # current or future
L <- 15 # numbe... | /markdown/precipitation/fit-ebf-15-2.R | permissive | sammorris81/extreme-decomp | R | false | false | 1,114 | r | rm(list=ls())
source(file = "./package_load.R", chdir = T)
# Number of bases: 5, 10, 15, 20
process <- "ebf" # ebf: empirical basis functions, gsk: gaussian kernels
margin <- "gsk" # ebf: empirical basis functions, gsk: gaussian kernels
time <- "current" # current or future
L <- 15 # numbe... |
source("startup.R")
function(input, output, session) {
##### For Tab Panel E-value #####
evals <- reactive({
if ( input$outcomeType == "RR" ) {
if ( is.na( input$est.RR )) return("Enter your point estimate")
if ( is.na( input$trueRR )) return("Enter a true value")
eval... | /Shiny app/evalue/server.R | no_license | belalanik/evalue | R | false | false | 25,845 | r | source("startup.R")
function(input, output, session) {
##### For Tab Panel E-value #####
evals <- reactive({
if ( input$outcomeType == "RR" ) {
if ( is.na( input$est.RR )) return("Enter your point estimate")
if ( is.na( input$trueRR )) return("Enter a true value")
eval... |
# Count Stats: significant cell population stats
# aya43@sfu.ca 20161220
#Directory
root = "~/projects/IMPC"
result_dir = "result"; suppressWarnings(dir.create (result_dir))
setwd(root)
panelL = c("P1")
centreL = c("Sanger_SPLEEN")#,"Sanger_MLN","CIPHE","TCP","H")
#Options
options(stringsAsFactors=FALSE)
# options(d... | /flowtype-IMPC_pipeline-master/04_stat_pvalue.R | no_license | aya49/flowGraph_experiments | R | false | false | 11,419 | r | # Count Stats: significant cell population stats
# aya43@sfu.ca 20161220
#Directory
root = "~/projects/IMPC"
result_dir = "result"; suppressWarnings(dir.create (result_dir))
setwd(root)
panelL = c("P1")
centreL = c("Sanger_SPLEEN")#,"Sanger_MLN","CIPHE","TCP","H")
#Options
options(stringsAsFactors=FALSE)
# options(d... |
# Outer estimation of the factor scores
step4 <-
function(data, outerW, model, pairwise){
blocks <- model$blocks
if(pairwise){
Latent <- matrix(NA, nrow=nrow(data), ncol=length(model$latent)) # factor scores
colnames(Latent) <- model$latent
for(i in model$latent){
mf <- as.matrix(data[ , blocks[[i... | /semPLS/R/step4.R | no_license | ingted/R-Examples | R | false | false | 878 | r | # Outer estimation of the factor scores
step4 <-
function(data, outerW, model, pairwise){
blocks <- model$blocks
if(pairwise){
Latent <- matrix(NA, nrow=nrow(data), ncol=length(model$latent)) # factor scores
colnames(Latent) <- model$latent
for(i in model$latent){
mf <- as.matrix(data[ , blocks[[i... |
library(comparer)
### Name: plot.mbc
### Title: Plot mbc class
### Aliases: plot.mbc
### ** Examples
m1 <- mbc(function(x) {Sys.sleep(rexp(1, 30));mean(x)},
function(x) {Sys.sleep(rexp(1, 5));median(x)}, input=runif(100))
plot(m1)
| /data/genthat_extracted_code/comparer/examples/plot.mbc.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 240 | r | library(comparer)
### Name: plot.mbc
### Title: Plot mbc class
### Aliases: plot.mbc
### ** Examples
m1 <- mbc(function(x) {Sys.sleep(rexp(1, 30));mean(x)},
function(x) {Sys.sleep(rexp(1, 5));median(x)}, input=runif(100))
plot(m1)
|
#' Thai major rice production of 2562//63 (2019/20) crop year by province
#'
#' Data from Office of Agricultural Economics (OAE)
#'
#' @docType data
#'
#' @usage data(rice_2562)
#'
#' @format An object of class \code{"tibble"}
#'
#' @keywords datasets
#'
#' @source \href{http://www.oae.go.th}{}
#'
#' @examples
#' data(... | /R/rice_2562.R | permissive | pasin008/mapthai | R | false | false | 361 | r | #' Thai major rice production of 2562//63 (2019/20) crop year by province
#'
#' Data from Office of Agricultural Economics (OAE)
#'
#' @docType data
#'
#' @usage data(rice_2562)
#'
#' @format An object of class \code{"tibble"}
#'
#' @keywords datasets
#'
#' @source \href{http://www.oae.go.th}{}
#'
#' @examples
#' data(... |
shiny::shinyUI(
shinydashboard::dashboardPage(
skin = "blue",
shinydashboard::dashboardHeader(
title = "RiskStratifiedEstimation"
),
shinydashboard::dashboardSidebar(
shinydashboard::sidebarMenu(
id = "menu1",
shinydashboard::menuItem(
tabName = "analysis",
... | /inst/shiny/ui.R | permissive | mi-erasmusmc/RiskStratifiedEstimation | R | false | false | 4,944 | r | shiny::shinyUI(
shinydashboard::dashboardPage(
skin = "blue",
shinydashboard::dashboardHeader(
title = "RiskStratifiedEstimation"
),
shinydashboard::dashboardSidebar(
shinydashboard::sidebarMenu(
id = "menu1",
shinydashboard::menuItem(
tabName = "analysis",
... |
library(coda)
library(gdata)
library(rjags)
library(broman)
library(plyr)
library(reshape)
library(xtable)
version <- "i-009f9c75a9206a0ac"
#######################################################################################################################################
# load data
load(file = "../Library/Salix... | /FiguresTablesEtc/table4.R | permissive | CCheCastaldo/CheCastaldo_etal_2019_EcolMongr | R | false | false | 11,912 | r | library(coda)
library(gdata)
library(rjags)
library(broman)
library(plyr)
library(reshape)
library(xtable)
version <- "i-009f9c75a9206a0ac"
#######################################################################################################################################
# load data
load(file = "../Library/Salix... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{freqpolygon}
\alias{freqpolygon}
\alias{panel.freqpolygon}
\title{Frequency Polygons}
\usage{
freqpolygon(x, ..., panel = "panel.freqpolygon")
panel.freqpolygon(x, plot.points = "jitter", ref = FALSE, groups = NULL,
weights = NULL, jitter.amount = 0.01 * dif... | /man/freqpolygon.Rd | no_license | TotallyBullshit/mosaic | R | false | false | 2,686 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{freqpolygon}
\alias{freqpolygon}
\alias{panel.freqpolygon}
\title{Frequency Polygons}
\usage{
freqpolygon(x, ..., panel = "panel.freqpolygon")
panel.freqpolygon(x, plot.points = "jitter", ref = FALSE, groups = NULL,
weights = NULL, jitter.amount = 0.01 * dif... |
\name{p.page4}
\alias{p.page4}
\title{A postiori probability of hyperparameters}
\description{
Function to determine a postiori probability of hyperparameters
\eqn{\rho}{rho}, \eqn{\lambda}{lambda} and \eqn{\psi_2}{psi2},
given observations and \eqn{\psi_1}{psi1}.
}
\usage{
p.page4(D1, D2, H1, H2, V, y, z, E.thet... | /man/p.page4.Rd | no_license | RobinHankin/calibrator | R | false | false | 2,884 | rd | \name{p.page4}
\alias{p.page4}
\title{A postiori probability of hyperparameters}
\description{
Function to determine a postiori probability of hyperparameters
\eqn{\rho}{rho}, \eqn{\lambda}{lambda} and \eqn{\psi_2}{psi2},
given observations and \eqn{\psi_1}{psi1}.
}
\usage{
p.page4(D1, D2, H1, H2, V, y, z, E.thet... |
#library(stringr)
library(plyr)
games <- list.files(file.path("..", "games"), pattern = "-at-")
ps_files <- list.files(file.path("..", "games", games), recursive = TRUE,
full.names = TRUE, pattern = "player-stats.tsv")
ps_files <- cbind(games,
matrix(ps_files, ncol = 2, byrow =... | /scripts/39_develop-player-stats.r | no_license | jennybc/vanNH | R | false | false | 2,292 | r | #library(stringr)
library(plyr)
games <- list.files(file.path("..", "games"), pattern = "-at-")
ps_files <- list.files(file.path("..", "games", games), recursive = TRUE,
full.names = TRUE, pattern = "player-stats.tsv")
ps_files <- cbind(games,
matrix(ps_files, ncol = 2, byrow =... |
# p.18, Program 1-1
RollDie = function(n) sample(1:6, n, replace = T)
r20 = RollDie(20)
r200 = RollDie(200)
r2000 = RollDie(2000)
r20000 = RollDie(20000)
par(mfrow=c(2,2))
hist(r20, br = c(0,1,2,3,4,5,6), main= '', freq=F, ylab='Relative Frequency', ylim=c(0,0.5))
hist(r200, br = c(0,1,2,3,4,5,6), main= '', freq=F, yla... | /[Probability].R | no_license | esoterikosQ/KNOU | R | false | false | 676 | r | # p.18, Program 1-1
RollDie = function(n) sample(1:6, n, replace = T)
r20 = RollDie(20)
r200 = RollDie(200)
r2000 = RollDie(2000)
r20000 = RollDie(20000)
par(mfrow=c(2,2))
hist(r20, br = c(0,1,2,3,4,5,6), main= '', freq=F, ylab='Relative Frequency', ylim=c(0,0.5))
hist(r200, br = c(0,1,2,3,4,5,6), main= '', freq=F, yla... |
#' Adjust a Dataset
#' Adjust the dimensions of a dataset to build the blocks
#' @param D Dataset containing numeric values
#' @param tb Temporal block size
#' @param sb Spatial block size
#' @return Dataset adjusted to build the blocks.
#' @examples
#' #Adjust a block
#' D <- STSADatasetAdjust(STMotif::example_dataset... | /R/mainFunction.R | no_license | cran/STMotif | R | false | false | 5,691 | r | #' Adjust a Dataset
#' Adjust the dimensions of a dataset to build the blocks
#' @param D Dataset containing numeric values
#' @param tb Temporal block size
#' @param sb Spatial block size
#' @return Dataset adjusted to build the blocks.
#' @examples
#' #Adjust a block
#' D <- STSADatasetAdjust(STMotif::example_dataset... |
install.packages("httr")
install.packages("plumber")
install.packages("data.table")
install.packages("RCurl")
| /init.R | no_license | aliarsalankazmi/fb-r-messenger-bot | R | false | false | 110 | r | install.packages("httr")
install.packages("plumber")
install.packages("data.table")
install.packages("RCurl")
|
server <- function(input, output) {
# SPARK VALUE BOX THEME ------------------------------------------------------
valueBoxSpark <-
function(value,
title,
sparkobj = NULL,
subtitle,
info = NULL,
icon = NULL,
color = "aqua", ... | /Data_Visualization/server.R | no_license | kularudi/Capstone_Algoritma_Academy | R | false | false | 17,760 | r | server <- function(input, output) {
# SPARK VALUE BOX THEME ------------------------------------------------------
valueBoxSpark <-
function(value,
title,
sparkobj = NULL,
subtitle,
info = NULL,
icon = NULL,
color = "aqua", ... |
# K-Means Clustering
# Importing the dataset
dataset = read.csv('parkinsons.csv')
dataset = dataset[,-1]
dataset = dataset[,-17]
# Splitting the dataset into the Training set and Test set
# install.packages('caTools')
# library(caTools)
# set.seed(123)
# split = sample.split(dataset$DependentVariable, Spli... | /R-kodovi/parkinsons.R | no_license | pimaja/Ant-Colony-Optimization-Clustering | R | false | false | 808 | r | # K-Means Clustering
# Importing the dataset
dataset = read.csv('parkinsons.csv')
dataset = dataset[,-1]
dataset = dataset[,-17]
# Splitting the dataset into the Training set and Test set
# install.packages('caTools')
# library(caTools)
# set.seed(123)
# split = sample.split(dataset$DependentVariable, Spli... |
/Step1/2_40_cells_01_Lecture_des_donnees_+_Normalisation.R | no_license | HKeyHKey/Rodriguez-Martinez2017 | R | false | false | 9,783 | r | ||
#Zero-integral basis
ZsplineBasis = function(knots,k)
{
library(fda)
r = length(knots)
lambda_index = c(0:(r-1))
g = lambda_index[length(lambda_index) - 1]
N = g+(k-1)+1
lambda = c(rep(min(knots),k-1),knots,rep(max(knots),k-1))
div = seq(min(lambda), max(lambda), length = 1000)
#... | /SFPCA/NulBaze.R | no_license | AMenafoglio/BayesSpaces-codes | R | false | false | 1,496 | r | #Zero-integral basis
ZsplineBasis = function(knots,k)
{
library(fda)
r = length(knots)
lambda_index = c(0:(r-1))
g = lambda_index[length(lambda_index) - 1]
N = g+(k-1)+1
lambda = c(rep(min(knots),k-1),knots,rep(max(knots),k-1))
div = seq(min(lambda), max(lambda), length = 1000)
#... |
### ----------------------------------------------------------------------------
### This is the set of simulations related to the Athens-Clarke county primary
### service area.
### Counties are limited to Clarke, Oconee, Barrow, Madison, Jackson, Oglethorpe
### Georgia-specific simulations have been updated with start... | /Colquitt_and_surrounding/Code/athens_simulations_primary.R | no_license | ingels11/COVID19_ACC_Model | R | false | false | 16,054 | r | ### ----------------------------------------------------------------------------
### This is the set of simulations related to the Athens-Clarke county primary
### service area.
### Counties are limited to Clarke, Oconee, Barrow, Madison, Jackson, Oglethorpe
### Georgia-specific simulations have been updated with start... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/experiments.R
\name{ga_experiment}
\alias{ga_experiment}
\title{Experiments Meta data}
\usage{
ga_experiment(accountId, webPropertyId, profileId, experimentId)
}
\arguments{
\item{accountId}{Account Id}
\item{webPropertyId}{Web Property Id}
... | /man/ga_experiment.Rd | no_license | Cecile31/googleAnalyticsR | R | false | true | 1,135 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/experiments.R
\name{ga_experiment}
\alias{ga_experiment}
\title{Experiments Meta data}
\usage{
ga_experiment(accountId, webPropertyId, profileId, experimentId)
}
\arguments{
\item{accountId}{Account Id}
\item{webPropertyId}{Web Property Id}
... |
#Henry Text Analytics with R
# https://github.com/datasciencedojo/IntroToTextAnalyticsWithR
#Reference: https://www.youtube.com/watch?v=4vuw0AsHeGw
# rehttps://github.com/datasciencedojo/IntroToTextAnalyticsWithR
a=1
b=2
c=1
x<-runif(10, min=1, max=3)
hist(x)
install.packages("e1071")
library(e1071)
kurtosis(x)
xn... | /first_script.R | no_license | hmendozar17/TextAnalyticsWithR | R | false | false | 495 | r | #Henry Text Analytics with R
# https://github.com/datasciencedojo/IntroToTextAnalyticsWithR
#Reference: https://www.youtube.com/watch?v=4vuw0AsHeGw
# rehttps://github.com/datasciencedojo/IntroToTextAnalyticsWithR
a=1
b=2
c=1
x<-runif(10, min=1, max=3)
hist(x)
install.packages("e1071")
library(e1071)
kurtosis(x)
xn... |
#Quantitative Biology
#Measures of Biodiversity
#Author: Benjamin Gazeau
#Date: 02 July 2021
# Load Packages
library(vegan)
library(ggplot2)
library(BiodiversityR)
library(betapart)
library(dplyr)
# Read Data
spp <- read.csv("C:/Users/benji/Desktop/Stats (2021)/Quantitative_Ecology-main/exercises/diversity/Seawee... | /Species Dissimilarities .R | no_license | BenjaminGazeau/Quantitative-Ecology | R | false | false | 3,868 | r | #Quantitative Biology
#Measures of Biodiversity
#Author: Benjamin Gazeau
#Date: 02 July 2021
# Load Packages
library(vegan)
library(ggplot2)
library(BiodiversityR)
library(betapart)
library(dplyr)
# Read Data
spp <- read.csv("C:/Users/benji/Desktop/Stats (2021)/Quantitative_Ecology-main/exercises/diversity/Seawee... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{extract_area}
\alias{extract_area}
\title{Helper function to extract the area slots from
\code{\link[sp]{SpatialPolygons}} objects}
\usage{
extract_area(sp_poly)
}
\arguments{
\item{sp_poly}{An object of class \code{\link[sp... | /man/extract_area.Rd | no_license | rnuske/fisim | R | false | true | 692 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{extract_area}
\alias{extract_area}
\title{Helper function to extract the area slots from
\code{\link[sp]{SpatialPolygons}} objects}
\usage{
extract_area(sp_poly)
}
\arguments{
\item{sp_poly}{An object of class \code{\link[sp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oss.R
\name{oss.save}
\alias{oss.save}
\title{oss.save}
\usage{
oss.save(x, ...)
}
\arguments{
\item{...}{}
}
\description{
oss.save
}
\examples{
a <- 1:10
oss.save('oss://ross-test/test.RData', a)
}
| /man/oss.save.Rd | permissive | gahoo/ross | R | false | true | 278 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oss.R
\name{oss.save}
\alias{oss.save}
\title{oss.save}
\usage{
oss.save(x, ...)
}
\arguments{
\item{...}{}
}
\description{
oss.save
}
\examples{
a <- 1:10
oss.save('oss://ross-test/test.RData', a)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/equ7.R
\name{equ7}
\alias{equ7}
\title{Equation 7}
\usage{
equ7(temp, rate, augment = F, return_fit = F)
}
\arguments{
\item{temp}{temperature (in Celsius)}
\item{rate}{rate measurement}
\item{augment}{logical wether the dataset with fits s... | /man/equ7.Rd | no_license | low-decarie/temperatureresponse | R | false | true | 727 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/equ7.R
\name{equ7}
\alias{equ7}
\title{Equation 7}
\usage{
equ7(temp, rate, augment = F, return_fit = F)
}
\arguments{
\item{temp}{temperature (in Celsius)}
\item{rate}{rate measurement}
\item{augment}{logical wether the dataset with fits s... |
#### CalcAuxAtPoint function
## The function takes the following
## w - a matrix. Each row is observation and each column is questionnaire time in the interval. w equal to Inf once
# an observation is censore/had the event
## w.res - a matrix of the same dimensions as w. Equal to the x(t) at time w. For example sec... | /ICcalib/R/CalcAuxAtPoint.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 1,815 | r | #### CalcAuxAtPoint function
## The function takes the following
## w - a matrix. Each row is observation and each column is questionnaire time in the interval. w equal to Inf once
# an observation is censore/had the event
## w.res - a matrix of the same dimensions as w. Equal to the x(t) at time w. For example sec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/assign_parameters.R
\name{assign_parameters.default}
\alias{assign_parameters.default}
\title{conversion helper}
\usage{
\method{assign_parameters}{default}(
x,
infiltration = NULL,
subcatchment = NULL,
subcatchment_typologies = NULL,... | /man/assign_parameters.default.Rd | no_license | dleutnant/swmmr | R | false | true | 434 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/assign_parameters.R
\name{assign_parameters.default}
\alias{assign_parameters.default}
\title{conversion helper}
\usage{
\method{assign_parameters}{default}(
x,
infiltration = NULL,
subcatchment = NULL,
subcatchment_typologies = NULL,... |
\name{draw.pv.ctt}
\alias{draw.pv.ctt}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Plausible Value Imputation Using a Known Measurement Error Variance
(Based on Classical Test Theory)
}
\description{
This function provides unidimensional plausible value imputation with a
known meas... | /man/draw.pv.ctt.Rd | no_license | cksun/miceadds | R | false | false | 3,928 | rd | \name{draw.pv.ctt}
\alias{draw.pv.ctt}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Plausible Value Imputation Using a Known Measurement Error Variance
(Based on Classical Test Theory)
}
\description{
This function provides unidimensional plausible value imputation with a
known meas... |
nCut <- 20
myYearG3 <- "2016-2018"
# RACE --------------------------------------------------------------------------------------------------------------------------
raceTest <- datCounty_RE %>%
filter(raceCode != "Multi-NH") %>%
filter(Ndeaths > nCut ) %>%
select(-... | /myCBD/myFunctions/make_DISPARITY_DATA.R | no_license | CDPHrusers/CACommunityBurden | R | false | false | 5,927 | r | nCut <- 20
myYearG3 <- "2016-2018"
# RACE --------------------------------------------------------------------------------------------------------------------------
raceTest <- datCounty_RE %>%
filter(raceCode != "Multi-NH") %>%
filter(Ndeaths > nCut ) %>%
select(-... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_get_gandk.R
\name{get_gandk}
\alias{get_gandk}
\title{G and k model}
\usage{
get_gandk()
}
\value{
The list contains rprior, dprior (generate and evaluate the density of prior distribution),
generate_randomness (generate data-generating... | /man/get_gandk.Rd | no_license | ramcqueary/winference | R | false | true | 660 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_get_gandk.R
\name{get_gandk}
\alias{get_gandk}
\title{G and k model}
\usage{
get_gandk()
}
\value{
The list contains rprior, dprior (generate and evaluate the density of prior distribution),
generate_randomness (generate data-generating... |
# install.packages("quanteda")
# install.packages("readr")
# install.packages("RWeka")
library("quanteda")
library("readr")
library("RWeka")
#Dictionnaire des éléments taggés
# Train ngram Mot--------------------------------------------------
#Reviews non tagged negative
cheminN <-"Datasets/reviews-tagged/train-ta... | /Scripts_dictionnaire/ngramsDictTagged.R | no_license | limsamh/Project-Text-Mining | R | false | false | 4,285 | r | # install.packages("quanteda")
# install.packages("readr")
# install.packages("RWeka")
library("quanteda")
library("readr")
library("RWeka")
#Dictionnaire des éléments taggés
# Train ngram Mot--------------------------------------------------
#Reviews non tagged negative
cheminN <-"Datasets/reviews-tagged/train-ta... |
#将基因分成不同的基因sets然后画图--18.12.23
annotLookup2 <- read.table("annotation.table",header = T)
human_gene <- read.table("mouse2human_ensembl_gene_id.table",header = T)
fib1 <- read.delim("RNASeqFIB_Replicate1.tab.tsv",header=T,row.names=1,check.names=FALSE,sep=" ")
fib2 <- read.delim("RNASeqFIB_Replicate2.tab.tsv"... | /Analysis/Zhisheng/violin plots for selected gene sets/violin1226_linear_slope.R | no_license | carey-lab/ProliferationMitochondriaHeterogeneity | R | false | false | 90,374 | r |
#将基因分成不同的基因sets然后画图--18.12.23
annotLookup2 <- read.table("annotation.table",header = T)
human_gene <- read.table("mouse2human_ensembl_gene_id.table",header = T)
fib1 <- read.delim("RNASeqFIB_Replicate1.tab.tsv",header=T,row.names=1,check.names=FALSE,sep=" ")
fib2 <- read.delim("RNASeqFIB_Replicate2.tab.tsv"... |
#Machine Learning USe CAse: German Credit DATA
library("data.table")
library("mlr3")
library("mlr3learners")
library("mlr3viz")
library("ggplot2")
#The goal is to classify people by their credit risk (good or bad)
#using 20 personal, demographic and financial features:
#Importing data
... | /GermanCredit.R | no_license | crisortiz92/exampleML_GermanCredit | R | false | false | 5,573 | r | #Machine Learning USe CAse: German Credit DATA
library("data.table")
library("mlr3")
library("mlr3learners")
library("mlr3viz")
library("ggplot2")
#The goal is to classify people by their credit risk (good or bad)
#using 20 personal, demographic and financial features:
#Importing data
... |
# checkEnds.R
#' checkEnds
#'
#' \code{checkEnds} Utility to check source files for the presence of
#' an \code{# [END]} comment.
#'
#' @section Details: whenever \code{# [END]} comments are used in a project, ALL
#' source files MUST include this tag. The function checks all files with an
#' \code{.R} extension recur... | /dev/checkEnds.R | permissive | skoestlmeier/qqid | R | false | false | 2,245 | r | # checkEnds.R
#' checkEnds
#'
#' \code{checkEnds} Utility to check source files for the presence of
#' an \code{# [END]} comment.
#'
#' @section Details: whenever \code{# [END]} comments are used in a project, ALL
#' source files MUST include this tag. The function checks all files with an
#' \code{.R} extension recur... |
#' @title Cumulative frequency analysis
#' @description Function used to calculate the frequency, percentage, cumulative
#' frequency and cumulative percentage for each health profile in an KHQ5D dataset
#' @param scores data.frame with colnames RL, PL, SL, E, and S representing
#' Role limitation, Physic... | /R/KHQ5DFreq.R | permissive | cran/KHQ | R | false | false | 6,114 | r |
#' @title Cumulative frequency analysis
#' @description Function used to calculate the frequency, percentage, cumulative
#' frequency and cumulative percentage for each health profile in an KHQ5D dataset
#' @param scores data.frame with colnames RL, PL, SL, E, and S representing
#' Role limitation, Physic... |
#######################################################################
#
# Loading Packages
#
#######################################################################
library(readxl)
library(tidyverse)
library(lubridate)
library(zoo)
library(ggmap)
library(here)
library(geosphere)
########################... | /03 Data Tidying/01 Geocoding Petrol Data.R | no_license | felipemonroy/Spatial-Analysis--Petrol-Price | R | false | false | 7,128 | r | #######################################################################
#
# Loading Packages
#
#######################################################################
library(readxl)
library(tidyverse)
library(lubridate)
library(zoo)
library(ggmap)
library(here)
library(geosphere)
########################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add.R, R/add_.R
\name{e_sankey}
\alias{e_sankey}
\alias{e_sankey_}
\title{Sankey}
\usage{
e_sankey(
e,
source,
target,
value,
layout = "none",
rm_x = TRUE,
rm_y = TRUE,
...
)
e_sankey_(
e,
source,
target,
value,
lay... | /man/e_sankey.Rd | permissive | JohnCoene/echarts4r | R | false | true | 1,188 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add.R, R/add_.R
\name{e_sankey}
\alias{e_sankey}
\alias{e_sankey_}
\title{Sankey}
\usage{
e_sankey(
e,
source,
target,
value,
layout = "none",
rm_x = TRUE,
rm_y = TRUE,
...
)
e_sankey_(
e,
source,
target,
value,
lay... |
#advanve scatterplots
set.seed(67)
x= rnorm(10,5,7)
y= rpois(10,7)
z=rnorm(10,6,7)
t= rpois(10,9)
#at first we create a simple scatterplot
plot(x,y,col=123, pch=10, main="Multi scatterplot",
col.main="red",cex.main=1.5, xlab = "indep",ylab = "depend")
#now add another layer of our scatterplot
points(... | /AdvanceScatterplot_Legends.R | no_license | tanvisenjaliya/Introduction_to_R | R | false | false | 1,438 | r | #advanve scatterplots
set.seed(67)
x= rnorm(10,5,7)
y= rpois(10,7)
z=rnorm(10,6,7)
t= rpois(10,9)
#at first we create a simple scatterplot
plot(x,y,col=123, pch=10, main="Multi scatterplot",
col.main="red",cex.main=1.5, xlab = "indep",ylab = "depend")
#now add another layer of our scatterplot
points(... |
#' Imputation by random forests
#'
#' Imputes univariate missing data using random forests.
#'
#' @aliases mice.impute.rf
#' @inheritParams mice.impute.pmm
#' @param ntree The number of trees to grow. The default is 10.
#' @param rfPackage A single string specifying the backend for estimating the
#' random forest. The ... | /R/mice.impute.rf.R | no_license | carpenitoThomas/mice | R | false | false | 4,762 | r | #' Imputation by random forests
#'
#' Imputes univariate missing data using random forests.
#'
#' @aliases mice.impute.rf
#' @inheritParams mice.impute.pmm
#' @param ntree The number of trees to grow. The default is 10.
#' @param rfPackage A single string specifying the backend for estimating the
#' random forest. The ... |
rm(list=ls())
setwd("C:/Users/Alicia/Documents/GitHub/FL_Carbon")
envdata<-read.csv("LongleafRemeasEnvData.csv", header=T, sep=",")
setwd("C:/Users/Alicia/Desktop/FL")
load("longleaf_remeas_start.Rdata")
load("longleaf_remeas_end.Rdata")
envdata$SOILGRIDS_C_AVG<-((envdata$SOC0_5_NAD/10)*(1/3))+((envdata$SOC5_15NAD... | /Longleaf Remeasurment/LLmortPlotCalc.R | no_license | alformanack/FL_Carbon | R | false | false | 6,940 | r | rm(list=ls())
setwd("C:/Users/Alicia/Documents/GitHub/FL_Carbon")
envdata<-read.csv("LongleafRemeasEnvData.csv", header=T, sep=",")
setwd("C:/Users/Alicia/Desktop/FL")
load("longleaf_remeas_start.Rdata")
load("longleaf_remeas_end.Rdata")
envdata$SOILGRIDS_C_AVG<-((envdata$SOC0_5_NAD/10)*(1/3))+((envdata$SOC5_15NAD... |
#' Factor scatter chart
#'
#' Use this function to create scatter plot with both x-axis and y-axis containing numeric variables
#' and with an optional color variable which is a factor variable
#'
#' @author Vedha Viyash
#'
#' @param plot_data This is the data.frame which will be used for the plot
#' @param x... | /R/numeric_scatter_chart.R | no_license | vedhav/tidycharts | R | false | false | 5,485 | r | #' Factor scatter chart
#'
#' Use this function to create scatter plot with both x-axis and y-axis containing numeric variables
#' and with an optional color variable which is a factor variable
#'
#' @author Vedha Viyash
#'
#' @param plot_data This is the data.frame which will be used for the plot
#' @param x... |
library(matlab)
par(family="HiraMaruProN-W4")
for ( i in 1001:1100 ) {
png( paste ("v",i,".png",sep=""),400,400)
par(mai=rep(0,4))
qqplot(0:1500/1500,runif(1000),xlim=0:1,ylim=0:1,type="s",lwd=3,xaxs="i",yaxs="i")
abline(0,1)
points(meshgrid(0:4/4,0:4/4) , pch=3,cex=3,col="gray70")
points(meshgrid(0:20/20,0:20/... | /unif1000qqplots.R | no_license | tulamili/r-snippets | R | false | false | 1,056 | r | library(matlab)
par(family="HiraMaruProN-W4")
for ( i in 1001:1100 ) {
png( paste ("v",i,".png",sep=""),400,400)
par(mai=rep(0,4))
qqplot(0:1500/1500,runif(1000),xlim=0:1,ylim=0:1,type="s",lwd=3,xaxs="i",yaxs="i")
abline(0,1)
points(meshgrid(0:4/4,0:4/4) , pch=3,cex=3,col="gray70")
points(meshgrid(0:20/20,0:20/... |
% Generated by roxygen2 (4.1.0.9001): do not edit by hand
% Please edit documentation in R/manipulateIPA.R
\name{manipulateIPA}
\alias{manipulateIPA}
\title{Perform interactive pathway analysis on rna and metabolite datasets}
\usage{
manipulateIPA(geneResult = NULL, metaboliteResult = NULL, method,
countThreshold = 2... | /man/manipulateIPA.Rd | no_license | rramaker/IntegratedPathTools | R | false | false | 2,861 | rd | % Generated by roxygen2 (4.1.0.9001): do not edit by hand
% Please edit documentation in R/manipulateIPA.R
\name{manipulateIPA}
\alias{manipulateIPA}
\title{Perform interactive pathway analysis on rna and metabolite datasets}
\usage{
manipulateIPA(geneResult = NULL, metaboliteResult = NULL, method,
countThreshold = 2... |
pwr<-read.csv("household_power_consumption.txt", sep = ";")
date1 <- as.Date(pwr$Date, "%d/%m/%Y")
DATE1 <- as.Date("01/02/2007", "%d/%m/%Y")
DATE2 <- as.Date("02/02/2007", "%d/%m/%Y")
spwr <- subset(pwr, date1>=DATE1 & date1<=DATE2)
spwr[,3]<-as.numeric(as.character(spwr[,3]))
z = c(1,1441,2880)
zl = c("Thu","Fri","Sa... | /plot2.R | no_license | burubaxair/ExData_Plotting1 | R | false | false | 515 | r | pwr<-read.csv("household_power_consumption.txt", sep = ";")
date1 <- as.Date(pwr$Date, "%d/%m/%Y")
DATE1 <- as.Date("01/02/2007", "%d/%m/%Y")
DATE2 <- as.Date("02/02/2007", "%d/%m/%Y")
spwr <- subset(pwr, date1>=DATE1 & date1<=DATE2)
spwr[,3]<-as.numeric(as.character(spwr[,3]))
z = c(1,1441,2880)
zl = c("Thu","Fri","Sa... |
#' A model comparison toolkit.
#' \code{LCTMcompare}
#'
#' The function LCTMcompare gives a summary of comparison between fitted LCTM models.
#'
#' @param modelA is the output from hlme() R model or model is the output of SASmodelbuilder(oe, os, op, of) passed through it
#' @param modelB the model to be compared which ... | /R/LCTMcompare.R | no_license | chandryou/LCTMtools | R | false | false | 2,882 | r | #' A model comparison toolkit.
#' \code{LCTMcompare}
#'
#' The function LCTMcompare gives a summary of comparison between fitted LCTM models.
#'
#' @param modelA is the output from hlme() R model or model is the output of SASmodelbuilder(oe, os, op, of) passed through it
#' @param modelB the model to be compared which ... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-1.72131968218895e+83, -7.88781071482505e+93, 1.0823131123826e-105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615846100-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 782 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-1.72131968218895e+83, -7.88781071482505e+93, 1.0823131123826e-105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253... |
Age.labels <- c('Total', '0', '1-4', '5-9', '10-14','15-19','20-24','25-29',
'30-34','35-39','40-44','45-49','50-54','55-59','60-64','65-69',
'70-74','75-79','80-84')
Category.labels <- c(
'Smoking related cancer',
'Non-Smoking related cancer',
'Cardiovascular',
'Respiratory-Infectious',
'Respiratory-No... | /R/Sensitivity Analysis/Functions_Sensitivity.R | permissive | jmaburto/Lifespan-inequality-Denmark | R | false | false | 2,886 | r |
Age.labels <- c('Total', '0', '1-4', '5-9', '10-14','15-19','20-24','25-29',
'30-34','35-39','40-44','45-49','50-54','55-59','60-64','65-69',
'70-74','75-79','80-84')
Category.labels <- c(
'Smoking related cancer',
'Non-Smoking related cancer',
'Cardiovascular',
'Respiratory-Infectious',
'Respiratory-No... |
# plots correaltion scatter-plot with the abline: colonic butyrate ~ liver
# CONTROLS
# Coefficients:
# Estimate SE t-value Pr(>|t|)
# (Intercept) 2.130286 0.089043 23.92 9.36e-13 ***
# butyrate_CD$butyrate 0.045983 0.005872 7.83 1.76e-06 ***
# Adjusted R-squ... | /Fig-S2C.R | no_license | stan-iakhno/FON11A | R | false | false | 2,193 | r | # plots correaltion scatter-plot with the abline: colonic butyrate ~ liver
# CONTROLS
# Coefficients:
# Estimate SE t-value Pr(>|t|)
# (Intercept) 2.130286 0.089043 23.92 9.36e-13 ***
# butyrate_CD$butyrate 0.045983 0.005872 7.83 1.76e-06 ***
# Adjusted R-squ... |
#!/usr/bin/env RScript
pacman::p_load(treedater)
args <- c()
path1 <- snakemake@input[[1]]
path2 <- snakemake@input[[2]]
alpha <- as.double(snakemake@params[[1]])
ncpu <- as.integer(snakemake@params[[2]])
out <- snakemake@output[[1]]
tree <- read.tree(path1)
date <- sampleYearsFromLabels(tree$tip.label, regex = "... | /workflow/scripts/outliers.R | permissive | dnanto/proposal | R | false | false | 799 | r | #!/usr/bin/env RScript
pacman::p_load(treedater)
args <- c()
path1 <- snakemake@input[[1]]
path2 <- snakemake@input[[2]]
alpha <- as.double(snakemake@params[[1]])
ncpu <- as.integer(snakemake@params[[2]])
out <- snakemake@output[[1]]
tree <- read.tree(path1)
date <- sampleYearsFromLabels(tree$tip.label, regex = "... |
context('conversion functions')
test_that('tas_conversion', {
# Check to see that it works as expected with a single input
input <- 273
out <- tas_conversion(input)
expect_equal(input, out + 273.15)
# Check to see that it works with a matrix input
input <- matrix(data = rep(273), nrow = 4, ncol = 5... | /tests/testthat/testthat_conversion_functions.R | no_license | JGCRI/an2month | R | false | false | 1,603 | r |
context('conversion functions')
test_that('tas_conversion', {
# Check to see that it works as expected with a single input
input <- 273
out <- tas_conversion(input)
expect_equal(input, out + 273.15)
# Check to see that it works with a matrix input
input <- matrix(data = rep(273), nrow = 4, ncol = 5... |
#Aufgabe 5.4
x <- c(-5, -4, 1, 3, 6)
p <- c(0.3, 0.1,0.1, 0.2, 0.3)
p_mal_x <- x*p
p_mal_x
erwartungswert <- sum(p_mal_x)
erwartungswert
#Aufgabe 5.5
x <- c(2:12)
x
p <- 1/36*c(1,2,3,4,5,6,5,4,3,2,1)
p
erwartungswert <- sum(x*p)
erwartungswert
varianzvektor <- (x-erwartungswert)^2*p
varianzvektor
varianz <- sum(var... | /SW05/serie_05_exercise.R | no_license | GutManuel85/ASTAT | R | false | false | 376 | r | #Aufgabe 5.4
x <- c(-5, -4, 1, 3, 6)
p <- c(0.3, 0.1,0.1, 0.2, 0.3)
p_mal_x <- x*p
p_mal_x
erwartungswert <- sum(p_mal_x)
erwartungswert
#Aufgabe 5.5
x <- c(2:12)
x
p <- 1/36*c(1,2,3,4,5,6,5,4,3,2,1)
p
erwartungswert <- sum(x*p)
erwartungswert
varianzvektor <- (x-erwartungswert)^2*p
varianzvektor
varianz <- sum(var... |
#Упражнение 3.1
impLab <- read.csv("FGLab.csv",stringsAsFactors = F,row.names = 1)
Manlab <- impLab[impLab$Пол=='муж',c('Имя','Рост')]
Manlab
#Упражнение 3.2
NameLab <- impLab[c(-2,-6), "Имя",drop=F]
NameLab
#Упражнение 3.3
sr <- impLab[impLab$Пол=='жен','Рост']
mean(sr)
#Упражнение 3.4
namem... | /Uprajnenine3.R | no_license | Code-sto/EVM | R | false | false | 526 | r | #Упражнение 3.1
impLab <- read.csv("FGLab.csv",stringsAsFactors = F,row.names = 1)
Manlab <- impLab[impLab$Пол=='муж',c('Имя','Рост')]
Manlab
#Упражнение 3.2
NameLab <- impLab[c(-2,-6), "Имя",drop=F]
NameLab
#Упражнение 3.3
sr <- impLab[impLab$Пол=='жен','Рост']
mean(sr)
#Упражнение 3.4
namem... |
# Take bed files for each plate and turn into counts file.
# This iis an example using DCM1R1
files<-list.files()
DCM1R1files<-files[grep("_counts.bed.gz", files)]
DCM1R1 <- read.table(DCM1R1files[1], as.is=TRUE, header=FALSE, sep="\t")
DCM1R1counts <- as.data.frame(DCM1R1[,13], row.names = DCM1R1[,4])
for (i in 2:len... | /Deep/bed2GeneCounts.R | permissive | piquelab/GxExC | R | false | false | 772 | r | # Take bed files for each plate and turn into counts file.
# This iis an example using DCM1R1
files<-list.files()
DCM1R1files<-files[grep("_counts.bed.gz", files)]
DCM1R1 <- read.table(DCM1R1files[1], as.is=TRUE, header=FALSE, sep="\t")
DCM1R1counts <- as.data.frame(DCM1R1[,13], row.names = DCM1R1[,4])
for (i in 2:len... |
robu.custom <- function(formula, data, studynum,var.eff.size, userweights,
modelweights = c("CORR", "HIER"), rho = 0.8,
small = TRUE, userdfs = NULL, ...) {
# Evaluate model weighting scheme.
modelweights <- match.arg(modelweights)
if (modelweights == "CORR" &... | /Code/Utilities/robu.custom.r | no_license | timesler/AttachmentStabilityMetaAnalysis_Opie2019 | R | false | false | 21,031 | r |
robu.custom <- function(formula, data, studynum,var.eff.size, userweights,
modelweights = c("CORR", "HIER"), rho = 0.8,
small = TRUE, userdfs = NULL, ...) {
# Evaluate model weighting scheme.
modelweights <- match.arg(modelweights)
if (modelweights == "CORR" &... |
if (!require("shiny")) {
install.packages("shiny")
library(shiny)
}
if (!require("shinyWidgets")) {
install.packages("shinyWidgets")
library(shinyWidgets)
}
if (!require("shinythemes")) {
install.packages("shinythemes")
library(shinythemes)
}
if (!require("leaflet")) {
install.packages("leaflet")
libra... | /15-Spring2023/Projects_StarterCodes/Project2-ShinyApp/app/ui.R | no_license | TZstatsADS/ADS_Teaching | R | false | false | 3,751 | r |
if (!require("shiny")) {
install.packages("shiny")
library(shiny)
}
if (!require("shinyWidgets")) {
install.packages("shinyWidgets")
library(shinyWidgets)
}
if (!require("shinythemes")) {
install.packages("shinythemes")
library(shinythemes)
}
if (!require("leaflet")) {
install.packages("leaflet")
libra... |
# The following R script can be submitted on the ND CRC cluster using the job script (after customization)
# in the "jobs" folder
setwd('~/RW-2-BIO')
# load model run details
source('sites/HARVARD/inst/config.R')
# load needed function
source('R/process_rw_model.R')
require(reshape2)
.libPaths('~/Rlibs')
# pre... | /sites/HARVARD/inst/process_model_HARVARD.R | no_license | PalEON-Project/RW-2-BIO | R | false | false | 626 | r |
# The following R script can be submitted on the ND CRC cluster using the job script (after customization)
# in the "jobs" folder
setwd('~/RW-2-BIO')
# load model run details
source('sites/HARVARD/inst/config.R')
# load needed function
source('R/process_rw_model.R')
require(reshape2)
.libPaths('~/Rlibs')
# pre... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.