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 |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SimulateTransitService.R
\docType{data}
\name{D4cModels_ls}
\alias{D4cModels_ls}
\title{D4c simulation models}
\format{a list containing 3 components
\describe{
\item{NormD4_PtQt}{matrix of normalized D4c values by place type and quantile}... | /sources/modules/VESimTransportSupply/man/D4cModels_ls.Rd | permissive | rickdonnelly/VisionEval-Dev | R | false | true | 806 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SimulateTransitService.R
\docType{data}
\name{D4cModels_ls}
\alias{D4cModels_ls}
\title{D4c simulation models}
\format{a list containing 3 components
\describe{
\item{NormD4_PtQt}{matrix of normalized D4c values by place type and quantile}... |
/Zajecia_2018_02_26/wprowadzenie_do_R.R | no_license | AdamWrobel/AGH-2018 | R | false | false | 5,063 | r | ||
pdf(file="fortinlemieux.pdf",family="Times",paper="USr",width=0,height=0)
library(dplyr)
library(ggplot2)
library(reshape2)
library(car)
library(haven)
options(scipen=10000)
options(digits=4)
rm(list=ls())
cpi79 <- 72.6
cpi88 <- 118.3
mw79 <- 2.90 * cpi79/cpi79
mw88 <- 3.35 * cpi79/cpi88
morg88 <- read_dta(f... | /lab-04-visualization/fortinlemieux.R | no_license | michaelaoash/git-econ753 | R | false | false | 1,710 | r | pdf(file="fortinlemieux.pdf",family="Times",paper="USr",width=0,height=0)
library(dplyr)
library(ggplot2)
library(reshape2)
library(car)
library(haven)
options(scipen=10000)
options(digits=4)
rm(list=ls())
cpi79 <- 72.6
cpi88 <- 118.3
mw79 <- 2.90 * cpi79/cpi79
mw88 <- 3.35 * cpi79/cpi88
morg88 <- read_dta(f... |
#' Global variables and functions
#'
#' @importFrom utils globalVariables
#'
#' @description Creates global variables for package
utils::globalVariables(c('%>%', ':=', 'AGEGRP', 'COUNTY', 'CTYNAME', 'STATE', 'STNAME', 'SUMLEV', 'TOT_MALE', 'TOT_POP',
'YEAR', 'acs_data', 'city', 'city_to_county... | /R/globals.R | no_license | jacob-light/jobsec | R | false | false | 644 | r | #' Global variables and functions
#'
#' @importFrom utils globalVariables
#'
#' @description Creates global variables for package
utils::globalVariables(c('%>%', ':=', 'AGEGRP', 'COUNTY', 'CTYNAME', 'STATE', 'STNAME', 'SUMLEV', 'TOT_MALE', 'TOT_POP',
'YEAR', 'acs_data', 'city', 'city_to_county... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{adv}
\alias{adv}
\title{GIS advisory dataset for Hurricane Sandy Adv 18}
\format{An object of class \code{list} of length 4.}
\source{
\url{http://www.nhc.noaa.gov/gis/archive_forecast_results.php?id=al18&year=2012... | /man/adv.Rd | permissive | ElioRoca/rrricanes | R | false | true | 445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{adv}
\alias{adv}
\title{GIS advisory dataset for Hurricane Sandy Adv 18}
\format{An object of class \code{list} of length 4.}
\source{
\url{http://www.nhc.noaa.gov/gis/archive_forecast_results.php?id=al18&year=2012... |
source(here::here("lib", "common.R"))
load_raw <- function(raw_data_dir, n_max) {
d <- load_all_csvs(raw_data_dir, n_max = n_max)
bundle_raw(d$data, d$loading_problems)
}
clean <- function(d, helpers) {
tr_race <- c(
B = "black",
H = "hispanic",
I = "asian/pacific islander",
# NOTE: L correspo... | /lib/states/ri/statewide.R | no_license | stanford-policylab/opp | R | false | false | 4,260 | r | source(here::here("lib", "common.R"))
load_raw <- function(raw_data_dir, n_max) {
d <- load_all_csvs(raw_data_dir, n_max = n_max)
bundle_raw(d$data, d$loading_problems)
}
clean <- function(d, helpers) {
tr_race <- c(
B = "black",
H = "hispanic",
I = "asian/pacific islander",
# NOTE: L correspo... |
#' Draws scatter plot with all effect estimates against AIC
#'
#' \code{all_plot_aic()} generates a scatter plot with all effect estimates against AIC.
#'
#' @export
#' @param data \emph{Object} from \code{all_cox}, \code{all_glm}, \code{all_speedglm}, or \code{all_glm}, including all effect estimate values.
#' @... | /R/all_plot_aic.R | no_license | cran/allestimates | R | false | false | 1,748 | r | #' Draws scatter plot with all effect estimates against AIC
#'
#' \code{all_plot_aic()} generates a scatter plot with all effect estimates against AIC.
#'
#' @export
#' @param data \emph{Object} from \code{all_cox}, \code{all_glm}, \code{all_speedglm}, or \code{all_glm}, including all effect estimate values.
#' @... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load_parameters.R
\name{load_parameters_table}
\alias{load_parameters_table}
\title{Load parameters table}
\usage{
load_parameters_table()
}
\description{
Load the parameters.csv file as a table.
}
| /1 - R Package/man/load_parameters_table.Rd | permissive | abilinski/COVID19 | R | false | true | 276 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load_parameters.R
\name{load_parameters_table}
\alias{load_parameters_table}
\title{Load parameters table}
\usage{
load_parameters_table()
}
\description{
Load the parameters.csv file as a table.
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{tc_bcu}
\alias{tc_bcu}
\title{Cotización Dólar USA Billete}
\format{Un data-frame con cinco variables:
\describe{
\item{\code{Moneda}}{Moneda a cotizar}
\item{\code{Fecha}}{Fecha de cotización}
\item{\code{Venta}}{... | /man/tc_bcu.Rd | no_license | transformauy/tc | R | false | true | 665 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{tc_bcu}
\alias{tc_bcu}
\title{Cotización Dólar USA Billete}
\format{Un data-frame con cinco variables:
\describe{
\item{\code{Moneda}}{Moneda a cotizar}
\item{\code{Fecha}}{Fecha de cotización}
\item{\code{Venta}}{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_stats.R
\name{add_stats}
\alias{add_stats}
\title{Add statistical output to a tidy stats list}
\usage{
add_stats(results, output, identifier = NULL, type = NULL,
confirmatory = NULL, notes = NULL, class = NULL, args = NULL)
}
\arguments... | /man/add_stats.Rd | permissive | ikbentimkramer/tidystats-v0.3 | R | false | true | 3,408 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_stats.R
\name{add_stats}
\alias{add_stats}
\title{Add statistical output to a tidy stats list}
\usage{
add_stats(results, output, identifier = NULL, type = NULL,
confirmatory = NULL, notes = NULL, class = NULL, args = NULL)
}
\arguments... |
add2<-function(x,y){
x+y
} | /My first function in R.R | no_license | PravallikaaMohan/datasciencecoursera | R | false | false | 30 | r | add2<-function(x,y){
x+y
} |
getGaussianVariablesByBoxMuller <- function(u1, u2){
r <- sqrt(-2 * log(u1))
theta <- 2 * pi * u2
c(r * cos(theta), r * sin(theta))
} | /src/fun-getGaussianVariablesByBoxMuller.R | no_license | kkosc/Derivatives-Pricing-Methods | R | false | false | 146 | r | getGaussianVariablesByBoxMuller <- function(u1, u2){
r <- sqrt(-2 * log(u1))
theta <- 2 * pi * u2
c(r * cos(theta), r * sin(theta))
} |
library(randomForest)
library(ggplot2)
library(dplyr)
library(tree)
library(cvTools)
ld_train=read.csv("C:/Users/user/Downloads/housing_train.csv",stringsAsFactors = F)
ld_test= read.csv("C:/Users/user/Downloads/housing_test.csv",stringsAsFactors = F)
ld_test$Price=NA
str(ld_train)
ld_train$data='train'
ld_test$da... | /RealestateDataSet/Real_DecisionTree.R | no_license | Srujana-Gunde/RealEstate_R | R | false | false | 2,144 | r | library(randomForest)
library(ggplot2)
library(dplyr)
library(tree)
library(cvTools)
ld_train=read.csv("C:/Users/user/Downloads/housing_train.csv",stringsAsFactors = F)
ld_test= read.csv("C:/Users/user/Downloads/housing_test.csv",stringsAsFactors = F)
ld_test$Price=NA
str(ld_train)
ld_train$data='train'
ld_test$da... |
library(testthat)
library(I2C2)
suppressWarnings(RNGversion("3.5.0"))
test_check("I2C2")
| /tests/testthat.R | no_license | muschellij2/I2C2 | R | false | false | 90 | r | library(testthat)
library(I2C2)
suppressWarnings(RNGversion("3.5.0"))
test_check("I2C2")
|
library(shiny)
library(ggplot2)
library(reshape2)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
titlePanel("Workout 2"),
fluidRow(
column(3,
wellPanel(
sliderInput("initial",
"Initial Amount",
... | /app.R | no_license | hamza-rana/workout02 | R | false | false | 4,363 | r | library(shiny)
library(ggplot2)
library(reshape2)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
titlePanel("Workout 2"),
fluidRow(
column(3,
wellPanel(
sliderInput("initial",
"Initial Amount",
... |
m <- 3.2
psi <- 1
smallchi <- c(1e-20, 1e-50, 1e-200, .Machine$double.xmin)
regchi <- c(1, 10, 100, 1000)
moments_GIG_raw <- function(m, lambda, chi, psi,
omega=sqrt(chi*psi), eta=sqrt(chi/psi)){
return(besselK(omega,lambda+m,TRUE)/besselK(omega,lambda,TRUE)*eta^m)
}
# DmomentsGIG_Dm <- ... | /tests/testthat/helper.R | permissive | tnitithum/GIGdist | R | false | false | 657 | r | m <- 3.2
psi <- 1
smallchi <- c(1e-20, 1e-50, 1e-200, .Machine$double.xmin)
regchi <- c(1, 10, 100, 1000)
moments_GIG_raw <- function(m, lambda, chi, psi,
omega=sqrt(chi*psi), eta=sqrt(chi/psi)){
return(besselK(omega,lambda+m,TRUE)/besselK(omega,lambda,TRUE)*eta^m)
}
# DmomentsGIG_Dm <- ... |
library(timereg)
### Name: timecox
### Title: Fit Cox model with partly timevarying effects.
### Aliases: timecox
### Keywords: survival
### ** Examples
data(sTRACE)
# Fits time-varying Cox model
out<-timecox(Surv(time/365,status==9)~age+sex+diabetes+chf+vf,
data=sTRACE,max.time=7,n.sim=100)
summary(out)
par(mfr... | /data/genthat_extracted_code/timereg/examples/timecox.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 591 | r | library(timereg)
### Name: timecox
### Title: Fit Cox model with partly timevarying effects.
### Aliases: timecox
### Keywords: survival
### ** Examples
data(sTRACE)
# Fits time-varying Cox model
out<-timecox(Surv(time/365,status==9)~age+sex+diabetes+chf+vf,
data=sTRACE,max.time=7,n.sim=100)
summary(out)
par(mfr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{date_log}
\alias{date_log}
\title{Print current timestamp for logging}
\usage{
date_log()
}
\value{
Current timestamp as character.
}
\description{
Print current timestamp for logging
}
| /man/date_log.Rd | permissive | pdiakumis/dracarys | R | false | true | 278 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{date_log}
\alias{date_log}
\title{Print current timestamp for logging}
\usage{
date_log()
}
\value{
Current timestamp as character.
}
\description{
Print current timestamp for logging
}
|
##
## CREATE TRAINING DATA
##
rm(list = ls())
# Libs
library(stringr)
library(purrr)
library(readr)
library(glue)
library(magrittr)
# CONST
TIMESTEPS <- 30
MAX_TEXT_LEN <- 200000
FILE <- "data/r_scripts_text.txt"
# Save info for training
saveRDS(MAX_TEXT_LEN, "data/max_text_len.rds")
saveRDS(... | /R/create_training_data.R | no_license | tkrabel/rcoder | R | false | false | 2,011 | r | ##
## CREATE TRAINING DATA
##
rm(list = ls())
# Libs
library(stringr)
library(purrr)
library(readr)
library(glue)
library(magrittr)
# CONST
TIMESTEPS <- 30
MAX_TEXT_LEN <- 200000
FILE <- "data/r_scripts_text.txt"
# Save info for training
saveRDS(MAX_TEXT_LEN, "data/max_text_len.rds")
saveRDS(... |
authors.mainpanel <- mainPanel(
fluidPage(
tags$h3("Listado de Autores:"),
tags$h2(""),
tags$h4(
tags$a(href="http://jmcartiles.netlify.com/",
"José Manuel Cazorla Artiles")
),
tags$p("Doctorando en Universidad de Las Palmas de Gran Canaria"),
tags$h2... | /authors_elements.R | no_license | jmcartiles/canary_islands_tourism_dashboard | R | false | false | 538 | r |
authors.mainpanel <- mainPanel(
fluidPage(
tags$h3("Listado de Autores:"),
tags$h2(""),
tags$h4(
tags$a(href="http://jmcartiles.netlify.com/",
"José Manuel Cazorla Artiles")
),
tags$p("Doctorando en Universidad de Las Palmas de Gran Canaria"),
tags$h2... |
#Production function Estimation (by Olley and Pakes, 1996) with panel bootstraping
#Xi Chen, STATEC Luxembourg
#Version 1.1, 15/09/2013-04/12/2013
#Functions for estimating the production function, the package "plyr", "mgcv", "plm" is required
Estimat = function(panel, GAM=F){
#Estimation with Olley and Pakes met... | /OlleyPakesEstimation_v1.1.r | no_license | chenxi20/MissingCapital | R | false | false | 2,918 | r | #Production function Estimation (by Olley and Pakes, 1996) with panel bootstraping
#Xi Chen, STATEC Luxembourg
#Version 1.1, 15/09/2013-04/12/2013
#Functions for estimating the production function, the package "plyr", "mgcv", "plm" is required
Estimat = function(panel, GAM=F){
#Estimation with Olley and Pakes met... |
#'@rdname particlefilter
#'@title Particle Filter
#'@description Particle filter with storage of trajectories
#'@param nparticles a number of particles
#'@param model a list representing a model, for instance as given by \code{\link{get_ar}}.
#'@param theta a parameter to give to the model functions
#'@param observatio... | /R/particlefilter.R | no_license | particlemontecarlo/unbiased_pimh | R | false | false | 2,004 | r | #'@rdname particlefilter
#'@title Particle Filter
#'@description Particle filter with storage of trajectories
#'@param nparticles a number of particles
#'@param model a list representing a model, for instance as given by \code{\link{get_ar}}.
#'@param theta a parameter to give to the model functions
#'@param observatio... |
evaluate <- function(TrueLabelsPath, PredLabelsPath){
"
Script to evaluate the performance of the classifier.
It returns multiple evaluation measures: the confusion matrix, median F1-score, F1-score for each class, accuracy, percentage of unlabeled, population size.
The percentage of unlabeled cells is find b... | /scRef/codes/Benchmark/cross_validation/train4_test1/pbmcsca_10Xv3/evaluate.R | permissive | Drizzle-Zhang/bioinformatics | R | false | false | 3,073 | r | evaluate <- function(TrueLabelsPath, PredLabelsPath){
"
Script to evaluate the performance of the classifier.
It returns multiple evaluation measures: the confusion matrix, median F1-score, F1-score for each class, accuracy, percentage of unlabeled, population size.
The percentage of unlabeled cells is find b... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mechanical.R
\name{mechanical}
\alias{mechanical}
\title{mechanical model: use an exponential function to describe the coefficients away from roads}
\usage{
mechanical(variabledf, y_var = c("day_value", "night_value",
"value_mean"), pop_var... | /globalLUR/globalLUR/man/mechanical.Rd | no_license | PJNation/globalLUR | R | false | true | 1,579 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mechanical.R
\name{mechanical}
\alias{mechanical}
\title{mechanical model: use an exponential function to describe the coefficients away from roads}
\usage{
mechanical(variabledf, y_var = c("day_value", "night_value",
"value_mean"), pop_var... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_RandomForest.R
\name{fit.rf}
\alias{fit.rf}
\title{Build Random Forest model}
\usage{
\method{fit}{rf}(x)
}
\arguments{
\item{x}{A training dataset with calculated Chemical Descriptors}
}
\value{
Returns a trained model ready to predict... | /man/fit.rf.Rd | no_license | RECETOX/Retip | R | false | true | 413 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_RandomForest.R
\name{fit.rf}
\alias{fit.rf}
\title{Build Random Forest model}
\usage{
\method{fit}{rf}(x)
}
\arguments{
\item{x}{A training dataset with calculated Chemical Descriptors}
}
\value{
Returns a trained model ready to predict... |
phylostruct.rev <- function (samp, tree, comminmax=NULL, env = NULL, metric = c("psv", "psr", "pse", "psc", "sppregs"), null.model = c("frequency", "richness", "independentswap", "trialswap", "other"), runs = 100, it = 1000, alpha = 0.05, fam = "binomial")
{
metric <- match.arg(metric)
null.model <- match.arg(nul... | /Google Drive/Brachymeles_CA/r_code/phylostruct_revised.R | no_license | nahuron/thesis | R | false | false | 5,060 | r | phylostruct.rev <- function (samp, tree, comminmax=NULL, env = NULL, metric = c("psv", "psr", "pse", "psc", "sppregs"), null.model = c("frequency", "richness", "independentswap", "trialswap", "other"), runs = 100, it = 1000, alpha = 0.05, fam = "binomial")
{
metric <- match.arg(metric)
null.model <- match.arg(nul... |
# Project : Getting and Cleaning Data
# Name : Linyan Le
# Date : 2021-08-19
# 0. Preparation
# 0.1 Load packages
library(plyr)
# 0.2 Download the dataset
if(!file.exists("./data")){dir.create("./data")}
fileurl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(... | /Getting and Cleaning Data/Week4/Assignment/run_analysis.R | no_license | LiamChim/datasciencecoursera | R | false | false | 3,007 | r | # Project : Getting and Cleaning Data
# Name : Linyan Le
# Date : 2021-08-19
# 0. Preparation
# 0.1 Load packages
library(plyr)
# 0.2 Download the dataset
if(!file.exists("./data")){dir.create("./data")}
fileurl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(... |
library(dplyr)
ss.bounds <- readRDS("ss.bounds.rds")
alpha <- 0.025
method <- 'fm'
scenario <- 30
param <- 1
anal_type <- "sing"
ss <- ss.bounds%>%
dplyr::filter(method == "fm", scenario.id == scenario)
do_val <- 0.05
x1 <- parallel::mclapply(X = 1:10000,
mc.cores = parallel::detectC... | /sim_pgms/fm/do5/2xcontH0_sc30_do5_sing.R | no_license | yuliasidi/nibinom_apply | R | false | false | 2,230 | r | library(dplyr)
ss.bounds <- readRDS("ss.bounds.rds")
alpha <- 0.025
method <- 'fm'
scenario <- 30
param <- 1
anal_type <- "sing"
ss <- ss.bounds%>%
dplyr::filter(method == "fm", scenario.id == scenario)
do_val <- 0.05
x1 <- parallel::mclapply(X = 1:10000,
mc.cores = parallel::detectC... |
rmysql_doublelist2<-function(){
#mydb = dbConnect(MySQL(), user='appuser', password='appuser123', dbname='mstore', host='192.168.2.45');
mydb = dbConnect(SQLServer(),"192.168.2.113/MicrosoftBIRetailDemo;user=appuser;password=appuser123");
rs = dbSendQuery(mydb, "select * from VW_RetailDataset");
#Pulls only 1st row
da... | /R/rmysql_doublelist2.R | no_license | stevensuting/demo | R | false | false | 876 | r | rmysql_doublelist2<-function(){
#mydb = dbConnect(MySQL(), user='appuser', password='appuser123', dbname='mstore', host='192.168.2.45');
mydb = dbConnect(SQLServer(),"192.168.2.113/MicrosoftBIRetailDemo;user=appuser;password=appuser123");
rs = dbSendQuery(mydb, "select * from VW_RetailDataset");
#Pulls only 1st row
da... |
#**INITIAL STEPS**
#####In excel remove the simbol ## from the names of the table and rename the samples acccording to the code used in the gradient e.g. GRA_S10_D_F_A10
library(stats)
library(base)
library(dplyr)
library(dplyr)
library(tidyr)
library(knitr)
library(PMCMR)
library(vegan)
library(betapart)
library(str... | /bin/Collembola/multilevel_distance_decay_Collembola_IBDist_West.R | no_license | AliciaMstt/Multihierarchical_NevadoToluca | R | false | false | 47,760 | r | #**INITIAL STEPS**
#####In excel remove the simbol ## from the names of the table and rename the samples acccording to the code used in the gradient e.g. GRA_S10_D_F_A10
library(stats)
library(base)
library(dplyr)
library(dplyr)
library(tidyr)
library(knitr)
library(PMCMR)
library(vegan)
library(betapart)
library(str... |
\name{cuModuleGetTexRef}
\alias{cuModuleGetTexRef}
\title{Returns a handle to a texture reference}
\description{ Returns the handle of the texture reference of name \code{name}
in the module \code{hmod}. If no texture reference of that name exists,
\code{cuModuleGetTexRef}() returns \code{CUDA_ERROR_NOT_FOUND}. This... | /man/cuModuleGetTexRef.Rd | no_license | xfbingshan/RCUDA | R | false | false | 982 | rd | \name{cuModuleGetTexRef}
\alias{cuModuleGetTexRef}
\title{Returns a handle to a texture reference}
\description{ Returns the handle of the texture reference of name \code{name}
in the module \code{hmod}. If no texture reference of that name exists,
\code{cuModuleGetTexRef}() returns \code{CUDA_ERROR_NOT_FOUND}. This... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R, R/cpda.R
\name{rplba}
\alias{rplba}
\alias{rplba1}
\alias{rplba2}
\alias{rplba3}
\alias{rplba4}
\alias{rplbaR1}
\alias{rplbaR2}
\alias{rplbaR3}
\title{Generate Random Choice Response Times using pLBA Model}
\usage{
rplba(n, pVe... | /man/rplba.Rd | no_license | TasCL/cpda | R | false | true | 10,264 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R, R/cpda.R
\name{rplba}
\alias{rplba}
\alias{rplba1}
\alias{rplba2}
\alias{rplba3}
\alias{rplba4}
\alias{rplbaR1}
\alias{rplbaR2}
\alias{rplbaR3}
\title{Generate Random Choice Response Times using pLBA Model}
\usage{
rplba(n, pVe... |
#' @export
generate_predictions <- function(testYear = 2017) {
statsToPredict <- c("rush_att", "rush_yds", "rush_td", "targets", "rec", "rec_yds", "rec_td",
"pass_cmp", "pass_att", "pass_yds", "pass_td", "pass_int")
gamelogs <- plyr::ldply(list.files("data/gamelogs/"), function(x) {
t ... | /R/generate_predictions.R | no_license | ctloftin/FantasyFootballData | R | false | false | 5,083 | r |
#' @export
generate_predictions <- function(testYear = 2017) {
statsToPredict <- c("rush_att", "rush_yds", "rush_td", "targets", "rec", "rec_yds", "rec_td",
"pass_cmp", "pass_att", "pass_yds", "pass_td", "pass_int")
gamelogs <- plyr::ldply(list.files("data/gamelogs/"), function(x) {
t ... |
#Demonstration of neuro networks using iris dataset
#ref: http://www.di.fc.ul.pt/~jpn/r/neuralnets/neuralnets.html
#The following code seems to work but I haven't fully understand the rationale
attach(iris)
library(caret)
library(dplyr)
library(e1071)
library(neuralnet)
set.seed(101)
in_train=createDataP... | /general_r/Tutorials/neuroNetwork.R | no_license | peterwu19881230/R_Utility | R | false | false | 684 | r | #Demonstration of neuro networks using iris dataset
#ref: http://www.di.fc.ul.pt/~jpn/r/neuralnets/neuralnets.html
#The following code seems to work but I haven't fully understand the rationale
attach(iris)
library(caret)
library(dplyr)
library(e1071)
library(neuralnet)
set.seed(101)
in_train=createDataP... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CorrBin.R
\name{fitCorrBin}
\alias{fitCorrBin}
\title{Fitting the Correlated Binomial Distribution when binomial
random variable, frequency, probability of success and covariance are given}
\usage{
fitCorrBin(x,obs.freq,p,cov)
}
\arguments{
\... | /man/fitCorrBin.Rd | no_license | cran/fitODBOD | R | false | true | 3,015 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CorrBin.R
\name{fitCorrBin}
\alias{fitCorrBin}
\title{Fitting the Correlated Binomial Distribution when binomial
random variable, frequency, probability of success and covariance are given}
\usage{
fitCorrBin(x,obs.freq,p,cov)
}
\arguments{
\... |
#!/usr/bin/env Rscript
# Do not run this test on a login node.
library(sna)
library(network)
#library(ergm) # sampson data set
library(foreach)
library(Rmpi)
library(snow)
library(doParallel)
dyn.load("../lib/bet.so")
asserteq = function(a, b, name) {
if (sum(abs(a-b)) > 0.00001) {
print(paste("Not equa... | /betweenness/tests/bet-test-mpi.R | no_license | khanna7/Key_Player | R | false | false | 1,164 | r | #!/usr/bin/env Rscript
# Do not run this test on a login node.
library(sna)
library(network)
#library(ergm) # sampson data set
library(foreach)
library(Rmpi)
library(snow)
library(doParallel)
dyn.load("../lib/bet.so")
asserteq = function(a, b, name) {
if (sum(abs(a-b)) > 0.00001) {
print(paste("Not equa... |
m_filter_single_var_ui <- function(id, dataset, dataname, colname) {
ns <- NS(id)
id <- ns("filter")
if (is.numeric(dataset[[colname]])) {
# slider
v_range <- range(dataset[[colname]])
sliderInput(
inputId = id,
label = colname,
min = v_range[1],
max = v_range[2],
value =... | /programs/shiny/m_filter.R | no_license | openpharma/rinpharma_workshop_2021 | R | false | false | 3,143 | r | m_filter_single_var_ui <- function(id, dataset, dataname, colname) {
ns <- NS(id)
id <- ns("filter")
if (is.numeric(dataset[[colname]])) {
# slider
v_range <- range(dataset[[colname]])
sliderInput(
inputId = id,
label = colname,
min = v_range[1],
max = v_range[2],
value =... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genoset-class.R
\name{show,GenoSet-method}
\alias{show,GenoSet-method}
\title{Print a GenoSet}
\usage{
\S4method{show}{GenoSet}(object)
}
\arguments{
\item{object}{a GenoSet}
}
\description{
Prints out a description of a GenoSet object
}
| /man/show-GenoSet-method.Rd | no_license | phaverty/genoset | R | false | true | 316 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genoset-class.R
\name{show,GenoSet-method}
\alias{show,GenoSet-method}
\title{Print a GenoSet}
\usage{
\S4method{show}{GenoSet}(object)
}
\arguments{
\item{object}{a GenoSet}
}
\description{
Prints out a description of a GenoSet object
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qcs.cusum.r
\name{qcs.cusum}
\alias{qcs.cusum}
\alias{qcs.cusum.default}
\alias{qcs.cusum.qcd}
\title{Function to plot the cusum chart}
\usage{
qcs.cusum(x, ...)
\method{qcs.cusum}{default}(
x,
var.index = 1,
sample.index = 2,
covar.... | /man/qcs.cusum.Rd | no_license | cran/qcr | R | false | true | 2,607 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qcs.cusum.r
\name{qcs.cusum}
\alias{qcs.cusum}
\alias{qcs.cusum.default}
\alias{qcs.cusum.qcd}
\title{Function to plot the cusum chart}
\usage{
qcs.cusum(x, ...)
\method{qcs.cusum}{default}(
x,
var.index = 1,
sample.index = 2,
covar.... |
Sys.setenv(JAVA_HOME='/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/jdk-8u141-b15-p4aaoptkqukgdix6dh5ey236kllhluvr/jre') #Ubuntu cluster
## Load packages
library(nlrx)
library(tidyverse)
library(rcartocolor)
library(ggthemes)
# Office
netlogopath <- file.path("/usr/local/Cluster-A... | /scripts_bau/dongjak_bau.R | no_license | dataandcrowd/PollutionABM | R | false | false | 2,688 | r | Sys.setenv(JAVA_HOME='/usr/local/software/spack/spack-0.11.2/opt/spack/linux-rhel7-x86_64/gcc-5.4.0/jdk-8u141-b15-p4aaoptkqukgdix6dh5ey236kllhluvr/jre') #Ubuntu cluster
## Load packages
library(nlrx)
library(tidyverse)
library(rcartocolor)
library(ggthemes)
# Office
netlogopath <- file.path("/usr/local/Cluster-A... |
library(rethinking)
library(tidyverse)
data(WaffleDivorce)
d <- WaffleDivorce
d$A <- scale(d$MedianAgeMarriage)
d$D <- scale(d$Divorce)
m5.1 <- quap(
alist(
D ~ dnorm(mu, sigma),
mu <- a + b_a * A,
a ~ dnorm(0,0.2),
b_a ~ dnorm(0,0.5),
sigma ~ dexp(1)
), data=d
)
plot(d$A, d$D, xlab="Median A... | /Follow_through/Chapter5_follow_through.R | no_license | nichi97/Statistical_rethinking- | R | false | false | 7,036 | r | library(rethinking)
library(tidyverse)
data(WaffleDivorce)
d <- WaffleDivorce
d$A <- scale(d$MedianAgeMarriage)
d$D <- scale(d$Divorce)
m5.1 <- quap(
alist(
D ~ dnorm(mu, sigma),
mu <- a + b_a * A,
a ~ dnorm(0,0.2),
b_a ~ dnorm(0,0.5),
sigma ~ dexp(1)
), data=d
)
plot(d$A, d$D, xlab="Median A... |
library(devtools)
library(tidyquant)
library(crypto)
library(ggplot2)
library(tseries)
library(zoo)
library(dplyr)
library(xts)
options("getSymbols.warning4.0"=FALSE)
options("getSymbols.yahoo.warning"=FALSE)
# ===============================================================================
#We first co... | /NIO - Stock Movement.R | no_license | ltheod01/stock---time-series-analysis- | R | false | false | 3,995 | r | library(devtools)
library(tidyquant)
library(crypto)
library(ggplot2)
library(tseries)
library(zoo)
library(dplyr)
library(xts)
options("getSymbols.warning4.0"=FALSE)
options("getSymbols.yahoo.warning"=FALSE)
# ===============================================================================
#We first co... |
# Some important notes:
#
# Windows Users:
#
# 1.You may need to install RTools as well.
#
# 2. You may get stuck in a loop where RStudio asks if you
# want to restart R repeatedly. Try completely closing RStudio
# if you have this problem, or answering no in the prompt.
#
# 3. During the install_github() co... | /R Tools & Tutorials/installing_packages.R | no_license | JHDatz/Big-Problems-Tools | R | false | false | 2,013 | r | # Some important notes:
#
# Windows Users:
#
# 1.You may need to install RTools as well.
#
# 2. You may get stuck in a loop where RStudio asks if you
# want to restart R repeatedly. Try completely closing RStudio
# if you have this problem, or answering no in the prompt.
#
# 3. During the install_github() co... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/31_broyden_band.R
\name{broyden_band}
\alias{broyden_band}
\title{Broyden Banded Function}
\usage{
broyden_band()
}
\value{
A list containing:
\itemize{
\item \code{fn} Objective function which calculates the value given input
parameter v... | /man/broyden_band.Rd | permissive | jlmelville/funconstrain | R | false | true | 2,340 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/31_broyden_band.R
\name{broyden_band}
\alias{broyden_band}
\title{Broyden Banded Function}
\usage{
broyden_band()
}
\value{
A list containing:
\itemize{
\item \code{fn} Objective function which calculates the value given input
parameter v... |
# K-Means Clustering
# Importing the dataset
dataset <- read.csv('Mall_Customers.csv')
X <-dataset[4:5]
# Using the Elbow method to find the optimal number of clusters
set.seed(6)
wcss <- vector()
for(i in 1:10) wcss[i] <- sum(kmeans(X,i)$withinss)
plot(1:10,wcss, type = 'b', main = paste('Clusters of clien... | /Part 4 - Clustering/Section 24 - K-Means Clustering/kmeans_R.R | no_license | Itsu004/Machine-Learning | R | false | false | 817 | r | # K-Means Clustering
# Importing the dataset
dataset <- read.csv('Mall_Customers.csv')
X <-dataset[4:5]
# Using the Elbow method to find the optimal number of clusters
set.seed(6)
wcss <- vector()
for(i in 1:10) wcss[i] <- sum(kmeans(X,i)$withinss)
plot(1:10,wcss, type = 'b', main = paste('Clusters of clien... |
#' Connect to bety using current PEcAn configuration
#' @param php.config Path to `config.php`
#' @export
#'
betyConnect <- function(php.config = "../../web/config.php") {
## Read PHP config file for webserver
config.list <- PEcAn.utils::read_web_config(php.config)
## Database connection
# TODO: The latest v... | /base/db/R/query.dplyr.R | permissive | dlebauer/pecan | R | false | false | 8,963 | r | #' Connect to bety using current PEcAn configuration
#' @param php.config Path to `config.php`
#' @export
#'
betyConnect <- function(php.config = "../../web/config.php") {
## Read PHP config file for webserver
config.list <- PEcAn.utils::read_web_config(php.config)
## Database connection
# TODO: The latest v... |
library('tidyverse')
library('ggplot2')
library('kableExtra')
library('Hmisc') #This Library will help in dividing the data into groups using the cut function
source("C:/Users/Admin/OneDrive/Analytics/HTS ML Output/Functiions - Combi.R")
machakos<-read.csv('C:/Users/Admin/OneDrive/Analytics/HTS ML Output/machakos_pr... | /HTS ML Output/HTS ML App County Predictions.R | no_license | MaringaM/Analytics | R | false | false | 5,280 | r | library('tidyverse')
library('ggplot2')
library('kableExtra')
library('Hmisc') #This Library will help in dividing the data into groups using the cut function
source("C:/Users/Admin/OneDrive/Analytics/HTS ML Output/Functiions - Combi.R")
machakos<-read.csv('C:/Users/Admin/OneDrive/Analytics/HTS ML Output/machakos_pr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AutoGeneratedDefinitions.R
\name{detectCohortsByName}
\alias{detectCohortsByName}
\title{Detect the presence of string matched Cohort definitions.}
\usage{
detectCohortsByName(pattern, negate = FALSE, baseUrl)
}
\arguments{
\item{pattern}{A p... | /man/detectCohortsByName.Rd | permissive | OHDSI/ROhdsiWebApi | R | false | true | 1,020 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AutoGeneratedDefinitions.R
\name{detectCohortsByName}
\alias{detectCohortsByName}
\title{Detect the presence of string matched Cohort definitions.}
\usage{
detectCohortsByName(pattern, negate = FALSE, baseUrl)
}
\arguments{
\item{pattern}{A p... |
Data<-read.table("household_power_consumption.txt",sep=";",skip=1,na.strings="?")
colnames(Data)<-c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
NeededData<-subset(Data,Data$Date=="1/2/2007" | Data$Date =="2/2/2007")
pa... | /plot4.r | no_license | AlaaElDinDarwish/datasciencecoursera | R | false | false | 1,207 | r | Data<-read.table("household_power_consumption.txt",sep=";",skip=1,na.strings="?")
colnames(Data)<-c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
NeededData<-subset(Data,Data$Date=="1/2/2007" | Data$Date =="2/2/2007")
pa... |
/ADB/pls/man/kernelpls.fit.Rd | no_license | Etjean/M1stuff | R | false | false | 3,411 | rd | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_expressions.R
\name{getValue}
\alias{getValue}
\title{Calculate the value of an expression or reference}
\usage{
getValue(expression, model = getCurrentModel())
}
\arguments{
\item{expression}{Expressions to calculate, as character, fin... | /man/getValue.Rd | permissive | jpahle/CoRC | R | false | true | 646 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_expressions.R
\name{getValue}
\alias{getValue}
\title{Calculate the value of an expression or reference}
\usage{
getValue(expression, model = getCurrentModel())
}
\arguments{
\item{expression}{Expressions to calculate, as character, fin... |
library(data.table)
library(dplyr)
hpc3 <- fread( input = "./household_power_consumption.txt",
na.strings = "?",
sep = ";",
stringsAsFactors = TRUE) %>%
filter( strptime( Date, "%d/%m/%Y") == "2007-02-01" |
strptime( Date, "%d/%m/%Y") == "2... | /plot3.R | no_license | alex1sc/ExData_Plotting1 | R | false | false | 1,597 | r | library(data.table)
library(dplyr)
hpc3 <- fread( input = "./household_power_consumption.txt",
na.strings = "?",
sep = ";",
stringsAsFactors = TRUE) %>%
filter( strptime( Date, "%d/%m/%Y") == "2007-02-01" |
strptime( Date, "%d/%m/%Y") == "2... |
#' threshold fitting with a maximul likelood algorithm
#' it avoids to compute the gaussian integral
#' but requires to do random simulations with the same package
#' test should be done to see which method is the quickest
#'
#'The proportion does not converge for now, BUG
#'
#'#' @param pF1 is the proportion of facies... | /R/threshold_fitting_ml.R | permissive | tleblevecIMP/TransPGS | R | false | false | 1,109 | r | #' threshold fitting with a maximul likelood algorithm
#' it avoids to compute the gaussian integral
#' but requires to do random simulations with the same package
#' test should be done to see which method is the quickest
#'
#'The proportion does not converge for now, BUG
#'
#'#' @param pF1 is the proportion of facies... |
library(shiny)
shinyUI(fluidPage(
titlePanel("Hello World!"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 5,
max = 50,
value = 30)
),
... | /shiny/L1.hello/ui.R | no_license | yama1968/Spikes | R | false | false | 389 | r | library(shiny)
shinyUI(fluidPage(
titlePanel("Hello World!"),
sidebarLayout(
sidebarPanel(
sliderInput("bins",
"Number of bins:",
min = 5,
max = 50,
value = 30)
),
... |
#library(editrules)
#if (require(testthat)){
# test_package("editrules")
#}
| /editrules/tests/test_all.R | no_license | ingted/R-Examples | R | false | false | 83 | r | #library(editrules)
#if (require(testthat)){
# test_package("editrules")
#}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.R
\name{model.idJobPlatform}
\alias{model.idJobPlatform}
\title{Title}
\usage{
model.idJobPlatform(reponseAdd)
}
\arguments{
\item{reponseAdd}{}
}
\description{
Title
}
| /man/model.idJobPlatform.Rd | no_license | saagie/rstudio-saagie-addin | R | false | true | 254 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model.R
\name{model.idJobPlatform}
\alias{model.idJobPlatform}
\title{Title}
\usage{
model.idJobPlatform(reponseAdd)
}
\arguments{
\item{reponseAdd}{}
}
\description{
Title
}
|
testlist <- list(b = 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), p1 = c(8.57286299609258e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06,... | /metacoder/inst/testfiles/intersect_line_rectangle/AFL_intersect_line_rectangle/intersect_line_rectangle_valgrind_files/1615769459-test.R | permissive | akhikolla/updatedatatype-list3 | R | false | false | 728 | r | testlist <- list(b = 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), p1 = c(8.57286299609258e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06,... |
# Check that required packages are running
devtools::install_github("thomasp85/patchwork")
library(patchwork)
if (!require("pacman")) install.packages("pacman")
pacman::p_load(tidyverse, extrafont, sf)
# Get working directory
wd <- getwd()
# I found a Google Maps point dataset of English Cathedrals, downloaded as a K... | /Monochrome_9.R | no_license | wengraf/30DayMapChallenge2020 | R | false | false | 5,093 | r | # Check that required packages are running
devtools::install_github("thomasp85/patchwork")
library(patchwork)
if (!require("pacman")) install.packages("pacman")
pacman::p_load(tidyverse, extrafont, sf)
# Get working directory
wd <- getwd()
# I found a Google Maps point dataset of English Cathedrals, downloaded as a K... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/createBinMatrix.R
\name{createBinMatrix}
\alias{createBinMatrix}
\title{Create Matrix from calculated Bins}
\usage{
createBinMatrix(data, pval)
}
| /man/createBinMatrix.Rd | no_license | liangdp1984/cnAnalysis450k | R | false | true | 225 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/createBinMatrix.R
\name{createBinMatrix}
\alias{createBinMatrix}
\title{Create Matrix from calculated Bins}
\usage{
createBinMatrix(data, pval)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/editing.R
\name{update_object}
\alias{update_object}
\title{Update an object with a new file}
\usage{
update_object(mn, pid, path, format_id = NULL, new_pid = NULL, sid = NULL)
}
\arguments{
\item{mn}{(MNode) The Member Node to update the obj... | /man/update_object.Rd | permissive | NCEAS/arcticdatautils | R | false | true | 1,505 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/editing.R
\name{update_object}
\alias{update_object}
\title{Update an object with a new file}
\usage{
update_object(mn, pid, path, format_id = NULL, new_pid = NULL, sid = NULL)
}
\arguments{
\item{mn}{(MNode) The Member Node to update the obj... |
#' @title Extract CIFTI data from file
#' @description Extracts the data after the CIFTI XML information
#' @param fname Filename of CIFTI
#' @param nim NIfTI-2 header, if already parsed.
#' If \code{NULL}, \code{\link{nifti_2_hdr}}
#' will be run on the CIFTI.
#'
#' @return Array of values
#' @export
cifti_data = func... | /R/cifti_data.R | no_license | muschellij2/cifti | R | false | false | 2,433 | r | #' @title Extract CIFTI data from file
#' @description Extracts the data after the CIFTI XML information
#' @param fname Filename of CIFTI
#' @param nim NIfTI-2 header, if already parsed.
#' If \code{NULL}, \code{\link{nifti_2_hdr}}
#' will be run on the CIFTI.
#'
#' @return Array of values
#' @export
cifti_data = func... |
source("~/.Rprofile")
library(dplyr)
library(ncdf4)
library(abind)
## ALTERNATIVELY, USE DATA DOWNLOADED FROM FLUXCOM WEBSITE:
yearstart = 1980
yearend = 2013
idx <- 0
for (year in yearstart:yearend){
idx <- idx + 1
filn <- paste0( myhome, "/data/gpp_mte/GPP.RF.CRUNCEPv6.annual.", as.character(year), ".nc" )
... | /preproc_mte_fluxcom.R | no_license | yangxhcaf/emcon_iav | R | false | false | 1,242 | r | source("~/.Rprofile")
library(dplyr)
library(ncdf4)
library(abind)
## ALTERNATIVELY, USE DATA DOWNLOADED FROM FLUXCOM WEBSITE:
yearstart = 1980
yearend = 2013
idx <- 0
for (year in yearstart:yearend){
idx <- idx + 1
filn <- paste0( myhome, "/data/gpp_mte/GPP.RF.CRUNCEPv6.annual.", as.character(year), ".nc" )
... |
context("FacileData API: assay-level query and retrieval")
.classes <- c("DESeqDataSet", "DGEList", "EList", "ExpressionSet",
"SummarizedExperiment")
.rnaseq.class <- setdiff(.classes, "EList")
if (!exists("FDS")) FDS <- FacileData::exampleFacileDataSet()
if (!exists("Y")) Y <- example_bioc_data("DGELi... | /tests/testthat/test-facile-api-assay.R | permissive | RagnarDanneskjold/FacileBiocData | R | false | false | 10,792 | r | context("FacileData API: assay-level query and retrieval")
.classes <- c("DESeqDataSet", "DGEList", "EList", "ExpressionSet",
"SummarizedExperiment")
.rnaseq.class <- setdiff(.classes, "EList")
if (!exists("FDS")) FDS <- FacileData::exampleFacileDataSet()
if (!exists("Y")) Y <- example_bioc_data("DGELi... |
install.packages("rpart")
library(rpart)
install.packages("rpart.plot")
library(rpart.plot)
install.packages("caret")
library(lattice)
library(ggplot2)
library(caret)
setwd("C:/Users/lianxiang/Desktop")
X1<- read.csv("X1.csv")
set.seed(1000)
t.idx <- createDataPartition(X1$roe, p=0.7, list = FALSE)
bfit <- ... | /cuijiaru/123.R | permissive | Sallysjy/tutoring | R | false | false | 375 | r | install.packages("rpart")
library(rpart)
install.packages("rpart.plot")
library(rpart.plot)
install.packages("caret")
library(lattice)
library(ggplot2)
library(caret)
setwd("C:/Users/lianxiang/Desktop")
X1<- read.csv("X1.csv")
set.seed(1000)
t.idx <- createDataPartition(X1$roe, p=0.7, list = FALSE)
bfit <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.R
\name{store_resid_var}
\alias{store_resid_var}
\title{store residual variance}
\usage{
store_resid_var(object)
}
\arguments{
\item{object}{The sema output, a list containing the model parameters.}
}
\value{
A data frame with the num... | /man/store_resid_var.Rd | no_license | L-Ippel/SEMA | R | false | true | 1,448 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.R
\name{store_resid_var}
\alias{store_resid_var}
\title{store residual variance}
\usage{
store_resid_var(object)
}
\arguments{
\item{object}{The sema output, a list containing the model parameters.}
}
\value{
A data frame with the num... |
#!/usr/bin/Rscript
suppressPackageStartupMessages(library(dada2))
track.filt <- filterAndTrim(snakemake@input[['r1']],snakemake@output[['r1']],
snakemake@input[['r2']],snakemake@output[['r2']],
maxEE=snakemake@config[["maxEE"]],
comp... | /scripts/dada2/.ipynb_checkpoints/01_filter_dada-checkpoint.R | no_license | lvelosuarez/Snakemake_amplicon | R | false | false | 593 | r | #!/usr/bin/Rscript
suppressPackageStartupMessages(library(dada2))
track.filt <- filterAndTrim(snakemake@input[['r1']],snakemake@output[['r1']],
snakemake@input[['r2']],snakemake@output[['r2']],
maxEE=snakemake@config[["maxEE"]],
comp... |
## Author: Michael Creegan ##
## Date: March 4, 2021 ##
###############################################
### FOMC Sentiment Analysis & Insights / NLP ##
###############################################
library(magrittr)
read.table(
text = system("openssl ciphers -v", intern=TRUE) %>%
gsub("[[:alpha:]]+=", "", ... | /FOMC Statement Analysis.R | no_license | creeganmi/FOMC | R | false | false | 31,294 | r | ## Author: Michael Creegan ##
## Date: March 4, 2021 ##
###############################################
### FOMC Sentiment Analysis & Insights / NLP ##
###############################################
library(magrittr)
read.table(
text = system("openssl ciphers -v", intern=TRUE) %>%
gsub("[[:alpha:]]+=", "", ... |
library(reshape2)
# Reading activity labels and features
labels <- read.table("UCI HAR Dataset/activity_labels.txt")
labels[,2] <- as.character(labels[,2])
features <- read.table("UCI HAR Dataset/features.txt")
features[,2] <- as.character(features[,2])
# Extracts only the measurements on the mean and standard devi... | /run_analysis.R | no_license | ianashkin/Getting-and-Cleaning-Data | R | false | false | 1,702 | r | library(reshape2)
# Reading activity labels and features
labels <- read.table("UCI HAR Dataset/activity_labels.txt")
labels[,2] <- as.character(labels[,2])
features <- read.table("UCI HAR Dataset/features.txt")
features[,2] <- as.character(features[,2])
# Extracts only the measurements on the mean and standard devi... |
# Quiz3ProgrammingAssignment2
#CODE:
# Pair of functions that cache the inverse of a matrix
## Usage: Pass the result of a makeCacheMatrix call to cacheSolve
## CACHE MATRIX FUNCTION
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x... | /makeCacheMatrix.R | no_license | anyaborces/Quiz3ProgrammingAssignment2 | R | false | false | 1,277 | r | # Quiz3ProgrammingAssignment2
#CODE:
# Pair of functions that cache the inverse of a matrix
## Usage: Pass the result of a makeCacheMatrix call to cacheSolve
## CACHE MATRIX FUNCTION
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x... |
#' Geom qq
#'
#' @rdname geom_qq
#' @export
#'
#' @param mapping Parameter to ggplot
#' @param data Parameter to ggplot
#' @param geom Parameter to ggplot
#' @param position Parameter to ggplot
#' @param ... Parameter to ggplot
#' @param line.p Vector of quantiles to use when fitting the Q-Q line, defaults
#' defaults... | /R/stat-qq-line.R | no_license | snewhouse/CEMiTool | R | false | false | 2,676 | r | #' Geom qq
#'
#' @rdname geom_qq
#' @export
#'
#' @param mapping Parameter to ggplot
#' @param data Parameter to ggplot
#' @param geom Parameter to ggplot
#' @param position Parameter to ggplot
#' @param ... Parameter to ggplot
#' @param line.p Vector of quantiles to use when fitting the Q-Q line, defaults
#' defaults... |
#integer
x <- 2L
typeof(x)
#double
y <- 2.5
typeof(y)
#integer
x <- 2L
typeof(x)
#double
y <- 2.5
typeof(y)
#double
t <- 3.0
typeof(t)
#complex
z <- 3 + 2i
typeof(z)
#character
a <- "h"
typeof(a)
#logical
q <- T
typeof(q)
q2 <- F
typeof(q2)
#complex
aa <- 5 + 4
typeof(aa)... | /R-Beginner/tutorialR.R | no_license | Kayan-dev/R | R | false | false | 335 | r |
#integer
x <- 2L
typeof(x)
#double
y <- 2.5
typeof(y)
#integer
x <- 2L
typeof(x)
#double
y <- 2.5
typeof(y)
#double
t <- 3.0
typeof(t)
#complex
z <- 3 + 2i
typeof(z)
#character
a <- "h"
typeof(a)
#logical
q <- T
typeof(q)
q2 <- F
typeof(q2)
#complex
aa <- 5 + 4
typeof(aa)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tools.R
\name{char_to_int}
\alias{char_to_int}
\title{Convert a character into integer vector}
\usage{
char_to_int(v)
}
\arguments{
\item{v}{a character vector.}
}
\value{
Return a integer vector.
}
\description{
Take the chara... | /man/char_to_int.Rd | no_license | cran/functClust | R | false | true | 425 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tools.R
\name{char_to_int}
\alias{char_to_int}
\title{Convert a character into integer vector}
\usage{
char_to_int(v)
}
\arguments{
\item{v}{a character vector.}
}
\value{
Return a integer vector.
}
\description{
Take the chara... |
# Aggregating Tagging Coverage for NOAA final report Maps
# 10/17/2019
#Packages
library(tidyverse)
library(here)
library(sf)
library(rnaturalearth)
library(gridExtra)
#Data
tagging <- read_csv(here("data", "noaa_report", "tags_clean_final.csv"))
recaps <- read_csv(here("data", "noaa_report", "tags_recaps_clean_fina... | /2019_edits/R/mapping/tags_spatial_bins.R | no_license | adamkemberling/Seamap_offshore_modeling | R | false | false | 2,865 | r | # Aggregating Tagging Coverage for NOAA final report Maps
# 10/17/2019
#Packages
library(tidyverse)
library(here)
library(sf)
library(rnaturalearth)
library(gridExtra)
#Data
tagging <- read_csv(here("data", "noaa_report", "tags_clean_final.csv"))
recaps <- read_csv(here("data", "noaa_report", "tags_recaps_clean_fina... |
library(data.table)
library(OSTSC)
train=fread("E:/USA/Projects/Research/Conferance/Individual_subjects/train_wi1.csv")
test=fread("E:/USA/Projects/Research/Conferance/Individual_subjects/test_final.csv")
train=train[,-1]
test=test[,-1]
test_balanced=OSTSC(sample=train[,4:186],label=train[,3])
x_train=as.data.table... | /w2/Balancing.R | no_license | jayshah5696/drowsy_driving | R | false | false | 618 | r | library(data.table)
library(OSTSC)
train=fread("E:/USA/Projects/Research/Conferance/Individual_subjects/train_wi1.csv")
test=fread("E:/USA/Projects/Research/Conferance/Individual_subjects/test_final.csv")
train=train[,-1]
test=test[,-1]
test_balanced=OSTSC(sample=train[,4:186],label=train[,3])
x_train=as.data.table... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-maps.R
\name{plot_facet_map}
\alias{plot_facet_map}
\title{Raster map with year facets}
\usage{
plot_facet_map(
df,
column = "est",
X = "X",
Y = "Y",
viridis_option = "C",
white_zero = FALSE,
low_fill = "Steel Blue 4",
mi... | /man/plot_facet_map.Rd | no_license | pbs-assess/gfvelocities | R | false | true | 606 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-maps.R
\name{plot_facet_map}
\alias{plot_facet_map}
\title{Raster map with year facets}
\usage{
plot_facet_map(
df,
column = "est",
X = "X",
Y = "Y",
viridis_option = "C",
white_zero = FALSE,
low_fill = "Steel Blue 4",
mi... |
# To create plot 3: Submetering vs. datetimezones
library("data.table")
setwd("~/data/")
# Reads in the data
powdata <- data.table::fread(input="household_power_consumption.txt",na.strings="?")
#using POSIXCT as timezones are needed along with date
powdata[,dateTime := as.POSIXct(paste(Date,Time), format ="%d/%m/%Y ... | /plot3.R | no_license | jatinder1979/ExData_Plotting1 | R | false | false | 842 | r | # To create plot 3: Submetering vs. datetimezones
library("data.table")
setwd("~/data/")
# Reads in the data
powdata <- data.table::fread(input="household_power_consumption.txt",na.strings="?")
#using POSIXCT as timezones are needed along with date
powdata[,dateTime := as.POSIXct(paste(Date,Time), format ="%d/%m/%Y ... |
#' Generate the JDOQL part of a filter.
#'
#' This function is to generate the string in the JDOQL query for some given value of a filter.
#'
#' @param filtername A character which is for the responding variable name in Wildbook framework.
#'
#' @param filtervalues A vector of the value for the filter.
#'
#' @p... | /R/filterstring.R | no_license | cran/RWildbook | R | false | false | 1,414 | r | #' Generate the JDOQL part of a filter.
#'
#' This function is to generate the string in the JDOQL query for some given value of a filter.
#'
#' @param filtername A character which is for the responding variable name in Wildbook framework.
#'
#' @param filtervalues A vector of the value for the filter.
#'
#' @p... |
# Used to load the data, check the data and make some basic plots
hosp.data <- read.csv("hospital-data.csv", stringsAsFactors = FALSE)
outcome <- read.csv("outcome-of-care-measures.csv",colClasses = "character", stringsAsFactors = FALSE)
outcome[,11]<-as.numeric(outcome[,11])
hist(outcome[,11])
names(hosp.data)
nam... | /ProgAssignment3/Load.R | no_license | rpadebet/Programming-with-R | R | false | false | 377 | r |
# Used to load the data, check the data and make some basic plots
hosp.data <- read.csv("hospital-data.csv", stringsAsFactors = FALSE)
outcome <- read.csv("outcome-of-care-measures.csv",colClasses = "character", stringsAsFactors = FALSE)
outcome[,11]<-as.numeric(outcome[,11])
hist(outcome[,11])
names(hosp.data)
nam... |
library(RSQLite)
library(tidyverse)
sqlite <- dbDriver("SQLite")
dbname <- "mashr_Whole_Blood.db"
# Create a connection to new database, mashr_Whole_Blood.db
db = dbConnect(sqlite, dbname)
# View tables included in mashr_Whole_Blood.db
dbListTables(db)
# View columns of weights and extra tables
dbListFields(db, "we... | /sabrina/Whole_Blood_variants.r | permissive | hakyimlab/lab-tools | R | false | false | 2,084 | r | library(RSQLite)
library(tidyverse)
sqlite <- dbDriver("SQLite")
dbname <- "mashr_Whole_Blood.db"
# Create a connection to new database, mashr_Whole_Blood.db
db = dbConnect(sqlite, dbname)
# View tables included in mashr_Whole_Blood.db
dbListTables(db)
# View columns of weights and extra tables
dbListFields(db, "we... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pvalues.r
\name{pvisual}
\alias{pvisual}
\title{P-value calculations.}
\usage{
pvisual(
x,
K,
m = 20,
N = 10000,
type = "scenario3",
xp = 1,
target = 1,
upper.tail = TRUE
)
}
\arguments{
\item{x}{number of observed picks of th... | /man/pvisual.Rd | no_license | dicook/nullabor | R | false | true | 1,861 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pvalues.r
\name{pvisual}
\alias{pvisual}
\title{P-value calculations.}
\usage{
pvisual(
x,
K,
m = 20,
N = 10000,
type = "scenario3",
xp = 1,
target = 1,
upper.tail = TRUE
)
}
\arguments{
\item{x}{number of observed picks of th... |
#' @title Identify branches (including tips) descended from a node (internal function).
#' @description Internal function to get presence absence of descendent branches from a vector of node numbers. The descendents include the branch leading to the focal node (i.e. node defines the stem group no crown group
#' @param ... | /R/cladeIdentity.R | no_license | cran/motmot.2.0 | R | false | false | 2,202 | r | #' @title Identify branches (including tips) descended from a node (internal function).
#' @description Internal function to get presence absence of descendent branches from a vector of node numbers. The descendents include the branch leading to the focal node (i.e. node defines the stem group no crown group
#' @param ... |
#' qvalue2
#'
#' Estimate the q-values for a given set of p-values, in a safe manner.
#' The most frequent error that I have seen in using \code{qvalue}, is that pertaining
#' to the \dQuote{pi_0 estimate is less than zero} which is thrown as a
#' result of not being able to estimate the lambda parameter.
#' This fu... | /R/qvalue2.R | no_license | drmjc/mjcstats | R | false | false | 4,761 | r | #' qvalue2
#'
#' Estimate the q-values for a given set of p-values, in a safe manner.
#' The most frequent error that I have seen in using \code{qvalue}, is that pertaining
#' to the \dQuote{pi_0 estimate is less than zero} which is thrown as a
#' result of not being able to estimate the lambda parameter.
#' This fu... |
# Case 3: Writing functions
# Part 1: Correlation between two vectors
standardizefunc <- function(vec) {
stvec <- (vec-mean(vec)/sd(vec))
return(stvec)
}
correlationfunc <- function(xVec, yVec) {
rho <-(xVec %*% yVec)/(length(xVec)-1)
return(rho)
}
data <- read.csv("Datasets/deliverytime.csv", h... | /Module-6-R-for-Business-Intelligence/workspace/case_3.r | no_license | Cbanzaime23/up-nec-business-intelligence | R | false | false | 2,456 | r | # Case 3: Writing functions
# Part 1: Correlation between two vectors
standardizefunc <- function(vec) {
stvec <- (vec-mean(vec)/sd(vec))
return(stvec)
}
correlationfunc <- function(xVec, yVec) {
rho <-(xVec %*% yVec)/(length(xVec)-1)
return(rho)
}
data <- read.csv("Datasets/deliverytime.csv", h... |
## Necessary Libraries
library(shiny)
library(shinydashboard)
library(tidyr)
library(dplyr)
library(purrr)
library(ggplot2)
library(conflicted)
library(plotly)
## Resolve package conflicts
conflict_prefer("filter", "dplyr")
conflict_prefer("box", "shinydashboard")
conflict_prefer("layout", "plotly")
| /R/00_project_init.R | permissive | jakedilliott/ltcf_covid_dashboard | R | false | false | 302 | r | ## Necessary Libraries
library(shiny)
library(shinydashboard)
library(tidyr)
library(dplyr)
library(purrr)
library(ggplot2)
library(conflicted)
library(plotly)
## Resolve package conflicts
conflict_prefer("filter", "dplyr")
conflict_prefer("box", "shinydashboard")
conflict_prefer("layout", "plotly")
|
.onLoad <- function(libname, pkgname)
{
## file path and name settings
options('rp.file.name' = 'rapport-%T-%N-%n')
options('rp.file.path' = tempdir())
## tpl username
options('tpl.user' = {
if (is.empty(getOption('tpl.user'), TRUE, leading = TRUE))
'Anonymou... | /R/init.R | no_license | tothg/rapport | R | false | false | 1,094 | r | .onLoad <- function(libname, pkgname)
{
## file path and name settings
options('rp.file.name' = 'rapport-%T-%N-%n')
options('rp.file.path' = tempdir())
## tpl username
options('tpl.user' = {
if (is.empty(getOption('tpl.user'), TRUE, leading = TRUE))
'Anonymou... |
library(GlmSimulatoR)
set.seed(1)
###############################################
# Run code
###############################################
default <- simulate_gaussian()
model <- glm(formula = Y ~ X1 + X2 + X3, data = default, family = gaussian())
params <- c(1, 2, 3)
params <- c(max(params), params)
t... | /tests/testthat/test_simullate_gaussian.R | no_license | cran/GlmSimulatoR | R | false | false | 4,424 | r | library(GlmSimulatoR)
set.seed(1)
###############################################
# Run code
###############################################
default <- simulate_gaussian()
model <- glm(formula = Y ~ X1 + X2 + X3, data = default, family = gaussian())
params <- c(1, 2, 3)
params <- c(max(params), params)
t... |
#Exploratory Data Analysis - Course Project 1
#Plot 1
#Download the Dataset
fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileURL, destfile = "/Users/danieltheng/Desktop/Learning R/Exploratory Data Analysis/ExData_Plotting1/household_power_consumption.... | /plot1.R | no_license | dantheng/ExData_Plotting1 | R | false | false | 2,067 | r | #Exploratory Data Analysis - Course Project 1
#Plot 1
#Download the Dataset
fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileURL, destfile = "/Users/danieltheng/Desktop/Learning R/Exploratory Data Analysis/ExData_Plotting1/household_power_consumption.... |
make.view.ui = function(view.ind, ps=get.ps()) {
restore.point("make.view.ui")
shiny.dt = ps$shiny.dt
cdt = ps$cdt
if (view.ind==1) {
rows = which(shiny.dt$view.ind == view.ind | shiny.dt$view.ind == 0)
} else {
rows = which(shiny.dt$view.ind == view.ind)
}
ui.li = lapply(rows, function(i... | /R/shiny_ui.r | no_license | skranz/RTutor3 | R | false | false | 8,804 | r | make.view.ui = function(view.ind, ps=get.ps()) {
restore.point("make.view.ui")
shiny.dt = ps$shiny.dt
cdt = ps$cdt
if (view.ind==1) {
rows = which(shiny.dt$view.ind == view.ind | shiny.dt$view.ind == 0)
} else {
rows = which(shiny.dt$view.ind == view.ind)
}
ui.li = lapply(rows, function(i... |
#####################################################################
# moments.R
#
# Contains the functions for creating the moments of the data to target
# 09jun2017
# Philip Barrett, Washington DC
#####################################################################
target.moms <- function( cty, breaks=NULL, labs=N... | /R/moments.R | no_license | philipbarrett/debtLimit | R | false | false | 14,199 | r | #####################################################################
# moments.R
#
# Contains the functions for creating the moments of the data to target
# 09jun2017
# Philip Barrett, Washington DC
#####################################################################
target.moms <- function( cty, breaks=NULL, labs=N... |
\name{nondominated_points}
\alias{nondominated_points}
\title{Nondominated points}
\usage{
nondominated_points(points)
}
\arguments{
\item{points}{Matrix of points, one per column.}
}
\value{
Those points in \code{points} which are not dominated by
another point.
}
\description{
Return those points which are ... | /man/nondominated_points.Rd | no_license | cran/emoa | R | false | false | 518 | rd | \name{nondominated_points}
\alias{nondominated_points}
\title{Nondominated points}
\usage{
nondominated_points(points)
}
\arguments{
\item{points}{Matrix of points, one per column.}
}
\value{
Those points in \code{points} which are not dominated by
another point.
}
\description{
Return those points which are ... |
getwd()
library(xlsx)
library(dplyr)
library(ISLR)
df=read.csv('fifa.csv')
head(df)
View(df)
str(df)
dim(df)
head(df)
is.na(df)
| /Fifa.R | no_license | kumavard/git-github | R | false | false | 143 | r | getwd()
library(xlsx)
library(dplyr)
library(ISLR)
df=read.csv('fifa.csv')
head(df)
View(df)
str(df)
dim(df)
head(df)
is.na(df)
|
\name{ta}
\alias{ta}
\title{Temporal Aggregation of Time Series}
\usage{
ta(x, conversion = "sum", to = "annual")
}
\arguments{
\item{x}{a time series object of class \code{"ts"} or
\code{"mts"}.}
\item{conversion}{type of conversion: \code{"sum"},
\code{"average"}, \code{"first"} or \code{"last"}.}
\item... | /man/ta.Rd | no_license | petersteiner/tempdisagg | R | false | false | 1,378 | rd | \name{ta}
\alias{ta}
\title{Temporal Aggregation of Time Series}
\usage{
ta(x, conversion = "sum", to = "annual")
}
\arguments{
\item{x}{a time series object of class \code{"ts"} or
\code{"mts"}.}
\item{conversion}{type of conversion: \code{"sum"},
\code{"average"}, \code{"first"} or \code{"last"}.}
\item... |
test_that("test_me works", {
library(parallel)
mccollect(mcparallel(
expect_equal(test1(2, 2), 4)
))
mccollect(mcparallel(
expect_equal(test2(2, 2), 4)
))
expect_equal(test3(2, 2), 0)
})
| /tests/testthat/TestParallel/tests/testthat/test-TestParallel.R | permissive | r-lib/covr | R | false | false | 212 | r | test_that("test_me works", {
library(parallel)
mccollect(mcparallel(
expect_equal(test1(2, 2), 4)
))
mccollect(mcparallel(
expect_equal(test2(2, 2), 4)
))
expect_equal(test3(2, 2), 0)
})
|
library("tidyverse")
library("stringr")
library("yaml")
library("parallel")
initial.options <- commandArgs(trailingOnly = FALSE)
script.basename <- sub("--file=", "", initial.options[grep("--file=", initial.options)]) %>%
dirname
setwd(script.basename)
args <- yaml.load_file("../_config.yaml")
attach(args)
pred.fil... | /R/evalPred.R | permissive | theandyb/smaug-redux | R | false | false | 1,418 | r | library("tidyverse")
library("stringr")
library("yaml")
library("parallel")
initial.options <- commandArgs(trailingOnly = FALSE)
script.basename <- sub("--file=", "", initial.options[grep("--file=", initial.options)]) %>%
dirname
setwd(script.basename)
args <- yaml.load_file("../_config.yaml")
attach(args)
pred.fil... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Ca.R
\name{Ca}
\alias{Ca}
\title{Coefficient of Association}
\usage{
Ca(traj1, traj2, tc = 0, dc = 0)
}
\arguments{
\item{traj1}{an object of the class \code{ltraj} which contains the time-stamped
movement fixes of the first object. Note thi... | /man/Ca.Rd | no_license | jedalong/wildlifeDI | R | false | true | 2,318 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Ca.R
\name{Ca}
\alias{Ca}
\title{Coefficient of Association}
\usage{
Ca(traj1, traj2, tc = 0, dc = 0)
}
\arguments{
\item{traj1}{an object of the class \code{ltraj} which contains the time-stamped
movement fixes of the first object. Note thi... |
match_length <- function(pattern, text) {
mat <- gregexpr(pattern, text)[[1]]
if (mat[1] == -1) 0 else sum(attr(mat, "match.length"))
}
#' @include expressions.R
get_top_script <- function(text) {
num_letters <- vapply(expressions, match_length, 1, text = text)
if (any(num_letters > 0)) {
names(which.max... | /R/script.R | permissive | gaborcsardi/franc | R | false | false | 361 | r |
match_length <- function(pattern, text) {
mat <- gregexpr(pattern, text)[[1]]
if (mat[1] == -1) 0 else sum(attr(mat, "match.length"))
}
#' @include expressions.R
get_top_script <- function(text) {
num_letters <- vapply(expressions, match_length, 1, text = text)
if (any(num_letters > 0)) {
names(which.max... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rearrangePartners.R
\name{rearrangePartners}
\alias{rearrangePartners}
\title{Rearrange partners}
\usage{
rearrangePartners(x, perm)
}
\arguments{
\item{x}{An IndexedRelations object.}
\item{perm}{An integer vector specifying the permutation... | /man/rearrangePartners.Rd | no_license | LTLA/IndexedRelations | R | false | true | 1,048 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rearrangePartners.R
\name{rearrangePartners}
\alias{rearrangePartners}
\title{Rearrange partners}
\usage{
rearrangePartners(x, perm)
}
\arguments{
\item{x}{An IndexedRelations object.}
\item{perm}{An integer vector specifying the permutation... |
\name{perDistance}
\alias{perDistance}
\title{
Periodogram based dissimilarity
}
\description{
Calculates the dissimilarity between two numerical series of the same length based on the distance between their periodograms.
}
\usage{
perDistance(x, y, ...)
}
\arguments{
\item{x}{
Numeric vector containing the firs... | /man/perDistance.Rd | no_license | Kevin-Jin/TSdist | R | false | false | 1,736 | rd | \name{perDistance}
\alias{perDistance}
\title{
Periodogram based dissimilarity
}
\description{
Calculates the dissimilarity between two numerical series of the same length based on the distance between their periodograms.
}
\usage{
perDistance(x, y, ...)
}
\arguments{
\item{x}{
Numeric vector containing the firs... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conos.r
\name{quickCPCA}
\alias{quickCPCA}
\title{Perform cpca on two samples}
\usage{
quickCPCA(r.n, data.type = "counts", k = 30, ncomps = 100,
n.odgenes = NULL, var.scale = TRUE, verbose = TRUE,
neighborhood.average = FALSE)
}
\argumen... | /man/quickCPCA.Rd | no_license | camiel-m/conos | R | false | true | 777 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conos.r
\name{quickCPCA}
\alias{quickCPCA}
\title{Perform cpca on two samples}
\usage{
quickCPCA(r.n, data.type = "counts", k = 30, ncomps = 100,
n.odgenes = NULL, var.scale = TRUE, verbose = TRUE,
neighborhood.average = FALSE)
}
\argumen... |
# Copyright 2019 Battelle Memorial Institute; see the LICENSE file.
#' module_gcam.usa_LA101.EIA_SEDS
#'
#' Produce two ouput tables from the EIA state energy database:
#' \itemize{
#' \item{L101.inEIA_EJ_state_S_F: Energy data by GCAM sector and fuel, state, and year; energy units in EJ, years from 1971-2010, includ... | /R/zchunk_LA101.EIA_SEDS.R | permissive | almondtea/gcamdata | R | false | false | 5,747 | r | # Copyright 2019 Battelle Memorial Institute; see the LICENSE file.
#' module_gcam.usa_LA101.EIA_SEDS
#'
#' Produce two ouput tables from the EIA state energy database:
#' \itemize{
#' \item{L101.inEIA_EJ_state_S_F: Energy data by GCAM sector and fuel, state, and year; energy units in EJ, years from 1971-2010, includ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.