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 |
|---|---|---|---|---|---|---|---|---|---|
#' @title Create a stacked learner object
#'
#' @description A stacked learner uses predictions of several base learners and fits
#' a super learner using these predictions as predictors in order to predict the outcome.
#'
#' @param base.learners [(list of) \code{\link{Learner}}]\cr
#' A list of learners created w... | /R/StackedLearner.R | no_license | Daron-Wan/mlr | R | false | false | 13,191 | r | #' @title Create a stacked learner object
#'
#' @description A stacked learner uses predictions of several base learners and fits
#' a super learner using these predictions as predictors in order to predict the outcome.
#'
#' @param base.learners [(list of) \code{\link{Learner}}]\cr
#' A list of learners created w... |
# methods for assignment
maxNode <- function(node){
return( if( is.null(node$right) ) node else maxNode(node$right) )
}
# we're going to make a BST (Binary Search Tree) yay!
treeNode_ <- setRefClass("treeNode_",
fields = list(
# the data the tree holds
dat... | /Session 9/BST.R | no_license | mrechesketch/Learning-R | R | false | false | 10,033 | r | # methods for assignment
maxNode <- function(node){
return( if( is.null(node$right) ) node else maxNode(node$right) )
}
# we're going to make a BST (Binary Search Tree) yay!
treeNode_ <- setRefClass("treeNode_",
fields = list(
# the data the tree holds
dat... |
# Author: Babak Naimi, naimi.b@gmail.com
# Date (last update): Sep. 2021
# Version 1.5
# Licence GPL v3
.getFeature.linear <- function(x) {
x
}
.getFeature.quad <- function(x) {
x * x
}
.getFeature.cubic <- function(x) {
x * x * x
}
.getFeature.poly <- function(x,degree=3,raw=TRUE) {
d <- as.data.frame(po... | /R/modelFrame.R | no_license | babaknaimi/sdm | R | false | false | 9,762 | r | # Author: Babak Naimi, naimi.b@gmail.com
# Date (last update): Sep. 2021
# Version 1.5
# Licence GPL v3
.getFeature.linear <- function(x) {
x
}
.getFeature.quad <- function(x) {
x * x
}
.getFeature.cubic <- function(x) {
x * x * x
}
.getFeature.poly <- function(x,degree=3,raw=TRUE) {
d <- as.data.frame(po... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eq_map_label.R
\name{eq_map}
\alias{eq_map}
\title{Earthquake map}
\usage{
eq_map(data, annot_col = "DATE")
}
\arguments{
\item{data}{Cleaned data from eq_clean_data function.}
\item{annot_col}{Annotation column.}
}
\description{
Earthquake ... | /man/eq_map.Rd | no_license | MarkPados/Earthquakes.capstone.project | R | false | true | 587 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eq_map_label.R
\name{eq_map}
\alias{eq_map}
\title{Earthquake map}
\usage{
eq_map(data, annot_col = "DATE")
}
\arguments{
\item{data}{Cleaned data from eq_clean_data function.}
\item{annot_col}{Annotation column.}
}
\description{
Earthquake ... |
#! /usr/bin/env Rscript
###################################################################
# ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ #
###################################################################
###################################################################
# aromaRPCOR.R is a s... | /modules/aroma/aromaRPCOR.R | no_license | mattcieslak/xcpEngine | R | false | false | 4,797 | r | #! /usr/bin/env Rscript
###################################################################
# ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ ☭ #
###################################################################
###################################################################
# aromaRPCOR.R is a s... |
##### gnoad 비교, #### freq
##### gnoad 비교
setwd("~/Desktop/KCDC/long_read/analysis/01.variant.calling/")
front <- 28477797
df <- read.table("each/uniq.list.txt",header = T)
deepvariant <- read.table("HLA.merge_usingGLnexus_marker.QUAL.txt",header = T)
df$Real.POS <- front + df$POS
deepvariant$Real.POS <- front + deepv... | /KCDC/HLA_imputataion/longRead/02.withgnoAD.R | no_license | ksmpooh/SungminCode | R | false | false | 2,773 | r | ##### gnoad 비교, #### freq
##### gnoad 비교
setwd("~/Desktop/KCDC/long_read/analysis/01.variant.calling/")
front <- 28477797
df <- read.table("each/uniq.list.txt",header = T)
deepvariant <- read.table("HLA.merge_usingGLnexus_marker.QUAL.txt",header = T)
df$Real.POS <- front + df$POS
deepvariant$Real.POS <- front + deepv... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_sample_names.R
\name{extract_sample_names}
\alias{extract_sample_names}
\title{Extract Sample Names}
\usage{
extract_sample_names(
x,
samples = NULL,
sep = "-|_",
pos = 1,
max.nchar = NULL,
replace = NULL
)
}
\arguments{
\... | /man/extract_sample_names.Rd | permissive | Chenmengpin/scalop | R | false | true | 1,251 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_sample_names.R
\name{extract_sample_names}
\alias{extract_sample_names}
\title{Extract Sample Names}
\usage{
extract_sample_names(
x,
samples = NULL,
sep = "-|_",
pos = 1,
max.nchar = NULL,
replace = NULL
)
}
\arguments{
\... |
\name{Hex}
\alias{Hex}
\title{Calculates expected heterozygosity for \code{divRatio}}
\description{Calculates expected heterozygosity for \code{divRatio}}
\usage{
Hex(x)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{pop_list output from internal \code{readGenepop}}
}
\auth... | /man/Hex.Rd | no_license | kkeenan02/diveRsity | R | false | false | 356 | rd | \name{Hex}
\alias{Hex}
\title{Calculates expected heterozygosity for \code{divRatio}}
\description{Calculates expected heterozygosity for \code{divRatio}}
\usage{
Hex(x)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{pop_list output from internal \code{readGenepop}}
}
\auth... |
lc_lr_p <- readPNG(here("lc_lr.png"))
lc_lr_p[1,1,]
as.raster(lc_lr_p)
img_3 <- readPNG(here("img3.png"))
img_list <- c(lc_lr_p, img_3)
par(mfrow = c(3, 3))
grid.raster(img_3)
grid.raster(lc_lr_p)
x = 1:10
y = 1:10
grid.newpage()
rasterImage(img_3, 1, 2, 2, 1)
r <- as.raster(c(0.5, 1, 0.5))
plot(r)
# additional a... | /Figures/Fig3.R | permissive | jaehyoungtlee/HCD_data | R | false | false | 735 | r | lc_lr_p <- readPNG(here("lc_lr.png"))
lc_lr_p[1,1,]
as.raster(lc_lr_p)
img_3 <- readPNG(here("img3.png"))
img_list <- c(lc_lr_p, img_3)
par(mfrow = c(3, 3))
grid.raster(img_3)
grid.raster(lc_lr_p)
x = 1:10
y = 1:10
grid.newpage()
rasterImage(img_3, 1, 2, 2, 1)
r <- as.raster(c(0.5, 1, 0.5))
plot(r)
# additional a... |
library("extraTrees")
## making data:
makeDataRegr <- function(n = 1000, p = 10, ntasks = 50) {
out = list()
x = matrix(runif(n*p), n, p)
out$x = x
out$tasks = rep( 1:ntasks, length.out=nrow(x) )
y = rep( 1, n)
for (i in 1:n) {
if (x[i,1] < 0.5) {
if (out$tasks[i] %% 2 ==... | /maven-project/R-test/basic-MTregression.R | permissive | hute37/extraTrees | R | false | false | 1,298 | r | library("extraTrees")
## making data:
makeDataRegr <- function(n = 1000, p = 10, ntasks = 50) {
out = list()
x = matrix(runif(n*p), n, p)
out$x = x
out$tasks = rep( 1:ntasks, length.out=nrow(x) )
y = rep( 1, n)
for (i in 1:n) {
if (x[i,1] < 0.5) {
if (out$tasks[i] %% 2 ==... |
library(gdata)
library(readxl)
library(RSpectra)
library(EnvStats)
library(matlib)
getwd()
p=read_xlsx("Project_dataset.xlsx", col_names= FALSE)
data_set=p
summary(data_set)
dim(data_set)
#data_set is the original data we have
#checking missing values
miss_vals=c()
for(x in 1:ncol(data_set)){
p=sum(is.na(data_set[,x]... | /ISEn 614 Final Code for Project.R | no_license | yashmehta95/614-Advanced-Quality-Control-Project | R | false | false | 3,509 | r | library(gdata)
library(readxl)
library(RSpectra)
library(EnvStats)
library(matlib)
getwd()
p=read_xlsx("Project_dataset.xlsx", col_names= FALSE)
data_set=p
summary(data_set)
dim(data_set)
#data_set is the original data we have
#checking missing values
miss_vals=c()
for(x in 1:ncol(data_set)){
p=sum(is.na(data_set[,x]... |
setwd("c:/z/Courses/S510/Notes")
x=rep(c(0,5,10,15,20,25),each=10)
plant=factor(rep(1:30,each=2))
set.seed(31673)
u=rnorm(30,0,.7)
e=rnorm(60,0,.5)
#mistake here. Should have used rep(u,each=2) in place of u.
y=rpois(60,exp(log(60)-.15*x+u+e))
write.table(data.frame(x=x,y=y),"26LeafInfectionData.txt",
... | /S510/29GLMMmywork.R | no_license | dnett/dnett.github.io | R | false | false | 5,909 | r | setwd("c:/z/Courses/S510/Notes")
x=rep(c(0,5,10,15,20,25),each=10)
plant=factor(rep(1:30,each=2))
set.seed(31673)
u=rnorm(30,0,.7)
e=rnorm(60,0,.5)
#mistake here. Should have used rep(u,each=2) in place of u.
y=rpois(60,exp(log(60)-.15*x+u+e))
write.table(data.frame(x=x,y=y),"26LeafInfectionData.txt",
... |
deletion1 <- function(string){
len <- nchar(string)
i<-1:len
bucket<-c()
bucket<-append(bucket,string)
bucket<-append(bucket,unique(as.vector(sapply(string, function(x) paste0(str_sub(string,1,i-1),str_sub(string,i+1,nchar(string)))))))
bucket
}
| /TSTr/R/deletion1.R | no_license | ingted/R-Examples | R | false | false | 266 | r | deletion1 <- function(string){
len <- nchar(string)
i<-1:len
bucket<-c()
bucket<-append(bucket,string)
bucket<-append(bucket,unique(as.vector(sapply(string, function(x) paste0(str_sub(string,1,i-1),str_sub(string,i+1,nchar(string)))))))
bucket
}
|
data = read.csv('I:/ECS171/Dataset/finaldata.csv', stringsAsFactors = FALSE)
dim(data) #1532 55
data[, 'pct_ba'] = as.numeric(data[, 'pct_ba'])
data[, 'pct_grad_prof'] = as.numeric(data[, 'pct_grad_prof'])
data[, 'pct_born_us'] = as.numeric(data[, 'pct_born_us'])
data = data[, -c(1:3)] #remove first three colu... | /GraduateIncomeModeling/OLS_Lasso_tree.R | no_license | rainbowfan/ECS171-MachineLearning | R | false | false | 4,041 | r | data = read.csv('I:/ECS171/Dataset/finaldata.csv', stringsAsFactors = FALSE)
dim(data) #1532 55
data[, 'pct_ba'] = as.numeric(data[, 'pct_ba'])
data[, 'pct_grad_prof'] = as.numeric(data[, 'pct_grad_prof'])
data[, 'pct_born_us'] = as.numeric(data[, 'pct_born_us'])
data = data[, -c(1:3)] #remove first three colu... |
#!/usr/bin/env Rscript
rm(list=ls())
args <- commandArgs(TRUE)
if(length(args)<3){
stop("Usage: wrapper.R db=''viral_refseq.fna'' directory1 directory2 ...")
}
bin = "hackathon_v001_metagenomics"
cores = 15
viralDb = eval(parse(text=args[1]))
download_not_installed<-function(x){
for(i in x){
... | /sra_blast/bin/old/wrapper.R | permissive | NCBI-Hackathons/hackathon_v001_metagenomics | R | false | false | 1,283 | r | #!/usr/bin/env Rscript
rm(list=ls())
args <- commandArgs(TRUE)
if(length(args)<3){
stop("Usage: wrapper.R db=''viral_refseq.fna'' directory1 directory2 ...")
}
bin = "hackathon_v001_metagenomics"
cores = 15
viralDb = eval(parse(text=args[1]))
download_not_installed<-function(x){
for(i in x){
... |
#' lala
#'
#' Bundestag election results for the regional laender level 1949-2017
#'
#' @format A data frame with 236 rows and 13 variables:
#' \describe{
#' \item{year}{election year}
#' \item{land}{regional level}
#' \item{date}{election date}
#' \item{...}{party vote share vector}
#' \item{wbt}{voter turno... | /R/wahldata.R | permissive | schliebs/voteR | R | false | false | 4,215 | r | #' lala
#'
#' Bundestag election results for the regional laender level 1949-2017
#'
#' @format A data frame with 236 rows and 13 variables:
#' \describe{
#' \item{year}{election year}
#' \item{land}{regional level}
#' \item{date}{election date}
#' \item{...}{party vote share vector}
#' \item{wbt}{voter turno... |
# Figure 5 with MGNify MGYS00001863 dataset
# https://www.ebi.ac.uk/metagenomics/projects/ERP023694
# https://www.ebi.ac.uk/metagenomics/studies/MGYS00001863 for actual dataset
# https://www.biorxiv.org/content/biorxiv/early/2018/05/11/248302.full.pdf
eff.plot <- function(x, main=""){
plot(x$diff.win, x$diff.btw, pc... | /scripts/Fig_5.R | permissive | JRWu/Log-Ratio-Publication | R | false | false | 2,552 | r | # Figure 5 with MGNify MGYS00001863 dataset
# https://www.ebi.ac.uk/metagenomics/projects/ERP023694
# https://www.ebi.ac.uk/metagenomics/studies/MGYS00001863 for actual dataset
# https://www.biorxiv.org/content/biorxiv/early/2018/05/11/248302.full.pdf
eff.plot <- function(x, main=""){
plot(x$diff.win, x$diff.btw, pc... |
r=0.20
https://sandbox.dams.library.ucdavis.edu/fcrepo/rest/collection/sherry-lehmann/catalogs/d74k53/media/images/d74k53-018/svc:tesseract/full/full/0.20/default.jpg Accept:application/hocr+xml
| /ark_87287/d74k53/d74k53-018/rotated.r | permissive | ucd-library/wine-price-extraction | R | false | false | 195 | r | r=0.20
https://sandbox.dams.library.ucdavis.edu/fcrepo/rest/collection/sherry-lehmann/catalogs/d74k53/media/images/d74k53-018/svc:tesseract/full/full/0.20/default.jpg Accept:application/hocr+xml
|
applyThreshold <-
function(commMatrix, threshold){
if(class(threshold) == "data.frame" || class(threshold) == "matrix"){
i <- match(colnames(commMatrix), threshold[,1])
thres <- threshold[i,2]
}
if(class(threshold) == "numeric"){
thres <- threshold
}
nComm <- apply(commMatrix, MARGIN=1, FUN=functi... | /R/applyThreshold.R | no_license | dinilu/paleoCLMs-package | R | false | false | 395 | r | applyThreshold <-
function(commMatrix, threshold){
if(class(threshold) == "data.frame" || class(threshold) == "matrix"){
i <- match(colnames(commMatrix), threshold[,1])
thres <- threshold[i,2]
}
if(class(threshold) == "numeric"){
thres <- threshold
}
nComm <- apply(commMatrix, MARGIN=1, FUN=functi... |
#importing data
dataset <- read.csv('proction.csv')
#set_index as district name
rownames(dataset) <- dataset$District_Name
df <- dataset[,c("Area","Production")]
df <- scale(df)
#computes PAM
library(cluster)
library(factoextra)
set.seed(123)
pam.res <- pam(df, 3)
#printing pam result
print(pam.res)
... | /Cluster/pan.R | permissive | LordChampa31/Agricultural-crop-production-prediction-Analytics | R | false | false | 976 | r |
#importing data
dataset <- read.csv('proction.csv')
#set_index as district name
rownames(dataset) <- dataset$District_Name
df <- dataset[,c("Area","Production")]
df <- scale(df)
#computes PAM
library(cluster)
library(factoextra)
set.seed(123)
pam.res <- pam(df, 3)
#printing pam result
print(pam.res)
... |
context("Test Standard Adjustment")
test_that("stnd adj works correctly", {
# Transmat
pre_test_var <- c(1, 0, 0, 1, 0, 1, 0)
pst_test_var <- c(1, 0, 1, 1, 0, 1, 1)
res <- transmat(pre_test_var, pst_test_var)
cor_ans <- c(x00 = 2, x01 = 2, x10 = 0, x11 = 3)
expect_that(sapply(res, as.numeric), equals(co... | /tests/testthat/test-stnd-adj.R | permissive | soodoku/guess | R | false | false | 850 | r | context("Test Standard Adjustment")
test_that("stnd adj works correctly", {
# Transmat
pre_test_var <- c(1, 0, 0, 1, 0, 1, 0)
pst_test_var <- c(1, 0, 1, 1, 0, 1, 1)
res <- transmat(pre_test_var, pst_test_var)
cor_ans <- c(x00 = 2, x01 = 2, x10 = 0, x11 = 3)
expect_that(sapply(res, as.numeric), equals(co... |
#----------------------------------------------------------------------------#
#' Simulated EHR data - Demographics.
#'
#' Simulated EHR data (no PHI constraints) featuring demographics data for ~500 patients.
#'
#' @details Maintained by: Clara Marquardt
#'
#' @docType data
#'
#' @usage data(dem)
"dem"
#---------... | /R/dem_data.R | permissive | sysmedlab/ehR | R | false | false | 389 | r | #----------------------------------------------------------------------------#
#' Simulated EHR data - Demographics.
#'
#' Simulated EHR data (no PHI constraints) featuring demographics data for ~500 patients.
#'
#' @details Maintained by: Clara Marquardt
#'
#' @docType data
#'
#' @usage data(dem)
"dem"
#---------... |
##Create makeCacheMatrix
makeCacheMatrix <- function(x = matrix) {
##setting the mean to NULL as a placeholder for a future value
inv<-NULL
##defines a function to set the vector, x, to a new vector, y, and resets the inv to NULL
set<-function(y) {
x<<-y
inv<<-NULL
}
## Returning the vect... | /cachematrix.R | no_license | alexandria86/gitrepo | R | false | false | 918 | r | ##Create makeCacheMatrix
makeCacheMatrix <- function(x = matrix) {
##setting the mean to NULL as a placeholder for a future value
inv<-NULL
##defines a function to set the vector, x, to a new vector, y, and resets the inv to NULL
set<-function(y) {
x<<-y
inv<<-NULL
}
## Returning the vect... |
# Based on readthedown template from https://raw.githubusercontent.com/juba/rmdformats/master/R/readthedown.R
#' Convert to an HTML document
#'
#' Format for converting from R Markdown to an HTML document.
#'
#' @details
#' CSS adapted from the readtheorg theme of the org-html-themes project :
#' \url{https://github.co... | /brew/R/brew.R | no_license | joebrew/rmd_template | R | false | false | 7,000 | r | # Based on readthedown template from https://raw.githubusercontent.com/juba/rmdformats/master/R/readthedown.R
#' Convert to an HTML document
#'
#' Format for converting from R Markdown to an HTML document.
#'
#' @details
#' CSS adapted from the readtheorg theme of the org-html-themes project :
#' \url{https://github.co... |
if(!"repdata-data-StormData.csv.bz2" %in% dir("./")){
download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2", destfile = "repdata-data-StormData.csv.bz2")
}
if(!"repdata-data-StormData.csv" %in% dir("./")){
unzip("repdata-data-StormData.csv.bz2")
}
if(!"ds" %in% ls()){
ds<-read.c... | /Storm.R | no_license | gorokhoff/ReproducibleResearch--Storm | R | false | false | 2,795 | r | if(!"repdata-data-StormData.csv.bz2" %in% dir("./")){
download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2", destfile = "repdata-data-StormData.csv.bz2")
}
if(!"repdata-data-StormData.csv" %in% dir("./")){
unzip("repdata-data-StormData.csv.bz2")
}
if(!"ds" %in% ls()){
ds<-read.c... |
library(ggplot2)
library(scales)
df<-read.table("nrpcc.summary_table.txt", sep="\t", header=T, stringsAsFactors = F)
myColors <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7","#999999","#000000")
names(myColors) <- c(seq(0,7,1), ">7")
###normal overview (exclude PD4120)
p1<-ggplot(dat... | /code_figures_paper/suppfigure_2a/figure_S2a.R | no_license | osamashiraz/Heterogeneity | R | false | false | 1,338 | r | library(ggplot2)
library(scales)
df<-read.table("nrpcc.summary_table.txt", sep="\t", header=T, stringsAsFactors = F)
myColors <- c("#E69F00", "#56B4E9", "#009E73", "#F0E442", "#0072B2", "#D55E00", "#CC79A7","#999999","#000000")
names(myColors) <- c(seq(0,7,1), ">7")
###normal overview (exclude PD4120)
p1<-ggplot(dat... |
#**************************************************************************************************************************************************
#
# TEAM RVESTERS - WEB SCRAPING and SENTIMENT ANALYSIS
#
#*****************************************************************... | /RVesters_Web Scraping_Sentiment Analysis.R | no_license | svsuriyaa/NLP---Aspect-Based-Sentiment-Analysis-of-Customer-Reviews-using-Hybrid-Pattern-Matching | R | false | false | 19,799 | r | #**************************************************************************************************************************************************
#
# TEAM RVESTERS - WEB SCRAPING and SENTIMENT ANALYSIS
#
#*****************************************************************... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()){
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() {x}
setInverse ... | /cachematrix.R | no_license | Anvil-28/ProgrammingAssignment2 | R | false | false | 729 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()){
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() {x}
setInverse ... |
# Load packages using script copied from:
# https://www.r-bloggers.com/install-and-load-missing-specifiedneeded-packages-on-the-fly/
# needed packages for a job
need <- c("shiny",
"shinythemes",
"ggplot2",
"dplyr",
"rlang",
"data.table",
"stringi",
#... | /global/load_packages.R | no_license | icprbcoop/2018_DroughtOps_zsmith | R | false | false | 912 | r | # Load packages using script copied from:
# https://www.r-bloggers.com/install-and-load-missing-specifiedneeded-packages-on-the-fly/
# needed packages for a job
need <- c("shiny",
"shinythemes",
"ggplot2",
"dplyr",
"rlang",
"data.table",
"stringi",
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynapi.R
\name{$.tushare_api}
\alias{$.tushare_api}
\title{Dynamic Tushare API functions}
\usage{
\method{$}{tushare_api}(x, func)
}
\arguments{
\item{x}{A tushare_api object}
\item{func}{Tushare API function to call}
}
\value{
a data.frame/... | /man/cash-.tushare_api.Rd | permissive | blakexu/TushareR | R | false | true | 1,789 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynapi.R
\name{$.tushare_api}
\alias{$.tushare_api}
\title{Dynamic Tushare API functions}
\usage{
\method{$}{tushare_api}(x, func)
}
\arguments{
\item{x}{A tushare_api object}
\item{func}{Tushare API function to call}
}
\value{
a data.frame/... |
# Include quantmod package
library(quantmod)
# Read file
setwd("/Users/raywu/R") # work directory
files <- list.files(path = "/Users/raywu/R", pattern ="*.list")
file_count <- length(list.files( path = "/Users/raywu/R", pattern ="*.list"))
# Get stock list
for ( i in 1:file_count){
assign ( files[i], read.table( fi... | /KD.R | no_license | pingjui/R | R | false | false | 748 | r | # Include quantmod package
library(quantmod)
# Read file
setwd("/Users/raywu/R") # work directory
files <- list.files(path = "/Users/raywu/R", pattern ="*.list")
file_count <- length(list.files( path = "/Users/raywu/R", pattern ="*.list"))
# Get stock list
for ( i in 1:file_count){
assign ( files[i], read.table( fi... |
\name{MST}
\alias{MST}
\alias{splitting.stat.MST1}
\alias{splitting.stat.MST2}
\alias{splitting.stat.MST3}
\alias{splitting.stat.MST4}
\title{Multivariate Survival Trees}
\description{
Constructs trees for multivariate survival data using marginal and frailty models. A wrapper function that grows a large initi... | /man/MST.Rd | no_license | cran/MST | R | false | false | 9,666 | rd | \name{MST}
\alias{MST}
\alias{splitting.stat.MST1}
\alias{splitting.stat.MST2}
\alias{splitting.stat.MST3}
\alias{splitting.stat.MST4}
\title{Multivariate Survival Trees}
\description{
Constructs trees for multivariate survival data using marginal and frailty models. A wrapper function that grows a large initi... |
#' @templateVar class glmnet
#' @template title_desc_tidy
#'
#' @param x A `glmnet` object returned from [glmnet::glmnet()].
#' @param return_zeros Logical indicating whether coefficients with value zero
#' zero should be included in the results. Defaults to `FALSE`.
#' @template param_unused_dots
#'
#' @evalRd retur... | /R/glmnet-glmnet-tidiers.R | permissive | tidymodels/broom | R | false | false | 3,182 | r | #' @templateVar class glmnet
#' @template title_desc_tidy
#'
#' @param x A `glmnet` object returned from [glmnet::glmnet()].
#' @param return_zeros Logical indicating whether coefficients with value zero
#' zero should be included in the results. Defaults to `FALSE`.
#' @template param_unused_dots
#'
#' @evalRd retur... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{chart.ACF}
\alias{chart.ACF}
\alias{chart.ACFplus}
\title{Create ACF chart or ACF with PACF two-panel chart}
\usage{
chart.ACF(R, maxlag = NULL, elementcolor = "gray", main = NULL, ...)
chart.ACFplus(R, maxlag = NULL, elementcolor = "gray", main = NULL... | /man/chart.ACF.Rd | no_license | ecjbosu/PerformanceAnalytics | R | false | false | 1,659 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{chart.ACF}
\alias{chart.ACF}
\alias{chart.ACFplus}
\title{Create ACF chart or ACF with PACF two-panel chart}
\usage{
chart.ACF(R, maxlag = NULL, elementcolor = "gray", main = NULL, ...)
chart.ACFplus(R, maxlag = NULL, elementcolor = "gray", main = NULL... |
#' Deprecated function.
#'
#' Use blankWorkspace instead.
#'
#' @inheritParams blankWorkspace
#'
#' @examples
#' \donttest{
#' # createWorkspace is deprecated. Use blankWorkspace instead.
#' }
#'
#' @return No return value, called for side effects
#'
#' @export
#'
createWorkspace <- function(dir, force = FALSE) { # no... | /R/z_examples.R | no_license | hugomflavio/actel | R | false | false | 8,810 | r | #' Deprecated function.
#'
#' Use blankWorkspace instead.
#'
#' @inheritParams blankWorkspace
#'
#' @examples
#' \donttest{
#' # createWorkspace is deprecated. Use blankWorkspace instead.
#' }
#'
#' @return No return value, called for side effects
#'
#' @export
#'
createWorkspace <- function(dir, force = FALSE) { # no... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fish_summary.R
\name{fishsummary}
\alias{fishsummary}
\title{Summarize a set of records downloaded from FishNet2}
\usage{
fishsummary(input, verbose = TRUE)
}
\arguments{
\item{input}{A dataframe in FishNet2 standard format (by using read.csv... | /man/fishsummary.Rd | no_license | cran/rfishnet2 | R | false | true | 550 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fish_summary.R
\name{fishsummary}
\alias{fishsummary}
\title{Summarize a set of records downloaded from FishNet2}
\usage{
fishsummary(input, verbose = TRUE)
}
\arguments{
\item{input}{A dataframe in FishNet2 standard format (by using read.csv... |
# install.packages('keras')
# install.packages('purrr')
# install.packages('functional')
library(MASS)
library(caret)
library(fGarch)
library(fitdistrplus)
library(pracma)
library(BBmisc)
library(functional)
library(dplyr)
library(keras)
library(lubridate)
library(tensorflow)
Sys.sleep(5)
install_tensorflow(restart_se... | /code0.3_500/Model4_large.R | no_license | paai-lab/Online-Anomaly-Detection-Extension-2021 | R | false | false | 17,474 | r | # install.packages('keras')
# install.packages('purrr')
# install.packages('functional')
library(MASS)
library(caret)
library(fGarch)
library(fitdistrplus)
library(pracma)
library(BBmisc)
library(functional)
library(dplyr)
library(keras)
library(lubridate)
library(tensorflow)
Sys.sleep(5)
install_tensorflow(restart_se... |
performAnalysis2 <- function() {
dt <- read.csv("activity.csv")
dt <- filter(dt, steps != 0 & !is.na(steps))
dtAvgIntervals <- aggregate(dt$steps, by=list(dt$interval), FUN=mean, rm.na = T)
colnames(dtAvgIntervals) <- c("Interval", "Average")
with (dtAvgIntervals, plot(Interval,
... | /performAnalysis2.R | no_license | skekatpuray/RepData_PeerAssessment1 | R | false | false | 686 | r | performAnalysis2 <- function() {
dt <- read.csv("activity.csv")
dt <- filter(dt, steps != 0 & !is.na(steps))
dtAvgIntervals <- aggregate(dt$steps, by=list(dt$interval), FUN=mean, rm.na = T)
colnames(dtAvgIntervals) <- c("Interval", "Average")
with (dtAvgIntervals, plot(Interval,
... |
install.packages("gganimate")
library(gganimate)
install.packages("tweenr")
library(tweenr)
install.packages("RCurl")
library(RCurl)
df <- read.csv(textConnection(getURL("https://docs.google.com/spreadsheets/d/e/2PACX-1vS0wAfZt28-tqhdxEX4EartljewLmOKpa0XCvDFgqKqibaNYuHFABsiN3NGgOIWj06tfyynEdg3q6bO/pub?gid=1579905509&si... | /Class4/gganimate_Martin.R | no_license | sofigdl/AseasyasR | R | false | false | 5,528 | r | install.packages("gganimate")
library(gganimate)
install.packages("tweenr")
library(tweenr)
install.packages("RCurl")
library(RCurl)
df <- read.csv(textConnection(getURL("https://docs.google.com/spreadsheets/d/e/2PACX-1vS0wAfZt28-tqhdxEX4EartljewLmOKpa0XCvDFgqKqibaNYuHFABsiN3NGgOIWj06tfyynEdg3q6bO/pub?gid=1579905509&si... |
#Forked from Ed Küpfer
#https://gist.github.com/edkupfer
#https://gist.github.com/asteves/7266330
halfcourt <- function () {
palette(c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3",
"#FF7F00", "#FFFF33", "#A65628", "#F781BF", "#999999"))
#Generate Data for the 3 point line
# Define the circle; ad... | /NBA_SportVu/_function_halfcourt.R | no_license | davidfombella/Basketball | R | false | false | 2,754 | r | #Forked from Ed Küpfer
#https://gist.github.com/edkupfer
#https://gist.github.com/asteves/7266330
halfcourt <- function () {
palette(c("#E41A1C", "#377EB8", "#4DAF4A", "#984EA3",
"#FF7F00", "#FFFF33", "#A65628", "#F781BF", "#999999"))
#Generate Data for the 3 point line
# Define the circle; ad... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smooth.R
\name{xrf_add_smooth_filter}
\alias{xrf_add_smooth_filter}
\title{Add smooth using iterative filtering}
\usage{
xrf_add_smooth_filter(
.spectra,
.values = .data$.spectra$cps,
filter = xrf_filter_gaussian(),
.iter = 5,
.epsi... | /man/xrf_add_smooth_filter.Rd | no_license | ekxrf/xrftools | R | false | true | 693 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smooth.R
\name{xrf_add_smooth_filter}
\alias{xrf_add_smooth_filter}
\title{Add smooth using iterative filtering}
\usage{
xrf_add_smooth_filter(
.spectra,
.values = .data$.spectra$cps,
filter = xrf_filter_gaussian(),
.iter = 5,
.epsi... |
maximinSLHD <-
function(t,m,k,power=15,nstarts=1,itermax=100,total_iter=1000000){
n=m*t
t00<-Sys.time()
aaa<-.C("maximinSLHD",as.integer(m),as.integer(k),as.integer(t),as.integer(power),as.integer(nstarts),
as.integer(itermax),as.integer(total_iter),design=integer(m*t*k),measure=double(1), ... | /SLHD/R/maximinSLHD.R | no_license | ingted/R-Examples | R | false | false | 718 | r | maximinSLHD <-
function(t,m,k,power=15,nstarts=1,itermax=100,total_iter=1000000){
n=m*t
t00<-Sys.time()
aaa<-.C("maximinSLHD",as.integer(m),as.integer(k),as.integer(t),as.integer(power),as.integer(nstarts),
as.integer(itermax),as.integer(total_iter),design=integer(m*t*k),measure=double(1), ... |
#' @include facet-.R
NULL
#' Lay out panels in a grid
#'
#' `facet_grid()` forms a matrix of panels defined by row and column
#' faceting variables. It is most useful when you have two discrete
#' variables, and all combinations of the variables exist in the data.
#' If you have only one variable with many levels, try... | /R/facet-grid-.R | permissive | tidyverse/ggplot2 | R | false | false | 19,248 | r | #' @include facet-.R
NULL
#' Lay out panels in a grid
#'
#' `facet_grid()` forms a matrix of panels defined by row and column
#' faceting variables. It is most useful when you have two discrete
#' variables, and all combinations of the variables exist in the data.
#' If you have only one variable with many levels, try... |
assign("moranbi1.test",
function(x, y, listw, randomisation=TRUE, zero.policy=NULL,
alternative="greater", rank = FALSE, na.action=na.fail, spChk=NULL,
adjust.n=TRUE) {
alternative <- match.arg(alternative, c("greater", "less", "two.sided"))
if (!inherits(listw, "listw")) stop(paste(deparse(substitute(listw... | /Funciones/moranbi1.test.R | no_license | lviviana13/GeoMelo | R | false | false | 3,873 | r | assign("moranbi1.test",
function(x, y, listw, randomisation=TRUE, zero.policy=NULL,
alternative="greater", rank = FALSE, na.action=na.fail, spChk=NULL,
adjust.n=TRUE) {
alternative <- match.arg(alternative, c("greater", "less", "two.sided"))
if (!inherits(listw, "listw")) stop(paste(deparse(substitute(listw... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/caretStack.R
\name{print.caretStack}
\alias{print.caretStack}
\title{Print a caretStack object}
\usage{
\method{print}{caretStack}(x, ...)
}
\arguments{
\item{x}{An object of class caretStack}
\item{...}{ignored}
}
\description{
This is a fu... | /man/print.caretStack.Rd | permissive | zachmayer/caretEnsemble | R | false | true | 591 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/caretStack.R
\name{print.caretStack}
\alias{print.caretStack}
\title{Print a caretStack object}
\usage{
\method{print}{caretStack}(x, ...)
}
\arguments{
\item{x}{An object of class caretStack}
\item{...}{ignored}
}
\description{
This is a fu... |
Get_cols_for_lead_times <- function(ens_data, period_start = 0, period_end = 24){
lead_times = names(ens_data) %>%
str_extract(., "[0-9]+") %>%
setdiff(NA) %>%
as.numeric()
if(period_end > lead_times[length(lead_times)]){
warning("period_end specified greater than possible lead times")
}
col_... | /code/rainHelpers/R/utils_prcp_ens_aggregate.R | no_license | katerobsau/NWO_Project | R | false | false | 3,892 | r | Get_cols_for_lead_times <- function(ens_data, period_start = 0, period_end = 24){
lead_times = names(ens_data) %>%
str_extract(., "[0-9]+") %>%
setdiff(NA) %>%
as.numeric()
if(period_end > lead_times[length(lead_times)]){
warning("period_end specified greater than possible lead times")
}
col_... |
RPDNS_USER_AGENT <- "#rstqats rpdns 0.1.0. / <https://github.com/michaelschratt/rpdns>" | /R/aaa.R | no_license | firebitsbr/rpdns | R | false | false | 87 | r | RPDNS_USER_AGENT <- "#rstqats rpdns 0.1.0. / <https://github.com/michaelschratt/rpdns>" |
library(shiny)
library(DT)
library(shinydashboard)
ui <- dashboardPage(skin = "yellow",
dashboardHeader(title = "Questionnaire"),
dashboardSidebar(
width = 250,
paste("Time:",Sys.time()),
sidebarMenu(
# fluidRow(
... | /ui.R | no_license | karafede/R_storage | R | false | false | 1,157 | r |
library(shiny)
library(DT)
library(shinydashboard)
ui <- dashboardPage(skin = "yellow",
dashboardHeader(title = "Questionnaire"),
dashboardSidebar(
width = 250,
paste("Time:",Sys.time()),
sidebarMenu(
# fluidRow(
... |
#' Fit multiple models via resampling
#'
#' [fit_resamples()] computes a set of performance metrics across one or more
#' resamples. It does not perform any tuning (see [tune_grid()] and
#' [tune_bayes()] for that), and is instead used for fitting a single
#' model+recipe or model+formula combination across many resamp... | /R/resample.R | no_license | cran/tune | R | false | false | 4,314 | r | #' Fit multiple models via resampling
#'
#' [fit_resamples()] computes a set of performance metrics across one or more
#' resamples. It does not perform any tuning (see [tune_grid()] and
#' [tune_bayes()] for that), and is instead used for fitting a single
#' model+recipe or model+formula combination across many resamp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.neptune_operations.R
\name{create_db_parameter_group}
\alias{create_db_parameter_group}
\title{Creates a new DB parameter group}
\usage{
create_db_parameter_group(DBParameterGroupName, DBParameterGroupFamily,
Description, Tags = NULL)
... | /service/paws.neptune/man/create_db_parameter_group.Rd | permissive | CR-Mercado/paws | R | false | true | 2,647 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.neptune_operations.R
\name{create_db_parameter_group}
\alias{create_db_parameter_group}
\title{Creates a new DB parameter group}
\usage{
create_db_parameter_group(DBParameterGroupName, DBParameterGroupFamily,
Description, Tags = NULL)
... |
# Script works if working directory is in the same file as the .txt file and assumes you have already
# unzipped file
# Example: setwd("C:/Users/..../Desktop/ExData_Plotting1")
# Simultaneously reads and subsets the dates of interest to make graphs; reduces computational demands
library(sqldf)
options(gsubfn.e... | /plot1.R | no_license | Donfernando07/ExData_Plotting1 | R | false | false | 954 | r | # Script works if working directory is in the same file as the .txt file and assumes you have already
# unzipped file
# Example: setwd("C:/Users/..../Desktop/ExData_Plotting1")
# Simultaneously reads and subsets the dates of interest to make graphs; reduces computational demands
library(sqldf)
options(gsubfn.e... |
\encoding{UTF-8}
\name{OrderEV}
\alias{OrderEV}
\alias{OrderEV-methods}
\alias{OrderEV,ISAModules-method}
\alias{OrderEV,Biclust-method}
\alias{OrderEV,list-method}
\title{Find the optimal arrangement of biclusters for visualization in
ExpressionView}
\description{Finds the optimal arrangement of possibly overlapping... | /RExpressionView/man/OrderEV.Rd | no_license | gaborcsardi/ISA | R | false | false | 3,979 | rd | \encoding{UTF-8}
\name{OrderEV}
\alias{OrderEV}
\alias{OrderEV-methods}
\alias{OrderEV,ISAModules-method}
\alias{OrderEV,Biclust-method}
\alias{OrderEV,list-method}
\title{Find the optimal arrangement of biclusters for visualization in
ExpressionView}
\description{Finds the optimal arrangement of possibly overlapping... |
#######################################################
#=============Setup the Working Directory=============#
#Set the working directory to the project folder by #
#running the appropriate script below. Note, you can #
#run the data off of your OneDrive or DropBox. #
###############################################... | /Tutorials/descriptive-statistics/assets/desc stats example.R | no_license | rifayat/OSU_MSIS_5193_Tutorials | R | false | false | 4,667 | r | #######################################################
#=============Setup the Working Directory=============#
#Set the working directory to the project folder by #
#running the appropriate script below. Note, you can #
#run the data off of your OneDrive or DropBox. #
###############################################... |
setwd("/Users/jiahuiwu/Desktop/CIS660/lab4")
options(max.print = 100000)
data1 <- read.csv("bikebuyer.csv", header = TRUE)
str(data1)
names(data1)
dim(data1)
#YearlyIncome
x <- data1$YearlyIncome
a = min(x)
b = max(x)
newIncome <- function(x){(x - a) / (b - a)}
data1$YearlyIncome <- apply(data1[2], 2, newIncome)
#cut... | /Data_Mining/lab4/lab4.R | no_license | wujiahui62/Homework | R | false | false | 5,837 | r | setwd("/Users/jiahuiwu/Desktop/CIS660/lab4")
options(max.print = 100000)
data1 <- read.csv("bikebuyer.csv", header = TRUE)
str(data1)
names(data1)
dim(data1)
#YearlyIncome
x <- data1$YearlyIncome
a = min(x)
b = max(x)
newIncome <- function(x){(x - a) / (b - a)}
data1$YearlyIncome <- apply(data1[2], 2, newIncome)
#cut... |
#' Get a projectId from a project object.
#'
#' @param project object. Either list with projectId element or projectId value
ValidateProject <- function(project) {
if (is.list(project)) {
projectId <- project$projectId
} else {
projectId <- project
}
if (is.null(projectId)) {
rawMsg <- paste("Projec... | /R/ValidateProject.R | no_license | bgreenwell/datarobot | R | false | false | 1,586 | r | #' Get a projectId from a project object.
#'
#' @param project object. Either list with projectId element or projectId value
ValidateProject <- function(project) {
if (is.list(project)) {
projectId <- project$projectId
} else {
projectId <- project
}
if (is.null(projectId)) {
rawMsg <- paste("Projec... |
# DT1[DT2, on='key'][, .SD[1], by='key']
# DT1[DT2, on='key', mult='first']
# 위의 둘은 항상 같지 않다!
# DT1[DT2, on='key'][, .SD[.N], by='key']
# DT1[DT2, on='key', mult='last']
# 책의 내용과 다르게 위의 둘은 항상 같지 않다!
# 위의 내용에 대한 부연 설명
library(data.table)
DT1 = data.table(a = c(1,1,2,2,3,4,5),
b = c(10,11,20,21,30,30,... | /10_DataTable_mult.R | no_license | kwhkim/DSwithRv2 | R | false | false | 754 | r | # DT1[DT2, on='key'][, .SD[1], by='key']
# DT1[DT2, on='key', mult='first']
# 위의 둘은 항상 같지 않다!
# DT1[DT2, on='key'][, .SD[.N], by='key']
# DT1[DT2, on='key', mult='last']
# 책의 내용과 다르게 위의 둘은 항상 같지 않다!
# 위의 내용에 대한 부연 설명
library(data.table)
DT1 = data.table(a = c(1,1,2,2,3,4,5),
b = c(10,11,20,21,30,30,... |
/Assignment9dot1.R | no_license | rdolia/Assignment9.1 | R | false | false | 1,362 | r | ||
#' Generate one strata variable from multiple factors
#'
#' For strata defined by multiple variables (e.g. sex,age,country) one combined
#' variable is generated.
#'
#'
#' @param df a data.frame
#' @param stratavars character vector with variable name
#' @param name name of the newly generated variable
#' @return The o... | /sdcMicro/R/GUIfunctions.R | no_license | ingted/R-Examples | R | false | false | 8,617 | r | #' Generate one strata variable from multiple factors
#'
#' For strata defined by multiple variables (e.g. sex,age,country) one combined
#' variable is generated.
#'
#'
#' @param df a data.frame
#' @param stratavars character vector with variable name
#' @param name name of the newly generated variable
#' @return The o... |
#' Calculate wide least cost path
#'
#' Calculates a wide least cost path from an origin location to a destination location. Applies Dijkstra's algorithm. See details for more information
#'
#' @param cost_surface \code{TransitionLayer} (gdistance package). Cost surface to be used in Least Cost Path calculation
#'
#' @... | /R/create_wide_lcp.R | no_license | DrRoad/leastcostpath | R | false | false | 4,679 | r | #' Calculate wide least cost path
#'
#' Calculates a wide least cost path from an origin location to a destination location. Applies Dijkstra's algorithm. See details for more information
#'
#' @param cost_surface \code{TransitionLayer} (gdistance package). Cost surface to be used in Least Cost Path calculation
#'
#' @... |
numOver <- function(v, x, loop=TRUE) {
if (loop) {
count <- 0
for (val in v) {
if (val > x) {
count <- count + 1
}
}
} else {
count <- length(v[v > x])
}
return(count)
} | /numOver/solution.R | no_license | cupp/R | R | false | false | 213 | r | numOver <- function(v, x, loop=TRUE) {
if (loop) {
count <- 0
for (val in v) {
if (val > x) {
count <- count + 1
}
}
} else {
count <- length(v[v > x])
}
return(count)
} |
install.packages("RMySQL")
-----------------------------------------------
library("RMySQL")
ucscDb <- dbConnect(MySQL(), user="genome", host="genome-mysql.cse.ucsc.edu")
result <- dbGetQuery(ucscDb, "show databases;"); dbDisconnect(ucscDb);
result
hg19 <- dbConnect(MySQL(), user="genome", db="hg19", host="genome-my... | /Getting and Cleaning Data/week 2/lecture.r | no_license | rtaranov/datasciencecoursera | R | false | false | 707 | r | install.packages("RMySQL")
-----------------------------------------------
library("RMySQL")
ucscDb <- dbConnect(MySQL(), user="genome", host="genome-mysql.cse.ucsc.edu")
result <- dbGetQuery(ucscDb, "show databases;"); dbDisconnect(ucscDb);
result
hg19 <- dbConnect(MySQL(), user="genome", db="hg19", host="genome-my... |
library(shinytest2)
test_that("Migrated shinytest test: mytest.R", {
app <- AppDriver$new(variant = shinycoreci::platform_rversion(),
seed = 100, shiny_args = list(display.mode = "normal"))
a_dist <- app$wait_for_value(output = "a_distPlot")
b_dist <- app$wait_for_value(output = "b_distPlot")
app$expect_v... | /apps/060-retirement-simulation/tests/testthat/test-mytest.R | permissive | rstudio/shinycoreci-apps | R | false | false | 846 | r | library(shinytest2)
test_that("Migrated shinytest test: mytest.R", {
app <- AppDriver$new(variant = shinycoreci::platform_rversion(),
seed = 100, shiny_args = list(display.mode = "normal"))
a_dist <- app$wait_for_value(output = "a_distPlot")
b_dist <- app$wait_for_value(output = "b_distPlot")
app$expect_v... |
\name{getBAT}
\alias{getBAT}
\alias{reqTBBO}
\title{download Bid Ask Trade data and merge into BAT object}
\usage{
getBAT(Symbols, endDateTime, tws = NULL,
barSize = "1 min", duration = "5 D", useRTH = "1",
auto.assign = TRUE, env = .GlobalEnv)
reqTBBO(Symbols, endDateTime, tws = NULL,
barSize = "1 min... | /man/getBAT.Rd | no_license | creative-quant/twsInstrument | R | false | false | 4,149 | rd | \name{getBAT}
\alias{getBAT}
\alias{reqTBBO}
\title{download Bid Ask Trade data and merge into BAT object}
\usage{
getBAT(Symbols, endDateTime, tws = NULL,
barSize = "1 min", duration = "5 D", useRTH = "1",
auto.assign = TRUE, env = .GlobalEnv)
reqTBBO(Symbols, endDateTime, tws = NULL,
barSize = "1 min... |
#########################################################################################################
# These functions are called by script Zooplankton_data_entry_2020.Rmd. They import the raw datasheets,
# parse and organize the data into the relevant tables in LEPAS_2020.db. These functions were originally
# w... | /06_RawZPdata/DataEntryFunctionsNOTUSED/Old entry functions_CD/Zooplankton_data_entry_functions_2020.R | no_license | hood211/LEPAS | R | false | false | 29,897 | r | #########################################################################################################
# These functions are called by script Zooplankton_data_entry_2020.Rmd. They import the raw datasheets,
# parse and organize the data into the relevant tables in LEPAS_2020.db. These functions were originally
# w... |
library(rCharts)
library(shiny)
library(datasets)
library(ISOcodes)
data(ISO_3166_1)
shinyUI(pageWithSidebar(
headerPanel("Body Mass Index Classification in Adults"),
sidebarPanel(
numericInput(inputId="heightM", label="Your height in cm", value= 0,min=0),
numericInput(in... | /bmi/ui.R | no_license | Indrajitharidas/Data-Products-Coursera | R | false | false | 4,821 | r | library(rCharts)
library(shiny)
library(datasets)
library(ISOcodes)
data(ISO_3166_1)
shinyUI(pageWithSidebar(
headerPanel("Body Mass Index Classification in Adults"),
sidebarPanel(
numericInput(inputId="heightM", label="Your height in cm", value= 0,min=0),
numericInput(in... |
### Kernel Density Estimation...from Scratch!
### Univariate ###
#Getting Samples from various normal distributions
sample_points <- c(rnorm(40,mean = 10,sd = 3 ),rnorm(40,mean = 5,sd =1 ),rnorm(40,mean = -5,sd =1 ) )
hist(sample_points, breaks = 50, freq = FALSE)
#Creating various observation points (x*)
x ... | /kde.R | no_license | mramakrishnan-chwy/sys6018-KernalDensityEstimations | R | false | false | 3,359 | r | ### Kernel Density Estimation...from Scratch!
### Univariate ###
#Getting Samples from various normal distributions
sample_points <- c(rnorm(40,mean = 10,sd = 3 ),rnorm(40,mean = 5,sd =1 ),rnorm(40,mean = -5,sd =1 ) )
hist(sample_points, breaks = 50, freq = FALSE)
#Creating various observation points (x*)
x ... |
library(magick)
#' Linear Regression
#'
#' @field X :matrix containing all the data.
#' @field Y :vector containing response variable.
#' @field reg_coe vector: Estimation of the regression coefficients.
#' @field fit_val vector: Estimation of the Y values.
#' @field resid_e vector:Estimation of the error variable.
#' ... | /Advanced R Programming/Group Reports/Lab4/source/R/linreg.R | permissive | Nikoge/Statistics-and-Machine-Learning | R | false | false | 7,876 | r | library(magick)
#' Linear Regression
#'
#' @field X :matrix containing all the data.
#' @field Y :vector containing response variable.
#' @field reg_coe vector: Estimation of the regression coefficients.
#' @field fit_val vector: Estimation of the Y values.
#' @field resid_e vector:Estimation of the error variable.
#' ... |
testFunction <- function(x) {
y <- rnorm (100)
mean(y)
} | /testFunction.R | no_license | shakhina/R-projects | R | false | false | 60 | r | testFunction <- function(x) {
y <- rnorm (100)
mean(y)
} |
# RESULTS ANALYSIS: for binary outcome with categorical inputs models,run these
# analyses to assess data. Run with each of the two following sets of data separately:
#Common binary outcome, categorical inputs
results2000<- read.csv ("T:/Bin_common_cat.2000.csv")
results5000<- read.csv ("T:/Bin_common_cat.5... | /Outcome analysis for bin outcomes with cat inputs_for_pub.R | no_license | m-mahendran/methods_for_intersectionality_simulation_binary_outcomes | R | false | false | 8,135 | r | # RESULTS ANALYSIS: for binary outcome with categorical inputs models,run these
# analyses to assess data. Run with each of the two following sets of data separately:
#Common binary outcome, categorical inputs
results2000<- read.csv ("T:/Bin_common_cat.2000.csv")
results5000<- read.csv ("T:/Bin_common_cat.5... |
context("rpostgisLT: manipulate-ltraj")
# test_equal() won't work for ltraj-es with infolocs due to the funky infolocs as factors...
test_that("missing relocations", {
testthat::skip_on_cran()
expect_true(ltraj2pgtraj(conn_empty, ibex_na))
expect_message(ibexTest <- pgtraj2ltraj(conn_empty, pgtraj = "ibex... | /tests/testthat/test_manipulate-ltraj.R | no_license | mablab/rpostgisLT | R | false | false | 5,901 | r | context("rpostgisLT: manipulate-ltraj")
# test_equal() won't work for ltraj-es with infolocs due to the funky infolocs as factors...
test_that("missing relocations", {
testthat::skip_on_cran()
expect_true(ltraj2pgtraj(conn_empty, ibex_na))
expect_message(ibexTest <- pgtraj2ltraj(conn_empty, pgtraj = "ibex... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ClinFunction.R
\name{RelapseDate}
\alias{RelapseDate}
\title{Relapse Data}
\usage{
RelapseDate(sheet_individual, type, TimeInterval)
}
\arguments{
\item{sheet_individual}{clinical follow up data of a individual}
\item{type}{chose FollowUp}
... | /man/RelapseDate.Rd | no_license | yswutan/ClinClean | R | false | true | 501 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ClinFunction.R
\name{RelapseDate}
\alias{RelapseDate}
\title{Relapse Data}
\usage{
RelapseDate(sheet_individual, type, TimeInterval)
}
\arguments{
\item{sheet_individual}{clinical follow up data of a individual}
\item{type}{chose FollowUp}
... |
library(mlbench)
### Name: Satellite
### Title: Landsat Multi-Spectral Scanner Image Data
### Aliases: Satellite
### Keywords: datasets
### ** Examples
data(Satellite)
summary(Satellite)
| /data/genthat_extracted_code/mlbench/examples/Satellite.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 194 | r | library(mlbench)
### Name: Satellite
### Title: Landsat Multi-Spectral Scanner Image Data
### Aliases: Satellite
### Keywords: datasets
### ** Examples
data(Satellite)
summary(Satellite)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{fn_target}
\alias{fn_target}
\title{Redefines target value}
\usage{
fn_target(base, target, event)
}
\arguments{
\item{base}{input dataframe}
\item{target}{column / field name for the target variable, to be passe... | /man/fn_target.Rd | no_license | cran/scorecardModelUtils | R | false | true | 1,071 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{fn_target}
\alias{fn_target}
\title{Redefines target value}
\usage{
fn_target(base, target, event)
}
\arguments{
\item{base}{input dataframe}
\item{target}{column / field name for the target variable, to be passe... |
#' ROC.plot
#'
#' @description Function that plots the ROC curve of a prediction with only 2 categories.
#'
#' @param prediction A vector of real numbers representing the prediction score of a category.
#' @param real A vector with the real categories of the individuals in the prediction.
#' @param .add A logical value... | /R/threshold.R | no_license | PROMiDAT/traineR | R | false | false | 2,340 | r | #' ROC.plot
#'
#' @description Function that plots the ROC curve of a prediction with only 2 categories.
#'
#' @param prediction A vector of real numbers representing the prediction score of a category.
#' @param real A vector with the real categories of the individuals in the prediction.
#' @param .add A logical value... |
source('loadData.R')
## Plot 2
# open png device
png(filename="plot2.png", height=480, width=480)
# create the plot
plot(data$Global_active_power~data$datetime, type="l",
ylab="Global Active Power (kilowatts)", xlab="")
# close the device
dev.off() | /plot2.R | no_license | stevekaeser/ExData_Plotting1 | R | false | false | 256 | r | source('loadData.R')
## Plot 2
# open png device
png(filename="plot2.png", height=480, width=480)
# create the plot
plot(data$Global_active_power~data$datetime, type="l",
ylab="Global Active Power (kilowatts)", xlab="")
# close the device
dev.off() |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/state.R
\name{mxstate_choropleth}
\alias{mxstate_choropleth}
\title{Create a state-level choropleth}
\usage{
mxstate_choropleth(df, title = "", legend = "", num_colors = 7, zoom = NULL)
}
\arguments{
\item{df}{A data.frame with a column named... | /man/mxstate_choropleth.Rd | permissive | diegovalle/mxmaps | R | false | true | 1,128 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/state.R
\name{mxstate_choropleth}
\alias{mxstate_choropleth}
\title{Create a state-level choropleth}
\usage{
mxstate_choropleth(df, title = "", legend = "", num_colors = 7, zoom = NULL)
}
\arguments{
\item{df}{A data.frame with a column named... |
/00. 데이터 편집/03. 데모 데이터의 이산화/demo_discrete.R | no_license | LeeJyeon/3th_L.Point_Competition | R | false | false | 1,044 | r | ||
#' Get current Belgium season data for top tier
#'
#' @return a dataframe with results for current
#' season for top division
#'
#' @param Season the current Season
#' @importFrom utils "read.csv"
#' @examples
#' belgium_current()
#' @export
belgium_current <- function(Season=2022){
s1<-s2<-myseason<-b1<-df1<-NULL
m... | /R/belgium_current.R | no_license | jalapic/engsoccerdata | R | false | false | 906 | r | #' Get current Belgium season data for top tier
#'
#' @return a dataframe with results for current
#' season for top division
#'
#' @param Season the current Season
#' @importFrom utils "read.csv"
#' @examples
#' belgium_current()
#' @export
belgium_current <- function(Season=2022){
s1<-s2<-myseason<-b1<-df1<-NULL
m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/weight.R
\docType{methods}
\name{weight}
\alias{weight}
\alias{weightVariables}
\alias{weight<-}
\alias{weightVariables,CrunchDataset-method}
\alias{weightVariables,VariableCatalog-method}
\title{Dataset weights}
\usage{
weight(x)
weight(x) ... | /man/weight.Rd | no_license | npelikan/rcrunch | R | false | true | 1,020 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/weight.R
\docType{methods}
\name{weight}
\alias{weight}
\alias{weightVariables}
\alias{weight<-}
\alias{weightVariables,CrunchDataset-method}
\alias{weightVariables,VariableCatalog-method}
\title{Dataset weights}
\usage{
weight(x)
weight(x) ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_functions.R
\name{predict6_1_unique}
\alias{predict6_1_unique}
\title{Produce model estimated (p=6, topology=1, unique portion) y-coordinates of the kmer spectra given the kmer size, repetitiveness, average polyploid kmer coverage, bias... | /man/predict6_1_unique.Rd | permissive | tbenavi1/genomescope2.0 | R | false | true | 1,402 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_functions.R
\name{predict6_1_unique}
\alias{predict6_1_unique}
\title{Produce model estimated (p=6, topology=1, unique portion) y-coordinates of the kmer spectra given the kmer size, repetitiveness, average polyploid kmer coverage, bias... |
predict_election_win_spirit <- function(year_to_predict)
{
library(tidyverse)
library(broom)
library(openintro)
library(usmap)
library(tidymodels)
library(here)
x <- year_to_predict
beer_states <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2... | /extra/Model/functions/predict_election_win_spirit.R | no_license | pablo-ortuno/faith-and-booze | R | false | false | 5,511 | r |
predict_election_win_spirit <- function(year_to_predict)
{
library(tidyverse)
library(broom)
library(openintro)
library(usmap)
library(tidymodels)
library(here)
x <- year_to_predict
beer_states <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2... |
NexCorrM<-function(dir,outfile="out.csv"){
# dir is the directory name assuming data is located one directory below script directory
# Calculate monthly correlations
#----------Parameters to set------------
#Windows to make times series match
wstart= c(1995, 1)
wend= c(2013,12)
#CCF lag to output
#lnum=1
#--------... | /R/NexCorrM.R | no_license | acanion/NexRadMo | R | false | false | 1,521 | r | NexCorrM<-function(dir,outfile="out.csv"){
# dir is the directory name assuming data is located one directory below script directory
# Calculate monthly correlations
#----------Parameters to set------------
#Windows to make times series match
wstart= c(1995, 1)
wend= c(2013,12)
#CCF lag to output
#lnum=1
#--------... |
#==============================================================================
# code to estimate and format regression tables for bonus models
#==============================================================================
library(tidyverse)
library(lubridate)
library(lfe)
library(splines)
library(lmtest)
library(san... | /code/Analysis/regressions_bonus.R | no_license | lnsongxf/public_cs_texas | R | false | false | 12,722 | r | #==============================================================================
# code to estimate and format regression tables for bonus models
#==============================================================================
library(tidyverse)
library(lubridate)
library(lfe)
library(splines)
library(lmtest)
library(san... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/globalaccelerator_operations.R
\name{globalaccelerator_add_custom_routing_endpoints}
\alias{globalaccelerator_add_custom_routing_endpoints}
\title{Associate a virtual private cloud (VPC) subnet endpoint with your custom
routing accelerator}
\... | /cran/paws.networking/man/globalaccelerator_add_custom_routing_endpoints.Rd | permissive | paws-r/paws | R | false | true | 916 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/globalaccelerator_operations.R
\name{globalaccelerator_add_custom_routing_endpoints}
\alias{globalaccelerator_add_custom_routing_endpoints}
\title{Associate a virtual private cloud (VPC) subnet endpoint with your custom
routing accelerator}
\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ecoBD.R
\name{ecoBD}
\alias{ecoBD}
\title{Calculating the Bounds for Ecological Inference in RxC Tables}
\usage{
ecoBD(formula, data = parent.frame(), N = NULL)
}
\arguments{
\item{formula}{A symbolic description of ecological table to be use... | /man/ecoBD.Rd | no_license | kosukeimai/eco | R | false | true | 5,348 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ecoBD.R
\name{ecoBD}
\alias{ecoBD}
\title{Calculating the Bounds for Ecological Inference in RxC Tables}
\usage{
ecoBD(formula, data = parent.frame(), N = NULL)
}
\arguments{
\item{formula}{A symbolic description of ecological table to be use... |
# autoSim.R
nVals <- seq(100, 1000, by=100)
for (n in nVals) {
oFile <- paste("n", n, ".txt", sep="")
sysCall <- paste("nohup Rscript runSim.R n=", n, " > ", oFile, sep="")
system(sysCall)
print(paste("sysCall=", sysCall, sep=""))
}
| /teaching/biostatm280-2019winter/slides/02-linux/autoSim.R | no_license | Hua-Zhou/Hua-Zhou.github.io | R | false | false | 244 | r | # autoSim.R
nVals <- seq(100, 1000, by=100)
for (n in nVals) {
oFile <- paste("n", n, ".txt", sep="")
sysCall <- paste("nohup Rscript runSim.R n=", n, " > ", oFile, sep="")
system(sysCall)
print(paste("sysCall=", sysCall, sep=""))
}
|
#PolyPhenProcessing_functions.R
getNumericScoreColumn<-function(xcol, pdat){
#add column indicating numeric score for each polyphen score
ppmn = c("benign","probably damaging","possibly damaging","unknown", "\\N")
ppsc = c(1,3,2,0,-1)
names(ppsc)<-ppmn
nscol = rep(0, nrow(pdat))
for(n in ppmn){
nscol[grep(patt... | /packageDir/R/PolyPhenProcessing_functions.R | no_license | stochasticTreat/pathLayerDistributionVersion2 | R | false | false | 6,443 | r | #PolyPhenProcessing_functions.R
getNumericScoreColumn<-function(xcol, pdat){
#add column indicating numeric score for each polyphen score
ppmn = c("benign","probably damaging","possibly damaging","unknown", "\\N")
ppsc = c(1,3,2,0,-1)
names(ppsc)<-ppmn
nscol = rep(0, nrow(pdat))
for(n in ppmn){
nscol[grep(patt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pupil_plot.R
\name{pupil_plot}
\alias{pupil_plot}
\title{Plot and inspect pupil data}
\usage{
pupil_plot(x, y, trial = "all", sub_title = "")
}
\arguments{
\item{x}{data before preprocessing step.}
\item{y}{data after preprocessing step.}
\... | /man/pupil_plot.Rd | no_license | dr-JT/pupillometry | R | false | true | 802 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pupil_plot.R
\name{pupil_plot}
\alias{pupil_plot}
\title{Plot and inspect pupil data}
\usage{
pupil_plot(x, y, trial = "all", sub_title = "")
}
\arguments{
\item{x}{data before preprocessing step.}
\item{y}{data after preprocessing step.}
\... |
library(corrcoverage)
context("test_corrcov")
testdata <- system.file("extdata", "testdata_corr.RDS", package="corrcoverage")
data <- readRDS(testdata)
maf <- data$maf
mu <- data$mu
N <- data$N
pp <- data$pp
sigma <- data$sigma
size <- data$size
thr <- data$thr
V <- data$V
z <- data$z
test_that("credset function has ... | /tests/testthat/test_corrcov.R | permissive | annahutch/corrcoverage | R | false | false | 4,399 | r | library(corrcoverage)
context("test_corrcov")
testdata <- system.file("extdata", "testdata_corr.RDS", package="corrcoverage")
data <- readRDS(testdata)
maf <- data$maf
mu <- data$mu
N <- data$N
pp <- data$pp
sigma <- data$sigma
size <- data$size
thr <- data$thr
V <- data$V
z <- data$z
test_that("credset function has ... |
library(mapdata)
library(scales) #package for easy "alpha" color
allS=read.csv("../allStamps.csv",header=F)
map("worldHires",".", col="gray95", fill=TRUE,xlim=c(-16,50),ylim=c(20,60),mar=c(0,0,0,0))#Map background
points(allS[,4],allS[,5],pch=20,cex=1,col=alpha("black", 1)) #add all point we have in light gray (the... | /dev/dataBaseExplorer/analyseStamps.R | no_license | simoncarrignon/phd | R | false | false | 947 | r | library(mapdata)
library(scales) #package for easy "alpha" color
allS=read.csv("../allStamps.csv",header=F)
map("worldHires",".", col="gray95", fill=TRUE,xlim=c(-16,50),ylim=c(20,60),mar=c(0,0,0,0))#Map background
points(allS[,4],allS[,5],pch=20,cex=1,col=alpha("black", 1)) #add all point we have in light gray (the... |
#' @title Build configuration file
#'
#' @description Compile metadata from all MRR and interogation sites from PTAGIS
#'
#' @author Kevin See
#'
#'
#' @source \url{http://www.ptagis.org}
#'
#' @import dplyr stringr
#' @export
#' @return NULL
#' @examples buildConfig()
#'
buildConfig = function() {
# get metadata fo... | /R/buildConfig.R | no_license | KevinSee/PITcleanr_old | R | false | false | 2,999 | r | #' @title Build configuration file
#'
#' @description Compile metadata from all MRR and interogation sites from PTAGIS
#'
#' @author Kevin See
#'
#'
#' @source \url{http://www.ptagis.org}
#'
#' @import dplyr stringr
#' @export
#' @return NULL
#' @examples buildConfig()
#'
buildConfig = function() {
# get metadata fo... |
#'Construct Subspace Stream Clusterers
#'
#'This function allows you to combine a micro clustering algorithm and a macro
#'clustering algorithm into a single object that can then be used as a normal
#'DSC object. This object can then be used with e.g. \link{update} to produce a
#'micro clustering of a stream.
#'@par... | /R/DSC_ThreeStage.R | no_license | lailaghani/subspaceMOA | R | false | false | 2,205 | r | #'Construct Subspace Stream Clusterers
#'
#'This function allows you to combine a micro clustering algorithm and a macro
#'clustering algorithm into a single object that can then be used as a normal
#'DSC object. This object can then be used with e.g. \link{update} to produce a
#'micro clustering of a stream.
#'@par... |
##' QGIS Algorithm provided by SAGA Terrain surface texture (saga:terrainsurfacetexture)
##'
##' @title QGIS algorithm Terrain surface texture
##'
##' @param DEM `raster` - Elevation. Path to a raster layer.
##' @param TEXTURE `rasterDestination` - Texture. Path for new raster layer.
##' @param EPSILON `number` - Flat ... | /R/saga_terrainsurfacetexture.R | permissive | VB6Hobbyst7/r_package_qgis | R | false | false | 2,533 | r | ##' QGIS Algorithm provided by SAGA Terrain surface texture (saga:terrainsurfacetexture)
##'
##' @title QGIS algorithm Terrain surface texture
##'
##' @param DEM `raster` - Elevation. Path to a raster layer.
##' @param TEXTURE `rasterDestination` - Texture. Path for new raster layer.
##' @param EPSILON `number` - Flat ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/regulation_area_function.R
\name{regIndex}
\alias{regIndex}
\title{Calculate fish osmoregulation index according to fitted cubic function}
\usage{
regIndex(kpa, MO2, period, plot = TRUE)
}
\arguments{
\item{kpa}{vector of kpa (x)}
\item{MO2}... | /man/regIndex.Rd | permissive | k-dettloff/fishphysio | R | false | true | 876 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/regulation_area_function.R
\name{regIndex}
\alias{regIndex}
\title{Calculate fish osmoregulation index according to fitted cubic function}
\usage{
regIndex(kpa, MO2, period, plot = TRUE)
}
\arguments{
\item{kpa}{vector of kpa (x)}
\item{MO2}... |
plot4 <- function() {
#Load the data
twodaysdata <- data_load()
par(mfrow=c(2,2))
#first row, plot 1
plot(twodaysdata$timestamp, twodaysdata$Global_active_power, type = "l", xlab = "", ylab = "Global Active Power")
#first row, plot 2
plot(twodaysdata$timestamp, twodaysdata$Voltage, type = "l", xl... | /plot4.R | no_license | prashanth-datascientist9/ExData_Plotting1 | R | false | false | 1,118 | r | plot4 <- function() {
#Load the data
twodaysdata <- data_load()
par(mfrow=c(2,2))
#first row, plot 1
plot(twodaysdata$timestamp, twodaysdata$Global_active_power, type = "l", xlab = "", ylab = "Global Active Power")
#first row, plot 2
plot(twodaysdata$timestamp, twodaysdata$Voltage, type = "l", xl... |
#' Compute feature contribution of prediction
#'
#' Computes feature contribution components of rawscore prediction.
#'
#' @param model object of class \code{lgb.Booster}.
#' @param data a matrix object or a dgCMatrix object.
#' @param idxset a integer vector of indices of rows needed.
#' @param num_iteration number ... | /R-package/R/lgb.interprete.R | permissive | johnduffynh/LightGBM | R | false | false | 6,014 | r | #' Compute feature contribution of prediction
#'
#' Computes feature contribution components of rawscore prediction.
#'
#' @param model object of class \code{lgb.Booster}.
#' @param data a matrix object or a dgCMatrix object.
#' @param idxset a integer vector of indices of rows needed.
#' @param num_iteration number ... |
runBivariateCAM<- function(X, parentsOf, variableSelMat, pointEst, verbose,
result){
bivcammat <- bivariateCAM(X, parentsOf=parentsOf,
variableSelMat=variableSelMat,
silent = !verbose)
for (k in 1:length(parentsOf)){
res... | /CompareCausalNetworks/R/runBivariateCAM.R | no_license | ingted/R-Examples | R | false | false | 503 | r | runBivariateCAM<- function(X, parentsOf, variableSelMat, pointEst, verbose,
result){
bivcammat <- bivariateCAM(X, parentsOf=parentsOf,
variableSelMat=variableSelMat,
silent = !verbose)
for (k in 1:length(parentsOf)){
res... |
#' A data.frame containing election results from the 2012 US Presidential election.
#'
#' @name df_president
#' @docType data
#' @references Taken from \url{http://www.fec.gov/pubrec/fe2012/federalelections2012.shtml} on 3/15/2014.
#' @keywords data
#' @examples
#' data(choroplethr)
#' choroplethr(df_president, "sta... | /R/data.R | no_license | omerkara/choroplethr | R | false | false | 1,729 | r | #' A data.frame containing election results from the 2012 US Presidential election.
#'
#' @name df_president
#' @docType data
#' @references Taken from \url{http://www.fec.gov/pubrec/fe2012/federalelections2012.shtml} on 3/15/2014.
#' @keywords data
#' @examples
#' data(choroplethr)
#' choroplethr(df_president, "sta... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_network.R
\name{adj.org}
\alias{adj.org}
\title{Adjacency matrix for affiliations}
\usage{
adj.org(rel)
}
\arguments{
\item{rel}{an affiliation list}
}
\value{
a sparse adjacency matrix of affiliation * affiliation
}
\description{
Crea... | /man/adj.org.Rd | no_license | antongrau/soc.elite | R | false | true | 414 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_network.R
\name{adj.org}
\alias{adj.org}
\title{Adjacency matrix for affiliations}
\usage{
adj.org(rel)
}
\arguments{
\item{rel}{an affiliation list}
}
\value{
a sparse adjacency matrix of affiliation * affiliation
}
\description{
Crea... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_bizsubcats.R
\name{get_bizsubcats}
\alias{get_bizsubcats}
\title{Implements the Acquire Business Subcategory Master API.}
\usage{
get_bizsubcats(api_key = "eca7388c8a3c6332eb702a21bcc63b46", lang = "en")
}
\arguments{
\item{api_key}{strin... | /man/get_bizsubcats.Rd | permissive | 942kid/RGurunavi | R | false | true | 877 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_bizsubcats.R
\name{get_bizsubcats}
\alias{get_bizsubcats}
\title{Implements the Acquire Business Subcategory Master API.}
\usage{
get_bizsubcats(api_key = "eca7388c8a3c6332eb702a21bcc63b46", lang = "en")
}
\arguments{
\item{api_key}{strin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.