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
#shiny app allows users to load data from an Excel template to update a master Google sheet # Kevin Little, Ph.D. Informing Ecological Design, LLC June-Sept 2016 library(Rcpp) library(ggplot2) library(scales) library(grid) library(gridExtra) library(gtable) library(GGally) # library(plyr) library(dplyr) library(resh...
/global.R
no_license
klittle314/test_modify_file
R
false
false
4,728
r
#shiny app allows users to load data from an Excel template to update a master Google sheet # Kevin Little, Ph.D. Informing Ecological Design, LLC June-Sept 2016 library(Rcpp) library(ggplot2) library(scales) library(grid) library(gridExtra) library(gtable) library(GGally) # library(plyr) library(dplyr) library(resh...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RepRev.R \name{repRev} \alias{repRev} \title{Continuous interactive session with rb.exe} \usage{ repRev( path = revEnv$RevPath, useHistory = T, viewCode = F, coerce = F, use_wd = T, sleep = NULL ) } \arguments{ \item{path}{Path to...
/man/repRev.Rd
no_license
pyspider/Revticulate
R
false
true
1,651
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RepRev.R \name{repRev} \alias{repRev} \title{Continuous interactive session with rb.exe} \usage{ repRev( path = revEnv$RevPath, useHistory = T, viewCode = F, coerce = F, use_wd = T, sleep = NULL ) } \arguments{ \item{path}{Path to...
#' Annotate areas with circles #' #' This geom lets you annotate sets of points via circles. The enclosing circles #' are calculated at draw time and the most optimal enclosure at the given #' aspect ratio is thus guaranteed. As with the other `geom_mark_*` geoms the #' enclosure inherits from [geom_shape()] and defaul...
/R/mark_circle.R
permissive
teunbrand/ggforce
R
false
false
15,008
r
#' Annotate areas with circles #' #' This geom lets you annotate sets of points via circles. The enclosing circles #' are calculated at draw time and the most optimal enclosure at the given #' aspect ratio is thus guaranteed. As with the other `geom_mark_*` geoms the #' enclosure inherits from [geom_shape()] and defaul...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-specvis_dict.R \docType{data} \name{specvis_dict} \alias{specvis_dict} \title{Dictionary for metadata} \description{ Dictionary specifying the definitions of metadata. } \author{ Thomas White \email{thomas.white026@gmail.com} } \keyword{...
/man/specvis_dict.Rd
no_license
thomased/spec.vis
R
false
true
326
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-specvis_dict.R \docType{data} \name{specvis_dict} \alias{specvis_dict} \title{Dictionary for metadata} \description{ Dictionary specifying the definitions of metadata. } \author{ Thomas White \email{thomas.white026@gmail.com} } \keyword{...
# Reaction.R # /** # * Reaction models an autocatalytic oscillating chemical reaction # * (Brusselator model) by implementing the ODE interface. # * @author Wolfgang Christian # * @version 1.0 # * Converted to R by: Alfonso R. Reyes # # */ setClass("Reaction", slots = c( k1 = "numeric", k2 = "n...
/inst/examples/Reaction.R
no_license
cran/rODE
R
false
false
1,494
r
# Reaction.R # /** # * Reaction models an autocatalytic oscillating chemical reaction # * (Brusselator model) by implementing the ODE interface. # * @author Wolfgang Christian # * @version 1.0 # * Converted to R by: Alfonso R. Reyes # # */ setClass("Reaction", slots = c( k1 = "numeric", k2 = "n...
#' @title Arrange list of plots as grid #' @name plot_grid #' #' @description Plot multiple ggplot-objects as a grid-arranged single plot. #' #' @param x A list of ggplot-objects. See 'Details'. #' @param margin A numeric vector of length 4, indicating the top, right, bottom #' and left margin for each plot, in ...
/R/plot_grid.R
no_license
AnxietyVendor/sjPlot
R
false
false
2,862
r
#' @title Arrange list of plots as grid #' @name plot_grid #' #' @description Plot multiple ggplot-objects as a grid-arranged single plot. #' #' @param x A list of ggplot-objects. See 'Details'. #' @param margin A numeric vector of length 4, indicating the top, right, bottom #' and left margin for each plot, in ...
library(seriation) ### Name: seriation_data ### Title: Create Simulated Data for Seriation Evaluation ### Aliases: create_lines_data create_ordered_data ### Keywords: data ### ** Examples ## lines data set from Havens and Bezdek (2011) x <- create_lines_data(250) plot(x, xlim=c(-5,5), ylim=c(-3,3), cex=.2, col = a...
/data/genthat_extracted_code/seriation/examples/data.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,839
r
library(seriation) ### Name: seriation_data ### Title: Create Simulated Data for Seriation Evaluation ### Aliases: create_lines_data create_ordered_data ### Keywords: data ### ** Examples ## lines data set from Havens and Bezdek (2011) x <- create_lines_data(250) plot(x, xlim=c(-5,5), ylim=c(-3,3), cex=.2, col = a...
library(unmarked) library(MuMIn) library(rgdal) library(rgeos) library(foreign) library(foreach) source("f.AIC_cut.occu.sig.used.15.10.23.R") source("getDesign.R") ObsCovarSet <- c("DAY", "TIME", "COUNT_TYPE", "EFFORT_HRS", "EFFORT_DISTANCE_KM", "NUMBER_OBSERVERS") covar <- read.csv("./input/eBird_occu_covar_site_...
/occu_models/EVGR_eBird.R
no_license
ricschuster/Tradeoffs-biodiversity-cost
R
false
false
4,338
r
library(unmarked) library(MuMIn) library(rgdal) library(rgeos) library(foreign) library(foreach) source("f.AIC_cut.occu.sig.used.15.10.23.R") source("getDesign.R") ObsCovarSet <- c("DAY", "TIME", "COUNT_TYPE", "EFFORT_HRS", "EFFORT_DISTANCE_KM", "NUMBER_OBSERVERS") covar <- read.csv("./input/eBird_occu_covar_site_...
#' @title Create a Feature Object #' #' @description #' Create a \code{\link{FeatureObject}}, which will be used as input for all #' the feature computations. #' #' @param init [\code{\link{data.frame}}]\cr #' A \code{data.frame}, which can be used as initial design. If not provided, #' it will be created eithe...
/R/createFeatureObject.R
no_license
hansterc/flacco
R
false
false
9,391
r
#' @title Create a Feature Object #' #' @description #' Create a \code{\link{FeatureObject}}, which will be used as input for all #' the feature computations. #' #' @param init [\code{\link{data.frame}}]\cr #' A \code{data.frame}, which can be used as initial design. If not provided, #' it will be created eithe...
D <- 800 # Diâmetro do círculo loops <- 30000 # Pontos no círculo passo <- 1 # Distância percorrida por cada passo do ponto em direção ao centro gravitacional. # Consequence m <- matrix(rep(0, D^2), nrow=D) r <- D*0.4 atual_i <- D/2 atual_j <- D/2 m[atual_i, atual_j] <- 1 # Indica o primeiro centro de massa vetor_i <-...
/Jumping_circular.R
no_license
rnahumaf/Fractal
R
false
false
1,822
r
D <- 800 # Diâmetro do círculo loops <- 30000 # Pontos no círculo passo <- 1 # Distância percorrida por cada passo do ponto em direção ao centro gravitacional. # Consequence m <- matrix(rep(0, D^2), nrow=D) r <- D*0.4 atual_i <- D/2 atual_j <- D/2 m[atual_i, atual_j] <- 1 # Indica o primeiro centro de massa vetor_i <-...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/io.r \name{plate.warnings} \alias{plate.warnings} \title{Show any plate-level warnings associated with a \code{\link{gitter}} data object} \usage{ plate.warnings(dat) } \arguments{ \item{dat}{The data.frame produced by \code{\link{git...
/man/plate.warnings.Rd
no_license
cran/gitter
R
false
false
632
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/io.r \name{plate.warnings} \alias{plate.warnings} \title{Show any plate-level warnings associated with a \code{\link{gitter}} data object} \usage{ plate.warnings(dat) } \arguments{ \item{dat}{The data.frame produced by \code{\link{git...
#' Traffic Volume Converted to Peak Hour #' #' This function calculates traffic volume converted to peak hour(vph) by using PHF(peak hour factor). #' It follows <Formula 2-7> in KHCM(2013), p.17, 30. #' @param v Current or future traffic volume(vph). It must be positive. See \code{\link{DDHV}}. #' @param PHF Peak Ho...
/R/V_P_expwy_basic.R
no_license
regenesis90/KHCMinR
R
false
false
819
r
#' Traffic Volume Converted to Peak Hour #' #' This function calculates traffic volume converted to peak hour(vph) by using PHF(peak hour factor). #' It follows <Formula 2-7> in KHCM(2013), p.17, 30. #' @param v Current or future traffic volume(vph). It must be positive. See \code{\link{DDHV}}. #' @param PHF Peak Ho...
#' @importFrom utils getFromNamespace #' @import bain parse_hypothesis <- getFromNamespace("parse_hypothesis", "bain") constraint_to_equation <- getFromNamespace("constraint_to_equation", "bain") constraint_to_row <- getFromNamespace("constraint_to_row", "bain") expand_compound_constraints <- getFromNamespace("expand_c...
/R/import_parser.R
no_license
cjvanlissa/gorica
R
false
false
803
r
#' @importFrom utils getFromNamespace #' @import bain parse_hypothesis <- getFromNamespace("parse_hypothesis", "bain") constraint_to_equation <- getFromNamespace("constraint_to_equation", "bain") constraint_to_row <- getFromNamespace("constraint_to_row", "bain") expand_compound_constraints <- getFromNamespace("expand_c...
context("SQL translation") test_that("Simple maths is correct", { expect_equal(translate_sql(1 + 2), sql("1.0 + 2.0")) expect_equal(translate_sql(2 * 4), sql("2.0 * 4.0")) expect_equal(translate_sql(5 ^ 2), sql("POWER(5.0, 2.0)")) expect_equal(translate_sql(100L %% 3L), sql("100 % 3")) }) test_that("small num...
/tests/testthat/test-sql-translation.r
no_license
garrettgman/dplyr
R
false
false
5,423
r
context("SQL translation") test_that("Simple maths is correct", { expect_equal(translate_sql(1 + 2), sql("1.0 + 2.0")) expect_equal(translate_sql(2 * 4), sql("2.0 * 4.0")) expect_equal(translate_sql(5 ^ 2), sql("POWER(5.0, 2.0)")) expect_equal(translate_sql(100L %% 3L), sql("100 % 3")) }) test_that("small num...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DBNSMILER_Public_Network.R \name{editrules} \alias{editrules} \title{editrules} \usage{ editrules(action, rules, rulesrow, sr) } \arguments{ \item{action}{- 'add', 'modify', 'remove', 'mvup', 'mvdown'} \item{rules}{table (data frame)} \item...
/man/editrules.Rd
permissive
paul1010/DBNSMILER
R
false
true
774
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DBNSMILER_Public_Network.R \name{editrules} \alias{editrules} \title{editrules} \usage{ editrules(action, rules, rulesrow, sr) } \arguments{ \item{action}{- 'add', 'modify', 'remove', 'mvup', 'mvdown'} \item{rules}{table (data frame)} \item...
library(tximport) library(data.table) library(DESeq2) library(textshape) library(ggplot2) ##count reads that map onto asw and mh for each sample ##Import table describing samples sample_data <- fread("data/sample_key.csv", header=TRUE) setkey(sample_data, Sample_name) ##Find all salmon quant files quant_files <- list...
/scripts/dds_mapped_read_counts.R
no_license
sarahinwood/individual-sample-transcriptomes
R
false
false
5,354
r
library(tximport) library(data.table) library(DESeq2) library(textshape) library(ggplot2) ##count reads that map onto asw and mh for each sample ##Import table describing samples sample_data <- fread("data/sample_key.csv", header=TRUE) setkey(sample_data, Sample_name) ##Find all salmon quant files quant_files <- list...
vcontext("minor-breaks") p <- ggplot(NULL, aes(1:3, 1:3)) + geom_point() + scale_x_continuous(breaks = 1:3, minor_breaks = c(1.25, 2.75)) + scale_y_continuous(breaks = 1:3, minor_breaks = c(1.25, 2.75)) p save_vtest("manual minor breaks") p + coord_polar() save_vtest("manual minor breaks with coord_polar") set.s...
/visual_test/minor-breaks.r
no_license
pricky2903/ggplot2
R
false
false
1,275
r
vcontext("minor-breaks") p <- ggplot(NULL, aes(1:3, 1:3)) + geom_point() + scale_x_continuous(breaks = 1:3, minor_breaks = c(1.25, 2.75)) + scale_y_continuous(breaks = 1:3, minor_breaks = c(1.25, 2.75)) p save_vtest("manual minor breaks") p + coord_polar() save_vtest("manual minor breaks with coord_polar") set.s...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sync_test_si.R \name{sync.project} \alias{sync.project} \title{Checks the synchronization project and runs scripts needed for synchronization} \usage{ sync.project(project.id = get.project(), ask = FALSE) } \arguments{ \item{project.id}{is pr...
/man/sync.project.Rd
no_license
bokov/adapr
R
false
true
645
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sync_test_si.R \name{sync.project} \alias{sync.project} \title{Checks the synchronization project and runs scripts needed for synchronization} \usage{ sync.project(project.id = get.project(), ask = FALSE) } \arguments{ \item{project.id}{is pr...
tabPanel("Motif Search", # Application title titlePanel("Motif Search"), # Place for uploading data sidebarLayout( sidebarPanel( h3("Upload meme files"), tags$div(tags$p( 'Currently meme files are accepted' ...
/inst/shiny/ui/ui_motif_enrichment.R
permissive
Zha0rong/EpiScope
R
false
false
948
r
tabPanel("Motif Search", # Application title titlePanel("Motif Search"), # Place for uploading data sidebarLayout( sidebarPanel( h3("Upload meme files"), tags$div(tags$p( 'Currently meme files are accepted' ...
# Binding and cleaning the Wisconsin and Minnesota Public Lands Surveys, data is # sourced from the Mladenoff Lab at the University of Wisconsin. The lab has # granted us permission to use the data, but not permission to distribute the # original datasets. A version of the Minnesota data can be obtained from # ...
/R/process_raw/deprecated/step.one.clean.bind_v1.3.R
permissive
SimonGoring/WitnessTrees
R
false
false
13,316
r
# Binding and cleaning the Wisconsin and Minnesota Public Lands Surveys, data is # sourced from the Mladenoff Lab at the University of Wisconsin. The lab has # granted us permission to use the data, but not permission to distribute the # original datasets. A version of the Minnesota data can be obtained from # ...
## Coursera Getting and Cleaning Data Course Project ## ## Jason Rodin ## 10/18/2017 # run_analysis.r File Description: # This script will perform the following steps on the UCI HAR Dataset downloaded from # https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip # 1. Merge the train...
/run_analysis.R
no_license
JasonRodin/Getting_and_Cleaning_Data_Course_Project
R
false
false
5,537
r
## Coursera Getting and Cleaning Data Course Project ## ## Jason Rodin ## 10/18/2017 # run_analysis.r File Description: # This script will perform the following steps on the UCI HAR Dataset downloaded from # https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip # 1. Merge the train...
w1 <- read.table("./data/w2utf8.dat",header = T,row.names = 1) head(data) w2 <- cor(w1) w2 plot(eigen(w2)$values) abline(h=1) eig <- eigen(w2) eig
/houdai_r/inshibu.R
no_license
ducksfrogs/masanariR
R
false
false
148
r
w1 <- read.table("./data/w2utf8.dat",header = T,row.names = 1) head(data) w2 <- cor(w1) w2 plot(eigen(w2)$values) abline(h=1) eig <- eigen(w2) eig
/outcome_measurement/tuberculosis/cod/snis_cas_enreg_2018_prep.R
no_license
ihmeuw/gf
R
false
false
3,089
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PERFect_perm.R \name{PERFect_perm} \alias{PERFect_perm} \title{Permutation PERFect filtering for microbiome data} \usage{ PERFect_perm(X, infocol = NULL, Order = "NP", Order.user = NULL, normalize = "counts", algorithm = "fast", center = ...
/man/PERFect_perm.Rd
no_license
cxquy91/PERFect
R
false
true
6,708
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PERFect_perm.R \name{PERFect_perm} \alias{PERFect_perm} \title{Permutation PERFect filtering for microbiome data} \usage{ PERFect_perm(X, infocol = NULL, Order = "NP", Order.user = NULL, normalize = "counts", algorithm = "fast", center = ...
sparkbars <- function(x, midpoint = 0, colors = FALSE) { lookup_bars <- c("0" = "\033[4m \033[24m", "1" = "\U2582", "2" = "\U2583", "3" = "\U2584", "4" = "\U2585", "5" = "\U2586", "6" = "\U2587", ...
/scripts/spark_bars.R
no_license
eliocamp/onda3
R
false
false
1,971
r
sparkbars <- function(x, midpoint = 0, colors = FALSE) { lookup_bars <- c("0" = "\033[4m \033[24m", "1" = "\U2582", "2" = "\U2583", "3" = "\U2584", "4" = "\U2585", "5" = "\U2586", "6" = "\U2587", ...
#reading the dataset df <- read.table("household_power_consumption.txt", sep=";", header=TRUE, na.strings = "?") #extract the two dates needed for plotting df<-df[df$Date %in% c("1/2/2007","2/2/2007"), ] #convert the Date for correct format time<-paste(df$Date,df$Time,sep=" ") time<-strptime(time,"%d/%m/%Y %H:%M:%S")...
/plot2.R
no_license
mikeyee/ExData_Plotting1
R
false
false
558
r
#reading the dataset df <- read.table("household_power_consumption.txt", sep=";", header=TRUE, na.strings = "?") #extract the two dates needed for plotting df<-df[df$Date %in% c("1/2/2007","2/2/2007"), ] #convert the Date for correct format time<-paste(df$Date,df$Time,sep=" ") time<-strptime(time,"%d/%m/%Y %H:%M:%S")...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prepare_trans_matrix.R \name{fill_trans_matrix_val} \alias{fill_trans_matrix_val} \title{Title This function embeds the all-cause mortality probabilities in the transition matrices} \usage{ fill_trans_matrix_val(trans_matrix, prob_of_dying) }...
/man/fill_trans_matrix_val.Rd
no_license
cran/CEAmarkov
R
false
true
560
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prepare_trans_matrix.R \name{fill_trans_matrix_val} \alias{fill_trans_matrix_val} \title{Title This function embeds the all-cause mortality probabilities in the transition matrices} \usage{ fill_trans_matrix_val(trans_matrix, prob_of_dying) }...
log <- function(...) { cat("[run_analysis.R] ", ..., "\n", sep="") } codebook <- function(...){ cat(..., "\n",file=targetCodebookFilePath,append=TRUE, sep="") } # Load the needed packages packages <- c("data.table", "reshape2", "dplyr") sapply(packages, require, character.only=TRUE, quietly=TRUE) #path <- getwd...
/try1/run_analysis.R
no_license
asmaljaberi/getting-and-cleaning-data
R
false
false
6,002
r
log <- function(...) { cat("[run_analysis.R] ", ..., "\n", sep="") } codebook <- function(...){ cat(..., "\n",file=targetCodebookFilePath,append=TRUE, sep="") } # Load the needed packages packages <- c("data.table", "reshape2", "dplyr") sapply(packages, require, character.only=TRUE, quietly=TRUE) #path <- getwd...
library(Rlabkey) ### Name: lsSchemas ### Title: List the available schemas ### Aliases: lsSchemas ### Keywords: file ### ** Examples ## No test: ## get a list of schemas available in the current session context # library(Rlabkey) lks<- getSession(baseUrl="http://localhost:8080/labkey", folderPath="/apisampl...
/data/genthat_extracted_code/Rlabkey/examples/lsSchemas.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
426
r
library(Rlabkey) ### Name: lsSchemas ### Title: List the available schemas ### Aliases: lsSchemas ### Keywords: file ### ** Examples ## No test: ## get a list of schemas available in the current session context # library(Rlabkey) lks<- getSession(baseUrl="http://localhost:8080/labkey", folderPath="/apisampl...
#the assumption is made that the data file has been downloaded and unzipped in the # working directory library(data.table) # read the file: power <-fread('household_power_consumption.txt', sep=';', na.strings='?') # keep only the relevant date interval: power <- power[power$Date == '1/2/2007' | power$Date == '2/2/2007'...
/plot1.R
no_license
IulianD/ExData_Plotting1
R
false
false
612
r
#the assumption is made that the data file has been downloaded and unzipped in the # working directory library(data.table) # read the file: power <-fread('household_power_consumption.txt', sep=';', na.strings='?') # keep only the relevant date interval: power <- power[power$Date == '1/2/2007' | power$Date == '2/2/2007'...
## makeCacheMatrix and cacheSolve work together to calculate and cache the inverse of a matrix ## making use of lexical scoping ## makeCacheMatrix accepts a matrix as input and returns a list of four functions ## two getters and two setters makeCacheMatrix <- function(x = matrix()) { in_verse <- NULL set <- funct...
/cachematrix.R
no_license
pwarejm/ProgrammingAssignment2
R
false
false
1,076
r
## makeCacheMatrix and cacheSolve work together to calculate and cache the inverse of a matrix ## making use of lexical scoping ## makeCacheMatrix accepts a matrix as input and returns a list of four functions ## two getters and two setters makeCacheMatrix <- function(x = matrix()) { in_verse <- NULL set <- funct...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/globalaccelerator_operations.R \name{globalaccelerator_list_listeners} \alias{globalaccelerator_list_listeners} \title{List the listeners for an accelerator} \usage{ globalaccelerator_list_listeners(AcceleratorArn, MaxResults, NextToken) } \a...
/paws/man/globalaccelerator_list_listeners.Rd
permissive
jcheng5/paws
R
false
true
997
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/globalaccelerator_operations.R \name{globalaccelerator_list_listeners} \alias{globalaccelerator_list_listeners} \title{List the listeners for an accelerator} \usage{ globalaccelerator_list_listeners(AcceleratorArn, MaxResults, NextToken) } \a...
uiMain <- fluidPage( # Application Theme theme = shinytheme("simplex"), useShinyjs(), #To allow JavaScript customization using RCode tags$head(tags$script(HTML(press_enter))), #Allow use of enter-key to introduce inputs # Application title titlePanel("All In One"), navbarPage( 'Select App', id = 'app',...
/Scripts/uiMain.R
no_license
irycisBioinfo/CrisPRAL
R
false
false
5,313
r
uiMain <- fluidPage( # Application Theme theme = shinytheme("simplex"), useShinyjs(), #To allow JavaScript customization using RCode tags$head(tags$script(HTML(press_enter))), #Allow use of enter-key to introduce inputs # Application title titlePanel("All In One"), navbarPage( 'Select App', id = 'app',...
\name{nb.alleles} \alias{nb.alleles} \title{Number of different alleles} \description{Counts the number of different alleles at each locus and population} \usage{nb.alleles(data,diploid=TRUE)} \arguments{ \item{data}{A data frame containing the population of origin in the first column and the genotypes in the fol...
/man/nb.alleles.rd
no_license
WLemieux03/hierfstat
R
false
false
707
rd
\name{nb.alleles} \alias{nb.alleles} \title{Number of different alleles} \description{Counts the number of different alleles at each locus and population} \usage{nb.alleles(data,diploid=TRUE)} \arguments{ \item{data}{A data frame containing the population of origin in the first column and the genotypes in the fol...
# Analysis # TODO: # Variable exists at any point in time # Variable exists in given time # "not[##]" variables # long difference? # models: [cross section], [within diff], [across diff] # REPORT # N time periods # N units BUFFER <- 5 mex_ind_ids <- c(11, 21, 23, 31, 42, 44, 48, 51, 61, 71, 81, 93) can_ind_ids <-...
/03_analysis/_archive/03_firm_panel/by_type_subsample.R
no_license
ramarty/Industry-Nighttime-Lights
R
false
false
8,254
r
# Analysis # TODO: # Variable exists at any point in time # Variable exists in given time # "not[##]" variables # long difference? # models: [cross section], [within diff], [across diff] # REPORT # N time periods # N units BUFFER <- 5 mex_ind_ids <- c(11, 21, 23, 31, 42, 44, 48, 51, 61, 71, 81, 93) can_ind_ids <-...
# Plots 4 data <- read.table(file = "household_power_consumption.txt", sep = ";", header = T, dec = ".", na.strings = "?", colClasses = c("character", "character", rep("numeric", 7))) dateTime <- paste(data$Date, " ", data$Time, sep = "") data <- cbind(data, dateTime) data$dateTi...
/plot4.R
no_license
Volfee/ExData_Plotting1
R
false
false
1,453
r
# Plots 4 data <- read.table(file = "household_power_consumption.txt", sep = ";", header = T, dec = ".", na.strings = "?", colClasses = c("character", "character", rep("numeric", 7))) dateTime <- paste(data$Date, " ", data$Time, sep = "") data <- cbind(data, dateTime) data$dateTi...
# Get CDC emsemble data for HRR Excel tool library(dplyr) library(openxlsx) library(ggplot2) quants <- c(0.5, 0.9, 0.975) # quantiles to consider from ensemble forecast NEstfips <- c('09','25','23','33','44','50', '36') # FIPS of states in New England + NY #hrrnums <- c(109,110,111,221,222,227,230,231,281,282,295,364...
/tool_ensemble_HRR.R
no_license
alexandrekl/fema_r1
R
false
false
8,899
r
# Get CDC emsemble data for HRR Excel tool library(dplyr) library(openxlsx) library(ggplot2) quants <- c(0.5, 0.9, 0.975) # quantiles to consider from ensemble forecast NEstfips <- c('09','25','23','33','44','50', '36') # FIPS of states in New England + NY #hrrnums <- c(109,110,111,221,222,227,230,231,281,282,295,364...
plot3 <- function() { # Read the file into a data table using fread path <- file.path("data", "household_power_consumption.txt") if(file.exists(path)) { dataFile <- fread(path, sep = ";", header = TRUE, na.strings = "?", showProgress = TRUE) } else { stop("File does not exist") }...
/plot3.R
no_license
mdhorine/ExData_Plotting1
R
false
false
1,482
r
plot3 <- function() { # Read the file into a data table using fread path <- file.path("data", "household_power_consumption.txt") if(file.exists(path)) { dataFile <- fread(path, sep = ";", header = TRUE, na.strings = "?", showProgress = TRUE) } else { stop("File does not exist") }...
## ------------------------------------------------------------------------ library(nplots) library(tidyverse) library(gapminder) library(plotly) ## ------------------------------------------------------------------------ nplots_scatter(gapminder, gapminder$lifeExp, gapminder$gdpPercap, xlab="lifeExp", ylab="gdpPercap...
/nplots/doc/nplots_vignette.R
no_license
STAT545-UBC-hw-2018-19/hw07-rasiimwe
R
false
false
981
r
## ------------------------------------------------------------------------ library(nplots) library(tidyverse) library(gapminder) library(plotly) ## ------------------------------------------------------------------------ nplots_scatter(gapminder, gapminder$lifeExp, gapminder$gdpPercap, xlab="lifeExp", ylab="gdpPercap...
library(dplyr) #download and unzip the data if(!file.exists("./data")) {dir.create("./data")} fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileUrl,destfile="./data/Dataset.zip",method="curl") unzip(zipfile="./data/Dataset.zip",exdir="./data") file...
/run_analysis.R
no_license
hannahhorton/CleaningData_PeerAssignment
R
false
false
3,038
r
library(dplyr) #download and unzip the data if(!file.exists("./data")) {dir.create("./data")} fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileUrl,destfile="./data/Dataset.zip",method="curl") unzip(zipfile="./data/Dataset.zip",exdir="./data") file...
testthat::test_that("get_packages2() works", { vcr::use_cassette("packages2", { pkgs <- get_packages2("maelle") }) testthat::expect_vector(pkgs, character()) }) testthat::test_that("get_packages2 errors well", { withr::local_envvar("SECRET_PLANET_TOKEN" = "") testthat::expect_snapshot_error(get_packages2...
/tests/testthat/test-packages2.R
permissive
sfr/applepie
R
false
false
335
r
testthat::test_that("get_packages2() works", { vcr::use_cassette("packages2", { pkgs <- get_packages2("maelle") }) testthat::expect_vector(pkgs, character()) }) testthat::test_that("get_packages2 errors well", { withr::local_envvar("SECRET_PLANET_TOKEN" = "") testthat::expect_snapshot_error(get_packages2...
\name{LDheatmap.addRecombRate} \alias{LDheatmap.addRecombRate} \title{ Add recombination rate plot to an LD heat map. } \description{ Retrieve average rates of recombination from the deCODE genetic map from the UCSC Genome Browser and add them to an LDheatmap object. } \usage{ LDheatmap.addRecombRate(LDheatmap, chromo...
/man/LDheatmap.addRecombRate.Rd
no_license
gloriayxf/LDheatmap
R
false
false
1,433
rd
\name{LDheatmap.addRecombRate} \alias{LDheatmap.addRecombRate} \title{ Add recombination rate plot to an LD heat map. } \description{ Retrieve average rates of recombination from the deCODE genetic map from the UCSC Genome Browser and add them to an LDheatmap object. } \usage{ LDheatmap.addRecombRate(LDheatmap, chromo...
hil_dfm_liwc_weighted <- weight(hil_dfm_liwc, type = "relFreq") hil_dfm_lies <- hil_dfm_liwc_weighted[, c("i", "we", "shehe", "they", "negemo", "conj", "motion")] # Convert to matrix hil_dfm_lies <- hil_dfm_lies %>% as.matrix() # Tidy up NaN values hil_dfm_lies <- hil_dfm_lies[complete.cases(hil_dfm_lies), ] # Comb...
/ml/project/r/files/lies.R
no_license
Busyclover/icl
R
false
false
1,878
r
hil_dfm_liwc_weighted <- weight(hil_dfm_liwc, type = "relFreq") hil_dfm_lies <- hil_dfm_liwc_weighted[, c("i", "we", "shehe", "they", "negemo", "conj", "motion")] # Convert to matrix hil_dfm_lies <- hil_dfm_lies %>% as.matrix() # Tidy up NaN values hil_dfm_lies <- hil_dfm_lies[complete.cases(hil_dfm_lies), ] # Comb...
DF <- read.table("household_power_consumption.txt",sep=";",header=TRUE) DF[,1]<-as.Date(DF$Date,"%d/%m/%Y") DF2<-subset(DF,DF[,1]=="2007-02-01") DF3<-subset(DF,DF[,1]=="2007-02-02") DF<-rbind(DF2,DF3) par(mfrow=c(2,2)) ## plot 1 plot(ts(DF$Global_active_power),xaxt='n',yaxt='n',xlab="",ylab="Global Active Power") axis(...
/Homework1/plot4.R
no_license
mcfate777/ExData_Plotting1
R
false
false
1,553
r
DF <- read.table("household_power_consumption.txt",sep=";",header=TRUE) DF[,1]<-as.Date(DF$Date,"%d/%m/%Y") DF2<-subset(DF,DF[,1]=="2007-02-01") DF3<-subset(DF,DF[,1]=="2007-02-02") DF<-rbind(DF2,DF3) par(mfrow=c(2,2)) ## plot 1 plot(ts(DF$Global_active_power),xaxt='n',yaxt='n',xlab="",ylab="Global Active Power") axis(...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/createReportFolder.R \name{createReportFolder} \alias{createReportFolder} \title{Create a folder structure for a FEMO report.} \usage{ createReportFolder(Folder = getwd(), ProjectName, ProjectDate) } \arguments{ \item{Folder}{A folder...
/man/createReportFolder.Rd
permissive
danielg7/rFEMO
R
false
false
857
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/createReportFolder.R \name{createReportFolder} \alias{createReportFolder} \title{Create a folder structure for a FEMO report.} \usage{ createReportFolder(Folder = getwd(), ProjectName, ProjectDate) } \arguments{ \item{Folder}{A folder...
svc <- paws::ec2instanceconnect()
/cran/paws.compute/tests/testthat/test_ec2instanceconnect.R
permissive
paws-r/paws
R
false
false
36
r
svc <- paws::ec2instanceconnect()
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drug_strength.R \docType{data} \name{drug_strength} \alias{drug_strength} \title{drug_strength} \format{ A data frame with 929956 rows and 9 variables: \describe{ \item{amount_value}{\emph{numeric}} \item{numerator_value}{\emph{numeric}} \ite...
/man/drug_strength.Rd
permissive
thewileylab/synPUF
R
false
true
1,040
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drug_strength.R \docType{data} \name{drug_strength} \alias{drug_strength} \title{drug_strength} \format{ A data frame with 929956 rows and 9 variables: \describe{ \item{amount_value}{\emph{numeric}} \item{numerator_value}{\emph{numeric}} \ite...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ytd_data_auth.R \name{ytd_auth} \alias{ytd_auth} \title{Authenticate with YouTube Data API} \usage{ ytd_auth(clientID, clientSecret) } \arguments{ \item{clientID}{The clientID, taken from your credentials in the Google API Console} \item{cli...
/googleyoutubev3.auto/man/ytd_auth.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
638
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ytd_data_auth.R \name{ytd_auth} \alias{ytd_auth} \title{Authenticate with YouTube Data API} \usage{ ytd_auth(clientID, clientSecret) } \arguments{ \item{clientID}{The clientID, taken from your credentials in the Google API Console} \item{cli...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/managedblockchain_operations.R \name{managedblockchain_create_network} \alias{managedblockchain_create_network} \title{Creates a new blockchain network using Amazon Managed Blockchain} \usage{ managedblockchain_create_network(ClientRequestTok...
/paws/man/managedblockchain_create_network.Rd
permissive
sanchezvivi/paws
R
false
true
2,508
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/managedblockchain_operations.R \name{managedblockchain_create_network} \alias{managedblockchain_create_network} \title{Creates a new blockchain network using Amazon Managed Blockchain} \usage{ managedblockchain_create_network(ClientRequestTok...
######################## #Code to run the BDMCMC method using the BDGraph package #For the Simulation section of my paper #Rank Likelihood #Author: Jami Jackson Mulgrave # ######################## current_dir <- getwd() setwd(current_dir) #set the working directory #clear the workspace rm(list = ls()) ...
/Nonparanormal/BDGraph_p100_n500_twopercent.R
no_license
jnj2102/RankLikelihood
R
false
false
1,339
r
######################## #Code to run the BDMCMC method using the BDGraph package #For the Simulation section of my paper #Rank Likelihood #Author: Jami Jackson Mulgrave # ######################## current_dir <- getwd() setwd(current_dir) #set the working directory #clear the workspace rm(list = ls()) ...
require(ggplot2) Poverty <- read.csv("Poverty.csv") chart <- ggplot(data = Poverty, aes(x=Year,y=Rate)) +geom_bar(stat="identity")(alpha = 0.5, size = 4.5, color = "blue" ) + geom_smooth() print(chart)
/code/script2.R
no_license
Chohnny/Chohnny.github.io
R
false
false
204
r
require(ggplot2) Poverty <- read.csv("Poverty.csv") chart <- ggplot(data = Poverty, aes(x=Year,y=Rate)) +geom_bar(stat="identity")(alpha = 0.5, size = 4.5, color = "blue" ) + geom_smooth() print(chart)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expression_fit.R \name{dispersion.function.estimation} \alias{dispersion.function.estimation} \title{Get median values of parameters from the mean-dispersion fits (no correlation with UMI counts visible)} \usage{ dispersion.function.estimatio...
/man/dispersion.function.estimation.Rd
no_license
heiniglab/scPower
R
false
true
588
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/expression_fit.R \name{dispersion.function.estimation} \alias{dispersion.function.estimation} \title{Get median values of parameters from the mean-dispersion fits (no correlation with UMI counts visible)} \usage{ dispersion.function.estimatio...
\name{tia} \alias{tia} \title{Elementary test-item analysis} \usage{ tia(choices, key, ...) } \arguments{ \item{choices}{The original responses to the items in the test: persons as rows, items as columns. May contain NA.} \item{key}{A vector containing the key (correct answers) to the items in \code{choices}...
/man/tia.Rd
no_license
lebebr01/irtoys-2
R
false
false
1,428
rd
\name{tia} \alias{tia} \title{Elementary test-item analysis} \usage{ tia(choices, key, ...) } \arguments{ \item{choices}{The original responses to the items in the test: persons as rows, items as columns. May contain NA.} \item{key}{A vector containing the key (correct answers) to the items in \code{choices}...
# LOGIOSTIC.R # All function related to fitting the Logistics distribution #' Fitting the Logistic distribution with MLE #' #' @param xdat #' @param ydat #' @param mul #' @param sigl #' @param mulink #' @param siglink #' @param shlink #' @param muinit #' @param siginit #' @param show #' @param method #' @param maxit #...
/R/LOGSTIC.R
no_license
NVE/fitdistrib
R
false
false
9,007
r
# LOGIOSTIC.R # All function related to fitting the Logistics distribution #' Fitting the Logistic distribution with MLE #' #' @param xdat #' @param ydat #' @param mul #' @param sigl #' @param mulink #' @param siglink #' @param shlink #' @param muinit #' @param siginit #' @param show #' @param method #' @param maxit #...
# This tests the sensibility of the filterWindows*() functions. In particular, # we want to make sure that the filter is calculated properly, despite the # manipulations of width and prior count. # library(csaw); library(testthat); source("test-filter.R") library(edgeR) test_that("global filtering works correctly wi...
/tests/testthat/test-filter.R
no_license
LTLA/csaw
R
false
false
10,838
r
# This tests the sensibility of the filterWindows*() functions. In particular, # we want to make sure that the filter is calculated properly, despite the # manipulations of width and prior count. # library(csaw); library(testthat); source("test-filter.R") library(edgeR) test_that("global filtering works correctly wi...
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' ComAdobeCqSocialConnectOauthImpl...
/clients/r/generated/R/ComAdobeCqSocialConnectOauthImplTwitterProviderImplInfo.r
permissive
shinesolutions/swagger-aem-osgi
R
false
false
4,589
r
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' ComAdobeCqSocialConnectOauthImpl...
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service set_config NULL #' Amazon Athena #' #' @description #' Amazon Athena is an interactive query service that lets you use standard #' SQL to analyze data directly in Amazon S3. You can point Athena at your ...
/paws/R/athena_service.R
permissive
johnnytommy/paws
R
false
false
5,318
r
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common new_handlers new_service set_config NULL #' Amazon Athena #' #' @description #' Amazon Athena is an interactive query service that lets you use standard #' SQL to analyze data directly in Amazon S3. You can point Athena at your ...
#' Calculates the distance between the centroid of a one convex hull and up to #' two other hulls #' #' \code{centroidEdgeDistance} calculates the distance from the centroid of one #' convex hull to the edge of up to two other hulls for a given species. This #' was developed to produce data for further analysis of spec...
/R/centroidEdgeDistance.R
permissive
JCur96/sfe
R
false
false
2,271
r
#' Calculates the distance between the centroid of a one convex hull and up to #' two other hulls #' #' \code{centroidEdgeDistance} calculates the distance from the centroid of one #' convex hull to the edge of up to two other hulls for a given species. This #' was developed to produce data for further analysis of spec...
clean <- function(Adult){ clean <- Adult %>% mutate(age = 2021 - w5_a_dob_y) %>% rename (gender = w5_a_gen, race = w5_a_popgrp, income = w5_a_em1pay, married = w5_a_mar, school = w5_a_edschgrd, tertiary = w5_a_edter) %>% select(age, gender, race, income, married, school, tertiary) # The NIDS data set has man...
/code/clean.R
no_license
cass-code/Machine-Learning
R
false
false
1,547
r
clean <- function(Adult){ clean <- Adult %>% mutate(age = 2021 - w5_a_dob_y) %>% rename (gender = w5_a_gen, race = w5_a_popgrp, income = w5_a_em1pay, married = w5_a_mar, school = w5_a_edschgrd, tertiary = w5_a_edter) %>% select(age, gender, race, income, married, school, tertiary) # The NIDS data set has man...
#' Gets the next beacon response to the given timestamp #' #' @param ts timestamp as a unix or POSIXct/POSIXlt value #' @return An nrb_response object #' @examples #' ts <- as.POSIXct("2014-01-01 12:00:00", tz="UTC") #' nrb_get_next(ts) #' @export nrb_get_next = function(ts) { nrb_call_service("next", ts) }
/R/nrb_get_next.r
permissive
jmcastagnetto/nistrb
R
false
false
312
r
#' Gets the next beacon response to the given timestamp #' #' @param ts timestamp as a unix or POSIXct/POSIXlt value #' @return An nrb_response object #' @examples #' ts <- as.POSIXct("2014-01-01 12:00:00", tz="UTC") #' nrb_get_next(ts) #' @export nrb_get_next = function(ts) { nrb_call_service("next", ts) }
#Assgnment1, Wk1, Tadakimi Tomita ###Common operation #read text file, specify separator and NA epower <- read.table("./household_power_consumption.txt", sep = ";", na.strings = "?", header = TRUE, stringsAsFactors = FALSE ) #subset 2/1/2007 or 2/2/2007...
/plot3.R
no_license
tadakimi/ExData_Plotting1
R
false
false
1,387
r
#Assgnment1, Wk1, Tadakimi Tomita ###Common operation #read text file, specify separator and NA epower <- read.table("./household_power_consumption.txt", sep = ";", na.strings = "?", header = TRUE, stringsAsFactors = FALSE ) #subset 2/1/2007 or 2/2/2007...
#'Colocation for two traits with a common control #'Generates bayes factors for each plausible one SNP model #' #' #'@title bayesian colocalisation; two traits #'@export #'@param df1 A dataframe, containing response and potential explanatory variables for the dataset. #'@param snps The SNPs to consider as potential e...
/R/coloc.bayes.mdf.R
no_license
mdfortune/coloc
R
false
false
18,392
r
#'Colocation for two traits with a common control #'Generates bayes factors for each plausible one SNP model #' #' #'@title bayesian colocalisation; two traits #'@export #'@param df1 A dataframe, containing response and potential explanatory variables for the dataset. #'@param snps The SNPs to consider as potential e...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper.R \name{check_resample_levels} \alias{check_resample_levels} \title{Check if resample has any errors} \usage{ check_resample_levels(resample) } \arguments{ \item{resample}{A \code{rset} object} } \description{ Check if resample has any...
/man/check_resample_levels.Rd
permissive
five-dots/ml4e
R
false
true
330
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper.R \name{check_resample_levels} \alias{check_resample_levels} \title{Check if resample has any errors} \usage{ check_resample_levels(resample) } \arguments{ \item{resample}{A \code{rset} object} } \description{ Check if resample has any...
context("Inline") test_that("Inline comments are supported", { out <- roc_proc_text(rd_roclet(), " #' Description a <- function(x) { #' @param x an integer stopifnot(is.integer(x)) }")[[1]] expect_equal(get_tag(out, "param")$values, c(x = "an integer")) }) test_that("Inline comments just b...
/roxygen-5.0.1/tests/testthat/test-inline.R
no_license
pooranis/old_rmodules
R
false
false
891
r
context("Inline") test_that("Inline comments are supported", { out <- roc_proc_text(rd_roclet(), " #' Description a <- function(x) { #' @param x an integer stopifnot(is.integer(x)) }")[[1]] expect_equal(get_tag(out, "param")$values, c(x = "an integer")) }) test_that("Inline comments just b...
# generate the main box # 2 tabPanels if input$academic_cv == FALSE # 6 tabPanels if input$academic_cv == TRUE main_box <- function(cv_mode) { if (cv_mode == "full") { tabBox( id = "main_body", width = 12, tabPanel( title = HTML(paste0(icon("graduation-cap"), "Formation")), uiOutput("f...
/MyShinyCV/main_box.R
no_license
felixgrunberger/shinyCV
R
false
false
3,412
r
# generate the main box # 2 tabPanels if input$academic_cv == FALSE # 6 tabPanels if input$academic_cv == TRUE main_box <- function(cv_mode) { if (cv_mode == "full") { tabBox( id = "main_body", width = 12, tabPanel( title = HTML(paste0(icon("graduation-cap"), "Formation")), uiOutput("f...
logplus = function(y){ min1 = min(y[y>0 & !is.na(y)])/2 y[y<=0 & !is.na(y)] = min1 return(y) } verboseScatterplot = function(x,y,main="", xlim=range(x,na.rm = TRUE),ylim=range(y,na.rm = TRUE), ...){ cor1 = cor.test(x,y, use = "pairwise.complete") p1 = cor1$p.value cor2 = round(cor1$est...
/FundamentalEquations/Codes_AROCM/0_fns_v2.R
permissive
shorvath/MammalianMethylationConsortium
R
false
false
10,843
r
logplus = function(y){ min1 = min(y[y>0 & !is.na(y)])/2 y[y<=0 & !is.na(y)] = min1 return(y) } verboseScatterplot = function(x,y,main="", xlim=range(x,na.rm = TRUE),ylim=range(y,na.rm = TRUE), ...){ cor1 = cor.test(x,y, use = "pairwise.complete") p1 = cor1$p.value cor2 = round(cor1$est...
########## SURVEY COMPARISON PROJECT PRESENCE/ABSENCE COMPARISON ########## ########## ########## # This file creates a dataframe outlining the total number of sessions each # species observed in SVC and roving surveys was present in. Only a subset of # large, predatory reef fish species are extracted as these were ...
/src/presabs_analysis_troubleshoot.R
no_license
iris-george/Reef-Survey-Comparison
R
false
false
15,193
r
########## SURVEY COMPARISON PROJECT PRESENCE/ABSENCE COMPARISON ########## ########## ########## # This file creates a dataframe outlining the total number of sessions each # species observed in SVC and roving surveys was present in. Only a subset of # large, predatory reef fish species are extracted as these were ...
library(glmnet) mydata = read.table("./TrainingSet/AvgRank/pleura.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.03,family="gaussian",standardize=FALSE) sink('./Model/EN/AvgRank/pleura/pleura_014.txt',append=TR...
/Model/EN/AvgRank/pleura/pleura_014.R
no_license
leon1003/QSMART
R
false
false
353
r
library(glmnet) mydata = read.table("./TrainingSet/AvgRank/pleura.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.03,family="gaussian",standardize=FALSE) sink('./Model/EN/AvgRank/pleura/pleura_014.txt',append=TR...
# this is for the bias-variance trade-off graphs # the whole script consists of the function "generate_plot" and calls of this function generate_plot = function(datafilename){ load(datafilename) library(ggplot2) library(reshape2) theme1 = theme_bw() + theme(axis.title.x = element_blank(), ...
/replications/simulation_Sec31/Figure_3_and_B2.R
permissive
zhentaoshi/Boosted_HP_filter
R
false
false
2,482
r
# this is for the bias-variance trade-off graphs # the whole script consists of the function "generate_plot" and calls of this function generate_plot = function(datafilename){ load(datafilename) library(ggplot2) library(reshape2) theme1 = theme_bw() + theme(axis.title.x = element_blank(), ...
library(Rambo) ### Name: Rambo-package ### Title: The Random Subgraph Model ### Aliases: Rambo-package Rambo RAMBO ### Keywords: rsm ### ** Examples data(Regions) res <- rsm(Regions$X, Regions$sub, Klist=2:4, nbredo=1, maxit=5) plot(res) ## summary(res)
/data/genthat_extracted_code/Rambo/examples/Rambo-package.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
262
r
library(Rambo) ### Name: Rambo-package ### Title: The Random Subgraph Model ### Aliases: Rambo-package Rambo RAMBO ### Keywords: rsm ### ** Examples data(Regions) res <- rsm(Regions$X, Regions$sub, Klist=2:4, nbredo=1, maxit=5) plot(res) ## summary(res)
# 2015-04-30 Selecting gage and alternate gages for matched bridges # using df.Fail.NBI.Gage.All load(file.path(DataDir,"Analysis_Results_In_Progress","20150429_MatchesToNBIandToGagesAllDataPreSelection.RData")) # or load("/Users/MM/Documents/Research/Climate_Scour_Local/R_data/Analysis_Results_In_Progress/20150429_Rea...
/Scripts/Matching/Review and Post Processing/20150430_SelectingGageAndAltGageFromAllMatches.R
no_license
fahmidah/bridge.collapses
R
false
false
10,148
r
# 2015-04-30 Selecting gage and alternate gages for matched bridges # using df.Fail.NBI.Gage.All load(file.path(DataDir,"Analysis_Results_In_Progress","20150429_MatchesToNBIandToGagesAllDataPreSelection.RData")) # or load("/Users/MM/Documents/Research/Climate_Scour_Local/R_data/Analysis_Results_In_Progress/20150429_Rea...
vec=c(1:6) print("Enter number to check in vector") no=as.integer(readline()) '%findFun%'=function(vec,no) { for (i in vec) { if(i==no) return(TRUE) } return(FALSE) } '%findFun%'(vec,no)
/UserDefinedFunForNoCheck.r
permissive
ninadsumant/R-Programming
R
false
false
231
r
vec=c(1:6) print("Enter number to check in vector") no=as.integer(readline()) '%findFun%'=function(vec,no) { for (i in vec) { if(i==no) return(TRUE) } return(FALSE) } '%findFun%'(vec,no)
\name{print.ao.glm} \alias{print.ao.glm} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Printing the MLE, its associated log-likelihood and the coefficients of an "ao.glm" object } \description{ Print method of the function \code{\link{ao.glm}} } \usage{ \method{print}{ao.glm} (x, ...)...
/man/print.ao.glm.Rd
no_license
cran/AOfamilies
R
false
false
1,232
rd
\name{print.ao.glm} \alias{print.ao.glm} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Printing the MLE, its associated log-likelihood and the coefficients of an "ao.glm" object } \description{ Print method of the function \code{\link{ao.glm}} } \usage{ \method{print}{ao.glm} (x, ...)...
# Copyright (c) Sebastian Kapp. # Licensed under the MIT License. #' Classify Fixations by Dispersion Threshold #' #' @description #' Classify each gaze point based on the dispersion of gaze points. #' #' @details #' This is an implementation of the fixation classification by dispersion threshold as described by \href...
/R/classify_idt.R
permissive
chandms/ARETT-R-Package
R
false
false
15,160
r
# Copyright (c) Sebastian Kapp. # Licensed under the MIT License. #' Classify Fixations by Dispersion Threshold #' #' @description #' Classify each gaze point based on the dispersion of gaze points. #' #' @details #' This is an implementation of the fixation classification by dispersion threshold as described by \href...
context("Test ts2clm.R") test_that("ts2clm() returns the correct output", { res <- ts2clm(sst_WA, climatologyPeriod = c("1983-01-01", "2012-12-31")) expect_is(res, "data.frame") expect_equal(ncol(res), 6) expect_equal(nrow(res), 12053) }) test_that("all starting error checks flag correctly", { expect_error(...
/tests/testthat/test-ts2clm.R
permissive
Sisov/heatwaveR
R
false
false
3,375
r
context("Test ts2clm.R") test_that("ts2clm() returns the correct output", { res <- ts2clm(sst_WA, climatologyPeriod = c("1983-01-01", "2012-12-31")) expect_is(res, "data.frame") expect_equal(ncol(res), 6) expect_equal(nrow(res), 12053) }) test_that("all starting error checks flag correctly", { expect_error(...
library(dplyr) #Read the data file stored in the current working directory data <- read.table("./household_power_consumption.txt",sep = ";",header = TRUE) #Combine date and time,change to date and time format and add it to a new column date_time data <- mutate(data,date_time = as.POSIXct(paste(data$Date, data$Tim...
/Plot2.R
no_license
beeRitu/ExploratoryDataAnalysisProject
R
false
false
952
r
library(dplyr) #Read the data file stored in the current working directory data <- read.table("./household_power_consumption.txt",sep = ";",header = TRUE) #Combine date and time,change to date and time format and add it to a new column date_time data <- mutate(data,date_time = as.POSIXct(paste(data$Date, data$Tim...
data <- read.csv(file = "C:\\Users\\Andrei\\Downloads\\exdata-data-household_power_consumption\\household_power_consumption.txt", header = TRUE, sep = ";") data_rest <- data[(as.Date(data$Date) >= as.Date("2/1/2007")) & (as.Date(data$Date) <= as.Date("2/2/2007")),] data_rest <- data_rest[(as.cha...
/plot4.R
no_license
AndreiD12/ExData_Plotting1
R
false
false
2,534
r
data <- read.csv(file = "C:\\Users\\Andrei\\Downloads\\exdata-data-household_power_consumption\\household_power_consumption.txt", header = TRUE, sep = ";") data_rest <- data[(as.Date(data$Date) >= as.Date("2/1/2007")) & (as.Date(data$Date) <= as.Date("2/2/2007")),] data_rest <- data_rest[(as.cha...
library(tidyverse) a <- readLines(pipe("journalctl | cut -c1-15")) a <- a[!grepl("^\\s*$", a)] a <- tibble(a = a) %>% extract(a, c("month", "day", "hour", "min", "sec"), regex = c("^(.*) (.*) (.*):(.*):(.*)$")) %>% na.omit() %>% mutate(month = c("Jun"=6,"Jul"=7,"Aug"=8)[month], day = day %>%...
/analysis.R
permissive
yanlinlin82/190822a_Alive-Daytime
R
false
false
927
r
library(tidyverse) a <- readLines(pipe("journalctl | cut -c1-15")) a <- a[!grepl("^\\s*$", a)] a <- tibble(a = a) %>% extract(a, c("month", "day", "hour", "min", "sec"), regex = c("^(.*) (.*) (.*):(.*):(.*)$")) %>% na.omit() %>% mutate(month = c("Jun"=6,"Jul"=7,"Aug"=8)[month], day = day %>%...
#' Iterative truncation procedure based on a bridge statistic. #' @param x coda::mcmc sequence (will be cast to if necessary) to truncate transient #' @param bridge bridge type to use: "brownian", student" or "loglik" #' @param stat statistic to use for testing bridge: #' - if student bridge, "E","var","autocov","logl...
/codadiags/R/diag.R
no_license
ingted/R-Examples
R
false
false
5,140
r
#' Iterative truncation procedure based on a bridge statistic. #' @param x coda::mcmc sequence (will be cast to if necessary) to truncate transient #' @param bridge bridge type to use: "brownian", student" or "loglik" #' @param stat statistic to use for testing bridge: #' - if student bridge, "E","var","autocov","logl...
libDir <- "/cluster/gjb_lab/mgierlinski/R_shiny/library/3.6/" if(dir.exists(libDir)) .libPaths(libDir) dirs <- c("/home/mgierlinski/projects/glycotreg", "/cluster/gjb_lab/mgierlinski/projects/glycotreg") for(d in dirs){ if(dir.exists(d)) topDir <- d } library(shiny) library(ggplot2) library(dplyr) library(DT) libra...
/shiny_de/app.R
permissive
bartongroup/MG_GlycoTreg
R
false
false
10,958
r
libDir <- "/cluster/gjb_lab/mgierlinski/R_shiny/library/3.6/" if(dir.exists(libDir)) .libPaths(libDir) dirs <- c("/home/mgierlinski/projects/glycotreg", "/cluster/gjb_lab/mgierlinski/projects/glycotreg") for(d in dirs){ if(dir.exists(d)) topDir <- d } library(shiny) library(ggplot2) library(dplyr) library(DT) libra...
add2 <- function(x, y) { x+y } above10 <- function(x) { use <- x > 10 x[use] } columnmean <- function(y) { nc <- ncol(y) means <- numeric(nc) for (i in 1:nc) { means[i] <- mean(y[,i]) } means }
/Functions.R
no_license
weshcooper/datasciencecoursera
R
false
false
240
r
add2 <- function(x, y) { x+y } above10 <- function(x) { use <- x > 10 x[use] } columnmean <- function(y) { nc <- ncol(y) means <- numeric(nc) for (i in 1:nc) { means[i] <- mean(y[,i]) } means }
# Let's explore how to "unpack" arguments from an ellipses when you use the # ellipses as an argument in a function. Below I have an example function that # is supposed to add two explicitly named arguments called alpha and beta. # # add_alpha_and_beta <- function(...){ # # First we must capture the ellipsis inside ...
/R-Programming/Week2/mad_libs.R
no_license
johnguzmare/datasciencecoursera
R
false
false
1,607
r
# Let's explore how to "unpack" arguments from an ellipses when you use the # ellipses as an argument in a function. Below I have an example function that # is supposed to add two explicitly named arguments called alpha and beta. # # add_alpha_and_beta <- function(...){ # # First we must capture the ellipsis inside ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/div_dosage.R \name{TajimaD.dosage} \alias{TajimaD.dosage} \title{Estimates Tajima's D} \usage{ TajimaD.dosage(dos) } \arguments{ \item{dos}{a ni X nl dosage matrix containing the number of derived/alternate alleles each individual carries at ...
/man/TajimaD.dosage.Rd
no_license
jgx65/hierfstat
R
false
true
631
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/div_dosage.R \name{TajimaD.dosage} \alias{TajimaD.dosage} \title{Estimates Tajima's D} \usage{ TajimaD.dosage(dos) } \arguments{ \item{dos}{a ni X nl dosage matrix containing the number of derived/alternate alleles each individual carries at ...
#Load package reshape2 library(reshape2) #Set working directory setwd("c://Users/lette/Desktop/Data science specialization/Getting and cleaning data") #Set file name workfile <- "getdata-projectfiles-UCI HAR Dataset.zip" #Checking if file exists, downloading and unzipping file if(!file.exists(workfile)){ fileHere ...
/run_analysis.R
no_license
ogarces/gettingcleaningdataproject
R
false
false
2,317
r
#Load package reshape2 library(reshape2) #Set working directory setwd("c://Users/lette/Desktop/Data science specialization/Getting and cleaning data") #Set file name workfile <- "getdata-projectfiles-UCI HAR Dataset.zip" #Checking if file exists, downloading and unzipping file if(!file.exists(workfile)){ fileHere ...
library(rstan) rstan_options(auto_write = TRUE) options(mc.cores = 1) source('experiments/utils.R') S <- 2000 nrep <- 1 seed <- 1 batch <- 1 SEED = seed + nrep*(batch - 1) set.seed(SEED) sldata = stackloss n = dim(sldata)[1] k = 3 x = sldata[,1:3] x = normalize_matrix(x) y = sldata[,4] y = normalize_vector(y) beta...
/experiments/stackloss/stackloss_naive.R
no_license
topipa/iter-mm-paper
R
false
false
869
r
library(rstan) rstan_options(auto_write = TRUE) options(mc.cores = 1) source('experiments/utils.R') S <- 2000 nrep <- 1 seed <- 1 batch <- 1 SEED = seed + nrep*(batch - 1) set.seed(SEED) sldata = stackloss n = dim(sldata)[1] k = 3 x = sldata[,1:3] x = normalize_matrix(x) y = sldata[,4] y = normalize_vector(y) beta...
## File Name: datlist2nested.datlist.R ## File Version: 0.12 #** datlist -> nested.datlist datlist2nested.datlist <- function(datlist, Nimp) { CALL <- match.call() if (inherits(datlist,"imputationList")){ is_imputationList <- TRUE datlist <- datlist$imputations } else { is_imputati...
/R/datlist2nested.datlist.R
no_license
alexanderrobitzsch/miceadds
R
false
false
881
r
## File Name: datlist2nested.datlist.R ## File Version: 0.12 #** datlist -> nested.datlist datlist2nested.datlist <- function(datlist, Nimp) { CALL <- match.call() if (inherits(datlist,"imputationList")){ is_imputationList <- TRUE datlist <- datlist$imputations } else { is_imputati...
new_mlflow_entities_run <- function(l) { run <- purrr::compact(l$run) run <- purrr::map_at(run, "info", tidy_run_info) structure( list( info = run$info, data = run$data ), class = "mlflow_run" ) }
/mlflow/R/mlflow/R/entities.R
permissive
sepidehhosseinzadeh/mlflow-cpp
R
false
false
228
r
new_mlflow_entities_run <- function(l) { run <- purrr::compact(l$run) run <- purrr::map_at(run, "info", tidy_run_info) structure( list( info = run$info, data = run$data ), class = "mlflow_run" ) }
library(readr) library(ggplot2) library(dplyr) library(tidyr) library(stringr) subtelomere_levels <- c("1ptel", "1qtel", "2ptel", "2qtel", "3ptel", "3qtel", "4ptel", "4qtel", "5ptel", "5qtel", "6ptel", "6qtel", "7qtel", "7ptel", "8ptel", "8qtel", ...
/reads_mapping_to_very_end/coverage_plots_TALEs_191010_mapping_to_very_end_q30.R
no_license
fcadete/basecall_scripts
R
false
false
9,157
r
library(readr) library(ggplot2) library(dplyr) library(tidyr) library(stringr) subtelomere_levels <- c("1ptel", "1qtel", "2ptel", "2qtel", "3ptel", "3qtel", "4ptel", "4qtel", "5ptel", "5qtel", "6ptel", "6qtel", "7qtel", "7ptel", "8ptel", "8qtel", ...
#' Scales Edge Lengths of a Phylogeny to a Minimum Branch Length #' #' Rescales a tree with edge lengths so that all edge lengths are at least some minimum branch length (mbl), #' without changing the relative distance of the tips from the root node. Edge lengths are transformed so they are #' greater than or equal to...
/R/minBranchLength.R
permissive
bomeara/paleotree
R
false
false
4,187
r
#' Scales Edge Lengths of a Phylogeny to a Minimum Branch Length #' #' Rescales a tree with edge lengths so that all edge lengths are at least some minimum branch length (mbl), #' without changing the relative distance of the tips from the root node. Edge lengths are transformed so they are #' greater than or equal to...
#------------------------------------------------------------# # Einführung in R # Jan-Philipp Kolb # # Lösung Aufgabe 3 # # 15.05.2014 #------------------------------------------------------------# #------------------------------------------------------------# # General Information #--------------------------------...
/2015/rcode/Lösungen/IntroR_3_barplot.R
no_license
Japhilko/IntroR
R
false
false
917
r
#------------------------------------------------------------# # Einführung in R # Jan-Philipp Kolb # # Lösung Aufgabe 3 # # 15.05.2014 #------------------------------------------------------------# #------------------------------------------------------------# # General Information #--------------------------------...
#' @importFrom magrittr %>% #' @export magrittr::`%>%` dots <- function(...) { eval_bare(substitute(alist(...))) } deparse_trunc <- function(x, width = getOption("width")) { text <- deparse(x, width.cutoff = width) if (length(text) == 1 && nchar(text) < width) return(text) paste0(substr(text[1], 1, width - 3...
/R/utils.r
permissive
mpaulacaldas/dplyr
R
false
false
2,608
r
#' @importFrom magrittr %>% #' @export magrittr::`%>%` dots <- function(...) { eval_bare(substitute(alist(...))) } deparse_trunc <- function(x, width = getOption("width")) { text <- deparse(x, width.cutoff = width) if (length(text) == 1 && nchar(text) < width) return(text) paste0(substr(text[1], 1, width - 3...
#' @title Enumerate the instruments (forms) #' #' @description Export a list of the data collection instruments for a #' project. This includes their unique instrument name as seen in the #' second column of the Data Dictionary, as well as each instrument's #' corresponding instrument label, which is seen on a project'...
/R/redcap-instruments.R
permissive
cran/REDCapR
R
false
false
5,632
r
#' @title Enumerate the instruments (forms) #' #' @description Export a list of the data collection instruments for a #' project. This includes their unique instrument name as seen in the #' second column of the Data Dictionary, as well as each instrument's #' corresponding instrument label, which is seen on a project'...
require(data.table) require(xgboost) # Convert your data file into .csv format filename <- "data.csv" data <- read.csv("prog_data.csv") label<-read.csv("labels.csv") prediction<-read.csv("prog_data_pred.csv") names<-strsplit(colnames(prediction),",") #------------------------Transposing the Columns---------------------...
/Hackathon Ge_heathcare/PartII/Total_score_Metric/Drug_prediction/drug_classifier.R
no_license
Jayanth-kumar5566/HealthhackGE
R
false
false
2,545
r
require(data.table) require(xgboost) # Convert your data file into .csv format filename <- "data.csv" data <- read.csv("prog_data.csv") label<-read.csv("labels.csv") prediction<-read.csv("prog_data_pred.csv") names<-strsplit(colnames(prediction),",") #------------------------Transposing the Columns---------------------...
# Feature Engineering Workshop: Custom Features --------------------------- # This workshop orients you to using summative content analysis to create custom features. # Pre-Flight -------------------------------------------------------------- # Load libraries library(tidyverse) library(stringr) library(tidytext) ...
/feature_engineering_workshop_cf.R
no_license
TLynnM/330c
R
false
false
1,536
r
# Feature Engineering Workshop: Custom Features --------------------------- # This workshop orients you to using summative content analysis to create custom features. # Pre-Flight -------------------------------------------------------------- # Load libraries library(tidyverse) library(stringr) library(tidytext) ...
context("authority_score") test_that("authority score works", { library(igraph) ashs <- function(graph, as=TRUE) { mscale <- function(x) { if (sd(x)!=0) { x <- scale(x) } if (x[1] < 0) { x <- -x } x } A <- as_adj(graph, sparse=FALSE) if (as) { s1 <- eigen(t(A) %*% A...
/R-Portable/App/R-Portable/library/igraph/tests/test_authority.score.R
permissive
voltek62/seo-viz-install
R
false
false
1,603
r
context("authority_score") test_that("authority score works", { library(igraph) ashs <- function(graph, as=TRUE) { mscale <- function(x) { if (sd(x)!=0) { x <- scale(x) } if (x[1] < 0) { x <- -x } x } A <- as_adj(graph, sparse=FALSE) if (as) { s1 <- eigen(t(A) %*% A...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/io.R \name{z.savex} \alias{z.savex} \title{save an xlsx file, alias of \code{\link{z.writex}}, wrapper of \code{\link[xlsx]{write.xlsx}}} \usage{ z.savex(x, file = "RData.xlsx", sheetName = "Sheet1", row.names = FALSE, showNA = FALSE, ...) ...
/man/z.savex.Rd
permissive
hmorzaria/zmisc
R
false
true
538
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/io.R \name{z.savex} \alias{z.savex} \title{save an xlsx file, alias of \code{\link{z.writex}}, wrapper of \code{\link[xlsx]{write.xlsx}}} \usage{ z.savex(x, file = "RData.xlsx", sheetName = "Sheet1", row.names = FALSE, showNA = FALSE, ...) ...
#Rawdata processing #Read from Rawdata folder and write to Output folder. source("libs_and_funcs.R") #Read raw data files, clean initially and save to .rds file. raw_files <- list.files(paste0(getwd(), "/Rawdata"), full.names = TRUE) #Prepare oxygen/minidot data #All oxygen data from station 1 with minidot in top a...
/rawdata_processing.R
no_license
KennethTM/FilsoOxygenDepletion
R
false
false
4,473
r
#Rawdata processing #Read from Rawdata folder and write to Output folder. source("libs_and_funcs.R") #Read raw data files, clean initially and save to .rds file. raw_files <- list.files(paste0(getwd(), "/Rawdata"), full.names = TRUE) #Prepare oxygen/minidot data #All oxygen data from station 1 with minidot in top a...
% Generated by roxygen2 (4.1.0.9000): do not edit by hand % Please edit documentation in R/find.R \name{director_find} \alias{director_find} \title{Find resources within a director project.} \usage{ director_find(search = "", method = "wildcard", base = "", by_mtime = TRUE) } \arguments{ \item{search}{character. The ...
/man/director_find.Rd
no_license
kirillseva/director
R
false
false
2,654
rd
% Generated by roxygen2 (4.1.0.9000): do not edit by hand % Please edit documentation in R/find.R \name{director_find} \alias{director_find} \title{Find resources within a director project.} \usage{ director_find(search = "", method = "wildcard", base = "", by_mtime = TRUE) } \arguments{ \item{search}{character. The ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TASSO.R \name{TASSO} \alias{TASSO} \title{Fit the Tree-guided Automatic Sub-composition Selection Operator (TASSO) model.} \usage{ TASSO(y, X, tree = NULL) } \arguments{ \item{y}{the univariate response.} \item{X}{a data frame or matrix cont...
/man/TASSO.Rd
no_license
ZRChao/phyloMDA
R
false
true
1,119
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TASSO.R \name{TASSO} \alias{TASSO} \title{Fit the Tree-guided Automatic Sub-composition Selection Operator (TASSO) model.} \usage{ TASSO(y, X, tree = NULL) } \arguments{ \item{y}{the univariate response.} \item{X}{a data frame or matrix cont...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/importNmModInput.R \name{importNmModInput} \alias{importNmModInput} \alias{.importNmModInput} \title{Parse $INPUT statement} \usage{ .importNmModInput(txt, .extract = length(grep("\\\\$INPUT", toupper(txt))) > 0) } \arguments{ \item{txt}{Ch...
/man/importNmModInput.Rd
no_license
MikeKSmith/RNMImport
R
false
true
918
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/importNmModInput.R \name{importNmModInput} \alias{importNmModInput} \alias{.importNmModInput} \title{Parse $INPUT statement} \usage{ .importNmModInput(txt, .extract = length(grep("\\\\$INPUT", toupper(txt))) > 0) } \arguments{ \item{txt}{Ch...