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 |
|---|---|---|---|---|---|---|---|---|---|
#' Load data from a 10x Genomics Visium experiment and make it spatialLIBD-ready
#'
#' This function expands [SpatialExperiment::read10xVisium()] to include
#' analysis results from SpaceRanger by 10x Genomics as well as add information
#' needed by `run_app()` to visualize the data with the `spatialLIBD` shiny
#' web ... | /R/read10xVisiumWrapper.R | no_license | LieberInstitute/spatialLIBD | R | false | false | 6,715 | r | #' Load data from a 10x Genomics Visium experiment and make it spatialLIBD-ready
#'
#' This function expands [SpatialExperiment::read10xVisium()] to include
#' analysis results from SpaceRanger by 10x Genomics as well as add information
#' needed by `run_app()` to visualize the data with the `spatialLIBD` shiny
#' web ... |
##########################################################################
# Allele-specific CRMAv2
##########################################################################
library("aroma.affymetrix");
verbose <- Arguments$getVerbose(-8, timestamp=TRUE);
# - - - - - - - - - - - - - - - - - - - - - - - - - - ... | /aroma.affymetrix/inst/testScripts/complete/dataSets/GSE20584/21.doASCRMAv2.R | no_license | ingted/R-Examples | R | false | false | 854 | r | ##########################################################################
# Allele-specific CRMAv2
##########################################################################
library("aroma.affymetrix");
verbose <- Arguments$getVerbose(-8, timestamp=TRUE);
# - - - - - - - - - - - - - - - - - - - - - - - - - - ... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(7.31782994144163e-304, -1.46852425903251e+173, -1.53732818170537e+173, -5.59219752033303e+72, 5.51013241609643e-40, 3.48121950361978e-313, -4.18553736315947e+71, -4.25255837650091e+71, 0.000202180482941841, 2.00996886273231e-162, 3.152... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615857873-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 663 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(7.31782994144163e-304, -1.46852425903251e+173, -1.53732818170537e+173, -5.59219752033303e+72, 5.51013241609643e-40, 3.48121950361978e-313, -4.18553736315947e+71, -4.25255837650091e+71, 0.000202180482941841, 2.00996886273231e-162, 3.152... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{\%>\%}
\alias{\%>\%}
\title{Pipe Re-export}
\description{
re-export magrittr pipe operator
}
\keyword{internal}
| /man/grapes-greater-than-grapes.Rd | permissive | mikejohnson51/SRCgeneration | R | false | true | 204 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{\%>\%}
\alias{\%>\%}
\title{Pipe Re-export}
\description{
re-export magrittr pipe operator
}
\keyword{internal}
|
setwd("N:/Thesis.N/FreshStart_trans/TempLight_trans/TempLightSum17_trans/JA23jul17")
install.packages("chron")
library(chron)
StreamData=read.table("JA23jul17.csv",header=TRUE) ##time is in seconds since 1970 and in UTC
StreamData$dtime<-chron(StreamData$time/86400)-(7/24)
## Check new chron object dtime and O2 data
... | /Metabolism Data/TempLight_trans/TempLightSum17_trans/JA23jul17/JAsum17.R | no_license | clayarango/PNW-Headwater-Metabolism | R | false | false | 13,546 | r | setwd("N:/Thesis.N/FreshStart_trans/TempLight_trans/TempLightSum17_trans/JA23jul17")
install.packages("chron")
library(chron)
StreamData=read.table("JA23jul17.csv",header=TRUE) ##time is in seconds since 1970 and in UTC
StreamData$dtime<-chron(StreamData$time/86400)-(7/24)
## Check new chron object dtime and O2 data
... |
# Hello from github
print("Hello from github")
name = "abdul baseer"
age = "25"
print(ism)
print(omr)
print("it is written in Rstudio")
| /testing.r | no_license | abdulbaseer2294/myfirst | R | false | false | 137 | r | # Hello from github
print("Hello from github")
name = "abdul baseer"
age = "25"
print(ism)
print(omr)
print("it is written in Rstudio")
|
install.packages("rJava")
install.packages("memoise")
install.packages("KoNLP")
Sys.setenv(JAVA_HOME="C:/Program Files/Java/jdk-11.0.2")
library(KoNLP)
library(dplyr)
useNIADic()
txt<-readLines("hiphop.txt")
install.packages("stringr")
library(stringr)
txt<-str_replace_all(txt,"\\W"," ")
nouns<-extractNoun(txt)
wordcou... | /worldcloud.R | no_license | jykyeong99/R-prcatice | R | false | false | 843 | r | install.packages("rJava")
install.packages("memoise")
install.packages("KoNLP")
Sys.setenv(JAVA_HOME="C:/Program Files/Java/jdk-11.0.2")
library(KoNLP)
library(dplyr)
useNIADic()
txt<-readLines("hiphop.txt")
install.packages("stringr")
library(stringr)
txt<-str_replace_all(txt,"\\W"," ")
nouns<-extractNoun(txt)
wordcou... |
\name{gamsim}
\alias{gamsim}
\title{
Simulate example datasets from a generalized additive models (GAM).
}
\description{
This function is a modification from example 7 of the gamSim function available in the mgcv package (Wood, 2017), which is turn is Gu and Wahba 4 univariate example with correlated predictors. Please... | /man/gamsim.Rd | no_license | cran/vagam | R | false | false | 2,398 | rd | \name{gamsim}
\alias{gamsim}
\title{
Simulate example datasets from a generalized additive models (GAM).
}
\description{
This function is a modification from example 7 of the gamSim function available in the mgcv package (Wood, 2017), which is turn is Gu and Wahba 4 univariate example with correlated predictors. Please... |
library(rvest)
library(XML)
library(magrittr)
aurl="https://www.amazon.in/Test-Exclusive-604/product-reviews/B07HGLBZ5R/ref=cm_cr_arp_d_paging_btm_next_2?ie=UTF8&reviewerType=all_reviews&pageNumber"
amazon_reviews <- NULL
for (i in 1:10){
murl <- read_html(as.character(paste(aurl,i,sep="=")))
rev <- murl %... | /amazon_review.R | no_license | SarthakChitre/DS | R | false | false | 4,973 | r | library(rvest)
library(XML)
library(magrittr)
aurl="https://www.amazon.in/Test-Exclusive-604/product-reviews/B07HGLBZ5R/ref=cm_cr_arp_d_paging_btm_next_2?ie=UTF8&reviewerType=all_reviews&pageNumber"
amazon_reviews <- NULL
for (i in 1:10){
murl <- read_html(as.character(paste(aurl,i,sep="=")))
rev <- murl %... |
if (interactive()) {
source("renv/activate.R")
suppressMessages(require(devtools))
suppressMessages(require(testthat))
suppressMessages(require(usethis))
}
| /.Rprofile | permissive | jaybee84/projectlive.modules | R | false | false | 165 | rprofile | if (interactive()) {
source("renv/activate.R")
suppressMessages(require(devtools))
suppressMessages(require(testthat))
suppressMessages(require(usethis))
}
|
test_hasQC=function(){
para <- new("metaXpara")
pfile <- system.file("extdata/MTBLS79.txt",package = "metaX")
sfile <- system.file("extdata/MTBLS79_sampleList.txt",package = "metaX")
para@rawPeaks <- read.delim(pfile,check.names = FALSE)
para@sampleListFile <- sfile
para <- reSetPeaksData(para)
checkEq... | /inst/unitTests/test_hasQC.R | no_license | jaspershen/metaX | R | false | false | 347 | r | test_hasQC=function(){
para <- new("metaXpara")
pfile <- system.file("extdata/MTBLS79.txt",package = "metaX")
sfile <- system.file("extdata/MTBLS79_sampleList.txt",package = "metaX")
para@rawPeaks <- read.delim(pfile,check.names = FALSE)
para@sampleListFile <- sfile
para <- reSetPeaksData(para)
checkEq... |
.onAttach <- function(libname, pkgname) {
if (!("ptdspkg" %in% rownames(installed.packages()))) {
packageStartupMessage(
paste0(
"Please install `ptdspkg` by",
" `devtools::install_github('SMAC-Group/ptdspkg')`"
)
)
}
}
| /R/zzz.R | no_license | irudnyts/dummypkg | R | false | false | 302 | r | .onAttach <- function(libname, pkgname) {
if (!("ptdspkg" %in% rownames(installed.packages()))) {
packageStartupMessage(
paste0(
"Please install `ptdspkg` by",
" `devtools::install_github('SMAC-Group/ptdspkg')`"
)
)
}
}
|
# Fetching data from - Mother Jones - Mass Shootings Database, 198 --------
library(tidyverse)
library(googlesheets)
library(magrittr)
library(plotly)
library(conflicted)
library(ggthemes)
library(stringr); library(stringi)
library(tidytext)
library(tm)
filter <- dplyr::filter # resolves filter-function conflict
as... | /mass_shootings_app/global.R | no_license | mraess/mass_shootings | R | false | false | 8,051 | r |
# Fetching data from - Mother Jones - Mass Shootings Database, 198 --------
library(tidyverse)
library(googlesheets)
library(magrittr)
library(plotly)
library(conflicted)
library(ggthemes)
library(stringr); library(stringi)
library(tidytext)
library(tm)
filter <- dplyr::filter # resolves filter-function conflict
as... |
#' transliterations_all
#'
#' A dataset containing transliterations
#'
#' @format A data frame with 38883 rows and 3 variables:
#' @source \url{https://github.com/rich-iannone/UnidecodeR/blob/master/data/transliterations_all.rda}
"transliterations_all"
| /R/transliterations_all.R | permissive | emlab-ucsb/startR | R | false | false | 253 | r | #' transliterations_all
#'
#' A dataset containing transliterations
#'
#' @format A data frame with 38883 rows and 3 variables:
#' @source \url{https://github.com/rich-iannone/UnidecodeR/blob/master/data/transliterations_all.rda}
"transliterations_all"
|
# try a custom filter function
set.seed(1)
dds <- makeExampleDESeqDataSet(n=200, m=4, betaSD=rep(c(0,2),c(150,50)))
dds <- DESeq(dds)
res <- results(dds)
method <- "BH"
alpha <- 0.1
customFilt <- function(res, filter, alpha, method) {
if (missing(filter)) {
filter <- res$baseMean
}
theta <- 0:10/10
cutoff ... | /tests/testthat/test_custom_filt.R | no_license | 12379Monty/DESeq2 | R | false | false | 761 | r | # try a custom filter function
set.seed(1)
dds <- makeExampleDESeqDataSet(n=200, m=4, betaSD=rep(c(0,2),c(150,50)))
dds <- DESeq(dds)
res <- results(dds)
method <- "BH"
alpha <- 0.1
customFilt <- function(res, filter, alpha, method) {
if (missing(filter)) {
filter <- res$baseMean
}
theta <- 0:10/10
cutoff ... |
setwd("~/Desktop/Data Portfolio/Cyclistic Case Study")
install.packages("tidyverse")
install.packages("lubridate")
install.packages("dplyr")
library(tidyverse)
library(lubridate)
library(dplyr)
library(ggplot2)
#Uploading my data sets
jun_2020 <- read_csv("202006-divvy-tripdata.csv")
jul_2020 <- read_csv("202007-divv... | /cyclistic_analysis.R | no_license | iwill434/data-portfolio | R | false | false | 7,159 | r | setwd("~/Desktop/Data Portfolio/Cyclistic Case Study")
install.packages("tidyverse")
install.packages("lubridate")
install.packages("dplyr")
library(tidyverse)
library(lubridate)
library(dplyr)
library(ggplot2)
#Uploading my data sets
jun_2020 <- read_csv("202006-divvy-tripdata.csv")
jul_2020 <- read_csv("202007-divv... |
\alias{GtkAccessible}
\name{GtkAccessible}
\title{GtkAccessible}
\description{Accessibility support for widgets}
\section{Methods and Functions}{
\code{\link{gtkAccessibleConnectWidgetDestroyed}(object)}\cr
}
\section{Hierarchy}{\preformatted{GObject
+----AtkObject
+----GtkAccessible}}
\section{Structures}... | /RGtk2/man/GtkAccessible.Rd | no_license | hjy1210/RGtk2 | R | false | false | 531 | rd | \alias{GtkAccessible}
\name{GtkAccessible}
\title{GtkAccessible}
\description{Accessibility support for widgets}
\section{Methods and Functions}{
\code{\link{gtkAccessibleConnectWidgetDestroyed}(object)}\cr
}
\section{Hierarchy}{\preformatted{GObject
+----AtkObject
+----GtkAccessible}}
\section{Structures}... |
fecalPlotlySingleStationUI <- function(id){
ns <- NS(id)
tagList(
wellPanel(
h4(strong('Single Station Data Visualization')),
fluidRow(column(3,uiOutput(ns('oneStationSelectionUI'))),
column(1),
column(3,actionButton(ns('reviewData'),"Review Raw Parameter Data",class='... | /4.RiverineApplication/appModulesAndFunctions/fecalColiformModule.R | no_license | EmmaVJones/IR2022 | R | false | false | 3,641 | r |
fecalPlotlySingleStationUI <- function(id){
ns <- NS(id)
tagList(
wellPanel(
h4(strong('Single Station Data Visualization')),
fluidRow(column(3,uiOutput(ns('oneStationSelectionUI'))),
column(1),
column(3,actionButton(ns('reviewData'),"Review Raw Parameter Data",class='... |
## As prompted in the homeworkd, makeCacheMatrix creates a special
## matrix object that can cache its inverse
## Below is an example of how to define a matrix and use these
## functions to get the matrix inverse:
## > source('cachematrix.R')
## > z <- matrix( c(1, 2, 3, 4), nrow=2, ncol=2)
## > y <- makeCacheMatrix... | /cachematrix.R | no_license | AthenaStacy/ProgrammingAssignment2 | R | false | false | 1,110 | r | ## As prompted in the homeworkd, makeCacheMatrix creates a special
## matrix object that can cache its inverse
## Below is an example of how to define a matrix and use these
## functions to get the matrix inverse:
## > source('cachematrix.R')
## > z <- matrix( c(1, 2, 3, 4), nrow=2, ncol=2)
## > y <- makeCacheMatrix... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{cloudhsm}
\alias{cloudhsm}
\title{Amazon CloudHSM}
\usage{
cloudhsm(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\description{
AWS CloudHSM Service
This is docum... | /cran/paws/man/cloudhsm.Rd | permissive | TWarczak/paws | R | false | true | 3,534 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{cloudhsm}
\alias{cloudhsm}
\title{Amazon CloudHSM}
\usage{
cloudhsm(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\description{
AWS CloudHSM Service
This is docum... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feature.R
\name{FEATURESELECTION}
\alias{FEATURESELECTION}
\title{Classification with Feature selection}
\usage{
FEATURESELECTION(
train,
labels,
algorithm = c("ranking", "forward", "backward", "exhaustive"),
unieval = if (algorithm[1... | /man/FEATURESELECTION.Rd | no_license | cran/fdm2id | R | false | true | 1,849 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/feature.R
\name{FEATURESELECTION}
\alias{FEATURESELECTION}
\title{Classification with Feature selection}
\usage{
FEATURESELECTION(
train,
labels,
algorithm = c("ranking", "forward", "backward", "exhaustive"),
unieval = if (algorithm[1... |
\name{setAsymptoticCovMat}
\alias{setAsymptoticCovMat}
\title{Set the asymptotic covariance matrix of a fitted HMM}
\description{This function sets the empirical asymptotic covariance matrix of the fitted HMM}
\usage{
setAsymptoticCovMat(HMMFit, asymptCovMat)
}
\arguments{
\item{HMMFit}{a HMMFitClass object}
\i... | /man/setAsymptoticCovMat.rd | no_license | Mthrun/RHmm | R | false | false | 444 | rd | \name{setAsymptoticCovMat}
\alias{setAsymptoticCovMat}
\title{Set the asymptotic covariance matrix of a fitted HMM}
\description{This function sets the empirical asymptotic covariance matrix of the fitted HMM}
\usage{
setAsymptoticCovMat(HMMFit, asymptCovMat)
}
\arguments{
\item{HMMFit}{a HMMFitClass object}
\i... |
rm(list = ls())
getwd()
library("ggfortify")
install.packages("broom")
library("broom")
library("tidyverse")
tidyverse_update()
library("nlme")
#Question 10
library(readr)
A <- read_csv("datasets/exams/aphids.csv")
View(A)
model02 <- lme(fixed = thorax_length ~ 1,
random = ~1|gall_number, data = ... | /Assignments/Assignments/2019-11-19_Exam3.R | no_license | BIO375/troutman_michael | R | false | false | 953 | r | rm(list = ls())
getwd()
library("ggfortify")
install.packages("broom")
library("broom")
library("tidyverse")
tidyverse_update()
library("nlme")
#Question 10
library(readr)
A <- read_csv("datasets/exams/aphids.csv")
View(A)
model02 <- lme(fixed = thorax_length ~ 1,
random = ~1|gall_number, data = ... |
### lecture on 02.03.2015
# wczytanie pakietów ------------------------------------------------------
library(dplyr)
library(ggplot2)
library(ggvis)
library(tidyr)
library(XLConnect)
library(scales)
# wczytanie danych --------------------------------------------------------
wb <- loadWorkbook('WIRDS/datasets/gospoda... | /WIRDS/codes/02.03.2015 - wizualizacja danych jakosciowych.R | no_license | tomasznierychly/Dydaktyka | R | false | false | 1,991 | r | ### lecture on 02.03.2015
# wczytanie pakietów ------------------------------------------------------
library(dplyr)
library(ggplot2)
library(ggvis)
library(tidyr)
library(XLConnect)
library(scales)
# wczytanie danych --------------------------------------------------------
wb <- loadWorkbook('WIRDS/datasets/gospoda... |
plot1 <- function() {
if(length(dat1) == 0) {
loaddata()
}
hist(dat1$Global_active_power, col="Red", xlab="Global Active Power (kilowatts)", ylab = "Frequency", main="Global Active Power")
dev.copy(png, file="plot1.png")
dev.off()
}
loaddata <- function() {
## Download an... | /plot1.R | no_license | branimal/ExData_Plotting1 | R | false | false | 909 | r | plot1 <- function() {
if(length(dat1) == 0) {
loaddata()
}
hist(dat1$Global_active_power, col="Red", xlab="Global Active Power (kilowatts)", ylab = "Frequency", main="Global Active Power")
dev.copy(png, file="plot1.png")
dev.off()
}
loaddata <- function() {
## Download an... |
model{
####Loop for Ultuna
for(j in 1:J_Ultuna)
{
Y_R_Ultuna[j,1]<-(SOC_init_Ultuna[j]*(1-Init_ratio_Ultuna))*0.5
Y_S_Ultuna[j,1]<-(SOC_init_Ultuna[j]*(1-Init_ratio_Ultuna))*0.5
Y_FYM_Ultuna[j,1]<-0
Y_GM_Ultuna[j,1]<-0
Y_PEA_Ultuna[j,1]<-0
Y_SAW_Ultuna[j,1]<-0
Y_SLU_Ultuna[j,1]<-0
... | /JAGS_ICBM_3.1_Ultuna.R | no_license | ilmenichetti/ICBM_recalibration | R | false | false | 5,989 | r | model{
####Loop for Ultuna
for(j in 1:J_Ultuna)
{
Y_R_Ultuna[j,1]<-(SOC_init_Ultuna[j]*(1-Init_ratio_Ultuna))*0.5
Y_S_Ultuna[j,1]<-(SOC_init_Ultuna[j]*(1-Init_ratio_Ultuna))*0.5
Y_FYM_Ultuna[j,1]<-0
Y_GM_Ultuna[j,1]<-0
Y_PEA_Ultuna[j,1]<-0
Y_SAW_Ultuna[j,1]<-0
Y_SLU_Ultuna[j,1]<-0
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stonehaven_ts.R
\docType{data}
\name{stonehaven_ts}
\alias{stonehaven_ts}
\title{Wave and tidal data for a site near Stonehaven, Scotland}
\format{A data frame with 35040 rows and 8 variables
\describe{
\item{tidal_velocity}{depth averaged ... | /man/stonehaven_ts.Rd | permissive | robertjwilson/bedshear | R | false | true | 870 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stonehaven_ts.R
\docType{data}
\name{stonehaven_ts}
\alias{stonehaven_ts}
\title{Wave and tidal data for a site near Stonehaven, Scotland}
\format{A data frame with 35040 rows and 8 variables
\describe{
\item{tidal_velocity}{depth averaged ... |
testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615853287-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 659 | r | testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e... |
library(driftR)
### Name: dr_drop
### Title: Dropping observations from the monitoring period
### Aliases: dr_drop
### ** Examples
testData <- data.frame(
Date = c("9/18/2015", "9/18/2015", "9/18/2015", "9/18/2015", "9/19/2015", "9/21/2015"),
Time = c("12:10:49", "12:15:50", "12:20:51", "12:25:51", "12:30:51"... | /data/genthat_extracted_code/driftR/examples/dr_drop.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,129 | r | library(driftR)
### Name: dr_drop
### Title: Dropping observations from the monitoring period
### Aliases: dr_drop
### ** Examples
testData <- data.frame(
Date = c("9/18/2015", "9/18/2015", "9/18/2015", "9/18/2015", "9/19/2015", "9/21/2015"),
Time = c("12:10:49", "12:15:50", "12:20:51", "12:25:51", "12:30:51"... |
tableFile3col <- function(input, output, session,
label_1 = "time", label_2 = "logS", label_3 = "temperature",
default_data = data.frame(x = 1, y = 1, z = 1)
) {
## File part
userFile <- reactive({
validate(need(inp... | /tableFile3col.R | no_license | albgarre/bioinactivation_FE | R | false | false | 2,622 | r |
tableFile3col <- function(input, output, session,
label_1 = "time", label_2 = "logS", label_3 = "temperature",
default_data = data.frame(x = 1, y = 1, z = 1)
) {
## File part
userFile <- reactive({
validate(need(inp... |
#' sva: a package for removing artifacts from microarray and sequencing data
#'
#' sva has functionality to estimate and remove artifacts from high dimensional data
#' the \code{\link{sva}} function can be used to estimate artifacts from microarray data
#' the \code{\link{svaseq}} function can be used to estimate arti... | /R/sva-package.R | no_license | wevanjohnson/sva-devel | R | false | false | 2,328 | r | #' sva: a package for removing artifacts from microarray and sequencing data
#'
#' sva has functionality to estimate and remove artifacts from high dimensional data
#' the \code{\link{sva}} function can be used to estimate artifacts from microarray data
#' the \code{\link{svaseq}} function can be used to estimate arti... |
require(corrplot)
require(mlbench)
require(reshape2)
require(lattice)
require(e1071)
require(AppliedPredictiveModeling)
require(caret)
require(corrplot)
require(randomForest)
setwd("./kaggle/Santander Customer Satisfaction/")
train <- read.csv("./data/train.csv")
test <- read.csv("./data/test.csv")
sampsub <- read.csv... | /starter.R | no_license | fredrikskatland/Kaggle-Santander-Customer-Satisfaction | R | false | false | 1,204 | r | require(corrplot)
require(mlbench)
require(reshape2)
require(lattice)
require(e1071)
require(AppliedPredictiveModeling)
require(caret)
require(corrplot)
require(randomForest)
setwd("./kaggle/Santander Customer Satisfaction/")
train <- read.csv("./data/train.csv")
test <- read.csv("./data/test.csv")
sampsub <- read.csv... |
install.packages("networkD3")
library(networkD3)
data(MisLinks)
data(MisNodes)
forceNetwork(Links= MisLinks, Nodes = MisNodes,
Source = 'source', Target = "target",
Value = "value", NodeID = "name",
Group = "group", opacity = 0.8)
head(MisLinks)
head(MisNodes)
forceNetwork(Link... | /etc/nerwork3D.R | no_license | jeshin32/mygit_jes | R | false | false | 563 | r | install.packages("networkD3")
library(networkD3)
data(MisLinks)
data(MisNodes)
forceNetwork(Links= MisLinks, Nodes = MisNodes,
Source = 'source', Target = "target",
Value = "value", NodeID = "name",
Group = "group", opacity = 0.8)
head(MisLinks)
head(MisNodes)
forceNetwork(Link... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{shinyTable}
\alias{shinyTable}
\title{Shiny app to visualize dataframe as simple interactive datatable}
\usage{
shinyTable(df)
}
\arguments{
\item{df}{dataframe to be visualized}
}
\value{
Shiny App
}
\description{
Launches a basic Shiny App that renders the gi... | /man/shinyTable.Rd | permissive | Sunil-Pai-G/Rsenal | R | false | false | 440 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{shinyTable}
\alias{shinyTable}
\title{Shiny app to visualize dataframe as simple interactive datatable}
\usage{
shinyTable(df)
}
\arguments{
\item{df}{dataframe to be visualized}
}
\value{
Shiny App
}
\description{
Launches a basic Shiny App that renders the gi... |
/ID transform.R | no_license | HerRedwine/mylibrary | R | false | false | 710 | r | ||
library(proportion)
### Name: PloterrSC
### Title: Plots error, long term power and pass/fail criteria using Score
### method
### Aliases: PloterrSC
### ** Examples
n=20; alp=0.05; phi=0.05; f=-2
PloterrSC(n,alp,phi,f)
| /data/genthat_extracted_code/proportion/examples/PloterrSC.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 228 | r | library(proportion)
### Name: PloterrSC
### Title: Plots error, long term power and pass/fail criteria using Score
### method
### Aliases: PloterrSC
### ** Examples
n=20; alp=0.05; phi=0.05; f=-2
PloterrSC(n,alp,phi,f)
|
library(data.table)
library(plyr)
setwd("./downloads")
data <- fread("household_power_consumption.txt")
data2=subset(data,Date=='1/2/2007' | Date=="2/2/2007")
data3=mutate(data2,Time=as.POSIXct(strptime(paste(Date,Time),"%d/%m/%Y %H:%M:%S")))
data4=data.frame(data3) # change the data.table to a data frame format
data... | /plot2.R | no_license | wuyu91410/ExData_Plotting1 | R | false | false | 690 | r | library(data.table)
library(plyr)
setwd("./downloads")
data <- fread("household_power_consumption.txt")
data2=subset(data,Date=='1/2/2007' | Date=="2/2/2007")
data3=mutate(data2,Time=as.POSIXct(strptime(paste(Date,Time),"%d/%m/%Y %H:%M:%S")))
data4=data.frame(data3) # change the data.table to a data frame format
data... |
##########################################
# Coliphage analysis - 6 beaches
# v1 by Jade 7/13/15
# This file conducts maximum likelihood regression
# to estimate prevalence ratios
# Results stratified by beach
# 10 day gi illness
##########################################
rm(list=ls())
library(foreign)
setwd("~/Dr... | /src/Analysis/0-archive/2d-regress-10day-body-beach.R | no_license | jadebc/13beaches-coliphage | R | false | false | 14,108 | r | ##########################################
# Coliphage analysis - 6 beaches
# v1 by Jade 7/13/15
# This file conducts maximum likelihood regression
# to estimate prevalence ratios
# Results stratified by beach
# 10 day gi illness
##########################################
rm(list=ls())
library(foreign)
setwd("~/Dr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn-dropout.R
\name{nn_dropout3d}
\alias{nn_dropout3d}
\title{Dropout3D module}
\usage{
nn_dropout3d(p = 0.5, inplace = FALSE)
}
\arguments{
\item{p}{(float, optional): probability of an element to be zeroed.}
\item{inplace}{(bool, optional):... | /man/nn_dropout3d.Rd | permissive | mlverse/torch | R | false | true | 1,526 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nn-dropout.R
\name{nn_dropout3d}
\alias{nn_dropout3d}
\title{Dropout3D module}
\usage{
nn_dropout3d(p = 0.5, inplace = FALSE)
}
\arguments{
\item{p}{(float, optional): probability of an element to be zeroed.}
\item{inplace}{(bool, optional):... |
library(shiny)
runGitHub( "shinyapps", "wennaxi", subdir = "ahdc_comm_detect_lda_18")
| /ahdc_comm_detect_stan_candidacy/run.R | no_license | wennaxi/shinyapps | R | false | false | 88 | r | library(shiny)
runGitHub( "shinyapps", "wennaxi", subdir = "ahdc_comm_detect_lda_18")
|
#' trait_match
#'
#' @name trait_match
#' @docType package
#' @description Run models to analyze trait matching in networks.
NULL | /R/trait_match.R | no_license | rogini98/traitmatch | R | false | false | 129 | r | #' trait_match
#'
#' @name trait_match
#' @docType package
#' @description Run models to analyze trait matching in networks.
NULL |
/88 squid/analysis.R | no_license | iMissile/R.projects | R | false | false | 5,187 | r | ||
error.bar <- function(x, y, upper, lower=upper, color,length=0.06,...){
if(length(x) != length(y) | length(y) !=length(lower) | length(lower) != length(upper))
stop("vectors must be same length")
arrows(x,y+upper, x, y-lower, col=color,angle=90, code=3, length=length, ...)
}
pdf("mping_intergenic_5dis... | /bin/Compare_SimulateExcision/bin/mping_intergenic_5distance_withsim.R | no_license | wangpanqiao/Transposition | R | false | false | 1,829 | r |
error.bar <- function(x, y, upper, lower=upper, color,length=0.06,...){
if(length(x) != length(y) | length(y) !=length(lower) | length(lower) != length(upper))
stop("vectors must be same length")
arrows(x,y+upper, x, y-lower, col=color,angle=90, code=3, length=length, ...)
}
pdf("mping_intergenic_5dis... |
setClass("SimSam",representation(
# Description
Name="character",Date="character",Author="character",
Notes="character",PrimarySource="character",
# Dimensions
nsim="integer",npop="integer",nages="integer", # MSE dimensions
nyears="integer",nsubyears="integer",nareas="integer", ... | /ABTMSE/R/Other_object_classes.R | no_license | samueldnj/AtlanticBluefinTuna | R | false | false | 45,293 | r |
setClass("SimSam",representation(
# Description
Name="character",Date="character",Author="character",
Notes="character",PrimarySource="character",
# Dimensions
nsim="integer",npop="integer",nages="integer", # MSE dimensions
nyears="integer",nsubyears="integer",nareas="integer", ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_functions.R
\name{plot.shrinkTVP_forc}
\alias{plot.shrinkTVP_forc}
\title{Graphical summary of posterior predictive density}
\usage{
\method{plot}{shrinkTVP_forc}(x, showgap = FALSE, ...)
}
\arguments{
\item{x}{a \code{shrinkTVP_forc} ob... | /man/plot.shrinkTVP_forc.Rd | no_license | cran/shrinkTVP | R | false | true | 1,177 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_functions.R
\name{plot.shrinkTVP_forc}
\alias{plot.shrinkTVP_forc}
\title{Graphical summary of posterior predictive density}
\usage{
\method{plot}{shrinkTVP_forc}(x, showgap = FALSE, ...)
}
\arguments{
\item{x}{a \code{shrinkTVP_forc} ob... |
rm(list=ls(all=TRUE))
##################################################################
## read data & hyperparameters
##################################################################
library(MASS)
library(mvtnorm)
cal.pi <- function(alpha,beta,x)
{
pi_val <- 1/(1+exp(alpha+beta*x))
return(pi_val)
}
cal.poster <- fu... | /m3.R | no_license | zkftyj-zz/R | R | false | false | 3,185 | r | rm(list=ls(all=TRUE))
##################################################################
## read data & hyperparameters
##################################################################
library(MASS)
library(mvtnorm)
cal.pi <- function(alpha,beta,x)
{
pi_val <- 1/(1+exp(alpha+beta*x))
return(pi_val)
}
cal.poster <- fu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/highdim.R
\name{impute_residaug}
\alias{impute_residaug}
\title{Impute the controls after fitting gynsth and reweighting residuals}
\usage{
impute_residaug(outcomes, metadata, fit, trt_unit)
}
\arguments{
\item{outcomes}{Tidy dataframe with t... | /man/impute_residaug.Rd | no_license | ebenmichael/ents | R | false | true | 666 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/highdim.R
\name{impute_residaug}
\alias{impute_residaug}
\title{Impute the controls after fitting gynsth and reweighting residuals}
\usage{
impute_residaug(outcomes, metadata, fit, trt_unit)
}
\arguments{
\item{outcomes}{Tidy dataframe with t... |
#' Print the sql of an analysis
#'
#' @details
#' Print the parameterized SQL that is run for an analysisId.
#'
#' @param analysisId An analysisId for which the sql will be printed.
#' @return
#' None
#'
#' @export
printAnalysesSql<- function(analysisId){
sql <- tryCatch({
sql = SqlRender::loadRender... | /R/Helper.R | permissive | awsid9/CatalogueExport | R | false | false | 621 | r | #' Print the sql of an analysis
#'
#' @details
#' Print the parameterized SQL that is run for an analysisId.
#'
#' @param analysisId An analysisId for which the sql will be printed.
#' @return
#' None
#'
#' @export
printAnalysesSql<- function(analysisId){
sql <- tryCatch({
sql = SqlRender::loadRender... |
/Dados_de_algodao/Modelagem GLMM PC - C1 C5 e C8.R | no_license | rceratti/Dissertacao | R | false | false | 8,010 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internals.R
\name{lavaan_to_list}
\alias{lavaan_to_list}
\title{Extracts matrices from a lavaan object.}
\usage{
lavaan_to_list(object)
}
\arguments{
\item{object}{A \code{lavaan} object.}
}
\value{
A list containing Lambda, Psi, and Gamma.
}... | /man/lavaan_to_list.Rd | permissive | JonasMoss/reliable | R | false | true | 396 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internals.R
\name{lavaan_to_list}
\alias{lavaan_to_list}
\title{Extracts matrices from a lavaan object.}
\usage{
lavaan_to_list(object)
}
\arguments{
\item{object}{A \code{lavaan} object.}
}
\value{
A list containing Lambda, Psi, and Gamma.
}... |
IC<-c(0,1)
percentage<-c(0.7344013,0.2655987)
data<-data.frame(IC,percentage)
barplot(data,main="Population who Recieved an IC",xlab="IC")
c <- ggplot(data, aes(x=IC,y=percentage))
c+geom_bar()
data<-data.frame(IC=c("Didn't receive an IC","Received an IC"),percentage=c(0.7344013,0.2655987))
ggplot(data,... | /health_Code.R | no_license | apruch26/Graph_health_analytics_results- | R | false | false | 1,831 | r | IC<-c(0,1)
percentage<-c(0.7344013,0.2655987)
data<-data.frame(IC,percentage)
barplot(data,main="Population who Recieved an IC",xlab="IC")
c <- ggplot(data, aes(x=IC,y=percentage))
c+geom_bar()
data<-data.frame(IC=c("Didn't receive an IC","Received an IC"),percentage=c(0.7344013,0.2655987))
ggplot(data,... |
#
# Pharmacogenomics Prediction Pipeline - Drug Sensitivity Visualization
#
# https://github.com/DCGenomics/Pharmacogenomics_Prediction_Pipeline_P3
#
library(shiny)
library(MASS)
library(ggplot2)
library(matrixStats)
options(stringsAsFactors=FALSE)
options(shiny.trace=TRUE)
# Filepaths
base_dir = "/data/da... | /shiny/drug_sensitivity/app.R | permissive | khughitt/Pharmacogenomics_Prediction_Pipeline_P3 | R | false | false | 2,676 | r | #
# Pharmacogenomics Prediction Pipeline - Drug Sensitivity Visualization
#
# https://github.com/DCGenomics/Pharmacogenomics_Prediction_Pipeline_P3
#
library(shiny)
library(MASS)
library(ggplot2)
library(matrixStats)
options(stringsAsFactors=FALSE)
options(shiny.trace=TRUE)
# Filepaths
base_dir = "/data/da... |
modelFrame <- structure(function #Dendroclimatic-fluctuations modeling
### This function develops recursive evaluation of functions for
### one-level modeling (FOLM) and LME detrending of dendroclimatic
### chronologies.
##details<< Defaults model fluctuations in
##tree-r... | /R/modelFrame.R | no_license | talalbutt/BIOdry | R | false | false | 5,951 | r | modelFrame <- structure(function #Dendroclimatic-fluctuations modeling
### This function develops recursive evaluation of functions for
### one-level modeling (FOLM) and LME detrending of dendroclimatic
### chronologies.
##details<< Defaults model fluctuations in
##tree-r... |
# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_operation new_request send_request
#' @include cloudhsm_service.R
NULL
#' This is documentation for AWS CLOUDHSM CLASSIC
#'
#' This is documentation for **AWS CloudHSM Classic**. For more
#' information, see [AWS CloudHSM Cl... | /cran/paws.security.identity/R/cloudhsm_operations.R | permissive | peoplecure/paws | R | false | false | 38,730 | r | # This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_operation new_request send_request
#' @include cloudhsm_service.R
NULL
#' This is documentation for AWS CLOUDHSM CLASSIC
#'
#' This is documentation for **AWS CloudHSM Classic**. For more
#' information, see [AWS CloudHSM Cl... |
setwd("Documents/03_Syntenic_linkage/01_Data/OrthoFinder/input/gff_files")
setwd("W:/Thomas/Data/synteny/synteny_iadhore/")
species <- unlist(lapply(strsplit(
list.files()[grep(list.files(), pattern=".gff")], split=".gff"), "[", 1))
length(species) ## 126
##species <- c("arath", "zeama", "orysa", "theca")
... | /02_create_ini_files_for_each_combination.R | no_license | tnaake/PKS_synteny | R | false | false | 2,974 | r | setwd("Documents/03_Syntenic_linkage/01_Data/OrthoFinder/input/gff_files")
setwd("W:/Thomas/Data/synteny/synteny_iadhore/")
species <- unlist(lapply(strsplit(
list.files()[grep(list.files(), pattern=".gff")], split=".gff"), "[", 1))
length(species) ## 126
##species <- c("arath", "zeama", "orysa", "theca")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MultiAssayExperiment-methods.R
\docType{methods}
\name{rearrange}
\alias{rearrange}
\alias{rearrange,ANY-method}
\alias{rearrange,RangedRaggedAssay-method}
\alias{rearrange,ExperimentList-method}
\alias{rearrange,MultiAssayExperiment-method}
... | /man/rearrange.Rd | no_license | minghao2016/MultiAssayExperiment | R | false | true | 2,341 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MultiAssayExperiment-methods.R
\docType{methods}
\name{rearrange}
\alias{rearrange}
\alias{rearrange,ANY-method}
\alias{rearrange,RangedRaggedAssay-method}
\alias{rearrange,ExperimentList-method}
\alias{rearrange,MultiAssayExperiment-method}
... |
library(shiny)
shinyUI(pageWithSidebar(
headerPanel(h3("National Health and Nutrition Examination Survey Access Portal")),
sidebarPanel(
fluidRow(
h4("Instructions"),
h6("1: Below, Select desired year"),
h6("2: Click on 'Show columns'"),
h6("3: Select desired column"),
... | /ui.R | no_license | cjendres1/NHANESportal | R | false | false | 2,077 | r | library(shiny)
shinyUI(pageWithSidebar(
headerPanel(h3("National Health and Nutrition Examination Survey Access Portal")),
sidebarPanel(
fluidRow(
h4("Instructions"),
h6("1: Below, Select desired year"),
h6("2: Click on 'Show columns'"),
h6("3: Select desired column"),
... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinydashboard)
library(plotly)
library(ggplot2)
TBS <- read.csv("TPP.csv")
... | /CanDev_Dashboard_Script.R | no_license | zorinahan1024/Candev_TBS2480 | R | false | false | 1,966 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinydashboard)
library(plotly)
library(ggplot2)
TBS <- read.csv("TPP.csv")
... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{theme_excel}
\alias{theme_excel}
\title{ggplot color theme based on old Excel plots}
\usage{
theme_excel(base_size = 12, base_family = "", horizontal = TRUE)
}
\arguments{
\item{base_size}{\code{numeric} base font size}
\item{base_family}{\code{character} base... | /man/theme_excel.Rd | no_license | Mokubyow/RFtheme | R | false | false | 875 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{theme_excel}
\alias{theme_excel}
\title{ggplot color theme based on old Excel plots}
\usage{
theme_excel(base_size = 12, base_family = "", horizontal = TRUE)
}
\arguments{
\item{base_size}{\code{numeric} base font size}
\item{base_family}{\code{character} base... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/upper_aerodigestive_tract.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.8,family="gaussian",standardize=FALSE)
sink('./Model/EN/Classifier/upper_aerodigest... | /Model/EN/Classifier/upper_aerodigestive_tract/upper_aerodigestive_tract_084.R | no_license | leon1003/QSMART | R | false | false | 407 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/upper_aerodigestive_tract.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.8,family="gaussian",standardize=FALSE)
sink('./Model/EN/Classifier/upper_aerodigest... |
#' @rdname confusion.matrix.positive.likelihood.ratio.simple
confusion.matrix.positive.likelihood.ratio <- function(
confusion.matrix
) {
confusion.matrix.positive.likelihood.ratio.simple(
true.positive = confusion.matrix.true.positive(confusion.matrix)
,false.negative = confusion.matrix.false.negative(conf... | /R/confusion.matrix.positive.likelihood.ratio.R | permissive | burrm/lolcat | R | false | false | 482 | r | #' @rdname confusion.matrix.positive.likelihood.ratio.simple
confusion.matrix.positive.likelihood.ratio <- function(
confusion.matrix
) {
confusion.matrix.positive.likelihood.ratio.simple(
true.positive = confusion.matrix.true.positive(confusion.matrix)
,false.negative = confusion.matrix.false.negative(conf... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/admin_functions.R
\name{directory.asps.list}
\alias{directory.asps.list}
\title{List the ASPs issued by a user.}
\usage{
directory.asps.list(userKey)
}
\arguments{
\item{userKey}{Identifies the user in the API request}
}
\description{
Autogen... | /googleadmindirectoryv1.auto/man/directory.asps.list.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 844 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/admin_functions.R
\name{directory.asps.list}
\alias{directory.asps.list}
\title{List the ASPs issued by a user.}
\usage{
directory.asps.list(userKey)
}
\arguments{
\item{userKey}{Identifies the user in the API request}
}
\description{
Autogen... |
##' .. content for \description{} (no empty lines) ..
##'
##' .. content for \details{} ..
##'
##' @title
##' @param models
generate.interaction.test.dt <- function(models) {
if (!('list' %in% class(models))) {
models = list(models)
}
interaction.test.dt = data.table()
# Go through the models
for (... | /R/generate.interaction.test.dt.R | no_license | mattmoo/checkwho_analysis | R | false | false | 2,374 | r | ##' .. content for \description{} (no empty lines) ..
##'
##' .. content for \details{} ..
##'
##' @title
##' @param models
generate.interaction.test.dt <- function(models) {
if (!('list' %in% class(models))) {
models = list(models)
}
interaction.test.dt = data.table()
# Go through the models
for (... |
system.time({
highest_chain = 0;
do.collatz <- function(x) {
ifelse(x %% 2 == 0, x / 2, 3*x + 1)
}
#[1] 524
#[1] 837799
#user system elapsed
#5849.078 199.860 6341.996
starting_number = 999999
next_number = starting_number
complete_set <- c(1:starting_number)
left_overs <- complete_set
answer <- 0
vector <... | /Week14/euler14_jsmykil.r | no_license | britannica/euler-club | R | false | false | 815 | r | system.time({
highest_chain = 0;
do.collatz <- function(x) {
ifelse(x %% 2 == 0, x / 2, 3*x + 1)
}
#[1] 524
#[1] 837799
#user system elapsed
#5849.078 199.860 6341.996
starting_number = 999999
next_number = starting_number
complete_set <- c(1:starting_number)
left_overs <- complete_set
answer <- 0
vector <... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/st_crs2.R
\name{st_crs2}
\alias{st_crs2}
\title{Retrieve coordinate reference system from sf or sfc object}
\usage{
st_crs2(x, ...)
}
\arguments{
\item{x}{numeric, character, or object of class \link{sf} or \link{sfc}, being:
\itemi... | /man/st_crs2.Rd | no_license | cran/sen2r | R | false | true | 3,175 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/st_crs2.R
\name{st_crs2}
\alias{st_crs2}
\title{Retrieve coordinate reference system from sf or sfc object}
\usage{
st_crs2(x, ...)
}
\arguments{
\item{x}{numeric, character, or object of class \link{sf} or \link{sfc}, being:
\itemi... |
\alias{cairo-png-functions}
\alias{cairo_read_func_t}
\alias{cairo_write_func_t}
\name{cairo-png-functions}
\title{PNG Support}
\description{Reading and writing PNG images}
\section{Methods and Functions}{
\code{\link{cairoImageSurfaceCreateFromPng}(filename)}\cr
\code{\link{cairoImageSurfaceCreateFromPngStream}(con)}\... | /RGtk2/man/cairo-png-functions.Rd | no_license | hjy1210/RGtk2 | R | false | false | 2,321 | rd | \alias{cairo-png-functions}
\alias{cairo_read_func_t}
\alias{cairo_write_func_t}
\name{cairo-png-functions}
\title{PNG Support}
\description{Reading and writing PNG images}
\section{Methods and Functions}{
\code{\link{cairoImageSurfaceCreateFromPng}(filename)}\cr
\code{\link{cairoImageSurfaceCreateFromPngStream}(con)}\... |
library(shiny)
library(ggplot2)
library(datasets)
dataset <- iris
shinyUI(pageWithSidebar(
titlePanel(title = h4("Iris dataset plotter ", align="center")),
sidebarPanel(
helpText("This selection enables to select between different graph tipes from ggplot2 library and a common histogram"),
selectInpu... | /ui.R | no_license | tomas-aguado/DPAS4 | R | false | false | 1,725 | r | library(shiny)
library(ggplot2)
library(datasets)
dataset <- iris
shinyUI(pageWithSidebar(
titlePanel(title = h4("Iris dataset plotter ", align="center")),
sidebarPanel(
helpText("This selection enables to select between different graph tipes from ggplot2 library and a common histogram"),
selectInpu... |
# This script plots total rodent energy over time
# This script will no longer work -- data folder has been removed
library(dplyr)
dat = read.csv('data/monthly_E_controls.csv')
dat = dat[,names(dat) != 'period']
totals = rowSums(dat)
totalE = data.frame(total = totals,period = rownames(dat))
periodinfo = read.cs... | /total_energy_ts.r | no_license | emchristensen/rodent_analysis | R | false | false | 1,178 | r | # This script plots total rodent energy over time
# This script will no longer work -- data folder has been removed
library(dplyr)
dat = read.csv('data/monthly_E_controls.csv')
dat = dat[,names(dat) != 'period']
totals = rowSums(dat)
totalE = data.frame(total = totals,period = rownames(dat))
periodinfo = read.cs... |
# constructor
BFprobability <- function(odds, normalize = 0){
## Add denominator
if(options()$BFcheckProbabilityList){
## eliminate redundant models
if( length(odds) > 1 ){
odds = c( odds, (1/odds[1]) / (1/odds[1]) )
duplicates = 1:length(odds)
for(i in 2:length(odds)){
for(j i... | /pkg/BayesFactor/R/methods-BFprobability.R | no_license | Ax3man/BayesFactor | R | false | false | 9,100 | r | # constructor
BFprobability <- function(odds, normalize = 0){
## Add denominator
if(options()$BFcheckProbabilityList){
## eliminate redundant models
if( length(odds) > 1 ){
odds = c( odds, (1/odds[1]) / (1/odds[1]) )
duplicates = 1:length(odds)
for(i in 2:length(odds)){
for(j i... |
dt_simN<-read.table("simulation_attach_noise.txt", header=T, sep="\t");
plot(c(0,max(dt_simN[,1]+50)), c(min(dt_simN[,2]),max(dt_simN[,2])), main="simulated", col=2, type="n");
lines(dt_simN[,1], dt_simN[,2], col=8);
dt_sim<-read.table("simulation_attach.txt", header=T, sep="\t");
lines(dt_sim[,1], dt_sim[,2], ... | /bayestimateCon/Rcode.r | no_license | ffeng23/BayesianEstimationAffinityConstant | R | false | false | 4,237 | r |
dt_simN<-read.table("simulation_attach_noise.txt", header=T, sep="\t");
plot(c(0,max(dt_simN[,1]+50)), c(min(dt_simN[,2]),max(dt_simN[,2])), main="simulated", col=2, type="n");
lines(dt_simN[,1], dt_simN[,2], col=8);
dt_sim<-read.table("simulation_attach.txt", header=T, sep="\t");
lines(dt_sim[,1], dt_sim[,2], ... |
library(RobAStBase)
### Name: MEstimate-class
### Title: MEstimate-class.
### Aliases: MEstimate-class Mroot Mroot,MEstimate-method
### show,MEstimate-method
### Keywords: classes
### ** Examples
## prototype
new("MEstimate")
| /data/genthat_extracted_code/RobAStBase/examples/MEstimate-class.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 235 | r | library(RobAStBase)
### Name: MEstimate-class
### Title: MEstimate-class.
### Aliases: MEstimate-class Mroot Mroot,MEstimate-method
### show,MEstimate-method
### Keywords: classes
### ** Examples
## prototype
new("MEstimate")
|
## ----set-options, echo=FALSE, cache=FALSE---------------------------------------------------------
options(width = 100)
## -------------------------------------------------------------------------------------------------
library("joineRmeta")
## ---- eval=FALSE-----------------------------------------------... | /data/genthat_extracted_code/joineRmeta/vignettes/joineRmeta.R | no_license | surayaaramli/typeRrh | R | false | false | 21,385 | r | ## ----set-options, echo=FALSE, cache=FALSE---------------------------------------------------------
options(width = 100)
## -------------------------------------------------------------------------------------------------
library("joineRmeta")
## ---- eval=FALSE-----------------------------------------------... |
library(tidyverse) ; library(lubridate) ; library(sf)
# Confirmed cases
# Source: Public Health England
# URL: https://coronavirus.data.gov.uk
cases <- read_csv("https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv") %>%
filter(`Area type` == "ltla") %>%
mutate(`Specimen date` = as.Date(`Spe... | /global.R | permissive | VincenzoM98/covid-19 | R | false | false | 2,136 | r | library(tidyverse) ; library(lubridate) ; library(sf)
# Confirmed cases
# Source: Public Health England
# URL: https://coronavirus.data.gov.uk
cases <- read_csv("https://coronavirus.data.gov.uk/downloads/csv/coronavirus-cases_latest.csv") %>%
filter(`Area type` == "ltla") %>%
mutate(`Specimen date` = as.Date(`Spe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Oysters.R
\docType{data}
\name{Oysters}
\alias{Oysters}
\title{A simulated dataset of oyster catch}
\format{
A data frame with 21 rows and 2 variables:
\describe{
\item{Density}{Number of boat passes through the oyster bed.}
\item{Harvest... | /man/Oysters.Rd | no_license | dereksonderegger/dsData | R | false | true | 683 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Oysters.R
\docType{data}
\name{Oysters}
\alias{Oysters}
\title{A simulated dataset of oyster catch}
\format{
A data frame with 21 rows and 2 variables:
\describe{
\item{Density}{Number of boat passes through the oyster bed.}
\item{Harvest... |
rm( list=ls() )
graphics.off()
windows(record=TRUE)
library(read.dbc)
library(tidyverse)
#------------------------------------------------
# Brazil data has to be processed state by state
#------------------------------------------------
state = c("AC", "AL", "AM", "AP", "BA",
"CE", "DF", "ES", "GO", "MA"... | /BR-deaths/reveillon.R | no_license | tbernardesfaria/bonecave | R | false | false | 7,071 | r | rm( list=ls() )
graphics.off()
windows(record=TRUE)
library(read.dbc)
library(tidyverse)
#------------------------------------------------
# Brazil data has to be processed state by state
#------------------------------------------------
state = c("AC", "AL", "AM", "AP", "BA",
"CE", "DF", "ES", "GO", "MA"... |
#' calculate circle_circle layout manually
#'
#' @inheritParams gather_graph
#' @param layout a layout object
#'
#' @return
#' @export
#'
#' @examples
#' libray(tidygraph)
#' n <- 1000
#' microbiome <- data.frame(
#' otu = paste("OTU",1:n,sep="_"),
#' phylum = sample(paste("phylum",1:5,sep="_"),n,replace ... | /R/circle_circle.R | no_license | cfc424/ccgraph | R | false | false | 1,413 | r | #' calculate circle_circle layout manually
#'
#' @inheritParams gather_graph
#' @param layout a layout object
#'
#' @return
#' @export
#'
#' @examples
#' libray(tidygraph)
#' n <- 1000
#' microbiome <- data.frame(
#' otu = paste("OTU",1:n,sep="_"),
#' phylum = sample(paste("phylum",1:5,sep="_"),n,replace ... |
xUnique = 1:5
trueCoeff = c(0, 1, 1)
getData = function(coefs = c(0, 1, 1), xs = 1:5, dupl = 10,
sd = 5, seed=2222){
### This function creates the artificial data
set.seed(seed)
x = rep(xs, each = dupl)
y = coefs[1] + coefs[2]*x + coefs[3] * x^2 +
rnorm(length(x), 0, sd)
return(data... | /hw8/hw8.r | no_license | j170382276/stat133 | R | false | false | 4,970 | r | xUnique = 1:5
trueCoeff = c(0, 1, 1)
getData = function(coefs = c(0, 1, 1), xs = 1:5, dupl = 10,
sd = 5, seed=2222){
### This function creates the artificial data
set.seed(seed)
x = rep(xs, each = dupl)
y = coefs[1] + coefs[2]*x + coefs[3] * x^2 +
rnorm(length(x), 0, sd)
return(data... |
# Analysis of flooding and hurricane evacuation risks for populations of concern in Rhode Island
library(tidyverse)
library(sf)
library(tmap)
library(tmaptools)
library(lwgeom)
library(tigris)
options(tigris_use_cache = TRUE, tigris_class = "sf")
load("DATA/ne_layers.rds")
# Download Census TIGERLine hydrography for ... | /Evacuation_RhodeIsland.R | no_license | profLuna/Investing-for-Equity | R | false | false | 28,310 | r | # Analysis of flooding and hurricane evacuation risks for populations of concern in Rhode Island
library(tidyverse)
library(sf)
library(tmap)
library(tmaptools)
library(lwgeom)
library(tigris)
options(tigris_use_cache = TRUE, tigris_class = "sf")
load("DATA/ne_layers.rds")
# Download Census TIGERLine hydrography for ... |
hover_reply <- function(id, uri, workspace, document, position) {
line <- position$line
character <- position$character
if (!check_scope(uri, document, line)) {
return(Response$new(id))
}
hover <- detect_hover(document, line, character)
logger$info("hover: ", hover)
matches <- st... | /R/hover.R | no_license | renkun-ken/languageserver | R | false | false | 723 | r | hover_reply <- function(id, uri, workspace, document, position) {
line <- position$line
character <- position$character
if (!check_scope(uri, document, line)) {
return(Response$new(id))
}
hover <- detect_hover(document, line, character)
logger$info("hover: ", hover)
matches <- st... |
library("forecast")
library("Mcomp")
library("Rlgt")
library("RlgtLik")
#M3.data <- append(subset(M3,"yearly"), append(subset(M3,"quarterly"), subset(M3,"monthly")))
M3.data <- subset(M3,"yearly")
#M3.data <- subset(M3,"monthly")
nseries <- length(M3.data)
#M3.data[[2]]
#M3[["N0001"]]
#str(M3)
mySgeApply <- lapply
... | /scripts/runExperimentsLGT.R | no_license | cbergmeir/Rlgt | R | false | false | 4,945 | r | library("forecast")
library("Mcomp")
library("Rlgt")
library("RlgtLik")
#M3.data <- append(subset(M3,"yearly"), append(subset(M3,"quarterly"), subset(M3,"monthly")))
M3.data <- subset(M3,"yearly")
#M3.data <- subset(M3,"monthly")
nseries <- length(M3.data)
#M3.data[[2]]
#M3[["N0001"]]
#str(M3)
mySgeApply <- lapply
... |
#' Convert Rasch difficulties of many dichotomous items to Partial Credit Model (PCM) thresholds
#'
#' Given a set of Rasch difficulties from n dichomtomous items, calculate the equivalent thresholds for a single polytomous item
#' (with n+1 categories) that fits the partial credit model (PCM).
#'
#' @param dich... | /R/DichotomousAndPolytomous.R | permissive | CambridgeAssessmentResearch/unimirt | R | false | false | 4,567 | r | #' Convert Rasch difficulties of many dichotomous items to Partial Credit Model (PCM) thresholds
#'
#' Given a set of Rasch difficulties from n dichomtomous items, calculate the equivalent thresholds for a single polytomous item
#' (with n+1 categories) that fits the partial credit model (PCM).
#'
#' @param dich... |
# Unfortunately, this cannot be run non-interactively (or at least
# I have not thought of a way to do so)
library(gridGraphics)
notrun <- function() {
plot(1)
identify(1)
dl <- recordPlot()
dev.off()
plotdiff(expression(replayPlot(dl)), "identify")
}
| /gridGraphics/test-scripts/test-identify.R | permissive | solgenomics/R_libs | R | false | false | 305 | r |
# Unfortunately, this cannot be run non-interactively (or at least
# I have not thought of a way to do so)
library(gridGraphics)
notrun <- function() {
plot(1)
identify(1)
dl <- recordPlot()
dev.off()
plotdiff(expression(replayPlot(dl)), "identify")
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/overlapping_measure.R
\name{DOL_f}
\alias{DOL_f}
\title{Degree of overlapping (DOL) function for mixture model}
\usage{
DOL_f(x, alpha, beta, w)
}
\arguments{
\item{x}{Cauchy mixture data}
\item{alpha}{loaction parameters}
\item{beta}{scale... | /MMt/man/DOL_f.Rd | permissive | Likelyt/Mixture-Model-tools | R | false | true | 458 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/overlapping_measure.R
\name{DOL_f}
\alias{DOL_f}
\title{Degree of overlapping (DOL) function for mixture model}
\usage{
DOL_f(x, alpha, beta, w)
}
\arguments{
\item{x}{Cauchy mixture data}
\item{alpha}{loaction parameters}
\item{beta}{scale... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{punting}
\alias{punting}
\title{American football punting}
\format{A data frame with 13 observations on the following 7 variables.
\itemize{ \item{distance}{ mean distance for 10 punts (feet) }
\item{hang}{ mea... | /man/punting.Rd | no_license | cran/fastR | R | false | true | 1,396 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{punting}
\alias{punting}
\title{American football punting}
\format{A data frame with 13 observations on the following 7 variables.
\itemize{ \item{distance}{ mean distance for 10 punts (feet) }
\item{hang}{ mea... |
#' Get the pending streams for a dataset
#'
#' Retrieves the number of pending messages. Use [appendStream()] to
#' append all pending streamed rows to the dataset.
#'
#' @param ds a CrunchDataset
#' @return number of pending messages in the stream for the dataset
#' @export
pendingStream <- function(ds) {
stopifno... | /R/dataset-stream.R | no_license | nealrichardson/rcrunch | R | false | false | 2,708 | r | #' Get the pending streams for a dataset
#'
#' Retrieves the number of pending messages. Use [appendStream()] to
#' append all pending streamed rows to the dataset.
#'
#' @param ds a CrunchDataset
#' @return number of pending messages in the stream for the dataset
#' @export
pendingStream <- function(ds) {
stopifno... |
#' 'imageId'
#'
#' imageId function will read SOPInstanceUID metadata of all DICOM files read by DICOMHeaderList function
#'
#'
#' @param DICOMList you can put it like this and then run the function : DICOMList<-DICOMHeaderList(DICOMFolderPath)
#' @import digest
#' @import dplyr
#' @importFrom magrittr "%>%"
#'
#'
#' @... | /RadETL/R/imageId_ImageTable.R | no_license | emad0525/Radiology-CDM | R | false | false | 902 | r | #' 'imageId'
#'
#' imageId function will read SOPInstanceUID metadata of all DICOM files read by DICOMHeaderList function
#'
#'
#' @param DICOMList you can put it like this and then run the function : DICOMList<-DICOMHeaderList(DICOMFolderPath)
#' @import digest
#' @import dplyr
#' @importFrom magrittr "%>%"
#'
#'
#' @... |
# ---HEADER-------------------------------------------------------------------------------------------------------------
# Purpose: Create proportions to split ISIC based on concordance tables
# Map the flows between major groups across ISIC versions in order to crossawlk between versions
#*****************************... | /gbd_2019/risk_factors_code/occ/employment/isic_crosswalk.R | no_license | Nermin-Ghith/ihme-modeling | R | false | false | 8,210 | r | # ---HEADER-------------------------------------------------------------------------------------------------------------
# Purpose: Create proportions to split ISIC based on concordance tables
# Map the flows between major groups across ISIC versions in order to crossawlk between versions
#*****************************... |
# Simulation Study Code for:
# No Measurement Error
# 2n
# 10
# Missing Not at Random
# GLMNET
# Last Modified: 3/7/2020
Sys.setenv(JAVA_HOME='')
library(earth)
library(randomForest)
library(DMwR)
library(caret)
library(caretEnsemble)
library(pROC)
library(glmnet)
library(plotROC)
library(tictoc)
... | /NoMeasureError_2n_10_MNAR_GLMNET.R | no_license | robertobertolini/Binary_Classification_Simulation_Study | R | false | false | 5,240 | r | # Simulation Study Code for:
# No Measurement Error
# 2n
# 10
# Missing Not at Random
# GLMNET
# Last Modified: 3/7/2020
Sys.setenv(JAVA_HOME='')
library(earth)
library(randomForest)
library(DMwR)
library(caret)
library(caretEnsemble)
library(pROC)
library(glmnet)
library(plotROC)
library(tictoc)
... |
library(tidyverse)
library(patchwork)
# Function 1
# linear
tibble(x = c(0, 2, 3, 4,5, 7), y = c(1, 0.8, 0.7, 0.69, 0.65, 0)) %>%
mutate(x2 = x^2, x3 = x^3) -> df
m <- lm(data = df, y ~ x +x2 + x3)
plot(seq(0, 10, 0.1), predict(m, tibble(x = seq(0, 10, 0.1), x2 = x^2, x3 = x^2)))
ggplot(df, aes(x, y)) + geo... | /Analyses/some_simulation_difficulty_rule.R | no_license | warren-james/Breaking_symmetry | R | false | false | 1,835 | r | library(tidyverse)
library(patchwork)
# Function 1
# linear
tibble(x = c(0, 2, 3, 4,5, 7), y = c(1, 0.8, 0.7, 0.69, 0.65, 0)) %>%
mutate(x2 = x^2, x3 = x^3) -> df
m <- lm(data = df, y ~ x +x2 + x3)
plot(seq(0, 10, 0.1), predict(m, tibble(x = seq(0, 10, 0.1), x2 = x^2, x3 = x^2)))
ggplot(df, aes(x, y)) + geo... |
library(tidyverse)
annual <- read_table("ftp://aftp.cmdl.noaa.gov/products/trends/co2/co2_annmean_mlo.txt", skip = 56)
library(ggplot2)
install.packages("ggthemes")
library(ggthemes)
plot <- ggplot(annual, aes(year, mean)) + geom_line() +
labs(x = "Year", y = "Annual", title = "Annual Mean Carbon dioxide 1958 - 201... | /week_08/case_study_08.R | no_license | geo511-2020/geo511-2020-tasks-shruti8297 | R | false | false | 566 | r |
library(tidyverse)
annual <- read_table("ftp://aftp.cmdl.noaa.gov/products/trends/co2/co2_annmean_mlo.txt", skip = 56)
library(ggplot2)
install.packages("ggthemes")
library(ggthemes)
plot <- ggplot(annual, aes(year, mean)) + geom_line() +
labs(x = "Year", y = "Annual", title = "Annual Mean Carbon dioxide 1958 - 201... |
# This code will be used to producing a map of locations for the
# methods section of the morph chapter.
workwd <- 'C:/Users/z5188231/Desktop/Coding/Scripts/AdditionalWork/AdamPaper/Maps'
setwd(workwd)
# Now we can bring in the data for analysis. The data we will be
# looking at
data <- read.table('key-fi... | /Scripts/Sample_distribution_map.R | no_license | schnappi-wkl/Sv1_StarlingGBS | R | false | false | 5,585 | r | # This code will be used to producing a map of locations for the
# methods section of the morph chapter.
workwd <- 'C:/Users/z5188231/Desktop/Coding/Scripts/AdditionalWork/AdamPaper/Maps'
setwd(workwd)
# Now we can bring in the data for analysis. The data we will be
# looking at
data <- read.table('key-fi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/syntheticMultipletsFromCounts.R
\name{syntheticSinglets}
\alias{syntheticSinglets}
\title{syntheticSinglets}
\arguments{
\item{nGenes}{Number of genes in generated synthetic data.}
\item{nCells}{Number of cells per cell type in generated syn... | /man/syntheticSinglets.Rd | no_license | jasonserviss/CIMseq.testing | R | false | true | 688 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/syntheticMultipletsFromCounts.R
\name{syntheticSinglets}
\alias{syntheticSinglets}
\title{syntheticSinglets}
\arguments{
\item{nGenes}{Number of genes in generated synthetic data.}
\item{nCells}{Number of cells per cell type in generated syn... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pairwise_constraints_clustering.R
\name{ckmeansSSLR}
\alias{ckmeansSSLR}
\title{General Interface COP K-Means Algorithm}
\usage{
ckmeansSSLR(n_clusters = NULL, mustLink = NULL, cantLink = NULL, max_iter = 10)
}
\arguments{
\item{n_clusters}{A... | /man/ckmeansSSLR.Rd | no_license | cran/SSLR | R | false | true | 1,426 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pairwise_constraints_clustering.R
\name{ckmeansSSLR}
\alias{ckmeansSSLR}
\title{General Interface COP K-Means Algorithm}
\usage{
ckmeansSSLR(n_clusters = NULL, mustLink = NULL, cantLink = NULL, max_iter = 10)
}
\arguments{
\item{n_clusters}{A... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prioritization.R
\name{get_neighbor}
\alias{get_neighbor}
\title{Title get neighbor of a node}
\usage{
get_neighbor(node, net)
}
\arguments{
\item{node}{a gene}
\item{net}{a network}
}
\value{
a vector of gene
}
\description{
Title get neigh... | /man/get_neighbor.Rd | no_license | cran/prioGene | R | false | true | 337 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prioritization.R
\name{get_neighbor}
\alias{get_neighbor}
\title{Title get neighbor of a node}
\usage{
get_neighbor(node, net)
}
\arguments{
\item{node}{a gene}
\item{net}{a network}
}
\value{
a vector of gene
}
\description{
Title get neigh... |
#' Score version for smooth direct designs
#'
#' \code{score_direct_smooth} gives the version of the score that is needed for \link{stage_two}.
#'
#' @param parameters Parameters specifying the design
#' @param n1 First stage sample size
#' @param n2 n_2-values
#' @param h Distance between two nodes
#' @param N 4N+1 gi... | /R/StageTwo.R | no_license | MatheMax/OptReSample | R | false | false | 5,084 | r | #' Score version for smooth direct designs
#'
#' \code{score_direct_smooth} gives the version of the score that is needed for \link{stage_two}.
#'
#' @param parameters Parameters specifying the design
#' @param n1 First stage sample size
#' @param n2 n_2-values
#' @param h Distance between two nodes
#' @param N 4N+1 gi... |
################################################################################
### Heranalyse Toetsanalyse meerdere versies stap 2.R
################################################################################
### R code voor Tentamenanalyse Vrije Universiteit Amsterdam
###
### Bestandsnaam: Heranalyse Toets... | /MC_toetsen/Analysescripts/Heranalyse Toetsanalyse meerdere versies stap 2.R | permissive | Dritty/toetsanalyse | R | false | false | 9,101 | r | ################################################################################
### Heranalyse Toetsanalyse meerdere versies stap 2.R
################################################################################
### R code voor Tentamenanalyse Vrije Universiteit Amsterdam
###
### Bestandsnaam: Heranalyse Toets... |
library(dplyr)
library(ggplot2)
current_yield <- 0.01
yield_vol <- 0.0075
maturity <- 10
time_step <- 0.1
set.seed(0)
tibble(
t = seq(0, maturity, time_step),
) %>%
mutate(
yield_chg = rnorm(n(), 0, yield_vol * sqrt(time_step)),
yield = current_yield + cumsum(yield_chg),
price = 1 / (1 + yield) ^ (ma... | /index-investing/data/bond_price.R | no_license | artem-bakulin/latex | R | false | false | 383 | r | library(dplyr)
library(ggplot2)
current_yield <- 0.01
yield_vol <- 0.0075
maturity <- 10
time_step <- 0.1
set.seed(0)
tibble(
t = seq(0, maturity, time_step),
) %>%
mutate(
yield_chg = rnorm(n(), 0, yield_vol * sqrt(time_step)),
yield = current_yield + cumsum(yield_chg),
price = 1 / (1 + yield) ^ (ma... |
library(onls)
### Name: x0
### Title: x0-values from orthogonal nonlinear least squares regression
### Aliases: x0
### Keywords: optimize models nonlinear
### ** Examples
DNase1 <- subset(DNase, Run == 1)
DNase1$density <- sapply(DNase1$density, function(x) rnorm(1, x, 0.1 * x))
mod <- onls(density ~ Asym/(1 + exp(... | /data/genthat_extracted_code/onls/examples/x0.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 431 | r | library(onls)
### Name: x0
### Title: x0-values from orthogonal nonlinear least squares regression
### Aliases: x0
### Keywords: optimize models nonlinear
### ** Examples
DNase1 <- subset(DNase, Run == 1)
DNase1$density <- sapply(DNase1$density, function(x) rnorm(1, x, 0.1 * x))
mod <- onls(density ~ Asym/(1 + exp(... |
#' t.ci.table
#'
#' A function to calculate credible intervals and make a table. See page 169.
#'
#' @usage t.ci.table(coefs,cov.mat,level=0.95,degrees=Inf,quantiles=c(0.025,0.500,0.975))
#'
#' @param coefs vector of coefficient estimates, usually posterior means
#' @param cov.mat variance-covariance matrix
#... | /BaM2/R/t.ci.table.R | no_license | miguelmariagp/BAMnew | R | false | false | 1,123 | r | #' t.ci.table
#'
#' A function to calculate credible intervals and make a table. See page 169.
#'
#' @usage t.ci.table(coefs,cov.mat,level=0.95,degrees=Inf,quantiles=c(0.025,0.500,0.975))
#'
#' @param coefs vector of coefficient estimates, usually posterior means
#' @param cov.mat variance-covariance matrix
#... |
visualize.portfolio_sessions_all <- function(viz=as.viz("portfolio_sessions_all")){
library(dplyr)
library(tidyr)
library(ggplot2)
library(RColorBrewer)
library(grid)
deps <- readDepends(viz)
height = viz[["height"]]
width = viz[["width"]]
bar_line_col = viz[["bar_line_col"]]
text_col = viz[["tex... | /scripts/visualize/portfolio_sessions_all.R | permissive | mhines-usgs/internal-analytics | R | false | false | 5,560 | r | visualize.portfolio_sessions_all <- function(viz=as.viz("portfolio_sessions_all")){
library(dplyr)
library(tidyr)
library(ggplot2)
library(RColorBrewer)
library(grid)
deps <- readDepends(viz)
height = viz[["height"]]
width = viz[["width"]]
bar_line_col = viz[["bar_line_col"]]
text_col = viz[["tex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.