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 |
|---|---|---|---|---|---|---|---|---|---|
source("https://bioconductor.org/biocLite.R")
biocLite("DESeq")
biocLite("baySeq")
biocLite("EBSeq")
biocLite("NOISeq")
biocLite("samr")
set.seed(123)
## Import required library
library(DESeq)
library(DESeq2)
library(baySeq)
library(edgeR)
library(EBSeq)
library(NOISeq)
library(samr)
library(limma)
... | /RNASeq_examples.R | no_license | DongmeiLi2017/RNA-seq-Analysis-Methods-Comparison | R | false | false | 16,642 | r | source("https://bioconductor.org/biocLite.R")
biocLite("DESeq")
biocLite("baySeq")
biocLite("EBSeq")
biocLite("NOISeq")
biocLite("samr")
set.seed(123)
## Import required library
library(DESeq)
library(DESeq2)
library(baySeq)
library(edgeR)
library(EBSeq)
library(NOISeq)
library(samr)
library(limma)
... |
#' Remove Region A from Region B for 1 chromosome.
#'
#' @param rois Region B, GRanges object.
#' @param sub Region A, GRangesList/GRanges object.
#' @param chr Chromosome name.
#' @return Filtered Region B for 1 chromosome.
#' @export
subtract.regions.from.roi.chr <- function(rois, sub,chr = 'chr10') {
... | /MutSpot_Rpackage/R/subtract.regions.from.roi.chr.R | no_license | skandlab/MutSpot | R | false | false | 2,164 | r | #' Remove Region A from Region B for 1 chromosome.
#'
#' @param rois Region B, GRanges object.
#' @param sub Region A, GRangesList/GRanges object.
#' @param chr Chromosome name.
#' @return Filtered Region B for 1 chromosome.
#' @export
subtract.regions.from.roi.chr <- function(rois, sub,chr = 'chr10') {
... |
library(shiny)
library(leaflet)
library(plotly)
shinyUI(
navbarPage("The Washington Post's Police Shootings",
tabPanel("Statistics",
sidebarPanel(
sliderInput("years",
"Years:",
... | /Course Project/shinyapp/USPoliceShootingStat/ui.R | no_license | armandyne/Developing-Data-Products | R | false | false | 2,921 | r | library(shiny)
library(leaflet)
library(plotly)
shinyUI(
navbarPage("The Washington Post's Police Shootings",
tabPanel("Statistics",
sidebarPanel(
sliderInput("years",
"Years:",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yamlet.R
\name{decorate}
\alias{decorate}
\title{Decorate a List-like Object}
\usage{
decorate(x, ...)
}
\arguments{
\item{x}{object}
\item{...}{passed arguments}
}
\value{
a list-like object, typically data.frame
}
\description{
Decorates a... | /man/decorate.Rd | no_license | romainfrancois/yamlet | R | false | true | 869 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yamlet.R
\name{decorate}
\alias{decorate}
\title{Decorate a List-like Object}
\usage{
decorate(x, ...)
}
\arguments{
\item{x}{object}
\item{...}{passed arguments}
}
\value{
a list-like object, typically data.frame
}
\description{
Decorates a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_areas.R
\name{get_areas}
\alias{get_areas}
\title{Extract AREA information from CFDBS}
\usage{
get_areas(channel, areas = "all")
}
\arguments{
\item{channel}{an Object inherited from \link[DBI]{DBIConnection-class}. This object is used to... | /man/get_areas.Rd | no_license | andybeet/cfdbs | R | false | true | 2,420 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_areas.R
\name{get_areas}
\alias{get_areas}
\title{Extract AREA information from CFDBS}
\usage{
get_areas(channel, areas = "all")
}
\arguments{
\item{channel}{an Object inherited from \link[DBI]{DBIConnection-class}. This object is used to... |
library(dplyr)
library(e1071)
data <- read.table('weather.txt', sep = ',',
colClasses = rep('factor', 5),
col.names = letters[1:5])
# standard result
naiveBayes(data[, -length(data)], data[, length(data)]) %>%
predict(data) %>%
mapply(`==`, ., data[, length(data)]) %>%... | /naive_bayes.R | no_license | ashther/naive_bayes | R | false | false | 1,780 | r | library(dplyr)
library(e1071)
data <- read.table('weather.txt', sep = ',',
colClasses = rep('factor', 5),
col.names = letters[1:5])
# standard result
naiveBayes(data[, -length(data)], data[, length(data)]) %>%
predict(data) %>%
mapply(`==`, ., data[, length(data)]) %>%... |
#Assignment 6.1 / Import the Titanic Dataset from the following link:
#Download https://drive.google.com/file/d/1JTJCjdGuUxzKXYlwOavwovB01k6FWg3r/view?ts=5b42ea10
#Perform the below operations:
install.packages("tidyverse")
library(tidyverse)
install.packages("readxl")
library(readxl)
titanic3 <- read_excel("C:/... | /Assignment6_1.R | no_license | VereDias/Assignment6.1 | R | false | false | 2,698 | r | #Assignment 6.1 / Import the Titanic Dataset from the following link:
#Download https://drive.google.com/file/d/1JTJCjdGuUxzKXYlwOavwovB01k6FWg3r/view?ts=5b42ea10
#Perform the below operations:
install.packages("tidyverse")
library(tidyverse)
install.packages("readxl")
library(readxl)
titanic3 <- read_excel("C:/... |
\name{.fcnnls}
\alias{.fcnnls}
\title{Internal Routine for Fast Combinatorial Nonnegative Least-Squares}
\usage{
.fcnnls(x, y, verbose = FALSE, pseudo = FALSE, eps = 0)
}
\arguments{
\item{x}{the coefficient matrix}
\item{y}{the target matrix to be approximated by \eqn{X
K}.}
\item{verbose}{logical that ind... | /man/dot-fcnnls.Rd | no_license | cran/NMF | R | false | false | 2,107 | rd | \name{.fcnnls}
\alias{.fcnnls}
\title{Internal Routine for Fast Combinatorial Nonnegative Least-Squares}
\usage{
.fcnnls(x, y, verbose = FALSE, pseudo = FALSE, eps = 0)
}
\arguments{
\item{x}{the coefficient matrix}
\item{y}{the target matrix to be approximated by \eqn{X
K}.}
\item{verbose}{logical that ind... |
# Find the sum of all the multiples of 3 or 5 below 1000.
addn <- function(n) {
sum <- 0
for (i in seq_len(n-1)) {
if (i %% 3 == 0 || i %% 5 == 0) {
sum <- sum + i
i <- i + 1
}
}
return(sum)
}
addn(1000) | /p1.R | no_license | jubyshu/ProjectEulerR | R | false | false | 233 | r | # Find the sum of all the multiples of 3 or 5 below 1000.
addn <- function(n) {
sum <- 0
for (i in seq_len(n-1)) {
if (i %% 3 == 0 || i %% 5 == 0) {
sum <- sum + i
i <- i + 1
}
}
return(sum)
}
addn(1000) |
# Antonis Pishias
# Financial Data and Statistics
# Assignment 2
#
# Section # Importing ##################################
#
setwd("~/Sites/rstudio/fds2")
setwd("./data//cryptocurrencyCSV/")
# install.packages("xts")
# install.packages("devtools")
# library(devtools)
# install_github("cran/PerformanceAnalytics")
# ... | /app.R | permissive | an21p/time-series-analysis | R | false | false | 20,076 | r | # Antonis Pishias
# Financial Data and Statistics
# Assignment 2
#
# Section # Importing ##################################
#
setwd("~/Sites/rstudio/fds2")
setwd("./data//cryptocurrencyCSV/")
# install.packages("xts")
# install.packages("devtools")
# library(devtools)
# install_github("cran/PerformanceAnalytics")
# ... |
# Author: Robert J. Hijmans & Matteo Mattiuzzi
# Date : June 2008
# Version 0.9
# Licence GPL v3
.makeTextFun <- function(fun) {
if (class(fun) != 'character') {
if (is.primitive(fun)) {
test <- try(deparse(fun)[[1]], silent=TRUE)
if (test == '.Primitive(\"sum\")') { fun <- 'sum'
} else i... | /R/calc.R | no_license | mindcrypt6/raster | R | false | false | 6,290 | r | # Author: Robert J. Hijmans & Matteo Mattiuzzi
# Date : June 2008
# Version 0.9
# Licence GPL v3
.makeTextFun <- function(fun) {
if (class(fun) != 'character') {
if (is.primitive(fun)) {
test <- try(deparse(fun)[[1]], silent=TRUE)
if (test == '.Primitive(\"sum\")') { fun <- 'sum'
} else i... |
library('xts')
library('ts')
rnorm(365)
Sys.Date()-365:1
xts(1:10, Sys.Date()+1:10)
# dat <- cumsum(rnorm(12*4))
# x <- ts(dat)
# stl(x, "periodic")
# xx <- ts(dat, frequency = 12)
# stl(xx, "periodic")
x <- xts(rnorm(20), order.by =Sys.Date()-20:1)
head(x)
index(x)
x['2014-01-25']
x['2014-01-25/2014-01-28']
lag(x... | /Introduccion_a_R/106-series_temporales.R | no_license | joseramoncajide/KSMasterAW | R | false | false | 1,533 | r | library('xts')
library('ts')
rnorm(365)
Sys.Date()-365:1
xts(1:10, Sys.Date()+1:10)
# dat <- cumsum(rnorm(12*4))
# x <- ts(dat)
# stl(x, "periodic")
# xx <- ts(dat, frequency = 12)
# stl(xx, "periodic")
x <- xts(rnorm(20), order.by =Sys.Date()-20:1)
head(x)
index(x)
x['2014-01-25']
x['2014-01-25/2014-01-28']
lag(x... |
# bin-level data
setClass( Class="BinData",
representation=representation(
chrID="character",
coord="numeric",
tagCount="numeric",
mappability="numeric",
gcContent="numeric",
input="numeric",
dataType="character",
seqDepth="numeric"
... | /R/AllClasses.R | no_license | keleslab/mosaics | R | false | false | 2,943 | r |
# bin-level data
setClass( Class="BinData",
representation=representation(
chrID="character",
coord="numeric",
tagCount="numeric",
mappability="numeric",
gcContent="numeric",
input="numeric",
dataType="character",
seqDepth="numeric"
... |
# These functions can compute the inverse of the matrix,
# and since the computation of inverces are fairly expensive
# they can also cache the inverse
## this function creates a matrix that can contain it's inverse, if it was computed earlier
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- functio... | /cachematrix.R | no_license | danfords/ProgrammingAssignment2 | R | false | false | 861 | r | # These functions can compute the inverse of the matrix,
# and since the computation of inverces are fairly expensive
# they can also cache the inverse
## this function creates a matrix that can contain it's inverse, if it was computed earlier
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- functio... |
library(rgdal)
mammals <- readOGR("../ext_data/", "TERRESTRIAL_MAMMALS")
library(maps)
library(dplyr)
mammals@data %>% distinct(order_name)
point <- data.frame(lon=70, lat=60)
point <- SpatialPoints(point,proj4string=CRS(proj4string(mammals)))
nPolys <- sapply(mammals@polygons, function(x)length(x@Polygons))
eu... | /mapping_app/parse_RedList.R | permissive | nikopartanen/language_maps | R | false | false | 386 | r | library(rgdal)
mammals <- readOGR("../ext_data/", "TERRESTRIAL_MAMMALS")
library(maps)
library(dplyr)
mammals@data %>% distinct(order_name)
point <- data.frame(lon=70, lat=60)
point <- SpatialPoints(point,proj4string=CRS(proj4string(mammals)))
nPolys <- sapply(mammals@polygons, function(x)length(x@Polygons))
eu... |
# 統計量 Tの分布の確認
# T = ( 標本平均 - 母平均 ) / ( 不偏標準偏差 / √標本数 )
len = 100000
num = 4
t = numeric(length = len)
for (i in 1 : len) {
# 平均0の母集団からランダムにデータを引き出す。
data <- rnorm(n=num, mean=0, sd=1)
# Tの計算
m <- mean(data)
s <- sqrt(var(data))
t[i] <- m / (s / sqrt(num))
}
# 答え合わせ
# Tのヒストグラムと、実際のT分布の確率密度を重ね合わせてみる。
# 自由度=nu... | /T_Distribution.R | no_license | ShowKa/r_study | R | false | false | 638 | r | # 統計量 Tの分布の確認
# T = ( 標本平均 - 母平均 ) / ( 不偏標準偏差 / √標本数 )
len = 100000
num = 4
t = numeric(length = len)
for (i in 1 : len) {
# 平均0の母集団からランダムにデータを引き出す。
data <- rnorm(n=num, mean=0, sd=1)
# Tの計算
m <- mean(data)
s <- sqrt(var(data))
t[i] <- m / (s / sqrt(num))
}
# 答え合わせ
# Tのヒストグラムと、実際のT分布の確率密度を重ね合わせてみる。
# 自由度=nu... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
fastReg <- function(y, x, w) {
.Call('MatchItSE_fastReg', PACKAGE = 'MatchItSE', y, x, w)
}
cppKMsqSum <- function(m, c, w) {
.Call('MatchItSE_cppKMsqSum', PACKAGE = 'MatchItSE', m, c,... | /R/RcppExports.R | no_license | ehsanx/MatchItSE | R | false | false | 489 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
fastReg <- function(y, x, w) {
.Call('MatchItSE_fastReg', PACKAGE = 'MatchItSE', y, x, w)
}
cppKMsqSum <- function(m, c, w) {
.Call('MatchItSE_cppKMsqSum', PACKAGE = 'MatchItSE', m, c,... |
#' @title Fit and categorize.
#'
#' @param dataInput Un_normalized input data that will be fitted transferred into related functions
#' @param n_runs_max_sm This number indicates the upper limit of the fitting attempts for sigmoidal model. Default is 500
#' @param n_runs_min_sm This number indicates the lower limit of ... | /R/mainFunctions.R | no_license | wilkelab/sicegar | R | false | false | 16,839 | r | #' @title Fit and categorize.
#'
#' @param dataInput Un_normalized input data that will be fitted transferred into related functions
#' @param n_runs_max_sm This number indicates the upper limit of the fitting attempts for sigmoidal model. Default is 500
#' @param n_runs_min_sm This number indicates the lower limit of ... |
library(ape)
testtree <- read.tree("13082_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="13082_0_unrooted.txt") | /codeml_files/newick_trees_processed/13082_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("13082_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="13082_0_unrooted.txt") |
#' @include internal.R
NULL
#' @title Print
#'
#' @description Displays information about an object.
#'
#' @param x Any object.
#' @param ... Not used.
#'
#' @name print
#'
#' @return None.
#'
#' @seealso [base::print()].
#'
#' @aliases print
NULL
#' @rdname print
#' @method print Data
#' @export
print.Data <- funct... | /R/print.R | no_license | prioriactions/prioriactions | R | false | false | 666 | r | #' @include internal.R
NULL
#' @title Print
#'
#' @description Displays information about an object.
#'
#' @param x Any object.
#' @param ... Not used.
#'
#' @name print
#'
#' @return None.
#'
#' @seealso [base::print()].
#'
#' @aliases print
NULL
#' @rdname print
#' @method print Data
#' @export
print.Data <- funct... |
# This file contains all of my statistical analysis tests
library(ggplot2)
library(dplyr)
library(tidyr)
library(plyr)
library(corrplot)
library(gplots)
library(ggpubr)
# Read in file
df_clean <- read.csv("E:/Learning/Springboard Intro to Data Science/capstone/CT_cleaned_edit.csv")
df_split <- read.csv("E:/Learning/S... | /statistics.R | no_license | paigewil/capstone | R | false | false | 28,151 | r | # This file contains all of my statistical analysis tests
library(ggplot2)
library(dplyr)
library(tidyr)
library(plyr)
library(corrplot)
library(gplots)
library(ggpubr)
# Read in file
df_clean <- read.csv("E:/Learning/Springboard Intro to Data Science/capstone/CT_cleaned_edit.csv")
df_split <- read.csv("E:/Learning/S... |
## File Name: rm_sdt_fill_init_partable.R
## File Version: 0.11
rm_sdt_fill_init_partable <- function(partable, par_index, tau.item, a.item,
c.rater, d.rater, type)
{
#--- collect parameters
if( type=='item' ){
pars <- list( tau.item=tau.item, a.item=a.item)
} else {
pars <- list( c.ra... | /R/rm_sdt_fill_init_partable.R | no_license | alexanderrobitzsch/sirt | R | false | false | 592 | r | ## File Name: rm_sdt_fill_init_partable.R
## File Version: 0.11
rm_sdt_fill_init_partable <- function(partable, par_index, tau.item, a.item,
c.rater, d.rater, type)
{
#--- collect parameters
if( type=='item' ){
pars <- list( tau.item=tau.item, a.item=a.item)
} else {
pars <- list( c.ra... |
##
# @file randtoolboxEnv.R
# @brief R file for environment of randtoolbox
#
# @author Yohann Chalabi
# @author Diethelm Wuertz
#
#
# Copyright (C) 2008, Yohann Chalabi, Diethelm Wuertz, ETH Zurich.
# All rights reserved.
#
# The new BSD License is applied to this software.
# Copyright (c) 2008 Yohann Chalabi, Diet... | /pkg/randtoolbox/R/randtoolboxEnv.R | no_license | xashely/rmetrics | R | false | false | 2,923 | r | ##
# @file randtoolboxEnv.R
# @brief R file for environment of randtoolbox
#
# @author Yohann Chalabi
# @author Diethelm Wuertz
#
#
# Copyright (C) 2008, Yohann Chalabi, Diethelm Wuertz, ETH Zurich.
# All rights reserved.
#
# The new BSD License is applied to this software.
# Copyright (c) 2008 Yohann Chalabi, Diet... |
################################
# #
# MEDIAN RENT VIEWER SERVER #
# #
################################
################
# HOUSEKEEPING #
################
suppressPackageStartupMessages(library(shiny))
suppressPackageStartupMessages(library(htmltoo... | /server.R | no_license | samanthahoch/median-rent | R | false | false | 18,689 | r | ################################
# #
# MEDIAN RENT VIEWER SERVER #
# #
################################
################
# HOUSEKEEPING #
################
suppressPackageStartupMessages(library(shiny))
suppressPackageStartupMessages(library(htmltoo... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 32006
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 32006
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query10_reachqu_1344n/query10_reachqu_1344n.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: 32006
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 32006
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4... |
# Server for Gun and Suicide/Homicide info interactive map of US States
#
# By Doug Duffy 2016
# Load packages
library(shiny)
library(leaflet)
library(jsonlite)
# Load prepared datasets
statesJson <- readRDS("data/statesJson.rds")
statenames <- readRDS("data/statenames.rds")
gunown <- readRDS("data/gunown.rds")
homr... | /states-app/server.R | no_license | duffy88/Guns_Crime_Suicide | R | false | false | 6,819 | r | # Server for Gun and Suicide/Homicide info interactive map of US States
#
# By Doug Duffy 2016
# Load packages
library(shiny)
library(leaflet)
library(jsonlite)
# Load prepared datasets
statesJson <- readRDS("data/statesJson.rds")
statenames <- readRDS("data/statenames.rds")
gunown <- readRDS("data/gunown.rds")
homr... |
library(InterSIM)
### Name: InterSIM
### Title: InterSIM
### Aliases: InterSIM CpG.gene.map.for.DEG cov.M cov.expr cov.protein
### mean.M mean.expr mean.expr.with.mapped.protein mean.protein
### methyl.gene.level.mean protein.gene.map.for.DEP rho.expr.protein
### rho.methyl.expr rev.logit logit
### ** Examples... | /data/genthat_extracted_code/InterSIM/examples/InterSIM.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 790 | r | library(InterSIM)
### Name: InterSIM
### Title: InterSIM
### Aliases: InterSIM CpG.gene.map.for.DEG cov.M cov.expr cov.protein
### mean.M mean.expr mean.expr.with.mapped.protein mean.protein
### methyl.gene.level.mean protein.gene.map.for.DEP rho.expr.protein
### rho.methyl.expr rev.logit logit
### ** Examples... |
# The following is described in full in a tutorial found here:
# https://www.tylermw.com/a-step-by-step-guide-to-making-3d-maps-with-satellite-imagery-in-r/
# Registration for nasa imagery and USGS are required to access the data
#install.packages(c("rayshader", "raster", "sp"))
library(rayshader)
library(sp)
... | /zion-nat-park-plotter.R | no_license | alistairing/topological-mapping-R | R | false | false | 2,625 | r | # The following is described in full in a tutorial found here:
# https://www.tylermw.com/a-step-by-step-guide-to-making-3d-maps-with-satellite-imagery-in-r/
# Registration for nasa imagery and USGS are required to access the data
#install.packages(c("rayshader", "raster", "sp"))
library(rayshader)
library(sp)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/univariate.R
\name{univariate_sampler}
\alias{univariate_sampler}
\alias{conditional_sampler}
\title{Create a univariate distribution sampler}
\usage{
univariate_sampler(inverse_cdf, col_pts, xdist = "norm", gss = 1,
transform = identity, i... | /man/univariate_sampler.Rd | no_license | Blaza/scmc | R | false | true | 2,501 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/univariate.R
\name{univariate_sampler}
\alias{univariate_sampler}
\alias{conditional_sampler}
\title{Create a univariate distribution sampler}
\usage{
univariate_sampler(inverse_cdf, col_pts, xdist = "norm", gss = 1,
transform = identity, i... |
#' Update Gaussian Processes in a bayesOpt Object
#'
#' To save time, Gaussian processes are not updated after the last iteration
#' in \code{addIterations()}. The user can do this manually, using this function
#' if they wish. This is not necessary to continue optimization using \code{addIterations}.
#' @param op... | /R/updateGP.R | no_license | cran/ParBayesianOptimization | R | false | false | 3,176 | r | #' Update Gaussian Processes in a bayesOpt Object
#'
#' To save time, Gaussian processes are not updated after the last iteration
#' in \code{addIterations()}. The user can do this manually, using this function
#' if they wish. This is not necessary to continue optimization using \code{addIterations}.
#' @param op... |
#' @include leafier-internal.R misc.R SimpleSpatialDataFrame.R
#' SimpleSpatialLinesDataFrame: An S4 class to represent simplified \code{SpatialLinesDataFrame} objects
#'
#' This class is used to store simplified \code{SpatialLinesDataFrame} objects.
#'
#' @slot data \code{data.frame}.
#' @slot lines \code{list} of \c... | /R/SimpleSpatialLinesDataFrame.R | no_license | jonocarroll/leafier | R | false | false | 1,571 | r | #' @include leafier-internal.R misc.R SimpleSpatialDataFrame.R
#' SimpleSpatialLinesDataFrame: An S4 class to represent simplified \code{SpatialLinesDataFrame} objects
#'
#' This class is used to store simplified \code{SpatialLinesDataFrame} objects.
#'
#' @slot data \code{data.frame}.
#' @slot lines \code{list} of \c... |
# users can either step through this file, or call this file with
# r -f example.R
# THIS ASSUMES THAT THE TESTHINT DATABASE EXISTS. The recipe for building that
# database is in ../dbInitialization/createHintTest.sql
# THIS EXAMPLE USES THE BRAIN HINT OUTPUT MADE BY RUNNING make hint at /scratch/data/footprints
pr... | /generate_db/master/blood_vessel_20/hint_1.R | no_license | arodri7/genomics-footprint | R | false | false | 1,805 | r | # users can either step through this file, or call this file with
# r -f example.R
# THIS ASSUMES THAT THE TESTHINT DATABASE EXISTS. The recipe for building that
# database is in ../dbInitialization/createHintTest.sql
# THIS EXAMPLE USES THE BRAIN HINT OUTPUT MADE BY RUNNING make hint at /scratch/data/footprints
pr... |
#' List projects in Gitlab
#'
#' @param ... passed on to \code{\link{gitlab}}
#' @export
#'
#' @examples \dontrun{
#' my_gitlab <- gl_connection(...) ## fill in login parameters
#' my_gitlab(gl_list_projects)
#' }
gl_list_projects <- function(...) {
gitlab("projects", ...)
}
#' Access to repository functions and f... | /R/projects_and_repos.R | no_license | rmflight/gitlabr | R | false | false | 10,965 | r | #' List projects in Gitlab
#'
#' @param ... passed on to \code{\link{gitlab}}
#' @export
#'
#' @examples \dontrun{
#' my_gitlab <- gl_connection(...) ## fill in login parameters
#' my_gitlab(gl_list_projects)
#' }
gl_list_projects <- function(...) {
gitlab("projects", ...)
}
#' Access to repository functions and f... |
.onAttach <-function (lib, pkg) {
packageStartupMessage(" Loading package saemix, version 3.1, September 2019\n please direct bugs, questions and feedback to belhal.karimi@inria.fr\n")
}
| /R/zzz.R | no_license | saemixr/saemix | R | false | false | 201 | r | .onAttach <-function (lib, pkg) {
packageStartupMessage(" Loading package saemix, version 3.1, September 2019\n please direct bugs, questions and feedback to belhal.karimi@inria.fr\n")
}
|
#' Simulated data with six variables divided into two sets
#'
#' A list with main element "data" that is simulated data containing six variables.
#' The data is drawn from multivariate standard normal distribution:
#' The first three variables a1, a2, a3 have average intercorrelation r=.1
#' The second three variables ... | /R/data.r | no_license | Libardo1/bootcorrelations | R | false | false | 866 | r | #' Simulated data with six variables divided into two sets
#'
#' A list with main element "data" that is simulated data containing six variables.
#' The data is drawn from multivariate standard normal distribution:
#' The first three variables a1, a2, a3 have average intercorrelation r=.1
#' The second three variables ... |
context("makeApiCall Argument Validation")
# Note: This file will only test that arguments fail appropriately, or
# that submethods perform as expected. the makeApiCall function
# is ubiquitous throughout the package. If we break it, it's bound
# to pop up in other tests.
# Test .makeApiCall_validateResponse
test_t... | /tests/testthat/test-050-makeApiCall.R | no_license | nutterb/redcapAPI | R | false | false | 4,048 | r | context("makeApiCall Argument Validation")
# Note: This file will only test that arguments fail appropriately, or
# that submethods perform as expected. the makeApiCall function
# is ubiquitous throughout the package. If we break it, it's bound
# to pop up in other tests.
# Test .makeApiCall_validateResponse
test_t... |
#'@title Ambient Occlusion
#'
#'@description Calculates Ambient Occlusion Shadow Map
#'
#'@param heightmap A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All points are assumed to be evenly spaced.
#'@param anglebreaks The angle(s), in degrees, as measured from the horizon fro... | /R/ambient_shade.R | no_license | adamlilith/rayshader | R | false | false | 2,740 | r | #'@title Ambient Occlusion
#'
#'@description Calculates Ambient Occlusion Shadow Map
#'
#'@param heightmap A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All points are assumed to be evenly spaced.
#'@param anglebreaks The angle(s), in degrees, as measured from the horizon fro... |
#### writing functions#####
add2 <- function(x, y){
x+y
}
above10 <- function(y){
use <- x>10
x[use]
}
above <- function(x, n=10){
use <- x >n
x[use]
}
x <- 1:20
above(x, 12)
above(x)
#####function that calculate the mean of each column of a data frame
columnmean <- function(y... | /week 2/week 2 notes.R | no_license | Doublefacez/datasciencecoursera | R | false | false | 1,115 | r | #### writing functions#####
add2 <- function(x, y){
x+y
}
above10 <- function(y){
use <- x>10
x[use]
}
above <- function(x, n=10){
use <- x >n
x[use]
}
x <- 1:20
above(x, 12)
above(x)
#####function that calculate the mean of each column of a data frame
columnmean <- function(y... |
dfA <- eventReactive(c(input$selectRegion_1, input$PopFilter_1), {
project <- "https://data.world/jeffrey-feng/s18-edv-project-3"
data.world::set_config(cfg_env("DW_API"))
paramQuery <- data.world::qry_sql(
"
select population_proportion_under_15, region
from who_cleaner
where population_pro... | /Project_3/old/derekplots/DataA.R | no_license | Arinze95/CS329DataViz | R | false | false | 1,058 | r | dfA <- eventReactive(c(input$selectRegion_1, input$PopFilter_1), {
project <- "https://data.world/jeffrey-feng/s18-edv-project-3"
data.world::set_config(cfg_env("DW_API"))
paramQuery <- data.world::qry_sql(
"
select population_proportion_under_15, region
from who_cleaner
where population_pro... |
library(testthat)
test_check('item_mip_data_processing')
| /tests/testthat.R | no_license | transportenergy/item_mip_data_processing | R | false | false | 58 | r | library(testthat)
test_check('item_mip_data_processing')
|
#' Takes a power spectrum and makes it noisy, by adding white noise to
#' its amplitude, and introducing random, uniformly distributed
#' phases.
#'
#' \deqn{A(f) \sim \mathcal{N}(PSD(f), \sigma^2)}
#' \deqn{\phi(f) \sim \mathcal{U}(0, 2\pi)}
#' \deqn{z(f) = A(f) \exp(i \phi(f))}
#'
#' @param power Power spectral densi... | /R/noisy.power.spectrum.r | permissive | dwysocki/random-noise-generation | R | false | false | 593 | r | #' Takes a power spectrum and makes it noisy, by adding white noise to
#' its amplitude, and introducing random, uniformly distributed
#' phases.
#'
#' \deqn{A(f) \sim \mathcal{N}(PSD(f), \sigma^2)}
#' \deqn{\phi(f) \sim \mathcal{U}(0, 2\pi)}
#' \deqn{z(f) = A(f) \exp(i \phi(f))}
#'
#' @param power Power spectral densi... |
\name{fivarma}
\alias{fivarma}
\title{
simulation of FIVARMA process
}
\description{
Generates N observations of a realisation of a multivariate FIVARMA process X.
}
\usage{
fivarma(N, d = 0, cov_matrix = diag(length(d)), VAR = NULL,
VMA = NULL,skip = 2000)
}
%- maybe also 'usage' for other objects document... | /man/fivarma.Rd | no_license | cran/multiwave | R | false | false | 2,548 | rd | \name{fivarma}
\alias{fivarma}
\title{
simulation of FIVARMA process
}
\description{
Generates N observations of a realisation of a multivariate FIVARMA process X.
}
\usage{
fivarma(N, d = 0, cov_matrix = diag(length(d)), VAR = NULL,
VMA = NULL,skip = 2000)
}
%- maybe also 'usage' for other objects document... |
# RAR+KA+MS Friday, April 5, 2002 at 15:10
# last change Tuesday, December 14, 2004 Saturday, October 8, 2005
BI <- function (mu.link = "logit")
{
mstats <- checklink("mu.link", "Binomial", substitute(mu.link),
c("logit", "probit", "cloglog", "cauchit", "log", "own"))# ms 8-10-05
structure(
... | /R/BI.R | no_license | Stan125/gamlss.dist | R | false | false | 3,061 | r | # RAR+KA+MS Friday, April 5, 2002 at 15:10
# last change Tuesday, December 14, 2004 Saturday, October 8, 2005
BI <- function (mu.link = "logit")
{
mstats <- checklink("mu.link", "Binomial", substitute(mu.link),
c("logit", "probit", "cloglog", "cauchit", "log", "own"))# ms 8-10-05
structure(
... |
# TODO: Add comment
#
# Author: rmjlwal
###############################################################################
print("hello")
print("goodbye")
print("i'm back!") | /Git Demo/Foo.r.R | no_license | jswallace/Dummy | R | false | false | 185 | r | # TODO: Add comment
#
# Author: rmjlwal
###############################################################################
print("hello")
print("goodbye")
print("i'm back!") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linAlg.R
\name{f2}
\alias{f2}
\title{Frobenius norm squared}
\usage{
f2(x, y = 0)
}
\arguments{
\item{x}{vector}
\item{y}{(optional)}
}
\description{
Frobenius norm squared
}
| /lineId/man/f2.Rd | no_license | snarles/fmri | R | false | true | 255 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linAlg.R
\name{f2}
\alias{f2}
\title{Frobenius norm squared}
\usage{
f2(x, y = 0)
}
\arguments{
\item{x}{vector}
\item{y}{(optional)}
}
\description{
Frobenius norm squared
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MizerParams-class.R
\docType{methods}
\name{MizerParams}
\alias{MizerParams}
\alias{MizerParams,numeric,missing-method}
\alias{MizerParams,data.frame,matrix-method}
\alias{MizerParams,data.frame,missing-method}
\title{Constructors for objects... | /man/MizerParams.Rd | no_license | benharmer/mizer | R | false | true | 4,984 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MizerParams-class.R
\docType{methods}
\name{MizerParams}
\alias{MizerParams}
\alias{MizerParams,numeric,missing-method}
\alias{MizerParams,data.frame,matrix-method}
\alias{MizerParams,data.frame,missing-method}
\title{Constructors for objects... |
# 20160315
# Topic Model 2/3
# Automatically select the best number of topics
# Calculate best number of topics by the maximum likelihood of the harmonic means
# As it is calculated in Griffiths and Steyvers
# If the number of topics is already decided, jump to Topic Model 3/3.
################################
# Selec... | /Topic Model Files/Topic_Model_2.R | no_license | cristianmejia00/topicIDChallenge | R | false | false | 1,913 | r | # 20160315
# Topic Model 2/3
# Automatically select the best number of topics
# Calculate best number of topics by the maximum likelihood of the harmonic means
# As it is calculated in Griffiths and Steyvers
# If the number of topics is already decided, jump to Topic Model 3/3.
################################
# Selec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/omega.partial.SS.rm.R
\name{omega.partial.SS.rm}
\alias{omega.partial.SS.rm}
\title{Partial Omega Squared for Repeated Measures ANOVA from F}
\usage{
omega.partial.SS.rm(dfm, dfe, msm, mse, mss, ssm, sse, sss, a = 0.05)
}
\arguments{
\item{df... | /man/omega.partial.SS.rm.Rd | no_license | doomlab/MOTE | R | false | true | 4,607 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/omega.partial.SS.rm.R
\name{omega.partial.SS.rm}
\alias{omega.partial.SS.rm}
\title{Partial Omega Squared for Repeated Measures ANOVA from F}
\usage{
omega.partial.SS.rm(dfm, dfe, msm, mse, mss, ssm, sse, sss, a = 0.05)
}
\arguments{
\item{df... |
#' Download neighborhood limits of Brazilian municipalities as an sf object
#'
#' This data set includes the neighborhood limits of 720 Brazilian municipalities.
#' It is based on aggregations of the census tracts from the Brazilian
#' census. Only 2010 data is currently available.
#'
#' @param year Year of the data (d... | /r-package/R/read_neighborhood.R | no_license | fcotelo/geobr | R | false | false | 1,189 | r | #' Download neighborhood limits of Brazilian municipalities as an sf object
#'
#' This data set includes the neighborhood limits of 720 Brazilian municipalities.
#' It is based on aggregations of the census tracts from the Brazilian
#' census. Only 2010 data is currently available.
#'
#' @param year Year of the data (d... |
\name{analyzeDeepLoc2}
\alias{analyzeDeepLoc2}
\title{
Import Result of DeepLoc2 Analysis
}
\description{
Allows for easy integration of the result of DeepLoc2 (external sequence analysis of signal peptides) in the IsoformSwitchAnalyzeR workflow. Please note that due to the 'removeNoncodinORFs' option in \code{analyze... | /man/analyzeDeepLoc2.Rd | no_license | tbrittoborges/IsoformSwitchAnalyzeR | R | false | false | 4,955 | rd | \name{analyzeDeepLoc2}
\alias{analyzeDeepLoc2}
\title{
Import Result of DeepLoc2 Analysis
}
\description{
Allows for easy integration of the result of DeepLoc2 (external sequence analysis of signal peptides) in the IsoformSwitchAnalyzeR workflow. Please note that due to the 'removeNoncodinORFs' option in \code{analyze... |
library(sampSurf)
### Name: standingTreeIZ-class
### Title: Class '"standingTreeIZ"'
### Aliases: standingTreeIZ-class summary,standingTreeIZ-method
### Keywords: classes
### ** Examples
showClass("standingTreeIZ")
| /data/genthat_extracted_code/sampSurf/examples/standingTreeIZ-class.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 222 | r | library(sampSurf)
### Name: standingTreeIZ-class
### Title: Class '"standingTreeIZ"'
### Aliases: standingTreeIZ-class summary,standingTreeIZ-method
### Keywords: classes
### ** Examples
showClass("standingTreeIZ")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pd_trimCharVars.R
\name{trimCharVars}
\alias{trimCharVars}
\title{trimCharVars: trim white spaces in character variables from an input dataframe}
\usage{
trimCharVars(DF)
}
\arguments{
\item{DF}{Input dataframe}
}
\value{
\code{DF... | /man/trimCharVars.Rd | permissive | cran/dataCompareR | R | false | true | 540 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pd_trimCharVars.R
\name{trimCharVars}
\alias{trimCharVars}
\title{trimCharVars: trim white spaces in character variables from an input dataframe}
\usage{
trimCharVars(DF)
}
\arguments{
\item{DF}{Input dataframe}
}
\value{
\code{DF... |
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(caret)
library(e1071)
shinyServer(function(input, output) {
rpartmodel <- tr... | /server.R | no_license | kmazarakis/Developing-Data-Products | R | false | false | 1,735 | r | #
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(caret)
library(e1071)
shinyServer(function(input, output) {
rpartmodel <- tr... |
### simulation of count data for the weekly number of new cases based on a seasonal
### SIR-model and correlated residual
discr.datasim.ar <- function(par.alpha=5/3,par.beta=0.3,par.corr=0,par.size=100,
infolist=list('initial'=c(600500,190,399310,0),'times'=0:(8*52)))
{
## arguments:
## par.alpha,par.beta... | /Cumulative_autocorrelation/discr.datasimulation.R | no_license | weidemannf/thesis_code | R | false | false | 1,289 | r | ### simulation of count data for the weekly number of new cases based on a seasonal
### SIR-model and correlated residual
discr.datasim.ar <- function(par.alpha=5/3,par.beta=0.3,par.corr=0,par.size=100,
infolist=list('initial'=c(600500,190,399310,0),'times'=0:(8*52)))
{
## arguments:
## par.alpha,par.beta... |
rm(list=ls(all=T))
x<-c("ggplot2", "corrgram", "DMwR", "caret", "randomForest", "unbalanced", "C50", "dummies", "e1071", "Information",
"MASS", "rpart", "gbm", "ROSE")
install.packages(x)
lapply(x, require, character.only = TRUE)
## Read the data
marketing_train = read.csv("marketing_training.csv",header=T,na.st... | /Unbalanced Data Modeling.R | no_license | harishdamera/Handling-Unbalanced-Data---Predictive-Modeling | R | false | false | 16,921 | r |
rm(list=ls(all=T))
x<-c("ggplot2", "corrgram", "DMwR", "caret", "randomForest", "unbalanced", "C50", "dummies", "e1071", "Information",
"MASS", "rpart", "gbm", "ROSE")
install.packages(x)
lapply(x, require, character.only = TRUE)
## Read the data
marketing_train = read.csv("marketing_training.csv",header=T,na.st... |
# How large are the datasets on Dash?
library(RCurl)
library(RJSONIO)
library(ggplot2)
# Retrieves metadata for all data sets from dash
get_dash_metadata = function(base_url = "https://dash.ucop.edu"
, first_path = "/api/datasets"
, seconds_between_requests =... | /dash.R | permissive | Vensberg/dash_api | R | false | false | 2,359 | r | # How large are the datasets on Dash?
library(RCurl)
library(RJSONIO)
library(ggplot2)
# Retrieves metadata for all data sets from dash
get_dash_metadata = function(base_url = "https://dash.ucop.edu"
, first_path = "/api/datasets"
, seconds_between_requests =... |
#' Mixture of Copula Regressions with Gamma Marginal Distributions
#'
#' Mixture of copula regressions, or model-based clustering with copulas and covariates. Models are estimated by EM algorithm.
#'
#' @param copula A specified copula, from the \code{copula} package. Must be a list of copulas or a list of one copula, ... | /R/MCGR.R | no_license | senhu/mvClaim | R | false | false | 22,020 | r | #' Mixture of Copula Regressions with Gamma Marginal Distributions
#'
#' Mixture of copula regressions, or model-based clustering with copulas and covariates. Models are estimated by EM algorithm.
#'
#' @param copula A specified copula, from the \code{copula} package. Must be a list of copulas or a list of one copula, ... |
#' Remove unwanted variance (RUV)
#'
#' This function is a wrapper for RUVs from RUVSeq to remove unwanted variance using control genes.
#' Additionally, if the number of factors to remove is unknown, the value of k is estimated using
#' surrogate variable analysis. However, if the number of factors is known a priori,... | /R/ruvNorm.R | no_license | trichelab/ATACseeker | R | false | false | 2,110 | r | #' Remove unwanted variance (RUV)
#'
#' This function is a wrapper for RUVs from RUVSeq to remove unwanted variance using control genes.
#' Additionally, if the number of factors to remove is unknown, the value of k is estimated using
#' surrogate variable analysis. However, if the number of factors is known a priori,... |
testlist <- list(data = structure(0, .Dim = c(1L, 1L)), x = structure(c(4.93594745197571e+169, 1.15977198370163e-152, 1.62039095517512e-231, 6.01347001699907e-154, 6.01347001699907e-154, 6.01347001699907e-154, 6.01347001699907e-154, 6.01347001699907e-154, 6.01334978519473e-154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0... | /distr6/inst/testfiles/C_EmpiricalMVPdf/libFuzzer_C_EmpiricalMVPdf/C_EmpiricalMVPdf_valgrind_files/1610035864-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 524 | r | testlist <- list(data = structure(0, .Dim = c(1L, 1L)), x = structure(c(4.93594745197571e+169, 1.15977198370163e-152, 1.62039095517512e-231, 6.01347001699907e-154, 6.01347001699907e-154, 6.01347001699907e-154, 6.01347001699907e-154, 6.01347001699907e-154, 6.01334978519473e-154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0... |
# get mean and sd
#
# param x number, dataframe or matrix
# param group group variable for dataframe or matrix
# param wide wide a logical word. The formation of result, while TRUE as wide form, FLASE as long form.
# param round round
#
# importFrom set %not%
# return string
#
# examples
# #number vector
# ... | /R/mean_sd.R | no_license | cran/fastStat | R | false | false | 3,382 | r | # get mean and sd
#
# param x number, dataframe or matrix
# param group group variable for dataframe or matrix
# param wide wide a logical word. The formation of result, while TRUE as wide form, FLASE as long form.
# param round round
#
# importFrom set %not%
# return string
#
# examples
# #number vector
# ... |
#' Create a new environment
#'
#' @description
#'
#' These functions create new environments.
#'
#' * `env()` creates a child of the current environment by default
#' and takes a variable number of named objects to populate it.
#'
#' * `new_environment()` creates a child of the empty environment by
#' default and t... | /R/env.R | no_license | makarevichy/rlang | R | false | false | 22,780 | r | #' Create a new environment
#'
#' @description
#'
#' These functions create new environments.
#'
#' * `env()` creates a child of the current environment by default
#' and takes a variable number of named objects to populate it.
#'
#' * `new_environment()` creates a child of the empty environment by
#' default and t... |
# # Logisztikus regresszió
# ## Absztrakt
# Ebben a gyakorlatban megtanuljuk, hogyan készítsünk előrejelző modelleket binomiális kimeneti változókra. Elsősorban a logisztikus regresszió használatát fogjuk tárgyalni.
# ## Loading packages
library(tidyverse) # for dplyr and ggplot2
library(pscl) # f... | /seminar_10/S10_Logisztikus regresszio.R | permissive | kekecsz/PSZB17-210-Data-analysis-seminar | R | false | false | 39,621 | r |
# # Logisztikus regresszió
# ## Absztrakt
# Ebben a gyakorlatban megtanuljuk, hogyan készítsünk előrejelző modelleket binomiális kimeneti változókra. Elsősorban a logisztikus regresszió használatát fogjuk tárgyalni.
# ## Loading packages
library(tidyverse) # for dplyr and ggplot2
library(pscl) # f... |
# R package UPMASK file R/create_randomKde2d.R
# Copyright (C) 2014 Alberto Krone-Martins
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License version 3 as published by
#the Free Software Foundation.
#This program is distributed in the hope tha... | /R/create_randomKde2d.R | no_license | cran/UPMASK | R | false | false | 3,805 | r | # R package UPMASK file R/create_randomKde2d.R
# Copyright (C) 2014 Alberto Krone-Martins
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License version 3 as published by
#the Free Software Foundation.
#This program is distributed in the hope tha... |
#' Map elections data
#'
#' @param data An \code{sf} object with elections data returned by
#' \code{\link{join_to_spatial}}.
#' @param congress The number of the Congress. If \code{NULL}, it will be
#' guessed from the data.
#' @param projection If not provided, then the best state plane projection will
#' be gu... | /R/mapping.R | no_license | mapping-elections/mappingelections | R | false | false | 16,826 | r | #' Map elections data
#'
#' @param data An \code{sf} object with elections data returned by
#' \code{\link{join_to_spatial}}.
#' @param congress The number of the Congress. If \code{NULL}, it will be
#' guessed from the data.
#' @param projection If not provided, then the best state plane projection will
#' be gu... |
#!/home/a/a_toen03/anaconda3/bin/Rscript
## Basic wrapper script to run chromVAR on two-condition bulk ATAC-seq data, e.g. wildtype vs. knockout condition.
## In line 58 one specifies the peak files and on line 61 one specified the BAM files to be used for count matrix creation.
##
###################################... | /ATAC-seq/chromVAR.R | no_license | mics-jusuE404/Code_Cellar | R | false | false | 5,624 | r | #!/home/a/a_toen03/anaconda3/bin/Rscript
## Basic wrapper script to run chromVAR on two-condition bulk ATAC-seq data, e.g. wildtype vs. knockout condition.
## In line 58 one specifies the peak files and on line 61 one specified the BAM files to be used for count matrix creation.
##
###################################... |
require(randomForest)
require(caret)
library("missForest")
voegel4 <- as.data.frame(voegel4)
x <-voegel4[1:26,1:10]
x <- missForest(x)
x <- x$ximp
y <- as.numeric(voegel4[1:26,19])
rf <- train(x, y,
method = "rf",
trControl = trainControl(method = "oob"),
importance = TRUE,
... | /R scripts/machine_learning.R | no_license | SteffenMoritz/dashboard-zukunft | R | false | false | 843 | r | require(randomForest)
require(caret)
library("missForest")
voegel4 <- as.data.frame(voegel4)
x <-voegel4[1:26,1:10]
x <- missForest(x)
x <- x$ximp
y <- as.numeric(voegel4[1:26,19])
rf <- train(x, y,
method = "rf",
trControl = trainControl(method = "oob"),
importance = TRUE,
... |
/teste_association_rules.R | no_license | barrosm/a2i2 | R | false | false | 10,760 | r | ||
# Extended Data ####
library(tidyverse); library(raster); library(parallel); library(sf); library(Matrix); library(magrittr); library(SpRanger); library(cowplot)
library(fs); library(tidyverse); library(Matrix); library(parallel); library(mgcv); library(SpRanger); library(raster)
library(sf); library(fasterize);libra... | /Iceberg Code/8d_Overall Extended Data Figures.R | no_license | viralemergence/iceberg | R | false | false | 32,444 | r |
# Extended Data ####
library(tidyverse); library(raster); library(parallel); library(sf); library(Matrix); library(magrittr); library(SpRanger); library(cowplot)
library(fs); library(tidyverse); library(Matrix); library(parallel); library(mgcv); library(SpRanger); library(raster)
library(sf); library(fasterize);libra... |
# Now we are going to download the data file and unzip it
if(!file.exists("summarySCC_PM25.rds")){
Url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
download.file(Url, destfile = "Pollution.zip")
unzip("Pollution.zip", exdir = "./")
}
################################... | /plot2.R | no_license | RezaKatebi/Exploratory_Data_Analysis_Final_Project- | R | false | false | 1,376 | r | # Now we are going to download the data file and unzip it
if(!file.exists("summarySCC_PM25.rds")){
Url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
download.file(Url, destfile = "Pollution.zip")
unzip("Pollution.zip", exdir = "./")
}
################################... |
library(fpp) #fpp package must be installed first
# Plot the time series. Can you identify seasonal fluctuations and/or a trend?
hsales2 <- ts(hsales,start=c(1973,1),frequency=12)
plot(hsales2)
#
# Use a classical decomposition to calculate the trend-cycle and seasonal indices.
## Do the results support the graphica... | /hsales code.R | no_license | TracieScott123/hsales | R | false | false | 1,146 | r | library(fpp) #fpp package must be installed first
# Plot the time series. Can you identify seasonal fluctuations and/or a trend?
hsales2 <- ts(hsales,start=c(1973,1),frequency=12)
plot(hsales2)
#
# Use a classical decomposition to calculate the trend-cycle and seasonal indices.
## Do the results support the graphica... |
####################### WEF Gender gap data scraping
# From Reg:
# I did some snooping around the WEF GGGR 2018 site and saw their Data Explorer page. At the backend, it calls a JSON object with all the
# country-level pillar and indicator data there (plus indicator descriptions!), so I think you can simply pull the J... | /genderGap_dataScraping.R | no_license | asRodelgo/TCdata360_playground | R | false | false | 1,319 | r | ####################### WEF Gender gap data scraping
# From Reg:
# I did some snooping around the WEF GGGR 2018 site and saw their Data Explorer page. At the backend, it calls a JSON object with all the
# country-level pillar and indicator data there (plus indicator descriptions!), so I think you can simply pull the J... |
library(xRing)
### Name: toxRingList
### Title: Create a "xRingList" Object
### Aliases: toxRingList
### ** Examples
data(PaPiRaw)
data(PaPiSpan)
PaPi <- toxRingList(PaPiRaw, PaPiSpan)
class(PaPi)
| /data/genthat_extracted_code/xRing/examples/toxRingList.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 210 | r | library(xRing)
### Name: toxRingList
### Title: Create a "xRingList" Object
### Aliases: toxRingList
### ** Examples
data(PaPiRaw)
data(PaPiSpan)
PaPi <- toxRingList(PaPiRaw, PaPiSpan)
class(PaPi)
|
library(provenance)
### Name: plot.KDE
### Title: Plot a kernel density estimate
### Aliases: plot.KDE
### ** Examples
data(Namib)
samp <- Namib$DZ$x[['N1']]
dens <- KDE(samp,from=0,to=3000)
plot(dens)
| /data/genthat_extracted_code/provenance/examples/plot.KDE.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 209 | r | library(provenance)
### Name: plot.KDE
### Title: Plot a kernel density estimate
### Aliases: plot.KDE
### ** Examples
data(Namib)
samp <- Namib$DZ$x[['N1']]
dens <- KDE(samp,from=0,to=3000)
plot(dens)
|
col_check2 <- function(geom.colors, collen) {
# --------------------------------------------
# check color argument
# --------------------------------------------
# check for corrct color argument
if (!is.null(geom.colors)) {
# check for color brewer palette
if (is.brewer.pal(geom.colors[1])) {... | /R/color_utils.R | no_license | cran/sjPlot | R | false | false | 2,179 | r | col_check2 <- function(geom.colors, collen) {
# --------------------------------------------
# check color argument
# --------------------------------------------
# check for corrct color argument
if (!is.null(geom.colors)) {
# check for color brewer palette
if (is.brewer.pal(geom.colors[1])) {... |
## $Id: plotBaseline.R 188 2011-08-11 07:50:28Z kristl $
### Plot function for estimated baseline (result of call to baseline).
###
### The workhorse plot functions
###
## (The y and ... arguments are needed to register this as a plot method)
## FIXME: How can we avoid having y as the second argument? Or can we use... | /R/plotBaseline.R | no_license | cran/baseline | R | false | false | 8,435 | r | ## $Id: plotBaseline.R 188 2011-08-11 07:50:28Z kristl $
### Plot function for estimated baseline (result of call to baseline).
###
### The workhorse plot functions
###
## (The y and ... arguments are needed to register this as a plot method)
## FIXME: How can we avoid having y as the second argument? Or can we use... |
cormax.exch <-
function(n, alpha){
n.max<- n
cor.max<- diag(1,n.max)
cor.max[lower.tri(cor.max)]<- rep(alpha,n.max*(n.max-1)/2)
cor.max[upper.tri(cor.max)]<- rep(alpha,n.max*(n.max-1)/2)
return(cor.max)
}
| /DataGeneration/cormax.exch.R | permissive | jenniferthompson1/SW-CRT-GEE | R | false | false | 215 | r | cormax.exch <-
function(n, alpha){
n.max<- n
cor.max<- diag(1,n.max)
cor.max[lower.tri(cor.max)]<- rep(alpha,n.max*(n.max-1)/2)
cor.max[upper.tri(cor.max)]<- rep(alpha,n.max*(n.max-1)/2)
return(cor.max)
}
|
#Load Data from UC Irvine Machine Learning Repository
# Individual Household electric power consumption data set
#select data for 2007-02-01 to 2007-02-02
#plot Global Active Power over Date&Time
#NOTE: sqldf package must be installed (run install.packages("sqldf")
#load data for 2007-02-01 to 2007-02-02
library(s... | /plot2.R | no_license | Edi-R/ExData_Plotting1 | R | false | false | 676 | r | #Load Data from UC Irvine Machine Learning Repository
# Individual Household electric power consumption data set
#select data for 2007-02-01 to 2007-02-02
#plot Global Active Power over Date&Time
#NOTE: sqldf package must be installed (run install.packages("sqldf")
#load data for 2007-02-01 to 2007-02-02
library(s... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(meteor:::ET0_PriestleyTaylor,testlist)
str(result) | /meteor/inst/testfiles/ET0_PriestleyTaylor/libFuzzer_ET0_PriestleyTaylor/ET0_PriestleyTaylor_valgrind_files/1612737227-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 281 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(meteor:::ET0_PriestleyTaylor,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sym_regression.R
\name{sym.predict.symbolic_rf_cm}
\alias{sym.predict.symbolic_rf_cm}
\title{Predict rf_cm model}
\usage{
\method{sym.predict}{symbolic_rf_cm}(model, new.sym.data, ...)
}
\arguments{
\item{model}{model}
\item{new.sym.data}{ne... | /man/sym.predict.symbolic_rf_cm.Rd | no_license | cran/RSDA | R | false | true | 1,105 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sym_regression.R
\name{sym.predict.symbolic_rf_cm}
\alias{sym.predict.symbolic_rf_cm}
\title{Predict rf_cm model}
\usage{
\method{sym.predict}{symbolic_rf_cm}(model, new.sym.data, ...)
}
\arguments{
\item{model}{model}
\item{new.sym.data}{ne... |
file <- "./household_power_consumption.txt"
data <- read.table(file, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007"),]
datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S")
Globalactivepower <- as.numeric(subSetDat... | /plot3.R | no_license | prefontaine1972/Exploratory-Graphing | R | false | false | 856 | r | file <- "./household_power_consumption.txt"
data <- read.table(file, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007"),]
datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S")
Globalactivepower <- as.numeric(subSetDat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/zresults-methods.R, R/zvariant-methods.R
\docType{methods}
\name{outdir}
\alias{outdir}
\alias{outdir,Zresults-method}
\alias{outdir,Zvariant-method}
\title{Get path to output directory.}
\usage{
outdir(x)
\S4method{outdir}{... | /man/outdir-methods.Rd | no_license | hmorzaria/zonator | R | false | true | 844 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/zresults-methods.R, R/zvariant-methods.R
\docType{methods}
\name{outdir}
\alias{outdir}
\alias{outdir,Zresults-method}
\alias{outdir,Zvariant-method}
\title{Get path to output directory.}
\usage{
outdir(x)
\S4method{outdir}{... |
# Set common palette for all plots.
library(RColorBrewer)
SET2PALETTE <- c("gray30", # dark grey
"darkorange1", # orange
"mediumseagreen", # light bluish-green
"plum3", # light purple
"palevioletred1", # light pink
"olivedrab3", # light yellow-gree... | /analysis/PlotThemes.R | no_license | ksxue/compare-flu-within-hosts-public | R | false | false | 1,535 | r | # Set common palette for all plots.
library(RColorBrewer)
SET2PALETTE <- c("gray30", # dark grey
"darkorange1", # orange
"mediumseagreen", # light bluish-green
"plum3", # light purple
"palevioletred1", # light pink
"olivedrab3", # light yellow-gree... |
## Name: dm09_clean_household_v6.R
## Description: Clean variables related to household members.
## Input file: combined_9_v6.qs
## Functions:
## Output file: combined_10_v6.qs, households_v6
# Packages ----------------------------------------------------------------
library(data.table)
library(lubridate, warn.confl... | /r/version_6/dm10_clean_household_v6.R | permissive | LloydChapman/comix_data_clean | R | false | false | 10,027 | r | ## Name: dm09_clean_household_v6.R
## Description: Clean variables related to household members.
## Input file: combined_9_v6.qs
## Functions:
## Output file: combined_10_v6.qs, households_v6
# Packages ----------------------------------------------------------------
library(data.table)
library(lubridate, warn.confl... |
# WHAT IS LARGE DATA ?
# memory?
memory.limit()
memory.limit(size=4000)
memory.size()
gc()
pr <- function(x){ print(object.size(x), units = "auto") }
x <- 0L # 32 bytes
pr(x)
class(x)
x <- 23.123 ; pr(x) # 32 bytes
class(x)
N <- 1e6
x <- rep(23L,N); pr(x)# 3.8 Mb
x <- rep(0.23,N); pr(x)# 7.6 Mb
x <- as.Date("... | /memory.r | no_license | miguelvb/LargeDataPresentation | R | false | false | 1,055 | r |
# WHAT IS LARGE DATA ?
# memory?
memory.limit()
memory.limit(size=4000)
memory.size()
gc()
pr <- function(x){ print(object.size(x), units = "auto") }
x <- 0L # 32 bytes
pr(x)
class(x)
x <- 23.123 ; pr(x) # 32 bytes
class(x)
N <- 1e6
x <- rep(23L,N); pr(x)# 3.8 Mb
x <- rep(0.23,N); pr(x)# 7.6 Mb
x <- as.Date("... |
library(plyr)
rm(list=ls())
setwd("~/Dropbox/berkeley/Dissertation/Data and Analyais/Git Repos/uprs/testing/testing-3")
rochelle <- read.csv("sample-binary.csv")
erin <- read.csv("erin-binary.csv")
sort(names(rochelle))
sort(names(erin))
merge <- merge(rochelle, erin,by=c("id"),all=TRUE)
sort(names(merge))
merge <- ... | /v.1/Testing/testing-3/test.R | no_license | j1wonkim/uprs | R | false | false | 725 | r | library(plyr)
rm(list=ls())
setwd("~/Dropbox/berkeley/Dissertation/Data and Analyais/Git Repos/uprs/testing/testing-3")
rochelle <- read.csv("sample-binary.csv")
erin <- read.csv("erin-binary.csv")
sort(names(rochelle))
sort(names(erin))
merge <- merge(rochelle, erin,by=c("id"),all=TRUE)
sort(names(merge))
merge <- ... |
# Li-Pin Juan, 03032016 GOOD
# We use edited (and imputed) and summary version of data.
# there are three folders to access the raw dataset:
# For 1983-1986, editd_data;
# For 1989-2013, full_data and summary_data.
#
# Trick 1 -- search for a particular variable
# x=grepl("age",names(data))
# str(ds[,x])
rm(list =... | /SCF_cleaning.R | no_license | libinruan/R_Visualizing_US_Wealth_Distribution | R | false | false | 17,641 | r | # Li-Pin Juan, 03032016 GOOD
# We use edited (and imputed) and summary version of data.
# there are three folders to access the raw dataset:
# For 1983-1986, editd_data;
# For 1989-2013, full_data and summary_data.
#
# Trick 1 -- search for a particular variable
# x=grepl("age",names(data))
# str(ds[,x])
rm(list =... |
# Import only!!!
# rm(list=ls())
if ("rstudioapi" %in% rownames(installed.packages())){
project.wd <-file.path(dirname(rstudioapi::getActiveDocumentContext()$path),"nrc.documents")
} else { # not running from Rstudio, use a common path
if (.Platform$OS.type == "windows") {
project.wd <- file.path(Sys.getenv("... | /01-PracticumNrcGetAllDocuments.R | permissive | seakintruth/NRC_ADAMS_Metadata | R | false | false | 1,394 | r | # Import only!!!
# rm(list=ls())
if ("rstudioapi" %in% rownames(installed.packages())){
project.wd <-file.path(dirname(rstudioapi::getActiveDocumentContext()$path),"nrc.documents")
} else { # not running from Rstudio, use a common path
if (.Platform$OS.type == "windows") {
project.wd <- file.path(Sys.getenv("... |
/Segunda_parte_del_proyecto/SegundaParte1.R | no_license | BriguitteMaqueradelaCruz/Proyecto-CM274A-Modelos-de-grafos-aleatorios-Ciclos-Hamiltonianos | R | false | false | 1,249 | r | ||
# File extracts the data from panel_data dir, preprocesses it and transforms it into GeoLift input format.
######################
## Install packages ##
######################
# install.packages("devtools")
# library(devtools)
# install_github("ArturoEsquerra/GeoLift", force=TRUE)
# install.packages("dplyr")
# install... | /extract_transform.R | permissive | albertsalgueda/GeoLift_execution | R | false | false | 2,371 | r | # File extracts the data from panel_data dir, preprocesses it and transforms it into GeoLift input format.
######################
## Install packages ##
######################
# install.packages("devtools")
# library(devtools)
# install_github("ArturoEsquerra/GeoLift", force=TRUE)
# install.packages("dplyr")
# install... |
# Read stations( id name latitude longtitude) from citybik API
# save to stations.csv
setwd(paste(getwd(),"/Stations/",sep =""))
require(jsonlite)
dat <- fromJSON("http://api.citybik.es/v2/networks/capital-bikeshare?fields=stations")
id = as.numeric(substr(dat$network$stations$name,1,5))
name = substr(dat$network$stati... | /Stations/Week6/api_read_save.R | no_license | yunhaolucky/bikeshare | R | false | false | 585 | r | # Read stations( id name latitude longtitude) from citybik API
# save to stations.csv
setwd(paste(getwd(),"/Stations/",sep =""))
require(jsonlite)
dat <- fromJSON("http://api.citybik.es/v2/networks/capital-bikeshare?fields=stations")
id = as.numeric(substr(dat$network$stations$name,1,5))
name = substr(dat$network$stati... |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /mepstrends/hc_use/json/code/r/medEXP__health__education__.r | permissive | RandomCriticalAnalysis/MEPS-summary-tables | R | false | false | 2,499 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
\name{SBMLDocument-class}
\docType{class}
\alias{SBMLDocument-class}
\alias{coerce,SBMLDocument,graph-method}
\alias{coerce,SBMLDocument,SBML-method}
\alias{rsbml_check,SBMLDocument-method}
\alias{rsbml_check}
\alias{rsbml_dom,SBMLDocument-method}
\alias{rsbml_dom}
\alias{rsbml_graph,SBMLDocument-method}
\alias{rsbml_g... | /man/SBMLDocument-class.Rd | no_license | cran/rsbml | R | false | false | 1,667 | rd | \name{SBMLDocument-class}
\docType{class}
\alias{SBMLDocument-class}
\alias{coerce,SBMLDocument,graph-method}
\alias{coerce,SBMLDocument,SBML-method}
\alias{rsbml_check,SBMLDocument-method}
\alias{rsbml_check}
\alias{rsbml_dom,SBMLDocument-method}
\alias{rsbml_dom}
\alias{rsbml_graph,SBMLDocument-method}
\alias{rsbml_g... |
# # Install logitr package from github
# devtools::install_github('jhelvy/logitr')
# Load logitr package
library('logitr')
# ============================================================================
# Estimate homogeneous MNL models with interactions
# Continuous variable interactions
model_price_feat <- logitr(
... | /inst/example/interactions.R | permissive | crforsythe/logitr | R | false | false | 1,606 | r | # # Install logitr package from github
# devtools::install_github('jhelvy/logitr')
# Load logitr package
library('logitr')
# ============================================================================
# Estimate homogeneous MNL models with interactions
# Continuous variable interactions
model_price_feat <- logitr(
... |
# 0. Loading necessary library
library(dplyr)
# 1. Merge the training and the test sets to create one data set.
## trainings set
df_train <- read.table("UCI HAR Dataset\\train\\X_train.txt", sep = "", header = FALSE)
df_subject_train <- read.table("UCI HAR Dataset\\train\\subject_train.txt", sep = "", header = FAL... | /run_analysis.R | no_license | regloh/datacleaning | R | false | false | 4,672 | r | # 0. Loading necessary library
library(dplyr)
# 1. Merge the training and the test sets to create one data set.
## trainings set
df_train <- read.table("UCI HAR Dataset\\train\\X_train.txt", sep = "", header = FALSE)
df_subject_train <- read.table("UCI HAR Dataset\\train\\subject_train.txt", sep = "", header = FAL... |
context("load")
test_that("load fails well", {
skip_on_cran()
skip_on_travis()
skip_on_appveyor()
# resolve issue #6
tdir <- tempdir()
tfile <- file.path(tdir, basename(tempfile(fileext = ".rds")))
file.create(tfile)
expect_error(tryCatch(res <- readRDS(tfile), error = function(e)
stop("Er... | /tests/testthat/test-load.R | no_license | srravula1/nlaR | R | false | false | 582 | r | context("load")
test_that("load fails well", {
skip_on_cran()
skip_on_travis()
skip_on_appveyor()
# resolve issue #6
tdir <- tempdir()
tfile <- file.path(tdir, basename(tempfile(fileext = ".rds")))
file.create(tfile)
expect_error(tryCatch(res <- readRDS(tfile), error = function(e)
stop("Er... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/allclass.R
\docType{class}
\name{testDAUresults-class}
\alias{testDAUresults-class}
\alias{testDAUresults}
\title{Class \code{testDAUresults}.}
\description{
An S4 class to represent a DAU statistical test result from dagLogo analysis.
}
\sec... | /man/testDAUresults-class.Rd | no_license | seaYali/dagLogo | R | false | true | 1,498 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/allclass.R
\docType{class}
\name{testDAUresults-class}
\alias{testDAUresults-class}
\alias{testDAUresults}
\title{Class \code{testDAUresults}.}
\description{
An S4 class to represent a DAU statistical test result from dagLogo analysis.
}
\sec... |
#-------------------------------------------------------------------------
# Simulation Exercise 3 by DVM Bishop
# 20th March 2017; updated 4th March 2018 with thanks to Pieter Moors
# Simulating data for multiway ANOVA
#-------------------------------------------------------------------------
setwd('/Users/dorothybi... | /Simulation_ex3_multiwayAnova.R | no_license | mjaquiery/deevybee_repo | R | false | false | 7,198 | r | #-------------------------------------------------------------------------
# Simulation Exercise 3 by DVM Bishop
# 20th March 2017; updated 4th March 2018 with thanks to Pieter Moors
# Simulating data for multiway ANOVA
#-------------------------------------------------------------------------
setwd('/Users/dorothybi... |
#' Data Import
#'
#'@description
#' Reads the files in a table format and create a list storing all the information.
#'
#'
#' @param file1 the name of the excel file which the data are to be read from. The growth data associated with an experiment must be reported using a pair of columns. The first column must contains... | /R/DataImport.R | permissive | JessicaGiordano/Prova | R | false | false | 3,111 | r | #' Data Import
#'
#'@description
#' Reads the files in a table format and create a list storing all the information.
#'
#'
#' @param file1 the name of the excel file which the data are to be read from. The growth data associated with an experiment must be reported using a pair of columns. The first column must contains... |
#' Compute mx value of last age category (e.g., 100+) based on user specified life expectancy at age 0 for the base year
#'
#' @param g gender (str); "F" or "FR" or "FU" = female (general, rural, urban); "M" or "MR" or "MU" = male (general, rural, urban)
#' @param e0u life expectancy at age zero (numeric)
#' @return mx... | /multistate/R/f_mx_max.R | permissive | IMMM-SFA/statepop | R | false | false | 841 | r | #' Compute mx value of last age category (e.g., 100+) based on user specified life expectancy at age 0 for the base year
#'
#' @param g gender (str); "F" or "FR" or "FU" = female (general, rural, urban); "M" or "MR" or "MU" = male (general, rural, urban)
#' @param e0u life expectancy at age zero (numeric)
#' @return mx... |
context("GA Functions")
library(sp)
library(spatstat)
# library(maptools)
## Function to suppress print/cat outputs
quiet <- function(x) {
sink(tempfile())
on.exit(sink())
invisible(force(x))
}
test_that("Test Genetic Algorithm Function", {
## Data ##############
Polygon1 <- Polygon(rbind(... | /windfarmGA/tests/testthat/test_ga_func.R | no_license | akhikolla/InformationHouse | R | false | false | 18,465 | r | context("GA Functions")
library(sp)
library(spatstat)
# library(maptools)
## Function to suppress print/cat outputs
quiet <- function(x) {
sink(tempfile())
on.exit(sink())
invisible(force(x))
}
test_that("Test Genetic Algorithm Function", {
## Data ##############
Polygon1 <- Polygon(rbind(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.