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 |
|---|---|---|---|---|---|---|---|---|---|
library(ohchibi)
setwd('/home/isai/Documents/results/github/variovoraxRGI/scripts/')
set.seed(130816)
#Read the clean matrix and create dataset
Dat_amplicon<-readRDS(file = "../cleandata/dat_amplicon_4stresses_useq97.RDS")
Dat <- Dat_amplicon$RelativeAbundance
Tax <- Dat$Tax
vario_useqs <- Tax$Taxonomy %>% grep(pat... | /scripts/amplicon_4stresses_6.variovorax_relative_abundance.R | no_license | isaisg/variovoraxRGI | R | false | false | 5,280 | r | library(ohchibi)
setwd('/home/isai/Documents/results/github/variovoraxRGI/scripts/')
set.seed(130816)
#Read the clean matrix and create dataset
Dat_amplicon<-readRDS(file = "../cleandata/dat_amplicon_4stresses_useq97.RDS")
Dat <- Dat_amplicon$RelativeAbundance
Tax <- Dat$Tax
vario_useqs <- Tax$Taxonomy %>% grep(pat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\name{support}
\alias{support}
\title{Return the support of a distribution}
\usage{
support(d, drop = TRUE, ...)
}
\arguments{
\item{d}{An object. The package provides methods for distribution
objects such as those from \code{\link[... | /man/support.Rd | permissive | alexpghayes/distributions3 | R | false | true | 929 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\name{support}
\alias{support}
\title{Return the support of a distribution}
\usage{
support(d, drop = TRUE, ...)
}
\arguments{
\item{d}{An object. The package provides methods for distribution
objects such as those from \code{\link[... |
#Import data
Xtrain <- read.csv("C:/Users/yuan/src/CountableCare/Data/TrainValue.csv")
Ytrain <- read.csv("C:/Users/yuan/src/CountableCare/Data/TrainLabel.csv")
Xtest <- read.csv("/C:/Users/yuan/src/CountableCare/Data/TestValue.csv")
#Introduce NA's for white spaces in categorical data:
Xtrain[Xtrain==""] <- NA
#Take... | /explore.R | no_license | MasterAwk/CountableCare | R | false | false | 3,255 | r | #Import data
Xtrain <- read.csv("C:/Users/yuan/src/CountableCare/Data/TrainValue.csv")
Ytrain <- read.csv("C:/Users/yuan/src/CountableCare/Data/TrainLabel.csv")
Xtest <- read.csv("/C:/Users/yuan/src/CountableCare/Data/TestValue.csv")
#Introduce NA's for white spaces in categorical data:
Xtrain[Xtrain==""] <- NA
#Take... |
library(testthat)
source("../calcStats.R")
testthat::test_that("tests", {
# Testing for errors
# data.table is null
expect_error(calcStats(inDt = NULL,
inMeasVar = "dummy"))
# input is not a data.table
expect_error(calcStats(inDt = data.frame(x = 1,
... | /examples/tests/test_calcStats.R | no_license | dmattek/training-MIC20200319 | R | false | false | 2,014 | r | library(testthat)
source("../calcStats.R")
testthat::test_that("tests", {
# Testing for errors
# data.table is null
expect_error(calcStats(inDt = NULL,
inMeasVar = "dummy"))
# input is not a data.table
expect_error(calcStats(inDt = data.frame(x = 1,
... |
# This file is part of the CNO software
#
# Copyright (c) 2011-2013 - EBI
#
# File author(s): CNO developers (cno-dev@ebi.ac.uk)
#
# Distributed under the GPLv3 License. See accompanying file LICENSE.txt or copy at
# http://www.gnu.org/licenses/gpl-3.0.html
#
# CNO website: http://www.cellnopt.org
#
# $Id: $
get... | /packages/CNORdt/R/getFitDT.R | no_license | saezlab/CellNOptR_packages_archived | R | false | false | 3,450 | r | # This file is part of the CNO software
#
# Copyright (c) 2011-2013 - EBI
#
# File author(s): CNO developers (cno-dev@ebi.ac.uk)
#
# Distributed under the GPLv3 License. See accompanying file LICENSE.txt or copy at
# http://www.gnu.org/licenses/gpl-3.0.html
#
# CNO website: http://www.cellnopt.org
#
# $Id: $
get... |
load('../data/f.Rdata')
source('./plot_params.R')
pdf('../figures_paper/fswlw_all.pdf',width=10,height=7)
layout(matrix(1:6,nrow=2))
par(mar=c(5,5,4,3))
cex = 2
cex_leg= 1.35
lwd = 2
xlim = c(-3,7)
ylim = c(300,200)
Tsbase = 290
Tslist = Tsbase + c(0,4)
caselist = c("AMIP","AMIP4K")
colvec = c("blue","red")
... | /src_paper/plot_fswlw_all.R | no_license | jeevanje/rad_cooling | R | false | false | 1,556 | r | load('../data/f.Rdata')
source('./plot_params.R')
pdf('../figures_paper/fswlw_all.pdf',width=10,height=7)
layout(matrix(1:6,nrow=2))
par(mar=c(5,5,4,3))
cex = 2
cex_leg= 1.35
lwd = 2
xlim = c(-3,7)
ylim = c(300,200)
Tsbase = 290
Tslist = Tsbase + c(0,4)
caselist = c("AMIP","AMIP4K")
colvec = c("blue","red")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/regex-package.R
\docType{package}
\name{rebus}
\alias{rebus}
\alias{rebus-package}
\alias{rebus-package}
\title{rebus: Regular Expression Builder, Um, Something}
\description{
Build regular expressions in a human readable way.
}
\details{
Reg... | /man/rebus.Rd | no_license | cran/rebus | R | false | true | 3,228 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/regex-package.R
\docType{package}
\name{rebus}
\alias{rebus}
\alias{rebus-package}
\alias{rebus-package}
\title{rebus: Regular Expression Builder, Um, Something}
\description{
Build regular expressions in a human readable way.
}
\details{
Reg... |
#===== Source file: ../text_util.r on 2021-06-02
#-----
spec_from_text <- function(x)
{
# Note: 'grepl' returns FALSE for NA values in 'x', so "plain" is returned.
as.character(
ifelse(grepl("^MATH_", x), "plotmath",
ifelse(grepl("^MKDN_", x), "markdown", "plain"))
)
}
#-----
prefix_text <- functio... | /R/text_util.bare.R | no_license | rrprf/tablesgg | R | false | false | 5,644 | r | #===== Source file: ../text_util.r on 2021-06-02
#-----
spec_from_text <- function(x)
{
# Note: 'grepl' returns FALSE for NA values in 'x', so "plain" is returned.
as.character(
ifelse(grepl("^MATH_", x), "plotmath",
ifelse(grepl("^MKDN_", x), "markdown", "plain"))
)
}
#-----
prefix_text <- functio... |
require(DPQmpfr)
require(Rmpfr)
## very accurate set of *large* abscissa values
x <- mpfr(2,1024)^ seq(3, 100, by=1/2)
xN <- asNumeric(x)
## Looking at pnormU_S53() = upper bound to pnorm(), for large x,
## the term log(4 / (3 + sqrt(1 + 8/x^2))) early underflows to 0:
eps_S53 <- function(x, method = c("direct", "l... | /tests/dpqnorm-tst.R | no_license | cran/DPQmpfr | R | false | false | 3,593 | r | require(DPQmpfr)
require(Rmpfr)
## very accurate set of *large* abscissa values
x <- mpfr(2,1024)^ seq(3, 100, by=1/2)
xN <- asNumeric(x)
## Looking at pnormU_S53() = upper bound to pnorm(), for large x,
## the term log(4 / (3 + sqrt(1 + 8/x^2))) early underflows to 0:
eps_S53 <- function(x, method = c("direct", "l... |
# get reads count
.get.reads.count <- function(ibatch,PARAMETERS,ANNOTATION,ANNOTATION_BATCH_ID,BAM_CHRS,no_bam_files,bam){
# get annotation
anno = .get.gene.anno(ibatch,ANNOTATION,ANNOTATION_BATCH_ID)
check_points=.get.check.points(anno,PARAMETERS)
no_check_points=length(check_points)
# get... | /R/get.reads.count.R | no_license | arlston/MeTDiff | R | false | false | 866 | r |
# get reads count
.get.reads.count <- function(ibatch,PARAMETERS,ANNOTATION,ANNOTATION_BATCH_ID,BAM_CHRS,no_bam_files,bam){
# get annotation
anno = .get.gene.anno(ibatch,ANNOTATION,ANNOTATION_BATCH_ID)
check_points=.get.check.points(anno,PARAMETERS)
no_check_points=length(check_points)
# get... |
setwd
library(DarkDiv)
dat <- read.csv("data_biomac_2.csv")
dim(dat)
#community matrix
comm <- dat[, -(1:5)]
#oppure comm <- dat[, 6:ncol(dat)] dalla 6 all'ultima colonna
dark_comm <- DarkDiv(comm) #dark-diversity, le specie non presenti
str(dark_comm)
rowSums(dark_comm$Dark) #only NA (not avaiable) se c'è un NA divent... | /lab3.r | no_license | AminaElia/Biogeography-macroecology21 | R | false | false | 2,899 | r | setwd
library(DarkDiv)
dat <- read.csv("data_biomac_2.csv")
dim(dat)
#community matrix
comm <- dat[, -(1:5)]
#oppure comm <- dat[, 6:ncol(dat)] dalla 6 all'ultima colonna
dark_comm <- DarkDiv(comm) #dark-diversity, le specie non presenti
str(dark_comm)
rowSums(dark_comm$Dark) #only NA (not avaiable) se c'è un NA divent... |
# SA
#
#
LN1030 <- function (a,b,n,m=n-1,d=1/n,mean.rn,sd.rn) {
#
id <- 1030
#
#
psi = 1 - a^2*d/b
#
result <- exp(a*mean.rn + b*psi*sd.rn^2/2)
return (result)
} | /R/LN1030.R | no_license | cran/fuel | R | false | false | 172 | r | # SA
#
#
LN1030 <- function (a,b,n,m=n-1,d=1/n,mean.rn,sd.rn) {
#
id <- 1030
#
#
psi = 1 - a^2*d/b
#
result <- exp(a*mean.rn + b*psi*sd.rn^2/2)
return (result)
} |
library(data.table)
library(here)
c.train <- readRDS(here("data", "black_friday", "c_train.RDS"))
c.test <- readRDS(here("data", "black_friday", "c_test.RDS"))
c.train <- c.train[c.train$Product_Category_1 <= 18,]
library(h2o)
localH2O <- h2o.init(nthreads = -1)
#data to h2o cluster
train.h2o <- as.h2o(c.train)... | /projects/black_friday/h2o.R | no_license | bjungbogati/mlr | R | false | false | 3,022 | r |
library(data.table)
library(here)
c.train <- readRDS(here("data", "black_friday", "c_train.RDS"))
c.test <- readRDS(here("data", "black_friday", "c_test.RDS"))
c.train <- c.train[c.train$Product_Category_1 <= 18,]
library(h2o)
localH2O <- h2o.init(nthreads = -1)
#data to h2o cluster
train.h2o <- as.h2o(c.train)... |
library(class)
library(readxl)
library(editrules)
library(tidyverse)
library(Hmisc)
library(ggplot2)
library(grid)
library(gridExtra)
library(robustbase)
library(tm)
library(SnowballC)
library(Rweka)
library(data.table)
library(stringr)
library(forecast) | /Import Libraries.R | no_license | markvakarchuk/biz_ML_model | R | false | false | 254 | r | library(class)
library(readxl)
library(editrules)
library(tidyverse)
library(Hmisc)
library(ggplot2)
library(grid)
library(gridExtra)
library(robustbase)
library(tm)
library(SnowballC)
library(Rweka)
library(data.table)
library(stringr)
library(forecast) |
## Below are a pair of functions that are used to create a special
## object that stores a matrix and its inverse.
## makeCacheMatrix creates a special matrix object that can cache its inverse.
## 1. set the value of the matrix
## 2. get the value of the matrix
## 3. set the value of the inverse
## 4. get the value o... | /cachematrix.R | no_license | ljingchen/ProgrammingAssignment2 | R | false | false | 1,407 | r | ## Below are a pair of functions that are used to create a special
## object that stores a matrix and its inverse.
## makeCacheMatrix creates a special matrix object that can cache its inverse.
## 1. set the value of the matrix
## 2. get the value of the matrix
## 3. set the value of the inverse
## 4. get the value o... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extremes-data.R
\name{applyQualifiers}
\alias{applyQualifiers}
\title{Apply qualifiers}
\usage{
applyQualifiers(reportObject)
}
\arguments{
\item{reportObject}{the extremes report object}
}
\value{
the same reportObject, but with all values u... | /man/applyQualifiers.Rd | permissive | thongsav-usgs/repgen | R | false | true | 438 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extremes-data.R
\name{applyQualifiers}
\alias{applyQualifiers}
\title{Apply qualifiers}
\usage{
applyQualifiers(reportObject)
}
\arguments{
\item{reportObject}{the extremes report object}
}
\value{
the same reportObject, but with all values u... |
rm(list = ls())
library('tree')
raw_data <- read.csv("train.csv")
#X is the data frame with all observations and 93 features
#extracting from raw_data, 3 here is used in windows, but could be 2 in IOS.
X <- raw_data[, 3:length(raw_data)-1]
#Y is the data frame with all observations but only target column
Y <- raw_da... | /model_tree.R | no_license | huiyuHarvey/kaggle-otto | R | false | false | 4,414 | r | rm(list = ls())
library('tree')
raw_data <- read.csv("train.csv")
#X is the data frame with all observations and 93 features
#extracting from raw_data, 3 here is used in windows, but could be 2 in IOS.
X <- raw_data[, 3:length(raw_data)-1]
#Y is the data frame with all observations but only target column
Y <- raw_da... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_enrichment.R
\name{enrich_deconvolution}
\alias{enrich_deconvolution}
\title{enrich_deconvolution}
\usage{
enrich_deconvolution(expr, log_expr, cluster_info, ct_exp, cutoff)
}
\description{
Rui to fill in
}
\keyword{internal}
| /man/enrich_deconvolution.Rd | permissive | RubD/Giotto | R | false | true | 312 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial_enrichment.R
\name{enrich_deconvolution}
\alias{enrich_deconvolution}
\title{enrich_deconvolution}
\usage{
enrich_deconvolution(expr, log_expr, cluster_info, ct_exp, cutoff)
}
\description{
Rui to fill in
}
\keyword{internal}
|
make.all.branches.ou.pruning <- function(cache, control) {
if (!is.ultrametric(cache$info$phy))
warning("I am not sure that OU via pruning on non-ultrametric trees is calculated correctly")
if (control$backend == "R") {
branches.ou <- make.branches.ou(cache, control)
function(pars, intermediates, preset... | /fuzzedpackages/diversitree/R/model-ou-pruning.R | no_license | akhikolla/testpackages | R | false | false | 2,749 | r | make.all.branches.ou.pruning <- function(cache, control) {
if (!is.ultrametric(cache$info$phy))
warning("I am not sure that OU via pruning on non-ultrametric trees is calculated correctly")
if (control$backend == "R") {
branches.ou <- make.branches.ou(cache, control)
function(pars, intermediates, preset... |
insidePoly <- function(x,y,pgon) {
# This code is taken from the spatstat.utils function
# inside.xypolygon() (the "interpreted" method), with minor
# modifications.
#
# Check that pgon is of the appropriate form.
if(inherits(pgon,"list")) {
ok <- all(c("x","y") %in% names(pgon))
if(!ok) {
stop("Argumen... | /R/insidePoly.R | no_license | cran/deldir | R | false | false | 3,484 | r | insidePoly <- function(x,y,pgon) {
# This code is taken from the spatstat.utils function
# inside.xypolygon() (the "interpreted" method), with minor
# modifications.
#
# Check that pgon is of the appropriate form.
if(inherits(pgon,"list")) {
ok <- all(c("x","y") %in% names(pgon))
if(!ok) {
stop("Argumen... |
get_boxplots_child <-
function(X,Y,feature_table_file,parentoutput_dir,class_labels_file,boxplot.col.opt="grey57",sample.col.opt="rainbow",alphacol=0.3,newdevice=TRUE,cex=0.6,replace.by.NA=FALSE,pairedanalysis=FALSE,filename="")
{
if(is.na(X)==TRUE){
data_matrix<-read.table(feature_table_file,sep="\t",header=... | /R/get_boxplots_child.R | no_license | XinsongDu/xmsPANDA | R | false | false | 6,409 | r | get_boxplots_child <-
function(X,Y,feature_table_file,parentoutput_dir,class_labels_file,boxplot.col.opt="grey57",sample.col.opt="rainbow",alphacol=0.3,newdevice=TRUE,cex=0.6,replace.by.NA=FALSE,pairedanalysis=FALSE,filename="")
{
if(is.na(X)==TRUE){
data_matrix<-read.table(feature_table_file,sep="\t",header=... |
############################
##########n-gram############
##############################
rm(list=ls())
# install.packages("dplyr")
# install.packages("tidytext")
# install.packages("janeaustenr")
library(dplyr)
library(tidytext)
library(janeaustenr)
# tf-idf 에서도 unnest_tokens()를 사용했었음
# tf-idf 에서는 unnest_tokens()를 통... | /180607_텍스트마이닝/Ngram.R | no_license | chankoo/BOAZ-Sessions | R | false | false | 4,978 | r | ############################
##########n-gram############
##############################
rm(list=ls())
# install.packages("dplyr")
# install.packages("tidytext")
# install.packages("janeaustenr")
library(dplyr)
library(tidytext)
library(janeaustenr)
# tf-idf 에서도 unnest_tokens()를 사용했었음
# tf-idf 에서는 unnest_tokens()를 통... |
################################
##author:USERNAME
##date: 4/10/2017
##purpose: -Clean a dataset for modelling SD
##
#######################################
rm(list=ls())
os <- .Platform$OS.type
if (os=="windows") {
lib_path <- "FILEPATH"
j<- "FILEPATH"
h<-"FILEPATH"
} else {
lib_path <- "FILE... | /risk_factors_code/metab_cholesterol/sd_code/clean_sd.R | no_license | Nermin-Ghith/ihme-modeling | R | false | false | 11,602 | r | ################################
##author:USERNAME
##date: 4/10/2017
##purpose: -Clean a dataset for modelling SD
##
#######################################
rm(list=ls())
os <- .Platform$OS.type
if (os=="windows") {
lib_path <- "FILEPATH"
j<- "FILEPATH"
h<-"FILEPATH"
} else {
lib_path <- "FILE... |
# Ejemplo 1. Regresión Lineal Múltiple
# Predecir el precio de cena (platillo).
# Datos de encuestas de clientes de 168 restaurantes Italianos
# en el área deseada están disponibles.
# Y: Price (Precio): el precio (en USD) de la cena
# X1: Food: Valuación del cliente de la comida (sacado de 30)
# X2: Décor: ... | /Sesion-05/Ejemplo-01/Ejemplo_01.R | no_license | DillanAS/Programacion-R-Santander-2021 | R | false | false | 5,666 | r | # Ejemplo 1. Regresión Lineal Múltiple
# Predecir el precio de cena (platillo).
# Datos de encuestas de clientes de 168 restaurantes Italianos
# en el área deseada están disponibles.
# Y: Price (Precio): el precio (en USD) de la cena
# X1: Food: Valuación del cliente de la comida (sacado de 30)
# X2: Décor: ... |
# Exercise 2
# Task 2.1: Simulation
library(fields)
library(MASS)
library(ggplot2)
library(mvtnorm)
# defining covariance function and mean function
matern_cov <- function(sigma_sq, phi, dist_matrix){
# returns the covariance given parameters sigma^2 and phi, and distance matrix, assuming Matérn covariance fun... | /project-2/Exercise 2.R | permissive | berild/MA8702 | R | false | false | 10,395 | r |
# Exercise 2
# Task 2.1: Simulation
library(fields)
library(MASS)
library(ggplot2)
library(mvtnorm)
# defining covariance function and mean function
matern_cov <- function(sigma_sq, phi, dist_matrix){
# returns the covariance given parameters sigma^2 and phi, and distance matrix, assuming Matérn covariance fun... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/infer.R
\name{infer.trbp}
\alias{infer.trbp}
\title{Inference method using tree-reweighted belief propagation}
\usage{
infer.trbp(crf, max.iter = 10000, cutoff = 1e-04, verbose = 0)
}
\arguments{
\item{crf}{The CRF}
\item{max.iter}{The maxim... | /man/infer.trbp.Rd | no_license | LLT0504/CRF | R | false | true | 1,205 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/infer.R
\name{infer.trbp}
\alias{infer.trbp}
\title{Inference method using tree-reweighted belief propagation}
\usage{
infer.trbp(crf, max.iter = 10000, cutoff = 1e-04, verbose = 0)
}
\arguments{
\item{crf}{The CRF}
\item{max.iter}{The maxim... |
# Load packages
library(tidyverse)
library(Seurat)
set.seed(3423)
# Load in the data
cells <- readRDS("/projectnb2/bf528/users/tinman/Project4/Analyst/pbmc_seurat.rda")
# Identify cluster biomarkers
cell_markers <- FindAllMarkers(cells, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
top_markers <- cell_mark... | /Analyst/analyst_code.R | permissive | Arushiii/project-4-tinman | R | false | false | 3,212 | r | # Load packages
library(tidyverse)
library(Seurat)
set.seed(3423)
# Load in the data
cells <- readRDS("/projectnb2/bf528/users/tinman/Project4/Analyst/pbmc_seurat.rda")
# Identify cluster biomarkers
cell_markers <- FindAllMarkers(cells, only.pos = TRUE, min.pct = 0.25, logfc.threshold = 0.25)
top_markers <- cell_mark... |
# Stand-alone utility functions
#' PERMANOVA with repeat measure-aware permutations. Block sizes are allowed to
#' differ.
#'
#' @param D An N-by-N distance matrix (must be a \code{dist} object).
#' @param permute_within Data frame with N rows containing metadata to test per
#' sample
#' @param blocks A leng... | /overview/src/omnibus_tests.r | no_license | biobakery/hmp2_analysis | R | false | false | 35,037 | r |
# Stand-alone utility functions
#' PERMANOVA with repeat measure-aware permutations. Block sizes are allowed to
#' differ.
#'
#' @param D An N-by-N distance matrix (must be a \code{dist} object).
#' @param permute_within Data frame with N rows containing metadata to test per
#' sample
#' @param blocks A leng... |
#' @title **Find Information About MLB Free Agents**
#' @param season Season preceding free agency
#' @return Returns a tibble with the following columns:
#'
#' |col_name |types |
#' |:----------------------|:----------|
#' | date_declared | character |
#' | notes | charac... | /R/mlb_people_free_agents.R | permissive | darh78/baseballr | R | false | false | 1,786 | r | #' @title **Find Information About MLB Free Agents**
#' @param season Season preceding free agency
#' @return Returns a tibble with the following columns:
#'
#' |col_name |types |
#' |:----------------------|:----------|
#' | date_declared | character |
#' | notes | charac... |
#' Run the model using the network object
#'
#' This is the core function that runs the model in our program. Before running this function, we need to specify data, prior, JAGS code, etc. using \code{\link{network.data}}.
#'
#' @param network Network object created from \code{\link{network.data}} function
#' @param in... | /R/network.run.R | no_license | shamim-active/bnma | R | false | false | 10,902 | r | #' Run the model using the network object
#'
#' This is the core function that runs the model in our program. Before running this function, we need to specify data, prior, JAGS code, etc. using \code{\link{network.data}}.
#'
#' @param network Network object created from \code{\link{network.data}} function
#' @param in... |
json_open <- function(filename){
print('json_open...')
require('rjson')
file_as_text <- readLines(filename)
json_data <- fromJSON(file_as_text)
#str(json_data)
return(json_data)
}
list_to_matrix <- function(list){
xdim <- length(list[[1]])
ydim <- length(list)
res <- array(unlist(list), dim = c(xdim, ... | /R/json_process.R | no_license | kovarsky/metagenome_old | R | false | false | 31,861 | r | json_open <- function(filename){
print('json_open...')
require('rjson')
file_as_text <- readLines(filename)
json_data <- fromJSON(file_as_text)
#str(json_data)
return(json_data)
}
list_to_matrix <- function(list){
xdim <- length(list[[1]])
ydim <- length(list)
res <- array(unlist(list), dim = c(xdim, ... |
#' Import a module or package
#'
#' \code{box::use} imports one or more modules and/or packages, and makes them
#' available in the calling environment.
#'
#' @details
#' \code{box::use(...)} specifies a list of one or more import declarations,
#' given as individual arguments to \code{box::use}, separated by comma. Ea... | /R/use.r | permissive | JoshOBrien/box | R | false | false | 18,436 | r | #' Import a module or package
#'
#' \code{box::use} imports one or more modules and/or packages, and makes them
#' available in the calling environment.
#'
#' @details
#' \code{box::use(...)} specifies a list of one or more import declarations,
#' given as individual arguments to \code{box::use}, separated by comma. Ea... |
/Reducción de dimensiones/Quiz1.R | no_license | jsgarcesc/Reduccion_dimensiones | R | false | false | 2,203 | r | ||
n.images <- 100
n.chosen.images <- 5
chosen.images <- 1:n.chosen.images
int.act.chosen <- 1
int.act.seen <- 0.7
decay.rate.A <- 0.03
decay.rate.B <- 0.05
# list of memory times by hr
memory.time <- c(3, 12, 24, 168)
run.trial.variable.decay <- function(mem.length, decay.rate.A, decay.rate.B, int.act.chosen, int.ac... | /Model/model.R | no_license | JoRidley/memModel | R | false | false | 2,157 | r |
n.images <- 100
n.chosen.images <- 5
chosen.images <- 1:n.chosen.images
int.act.chosen <- 1
int.act.seen <- 0.7
decay.rate.A <- 0.03
decay.rate.B <- 0.05
# list of memory times by hr
memory.time <- c(3, 12, 24, 168)
run.trial.variable.decay <- function(mem.length, decay.rate.A, decay.rate.B, int.act.chosen, int.ac... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_multiagent.R
\name{create_multiagent}
\alias{create_multiagent}
\title{Create a \strong{pointblank} \emph{multiagent} object}
\usage{
create_multiagent(..., lang = NULL, locale = NULL)
}
\arguments{
\item{...}{One or more \strong{point... | /man/create_multiagent.Rd | no_license | cran/pointblank | R | false | true | 5,055 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_multiagent.R
\name{create_multiagent}
\alias{create_multiagent}
\title{Create a \strong{pointblank} \emph{multiagent} object}
\usage{
create_multiagent(..., lang = NULL, locale = NULL)
}
\arguments{
\item{...}{One or more \strong{point... |
#' Wrapper function to remove pathway redundancy
#'
#' Given an input structure with pathway- and gene-level information, remove
#' the redundant pathways (and plot if desired)
#'
#' @param input list with two elements. The first element is a named list of
#' data.frames, with the names corresponding to pathway nam... | /PathCluster/R/run_pathway_vis.R | no_license | fifdick/DTUinPDbrain | R | false | false | 2,763 | r | #' Wrapper function to remove pathway redundancy
#'
#' Given an input structure with pathway- and gene-level information, remove
#' the redundant pathways (and plot if desired)
#'
#' @param input list with two elements. The first element is a named list of
#' data.frames, with the names corresponding to pathway nam... |
library(NISTunits)
### Name: NISTjouleTOukThUnIT
### Title: Convert joule to British thermal unitIT 9
### Aliases: NISTjouleTOukThUnIT
### Keywords: programming
### ** Examples
NISTjouleTOukThUnIT(10)
| /data/genthat_extracted_code/NISTunits/examples/NISTjouleTOukThUnIT.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 208 | r | library(NISTunits)
### Name: NISTjouleTOukThUnIT
### Title: Convert joule to British thermal unitIT 9
### Aliases: NISTjouleTOukThUnIT
### Keywords: programming
### ** Examples
NISTjouleTOukThUnIT(10)
|
/munge/03-analisis.R | no_license | JuanCauac/Diabetes2 | R | false | false | 5,717 | r | ||
#===============================================================================
# test_z_all_3.R
#===============================================================================
options(warn=2)
library (bdpg)
source ("/Users/bill/D/Projects/ProblemDifficulty/pkgs/bdpg/R/test_greedy_res... | /tests/testthat/greedy/test_z_all_3.R | no_license | langfob/bdpg | R | false | false | 1,375 | r | #===============================================================================
# test_z_all_3.R
#===============================================================================
options(warn=2)
library (bdpg)
source ("/Users/bill/D/Projects/ProblemDifficulty/pkgs/bdpg/R/test_greedy_res... |
## Load and process data
setwd("C:/Users/I67105/Documents/coursera/HWASSignment/course4/hw")
library(dplyr)
library(lubridate)
library(ggplot2)
library(date)
rawdata <- read.table("household_power_consumption.txt", sep = ";", header = TRUE, stringsAsFactors = FALSE)
#rawdata <- read.table("household_power_cons... | /Plot1.R | no_license | idwindflower/course4week1project1 | R | false | false | 1,234 | r | ## Load and process data
setwd("C:/Users/I67105/Documents/coursera/HWASSignment/course4/hw")
library(dplyr)
library(lubridate)
library(ggplot2)
library(date)
rawdata <- read.table("household_power_consumption.txt", sep = ";", header = TRUE, stringsAsFactors = FALSE)
#rawdata <- read.table("household_power_cons... |
"randtest.between" <- function(xtest, nrepet=999, ...) {
if (!inherits(xtest,"dudi"))
stop("Object of class dudi expected")
if (!inherits(xtest,"between"))
stop ("Type 'between' expected")
appel <- as.list(xtest$call)
dudi1 <- eval.parent(appel[[2]]) ## could work with bca (appel$x) or bet... | /R/randtest.between.R | no_license | SrivastavaLab/ade4 | R | false | false | 1,127 | r | "randtest.between" <- function(xtest, nrepet=999, ...) {
if (!inherits(xtest,"dudi"))
stop("Object of class dudi expected")
if (!inherits(xtest,"between"))
stop ("Type 'between' expected")
appel <- as.list(xtest$call)
dudi1 <- eval.parent(appel[[2]]) ## could work with bca (appel$x) or bet... |
#link to puzzle: https://adventofcode.com/2020/day/3
# Setup -------------------------------------------------------------------
library(tidyverse)
df_raw <- read_csv(here::here("Advent of Code 2020/inputs/day3.csv"), col_names = FALSE) %>%
mutate(X1 = str_replace_all(X1, c("\\." = "0", "\\#" = "1"))) #replacing ... | /Advent of Code 2020/day3.R | no_license | ekholme/prog-practice-r | R | false | false | 2,809 | r |
#link to puzzle: https://adventofcode.com/2020/day/3
# Setup -------------------------------------------------------------------
library(tidyverse)
df_raw <- read_csv(here::here("Advent of Code 2020/inputs/day3.csv"), col_names = FALSE) %>%
mutate(X1 = str_replace_all(X1, c("\\." = "0", "\\#" = "1"))) #replacing ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/app.R
\name{live_shiny}
\alias{live_shiny}
\title{Function that starts a Shiny app which helps use LIVE.}
\usage{
live_shiny(train_data, black_box_model, target, explained_data = train_data)
}
\arguments{
\item{train_data}{dataset from which ... | /man/live_shiny.Rd | no_license | cran/live | R | false | true | 634 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/app.R
\name{live_shiny}
\alias{live_shiny}
\title{Function that starts a Shiny app which helps use LIVE.}
\usage{
live_shiny(train_data, black_box_model, target, explained_data = train_data)
}
\arguments{
\item{train_data}{dataset from which ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set_default_crs.R
\name{set_default_crs}
\alias{set_default_crs}
\title{Change default coordinate reference system}
\usage{
set_default_crs(crs)
}
\description{
Change default coordinate reference system
}
| /man/set_default_crs.Rd | no_license | Theopapa/rtoolz | R | false | true | 285 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set_default_crs.R
\name{set_default_crs}
\alias{set_default_crs}
\title{Change default coordinate reference system}
\usage{
set_default_crs(crs)
}
\description{
Change default coordinate reference system
}
|
## NIST DART-MS Dababase Builder (DB)
##
## Generates library as general-purpose text (.SDF).
##
## General-purpose .SDF is further converted to NIST format
## using Lib2NIST on Windows operating systems, for use with
## NIST MS Search. Details about Lib2NIST and NIST MS Search can be
## found at chemdata.nist.gov
#... | /asm_DARTMSDB-BuilderScript-1.00.R | permissive | asm3-nist/DART-MS-DBB | R | false | false | 21,171 | r | ## NIST DART-MS Dababase Builder (DB)
##
## Generates library as general-purpose text (.SDF).
##
## General-purpose .SDF is further converted to NIST format
## using Lib2NIST on Windows operating systems, for use with
## NIST MS Search. Details about Lib2NIST and NIST MS Search can be
## found at chemdata.nist.gov
#... |
library(plyr,include.only = "join")
library(dplyr)
library(stringr)
library(ggplot2)
library(maps)
library(RColorBrewer)
library(ggpubr)
library(tidyverse)
library(reshape2)
library(ggrepel)
library(png)
library(grid)
library(data.table)
#############################
### theme7point
### KB June 29 2018
### Set the def... | /accessoryFiles/scripts/drawDiscordantCallsFig.R | no_license | kevbrick/Alleva_et_al_2021_analytic_pipeline | R | false | false | 10,452 | r | library(plyr,include.only = "join")
library(dplyr)
library(stringr)
library(ggplot2)
library(maps)
library(RColorBrewer)
library(ggpubr)
library(tidyverse)
library(reshape2)
library(ggrepel)
library(png)
library(grid)
library(data.table)
#############################
### theme7point
### KB June 29 2018
### Set the def... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/collapse-chains.R
\name{collapse_chains.default}
\alias{collapse_chains.default}
\title{Collapse Chains}
\usage{
\method{collapse_chains}{default}(x, ...)
}
\arguments{
\item{x}{An object.}
\item{...}{Other arguments passed to methods.}
}
\v... | /man/collapse_chains.default.Rd | permissive | krlmlr/mcmcr | R | false | true | 750 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/collapse-chains.R
\name{collapse_chains.default}
\alias{collapse_chains.default}
\title{Collapse Chains}
\usage{
\method{collapse_chains}{default}(x, ...)
}
\arguments{
\item{x}{An object.}
\item{...}{Other arguments passed to methods.}
}
\v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy.nlslist.R
\name{tidy.nlsList}
\alias{tidy.nlsList}
\title{Tidy method for nlsList}
\usage{
\method{tidy}{nlsList}(x, conf.int = FALSE, conf.level = 0.95,
quick = FALSE, ...)
}
\arguments{
\item{x}{An object returned by \code{\link{nlsL... | /man/tidy.nlsList.Rd | no_license | RemkoDuursma/nlshelper | R | false | true | 978 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy.nlslist.R
\name{tidy.nlsList}
\alias{tidy.nlsList}
\title{Tidy method for nlsList}
\usage{
\method{tidy}{nlsList}(x, conf.int = FALSE, conf.level = 0.95,
quick = FALSE, ...)
}
\arguments{
\item{x}{An object returned by \code{\link{nlsL... |
data <- read.table("D:/stock.csv", header = TRUE, sep = ",")
tcv = function(time){
return(gsub(':','',gsub(' ', '', gsub('-','',time))))
}
getCount=function(xt, nt, a) {
emps=data[data$area==a & tcv(data$time)>= tcv(nt) & tcv(data$time) <= tcv(xt),]$empid
#print(data[data$area==a & tcv(data$time)>= tcv(nt) & ... | /Cheng-Hsuan_Li/year-end-party-uap.r | no_license | rcschen/r-exercise | R | false | false | 543 | r | data <- read.table("D:/stock.csv", header = TRUE, sep = ",")
tcv = function(time){
return(gsub(':','',gsub(' ', '', gsub('-','',time))))
}
getCount=function(xt, nt, a) {
emps=data[data$area==a & tcv(data$time)>= tcv(nt) & tcv(data$time) <= tcv(xt),]$empid
#print(data[data$area==a & tcv(data$time)>= tcv(nt) & ... |
testlist <- list(x = c(1280061267L, -2687190L, -108L, -1802201857L, -108L, -1L, -10497L, -562834L, 1298231382L, 1768257321L, 676545880L, 1342202735L, 1847077375L, 1291209758L, 695432233L, 1277045247L, -10670L, 439298452L, -1L, -10497L, -562834L, 1298231382L, 1768257321L, 676545880L, 1342202735L, 1847077375L, 129120... | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962413-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 540 | r | testlist <- list(x = c(1280061267L, -2687190L, -108L, -1802201857L, -108L, -1L, -10497L, -562834L, 1298231382L, 1768257321L, 676545880L, 1342202735L, 1847077375L, 1291209758L, 695432233L, 1277045247L, -10670L, 439298452L, -1L, -10497L, -562834L, 1298231382L, 1768257321L, 676545880L, 1342202735L, 1847077375L, 129120... |
#' @title Summarize GAGAM
#'
#' @description Summary method for \code{gagam} objects.
#'
#' @param object Fitted \code{gagam} object
#' @param reduc If you wish to summarize one of the reduced models, specify the index of reduction. Specify only one index at a time. Default is NULL.
#' @param ... Any other arguments to... | /R/summary.gagam.R | no_license | markcus1/gagam | R | false | false | 890 | r | #' @title Summarize GAGAM
#'
#' @description Summary method for \code{gagam} objects.
#'
#' @param object Fitted \code{gagam} object
#' @param reduc If you wish to summarize one of the reduced models, specify the index of reduction. Specify only one index at a time. Default is NULL.
#' @param ... Any other arguments to... |
#' Ad Exchange Buyer API II Objects
#' Accesses the latest features for managing Ad Exchange accounts and Real-Time Bidding configurations and auction metrics.
#'
#' Auto-generated code by googleAuthR::gar_create_api_objects
#' at 2016-09-03 22:31:13
#' filename: /Users/mark/dev/R/autoGoogleAPI/googleadexchangebuyer... | /googleadexchangebuyer2v2beta1.auto/R/adexchangebuyer2_objects.R | permissive | Phippsy/autoGoogleAPI | R | false | false | 5,560 | r | #' Ad Exchange Buyer API II Objects
#' Accesses the latest features for managing Ad Exchange accounts and Real-Time Bidding configurations and auction metrics.
#'
#' Auto-generated code by googleAuthR::gar_create_api_objects
#' at 2016-09-03 22:31:13
#' filename: /Users/mark/dev/R/autoGoogleAPI/googleadexchangebuyer... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LobsterMap.r
\name{LobsterMap}
\alias{LobsterMap}
\title{LobsterMap}
\usage{
LobsterMap(area = "custom", ylim = c(40, 52), xlim = c(-74, -47),
save = F, output = "bio.lobster", fname = "one.pdf", mapRes = "HR",
land.col = "wheat", title =... | /man/LobsterMap.Rd | no_license | gomezcatalina/bio.lobster | R | false | true | 2,989 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LobsterMap.r
\name{LobsterMap}
\alias{LobsterMap}
\title{LobsterMap}
\usage{
LobsterMap(area = "custom", ylim = c(40, 52), xlim = c(-74, -47),
save = F, output = "bio.lobster", fname = "one.pdf", mapRes = "HR",
land.col = "wheat", title =... |
### this one for MLMSUPER
setwd("/Users/yonglizhao/Documents/R-corde for miscanthus project/Miscanthus")
myYSRD <- read.csv("data/myYimputedSNP19SRD.csv")
myYOWA <- read.csv("data/myYimputedSNP19OWA2.csv")
myY1 <- read.csv("data/myYimputedSNP19.csv")
myY1 <- myY1[,-c(2,18)]
myY <- Reduce(function(x, y) merge(x, y, all... | /Rcodes/11-2 PVE.FarmCPUNOCV.R | no_license | yzhao4651/Dissertation- | R | false | false | 23,645 | r | ### this one for MLMSUPER
setwd("/Users/yonglizhao/Documents/R-corde for miscanthus project/Miscanthus")
myYSRD <- read.csv("data/myYimputedSNP19SRD.csv")
myYOWA <- read.csv("data/myYimputedSNP19OWA2.csv")
myY1 <- read.csv("data/myYimputedSNP19.csv")
myY1 <- myY1[,-c(2,18)]
myY <- Reduce(function(x, y) merge(x, y, all... |
testlist <- list(type = 1L, z = 6.98350748929955e-251)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609889185-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 108 | r | testlist <- list(type = 1L, z = 6.98350748929955e-251)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sweave_report_biomarker.R
\name{ROCPredSamplesTable}
\alias{ROCPredSamplesTable}
\title{Create a table of newly classified samples}
\usage{
ROCPredSamplesTable(mSetObj = NA)
}
\arguments{
\item{mSetObj}{Input the name of the created mSetObj (... | /man/ROCPredSamplesTable.Rd | permissive | xia-lab/MetaboAnalystR | R | false | true | 474 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sweave_report_biomarker.R
\name{ROCPredSamplesTable}
\alias{ROCPredSamplesTable}
\title{Create a table of newly classified samples}
\usage{
ROCPredSamplesTable(mSetObj = NA)
}
\arguments{
\item{mSetObj}{Input the name of the created mSetObj (... |
###SESSION 1: Hello, R! Data exploration!
#install packages: only need to *install* a package once, but then must load it with each new R session
install.packages("data.table")
#load your package:
library(data.table)
###SESSION 1: Functions! Aggregation!
#clear your workspace
rm(list=ls())
#read in your data from ... | /Rtraining.R | no_license | jumorris2017/R-code-flatfiles | R | false | false | 2,622 | r | ###SESSION 1: Hello, R! Data exploration!
#install packages: only need to *install* a package once, but then must load it with each new R session
install.packages("data.table")
#load your package:
library(data.table)
###SESSION 1: Functions! Aggregation!
#clear your workspace
rm(list=ls())
#read in your data from ... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/MsScanList.R
\docType{methods}
\name{peaks,MsScanList-method}
\alias{peaks,MsScanList-method}
\title{Get peaks intersecting with scan}
\usage{
\S4method{peaks}{MsScanList}(object, parent = FALSE, ...)
}
\description{
Get peaks interse... | /man/peaks-MsScanList-method.Rd | no_license | thomasp85/MSsary | R | false | false | 339 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/MsScanList.R
\docType{methods}
\name{peaks,MsScanList-method}
\alias{peaks,MsScanList-method}
\title{Get peaks intersecting with scan}
\usage{
\S4method{peaks}{MsScanList}(object, parent = FALSE, ...)
}
\description{
Get peaks interse... |
#library(foreach)
library(doParallel)
library(R.matlab)
registerDoParallel(cores=24)
data<-readMat("expression_ZXYA_200000_Z->X->Y.mat")
expression<-data$expression
n <- dim(expression)[1]
T <- dim(expression)[2]
for (p in 1:9)
{
library(vars)
var <- VAR(
grangertest()
filename <- paste("PGC_... | /gene-dynamical-simulations/ZactXactY_R/PGC/PGCrun.R | no_license | lujonathanh/VAR-GEN | R | false | false | 373 | r | #library(foreach)
library(doParallel)
library(R.matlab)
registerDoParallel(cores=24)
data<-readMat("expression_ZXYA_200000_Z->X->Y.mat")
expression<-data$expression
n <- dim(expression)[1]
T <- dim(expression)[2]
for (p in 1:9)
{
library(vars)
var <- VAR(
grangertest()
filename <- paste("PGC_... |
# Read peer data and produce network diagrams for default institution
# Default institution = University of Notre Dame, unitid = 158080
rm(list=ls())
# Load needed libraries
library(tidyverse)
library(odbc)
library(igraph)
# set this for reproducibility of results
set.seed(1001)
# Open a connection
con <- dbConnect... | /scripts/read-data.R | permissive | jasonpcasey/ipeds-peers | R | false | false | 3,510 | r | # Read peer data and produce network diagrams for default institution
# Default institution = University of Notre Dame, unitid = 158080
rm(list=ls())
# Load needed libraries
library(tidyverse)
library(odbc)
library(igraph)
# set this for reproducibility of results
set.seed(1001)
# Open a connection
con <- dbConnect... |
setMethod("get.asGRisk.fct", signature(Risk = "asL1"),
function(Risk){return( function(r,s,b){
rb <- r*b; w <- rb/s;
rb*(2*pnorm(w)-1)+2*s*dnorm(w)})})
setMethod("get.asGRisk.fct", signature(Risk = "asMSE"),
function(Risk){ return(function(r,s,b){
rb ... | /R/getAsGRiskfct.R | no_license | cran/ROptEst | R | false | false | 504 | r |
setMethod("get.asGRisk.fct", signature(Risk = "asL1"),
function(Risk){return( function(r,s,b){
rb <- r*b; w <- rb/s;
rb*(2*pnorm(w)-1)+2*s*dnorm(w)})})
setMethod("get.asGRisk.fct", signature(Risk = "asMSE"),
function(Risk){ return(function(r,s,b){
rb ... |
##
# Run through groupby methods with different column types
##
test <- function(conn) {
Log.info("Upload prostate dataset into H2O...")
df.hex <- h2o.uploadFile(locate("smalldata/prostate/prostate.csv"))
Log.info("Import airlines dataset into R...")
df.R <- read.csv(locate("smalldata/prostate/prostate.csv")... | /h2o-r/tests/testdir_misc/runit_groupby.R | permissive | StephRoark/h2o-3 | R | false | false | 1,851 | r | ##
# Run through groupby methods with different column types
##
test <- function(conn) {
Log.info("Upload prostate dataset into H2O...")
df.hex <- h2o.uploadFile(locate("smalldata/prostate/prostate.csv"))
Log.info("Import airlines dataset into R...")
df.R <- read.csv(locate("smalldata/prostate/prostate.csv")... |
### Weighted repeated median smoothing
# It is the same algorithm of "wrm.smooth()" in robfilter pacakges.
# For fast computation, transform the R code to C++.
# The parameters of a function are the same with "wrm.smooth()" except on "kernel".
# "kernel" option is provided "gauss" and "epanechnikov" only.
wrm_smoo... | /Partial_obs/old_code/20211209 이전/R/old/WRMcpp.R | permissive | statKim/FDA-Lab | R | false | false | 2,926 | r | ### Weighted repeated median smoothing
# It is the same algorithm of "wrm.smooth()" in robfilter pacakges.
# For fast computation, transform the R code to C++.
# The parameters of a function are the same with "wrm.smooth()" except on "kernel".
# "kernel" option is provided "gauss" and "epanechnikov" only.
wrm_smoo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_model_par.R
\name{add_model_par}
\alias{add_model_par}
\title{A helper function that adds a paramter to the shiny UI elements of the build tab}
\usage{
add_model_par(values, output)
}
\arguments{
\item{values}{a shiny variable keeping tra... | /man/add_model_par.Rd | no_license | ahgroup/modelbuilder | R | false | true | 733 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_model_par.R
\name{add_model_par}
\alias{add_model_par}
\title{A helper function that adds a paramter to the shiny UI elements of the build tab}
\usage{
add_model_par(values, output)
}
\arguments{
\item{values}{a shiny variable keeping tra... |
library(shiny)
library(ggplot2)
library(caret)
library(dplyr)
suppressPackageStartupMessages(library(googleVis))
shinyServer(function(input, output) {
fit<-lm(Profit~ Location + Fruit + Year,data= Fruits)
output$predictFruitProfit <- renderText({
suppressWarnings(paste("The predicted value of the profit ... | /server.R | no_license | ahsanijaz/DataProductsAssignment | R | false | false | 823 | r | library(shiny)
library(ggplot2)
library(caret)
library(dplyr)
suppressPackageStartupMessages(library(googleVis))
shinyServer(function(input, output) {
fit<-lm(Profit~ Location + Fruit + Year,data= Fruits)
output$predictFruitProfit <- renderText({
suppressWarnings(paste("The predicted value of the profit ... |
#install.packages("psych")
library(psych)
#install.packages("lattice")
library(lattice)
library(mfx)
load("OJ-Data.RData")
describe(oj_DF)
tot_revenue_MM_64 = sum(oj_DF$p_MM64*oj_DF$q_MM64)
tot_revenue_MM_96 = sum(oj_DF$p_MM96*oj_DF$q_MM96)
tot_revenue_PL_64 = sum(oj_DF$p_PL64*oj_DF$q_PL64)
total_revenue = tot_rev... | /Orange Juice.R | no_license | Seanlin12345/Data-Driven-Marketing | R | false | false | 10,023 | r | #install.packages("psych")
library(psych)
#install.packages("lattice")
library(lattice)
library(mfx)
load("OJ-Data.RData")
describe(oj_DF)
tot_revenue_MM_64 = sum(oj_DF$p_MM64*oj_DF$q_MM64)
tot_revenue_MM_96 = sum(oj_DF$p_MM96*oj_DF$q_MM96)
tot_revenue_PL_64 = sum(oj_DF$p_PL64*oj_DF$q_PL64)
total_revenue = tot_rev... |
library(poio)
### Name: summary.po
### Title: Summarize a PO object
### Aliases: summary.po
### ** Examples
pot_file <- system.file("extdata/R-summerof69.pot", package = "poio")
summary(pot <- read_po(pot_file))
| /data/genthat_extracted_code/poio/examples/summary.po.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 219 | r | library(poio)
### Name: summary.po
### Title: Summarize a PO object
### Aliases: summary.po
### ** Examples
pot_file <- system.file("extdata/R-summerof69.pot", package = "poio")
summary(pot <- read_po(pot_file))
|
library(shiny)
library(plotly)
# Fetch the data object from the web.
if(!file.exists('DataGalleryMetal.rda')) {
Url <- 'https://github.com/imreyes/datasciencecoursera/raw/master/DevelopingDataProduct/Week4_ProgrammingAssignment/DataGalleryGasMetal.rda'
download.file(Url, destfile = 'DataGalleryGasMetal... | /DevelopingDataProduct/Week4_ProgrammingAssignment/GasMetalPollution/server.R | no_license | imreyes/datasciencecoursera | R | false | false | 2,150 | r | library(shiny)
library(plotly)
# Fetch the data object from the web.
if(!file.exists('DataGalleryMetal.rda')) {
Url <- 'https://github.com/imreyes/datasciencecoursera/raw/master/DevelopingDataProduct/Week4_ProgrammingAssignment/DataGalleryGasMetal.rda'
download.file(Url, destfile = 'DataGalleryGasMetal... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{pfi_eus}
\alias{pfi_eus}
\title{Unique identifiers of the experimental units and blocks}
\format{A data frame with 56 rows and 7 variables:
\describe{
\item{site_name}{Boyd, Stout, Funcke; name of the physical site... | /man/pfi_eus.Rd | permissive | vanichols/PFIweeds2020 | R | false | true | 880 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{pfi_eus}
\alias{pfi_eus}
\title{Unique identifiers of the experimental units and blocks}
\format{A data frame with 56 rows and 7 variables:
\describe{
\item{site_name}{Boyd, Stout, Funcke; name of the physical site... |
#--------------------------------Loading Data----------------------------------------#
fileName = "HSID.csv"
defaultDataDir = "/Users/kyle/Documents/Economics Extended Essay/Data/HSI/"
fileLocation = file.path(defaultDataDir, fileName)
hsi = read.csv(fileLocation, header = T)
dim(hsi)
#-----------------------------Loa... | /sandbox/ARIMA 1.R | no_license | Kyle-J-Sun/UOB_Economic_Extended_Essay | R | false | false | 6,665 | r | #--------------------------------Loading Data----------------------------------------#
fileName = "HSID.csv"
defaultDataDir = "/Users/kyle/Documents/Economics Extended Essay/Data/HSI/"
fileLocation = file.path(defaultDataDir, fileName)
hsi = read.csv(fileLocation, header = T)
dim(hsi)
#-----------------------------Loa... |
#' @include generics.R
NULL
#' Outcomes class
#'
#' Class representation for prediction outcomes. `Outcomes` objects are created
#' by \code{\link{sb_assess}}. They hold information about the outcomes (true
#' positive, false positive, false negative) of Stickleback predictions. You
#' shouldn't create `Outcomes` obje... | /R/Outcomes.R | permissive | FlukeAndFeather/rstickleback | R | false | false | 1,594 | r | #' @include generics.R
NULL
#' Outcomes class
#'
#' Class representation for prediction outcomes. `Outcomes` objects are created
#' by \code{\link{sb_assess}}. They hold information about the outcomes (true
#' positive, false positive, false negative) of Stickleback predictions. You
#' shouldn't create `Outcomes` obje... |
% $ID$
\name{npplreg}
\alias{npplreg}
\alias{npplreg.call}
\alias{npplreg.formula}
\alias{npplreg.plbandwidth}
\title{Partially Linear Kernel Regression with Mixed Data Types}
\description{
\code{npplreg} computes a partially linear kernel regression estimate
of a one (1) dimensional dependent variable on \eqn{p+... | /man/np.plregression.Rd | no_license | cran/npRmpi | R | false | false | 11,002 | rd | % $ID$
\name{npplreg}
\alias{npplreg}
\alias{npplreg.call}
\alias{npplreg.formula}
\alias{npplreg.plbandwidth}
\title{Partially Linear Kernel Regression with Mixed Data Types}
\description{
\code{npplreg} computes a partially linear kernel regression estimate
of a one (1) dimensional dependent variable on \eqn{p+... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mvpa_iterate.R
\name{manova_iterate}
\alias{manova_iterate}
\title{manova_iterate}
\usage{
manova_iterate(mod_spec, vox_list, ids = 1:length(vox_list), permute = FALSE)
}
\arguments{
\item{mod_spec}{a class of type \code{mvpa_model}}
\item{v... | /man/manova_iterate.Rd | no_license | Nian-Jingqing/rMVPA | R | false | true | 500 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mvpa_iterate.R
\name{manova_iterate}
\alias{manova_iterate}
\title{manova_iterate}
\usage{
manova_iterate(mod_spec, vox_list, ids = 1:length(vox_list), permute = FALSE)
}
\arguments{
\item{mod_spec}{a class of type \code{mvpa_model}}
\item{v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Attacks.R
\docType{data}
\name{Attacks}
\alias{Attacks}
\title{Data collected the day after the terrorist attacks in Brussels (on the morning of 22 March 2016) assessing the Sense of Coherence,
anxiety and depression symptoms of 2077 su... | /man/Attacks.Rd | no_license | cran/Routliers | R | false | true | 4,585 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Attacks.R
\docType{data}
\name{Attacks}
\alias{Attacks}
\title{Data collected the day after the terrorist attacks in Brussels (on the morning of 22 March 2016) assessing the Sense of Coherence,
anxiety and depression symptoms of 2077 su... |
# This function creates a line graph that shows average experiences based on operating systems.
# Using this graph we can compare which OS users tend to have more experience in a particular tool.
# According to the data, the Mac users tend to have slightly more experience in
# Programming, Command Line, and Markdown; h... | /scripts/chart2.R | no_license | kylegoodwin/a7-collaborative-coding | R | false | false | 3,565 | r | # This function creates a line graph that shows average experiences based on operating systems.
# Using this graph we can compare which OS users tend to have more experience in a particular tool.
# According to the data, the Mac users tend to have slightly more experience in
# Programming, Command Line, and Markdown; h... |
library(recommenderlab)
library(reshape)
library(ggplot2)
interaction=rating
summary(interaction)
interaction=na.omit(interaction)
vector_rating <- as.vector(interaction$Decision)
table_rating <- table(vector_rating)
vector_rating <- vector_rating[vector_rating!=0]
vector_rating <- factor(vector_rating)
qplot(vector... | /recsys.R | no_license | Hazel-Li/Graduate-School-Recommendation-System | R | false | false | 2,708 | r | library(recommenderlab)
library(reshape)
library(ggplot2)
interaction=rating
summary(interaction)
interaction=na.omit(interaction)
vector_rating <- as.vector(interaction$Decision)
table_rating <- table(vector_rating)
vector_rating <- vector_rating[vector_rating!=0]
vector_rating <- factor(vector_rating)
qplot(vector... |
library(clusterProfiler)
rgsvp2 <- read.csv("C:\\Users\\ChangQing\\Desktop\\GO富集分析\\RGSVP2-WT.csv", header = T)
up_genes <- read.table("C:\\Users\\ChangQing\\Desktop\\GO富集分析\\Up_genes.txt",header = F)
up_genes <- as.character(up_genes$V1)
down_genes <- read.table("C:\\Users\\ChangQing\\Desktop\\GO富集分析\\Down_genes.txt"... | /GO_dotplot.R | no_license | changQing111/Rice_GO_enrichment_analysis | R | false | false | 3,223 | r | library(clusterProfiler)
rgsvp2 <- read.csv("C:\\Users\\ChangQing\\Desktop\\GO富集分析\\RGSVP2-WT.csv", header = T)
up_genes <- read.table("C:\\Users\\ChangQing\\Desktop\\GO富集分析\\Up_genes.txt",header = F)
up_genes <- as.character(up_genes$V1)
down_genes <- read.table("C:\\Users\\ChangQing\\Desktop\\GO富集分析\\Down_genes.txt"... |
require("shiny")
require("reshape")
require("ggplot2")
require("plotly")
#1. use require instead of library
#2. four functions: name.tabPanel
# name.siderbarPanel
# name.prepareData
# name.preparePlot
#3. profile to pass parameters for specific data
#4. function fi... | /sigBoxs.r | permissive | chiajungchang/cfsgroup | R | false | false | 3,242 | r | require("shiny")
require("reshape")
require("ggplot2")
require("plotly")
#1. use require instead of library
#2. four functions: name.tabPanel
# name.siderbarPanel
# name.prepareData
# name.preparePlot
#3. profile to pass parameters for specific data
#4. function fi... |
library(edgeR)
dictionary = "/Users/jiaminsun/expsjm/single cell/neuron3/aNSC_NPC"
setwd(dictionary)
data = read.table("expression_count_aNSC_NPC.txt")
GBMp = grep("aNSC",colnames(data))
GBMe = grep("NPC",colnames(data))
group = c(rep("aNSC",length(GBMp)),rep("NPC",length(GBMe)))
#构建DGEList对象
dge <- DGEList(
count... | /src/preprocess/2.differential_expression_by_edgeR.r | no_license | jiangx-shu/CKDS | R | false | false | 1,378 | r | library(edgeR)
dictionary = "/Users/jiaminsun/expsjm/single cell/neuron3/aNSC_NPC"
setwd(dictionary)
data = read.table("expression_count_aNSC_NPC.txt")
GBMp = grep("aNSC",colnames(data))
GBMe = grep("NPC",colnames(data))
group = c(rep("aNSC",length(GBMp)),rep("NPC",length(GBMe)))
#构建DGEList对象
dge <- DGEList(
count... |
context("earth")
test_that("parsnip + earth + axe_() works", {
skip_on_cran()
skip_if_not_installed("parsnip")
skip_if_not_installed("earth")
# Load
library(parsnip)
library(earth)
# Fit
earth_fit <- mars(mode = "regression") %>%
set_engine("earth") %>%
fit(Volume ~ ., data = trees)
# Butcher... | /tests/testthat/test-earth.R | permissive | kevinykuo/butcher | R | false | false | 1,577 | r | context("earth")
test_that("parsnip + earth + axe_() works", {
skip_on_cran()
skip_if_not_installed("parsnip")
skip_if_not_installed("earth")
# Load
library(parsnip)
library(earth)
# Fit
earth_fit <- mars(mode = "regression") %>%
set_engine("earth") %>%
fit(Volume ~ ., data = trees)
# Butcher... |
require(shiny)
library(xlsx)
source("schedule_alg_function.R")
ui = fluidPage(
titlePanel("DSST Student Scheduler - Prototype v0.1"),
tags$head(tags$style(
HTML(
"
.errortext {
font-size: 1em;
color: red;
padding-top: 1em;
padding-bottom: 1em;
}
"
)
))... | /app.R | permissive | jrstevenson3/dsst_scheduler_app | R | false | false | 7,672 | r | require(shiny)
library(xlsx)
source("schedule_alg_function.R")
ui = fluidPage(
titlePanel("DSST Student Scheduler - Prototype v0.1"),
tags$head(tags$style(
HTML(
"
.errortext {
font-size: 1em;
color: red;
padding-top: 1em;
padding-bottom: 1em;
}
"
)
))... |
library(GeneralizedHyperbolic)
#smallShape
for (delta in c(0, 0.5, 1)) {
for (alpha in c(0, 0.5, 1)) {
for (beta in c(0, 0.5, 1)) {
for (lambda in c(-1, -0.5, 0, 0.5, 1, 1.5)) {
ghypTestOutput <- ghypCheckPars(c(0, delta, alpha, beta, lambda))
chi <- delta^2
psi <- alpha^2 - beta^2
... | /regressionTests/dataGeneration.R | no_license | sjp/GeneralizedHyperbolic | R | false | false | 3,839 | r | library(GeneralizedHyperbolic)
#smallShape
for (delta in c(0, 0.5, 1)) {
for (alpha in c(0, 0.5, 1)) {
for (beta in c(0, 0.5, 1)) {
for (lambda in c(-1, -0.5, 0, 0.5, 1, 1.5)) {
ghypTestOutput <- ghypCheckPars(c(0, delta, alpha, beta, lambda))
chi <- delta^2
psi <- alpha^2 - beta^2
... |
#' GPS to LV95
#'
#' Transforms GPS coordinates to Swiss LV95 coordinates, such that they can be used with the BFS maps.
#'
#' @param long Longitude, in degrees.
#' @param lat Latitude, in degrees.
#'
#' @return Named list with \code{long} and \code{lat}.
#' @export
#' @author Tino Good, \email{onit.good+suistats@gmail... | /R/gps_to_lv95.R | no_license | tinino/suistats | R | false | false | 938 | r | #' GPS to LV95
#'
#' Transforms GPS coordinates to Swiss LV95 coordinates, such that they can be used with the BFS maps.
#'
#' @param long Longitude, in degrees.
#' @param lat Latitude, in degrees.
#'
#' @return Named list with \code{long} and \code{lat}.
#' @export
#' @author Tino Good, \email{onit.good+suistats@gmail... |
a9e45144242b8c340870685348c13a84 biu.mv.xl_ao.bb-b003-p020-MIF02-c01.blif-biu.inv.prop.bb-bmc.conf01.01X-QBF.BB1-Zi.BB2-01X.BB3-01X.with-IOC.unfold-004.qdimacs 6238 11044 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Herbstritt/blackbox-01X-QBF/biu.mv.xl_ao.bb-b003-p020-MIF02-c01.blif-biu.inv.prop.bb-bmc.conf01.01X-QBF.BB1-Zi.BB2-01X.BB3-01X.with-IOC.unfold-004/biu.mv.xl_ao.bb-b003-p020-MIF02-c01.blif-biu.inv.prop.bb-bmc.conf01.01X-QBF.BB1-Zi.BB2-01X.BB3-01X.with-IOC.unfold... | no_license | arey0pushpa/dcnf-autarky | R | false | false | 170 | r | a9e45144242b8c340870685348c13a84 biu.mv.xl_ao.bb-b003-p020-MIF02-c01.blif-biu.inv.prop.bb-bmc.conf01.01X-QBF.BB1-Zi.BB2-01X.BB3-01X.with-IOC.unfold-004.qdimacs 6238 11044 |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.69759663350838e-312, 1.50066211564651e+225, 9.82723429475327e-281, 2.16452904073932e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(3L, 8L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
s... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615773118-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 330 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.69759663350838e-312, 1.50066211564651e+225, 9.82723429475327e-281, 2.16452904073932e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(3L, 8L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/QinJ_2012.R
\name{QinJ_2012}
\alias{QinJ_2012}
\alias{QinJ_2012.genefamilies_relab.stool}
\alias{QinJ_2012.marker_abundance.stool}
\alias{QinJ_2012.marker_presence.stool}
\alias{QinJ_2012.metaphlan_bugs_list.stool}
\alias{QinJ_2012.pathabunda... | /man/QinJ_2012.Rd | permissive | Liuyangying/curatedMetagenomicData | R | false | true | 2,094 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/QinJ_2012.R
\name{QinJ_2012}
\alias{QinJ_2012}
\alias{QinJ_2012.genefamilies_relab.stool}
\alias{QinJ_2012.marker_abundance.stool}
\alias{QinJ_2012.marker_presence.stool}
\alias{QinJ_2012.metaphlan_bugs_list.stool}
\alias{QinJ_2012.pathabunda... |
unzip(zipfile="activity.zip")
data <- read.csv("activity.csv")
library(ggplot2)
total.steps <- tapply(data$steps, data$date, FUN=sum, na.rm=TRUE)
qplot(total.steps, binwidth=1000, xlab="total number of steps taken each day")
mean(total.steps, na.rm=TRUE)
median(total.steps, na.rm=TRUE)
library(ggplot2)... | /PA1_template.R | no_license | Vaishnavi0621/RepData_PeerAssessment1 | R | false | false | 1,877 | r | unzip(zipfile="activity.zip")
data <- read.csv("activity.csv")
library(ggplot2)
total.steps <- tapply(data$steps, data$date, FUN=sum, na.rm=TRUE)
qplot(total.steps, binwidth=1000, xlab="total number of steps taken each day")
mean(total.steps, na.rm=TRUE)
median(total.steps, na.rm=TRUE)
library(ggplot2)... |
% Auto-generated: do not edit by hand
\name{htmlWbr}
\alias{htmlWbr}
\title{Wbr component}
\description{
Wbr is a wrapper for the <wbr> HTML5 element. For detailed attribute info see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr
}
\usage{
htmlWbr(children=NULL, id=NULL, accessKey=NULL, className=NU... | /man/htmlWbr.Rd | permissive | Kri1919/dash-html-components | R | false | false | 3,571 | rd | % Auto-generated: do not edit by hand
\name{htmlWbr}
\alias{htmlWbr}
\title{Wbr component}
\description{
Wbr is a wrapper for the <wbr> HTML5 element. For detailed attribute info see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr
}
\usage{
htmlWbr(children=NULL, id=NULL, accessKey=NULL, className=NU... |
library(dplyr)
rpom.pepsuniq<-select(abacus, contains('NUMPEPSUNIQ'))
rpom.adjnsaf<-select(abacus, contains('ADJNSAF'))
rpom.spc<-select(abacus, contains('NUMSPECSTOT'))
rpom.spc2<-rpom.spc[-1]
#keep only proteins with at least 2 unique peptides
nsaf.uniqpeps<-cbind(rpom.adjnsaf, rpom.pepsuniq$ALL_NUMPEPSUNIQ)
rpo... | /scripts/R/R_preliminary_scripts_Abacus_analysis/for jeremy.R | no_license | Jeremyfishb/Jeremy-coral | R | false | false | 901 | r |
library(dplyr)
rpom.pepsuniq<-select(abacus, contains('NUMPEPSUNIQ'))
rpom.adjnsaf<-select(abacus, contains('ADJNSAF'))
rpom.spc<-select(abacus, contains('NUMSPECSTOT'))
rpom.spc2<-rpom.spc[-1]
#keep only proteins with at least 2 unique peptides
nsaf.uniqpeps<-cbind(rpom.adjnsaf, rpom.pepsuniq$ALL_NUMPEPSUNIQ)
rpo... |
# add class rendo.ivre to regular ivreg object to
# catch when the user calls summary() and forward to ivreg's summary () with diagnostic=TRUE
new_rendo_ivreg <- function(F.formula, res.ivreg, call){
class(res.ivreg) <- c("rendo.ivreg",class(res.ivreg))
res.ivreg$call <- call
return(res.ivreg)
}
| /R/f_new_rendoivreg.R | no_license | mmeierer/REndo | R | false | false | 316 | r | # add class rendo.ivre to regular ivreg object to
# catch when the user calls summary() and forward to ivreg's summary () with diagnostic=TRUE
new_rendo_ivreg <- function(F.formula, res.ivreg, call){
class(res.ivreg) <- c("rendo.ivreg",class(res.ivreg))
res.ivreg$call <- call
return(res.ivreg)
}
|
cubist2X <- function(cubistModel , dataFit , zFit = NULL , profIDFit = NULL , allKnotsd = c() , removeColinCols = TRUE , refineCubistModel = FALSE){
### removeColinCols and refineCubistModel are used in the cubist2XSetup function.
if(length(allKnotsd) == 0){
incdSpline <- FALSE
}else if(length(... | /cubist2XIAK3D.R | no_license | hlydecker/iak3d | R | false | false | 46,257 | r | cubist2X <- function(cubistModel , dataFit , zFit = NULL , profIDFit = NULL , allKnotsd = c() , removeColinCols = TRUE , refineCubistModel = FALSE){
### removeColinCols and refineCubistModel are used in the cubist2XSetup function.
if(length(allKnotsd) == 0){
incdSpline <- FALSE
}else if(length(... |
## code to prepare `aklweather` dataset goes here
library(tidyverse)
library(lubridate)
# Read stations data
stations <- read_table("data/ghcnd/ghcnd-stations.txt",
col_names = c("id", "lat", "lon"))
library(ggmap)
akl_box <- c(left = 174.69, bottom = -37.09, right = 174.94, top = -36.60)
akl_map <- get_map(akl_box)... | /lectures/data-raw/aklweather.R | no_license | earowang/stats220 | R | false | false | 995 | r | ## code to prepare `aklweather` dataset goes here
library(tidyverse)
library(lubridate)
# Read stations data
stations <- read_table("data/ghcnd/ghcnd-stations.txt",
col_names = c("id", "lat", "lon"))
library(ggmap)
akl_box <- c(left = 174.69, bottom = -37.09, right = 174.94, top = -36.60)
akl_map <- get_map(akl_box)... |
# @file MLP.R
#
# Copyright 2020 Observational Health Data Sciences and Informatics
#
# This file is part of PatientLevelPrediction
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... | /R/MLP.R | permissive | hxia/plp-git-demo | R | false | false | 9,848 | r | # @file MLP.R
#
# Copyright 2020 Observational Health Data Sciences and Informatics
#
# This file is part of PatientLevelPrediction
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# htt... |
options(echo=TRUE) # if you want see commands in output file
args <- commandArgs(trailingOnly = TRUE)
library(DESeq2)
path<-dirname(args[1])
ref<-read.table(args[1],header=T,sep="\t")
ns<-ncol(ref)
counts<-ref[,7:ns]
ns<-ns-7+1
counts<-counts[apply(counts,1,sum)>ns,]
fakeconditions<-c(rep(0,round((ns-1)/2)),rep(1,roun... | /R/normalization.R | no_license | lpantano/IdeGen | R | false | false | 595 | r | options(echo=TRUE) # if you want see commands in output file
args <- commandArgs(trailingOnly = TRUE)
library(DESeq2)
path<-dirname(args[1])
ref<-read.table(args[1],header=T,sep="\t")
ns<-ncol(ref)
counts<-ref[,7:ns]
ns<-ns-7+1
counts<-counts[apply(counts,1,sum)>ns,]
fakeconditions<-c(rep(0,round((ns-1)/2)),rep(1,roun... |
################################################################################
.onLoad <- function(libname, pkgname) {
pkg.opt <- list(
bigstatsr.cluster.type = "PSOCK",
bigstatsr.check.args = TRUE,
bigstatsr.block.sizeGB = 1,
bigstatsr.downcast.warning = TRUE
)
toset <- !(names... | /R/zzz.R | no_license | MarceloRTonon/bigstatsr | R | false | false | 478 | r | ################################################################################
.onLoad <- function(libname, pkgname) {
pkg.opt <- list(
bigstatsr.cluster.type = "PSOCK",
bigstatsr.check.args = TRUE,
bigstatsr.block.sizeGB = 1,
bigstatsr.downcast.warning = TRUE
)
toset <- !(names... |
# Implied model for precision. Requires appropriate model matrices:
implied_var1 <- function(model,all = FALSE){
if (model@cpp){
x <- formModelMatrices_cpp(model)
} else {
x <- formModelMatrices(model)
}
if (model@cpp){
x <- impliedcovstructures_cpp(x,"zeta",type = model@types$zeta, all = all)
... | /R/16_var1_implied.R | no_license | SachaEpskamp/psychonetrics | R | false | false | 2,270 | r | # Implied model for precision. Requires appropriate model matrices:
implied_var1 <- function(model,all = FALSE){
if (model@cpp){
x <- formModelMatrices_cpp(model)
} else {
x <- formModelMatrices(model)
}
if (model@cpp){
x <- impliedcovstructures_cpp(x,"zeta",type = model@types$zeta, all = all)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lm_lite.R
\name{var.wt}
\alias{var.wt}
\title{Weighted vaiance}
\usage{
var.wt(x, w, na.rm = FALSE)
}
\description{
Weighted vaiance
}
\keyword{internal}
| /man/var.wt.Rd | no_license | YTHsieh/shceof | R | false | true | 232 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lm_lite.R
\name{var.wt}
\alias{var.wt}
\title{Weighted vaiance}
\usage{
var.wt(x, w, na.rm = FALSE)
}
\description{
Weighted vaiance
}
\keyword{internal}
|
# Bring in libraries
library(RJSONIO)
library(data.table)
# Run clarifai
allImages <- list.files("./Zoohackathon2017_SamplePhotos")
allImagesNoSpaces <- gsub("\\s+","",allImages)
AllImages <- data.table(Orig=allImages,New=allImagesNoSpaces)
sapply(1:nrow(AllImages), function(x) system(paste0("cp ./Zoohackathon2017_Sa... | /Clarifai_Process.R | no_license | heineperson/ZooHackCleaned | R | false | false | 1,590 | r |
# Bring in libraries
library(RJSONIO)
library(data.table)
# Run clarifai
allImages <- list.files("./Zoohackathon2017_SamplePhotos")
allImagesNoSpaces <- gsub("\\s+","",allImages)
AllImages <- data.table(Orig=allImages,New=allImagesNoSpaces)
sapply(1:nrow(AllImages), function(x) system(paste0("cp ./Zoohackathon2017_Sa... |
## Load library dplyr.
library(dplyr)
## Read the subset of data only contains 2007-02-01 and 2007-02-02, then give the subset of data variable names.
file <- "household_power_consumption.txt"
datasub <- read.table(text = grep("^[1,2]/2/2007", readLines(file), value = TRUE), sep = ";", na.strings = "?")
colnames(datas... | /plot3.R | no_license | RurunWang/ExData_Plotting1 | R | false | false | 1,138 | r | ## Load library dplyr.
library(dplyr)
## Read the subset of data only contains 2007-02-01 and 2007-02-02, then give the subset of data variable names.
file <- "household_power_consumption.txt"
datasub <- read.table(text = grep("^[1,2]/2/2007", readLines(file), value = TRUE), sep = ";", na.strings = "?")
colnames(datas... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{measure_sgrna_stats}
\alias{measure_sgrna_stats}
\title{A function to perform a statistical test at a sgRNA-level}
\usage{
measure_sgrna_stats(
sgcount,
design,
group_a,
group_b,
delim = "_",
ge_id = NULL,
sg_id ... | /fuzzedpackages/CB2/man/measure_sgrna_stats.Rd | no_license | akhikolla/testpackages | R | false | true | 2,343 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{measure_sgrna_stats}
\alias{measure_sgrna_stats}
\title{A function to perform a statistical test at a sgRNA-level}
\usage{
measure_sgrna_stats(
sgcount,
design,
group_a,
group_b,
delim = "_",
ge_id = NULL,
sg_id ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.