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 |
|---|---|---|---|---|---|---|---|---|---|
# Yige Wu @WashU Jun 2021
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
source("./ccRCC_snRNA_analysis/functions.R")
source("./ccRCC_snRNA_an... | /snatac/da_peaks/annotate_peaks/annotate_all_peaks_promoters_enhancers.R | no_license | ding-lab/ccRCC_snRNA_analysis | R | false | false | 4,328 | r | # Yige Wu @WashU Jun 2021
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
source("./ccRCC_snRNA_analysis/functions.R")
source("./ccRCC_snRNA_an... |
view1<- function(str1){
print(str1)
}
view2<-function(num1){
for(i in num1)
print(num1)
}
view2(c(1:5))
str1<-"happy"
view1(str1)
#-------------------------------
# 문제 1
total<- function(a,b){
return(a+b)
}
rs<- function(sum){
if(sum>=800)
return("합격")
else
return("불합격")
}
toeic<-750
it... | /r_lec/step01_basic/step05_function/d_func4.R | no_license | woojae05/Programing-R | R | false | false | 431 | r | view1<- function(str1){
print(str1)
}
view2<-function(num1){
for(i in num1)
print(num1)
}
view2(c(1:5))
str1<-"happy"
view1(str1)
#-------------------------------
# 문제 1
total<- function(a,b){
return(a+b)
}
rs<- function(sum){
if(sum>=800)
return("합격")
else
return("불합격")
}
toeic<-750
it... |
#' Fits an ellipse model to data from getPhotoreceptorCoordinates
#'
#' @examples
#' \dontrun{
#' getPhotoreceptorCoordinates(path, ConeFundamentals10) %>%
#' filter(patid == 1, seye == "OD", frequency == 2) %>%
#' fitEllipse() %>%
#' plotEllipse()
#' }
#' @export
fitEllipse <- function(photoreceptorCoordinates,
... | /R/fitEllipse.R | no_license | julienfars/flickerbox | R | false | false | 1,948 | r | #' Fits an ellipse model to data from getPhotoreceptorCoordinates
#'
#' @examples
#' \dontrun{
#' getPhotoreceptorCoordinates(path, ConeFundamentals10) %>%
#' filter(patid == 1, seye == "OD", frequency == 2) %>%
#' fitEllipse() %>%
#' plotEllipse()
#' }
#' @export
fitEllipse <- function(photoreceptorCoordinates,
... |
library(testthat)
library(rjumanpp)
test_check("rjumanpp")
| /tests/testthat.R | permissive | ymattu/rjumanpp | R | false | false | 60 | r | library(testthat)
library(rjumanpp)
test_check("rjumanpp")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/P03.R
\docType{data}
\name{P03}
\alias{P03}
\title{Raw precipitation Gamorel}
\format{
A data.frame with 2 columns:
\describe{
\item{date}{dates in POSIXct format}
\item{precipitation}{Precipitation depth (mm)}
}
}
\source{
\url{http://ag... | /man/P03.Rd | no_license | rafaelnavas/SanAntonioData | R | false | true | 416 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/P03.R
\docType{data}
\name{P03}
\alias{P03}
\title{Raw precipitation Gamorel}
\format{
A data.frame with 2 columns:
\describe{
\item{date}{dates in POSIXct format}
\item{precipitation}{Precipitation depth (mm)}
}
}
\source{
\url{http://ag... |
context("test-type-vctr")
test_that("constructor sets attributes", {
x <- new_vctr(1:4, class = "x", x = 1)
expect_equal(x, structure(1:4, class = c("x", "vctrs_vctr"), x = 1))
})
test_that(".data must be a vector", {
expect_error(new_vctr(mean), "vector type")
})
test_that("attributes other than names are ign... | /packrat/lib/x86_64-pc-linux-gnu/3.6.1/vctrs/tests/testthat/test-type-vctr.R | no_license | josehur/test_rstudio | R | false | false | 13,956 | r | context("test-type-vctr")
test_that("constructor sets attributes", {
x <- new_vctr(1:4, class = "x", x = 1)
expect_equal(x, structure(1:4, class = c("x", "vctrs_vctr"), x = 1))
})
test_that(".data must be a vector", {
expect_error(new_vctr(mean), "vector type")
})
test_that("attributes other than names are ign... |
\name{netsnp}
\alias{netsnp}
\title{Reconstructs intra- and inter- chromosomal conditional interactions among genetic loci}
\description{
This is one of the main functions of the \pkg{netgwas} package. This function can be used to reconstruct the intra- and inter-chromosomal interactions among genetic loci in diploid... | /man/netsnp.Rd | no_license | cran/netgwas | R | false | false | 5,669 | rd | \name{netsnp}
\alias{netsnp}
\title{Reconstructs intra- and inter- chromosomal conditional interactions among genetic loci}
\description{
This is one of the main functions of the \pkg{netgwas} package. This function can be used to reconstruct the intra- and inter-chromosomal interactions among genetic loci in diploid... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitting_funcs.R
\name{mult_abund_probit}
\alias{mult_abund_probit}
\title{Perform RJMCMC for posterior sampling of multivariate cluster occurence
model with Bernoulli observations}
\usage{
mult_abund_probit(data_list, prior_list, initial_lis... | /man/mult_abund_probit.Rd | no_license | DataFusion18/multAbund | R | false | true | 2,282 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitting_funcs.R
\name{mult_abund_probit}
\alias{mult_abund_probit}
\title{Perform RJMCMC for posterior sampling of multivariate cluster occurence
model with Bernoulli observations}
\usage{
mult_abund_probit(data_list, prior_list, initial_lis... |
{{rimport}}('__init__.r', 'plot.r')
infile = {{i.infile | R}}
outfile = {{o.outfile | R}}
outdir = {{o.outdir | R}}
inopts = {{args.inopts | R}}
params = {{args.params | R}}
devpars = {{args.devpars | R}}
ggs = {{args.ggs | R}}
indata = read.table.inopts(infile, inopts)
params$returnAUC = T
plotfile = file.... | /bioprocs/scripts/plot/pROC.r | permissive | LeaveYeah/bioprocs | R | false | false | 595 | r |
{{rimport}}('__init__.r', 'plot.r')
infile = {{i.infile | R}}
outfile = {{o.outfile | R}}
outdir = {{o.outdir | R}}
inopts = {{args.inopts | R}}
params = {{args.params | R}}
devpars = {{args.devpars | R}}
ggs = {{args.ggs | R}}
indata = read.table.inopts(infile, inopts)
params$returnAUC = T
plotfile = file.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calcFST.R
\name{calcFST}
\alias{calcFST}
\title{Calculates SNP-level FST values given two populations}
\usage{
calcFST(genotype_file, fam_file, output_folder, output_file)
}
\arguments{
\item{genotype_file}{(char) path to PLINK-formatted SNP ... | /man/calcFST.Rd | permissive | BaderLab/POPPATHR | R | false | true | 614 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calcFST.R
\name{calcFST}
\alias{calcFST}
\title{Calculates SNP-level FST values given two populations}
\usage{
calcFST(genotype_file, fam_file, output_folder, output_file)
}
\arguments{
\item{genotype_file}{(char) path to PLINK-formatted SNP ... |
testlist <- list(A = structure(c(2.31584307023018e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_row... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613101887-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 343 | r | testlist <- list(A = structure(c(2.31584307023018e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_row... |
library(tidyverse)
# Load in table of nested CV results
f <- "/path/to/BLSF_AGEs_ElasticNet_GSCV_NestedCVResults.csv"
p <- "/path/to/BLSF_AGEs_ElasticNet_GSCV_NestedCVResults.pdf"
g <- "/path/to/BLSF_AGEs_ElasticNet_GSCV_NestedCVResults.png"
CV_raw <- readr::read_csv(f) %>%
dplyr::select(Accuracy = test_accuracy, S... | /Plotting/BLSF_AGEs_ElasticNet_NestedCVResults.R | no_license | nathanpincus/PA_Virulence_Prediction | R | false | false | 1,705 | r | library(tidyverse)
# Load in table of nested CV results
f <- "/path/to/BLSF_AGEs_ElasticNet_GSCV_NestedCVResults.csv"
p <- "/path/to/BLSF_AGEs_ElasticNet_GSCV_NestedCVResults.pdf"
g <- "/path/to/BLSF_AGEs_ElasticNet_GSCV_NestedCVResults.png"
CV_raw <- readr::read_csv(f) %>%
dplyr::select(Accuracy = test_accuracy, S... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/renv.R
\name{renv_new}
\alias{renv_new}
\title{Create a minimal R environment for a post}
\usage{
renv_new(name, collection = "posts")
}
\arguments{
\item{name}{The folder in which the article is located}
\item{collection}{The collection the... | /man/renv_new.Rd | permissive | wzbillings/refinery | R | false | true | 511 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/renv.R
\name{renv_new}
\alias{renv_new}
\title{Create a minimal R environment for a post}
\usage{
renv_new(name, collection = "posts")
}
\arguments{
\item{name}{The folder in which the article is located}
\item{collection}{The collection the... |
df <- d %>%
select(name, compromise, F2, F4, F7, F8, F9, PreT2:PreT8,issue) %>%
mutate(compromise = if_else(compromise==1, "Compromise", "No Compromise")) %>%
mutate_at(c("F2", "F4", "F7", "F8", "PreT2", "PreT3", "PreT4", "PreT5", "PreT6",
"PreT7_1", "PreT7_2", "PreT7_3", "PreT7_4", "PreT7_5", "Pre... | /src/analysis/distribution_unbalanced_vars.R | permissive | MarikenvdVelden/bend-break-compromise | R | false | false | 3,757 | r | df <- d %>%
select(name, compromise, F2, F4, F7, F8, F9, PreT2:PreT8,issue) %>%
mutate(compromise = if_else(compromise==1, "Compromise", "No Compromise")) %>%
mutate_at(c("F2", "F4", "F7", "F8", "PreT2", "PreT3", "PreT4", "PreT5", "PreT6",
"PreT7_1", "PreT7_2", "PreT7_3", "PreT7_4", "PreT7_5", "Pre... |
dfhead <- read.table("household_power_consumption.txt",header=FALSE, sep=";",nrows=1,stringsAsFactors = FALSE)
df <- read.table("household_power_consumption.txt",header=FALSE, sep=";",skip= grep("1/2/2007",readLines("household_power_consumption.txt")),nrows=2878)
colnames(df) <- unlist(dfhead)
##df2 <- df
##df2$Date <-... | /plot1.R | no_license | gaayatri/ExData_Plotting1 | R | false | false | 578 | r | dfhead <- read.table("household_power_consumption.txt",header=FALSE, sep=";",nrows=1,stringsAsFactors = FALSE)
df <- read.table("household_power_consumption.txt",header=FALSE, sep=";",skip= grep("1/2/2007",readLines("household_power_consumption.txt")),nrows=2878)
colnames(df) <- unlist(dfhead)
##df2 <- df
##df2$Date <-... |
## Matrix inversion is usually a costly compuation
## and there may be some benefit to caching the inverse of a matrix
## rather than compute it repeatedly
## This function creates a special "matrix" object that can
## cache its inverse
makeCacheMatrix <- function(x = numeric()) {
cache <- NULL
setMatrix <... | /cachematrix.R | no_license | reemai/ProgrammingAssignment2 | R | false | false | 1,132 | r | ## Matrix inversion is usually a costly compuation
## and there may be some benefit to caching the inverse of a matrix
## rather than compute it repeatedly
## This function creates a special "matrix" object that can
## cache its inverse
makeCacheMatrix <- function(x = numeric()) {
cache <- NULL
setMatrix <... |
### process_WEF.R:
### Do not run stand-alone - source from main data_prep.R for TourismRecreation.
###
### reformat and add rgn_ids to World Economic Forum (WEF) data
###
### Provenance:
### Jun2015 Casey O'Hara - updated for 2015, removed gapfilling, set up for .csv instead of .pdf
### Mar2014 JStewartLo... | /globalprep/tr/v2015/R/process_WEF.R | no_license | OHI-Science/ohiprep_v2018 | R | false | false | 3,561 | r | ### process_WEF.R:
### Do not run stand-alone - source from main data_prep.R for TourismRecreation.
###
### reformat and add rgn_ids to World Economic Forum (WEF) data
###
### Provenance:
### Jun2015 Casey O'Hara - updated for 2015, removed gapfilling, set up for .csv instead of .pdf
### Mar2014 JStewartLo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ClusterLhnData.R
\name{ClusterLhnData}
\alias{ClusterLhnData}
\title{A function for fitting Shahar's LHN data to the linear-nonlinear-poisson
model.}
\usage{
ClusterLhnData(Data, numClusters = 3, kalpha = 10, thalpha = 3/20,
sdv0 = 0.1, tau... | /man/ClusterLhnData.Rd | no_license | sfrechter/physplit.analysis | R | false | true | 3,709 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ClusterLhnData.R
\name{ClusterLhnData}
\alias{ClusterLhnData}
\title{A function for fitting Shahar's LHN data to the linear-nonlinear-poisson
model.}
\usage{
ClusterLhnData(Data, numClusters = 3, kalpha = 10, thalpha = 3/20,
sdv0 = 0.1, tau... |
server = function(input, output, session) {
respCol <- reactive({ which(colnames(mtcars)%in%input$response) })
output$factors <- renderUI({
selectInput('factor2',
'Choose Factors',
choices = colnames(mtcars)[-respCol()],
multiple = T)
})
output$output <... | /inst/apps/significant_factors/server.R | no_license | Auburngrads/teachingApps | R | false | false | 1,333 | r | server = function(input, output, session) {
respCol <- reactive({ which(colnames(mtcars)%in%input$response) })
output$factors <- renderUI({
selectInput('factor2',
'Choose Factors',
choices = colnames(mtcars)[-respCol()],
multiple = T)
})
output$output <... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_bed.R
\name{read_bed}
\alias{read_bed}
\title{Read a BED file}
\usage{
read_bed(file, col_names = def_names("bed"), col_types = def_types("bed"), ...)
}
\arguments{
\item{file}{Either a path to a file, a connection, or literal data
(eith... | /man/read_bed.Rd | permissive | quanrd/gggenomes | R | false | true | 2,349 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_bed.R
\name{read_bed}
\alias{read_bed}
\title{Read a BED file}
\usage{
read_bed(file, col_names = def_names("bed"), col_types = def_types("bed"), ...)
}
\arguments{
\item{file}{Either a path to a file, a connection, or literal data
(eith... |
# | -------------------------------------------------------------------------- |
# | Getting & Cleaning Data - Prograamming Assignment - John Christensen
# | -------------------------------------------------------------------------- |
# | --------------------------------------------------------------------------... | /run_analysis.R | no_license | john-s-christensen/CourseraGetting-CleaningData | R | false | false | 7,459 | r | # | -------------------------------------------------------------------------- |
# | Getting & Cleaning Data - Prograamming Assignment - John Christensen
# | -------------------------------------------------------------------------- |
# | --------------------------------------------------------------------------... |
# STAT149
# Shi (Stephen) Fang
setwd('/Users/sfang/Dropbox/Courses/Spring 2015/AM207/Project')
require(gam)
require(rpart)
require(rpart.plot)
require(randomForest)
require(boot)
save = T # save plots?
data = read.csv('Data/games_2015_tournament.csv',header=T,as.is=T)
data = subset(data, game_group==1)
data = within(d... | /src/model/Variable Selection.R | no_license | micahlanier/bayesket-ball | R | false | false | 5,408 | r | # STAT149
# Shi (Stephen) Fang
setwd('/Users/sfang/Dropbox/Courses/Spring 2015/AM207/Project')
require(gam)
require(rpart)
require(rpart.plot)
require(randomForest)
require(boot)
save = T # save plots?
data = read.csv('Data/games_2015_tournament.csv',header=T,as.is=T)
data = subset(data, game_group==1)
data = within(d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/map.R
\name{mapImage}
\alias{mapImage}
\title{Add an Image to a Map}
\usage{
mapImage(longitude, latitude, z, zlim, zclip = FALSE, breaks, col, colormap,
border = NA, lwd = par("lwd"), lty = par("lty"), missingColor = NA,
filledContour = ... | /man/mapImage.Rd | no_license | AnneMTreasure/oce | R | false | true | 7,260 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/map.R
\name{mapImage}
\alias{mapImage}
\title{Add an Image to a Map}
\usage{
mapImage(longitude, latitude, z, zlim, zclip = FALSE, breaks, col, colormap,
border = NA, lwd = par("lwd"), lty = par("lty"), missingColor = NA,
filledContour = ... |
# Coursera Exploratory Data Analysis
# Project_1
# plot_2
library("dplyr")
setwd("D:\\Exploratory_Data_Analysis\\Project_1")
Data_00 <- read.table("D:\\Exploratory_Data_Analysis\\Project_1\\household_power_consumption.txt", header = TRUE, sep = ";", stringsAsFactors=FALSE)
Data_00$Date <- as.Date(Data_00$Date, forma... | /plot2.R | no_license | chyb/Coursera-Exploratory-Data-Analysis | R | false | false | 872 | r |
# Coursera Exploratory Data Analysis
# Project_1
# plot_2
library("dplyr")
setwd("D:\\Exploratory_Data_Analysis\\Project_1")
Data_00 <- read.table("D:\\Exploratory_Data_Analysis\\Project_1\\household_power_consumption.txt", header = TRUE, sep = ";", stringsAsFactors=FALSE)
Data_00$Date <- as.Date(Data_00$Date, forma... |
library(pvsR)
### Name: Rating.getSig
### Title: Get detailed information about a special interest group
### Aliases: Rating.getSig
### ** Examples
# First, make sure your personal PVS API key is saved as character string in the pvs.key variable:
## Not run: pvs.key <- "yourkey"
# get information about certain spec... | /data/genthat_extracted_code/pvsR/examples/Rating.getSig.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 411 | r | library(pvsR)
### Name: Rating.getSig
### Title: Get detailed information about a special interest group
### Aliases: Rating.getSig
### ** Examples
# First, make sure your personal PVS API key is saved as character string in the pvs.key variable:
## Not run: pvs.key <- "yourkey"
# get information about certain spec... |
## This function creates a special "matrix" object that can cache its inverse
## A pair of functions that cache the inverse of a matrix.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()){
inv <- NULL
set <- function(y){
x <<- y
inv <<-... | /cachematrix.R | no_license | numan-sharif/ProgrammingAssignment2 | R | false | false | 879 | r | ## This function creates a special "matrix" object that can cache its inverse
## A pair of functions that cache the inverse of a matrix.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()){
inv <- NULL
set <- function(y){
x <<- y
inv <<-... |
#' Plot andeler/rater i stabelplot
#'
#' Denne funksjonen tar som input en dataramme med andeler av tre kategorier
#' som til sammen summerer til 100%
#'
#' @param plotdata En dataramme med rater/andeler i spesifisert form
#' @param outfile Angir filnavn og format på figuren som returneres,
#'
#' @return Et plot av rat... | /R/indikatorFigAndelStabelGrVar_justert.R | no_license | SKDE-Felles/indikatoR | R | false | false | 3,734 | r | #' Plot andeler/rater i stabelplot
#'
#' Denne funksjonen tar som input en dataramme med andeler av tre kategorier
#' som til sammen summerer til 100%
#'
#' @param plotdata En dataramme med rater/andeler i spesifisert form
#' @param outfile Angir filnavn og format på figuren som returneres,
#'
#' @return Et plot av rat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is_scalar_in.R
\name{is.scalar_in}
\alias{is.scalar_in}
\alias{is.scalar_in01}
\title{Test if scalar is in interval}
\usage{
is.scalar_in(left, right)
is.scalar_in01(x)
}
\arguments{
\item{left, right}{lower and upper bound}
\... | /man/is.scalar_in.Rd | no_license | cran/incadata | R | false | true | 893 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is_scalar_in.R
\name{is.scalar_in}
\alias{is.scalar_in}
\alias{is.scalar_in01}
\title{Test if scalar is in interval}
\usage{
is.scalar_in(left, right)
is.scalar_in01(x)
}
\arguments{
\item{left, right}{lower and upper bound}
\... |
rankhospital <- function(state, outcome, rank) {
# This function returns the best hospital (lower mortality rate)
# for a given outcome
state <- toupper(state)
# Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
# Check that the state is valid
if(!(state %i... | /rankhospital.R | no_license | roccobarbi/ProgrammingAssignment3 | R | false | false | 1,742 | r | rankhospital <- function(state, outcome, rank) {
# This function returns the best hospital (lower mortality rate)
# for a given outcome
state <- toupper(state)
# Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
# Check that the state is valid
if(!(state %i... |
# This function is for filtering the low-quality iSNVs by specified positions
library(tidyverse)
pos_head_tail <- c(1:100, (29903-99):29903) # positions 1:100 and (29903-99):29903 should be removed;
df_primer_new <- read_tsv("../../2021-10-11_nCoV_primers/results/primers_20211011.bed", col_names=F) # primers
df_prim... | /scripts/helper/isnv_position_filter.R | no_license | Leo-Poon-Lab/mutations-under-sarscov2-vaccination | R | false | false | 1,627 | r | # This function is for filtering the low-quality iSNVs by specified positions
library(tidyverse)
pos_head_tail <- c(1:100, (29903-99):29903) # positions 1:100 and (29903-99):29903 should be removed;
df_primer_new <- read_tsv("../../2021-10-11_nCoV_primers/results/primers_20211011.bed", col_names=F) # primers
df_prim... |
#' Find WWW Domains
#'
#' @description Hand function to return the \code{www} domain.
#'
#' @param x A vector from which the domain information is desired.
#'
#' @keywords Manipulation
#'
#' @export
#' @examples
#' x1 <- "http://stackoverflow.com/questions/19020749/function-to-extract-domain-name-from-url-in-r"
#' x... | /SciencesPo/R/has.domain.R | no_license | ingted/R-Examples | R | false | false | 577 | r | #' Find WWW Domains
#'
#' @description Hand function to return the \code{www} domain.
#'
#' @param x A vector from which the domain information is desired.
#'
#' @keywords Manipulation
#'
#' @export
#' @examples
#' x1 <- "http://stackoverflow.com/questions/19020749/function-to-extract-domain-name-from-url-in-r"
#' x... |
log <- file(snakemake@log[[1]], open="wt")
sink(log, type = "output")
sink(log, type = "message")
library(tidyverse)
library(hexbin)
library(rdist)
##CKMRpop::install_spip(Dir = system.file(package = "CKMRpop"))
##remotes::install_github("eriqande/CKMRpop", build_vignettes = TRUE)
library(CKMRpop)
#vignette("species_... | /R/single-rep-full-output.R | no_license | eriqande/runnin_robins_ckmrpop_sims_on_sedna | R | false | false | 9,232 | r | log <- file(snakemake@log[[1]], open="wt")
sink(log, type = "output")
sink(log, type = "message")
library(tidyverse)
library(hexbin)
library(rdist)
##CKMRpop::install_spip(Dir = system.file(package = "CKMRpop"))
##remotes::install_github("eriqande/CKMRpop", build_vignettes = TRUE)
library(CKMRpop)
#vignette("species_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/01-get_data.R
\name{get_data_of_brazil}
\alias{get_data_of_brazil}
\title{Downloading data from Ibama database - Multas arrecadadas}
\usage{
get_data_of_brazil(estados = "all", tipo_multa)
}
\value{
A tibble
}
\description{
Downloading data f... | /man/get_data_of_brazil.Rd | permissive | cccneto/Ibamam | R | false | true | 381 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/01-get_data.R
\name{get_data_of_brazil}
\alias{get_data_of_brazil}
\title{Downloading data from Ibama database - Multas arrecadadas}
\usage{
get_data_of_brazil(estados = "all", tipo_multa)
}
\value{
A tibble
}
\description{
Downloading data f... |
######## Fleming and Harrington #########
######## Ref. paper T. Hasegawa 2014 pharmaceutical statistics ##########
sample.size_FH<-function(eps,p,b,tau,omega,lambda,lambda.trt,rho, gamma,alpha,beta){
# every sequence starts from 0
# b<-30
z.alpha<-qnorm(p=alpha,lower.tail = FALSE)
z.beta<-qnorm(p=beta,lower.ta... | /R/Hasegawa2014.R | no_license | biostata/IAfrac | R | false | false | 2,569 | r | ######## Fleming and Harrington #########
######## Ref. paper T. Hasegawa 2014 pharmaceutical statistics ##########
sample.size_FH<-function(eps,p,b,tau,omega,lambda,lambda.trt,rho, gamma,alpha,beta){
# every sequence starts from 0
# b<-30
z.alpha<-qnorm(p=alpha,lower.tail = FALSE)
z.beta<-qnorm(p=beta,lower.ta... |
## Save spp2exclude, spp2include and sitenames as internal data
exclosures:::save_internaldata()
library(exclosures)
#### READ AND PREPROCESS DATA #####
## Read site info
read_siteinfo("data-raw/sites_info_raw.csv")
## Read and prepare species info
read_sppinfo(sppdata = "data-raw/species_info_raw.csv")
## Read ... | /makefile.R | permissive | Pakillo/exclosures-Almoraima | R | false | false | 731 | r |
## Save spp2exclude, spp2include and sitenames as internal data
exclosures:::save_internaldata()
library(exclosures)
#### READ AND PREPROCESS DATA #####
## Read site info
read_siteinfo("data-raw/sites_info_raw.csv")
## Read and prepare species info
read_sppinfo(sppdata = "data-raw/species_info_raw.csv")
## Read ... |
options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
# we need that to not crash galaxy with an UTF8 error on German LC settings.
loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
suppressPackageStartupMessages({
library("fgsea")
library("optparse")
l... | /annotateMyIDs.r | permissive | galaxycammel/galaxy-annotateMyIDs | R | false | false | 2,424 | r | options( show.error.messages=F, error = function () { cat( geterrmessage(), file=stderr() ); q( "no", 1, F ) } )
# we need that to not crash galaxy with an UTF8 error on German LC settings.
loc <- Sys.setlocale("LC_MESSAGES", "en_US.UTF-8")
suppressPackageStartupMessages({
library("fgsea")
library("optparse")
l... |
#2017402063%%10 --> 3
#3 Consumer Price Index (2003=100)(TURKSTAT) -> "CLOTHING AND FOOTWEAR"
#Homework 2 ----
library(EVDS)
library(lubridate)
library(ggplot2 )
library(ggcorrplot)
library(skimr)
library(data.table)
library(corrplot)
library(GGally)
set_evds_key("O05EUMEwx4")
library(readxl)
library(forecast)
#Dat... | /files/Homework 2/Homework 2.R | no_license | BU-IE-360/spring21-alpserdaroglu | R | false | false | 6,146 | r | #2017402063%%10 --> 3
#3 Consumer Price Index (2003=100)(TURKSTAT) -> "CLOTHING AND FOOTWEAR"
#Homework 2 ----
library(EVDS)
library(lubridate)
library(ggplot2 )
library(ggcorrplot)
library(skimr)
library(data.table)
library(corrplot)
library(GGally)
set_evds_key("O05EUMEwx4")
library(readxl)
library(forecast)
#Dat... |
## Stagerunners are [tree structures](https://en.wikipedia.org/wiki/Tree_(data_structure))
## and come with a natural set of operations, like taking the predecessor,
## successor, and root of a node. However, these are not entirely simple to
## implement in a manner that is implementation-independent.
##
## Specificall... | /R/treeSkeleton.R | permissive | mindis/stagerunner | R | false | false | 6,433 | r | ## Stagerunners are [tree structures](https://en.wikipedia.org/wiki/Tree_(data_structure))
## and come with a natural set of operations, like taking the predecessor,
## successor, and root of a node. However, these are not entirely simple to
## implement in a manner that is implementation-independent.
##
## Specificall... |
#EasyCharts团队出品,如有商用必究,
#如需使用与深入学习,请联系微信:EasyCharts
library(ggplot2)
library(data.table) #提供data.table()函数
library(ggTimeSeries)
library(RColorBrewer)
set.seed(1234)
dat <- data.table(
date = seq(as.Date("1/01/2014", "%d/%m/%Y"),as.Date("31/12/2017", "%d/%m/%Y"),"days"),
ValueCol = runif(1461)
)
dat[, ValueCol :=... | /第6章 时间序列型图表/图6-2-2 日历图.R | no_license | Easy-Shu/Beautiful-Visualization-with-R | R | false | false | 2,886 | r |
#EasyCharts团队出品,如有商用必究,
#如需使用与深入学习,请联系微信:EasyCharts
library(ggplot2)
library(data.table) #提供data.table()函数
library(ggTimeSeries)
library(RColorBrewer)
set.seed(1234)
dat <- data.table(
date = seq(as.Date("1/01/2014", "%d/%m/%Y"),as.Date("31/12/2017", "%d/%m/%Y"),"days"),
ValueCol = runif(1461)
)
dat[, ValueCol :=... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PhaseTypeGenetics.R
\docType{package}
\name{PhaseTypeGenetics}
\alias{PhaseTypeGenetics}
\alias{PhaseTypeGenetics-package}
\title{PhaseTypeGenetics: A package providing several properties of the phase-type
distribution with applications in po... | /man/PhaseTypeGenetics.Rd | no_license | aumath-advancedr2019/PhaseTypeGenetics | R | false | true | 2,849 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PhaseTypeGenetics.R
\docType{package}
\name{PhaseTypeGenetics}
\alias{PhaseTypeGenetics}
\alias{PhaseTypeGenetics-package}
\title{PhaseTypeGenetics: A package providing several properties of the phase-type
distribution with applications in po... |
#' @import hitandrun
#' @export
sampleParameters <- function(model, numberOfSamples = 1000) {
stopifnot(numberOfSamples > 0)
stopifnot(all(model$constraints$types == "C"))
if (!isModelConsistent(model)) {
stop("Model infeasible.")
}
nrAlternatives <- nrow(model$perfToModelVariables)
nrC... | /R/sampling.R | no_license | kciomek/vfranking | R | false | false | 2,927 | r | #' @import hitandrun
#' @export
sampleParameters <- function(model, numberOfSamples = 1000) {
stopifnot(numberOfSamples > 0)
stopifnot(all(model$constraints$types == "C"))
if (!isModelConsistent(model)) {
stop("Model infeasible.")
}
nrAlternatives <- nrow(model$perfToModelVariables)
nrC... |
library(tidyverse)
library(rvest)
library(stringr)
setwd("~/Dropbox/democrats/election-results-data/greenwood/2016")
county <- "greenwood"
turnouturl <- read_html("http://www.enr-scvotes.org/SC/Greenwood/64682/183626/en/vt_data.html")
sturl <- "http://www.enr-scvotes.org/SC/Greenwood/64682/183626/en/md_data.html?cid... | /greenwood/2016/1-scrape-election-results-greenwood.R | no_license | svmiller/upstate-election-data | R | false | false | 5,448 | r | library(tidyverse)
library(rvest)
library(stringr)
setwd("~/Dropbox/democrats/election-results-data/greenwood/2016")
county <- "greenwood"
turnouturl <- read_html("http://www.enr-scvotes.org/SC/Greenwood/64682/183626/en/vt_data.html")
sturl <- "http://www.enr-scvotes.org/SC/Greenwood/64682/183626/en/md_data.html?cid... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ut_poly.r
\docType{data}
\name{ut_poly}
\alias{ut_poly}
\title{Utah state boundary, excluding tribal jurisdictions (unofficial)}
\format{
An sf type polygon shapefile
}
\usage{
ut_poly
}
\description{
Polygon showing unofficial boundaries of ... | /man/ut_poly.Rd | permissive | utah-dwq/wqTools | R | false | true | 482 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ut_poly.r
\docType{data}
\name{ut_poly}
\alias{ut_poly}
\title{Utah state boundary, excluding tribal jurisdictions (unofficial)}
\format{
An sf type polygon shapefile
}
\usage{
ut_poly
}
\description{
Polygon showing unofficial boundaries of ... |
library(httr)
library(httpuv)
library(jsonlite)
library(sqldf)
library(XML)
# 1. Find OAuth settings for github:
# http://developer.github.com/v3/oauth/
oauth_endpoints("github")
# 2. To make your own application, register at
# https://github.com/settings/developers. Use any URL for the homepage URL
# (http... | /Quiz2/week2_CourseraQuiz.R | no_license | Ecologo/datasciencecoursera | R | false | false | 1,332 | r |
library(httr)
library(httpuv)
library(jsonlite)
library(sqldf)
library(XML)
# 1. Find OAuth settings for github:
# http://developer.github.com/v3/oauth/
oauth_endpoints("github")
# 2. To make your own application, register at
# https://github.com/settings/developers. Use any URL for the homepage URL
# (http... |
library(koRpus.lang.en)
### Name: lang.support.en
### Title: Language support for English
### Aliases: lang.support.en
### ** Examples
lang.support.en()
| /data/genthat_extracted_code/koRpus.lang.en/examples/lang.support.en.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 160 | r | library(koRpus.lang.en)
### Name: lang.support.en
### Title: Language support for English
### Aliases: lang.support.en
### ** Examples
lang.support.en()
|
#' @rdname authentication
#' @export
twitch_auth_forget = function(){ httr::reset_config() } | /R/twitch_auth_forget.R | permissive | praster1/igdbV4 | R | false | false | 92 | r | #' @rdname authentication
#' @export
twitch_auth_forget = function(){ httr::reset_config() } |
###
### The gauge module renders a gauge with a title and statistics below the gauge
###
piesModuleUI <- function(id){
# set namespace via id
ns <- NS(id)
tagList(uiOutput(ns("Pies")))
}
# module server
piesModule <- function(input, output, session, moduleData){
ns <- session$ns
#### Render pies --... | /Shiny_Tools/dashboard_showcase-master/app/modules/piesModule.R | no_license | DannyJRa/Shiny_Tools | R | false | false | 2,248 | r | ###
### The gauge module renders a gauge with a title and statistics below the gauge
###
piesModuleUI <- function(id){
# set namespace via id
ns <- NS(id)
tagList(uiOutput(ns("Pies")))
}
# module server
piesModule <- function(input, output, session, moduleData){
ns <- session$ns
#### Render pies --... |
utils::globalVariables(c("invDRIFT","II","DRIFTexp","vec2diag","diag2vec",
"mxData","mxMatrix","mxAlgebra","MANIFESTVARbase","MANIFESTVARcholdiag",
"MANIFESTVARchol","T0VARbase","T0VARcholdiag","T0VARchol","DIFFUSIONbase",
"DIFFUSIONcholdiag","DIFFUSIONchol","invDRIFTHATCH","cvectorize","DRIFTHATCH",
"TRAITVARb... | /R/ctsem.R | no_license | AndreMikulec/ctsem | R | false | false | 3,503 | r | utils::globalVariables(c("invDRIFT","II","DRIFTexp","vec2diag","diag2vec",
"mxData","mxMatrix","mxAlgebra","MANIFESTVARbase","MANIFESTVARcholdiag",
"MANIFESTVARchol","T0VARbase","T0VARcholdiag","T0VARchol","DIFFUSIONbase",
"DIFFUSIONcholdiag","DIFFUSIONchol","invDRIFTHATCH","cvectorize","DRIFTHATCH",
"TRAITVARb... |
# lookup tables are downloaded from
# https://www.census.gov/programs-surveys/acs/technical-documentation/summary-file-documentation.2017.html
# more general, the lookup table are located in usertools subdirectory of ftp sites, for old years.
# https://www2.census.gov/programs-surveys/acs/summary_file/2010/documentatio... | /data_raw/acs/create_acs_file_table_lookup.R | no_license | RealCoChenchao/totalcensus | R | false | false | 8,024 | r | # lookup tables are downloaded from
# https://www.census.gov/programs-surveys/acs/technical-documentation/summary-file-documentation.2017.html
# more general, the lookup table are located in usertools subdirectory of ftp sites, for old years.
# https://www2.census.gov/programs-surveys/acs/summary_file/2010/documentatio... |
test_that("list and defaultlist behave the same when elements exist", {
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Starting with en empty dlist
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dl <- empty_dlist(0)
ll <- list()
expect_true(i... | /tests/testthat/test-list-like-behaviour.R | permissive | coolbutuseless/defaultlist | R | false | false | 2,550 | r |
test_that("list and defaultlist behave the same when elements exist", {
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Starting with en empty dlist
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dl <- empty_dlist(0)
ll <- list()
expect_true(i... |
# Create different vectors
val = 1:20
print(val)
val = 20:1
print(val)
val = c(1:20, 19:1)
print(val)
tmp = c(4, 6, 3)
print(tmp) | /Day 2/11.R | no_license | eElec/DALab | R | false | false | 133 | r | # Create different vectors
val = 1:20
print(val)
val = 20:1
print(val)
val = c(1:20, 19:1)
print(val)
tmp = c(4, 6, 3)
print(tmp) |
shinyUI(fluidPage(
titlePanel(
h3("MPG Calculation",align="left")
),
sidebarLayout(
sidebarPanel(
h3("Instruction:"),
helpText("Please select manual/automatic transmission,weight of car,and 1/4 mile time of car,and click 'Submit'."),
radioButtons("am",label=h5("Tr... | /shinyproject/ui.R | no_license | Maggiebj/DDP-project | R | false | false | 2,173 | r | shinyUI(fluidPage(
titlePanel(
h3("MPG Calculation",align="left")
),
sidebarLayout(
sidebarPanel(
h3("Instruction:"),
helpText("Please select manual/automatic transmission,weight of car,and 1/4 mile time of car,and click 'Submit'."),
radioButtons("am",label=h5("Tr... |
## x=barcode names for cerebellum, y=barcode names for cortex
## probe.id=list of DM probes, data.type=cell type corrected or non-cell type corrected data (the entire data frame)
## outputs the table called probes which gives you a table of probe IDs, p.value, and adjusted p values for each probe
wilcox.test.probes <- ... | /data/processed_data/WilcoxTestProbes.R | no_license | suminwei2772/team_Methylhomies | R | false | false | 829 | r | ## x=barcode names for cerebellum, y=barcode names for cortex
## probe.id=list of DM probes, data.type=cell type corrected or non-cell type corrected data (the entire data frame)
## outputs the table called probes which gives you a table of probe IDs, p.value, and adjusted p values for each probe
wilcox.test.probes <- ... |
#' @title Calculate trail
#' @description Calculate the trail. For further information have a look at
#' \url{http://en.wikipedia.org/wiki/Bicycle_and_motorcycle_geometry}.
#' @param dia Diameter of the wheel including the tire [mm].
#' @param rake The rake, also known as fork offest [mm].
#' @param ha Head angle [de... | /R/calc_trail.R | no_license | jannes-m/velo | R | false | false | 1,346 | r | #' @title Calculate trail
#' @description Calculate the trail. For further information have a look at
#' \url{http://en.wikipedia.org/wiki/Bicycle_and_motorcycle_geometry}.
#' @param dia Diameter of the wheel including the tire [mm].
#' @param rake The rake, also known as fork offest [mm].
#' @param ha Head angle [de... |
#' Plot Exonic Mapping Rate
#'
#' Ideally, at least 60 percent of total reads should map to exons.
#'
#' @name plotExonicMappingRate
#' @family Quality Control Functions
#' @author Michael Steinbaugh, Rory Kirchner, Victor Barrera
#'
#' @inheritParams general
#'
#' @return `ggplot`.
#'
#' @examples
#' plotExonicMapping... | /R/plotExonicMappingRate-methods.R | permissive | enginbozaba/bcbioRNASeq | R | false | false | 2,327 | r | #' Plot Exonic Mapping Rate
#'
#' Ideally, at least 60 percent of total reads should map to exons.
#'
#' @name plotExonicMappingRate
#' @family Quality Control Functions
#' @author Michael Steinbaugh, Rory Kirchner, Victor Barrera
#'
#' @inheritParams general
#'
#' @return `ggplot`.
#'
#' @examples
#' plotExonicMapping... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/events.R
\name{read_keds2}
\alias{read_keds2}
\title{Read in KEDS output files}
\usage{
read_keds2(d, one.a.day = TRUE)
}
\arguments{
\item{d}{one or more names of KEDS output}
\item{one.a.day}{whether we should apply the one-a-day event fil... | /man/read_keds2.Rd | no_license | conjugateprior/events | R | false | true | 398 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/events.R
\name{read_keds2}
\alias{read_keds2}
\title{Read in KEDS output files}
\usage{
read_keds2(d, one.a.day = TRUE)
}
\arguments{
\item{d}{one or more names of KEDS output}
\item{one.a.day}{whether we should apply the one-a-day event fil... |
# This function processes simulated datasets created with the function make.pps.als. It takes the posterior phylograms and simulated alignments. The function creates the posterior predictive simulated distribution of phylograms. this function also requires the empirical dataset and the assumed topology.
make.pps.tr <-... | /clock_modad/make.pps.trs.R | no_license | duchene/modadclocks | R | false | false | 892 | r | # This function processes simulated datasets created with the function make.pps.als. It takes the posterior phylograms and simulated alignments. The function creates the posterior predictive simulated distribution of phylograms. this function also requires the empirical dataset and the assumed topology.
make.pps.tr <-... |
## -----------------------------------------------------------------------------------------------------------------
# Megatrends: Characterizing residual transmission
# assess_megatrends.r
#
# Amelia Bertozzi-Villa, Institute for Disease Modeling, University of Oxford
# December 2018
#
# As per the request of the WH... | /megatrends/assess_residual_transmission.r | no_license | InstituteforDiseaseModeling/archetypes-intervention-impact | R | false | false | 11,537 | r | ## -----------------------------------------------------------------------------------------------------------------
# Megatrends: Characterizing residual transmission
# assess_megatrends.r
#
# Amelia Bertozzi-Villa, Institute for Disease Modeling, University of Oxford
# December 2018
#
# As per the request of the WH... |
# test_ISOFeatureType.R
# Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
#
# Description: Unit tests for ISOFeatureType.R
#=======================
require(geometa, quietly = TRUE)
require(testthat)
context("ISOFeatureType")
test_that("encoding",{
testthat::skip_on_cran()
#featuretype
md <- ... | /tests/testthat/test_ISOFeatureType.R | no_license | cran/geometa | R | false | false | 5,366 | r | # test_ISOFeatureType.R
# Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
#
# Description: Unit tests for ISOFeatureType.R
#=======================
require(geometa, quietly = TRUE)
require(testthat)
context("ISOFeatureType")
test_that("encoding",{
testthat::skip_on_cran()
#featuretype
md <- ... |
#' Prepare a parameter-long data frame for statistical analysis
#'
#' @param .data Data in parameter-long form
#' @param key The column name that contains the column names of the data matrix
#' @param value The column name that contains the values
#' @param qualifiers Columns that add context to observations (e.g., de... | /R/nested_data_matrix.R | permissive | paleolimbot/tidypaleo | R | false | false | 13,782 | r |
#' Prepare a parameter-long data frame for statistical analysis
#'
#' @param .data Data in parameter-long form
#' @param key The column name that contains the column names of the data matrix
#' @param value The column name that contains the values
#' @param qualifiers Columns that add context to observations (e.g., de... |
#' A function that checks, if the two given vectors have equal length.
#'
#' @param vector1 A arbitrary vector.
#' @param vector2 A arbitrary vector.
#' @return The boolean value TRUE, if the two given vectors have equal length.
check_vector_equal_length <- function(vector1, vector2) {
return(length(vector1) == leng... | /R/inputchecker.R | no_license | KonstantinRK/tempnetwork | R | false | false | 1,272 | r |
#' A function that checks, if the two given vectors have equal length.
#'
#' @param vector1 A arbitrary vector.
#' @param vector2 A arbitrary vector.
#' @return The boolean value TRUE, if the two given vectors have equal length.
check_vector_equal_length <- function(vector1, vector2) {
return(length(vector1) == leng... |
##load the large dataset.
filename <- "./data/household_power_consumption.txt"
data <- read.table(filename,
header = TRUE,
sep = ";",
colClasses = c("character", "character", rep("numeric",7)),
na = "?")
dim(data) # 2075259 9
attach(data)
## W... | /load_data.R | no_license | wym007/ExData_Plotting1 | R | false | false | 593 | r | ##load the large dataset.
filename <- "./data/household_power_consumption.txt"
data <- read.table(filename,
header = TRUE,
sep = ";",
colClasses = c("character", "character", rep("numeric",7)),
na = "?")
dim(data) # 2075259 9
attach(data)
## W... |
# Push
# Last edited 1/17/2016
# Manny
## NOTES:
# REDUCE SIZE? NEED TO SHORTEN LOAD TIME
# REDUCE AT LEAST ONE OF STRENGTH OR SCORE STATE (GROUP PP/SH OR LEADING/TRAILING)
# KEEP ONLY LINES AND PAIRINGS (SET MIN TOI?)
# Load libraries
library(RSQLite)
library(dplyr)
## Load DB Tables
# Link to database
link <- "~/... | /Push.R | no_license | Cophy08/Push | R | false | false | 15,736 | r | # Push
# Last edited 1/17/2016
# Manny
## NOTES:
# REDUCE SIZE? NEED TO SHORTEN LOAD TIME
# REDUCE AT LEAST ONE OF STRENGTH OR SCORE STATE (GROUP PP/SH OR LEADING/TRAILING)
# KEEP ONLY LINES AND PAIRINGS (SET MIN TOI?)
# Load libraries
library(RSQLite)
library(dplyr)
## Load DB Tables
# Link to database
link <- "~/... |
### Implementation of by-cases for vegan 2.2 versions of
### anova.cca. These are all internal functions that are not intended
### to be called by users in normal sessions, but they should be
### called from anova.cca (2.2). Therefore the user interface is rigid
### and input is not checked. The 'permutations' should b... | /R/anova.ccabyterm.R | no_license | guiblanchet/vegan | R | false | false | 6,799 | r | ### Implementation of by-cases for vegan 2.2 versions of
### anova.cca. These are all internal functions that are not intended
### to be called by users in normal sessions, but they should be
### called from anova.cca (2.2). Therefore the user interface is rigid
### and input is not checked. The 'permutations' should b... |
testlist <- list(testX = c(191493125665849920, 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, 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, 0), trainX ... | /dann/inst/testfiles/calc_distance_C/AFL_calc_distance_C/calc_distance_C_valgrind_files/1609866813-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 1,199 | r | testlist <- list(testX = c(191493125665849920, 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, 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, 0), trainX ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/seq_scan_sim.R
\name{seq_scan_sim}
\alias{seq_scan_sim}
\title{Perform scan test on simulated data sequentially}
\usage{
seq_scan_sim(
nsim = 1,
nn,
ty,
ex,
type = "poisson",
ein = NULL,
eout = NULL,
tpop = NULL,... | /man/seq_scan_sim.Rd | no_license | cran/smerc | R | false | true | 3,016 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/seq_scan_sim.R
\name{seq_scan_sim}
\alias{seq_scan_sim}
\title{Perform scan test on simulated data sequentially}
\usage{
seq_scan_sim(
nsim = 1,
nn,
ty,
ex,
type = "poisson",
ein = NULL,
eout = NULL,
tpop = NULL,... |
/Formação Cientista de Dados/Atividades/Estatística II em R/7 - Regressão Linear Simples PARTE II.R | no_license | lucianofbn/Data-Scientist | R | false | false | 379 | r | ||
#' msrat: Metrics-Based Software Reliability Assessment Tool
#'
#' This package provides estimation programs for metrics-based software
#' reliability growth models with logistic regression for dynamic metrics
#' and Poisson regression for static metrics.
#'
#' @docType package
#' @name msrat
#' @import R6 Rsrat
#' @im... | /R/package.R | permissive | SwReliab/msrat | R | false | false | 473 | r | #' msrat: Metrics-Based Software Reliability Assessment Tool
#'
#' This package provides estimation programs for metrics-based software
#' reliability growth models with logistic regression for dynamic metrics
#' and Poisson regression for static metrics.
#'
#' @docType package
#' @name msrat
#' @import R6 Rsrat
#' @im... |
MMRtime <- function(x, d, age) {
#### estimate Mean/Median Residual lifetime over age.
temp <- WKM( x=x , d=d )
tivec <- temp$times
pivec <- temp$jump
if( age >= tivec[length(tivec)] ) stop("age too large")
if( age < tivec[1] ) warning("age smaller than first event time")
pivec[ tivec < age ] <- 0
Sage <- sum( pivec... | /R/MMRtime.R | no_license | cran/emplik | R | false | false | 534 | r | MMRtime <- function(x, d, age) {
#### estimate Mean/Median Residual lifetime over age.
temp <- WKM( x=x , d=d )
tivec <- temp$times
pivec <- temp$jump
if( age >= tivec[length(tivec)] ) stop("age too large")
if( age < tivec[1] ) warning("age smaller than first event time")
pivec[ tivec < age ] <- 0
Sage <- sum( pivec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TranscriptsRelated.R
\name{remove.verylong.isoform.gff}
\alias{remove.verylong.isoform.gff}
\title{Remove isforms with extremly long interval (isoform.End - isoform.Start)}
\usage{
remove.verylong.isoform.gff(gff, interval.length = 1500000)
}... | /man/remove.verylong.isoform.gff.Rd | permissive | siegmundwang/loonR | R | false | true | 625 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TranscriptsRelated.R
\name{remove.verylong.isoform.gff}
\alias{remove.verylong.isoform.gff}
\title{Remove isforms with extremly long interval (isoform.End - isoform.Start)}
\usage{
remove.verylong.isoform.gff(gff, interval.length = 1500000)
}... |
library(plumber)
plumb("./server/api.R") %>%
pr_static("/", "../client/public") %>%
pr_set_docs(FALSE) %>%
pr_run(host="0.0.0.0", port=80)
| /runApp.R | permissive | BigDataGrapes-EU/d5.3-gacovi | R | false | false | 149 | r | library(plumber)
plumb("./server/api.R") %>%
pr_static("/", "../client/public") %>%
pr_set_docs(FALSE) %>%
pr_run(host="0.0.0.0", port=80)
|
#'@export
#' @importFrom graphics plot
plot.generalize <- function(x, ...){
plot(x$samples, ...)
}
#'@export
#'@importFrom graphics hist
hist.generalize <- function(x, var = "P11s",
xlab = var,
breaks = 50,
main = "",
... | /R/plot.R | no_license | carloscinelli/generalizing | R | false | false | 845 | r | #'@export
#' @importFrom graphics plot
plot.generalize <- function(x, ...){
plot(x$samples, ...)
}
#'@export
#'@importFrom graphics hist
hist.generalize <- function(x, var = "P11s",
xlab = var,
breaks = 50,
main = "",
... |
#K-Nearest Neighbour Classifier
#Implement a KNN model to classify the animals in to categories
#Loading the packages
library(caret)
library(gmodels)
library(class)
#Import the Data
zoo <- read.csv("E:/Data science Excelr/Assigments/KNN/Zoo/Zoo.csv")
attach(zoo)
View(zoo)
summary(zoo)#Get the Structure of the Datas... | /3. Algorithms/Supervised Machine Learning Algorithms/KNN/Zoo/Zoo.R | no_license | Nikita9779/Datascience_R_codes | R | false | false | 6,177 | r | #K-Nearest Neighbour Classifier
#Implement a KNN model to classify the animals in to categories
#Loading the packages
library(caret)
library(gmodels)
library(class)
#Import the Data
zoo <- read.csv("E:/Data science Excelr/Assigments/KNN/Zoo/Zoo.csv")
attach(zoo)
View(zoo)
summary(zoo)#Get the Structure of the Datas... |
library(here)
library(tidyverse)
library(ggdist)
theme_set(theme_minimal())
qlt <- readRDS(here("data", "SDE_QLTY_total.rds")) %>%
mutate(bird_sp = ifelse(bird_sp == "Sylvia communis", "Curruca communis", bird_sp),
bird_sp = ifelse(bird_sp == "Sylvia melanocephala", "Curruca melanocephala", bird_sp),
... | /code/figscode/Fig_SDE_QLTY.R | permissive | PJordano-Lab/MS_effectiveness | R | false | false | 1,554 | r |
library(here)
library(tidyverse)
library(ggdist)
theme_set(theme_minimal())
qlt <- readRDS(here("data", "SDE_QLTY_total.rds")) %>%
mutate(bird_sp = ifelse(bird_sp == "Sylvia communis", "Curruca communis", bird_sp),
bird_sp = ifelse(bird_sp == "Sylvia melanocephala", "Curruca melanocephala", bird_sp),
... |
set.seed( 48 )
library(mvtnorm)
library(fields)
library(Rcpp)
library(mclust)
library(kernlab)
library(ConsensusClusterPlus)
simu=function(s){
prob_glcm<-function(c,s=s,mc=30000){
mu<-c(2+c,14-c)
sigma<-matrix(s*c(1,-0.7,-0.7,1),nrow=2)
elip<-rmvnorm(mc,mu,sigma)
# par(xaxs='i',yaxs='i')
... | /s=15/simu_48.R | no_license | mguindanigroup/Radiomics-Hierarchical-Rounded-Gaussian-Spatial-Dirichlet-Process | R | false | false | 9,293 | r | set.seed( 48 )
library(mvtnorm)
library(fields)
library(Rcpp)
library(mclust)
library(kernlab)
library(ConsensusClusterPlus)
simu=function(s){
prob_glcm<-function(c,s=s,mc=30000){
mu<-c(2+c,14-c)
sigma<-matrix(s*c(1,-0.7,-0.7,1),nrow=2)
elip<-rmvnorm(mc,mu,sigma)
# par(xaxs='i',yaxs='i')
... |
testlist <- list(a = 0L, b = 0L, x = c(-134219777L, 150931466L, 1691484407L, -524536L, -16252928L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610386869-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 543 | r | testlist <- list(a = 0L, b = 0L, x = c(-134219777L, 150931466L, 1691484407L, -524536L, -16252928L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... |
rm(list=ls())
library(readxl)
library(maps)
library(mapdata)
library(ggplot2)
library(gbm)
library(dplyr)
library(glmnet)
setwd("C:/Users/prakh/Desktop/Intro to ML/Assignment 1/US_Data")
df = read_excel('vehicles.xlsx')
## Understanding the structure of the dataframe
str(df)
## Understanding the d... | /Used_Car_Prices_Prediction.R | no_license | prakharb13/Used-Car-Prices-Prediction-in-R | R | false | false | 16,215 | r | rm(list=ls())
library(readxl)
library(maps)
library(mapdata)
library(ggplot2)
library(gbm)
library(dplyr)
library(glmnet)
setwd("C:/Users/prakh/Desktop/Intro to ML/Assignment 1/US_Data")
df = read_excel('vehicles.xlsx')
## Understanding the structure of the dataframe
str(df)
## Understanding the d... |
companies <- read.delim("companies.txt", header = TRUE, na.strings=c("","NA") )
rounds2 <- read.csv("rounds2.csv", stringsAsFactors = FALSE, na.strings=c("","NA"))
#Table 1.1: Understand the Data Set
#1. How many unique companies are present in rounds2?
#Method1: Using Dplyr:
count(distinct(rounds2, company_per... | /InvestmentCaseStudy.r | no_license | Bhumit-t/InvestmentCaseStuday | R | false | false | 1,919 | r | companies <- read.delim("companies.txt", header = TRUE, na.strings=c("","NA") )
rounds2 <- read.csv("rounds2.csv", stringsAsFactors = FALSE, na.strings=c("","NA"))
#Table 1.1: Understand the Data Set
#1. How many unique companies are present in rounds2?
#Method1: Using Dplyr:
count(distinct(rounds2, company_per... |
fn <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
fl <- tempfile()
download.file(fn, fl) # Download the file
file <- unzip(fl) # Unzip it
unlink(fl)
# Read the file
pwr <- read.table(file, header = TRUE, stringsAsFactors = FALSE, sep = ";")
pwr$Global_active_powe... | /Plot2.R | no_license | Timlri/ExData_Plotting1 | R | false | false | 782 | r |
fn <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
fl <- tempfile()
download.file(fn, fl) # Download the file
file <- unzip(fl) # Unzip it
unlink(fl)
# Read the file
pwr <- read.table(file, header = TRUE, stringsAsFactors = FALSE, sep = ";")
pwr$Global_active_powe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenericDefinition.R
\name{coordToPixel}
\alias{coordToPixel}
\title{coordToPixel
coordToPixel translates xy coordinates from the locator() function
to cell coordinates from the image function. Origo is according to
ToF-SIMS images the uppe... | /man/coordToPixel.Rd | no_license | lorenzgerber/tofsims | R | false | true | 720 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenericDefinition.R
\name{coordToPixel}
\alias{coordToPixel}
\title{coordToPixel
coordToPixel translates xy coordinates from the locator() function
to cell coordinates from the image function. Origo is according to
ToF-SIMS images the uppe... |
#' Build home page
#'
#' First looks for `index.Rmd` or `README.Rmd`, then
#' `index.md` or `README.md`. If none are found, falls back to the
#' description field in `DESCRIPTION`.
#'
#' @section YAML config:
#' To tweak the home page, you need a section called `home`.
#'
#' The sidebar links are automatically generate... | /R/build-home.R | no_license | romainfrancois/pkgdown | R | false | false | 8,051 | r | #' Build home page
#'
#' First looks for `index.Rmd` or `README.Rmd`, then
#' `index.md` or `README.md`. If none are found, falls back to the
#' description field in `DESCRIPTION`.
#'
#' @section YAML config:
#' To tweak the home page, you need a section called `home`.
#'
#' The sidebar links are automatically generate... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chart_amGauge.R
\name{amSolidGauge}
\alias{amSolidGauge}
\title{Plotting solid gauge using rAmCharts}
\usage{
amSolidGauge(
x,
min = 0,
max = 100,
type = "full",
width = 20,
color = "",
text = "",
textSize = 20,
... | /man/amSolidGauge.Rd | no_license | cran/rAmCharts | R | false | true | 2,353 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chart_amGauge.R
\name{amSolidGauge}
\alias{amSolidGauge}
\title{Plotting solid gauge using rAmCharts}
\usage{
amSolidGauge(
x,
min = 0,
max = 100,
type = "full",
width = 20,
color = "",
text = "",
textSize = 20,
... |
runscript <- function(x, method=c('run', 'copy', 'view', 'show', 'dir'),
ask = TRUE, fmt="ch%02d.R", package="FinTS",
subdir="scripts", lib.loc=NULL){
##
## 1. Set up
##
method <- match.arg(method)
# chnames <- c(...) # chapter names
# if (missing(x)) x <- match(se... | /R/runscript.R | no_license | cran/FinTS | R | false | false | 1,768 | r | runscript <- function(x, method=c('run', 'copy', 'view', 'show', 'dir'),
ask = TRUE, fmt="ch%02d.R", package="FinTS",
subdir="scripts", lib.loc=NULL){
##
## 1. Set up
##
method <- match.arg(method)
# chnames <- c(...) # chapter names
# if (missing(x)) x <- match(se... |
github_GET <- function(path, ..., host = "api.github.com", pat = github_pat(), use_curl = !is_standalone() && pkg_installed("curl")) {
url <- build_url(host, path)
if (isTRUE(use_curl)) {
h <- curl::new_handle()
headers <- c(
if (!is.null(pat)) {
c("Authorization" = paste0("token ", pat))
... | /R/github.R | no_license | jimhester/remotes | R | false | false | 3,775 | r |
github_GET <- function(path, ..., host = "api.github.com", pat = github_pat(), use_curl = !is_standalone() && pkg_installed("curl")) {
url <- build_url(host, path)
if (isTRUE(use_curl)) {
h <- curl::new_handle()
headers <- c(
if (!is.null(pat)) {
c("Authorization" = paste0("token ", pat))
... |
library(ape)
testtree <- read.tree("8690_2.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="8690_2_unrooted.txt") | /codeml_files/newick_trees_processed/8690_2/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("8690_2.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="8690_2_unrooted.txt") |
#' Select a geographic region around the distribution of a species
#'
#' This function takes as arguments a SpatialPolygonsDataFrame with a column representing whether or not a species was detected in each polygon. It then selects a subset of the shape focused around the area of detections.
#' @param x SpatialPolygonsD... | /code/getGeogFocus.r | permissive | adamlilith/tropicosMassModeling | R | false | false | 6,072 | r | #' Select a geographic region around the distribution of a species
#'
#' This function takes as arguments a SpatialPolygonsDataFrame with a column representing whether or not a species was detected in each polygon. It then selects a subset of the shape focused around the area of detections.
#' @param x SpatialPolygonsD... |
#####################################################################
## load required libraries ##########################################
#####################################################################
#install.packages("poLCA")
library(poLCA)
##################################################################... | /carcinoma_lca/lca_carcinoma.R | no_license | seaneff/website | R | false | false | 4,541 | r | #####################################################################
## load required libraries ##########################################
#####################################################################
#install.packages("poLCA")
library(poLCA)
##################################################################... |
library(svglite)
library(readr)
library(Biostrings)
library(Rsamtools)
library(rtracklayer)
library(GenomicFeatures)
library(data.table)
library(stringr)
#load some utility functions
source("/fast_new/work/groups/ag_ohler/dharnet_m/Ribo_Lausanne/functions.R")
#load excel data, parse
stopifnot(c("ere_Peptides", "lncRNA... | /src/annotation_find.R | no_license | zslastman/Ribo_Lausanne | R | false | false | 8,820 | r | library(svglite)
library(readr)
library(Biostrings)
library(Rsamtools)
library(rtracklayer)
library(GenomicFeatures)
library(data.table)
library(stringr)
#load some utility functions
source("/fast_new/work/groups/ag_ohler/dharnet_m/Ribo_Lausanne/functions.R")
#load excel data, parse
stopifnot(c("ere_Peptides", "lncRNA... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Qskat.R
\name{KAT.cnull}
\alias{KAT.cnull}
\title{Fit a null linear regression model}
\usage{
KAT.cnull(Y, X)
}
\arguments{
\item{Y}{continuous outcome}
\item{X}{covariates to be adjusted, setting X=NULL with no covariate}
}
\description{
Fi... | /man/KAT.cnull.Rd | no_license | biostatpzeng/mkatr | R | false | true | 408 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Qskat.R
\name{KAT.cnull}
\alias{KAT.cnull}
\title{Fit a null linear regression model}
\usage{
KAT.cnull(Y, X)
}
\arguments{
\item{Y}{continuous outcome}
\item{X}{covariates to be adjusted, setting X=NULL with no covariate}
}
\description{
Fi... |
# cat_building - Experiment 3b
# write output of analysis to text file?
write.output <- TRUE
# load required packages
libs <- c("plyr", "binom", "lme4", "lmerTest", "tidyr","ggplot2")
lapply(libs, library, character.only = TRUE)
# define standard error function
sem <- function(var){
return(sd(var) / sqrt(length(v... | /cat_building/exp3b_analysis.r | no_license | ssnod/psych_experiments | R | false | false | 33,320 | r | # cat_building - Experiment 3b
# write output of analysis to text file?
write.output <- TRUE
# load required packages
libs <- c("plyr", "binom", "lme4", "lmerTest", "tidyr","ggplot2")
lapply(libs, library, character.only = TRUE)
# define standard error function
sem <- function(var){
return(sd(var) / sqrt(length(v... |
context("ExpressionSet to data.frame coercion")
Biobase::pData(eset)$pcol <- letters[1:3]
Biobase::fData(eset)$fcol <- letters[4:6]
test_that("maintains sample/feature order", {
out <- to_dataframe(eset)
expect_is(out$sample, "factor")
expect_equal(levels(out$sample), Biobase::sampleNames(eset))
expect_is(o... | /tests/testthat/test-coercion.r | no_license | aaronwolen/metafiler | R | false | false | 2,314 | r | context("ExpressionSet to data.frame coercion")
Biobase::pData(eset)$pcol <- letters[1:3]
Biobase::fData(eset)$fcol <- letters[4:6]
test_that("maintains sample/feature order", {
out <- to_dataframe(eset)
expect_is(out$sample, "factor")
expect_equal(levels(out$sample), Biobase::sampleNames(eset))
expect_is(o... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/btbv5_radi_fac_only.R
\name{btbv5_radi_fac_only}
\alias{btbv5_radi_fac_only}
\title{btbv5_radi_fac_only}
\usage{
btbv5_radi_fac_only(df, osa_group_p, osa_class_p, osa_specialization_p)
}
\arguments{
\item{osa_specialization_p}{}
}
\value{
}
... | /man/btbv5_radi_fac_only.Rd | no_license | utah-osa/hcctools2 | R | false | true | 356 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/btbv5_radi_fac_only.R
\name{btbv5_radi_fac_only}
\alias{btbv5_radi_fac_only}
\title{btbv5_radi_fac_only}
\usage{
btbv5_radi_fac_only(df, osa_group_p, osa_class_p, osa_specialization_p)
}
\arguments{
\item{osa_specialization_p}{}
}
\value{
}
... |
testlist <- list(phi = 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, 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), x = c(1.36656528938164e-311, -1.65791256519293e+82, 1.29418168595419e-228,... | /dcurver/inst/testfiles/ddc/AFL_ddc/ddc_valgrind_files/1609866518-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 796 | r | testlist <- list(phi = 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, 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), x = c(1.36656528938164e-311, -1.65791256519293e+82, 1.29418168595419e-228,... |
### ===== actuar: An R Package for Actuarial Science =====
###
### Creation of grouped data objects
###
### See Klugman, Panjer & Willmot, Loss Models, Wiley, 1998.
###
### AUTHORS: Vincent Goulet <vincent.goulet@act.ulaval.ca>,
### Mathieu Pigeon, Louis-Philippe Pouliot
grouped.data <- function(..., right = TRUE, row... | /actuar/R/grouped.data.R | no_license | ingted/R-Examples | R | false | false | 1,997 | r | ### ===== actuar: An R Package for Actuarial Science =====
###
### Creation of grouped data objects
###
### See Klugman, Panjer & Willmot, Loss Models, Wiley, 1998.
###
### AUTHORS: Vincent Goulet <vincent.goulet@act.ulaval.ca>,
### Mathieu Pigeon, Louis-Philippe Pouliot
grouped.data <- function(..., right = TRUE, row... |
\name{power.mean}
\alias{power.mean}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
power.mean(values, order = 1, weights = rep(1, length(values)))
}
%- maybe also 'usage'... | /man/power.mean.Rd | permissive | ljallen/RDiversity | R | false | false | 2,467 | rd | \name{power.mean}
\alias{power.mean}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
power.mean(values, order = 1, weights = rep(1, length(values)))
}
%- maybe also 'usage'... |
A = matrix(1:100, nrow=6)
B = matrix(1:1000, nrow=6)
#make nrow a multiple of 100
A = matrix(1:100, nrow=10)
#make nrow a multiple of 1000
B = matrix(1:1000, nrow=10)
#Transpose A and B
t(A)
t(B)
#create two vectors (a and b)
a = c(1:2)
b = c(1:4)
#multpily matrices by vectors
X = a*A
Y = b*B
#re-assign the vecto... | /Assignment 5.R | no_license | MsOshie/sturdy-octo-telegram | R | false | false | 697 | r | A = matrix(1:100, nrow=6)
B = matrix(1:1000, nrow=6)
#make nrow a multiple of 100
A = matrix(1:100, nrow=10)
#make nrow a multiple of 1000
B = matrix(1:1000, nrow=10)
#Transpose A and B
t(A)
t(B)
#create two vectors (a and b)
a = c(1:2)
b = c(1:4)
#multpily matrices by vectors
X = a*A
Y = b*B
#re-assign the vecto... |
# SIMULATION DATA ANALYSIS # 2
# Create own plot folder
plot_folder <- "~/Dropbox/dissertation/paper_3/plots/"
library(MASS)
library(rstan)
library(cmdstanr)
library(data.table)
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
cbbPalette <- c("#000000", "#E69F00"... | /paper_3/sim_study_2.R | no_license | stonegold546/dissertation_papers | R | false | false | 11,042 | r | # SIMULATION DATA ANALYSIS # 2
# Create own plot folder
plot_folder <- "~/Dropbox/dissertation/paper_3/plots/"
library(MASS)
library(rstan)
library(cmdstanr)
library(data.table)
cbPalette <- c("#999999", "#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7")
cbbPalette <- c("#000000", "#E69F00"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_operations.R
\name{connect_list_contact_flows}
\alias{connect_list_contact_flows}
\title{Provides information about the contact flows for the specified Amazon
Connect instance}
\usage{
connect_list_contact_flows(InstanceId, ContactFlo... | /cran/paws.customer.engagement/man/connect_list_contact_flows.Rd | permissive | TWarczak/paws | R | false | true | 1,931 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_operations.R
\name{connect_list_contact_flows}
\alias{connect_list_contact_flows}
\title{Provides information about the contact flows for the specified Amazon
Connect instance}
\usage{
connect_list_contact_flows(InstanceId, ContactFlo... |
testlist <- list(Beta = 0, CVLinf = 0, FM = 5.87938118551083e-322, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 7.13706800764285e-79, SL95 = 5.42289851365943e+188, nage = 0L, nlen = 0L, rLens = numeric(... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615830351-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 381 | r | testlist <- list(Beta = 0, CVLinf = 0, FM = 5.87938118551083e-322, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 7.13706800764285e-79, SL95 = 5.42289851365943e+188, nage = 0L, nlen = 0L, rLens = numeric(... |
###### data setting ###################################################
setwd("D:/MyGitHub/Computer_Intensive_Statistics_in_Ecology/data")
rawdata <- read.table("modeldata.txt")
x.test <- as.matrix(cbind(1, rawdata[, 1:2]))
y.valid <- as.matrix(rawdata[, 3:5])
n <- dim(rawdata)[1] # number of data point
n.run <- 10... | /homework17_Multi-layer perceptron.r | no_license | snakepowerpoint/Computer_Intensive_Statistics_in_Ecology | R | false | false | 7,964 | r | ###### data setting ###################################################
setwd("D:/MyGitHub/Computer_Intensive_Statistics_in_Ecology/data")
rawdata <- read.table("modeldata.txt")
x.test <- as.matrix(cbind(1, rawdata[, 1:2]))
y.valid <- as.matrix(rawdata[, 3:5])
n <- dim(rawdata)[1] # number of data point
n.run <- 10... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.