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 |
|---|---|---|---|---|---|---|---|---|---|
#' This function is used to estimate scale parameter \eqn{\eta_f} from the model residues under specified assumption of distribution of error. So the input includes degree of freedom and model residues.
#'
#' @title Estimation of scale parameter \eqn{\eta_f} using tQMLE
#'
#' @param e The innovation caculated by estima... | /AdaptQMLE/R/YITAtQMLLE.R | permissive | abc1206/AdpQMLE | R | false | false | 1,041 | r | #' This function is used to estimate scale parameter \eqn{\eta_f} from the model residues under specified assumption of distribution of error. So the input includes degree of freedom and model residues.
#'
#' @title Estimation of scale parameter \eqn{\eta_f} using tQMLE
#'
#' @param e The innovation caculated by estima... |
library(Seurat)
#read dataset
seur <- readRDS("/gpfs/ysm/home/bl666/HCL/Pseudo_Bulk/CB_ImmuneCell_updated.rds")
#output file
PseudoBulk_CB <- data.frame()
mat <- seur@assays$RNA@counts
meta_df <- seur[["Celltype_used"]]
CB_stat <- as.data.frame(table(meta_df))
CB_stat[,2] = CB_stat[,2]/sum(CB_stat[,2])
set.seed(20... | /data/Pseudo_Bulk/PseudoBulk_CB.R | no_license | dengwx11/sc_immune | R | false | false | 857 | r | library(Seurat)
#read dataset
seur <- readRDS("/gpfs/ysm/home/bl666/HCL/Pseudo_Bulk/CB_ImmuneCell_updated.rds")
#output file
PseudoBulk_CB <- data.frame()
mat <- seur@assays$RNA@counts
meta_df <- seur[["Celltype_used"]]
CB_stat <- as.data.frame(table(meta_df))
CB_stat[,2] = CB_stat[,2]/sum(CB_stat[,2])
set.seed(20... |
#' Produces a time-distance \code{t-x} trajectory for the lead vehicle, \code{vehicle = 1}.
#'
#' @param lane, a matrix
#' @usage plotlane(lane)
# #' @examples
# #' plane(lane)
#' @export
plotlane <- function(lane) {
min. <- min(as.numeric(unlist(lane)), na.rm = TRUE)
max. <- max(as.numeric(unlist(lane)), na.... | /R/plotlane.R | permissive | PJOssenbruggen/Basic | R | false | false | 660 | r | #' Produces a time-distance \code{t-x} trajectory for the lead vehicle, \code{vehicle = 1}.
#'
#' @param lane, a matrix
#' @usage plotlane(lane)
# #' @examples
# #' plane(lane)
#' @export
plotlane <- function(lane) {
min. <- min(as.numeric(unlist(lane)), na.rm = TRUE)
max. <- max(as.numeric(unlist(lane)), na.... |
#' Rug plots in the margins
#'
#' A rug plot is a compact visualisation designed to supplement a 2d display
#' with the two 1d marginal distributions. Rug plots display individual
#' cases so are best used with smaller datasets.
#'
#' By default, the rug lines are drawn with a length that corresponds to 3%
#' of the to... | /R/geom-rug.r | permissive | Ebedthan/ggplot2 | R | false | false | 4,977 | r | #' Rug plots in the margins
#'
#' A rug plot is a compact visualisation designed to supplement a 2d display
#' with the two 1d marginal distributions. Rug plots display individual
#' cases so are best used with smaller datasets.
#'
#' By default, the rug lines are drawn with a length that corresponds to 3%
#' of the to... |
files <- list.files(path='counts_nonStranded', pattern="*.counts")
files_erato <- files[grepl('erato', files)]
files_melp <- files[grepl('melp', files)]
### erato
for(e in 1:length(files_erato)){
data <- read.table(paste('counts_nonStranded/', files_erato[e], sep=''), h=F)
if(e==1){
... | /8_RNA-seq_DE/Create_counts_tables.R | no_license | StevenVB12/Genomics_ATAC | R | false | false | 1,966 | r |
files <- list.files(path='counts_nonStranded', pattern="*.counts")
files_erato <- files[grepl('erato', files)]
files_melp <- files[grepl('melp', files)]
### erato
for(e in 1:length(files_erato)){
data <- read.table(paste('counts_nonStranded/', files_erato[e], sep=''), h=F)
if(e==1){
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariateFormula.r
\name{multivariateFormula}
\alias{multivariateFormula}
\title{Formula construction}
\usage{
multivariateFormula(Y, X = NULL, ..., A = NULL, additional = NULL, data = NULL)
}
\arguments{
\item{Y}{a formula or a vector of ... | /man/multivariateFormula.Rd | no_license | SCnext/SCGLR | R | false | true | 1,877 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/multivariateFormula.r
\name{multivariateFormula}
\alias{multivariateFormula}
\title{Formula construction}
\usage{
multivariateFormula(Y, X = NULL, ..., A = NULL, additional = NULL, data = NULL)
}
\arguments{
\item{Y}{a formula or a vector of ... |
###**************************** Titanic ***************************************************
rm(list = ls(all=TRUE))
##****************************** Libraries *****************************************
library(plyr)
library(Hmisc)
library(knitr)
library(sqldf)
library(caret)
library(DMwR)
library(glmnet)
libra... | /newTitanic.R | no_license | Pranith1785/Kaggle_Competition | R | false | false | 20,027 | r | ###**************************** Titanic ***************************************************
rm(list = ls(all=TRUE))
##****************************** Libraries *****************************************
library(plyr)
library(Hmisc)
library(knitr)
library(sqldf)
library(caret)
library(DMwR)
library(glmnet)
libra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot_string.R
\name{null_to_str}
\alias{null_to_str}
\title{null_to_str}
\usage{
null_to_str(str)
}
\value{
unk
}
\description{
}
\references{
}
\author{
K. Enevoldsen
}
| /man/null_to_str.Rd | no_license | HLasse/gglearn2 | R | false | true | 252 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot_string.R
\name{null_to_str}
\alias{null_to_str}
\title{null_to_str}
\usage{
null_to_str(str)
}
\value{
unk
}
\description{
}
\references{
}
\author{
K. Enevoldsen
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{autoplot.SimplePlotTable}
\alias{autoplot.SimplePlotTable}
\title{Plot a SimplePlotTable}
\usage{
\method{autoplot}{SimplePlotTable}(object, ...)
}
\arguments{
\item{object}{The SimplePlotTable to plot}
\item{...}{Required t... | /man/autoplot.SimplePlotTable.Rd | permissive | Schmytzi/simplePlotTable | R | false | true | 901 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{autoplot.SimplePlotTable}
\alias{autoplot.SimplePlotTable}
\title{Plot a SimplePlotTable}
\usage{
\method{autoplot}{SimplePlotTable}(object, ...)
}
\arguments{
\item{object}{The SimplePlotTable to plot}
\item{...}{Required t... |
add_style <- function(p) {
print_debug_info(p)
# Update style if for second y-axis
if (any(RIGHT == p$y_axis) | is_set(p$y_r_lab)) p$style <- c(if (p$turn) "x-top" else "y-right", p$style)
# Update style if we don't export the plot
if (!any_plot_export(p)) p$style <- c(INTERACTIVE, p$style) # Add interactiv... | /R/add-style.R | permissive | data-science-made-easy/james | R | false | false | 397 | r | add_style <- function(p) {
print_debug_info(p)
# Update style if for second y-axis
if (any(RIGHT == p$y_axis) | is_set(p$y_r_lab)) p$style <- c(if (p$turn) "x-top" else "y-right", p$style)
# Update style if we don't export the plot
if (!any_plot_export(p)) p$style <- c(INTERACTIVE, p$style) # Add interactiv... |
rm(list = ls())
# Set working directory
setwd('C:/Users/spspi/Dropbox/Documents/Outsourcing/NLSY 79 Data/OnJobsVariables')
new_data <- read.table('onjobsvariables.dat', sep=' ')
names(new_data) <- c(
'CASEID_1979',
'Q6-8E_1A.01.01_2004',
'Q6-8E_1A.01.02_2004',
'Q6-8E_1A.02.01_2004',
'Q6-8E_1A.02.02_2004',
... | /Old Code/onjobsvariables.R | no_license | spspitze/Outsourcing | R | false | false | 1,330 | r | rm(list = ls())
# Set working directory
setwd('C:/Users/spspi/Dropbox/Documents/Outsourcing/NLSY 79 Data/OnJobsVariables')
new_data <- read.table('onjobsvariables.dat', sep=' ')
names(new_data) <- c(
'CASEID_1979',
'Q6-8E_1A.01.01_2004',
'Q6-8E_1A.01.02_2004',
'Q6-8E_1A.02.01_2004',
'Q6-8E_1A.02.02_2004',
... |
## code to prepare `DATASET` dataset goes here
aes_zone <- aceecostats::aes_zone
aes_zone_ll <- aceecostats::aes_zone_ll
sea_ice <- raadtools::readice("2019-08-06")[[1]]
sea_temp <- raadtools::readsst(getZ(sea_ice), lon180 = FALSE)[[1]]
save(aes_zone, aes_zone_ll,
sea_ice, sea_temp,
file = "data-raw/polar-ma... | /data-raw/DATASET.R | no_license | mdsumner/polar-mapping-oghub | R | false | false | 347 | r | ## code to prepare `DATASET` dataset goes here
aes_zone <- aceecostats::aes_zone
aes_zone_ll <- aceecostats::aes_zone_ll
sea_ice <- raadtools::readice("2019-08-06")[[1]]
sea_temp <- raadtools::readsst(getZ(sea_ice), lon180 = FALSE)[[1]]
save(aes_zone, aes_zone_ll,
sea_ice, sea_temp,
file = "data-raw/polar-ma... |
library(CharFun)
### Name: cfS_Gaussian
### Title: Characteristic function of Normal distribution N(0,1)
### Aliases: cfS_Gaussian
### ** Examples
## EXAMPLE1 (CF of the Gaussian distribution N(0,1))
t <- seq(-5, 5, length.out = 501)
plotGraf(function(t)
cfS_Gaussian(t), t, title = "CF of the Gaussian distributio... | /data/genthat_extracted_code/CharFun/examples/cfS_Gaussian.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 552 | r | library(CharFun)
### Name: cfS_Gaussian
### Title: Characteristic function of Normal distribution N(0,1)
### Aliases: cfS_Gaussian
### ** Examples
## EXAMPLE1 (CF of the Gaussian distribution N(0,1))
t <- seq(-5, 5, length.out = 501)
plotGraf(function(t)
cfS_Gaussian(t), t, title = "CF of the Gaussian distributio... |
#' Print_pokemon
#' @description Reconnait et présente un pokemon
#' @param x un pokemon
#' @examples
#' \dontrun{
#' print.pokemon("Dracaufeu")
#' }
#' @export
print_pokemon <- function(x) {
cat("This is a pokemon and his name is", x, "./n")
}
| /R/pokemon.R | no_license | gustavelarrouturou/devoiroctobre | R | false | false | 249 | r | #' Print_pokemon
#' @description Reconnait et présente un pokemon
#' @param x un pokemon
#' @examples
#' \dontrun{
#' print.pokemon("Dracaufeu")
#' }
#' @export
print_pokemon <- function(x) {
cat("This is a pokemon and his name is", x, "./n")
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{tsc_data}
\alias{tsc_data}
\title{TSC data, parsed, first ten records each}
\format{
An object of class \code{list} of length 14.
}
\usage{
tsc_data
}
\description{
TSC data, parsed, first ten records each
}
\seeal... | /man/tsc_data.Rd | no_license | dbca-wa/wastdr | R | false | true | 709 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{tsc_data}
\alias{tsc_data}
\title{TSC data, parsed, first ten records each}
\format{
An object of class \code{list} of length 14.
}
\usage{
tsc_data
}
\description{
TSC data, parsed, first ten records each
}
\seeal... |
try(setwd("~/Documents/Conferences/EmberWorkshop/Live/Github/processing/"))
# Load data
srs = read.csv("../data/SRS.csv",stringsAsFactors = F)
# Set random seed so that the script is deterministic
set.seed(2389)
# Sample 20 societies
socSample = srs[sample(1:nrow(srs),20),]
# Coder names
coders = c("HM","JH","KT","E... | /processing/sampleSocieties.R | no_license | seannyD/SummerInstitute_Test | R | false | false | 622 | r | try(setwd("~/Documents/Conferences/EmberWorkshop/Live/Github/processing/"))
# Load data
srs = read.csv("../data/SRS.csv",stringsAsFactors = F)
# Set random seed so that the script is deterministic
set.seed(2389)
# Sample 20 societies
socSample = srs[sample(1:nrow(srs),20),]
# Coder names
coders = c("HM","JH","KT","E... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trophic_ecology.R
\name{predators}
\alias{predators}
\title{predators}
\usage{
predators(species_list, fields = NULL, limit = 200,
server = getOption("FISHBASE_API", FISHBASE_API), ...)
}
\arguments{
\item{species_list}{A vector of scientif... | /man/predators.Rd | no_license | Philipp-Neubauer/rfishbase | R | false | true | 1,178 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trophic_ecology.R
\name{predators}
\alias{predators}
\title{predators}
\usage{
predators(species_list, fields = NULL, limit = 200,
server = getOption("FISHBASE_API", FISHBASE_API), ...)
}
\arguments{
\item{species_list}{A vector of scientif... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fs_upload.R
\name{fs_upload}
\alias{fs_upload}
\title{Upload file to an article}
\usage{
fs_upload(article_id, file, session = fs_get_auth())
}
\arguments{
\item{article_id}{an article id number or a character string (or list) of numbers}
\i... | /man/fs_upload.Rd | permissive | jsta/rfigshare | R | false | true | 1,320 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fs_upload.R
\name{fs_upload}
\alias{fs_upload}
\title{Upload file to an article}
\usage{
fs_upload(article_id, file, session = fs_get_auth())
}
\arguments{
\item{article_id}{an article id number or a character string (or list) of numbers}
\i... |
library(rsconnect)
rsconnect::setAccountInfo(
name = Sys.getenv("account_name"),
token = Sys.getenv("shinyapps_token"),
secret = Sys.getenv("shinyapps_secret")
)
deployApp()
| /deploy.R | no_license | belzaina/rshiny_continous_dep_demo | R | false | false | 190 | r | library(rsconnect)
rsconnect::setAccountInfo(
name = Sys.getenv("account_name"),
token = Sys.getenv("shinyapps_token"),
secret = Sys.getenv("shinyapps_secret")
)
deployApp()
|
## Function to perform caching the inverse of a matrix
# The first function, makeCacheMatrix creates a
# special "vector", which is really a list containing a function to
#1. set the value of the matrix. Assumes that matrix is invertible.
# No error handling for a non-invertible matrix
#2. get the values in the... | /cachematrix.R | no_license | vhegde85/ProgrammingAssignment2 | R | false | false | 1,228 | r | ## Function to perform caching the inverse of a matrix
# The first function, makeCacheMatrix creates a
# special "vector", which is really a list containing a function to
#1. set the value of the matrix. Assumes that matrix is invertible.
# No error handling for a non-invertible matrix
#2. get the values in the... |
#=======================================================
#
# Economics REU: Applied Micro and R Prerequisites (2015)
# Author: John Eric Humphries
# Date: 06-23-2015
#
#
#========================================================
#=============
# Installing packages (checks if they are installed first), then loading pa... | /Lecture2/econREU_R_prereq.R | no_license | AlexandreSollaci/practical_computing | R | false | false | 1,111 | r | #=======================================================
#
# Economics REU: Applied Micro and R Prerequisites (2015)
# Author: John Eric Humphries
# Date: 06-23-2015
#
#
#========================================================
#=============
# Installing packages (checks if they are installed first), then loading pa... |
install.packages("mixOmics") #install mixOmics package
require(mixOmics) #import mixOmics package
data('breast.TCGA') #import TCGAdata
data = list(mRNA = breast.TCGA$data.train$mrna,
miRNA = breast.TCGA$data.train$mirna,
proteomics = breast.TCGA$data.train$protein)
install.packages("rTensor") ... | /tensor.R | no_license | tagtag/TD-multiOmics | R | false | false | 2,181 | r | install.packages("mixOmics") #install mixOmics package
require(mixOmics) #import mixOmics package
data('breast.TCGA') #import TCGAdata
data = list(mRNA = breast.TCGA$data.train$mrna,
miRNA = breast.TCGA$data.train$mirna,
proteomics = breast.TCGA$data.train$protein)
install.packages("rTensor") ... |
# Source ------------------------------------------------------------------
source("functions.R")
source("Microstructure_noise_estimators/Heston_Sim.R")
# Helpfuns ----------------------------------------------------------------
BPV <- function(X, alpha = 0.05, delta){
diff_X <- na.omit(diff(X))
n <- length(di... | /Chapter3/BPV_adj.R | no_license | MarksSmirnovs/Quadratic-Variation-Disentanglement-A-High-Frequency-Data-Approach | R | false | false | 3,412 | r | # Source ------------------------------------------------------------------
source("functions.R")
source("Microstructure_noise_estimators/Heston_Sim.R")
# Helpfuns ----------------------------------------------------------------
BPV <- function(X, alpha = 0.05, delta){
diff_X <- na.omit(diff(X))
n <- length(di... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SCGroupContrast_modulefunctions.r
\name{FitLmerContrast}
\alias{FitLmerContrast}
\title{FitLmerContrast - for data with pre post treatment and 2 response groups; within each cell type contrast difference
in fold change between groups, baseli... | /man/FitLmerContrast.Rd | permissive | MattPM/scglmmr | R | false | true | 2,884 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SCGroupContrast_modulefunctions.r
\name{FitLmerContrast}
\alias{FitLmerContrast}
\title{FitLmerContrast - for data with pre post treatment and 2 response groups; within each cell type contrast difference
in fold change between groups, baseli... |
## Differential Expression analysis for Subsample 2
###### Awk codes for combining files together for technical replicates (Possible for cooler solutions)
## join -j 1 SN_10_LPS_CGATGT_L002_count.txt SN_10_LPS_CGATGT_L001_count.txt| join -j 1 SN_10_LPS_CGATGT_L003_count.txt - | join -j 1 SN_10_LPS_CGATGT_L004_count... | /src/differential_expression/Differential_Expression_TR_BR_Subsample_2.R | no_license | aerugo/BB2490-RNASeq-Project | R | false | false | 18,191 | r | ## Differential Expression analysis for Subsample 2
###### Awk codes for combining files together for technical replicates (Possible for cooler solutions)
## join -j 1 SN_10_LPS_CGATGT_L002_count.txt SN_10_LPS_CGATGT_L001_count.txt| join -j 1 SN_10_LPS_CGATGT_L003_count.txt - | join -j 1 SN_10_LPS_CGATGT_L004_count... |
### This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
# initializing null matrix
i <- NULL
#Defining set matrix function
set <- function(y) {
x <<- y
i <<- NULL
}
#Defining get matrix function... | /cachematrix.R | no_license | nilamshete3001/ProgrammingAssignment2 | R | false | false | 1,065 | r | ### This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
# initializing null matrix
i <- NULL
#Defining set matrix function
set <- function(y) {
x <<- y
i <<- NULL
}
#Defining get matrix function... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deprecated.R
\name{proprPairs}
\alias{proprPairs}
\title{Recasts proportionality matrix as a table of feature pairs.}
\usage{
proprPairs(prop)
}
\arguments{
\item{prop}{A data.frame or matrix. A proportionality matrix.}
}
\value{
A data.frame... | /man/proprPairs.Rd | no_license | samleenz/propr | R | false | true | 400 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deprecated.R
\name{proprPairs}
\alias{proprPairs}
\title{Recasts proportionality matrix as a table of feature pairs.}
\usage{
proprPairs(prop)
}
\arguments{
\item{prop}{A data.frame or matrix. A proportionality matrix.}
}
\value{
A data.frame... |
#############################################################
#
# plotRateThroughTime <- function(...)
#
# ephy = object of class 'bammdata' or 'bamm-ratematrix'
# if bamm-ratematrix, start.time, end.time, node, nslices, nodetype are not used.
# useMedian = boolean, will plot median if TRUE, mean if FALSE.
# interval... | /BAMMtools/R/plotRateThroughTime.R | no_license | macroevolution/bammtools | R | false | false | 14,021 | r |
#############################################################
#
# plotRateThroughTime <- function(...)
#
# ephy = object of class 'bammdata' or 'bamm-ratematrix'
# if bamm-ratematrix, start.time, end.time, node, nslices, nodetype are not used.
# useMedian = boolean, will plot median if TRUE, mean if FALSE.
# interval... |
mBayesBinom=function(dat, ...){
if(!require(manipulate))
stop("Must use a manipulate-compatible version of R, e.g. RStudio")
if (!require("mosaic")) stop("Must install mosaic package.")
nthetapts=1000 #Resolution in theta for thetapts
#Log Likelihood function:
LL = function(theta,ns,Ntrials){
n... | /R/mBayesBinom.R | no_license | cran/mosaicManip | R | false | false | 3,884 | r | mBayesBinom=function(dat, ...){
if(!require(manipulate))
stop("Must use a manipulate-compatible version of R, e.g. RStudio")
if (!require("mosaic")) stop("Must install mosaic package.")
nthetapts=1000 #Resolution in theta for thetapts
#Log Likelihood function:
LL = function(theta,ns,Ntrials){
n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Recordr.R
\name{changeHome}
\alias{changeHome}
\title{Change the recordr home directory}
\usage{
changeHome(recordr, currentDir, newDir = as.character(NA), copy, ...)
}
\arguments{
\item{recordr}{A recordr object}
\item{currentDir}{A charact... | /man/changeHome.Rd | permissive | NCEAS/recordr | R | false | true | 678 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Recordr.R
\name{changeHome}
\alias{changeHome}
\title{Change the recordr home directory}
\usage{
changeHome(recordr, currentDir, newDir = as.character(NA), copy, ...)
}
\arguments{
\item{recordr}{A recordr object}
\item{currentDir}{A charact... |
#' @author Alexandra Tiukkel
| /CoopGame/man-roxygen/author/AT.R | no_license | anwanjohannes/CoopGame | R | false | false | 30 | r | #' @author Alexandra Tiukkel
|
context("test-subsetSpeciesList")
test_that("Ensure species list subsetting works (by family, then order)", {
testthat::skip_on_travis()
testthat::skip_if_offline()
spp <- get_speciesList()
t <- subset_speciesList(spp, fam.ind = "Parulidae")
expect_false("Parulidae" %in% t$family)
t2 <- subset_specie... | /tests/testthat/test-subsetSpeciesList.R | permissive | ethanwhite/bbsAssistant | R | false | false | 415 | r | context("test-subsetSpeciesList")
test_that("Ensure species list subsetting works (by family, then order)", {
testthat::skip_on_travis()
testthat::skip_if_offline()
spp <- get_speciesList()
t <- subset_speciesList(spp, fam.ind = "Parulidae")
expect_false("Parulidae" %in% t$family)
t2 <- subset_specie... |
#' Daum Suggest Search Terms - Search Level 1
#'
#' The function aims to crawl the first level related search terms from the DAUM search engine.
#' The only argument for this function is "Search Term".
#'
#' DAUM url: https://www.daum.net/
#'
#' @param keyword search terms, keywords which supports Korean as well.
#' @k... | /R/daum_keyword_R1.R | no_license | statkclee/suggestK | R | false | false | 961 | r | #' Daum Suggest Search Terms - Search Level 1
#'
#' The function aims to crawl the first level related search terms from the DAUM search engine.
#' The only argument for this function is "Search Term".
#'
#' DAUM url: https://www.daum.net/
#'
#' @param keyword search terms, keywords which supports Korean as well.
#' @k... |
#'
scaling_of_b2m_human_control <- function(read_metrics_df, run_manifest_path, scaling_table, pos_neg_filtering_criteria_path){
#1. sum the pass filter reads for entire chip (all BC's); "qualified_aligned_reads" from read_metrics table output
sum_pass_filter_reads = sum(read_metrics_df$qualified_aligned_reads)
#2... | /R/scaling_of_b2m_human_control.R | no_license | fnothaft/TypeSeqHPV | R | false | false | 1,354 | r | #'
scaling_of_b2m_human_control <- function(read_metrics_df, run_manifest_path, scaling_table, pos_neg_filtering_criteria_path){
#1. sum the pass filter reads for entire chip (all BC's); "qualified_aligned_reads" from read_metrics table output
sum_pass_filter_reads = sum(read_metrics_df$qualified_aligned_reads)
#2... |
#calculate ANOVA F statistic for 1 factor, >2 treatments
#can be used for CRD, BRD, and Latin squares
#calcOptions=list(block=)
#calcOptions=list(row=,col=)
anovaF=function(y,w,calcOptions=NULL){
#formatting
if(sum(factor(w)==w)>0) w=data.matrix(w)
if(ncol(w)==1) w=as.vector(w)
#calculations
#default to... | /randomizationInference/R/anovaF.R | no_license | ingted/R-Examples | R | false | false | 639 | r | #calculate ANOVA F statistic for 1 factor, >2 treatments
#can be used for CRD, BRD, and Latin squares
#calcOptions=list(block=)
#calcOptions=list(row=,col=)
anovaF=function(y,w,calcOptions=NULL){
#formatting
if(sum(factor(w)==w)>0) w=data.matrix(w)
if(ncol(w)==1) w=as.vector(w)
#calculations
#default to... |
model <- function(thresholds=c(2,3,4,9), pm.df=NULL, cohort.df=NULL, parallel=FALSE){
####################SETUP#################################
theme_set(new = theme_bw())
#baseline mortality rates per age
CBS<-data.table(read.csv("data/CBS lifetable.csv", sep = ";"))
CBS$Leeftijd<-as.numeric(substr(CBS$L... | /functions/model.R | no_license | bgravesteijn/ECPR_IHCA_sim | R | false | false | 10,642 | r | model <- function(thresholds=c(2,3,4,9), pm.df=NULL, cohort.df=NULL, parallel=FALSE){
####################SETUP#################################
theme_set(new = theme_bw())
#baseline mortality rates per age
CBS<-data.table(read.csv("data/CBS lifetable.csv", sep = ";"))
CBS$Leeftijd<-as.numeric(substr(CBS$L... |
\name{datablock2ma}
\alias{datablock2ma}
\alias{splitNumChar}
\title{
SDF data blocks to matrix
}
\description{
Convert data blocks in \code{SDFset} to character matrix with
\code{datablock2ma}, then store its numeric columns as numeric matrix and its
character columns as character matrix. }
\usage{
datablock2ma(datab... | /man/datablock2ma.Rd | no_license | girke-lab/ChemmineR | R | false | false | 1,422 | rd | \name{datablock2ma}
\alias{datablock2ma}
\alias{splitNumChar}
\title{
SDF data blocks to matrix
}
\description{
Convert data blocks in \code{SDFset} to character matrix with
\code{datablock2ma}, then store its numeric columns as numeric matrix and its
character columns as character matrix. }
\usage{
datablock2ma(datab... |
#' @title Guess column names from a list of candidates
#' @description Uses fuzzy matching (\code{\link[base]{agrep}}) to guess (column) names from a list of allowed character strings.
#' @param cols Character vector of approximate column names to be guessed
#' @param df data frame containing column names
#' @param... | /R/guess_colname.R | no_license | MikkoVihtakari/MarineDatabase | R | false | false | 1,024 | r | #' @title Guess column names from a list of candidates
#' @description Uses fuzzy matching (\code{\link[base]{agrep}}) to guess (column) names from a list of allowed character strings.
#' @param cols Character vector of approximate column names to be guessed
#' @param df data frame containing column names
#' @param... |
.engine_context <- new.env(parent = emptyenv())
#' A reticulate Engine for Knitr
#'
#' This provides a `reticulate` engine for `knitr`, suitable for usage when
#' attempting to render Python chunks. Using this engine allows for shared state
#' between Python chunks in a document -- that is, variables defined by one
#... | /R/knitr-engine.R | permissive | rstudio/reticulate | R | false | false | 24,468 | r |
.engine_context <- new.env(parent = emptyenv())
#' A reticulate Engine for Knitr
#'
#' This provides a `reticulate` engine for `knitr`, suitable for usage when
#' attempting to render Python chunks. Using this engine allows for shared state
#' between Python chunks in a document -- that is, variables defined by one
#... |
my_func <- function() {
library(data.table)
my_scatter <- function() {
fname <- file.choose()
table <- read.csv(fname, header=T, stringsAsFactor=F )
print(data.table(colnames(table)))
xcol_num <- as.numeric(readline('x축 컬럼 번호: '))
ycol_num <- as.numeric(readline('... | /my_func.R | permissive | Adrian123K/R | R | false | false | 4,118 | r | my_func <- function() {
library(data.table)
my_scatter <- function() {
fname <- file.choose()
table <- read.csv(fname, header=T, stringsAsFactor=F )
print(data.table(colnames(table)))
xcol_num <- as.numeric(readline('x축 컬럼 번호: '))
ycol_num <- as.numeric(readline('... |
\name{convertFiles}
\alias{convertFiles}
\title{Convert an entire directory of data
}
\description{Ghcn daily files contain data beyong maximum and minimum
temperatures ( over 30 elements). The GhcnDaily package supports
the download of these complete files. Converting these files to
temperature only... | /man/convertFiles.Rd | no_license | kendonB/GhcnDaily | R | false | false | 1,548 | rd | \name{convertFiles}
\alias{convertFiles}
\title{Convert an entire directory of data
}
\description{Ghcn daily files contain data beyong maximum and minimum
temperatures ( over 30 elements). The GhcnDaily package supports
the download of these complete files. Converting these files to
temperature only... |
my_working_directory="~/R Work/Fetal HSPCs/Phylogeny_of_foetal_haematopoiesis/"
setwd(my_working_directory)
#Polytomies simulation
#This is a bayesian framework to estimate the upper limit of mutation rate at the 8-cell stage
#(where the mutation rate abruptly drops) using the observed polytomies at this stage
library... | /Phylogeny_analysis/Mutation_rate_estimate_from_polytomies.R | no_license | mspencerchapman/Phylogeny_of_foetal_haematopoiesis | R | false | false | 2,389 | r | my_working_directory="~/R Work/Fetal HSPCs/Phylogeny_of_foetal_haematopoiesis/"
setwd(my_working_directory)
#Polytomies simulation
#This is a bayesian framework to estimate the upper limit of mutation rate at the 8-cell stage
#(where the mutation rate abruptly drops) using the observed polytomies at this stage
library... |
topswops <- function(x){
i <- 0
while(x[1] != 1){
first <- x[1]
if(first == length(x)){
x <- rev(x)
} else{
x <- c(x[first:1], x[(first+1):length(x)])
}
i <- i + 1
}
return(i)
}
library(iterpc)
result <- NULL
for(i in 1:10){
I <- iterpc(i, labels = 1:i, ordered = T)
A <- g... | /Programming Language Detection/Experiment-2/Dataset/Train/R/topswops.r | no_license | dlaststark/machine-learning-projects | R | false | false | 433 | r | topswops <- function(x){
i <- 0
while(x[1] != 1){
first <- x[1]
if(first == length(x)){
x <- rev(x)
} else{
x <- c(x[first:1], x[(first+1):length(x)])
}
i <- i + 1
}
return(i)
}
library(iterpc)
result <- NULL
for(i in 1:10){
I <- iterpc(i, labels = 1:i, ordered = T)
A <- g... |
add.lead.zero <-
function(number,digits=2)
{
number<-as.character(number)
for(i in 1: length(number))
{
if(nchar(number[i])<digits)
{
print(paste("changing",number[i]))
number[i]<-paste("0",number[i],sep="")
print(paste("to",number[i]))
}
}... | /R/add.lead.zero.R | no_license | DuyDN/NCBI2R | R | false | false | 354 | r | add.lead.zero <-
function(number,digits=2)
{
number<-as.character(number)
for(i in 1: length(number))
{
if(nchar(number[i])<digits)
{
print(paste("changing",number[i]))
number[i]<-paste("0",number[i],sep="")
print(paste("to",number[i]))
}
}... |
testlist <- list(end = NULL, start = NULL, x = structure(c(4.65661649758392e-10, 6.58435450076743e-198, 2.32903286132618e+96, 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), .Dim = c(5L, 7L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0,... | /dynutils/inst/testfiles/project_to_segments/AFL_project_to_segments/project_to_segments_valgrind_files/1609870925-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 409 | r | testlist <- list(end = NULL, start = NULL, x = structure(c(4.65661649758392e-10, 6.58435450076743e-198, 2.32903286132618e+96, 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), .Dim = c(5L, 7L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0,... |
#library(moments)
library(ggplot2)
library(Metrics)
#Analyses computational power data and attempts to predict the total performance score.
#Uses polynomial regression
#Read in data and clean unnecessary columns and null values
machine_information <- read.csv("data/machine.data", strip.white=TRUE)
machine_informati... | /scripts/PolynomialRegression.R | no_license | sinderpl/dataMiningRegression | R | false | false | 4,613 | r | #library(moments)
library(ggplot2)
library(Metrics)
#Analyses computational power data and attempts to predict the total performance score.
#Uses polynomial regression
#Read in data and clean unnecessary columns and null values
machine_information <- read.csv("data/machine.data", strip.white=TRUE)
machine_informati... |
testlist <- list(mu = 1.49166814624004e-154, var = 1.94748285711629e-308)
result <- do.call(metafolio:::est_beta_params,testlist)
str(result) | /metafolio/inst/testfiles/est_beta_params/libFuzzer_est_beta_params/est_beta_params_valgrind_files/1612988103-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 141 | r | testlist <- list(mu = 1.49166814624004e-154, var = 1.94748285711629e-308)
result <- do.call(metafolio:::est_beta_params,testlist)
str(result) |
#
# take an edited exp1a datasheet and put into forms that can be used in unpak db
#
upload1a <- function(con,insert_accession=FALSE)
{
fpath <- system.file("extdata", "expt1a1megasheet-edited-for-upload - Sheet1.csv", package="unpakR")
mega <- read.csv(file=fpath,header=T,na.strings=c("."))
mega.old <- ... | /unpakDB/inst/upload.fun/upload.experiment.R | no_license | stranda/unpak-shiny | R | false | false | 7,346 | r | #
# take an edited exp1a datasheet and put into forms that can be used in unpak db
#
upload1a <- function(con,insert_accession=FALSE)
{
fpath <- system.file("extdata", "expt1a1megasheet-edited-for-upload - Sheet1.csv", package="unpakR")
mega <- read.csv(file=fpath,header=T,na.strings=c("."))
mega.old <- ... |
# file : shiny_spc
# author : Ming-Chang Lee
# date : 2021.11.06
# email : alan9956@gmail.com
# RWEPA : http://rwepa.blogspot.tw/
# GitHub : https://github.com/rwepa
# Encoding : UTF-8
# File : ui.R
# verify packages
# need.packages <- c("shiny", "shinythemes", "DT", "qcc", "plotly")
#... | /ui.R | no_license | rwepa/shiny_spc | R | false | false | 3,503 | r | # file : shiny_spc
# author : Ming-Chang Lee
# date : 2021.11.06
# email : alan9956@gmail.com
# RWEPA : http://rwepa.blogspot.tw/
# GitHub : https://github.com/rwepa
# Encoding : UTF-8
# File : ui.R
# verify packages
# need.packages <- c("shiny", "shinythemes", "DT", "qcc", "plotly")
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coord.R
\name{mobile_coord}
\alias{mobile_coord}
\title{Coordinates}
\usage{
mobile_coord(m, type = c("rect", "polar"), ...)
}
\arguments{
\item{m}{An object of class \code{mobile} as returned by \code{\link{mobile}}.}
\item{type}{Type of co... | /man/mobile_coord.Rd | permissive | takewiki/mobileCharts | R | false | true | 713 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coord.R
\name{mobile_coord}
\alias{mobile_coord}
\title{Coordinates}
\usage{
mobile_coord(m, type = c("rect", "polar"), ...)
}
\arguments{
\item{m}{An object of class \code{mobile} as returned by \code{\link{mobile}}.}
\item{type}{Type of co... |
# This program is a benchmark program
library(ergm)
library(R.matlab)
g.sim.incontrol = simulate(network(100) ~ density + mutual + transitive,
coef=c(0.1, 0.1, 0.1), nsim = 50)
# plot(g.sim.incontrol[[1]])
# justify the network statistics
# summary(g.sim.incontrol[[1]] ~ density + mutual +... | /ST 697 R and Matlab Interface/simulation_R.R | no_license | kentwang/NetworkSPC | R | false | false | 787 | r | # This program is a benchmark program
library(ergm)
library(R.matlab)
g.sim.incontrol = simulate(network(100) ~ density + mutual + transitive,
coef=c(0.1, 0.1, 0.1), nsim = 50)
# plot(g.sim.incontrol[[1]])
# justify the network statistics
# summary(g.sim.incontrol[[1]] ~ density + mutual +... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/overline.R
\name{gsection}
\alias{gsection}
\title{Function to split overlapping SpatialLines into segments}
\usage{
gsection(sl, buff_dist = 0)
}
\arguments{
\item{sl}{SpatialLinesDataFrame with overlapping Lines to split by
number of overla... | /man/gsection.Rd | permissive | fcotelo/stplanr | R | false | true | 1,646 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/overline.R
\name{gsection}
\alias{gsection}
\title{Function to split overlapping SpatialLines into segments}
\usage{
gsection(sl, buff_dist = 0)
}
\arguments{
\item{sl}{SpatialLinesDataFrame with overlapping Lines to split by
number of overla... |
library(randomForest)
library(ROCR)
library(ggplot2)
set.seed(123)
# read data, split train/test 1-machine_learning_code/2-trees+ensembles/0-data.R
dim(d_train)
dim(d_test)
md <- randomForest(spam ~ ., data = d_train, ntree = 100)
md
phat <- predict(md, d_test, type = "prob")[,"1"]
table(ifelse(phat>0.5,1,0), d_tes... | /1-machine_learning_code/3-model_eval/5-roc_curve.R | no_license | szilard/teach-data-science-msc-analytics-ceu | R | false | false | 1,138 | r |
library(randomForest)
library(ROCR)
library(ggplot2)
set.seed(123)
# read data, split train/test 1-machine_learning_code/2-trees+ensembles/0-data.R
dim(d_train)
dim(d_test)
md <- randomForest(spam ~ ., data = d_train, ntree = 100)
md
phat <- predict(md, d_test, type = "prob")[,"1"]
table(ifelse(phat>0.5,1,0), d_tes... |
fluidRow(
# Sidebar ()
column(width = 3,
input_fileUI('input_file'),
input_parameterUI('input_parm')
),
# Main Panel
column(width = 9,
# Show when `df_ready` (CURRENT: ALWAYS SHOW)
conditionalPanel(
condition = "output['df_ready']",
# condition = 'true',
tabset... | /inst/shinyrdd/ui_elements/page_model.R | no_license | felixthoemmes/rddapp | R | false | false | 1,728 | r | fluidRow(
# Sidebar ()
column(width = 3,
input_fileUI('input_file'),
input_parameterUI('input_parm')
),
# Main Panel
column(width = 9,
# Show when `df_ready` (CURRENT: ALWAYS SHOW)
conditionalPanel(
condition = "output['df_ready']",
# condition = 'true',
tabset... |
library(shiny)
library(shinydashboard)
library(DT)
library(mapproj)
library(readr)
library(readxl)
library(data.table)
library(tidyverse)
library(scales)
library(lubridate)
library(ggplot2)
library(splines)
shinyServer(function(input, output, session) {
#csv reads
mygitpath <- 'https://raw.githubusercontent.com... | /server.R | no_license | rosagradilla19/covid19-shinyR | R | false | false | 10,408 | r | library(shiny)
library(shinydashboard)
library(DT)
library(mapproj)
library(readr)
library(readxl)
library(data.table)
library(tidyverse)
library(scales)
library(lubridate)
library(ggplot2)
library(splines)
shinyServer(function(input, output, session) {
#csv reads
mygitpath <- 'https://raw.githubusercontent.com... |
library(h2o)
### Name: h2o.performance
### Title: Model Performance Metrics in H2O
### Aliases: h2o.performance
### ** Examples
## No test:
library(h2o)
h2o.init()
prostate_path <- system.file("extdata", "prostate.csv", package = "h2o")
prostate <- h2o.uploadFile(path = prostate_path)
prostate$CAPSULE <- as.factor... | /data/genthat_extracted_code/h2o/examples/h2o.performance.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 797 | r | library(h2o)
### Name: h2o.performance
### Title: Model Performance Metrics in H2O
### Aliases: h2o.performance
### ** Examples
## No test:
library(h2o)
h2o.init()
prostate_path <- system.file("extdata", "prostate.csv", package = "h2o")
prostate <- h2o.uploadFile(path = prostate_path)
prostate$CAPSULE <- as.factor... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projection_basis.R
\name{projection_basis}
\alias{projection_basis}
\title{Projection on the kernel basis}
\usage{
projection_basis(y, eigenvect, M_integ)
}
\arguments{
\item{y}{matrix. \code{N} \eqn{\times} \code{m} matrix containing in
row ... | /man/projection_basis.Rd | no_license | ardeeshany/FLAME | R | false | true | 1,478 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projection_basis.R
\name{projection_basis}
\alias{projection_basis}
\title{Projection on the kernel basis}
\usage{
projection_basis(y, eigenvect, M_integ)
}
\arguments{
\item{y}{matrix. \code{N} \eqn{\times} \code{m} matrix containing in
row ... |
#############################################################################
# Comparison of the base predictions with the self predictions before #
# combining them linearly #
# Main question: how to combine probabilities to maximize the expected MAP? #
########... | /Validation/Predictions aligner/Shiny app - predictions aligner/global.R | no_license | PetrShypila/Santander-Product-Recommendation | R | false | false | 2,623 | r | #############################################################################
# Comparison of the base predictions with the self predictions before #
# combining them linearly #
# Main question: how to combine probabilities to maximize the expected MAP? #
########... |
.reg4Pred <-
function(lm.out,
n.keep, digits_d, show_R,
new.data, pred_sort, pred_rows, scatter_coef,
in.data.frame, X1_new, X2_new, X3_new, X4_new, X5_new, X6_new) {
nm <- all.vars(lm.out$terms) # names of vars in the model
n.vars <- length(nm)
n.pred <- n.vars - 1L
n.obs <- nrow(... | /R/reg.4Pred.R | no_license | cran/lessR | R | false | false | 4,363 | r | .reg4Pred <-
function(lm.out,
n.keep, digits_d, show_R,
new.data, pred_sort, pred_rows, scatter_coef,
in.data.frame, X1_new, X2_new, X3_new, X4_new, X5_new, X6_new) {
nm <- all.vars(lm.out$terms) # names of vars in the model
n.vars <- length(nm)
n.pred <- n.vars - 1L
n.obs <- nrow(... |
library('testthat')
auto_test('./code', './tests', 'summary')
| /run_tests.r | no_license | e4envy/Algorithm-implementation-in-R | R | false | false | 64 | r | library('testthat')
auto_test('./code', './tests', 'summary')
|
library(agridat)
### Name: cochran.factorial
### Title: Factorial experiment in beans
### Aliases: cochran.factorial
### Keywords: datasets
### ** Examples
data(cochran.factorial)
dat <- cochran.factorial
# Split treatment into individual factors
dat <- transform(dat,
d = -1 + 2 * grepl('d',trt),... | /data/genthat_extracted_code/agridat/examples/cochran.factorial.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 740 | r | library(agridat)
### Name: cochran.factorial
### Title: Factorial experiment in beans
### Aliases: cochran.factorial
### Keywords: datasets
### ** Examples
data(cochran.factorial)
dat <- cochran.factorial
# Split treatment into individual factors
dat <- transform(dat,
d = -1 + 2 * grepl('d',trt),... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SpikeTrain.R
\docType{methods}
\name{crossRefractoryRatio}
\alias{crossRefractoryRatio}
\alias{crossRefractoryRatio,SpikeTrain-method}
\alias{crossRefractoryRatio,ANY,ANY-method}
\title{Get the cross refractory ratio of each cluster from its ... | /man/crossRefractoryRatio-methods.Rd | no_license | kevin-allen/relectro | R | false | true | 1,575 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SpikeTrain.R
\docType{methods}
\name{crossRefractoryRatio}
\alias{crossRefractoryRatio}
\alias{crossRefractoryRatio,SpikeTrain-method}
\alias{crossRefractoryRatio,ANY,ANY-method}
\title{Get the cross refractory ratio of each cluster from its ... |
cube <- function(x, n) {
x^3
}
pow <- function(x = 4, n = 3) {
x^n
}
f <- function(x) {
g <- function(y) {
y + z
}
z <- 4
x + g(x)
}
| /compdata/quiz.R | no_license | j-bennet/coursera | R | false | false | 200 | r | cube <- function(x, n) {
x^3
}
pow <- function(x = 4, n = 3) {
x^n
}
f <- function(x) {
g <- function(y) {
y + z
}
z <- 4
x + g(x)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docr_make_license.R
\name{docr.make_license}
\alias{docr.make_license}
\title{Generate a LICENSE formatted to Rd specs}
\usage{
docr.make_license(owner_name = NULL, owner_org = NULL, year = "current",
output_to = c("file", "console"))
}
\ar... | /man/docr.make_license.Rd | no_license | CarlBoneri/roxydoc2 | R | false | true | 1,516 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docr_make_license.R
\name{docr.make_license}
\alias{docr.make_license}
\title{Generate a LICENSE formatted to Rd specs}
\usage{
docr.make_license(owner_name = NULL, owner_org = NULL, year = "current",
output_to = c("file", "console"))
}
\ar... |
render_and_print_slides <- function(week){
week_dir <- paste0(getwd(), "/Lectures/", "Week", week, "/")
current_rmd <- paste0(week_dir, stringr::str_subset(list.files(week_dir),
"^CSSS508_Week.*\\.Rmd$"))
rmarkdown::render(current_rmd, encoding = "UT... | /scripts/print_slides.R | no_license | mcomsa/CSSS508 | R | false | false | 991 | r | render_and_print_slides <- function(week){
week_dir <- paste0(getwd(), "/Lectures/", "Week", week, "/")
current_rmd <- paste0(week_dir, stringr::str_subset(list.files(week_dir),
"^CSSS508_Week.*\\.Rmd$"))
rmarkdown::render(current_rmd, encoding = "UT... |
## Put comments here that give an overall description of what your
## function do
## 1. makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse.
## 2. cacheSolve: This function computes the inverse of the special "matrix" returned by
## makeCacheMatrix above. If the i... | /cachematrix.R | no_license | ManikVaish88/ProgrammingAssignment2 | R | false | false | 1,508 | r | ## Put comments here that give an overall description of what your
## function do
## 1. makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse.
## 2. cacheSolve: This function computes the inverse of the special "matrix" returned by
## makeCacheMatrix above. If the i... |
setClass("MFDataSet",
representation(components = "GenomicRanges",
patterns = "GenomicRanges",
regions = "GenomicRanges"))
| /R/AllClasses.r | no_license | faezeh-dorri/methylFlowR | R | false | false | 217 | r | setClass("MFDataSet",
representation(components = "GenomicRanges",
patterns = "GenomicRanges",
regions = "GenomicRanges"))
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scales_cross_blended.R
\name{scale_cross_blended}
\alias{scale_cross_blended}
\alias{scale_fill_cross_blended_d}
\alias{scale_colour_cross_blended_d}
\alias{scale_fill_cross_blended_c}
\alias{scale_colour_cross_blended_c}
\alias{scale_fill_cr... | /man/scale_cross_blended.Rd | permissive | dieghernan/tidyterra | R | false | true | 14,607 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scales_cross_blended.R
\name{scale_cross_blended}
\alias{scale_cross_blended}
\alias{scale_fill_cross_blended_d}
\alias{scale_colour_cross_blended_d}
\alias{scale_fill_cross_blended_c}
\alias{scale_colour_cross_blended_c}
\alias{scale_fill_cr... |
# Draw kappa_u from the full conditional
drawku <- function(au, bu, u, R){
u = c(u);
n <- dim(R)[1];
# Calculate parameters of the gamma distribution
alpha <- (n-1) / 2 + au;
# Rate parameter!
beta <- bu + t(u) %*% R %*% u / 2;
return(rgamma(1, alpha, rate = beta));
}
# Draw kappa_v from the full ... | /ex2/draw.R | no_license | burk/beregningskrevende | R | false | false | 2,211 | r | # Draw kappa_u from the full conditional
drawku <- function(au, bu, u, R){
u = c(u);
n <- dim(R)[1];
# Calculate parameters of the gamma distribution
alpha <- (n-1) / 2 + au;
# Rate parameter!
beta <- bu + t(u) %*% R %*% u / 2;
return(rgamma(1, alpha, rate = beta));
}
# Draw kappa_v from the full ... |
bootstrapPower = function(ctrl,
exp = NULL,
change,
Func,
trials = 10000,
replace = T,
abs = F,
plot = T,
breaks = NULL,
cex.main = 1.2,
...
)
{
if (is.null(exp)) {exp = change * ctrl}
old = eval(call(Func, ctrl));
new = eval(call(Func, ... | /bootstrapPower.R | no_license | FernaldLab/_code | R | false | false | 5,186 | r | bootstrapPower = function(ctrl,
exp = NULL,
change,
Func,
trials = 10000,
replace = T,
abs = F,
plot = T,
breaks = NULL,
cex.main = 1.2,
...
)
{
if (is.null(exp)) {exp = change * ctrl}
old = eval(call(Func, ctrl));
new = eval(call(Func, ... |
#' @title moveReduce
#'
#' @description Pixel based summary of movement data that preserves periodic movements.
#' @param x Object of class \emph{SpatialPoints} or \emph{SpatialPointsDataFrame}.
#' @param z Object of class \emph{Date}, \emph{POSIXlt} or \emph{POSIXct} with the observation time of \emph{x}.
#' @param y ... | /R/moveReduce.R | no_license | onetreetwotrees/rsMove | R | false | false | 5,682 | r | #' @title moveReduce
#'
#' @description Pixel based summary of movement data that preserves periodic movements.
#' @param x Object of class \emph{SpatialPoints} or \emph{SpatialPointsDataFrame}.
#' @param z Object of class \emph{Date}, \emph{POSIXlt} or \emph{POSIXct} with the observation time of \emph{x}.
#' @param y ... |
##--------------------------------------------------------------------------------##
## Monopoly Simulation - Main script ##
## Version 0.5 ##
##---------------------------------------------------------------... | /versions/v0.5.1/v0.5.1.R | permissive | alfredlov/monopoly | R | false | false | 13,251 | r | ##--------------------------------------------------------------------------------##
## Monopoly Simulation - Main script ##
## Version 0.5 ##
##---------------------------------------------------------------... |
# install.packages("foreign")
library(foreign)
weather = read.arff("~/datamining cw/weather.numeric.arff")
colnames(weather)
rownames(weather)
names(weather)
# sizes and subsetting
dim(weather)
nrow(weather)
ncol(weather)
head(weather)
tail(weather)
weather[1,]
weather[,1]
weather[,c(1,3)]
weather[-c(2,3),]
weather$t... | /naivebayes.r | no_license | cgycorey/data-mining | R | false | false | 2,433 | r | # install.packages("foreign")
library(foreign)
weather = read.arff("~/datamining cw/weather.numeric.arff")
colnames(weather)
rownames(weather)
names(weather)
# sizes and subsetting
dim(weather)
nrow(weather)
ncol(weather)
head(weather)
tail(weather)
weather[1,]
weather[,1]
weather[,c(1,3)]
weather[-c(2,3),]
weather$t... |
structure(list(url = "https://www.pivotaltracker.com/services/v5/projects/123/stories/154111570/",
status_code = 204L, headers = structure(list(`access-control-allow-credentials` = "false",
`access-control-allow-headers` = "X-TrackerToken,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modifie... | /tests/testthat/projects/123/stories/154111570-DELETE.R | no_license | nealrichardson/pivotaltrackR | R | false | false | 5,334 | r | structure(list(url = "https://www.pivotaltracker.com/services/v5/projects/123/stories/154111570/",
status_code = 204L, headers = structure(list(`access-control-allow-credentials` = "false",
`access-control-allow-headers` = "X-TrackerToken,DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modifie... |
#!/usr/bin/env Rscript
library(magrittr)
library(data.table)
library(hsdar)
setDTthreads(threads = 1)
args = commandArgs(trailingOnly=TRUE)
stitch_dir = args[1]
root = args[2]
val_max = as.numeric(args[3])
refspec_dt = readRDS(args[4])
spec_files = args[-1:-4]
# message(system("which R", intern = TRUE))
# message(paste... | /rscript_unmix.R | no_license | jrboyd/image_analysis | R | false | false | 3,269 | r | #!/usr/bin/env Rscript
library(magrittr)
library(data.table)
library(hsdar)
setDTthreads(threads = 1)
args = commandArgs(trailingOnly=TRUE)
stitch_dir = args[1]
root = args[2]
val_max = as.numeric(args[3])
refspec_dt = readRDS(args[4])
spec_files = args[-1:-4]
# message(system("which R", intern = TRUE))
# message(paste... |
grey.plot <-
function(x, y, xlab="x", ylab="y", main="Title", pch=20, type="p") {
plot(x, y, pch=pch, xlab=xlab, ylab=ylab, main=main, type=type)
# Add grey background with gridlines
rect(par("usr")[1], par("usr")[3], par("usr")[2], par("usr")[4], col="#e5e5e5")
abline(h=axTicks(2), v=axTicks(1), lty=1, col="#... | /Functions in byumpa package.R | permissive | tpopenfoose/R-magic | R | false | false | 1,572 | r | grey.plot <-
function(x, y, xlab="x", ylab="y", main="Title", pch=20, type="p") {
plot(x, y, pch=pch, xlab=xlab, ylab=ylab, main=main, type=type)
# Add grey background with gridlines
rect(par("usr")[1], par("usr")[3], par("usr")[2], par("usr")[4], col="#e5e5e5")
abline(h=axTicks(2), v=axTicks(1), lty=1, col="#... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/EpiBayesHistorical.R
\name{EpiBayesHistorical}
\alias{EpiBayesHistorical}
\title{Historical Aggregation for Disease Model}
\usage{
EpiBayesHistorical(input.df, orig.tauparm, MCMCreps, burnin = 1000, ...)
}
\arguments{
\item{input.df}{... | /man/EpiBayesHistorical.Rd | no_license | cran/EpiBayes | R | false | false | 5,673 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/EpiBayesHistorical.R
\name{EpiBayesHistorical}
\alias{EpiBayesHistorical}
\title{Historical Aggregation for Disease Model}
\usage{
EpiBayesHistorical(input.df, orig.tauparm, MCMCreps, burnin = 1000, ...)
}
\arguments{
\item{input.df}{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_ceteris_paribus_oscillations.R
\name{plot.ceteris_paribus_oscillations}
\alias{plot.ceteris_paribus_oscillations}
\title{Plot Ceteris Paribus Oscillations}
\usage{
\method{plot}{ceteris_paribus_oscillations}(x, ...)
}
\arguments{
\item{x... | /man/plot.ceteris_paribus_oscillations.Rd | no_license | kmichael08/ceterisParibus | R | false | true | 1,083 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_ceteris_paribus_oscillations.R
\name{plot.ceteris_paribus_oscillations}
\alias{plot.ceteris_paribus_oscillations}
\title{Plot Ceteris Paribus Oscillations}
\usage{
\method{plot}{ceteris_paribus_oscillations}(x, ...)
}
\arguments{
\item{x... |
\name{bliss}
\alias{bliss}
\docType{data}
\title{Bliss data on deaths of flour beetles}
\description{
These are the number of adult flour beetles which died following a
5-hour exposure to gaseous carbon disulphide.}
\usage{data(bliss)}
\format{
A data frame with 8 observations on the following 3 variables.
\de... | /man/bliss.Rd | no_license | cran/SMPracticals | R | false | false | 783 | rd | \name{bliss}
\alias{bliss}
\docType{data}
\title{Bliss data on deaths of flour beetles}
\description{
These are the number of adult flour beetles which died following a
5-hour exposure to gaseous carbon disulphide.}
\usage{data(bliss)}
\format{
A data frame with 8 observations on the following 3 variables.
\de... |
## download file if it doesn't exist yet
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
if (!file.exists("power.zip")){
download.file(fileUrl,destfile="power.zip")
}
fname<-dir( pattern="\\.zip$")
# unzip file
unzip(fname)
# read only dates Feb 1,2007 and Feb 2,20... | /plot4.r | no_license | kennexrazon/ExData_Plotting1 | R | false | false | 1,522 | r | ## download file if it doesn't exist yet
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
if (!file.exists("power.zip")){
download.file(fileUrl,destfile="power.zip")
}
fname<-dir( pattern="\\.zip$")
# unzip file
unzip(fname)
# read only dates Feb 1,2007 and Feb 2,20... |
#' @title Parse AWS metadata from Excel file name
#' @description Parse Station name, identification code and UF from Excel file
#' name
#' @param file.name A character vector of one or more file paths.
#' @return a data frame with columns:
#'
#' - uf, Federative Unit
#' - name, station name
#' - id, station identifi... | /R/metadata_ffilename.R | permissive | lhmet/rinmetxls | R | false | false | 1,921 | r | #' @title Parse AWS metadata from Excel file name
#' @description Parse Station name, identification code and UF from Excel file
#' name
#' @param file.name A character vector of one or more file paths.
#' @return a data frame with columns:
#'
#' - uf, Federative Unit
#' - name, station name
#' - id, station identifi... |
#-----------------------------------------------------------------------
# Copyright (C) 2012-2016 Serge Iovleff, University Lille 1, Inria
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Fo... | /fuzzedpackages/MixAll/R/MixAll.R | no_license | akhikolla/testpackages | R | false | false | 11,337 | r | #-----------------------------------------------------------------------
# Copyright (C) 2012-2016 Serge Iovleff, University Lille 1, Inria
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Fo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/report.R
\name{report_summary}
\alias{report_summary}
\title{Provide Summary Statistics for Estimated Infections and Rt}
\usage{
report_summary(
summarised_estimates,
rt_samples,
target_folder = NULL,
return_numeric = FALSE
)
}
\argum... | /man/report_summary.Rd | permissive | DrJohan/EpiNow2 | R | false | true | 973 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/report.R
\name{report_summary}
\alias{report_summary}
\title{Provide Summary Statistics for Estimated Infections and Rt}
\usage{
report_summary(
summarised_estimates,
rt_samples,
target_folder = NULL,
return_numeric = FALSE
)
}
\argum... |
#load tidyverse (this assumes you've already installed it)
library(tidyverse)
#install, load, and preview the example dataset
install.packages("NHANES")
library(NHANES)
glimpse(NHANES)
#Filter out rows with data from 2009-2010 and Age > 5, select a subset (4) of the variables, then get rid of all duplicate rows. Assi... | /assets/scripts/birds/S03_Examples_Code.R | no_license | michaelbroe/biodash.github.io | R | false | false | 1,534 | r | #load tidyverse (this assumes you've already installed it)
library(tidyverse)
#install, load, and preview the example dataset
install.packages("NHANES")
library(NHANES)
glimpse(NHANES)
#Filter out rows with data from 2009-2010 and Age > 5, select a subset (4) of the variables, then get rid of all duplicate rows. Assi... |
samples<-30
n<-30
residuals<-rep(NA,n)
y<-rep(NA,n)
x<-rep(NA,n)
#an easy way to replicate the sampling of 1 observation from Height, n times.
x<-replicate(1,sample(Height,n))
mean(x)
# My loop to sample n times from Height
for(i in 1:n) {
x[i:n]<-sample(Height,n)
residuals[i:n]<-(x[i]-mean(Height))
... | /random script qplot.r | no_license | briholt100/AFTNego | R | false | false | 1,224 | r |
samples<-30
n<-30
residuals<-rep(NA,n)
y<-rep(NA,n)
x<-rep(NA,n)
#an easy way to replicate the sampling of 1 observation from Height, n times.
x<-replicate(1,sample(Height,n))
mean(x)
# My loop to sample n times from Height
for(i in 1:n) {
x[i:n]<-sample(Height,n)
residuals[i:n]<-(x[i]-mean(Height))
... |
testlist <- list(id = integer(0), x = numeric(0), y = c(1.08857555171913e-311, 2.12199579047121e-314, 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, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(ggforce:::enclose_points,testlist)
str(result) | /ggforce/inst/testfiles/enclose_points/libFuzzer_enclose_points/enclose_points_valgrind_files/1610030680-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 299 | r | testlist <- list(id = integer(0), x = numeric(0), y = c(1.08857555171913e-311, 2.12199579047121e-314, 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, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(ggforce:::enclose_points,testlist)
str(result) |
library(geotopbricks)
### Name: replace.keyword
### Title: It replaces some keyword values of 'geotop.inpts' file with the
### ones of anoter '*.inpts' value
### Aliases: replace.keyword
### ** Examples
library(geotopbricks)
wpath <- system.file('template/meteo_ex',package="geotopbricks")
x <- "meteo.inpts"
zl <... | /data/genthat_extracted_code/geotopbricks/examples/replace.keyword.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 383 | r | library(geotopbricks)
### Name: replace.keyword
### Title: It replaces some keyword values of 'geotop.inpts' file with the
### ones of anoter '*.inpts' value
### Aliases: replace.keyword
### ** Examples
library(geotopbricks)
wpath <- system.file('template/meteo_ex',package="geotopbricks")
x <- "meteo.inpts"
zl <... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stringDistances.R
\name{distanceStringLevenshtein}
\alias{distanceStringLevenshtein}
\title{Levenshtein Distance for Strings}
\usage{
distanceStringLevenshtein(x, y)
}
\arguments{
\item{x}{first string (class: character)}
\item{y}{second str... | /man/distanceStringLevenshtein.Rd | no_license | cran/CEGO | R | false | true | 551 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stringDistances.R
\name{distanceStringLevenshtein}
\alias{distanceStringLevenshtein}
\title{Levenshtein Distance for Strings}
\usage{
distanceStringLevenshtein(x, y)
}
\arguments{
\item{x}{first string (class: character)}
\item{y}{second str... |
### Major Theories in Polynomials
### Polynomials of Class 1
### Roots with Simple Radicals
###
### Leonard Mada
###
### draft v.0.1b
### based on work during:
### 2018 - 2020
###############
### History ###
###############
# v.0.1b:
# - added examples for entanglements
# with multiple radic... | /Math/Polynomials.Class1.R | no_license | atom-cmd/R | R | false | false | 8,103 | r |
### Major Theories in Polynomials
### Polynomials of Class 1
### Roots with Simple Radicals
###
### Leonard Mada
###
### draft v.0.1b
### based on work during:
### 2018 - 2020
###############
### History ###
###############
# v.0.1b:
# - added examples for entanglements
# with multiple radic... |
## Homework 1, problem 2
## a)
wines <- read.csv(file='https://s3.eu-central-1.amazonaws.com/sf-timeseries/data/wine.csv')
## b)
wines <- within(wines, {
Price <- exp(LogPrice)
})
## c)
## d)
## e)
## f)
## g)
## h)
## i)
## j)
| /Problem_2.R | permissive | makardashe/econometrics2020-H1 | R | false | false | 242 | r | ## Homework 1, problem 2
## a)
wines <- read.csv(file='https://s3.eu-central-1.amazonaws.com/sf-timeseries/data/wine.csv')
## b)
wines <- within(wines, {
Price <- exp(LogPrice)
})
## c)
## d)
## e)
## f)
## g)
## h)
## i)
## j)
|
library(data.table)
library(dplyr)
library(cowplot)
gtex_v8_figure_theme <- function() {
return(theme(plot.title = element_text(face="plain",size=8), text = element_text(size=8),
axis.text=element_text(size=7), panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),pane... | /plot_figureS3.R | no_license | BennyStrobes/gtex_v8_rare_variant_figure_generation | R | false | false | 2,262 | r | library(data.table)
library(dplyr)
library(cowplot)
gtex_v8_figure_theme <- function() {
return(theme(plot.title = element_text(face="plain",size=8), text = element_text(size=8),
axis.text=element_text(size=7), panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),pane... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252175197e+295, 4.58710295702121e-310, 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(CNull:::communities_individual_... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615777278-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252175197e+295, 4.58710295702121e-310, 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(CNull:::communities_individual_... |
/R/getLCA.r | no_license | MoudFassad/HPOSim | R | false | false | 689 | r | ||
install.packages("rmarkdown")
install.packages("knirt")
# Read Data
data = read.csv("https://raw.githubusercontent.com/Jennier2015/DATA-607/master/Week%205%20Assignment/arrival_delays.csv")
View(data)
# Set Up Environment
library(tidyr)
library(dplyr)
library(ggplot2)
# Tidy data
tidy_data1 <- gather(data, "Desig... | /Week 5 Assignment/Week 5 Assignment.R | no_license | Jennier2015/DATA-607 | R | false | false | 1,370 | r | install.packages("rmarkdown")
install.packages("knirt")
# Read Data
data = read.csv("https://raw.githubusercontent.com/Jennier2015/DATA-607/master/Week%205%20Assignment/arrival_delays.csv")
View(data)
# Set Up Environment
library(tidyr)
library(dplyr)
library(ggplot2)
# Tidy data
tidy_data1 <- gather(data, "Desig... |
# 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 <... | /cacheinvmatrix.R | no_license | jorgelarasanchez/ProgrammingAssignment_old_yo | R | false | false | 1,508 | r | # 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 <... |
# function.frequencyDF.source.r
# function.tableDF.source.r
library(tidyverse)
set.seed(1); sample(1:9, 30, replace = T) %>% dput #----
# > library(tidyverse)
# > set.seed(1); sample(1:9, 30, replace = T) %>% dput #----
c(3L, 4L, 6L, 9L, 2L, 9L, 9L, 6L, 6L, 1L, 2L, 2L, 7L, 4L, 7L,
5L, 7L, 9L, 4L, 7L, 9L, 2L, 6L, 2L, ... | /Rdev/00_base_program/function.frequencyDF.source.r | no_license | mkim0710/tidystat | R | false | false | 4,552 | r | # function.frequencyDF.source.r
# function.tableDF.source.r
library(tidyverse)
set.seed(1); sample(1:9, 30, replace = T) %>% dput #----
# > library(tidyverse)
# > set.seed(1); sample(1:9, 30, replace = T) %>% dput #----
c(3L, 4L, 6L, 9L, 2L, 9L, 9L, 6L, 6L, 1L, 2L, 2L, 7L, 4L, 7L,
5L, 7L, 9L, 4L, 7L, 9L, 2L, 6L, 2L, ... |
with(aa5ce6e84e7f94f60b36f3b6422c80c9c, {ROOT <- 'C:/workspace/Semoss_Dev/db/Stock Market__911bf0e9-0378-45bd-9461-87238e9d3b2f/version/e97f4d14-8196-4cce-bd68-c60b09932089';colnames(FRAME159183) <- c("review", "name", "change_pct", "day_change", "last_trade_time", "open", "price", "Symbol", "timestamp", "yahoo", "yaho... | /e97f4d14-8196-4cce-bd68-c60b09932089/R/Temp/axEzcUgnKftjn.R | no_license | semossvideos/stockmarket2 | R | false | false | 373 | r | with(aa5ce6e84e7f94f60b36f3b6422c80c9c, {ROOT <- 'C:/workspace/Semoss_Dev/db/Stock Market__911bf0e9-0378-45bd-9461-87238e9d3b2f/version/e97f4d14-8196-4cce-bd68-c60b09932089';colnames(FRAME159183) <- c("review", "name", "change_pct", "day_change", "last_trade_time", "open", "price", "Symbol", "timestamp", "yahoo", "yaho... |
context('Test the functons form homoskedasticity.R')
# bp_test
test_that('bp_test returns a list', {
set.seed(137)
X <- matrix(rnorm(100), ncol=5)
b <- as.vector(c(2, 3, 4, 8, 9))
e <- rnorm(20)
y <- X %*% b + e
mod <- lm(y ~ X)
bp <- olsdiagnosticR:::bp_test(e, model.matrix(mod))
testthat::expect_ty... | /tests/testthat/test_homoskedasticity.R | no_license | Kale-S/olsdiagnosticR | R | false | false | 1,885 | r | context('Test the functons form homoskedasticity.R')
# bp_test
test_that('bp_test returns a list', {
set.seed(137)
X <- matrix(rnorm(100), ncol=5)
b <- as.vector(c(2, 3, 4, 8, 9))
e <- rnorm(20)
y <- X %*% b + e
mod <- lm(y ~ X)
bp <- olsdiagnosticR:::bp_test(e, model.matrix(mod))
testthat::expect_ty... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidyxl_fmts.R
\name{h_alignment}
\alias{h_alignment}
\title{Add formatting information from the h_alignment format object
This function uses the format object created by \code{xlsx_formats} along with `local_format_id`` to create a vector rep... | /man/h_alignment.Rd | no_license | ianmoran11/unpivotr | R | false | true | 769 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidyxl_fmts.R
\name{h_alignment}
\alias{h_alignment}
\title{Add formatting information from the h_alignment format object
This function uses the format object created by \code{xlsx_formats} along with `local_format_id`` to create a vector rep... |
local({
baseurl <- servr:::jekyll_config('.', 'baseurl', default = '/')
knitr::opts_knit$set(base.url = baseurl)
# fall back on 'kramdown' if markdown engine is not specified
markdown = servr:::jekyll_config('.', 'markdown', 'kramdown')
# see if we need to use the Jekyll render in knitr
if (markdown == 'kra... | /build.R | no_license | Selbosh/jekyll-rmd | R | false | false | 768 | r | local({
baseurl <- servr:::jekyll_config('.', 'baseurl', default = '/')
knitr::opts_knit$set(base.url = baseurl)
# fall back on 'kramdown' if markdown engine is not specified
markdown = servr:::jekyll_config('.', 'markdown', 'kramdown')
# see if we need to use the Jekyll render in knitr
if (markdown == 'kra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.