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 |
|---|---|---|---|---|---|---|---|---|---|
#Generate community matrices
dat_df_2_or <- read_rds("./data/dat.df.2.or.RDS")
dat_df_2_or$tax.class_size.class <- as.factor(paste(dat_df_2_or$Class,dat_df_2_or$size.class.2, sep = "."))
# major habitat type replacement: Replace Deep water with actual benthic cover
source("./scripts/community_analysis/01b_replace_maj... | /scripts/phd_chpt_6/01_read_data_generate_community_matrices.R | no_license | philiphaupt/bruvs_vs_ruvs | R | false | false | 5,216 | r | #Generate community matrices
dat_df_2_or <- read_rds("./data/dat.df.2.or.RDS")
dat_df_2_or$tax.class_size.class <- as.factor(paste(dat_df_2_or$Class,dat_df_2_or$size.class.2, sep = "."))
# major habitat type replacement: Replace Deep water with actual benthic cover
source("./scripts/community_analysis/01b_replace_maj... |
install.packages('arules')
library(arules)
restaurant <- read.transactions('C:\\Users\\escha\\OneDrive\\Documents\\MSA\\Fall Classes\\Data Mining\\Data\\res_complete.csv',sep=',')
summary(restaurant)
inspect(restaurant[17])
itemFrequency(restaurant)
rules <- apriori(restaurant)
summary(rules)
inspect(sort(rules, by ... | /Data Mining/DataMining_Evan.R | no_license | ashwinb6/fall2_hw_team6 | R | false | false | 1,032 | r | install.packages('arules')
library(arules)
restaurant <- read.transactions('C:\\Users\\escha\\OneDrive\\Documents\\MSA\\Fall Classes\\Data Mining\\Data\\res_complete.csv',sep=',')
summary(restaurant)
inspect(restaurant[17])
itemFrequency(restaurant)
rules <- apriori(restaurant)
summary(rules)
inspect(sort(rules, by ... |
directionality_of_chrRange = function(hic_mat, chr, start, end){
#determines index positions of specified interval and runs directionality_of_indexes
#determine overlapping indexes
m_gr = GRanges(hic_mat@hic_1d)
start(m_gr) = start(m_gr) + 1
q_gr = GRanges(seqnames = chr, IRanges(start + 1, end))
... | /R/functions_directionalityIndex.R | no_license | jrboyd/dthic | R | false | false | 2,708 | r | directionality_of_chrRange = function(hic_mat, chr, start, end){
#determines index positions of specified interval and runs directionality_of_indexes
#determine overlapping indexes
m_gr = GRanges(hic_mat@hic_1d)
start(m_gr) = start(m_gr) + 1
q_gr = GRanges(seqnames = chr, IRanges(start + 1, end))
... |
## Put comments here that give an overall description of what your
## functions do
## returns a function that can store a matrix and the invertse of tha matrix
# set and get operate on the matrix
# setinverse and getinverse operte on the inverse
# setting the matrix will invalidate previous calculated inv.
makeCacheMa... | /cachematrix.R | no_license | mwittenb/ProgrammingAssignment2 | R | false | false | 1,094 | r | ## Put comments here that give an overall description of what your
## functions do
## returns a function that can store a matrix and the invertse of tha matrix
# set and get operate on the matrix
# setinverse and getinverse operte on the inverse
# setting the matrix will invalidate previous calculated inv.
makeCacheMa... |
###############################################################################
# Script para detectar estacionariedad debil en registros electrofisiologicos,
# por Enciso Alva, 2017
# Para citar y revisar instrucciones de uso, revisar documantacion anexa
#
#############################################################... | /scripts_old/scripts170700/multipsr_curso01_personal.R | no_license | EncisoAlvaJC/TESIS | R | false | false | 5,276 | r | ###############################################################################
# Script para detectar estacionariedad debil en registros electrofisiologicos,
# por Enciso Alva, 2017
# Para citar y revisar instrucciones de uso, revisar documantacion anexa
#
#############################################################... |
library(occCite)
library(rfishbase)
library(robis)
library(dplyr)
library(rgbif)
library(rgdal)
library(raster)
library(ggplot2)
library(viridis)
library(rphylopic)
# Get lists of taxa from FishBase and OBIS -----
# A convenience function
'%!in%' <- function(x,y)!('%in%'(x,y))
# Getting species lists
gadiformListFB <... | /OccurrenceSearch_DDSpRemoved.R | no_license | hannahlowens/empiricalBiodiversity | R | false | false | 20,523 | r | library(occCite)
library(rfishbase)
library(robis)
library(dplyr)
library(rgbif)
library(rgdal)
library(raster)
library(ggplot2)
library(viridis)
library(rphylopic)
# Get lists of taxa from FishBase and OBIS -----
# A convenience function
'%!in%' <- function(x,y)!('%in%'(x,y))
# Getting species lists
gadiformListFB <... |
\name{getFileListing}
\alias{getFileListing}
\title{creates a list from the url}
\usage{
getFileListing(inURL, usePWD = "readonly:readonly")
}
\arguments{
\item{inURL}{the url to go fetch}
\item{usePWD}{the password for the svn server}
}
\description{
creates a list from the url
}
| /man/getFileListing.Rd | no_license | rmflight/RVignetteChanges | R | false | false | 292 | rd | \name{getFileListing}
\alias{getFileListing}
\title{creates a list from the url}
\usage{
getFileListing(inURL, usePWD = "readonly:readonly")
}
\arguments{
\item{inURL}{the url to go fetch}
\item{usePWD}{the password for the svn server}
}
\description{
creates a list from the url
}
|
# Create UI, set up list of charts to be used, and set up chart style options of quantmod
shinyUI(pageWithSidebar(
headerPanel("Stock Charts"),
sidebarPanel(
wellPanel(
p(strong("List of Stocks to choose from")),
checkboxInput(inputId = "stock_aapl", label = "Apple (AAPL)", value = TR... | /ui.R | no_license | mzebear/615_Final | R | false | false | 2,987 | r | # Create UI, set up list of charts to be used, and set up chart style options of quantmod
shinyUI(pageWithSidebar(
headerPanel("Stock Charts"),
sidebarPanel(
wellPanel(
p(strong("List of Stocks to choose from")),
checkboxInput(inputId = "stock_aapl", label = "Apple (AAPL)", value = TR... |
# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_handlers new_service set_config
NULL
#' Amazon QLDB Session
#'
#' @description
#' The transactional data APIs for Amazon QLDB
#'
#' Instead of interacting directly with this API, we recommend using the
#' QLDB driver or the... | /R/qldbsession_service.R | no_license | cran/paws.database | R | false | false | 4,215 | r | # This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_handlers new_service set_config
NULL
#' Amazon QLDB Session
#'
#' @description
#' The transactional data APIs for Amazon QLDB
#'
#' Instead of interacting directly with this API, we recommend using the
#' QLDB driver or the... |
install.packages("PolynomF")
install.packages("MASS")
install.packages("mvtnorm")
install.packages("pracma")
| /sparse/repos/ehalley/Gaia-DR2-distances/install.R | permissive | yuvipanda/mybinder.org-analytics | R | false | false | 110 | r | install.packages("PolynomF")
install.packages("MASS")
install.packages("mvtnorm")
install.packages("pracma")
|
library(PopED)
### Name: diag_matlab
### Title: Function written to match MATLAB's diag function
### Aliases: diag_matlab
### Keywords: internal
### ** Examples
diag_matlab(3)
diag_matlab(c(1,2,3))
diag_matlab(cbind(1,2,3))
diag_matlab(rbind(1,2,3))
diag_matlab(matrix(c(1, 2, 3),6,6))
# here is where the R defau... | /data/genthat_extracted_code/PopED/examples/diag_matlab.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 390 | r | library(PopED)
### Name: diag_matlab
### Title: Function written to match MATLAB's diag function
### Aliases: diag_matlab
### Keywords: internal
### ** Examples
diag_matlab(3)
diag_matlab(c(1,2,3))
diag_matlab(cbind(1,2,3))
diag_matlab(rbind(1,2,3))
diag_matlab(matrix(c(1, 2, 3),6,6))
# here is where the R defau... |
#' @title Set grid row style
#'
#' @description Apply styles to an entire row identified by an expression.
#'
#' @param grid A grid created with [datagrid()].
#' @param expr An expression giving position of row. Must return a logical vector.
#' @param background Background color.
#' @param color Text color.
#' @param ... | /R/grid-style.R | permissive | jeanantoinedasilva/toastui | R | false | false | 10,006 | r |
#' @title Set grid row style
#'
#' @description Apply styles to an entire row identified by an expression.
#'
#' @param grid A grid created with [datagrid()].
#' @param expr An expression giving position of row. Must return a logical vector.
#' @param background Background color.
#' @param color Text color.
#' @param ... |
# univarite GARCH return innovations
library(pr)
library(xtable)
library(latex2exp)
library(grDevices)
library(TSA)
library(Matrix)
library(MASS)
library(zoo)
Cs <- NULL
rhos <- NULL
deltas <- NULL
obs <- NULL
t_rejection_rates <- NULL
q_rejection_rates <- NULL
bq_rejection_rates <- NULL
bq_rejection_rates_two <- NU... | /MonteCarlo/mc_uGARCH.R | no_license | jpwoeltjen/PersistentRegressors | R | false | false | 4,105 | r | # univarite GARCH return innovations
library(pr)
library(xtable)
library(latex2exp)
library(grDevices)
library(TSA)
library(Matrix)
library(MASS)
library(zoo)
Cs <- NULL
rhos <- NULL
deltas <- NULL
obs <- NULL
t_rejection_rates <- NULL
q_rejection_rates <- NULL
bq_rejection_rates <- NULL
bq_rejection_rates_two <- NU... |
x = y = z = function(a) a + 1
h = function(w) w + 2
f = function() {
a = b = c = function(d) d + 1
}
| /tests/chainFunDefs.R | no_license | duncantl/CodeAnalysis | R | false | false | 106 | r | x = y = z = function(a) a + 1
h = function(w) w + 2
f = function() {
a = b = c = function(d) d + 1
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tsbox-deprecated.R
\name{tsbox-deprecated}
\alias{tsbox-deprecated}
\alias{ts_start}
\alias{ts_end}
\title{Start and end of time series}
\usage{
ts_start(x)
ts_end(x)
}
\arguments{
\item{x}{ts-boxable time series, an object of class \code{ts... | /man/tsbox-deprecated.Rd | no_license | stefanfritsch/tsbox | R | false | true | 499 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tsbox-deprecated.R
\name{tsbox-deprecated}
\alias{tsbox-deprecated}
\alias{ts_start}
\alias{ts_end}
\title{Start and end of time series}
\usage{
ts_start(x)
ts_end(x)
}
\arguments{
\item{x}{ts-boxable time series, an object of class \code{ts... |
add.location<-function(data){
#library("dplyr")
location.data <- read.csv("Scripts/basic scripts/pcodes/yem_admin_20171007.csv",header=T,sep=",", encoding = "UTF-8", check.names=F, stringsAsFactors=FALSE)
location <- as.data.frame(location.data)
#admin1Name
location_merge1<-location[,c(colnames(location[c(... | /Scripts/basic scripts/add_locations.R | no_license | agualtieri/yemen_jmmi | R | false | false | 1,086 | r | add.location<-function(data){
#library("dplyr")
location.data <- read.csv("Scripts/basic scripts/pcodes/yem_admin_20171007.csv",header=T,sep=",", encoding = "UTF-8", check.names=F, stringsAsFactors=FALSE)
location <- as.data.frame(location.data)
#admin1Name
location_merge1<-location[,c(colnames(location[c(... |
# Jasmin Straube, Queensland Facility of Advanced Bioinformatics
# Part of this script was borrowed from the graphics and stats package.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Moleculesral Public License
# as published by the Free Software Foundatio... | /R/plot.lmmsde-method.R | no_license | cran/lmms | R | false | false | 10,968 | r | # Jasmin Straube, Queensland Facility of Advanced Bioinformatics
# Part of this script was borrowed from the graphics and stats package.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Moleculesral Public License
# as published by the Free Software Foundatio... |
#source("slow-sim.R")
source("slow-sim-sol.R")
#source("slow-sim-parallel-sol.R")
set.seed <- 232323
observations <- 5000
covariates <- 10
testdata <- as.data.frame(
matrix(rnorm(observations * covariates),
nrow = observations
))
test <- simulate(reps = 100, seed = 20141028, data = testdata)
system.time... | /test_sim.R | no_license | fort-w2021/performance-ex-corneliagru | R | false | false | 897 | r | #source("slow-sim.R")
source("slow-sim-sol.R")
#source("slow-sim-parallel-sol.R")
set.seed <- 232323
observations <- 5000
covariates <- 10
testdata <- as.data.frame(
matrix(rnorm(observations * covariates),
nrow = observations
))
test <- simulate(reps = 100, seed = 20141028, data = testdata)
system.time... |
library(interpretR)
### Name: parDepPlot
### Title: Model interpretation functions: Partial Dependence Plots
### Aliases: parDepPlot
### ** Examples
library(randomForest)
#Prepare data
data(iris)
iris <- iris[1:100,]
iris$Species <- as.factor(ifelse(factor(iris$Species)=="setosa",0,1))
#Cross-validated models
#Est... | /data/genthat_extracted_code/interpretR/examples/parDepPlot.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 748 | r | library(interpretR)
### Name: parDepPlot
### Title: Model interpretation functions: Partial Dependence Plots
### Aliases: parDepPlot
### ** Examples
library(randomForest)
#Prepare data
data(iris)
iris <- iris[1:100,]
iris$Species <- as.factor(ifelse(factor(iris$Species)=="setosa",0,1))
#Cross-validated models
#Est... |
#Using shazam to generate mutation frequency
#slancast@scg4.stanford.edu:/srv/gsfs0/projects/snyder/slancast/IMGT_analyses/IMGTIgM/analyses/mutation_frequency
#
library(alakazam)
library(shazam)
library(ggplot2)
Subject <- Sys.getenv(c("var"))
print("T1")
IgMT1 <- readChangeoDb(paste("../../",Subject,"T1_db-pass_clo... | /AntibodyPropertiesScripts/mutation_frequencyIgM.r | no_license | slancast/Immuno | R | false | false | 5,405 | r | #Using shazam to generate mutation frequency
#slancast@scg4.stanford.edu:/srv/gsfs0/projects/snyder/slancast/IMGT_analyses/IMGTIgM/analyses/mutation_frequency
#
library(alakazam)
library(shazam)
library(ggplot2)
Subject <- Sys.getenv(c("var"))
print("T1")
IgMT1 <- readChangeoDb(paste("../../",Subject,"T1_db-pass_clo... |
################################### Array data ###################################
rm(list=ls())
library(pracma)
setwd("/Volumes/Data1/PROJECTS/PersistentHomology_ASD_Brain/")
source("SCRIPTS/FinalScripts/supplementary/Functions.R")
data=read.csv("DATA/Voineagu2011_Array.csv") # read in data
kegg=read.csv("DATA/c2.cp.... | /6..MahalanobisDistance_KEGG_geneSets.R | no_license | Voineagulab/Persistent_Homology_ASD_Brain | R | false | false | 2,038 | r | ################################### Array data ###################################
rm(list=ls())
library(pracma)
setwd("/Volumes/Data1/PROJECTS/PersistentHomology_ASD_Brain/")
source("SCRIPTS/FinalScripts/supplementary/Functions.R")
data=read.csv("DATA/Voineagu2011_Array.csv") # read in data
kegg=read.csv("DATA/c2.cp.... |
testlist <- list(id = integer(0), x = c(1.91374883209651e+214, 1.83300721970325e+267, 1.91216362379663e+214, 1.91374883209651e+214, 1.91374883209651e+214, 1.91374883209651e+214, 1.37132860659696e-319, 0, 8.94258818972656e-322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... | /ggforce/inst/testfiles/enclose_points/libFuzzer_enclose_points/enclose_points_valgrind_files/1610030421-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 521 | r | testlist <- list(id = integer(0), x = c(1.91374883209651e+214, 1.83300721970325e+267, 1.91216362379663e+214, 1.91374883209651e+214, 1.91374883209651e+214, 1.91374883209651e+214, 1.37132860659696e-319, 0, 8.94258818972656e-322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... |
approxVarEst <-
function(se0, sg0, D1, D2, r, n1, n2, control=NULL){
if (is.null(control)) {
tol = 0.01
s2profile = "se"
lklMethod = "REML"
} else {
tol = control$tol
s2profile = control$s2profile
lklMethod = control$lklMethod
}
matTr <- function(z) sum(diag(z))
p = dim(D1)[1]
... | /netgsa/R/approxVarEst.R | no_license | ingted/R-Examples | R | false | false | 1,906 | r | approxVarEst <-
function(se0, sg0, D1, D2, r, n1, n2, control=NULL){
if (is.null(control)) {
tol = 0.01
s2profile = "se"
lklMethod = "REML"
} else {
tol = control$tol
s2profile = control$s2profile
lklMethod = control$lklMethod
}
matTr <- function(z) sum(diag(z))
p = dim(D1)[1]
... |
main <-function() {
set.seed(100)
load_packages()
opt <- parse_options()
# Get colors
if (opt$color_scheme == "red") {
fill_color <- "red2"
} else if (opt$color_scheme == "blue") {
fill_color <- "navy"
} else if (opt$color_scheme == "green") {
fill_color <- "#009E73... | /plotting_scripts/longread_v_illumina_transcript_counts_edgeR.R | permissive | mortazavilab/TALON-paper-2020 | R | false | false | 10,546 | r | main <-function() {
set.seed(100)
load_packages()
opt <- parse_options()
# Get colors
if (opt$color_scheme == "red") {
fill_color <- "red2"
} else if (opt$color_scheme == "blue") {
fill_color <- "navy"
} else if (opt$color_scheme == "green") {
fill_color <- "#009E73... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docx_add.R
\name{body_add_fpar}
\alias{body_add_fpar}
\title{add fpar}
\usage{
body_add_fpar(x, value, style = NULL, pos = "after")
}
\arguments{
\item{x}{a docx device}
\item{value}{a character}
\item{style}{paragraph style. If NULL, parag... | /man/body_add_fpar.Rd | no_license | ldbruce-2018/officer | R | false | true | 1,804 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docx_add.R
\name{body_add_fpar}
\alias{body_add_fpar}
\title{add fpar}
\usage{
body_add_fpar(x, value, style = NULL, pos = "after")
}
\arguments{
\item{x}{a docx device}
\item{value}{a character}
\item{style}{paragraph style. If NULL, parag... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/help.R
\name{docker_container}
\alias{docker_container}
\title{Management commands for working with a particular docker container}
\description{
Methods for working with a particular docker container. Container
objects are returned by creati... | /man/docker_container.Rd | no_license | cran/stevedore | R | false | true | 623 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/help.R
\name{docker_container}
\alias{docker_container}
\title{Management commands for working with a particular docker container}
\description{
Methods for working with a particular docker container. Container
objects are returned by creati... |
#!/usr/bin/env Rscript
# This script will run the resampling through the grid
library(plyr)
to.force <- FALSE
master <- "/data/Projects/ABIDE_Initiative/CPAC/abide/for_grant/rois/standard_3mm.nii.gz"
dir.create("sge", showWarnings=F)
dir.create("sge/scripts", showWarnings=F)
dir.create("sge/logs", showWarn... | /config/50_niak/37_resample_derivatives.R | no_license | fitrialif/abide-1 | R | false | false | 1,714 | r | #!/usr/bin/env Rscript
# This script will run the resampling through the grid
library(plyr)
to.force <- FALSE
master <- "/data/Projects/ABIDE_Initiative/CPAC/abide/for_grant/rois/standard_3mm.nii.gz"
dir.create("sge", showWarnings=F)
dir.create("sge/scripts", showWarnings=F)
dir.create("sge/logs", showWarn... |
library(mbbefd)
testfunc <- function(x)
c(summary(x), sd=sd(x), tl=etl(x))
extensive <- TRUE
extensive <- FALSE
# test invalid param
n <- 5
a <- 0
b <- -1/2
mbbefd:::rmbbefdCpp(n, a, b)
mbbefd:::rmbbefdR(n, a, b)
g <- 1/2
b <- 3
mbbefd:::rMBBEFDCpp(n, g, b)
mbbefd:::rMBBEFDR(n, g, b)
#tes... | /mbbefd/tests/test-rng-mbbefd.R | no_license | ingted/R-Examples | R | false | false | 2,360 | r | library(mbbefd)
testfunc <- function(x)
c(summary(x), sd=sd(x), tl=etl(x))
extensive <- TRUE
extensive <- FALSE
# test invalid param
n <- 5
a <- 0
b <- -1/2
mbbefd:::rmbbefdCpp(n, a, b)
mbbefd:::rmbbefdR(n, a, b)
g <- 1/2
b <- 3
mbbefd:::rMBBEFDCpp(n, g, b)
mbbefd:::rMBBEFDR(n, g, b)
#tes... |
#You must have the source file "household_power_consumption.txt" in your workdir; getwd()
#Read Data
Data <- read.table ("household_power_consumption.txt",header=T,sep=";")
#Create one column called Date2 and Change Datatype
Data$Date2 <- as.Date(Data$Date,"%d/%m/%Y")
#Create a subset of data
SubsetData <- su... | /plot1.R | no_license | yonascustom/Module-4DataScience | R | false | false | 759 | r | #You must have the source file "household_power_consumption.txt" in your workdir; getwd()
#Read Data
Data <- read.table ("household_power_consumption.txt",header=T,sep=";")
#Create one column called Date2 and Change Datatype
Data$Date2 <- as.Date(Data$Date,"%d/%m/%Y")
#Create a subset of data
SubsetData <- su... |
# Project
# 2015-02-22
# Bryan Urban
library(tidyr)
library(data.table)
## GET RAW DATA
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip",
"dataset.zip", mode="wb")
# Unzip all files to "data" folder in working directory
## 0. Read Test Data
test... | /run_analysis.R | no_license | bjurban/getdata-p3 | R | false | false | 2,360 | r | # Project
# 2015-02-22
# Bryan Urban
library(tidyr)
library(data.table)
## GET RAW DATA
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip",
"dataset.zip", mode="wb")
# Unzip all files to "data" folder in working directory
## 0. Read Test Data
test... |
KICH <- read_tsv("data-raw/PSI_download_KICH.zip")
save(KICH, file = "data/KICH.rda")
| /data-raw/KICH.R | no_license | SiYangming/TCGAspliceseqData | R | false | false | 86 | r | KICH <- read_tsv("data-raw/PSI_download_KICH.zip")
save(KICH, file = "data/KICH.rda")
|
\name{phewasMetaModels}
\alias{phewasMetaModels}
\title{
Perform meta-analysis of PheWAS results
}
\description{
This function wraps the \code{\link[meta:metagen]{meta package's metagen}} function to meta analyze \code{phewas} results.
}
\usage{
phewasMetaModels(results, ...)
}
\arguments{
\item{results}{
Data frame ... | /man/phewasMetaModels.Rd | no_license | yaomin/PheWAS | R | false | false | 2,333 | rd | \name{phewasMetaModels}
\alias{phewasMetaModels}
\title{
Perform meta-analysis of PheWAS results
}
\description{
This function wraps the \code{\link[meta:metagen]{meta package's metagen}} function to meta analyze \code{phewas} results.
}
\usage{
phewasMetaModels(results, ...)
}
\arguments{
\item{results}{
Data frame ... |
density.a2 <- function (a2, methyl.level.pos )
{
###############################################################
# R FUNCTIONS FOR WRITING OUT THE LOG OF MARIGINAL DISTRIBUTION OF EMISSION HYPER PARAMETERS a2
#
# Arguments:
#
# a2 Emission hyper parameter a2
# methy... | /HMM.DM.code/density.a2.R | no_license | Maria-831/HMM-DM | R | false | false | 719 | r |
density.a2 <- function (a2, methyl.level.pos )
{
###############################################################
# R FUNCTIONS FOR WRITING OUT THE LOG OF MARIGINAL DISTRIBUTION OF EMISSION HYPER PARAMETERS a2
#
# Arguments:
#
# a2 Emission hyper parameter a2
# methy... |
library(ggplot2)
library(forecast)
theme_set(theme_classic())
# Subset data
nottem_small <- window(nottem, start=c(1920, 1), end=c(1925, 12)) # subset a smaller timewindow
# Plot
ggseasonplot(AirPassengers) + labs(title="Seasonal plot: International Airline Passengers")
ggseasonplot(nottem_small) + labs(title="Seaso... | /seasonal plot.R | no_license | y1220/R-practice | R | false | false | 370 | r | library(ggplot2)
library(forecast)
theme_set(theme_classic())
# Subset data
nottem_small <- window(nottem, start=c(1920, 1), end=c(1925, 12)) # subset a smaller timewindow
# Plot
ggseasonplot(AirPassengers) + labs(title="Seasonal plot: International Airline Passengers")
ggseasonplot(nottem_small) + labs(title="Seaso... |
# Various functions
# Change log:
# 2015-07-15: lineplot now accepts factors as the first effect.
# Stat functions---------
#scaled mass index as a measure for body condition according to Peig 2009
smi = function (M, L)
{
plot(log(M)~log(L))
{
if (require(smatr)) {
SMA = sma(log(M)~log(L))
bSMA =... | /R/OwnFunctions.r | no_license | kolorado/ownr | R | false | false | 16,513 | r | # Various functions
# Change log:
# 2015-07-15: lineplot now accepts factors as the first effect.
# Stat functions---------
#scaled mass index as a measure for body condition according to Peig 2009
smi = function (M, L)
{
plot(log(M)~log(L))
{
if (require(smatr)) {
SMA = sma(log(M)~log(L))
bSMA =... |
#' rfm_model fucntion
#'
#' Load data in to create model
#'
#' @param df a data frame loaded with rfm_load or created previously
#' @return a Data.frame object
#'
#'
#' @export
rfm_model <- function(df){
r <- quantile(df$recency, c(0.25,0.5,0.75))
df$Re <- ifelse(df$recency<r[1],4,
ifelse(df$r... | /R/rfm_model.R | no_license | CJB2014/rfm | R | false | false | 980 | r | #' rfm_model fucntion
#'
#' Load data in to create model
#'
#' @param df a data frame loaded with rfm_load or created previously
#' @return a Data.frame object
#'
#'
#' @export
rfm_model <- function(df){
r <- quantile(df$recency, c(0.25,0.5,0.75))
df$Re <- ifelse(df$recency<r[1],4,
ifelse(df$r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/returns.R
\name{get_quarterly_log_returns}
\alias{get_quarterly_log_returns}
\title{get_quarterly_log_returns}
\usage{
get_quarterly_log_returns(tibble_obj)
}
\arguments{
\item{tibble_obj}{most simply, returned from a call to tq_get()}
}
\val... | /man/get_quarterly_log_returns.Rd | no_license | gmahjub/steal-basis-r | R | false | true | 530 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/returns.R
\name{get_quarterly_log_returns}
\alias{get_quarterly_log_returns}
\title{get_quarterly_log_returns}
\usage{
get_quarterly_log_returns(tibble_obj)
}
\arguments{
\item{tibble_obj}{most simply, returned from a call to tq_get()}
}
\val... |
# bird traits
library(plyr)
all_data <- fread("clean_data/all_data_standardized.csv")
# name reassignments to avoid problems
#problem_species <- read.csv("Edited Data/problem_species.csv", stringsAsFactors = FALSE)
problem_birds <- read.csv("raw_data/problem_birds.csv", stringsAsFactors = FALSE)
#all_data$species_sy... | /scripts/bird_traits.R | no_license | stemkov/pheno_variance | R | false | false | 3,229 | r | # bird traits
library(plyr)
all_data <- fread("clean_data/all_data_standardized.csv")
# name reassignments to avoid problems
#problem_species <- read.csv("Edited Data/problem_species.csv", stringsAsFactors = FALSE)
problem_birds <- read.csv("raw_data/problem_birds.csv", stringsAsFactors = FALSE)
#all_data$species_sy... |
#' Given rectangle code return perimeter as a polygon in lat lon
#'
#'
#' The outline/boundary of a statistical rectangle is returned as 5 positions,
#' the first and last of which are the same.
#'
#' @name rectPeri
#' @aliases rPeri srPeri mrPeri drPeri
#' @param r,sr,mr,dr Rectangle codes.
#' @param dlat,dlon Dime... | /R/rectPeri.R | no_license | Hafro/geo | R | false | false | 2,029 | r | #' Given rectangle code return perimeter as a polygon in lat lon
#'
#'
#' The outline/boundary of a statistical rectangle is returned as 5 positions,
#' the first and last of which are the same.
#'
#' @name rectPeri
#' @aliases rPeri srPeri mrPeri drPeri
#' @param r,sr,mr,dr Rectangle codes.
#' @param dlat,dlon Dime... |
\name{pandadem}
\alias{pandadem}
\docType{data}
\title{
A RasterLayer containing a digital elevation model (DEM) for the panda data
}
\description{
Digital elevation model of the terrain within the panda's range with a cell resolution of 30 meters (ASTER GDEM version 2, Tachikawa et. al. 2011).
}
\usage{data(pandadem)}... | /man/pandadem.Rd | no_license | cran/mkde | R | false | false | 815 | rd | \name{pandadem}
\alias{pandadem}
\docType{data}
\title{
A RasterLayer containing a digital elevation model (DEM) for the panda data
}
\description{
Digital elevation model of the terrain within the panda's range with a cell resolution of 30 meters (ASTER GDEM version 2, Tachikawa et. al. 2011).
}
\usage{data(pandadem)}... |
#' Read numbering.xml in the docx
#'
#' @param file docx file path
#'
#' @return numbering
#' @export
#'
#' @examples
#' \dontrun{
#' read_numbering("reference.docx")
#' }
read_numbering <- function(file){
tmpdir = fs::file_temp()
officer::unpack_folder(file = file, folder = tmpdir)
x <- xml2::read_xml(fs::path_a... | /R/files.R | permissive | niszet/numberingx | R | false | false | 782 | r | #' Read numbering.xml in the docx
#'
#' @param file docx file path
#'
#' @return numbering
#' @export
#'
#' @examples
#' \dontrun{
#' read_numbering("reference.docx")
#' }
read_numbering <- function(file){
tmpdir = fs::file_temp()
officer::unpack_folder(file = file, folder = tmpdir)
x <- xml2::read_xml(fs::path_a... |
## Copyright 2013 Nick Polson, James Scott, and Jesse Windle.
## This file is part of BayesLogit, distributed under the GNU General Public
## License version 3 or later and without ANY warranty, implied or otherwise.
## library("BayesLogit")
library("coda")
source("Benchmark-Utilities.R")
source("DynNBPG.R")
source... | /Code/R/Benchmark-DynNB.R | no_license | lawmurray/BayesLogit | R | false | false | 19,417 | r | ## Copyright 2013 Nick Polson, James Scott, and Jesse Windle.
## This file is part of BayesLogit, distributed under the GNU General Public
## License version 3 or later and without ANY warranty, implied or otherwise.
## library("BayesLogit")
library("coda")
source("Benchmark-Utilities.R")
source("DynNBPG.R")
source... |
#GaussianGenerator, Adrian Stetco, University of Manchester, 2016
#Generates clouds of Gaussians
#Uses mvtnorm library, install it with "install.packages("mvtnorm")"
library(mvtnorm)
gaussianGenerator <- function(kcenters, dim, variance, points){
j<-1
c<- matrix(0,kcenters,dim)
x <- rmvnorm(n=kcenters*1000,... | /gaussianGenerator.r | no_license | adrianstetco/fcmppi | R | false | false | 1,010 | r | #GaussianGenerator, Adrian Stetco, University of Manchester, 2016
#Generates clouds of Gaussians
#Uses mvtnorm library, install it with "install.packages("mvtnorm")"
library(mvtnorm)
gaussianGenerator <- function(kcenters, dim, variance, points){
j<-1
c<- matrix(0,kcenters,dim)
x <- rmvnorm(n=kcenters*1000,... |
# Purpose : resampling with GDAL;
# Maintainer : Tomislav Hengl (tom.hengl@wur.nl)
# Contributions : ;
# Dev Status : Pre-Alpha
# Note : ;
.programPath <- function(path, utility){
if(missing(path)){
if(!file.exists("C:/PROGRA~1/GDAL/")&.Platform$OS.type == "windows"){
if... | /R/warp.R | no_license | GreatEmerald/GSIF | R | false | false | 9,193 | r | # Purpose : resampling with GDAL;
# Maintainer : Tomislav Hengl (tom.hengl@wur.nl)
# Contributions : ;
# Dev Status : Pre-Alpha
# Note : ;
.programPath <- function(path, utility){
if(missing(path)){
if(!file.exists("C:/PROGRA~1/GDAL/")&.Platform$OS.type == "windows"){
if... |
# Download OML DB snapshot
dest.file = "omlsnapshot.sql.gz"
db.user = "root"
db.name = "oml"
download.file("https://www.openml.org/downloads/ExpDB_SNAPSHOT.sql.gz", destfile = dest.file, quiet = FALSE)
system(sprintf("zcat %s | mysql -u '%s' %s", normalizePath(dest.file), db.user, db.name), wait = TRUE)
| /jr_stuff/getOMLSnap.R | no_license | jakob-r/OMLbots | R | false | false | 306 | r | # Download OML DB snapshot
dest.file = "omlsnapshot.sql.gz"
db.user = "root"
db.name = "oml"
download.file("https://www.openml.org/downloads/ExpDB_SNAPSHOT.sql.gz", destfile = dest.file, quiet = FALSE)
system(sprintf("zcat %s | mysql -u '%s' %s", normalizePath(dest.file), db.user, db.name), wait = TRUE)
|
#Chapter 9 Importing, saving and managing data (YaRrr! The Pirate's Guide to R, Nathaniel D. Phillips)
#Get working directory on your system
getwd()
#Set working directory to your code portfolio folder
setwd("C:/Users/subha/Desktop/ANLY506/ANLY506")
#List of objects in current workspace that you have set
ls()
#Crea... | /Exploratory Data Analysis - Code Portfolio/Week 2/Week 2.R | no_license | spemmaraju/MS-Analytics | R | false | false | 2,799 | r | #Chapter 9 Importing, saving and managing data (YaRrr! The Pirate's Guide to R, Nathaniel D. Phillips)
#Get working directory on your system
getwd()
#Set working directory to your code portfolio folder
setwd("C:/Users/subha/Desktop/ANLY506/ANLY506")
#List of objects in current workspace that you have set
ls()
#Crea... |
setwd("C:/Users/Chris Zucchet/Documents/AFL-Prediction-task")
library(DMwR);library(tidyverse);library(DBI);library(xgboost);library(recipes);library(rsample);library(RSQLite);library(purrr);library(e1071);library(digest);library(mlr);library(parallelMap);options(dplyr.width = Inf)
range01 <- function(x){(x-min(x))/(ma... | /_4_2018_Predictions.R | no_license | czucchet/AFL-Prediction-task | R | false | false | 7,015 | r | setwd("C:/Users/Chris Zucchet/Documents/AFL-Prediction-task")
library(DMwR);library(tidyverse);library(DBI);library(xgboost);library(recipes);library(rsample);library(RSQLite);library(purrr);library(e1071);library(digest);library(mlr);library(parallelMap);options(dplyr.width = Inf)
range01 <- function(x){(x-min(x))/(ma... |
ReadGwHeadData <- function(path, gwConversion) {
# Rachel Blakers v0-1 1/12/2013
#
#
# INPUT:
#
#
# OUTPUT:
#
Gobs = ReadTimeseriesData(path)
Gobs = lapply(gwConversion, function(x) Gobs[, x])
# Check that timeseries data is regular i.e. there are no
# missing dates
regBool = sapply(Gobs... | /Model/hydrological/Setup/ReadGwHeadData.R | no_license | HYDFKI7/integrated-mk | R | false | false | 464 | r |
ReadGwHeadData <- function(path, gwConversion) {
# Rachel Blakers v0-1 1/12/2013
#
#
# INPUT:
#
#
# OUTPUT:
#
Gobs = ReadTimeseriesData(path)
Gobs = lapply(gwConversion, function(x) Gobs[, x])
# Check that timeseries data is regular i.e. there are no
# missing dates
regBool = sapply(Gobs... |
plot1<-function(){
hp1<-read.table("household_power_consumption.txt",header=TRUE,sep=";")
hp1$Date=as.Date(hp1$Date,format="%d/%m/%Y")
req_dates<-subset(hp1,hp1$Date=="2007-02-01"|hp1$Date=="2007-02-02")
hp1global_actvpwr<-as.numeric(as.character(hp1$Global_active_power))
hist(hp1global_actvpwr,main="freq ... | /plot1.R | no_license | anuragswain63/exploratory_analysis_proj1 | R | false | false | 471 | r | plot1<-function(){
hp1<-read.table("household_power_consumption.txt",header=TRUE,sep=";")
hp1$Date=as.Date(hp1$Date,format="%d/%m/%Y")
req_dates<-subset(hp1,hp1$Date=="2007-02-01"|hp1$Date=="2007-02-02")
hp1global_actvpwr<-as.numeric(as.character(hp1$Global_active_power))
hist(hp1global_actvpwr,main="freq ... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
## makeCacheMatrix creates a List that should be saved as function of a valid square,
## invertible matrix. This list is created so that its companion function cacheSolve
## can be exe... | /cachematrix.R | no_license | BobJofElm/ProgrammingAssignment2 | R | false | false | 1,712 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
## makeCacheMatrix creates a List that should be saved as function of a valid square,
## invertible matrix. This list is created so that its companion function cacheSolve
## can be exe... |
source('/home/allenday/cvsroot/celsius/dump/lib/R/Celsius/IO/exe.R');
conn.exe = Celsius.exe('/home/allenday/cvsroot/celsius/dump/data2/HG-U133_Plus_2.rma_trim2');
cart = read.csv('./cart.xls',sep="\t");#http://genome.ucla.edu/u/~allenday/tmp/GeneCorrOutput/Corr_20080416_150528.xls',sep="\t");
platform.names = scan('/h... | /cor/cart/binsearch.R | no_license | allenday/dissertation | R | false | false | 5,596 | r | source('/home/allenday/cvsroot/celsius/dump/lib/R/Celsius/IO/exe.R');
conn.exe = Celsius.exe('/home/allenday/cvsroot/celsius/dump/data2/HG-U133_Plus_2.rma_trim2');
cart = read.csv('./cart.xls',sep="\t");#http://genome.ucla.edu/u/~allenday/tmp/GeneCorrOutput/Corr_20080416_150528.xls',sep="\t");
platform.names = scan('/h... |
library(shiny)
library(xtable)
library(colorspace)
source("profilingFunctions.R",local=TRUE)
# List of filenames to open
flist=list(
Control="../FitnessReports/QFA0018_FitnessReport_30_MDRMDP.txt",
Cdc13="../FitnessReports/QFA0015_FitnessReport_28_MDRMDP.txt",
Pol_alpha="../FitnessReports/QFA0010_FitnessReport_33_MDRM... | /profilyzer/server.R | no_license | lwlss/Dubarry2015 | R | false | false | 4,108 | r | library(shiny)
library(xtable)
library(colorspace)
source("profilingFunctions.R",local=TRUE)
# List of filenames to open
flist=list(
Control="../FitnessReports/QFA0018_FitnessReport_30_MDRMDP.txt",
Cdc13="../FitnessReports/QFA0015_FitnessReport_28_MDRMDP.txt",
Pol_alpha="../FitnessReports/QFA0010_FitnessReport_33_MDRM... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/single-result.R
\name{single_result}
\alias{single_result}
\alias{dispatch_result}
\alias{new_single_result}
\alias{print.single_result}
\title{Access a single artifact.}
\usage{
dispatch_result(q)
new_single_result(artifact)
\method{print}... | /man/single_result.Rd | permissive | lbartnik/ui | R | false | true | 1,138 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/single-result.R
\name{single_result}
\alias{single_result}
\alias{dispatch_result}
\alias{new_single_result}
\alias{print.single_result}
\title{Access a single artifact.}
\usage{
dispatch_result(q)
new_single_result(artifact)
\method{print}... |
####### redefine the start/ end values of a GRanges object
# rangeObj : a GRanges object.
# newValues : a vector of the same size as rangeObj
# startOrEnd: which values should be replaced: either "start", "end", or "both"
redefineStartEnd <-
function(
rangeObj,
newValues,
startOrEnd){
... | /R/utils.R | no_license | alexMPopa/RiboProfiling | R | false | false | 18,489 | r |
####### redefine the start/ end values of a GRanges object
# rangeObj : a GRanges object.
# newValues : a vector of the same size as rangeObj
# startOrEnd: which values should be replaced: either "start", "end", or "both"
redefineStartEnd <-
function(
rangeObj,
newValues,
startOrEnd){
... |
###################
# early R code ---- ~ 2009 / (C) Scott Alexander Malec
###################
library(RMySQL)
library(tm)
setwd("/home/propp/wikileaks/");
# retrieve data from redacted_war_diary_irq and put into individual text files
drv = dbDriver("MySQL")
con = dbConnect(drv, dbname='wikileaks', user='root', passwor... | /wikwekaSQL.R | no_license | kingfish777/wikiweka | R | false | false | 1,015 | r | ###################
# early R code ---- ~ 2009 / (C) Scott Alexander Malec
###################
library(RMySQL)
library(tm)
setwd("/home/propp/wikileaks/");
# retrieve data from redacted_war_diary_irq and put into individual text files
drv = dbDriver("MySQL")
con = dbConnect(drv, dbname='wikileaks', user='root', passwor... |
### instal packages (if needed) ##
#install.packages("tidyverse")
#install.packages("lubridate")
#install.packages("readr")
# load libraries
library(tidyverse)
library(readr)
library(lubridate)
#read in preliminary data
preliminary_data <- read_csv("_data/_raw/preliminary_data.csv")
View(preliminary_dat... | /_data_wrangling/preliminary_data_wrangling.R | no_license | EEB698-F2018/individual-project-nwackerly | R | false | false | 6,231 | r |
### instal packages (if needed) ##
#install.packages("tidyverse")
#install.packages("lubridate")
#install.packages("readr")
# load libraries
library(tidyverse)
library(readr)
library(lubridate)
#read in preliminary data
preliminary_data <- read_csv("_data/_raw/preliminary_data.csv")
View(preliminary_dat... |
#======================================================================================================
# LSUserRs Data Cleaning Template (Title Your Script)
# Say a couple of the things that it does here. Who wrote it?
# When was the last edit? What does it do? Does it work with any data type?
# Rubber duck this as mu... | /BasicCleaningAndAnalysis/scripts/dataCleaningTemplate.R | no_license | davidjohnbaker1/LSUseRs | R | false | false | 5,394 | r | #======================================================================================================
# LSUserRs Data Cleaning Template (Title Your Script)
# Say a couple of the things that it does here. Who wrote it?
# When was the last edit? What does it do? Does it work with any data type?
# Rubber duck this as mu... |
pollutantmean <- function(directory, pollutant, id = 1:332) {
# print ( paste("directory: ", directory))
# print ( paste("pollutant: ", pollutant))
# print ( paste("id: ", id))
my_monitor <- data.frame(Date=as.Date(character()),
sulfate=numeric(),
... | /pollutantmean.R | no_license | mwgravitt/datasciencecoursera | R | false | false | 1,232 | r |
pollutantmean <- function(directory, pollutant, id = 1:332) {
# print ( paste("directory: ", directory))
# print ( paste("pollutant: ", pollutant))
# print ( paste("id: ", id))
my_monitor <- data.frame(Date=as.Date(character()),
sulfate=numeric(),
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.varImpact.R
\name{print.varImpact}
\alias{print.varImpact}
\title{Custom printing of the varImpact results.}
\usage{
\method{print}{varImpact}(x, ...)
}
\arguments{
\item{x}{Results object from varImpact.}
\item{...}{Further arguments ... | /man/print.varImpact.Rd | no_license | guhjy/varImpact | R | false | true | 471 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.varImpact.R
\name{print.varImpact}
\alias{print.varImpact}
\title{Custom printing of the varImpact results.}
\usage{
\method{print}{varImpact}(x, ...)
}
\arguments{
\item{x}{Results object from varImpact.}
\item{...}{Further arguments ... |
\name{ConstructTG}
\alias{ConstructTG}
\title{
Construct target genes for a TF using TF-bound genes and differentially expressed genes from ChIP-chip or ChIP-seq and TF perturbation gene expression data.
}
\description{
This function requires users to first analyze their own ChIP-chip and ChIP-seq data to detect signif... | /man/ConstructTG.Rd | no_license | zji90/GSCA | R | false | false | 3,270 | rd | \name{ConstructTG}
\alias{ConstructTG}
\title{
Construct target genes for a TF using TF-bound genes and differentially expressed genes from ChIP-chip or ChIP-seq and TF perturbation gene expression data.
}
\description{
This function requires users to first analyze their own ChIP-chip and ChIP-seq data to detect signif... |
library("dplyr")
library("tidyverse")
# Substitute missing values of embarked with "S"
titanic_original$embarked[is.na(titanic_original$embarked)] <- "S"
# substitue missing values in age with average
age_mean <- mean(titanic_original$age,na.rm=TRUE)
titanic_original$age[is.na(titanic_original$age)] <- age_mean
# In... | /Handling_Missing_Values/titanic.R | no_license | curtishiga/Springboard_Intro_to_DS | R | false | false | 856 | r | library("dplyr")
library("tidyverse")
# Substitute missing values of embarked with "S"
titanic_original$embarked[is.na(titanic_original$embarked)] <- "S"
# substitue missing values in age with average
age_mean <- mean(titanic_original$age,na.rm=TRUE)
titanic_original$age[is.na(titanic_original$age)] <- age_mean
# In... |
library(matrixcalc)
ginv <- function(X, tol = sqrt(.Machine$double.eps)) {
dnx <- dimnames(X)
if (is.null(dnx))
dnx <- vector("list", 2)
s <- svd(X)
nz <- s$d > tol * s$d[1]
structure(if (any(nz))
s$v[, nz] %*% (t(s$u[, nz])/s$d[nz])
else X, dimnames = dnx[2:1])
... | /Opt5PL/R/ff.R | no_license | akhikolla/InformationHouse | R | false | false | 3,067 | r | library(matrixcalc)
ginv <- function(X, tol = sqrt(.Machine$double.eps)) {
dnx <- dimnames(X)
if (is.null(dnx))
dnx <- vector("list", 2)
s <- svd(X)
nz <- s$d > tol * s$d[1]
structure(if (any(nz))
s$v[, nz] %*% (t(s$u[, nz])/s$d[nz])
else X, dimnames = dnx[2:1])
... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7797
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7796
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7796
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Basler/wmiforward/stmt16_68_69/stmt16_68_69.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 709 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7797
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7796
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7796
c
c Input Parameter (command line, fil... |
## continuous-continuous model postprocessing for copula calibration - postprocess
rm(list=ls())
libs <- c("copula", "magrittr", "rstan", "sfsmisc", "tidyverse")
invisible(lapply(libs, library, character.only = TRUE))
# set working directory
wdir<-file.path("/home/nathan/Dropbox/njames/school/PhD/misc/conferences/Bio... | /24_cc_calib_plot.R | no_license | ntjames/asa_biopharm_2019 | R | false | false | 4,796 | r | ## continuous-continuous model postprocessing for copula calibration - postprocess
rm(list=ls())
libs <- c("copula", "magrittr", "rstan", "sfsmisc", "tidyverse")
invisible(lapply(libs, library, character.only = TRUE))
# set working directory
wdir<-file.path("/home/nathan/Dropbox/njames/school/PhD/misc/conferences/Bio... |
context("discrete_entropy")
nn <- 10
# does not add up to 1
kVec <- rnorm(nn)^2 + 1
kProbs <- kVec / sum(kVec)
kUniformDistr <- rep(1 / nn, nn)
test_that("discrete_entropy computes right entropy for uniform", {
# entropy of uniform is always larger than any other vector
expect_lt(discrete_entropy(kProbs), discr... | /tests/testthat/test_discrete_entropy.R | no_license | cran/ForeCA | R | false | false | 1,339 | r | context("discrete_entropy")
nn <- 10
# does not add up to 1
kVec <- rnorm(nn)^2 + 1
kProbs <- kVec / sum(kVec)
kUniformDistr <- rep(1 / nn, nn)
test_that("discrete_entropy computes right entropy for uniform", {
# entropy of uniform is always larger than any other vector
expect_lt(discrete_entropy(kProbs), discr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/momentum_routines.R
\name{read.gene.mapping.info}
\alias{read.gene.mapping.info}
\title{read in detailed molecular mapping info from hdf5 file as written out by "-d" option of velocyto.py}
\usage{
read.gene.mapping.info(fname, cell.clusters =... | /man/read.gene.mapping.info.Rd | no_license | ilyakorsunsky/velocyto.R | R | false | true | 1,512 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/momentum_routines.R
\name{read.gene.mapping.info}
\alias{read.gene.mapping.info}
\title{read in detailed molecular mapping info from hdf5 file as written out by "-d" option of velocyto.py}
\usage{
read.gene.mapping.info(fname, cell.clusters =... |
Message <- R6::R6Class("Message",
public = list(
jsonrpc = 2,
to_json = function() {
},
format = function() {
json <- self$to_json()
paste0("Content-Length: ", nchar(json, type = "bytes"), "\r\n\r\n", json)
}
)
)
Request <- R6::R6Class("Request",... | /R/jsonrpc.R | no_license | Ikuyadeu/languageserver | R | false | false | 2,308 | r | Message <- R6::R6Class("Message",
public = list(
jsonrpc = 2,
to_json = function() {
},
format = function() {
json <- self$to_json()
paste0("Content-Length: ", nchar(json, type = "bytes"), "\r\n\r\n", json)
}
)
)
Request <- R6::R6Class("Request",... |
library(TAM)
### Name: tam.wle
### Title: Weighted Likelihood Estimation and Maximum Likelihood Estimation
### of Person Parameters
### Aliases: tam.wle tam.mml.wle tam.mml.wle2 tam_jml_wle print.tam.wle
### summary.tam.wle
### Keywords: WLE MLE Person parameter estimation print
### ** Examples
################... | /data/genthat_extracted_code/TAM/examples/tam.wle.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 6,805 | r | library(TAM)
### Name: tam.wle
### Title: Weighted Likelihood Estimation and Maximum Likelihood Estimation
### of Person Parameters
### Aliases: tam.wle tam.mml.wle tam.mml.wle2 tam_jml_wle print.tam.wle
### summary.tam.wle
### Keywords: WLE MLE Person parameter estimation print
### ** Examples
################... |
#thirty <- function() { ##The name of the function
setwd("C:/Week3/ProgAssignment3-data")
outcome <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
hospital <- read.csv("hospital-data.csv", colClasses = "character")
outcome.hos... | /thirty.R | no_license | mandydog/Rthirdweek | R | false | false | 2,383 | r | #thirty <- function() { ##The name of the function
setwd("C:/Week3/ProgAssignment3-data")
outcome <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
hospital <- read.csv("hospital-data.csv", colClasses = "character")
outcome.hos... |
library(pbapply)
library(dplyr)
generate_data <- function(k, m, sd) {
return(rnorm(k, m, sd))
}
estimate_ci <- function(data) {
est_m <- mean(data)
est_sd <- sd(data)
est_k <- length(data)
return(
c(
est_m - 1.96*est_sd/sqrt(est_k-1),
est_m + 1.96*est_sd/sqrt(est_k-1)
)
)
}
eva... | /week7.R | permissive | Daria631/Dasha | R | false | false | 1,863 | r | library(pbapply)
library(dplyr)
generate_data <- function(k, m, sd) {
return(rnorm(k, m, sd))
}
estimate_ci <- function(data) {
est_m <- mean(data)
est_sd <- sd(data)
est_k <- length(data)
return(
c(
est_m - 1.96*est_sd/sqrt(est_k-1),
est_m + 1.96*est_sd/sqrt(est_k-1)
)
)
}
eva... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/updateRendered.r
\name{setPlot}
\alias{setPlot}
\title{update an plotOutput object. Can be used instead of renderPlot.}
\usage{
setPlot(id, expr, app = getApp(), update.env = parent.frame(),
quoted = FALSE, ...)
}
\description{
Similar to u... | /man/setPlot.Rd | no_license | skranz/shinyEvents | R | false | true | 371 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/updateRendered.r
\name{setPlot}
\alias{setPlot}
\title{update an plotOutput object. Can be used instead of renderPlot.}
\usage{
setPlot(id, expr, app = getApp(), update.env = parent.frame(),
quoted = FALSE, ...)
}
\description{
Similar to u... |
### demonstration of the map area unit problem example:
require(aegis.bathymetry)
maup = map_area_unit_problem( just_return_results=TRUE ) #default is bathymetry data
x = maup$resolution
# x = log( maup$n / maup$resolution^2 ) # data density
yrange = range( maup$min, maup$max )
plot(mean ~ x, ma... | /inst/scripts/92_maup.R | permissive | jae0/aegis.bathymetry | R | false | false | 738 | r |
### demonstration of the map area unit problem example:
require(aegis.bathymetry)
maup = map_area_unit_problem( just_return_results=TRUE ) #default is bathymetry data
x = maup$resolution
# x = log( maup$n / maup$resolution^2 ) # data density
yrange = range( maup$min, maup$max )
plot(mean ~ x, ma... |
#' Read in cleaned Black Knight data for Fairfax County
#'
#'
#'
#' @return dataframe of black knight data for Fairfax county, with all variables that were created in the clean and preclean phase.
#' @export
#'
#' @examples jur <- read_jurisdiction("fairfax", rmd = TRUE)
read_fairfax <- function() {
filepath <- "... | /Macros/read-fairfax.R | no_license | NeighborhoodInfoDC/RegHsg | R | false | false | 2,945 | r |
#' Read in cleaned Black Knight data for Fairfax County
#'
#'
#'
#' @return dataframe of black knight data for Fairfax county, with all variables that were created in the clean and preclean phase.
#' @export
#'
#' @examples jur <- read_jurisdiction("fairfax", rmd = TRUE)
read_fairfax <- function() {
filepath <- "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_example_apps.R
\name{runAppExample}
\alias{runAppExample}
\title{Run demo shiny apps to test out shinyinputtables functionality}
\usage{
runAppExample(demoName)
}
\arguments{
\item{demoName}{Single length character vector denoting the nam... | /man/runAppExample.Rd | permissive | AnthonyEbert/shinyinputtables | R | false | true | 682 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_example_apps.R
\name{runAppExample}
\alias{runAppExample}
\title{Run demo shiny apps to test out shinyinputtables functionality}
\usage{
runAppExample(demoName)
}
\arguments{
\item{demoName}{Single length character vector denoting the nam... |
#' Automated parameter blocking procedure for efficient MCMC sampling
#'
#' Runs NIMBLE's automated blocking procedure for a given model object, to dynamically determine a blocking scheme of the continuous-valued model nodes. This blocking scheme is designed to produce efficient MCMC sampling (defined as number of ef... | /packages/nimble/R/MCMC_autoBlock.R | permissive | DRJP/nimble | R | false | false | 34,217 | r | #' Automated parameter blocking procedure for efficient MCMC sampling
#'
#' Runs NIMBLE's automated blocking procedure for a given model object, to dynamically determine a blocking scheme of the continuous-valued model nodes. This blocking scheme is designed to produce efficient MCMC sampling (defined as number of ef... |
test_that("outputs a data.frame", {
expect_s3_class(sda, "data.frame")
})
test_that("outputs the expected snapshot", {
skip_if(r_version_is_older_than(4))
expect_snapshot(sda)
})
test_that("outputs like r2dii.analysis::target_sda()", {
# This integration (not unit) test checks if this function keeps its promi... | /tests/testthat/test-sda.R | permissive | jdhoffa/r2dii.plot | R | false | false | 1,128 | r | test_that("outputs a data.frame", {
expect_s3_class(sda, "data.frame")
})
test_that("outputs the expected snapshot", {
skip_if(r_version_is_older_than(4))
expect_snapshot(sda)
})
test_that("outputs like r2dii.analysis::target_sda()", {
# This integration (not unit) test checks if this function keeps its promi... |
## vim:textwidth=80:expandtab:shiftwidth=2:softtabstop=2
library(oce)
context("Accessors")
test_that("retrieve units", {
data("ctd")
## pre 20160430 expect_equal(ctd[["temperatureUnit"]], list(unit=expression(degree*C), scale="ITS-90"))
## pre 20160430 expect_equal(ctd[["temperature unit... | /tests/testthat/test_accessors.R | no_license | AnneMTreasure/oce | R | false | false | 1,089 | r | ## vim:textwidth=80:expandtab:shiftwidth=2:softtabstop=2
library(oce)
context("Accessors")
test_that("retrieve units", {
data("ctd")
## pre 20160430 expect_equal(ctd[["temperatureUnit"]], list(unit=expression(degree*C), scale="ITS-90"))
## pre 20160430 expect_equal(ctd[["temperature unit... |
#' Retrieve historic weather data for the Netherlands
#'
#' This function retrieves historic weather data collected by the official KNMI weather stations. See spatialrisk::knmi_stations for a list of the official KNMI weather stations.
#'
#' @param startyear start year for historic weather data.
#' @param endyear end y... | /R/knmi_historic.R | no_license | emailhy/spatialrisk | R | false | false | 3,582 | r | #' Retrieve historic weather data for the Netherlands
#'
#' This function retrieves historic weather data collected by the official KNMI weather stations. See spatialrisk::knmi_stations for a list of the official KNMI weather stations.
#'
#' @param startyear start year for historic weather data.
#' @param endyear end y... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elementwise.R
\docType{class}
\name{Logistic-class}
\alias{Logistic-class}
\alias{.Logistic}
\alias{Logistic}
\alias{Logistic}
\alias{to_numeric,Logistic-method}
\alias{sign_from_args,Logistic-method}
\alias{is_atom_convex,Logistic-method}
\a... | /man/Logistic-class.Rd | permissive | vishalbelsare/CVXR | R | false | true | 2,111 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elementwise.R
\docType{class}
\name{Logistic-class}
\alias{Logistic-class}
\alias{.Logistic}
\alias{Logistic}
\alias{Logistic}
\alias{to_numeric,Logistic-method}
\alias{sign_from_args,Logistic-method}
\alias{is_atom_convex,Logistic-method}
\a... |
context("List data package identifiers")
testthat::test_that("list_data_package_identifiers() works", {
vcr::use_cassette("list_data_package_identifiers", {
res <- list_data_package_identifiers("knb-lter-ble")
})
expect_equal(class(res), "numeric")
expect_true(length(res) > 0)
})
| /tests/testthat/test_list_data_package_identifiers.R | permissive | ropensci/EDIutils | R | false | false | 294 | r | context("List data package identifiers")
testthat::test_that("list_data_package_identifiers() works", {
vcr::use_cassette("list_data_package_identifiers", {
res <- list_data_package_identifiers("knb-lter-ble")
})
expect_equal(class(res), "numeric")
expect_true(length(res) > 0)
})
|
#method = one of "anova", "poisson", "class" or "exp".
#If method is missing then the routine tries to make an intelligent guess. If y is a survival object, then method = "exp" is assumed, if y has 2 columns then method = "poisson" is assumed, if y is a factor then method = "class" is assumed, otherwise method = "an... | /52-CART/zz-test.R | no_license | DUanalytics/rAnalytics | R | false | false | 755 | r |
#method = one of "anova", "poisson", "class" or "exp".
#If method is missing then the routine tries to make an intelligent guess. If y is a survival object, then method = "exp" is assumed, if y has 2 columns then method = "poisson" is assumed, if y is a factor then method = "class" is assumed, otherwise method = "an... |
## Caching the Inverse of a Matrix
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <... | /cachematrix.R | no_license | wangjiezhe/ProgrammingAssignment2 | R | false | false | 1,083 | r | ## Caching the Inverse of a Matrix
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <... |
## The three functions below are designed to cache and retrieve the inverse of a matrix.
## If the inverse has already been calculated (and the matrix has not changed),
## then the cachesolve function retrieves the inverse from the cache.
## The function makeCacheMatrix can only be executed if the matrix supplied is sq... | /cachematrix.R | no_license | elineheemskerk/ProgrammingAssignment2 | R | false | false | 1,771 | r | ## The three functions below are designed to cache and retrieve the inverse of a matrix.
## If the inverse has already been calculated (and the matrix has not changed),
## then the cachesolve function retrieves the inverse from the cache.
## The function makeCacheMatrix can only be executed if the matrix supplied is sq... |
source(here("R/analyze/assign_treatment.R"), local = TRUE)
newey_ate <- function(crimes, citations) {
propensity_scores <-
assign_treatment(citations_tract_month = citations) %>%
calc_propensity_score(crime_tract_month = crimes)
cutoff <- ymd(20180628)
outcome_data <- crimes %>%
dplyr::filter(... | /R/analyze/model_fitting.R | no_license | nateybear/austin-homelessness-map | R | false | false | 1,201 | r | source(here("R/analyze/assign_treatment.R"), local = TRUE)
newey_ate <- function(crimes, citations) {
propensity_scores <-
assign_treatment(citations_tract_month = citations) %>%
calc_propensity_score(crime_tract_month = crimes)
cutoff <- ymd(20180628)
outcome_data <- crimes %>%
dplyr::filter(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/general_anal.R
\name{FeatureCorrelation}
\alias{FeatureCorrelation}
\title{Main function to calculate correlation of all other feature to a given feature name}
\usage{
FeatureCorrelation(mbSetObj, dist.name, taxrank, taxa, variable, datatype,... | /MicrobiomeAnalystR/man/FeatureCorrelation.Rd | no_license | FADHLyemen/MicrobiomeAnalystR | R | false | true | 605 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/general_anal.R
\name{FeatureCorrelation}
\alias{FeatureCorrelation}
\title{Main function to calculate correlation of all other feature to a given feature name}
\usage{
FeatureCorrelation(mbSetObj, dist.name, taxrank, taxa, variable, datatype,... |
vec <- 1:5
vec <- seq(1, 5, 1)
for (i in vec) {
cat(i, "\n")
}
kraje <- c("Polska", "Grecja", "Polska", "Polska")
for (i in kraje) {
cat(i, "\n")
}
for (i in iris) {
i[1]+i[2]
}
lapply(iris, function(i){
i[1]+i[2]
})
wynik <- numeric(length(vec))
for (i in vec) {
wynik[i] <- i
}
wynik <- lapply(vec, fu... | /materialy/Wyklad03.R | no_license | ultramargarine/ProgramowanieWizualizacja2017 | R | false | false | 1,939 | r | vec <- 1:5
vec <- seq(1, 5, 1)
for (i in vec) {
cat(i, "\n")
}
kraje <- c("Polska", "Grecja", "Polska", "Polska")
for (i in kraje) {
cat(i, "\n")
}
for (i in iris) {
i[1]+i[2]
}
lapply(iris, function(i){
i[1]+i[2]
})
wynik <- numeric(length(vec))
for (i in vec) {
wynik[i] <- i
}
wynik <- lapply(vec, fu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/support_operations.R
\name{support_add_communication_to_case}
\alias{support_add_communication_to_case}
\title{Adds additional customer communication to an AWS Support case}
\usage{
support_add_communication_to_case(caseId, communicationBody,... | /paws/man/support_add_communication_to_case.Rd | permissive | sanchezvivi/paws | R | false | true | 1,896 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/support_operations.R
\name{support_add_communication_to_case}
\alias{support_add_communication_to_case}
\title{Adds additional customer communication to an AWS Support case}
\usage{
support_add_communication_to_case(caseId, communicationBody,... |
#---- This file documents datasets inside the package pjpv2020.01
#- Included datasets:
#- 0) df_prueba : es solo un df para probar mis funciones. Tiene columnas de diversas clases (integer, bool etc...) es para probar las funciones. Quizas faltaria ponerle una columna con vectores o dfs
#- 1) pob_mun_1996_2019: cifr... | /data-raw/crear_dfs_a_exportar.R | permissive | perezp44/pjpv2020.01 | R | false | false | 12,503 | r | #---- This file documents datasets inside the package pjpv2020.01
#- Included datasets:
#- 0) df_prueba : es solo un df para probar mis funciones. Tiene columnas de diversas clases (integer, bool etc...) es para probar las funciones. Quizas faltaria ponerle una columna con vectores o dfs
#- 1) pob_mun_1996_2019: cifr... |
triad<-function(df,
N=20,
eqfun=mean,
Nsort=TRUE,
...) {
sc<-c(df$s1,df$s2)
sig<-sd(sc,na.rm=TRUE)
df$s1<-df$s1/sig
df$s2<-df$s2/sig
##
tab<-table(df$nm)
tab<-sort(tab,decreasing=TRUE)
if (!Nsort) {
tab<-tab[tab>10... | /triads.R | no_license | ben-domingue/network_equating | R | false | false | 3,498 | r |
triad<-function(df,
N=20,
eqfun=mean,
Nsort=TRUE,
...) {
sc<-c(df$s1,df$s2)
sig<-sd(sc,na.rm=TRUE)
df$s1<-df$s1/sig
df$s2<-df$s2/sig
##
tab<-table(df$nm)
tab<-sort(tab,decreasing=TRUE)
if (!Nsort) {
tab<-tab[tab>10... |
# Example codes for running a linear regression analysis
# Read in the country-savings data set
savings <- read.table("Lecture07_data_regression_in_matrix_terms.txt", header=T)
# Summary statistics of the data
summary(savings)
# multiple linear regression: y - personal savings, x1 - pop15, x2 - pop75
g1 <- lm(sr~po... | /Sample Code/Lecture 7/Richard_Davis_Lecture07_R_regression_in_matrix_terms.R | no_license | rdavis22/BIOS-7060 | R | false | false | 831 | r | # Example codes for running a linear regression analysis
# Read in the country-savings data set
savings <- read.table("Lecture07_data_regression_in_matrix_terms.txt", header=T)
# Summary statistics of the data
summary(savings)
# multiple linear regression: y - personal savings, x1 - pop15, x2 - pop75
g1 <- lm(sr~po... |
testlist <- list(type = 1L, z = 2.05226840065033e-289)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609893661-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 108 | r | testlist <- list(type = 1L, z = 2.05226840065033e-289)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
testlist <- list(x = structure(c(2.31635987669322e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::doubleCenterBiasCorrected,testlist)
str(result... | /multivariance/inst/testfiles/doubleCenterBiasCorrected/AFL_doubleCenterBiasCorrected/doubleCenterBiasCorrected_valgrind_files/1613140662-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 321 | r | testlist <- list(x = structure(c(2.31635987669322e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::doubleCenterBiasCorrected,testlist)
str(result... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/subclu.R
\name{SubClu}
\alias{SubClu}
\title{The SubClu Algorithm for Subspace Clustering}
\usage{
SubClu(data, epsilon = 4, minSupport = 4)
}
\arguments{
\item{data}{A Matrix of input data.}
\item{epsilon}{size of environment parame... | /man/SubClu.Rd | no_license | Sarmentor/subspace | R | false | false | 1,184 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/subclu.R
\name{SubClu}
\alias{SubClu}
\title{The SubClu Algorithm for Subspace Clustering}
\usage{
SubClu(data, epsilon = 4, minSupport = 4)
}
\arguments{
\item{data}{A Matrix of input data.}
\item{epsilon}{size of environment parame... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HA_to_LF.R
\name{HA_to_LF}
\alias{HA_to_LF}
\title{Transform home away data to local foreign data}
\usage{
HA_to_LF(data_agro_HA)
}
\arguments{
\item{data_agro_HA}{data home away}
}
\value{
a data frame of class data_agro_LF
}
\description{
T... | /man/HA_to_LF.Rd | no_license | gaelleVF/PPBstats-PPBmelange | R | false | true | 421 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HA_to_LF.R
\name{HA_to_LF}
\alias{HA_to_LF}
\title{Transform home away data to local foreign data}
\usage{
HA_to_LF(data_agro_HA)
}
\arguments{
\item{data_agro_HA}{data home away}
}
\value{
a data frame of class data_agro_LF
}
\description{
T... |
\name{des}
\alias{des}
\title{Desription of a data frame or a variable}
\description{Description of a data frame or a variable or wildcard for variable names}
\usage{
des(x=.data, select, exclude)
}
\arguments{
\item{x}{an object such as a vector (variable), a matrix, a table, a list or a data frame}
\item{s... | /man/des.rd | no_license | cran/epicalc | R | false | false | 3,007 | rd | \name{des}
\alias{des}
\title{Desription of a data frame or a variable}
\description{Description of a data frame or a variable or wildcard for variable names}
\usage{
des(x=.data, select, exclude)
}
\arguments{
\item{x}{an object such as a vector (variable), a matrix, a table, a list or a data frame}
\item{s... |
volclynder=function(dia=5,len=100){
vol=pi*dia^2*len/4
return(vol)
}
#lazy execution
volcylinder1=function(dia,len,rad){
vol=pi*dia^2*len/4
return(vol)
}
volcylinder2=function(dia,len,rad){
vol=pi*dia^2*len/4
print(rad)
return(vol)
}
| /volClynder.R | no_license | suman083/sawaymDataScience | R | false | false | 260 | r | volclynder=function(dia=5,len=100){
vol=pi*dia^2*len/4
return(vol)
}
#lazy execution
volcylinder1=function(dia,len,rad){
vol=pi*dia^2*len/4
return(vol)
}
volcylinder2=function(dia,len,rad){
vol=pi*dia^2*len/4
print(rad)
return(vol)
}
|
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 6276
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 6126
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 6126
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Kronegger-Pfandler-Pichler/bomb/p10-10.pddl_planlen=1/p10-10.pddl_planlen=1.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 1,224 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 6276
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 6126
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 6126
c
c Input Parameter (command line, fil... |
#' Safe SQL String
#'
#' @param var String to be made safe
#'
#' @return Safe sql string
#' @export
#'
#' @examples
#' safeSQLVar("unsafe' string")
safeSQLVar <- function(var) {
ret_vec <- rep("", length(var))
for (i in 1:length(var)) {
if (is.null(var[i]) | identical(var[i], character(0))) {
ret_vec[i]... | /R/helpers.R | no_license | willforbes/rsqlhelpers | R | false | false | 755 | r | #' Safe SQL String
#'
#' @param var String to be made safe
#'
#' @return Safe sql string
#' @export
#'
#' @examples
#' safeSQLVar("unsafe' string")
safeSQLVar <- function(var) {
ret_vec <- rep("", length(var))
for (i in 1:length(var)) {
if (is.null(var[i]) | identical(var[i], character(0))) {
ret_vec[i]... |
expect_not_null <- function (object, info = NULL, label = NULL) {
act <- quasi_label(rlang::enquo(object), label)
expect(!is.null(act$val), sprintf("%s is null.", act$lab),
info = info)
invisible(act$val)
}
expect_node <- function (node, ...) {
cond <- list(...)
if (!is.null(cond$id)) cond$id... | /tests/testthat/helper-misc.R | permissive | lbartnik/repository | R | false | false | 794 | r | expect_not_null <- function (object, info = NULL, label = NULL) {
act <- quasi_label(rlang::enquo(object), label)
expect(!is.null(act$val), sprintf("%s is null.", act$lab),
info = info)
invisible(act$val)
}
expect_node <- function (node, ...) {
cond <- list(...)
if (!is.null(cond$id)) cond$id... |
# Functions to calculate the distance
# from each breakpoint to user-provided loci (e.g. TSS)
#' generateData2
#' Prepare data for dist2motif
#' @keywords simulate
#' @import dplyr
#' @export
generateData2 <- function(..., df, breakpoints, sim=FALSE, chroms){
if(missing(df) && missing(breakpoints)) stop("\n[!] Must ... | /R/dist2motif2.R | permissive | nriddiford/svBreaks | R | false | false | 23,613 | r | # Functions to calculate the distance
# from each breakpoint to user-provided loci (e.g. TSS)
#' generateData2
#' Prepare data for dist2motif
#' @keywords simulate
#' @import dplyr
#' @export
generateData2 <- function(..., df, breakpoints, sim=FALSE, chroms){
if(missing(df) && missing(breakpoints)) stop("\n[!] Must ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.