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 |
|---|---|---|---|---|---|---|---|---|---|
/Matérias/FECC/Lista 9/script_list_9.R | no_license | ricardopmarinho/UFMG | R | false | false | 1,382 | r | ||
w_ <- function(alpha, w, k.max, k.min)
{
w_ <- w
w_[k.max] <- w_[k.max] + alpha
w_[k.min] <- w_[k.min] - alpha
w_
}
| /rodd/R/w_.R | no_license | ingted/R-Examples | R | false | false | 140 | r | w_ <- function(alpha, w, k.max, k.min)
{
w_ <- w
w_[k.max] <- w_[k.max] + alpha
w_[k.min] <- w_[k.min] - alpha
w_
}
|
# https://www.cs.helsinki.fi/u/sakaya/tutorial/
# Gaussian with unknown mean
gaussian <- "
data {
int<lower=1> n;
vector[n] x;
}
parameters {
real mu;
real<lower=0> sigma;
}
model {
mu ~ normal(0, 10);
x ~ normal(mu, sigma);
} "
library("rstan")
n <- 1000
x <- rnorm(n... | /R/stan/gaussian.R | no_license | antagomir/scripts | R | false | false | 518 | r | # https://www.cs.helsinki.fi/u/sakaya/tutorial/
# Gaussian with unknown mean
gaussian <- "
data {
int<lower=1> n;
vector[n] x;
}
parameters {
real mu;
real<lower=0> sigma;
}
model {
mu ~ normal(0, 10);
x ~ normal(mu, sigma);
} "
library("rstan")
n <- 1000
x <- rnorm(n... |
shinyUI(
navbarPage(
"shinyBTC",
tabPanel("about",
includeHTML(about.html)),
tabPanel("market API",
fluidPage(
sidebarLayout(
sidebarPanel(width = 3,
selectInput("Imarket", label = "market:", choices = getOption("Rbitc... | /ui.R | permissive | jangorecki/shinyBTC | R | false | false | 5,998 | r | shinyUI(
navbarPage(
"shinyBTC",
tabPanel("about",
includeHTML(about.html)),
tabPanel("market API",
fluidPage(
sidebarLayout(
sidebarPanel(width = 3,
selectInput("Imarket", label = "market:", choices = getOption("Rbitc... |
#!/opt/R/3.3.0/bin/R
######## BEGIN FUNCTION BLOCK ##########
make_image<-function(d,outfile,input_width,text_adjust) {
# decide output type
filex = substr(outfile,nchar(outfile)-2,nchar(outfile))
if(filex=="pdf") {
pdf(outfile,bg="#FFFFFF",height=4.5,width=7)
} else if (filex=="png") {
png(outfile,bg=... | /utilities/plot_exon_distro.r | permissive | Sisov/AlignQC | R | false | false | 2,463 | r | #!/opt/R/3.3.0/bin/R
######## BEGIN FUNCTION BLOCK ##########
make_image<-function(d,outfile,input_width,text_adjust) {
# decide output type
filex = substr(outfile,nchar(outfile)-2,nchar(outfile))
if(filex=="pdf") {
pdf(outfile,bg="#FFFFFF",height=4.5,width=7)
} else if (filex=="png") {
png(outfile,bg=... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabmedians_svy.R
\name{tabmedians.svy}
\alias{tabmedians.svy}
\title{Create Table Comparing Group Medians (for Complex Survey Data)}
\usage{
tabmedians.svy(
formula,
design,
columns = c("xgroups", "p"),
parenth = "iqr",
s... | /man/tabmedians.svy.Rd | no_license | cran/tab | R | false | true | 2,951 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tabmedians_svy.R
\name{tabmedians.svy}
\alias{tabmedians.svy}
\title{Create Table Comparing Group Medians (for Complex Survey Data)}
\usage{
tabmedians.svy(
formula,
design,
columns = c("xgroups", "p"),
parenth = "iqr",
s... |
IFA <- function(x, filt, ofac = 1, from = 0.001, to = 20, nt = 150, b = 3, pixsize = 32) {
type = "frequency"
alpha = 0.01
level = 0
eps = 1e-3
rang = 4
xb <- x
datanames <- colnames(x)
t <- x[, 1]
tb <- x[, 1]
y <- x[, 2]
err <- x[, 3]
yb <- y
n <- length(y)
ts... | /IFA.R | no_license | P-R-McWhirter/skycamT_variable_classification_functions | R | false | false | 6,691 | r | IFA <- function(x, filt, ofac = 1, from = 0.001, to = 20, nt = 150, b = 3, pixsize = 32) {
type = "frequency"
alpha = 0.01
level = 0
eps = 1e-3
rang = 4
xb <- x
datanames <- colnames(x)
t <- x[, 1]
tb <- x[, 1]
y <- x[, 2]
err <- x[, 3]
yb <- y
n <- length(y)
ts... |
library(twitteR)
library(ROAuth)
library(RCurl)
download.file(url = "http://curl.haxx.se/ca/cacert.pem",destfile="cacert.pem")
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
CUSTOMER_KEY ... | /Materi Project/UjiCobaAnalisis2.R | no_license | diocahyos/praktikum2020 | R | false | false | 3,108 | r | library(twitteR)
library(ROAuth)
library(RCurl)
download.file(url = "http://curl.haxx.se/ca/cacert.pem",destfile="cacert.pem")
reqURL <- "https://api.twitter.com/oauth/request_token"
accessURL <- "https://api.twitter.com/oauth/access_token"
authURL <- "https://api.twitter.com/oauth/authorize"
CUSTOMER_KEY ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/variance.R
\name{variance}
\alias{variance}
\title{Variance}
\usage{
variance(M)
}
\arguments{
\item{M}{a number, a vector or a matrix, with or without NA}
}
\value{
a float (variance )
}
\description{
Returns the biased variance (division by... | /man/variance.Rd | permissive | C-Juliette/randomfields | R | false | true | 424 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/variance.R
\name{variance}
\alias{variance}
\title{Variance}
\usage{
variance(M)
}
\arguments{
\item{M}{a number, a vector or a matrix, with or without NA}
}
\value{
a float (variance )
}
\description{
Returns the biased variance (division by... |
\name{ellipse.arima0}
\alias{ellipse.arima0}
\title{
Outline an approximate pairwise confidence region
}
\description{
This function produces the ellipsoidal outline of an approximate
pairwise confidence region for an ARIMA model fit.
}
\usage{
\method{ellipse}{arima0}(x, which = c(1, 2), level = 0.95, t = sqrt(qchis... | /man/ellipse.arima0.Rd | no_license | cran/ellipse | R | false | false | 1,311 | rd | \name{ellipse.arima0}
\alias{ellipse.arima0}
\title{
Outline an approximate pairwise confidence region
}
\description{
This function produces the ellipsoidal outline of an approximate
pairwise confidence region for an ARIMA model fit.
}
\usage{
\method{ellipse}{arima0}(x, which = c(1, 2), level = 0.95, t = sqrt(qchis... |
library(Scale)
### Name: print.reliability
### Title: Print Out Summary of Reliability Analysis
### Aliases: print.reliability
### Keywords: survey multivariate
### ** Examples
data(Depression98)
depressionScale <- Scale(data=Depression98,
orders=list(
c(16,19,11... | /data/genthat_extracted_code/Scale/examples/print.reliability.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 939 | r | library(Scale)
### Name: print.reliability
### Title: Print Out Summary of Reliability Analysis
### Aliases: print.reliability
### Keywords: survey multivariate
### ** Examples
data(Depression98)
depressionScale <- Scale(data=Depression98,
orders=list(
c(16,19,11... |
##############################################
## Author: Christopher T Kenny
## Institution: Harvard University
## Date Created: 2020/06/20
## Date Modified: 2020/06/20
## Purpose: R function to make map plot
##############################################
#' Creates a map with optional graph overlay
#'
#' @param shp ... | /R/map.R | no_license | christopherkenny/redist | R | false | false | 6,878 | r | ##############################################
## Author: Christopher T Kenny
## Institution: Harvard University
## Date Created: 2020/06/20
## Date Modified: 2020/06/20
## Purpose: R function to make map plot
##############################################
#' Creates a map with optional graph overlay
#'
#' @param shp ... |
# Setup folders and data for analysis
library(fs)
# Set up folders ----
dir_create("_targets/user/data_raw/ref_aln")
dir_create("_targets/user/data_raw/restez/sql_db")
dir_create("_targets/user/intermediates/blast_sanger")
dir_create("_targets/user/intermediates/iqtree")
dir_create("_targets/user/intermediates/ref_se... | /R/setup.R | permissive | fernphy/ftol | R | false | false | 1,321 | r | # Setup folders and data for analysis
library(fs)
# Set up folders ----
dir_create("_targets/user/data_raw/ref_aln")
dir_create("_targets/user/data_raw/restez/sql_db")
dir_create("_targets/user/intermediates/blast_sanger")
dir_create("_targets/user/intermediates/iqtree")
dir_create("_targets/user/intermediates/ref_se... |
shiny::tabPanel(
title = "Shiny custom options",
fluidRow(
column(
width = 12,
visNetworkOutput("network_id",height = "400px"),
fluidRow(
column(
width = 6,
verbatimTextOutput("code_network_id")
),
column(
width = 3,
HTML("Using n... | /risk_network/visNetwork-master/inst/shiny/src/ui/options_ui.R | permissive | WilliamTorsett/data_analytics | R | false | false | 1,375 | r | shiny::tabPanel(
title = "Shiny custom options",
fluidRow(
column(
width = 12,
visNetworkOutput("network_id",height = "400px"),
fluidRow(
column(
width = 6,
verbatimTextOutput("code_network_id")
),
column(
width = 3,
HTML("Using n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vreq_classic_methods.R
\name{vreq_classic_methods}
\alias{vreq_classic_methods}
\alias{summary.vreq_classic}
\alias{print.vreq_classic}
\alias{set_com.vreq_classic}
\alias{set_comnull.vreq_classic}
\alias{set_vr.vreq_classic}
\alias{get_com.v... | /man/vreq_classic_methods.Rd | no_license | reumandc/tsvr | R | false | true | 1,847 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vreq_classic_methods.R
\name{vreq_classic_methods}
\alias{vreq_classic_methods}
\alias{summary.vreq_classic}
\alias{print.vreq_classic}
\alias{set_com.vreq_classic}
\alias{set_comnull.vreq_classic}
\alias{set_vr.vreq_classic}
\alias{get_com.v... |
#' hyper tibble
#'
#' @param x object to tibbulate
#' @param ... arguments to `hyper_filter``
#' @param na.rm if `TRUE` these rows are not included in the output when all variables are `NA`
#' @return a `tbl_df`
#' @export
#' @importFrom dplyr %>%
#' @export %>%
#' @examples
#' l3file <- system.file("extdata", "S2008... | /R/hyper_tibble.R | no_license | matteodefelice/tidync | R | false | false | 1,603 | r | #' hyper tibble
#'
#' @param x object to tibbulate
#' @param ... arguments to `hyper_filter``
#' @param na.rm if `TRUE` these rows are not included in the output when all variables are `NA`
#' @return a `tbl_df`
#' @export
#' @importFrom dplyr %>%
#' @export %>%
#' @examples
#' l3file <- system.file("extdata", "S2008... |
# An S3 shim on top of DBI. The goal is to isolate all DBI calls into this
# file, so that when writing new connectors you can see all the existing
# code in one place, and hopefully remember the annoying DBI function names.
#
# * db_ -> con = DBIConnection
# * qry_ -> con = DBIConnection, sql = string
# * res_ -> res... | /R/dbi-s3.r | no_license | Diego-F-Pereira/dplyr | R | false | false | 13,506 | r | # An S3 shim on top of DBI. The goal is to isolate all DBI calls into this
# file, so that when writing new connectors you can see all the existing
# code in one place, and hopefully remember the annoying DBI function names.
#
# * db_ -> con = DBIConnection
# * qry_ -> con = DBIConnection, sql = string
# * res_ -> res... |
\name{plot.HGpath.gaussian}
\alias{plot.HGpath.gaussian}
\title{ HGgaussian solution path plot}
\description{
Plots the solution path for a HGpath object with method HGgaussian
}
\usage{
\method{plot}{HGpath.gaussian}(obj, cols = NULL, par = "delta", logpar = T,...)
}
\arguments{
\item{obj}{ a HGpath object... | /man/plot.HGpath.gaussian.Rd | no_license | parsifal9/ptools | R | false | false | 1,406 | rd | \name{plot.HGpath.gaussian}
\alias{plot.HGpath.gaussian}
\title{ HGgaussian solution path plot}
\description{
Plots the solution path for a HGpath object with method HGgaussian
}
\usage{
\method{plot}{HGpath.gaussian}(obj, cols = NULL, par = "delta", logpar = T,...)
}
\arguments{
\item{obj}{ a HGpath object... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lcmm-package.R
\docType{package}
\name{lcmm-package}
\alias{lcmm-package}
\title{Estimation of extended mixed models using latent classes and latent
processes.}
\description{
Functions for the estimation of latent class mixed models (LCMM), j... | /man/lcmm-package.Rd | no_license | cgpu/lcmm | R | false | true | 3,596 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lcmm-package.R
\docType{package}
\name{lcmm-package}
\alias{lcmm-package}
\title{Estimation of extended mixed models using latent classes and latent
processes.}
\description{
Functions for the estimation of latent class mixed models (LCMM), j... |
#******************************************************************
# Adds/updates flow forecasts in potomac.ts.df
#******************************************************************
# Inputs
#******************************************************************
# date_sim = current date in the simulation
# demands.fc.df ... | /code/functions/simulation/forecasts_flows_func.R | no_license | leeshu-rt/DroughtOps_beta | R | false | false | 8,651 | r | #******************************************************************
# Adds/updates flow forecasts in potomac.ts.df
#******************************************************************
# Inputs
#******************************************************************
# date_sim = current date in the simulation
# demands.fc.df ... |
#///////////////////////////////////////////////////////////
#' Internal helper function
#'
#' Create empty SpatialPolygonsDataFrame with estObj schema
#'
#' @return An empty SpatialPolygonsDataFrame object matching the expected schema of the estKIN function.
#' @author Shannon E. Albeke, Wyoming Geographic Information... | /R/createSPDF.R | no_license | salbeke/rKIN | R | false | false | 717 | r | #///////////////////////////////////////////////////////////
#' Internal helper function
#'
#' Create empty SpatialPolygonsDataFrame with estObj schema
#'
#' @return An empty SpatialPolygonsDataFrame object matching the expected schema of the estKIN function.
#' @author Shannon E. Albeke, Wyoming Geographic Information... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/object.R, R/DBI-pool.R
\docType{methods}
\name{object}
\alias{object}
\alias{onActivate}
\alias{onActivate,ANY-method}
\alias{onDestroy}
\alias{onDestroy,ANY-method}
\alias{onDestroy,DBIConnection-method}
\alias{onPassivate}
\alias{onPassivat... | /man/object.Rd | no_license | zzawadz/pool | R | false | true | 1,092 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/object.R, R/DBI-pool.R
\docType{methods}
\name{object}
\alias{object}
\alias{onActivate}
\alias{onActivate,ANY-method}
\alias{onDestroy}
\alias{onDestroy,ANY-method}
\alias{onDestroy,DBIConnection-method}
\alias{onPassivate}
\alias{onPassivat... |
library(magrittr)
library(ggplot2)
library(DepLabData)
library(DepLab)
library(tidyverse)
data("WT_trial1")
data("WT_trial2")
data("DN_trial1")
data("DN_trial2")
data("EV_trial1")
data("EV_trial2")
WT_trial1 %>%
MQ_to_longFormat(., y = "raw.intensity", return.dt = TRUE,
extract_proteinID(.$Prote... | /eda/eda.R | permissive | inambioinfo/Proteomic_Correlation_Shiny | R | false | false | 7,938 | r | library(magrittr)
library(ggplot2)
library(DepLabData)
library(DepLab)
library(tidyverse)
data("WT_trial1")
data("WT_trial2")
data("DN_trial1")
data("DN_trial2")
data("EV_trial1")
data("EV_trial2")
WT_trial1 %>%
MQ_to_longFormat(., y = "raw.intensity", return.dt = TRUE,
extract_proteinID(.$Prote... |
testlist <- list(Rs = numeric(0), atmp = c(9.53708019597101e-228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(NA, NaN, NaN, -1.40428775528164e+306 ), temp = -Inf)
result <- do.call(meteor:::ET... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615860213-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 351 | r | testlist <- list(Rs = numeric(0), atmp = c(9.53708019597101e-228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(NA, NaN, NaN, -1.40428775528164e+306 ), temp = -Inf)
result <- do.call(meteor:::ET... |
# Assignment 2
df <- read.csv('./AutoInsurSweden.csv')
# Replace Na with 0
df[is.na(df)] = 0
mat <- data.matrix(df)
cat('Mean ->', mean(mat), '\n')
cat('Median ->', median(mat), '\n')
cat('Sd ->', sd(mat), '\n')
for (i in 1:dim(mat)[2]) {
col <- mat[, i]
quants <- quantile(col, c(0.25, 0.5, 0.75))
iqr <- ... | /link2/Ass2/ass_2.R | no_license | harneetkohli/asml | R | false | false | 616 | r | # Assignment 2
df <- read.csv('./AutoInsurSweden.csv')
# Replace Na with 0
df[is.na(df)] = 0
mat <- data.matrix(df)
cat('Mean ->', mean(mat), '\n')
cat('Median ->', median(mat), '\n')
cat('Sd ->', sd(mat), '\n')
for (i in 1:dim(mat)[2]) {
col <- mat[, i]
quants <- quantile(col, c(0.25, 0.5, 0.75))
iqr <- ... |
library(shiny)
ui <- fluidPage(
#input
fileInput(inputId = "file", label = "Choose you dataset"),
#output
downloadButton("downloadData", "Download")
)
server <- function(input, output) {
doit <- reactive({
df <- read.csv(input$file$datapath)
good <- complete.cases(df)
df <- df... | /Shiny_app_cleaning_data.R | no_license | kuntal12/App_development_data_cleaning | R | false | false | 627 | r | library(shiny)
ui <- fluidPage(
#input
fileInput(inputId = "file", label = "Choose you dataset"),
#output
downloadButton("downloadData", "Download")
)
server <- function(input, output) {
doit <- reactive({
df <- read.csv(input$file$datapath)
good <- complete.cases(df)
df <- df... |
# Boilerplate
library(shiny)
shinyUI(
fluidPage(
titlePanel('The great mtcars analysis engine'),
sidebarLayout(
sidebarPanel(
selectInput('var1', 'X variable',
names(mtcars)),
selectInput('var2', 'Y variable',
names(mtcars))
),
mainPane... | /UI.R | no_license | szavuly/R-Boilerplate | R | false | false | 371 | r | # Boilerplate
library(shiny)
shinyUI(
fluidPage(
titlePanel('The great mtcars analysis engine'),
sidebarLayout(
sidebarPanel(
selectInput('var1', 'X variable',
names(mtcars)),
selectInput('var2', 'Y variable',
names(mtcars))
),
mainPane... |
#A9B_ScoreCash_NAV.R
#INPUT: end3.td.df, balsh_y2.df
#OUTPUT: score.cash, score.NAV
#INTERNAL FUNCTION
setwd(maincode.dir); source("A9B_ScoreCash_NAV_functions.R")
###########################################
#A1 Report - 09 - Cash Evaluation
###########################################
{
score.cash <- sapply(te... | /zV_Past/zb_Demo (20161112)/_MainCode_Demo_old/A9B_ScoreCash_NAV.R | no_license | junyitt/HM2016 | R | false | false | 897 | r | #A9B_ScoreCash_NAV.R
#INPUT: end3.td.df, balsh_y2.df
#OUTPUT: score.cash, score.NAV
#INTERNAL FUNCTION
setwd(maincode.dir); source("A9B_ScoreCash_NAV_functions.R")
###########################################
#A1 Report - 09 - Cash Evaluation
###########################################
{
score.cash <- sapply(te... |
#' @title Reserve Valuation for Decreasing Life Insurance
#' @description Calculates the reserve for the decreasing life insurance up to the moment t.
#' @param px A numeric value. The value of the premium paid in each period.
#' @param x An integer. The age of the insuree.
#' @param h An integer. The deferral period... | /R/V_AD..R | no_license | martinmasci/DetLifeInsurance | R | false | false | 6,499 | r | #' @title Reserve Valuation for Decreasing Life Insurance
#' @description Calculates the reserve for the decreasing life insurance up to the moment t.
#' @param px A numeric value. The value of the premium paid in each period.
#' @param x An integer. The age of the insuree.
#' @param h An integer. The deferral period... |
local({
check_package <- function(pkg) {
if (!suppressWarnings(suppressMessages(require(pkg, character.only = TRUE)))) {
install.packages(pkg, repos = "http://wush978.github.io/R")
}
}
lapply(c("rappdirs", "bitops", "curl"), check_package)
utils::install.packages("swirl", repos = "http://wush978.g... | /init-swirl.R | no_license | hjhsu/r_course | R | false | false | 503 | r | local({
check_package <- function(pkg) {
if (!suppressWarnings(suppressMessages(require(pkg, character.only = TRUE)))) {
install.packages(pkg, repos = "http://wush978.github.io/R")
}
}
lapply(c("rappdirs", "bitops", "curl"), check_package)
utils::install.packages("swirl", repos = "http://wush978.g... |
#'@title stage ndlas data into a time series file
#'@description get data from nldas and return a file handle
#'
#'@param sites a character vector of valid NWIS site IDs
#'@param variable short name of variable \code{\link{get_ts_variables}}
#'@param times a length 2 vector of POSIXct dates
#'@param folder a folder to ... | /R/stage_nldas_ts.R | permissive | lawinslow/mda.streams | R | false | false | 2,589 | r | #'@title stage ndlas data into a time series file
#'@description get data from nldas and return a file handle
#'
#'@param sites a character vector of valid NWIS site IDs
#'@param variable short name of variable \code{\link{get_ts_variables}}
#'@param times a length 2 vector of POSIXct dates
#'@param folder a folder to ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert_input_data.R
\name{raster2comm}
\alias{raster2comm}
\alias{polys2comm}
\alias{points2comm}
\title{Convert raw input distribution data to community}
\usage{
raster2comm(files)
polys2comm(dat, res = 1, species = "species", ...)
points... | /man/raster2comm.Rd | no_license | yangxhcaf/phyloregion-1 | R | false | true | 2,930 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert_input_data.R
\name{raster2comm}
\alias{raster2comm}
\alias{polys2comm}
\alias{points2comm}
\title{Convert raw input distribution data to community}
\usage{
raster2comm(files)
polys2comm(dat, res = 1, species = "species", ...)
points... |
#!/home/statsadmin/R/bin/Rscript
source('Step_0_init.R')
args <- commandArgs()
idx <- as.numeric(args[length(args)])
.libPaths('ysidi/lib')
################################
### WORST CASE SCENARIO ####
################################
dt.miss <- readRDS(file = sprintf('dtwaldxm30mnar220_%d.rds',idx))
worst.an... | /Step3_4_worst_miss/wald/step_3_4_type_waldxm30_missing_mnar2_percent_20.R | no_license | yuliasidi/Binomial_PE_Progs | R | false | false | 486 | r | #!/home/statsadmin/R/bin/Rscript
source('Step_0_init.R')
args <- commandArgs()
idx <- as.numeric(args[length(args)])
.libPaths('ysidi/lib')
################################
### WORST CASE SCENARIO ####
################################
dt.miss <- readRDS(file = sprintf('dtwaldxm30mnar220_%d.rds',idx))
worst.an... |
############################################################################################
###GRAD STUDENTS###################
# install.packages("rJava")
# install.packages("xlsx")
library(xlsx)
fbi<-read.xlsx("C:/Users/Malik/Documents/GitHub/Data-Visualization-Data502/Dataset/FBI Crime Geographically.xls", sheetI... | /Home Works/Nipa-Solutions/HW 3_4 Solutions-20201006/GeoTransformation.R | no_license | DoctorDatah/Data-Visualization-Data502 | R | false | false | 2,393 | r | ############################################################################################
###GRAD STUDENTS###################
# install.packages("rJava")
# install.packages("xlsx")
library(xlsx)
fbi<-read.xlsx("C:/Users/Malik/Documents/GitHub/Data-Visualization-Data502/Dataset/FBI Crime Geographically.xls", sheetI... |
#' The different colors used for the COK palette
#'
#' A dataset containing the color codes
#'
#' @format A data frame with 10 rows and 6 variables:
#' \describe{
#' \item{hue_1}{The first color that should be used}
#' \item{hue_2}{The second color that should be used}
#' \item{hue_3}{The third color that should ... | /R/data.R | no_license | kazyka/handytools | R | false | false | 516 | r | #' The different colors used for the COK palette
#'
#' A dataset containing the color codes
#'
#' @format A data frame with 10 rows and 6 variables:
#' \describe{
#' \item{hue_1}{The first color that should be used}
#' \item{hue_2}{The second color that should be used}
#' \item{hue_3}{The third color that should ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_to_formr.R
\name{formr_shuffled}
\alias{formr_shuffled}
\title{Download random groups}
\usage{
formr_shuffled(run_name, host = "https://formr.org")
}
\arguments{
\item{run_name}{case-sensitive name of the run in which you randomised p... | /man/formr_shuffled.Rd | no_license | rubenarslan/formr | R | false | true | 725 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_to_formr.R
\name{formr_shuffled}
\alias{formr_shuffled}
\title{Download random groups}
\usage{
formr_shuffled(run_name, host = "https://formr.org")
}
\arguments{
\item{run_name}{case-sensitive name of the run in which you randomised p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mod_dataInput.R
\name{mod_dataInput}
\alias{mod_dataInput}
\alias{mod_data}
\title{mod_dataInput and mod_data}
\usage{
mod_dataInput(id, ifndb)
mod_data(input, output, session, ifndb)
}
\arguments{
\item{id}{shiny id}
\item{ifndb}{pool obje... | /man/mod_dataInput.Rd | no_license | MalditoBarbudo/IFNappkg | R | false | true | 534 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mod_dataInput.R
\name{mod_dataInput}
\alias{mod_dataInput}
\alias{mod_data}
\title{mod_dataInput and mod_data}
\usage{
mod_dataInput(id, ifndb)
mod_data(input, output, session, ifndb)
}
\arguments{
\item{id}{shiny id}
\item{ifndb}{pool obje... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generateAllPopulations.R
\name{generateAllPopulations}
\alias{generateAllPopulations}
\title{Creates the populations for the predictions for each outcome}
\usage{
generateAllPopulations(workFolder, verbosity = INFO)
}
\arguments{
\item{workFo... | /largeScalePrediction/man/generateAllPopulations.Rd | no_license | NEONKID/StudyProtocolSandbox | R | false | true | 788 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generateAllPopulations.R
\name{generateAllPopulations}
\alias{generateAllPopulations}
\title{Creates the populations for the predictions for each outcome}
\usage{
generateAllPopulations(workFolder, verbosity = INFO)
}
\arguments{
\item{workFo... |
DistObs <-
function(posx,posy,posz=NULL, info=FALSE, PA=FALSE,procName=c('X','Y','Z'),...)
{
nposx<-length(posx)
pTri<-uniongentri(posx=posx,posy=posy,posz=posz,
info=info, PA=PA,procName=procName,...)
DistTri<-calcdist(coorx=pTri$X,coory=pTri$Y,coorz=pTri$Z, nposx=nposx)
names(DistTri)<-round(posx,2)... | /R/DistObs.R | no_license | cran/IndTestPP | R | false | false | 343 | r | DistObs <-
function(posx,posy,posz=NULL, info=FALSE, PA=FALSE,procName=c('X','Y','Z'),...)
{
nposx<-length(posx)
pTri<-uniongentri(posx=posx,posy=posy,posz=posz,
info=info, PA=PA,procName=procName,...)
DistTri<-calcdist(coorx=pTri$X,coory=pTri$Y,coorz=pTri$Z, nposx=nposx)
names(DistTri)<-round(posx,2)... |
\name{phyl.RMA}
\alias{phyl.RMA}
\alias{coef.phyl.RMA}
\alias{plot.phyl.RMA}
\title{Phylogenetic reduced major axis (RMA) regression}
\usage{
phyl.RMA(x, y, tree, method="BM", lambda=NULL, fixed=FALSE, h0=1.0)
\method{coef}{phyl.RMA}(object, ...)
\method{plot}{phyl.RMA}(x, ...)
}
\arguments{
\item{x}{vector... | /man/phyl.RMA.Rd | no_license | Phyo-Khine/phytools | R | false | false | 2,751 | rd | \name{phyl.RMA}
\alias{phyl.RMA}
\alias{coef.phyl.RMA}
\alias{plot.phyl.RMA}
\title{Phylogenetic reduced major axis (RMA) regression}
\usage{
phyl.RMA(x, y, tree, method="BM", lambda=NULL, fixed=FALSE, h0=1.0)
\method{coef}{phyl.RMA}(object, ...)
\method{plot}{phyl.RMA}(x, ...)
}
\arguments{
\item{x}{vector... |
\name{pbb}
\alias{pbb}
\title{BSS background Plot}
\description{
Plots the BSS background map
}
\usage{
pbb(map = "bss.background", add.plot = FALSE, ...)
}
\arguments{
\item{map}{List of coordinates. For the correct format see also help(kola.background)}
\item{add.plot}{logical. If true background is added to an e... | /man/pbb.Rd | no_license | cran/mvoutlier | R | false | false | 1,097 | rd | \name{pbb}
\alias{pbb}
\title{BSS background Plot}
\description{
Plots the BSS background map
}
\usage{
pbb(map = "bss.background", add.plot = FALSE, ...)
}
\arguments{
\item{map}{List of coordinates. For the correct format see also help(kola.background)}
\item{add.plot}{logical. If true background is added to an e... |
oecd = read.table('ocdeb.txt', header = T, sep = "\t")
View(oecd)
dim(oecd)
str(oecd)
summary(oecd)
boxplot(oecd$birth_rate ~ oecd$country)
oecd_noIR = subset(oecd, oecd$country != 'IR')
boxplot(oecd_noIR$birth_rate)
install.packages("tables")
library(tables)
library(psych)
tabular(oecd$country~1*(n=1 + Percent('col'... | /Code and data/oecd.R | no_license | MomSweetMom/Statistics | R | false | false | 809 | r | oecd = read.table('ocdeb.txt', header = T, sep = "\t")
View(oecd)
dim(oecd)
str(oecd)
summary(oecd)
boxplot(oecd$birth_rate ~ oecd$country)
oecd_noIR = subset(oecd, oecd$country != 'IR')
boxplot(oecd_noIR$birth_rate)
install.packages("tables")
library(tables)
library(psych)
tabular(oecd$country~1*(n=1 + Percent('col'... |
#Script to take age-restructured data and run LGCA models in Mplus using the R/Mplus interface via the package MplusAutomation
#This also uses Mplus output to plots fit indices and class proportion
library(tidyverse)
library(reshape2)
library(dplyr)
library(MplusAutomation)
#Where data file (created below) will go
Mp... | /Y1-Y6 Comorbidity GMM/Mplus Classes LCGA Individual.R | no_license | antovich/OHSU | R | false | false | 11,056 | r | #Script to take age-restructured data and run LGCA models in Mplus using the R/Mplus interface via the package MplusAutomation
#This also uses Mplus output to plots fit indices and class proportion
library(tidyverse)
library(reshape2)
library(dplyr)
library(MplusAutomation)
#Where data file (created below) will go
Mp... |
# convert data into table
data <- "./household_power_consumption.txt"
dt <- read.table(data, header = TRUE, sep = ";", stringsAsFactors = FALSE, dec = ".")
subdt <- dt[dt$Date %in% c("1/2/2007", "2/2/2007"),]
# plot data
datetime <- strptime(paste(subdt$Date, subdt$Time, sep = " "), "%d/%m/%Y %H:%M:%S")
sub1 <-... | /plot3.R | no_license | desmondteoch/ExData_Plotting1 | R | false | false | 805 | r | # convert data into table
data <- "./household_power_consumption.txt"
dt <- read.table(data, header = TRUE, sep = ";", stringsAsFactors = FALSE, dec = ".")
subdt <- dt[dt$Date %in% c("1/2/2007", "2/2/2007"),]
# plot data
datetime <- strptime(paste(subdt$Date, subdt$Time, sep = " "), "%d/%m/%Y %H:%M:%S")
sub1 <-... |
\name{predFCm}
\alias{predFCm}
\alias{predFCm}
\title{Predictive log fold change for microarrays}
\description{
Calculate the predictive log fold change for a particular coefficient from a fit object.
}
\usage{
predFCm(fit, coef=2, var.indep.of.fc=TRUE, all.de=TRUE, prop.true.null.method="lfdr")
}
\argument... | /man/predFCm.Rd | no_license | hdeberg/limma | R | false | false | 2,765 | rd | \name{predFCm}
\alias{predFCm}
\alias{predFCm}
\title{Predictive log fold change for microarrays}
\description{
Calculate the predictive log fold change for a particular coefficient from a fit object.
}
\usage{
predFCm(fit, coef=2, var.indep.of.fc=TRUE, all.de=TRUE, prop.true.null.method="lfdr")
}
\argument... |
#' Train the CRF model with subset of DMC labels.
#'
#' @param dt Data matrix resulted from load_data(), containing CRF features.
#' @param train_path Path of the training DMC labels, which is a bed file containg a subset of dt where DMC labels are available.
#' @param c Hyper-parameter for the CRF. With larger c value... | /R/train.R | no_license | nanlin999/LISdmr | R | false | false | 1,234 | r | #' Train the CRF model with subset of DMC labels.
#'
#' @param dt Data matrix resulted from load_data(), containing CRF features.
#' @param train_path Path of the training DMC labels, which is a bed file containg a subset of dt where DMC labels are available.
#' @param c Hyper-parameter for the CRF. With larger c value... |
observe({
if(!is.null(data_extraction())){
# Suggest variables to fit ellipsoid accoring to strog correlations
if(!is.null(summs_corr_var()))
var_suggest <- summs_corr_var()$descriptors
else
var_suggest <- NULL
updateSelectInput(session,"biosEllipS",
choices = names(... | /inst/shinyApp/server_funcs/ellipsoid_selection_methods.R | no_license | TsinghuaLucky912/ntbox | R | false | false | 9,359 | r |
observe({
if(!is.null(data_extraction())){
# Suggest variables to fit ellipsoid accoring to strog correlations
if(!is.null(summs_corr_var()))
var_suggest <- summs_corr_var()$descriptors
else
var_suggest <- NULL
updateSelectInput(session,"biosEllipS",
choices = names(... |
## ------------------------------------------------------------------------
library(DMPC)
data("restroom")
DMPC.OOB.error(restroom, "Environment")
## ------------------------------------------------------------------------
per_variable_obj= DMPC.split.by.variable(restroom, "Environment")
per_variable_obj
## ---------... | /vignettes/DMPC.R | no_license | vpylro/DMPC-1 | R | false | false | 993 | r | ## ------------------------------------------------------------------------
library(DMPC)
data("restroom")
DMPC.OOB.error(restroom, "Environment")
## ------------------------------------------------------------------------
per_variable_obj= DMPC.split.by.variable(restroom, "Environment")
per_variable_obj
## ---------... |
## optparse needed for taking care of command line arguments
library(optparse)
option_list = list(
make_option(c("-f", "--file"), type="character", default=NULL,
help="hapmap file", metavar="gobii_hapmap_file"),
make_option(c("-o", "--output"), type="character", default=NULL,
... | /naive_imputation/naive_impute.R | no_license | venice-juanillas/GenomicSelection | R | false | false | 2,837 | r |
## optparse needed for taking care of command line arguments
library(optparse)
option_list = list(
make_option(c("-f", "--file"), type="character", default=NULL,
help="hapmap file", metavar="gobii_hapmap_file"),
make_option(c("-o", "--output"), type="character", default=NULL,
... |
\name{leaveOneOut}
\alias{leaveOneOut}
\alias{leaveOneOut.competing.risks}
\alias{leaveOneOut.survival}
\title{Compute jackknife pseudo values.}
\usage{
leaveOneOut(object, times, cause, lag = FALSE, ...)
}
\arguments{
\item{object}{Object of class \code{"prodlim"}.}
\item{times}{time points at which to compute
... | /man/leaveOneOut.Rd | no_license | ElianoMarques/prodlim | R | false | false | 765 | rd | \name{leaveOneOut}
\alias{leaveOneOut}
\alias{leaveOneOut.competing.risks}
\alias{leaveOneOut.survival}
\title{Compute jackknife pseudo values.}
\usage{
leaveOneOut(object, times, cause, lag = FALSE, ...)
}
\arguments{
\item{object}{Object of class \code{"prodlim"}.}
\item{times}{time points at which to compute
... |
library(tidyverse)
library(dplyr)
library(RColorBrewer)
library(ggrepel)
library(paletteer)
library(ggpubr)
library(readxl)
library(glue)
library(writexl)
library(data.table)
#EWAS MI (ewas_mi_full_forest.R)
#18 biomarkers
ses_mi_clean_sig <- ses_mi_clean %>%
filter(Exposure_name=="IGF-II"|Exposure_na... | /visualization/forestplots/comb_ewas_mi_full.R | no_license | jhuang35/ses_pregnancy_exposome | R | false | false | 45,358 | r | library(tidyverse)
library(dplyr)
library(RColorBrewer)
library(ggrepel)
library(paletteer)
library(ggpubr)
library(readxl)
library(glue)
library(writexl)
library(data.table)
#EWAS MI (ewas_mi_full_forest.R)
#18 biomarkers
ses_mi_clean_sig <- ses_mi_clean %>%
filter(Exposure_name=="IGF-II"|Exposure_na... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = numeric(0), rs = numeric(0), temp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0... | /meteor/inst/testfiles/ET0_PenmanMonteith/libFuzzer_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1612736361-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 520 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = numeric(0), rs = numeric(0), temp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0... |
context("makeOMLFlowQuality")
test_that("makeOMLFlowQuality", {
fq = makeOMLFlowQuality("Quality", "value")
expect_is(fq, "OMLFlowQuality")
expect_output(print(fq), "Quality")
})
| /tests/testthat/test_base_makeOMLFlowQuality.R | no_license | gitter-badger/r | R | false | false | 186 | r | context("makeOMLFlowQuality")
test_that("makeOMLFlowQuality", {
fq = makeOMLFlowQuality("Quality", "value")
expect_is(fq, "OMLFlowQuality")
expect_output(print(fq), "Quality")
})
|
## WEEK 1 ASSIGNMENT (PLOT 3 ONLY)
if(!file.exists("week1/data")){
dir.create("week1/data")
}
if(!file.exists("week1/plots")){
dir.create("week1/plots")
}
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl, destfile = "./week1/data/hpc.zip")
uti... | /week1/plot3.R | no_license | riftguardian/CourseraRExploratoryData | R | false | false | 1,548 | r | ## WEEK 1 ASSIGNMENT (PLOT 3 ONLY)
if(!file.exists("week1/data")){
dir.create("week1/data")
}
if(!file.exists("week1/plots")){
dir.create("week1/plots")
}
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl, destfile = "./week1/data/hpc.zip")
uti... |
# brocolors
#' Vectors of colors for figures
#'
#' Creates different vectors of related colors that may be useful for figures.
#'
#' @param set Character string indicating a set of colors.
#' @return Vector of character strings representing the chosen set of colors, in RGB.
#' @export
#' @seealso \code{\link{plot_crayo... | /60day/RSamples/R/brocolors.R | permissive | rafidude/100DaysOfCode | R | false | false | 9,030 | r | # brocolors
#' Vectors of colors for figures
#'
#' Creates different vectors of related colors that may be useful for figures.
#'
#' @param set Character string indicating a set of colors.
#' @return Vector of character strings representing the chosen set of colors, in RGB.
#' @export
#' @seealso \code{\link{plot_crayo... |
## PACKAGE: ips
## CALLED BY: USER
## AUTHOR: Christoph Heibl (at gmx.net)
## LAST UPDATE: 2014-08-11
mrbayes <- function(x, file = "", nst = 6, rates = "invgamma",
ngammacat = 4, nruns = 2, ngen = 1000000,
printfreq = 100, samplefreq = 10,
nchains = 4, s... | /ips/R/mrbayes.R | no_license | ingted/R-Examples | R | false | false | 1,701 | r | ## PACKAGE: ips
## CALLED BY: USER
## AUTHOR: Christoph Heibl (at gmx.net)
## LAST UPDATE: 2014-08-11
mrbayes <- function(x, file = "", nst = 6, rates = "invgamma",
ngammacat = 4, nruns = 2, ngen = 1000000,
printfreq = 100, samplefreq = 10,
nchains = 4, s... |
## ---- eval=FALSE---------------------------------------------------------
# num.var <- 14523.2342520 # assignments are not considered tests
# test_me(num.var) # safe
## ---- eval=FALSE---------------------------------------------------------
# test_me(14523.2342520) # could be deparsed differently
| /data/genthat_extracted_code/unitizer/vignettes/u1_intro.R | no_license | surayaaramli/typeRrh | R | false | false | 319 | r | ## ---- eval=FALSE---------------------------------------------------------
# num.var <- 14523.2342520 # assignments are not considered tests
# test_me(num.var) # safe
## ---- eval=FALSE---------------------------------------------------------
# test_me(14523.2342520) # could be deparsed differently
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generated_client.R
\name{notebooks_put_transfer}
\alias{notebooks_put_transfer}
\title{Transfer ownership of this object to another user}
\usage{
notebooks_put_transfer(
id,
user_id,
include_dependencies,
email_body = NULL,
send_ema... | /man/notebooks_put_transfer.Rd | no_license | cran/civis | R | false | true | 1,406 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generated_client.R
\name{notebooks_put_transfer}
\alias{notebooks_put_transfer}
\title{Transfer ownership of this object to another user}
\usage{
notebooks_put_transfer(
id,
user_id,
include_dependencies,
email_body = NULL,
send_ema... |
context("Testing Assertions")
test_that("'is.scalar' returns TRUE for objects of length 1", {
expect_true(is.scalar(1))
expect_true(is.scalar(""))
expect_true(is.scalar(list(1)))
expect_false(is.scalar(NULL))
expect_false(is.scalar(integer(2)))
expect_false(is.scalar(integer()))
})
test_that("'is.empty... | /tests/testthat/test-assertions.r | no_license | gschofl/gsmisc | R | false | false | 1,715 | r | context("Testing Assertions")
test_that("'is.scalar' returns TRUE for objects of length 1", {
expect_true(is.scalar(1))
expect_true(is.scalar(""))
expect_true(is.scalar(list(1)))
expect_false(is.scalar(NULL))
expect_false(is.scalar(integer(2)))
expect_false(is.scalar(integer()))
})
test_that("'is.empty... |
## Programming Assignment 1 for R Programming Coursera Course
## Air Pollution
pollutantmean <- function(directory, pollutant, id = 1:332) {
files_list <- list.files(directory, full.names = TRUE) #creates a list of files
dat <- data.frame() #creates an empty data frame
for (i in id) {... | /pollutantmean.R | no_license | slr123/datasciencecoursera | R | false | false | 506 | r | ## Programming Assignment 1 for R Programming Coursera Course
## Air Pollution
pollutantmean <- function(directory, pollutant, id = 1:332) {
files_list <- list.files(directory, full.names = TRUE) #creates a list of files
dat <- data.frame() #creates an empty data frame
for (i in id) {... |
# convert arrays to data.frame, in long form
to_df = function(x) {
as.data.frame(lapply(x, function(y) structure(y, dim = NULL)), stringsAsFactors = FALSE)
}
set_dim = function(x, d) {
lapply(x, function(y, dims) structure(y, dim = dims), dims = d)
}
get_dims = function(d_cube, d_stars) {
xy = attr(d_stars, "raste... | /R/tidyverse.R | no_license | yangxhcaf/stars | R | false | false | 7,346 | r | # convert arrays to data.frame, in long form
to_df = function(x) {
as.data.frame(lapply(x, function(y) structure(y, dim = NULL)), stringsAsFactors = FALSE)
}
set_dim = function(x, d) {
lapply(x, function(y, dims) structure(y, dim = dims), dims = d)
}
get_dims = function(d_cube, d_stars) {
xy = attr(d_stars, "raste... |
library(shiny)
library(tidyverse)
# Define server logic
shinyServer(function(input, output) {
tunisia <- read_csv("tunisia.csv")
output$gdpPlot <- renderPlot({
tunisia %>%
filter(year != 2008,
year >= input$years[1],
year <= input$years[2])... | /tunisia_app_static_1/server.R | no_license | anhnguyendepocen/rladies-tunisia-july2020-intro-shiny | R | false | false | 584 | r | library(shiny)
library(tidyverse)
# Define server logic
shinyServer(function(input, output) {
tunisia <- read_csv("tunisia.csv")
output$gdpPlot <- renderPlot({
tunisia %>%
filter(year != 2008,
year >= input$years[1],
year <= input$years[2])... |
#' Chisel
#'
#' Customise silent error messages: messages raised by [shiny::validate()] and [shiny::need()].
#' If used in combination with [cleave()] make sure you are setting `silent_errors` to `FALSE`.
#'
#' @inheritParams cleave
#'
#' @return None
#'
#' @export
chisel <- function(
html = NULL,
color = NUL... | /R/chisel.R | permissive | JohnCoene/sever | R | false | false | 1,908 | r | #' Chisel
#'
#' Customise silent error messages: messages raised by [shiny::validate()] and [shiny::need()].
#' If used in combination with [cleave()] make sure you are setting `silent_errors` to `FALSE`.
#'
#' @inheritParams cleave
#'
#' @return None
#'
#' @export
chisel <- function(
html = NULL,
color = NUL... |
\name{convexLSE}
\alias{convexLSE}
\title{Compute the nonparamateric LSE of a convex hazard}
\description{
This function computes the nonparametric LSE of a convex hazard function on \code{[0,TT]}.
}
\usage{
convexLSE(x, TT, M = 100, GRIDLESS = 0, tol = 1e-05, tol.SR = 1e-08, type = 1,
max.loop = 100, max.lo... | /man/convexLSE.Rd | no_license | cran/convexHaz | R | false | false | 9,394 | rd | \name{convexLSE}
\alias{convexLSE}
\title{Compute the nonparamateric LSE of a convex hazard}
\description{
This function computes the nonparametric LSE of a convex hazard function on \code{[0,TT]}.
}
\usage{
convexLSE(x, TT, M = 100, GRIDLESS = 0, tol = 1e-05, tol.SR = 1e-08, type = 1,
max.loop = 100, max.lo... |
# Just plotting 5 examples that we have now for the various models.
simulation_line_plot = function(){
scenarios = c("backward", "forward", "bidirectional")#, "backward")#, "bidirectional", "realistic")
mplots <- list()
neplots <- list()
i <- 1
migs = c("0.0", "0.1", "0.3", "0.5", "0.7", "0.9")
situati... | /r/sim_line_plot.R | no_license | Chris1221/ancient_african_admixture | R | false | false | 7,133 | r | # Just plotting 5 examples that we have now for the various models.
simulation_line_plot = function(){
scenarios = c("backward", "forward", "bidirectional")#, "backward")#, "bidirectional", "realistic")
mplots <- list()
neplots <- list()
i <- 1
migs = c("0.0", "0.1", "0.3", "0.5", "0.7", "0.9")
situati... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ageRatioTest.R
\name{print.ageRatioTest}
\alias{print.ageRatioTest}
\title{\code{print()} helper function for \code{ageRatioTest()} function}
\usage{
\method{print}{ageRatioTest}(x, ...)
}
\arguments{
\item{x}{Object resulting from applying \... | /man/print.ageRatioTest.Rd | no_license | SaeedR1987/nipnTK | R | false | true | 698 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ageRatioTest.R
\name{print.ageRatioTest}
\alias{print.ageRatioTest}
\title{\code{print()} helper function for \code{ageRatioTest()} function}
\usage{
\method{print}{ageRatioTest}(x, ...)
}
\arguments{
\item{x}{Object resulting from applying \... |
generates_log_stack <- function (log_table,bu_log_table) {
stack <- data.frame(grupo=character(),
prioridad=numeric(),
type_number=numeric(),
tarea=character(),
unidad=character(),
demanda=numeric(),
... | /Modelo Revenue 2/functions/logistic/simulation.R | no_license | lover2668/oil | R | false | false | 2,506 | r | generates_log_stack <- function (log_table,bu_log_table) {
stack <- data.frame(grupo=character(),
prioridad=numeric(),
type_number=numeric(),
tarea=character(),
unidad=character(),
demanda=numeric(),
... |
#' @author Lei Li, Liya Ming
#' @title mms2plot
#' @description Visualization of multiple MS/MS spectra for groups of modified
#' and non-modified peptides
#' @export mms2plot
#' @param id_table_path File path of the table that contains the information of
#' peptide-spectrum matches (PSMs) and number lab... | /R/mms2plot.R | no_license | lileir/mms2plot | R | false | false | 12,631 | r | #' @author Lei Li, Liya Ming
#' @title mms2plot
#' @description Visualization of multiple MS/MS spectra for groups of modified
#' and non-modified peptides
#' @export mms2plot
#' @param id_table_path File path of the table that contains the information of
#' peptide-spectrum matches (PSMs) and number lab... |
function(input, output, session) {
# An observer is used to send messages to the client.
# The message is converted to JSON
observe({
session$sendCustomMessage(type = 'testmessage',
message = list(a = 1, b = 'text',
controller = input$controller))
})
}
| /061-server-to-client-custom-messages/server.R | permissive | rstudio/shiny-examples | R | false | false | 292 | r | function(input, output, session) {
# An observer is used to send messages to the client.
# The message is converted to JSON
observe({
session$sendCustomMessage(type = 'testmessage',
message = list(a = 1, b = 'text',
controller = input$controller))
})
}
|
hhsvm_wrapper <- function(x_tr,y_tr){
sds = apply(x_tr,2,sd)
x_tr = x_tr[,sds>sdCutoff]
hhsvm = cv.gcdnet(as.matrix(x_tr),y_tr,method="hhsvm",pred.loss="misclass",nfolds=3)
#browser()
return(hhsvm)
} | /source/Models/hhSVM.R | no_license | vineet1992/Gene-Selection | R | false | false | 212 | r | hhsvm_wrapper <- function(x_tr,y_tr){
sds = apply(x_tr,2,sd)
x_tr = x_tr[,sds>sdCutoff]
hhsvm = cv.gcdnet(as.matrix(x_tr),y_tr,method="hhsvm",pred.loss="misclass",nfolds=3)
#browser()
return(hhsvm)
} |
#
# args = commandArgs(trailingOnly=TRUE)
#
# # test if there is at least two arguments: if not, return an error
# if (length(args)<1) {
# stop("At least one arguments must be supplied ('name' (text) and 'numer' (integer) )",
# call.=FALSE)
# }
#
# Ns <- as.numeric(args[1]) r
#
... | /KW-PELT/KW-PELT-SIM_SCENARIO_1_2_V2_Part_2_Tuning_3.R | no_license | 12ramsake/MVT-WBS-RankCUSUM | R | false | false | 5,738 | r | #
# args = commandArgs(trailingOnly=TRUE)
#
# # test if there is at least two arguments: if not, return an error
# if (length(args)<1) {
# stop("At least one arguments must be supplied ('name' (text) and 'numer' (integer) )",
# call.=FALSE)
# }
#
# Ns <- as.numeric(args[1]) r
#
... |
libs <- c("raster",
"rgdal",
"getSpatialData",
"link2GI",
"caret",
"keras",
"magrittr")
lapply(libs, require, character.only = TRUE)
if(Sys.info()["sysname"] == "Windows"){
filepath_base = "~/lsat/"
} else {
filepath_base = "~/lsat"
}
project_folders ... | /src/000_env_setup.R | no_license | goergen95/landsat_prep | R | false | false | 862 | r | libs <- c("raster",
"rgdal",
"getSpatialData",
"link2GI",
"caret",
"keras",
"magrittr")
lapply(libs, require, character.only = TRUE)
if(Sys.info()["sysname"] == "Windows"){
filepath_base = "~/lsat/"
} else {
filepath_base = "~/lsat"
}
project_folders ... |
/tammy_test_out_bureau.R | permissive | info201a-w21/covid-unemployment | R | false | false | 239 | r | ||
# Function for obtaining SRM effects #
SRM.effects <- function (X){
if (class(X) != "srmRRMatrix")
stop("Data input need to be a srmRRMatrix object")
N <- X$individuals
T <- X$ntimes
G <- X$ngroups
# Compute row means #
row.means <- array(dim=c(N,G),0.)
for (l in 1:G){
row.means[,l] <... | /R/SRM.effects.R | no_license | DLEIVA/nonindependence | R | false | false | 2,432 | r |
# Function for obtaining SRM effects #
SRM.effects <- function (X){
if (class(X) != "srmRRMatrix")
stop("Data input need to be a srmRRMatrix object")
N <- X$individuals
T <- X$ntimes
G <- X$ngroups
# Compute row means #
row.means <- array(dim=c(N,G),0.)
for (l in 1:G){
row.means[,l] <... |
#' Extract animal allele data from the animal allele file.
#'
#' @param alleleFile Character vector of length one having the path of the
#' animal alleles file.
#' @param dateType A character vector of length one used to guide
#' interpretation of date fields. Either "YYYYMMDD" or "mm/dd/YYYY"
#' @importFrom lubridate ... | /R/getAnimalAllelesDfFromCsv.R | permissive | rmsharp/parentfindr | R | false | false | 2,055 | r | #' Extract animal allele data from the animal allele file.
#'
#' @param alleleFile Character vector of length one having the path of the
#' animal alleles file.
#' @param dateType A character vector of length one used to guide
#' interpretation of date fields. Either "YYYYMMDD" or "mm/dd/YYYY"
#' @importFrom lubridate ... |
options( digits = 16 )
library( jsonlite )
alpha = 17
beta = 3
probs = seq( 0, 1, 0.01 )
y = qbeta( probs, alpha, beta )
cat( y, sep = ",\n" )
data = list(
alpha = alpha,
beta = beta,
data = probs,
expected = y
)
write( toJSON( data, digits = 16, auto_unbox = TRUE ), "./test/fixtures/deepset.json" )
| /test/fixtures/test.deepset.R | permissive | distributions-io/beta-quantile | R | false | false | 310 | r | options( digits = 16 )
library( jsonlite )
alpha = 17
beta = 3
probs = seq( 0, 1, 0.01 )
y = qbeta( probs, alpha, beta )
cat( y, sep = ",\n" )
data = list(
alpha = alpha,
beta = beta,
data = probs,
expected = y
)
write( toJSON( data, digits = 16, auto_unbox = TRUE ), "./test/fixtures/deepset.json" )
|
if(!is.na(seed)){
set.seed(seed)
}
###Load data:
df_overall <- loadCounterfactualData(c("No Vaccines", "Baseline-Direct",
"Baseline-Direct & No Healthcare Surging",
"No Vaccines-No Healthcare Surging",
... | /src/deaths_averted_hospital/script.R | permissive | mrc-ide/covid-vaccine-impact-orderly | R | false | false | 4,711 | r | if(!is.na(seed)){
set.seed(seed)
}
###Load data:
df_overall <- loadCounterfactualData(c("No Vaccines", "Baseline-Direct",
"Baseline-Direct & No Healthcare Surging",
"No Vaccines-No Healthcare Surging",
... |
init.CrunchDataset <- function (.Object, ...) {
.Object <- callNextMethod(.Object, ...)
.Object@variables <- getDatasetVariables(.Object)
activeFilter(.Object) <- NULL
return(.Object)
}
setMethod("initialize", "CrunchDataset", init.CrunchDataset)
getDatasetVariables <- function (x) {
varcat_url <- ... | /R/dataset.R | no_license | malecki/rcrunch | R | false | false | 15,095 | r | init.CrunchDataset <- function (.Object, ...) {
.Object <- callNextMethod(.Object, ...)
.Object@variables <- getDatasetVariables(.Object)
activeFilter(.Object) <- NULL
return(.Object)
}
setMethod("initialize", "CrunchDataset", init.CrunchDataset)
getDatasetVariables <- function (x) {
varcat_url <- ... |
#description
#########################################################
#########################################################
#clear workspace
rm(list=ls())
#load required packages
require(ggplot2)
require(stringr)
require(plyr)
require(dplyr)
require(data.table)
#set dirs
rootdir<-find_root(
criterion=has_fil... | /code/99_tables.R | permissive | ausmani23/longmarch | R | false | false | 13,751 | r | #description
#########################################################
#########################################################
#clear workspace
rm(list=ls())
#load required packages
require(ggplot2)
require(stringr)
require(plyr)
require(dplyr)
require(data.table)
#set dirs
rootdir<-find_root(
criterion=has_fil... |
## Exploratory Data Analysis (Coursera November 2014)
## Project Assignment 1
## For each plot you should
## * Construct the plot and save it to a PNG file with a width of 480
## pixels and a height of 480 pixels.
## * Name each of the plot files as `plot1.png`, `plot2.png`, etc.
## * Create a separate R code file... | /plot3.R | no_license | ivalette/ExData_Plotting1 | R | false | false | 3,331 | r | ## Exploratory Data Analysis (Coursera November 2014)
## Project Assignment 1
## For each plot you should
## * Construct the plot and save it to a PNG file with a width of 480
## pixels and a height of 480 pixels.
## * Name each of the plot files as `plot1.png`, `plot2.png`, etc.
## * Create a separate R code file... |
plotFunQ3 <- function(ds) {
ggplot(ds, aes(x=as.factor(ds$year), y=Emissions)) +
scale_colour_gradientn(colours=rainbow(num_of_years(ds))) +
geom_bar(stat="identity", fill="slategray3") +
geom_label(aes(fill=year, label=Emissions), colour="white", show.legend=F) +
xlab("years") + ylab("tons of PM2.5"... | /qr3.R | no_license | pascal-p/PA02_EDA | R | false | false | 978 | r |
plotFunQ3 <- function(ds) {
ggplot(ds, aes(x=as.factor(ds$year), y=Emissions)) +
scale_colour_gradientn(colours=rainbow(num_of_years(ds))) +
geom_bar(stat="identity", fill="slategray3") +
geom_label(aes(fill=year, label=Emissions), colour="white", show.legend=F) +
xlab("years") + ylab("tons of PM2.5"... |
library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/urinary_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="mse",alpha=0.2,family="gaussian",standardize=FALSE)
sink('./Model/EN/ReliefF/urinary_tract/urinary_trac... | /Model/EN/ReliefF/urinary_tract/urinary_tract_034.R | no_license | leon1003/QSMART | R | false | false | 373 | r | library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/urinary_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="mse",alpha=0.2,family="gaussian",standardize=FALSE)
sink('./Model/EN/ReliefF/urinary_tract/urinary_trac... |
# Define UI for application that modifies network graphs
shinyUI(
fluidPage(
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "legend.css")
),
# Application title
titlePanel("COVID-19 Network Model"),
# Sideb... | /ui.R | no_license | PlusOneData/NetworkInfection | R | false | false | 16,653 | r | # Define UI for application that modifies network graphs
shinyUI(
fluidPage(
tags$head(
tags$link(rel = "stylesheet", type = "text/css", href = "legend.css")
),
# Application title
titlePanel("COVID-19 Network Model"),
# Sideb... |
merged<-read.table("H:/Dogs/Candidate Regions/merged.txt",header = TRUE)
## get recombination map
chrMap<-list()
for (i in 1:38){
chrMap[[i]]<-read.table(paste0("\\\\filestore.soton.ac.uk/users/ch19g17/mydocuments/Dogs/LDhat/Maps/cM_map_chr",i,".txt"),stringsAsFactors = FALSE,header=TRUE)
}
## get overlaps with pr... | /Chapter_8/zalpha/candidateregions.R | no_license | chorscroft/PhD-Thesis | R | false | false | 13,156 | r | merged<-read.table("H:/Dogs/Candidate Regions/merged.txt",header = TRUE)
## get recombination map
chrMap<-list()
for (i in 1:38){
chrMap[[i]]<-read.table(paste0("\\\\filestore.soton.ac.uk/users/ch19g17/mydocuments/Dogs/LDhat/Maps/cM_map_chr",i,".txt"),stringsAsFactors = FALSE,header=TRUE)
}
## get overlaps with pr... |
# clib=c('raster', 'hydroTSM', 'xts', 'ggplot2', 'PIHMgisR', 'hydroGOF')
# tmp=lapply(clib, library, character.only=T)
#
# pj='sac1'
# PRJNAME=pj
# outpath=file.path('output', paste0(pj,'.out') )
# inpath = file.path('input', pj)
# PIHM(pj, inpath, outpath)
| /function/src_model.R | no_license | cyeext/Vauclin1979 | R | false | false | 258 | r | # clib=c('raster', 'hydroTSM', 'xts', 'ggplot2', 'PIHMgisR', 'hydroGOF')
# tmp=lapply(clib, library, character.only=T)
#
# pj='sac1'
# PRJNAME=pj
# outpath=file.path('output', paste0(pj,'.out') )
# inpath = file.path('input', pj)
# PIHM(pj, inpath, outpath)
|
library(internetarchive)
### Name: ia_get_items
### Title: Get the metadata for Internet Archive items
### Aliases: ia_get_items
### ** Examples
## Not run:
##D ia_get_items("thedamnationofth00133gut")
##D
##D ats_query <- c("publisher" = "american tract society")
##D ids <- ia_search(ats_query, num_results... | /data/genthat_extracted_code/internetarchive/examples/ia_get_items.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 367 | r | library(internetarchive)
### Name: ia_get_items
### Title: Get the metadata for Internet Archive items
### Aliases: ia_get_items
### ** Examples
## Not run:
##D ia_get_items("thedamnationofth00133gut")
##D
##D ats_query <- c("publisher" = "american tract society")
##D ids <- ia_search(ats_query, num_results... |
library(tidyverse)
library(shiny)
library(googlesheets4)
library(googledrive)
library(knitr)
library(kableExtra)
library(DT)
library(shinyjs)
library(shinythemes)
options(gargle_oauth_cache = ".secrets")
gargle::gargle_oauth_cache()
drive_auth()
list.files(".secrets/")
options(
gargle_oauth_cache = ".secrets",... | /global.R | no_license | TMax66/NCapp | R | false | false | 838 | r | library(tidyverse)
library(shiny)
library(googlesheets4)
library(googledrive)
library(knitr)
library(kableExtra)
library(DT)
library(shinyjs)
library(shinythemes)
options(gargle_oauth_cache = ".secrets")
gargle::gargle_oauth_cache()
drive_auth()
list.files(".secrets/")
options(
gargle_oauth_cache = ".secrets",... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/VisiumExperimentMethods.R
\name{scaleFactors<-,VisiumExperiment-method}
\alias{scaleFactors<-,VisiumExperiment-method}
\alias{scaleFactors<-}
\title{scaleFactors-setter}
\usage{
\S4method{scaleFactors}{VisiumExperiment}(x) <- value
}
\argumen... | /man/scaleFactors-set-VisiumExperiment-method.Rd | no_license | celsomilne/SpatialExperiment | R | false | true | 578 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/VisiumExperimentMethods.R
\name{scaleFactors<-,VisiumExperiment-method}
\alias{scaleFactors<-,VisiumExperiment-method}
\alias{scaleFactors<-}
\title{scaleFactors-setter}
\usage{
\S4method{scaleFactors}{VisiumExperiment}(x) <- value
}
\argumen... |
rm(list=ls())
library(randomForest)
library(geneplotter)
library(caret)
data("spam")
a <- sample(1:nrow(spam), round(nrow(spam)/2))
spam$spam<-as.numeric(spam$spam)-1
train<-spam[a,]
test<-spam[-a,]
y_true<-test$spam
rf.fit <- randomForest(spam~., data=spam, n.tree=1000)
x11()
varImpPlot(rf.fit)
rfy <-... | /HW4/hw44.R | permissive | limeonion/Statistical-Data-Mining-I | R | false | false | 647 | r | rm(list=ls())
library(randomForest)
library(geneplotter)
library(caret)
data("spam")
a <- sample(1:nrow(spam), round(nrow(spam)/2))
spam$spam<-as.numeric(spam$spam)-1
train<-spam[a,]
test<-spam[-a,]
y_true<-test$spam
rf.fit <- randomForest(spam~., data=spam, n.tree=1000)
x11()
varImpPlot(rf.fit)
rfy <-... |
#' @include roxygen.config.R
NULL
#' UpdaterSet
#' @export
MDataManager <- R6Class(
classname = "MDataManager",
cloneable = F,
public = list(
initialize = function() {
private$mdata.set = MDataSet$new()
private$updater.set = UpdaterSet$new()
private$instruction.stack <- MInstructionSta... | /Mdata/R/MDataManager.R | no_license | pashkovds/mdlibs | R | false | false | 3,422 | r | #' @include roxygen.config.R
NULL
#' UpdaterSet
#' @export
MDataManager <- R6Class(
classname = "MDataManager",
cloneable = F,
public = list(
initialize = function() {
private$mdata.set = MDataSet$new()
private$updater.set = UpdaterSet$new()
private$instruction.stack <- MInstructionSta... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/moveCloud.R
\name{moveCloud}
\alias{moveCloud}
\title{moveCloud}
\usage{
moveCloud(x, y, data.path = NULL, buffer.size = NULL, remove.file = FALSE)
}
\arguments{
\item{x}{Object of class \emph{Date} with observation dates of \emph{y}... | /man/moveCloud.Rd | no_license | cran/rsMove | R | false | true | 2,813 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/moveCloud.R
\name{moveCloud}
\alias{moveCloud}
\title{moveCloud}
\usage{
moveCloud(x, y, data.path = NULL, buffer.size = NULL, remove.file = FALSE)
}
\arguments{
\item{x}{Object of class \emph{Date} with observation dates of \emph{y}... |
#setwd("./class/Coursera Data Scientist/Exploratory Data Analysis/projects/project1/ExData_Plotting1/")
#creates data subdirectory if needed
if (!file.exists("data")) {
dir.create("data")
}
#downloads data file if needed
if(!file.exists("./data/household_power_consumption.txt")) {
fileUrl <- "https://d396qusza40o... | /plot4.R | no_license | texan678/ExData_Plotting1 | R | false | false | 1,982 | r | #setwd("./class/Coursera Data Scientist/Exploratory Data Analysis/projects/project1/ExData_Plotting1/")
#creates data subdirectory if needed
if (!file.exists("data")) {
dir.create("data")
}
#downloads data file if needed
if(!file.exists("./data/household_power_consumption.txt")) {
fileUrl <- "https://d396qusza40o... |
list.of.packages <- c("parallel","truncnorm","ggplot2","gridExtra","twitteR","stringr","httr","RCurl",
"rjson","tm","wordcloud","foreach","googleVis","shiny","base64enc")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install... | /Rshiny/mariposa/ui.R | no_license | yulinlei/practice | R | false | false | 4,836 | r | list.of.packages <- c("parallel","truncnorm","ggplot2","gridExtra","twitteR","stringr","httr","RCurl",
"rjson","tm","wordcloud","foreach","googleVis","shiny","base64enc")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install... |
simul <- function(){
library(dplyr)
Penalty <- c("a-c, 0", "a-B(c) - m, D(m)")
NP <- c("a-c, 0", "a-B(c), D(c)-d")
frame <- data.frame(Penalty, NP) %>% rename("No Penalty" = NP)
row.names(frame) <- c("On Time", "Late")
frame
} | /code/simul.R | no_license | jessicavdberg/Essay | R | false | false | 232 | r | simul <- function(){
library(dplyr)
Penalty <- c("a-c, 0", "a-B(c) - m, D(m)")
NP <- c("a-c, 0", "a-B(c), D(c)-d")
frame <- data.frame(Penalty, NP) %>% rename("No Penalty" = NP)
row.names(frame) <- c("On Time", "Late")
frame
} |
file <- commandArgs(T)
da <- read.table(file[1],head=T,row.names=1,sep="\t")
ref <- da[,-1]
Reference <- sort(apply(ref,1,mean),decreasing=T)[1:30]
media <- sort(apply(ref,1,median),decreasing=T)[1:30]
Sample <- da[names(Reference),1]
names(Sample) <- names(Reference)
prop <- prop.table(cbind(Sample,Reference),2) ... | /bio_refference/bin_qiuxia/KO_V3.R | no_license | hpsunlearning/hello-world | R | false | false | 512 | r | file <- commandArgs(T)
da <- read.table(file[1],head=T,row.names=1,sep="\t")
ref <- da[,-1]
Reference <- sort(apply(ref,1,mean),decreasing=T)[1:30]
media <- sort(apply(ref,1,median),decreasing=T)[1:30]
Sample <- da[names(Reference),1]
names(Sample) <- names(Reference)
prop <- prop.table(cbind(Sample,Reference),2) ... |
devtools::load_all()
N <- 1000
t <- 365 * 5
step <- 1
beta <- 0.03
sigma <- 0.005
i0 <- 20
par(mfrow = c(1, 3))
## Example closed (All deaths at 90) ###########################################
aod <- c(rep(0,89), 1)
plot(NA, ylim = c(0, N), xlim = c(0, t * step), ylab = "N", xlab = "Time")
for(i in 1... | /run_code/testing_SIR.R | no_license | covid19UNGS/siR | R | false | false | 2,176 | r |
devtools::load_all()
N <- 1000
t <- 365 * 5
step <- 1
beta <- 0.03
sigma <- 0.005
i0 <- 20
par(mfrow = c(1, 3))
## Example closed (All deaths at 90) ###########################################
aod <- c(rep(0,89), 1)
plot(NA, ylim = c(0, N), xlim = c(0, t * step), ylab = "N", xlab = "Time")
for(i in 1... |
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... | /IntervalSurgeon/inst/testfiles/rcpp_depth/AFL_rcpp_depth/rcpp_depth_valgrind_files/1609857098-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 713 | r | testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extracts.module.R
\name{extract_analysisUI}
\alias{extract_analysisUI}
\title{This function produces the UI to process data analyzed with TraceFinder.}
\usage{
extract_analysisUI(id)
}
\arguments{
\item{id}{The module id used in the app.}
}
\... | /man/extract_analysisUI.Rd | no_license | danielbraas/ShinyMetab | R | false | true | 485 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extracts.module.R
\name{extract_analysisUI}
\alias{extract_analysisUI}
\title{This function produces the UI to process data analyzed with TraceFinder.}
\usage{
extract_analysisUI(id)
}
\arguments{
\item{id}{The module id used in the app.}
}
\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/balance_functions.R
\name{group_ESS}
\alias{group_ESS}
\title{Covariate Balance Function - Group Effective Sample Size}
\usage{
group_ESS(w, TI)
}
\arguments{
\item{w}{weights}
\item{TI}{Indicators where 1 in group and zero otherwise. Typica... | /man/group_ESS.Rd | no_license | bvegetabile/entbal | R | false | true | 491 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/balance_functions.R
\name{group_ESS}
\alias{group_ESS}
\title{Covariate Balance Function - Group Effective Sample Size}
\usage{
group_ESS(w, TI)
}
\arguments{
\item{w}{weights}
\item{TI}{Indicators where 1 in group and zero otherwise. Typica... |
# ref = "http://www.kmooc.kr/courses/course-v1:POSTECHk+CSED490k+2019_T1/course/"
# setwd("")
rm(list = ls())
library(sqldf)
Documents = read.csv('191230_Documents.csv', header = F,
col.names = c('Docid',
'Term', 'count'))
sqldf('SELECT * FROM Documents LIMIT 5... | /self_study/SQL/191230_sqldf_KMOOC_CSED490k_week5.R | no_license | sam351/TIL | R | false | false | 3,443 | r | # ref = "http://www.kmooc.kr/courses/course-v1:POSTECHk+CSED490k+2019_T1/course/"
# setwd("")
rm(list = ls())
library(sqldf)
Documents = read.csv('191230_Documents.csv', header = F,
col.names = c('Docid',
'Term', 'count'))
sqldf('SELECT * FROM Documents LIMIT 5... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.