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 |
|---|---|---|---|---|---|---|---|---|---|
setwd("~/LDM-time/kmLDM/")
#setwd("F://R code/west english channel time/")
library(lbfgs)
library(QUIC)
library(mclust)
library(huge)
source("./program/generateSimulation.R")
args <- commandArgs()
cluster <- as.numeric(args[6])
testTrue <- FALSE
Toy <- TRUE
testOther <- FALSE
addRandom <- FALSE
showF... | /k-mLDM-finalMLDM-AGP.R | no_license | yyq410/mldm-time | R | false | false | 7,985 | r | setwd("~/LDM-time/kmLDM/")
#setwd("F://R code/west english channel time/")
library(lbfgs)
library(QUIC)
library(mclust)
library(huge)
source("./program/generateSimulation.R")
args <- commandArgs()
cluster <- as.numeric(args[6])
testTrue <- FALSE
Toy <- TRUE
testOther <- FALSE
addRandom <- FALSE
showF... |
#import
library(arules)
#dataset = read.csv('Market_Basket_Optimisation.csv')
dataset = read.transactions('Market_Basket_Optimisation.csv', sep = ',', rm.duplicates = TRUE)
itemFrequencyPlot(dataset, topN = 10)
#train
rules = eclat(data = dataset, parameter = list(support = 0.004, minlen = 2))
#visualize
inspect(sor... | /ec.R | no_license | abhimanyudwivedi/weirdMLinR | R | false | false | 352 | r | #import
library(arules)
#dataset = read.csv('Market_Basket_Optimisation.csv')
dataset = read.transactions('Market_Basket_Optimisation.csv', sep = ',', rm.duplicates = TRUE)
itemFrequencyPlot(dataset, topN = 10)
#train
rules = eclat(data = dataset, parameter = list(support = 0.004, minlen = 2))
#visualize
inspect(sor... |
# Nursing homes clusterization ----------------------------------------------------------------
data = dataset %>%
dplyr::select(Codi,Perc_Males=Perc_Dones,
N_active_residents=N_residents_actius,
median_Age,Perc_leave,n_comorb = median_comorbi,dependent_residents=Residents_alfa,
... | /2021 - NATAGING - COVID-19 NURSING HOMES/covid19_nursing_homes_analysis.R | no_license | douve/paper-code | R | false | false | 5,525 | r |
# Nursing homes clusterization ----------------------------------------------------------------
data = dataset %>%
dplyr::select(Codi,Perc_Males=Perc_Dones,
N_active_residents=N_residents_actius,
median_Age,Perc_leave,n_comorb = median_comorbi,dependent_residents=Residents_alfa,
... |
#' Add one or more edges using a text string
#' @description With a graph object of class
#' \code{dgr_graph}, add one or more edges to the graph
#' using a text string.
#' @param graph a graph object of class
#' \code{dgr_graph} that is created using
#' \code{create_graph}.
#' @param edges a single-length vector with ... | /R/add_edges_w_string.R | no_license | Oscar-Deng/DiagrammeR | R | false | false | 2,589 | r | #' Add one or more edges using a text string
#' @description With a graph object of class
#' \code{dgr_graph}, add one or more edges to the graph
#' using a text string.
#' @param graph a graph object of class
#' \code{dgr_graph} that is created using
#' \code{create_graph}.
#' @param edges a single-length vector with ... |
#' Plot Richness Accumulation Curve for Each Year
#'
#' As you observe more places, you'll see more species. Plot that curve of species accumulated per sites visited for each year.
#'
#' @param X a spp object
#' @param ... not used
#'
#' @export
plot_rich_accum <- function(X, ...){
stopifnot("spp"%in%class(X))
d... | /simOcc/R/plot_rich_accum.R | no_license | rBatt/trawl | R | false | false | 1,181 | r | #' Plot Richness Accumulation Curve for Each Year
#'
#' As you observe more places, you'll see more species. Plot that curve of species accumulated per sites visited for each year.
#'
#' @param X a spp object
#' @param ... not used
#'
#' @export
plot_rich_accum <- function(X, ...){
stopifnot("spp"%in%class(X))
d... |
diagram::plotmat(connection_sizes, nperrow, relsize = 1, box.size = 0.05,
name = rownames(connection_sizes), box.col = subgroup_colors,
box.type = 'square', arr.lwd = widths, # sqrt(connection_sizes)
arr.lcol = connection_colors, arr.col = connection_colors) #, arr.lcol = log2(1+diagram_ma... | /autonomics.find/inst/scripts/improve_contrastogram.R | no_license | bhagwataditya/autonomics0 | R | false | false | 1,346 | r | diagram::plotmat(connection_sizes, nperrow, relsize = 1, box.size = 0.05,
name = rownames(connection_sizes), box.col = subgroup_colors,
box.type = 'square', arr.lwd = widths, # sqrt(connection_sizes)
arr.lcol = connection_colors, arr.col = connection_colors) #, arr.lcol = log2(1+diagram_ma... |
###Create a table of rankings for 1 year###
rank <- "http://www.atpworldtour.com/Rankings/Singles.aspx?d=17.03.2014&r=1&c=#"
rank
tables <- readHTMLTable(rank)
ldply(tables, dim)
lastrank <- tables[[1]]
head(lastrank)
tail(lastrank)
dim(lastrank)
names(lastrank)[4] <- "Tourn Played"
names(lastrank)[3] <- "Week Change"
... | /rankings table 1 year.r | no_license | jzwolski/Stat-585--Tennis-Project | R | false | false | 1,629 | r | ###Create a table of rankings for 1 year###
rank <- "http://www.atpworldtour.com/Rankings/Singles.aspx?d=17.03.2014&r=1&c=#"
rank
tables <- readHTMLTable(rank)
ldply(tables, dim)
lastrank <- tables[[1]]
head(lastrank)
tail(lastrank)
dim(lastrank)
names(lastrank)[4] <- "Tourn Played"
names(lastrank)[3] <- "Week Change"
... |
library("data.table")
## setwd("~/Desktop/datasciencecoursera/4_Exploratory_Data_Analysis/project/data")
#Reads in data from file then subsets data for specified dates
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
# Prevents histogram ... | /plot1.r | no_license | Ei5baer/ExData_Plotting1 | R | false | false | 907 | r | library("data.table")
## setwd("~/Desktop/datasciencecoursera/4_Exploratory_Data_Analysis/project/data")
#Reads in data from file then subsets data for specified dates
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
# Prevents histogram ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/widget.R
\name{use_d3_format}
\alias{use_d3_format}
\alias{d3_format_js}
\title{Use d3.format with a htmlwidget}
\usage{
use_d3_format(widget)
d3_format_js(specifier, prefix = "", suffix = "", locale = "en-US")
}
\arguments{
\item{widget}{An... | /man/use_d3_format.Rd | no_license | jpmarindiaz/d3.format | R | false | true | 2,022 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/widget.R
\name{use_d3_format}
\alias{use_d3_format}
\alias{d3_format_js}
\title{Use d3.format with a htmlwidget}
\usage{
use_d3_format(widget)
d3_format_js(specifier, prefix = "", suffix = "", locale = "en-US")
}
\arguments{
\item{widget}{An... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/monty-hall-problem.R
\name{change_door}
\alias{change_door}
\title{placeholder}
\usage{
change_door(stay = T, opened.door, a.pick)
}
\arguments{
\item{placeholder}{}
}
\value{
placeholder
}
\description{
placeholder
}
\details{
placeholder
}
... | /man/change_door.Rd | no_license | nbugliar/montyhall | R | false | true | 345 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/monty-hall-problem.R
\name{change_door}
\alias{change_door}
\title{placeholder}
\usage{
change_door(stay = T, opened.door, a.pick)
}
\arguments{
\item{placeholder}{}
}
\value{
placeholder
}
\description{
placeholder
}
\details{
placeholder
}
... |
#' Frequent U.S. First Names
#'
#' A dataset containing frequent first names based on the 1990 U.S. census.
#'
#' @details
#' \itemize{
#' \item Name. A first name
#' \item prop. The proportion within the sex
#' \item sex. The sex corresponding to the name
#' }
#'
#' @docType data
#' @keywords datasets
#' @name f... | /R/freq_first_names.R | no_license | Mpellet771/lexicon | R | false | false | 543 | r | #' Frequent U.S. First Names
#'
#' A dataset containing frequent first names based on the 1990 U.S. census.
#'
#' @details
#' \itemize{
#' \item Name. A first name
#' \item prop. The proportion within the sex
#' \item sex. The sex corresponding to the name
#' }
#'
#' @docType data
#' @keywords datasets
#' @name f... |
#' @export
#' @title Optimization of SCCAN sparseness
#'
#' @description
#' Function used to optimize SCCAN sparseness for
#' lesion to symptom mapping.
#'
#' @param lesmat lesion matrix
#' @param behavior behavior vector
#' @param mask antsImage mask
#' @param nFolds how many folds to use
#' @param sparsenessPenalty p... | /R/optimize_SCCANsparseness.R | permissive | hanayik/LESYMAP | R | false | false | 8,079 | r | #' @export
#' @title Optimization of SCCAN sparseness
#'
#' @description
#' Function used to optimize SCCAN sparseness for
#' lesion to symptom mapping.
#'
#' @param lesmat lesion matrix
#' @param behavior behavior vector
#' @param mask antsImage mask
#' @param nFolds how many folds to use
#' @param sparsenessPenalty p... |
# CSOSA Modified of a H. Achicanoy script
# CIAT, 2016
data<-read.csv("",header=T)
### =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ###
### Rename folders and files in KML_FOLDER
### =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ###
#main_dir = ""
main_dir = ""
files_ch... | /kmz/changeNameKMZ.R | no_license | CIAT-DAPA/cwr_verticaltask | R | false | false | 2,620 | r | # CSOSA Modified of a H. Achicanoy script
# CIAT, 2016
data<-read.csv("",header=T)
### =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ###
### Rename folders and files in KML_FOLDER
### =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ###
#main_dir = ""
main_dir = ""
files_ch... |
#!/usr/bin/env Rscript
library(tidyverse);
dirNames <- list.dirs("microarray_2020-Aug-19", recursive=FALSE);
names(dirNames) <- list.dirs("microarray_2020-Aug-19", recursive=FALSE,
full.names=FALSE);
results.all <- list();
dateStr <- format(Sys.Date(), "%Y-%b-%d");
pdf(file=sprintf("GS... | /GSEA_parser.r | no_license | fronchese/Mayer_et_al_2020 | R | false | false | 6,461 | r | #!/usr/bin/env Rscript
library(tidyverse);
dirNames <- list.dirs("microarray_2020-Aug-19", recursive=FALSE);
names(dirNames) <- list.dirs("microarray_2020-Aug-19", recursive=FALSE,
full.names=FALSE);
results.all <- list();
dateStr <- format(Sys.Date(), "%Y-%b-%d");
pdf(file=sprintf("GS... |
######################################################################
## Apply EpiFilter to COVID data from New Zealand
# From: Parag, KV, (2020) “Improved real-time estimation of reproduction numbers
# at low case incidence and between epidemic waves” BioRxiv.
#########################################################... | /R files/vignetteCOVID.R | no_license | dazhwu/EpiFilter | R | false | false | 2,897 | r | ######################################################################
## Apply EpiFilter to COVID data from New Zealand
# From: Parag, KV, (2020) “Improved real-time estimation of reproduction numbers
# at low case incidence and between epidemic waves” BioRxiv.
#########################################################... |
library(qtl)
library(snowfall)
load("/share/malooflab/Ruijuan/F2/QTL_analysis/data/LG.f2.after.crossover.43traits.Rdata")
LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32)
LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1)
sfInit(parallel = TRUE, cpus = 16)
sfExport("LG.f2.... | /F2/scantwo/scantwo_perm_7.4.R | no_license | leejimmy93/KIAT_cabernet | R | false | false | 750 | r | library(qtl)
library(snowfall)
load("/share/malooflab/Ruijuan/F2/QTL_analysis/data/LG.f2.after.crossover.43traits.Rdata")
LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32)
LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1)
sfInit(parallel = TRUE, cpus = 16)
sfExport("LG.f2.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/a.R
\name{getNdAge}
\alias{getNdAge}
\title{Get age}
\usage{
getNdAge(tree, id, tree_age)
}
\arguments{
\item{tree}{\code{TreeMan} object}
\item{id}{node id}
\item{tree_age}{numeric value of known age of tree}
}
\description{
Return the age... | /man/getNdAge.Rd | permissive | ropensci/phylotaR | R | false | true | 912 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/a.R
\name{getNdAge}
\alias{getNdAge}
\title{Get age}
\usage{
getNdAge(tree, id, tree_age)
}
\arguments{
\item{tree}{\code{TreeMan} object}
\item{id}{node id}
\item{tree_age}{numeric value of known age of tree}
}
\description{
Return the age... |
\name{antibioticLookup.dat}
\alias{antibioticLookup.dat}
\docType{data}
\title{Antibiotic look-up table}
\description{
%% ~~ A concise (1-5 lines) description of the dataset. ~~
}
\usage{data(antibioticLookup.dat)}
\format{
A data frame with 59 observations on the following 5 variables.
\describe{
\item{\code{... | /man/antibioticLookup.dat.Rd | no_license | n8thangreen/HESmanip | R | false | false | 1,318 | rd | \name{antibioticLookup.dat}
\alias{antibioticLookup.dat}
\docType{data}
\title{Antibiotic look-up table}
\description{
%% ~~ A concise (1-5 lines) description of the dataset. ~~
}
\usage{data(antibioticLookup.dat)}
\format{
A data frame with 59 observations on the following 5 variables.
\describe{
\item{\code{... |
## useful_functions.R
#Put any functions that might be used across multiple scripts here so that they can be properly sourced in.
install.packages("tidyverse")
install.packages("readxl")
install.packages("ca")
install.packages("forecast")
install.packages("MLmetrics")
#excel read, graphs
library(ggplot2)
library(rea... | /analysis/useful_functions.R | permissive | nmabbassi/covid_ej | R | false | false | 405 | r | ## useful_functions.R
#Put any functions that might be used across multiple scripts here so that they can be properly sourced in.
install.packages("tidyverse")
install.packages("readxl")
install.packages("ca")
install.packages("forecast")
install.packages("MLmetrics")
#excel read, graphs
library(ggplot2)
library(rea... |
## ChIP-chip Data workflow thingo magico
library(Ringo)
library(magrittr)
library(limma)
library(mclust)
library(ggplot2)
arrayfiles <- list.files(path="/home/a1649239/DataFiles/ChIPseq/Mouse/",
pattern="GSM742106_US45103054_251471711563_S01_ChIP")
RG <- read.maimages(arrayfiles,
... | /LabBook/Scripts/May/10-5-2017.R | no_license | awaisc/Thesis-Code-and-Supplementary-Files | R | false | false | 4,359 | r |
## ChIP-chip Data workflow thingo magico
library(Ringo)
library(magrittr)
library(limma)
library(mclust)
library(ggplot2)
arrayfiles <- list.files(path="/home/a1649239/DataFiles/ChIPseq/Mouse/",
pattern="GSM742106_US45103054_251471711563_S01_ChIP")
RG <- read.maimages(arrayfiles,
... |
#' Produce a dataframe with numbers and percentages
#'
#' @description Takes a data frame and tabulates two variables producing
#' the number and percentage either by row, column or total.
#'
#' @details
#'
#' People like to see the raw numbers but often think about them the summary
#' statistics that desc... | /R/table_summary.R | no_license | sal-medstats/ctru | R | false | false | 12,165 | r | #' Produce a dataframe with numbers and percentages
#'
#' @description Takes a data frame and tabulates two variables producing
#' the number and percentage either by row, column or total.
#'
#' @details
#'
#' People like to see the raw numbers but often think about them the summary
#' statistics that desc... |
modelInfo <- list(label = "Random Ferns",
library = "rFerns",
loop = NULL,
type = c('Classification'),
parameters = data.frame(parameter = c('depth'),
class = c('numeric'),
... | /models/files/rFerns.R | no_license | bleutner/caret | R | false | false | 1,192 | r | modelInfo <- list(label = "Random Ferns",
library = "rFerns",
loop = NULL,
type = c('Classification'),
parameters = data.frame(parameter = c('depth'),
class = c('numeric'),
... |
#app!
library(tidyverse)
library(shiny)
library(shinydashboard)
library(ggplot2)
library(magrittr)
library(tibble)
library(dplyr)
library(lubridate)
library(rsconnect)
source("helper_functions.R",local=TRUE)
ui <- fluidPage(
titlePanel("Summary of UMD Services Provided, 2000-2019"),
sidebarPanel(
h4("An... | /project_2/app.R | no_license | datasci611/bios611-projects-fall-2019-kingwilliam87 | R | false | false | 2,069 | r | #app!
library(tidyverse)
library(shiny)
library(shinydashboard)
library(ggplot2)
library(magrittr)
library(tibble)
library(dplyr)
library(lubridate)
library(rsconnect)
source("helper_functions.R",local=TRUE)
ui <- fluidPage(
titlePanel("Summary of UMD Services Provided, 2000-2019"),
sidebarPanel(
h4("An... |
\name{gwas}
\alias{gwas}
\title{GWAS summary}
\description{
Summarize and visualise GWAS results.
}
\usage{
gwas(analysis,
style = c('manhattan', 'qqplot'),
pval_thresh = 5e-08, maf_ge, rsq_ge,
gene_annotate = TRUE,
plot_ymax = 30,
manhattan_thresh = 5e-08,
manhattan_col = c('#064F7C', ... | /man/gwas.Rd | no_license | tobyjohnson/gtx | R | false | false | 2,273 | rd | \name{gwas}
\alias{gwas}
\title{GWAS summary}
\description{
Summarize and visualise GWAS results.
}
\usage{
gwas(analysis,
style = c('manhattan', 'qqplot'),
pval_thresh = 5e-08, maf_ge, rsq_ge,
gene_annotate = TRUE,
plot_ymax = 30,
manhattan_thresh = 5e-08,
manhattan_col = c('#064F7C', ... |
validateOutcome <- function(outcome) {
## 01 - TYPES
if(!is.character(outcome)) {
stop("invalid outcome")
}
#02 - CONTENT
outcomes <- c("heart attack", "pneumonia", "heart failure")
if (is.na(match(outcome, outcomes))) {
stop("inv... | /Programming Assignment 3-Hospital Quality/validateOutcome.R | no_license | andreluisdias/coursera-r-project | R | false | false | 346 | r | validateOutcome <- function(outcome) {
## 01 - TYPES
if(!is.character(outcome)) {
stop("invalid outcome")
}
#02 - CONTENT
outcomes <- c("heart attack", "pneumonia", "heart failure")
if (is.na(match(outcome, outcomes))) {
stop("inv... |
library(data.table)
COLS <- c("red","blue","green","purple","brown","goldenrod")
## PARAM
ABBREV.MODE <- F
ARGS <- commandArgs(trailingOnly=T)
if (length(ARGS) != 5) {
cat("plot_cnv_gene.R <in.PCA_NORM_Z_SCORES.mat.txt>",
"<capture.bed> <chr:bp1-bp2> <iid1,..,iidN> <out.pdf>\n")
q()
}
in.pca_norm_z.mat.tx... | /src/supptables/plot_cnv_gene.R | no_license | Halvee/OCD_WES_analysis_full_NatureNeuro2020 | R | false | false | 2,832 | r |
library(data.table)
COLS <- c("red","blue","green","purple","brown","goldenrod")
## PARAM
ABBREV.MODE <- F
ARGS <- commandArgs(trailingOnly=T)
if (length(ARGS) != 5) {
cat("plot_cnv_gene.R <in.PCA_NORM_Z_SCORES.mat.txt>",
"<capture.bed> <chr:bp1-bp2> <iid1,..,iidN> <out.pdf>\n")
q()
}
in.pca_norm_z.mat.tx... |
# template to normalise raw counts
library(DESeq2)
mx_samples = read.table('../test_data/GSE80655_GeneExpressionData_Updated_3-26-2018.txt', header=TRUE, sep = '\t')
# convert to numeric
countDataMatrix <- as.matrix(mx_samples[ , -1])
rownames(countDataMatrix) <- mx_samples[ , 1]
# construct fake design
sample_names... | /preprocess/normalisation.r | no_license | torpidfox/GeneExpressionMapping | R | false | false | 1,519 | r | # template to normalise raw counts
library(DESeq2)
mx_samples = read.table('../test_data/GSE80655_GeneExpressionData_Updated_3-26-2018.txt', header=TRUE, sep = '\t')
# convert to numeric
countDataMatrix <- as.matrix(mx_samples[ , -1])
rownames(countDataMatrix) <- mx_samples[ , 1]
# construct fake design
sample_names... |
#Visualizing two variable on XY axis with trendline. we compare wind speed and Temp in first
ggplot(airquality, aes(Temp,Wind)) + geom_point() + geom_smooth( method = "lm")
#we compare solar and ozone
ggplot(airquality, aes(Ozone,Solar.R)) + geom_point() + geom_smooth( method = "lm")
#linear regression with lm ... | /Airquality.R | no_license | GSKUMBHARE/Assignment1_GSk | R | false | false | 1,193 | r | #Visualizing two variable on XY axis with trendline. we compare wind speed and Temp in first
ggplot(airquality, aes(Temp,Wind)) + geom_point() + geom_smooth( method = "lm")
#we compare solar and ozone
ggplot(airquality, aes(Ozone,Solar.R)) + geom_point() + geom_smooth( method = "lm")
#linear regression with lm ... |
#title :week3quiz.R
#description :This is a quiz file from week 3 lessons.
#author :Hizkia Febianto
#date :20170616
###QUESTION 1###
data(iris)
?iris
summary(iris)
tapply(iris$Sepal.Length,iris$Species,mean)
###QUESTION 2###
apply(iris[,1:4],2,mean)
###QUESTION 3###
data("mtcars")
t... | /week3quiz.R | no_license | hizkiafebianto/LearningR | R | false | false | 724 | r | #title :week3quiz.R
#description :This is a quiz file from week 3 lessons.
#author :Hizkia Febianto
#date :20170616
###QUESTION 1###
data(iris)
?iris
summary(iris)
tapply(iris$Sepal.Length,iris$Species,mean)
###QUESTION 2###
apply(iris[,1:4],2,mean)
###QUESTION 3###
data("mtcars")
t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rapt_envelopes.R
\name{pF3est-deprecated}
\alias{pF3est-deprecated}
\title{Perform F3est on random relabelings in parallel}
\arguments{
\item{perc}{The fraction of points to select randomly each time out of the
original \code{\link[spatstat.g... | /man/pF3est-deprecated.Rd | no_license | aproudian2/rapt | R | false | true | 3,338 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rapt_envelopes.R
\name{pF3est-deprecated}
\alias{pF3est-deprecated}
\title{Perform F3est on random relabelings in parallel}
\arguments{
\item{perc}{The fraction of points to select randomly each time out of the
original \code{\link[spatstat.g... |
library(shiny)
shinyServer(function(input, output) {
output$dataset <- renderTable({
theData = switch(input$dataSet,
"iris" = iris,
"USPersonalExpenditure" = USPersonalExpenditure,
"CO2" = CO2)
head(theData)
})
output$d... | /ExamplesSet1/ex31/server.R | no_license | DragonflyStats/Shiny-Tutorial-Notes | R | false | false | 744 | r | library(shiny)
shinyServer(function(input, output) {
output$dataset <- renderTable({
theData = switch(input$dataSet,
"iris" = iris,
"USPersonalExpenditure" = USPersonalExpenditure,
"CO2" = CO2)
head(theData)
})
output$d... |
#!/usr/bin/env Rscript
library('data.table')
allreps=c()
for(r in 1:100){
allres=c()
for(c in 1:10){
res=fread(sprintf('selection/bg%.0f_founder_chisq_rep%.0f_results.txt',c,r),data.table=F)
allres=rbind(allres,res)
}
allreps=rbind(allreps,c(r,min(allres$p_chi)))
}
allreps=as.data.frame(allreps,strin... | /run_magicsim/chisq_threshold.R | no_license | sarahodell/biogemma | R | false | false | 451 | r | #!/usr/bin/env Rscript
library('data.table')
allreps=c()
for(r in 1:100){
allres=c()
for(c in 1:10){
res=fread(sprintf('selection/bg%.0f_founder_chisq_rep%.0f_results.txt',c,r),data.table=F)
allres=rbind(allres,res)
}
allreps=rbind(allreps,c(r,min(allres$p_chi)))
}
allreps=as.data.frame(allreps,strin... |
rm(list = ls())
library(ncdf4)
library(dplyr)
library(lubridate)
library(purrr)
library(ggplot2)
library(RColorBrewer)
library(LidarED)
library(pracma)
library(gridExtra)
years <- 2007:2009
source.dir <- "~/R/LidarED/runs/growth_storage_resp/"
local.dir <- dir(source.dir,full.names = TRUE)[file.info(dir(source.dir,fu... | /scripts/model.data.comp.R | no_license | femeunier/LidarED | R | false | false | 6,888 | r | rm(list = ls())
library(ncdf4)
library(dplyr)
library(lubridate)
library(purrr)
library(ggplot2)
library(RColorBrewer)
library(LidarED)
library(pracma)
library(gridExtra)
years <- 2007:2009
source.dir <- "~/R/LidarED/runs/growth_storage_resp/"
local.dir <- dir(source.dir,full.names = TRUE)[file.info(dir(source.dir,fu... |
rm(list=ls())
library(dplyr)
library(rvest)
library(tidyverse)
# ambil dbase links TOKPED
link = readLines('Tokopedia Link.txt')
link = unique(link)
dummy = data.frame(id = c(1:length(link)),
url = link)
dummy =
dummy %>%
filter(!grepl('promo|search|iklan',url,ignore.case = T)) %... | /code/link preparation.R | no_license | FahmiRR/ecommerce-scrape | R | false | false | 493 | r | rm(list=ls())
library(dplyr)
library(rvest)
library(tidyverse)
# ambil dbase links TOKPED
link = readLines('Tokopedia Link.txt')
link = unique(link)
dummy = data.frame(id = c(1:length(link)),
url = link)
dummy =
dummy %>%
filter(!grepl('promo|search|iklan',url,ignore.case = T)) %... |
source('../utilities.R')
source('../true_target_parameters_derivatives_and_ICs.R')
source('../generate_data.R')
source('../TMLE_extrapolation_functions.R')
# library(Rmpi); library(doMPI)
library(speedglm)
library(boot); library(segmented)
# Define inference functions ----------------------------------------------
... | /data-adaptive_delta_selection/broken_line_find_gamma-functions-no_bootstrap-mpi.R | no_license | aurelienbibaut/c-tmle_truncation | R | false | false | 9,395 | r | source('../utilities.R')
source('../true_target_parameters_derivatives_and_ICs.R')
source('../generate_data.R')
source('../TMLE_extrapolation_functions.R')
# library(Rmpi); library(doMPI)
library(speedglm)
library(boot); library(segmented)
# Define inference functions ----------------------------------------------
... |
#' Calculate F-values for individual identity traits
#'
#' This function calculates ANOVA F-values (type I sum of squares) for all
#' identity traits in dataset along with its significance. Each trait is used as
#' dependent and identity code as independent variable. \cr\cr \strong{Reference:} e.g., Miller, D. B. (1978... | /R/calcF.R | no_license | FacuFD/IDmeasurer | R | false | false | 1,324 | r | #' Calculate F-values for individual identity traits
#'
#' This function calculates ANOVA F-values (type I sum of squares) for all
#' identity traits in dataset along with its significance. Each trait is used as
#' dependent and identity code as independent variable. \cr\cr \strong{Reference:} e.g., Miller, D. B. (1978... |
#' Data directory structure
#'
#' Below are all the data directories that are
#' created to store data sets of different sizes
locale <- "en_US"
data.raw.dir <- "data/raw"
data.raw.en_US <- "data/raw/final/en_US"
data.compress.dir <- "data/compress"
data.samples.dir <- "data/samples"
data.clean.dir <- "data/clean"
dat... | /scripts/globals.R | no_license | AnanthGe/text_prediction | R | false | false | 1,167 | r | #' Data directory structure
#'
#' Below are all the data directories that are
#' created to store data sets of different sizes
locale <- "en_US"
data.raw.dir <- "data/raw"
data.raw.en_US <- "data/raw/final/en_US"
data.compress.dir <- "data/compress"
data.samples.dir <- "data/samples"
data.clean.dir <- "data/clean"
dat... |
# 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
#' ComAdobeGraniteOffloadingImplOff... | /clients/r/generated/R/ComAdobeGraniteOffloadingImplOffloadingJobOffloaderInfo.r | permissive | shinesolutions/swagger-aem-osgi | R | false | false | 6,275 | 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
#' ComAdobeGraniteOffloadingImplOff... |
#Takes complex out of Merged clusters and and provides a list of matrices and arrays
posterior_quantities <- function(Merged_clusters){
#Mutation count per cluster
posteriorSamples <- array(unlist(Merged_clusters@comp_categ_counts), dim=c(dim(Merged_clusters@comp_categ_counts[[1]]),
... | /Output_to_Posterior.R | no_license | river-fish/Cluster | R | false | false | 3,063 | r | #Takes complex out of Merged clusters and and provides a list of matrices and arrays
posterior_quantities <- function(Merged_clusters){
#Mutation count per cluster
posteriorSamples <- array(unlist(Merged_clusters@comp_categ_counts), dim=c(dim(Merged_clusters@comp_categ_counts[[1]]),
... |
#run_analysis.R
#1
if (file.exists("UCI HAR Dataset") != TRUE){
stop("UCI HAR Dataset folder is not in working directory")
}
file_name <- readline("Enter your desired final data file name. Filename = ")
#2
library(data.table)
library(dplyr)
#3
feature_measurements_test <- read.table("UCI HAR Dataset/test/X_tes... | /run_analysis.R | no_license | cwfergus/run_analysis | R | false | false | 2,741 | r | #run_analysis.R
#1
if (file.exists("UCI HAR Dataset") != TRUE){
stop("UCI HAR Dataset folder is not in working directory")
}
file_name <- readline("Enter your desired final data file name. Filename = ")
#2
library(data.table)
library(dplyr)
#3
feature_measurements_test <- read.table("UCI HAR Dataset/test/X_tes... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Tmisc-package.R
\docType{package}
\name{Tmisc-package}
\alias{Tmisc}
\alias{Tmisc-package}
\title{Tmisc: Turner Miscellaneous}
\description{
Miscellaneous utility functions for data manipulation, data tidying, and working with gene expression... | /man/Tmisc-package.Rd | no_license | cran/Tmisc | R | false | true | 623 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Tmisc-package.R
\docType{package}
\name{Tmisc-package}
\alias{Tmisc}
\alias{Tmisc-package}
\title{Tmisc: Turner Miscellaneous}
\description{
Miscellaneous utility functions for data manipulation, data tidying, and working with gene expression... |
library(bigreadr)
### Name: fwrite2
### Title: Write a data frame to a text file
### Aliases: fwrite2
### ** Examples
tmp <- fwrite2(iris)
iris2 <- fread2(tmp)
all.equal(iris2, iris) ## fread doesn't use factors
| /data/genthat_extracted_code/bigreadr/examples/fwrite2.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 220 | r | library(bigreadr)
### Name: fwrite2
### Title: Write a data frame to a text file
### Aliases: fwrite2
### ** Examples
tmp <- fwrite2(iris)
iris2 <- fread2(tmp)
all.equal(iris2, iris) ## fread doesn't use factors
|
library(multiDiff)
library(synthdid)
data('california_prop99')
mdd_california_prop99 <- mdd_data_format(california_prop99,
y_var = "PacksPerCapita",
time.index = "Year",
treat = "treated",
... | /tests/testthat/test-mdd_synthdid.R | permissive | MatthieuStigler/multiDiff | R | false | false | 1,446 | r | library(multiDiff)
library(synthdid)
data('california_prop99')
mdd_california_prop99 <- mdd_data_format(california_prop99,
y_var = "PacksPerCapita",
time.index = "Year",
treat = "treated",
... |
library(LoopAnalyst)
### Name: cem.corr
### Title: Compute the Tables of Correlations for a Community Effect matrix
### Aliases: cem.corr
### Keywords: graphs
### ** Examples
## compute tables of correlations
data(cm.levins)
cem <- make.cem(cm.levins)
cem.corr(cem)
| /data/genthat_extracted_code/LoopAnalyst/examples/cem.corr.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 273 | r | library(LoopAnalyst)
### Name: cem.corr
### Title: Compute the Tables of Correlations for a Community Effect matrix
### Aliases: cem.corr
### Keywords: graphs
### ** Examples
## compute tables of correlations
data(cm.levins)
cem <- make.cem(cm.levins)
cem.corr(cem)
|
#lineplot.CI code obtained from sciplot package on CRAN
#Original code written by: Manuel Morales
lineplot.CI <-
function(x.factor, response, group = NULL, type = "b", x.cont=FALSE,
legend = TRUE, trace.label = NULL, leg.lab = NULL,
fixed = FALSE, x.leg = NULL, y.leg = NULL, cex.leg = 1, ncol = ... | /CurrentReleaseStable/Demonstrate_09/lineplotCI.R | no_license | UNCW-iPlant/Validate-Master | R | false | false | 8,982 | r | #lineplot.CI code obtained from sciplot package on CRAN
#Original code written by: Manuel Morales
lineplot.CI <-
function(x.factor, response, group = NULL, type = "b", x.cont=FALSE,
legend = TRUE, trace.label = NULL, leg.lab = NULL,
fixed = FALSE, x.leg = NULL, y.leg = NULL, cex.leg = 1, ncol = ... |
prm <- c(one=1, two=2, 3=3, 4=4)
prm <- c(one=1, two=2, "3"=3, "4"=4)
prm
maskidx <- c(1)
maskidx <- c("one")
lower <- c(0,0,0,1)
upper <- c(1,1,1,1)
tmask <- which(lower==upper)
tmask
newmask <- maskidx && tmask
newmask <- maskidx & tmask
tmask
str(tmask)
str(maskidx)
pnames <- names(prm)
pnames
masked <- maskidx # fi... | /nlsralt/inst/dev-files/tunionmasked.R | no_license | ArkaB-DS/GSOC21-improveNLS | R | false | false | 549 | r | prm <- c(one=1, two=2, 3=3, 4=4)
prm <- c(one=1, two=2, "3"=3, "4"=4)
prm
maskidx <- c(1)
maskidx <- c("one")
lower <- c(0,0,0,1)
upper <- c(1,1,1,1)
tmask <- which(lower==upper)
tmask
newmask <- maskidx && tmask
newmask <- maskidx & tmask
tmask
str(tmask)
str(maskidx)
pnames <- names(prm)
pnames
masked <- maskidx # fi... |
############################################
# Identifying Recentralization
# Dataset: IDC_analysis_master_GM_20210608.rds
# This Dataset is the most recently merged dataset according to Ashley
# at the time this particular script was created, which is July 8, 2021.
# Recentralization: 1 to 0
# Updated By: Will Taylor,... | /Flagging Recentralization_MostRecent_WT_AZ_AB_07082021.R | no_license | wdtaylor30/SPEC_Lab | R | false | false | 3,573 | r | ############################################
# Identifying Recentralization
# Dataset: IDC_analysis_master_GM_20210608.rds
# This Dataset is the most recently merged dataset according to Ashley
# at the time this particular script was created, which is July 8, 2021.
# Recentralization: 1 to 0
# Updated By: Will Taylor,... |
#' Horizontal Bar Plot Showing Percentage
#'
#' \code{horizontal_bar} plot a horizontal bar plot, with each small bar represent the
#' percentage of a categorical variable with respect to another categorical variable.
#'
#' The function will first count the number of samples based on the two categorical variables
#' sp... | /R/horizontal_bar.R | no_license | jkang37/dppbar | R | false | false | 5,456 | r | #' Horizontal Bar Plot Showing Percentage
#'
#' \code{horizontal_bar} plot a horizontal bar plot, with each small bar represent the
#' percentage of a categorical variable with respect to another categorical variable.
#'
#' The function will first count the number of samples based on the two categorical variables
#' sp... |
## Just look at requirements from "delivery" policies
delivery_policies <- read_csv("data/indices/delivery-policies.csv")
delivery_policy_reqs <- requirements_tagged_with_responsibles %>%
filter(id %in% delivery_policies$id)
delivery_policy_reqs %>% write_csv("data/out/delivery.csv")
### How many requirements involv... | /analysis/delivery.R | no_license | lchski/requirement-responsibility-labeller | R | false | false | 617 | r | ## Just look at requirements from "delivery" policies
delivery_policies <- read_csv("data/indices/delivery-policies.csv")
delivery_policy_reqs <- requirements_tagged_with_responsibles %>%
filter(id %in% delivery_policies$id)
delivery_policy_reqs %>% write_csv("data/out/delivery.csv")
### How many requirements involv... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/functions.R
\name{getId}
\alias{getId}
\title{A recursive way to get structure IDs and names of structure given an exact name string. Used by \code{\link{getStructureIds}}}
\usage{
getId(nestedList, name)
}
\arguments{
\item{nestedLis... | /man/getId.Rd | no_license | Xiaojieqiu/brainmapr | R | false | false | 737 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/functions.R
\name{getId}
\alias{getId}
\title{A recursive way to get structure IDs and names of structure given an exact name string. Used by \code{\link{getStructureIds}}}
\usage{
getId(nestedList, name)
}
\arguments{
\item{nestedLis... |
#' Contaminants and isotopic measures
#'
#' Measures of concentrations of different perfluoroalkylated
#' substances and isotopic ratios on 138 individuals from 16 species
#' in the Gironde estuary collected (Munoz et al. 2017). NA correspond
#' to left censored observations
#'
#' @format A data frame with 53940 rows a... | /R/data.R | permissive | mballutaud/escroc | R | false | false | 3,884 | r | #' Contaminants and isotopic measures
#'
#' Measures of concentrations of different perfluoroalkylated
#' substances and isotopic ratios on 138 individuals from 16 species
#' in the Gironde estuary collected (Munoz et al. 2017). NA correspond
#' to left censored observations
#'
#' @format A data frame with 53940 rows a... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
# Matrix inversion is usually a costly computation and there may be some benefit
# to caching the inverse of a matrix rather than compute it repeatedly. The
# following two functions ar... | /cachematrix.R | no_license | ehansel78/ProgrammingAssignment2 | R | false | false | 1,502 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
# Matrix inversion is usually a costly computation and there may be some benefit
# to caching the inverse of a matrix rather than compute it repeatedly. The
# following two functions ar... |
######################################################
# Purpose: extract number of records for each variable (combining _OM and _C) for the following forest types:
# - tropical (Koppen = A_) broadleaf ≥100 yrs
# - tropical (Koppen = A_) broadleaf <100 yrs
# - temperate (Koppen= C__, D_a or D_b) broadleaf ≥100 yrs
# - ... | /ForC-master/scripts/Database_numbers_and_facts/Sample_size_per_variable_and forest_biome_combination.R | no_license | mingkaijiang/ForC_analysis | R | false | false | 4,525 | r | ######################################################
# Purpose: extract number of records for each variable (combining _OM and _C) for the following forest types:
# - tropical (Koppen = A_) broadleaf ≥100 yrs
# - tropical (Koppen = A_) broadleaf <100 yrs
# - temperate (Koppen= C__, D_a or D_b) broadleaf ≥100 yrs
# - ... |
#!/usr/bin/env Rscript
# this stub reads 1 line of input from STDIN and writes it out to STDOUT
f <- file("stdin")
open(f)
lines <- suppressWarnings(readLines(f, n=1))
# lines <- "111 5"
lines <- strsplit(lines," ")[[1]]
N <- as.numeric(lines[1])
K <- as.integer(lines[2])
for (i in 1:K) {
N <- ifelse(N %% 2 == 0,... | /ml/hackerrank/COchallenge/3/collatz.R | no_license | parsashams/misc | R | false | false | 398 | r | #!/usr/bin/env Rscript
# this stub reads 1 line of input from STDIN and writes it out to STDOUT
f <- file("stdin")
open(f)
lines <- suppressWarnings(readLines(f, n=1))
# lines <- "111 5"
lines <- strsplit(lines," ")[[1]]
N <- as.numeric(lines[1])
K <- as.integer(lines[2])
for (i in 1:K) {
N <- ifelse(N %% 2 == 0,... |
dane <- read.table("http://www.mini.pw.edu.pl/~bobecka/rzeki.txt",header=TRUE)
y <- dane$Nitrogen
x1 <- dane$Agr
x2 <- dane$Forest
x3 <- dane$Rsdntial
x4 <- dane$ComIndl
m <- lm(y~x1+x2+x3+x4)
summary(m)
r1 <- m$residuals
r2 <- rstandard(m)
par(mfrow=c(2,1))
plot(r1)
plot(r2)
dane1 <- subse... | /SFU/31pazdziernik.R | no_license | mskiwniewska/Programowanie-i-analiza-danych-w-R | R | false | false | 1,595 | r | dane <- read.table("http://www.mini.pw.edu.pl/~bobecka/rzeki.txt",header=TRUE)
y <- dane$Nitrogen
x1 <- dane$Agr
x2 <- dane$Forest
x3 <- dane$Rsdntial
x4 <- dane$ComIndl
m <- lm(y~x1+x2+x3+x4)
summary(m)
r1 <- m$residuals
r2 <- rstandard(m)
par(mfrow=c(2,1))
plot(r1)
plot(r2)
dane1 <- subse... |
E001q.R GISS Model E gas 06/00
E001q: Qflux version based on E001
Preprocessor Options
!#define TRACERS_ON ! include tracers code
End Preprocessor Options
Object modules: (in order of decreasing priority)
RES_M12 ! horiz/vert resolution, 4x... | /source/model/E001q.R | permissive | Climostatistics/giss_model_e | R | false | false | 5,039 | r | E001q.R GISS Model E gas 06/00
E001q: Qflux version based on E001
Preprocessor Options
!#define TRACERS_ON ! include tracers code
End Preprocessor Options
Object modules: (in order of decreasing priority)
RES_M12 ! horiz/vert resolution, 4x... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/robregcc.R
\name{robregcc_sim}
\alias{robregcc_sim}
\title{Simulation data}
\usage{
robregcc_sim(n, betacc, beta0, O, Sigma, levg, snr, shft, m, C, out = list())
}
\arguments{
\item{n}{sample size}
\item{betacc}{model parameter satisfying co... | /robregcc/man/robregcc_sim.Rd | no_license | mmp3/robregcc | R | false | true | 2,714 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/robregcc.R
\name{robregcc_sim}
\alias{robregcc_sim}
\title{Simulation data}
\usage{
robregcc_sim(n, betacc, beta0, O, Sigma, levg, snr, shft, m, C, out = list())
}
\arguments{
\item{n}{sample size}
\item{betacc}{model parameter satisfying co... |
############################### HEADER ######################################
# TITLE: ProcessHOBO.R
# DESCRIPTION: Process raw HOBO txt files and import data to the database
# AUTHOR(S): Dan Crocker
# DATE LAST UPDATED: 2020-12-30
# GIT REPO:
# R version 3.5.3 (2019-03-11) x86_64
############################... | /ProcessHOBO.R | permissive | dancrocker/DCR-TribTools | R | false | false | 37,084 | r | ############################### HEADER ######################################
# TITLE: ProcessHOBO.R
# DESCRIPTION: Process raw HOBO txt files and import data to the database
# AUTHOR(S): Dan Crocker
# DATE LAST UPDATED: 2020-12-30
# GIT REPO:
# R version 3.5.3 (2019-03-11) x86_64
############################... |
# data input
df <- data.frame(age = numeric(0), name = character(0), weight = numeric(0))
edit(df)
# read table
# string will be converted to "factor" type
# using stringsAsFactors=FALSE
# read the file on the internet
url()
# read the excel file
install.packages("RODBC")
library(RODBC)
| /data_input.R | no_license | Joker-Jerome/R_in_action | R | false | false | 292 | r | # data input
df <- data.frame(age = numeric(0), name = character(0), weight = numeric(0))
edit(df)
# read table
# string will be converted to "factor" type
# using stringsAsFactors=FALSE
# read the file on the internet
url()
# read the excel file
install.packages("RODBC")
library(RODBC)
|
library(shiny)
shinyServer(function(input, output) {
data(mtcars)
fit <- lm(mpg ~ wt + as.factor(cyl), data = mtcars)
pred <- reactive({
predict(fit, newdata = data.frame(wt = input$weight, cyl = input$cyl))
})
output$MPGValue <- renderText(round(pred(), 2))
})
| /server.R | no_license | sobolevae/DDP_Project | R | false | false | 289 | r | library(shiny)
shinyServer(function(input, output) {
data(mtcars)
fit <- lm(mpg ~ wt + as.factor(cyl), data = mtcars)
pred <- reactive({
predict(fit, newdata = data.frame(wt = input$weight, cyl = input$cyl))
})
output$MPGValue <- renderText(round(pred(), 2))
})
|
#loading all required packages-------------------------------------------------------------------------
require(BIEN)
require(tidyr)
require(dplyr)
require(stringr)
require(phangorn)
require(ape)
require(phytools)
require(phylolm)
require(MPSEM)
library(picante)
library(readr)
library(ggplot2)
require(mosaic)
require(l... | /01_data_prep.r | no_license | KerkhoffLab/FossilLeafTraits | R | false | false | 13,775 | r | #loading all required packages-------------------------------------------------------------------------
require(BIEN)
require(tidyr)
require(dplyr)
require(stringr)
require(phangorn)
require(ape)
require(phytools)
require(phylolm)
require(MPSEM)
library(picante)
library(readr)
library(ggplot2)
require(mosaic)
require(l... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ss.data.density}
\alias{ss.data.density}
\title{Pellets density}
\format{
A vector with 24 items for the density of a set of pellets
(\emph{gr/cm}$^3$).
}
\source{
Table 1.2 in the reference below.
}
\usage{
data("... | /man/ss.data.density.Rd | no_license | emilopezcano/SixSigma | R | false | true | 849 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ss.data.density}
\alias{ss.data.density}
\title{Pellets density}
\format{
A vector with 24 items for the density of a set of pellets
(\emph{gr/cm}$^3$).
}
\source{
Table 1.2 in the reference below.
}
\usage{
data("... |
library(jsonlite)
library(curl)
library(RCurl)
library(httr)
library(curlconverter)
#myDF = fromJSON('http://www.easports.com/madden-nfl/ultimate-team/web-app/data/1/cards/player?sort=ovr&pos=QB&sort=ovr')$items
#myDF$team = myDF$teamInfo$abbr
myDF = fromJSON('https://www.easports.com/madden-nfl/ratings/service/data... | /maddenTest.R | no_license | bwebs/fantasyNFL | R | false | false | 2,089 | r | library(jsonlite)
library(curl)
library(RCurl)
library(httr)
library(curlconverter)
#myDF = fromJSON('http://www.easports.com/madden-nfl/ultimate-team/web-app/data/1/cards/player?sort=ovr&pos=QB&sort=ovr')$items
#myDF$team = myDF$teamInfo$abbr
myDF = fromJSON('https://www.easports.com/madden-nfl/ratings/service/data... |
\name{getLvriter}
\alias{getLvriter}
\title{
Gets the iteration done until convergence of the loglikelihood estimation of Bradley's scores.}
\description{
Gets the iteration done until convergence from the function \code{EstimBradley()}
}
\usage{
getLvriter(object)
}
\arguments{
\item{object}{
An ob... | /man/getLvriter.Rd | no_license | cran/CompR | R | false | false | 731 | rd | \name{getLvriter}
\alias{getLvriter}
\title{
Gets the iteration done until convergence of the loglikelihood estimation of Bradley's scores.}
\description{
Gets the iteration done until convergence from the function \code{EstimBradley()}
}
\usage{
getLvriter(object)
}
\arguments{
\item{object}{
An ob... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim.R
\name{sim}
\alias{sim}
\title{Simulate from a spatial Matern Random Field}
\usage{
sim(
x = stats::runif(100, 0, 10),
y = stats::runif(100, 0, 10),
X = NULL,
initial_betas = NULL,
sigma_V = 0,
time_steps = 1L,
ar1_fields =... | /man/sim.Rd | no_license | DanOvando/sdmTMB | R | false | true | 2,871 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sim.R
\name{sim}
\alias{sim}
\title{Simulate from a spatial Matern Random Field}
\usage{
sim(
x = stats::runif(100, 0, 10),
y = stats::runif(100, 0, 10),
X = NULL,
initial_betas = NULL,
sigma_V = 0,
time_steps = 1L,
ar1_fields =... |
#=========KMEANS ON IRIS==========
install.packages("mltools")
A = data.frame(iris)
str(A)
library(data.table)
library(mltools)
A = one_hot(as.data.table(A))
#----k = 2----
m1 = kmeans(A,2)
m1$cluster
par(mfrow=c(3,2))
plot(A$Sepal.Length,A$Sepal.Width,col = m1$cluster)
plot(A$Sepal.Length,A$Petal.Length,co... | /08June_R.R | no_license | sourabh29mca/DS_R-GIT-repository-01 | R | false | false | 3,632 | r | #=========KMEANS ON IRIS==========
install.packages("mltools")
A = data.frame(iris)
str(A)
library(data.table)
library(mltools)
A = one_hot(as.data.table(A))
#----k = 2----
m1 = kmeans(A,2)
m1$cluster
par(mfrow=c(3,2))
plot(A$Sepal.Length,A$Sepal.Width,col = m1$cluster)
plot(A$Sepal.Length,A$Petal.Length,co... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DataDocumentation.R
\docType{data}
\name{dpc-covid19-ita-province}
\alias{dpc-covid19-ita-province}
\title{dpc-covid19-ita-province}
\description{
Raw data per Italian province published by the Italy DPC.
}
| /man/dpc-covid19-ita-province.Rd | permissive | TotalVerb/STAT440Project | R | false | true | 285 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DataDocumentation.R
\docType{data}
\name{dpc-covid19-ita-province}
\alias{dpc-covid19-ita-province}
\title{dpc-covid19-ita-province}
\description{
Raw data per Italian province published by the Italy DPC.
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SelectSubjects.R
\name{createMatchingCriteria}
\alias{createMatchingCriteria}
\title{Create matching criteria}
\usage{
createMatchingCriteria(
controlsPerCase = 1,
matchOnAge = TRUE,
ageCaliper = 2,
matchOnGender = TRUE,
matchOnProv... | /man/createMatchingCriteria.Rd | permissive | OHDSI/CaseCrossover | R | false | true | 1,357 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SelectSubjects.R
\name{createMatchingCriteria}
\alias{createMatchingCriteria}
\title{Create matching criteria}
\usage{
createMatchingCriteria(
controlsPerCase = 1,
matchOnAge = TRUE,
ageCaliper = 2,
matchOnGender = TRUE,
matchOnProv... |
### get parameters
args = commandArgs(trailingOnly=TRUE)
index_matrix = args[1]
count_threshold = as.numeric(args[2])
top_lim = 20
index0 = read.table(index_matrix, header = F)
index = apply(index0, 1, function(x) paste(x[5:dim(index0)[2]], collapse='_'))
index_count = table(index)
print(summary(as.matrix(index_count... | /bin/plot_density.R | permissive | guanjue/snapshot | R | false | false | 3,476 | r | ### get parameters
args = commandArgs(trailingOnly=TRUE)
index_matrix = args[1]
count_threshold = as.numeric(args[2])
top_lim = 20
index0 = read.table(index_matrix, header = F)
index = apply(index0, 1, function(x) paste(x[5:dim(index0)[2]], collapse='_'))
index_count = table(index)
print(summary(as.matrix(index_count... |
#' Applying the Box-Cox Transformation.
#'
#' \code{bct} returns the Box-Cox transformed numeric vector (Box and Cox,
#' 1964).
#'
#' @param y a positive real number vector.
#' @param lambda a scalar transformation parameter.
#'
#' @return bct returns the Box-Cox transformed numeric vector,
#' \code{z = log(y)} for \co... | /R/bct.R | no_license | kzkzmr/bcmixed | R | false | false | 939 | r | #' Applying the Box-Cox Transformation.
#'
#' \code{bct} returns the Box-Cox transformed numeric vector (Box and Cox,
#' 1964).
#'
#' @param y a positive real number vector.
#' @param lambda a scalar transformation parameter.
#'
#' @return bct returns the Box-Cox transformed numeric vector,
#' \code{z = log(y)} for \co... |
##
# Course Project - run_analysis.R
#
# Load the required packages
library(data.table)
# Constants
FILE_URL = "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip "
DATA_DIR = "./data"
DATA_ZIP_FILE = "./data.zip"
# Function that gets the datafile and extracts it to the current... | /run_analysis.R | no_license | batmatty/getdata_004_project | R | false | false | 3,635 | r | ##
# Course Project - run_analysis.R
#
# Load the required packages
library(data.table)
# Constants
FILE_URL = "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip "
DATA_DIR = "./data"
DATA_ZIP_FILE = "./data.zip"
# Function that gets the datafile and extracts it to the current... |
#This program is designed to create a triple line graph of the Energy Sub Metering
#in kilowatts using the UC Irvine Machine Learning Repository
#"Individual household electric power consumption Data Set" for 2007-02-01
#and 2007-02-02
library(data.table)
main <- function() {
inputFile = ".//household_power_cons... | /plot3.R | no_license | mdavis3419/ExData_Plotting1 | R | false | false | 2,715 | r | #This program is designed to create a triple line graph of the Energy Sub Metering
#in kilowatts using the UC Irvine Machine Learning Repository
#"Individual household electric power consumption Data Set" for 2007-02-01
#and 2007-02-02
library(data.table)
main <- function() {
inputFile = ".//household_power_cons... |
summary_ML <- function(MLZ_data) {
data.frame(Year = MLZ_data@Year, MeanLength = MLZ_data@MeanLength, ss = MLZ_data@ss)
}
returnNAobjective <- function(x, reps = 1) {
if(inherits(x, "try-error")) as.numeric(rep(NA, reps)) else getElement(x, "objective")
}
bin_length.Len_summary <- function(x, y) {
data... | /R/internal_misc.R | no_license | quang-huynh/MLZ | R | false | false | 1,115 | r | summary_ML <- function(MLZ_data) {
data.frame(Year = MLZ_data@Year, MeanLength = MLZ_data@MeanLength, ss = MLZ_data@ss)
}
returnNAobjective <- function(x, reps = 1) {
if(inherits(x, "try-error")) as.numeric(rep(NA, reps)) else getElement(x, "objective")
}
bin_length.Len_summary <- function(x, y) {
data... |
#setwd('C:\Users\HMGSYS\Documents\GitHub\Classes\R-Programming\rprog-data-ProgAssignment3-data')
best <- function(state, outcome){
#Read outcome data
data<- read.csv("outcome-of-care-measures.csv", colClasses = "character")
# Determine which column in data to look at by the user input on outcome... | /rprog-data-ProgAssignment3-data/best.R | no_license | jss367/R-Programming | R | false | false | 1,631 | r | #setwd('C:\Users\HMGSYS\Documents\GitHub\Classes\R-Programming\rprog-data-ProgAssignment3-data')
best <- function(state, outcome){
#Read outcome data
data<- read.csv("outcome-of-care-measures.csv", colClasses = "character")
# Determine which column in data to look at by the user input on outcome... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procedury_matura_wielogrupowe.R
\name{procedura_matura_mp_gr_rw}
\alias{procedura_matura_mp_gr_rw}
\title{Procedury skalowania egzaminow.}
\usage{
procedura_matura_mp_gr_rw(nazwyZmiennych, processors = 3)
}
\arguments{
\item{nazwyZmiennych}{n... | /man/procedura_matura_mp_gr_rw.Rd | permissive | tzoltak/EWDskalowanie | R | false | true | 829 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/procedury_matura_wielogrupowe.R
\name{procedura_matura_mp_gr_rw}
\alias{procedura_matura_mp_gr_rw}
\title{Procedury skalowania egzaminow.}
\usage{
procedura_matura_mp_gr_rw(nazwyZmiennych, processors = 3)
}
\arguments{
\item{nazwyZmiennych}{n... |
# Specify Node Aesthetics
#
# Internal function to match the contents
# of a string input to a given tag and
# extract the value used when specifying
# aesthetic options.
#
# param tag: A character string.
# param input_parts: A vector of character
# strings after splitting the user-supplied
# input for a node or p... | /R/U01-internal_functions.R | permissive | rettopnivek/pathdiagrams | R | false | false | 4,373 | r | # Specify Node Aesthetics
#
# Internal function to match the contents
# of a string input to a given tag and
# extract the value used when specifying
# aesthetic options.
#
# param tag: A character string.
# param input_parts: A vector of character
# strings after splitting the user-supplied
# input for a node or p... |
# ------------------------------------------------------------------------------
# Libraries
library(dplyr)
library(readr)
library(stringr)
library(caret)
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
#... | /Caret/Script/Script_hda.R | no_license | bemayer/DigitRecognizer | R | false | false | 2,718 | r | # ------------------------------------------------------------------------------
# Libraries
library(dplyr)
library(readr)
library(stringr)
library(caret)
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
#... |
## 5/20/2008 WRG: Fixed bug in save.model. Added n.chains argument.
## 7/2/2010 WRG: Added na.rm = TRUE to summary(x1) statement
## 4/21/2014 WRG: renamed using camel case; added bugsChain
mcmc.history = function(sims.array){
n1 = dim(sims.array)[1]
n2 = dim(sims.array)[2]
n3 = dim(sims.array)[3]
x = data.f... | /script/tools/stanTools.R | no_license | mohamed82008/IntroBayesNONMEM_ACoP10 | R | false | false | 8,279 | r | ## 5/20/2008 WRG: Fixed bug in save.model. Added n.chains argument.
## 7/2/2010 WRG: Added na.rm = TRUE to summary(x1) statement
## 4/21/2014 WRG: renamed using camel case; added bugsChain
mcmc.history = function(sims.array){
n1 = dim(sims.array)[1]
n2 = dim(sims.array)[2]
n3 = dim(sims.array)[3]
x = data.f... |
setwd("~/OneDrive/SCS_pico_niche")
#Try to predict picophytoplankton abundance from remote sensing variables: SST, surface PAR, surface Chl and RRS variables
rm(list=ls())
library(foreach)
library(neuralnet)
load('np.Rdata')
rmse <- function(x,y) sd(x-y)
#Neural network
normalize <- function(x) (x-min(x))/(max(x)-m... | /neuralnet.R | permissive | BingzhangChen/SCSPicophytoplankton | R | false | false | 5,269 | r | setwd("~/OneDrive/SCS_pico_niche")
#Try to predict picophytoplankton abundance from remote sensing variables: SST, surface PAR, surface Chl and RRS variables
rm(list=ls())
library(foreach)
library(neuralnet)
load('np.Rdata')
rmse <- function(x,y) sd(x-y)
#Neural network
normalize <- function(x) (x-min(x))/(max(x)-m... |
plot2 <- function(){
full_data_set <- read.table("./household_power_consumption.txt",header = TRUE,sep=";",dec=".",na.strings = "?")
few_day_data_set <- subset(full_data_set, Date == "1/2/2007" | Date == "2/2/2007" )
plot((strptime(paste(few_day_data_set$Date,few_day_data_set$Time),format="%d/%m/%Y%H:%... | /plot2.R | no_license | muralitharanb/ExData_Plotting1 | R | false | false | 512 | r | plot2 <- function(){
full_data_set <- read.table("./household_power_consumption.txt",header = TRUE,sep=";",dec=".",na.strings = "?")
few_day_data_set <- subset(full_data_set, Date == "1/2/2007" | Date == "2/2/2007" )
plot((strptime(paste(few_day_data_set$Date,few_day_data_set$Time),format="%d/%m/%Y%H:%... |
thap_ha_noi <- function(n, toa1, toa2, toa3){
if (n==1){
print(toa1)
print('|')
print(toa3)
print('')
} else {
thap_ha_noi(n-1,toa1, toa3, toa2)
print(toa1)
print('|')
print(toa3)
print('')
thap_ha_noi(n-1,toa2, toa1, toa3)
}
}
thap_ha_noi(3,'A','B','C') | /Bt_NMHieu/CTDLGT_R/BT01_ThapHaNoi.R | no_license | nguyenminhhieu3004/nguyenhieu | R | false | false | 300 | r | thap_ha_noi <- function(n, toa1, toa2, toa3){
if (n==1){
print(toa1)
print('|')
print(toa3)
print('')
} else {
thap_ha_noi(n-1,toa1, toa3, toa2)
print(toa1)
print('|')
print(toa3)
print('')
thap_ha_noi(n-1,toa2, toa1, toa3)
}
}
thap_ha_noi(3,'A','B','C') |
removeDuplicates_improved <- function(rsem, index_counts) {
# rsem: data frame with rsem values
# index_counts: vector of indices with rsem counts
duplicatedSymbols <- unique(rsem$symbol[duplicated(rsem$symbol)])
indsToDelete <- numeric(0)
indsToKeep <- numeric(0)
# Pre-allocate matrix for colSum-ed rows
... | /removeDuplicates_improved.R | no_license | JanesLab/shared-lab | R | false | false | 1,106 | r | removeDuplicates_improved <- function(rsem, index_counts) {
# rsem: data frame with rsem values
# index_counts: vector of indices with rsem counts
duplicatedSymbols <- unique(rsem$symbol[duplicated(rsem$symbol)])
indsToDelete <- numeric(0)
indsToKeep <- numeric(0)
# Pre-allocate matrix for colSum-ed rows
... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 12687
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 12686
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 12686
c
c Input Parameter (command line, ... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Basler/terminator/stmt19_137_359/stmt19_137_359.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 720 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 12687
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 12686
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 12686
c
c Input Parameter (command line, ... |
zero.one<-function(x){
min.x<-min(x, na.rm=T)
max.x<-max(x-min.x, na.rm=T)
return((x-min.x)/max.x)
}
plot.f<-function(lab1, lab2, lab3){
p1<-ggplot(p3,aes(x=authoritarianism,y=ONE.mean.score
, fill=Category)) +
geom_area(color = "black", size = 0.2, alpha = 0.4) +
scale_fill_brew... | /Chapter Analysis/BookFunctions.R | no_license | crweber9874/Authoritarianism | R | false | false | 92,965 | r |
zero.one<-function(x){
min.x<-min(x, na.rm=T)
max.x<-max(x-min.x, na.rm=T)
return((x-min.x)/max.x)
}
plot.f<-function(lab1, lab2, lab3){
p1<-ggplot(p3,aes(x=authoritarianism,y=ONE.mean.score
, fill=Category)) +
geom_area(color = "black", size = 0.2, alpha = 0.4) +
scale_fill_brew... |
## generate objects used for intro vignette
library(AnnotationHub)
library(BSgenome.Hsapiens.UCSC.hg38)
library(crisprDesign)
## crisprDesignData can be obtained from github: devtools::install_github("Jfortin1/crisprDesignData")
library(crisprDesignData)
data("txdb_human", package="crisprDesignData")
data("tss_human", ... | /inst/scripts/intro_objects.R | permissive | crisprVerse/crisprViz | R | false | false | 4,633 | r | ## generate objects used for intro vignette
library(AnnotationHub)
library(BSgenome.Hsapiens.UCSC.hg38)
library(crisprDesign)
## crisprDesignData can be obtained from github: devtools::install_github("Jfortin1/crisprDesignData")
library(crisprDesignData)
data("txdb_human", package="crisprDesignData")
data("tss_human", ... |
### Example 5.1: Horseshoe Crab Data (Simple Logistic Regression)
horseshoe <- read.table("horseshoe.txt", header=TRUE)
head(horseshoe)
# y indicates if there are any satellites (0 = no, 1 = yes)
### Simple Logistic Regression on Width
hsfit <- glm(y ~ width, family=binomial, data=horseshoe)
summary(hsfit)
... | /lec/ex5.1(1).R | no_license | peach07up/stat426 | R | false | false | 1,409 | r | ### Example 5.1: Horseshoe Crab Data (Simple Logistic Regression)
horseshoe <- read.table("horseshoe.txt", header=TRUE)
head(horseshoe)
# y indicates if there are any satellites (0 = no, 1 = yes)
### Simple Logistic Regression on Width
hsfit <- glm(y ~ width, family=binomial, data=horseshoe)
summary(hsfit)
... |
# phylify 0.0.1 pre-release
# see: https://github.com/thejmazz/ontoscope-phylify
# === Packages ===
# JSON <-> data frame
if (!require(jsonlite, quietly=TRUE)) install.packages("jsonlite")
# R bindings to igraph
if (!require(igraph, quietly=TRUE)) install.packages("igraph")
# Gene set enrichment data structures and ... | /phylify/phylify.R | no_license | anamqu/Ontoscope | R | false | false | 5,019 | r | # phylify 0.0.1 pre-release
# see: https://github.com/thejmazz/ontoscope-phylify
# === Packages ===
# JSON <-> data frame
if (!require(jsonlite, quietly=TRUE)) install.packages("jsonlite")
# R bindings to igraph
if (!require(igraph, quietly=TRUE)) install.packages("igraph")
# Gene set enrichment data structures and ... |
#graduation prediction
#load actual data for 3 schools, two years
#add variables, needed to predict
#run model
newData1314 <- read.csv("newjoined1314.csv", header = TRUE)
newData1516 <- read.csv("newjoined1516.csv", header = TRUE)
#2013-14 School Year
#Add Chronic Absenteeism Rate
newData1314 <- mutate(newD... | /GradPrediction.R | no_license | hlevymyers/influencingHighSchoolGradRates | R | false | false | 3,892 | r | #graduation prediction
#load actual data for 3 schools, two years
#add variables, needed to predict
#run model
newData1314 <- read.csv("newjoined1314.csv", header = TRUE)
newData1516 <- read.csv("newjoined1516.csv", header = TRUE)
#2013-14 School Year
#Add Chronic Absenteeism Rate
newData1314 <- mutate(newD... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 26782
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 26782
c
c Input Parameter (command line, file):
c input filename QBFLIB/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#3.E#124.A#48.c#.w#9.s#23.asp/ctrl.e#1.a#3.E#124.A#48.c#.w#9.s#23.asp.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 732 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 26782
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 26782
c
c Input Parameter (command line, file):
c input filename QBFLIB/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#... |
#Clear Environment
rm(list=ls())
#Load libraries
source('~/workspace/datascience/functions/load_libraries.R')
load_libraries('~/workspace/datascience/functions/', include_bundles = c('utility'))
library(stm)
library(tm)
library(Matrix)
library(LDAvis)
library(tsne)
library(servr)
library(caret)
#library(pluralize) # t... | /datascience-master/scripts/STM_client_detection.R | no_license | goughgorski/clusteryourself | R | false | false | 29,910 | r | #Clear Environment
rm(list=ls())
#Load libraries
source('~/workspace/datascience/functions/load_libraries.R')
load_libraries('~/workspace/datascience/functions/', include_bundles = c('utility'))
library(stm)
library(tm)
library(Matrix)
library(LDAvis)
library(tsne)
library(servr)
library(caret)
#library(pluralize) # t... |
\name{CAAParallax_Ecliptic2Topocentric}
\alias{CAAParallax_Ecliptic2Topocentric}
\title{
CAAParallax_Ecliptic2Topocentric
}
\description{
CAAParallax_Ecliptic2Topocentric
}
\usage{
CAAParallax_Ecliptic2Topocentric(Lambda, Beta, Semidiameter, Distance, Epsilon, Latitude, Height, JD)
}
\arguments{
\item{Lam... | /man/CAAParallax_Ecliptic2Topocentric.Rd | no_license | helixcn/skycalc | R | false | false | 1,504 | rd | \name{CAAParallax_Ecliptic2Topocentric}
\alias{CAAParallax_Ecliptic2Topocentric}
\title{
CAAParallax_Ecliptic2Topocentric
}
\description{
CAAParallax_Ecliptic2Topocentric
}
\usage{
CAAParallax_Ecliptic2Topocentric(Lambda, Beta, Semidiameter, Distance, Epsilon, Latitude, Height, JD)
}
\arguments{
\item{Lam... |
#' Add tooltips to a plot.
#'
#' @param vis Visualisation to add tooltips to.
#' @param html A function that takes a single argument as input. This argument
#' will be a list containing the data in the mark currently under the
#' mouse. It should return a string containing HTML.
#' @param on Should tooltips appear ... | /R/interact_tooltip.R | no_license | harryprince/ggvis | R | false | false | 1,757 | r | #' Add tooltips to a plot.
#'
#' @param vis Visualisation to add tooltips to.
#' @param html A function that takes a single argument as input. This argument
#' will be a list containing the data in the mark currently under the
#' mouse. It should return a string containing HTML.
#' @param on Should tooltips appear ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subset_clusters_by_size.R
\name{subset_clusters_by_size}
\alias{subset_clusters_by_size}
\title{Subset clusters from epi_contacts object by cluster size}
\usage{
subset_clusters_by_size(epi_contacts, cs_min, cs_max = cs_min)
}
\arguments{
\it... | /man/subset_clusters_by_size.Rd | no_license | tc13/contacts | R | false | true | 1,205 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subset_clusters_by_size.R
\name{subset_clusters_by_size}
\alias{subset_clusters_by_size}
\title{Subset clusters from epi_contacts object by cluster size}
\usage{
subset_clusters_by_size(epi_contacts, cs_min, cs_max = cs_min)
}
\arguments{
\it... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GenericFunctions.R
\docType{methods}
\name{counts}
\alias{counts}
\alias{counts,TCA-method}
\alias{counts<-,TCA-method}
\title{Extracts counts of a TCA object.}
\usage{
\S4method{counts}{TCA}(object, normalization = "none", lib.norm ... | /man/counts.Rd | no_license | MusculusMus/TCseq | R | false | true | 2,142 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GenericFunctions.R
\docType{methods}
\name{counts}
\alias{counts}
\alias{counts,TCA-method}
\alias{counts<-,TCA-method}
\title{Extracts counts of a TCA object.}
\usage{
\S4method{counts}{TCA}(object, normalization = "none", lib.norm ... |
library(dplyr)
latlng <- read.csv("./data/LatLng.csv")
murderTotals <- read.csv("./data/MurderTotals.csv")
#byYear <- aggregate(Victim.Count ~ Year,murderTotals,sum)
#byCity <- aggregate(Victim.Count ~ City+State,murderTotals,sum)
#murderLocation <- merge(byCity,latlng,by=c("City","State"),all.x = TRUE)
#byYear <- ... | /Murder_Shiny/global.R | no_license | jahanavisanda/Developing-Data-Products-Version-2 | R | false | false | 973 | r | library(dplyr)
latlng <- read.csv("./data/LatLng.csv")
murderTotals <- read.csv("./data/MurderTotals.csv")
#byYear <- aggregate(Victim.Count ~ Year,murderTotals,sum)
#byCity <- aggregate(Victim.Count ~ City+State,murderTotals,sum)
#murderLocation <- merge(byCity,latlng,by=c("City","State"),all.x = TRUE)
#byYear <- ... |
context("make_hyperlink testing")
test_that("hyperlink is created", {
mylinks <- c('www.abc.com', 'www.bca.com', 'https://www.def.com')
mymessages <- c('abc', 'bca', 'def')
#no tableHTML
expect_true(all(grepl('<a href', make_hyperlink(mylinks))))
#check css list has same lengths
expec... | /tests/testthat/test_make_hyperlink.R | no_license | cran/tableHTML | R | false | false | 396 | r | context("make_hyperlink testing")
test_that("hyperlink is created", {
mylinks <- c('www.abc.com', 'www.bca.com', 'https://www.def.com')
mymessages <- c('abc', 'bca', 'def')
#no tableHTML
expect_true(all(grepl('<a href', make_hyperlink(mylinks))))
#check css list has same lengths
expec... |
#' @title Create command declaring FREESURFER_HOME
#' @description Finds the Freesurfer from system environment or \code{getOption("freesurfer.path")}
#' for location of Freesurfer functions
#' @param bin_app Should \code{bin} be added to the freesurfer path?
#' All executables are assumed to be in \code{FREESURFER_HO... | /R/fs_setup.R | no_license | neuroconductor/freesurfer | R | false | false | 9,272 | r | #' @title Create command declaring FREESURFER_HOME
#' @description Finds the Freesurfer from system environment or \code{getOption("freesurfer.path")}
#' for location of Freesurfer functions
#' @param bin_app Should \code{bin} be added to the freesurfer path?
#' All executables are assumed to be in \code{FREESURFER_HO... |
plotHaz.ph <- function(res, printLegend = FALSE, col = 1:6,
xlab = "", main = "", layout = c(3, 3)){
## 'res' is list of results from a fit.
oldpar <- par(mfrow = layout)
on.exit(par(oldpar))
n <- length(res)
if (length(main) == 1){
main = rep(main, n)
}
for... | /R/plotHaz.ph.R | no_license | goranbrostrom/Mortality | R | false | false | 542 | r | plotHaz.ph <- function(res, printLegend = FALSE, col = 1:6,
xlab = "", main = "", layout = c(3, 3)){
## 'res' is list of results from a fit.
oldpar <- par(mfrow = layout)
on.exit(par(oldpar))
n <- length(res)
if (length(main) == 1){
main = rep(main, n)
}
for... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apply_graph_theme.R
\name{apply_graph_theme}
\alias{apply_graph_theme}
\title{Apply multiple DiagrammeR global graph attributes}
\usage{
apply_graph_theme(graph, ...)
}
\arguments{
\item{graph}{The \link[DiagrammeR:DiagrammeR]{DiagrammeR::Dia... | /man/apply_graph_theme.Rd | no_license | academy-of-behavior-change/behaviorchange | R | false | true | 986 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apply_graph_theme.R
\name{apply_graph_theme}
\alias{apply_graph_theme}
\title{Apply multiple DiagrammeR global graph attributes}
\usage{
apply_graph_theme(graph, ...)
}
\arguments{
\item{graph}{The \link[DiagrammeR:DiagrammeR]{DiagrammeR::Dia... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/identitytoolkit_functions.R
\name{projects.oauthIdpConfigs.get}
\alias{projects.oauthIdpConfigs.get}
\title{Retrieve an Oidc Idp configuration for an Identity Toolkit project.}
\usage{
projects.oauthIdpConfigs.get(name)
}
\arguments{
\item{na... | /googleidentitytoolkitv2.auto/man/projects.oauthIdpConfigs.get.Rd | no_license | justinjm/autoGoogleAPI | R | false | true | 1,029 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/identitytoolkit_functions.R
\name{projects.oauthIdpConfigs.get}
\alias{projects.oauthIdpConfigs.get}
\title{Retrieve an Oidc Idp configuration for an Identity Toolkit project.}
\usage{
projects.oauthIdpConfigs.get(name)
}
\arguments{
\item{na... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.