content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
source("src/DataFile.R")
RDSFile<-function(filepath) {
return(
as.proto(
parent=DataFile(filepath),
x=list(
.load=function(this) {
return(readRDS(this$path))
},
.save=function(this, data) {
saveRDS(data, this$path)
}
)
)
)
} | /src/RDSFile.R | no_license | ryanc16/dada2-batched-pipeline | R | false | false | 307 | r | source("src/DataFile.R")
RDSFile<-function(filepath) {
return(
as.proto(
parent=DataFile(filepath),
x=list(
.load=function(this) {
return(readRDS(this$path))
},
.save=function(this, data) {
saveRDS(data, this$path)
}
)
)
)
} |
#' Convert a sequence of images to a video by FFmpeg
#'
#' This function opens a graphics device to record the images produced in the
#' code \code{expr}, then uses FFmpeg to convert these images to a video.
#'
#' This function uses \code{\link{system}} to call FFmpeg to convert the images
#' to a single video. The com... | /R/saveVideo.R | no_license | jariou/animation | R | false | false | 4,821 | r | #' Convert a sequence of images to a video by FFmpeg
#'
#' This function opens a graphics device to record the images produced in the
#' code \code{expr}, then uses FFmpeg to convert these images to a video.
#'
#' This function uses \code{\link{system}} to call FFmpeg to convert the images
#' to a single video. The com... |
#=================================
# WindNinja
#=================================
library(leaflet)
library(ShinyDash)
library(shinyIncubator)
library(shiny)
#install_github('ShinyDash', 'trestletech')
#install_github('ShinyDash', 'trestletech')
#install_github('leaflet-shiny', 'jcheng5')
row <- function(.... | /windninja/ui.R | no_license | nwagenbrenner/shiny-applauncher | R | false | false | 7,708 | r | #=================================
# WindNinja
#=================================
library(leaflet)
library(ShinyDash)
library(shinyIncubator)
library(shiny)
#install_github('ShinyDash', 'trestletech')
#install_github('ShinyDash', 'trestletech')
#install_github('leaflet-shiny', 'jcheng5')
row <- function(.... |
library(ggplot2)
library(scatterplot3d)
library(viridis)
gpc3d2<-function(data,parameter1,parameter2,parameter3,alpha,xadj,yadj,colors){
par1<-data[,which(names(data)==parameter1)]
par2<-data[,which(names(data)==parameter2)]
par3<-data[,which(names(data)==parameter3)]
gpc3d.object<-scatterplot3d(par1,par2,par3... | /Homework/Motion/Motion.R | no_license | TobyJChappell/CS_710 | R | false | false | 1,104 | r | library(ggplot2)
library(scatterplot3d)
library(viridis)
gpc3d2<-function(data,parameter1,parameter2,parameter3,alpha,xadj,yadj,colors){
par1<-data[,which(names(data)==parameter1)]
par2<-data[,which(names(data)==parameter2)]
par3<-data[,which(names(data)==parameter3)]
gpc3d.object<-scatterplot3d(par1,par2,par3... |
library(sf)
library(data.table)
# source("~/Dropbox/git/postgis/postgis_functions.r")
# con <- dbConnect(PostgreSQL(), dbname = "retail_typology", user = "user", password = "pwd")
# import_or_append(con, working_dirs = "~/Dropbox/liverpool/boundaries/new_boundaries", shp_names = "all_boundaries_fin.shp", srid = 2770... | /create_variables/vacancy.r | permissive | mpavlis/retail_typology | R | false | false | 2,060 | r | library(sf)
library(data.table)
# source("~/Dropbox/git/postgis/postgis_functions.r")
# con <- dbConnect(PostgreSQL(), dbname = "retail_typology", user = "user", password = "pwd")
# import_or_append(con, working_dirs = "~/Dropbox/liverpool/boundaries/new_boundaries", shp_names = "all_boundaries_fin.shp", srid = 2770... |
# ------------------------------------------------------------------------------
# update_role_requirements()
test_that("`role` is validated", {
df <- tibble(y = 1, x = 2)
rec <- recipe(y ~ ., df)
expect_snapshot(error = TRUE, {
update_role_requirements(rec, 1)
})
expect_snapshot(error = TRUE, {
up... | /tests/testthat/test-update-role-requirements.R | permissive | tidymodels/recipes | R | false | false | 6,864 | r | # ------------------------------------------------------------------------------
# update_role_requirements()
test_that("`role` is validated", {
df <- tibble(y = 1, x = 2)
rec <- recipe(y ~ ., df)
expect_snapshot(error = TRUE, {
update_role_requirements(rec, 1)
})
expect_snapshot(error = TRUE, {
up... |
# TOOL concatenate.R: "Concatenate files" (Writes the content of selected files into one output file. You can use this tool for example for merging FASTQ files.)
# INPUT input{...}.data: "Input files" TYPE GENERIC
# OUTPUT OPTIONAL concatenated.txt
# OUTPUT OPTIONAL concatenated.html
# OUTPUT OPTIONAL concatenated.tsv
... | /tools/common/R/concatenate.R | permissive | chipster/chipster-tools | R | false | false | 3,155 | r | # TOOL concatenate.R: "Concatenate files" (Writes the content of selected files into one output file. You can use this tool for example for merging FASTQ files.)
# INPUT input{...}.data: "Input files" TYPE GENERIC
# OUTPUT OPTIONAL concatenated.txt
# OUTPUT OPTIONAL concatenated.html
# OUTPUT OPTIONAL concatenated.tsv
... |
#######################################
###### Effort Report Script ###########
#######################################
# This is one of four files to generate the effort reports
# The files required are:
# 1. effort.functions.R
# 2. effort_report_script.R
# 3. student_effort_report_markdown.Rmd
# 4. teach... | /code/effort_report_script.R | no_license | benwhicks/effort_reporting_with_mail | R | false | false | 8,391 | r | #######################################
###### Effort Report Script ###########
#######################################
# This is one of four files to generate the effort reports
# The files required are:
# 1. effort.functions.R
# 2. effort_report_script.R
# 3. student_effort_report_markdown.Rmd
# 4. teach... |
data(rivers)
head(rivers)
?rivers
boxplot(rivers)
log_rivers<-log(rivers)
boxplot(log_rivers)
| /Lesson06/Exercise38/Exercise38.R | no_license | nicedev2020/Applied-Unsupervised-Learning-with-R-eLearning | R | false | false | 100 | r | data(rivers)
head(rivers)
?rivers
boxplot(rivers)
log_rivers<-log(rivers)
boxplot(log_rivers)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.R
\name{print.bayz}
\alias{print.bayz}
\title{Print function for bayz class}
\usage{
\method{print}{bayz}(x, ...)
}
\arguments{
\item{x}{bayz object}
\item{...}{additional parameters}
}
\value{
Nothing, only prints
}
\description{
Prin... | /man/print.bayz.Rd | no_license | ljanss/BayzR | R | false | true | 340 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/print.R
\name{print.bayz}
\alias{print.bayz}
\title{Print function for bayz class}
\usage{
\method{print}{bayz}(x, ...)
}
\arguments{
\item{x}{bayz object}
\item{...}{additional parameters}
}
\value{
Nothing, only prints
}
\description{
Prin... |
test_that("zip_ocs works", {
tmp = tempfile()
dir.create(tmp)
expect_equal(zip_ocs('ocs-bp-co2-emissions', outpath = tmp), TRUE)
})
| /tests/testthat/test-zip_ocs.R | permissive | opencasestudies/OCSdata | R | false | false | 138 | r | test_that("zip_ocs works", {
tmp = tempfile()
dir.create(tmp)
expect_equal(zip_ocs('ocs-bp-co2-emissions', outpath = tmp), TRUE)
})
|
args = commandArgs(trailingOnly=TRUE)
library(rmarkdown)
render("infographics.Rmd", output_file=paste(c(args[1], ".html"), sep="", collapse=""), params = list(csv_file_1 = paste(c(args[1], "_1.csv"), sep="", collapse=""), csv_file_2 = paste(c(args[1], "_2.csv"), sep="", collapse=""), csv_file_3 = paste(c(args[1], "_3.c... | /backend/render.R | no_license | dmitriykuptsov/geomap | R | false | false | 349 | r | args = commandArgs(trailingOnly=TRUE)
library(rmarkdown)
render("infographics.Rmd", output_file=paste(c(args[1], ".html"), sep="", collapse=""), params = list(csv_file_1 = paste(c(args[1], "_1.csv"), sep="", collapse=""), csv_file_2 = paste(c(args[1], "_2.csv"), sep="", collapse=""), csv_file_3 = paste(c(args[1], "_3.c... |
## Creates a matrix object that caches the inverse of itself
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinv <- function(inverse) m <<- inverse
getinv <- function() m
list(set = set, get = get,
setinv = setinv,
... | /cachematrix.R | no_license | willghannon/ProgrammingAssignment2 | R | false | false | 723 | r | ## Creates a matrix object that caches the inverse of itself
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinv <- function(inverse) m <<- inverse
getinv <- function() m
list(set = set, get = get,
setinv = setinv,
... |
library(coexist)
### Name: sta.mpaircomparison
### Title: pairwise parameter comparison for multiple species with multiple
### parameter space
### Aliases: sta.mpaircomparison
### ** Examples
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the stan... | /data/genthat_extracted_code/coexist/examples/sta.mpaircomparison.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 3,392 | r | library(coexist)
### Name: sta.mpaircomparison
### Title: pairwise parameter comparison for multiple species with multiple
### parameter space
### Aliases: sta.mpaircomparison
### ** Examples
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the stan... |
#' htmlwidget for d3.js parallel-coordinates
#'
#' Create interactive parallel coordinates charts with this htmlwidget
#' wrapper for d3.js \href{http://syntagmatic.github.io/parallel-coordinates/}{parallel-coordinates}.
#'
#' @param data data.frame with data to use in the chart
#' @param rownames logical use rownames... | /R/parcoordsSoS.R | permissive | brigitte-dorner/parcoordsSoS | R | false | false | 11,358 | r | #' htmlwidget for d3.js parallel-coordinates
#'
#' Create interactive parallel coordinates charts with this htmlwidget
#' wrapper for d3.js \href{http://syntagmatic.github.io/parallel-coordinates/}{parallel-coordinates}.
#'
#' @param data data.frame with data to use in the chart
#' @param rownames logical use rownames... |
############################################################################
############################################################################
# Read in our training and testing data
library(data.table)
training <- read.csv("https://raw.githubusercontent.com/Ayzhamal/Spring_2019_Research/master/datasets/rao... | /Master_file_Angie_Feb22.R | no_license | Ayzhamal/Spring_2019_Research | R | false | false | 11,236 | r |
############################################################################
############################################################################
# Read in our training and testing data
library(data.table)
training <- read.csv("https://raw.githubusercontent.com/Ayzhamal/Spring_2019_Research/master/datasets/rao... |
targ <- function(theta) {
theta^4*(1-theta)^6
}
jump <- function(prop, x, TO = TRUE) {
if (TO) {
if (x < .5) {
dunif(prop, x, 1)
} else {
dunif(prop, 0, x)
}
} else {
if (prop < .5) {
dunif(x, prop, 1)
} else {
dunif(x, 0, prop)
}
}
}
mh_ber <- function(target, ... | /R/scripts/esim3.R | no_license | topiaskarjalainen/Kandi | R | false | false | 1,864 | r | targ <- function(theta) {
theta^4*(1-theta)^6
}
jump <- function(prop, x, TO = TRUE) {
if (TO) {
if (x < .5) {
dunif(prop, x, 1)
} else {
dunif(prop, 0, x)
}
} else {
if (prop < .5) {
dunif(x, prop, 1)
} else {
dunif(x, 0, prop)
}
}
}
mh_ber <- function(target, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tmall_milk_sales.R
\docType{data}
\name{tmall_milk_sales}
\alias{tmall_milk_sales}
\title{Tmall Market Milk Sales Data(Accumulated until 2018-07)}
\format{A dataframe containing 336 rows and 11 columns}
\usage{
data(tmall_milk_sales)
}
\descr... | /man/tmall_milk_sales.Rd | no_license | jkang37/dppbar | R | false | true | 641 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tmall_milk_sales.R
\docType{data}
\name{tmall_milk_sales}
\alias{tmall_milk_sales}
\title{Tmall Market Milk Sales Data(Accumulated until 2018-07)}
\format{A dataframe containing 336 rows and 11 columns}
\usage{
data(tmall_milk_sales)
}
\descr... |
library(portes)
### Name: InvertQ
### Title: Check Stationary and Invertibility of ARMA or VARMA Models
### Aliases: InvertQ
### Keywords: ts
### ** Examples
##############################################################
### Check Stationary
phi <- array(c(0.5,0.4,0.1,0.5,0,0.3,0,0),dim=c(2,2,2))
InvertQ(phi)
### C... | /data/genthat_extracted_code/portes/examples/InvertQ.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 415 | r | library(portes)
### Name: InvertQ
### Title: Check Stationary and Invertibility of ARMA or VARMA Models
### Aliases: InvertQ
### Keywords: ts
### ** Examples
##############################################################
### Check Stationary
phi <- array(c(0.5,0.4,0.1,0.5,0,0.3,0,0),dim=c(2,2,2))
InvertQ(phi)
### C... |
#' Random praise and encouragement
#'
#' Random praises and encouragements sayings to compliment your question and
#' quiz experience.
#'
#' @param language The language for the random phrase. The currently supported
#' languages include: `en`, `es`, `pt`, `tr`, `emo`, and `testing` (static
#' phrases).
#'
#' @ret... | /R/praise.R | permissive | CorrelAid/learnr | R | false | false | 4,835 | r |
#' Random praise and encouragement
#'
#' Random praises and encouragements sayings to compliment your question and
#' quiz experience.
#'
#' @param language The language for the random phrase. The currently supported
#' languages include: `en`, `es`, `pt`, `tr`, `emo`, and `testing` (static
#' phrases).
#'
#' @ret... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 866
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 866
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/tri... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/trivial_ntrivil_1344/trivial_ntrivil_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 701 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 866
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 866
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/tri... |
x = c (0, 5, 10, 15)
print(x)
a = seq(0,15, by = 5)
print(a)
b = seq(0,15, length.out = 4)
print(b)
| /Assignment-3/3.R | no_license | PedroINCA/Brasil_2019 | R | false | false | 110 | r | x = c (0, 5, 10, 15)
print(x)
a = seq(0,15, by = 5)
print(a)
b = seq(0,15, length.out = 4)
print(b)
|
#' @title Likelihood Ratio Chi-square (LR)
#' @export lr
#' @description Calculates the likelihod ratio chi-square statistic based on observed and expected counts.
#' @details No details in the moment.
#'
#' @param expected a vector giving the expected frequencies.
#' @param observed a vector giving the observed fre... | /confreq/R/lr.R | no_license | ingted/R-Examples | R | false | false | 1,211 | r | #' @title Likelihood Ratio Chi-square (LR)
#' @export lr
#' @description Calculates the likelihod ratio chi-square statistic based on observed and expected counts.
#' @details No details in the moment.
#'
#' @param expected a vector giving the expected frequencies.
#' @param observed a vector giving the observed fre... |
#' Calculate the proportion of mature individuals
#'
#' @description Calculates the proportion of individuals that are mature for each species and length class.
#' @param Lmat A numeric vector of length \code{nfish} representing the length at which 50\% of individuals are mature for each species.
#' @param nfish A ... | /fuzzedpackages/LeMaRns/R/calc_mature.R | no_license | akhikolla/testpackages | R | false | false | 3,348 | r | #' Calculate the proportion of mature individuals
#'
#' @description Calculates the proportion of individuals that are mature for each species and length class.
#' @param Lmat A numeric vector of length \code{nfish} representing the length at which 50\% of individuals are mature for each species.
#' @param nfish A ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/npjavatests.R
\name{sukhatme.test}
\alias{sukhatme.test}
\title{Sukhatme test for scale}
\usage{
sukhatme.test(matrix)
}
\arguments{
\item{matrix}{Matrix of data}
}
\value{
A htest object with pvalues and statistics
}
\description{
This funct... | /rNPBST/man/sukhatme.test.Rd | no_license | JacintoCC/TFG | R | false | true | 354 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/npjavatests.R
\name{sukhatme.test}
\alias{sukhatme.test}
\title{Sukhatme test for scale}
\usage{
sukhatme.test(matrix)
}
\arguments{
\item{matrix}{Matrix of data}
}
\value{
A htest object with pvalues and statistics
}
\description{
This funct... |
library(ape)
testtree <- read.tree("7540_5.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="7540_5_unrooted.txt") | /codeml_files/newick_trees_processed/7540_5/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("7540_5.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="7540_5_unrooted.txt") |
tirada <- function(size = 3 ){
dado <- 1:20
roll <- sample(x = dado, size = size)
return (roll)
}
tirada()
vector_tiradas <- c()
vector_tiradas <- c(vector_tiradas, tirada())
| /Exercises/Old/R/Prueba.R | no_license | Dibmar/Data_Analisys | R | false | false | 195 | r | tirada <- function(size = 3 ){
dado <- 1:20
roll <- sample(x = dado, size = size)
return (roll)
}
tirada()
vector_tiradas <- c()
vector_tiradas <- c(vector_tiradas, tirada())
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/input-check-helpers.R
\name{check_metrics}
\alias{check_metrics}
\title{Check whether the desired metrics are available in scoringutils}
\usage{
check_metrics(metrics)
}
\arguments{
\item{metrics}{character vector with desired metrics}
}
\val... | /man/check_metrics.Rd | permissive | epiforecasts/scoringutils | R | false | true | 560 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/input-check-helpers.R
\name{check_metrics}
\alias{check_metrics}
\title{Check whether the desired metrics are available in scoringutils}
\usage{
check_metrics(metrics)
}
\arguments{
\item{metrics}{character vector with desired metrics}
}
\val... |
library(tswge)
#gen.arma.wge(n,phi,theta,vara,sn)
#generate MA(1) data
gen.arma.wge(n=100,theta=-.99)
gen.arma.wge(n=100,theta=.99)
gen.arma.wge(n=100,theta=-.99,sn=5)#set the seed sn=5
gen.arma.wge(n=100,theta=.99,sn=5)
plotts.true.wge(theta = c(-.99))
plotts.true.wge(theta = c(.99))
#Generate MA(2) data from examp... | /Unit05/Generate MA1 and MA2 data.R | no_license | cmadding/MSDS6373 | R | false | false | 698 | r | library(tswge)
#gen.arma.wge(n,phi,theta,vara,sn)
#generate MA(1) data
gen.arma.wge(n=100,theta=-.99)
gen.arma.wge(n=100,theta=.99)
gen.arma.wge(n=100,theta=-.99,sn=5)#set the seed sn=5
gen.arma.wge(n=100,theta=.99,sn=5)
plotts.true.wge(theta = c(-.99))
plotts.true.wge(theta = c(.99))
#Generate MA(2) data from examp... |
# longitudinal_plots.R
#
# description: Covid-19 longitudinal plots
# Make two plots: IgG and IgM
#
# required_packages: tidyverse, reshape2, ggforce, scales
#
# created: 2020-06-15
# creator: Tea Dodig-Crnkovic
# contributors: Mun-Gwan Hong, Cecilia Engel Thomas, Tea Dodig-Crnkovic
#####################... | /longitudinal_plots.R | no_license | Schwenk-Lab/covid19-serology | R | false | false | 2,930 | r | # longitudinal_plots.R
#
# description: Covid-19 longitudinal plots
# Make two plots: IgG and IgM
#
# required_packages: tidyverse, reshape2, ggforce, scales
#
# created: 2020-06-15
# creator: Tea Dodig-Crnkovic
# contributors: Mun-Gwan Hong, Cecilia Engel Thomas, Tea Dodig-Crnkovic
#####################... |
#' The value function used to search the initial value for determining the individualized MCID
#' @keywords internal
imcid.hinge.smooth <- function(x, y, z, w, n, parm, lambda, delta) {
beta0 <- parm[1]
beta <- matrix(parm[-1])
u <- y * (x - beta0 - z %*% beta)
val1 <- w * 2 * (1 - 1 / delta * u) ^ 2 * if... | /R/imcid.fun.R | no_license | cran/MCID | R | false | false | 1,552 | r | #' The value function used to search the initial value for determining the individualized MCID
#' @keywords internal
imcid.hinge.smooth <- function(x, y, z, w, n, parm, lambda, delta) {
beta0 <- parm[1]
beta <- matrix(parm[-1])
u <- y * (x - beta0 - z %*% beta)
val1 <- w * 2 * (1 - 1 / delta * u) ^ 2 * if... |
# Read Source file
HPCt<-read.csv("household_power_consumption.txt", header=TRUE, sep=c(";"), colClass=c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric"), strip.white=TRUE, na.strings =c("?", ""))
#Subset dates that are required
HPCt <- subset(HPCt, dmy(Date) > "2... | /plot2.R | no_license | ManishJariwala/ExData_Plotting1 | R | false | false | 863 | r |
# Read Source file
HPCt<-read.csv("household_power_consumption.txt", header=TRUE, sep=c(";"), colClass=c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric"), strip.white=TRUE, na.strings =c("?", ""))
#Subset dates that are required
HPCt <- subset(HPCt, dmy(Date) > "2... |
#' A cluster future is a future whose value will be resolved asynchronously in a parallel process
#'
#' @inheritParams MultiprocessFuture-class
#'
#' @param globals (optional) a logical, a character vector,
#' or a named list for controlling how globals are handled.
#' For details, see section 'Globals used by future ... | /R/ClusterFuture-class.R | no_license | jcheng5/future | R | false | false | 15,536 | r | #' A cluster future is a future whose value will be resolved asynchronously in a parallel process
#'
#' @inheritParams MultiprocessFuture-class
#'
#' @param globals (optional) a logical, a character vector,
#' or a named list for controlling how globals are handled.
#' For details, see section 'Globals used by future ... |
install.packages("XML")
install.packages("RCurl")
install.packages("httr")
rm(list=ls(all.names=TRUE))#清除????????憶???
library(XML)
library(RCurl)
library(httr)
startNo = 1
endNo = 10##???數起???宣???
subPath = "https://www.ptt.cc/bbs/joke/index"
alltitle = data.frame()
for( i in c(startNo:endNo) )##跑???????... | /Data format shifting.R | no_license | Yang-Shih-Chao/R-Crawler | R | false | false | 1,133 | r | install.packages("XML")
install.packages("RCurl")
install.packages("httr")
rm(list=ls(all.names=TRUE))#清除????????憶???
library(XML)
library(RCurl)
library(httr)
startNo = 1
endNo = 10##???數起???宣???
subPath = "https://www.ptt.cc/bbs/joke/index"
alltitle = data.frame()
for( i in c(startNo:endNo) )##跑???????... |
library(stats)
getDemand <- function(N,p,b,i){
if(b==0)
print("Error! b cant't be 0.")
return (N*(1-p/b)+RandUni[i])
}
getRegret <- function(T,N,P,b,PP){
#PP: Price Pulled
RegVec=rep(0,T)
for(i in 1:T){
if(i!=1)
RegVec[i]=RegVec[i-1]+ max(P*N*(1-P/b[i]))-(PP[i]*N*(1-PP... | /test.R | no_license | shivamg13/DynamicWindow | R | false | false | 6,208 | r | library(stats)
getDemand <- function(N,p,b,i){
if(b==0)
print("Error! b cant't be 0.")
return (N*(1-p/b)+RandUni[i])
}
getRegret <- function(T,N,P,b,PP){
#PP: Price Pulled
RegVec=rep(0,T)
for(i in 1:T){
if(i!=1)
RegVec[i]=RegVec[i-1]+ max(P*N*(1-P/b[i]))-(PP[i]*N*(1-PP... |
# Load packages ---------------------------------------------------------
# devtools::install_github("stephenslab/flashr")
devtools::load_all("/Users/willwerscheid/GitHub/flashr/")
# devtools::install_github("stephenslab/ebnm")
devtools::load_all("/Users/willwerscheid/GitHub/ebnm/")
library(SQUAREM)
library(daarem)
#... | /code/squarem.R | no_license | willwerscheid/FLASHvestigations | R | false | false | 6,605 | r | # Load packages ---------------------------------------------------------
# devtools::install_github("stephenslab/flashr")
devtools::load_all("/Users/willwerscheid/GitHub/flashr/")
# devtools::install_github("stephenslab/ebnm")
devtools::load_all("/Users/willwerscheid/GitHub/ebnm/")
library(SQUAREM)
library(daarem)
#... |
# Feb 28 2014
credibleShiftSet <- function(ephy, prior, BFcriterion = 5, set.limit=0.95, ...){
if (hasArg("threshold")){
cat("Argument < threshold > has been deprecated. It is \nreplaced");
cat(" by the argument < BFcriterion >, \nwhich uses an explicit Bayes factor")
cat(" criterion to identify core shifts.\... | /BAMMtools/R/credibleShiftSet.R | no_license | jonchang/bammtools | R | false | false | 1,555 | r |
# Feb 28 2014
credibleShiftSet <- function(ephy, prior, BFcriterion = 5, set.limit=0.95, ...){
if (hasArg("threshold")){
cat("Argument < threshold > has been deprecated. It is \nreplaced");
cat(" by the argument < BFcriterion >, \nwhich uses an explicit Bayes factor")
cat(" criterion to identify core shifts.\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mice.binarize.R
\name{mice.binarize}
\alias{mice.binarize}
\title{Binarize Factor Columns in Data Frames}
\usage{
mice.binarize(data, include_ordered = TRUE, include_observed = FALSE,
cols = NULL, blocks = NULL, weights = rep(1, ncol... | /man/mice.binarize.Rd | no_license | cran/miceExt | R | false | true | 19,199 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mice.binarize.R
\name{mice.binarize}
\alias{mice.binarize}
\title{Binarize Factor Columns in Data Frames}
\usage{
mice.binarize(data, include_ordered = TRUE, include_observed = FALSE,
cols = NULL, blocks = NULL, weights = rep(1, ncol... |
#' @title Knapsack problem
#'
#' @description This package contains three functions, each trying to solve the knapsack problem in a different (and increasingly efficient) way.
#' These functions are \code{\link{knapsack_brute_force}}, \code{\link{knapsack_dynamic}} and \code{\link{knapsack_greedy}}.
#'
#' @name lab6pac... | /R/lab6package-package.R | no_license | amemem/lab6package | R | false | false | 336 | r | #' @title Knapsack problem
#'
#' @description This package contains three functions, each trying to solve the knapsack problem in a different (and increasingly efficient) way.
#' These functions are \code{\link{knapsack_brute_force}}, \code{\link{knapsack_dynamic}} and \code{\link{knapsack_greedy}}.
#'
#' @name lab6pac... |
recover.stat <- function(sum.stat, pathway, ref.geno, allele.info, options){
msg <- paste("Recovering test statistics:", date())
if(options$print) message(msg)
sample.size <- sum.stat$sample.size
sum.info <- sum.stat$stat
all.snp <- sort(sum.stat$snps.in.study)
rm(sum.stat)
gc()
nstudy <- leng... | /R/recover.stat.R | permissive | yfyang86/ARTP3 | R | false | false | 3,094 | r |
recover.stat <- function(sum.stat, pathway, ref.geno, allele.info, options){
msg <- paste("Recovering test statistics:", date())
if(options$print) message(msg)
sample.size <- sum.stat$sample.size
sum.info <- sum.stat$stat
all.snp <- sort(sum.stat$snps.in.study)
rm(sum.stat)
gc()
nstudy <- leng... |
library(CARRoT)
### Name: regr_ind
### Title: Indices of the best regressions
### Aliases: regr_ind
### ** Examples
#creating variables for linear regression mode
variables_lin<-matrix(c(rnorm(56,0,1),rnorm(56,1,2)),ncol=2)
#creating outcomes for linear regression mode
outcomes_lin<-rnorm(56,2,1)
#running the f... | /data/genthat_extracted_code/CARRoT/examples/regr_ind.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 672 | r | library(CARRoT)
### Name: regr_ind
### Title: Indices of the best regressions
### Aliases: regr_ind
### ** Examples
#creating variables for linear regression mode
variables_lin<-matrix(c(rnorm(56,0,1),rnorm(56,1,2)),ncol=2)
#creating outcomes for linear regression mode
outcomes_lin<-rnorm(56,2,1)
#running the f... |
library(dslabs)
library(tidyverse)
library (rvest)
data("reported_heights")
#print structure of dataframe
str(reported_heights)
#class of heigts column
class (reported_heights$height) #it's character
#checking number of NA
sum (is.na(reported_heights$height))
#do coercion and check for NAs
test <- reported_heights... | /R-DataWrangling/string_wrangling_heights_data.r | no_license | rsjain1978/Data-Science-With-R | R | false | false | 7,237 | r | library(dslabs)
library(tidyverse)
library (rvest)
data("reported_heights")
#print structure of dataframe
str(reported_heights)
#class of heigts column
class (reported_heights$height) #it's character
#checking number of NA
sum (is.na(reported_heights$height))
#do coercion and check for NAs
test <- reported_heights... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis_diffSplicing_table.R
\name{plotMiniSurvivalCurves}
\alias{plotMiniSurvivalCurves}
\title{Perform and plot survival curves}
\usage{
plotMiniSurvivalCurves(i, input, survParams, clinical, filter, psi, censoring,
event, timeStart, tim... | /man/plotMiniSurvivalCurves.Rd | no_license | IlyaFinkelshteyn/psichomics | R | false | true | 1,120 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis_diffSplicing_table.R
\name{plotMiniSurvivalCurves}
\alias{plotMiniSurvivalCurves}
\title{Perform and plot survival curves}
\usage{
plotMiniSurvivalCurves(i, input, survParams, clinical, filter, psi, censoring,
event, timeStart, tim... |
#'
#'@title Calculate \eqn{B_{MSY}} by averaging over specified time interval
#'
#'@description Function to calculate \eqn{B_{MSY}} by averaging over specified time interval.
#'
#'@param mmb - time series of mmb at mating to average
#'@param years - years to incude in average
#'
#'@details None.
#'
#'@return \eqn{B_{MS... | /R/calcBmsy.R | permissive | wStockhausen/rPIBKC | R | false | false | 462 | r | #'
#'@title Calculate \eqn{B_{MSY}} by averaging over specified time interval
#'
#'@description Function to calculate \eqn{B_{MSY}} by averaging over specified time interval.
#'
#'@param mmb - time series of mmb at mating to average
#'@param years - years to incude in average
#'
#'@details None.
#'
#'@return \eqn{B_{MS... |
## ----setup, include=FALSE----------------------------------------------------------------------------------------------------------------------------
knitr::opts_chunk$set(echo = TRUE, fig.align = 'center', cache=FALSE, cache.lazy = FALSE)
## ----include=FALSE, echo=FALSE--------------------------------------... | /MovieLens Capstone Project.R | no_license | tarun9346/Harvard-Data-Science-PH125.9X-Capstone-Project | R | false | false | 23,303 | r | ## ----setup, include=FALSE----------------------------------------------------------------------------------------------------------------------------
knitr::opts_chunk$set(echo = TRUE, fig.align = 'center', cache=FALSE, cache.lazy = FALSE)
## ----include=FALSE, echo=FALSE--------------------------------------... |
\name{FFPEReadFilter}
\alias{FFPEReadFilter}
\title{
Find and filter artifact chimeric reads in BAM file of FFPE sample
}
\description{
Artifact chimeric reads are enriched in NGS data of FFPE samples, these reads
can lead to a large number of false positive SV calls. This function finds
and filters these artifact chim... | /man/FFPEReadFilter.Rd | no_license | LanyingWei/FilterFFPE | R | false | false | 3,587 | rd | \name{FFPEReadFilter}
\alias{FFPEReadFilter}
\title{
Find and filter artifact chimeric reads in BAM file of FFPE sample
}
\description{
Artifact chimeric reads are enriched in NGS data of FFPE samples, these reads
can lead to a large number of false positive SV calls. This function finds
and filters these artifact chim... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/html_fragment.R
\name{html_fragment}
\alias{html_fragment}
\title{Convert to an HTML fragment.}
\usage{
html_fragment(
number_sections = FALSE,
section_divs = TRUE,
fig_width = 7,
fig_height = 5,
fig_retina = 2,
fig_caption = TRUE... | /man/html_fragment.Rd | no_license | alexandria-sakrejda/rmarkdown | R | false | true | 3,253 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/html_fragment.R
\name{html_fragment}
\alias{html_fragment}
\title{Convert to an HTML fragment.}
\usage{
html_fragment(
number_sections = FALSE,
section_divs = TRUE,
fig_width = 7,
fig_height = 5,
fig_retina = 2,
fig_caption = TRUE... |
library(shiny)
source('global_functions.R')
import.csv <- function(filename) {
return(read.csv(filename, sep = ",", header = TRUE, stringsAsFactors=FALSE))
}
order <- 3
numT <- 30
num_group <- 4
#betas
beta.df <- import.csv('beta.csv')
beta.matrix <- t(as.matrix(beta.df[,1:(order+1)]))
#mu matri... | /server.R | permissive | lujiec/shiny_group_simulator | R | false | false | 1,856 | r | library(shiny)
source('global_functions.R')
import.csv <- function(filename) {
return(read.csv(filename, sep = ",", header = TRUE, stringsAsFactors=FALSE))
}
order <- 3
numT <- 30
num_group <- 4
#betas
beta.df <- import.csv('beta.csv')
beta.matrix <- t(as.matrix(beta.df[,1:(order+1)]))
#mu matri... |
#Explained on p 8
#predicting compounds' permeability
#Data
#165 compounds
# 1107 molelcular fingerprints determined - binary sequence that reps the presence or absence of
# a specific molecular structure
# reponse is highly skewed
# predictors are sparse and may predictors are strongly associated
library(caret... | /Predictive_Modeling/Permeability_Regression_Models/Permeability_models.R | no_license | LataniaReece/R_Scripts | R | false | false | 6,581 | r | #Explained on p 8
#predicting compounds' permeability
#Data
#165 compounds
# 1107 molelcular fingerprints determined - binary sequence that reps the presence or absence of
# a specific molecular structure
# reponse is highly skewed
# predictors are sparse and may predictors are strongly associated
library(caret... |
#.libPaths('/users/sperreau/R/x86_64-redhat-linux-gnu-library/3.3')
library(parallel, lib.loc = '/users/sperreau/R/x86_64-redhat-linux-gnu-library/3.3')
library(MASS, lib.loc = '/users/sperreau/R/x86_64-redhat-linux-gnu-library/3.3')
library(matrixcalc, lib.loc = '/users/sperreau/R/x86_64-redhat-linux-gnu-library/3.3'... | /sim-stuff/simulation-study2-scripts/simulation_loop_v5_HD.R | no_license | samperochkin/learning-block-exchangeability | R | false | false | 2,892 | r | #.libPaths('/users/sperreau/R/x86_64-redhat-linux-gnu-library/3.3')
library(parallel, lib.loc = '/users/sperreau/R/x86_64-redhat-linux-gnu-library/3.3')
library(MASS, lib.loc = '/users/sperreau/R/x86_64-redhat-linux-gnu-library/3.3')
library(matrixcalc, lib.loc = '/users/sperreau/R/x86_64-redhat-linux-gnu-library/3.3'... |
## deviations generator
#' @export
r_dev_case <- function(r_dev_change, nyr=30, logR_sd=0.1, om_sim_num=160){
## rec_dev_change:1. TRUE: generate different recruitment deviations per iteration
## 2. FALSE: generate same recruitment deviations per iteration
## nyr: number of years
## logR.sd: rec... | /R/OM_deviation_generator.R | no_license | JonBrodziak/Age_Structured_Stock_Assessment_Model_Comparison | R | false | false | 1,619 | r | ## deviations generator
#' @export
r_dev_case <- function(r_dev_change, nyr=30, logR_sd=0.1, om_sim_num=160){
## rec_dev_change:1. TRUE: generate different recruitment deviations per iteration
## 2. FALSE: generate same recruitment deviations per iteration
## nyr: number of years
## logR.sd: rec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BSDA-package.R
\docType{data}
\name{Sports}
\alias{Sports}
\title{Favorite sport by gender}
\format{A data frame/tibble with 200 observations on two variables
\describe{
\item{gender}{a factor with levels \code{male} and \code{female}}
\item... | /man/Sports.Rd | no_license | nebsnave/BSDA | R | false | true | 673 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BSDA-package.R
\docType{data}
\name{Sports}
\alias{Sports}
\title{Favorite sport by gender}
\format{A data frame/tibble with 200 observations on two variables
\describe{
\item{gender}{a factor with levels \code{male} and \code{female}}
\item... |
#vector
#Normal Distribution with mean 80, SD 10
sales = rnorm(1000000, mean = 80, sd = 10)
sales
#trunc, round, floor, ceiling
sales = trunc(sales)
sales
summary(sales)
boxplot(sales)
mean(sales)
median(sales)
hist(sales)
plot(density(sales)) # A normal graph +- 3*sigma ??????????
#10-50
range(sales)
#matrix
m1=ma... | /Revise.R | no_license | RaiPrabhansh/analytics1 | R | false | false | 1,380 | r |
#vector
#Normal Distribution with mean 80, SD 10
sales = rnorm(1000000, mean = 80, sd = 10)
sales
#trunc, round, floor, ceiling
sales = trunc(sales)
sales
summary(sales)
boxplot(sales)
mean(sales)
median(sales)
hist(sales)
plot(density(sales)) # A normal graph +- 3*sigma ??????????
#10-50
range(sales)
#matrix
m1=ma... |
csv_data <- read.csv(file = "C:/Users/totus tuus/Documents/R_projects/NCH_Training_Dashboard/NCH_Training_Dashboard_2/www/NCH_Training_2019 - Summary.csv", stringsAsFactors = FALSE, na.strings = "N/A", check.names = FALSE)
original_names <- names(csv_data)
cleaned_names <- make.names(original_names)
resolution_names <-... | /testing.R | no_license | martynscn/NCH_Dashboard_Builder | R | false | false | 5,594 | r | csv_data <- read.csv(file = "C:/Users/totus tuus/Documents/R_projects/NCH_Training_Dashboard/NCH_Training_Dashboard_2/www/NCH_Training_2019 - Summary.csv", stringsAsFactors = FALSE, na.strings = "N/A", check.names = FALSE)
original_names <- names(csv_data)
cleaned_names <- make.names(original_names)
resolution_names <-... |
#' Distribution Function of a Bivariate Copula
#'
#' This function evaluates the cumulative distribution function (CDF) of a
#' given parametric bivariate copula.
#'
#' If the family and parameter specification is stored in a \code{\link{BiCop}}
#' object \code{obj}, the alternative version \cr
#' \preformatted{BiCopCD... | /R/BiCopCDF.R | no_license | larryleihua/VineCopula | R | false | false | 12,017 | r | #' Distribution Function of a Bivariate Copula
#'
#' This function evaluates the cumulative distribution function (CDF) of a
#' given parametric bivariate copula.
#'
#' If the family and parameter specification is stored in a \code{\link{BiCop}}
#' object \code{obj}, the alternative version \cr
#' \preformatted{BiCopCD... |
library(SDSFoundations)
film <- FilmData
View(film)
table(film$Rating)
#Calculate avg film budget of each group
aggregate(Budget~Rating, film, mean)
aggregate(Budget~Rating, film, sd)
#Visualize group means and variability
boxplot(film$Budget~film$Rating, main= "Film Budgets by Rating", ylab= "Budget", xlab= "MPAA ... | /anova.R | no_license | gamezober/R-DataAnalysis | R | false | false | 805 | r | library(SDSFoundations)
film <- FilmData
View(film)
table(film$Rating)
#Calculate avg film budget of each group
aggregate(Budget~Rating, film, mean)
aggregate(Budget~Rating, film, sd)
#Visualize group means and variability
boxplot(film$Budget~film$Rating, main= "Film Budgets by Rating", ylab= "Budget", xlab= "MPAA ... |
library(randomForestSRC)
n=100
depth15f<-matrix(0,nrow=n,ncol=100)
nullvimp15f<-matrix(0,nrow=n,ncol=100)
depth3f<-matrix(0,nrow=n,ncol=100)
nullvimp3f<-matrix(0,nrow=n,ncol=100)
depth15r<-matrix(0,nrow=n,ncol=100)
nullvimp15r<-matrix(0,nrow=n,ncol=100)
depth3r<-matrix(0,nrow=n,ncol=100)
nullvimp3r<-matrix(0,nrow=n,nc... | /Laras/nullmindepth80_40strong.R | no_license | iqbalrosiadi/intern_igmm | R | false | false | 2,751 | r | library(randomForestSRC)
n=100
depth15f<-matrix(0,nrow=n,ncol=100)
nullvimp15f<-matrix(0,nrow=n,ncol=100)
depth3f<-matrix(0,nrow=n,ncol=100)
nullvimp3f<-matrix(0,nrow=n,ncol=100)
depth15r<-matrix(0,nrow=n,ncol=100)
nullvimp15r<-matrix(0,nrow=n,ncol=100)
depth3r<-matrix(0,nrow=n,ncol=100)
nullvimp3r<-matrix(0,nrow=n,nc... |
#Reading the data
data = read.table("powerCons.txt",sep=";", dec=".",header=TRUE,stringsAsFactors=FALSE,na.strings="?",
colClasses=c(rep("character",2), rep("numeric",7)))
#Subset according to date
DT<- subset(data,as.Date(data$Date,format='%d/%m/%Y')>=as.Date('2007-02-01',format='%Y-%m-%d'))
DT<- su... | /plot3.R | no_license | shrikrishnaw/ExData_Plotting1 | R | false | false | 1,297 | r | #Reading the data
data = read.table("powerCons.txt",sep=";", dec=".",header=TRUE,stringsAsFactors=FALSE,na.strings="?",
colClasses=c(rep("character",2), rep("numeric",7)))
#Subset according to date
DT<- subset(data,as.Date(data$Date,format='%d/%m/%Y')>=as.Date('2007-02-01',format='%Y-%m-%d'))
DT<- su... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.DMR.R
\name{predict.DMR}
\alias{predict.DMR}
\title{predict.DMR}
\usage{
\method{predict}{DMR}(
object,
newx,
df = NULL,
type = "link",
unknown.factor.levels = "error",
...
)
}
\arguments{
\item{object}{Fit... | /man/predict.DMR.Rd | no_license | cran/DMRnet | R | false | true | 1,785 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.DMR.R
\name{predict.DMR}
\alias{predict.DMR}
\title{predict.DMR}
\usage{
\method{predict}{DMR}(
object,
newx,
df = NULL,
type = "link",
unknown.factor.levels = "error",
...
)
}
\arguments{
\item{object}{Fit... |
# laod predictions vs actual for 3 different models and compare in single ROC chart
# logistic
logistic_pred <- readRDS("data/logistic-predicted.rds")
logistic_actual <- readRDS("data/logistic-actual.rds")
# baseline xgboost
base_pred <- readRDS("data/base-predicted.rds")
base_actual <- readRDS("data/base-actual.rd... | /R/09-compare-roc.R | no_license | timkiely/predicting-nyc-tax-assessments | R | false | false | 784 | r |
# laod predictions vs actual for 3 different models and compare in single ROC chart
# logistic
logistic_pred <- readRDS("data/logistic-predicted.rds")
logistic_actual <- readRDS("data/logistic-actual.rds")
# baseline xgboost
base_pred <- readRDS("data/base-predicted.rds")
base_actual <- readRDS("data/base-actual.rd... |
# get arguments
# args[1] path for working directory
# args[2] node,
# args[3] genesetFile,
# args[4] dendroFile,
# args[5] backFile,
# args[6] result file
#
args <- commandArgs(trailingOnly = TRUE)
setwd(args[1])
library(rjson)
findNode <- function(parent, name) {
if (!is.null(parent$name) && parent$name == n... | /test_molecules.r | no_license | ActiveDataBio/ADB-User-Study | R | false | false | 4,915 | r | # get arguments
# args[1] path for working directory
# args[2] node,
# args[3] genesetFile,
# args[4] dendroFile,
# args[5] backFile,
# args[6] result file
#
args <- commandArgs(trailingOnly = TRUE)
setwd(args[1])
library(rjson)
findNode <- function(parent, name) {
if (!is.null(parent$name) && parent$name == n... |
## calc. the epoch
now <- Sys.time()
the.epoch <- now - as.numeric(now)
default.marker.sizeref <- 1
marker.size.mult <- 10
marker.defaults <- list(alpha=1,
shape="16",
size=marker.size.mult,
sizeref=default.marker.sizeref,
... | /R/ggplotly.R | no_license | ying9264/plotly | R | false | false | 25,355 | r | ## calc. the epoch
now <- Sys.time()
the.epoch <- now - as.numeric(now)
default.marker.sizeref <- 1
marker.size.mult <- 10
marker.defaults <- list(alpha=1,
shape="16",
size=marker.size.mult,
sizeref=default.marker.sizeref,
... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/record_as_cited.R
\name{record_as_cited}
\alias{record_as_cited}
\title{record as cited}
\usage{
record_as_cited(entry)
}
\arguments{
\item{entry}{a BibEntry object (or something that can be coerced to one, like bibentry)}
}
\value{
A... | /man/record_as_cited.Rd | permissive | billdenney/knitcitations | R | false | false | 594 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/record_as_cited.R
\name{record_as_cited}
\alias{record_as_cited}
\title{record as cited}
\usage{
record_as_cited(entry)
}
\arguments{
\item{entry}{a BibEntry object (or something that can be coerced to one, like bibentry)}
}
\value{
A... |
## Data
source("data.R")
## merge traume to resh and keep resh
data001 <- traume[resh, on = c(UnitId = "reshid")]
## merge resh to traume and keep traume
data002 <- resh[traume, on = c(reshid = "UnitId")]
data002[, .N, by = .(reshid)]
traume[, .N, by = .(UnitId)]
data002[, .N, by = list(RHF, HF)]
data002[, .N, by =... | /analyser/filter.R | no_license | ybkamaleri/traume | R | false | false | 1,223 | r | ## Data
source("data.R")
## merge traume to resh and keep resh
data001 <- traume[resh, on = c(UnitId = "reshid")]
## merge resh to traume and keep traume
data002 <- resh[traume, on = c(reshid = "UnitId")]
data002[, .N, by = .(reshid)]
traume[, .N, by = .(UnitId)]
data002[, .N, by = list(RHF, HF)]
data002[, .N, by =... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/naomit.R
\name{step_naomit}
\alias{step_naomit}
\title{Remove observations with missing values}
\usage{
step_naomit(
recipe,
...,
role = NA,
trained = FALSE,
columns = NULL,
skip = TRUE,
id = rand_id("naomit")
)
}
\arguments{
\i... | /man/step_naomit.Rd | permissive | DavisVaughan/recipes | R | false | true | 2,646 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/naomit.R
\name{step_naomit}
\alias{step_naomit}
\title{Remove observations with missing values}
\usage{
step_naomit(
recipe,
...,
role = NA,
trained = FALSE,
columns = NULL,
skip = TRUE,
id = rand_id("naomit")
)
}
\arguments{
\i... |
library(testthat)
library(dingrobot)
test_check("dingrobot")
| /tests/testthat.R | no_license | jfontestad/dingrobot | R | false | false | 62 | r | library(testthat)
library(dingrobot)
test_check("dingrobot")
|
## author: Student of R programming course, Couresera
## date: April 19th. 2014
## The two functions in the current files are makeCacheMatrix and cacheSolve
## They are used to create a special object that stores a (square) matrix
## and caches its inverse for future use. The matrix is inversed the first time Cashce... | /cacheSolve.R | no_license | saraswathi55/ProgrammingAssignment2 | R | false | false | 2,774 | r | ## author: Student of R programming course, Couresera
## date: April 19th. 2014
## The two functions in the current files are makeCacheMatrix and cacheSolve
## They are used to create a special object that stores a (square) matrix
## and caches its inverse for future use. The matrix is inversed the first time Cashce... |
\name{sample.n}
\alias{sample.n}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Targeted sampling of sharp null hypotheses
}
\description{Fills in missingness in \eqn{\vec{y}(z;\alpha_{s})} for
\eqn{z,s=0,1} based on targeted sampling algorithm described in Section
4.2 of Rigdon and Hudgens ... | /man/sample.n.Rd | no_license | cran/interferenceCI | R | false | false | 3,120 | rd | \name{sample.n}
\alias{sample.n}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Targeted sampling of sharp null hypotheses
}
\description{Fills in missingness in \eqn{\vec{y}(z;\alpha_{s})} for
\eqn{z,s=0,1} based on targeted sampling algorithm described in Section
4.2 of Rigdon and Hudgens ... |
#We're going to explore a few issues here.
#1. how does cronbach's alpha compare to reliability coefficients based on different split halves?
#2. how do adjusted split-half correlations compare to cronbach's alpha
#####################################################################
##some helper functions
kr20<-funct... | /cC/parallel_tests.R | no_license | ben-domingue/252L | R | false | false | 3,021 | r | #We're going to explore a few issues here.
#1. how does cronbach's alpha compare to reliability coefficients based on different split halves?
#2. how do adjusted split-half correlations compare to cronbach's alpha
#####################################################################
##some helper functions
kr20<-funct... |
###########################################################################/**
# @RdocFunction useRepos
# @alias parseRepos
#
# @title "Sets package repositories"
#
# \description{
# @get "title".
# }
#
# @synopsis
#
# \arguments{
# \item{repos}{A @character @vector of repositories to use.
# If @NULL, nothing is ... | /R/useRepos.R | no_license | muschellij2/R.utils | R | false | false | 8,650 | r | ###########################################################################/**
# @RdocFunction useRepos
# @alias parseRepos
#
# @title "Sets package repositories"
#
# \description{
# @get "title".
# }
#
# @synopsis
#
# \arguments{
# \item{repos}{A @character @vector of repositories to use.
# If @NULL, nothing is ... |
library(MASS)
summary(birthwt)
#I want to look at my data to see if it is homoscedastic and if I
#can use one line to fit all or use quantile regressions
plot(birthwt$age, birthwt$bwt) # in my opinion, it is not homoscedastic
my_linear <- lm(bwt~age, data=birthwt)
summary(my_linear)
#the linear model has a coefficie... | /practice___.R | no_license | nanw01/r_study_nan | R | false | false | 760 | r | library(MASS)
summary(birthwt)
#I want to look at my data to see if it is homoscedastic and if I
#can use one line to fit all or use quantile regressions
plot(birthwt$age, birthwt$bwt) # in my opinion, it is not homoscedastic
my_linear <- lm(bwt~age, data=birthwt)
summary(my_linear)
#the linear model has a coefficie... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DataManagement.R
\name{getUnivariableCorrelation}
\alias{getUnivariableCorrelation}
\title{Get univariable correlation}
\usage{
getUnivariableCorrelation(cyclopsData, covariates = NULL, threshold = 0)
}
\arguments{
\item{cyclopsData}{A Cyclop... | /man/getUnivariableCorrelation.Rd | permissive | cvisb/Cyclops | R | false | true | 736 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DataManagement.R
\name{getUnivariableCorrelation}
\alias{getUnivariableCorrelation}
\title{Get univariable correlation}
\usage{
getUnivariableCorrelation(cyclopsData, covariates = NULL, threshold = 0)
}
\arguments{
\item{cyclopsData}{A Cyclop... |
shinyUI(fluidPage(
titlePanel("censusVis"),
sidebarLayout(
sidebarPanel(
helpText("Create a demographic maps with information from
the 2010 US Census."),
... | /Widgets/Widgets-Complete/ui.R | no_license | HenrryNadal/Learning_Shiny | R | false | false | 1,246 | r | shinyUI(fluidPage(
titlePanel("censusVis"),
sidebarLayout(
sidebarPanel(
helpText("Create a demographic maps with information from
the 2010 US Census."),
... |
testlist <- list(type = 0L, z = 1.18081689356058e-321)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609893672-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 108 | r | testlist <- list(type = 0L, z = 1.18081689356058e-321)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
numPerPatch28152 <- c(2500,2500)
| /NatureEE-data-archive/Run203071/JAFSdata/JAFSnumPerPatch28152.R | no_license | flaxmans/NatureEE2017 | R | false | false | 33 | r | numPerPatch28152 <- c(2500,2500)
|
peakperiod <- function(df, peakstart, peakend, comparedemand=FALSE, comparegeneration=FALSE){
#PeakStart (hh:mm) - PeakFinish (hh:mm)
# PeakStart and PeakFinish should be chosen such that each fulfills
# the following criteria:
# PeakStart and PeakFinish minutes must be 00 or a multiple of mInterval m... | /functions/peakperiod.R | no_license | stokeinfo/DGLoadMiner | R | false | false | 3,146 | r | peakperiod <- function(df, peakstart, peakend, comparedemand=FALSE, comparegeneration=FALSE){
#PeakStart (hh:mm) - PeakFinish (hh:mm)
# PeakStart and PeakFinish should be chosen such that each fulfills
# the following criteria:
# PeakStart and PeakFinish minutes must be 00 or a multiple of mInterval m... |
# test_ISOVectorSpatialRepresentation.R
# Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
#
# Description: Unit tests for ISOVectorSpatialRepresentation.R
#=======================
require(geometa, quietly = TRUE)
require(testthat)
context("ISOVectorSpatialRepresentation")
test_that("encoding",{
te... | /tests/testthat/test_ISOVectorSpatialRepresentation.R | no_license | cran/geometa | R | false | false | 1,290 | r | # test_ISOVectorSpatialRepresentation.R
# Author: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
#
# Description: Unit tests for ISOVectorSpatialRepresentation.R
#=======================
require(geometa, quietly = TRUE)
require(testthat)
context("ISOVectorSpatialRepresentation")
test_that("encoding",{
te... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/events.R
\docType{methods}
\name{events}
\alias{as.data.frame,ev-method}
\alias{as.ev}
\alias{as.ev,data.frame-method}
\alias{as.matrix,ev-method}
\alias{ev}
\alias{ev,ev-method}
\alias{ev,missing-method}
\alias{ev,mrgmod-method}
\alias{event... | /rdev/man/events.Rd | no_license | curtisKJ/mrgsolve | R | false | true | 2,729 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/events.R
\docType{methods}
\name{events}
\alias{as.data.frame,ev-method}
\alias{as.ev}
\alias{as.ev,data.frame-method}
\alias{as.matrix,ev-method}
\alias{ev}
\alias{ev,ev-method}
\alias{ev,missing-method}
\alias{ev,mrgmod-method}
\alias{event... |
########################################################################
##
## Initial Preparations
##
########################################################################
# Clear console and global environment
rm(list = ls())
cat("\014") # or ctrl-L in RStudio
# Load packages
library(FSA)
library(FSAdata)
lib... | /WAERecruitment_Student.R | no_license | csjzhou/RcourseIdaho2017 | R | false | false | 3,065 | r | ########################################################################
##
## Initial Preparations
##
########################################################################
# Clear console and global environment
rm(list = ls())
cat("\014") # or ctrl-L in RStudio
# Load packages
library(FSA)
library(FSAdata)
lib... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 18312
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 18312
c
c Input Parameter (command line, file):
c input filename QBFLIB/Tentrup/mult-matrix/mult_bool_matrix_dyn_6_8.sat.qdima... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Tentrup/mult-matrix/mult_bool_matrix_dyn_6_8.sat/mult_bool_matrix_dyn_6_8.sat.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 663 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 18312
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 18312
c
c Input Parameter (command line, file):
c input filename QBFLIB/Tentrup/mult-matrix/mult_bool_matrix_dyn_6_8.sat.qdima... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CINNA.R
\name{tsne_centralities}
\alias{tsne_centralities}
\title{t-Distributed Stochastic Neighbor Embedding (t-SNE) on centrality measures}
\usage{
tsne_centralities(x, dims = 2, perplexity = 5, scale = TRUE)
}
\arguments{
\item{x}{A list c... | /man/tsne_centralities.Rd | no_license | cran/CINNA | R | false | true | 2,316 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CINNA.R
\name{tsne_centralities}
\alias{tsne_centralities}
\title{t-Distributed Stochastic Neighbor Embedding (t-SNE) on centrality measures}
\usage{
tsne_centralities(x, dims = 2, perplexity = 5, scale = TRUE)
}
\arguments{
\item{x}{A list c... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/cache.R
\name{cache}
\alias{cache}
\title{Apply a database caching layer to an arbitrary R function.}
\usage{
cache(uncached_function, key, salt, con, prefix = deparse(uncached_function),
env = "cache", batch_size = 100)
}
\argument... | /man/cache.Rd | no_license | tonglu/cachemeifyoucan | R | false | false | 11,318 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/cache.R
\name{cache}
\alias{cache}
\title{Apply a database caching layer to an arbitrary R function.}
\usage{
cache(uncached_function, key, salt, con, prefix = deparse(uncached_function),
env = "cache", batch_size = 100)
}
\argument... |
test_that("correct result (lp format)", {
skip_on_cran()
skip_if_not_installed("Rsymphony")
# create data
cost <- terra::rast(matrix(c(1, 2, 2, NA), ncol = 4))
locked_in <- 2
locked_out <- 1
features <- c(
terra::rast(matrix(c(2, 1, 1, 0), ncol = 4)),
terra::rast(matrix(c(10, 10, 10, 10), ncol = 4... | /tests/testthat/test_write_problem.R | no_license | prioritizr/prioritizr | R | false | false | 2,482 | r | test_that("correct result (lp format)", {
skip_on_cran()
skip_if_not_installed("Rsymphony")
# create data
cost <- terra::rast(matrix(c(1, 2, 2, NA), ncol = 4))
locked_in <- 2
locked_out <- 1
features <- c(
terra::rast(matrix(c(2, 1, 1, 0), ncol = 4)),
terra::rast(matrix(c(10, 10, 10, 10), ncol = 4... |
fcr_data_wrangling <- function(){
### Transforming the outputted csv files to a MATLAB format
### Reason I am plotting in R and Not matlab is because MATLAB
### makes for better Heatmap plots
# This reads all the files into the R environment
files = list.files(path = "../csv_outputs/")
#files <- files[fi... | /Data/DataNotYetUploadedToEDI/Raw_CTD/CTD_code/CTD_matlab_functions.R | no_license | arpitadas05/Reservoirs | R | false | false | 8,097 | r | fcr_data_wrangling <- function(){
### Transforming the outputted csv files to a MATLAB format
### Reason I am plotting in R and Not matlab is because MATLAB
### makes for better Heatmap plots
# This reads all the files into the R environment
files = list.files(path = "../csv_outputs/")
#files <- files[fi... |
## Load the 'dplyr' package
library(dplyr)
## Check and download the data if not yet downloaded
if(!file.exists("./data")) {dir.create("data")} # Check to see if the directory exists
if(!file.exists("./data/NEI_data.zip")) {
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_da... | /plot2.R | no_license | prafful-agrawal/US-pm25-assign | R | false | false | 1,443 | r | ## Load the 'dplyr' package
library(dplyr)
## Check and download the data if not yet downloaded
if(!file.exists("./data")) {dir.create("data")} # Check to see if the directory exists
if(!file.exists("./data/NEI_data.zip")) {
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_da... |
#' borgatti_test
#' @description Runs the alternative to Quadratic Assignment Proceedure (QAP) that Borgatti 2002 developed and recommended for the comparison of pile sorts across subgroups.
#' @param data A list of similarity matrices (such as returned by \code{\link{compile_piles}}), with list length equal to the tot... | /R/borgatti_test.R | no_license | pjscanlon/pilesortr | R | false | false | 2,046 | r | #' borgatti_test
#' @description Runs the alternative to Quadratic Assignment Proceedure (QAP) that Borgatti 2002 developed and recommended for the comparison of pile sorts across subgroups.
#' @param data A list of similarity matrices (such as returned by \code{\link{compile_piles}}), with list length equal to the tot... |
library(GPareto)
### Name: GPareto-package
### Title: Package GPareto
### Aliases: GPareto-package GPareto
### ** Examples
## Not run:
##D #------------------------------------------------------------
##D # Example 1 : Surrogate-based multi-objective Optimization with postprocessing
##D #--------------------------... | /data/genthat_extracted_code/GPareto/examples/GPareto-package.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 4,801 | r | library(GPareto)
### Name: GPareto-package
### Title: Package GPareto
### Aliases: GPareto-package GPareto
### ** Examples
## Not run:
##D #------------------------------------------------------------
##D # Example 1 : Surrogate-based multi-objective Optimization with postprocessing
##D #--------------------------... |
##################################################################
#
# indirect_ybin_mcont: Calculate the organic indirect effect for a binary
# outcome with a binary mediator (Lok & Bosch 2020)
#
#
#################################################################
# Y: binary outcome variable
# M: binary m... | /indirect_ybin_mbin.R | no_license | a-chernofsky/lok-bosch-2020 | R | false | false | 1,507 | r | ##################################################################
#
# indirect_ybin_mcont: Calculate the organic indirect effect for a binary
# outcome with a binary mediator (Lok & Bosch 2020)
#
#
#################################################################
# Y: binary outcome variable
# M: binary m... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/github_sourcer.R
\name{setGithubToken}
\alias{setGithubToken}
\title{setGithubToken}
\usage{
setGithubToken(pat)
}
\arguments{
\item{pat}{Github PAT available in Github user settings}
}
\value{
Nothing
}
\description{
Sets Github PAT ... | /man/setGithubToken.Rd | permissive | ConservationInternational/VitalSignsUtilities | R | false | false | 405 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/github_sourcer.R
\name{setGithubToken}
\alias{setGithubToken}
\title{setGithubToken}
\usage{
setGithubToken(pat)
}
\arguments{
\item{pat}{Github PAT available in Github user settings}
}
\value{
Nothing
}
\description{
Sets Github PAT ... |
#This R file contains 2 functions makeCacheMatrix and cacheSolve.
#This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inverseMat <- NULL #setting the value for variable inverseMat to NULL.
#setMatrix function s... | /cachematrix.R | no_license | amritasave/ProgrammingAssignment2 | R | false | false | 2,132 | r | #This R file contains 2 functions makeCacheMatrix and cacheSolve.
#This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inverseMat <- NULL #setting the value for variable inverseMat to NULL.
#setMatrix function s... |
devtools::install_version("rdatamarket", "0.6.5")
devtools::install_version("plyr", "1.8.4")
devtools::install_version("googleVis", "0.6.1")
| /requirements.r | no_license | datacamp/misc-courses-googlevis | R | false | false | 141 | r | devtools::install_version("rdatamarket", "0.6.5")
devtools::install_version("plyr", "1.8.4")
devtools::install_version("googleVis", "0.6.1")
|
library("R.utils")
# A data frame
set.seed(42)
n <- 5L
data <- data.frame(
index = 1:n,
symbol = letters[1:n],
x = runif(n),
y = rnorm(n)
)
# Write to tab-delimited file (using a connection)
pathname <- tempfile(fileext=".tsv")
con <- file(pathname, open="w")
writeDataFrame(data, file=con, createdBy="R.utils"... | /tests/writeDataFrame.R | no_license | muschellij2/R.utils | R | false | false | 707 | r | library("R.utils")
# A data frame
set.seed(42)
n <- 5L
data <- data.frame(
index = 1:n,
symbol = letters[1:n],
x = runif(n),
y = rnorm(n)
)
# Write to tab-delimited file (using a connection)
pathname <- tempfile(fileext=".tsv")
con <- file(pathname, open="w")
writeDataFrame(data, file=con, createdBy="R.utils"... |
library(tidyverse)
library(readxl)
library(dplyr)
####import data###
Site_L <- read_excel("~/Desktop/biostat2/biomass2015.xls", sheet = 1)
Site_M <- read_excel("~/Desktop/biostat2/biomass2015.xls", sheet = 2)
Site_A <- read_excel("~/Desktop/biostat2/biomass2015.xls", sheet = 3)
Site_H <- read_excel("~/Desktop/biostat2... | /Biomass.task.R | no_license | Oan008/Biomass.task | R | false | false | 838 | r | library(tidyverse)
library(readxl)
library(dplyr)
####import data###
Site_L <- read_excel("~/Desktop/biostat2/biomass2015.xls", sheet = 1)
Site_M <- read_excel("~/Desktop/biostat2/biomass2015.xls", sheet = 2)
Site_A <- read_excel("~/Desktop/biostat2/biomass2015.xls", sheet = 3)
Site_H <- read_excel("~/Desktop/biostat2... |
rm(list=ls())
#############################################################################
##Libraries##
#############################################################################
library(boot)
library(lpSolveAPI)
#############################################################################
##Function for estima... | /simulationStudies/noBaselineVariable/CI_nbootstrap/binary/noHarm/N1000_1.R | no_license | emhuang1/fraction-who-benefit | R | false | false | 7,102 | r | rm(list=ls())
#############################################################################
##Libraries##
#############################################################################
library(boot)
library(lpSolveAPI)
#############################################################################
##Function for estima... |
/SesionPropedeutico-02/Ejemplo-03/Ejemplo03.R | no_license | addieldealba/A2-Statistics-Programming-with-R | R | false | false | 2,095 | r | ||
rm(list = ls())
graphics.off()
setwd("~/Documents/CMEEProject/code")
require(minpack.lm)
# 1. define model and starting_value_guess functions
gompertz_model <- function(t, r_max, K, N_0, t_lag){ # Modified gompertz growth model (Zwietering 1990)
return(N_0 + (K - N_0) * exp(-exp(r_max * exp(1) * (t_lag - t)/((K ... | /code/mini_Gompertz.R | no_license | zongyi2020/CMEEProject | R | false | false | 4,864 | r |
rm(list = ls())
graphics.off()
setwd("~/Documents/CMEEProject/code")
require(minpack.lm)
# 1. define model and starting_value_guess functions
gompertz_model <- function(t, r_max, K, N_0, t_lag){ # Modified gompertz growth model (Zwietering 1990)
return(N_0 + (K - N_0) * exp(-exp(r_max * exp(1) * (t_lag - t)/((K ... |
## ----setup, include=FALSE-----------------------------------------------------
library(knitr)
opts_chunk$set(echo = TRUE,fig.align='center', fig.width=6, fig.height=5, dev='CairoPNG')
par_hook = function(before, options, envir)
{
if(before)
{
do.call(par, options$par)
}
}
knit_hooks$set(par = pa... | /fuzzedpackages/dexter/inst/doc/dexter.R | no_license | akhikolla/testpackages | R | false | false | 3,534 | r | ## ----setup, include=FALSE-----------------------------------------------------
library(knitr)
opts_chunk$set(echo = TRUE,fig.align='center', fig.width=6, fig.height=5, dev='CairoPNG')
par_hook = function(before, options, envir)
{
if(before)
{
do.call(par, options$par)
}
}
knit_hooks$set(par = pa... |
#
# linalg.R
#
# Linear Algebra
#
# $Revision: 1.15 $ $Date: 2016/03/01 09:12:46 $
#
sumouter <- function(x, w=NULL) {
stopifnot(is.matrix(x))
p <- ncol(x)
n <- nrow(x)
nama <- colnames(x)
# transpose (compute outer squares of columns)
tx <- t(x)
ok <- apply(is.finite(tx), 2, all)
if(!is.null(w)) {
... | /spatstat/R/linalg.R | no_license | ingted/R-Examples | R | false | false | 5,243 | r | #
# linalg.R
#
# Linear Algebra
#
# $Revision: 1.15 $ $Date: 2016/03/01 09:12:46 $
#
sumouter <- function(x, w=NULL) {
stopifnot(is.matrix(x))
p <- ncol(x)
n <- nrow(x)
nama <- colnames(x)
# transpose (compute outer squares of columns)
tx <- t(x)
ok <- apply(is.finite(tx), 2, all)
if(!is.null(w)) {
... |
\name{adaa.mq}
\alias{adaa.mq}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
ADAA model with MINQUE analysis
}
\description{
An ADAA model can be analyzed by MINQUE approach, requiring no specific genetic mating design or balance data.
For reliable results, three generations such as (p... | /man/adaa.mq.Rd | no_license | cran/qgtools | R | false | false | 2,977 | rd | \name{adaa.mq}
\alias{adaa.mq}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
ADAA model with MINQUE analysis
}
\description{
An ADAA model can be analyzed by MINQUE approach, requiring no specific genetic mating design or balance data.
For reliable results, three generations such as (p... |
library(data.table)
library(tidyverse)
library(zoo)
setwd('~/mortalityblob/mortnew')
#################################
# Mortality
#################################
dhs <- fread('dhs.csv')
mics <- fread('mics.csv')
comb <- rbind(dhs, mics)
comb$survey <- gsub('_.*', '', comb$geo_code)
tab(comb$survey, comb$date_c... | /extract/princeton_polynomials/combine.R | no_license | mcooper/dhs-mics-mort | R | false | false | 1,436 | r | library(data.table)
library(tidyverse)
library(zoo)
setwd('~/mortalityblob/mortnew')
#################################
# Mortality
#################################
dhs <- fread('dhs.csv')
mics <- fread('mics.csv')
comb <- rbind(dhs, mics)
comb$survey <- gsub('_.*', '', comb$geo_code)
tab(comb$survey, comb$date_c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.