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 |
|---|---|---|---|---|---|---|---|---|---|
## this is a test script
a <- rnorm(100)
plot(a,xlab=c(-2,2))
| /svm.R | no_license | Maitree1986/svmR | R | false | false | 62 | r | ## this is a test script
a <- rnorm(100)
plot(a,xlab=c(-2,2))
|
library(lmomco)
### Name: plotlmrdia
### Title: Plot L-moment Ratio Diagram
### Aliases: plotlmrdia
### Keywords: L-moment ratio diagram Graphics
### ** Examples
plotlmrdia(lmrdia()) # simplest of all uses
## Not run:
##D # A more complex example follows.
##D # For a given mean, L-scale, L-skew, and L-kurtosis, l... | /data/genthat_extracted_code/lmomco/examples/plotlmrdia.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,664 | r | library(lmomco)
### Name: plotlmrdia
### Title: Plot L-moment Ratio Diagram
### Aliases: plotlmrdia
### Keywords: L-moment ratio diagram Graphics
### ** Examples
plotlmrdia(lmrdia()) # simplest of all uses
## Not run:
##D # A more complex example follows.
##D # For a given mean, L-scale, L-skew, and L-kurtosis, l... |
#EX_4_16
#page 23
l<-8#define length of stick as 8
vary<-function(l)
{
return((l^2)/12)
}#function to calculate var(y)
f<-function(y)
{
return((y^2)/(12*8))
}
varxy<-1/4*vary(l)
varxy#to print var(x|y)
integral<-integrate(f,0,l)#to calculate E(var(x|y))
Evarxy<-integral$val
Evarxy
varx<-sum(Evarxy,v... | /Introduction_To_Probability_by_Dimitri_P._Bertsekas_And_John_N._Tsitsiklis/CH4/EX4.16/EX_4_16.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 364 | r | #EX_4_16
#page 23
l<-8#define length of stick as 8
vary<-function(l)
{
return((l^2)/12)
}#function to calculate var(y)
f<-function(y)
{
return((y^2)/(12*8))
}
varxy<-1/4*vary(l)
varxy#to print var(x|y)
integral<-integrate(f,0,l)#to calculate E(var(x|y))
Evarxy<-integral$val
Evarxy
varx<-sum(Evarxy,v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/individuals_defensive_actual_floor_stats.R
\name{individuals_defensive_actual_floor_stats}
\alias{individuals_defensive_actual_floor_stats}
\title{Individual's defensive actual statistics}
\usage{
individuals_defensive_actual_floor_stats(df1,... | /man/individuals_defensive_actual_floor_stats.Rd | no_license | cran/AdvancedBasketballStats | R | false | true | 2,700 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/individuals_defensive_actual_floor_stats.R
\name{individuals_defensive_actual_floor_stats}
\alias{individuals_defensive_actual_floor_stats}
\title{Individual's defensive actual statistics}
\usage{
individuals_defensive_actual_floor_stats(df1,... |
# read barcodes -----------------------------------------------------------
read_barcodes <- function(barcodes_path){
barcodes_sheets <- excel_sheets(barcodes_path)
# Replace with INPUT from shiny app or assume it's the first sheet
barcodes_sheets_selected <- barcodes_sheets[1]
barcodes <-
read_e... | /DIA/SARS-CoV-2_serology_v2/app-functions.R | permissive | medvir/shiny-server | R | false | false | 22,312 | r |
# read barcodes -----------------------------------------------------------
read_barcodes <- function(barcodes_path){
barcodes_sheets <- excel_sheets(barcodes_path)
# Replace with INPUT from shiny app or assume it's the first sheet
barcodes_sheets_selected <- barcodes_sheets[1]
barcodes <-
read_e... |
## Getting and Cleaning Data - Peer Assessment 1
## "You should create one R script called run_analysis.R that does the following.
## A. Merges the training and the test sets to create one data set.
## B. Extracts only the measurements on the mean and standard deviation for each measurement.
## C. Uses descriptive a... | /run_analysis.R | no_license | nechapman/GandCData-PeerAssess1 | R | false | false | 7,524 | r | ## Getting and Cleaning Data - Peer Assessment 1
## "You should create one R script called run_analysis.R that does the following.
## A. Merges the training and the test sets to create one data set.
## B. Extracts only the measurements on the mean and standard deviation for each measurement.
## C. Uses descriptive a... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) { ## set the value of the mat... | /cachematrix.R | no_license | JJD129/ProgrammingAssignment2 | R | false | false | 1,190 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) { ## set the value of the mat... |
#' @title
#' Test of group differences
#'
#' @description
#' One-way analysis (ANOVA or Kruskal-Wallis Test)
#' with post-hoc comparisons and plots
#'
#' @param formula use the form \code{Y ~ X} where \code{Y} is the response
#' variable, and \code{X} is the categorical explanatory variable. \code{X}
#' will be coerced... | /R/groupdiff.R | permissive | Rkabacoff/qacEDA | R | false | false | 7,654 | r | #' @title
#' Test of group differences
#'
#' @description
#' One-way analysis (ANOVA or Kruskal-Wallis Test)
#' with post-hoc comparisons and plots
#'
#' @param formula use the form \code{Y ~ X} where \code{Y} is the response
#' variable, and \code{X} is the categorical explanatory variable. \code{X}
#' will be coerced... |
5e64df12b558848c213941e5193dafed query02_query04_1344.qdimacs 343 564 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query02_query04_1344/query02_query04_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 69 | r | 5e64df12b558848c213941e5193dafed query02_query04_1344.qdimacs 343 564 |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spread.R
\name{spread_}
\alias{spread_}
\title{Standard-evaluation version of \code{spread}.}
\usage{
spread_(data, key_col, value_col, fill = NA, convert = FALSE, drop = TRUE)
}
\arguments{
\item{data}{A data frame.}
\item{key_col, value_co... | /man/spread_.Rd | no_license | joshkatz/tidyr | R | false | true | 1,238 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spread.R
\name{spread_}
\alias{spread_}
\title{Standard-evaluation version of \code{spread}.}
\usage{
spread_(data, key_col, value_col, fill = NA, convert = FALSE, drop = TRUE)
}
\arguments{
\item{data}{A data frame.}
\item{key_col, value_co... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coeff_lasso.R
\name{lasso_sg}
\alias{lasso_sg}
\title{Coefficient path (sg)}
\usage{
lasso_sg(lambdas, x, y, beta0, ts, ...)
}
\arguments{
\item{lambdas}{Values of the penalty term}
\item{x}{Predictors}
\item{y}{Response}
\item{beta0}{Init... | /man/lasso_sg.Rd | no_license | mcmtroffaes/bootlasso | R | false | true | 447 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coeff_lasso.R
\name{lasso_sg}
\alias{lasso_sg}
\title{Coefficient path (sg)}
\usage{
lasso_sg(lambdas, x, y, beta0, ts, ...)
}
\arguments{
\item{lambdas}{Values of the penalty term}
\item{x}{Predictors}
\item{y}{Response}
\item{beta0}{Init... |
fpath <- file.path('..', 'orig', 'LR04', 'ODP980')
currwd <- getwd()
setwd(fpath)
ODP980 <-read.table("ODP980.txt",skip=65,header=FALSE,col.names=c("Depth.cm","Age.yrs","Cwuellerstorfid13C.PDB","Cwuellerstorfid18O.PDB"),sep="")
setwd(currwd)
| /data/ODP980.R | permissive | mcrucifix/pleistocene | R | false | false | 242 | r | fpath <- file.path('..', 'orig', 'LR04', 'ODP980')
currwd <- getwd()
setwd(fpath)
ODP980 <-read.table("ODP980.txt",skip=65,header=FALSE,col.names=c("Depth.cm","Age.yrs","Cwuellerstorfid13C.PDB","Cwuellerstorfid18O.PDB"),sep="")
setwd(currwd)
|
#set the working directory
#rename "your User Name here" based on your user name
#example: owner, Emily, Bill
getwd()
setwd("C:/Users/miked/OneDrive/Statistics/R/Projects/nuiphao/Grinding-screen-panel-comparison/2014/code/Functions")
# currwd
getwd()
#make some data
data<- seq(from=1, to=10, by=1)
data
#import the f... | /03_code/02_functions/using my first function.R | no_license | mikedotsmit/04_RModelling | R | false | false | 436 | r | #set the working directory
#rename "your User Name here" based on your user name
#example: owner, Emily, Bill
getwd()
setwd("C:/Users/miked/OneDrive/Statistics/R/Projects/nuiphao/Grinding-screen-panel-comparison/2014/code/Functions")
# currwd
getwd()
#make some data
data<- seq(from=1, to=10, by=1)
data
#import the f... |
library(brms)
library(dplyr)
library(mvtnorm)
library(rstan)
set.seed(7777)
if (file.exists("generateAR1.rda")){
load("generateAR1.rda")
} else{
source("generateAR1.R")
}
sim_data <- sim_dflist[[1]]
print(sim_data, n = 100)
## Long format for non-bayesian methods
services <- c("y1", "y2", "y3")
long_df <- (si... | /fitting.R | no_license | CYGUBICKO/washstan | R | false | false | 3,335 | r | library(brms)
library(dplyr)
library(mvtnorm)
library(rstan)
set.seed(7777)
if (file.exists("generateAR1.rda")){
load("generateAR1.rda")
} else{
source("generateAR1.R")
}
sim_data <- sim_dflist[[1]]
print(sim_data, n = 100)
## Long format for non-bayesian methods
services <- c("y1", "y2", "y3")
long_df <- (si... |
#' Standardize finaltable by amount or row total
#'
#' Divides peak areas by the amount (biomass, counts) of each floral sample in metadata, or by the sample sum to create percentages.
#' @param finaltable the wide data frame with samples in rows and compound names in columns, containing peak areas for floral samples o... | /R/standardize_finaltable.R | no_license | jmpowers/bouquet | R | false | false | 837 | r | #' Standardize finaltable by amount or row total
#'
#' Divides peak areas by the amount (biomass, counts) of each floral sample in metadata, or by the sample sum to create percentages.
#' @param finaltable the wide data frame with samples in rows and compound names in columns, containing peak areas for floral samples o... |
x<-read.table("household_power_consumption.txt",header=TRUE, sep=";", na.strings="?", colClasses=c(Date='factor', Time='factor', rep("numeric",7)))
time<-paste(x$Date, x$Time)
x$Time <- strptime(time, "%d/%m/%Y %H:%M:%S")
x$Date <- as.Date(x$Date, "%d/%m/%Y")
x <- subset(x, x$Date<="2007-02-02")
x <- subset(x, x$Date>=... | /plot2.R | no_license | martasen/ExData_Plotting1 | R | false | false | 483 | r | x<-read.table("household_power_consumption.txt",header=TRUE, sep=";", na.strings="?", colClasses=c(Date='factor', Time='factor', rep("numeric",7)))
time<-paste(x$Date, x$Time)
x$Time <- strptime(time, "%d/%m/%Y %H:%M:%S")
x$Date <- as.Date(x$Date, "%d/%m/%Y")
x <- subset(x, x$Date<="2007-02-02")
x <- subset(x, x$Date>=... |
#подгружаем необходимые пакеты
#install.packages("quantmod")
library(quantmod)
getSymbols("XOM", from="2016-01-01", to="2019-10-02")
getSymbols("VOW3.DE", from="2016-01-01", to="2019-10-02")
getSymbols("TCEHY", from="2016-01-01", to="2019-10-02")
#добавляем цены
prices_exxon_mobil <- as.numeric(Ad(XOM))
pri... | /Mathematical Finance/Time Series analysis using R/Time series analysis. Stocks.R | no_license | liyanyan0713/Economics_Projects | R | false | false | 15,557 | r | #подгружаем необходимые пакеты
#install.packages("quantmod")
library(quantmod)
getSymbols("XOM", from="2016-01-01", to="2019-10-02")
getSymbols("VOW3.DE", from="2016-01-01", to="2019-10-02")
getSymbols("TCEHY", from="2016-01-01", to="2019-10-02")
#добавляем цены
prices_exxon_mobil <- as.numeric(Ad(XOM))
pri... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(A = matrix()) {
M<<-NULL
set<-function(B){
A<<-B
M<<-NULL
}
get<-function(){A}
setInverse<-function(I){M<<-I}
getInverse<-function(){M}
list(set=set,
ge... | /cachematrix.R | no_license | lifeimay0214/ProgrammingAssignment2 | R | false | false | 650 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(A = matrix()) {
M<<-NULL
set<-function(B){
A<<-B
M<<-NULL
}
get<-function(){A}
setInverse<-function(I){M<<-I}
getInverse<-function(){M}
list(set=set,
ge... |
library(ggplot2)
library(gtools)
library(reshape2)
plot.dirichlet.data <- function(n, alpha, nrow)
{
dat <- rdirichlet(n, alpha)
melt.dat <- melt(dat)
melt.dat[,"Var2"] <- as.factor(melt.dat[,"Var2"])
colnames(melt.dat) <- c("draw", "item", "value")
ggplot(data=melt.dat, aes(x=item, y=value, ymin=0, ymax=val... | /lda/dirichlet/dirichlet.R | no_license | satishverma/RStuff | R | false | false | 1,060 | r | library(ggplot2)
library(gtools)
library(reshape2)
plot.dirichlet.data <- function(n, alpha, nrow)
{
dat <- rdirichlet(n, alpha)
melt.dat <- melt(dat)
melt.dat[,"Var2"] <- as.factor(melt.dat[,"Var2"])
colnames(melt.dat) <- c("draw", "item", "value")
ggplot(data=melt.dat, aes(x=item, y=value, ymin=0, ymax=val... |
cor_to_range=function(event_name_list){
library(GenomicRanges)
ase <- unlist(strsplit(as.character(event_name_list),'\\$'))
ase_type=ase[[1]]
ase_event=ase[2]
mRNA_position=switch(ase_type,
SE =position_praser_for_SE(ase_event),
A5SS=position_praser_for_A5SS... | /new_annotation.R | no_license | GeoPHLee/tofu | R | false | false | 4,854 | r | cor_to_range=function(event_name_list){
library(GenomicRanges)
ase <- unlist(strsplit(as.character(event_name_list),'\\$'))
ase_type=ase[[1]]
ase_event=ase[2]
mRNA_position=switch(ase_type,
SE =position_praser_for_SE(ase_event),
A5SS=position_praser_for_A5SS... |
# Coordinates and Faceting
library(ggplot2)
# Data and Aesthetic
pl <- ggplot(mpg, aes(x=displ, y=hwy))
# Geometry
pl <- pl + geom_point()
pl
# x and y lim
pl2 <- pl + coord_cartesian(xlim=c(1,4), ylim=c(15,30))
pl2
# aspect ratios
pl2 <- pl + coord_fixed(ratio=1/3)
pl2
# Facet Grids (subplots)
pl + facet_grid(.... | /R/RPlots - Coordinates_and_Faceting.R | permissive | natitaw/write-to-learn | R | false | false | 473 | r | # Coordinates and Faceting
library(ggplot2)
# Data and Aesthetic
pl <- ggplot(mpg, aes(x=displ, y=hwy))
# Geometry
pl <- pl + geom_point()
pl
# x and y lim
pl2 <- pl + coord_cartesian(xlim=c(1,4), ylim=c(15,30))
pl2
# aspect ratios
pl2 <- pl + coord_fixed(ratio=1/3)
pl2
# Facet Grids (subplots)
pl + facet_grid(.... |
context("mlllogis")
## Data generation.
set.seed(313)
small_data <- actuar::rllogis(100, 2, 3)
tiny_data <- actuar::rllogis(10, 1, 1)
## Finds errors with na and data out of bounds.
expect_error(mlllogis(c(tiny_data, NA)))
expect_error(mlllogis(c(tiny_data, 0)))
expect_error(mlllogis(c(tiny_data, -1)))
# Check corre... | /tests/testthat/test_mlllogis.R | permissive | tnagler/univariateML | R | false | false | 995 | r | context("mlllogis")
## Data generation.
set.seed(313)
small_data <- actuar::rllogis(100, 2, 3)
tiny_data <- actuar::rllogis(10, 1, 1)
## Finds errors with na and data out of bounds.
expect_error(mlllogis(c(tiny_data, NA)))
expect_error(mlllogis(c(tiny_data, 0)))
expect_error(mlllogis(c(tiny_data, -1)))
# Check corre... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "fri_c4_1000_10")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = ma... | /models/openml_fri_c4_1000_10/classification_binaryClass/d267013eb9c3295bce56064c6ca444e6/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 694 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "fri_c4_1000_10")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = ma... |
#' Bibliometric Analysis
#'
#' It performs a bibliometric analysis of a dataset imported from SCOPUS and Thomson Reuters' ISI Web of Knowledge databases.
#'
#' @param M is a bibliographic data frame obtained by the converting function \code{\link{convert2df}}.
#' It is a data matrix with cases corresponding... | /bibliometrix/R/biblioAnalysis.R | no_license | ingted/R-Examples | R | false | false | 7,956 | r | #' Bibliometric Analysis
#'
#' It performs a bibliometric analysis of a dataset imported from SCOPUS and Thomson Reuters' ISI Web of Knowledge databases.
#'
#' @param M is a bibliographic data frame obtained by the converting function \code{\link{convert2df}}.
#' It is a data matrix with cases corresponding... |
########################################################################################################
# Description: This script loads Acceleratometer Samsung Smartphone Data from UCI HAR Dataset
# and merges the training and test data sets together. It also assigns variable
# ... | /run_analysis.R | no_license | jlajeune/Getting_And_Cleaning_Data_Project | R | false | false | 5,918 | r | ########################################################################################################
# Description: This script loads Acceleratometer Samsung Smartphone Data from UCI HAR Dataset
# and merges the training and test data sets together. It also assigns variable
# ... |
\name{REDseq-package}
\alias{REDseq-package}
\alias{REDseq}
\docType{package}
\title{
REDseq
}
\description{
REDSeq is a Bioconductor package for building genomic map of restriction enzyme sites REmap, assigning sequencing tags to RE sites using five different strategies, visualizing genome-wide distribution of differe... | /man/REDseq-package.Rd | no_license | JunhuiLi11/REDseq | R | false | false | 4,289 | rd | \name{REDseq-package}
\alias{REDseq-package}
\alias{REDseq}
\docType{package}
\title{
REDseq
}
\description{
REDSeq is a Bioconductor package for building genomic map of restriction enzyme sites REmap, assigning sequencing tags to RE sites using five different strategies, visualizing genome-wide distribution of differe... |
####################
## Purpose: This script holds useful modelling formulas
########################
require(data.table)
require(lme4)
source("FILEPATH/data_tests.R")
################### INV LOGIT #########################################
inv_logit<-function(x){
1/(1+exp(-x))
}
################### MAKE R-SYNTAX... | /gbd_2019/risk_factors_code/cvd_risks/utility/model_helper_functions.R | no_license | Nermin-Ghith/ihme-modeling | R | false | false | 20,561 | r | ####################
## Purpose: This script holds useful modelling formulas
########################
require(data.table)
require(lme4)
source("FILEPATH/data_tests.R")
################### INV LOGIT #########################################
inv_logit<-function(x){
1/(1+exp(-x))
}
################### MAKE R-SYNTAX... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{madelon}
\alias{madelon}
\title{An artificial dataset called MADELON}
\format{
A list of two elements:
\describe{
\item{data}{2000 by 500 matrix of 2000 objects with 500 features}
\item{decision}{vector of 2000... | /man/madelon.Rd | no_license | cran/MDFS | R | false | true | 1,005 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{madelon}
\alias{madelon}
\title{An artificial dataset called MADELON}
\format{
A list of two elements:
\describe{
\item{data}{2000 by 500 matrix of 2000 objects with 500 features}
\item{decision}{vector of 2000... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/anim.plots.R
\name{anim.hist}
\alias{anim.hist}
\title{Draw an animated histogram.}
\usage{
anim.hist(x, times, speed = 1, show = TRUE, use.times = TRUE,
window = t, window.process = NULL, density = NULL, angle = NULL,
col = NULL, border ... | /man/anim.hist.Rd | no_license | anhnguyendepocen/anim.plots | R | false | true | 969 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/anim.plots.R
\name{anim.hist}
\alias{anim.hist}
\title{Draw an animated histogram.}
\usage{
anim.hist(x, times, speed = 1, show = TRUE, use.times = TRUE,
window = t, window.process = NULL, density = NULL, angle = NULL,
col = NULL, border ... |
#' Number of possible combinations
#'
#' Calculates the number of combinations of each size.
#' @param x A numeric vector
#' @return A named numeric vector
#' @export
#' @examples
#' genesPerPathway <- c(2, 4, 5, 8, 5, 8)
#' completness(genesPerPathway)
completness <- function(x){
iter <- seq_len(max(x))
out <- vap... | /R/completness.R | no_license | llrs/GSEAdv | R | false | false | 421 | r | #' Number of possible combinations
#'
#' Calculates the number of combinations of each size.
#' @param x A numeric vector
#' @return A named numeric vector
#' @export
#' @examples
#' genesPerPathway <- c(2, 4, 5, 8, 5, 8)
#' completness(genesPerPathway)
completness <- function(x){
iter <- seq_len(max(x))
out <- vap... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BiCopHfuncDeriv2.R
\name{BiCopHfuncDeriv2}
\alias{BiCopHfuncDeriv2}
\title{Second Derivatives of the h-Function of a Bivariate Copula}
\usage{
BiCopHfuncDeriv2(u1, u2, family, par, par2 = 0, deriv = "par", obj = NULL,
check.pars = TRUE)
}
\... | /man/BiCopHfuncDeriv2.Rd | no_license | ulf85/VineCopula | R | false | true | 4,112 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BiCopHfuncDeriv2.R
\name{BiCopHfuncDeriv2}
\alias{BiCopHfuncDeriv2}
\title{Second Derivatives of the h-Function of a Bivariate Copula}
\usage{
BiCopHfuncDeriv2(u1, u2, family, par, par2 = 0, deriv = "par", obj = NULL,
check.pars = TRUE)
}
\... |
# Name:
# Purpose: Read xml and load into an Oracle table
# Developer
# 12/19/2016 (htu) - initial creation
#
# 1. load the required libraries
# Clear All
rm(list=ls())
# check if packages installed and then install if necessary
packages <- c('XML','ROracle','plyr','RCurl')
if (length(setdiff(packages, ro... | /development/R/scripts/load_xml.R | permissive | phuse-org/phuse-scripts | R | false | false | 3,323 | r | # Name:
# Purpose: Read xml and load into an Oracle table
# Developer
# 12/19/2016 (htu) - initial creation
#
# 1. load the required libraries
# Clear All
rm(list=ls())
# check if packages installed and then install if necessary
packages <- c('XML','ROracle','plyr','RCurl')
if (length(setdiff(packages, ro... |
# install.packages("tidyverse")
# install.packages("ggplot2")
# install.packages("class")
library(tidyverse)
library(ggplot2)
library(dplyr)
library(class)
setwd("c:/temp/cpsc375hw3")
# 2
# a. Load the data. Column 1 ("Code") is the anonymized subject code and will not be used here.
# Columns 2-10 are the 9 feature... | /hw3q2.R | no_license | rauldoe/cpsc375hw3 | R | false | false | 1,720 | r | # install.packages("tidyverse")
# install.packages("ggplot2")
# install.packages("class")
library(tidyverse)
library(ggplot2)
library(dplyr)
library(class)
setwd("c:/temp/cpsc375hw3")
# 2
# a. Load the data. Column 1 ("Code") is the anonymized subject code and will not be used here.
# Columns 2-10 are the 9 feature... |
############################### ETMUN bipartite Networks STEP 1 ###################
#
#
# DESCRIPTION : Travail sur le graphe ETMUN (affiliation) biparti.
# Résumé numérique des dimensions des graphes (différents filtrages)
#
#
###################... | /4.2.InterOrgaNet/ETMUN_inter/STEP1_2m_dimensions_ETMUN.R | no_license | pgourdongeo/Chap4_NetworkAnalysis | R | false | false | 6,580 | r | ############################### ETMUN bipartite Networks STEP 1 ###################
#
#
# DESCRIPTION : Travail sur le graphe ETMUN (affiliation) biparti.
# Résumé numérique des dimensions des graphes (différents filtrages)
#
#
###################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sem.R
\name{sem}
\alias{sem}
\title{Standard Error of the Mean}
\usage{
sem(x, na.rm = FALSE)
}
\arguments{
\item{x}{A numeric vector or an R object, which is coercible to one by as.vector(x, "numeric")}
\item{na.rm}{logical. Should missing ... | /man/sem.Rd | no_license | opelr/opelR | R | false | true | 464 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sem.R
\name{sem}
\alias{sem}
\title{Standard Error of the Mean}
\usage{
sem(x, na.rm = FALSE)
}
\arguments{
\item{x}{A numeric vector or an R object, which is coercible to one by as.vector(x, "numeric")}
\item{na.rm}{logical. Should missing ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gsMethods.R, R/gsqplot.R
\name{summary.gsDesign}
\alias{summary.gsDesign}
\alias{print.gsDesign}
\alias{gsBoundSummary}
\alias{xprint}
\alias{print.gsBoundSummary}
\alias{gsBValue}
\alias{gsDelta}
\alias{gsRR}
\alias{gsHR}
\alias{... | /man/gsBoundSummary.Rd | no_license | cran/gsDesign | R | false | true | 15,408 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gsMethods.R, R/gsqplot.R
\name{summary.gsDesign}
\alias{summary.gsDesign}
\alias{print.gsDesign}
\alias{gsBoundSummary}
\alias{xprint}
\alias{print.gsBoundSummary}
\alias{gsBValue}
\alias{gsDelta}
\alias{gsRR}
\alias{gsHR}
\alias{... |
# Question 2
#######################################################################################################################
#
# What type of variable is genhlth?
#
#######################################################################################################################
1 numerical, continuous... | /dataCamp/openCourses/dataAnalysisAndStatisticalInference/2_introductionToData/5_question2.R | permissive | odonnmi/learnNPractice | R | false | false | 426 | r | # Question 2
#######################################################################################################################
#
# What type of variable is genhlth?
#
#######################################################################################################################
1 numerical, continuous... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_ora_on_eset.R
\name{get_entrezg_from_gsymbols}
\alias{get_entrezg_from_gsymbols}
\title{Get entrez from gene symbols}
\usage{
get_entrezg_from_gsymbols(object, load_org.xx.xx.db)
}
\arguments{
\item{object}{eset}
\item{load_org.xx.xx.db}... | /autonomics.ora/man/get_entrezg_from_gsymbols.Rd | no_license | bhagwataditya/autonomics0 | R | false | true | 810 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run_ora_on_eset.R
\name{get_entrezg_from_gsymbols}
\alias{get_entrezg_from_gsymbols}
\title{Get entrez from gene symbols}
\usage{
get_entrezg_from_gsymbols(object, load_org.xx.xx.db)
}
\arguments{
\item{object}{eset}
\item{load_org.xx.xx.db}... |
# This file defines and describes the model to approximate
# There must be declarations for all the model parameters, e.g. the path
# and the command to execute it or the model dimensions d and k.
# The model described in this file is the one in the param_search directory.
source("R/Model.R")
min.cross.corr = functi... | /init_model.R | no_license | espositomarco/SFA-falsification | R | false | false | 2,877 | r | # This file defines and describes the model to approximate
# There must be declarations for all the model parameters, e.g. the path
# and the command to execute it or the model dimensions d and k.
# The model described in this file is the one in the param_search directory.
source("R/Model.R")
min.cross.corr = functi... |
h5.read.spikes.dh <-
function (h5file, ids = NULL, time.interval = 1, beg = NULL,
end = NULL, corr.breaks)
{
chop <- function(v, counts) {
stopifnot(sum(counts) == length(v))
end <- cumsum(counts)
beg <- c(1, 1 + end[-length(end)])
begend <- cbind(beg, end)
apply(beg... | /R/h5.read.spikes.dh.R | no_license | dianaransomhall/meadq | R | false | false | 1,463 | r | h5.read.spikes.dh <-
function (h5file, ids = NULL, time.interval = 1, beg = NULL,
end = NULL, corr.breaks)
{
chop <- function(v, counts) {
stopifnot(sum(counts) == length(v))
end <- cumsum(counts)
beg <- c(1, 1 + end[-length(end)])
begend <- cbind(beg, end)
apply(beg... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{fars_read_years}
\alias{fars_read_years}
\title{Read FARS years}
\usage{
fars_read_years(years)
}
\arguments{
\item{years}{A vector with a list of years}
}
\value{
A data.frame including entries in data by month, or NUL... | /man/fars_read_years.Rd | no_license | jpmaillard/fars | R | false | true | 553 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{fars_read_years}
\alias{fars_read_years}
\title{Read FARS years}
\usage{
fars_read_years(years)
}
\arguments{
\item{years}{A vector with a list of years}
}
\value{
A data.frame including entries in data by month, or NUL... |
#==============================================================================
#TITLE : plot4.R
#DESCRIPTION : Exploratory Data Analysis - Course Project 2
# 1. Download emissions data
# 2. Explore how emissions from coal combustion sources changed in US
# 3. Draw a bar plot betwe... | /Project 2/plot4.R | no_license | VinayPrakashSingh/coursera-exploratory-data-analysis | R | false | false | 3,054 | r | #==============================================================================
#TITLE : plot4.R
#DESCRIPTION : Exploratory Data Analysis - Course Project 2
# 1. Download emissions data
# 2. Explore how emissions from coal combustion sources changed in US
# 3. Draw a bar plot betwe... |
library(tidyverse)
library(here)
# This file brings in assets (data and CSS) from the assets repo (https://github.com/rfortherestofus/assets).
# Get Data ----------------------------------------------------------------
download.file("https://github.com/rfortherestofus/assets/raw/master/data/nhanes.csv",
... | /R/setup.R | no_license | rfortherestofus/rru-misc | R | false | false | 615 | r | library(tidyverse)
library(here)
# This file brings in assets (data and CSS) from the assets repo (https://github.com/rfortherestofus/assets).
# Get Data ----------------------------------------------------------------
download.file("https://github.com/rfortherestofus/assets/raw/master/data/nhanes.csv",
... |
# resp_times.r
# Get the times at every response for whole data frame
resp_times <- function(df,n_trials){
df <- df %>% filter(cum_trial <= n_trials,
cum_dt <= 180)
df$bins <- df$cum_dt %>%
get_bins(., 0, 180, 1)
df <- df %>%
{
var <- .
event <- var %>% `[[`("... | /analysis/r/resp_times.r | permissive | jealcalat/Generalization_decrement_data-analysis | R | false | false | 505 | r | # resp_times.r
# Get the times at every response for whole data frame
resp_times <- function(df,n_trials){
df <- df %>% filter(cum_trial <= n_trials,
cum_dt <= 180)
df$bins <- df$cum_dt %>%
get_bins(., 0, 180, 1)
df <- df %>%
{
var <- .
event <- var %>% `[[`("... |
#1st method
omni1 = read.csv(./data/salesqty.csv)
head(omni1)
#2nd Method : from CSV file
omni2 = read.csv(file.choose())
head(omni2)
#3rd Method : from gsheet
library(gsheet)
url = "https://docs.google.com/spreadsheets/d/1h7HU0X_Q4T5h5D1Q36qoK40Tplz94x_HZYHOJJC_edU/edit#gid=1595306231"
omni3 = as.data.frame(gsheet:... | /csv_read.R | no_license | swarnavanaskar/analytics_1 | R | false | false | 922 | r | #1st method
omni1 = read.csv(./data/salesqty.csv)
head(omni1)
#2nd Method : from CSV file
omni2 = read.csv(file.choose())
head(omni2)
#3rd Method : from gsheet
library(gsheet)
url = "https://docs.google.com/spreadsheets/d/1h7HU0X_Q4T5h5D1Q36qoK40Tplz94x_HZYHOJJC_edU/edit#gid=1595306231"
omni3 = as.data.frame(gsheet:... |
#!/usr/bin/Rscript
library(biomaRt)
library(org.Hs.eg.db)
library(optparse)
# Now annotate IDs
# EncaPSULATE THIS Bit in a function when I can be bothered
mart <- useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl")
results <- getBM(attributes = c("description", "external_gene_id"), filters = "ensembl_gene... | /PhD/130830_convertGeneIDs.R | no_license | dvbrown/Rscripts | R | false | false | 1,953 | r | #!/usr/bin/Rscript
library(biomaRt)
library(org.Hs.eg.db)
library(optparse)
# Now annotate IDs
# EncaPSULATE THIS Bit in a function when I can be bothered
mart <- useMart(biomart = "ensembl", dataset = "hsapiens_gene_ensembl")
results <- getBM(attributes = c("description", "external_gene_id"), filters = "ensembl_gene... |
\name{loafercreek}
\alias{loafercreek}
\alias{gopheridge}
\alias{mineralKing}
\docType{data}
\title{Example \code{SoilProfilecollection} Objects Returned by \code{fetchNASIS}.}
\description{Several examples of soil profile collections returned by \code{fetchNASIS(from='pedons')} as \code{SoilProfileCollection} objec... | /misc/man-deprecated/loafercreek.Rd | no_license | Emory-ENVS-SihiLab/soilDB | R | false | false | 2,035 | rd | \name{loafercreek}
\alias{loafercreek}
\alias{gopheridge}
\alias{mineralKing}
\docType{data}
\title{Example \code{SoilProfilecollection} Objects Returned by \code{fetchNASIS}.}
\description{Several examples of soil profile collections returned by \code{fetchNASIS(from='pedons')} as \code{SoilProfileCollection} objec... |
callback <- function(panel)
{
print(panel$option)
}
panel1 <- rp.control()
rp.textentry(panel1, option, labels="Your name:", initval="-", action=callback, width=40)
panel2 <- rp_window()
rp.textentry(panel2, option, labels=c("Your height:", "Your weight:"), initval=c("H", "W"), action=callback, width=20)
... | /demo/rp.textentry.r | no_license | cran/rpanel | R | false | false | 322 | r | callback <- function(panel)
{
print(panel$option)
}
panel1 <- rp.control()
rp.textentry(panel1, option, labels="Your name:", initval="-", action=callback, width=40)
panel2 <- rp_window()
rp.textentry(panel2, option, labels=c("Your height:", "Your weight:"), initval=c("H", "W"), action=callback, width=20)
... |
# trait MEANS #
library(plyr)
library(ggplot2)
library(reshape2)
traits <- read.csv("data/harvest/traits.csv", header=T)
#traits <- subset(traits, treatment != "flooded")
# subset by species
traits.A <- subset(traits, species == "acacia")
traits.C <- subset(traits, species == "cas")
traits.E <- subset(traits, speci... | /scripts/trait_means.R | no_license | jamesrlawson/waterloggingCO2 | R | false | false | 2,539 | r | # trait MEANS #
library(plyr)
library(ggplot2)
library(reshape2)
traits <- read.csv("data/harvest/traits.csv", header=T)
#traits <- subset(traits, treatment != "flooded")
# subset by species
traits.A <- subset(traits, species == "acacia")
traits.C <- subset(traits, species == "cas")
traits.E <- subset(traits, speci... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package.R
\name{xml_parse_data}
\alias{xml_parse_data}
\title{Convert R parse data to XML}
\usage{
xml_parse_data(x, includeText = NA, pretty = FALSE)
}
\arguments{
\item{x}{
an expression returned from \code{\link{parse}}, or a function ... | /man/xml_parse_data.Rd | permissive | AshesITR/xmlparsedata | R | false | true | 2,056 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package.R
\name{xml_parse_data}
\alias{xml_parse_data}
\title{Convert R parse data to XML}
\usage{
xml_parse_data(x, includeText = NA, pretty = FALSE)
}
\arguments{
\item{x}{
an expression returned from \code{\link{parse}}, or a function ... |
function (cv1, cv2, cv3, width1, width2, width3, heights, x,
y, z, p1, p3, tmin, tmax)
{
e <- get("data.env", .GlobalEnv)
e[["fe3dp13"]][[length(e[["fe3dp13"]]) + 1]] <- list(cv1 = cv1,
cv2 = cv2, cv3 = cv3, width1 = width1, width2 = width2,
width3 = width3, heights = heights, x = x, y =... | /valgrind_test_dir/fe3dp13-test.R | no_license | akhikolla/RcppDeepStateTest | R | false | false | 546 | r | function (cv1, cv2, cv3, width1, width2, width3, heights, x,
y, z, p1, p3, tmin, tmax)
{
e <- get("data.env", .GlobalEnv)
e[["fe3dp13"]][[length(e[["fe3dp13"]]) + 1]] <- list(cv1 = cv1,
cv2 = cv2, cv3 = cv3, width1 = width1, width2 = width2,
width3 = width3, heights = heights, x = x, y =... |
## The first function, makeCacheMatrix, returns a list of 4 functions:
## set, get, setinv, and getinv functions
## takes as input and matrix ,x, and returns a list of 4 functions:
## set, get, setinv, and getinv functions .
## The <<- operator is used to set the value of i to null in the parent (global)
## Envir... | /cachematrix.R | no_license | StevenOshry/ProgrammingAssignment2 | R | false | false | 1,364 | r | ## The first function, makeCacheMatrix, returns a list of 4 functions:
## set, get, setinv, and getinv functions
## takes as input and matrix ,x, and returns a list of 4 functions:
## set, get, setinv, and getinv functions .
## The <<- operator is used to set the value of i to null in the parent (global)
## Envir... |
# Attempt 2: PCA-in-groups
# The point of this file:
# Clearly, some sort of variable selection must be done. Early attempts at PCA
# were, shall we say, less than promising. In this file, I use Zsuzsa's grouped
# variables to do a smaller PCA-in-groups.
# Load in data
filepath <- '/home/beeb/Documents/Data_Science/N... | /Feature engineering/feature engineering v2-2.R | no_license | abarciauskas-bgse/kaggle-onlinenewspopularity | R | false | false | 3,864 | r | # Attempt 2: PCA-in-groups
# The point of this file:
# Clearly, some sort of variable selection must be done. Early attempts at PCA
# were, shall we say, less than promising. In this file, I use Zsuzsa's grouped
# variables to do a smaller PCA-in-groups.
# Load in data
filepath <- '/home/beeb/Documents/Data_Science/N... |
##Data Loading and Processing
install.packages("data.table")
library(dplyr)
setwd("C:/Users/lsharifi/Desktop/Rot2/coursera/A4-w1")
power<- read.table ('household_power_consumption.txt', sep=";" , header=TRUE, na.strings="?",
stringsAsFactors=FALSE
)
View(power)
#convert date and time variables to Date/Ti... | /A4-w1.R | no_license | layaSharifi/ExData_Plotting1 | R | false | false | 2,751 | r |
##Data Loading and Processing
install.packages("data.table")
library(dplyr)
setwd("C:/Users/lsharifi/Desktop/Rot2/coursera/A4-w1")
power<- read.table ('household_power_consumption.txt', sep=";" , header=TRUE, na.strings="?",
stringsAsFactors=FALSE
)
View(power)
#convert date and time variables to Date/Ti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elasticsearchservice_operations.R
\name{elasticsearchservice_describe_elasticsearch_domain}
\alias{elasticsearchservice_describe_elasticsearch_domain}
\title{Returns domain configuration information about the specified
Elasticsearch domain, i... | /cran/paws.analytics/man/elasticsearchservice_describe_elasticsearch_domain.Rd | permissive | johnnytommy/paws | R | false | true | 845 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elasticsearchservice_operations.R
\name{elasticsearchservice_describe_elasticsearch_domain}
\alias{elasticsearchservice_describe_elasticsearch_domain}
\title{Returns domain configuration information about the specified
Elasticsearch domain, i... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ml_classification_gbt_classifier.R,
% R/ml_model_gradient_boosted_trees.R, R/ml_regression_gbt_regressor.R
\name{ml_gbt_classifier}
\alias{ml_gbt_classifier}
\alias{ml_gradient_boosted_trees}
\alias{ml_gradient_boosted_trees}
\alias{ml_gbt_... | /man/ml_gradient_boosted_trees.Rd | permissive | shabbybanks/sparklyr | R | false | true | 9,938 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ml_classification_gbt_classifier.R,
% R/ml_model_gradient_boosted_trees.R, R/ml_regression_gbt_regressor.R
\name{ml_gbt_classifier}
\alias{ml_gbt_classifier}
\alias{ml_gradient_boosted_trees}
\alias{ml_gradient_boosted_trees}
\alias{ml_gbt_... |
## this script scrapes data about the episode results across each GBBO series
## and exports the list to a json + the data frame to a csv
library(rvest)
library(purrr)
library(dplyr)
library(tidyr)
library(readr)
url_base <- "https://en.wikipedia.org/wiki/The_Great_British_Bake_Off_(series_%d)"
## get the episode res... | /data-raw/results-scrape.R | permissive | mai-n-coleman/bakeoff | R | false | false | 2,235 | r | ## this script scrapes data about the episode results across each GBBO series
## and exports the list to a json + the data frame to a csv
library(rvest)
library(purrr)
library(dplyr)
library(tidyr)
library(readr)
url_base <- "https://en.wikipedia.org/wiki/The_Great_British_Bake_Off_(series_%d)"
## get the episode res... |
library(sceasy)
h5adPath <- commandArgs(trailingOnly = TRUE)[1]
sceasy::convertFormat(h5adPath, from="anndata", to="seurat", outFile = gsub(".h5ad", ".rds", h5adPath), main_layer = "data")
| /backend/corpora/dataset_processing/make_seurat.R | permissive | isabella232/corpora-data-portal | R | false | false | 191 | r | library(sceasy)
h5adPath <- commandArgs(trailingOnly = TRUE)[1]
sceasy::convertFormat(h5adPath, from="anndata", to="seurat", outFile = gsub(".h5ad", ".rds", h5adPath), main_layer = "data")
|
#' @importFrom R6 R6Class
NULL
#' EnergyPlus IDD object
#'
#' `IddObject` is an abstraction of a single object in an [Idd] object. It
#' provides more detail methods to query field properties. `IddObject` can only
#' be created from the parent [Idd] object, using `$object()`,
#' `$object_in_group()` and other equivale... | /R/idd_object.R | permissive | lukas-rokka/eplusr | R | false | false | 65,732 | r | #' @importFrom R6 R6Class
NULL
#' EnergyPlus IDD object
#'
#' `IddObject` is an abstraction of a single object in an [Idd] object. It
#' provides more detail methods to query field properties. `IddObject` can only
#' be created from the parent [Idd] object, using `$object()`,
#' `$object_in_group()` and other equivale... |
library(tidyverse) # CRAN v1.3.0
library(lubridate) # CRAN v1.7.9
library(jsonlite) # CRAN v1.7.0
library(textfeatures) # CRAN v0.3.3
library(emo) # [github::hadley/emo] v0.0.0.9000
source("R/count_utils.R")
#######################################################################
# ... | /R/telegram_group_chat.R | no_license | aephidayatuloh/tg | R | false | false | 3,843 | r | library(tidyverse) # CRAN v1.3.0
library(lubridate) # CRAN v1.7.9
library(jsonlite) # CRAN v1.7.0
library(textfeatures) # CRAN v0.3.3
library(emo) # [github::hadley/emo] v0.0.0.9000
source("R/count_utils.R")
#######################################################################
# ... |
library(pheatmap)
library(mclust)
library(data.table)
### get parameters
args = commandArgs(trailingOnly=TRUE)
signal_mat_file = args[1]
signal_mat_tp_file = args[2]
qPCR_mat_file = args[3]
qPCR_mat_tp_file = args[4]
output_file_name = args[5]
signal_mat_file_raw = 'ctcf.qPCR.randbg.blackrm.idsort.sigmat.bgsub.txt'
... | /02_22_2020_pipeline/get_replicates_R2.R | no_license | guanjue/CTCF_Auxin_clustering | R | false | false | 2,791 | r | library(pheatmap)
library(mclust)
library(data.table)
### get parameters
args = commandArgs(trailingOnly=TRUE)
signal_mat_file = args[1]
signal_mat_tp_file = args[2]
qPCR_mat_file = args[3]
qPCR_mat_tp_file = args[4]
output_file_name = args[5]
signal_mat_file_raw = 'ctcf.qPCR.randbg.blackrm.idsort.sigmat.bgsub.txt'
... |
# SVR
setwd("/media/user/Edison/datascience@BGU/MyProjects/Udemy-Course/Project1")
# Importing the dataset
load("Polynomial.regression.RData")
dataset = dataset[2:3]
# Splitting the dataset into the Training set and Test set
# # install.packages('caTools')
# library(caTools)
# set.seed(123)
# split = sample.split(dat... | /Udemy-Machine Learning A-Z/support.vector.regression.R | no_license | getachew67/Data-Science-using-R | R | false | false | 1,656 | r | # SVR
setwd("/media/user/Edison/datascience@BGU/MyProjects/Udemy-Course/Project1")
# Importing the dataset
load("Polynomial.regression.RData")
dataset = dataset[2:3]
# Splitting the dataset into the Training set and Test set
# # install.packages('caTools')
# library(caTools)
# set.seed(123)
# split = sample.split(dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/columns.R
\name{update_column}
\alias{update_column}
\alias{move_column}
\title{Update a column in a GitHub project}
\usage{
update_column(column, name, project, repo, user, org, ...)
move_column(column, position, after, project, repo, user,... | /man/update_column.Rd | permissive | jfontestad/githapi | R | false | true | 2,650 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/columns.R
\name{update_column}
\alias{update_column}
\alias{move_column}
\title{Update a column in a GitHub project}
\usage{
update_column(column, name, project, repo, user, org, ...)
move_column(column, position, after, project, repo, user,... |
#### README ############
## There are 9 sections in this code
## Section 1) download and process the FPKM and sample infor from GEO
## section 2) Quanlity control and feature selection
## section 3) clustering cells by gene markers
## section 4) clustering cells without gen... | /examples/code/lung_Treutlein2014/1_FPKM_preprocess.R | no_license | xyang2uchicago/BioTIP | R | false | false | 52,215 | r | #### README ############
## There are 9 sections in this code
## Section 1) download and process the FPKM and sample infor from GEO
## section 2) Quanlity control and feature selection
## section 3) clustering cells by gene markers
## section 4) clustering cells without gen... |
cat("\014") # Clear your console
rm(list = ls()) #clear your environment
########################## Load in header file ######################## #
setwd("~/git/of-dollars-and-data")
source(file.path(paste0(getwd(),"/header.R")))
########################## Load in Libraries ########################## #
library(MASS)
... | /build/13-simulate-correlated-hedge-fund-returns.R | no_license | ishanbose/of-dollars-and-data | R | false | false | 8,419 | r | cat("\014") # Clear your console
rm(list = ls()) #clear your environment
########################## Load in header file ######################## #
setwd("~/git/of-dollars-and-data")
source(file.path(paste0(getwd(),"/header.R")))
########################## Load in Libraries ########################## #
library(MASS)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudfront_operations.R
\name{cloudfront_get_streaming_distribution}
\alias{cloudfront_get_streaming_distribution}
\title{Gets information about a specified RTMP distribution, including the
distribution configuration}
\usage{
cloudfront_get_s... | /cran/paws.networking/man/cloudfront_get_streaming_distribution.Rd | permissive | TWarczak/paws | R | false | true | 1,898 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudfront_operations.R
\name{cloudfront_get_streaming_distribution}
\alias{cloudfront_get_streaming_distribution}
\title{Gets information about a specified RTMP distribution, including the
distribution configuration}
\usage{
cloudfront_get_s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classes.R
\name{show,goc-method}
\alias{show,goc-method}
\alias{show,grain-method}
\alias{show,corridor-method}
\title{Show a \code{grainscape} object}
\usage{
\S4method{show}{goc}(object)
\S4method{show}{grain}(object)
\S4method{show}{corr... | /grainscape/man/show.Rd | no_license | akhikolla/InformationHouse | R | false | true | 553 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classes.R
\name{show,goc-method}
\alias{show,goc-method}
\alias{show,grain-method}
\alias{show,corridor-method}
\title{Show a \code{grainscape} object}
\usage{
\S4method{show}{goc}(object)
\S4method{show}{grain}(object)
\S4method{show}{corr... |
## ----
## title: "Post_bedtools_analysis"
## input: bedtools coverage results for individual samples
## author: "binhe"
## created: "02/18/2016"
## modified: "04/03/2016", "10/18/2017"
## output: html_document
## ---
# 1. load packages
library(data.table)
library(hexbin)
# 2. load data and annotation
anno <- fread("... | /E009-Pi-timecourse/01-Cgla-HBZ-2017/02-RNAseq-analysis/code/Post_bedtools_analysis.R | no_license | hezhaobin/more-pho | R | false | false | 1,769 | r | ## ----
## title: "Post_bedtools_analysis"
## input: bedtools coverage results for individual samples
## author: "binhe"
## created: "02/18/2016"
## modified: "04/03/2016", "10/18/2017"
## output: html_document
## ---
# 1. load packages
library(data.table)
library(hexbin)
# 2. load data and annotation
anno <- fread("... |
# KOMP confounding
library(tidyverse)
library(lubridate)
library(broom)
library(xts)
load("/Users/alfloeffler/Documents/Luftqualitaet/Analysen/NO2/BW_17_stationen.RData")
summary(BW_station_data)
load("~/Documents/Luftqualitaet/Analysen/NO2/BW_stations_komp_WG.RData")
BW_stations_komp_WG %>% summary()
BW_data <- BW_sta... | /Komp_confounding.R | no_license | aloes2512/NO2 | R | false | false | 1,999 | r | # KOMP confounding
library(tidyverse)
library(lubridate)
library(broom)
library(xts)
load("/Users/alfloeffler/Documents/Luftqualitaet/Analysen/NO2/BW_17_stationen.RData")
summary(BW_station_data)
load("~/Documents/Luftqualitaet/Analysen/NO2/BW_stations_komp_WG.RData")
BW_stations_komp_WG %>% summary()
BW_data <- BW_sta... |
library(ape)
testtree <- read.tree("2485_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="2485_0_unrooted.txt") | /codeml_files/newick_trees_processed/2485_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("2485_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="2485_0_unrooted.txt") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drive_objects.R
\name{ParentReference}
\alias{ParentReference}
\title{ParentReference Object}
\usage{
ParentReference(id = NULL, isRoot = NULL, parentLink = NULL,
selfLink = NULL)
}
\arguments{
\item{id}{The ID of the parent}
\item{isRoot}... | /googledrivev2.auto/man/ParentReference.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 716 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drive_objects.R
\name{ParentReference}
\alias{ParentReference}
\title{ParentReference Object}
\usage{
ParentReference(id = NULL, isRoot = NULL, parentLink = NULL,
selfLink = NULL)
}
\arguments{
\item{id}{The ID of the parent}
\item{isRoot}... |
#Process Modes User Script
#Jonathan H. Morgan
#18 May 2020
#Clear Out Console Script
cat("\014")
#Clearing Old Data
rm(list = ls())
gc()
#Setting Working Directory
setwd("~/Desktop/ACT/Duke10/Scripts and Visualizations/")
getwd()
#Calling Function
source("~/Desktop/ACT/ACT R Functions/modes_processing_18May2020.R"... | /ACT Modal Analyses/modes_processing_example_18May2020.R | no_license | jhm18/Generative-Social-Science | R | false | false | 1,000 | r | #Process Modes User Script
#Jonathan H. Morgan
#18 May 2020
#Clear Out Console Script
cat("\014")
#Clearing Old Data
rm(list = ls())
gc()
#Setting Working Directory
setwd("~/Desktop/ACT/Duke10/Scripts and Visualizations/")
getwd()
#Calling Function
source("~/Desktop/ACT/ACT R Functions/modes_processing_18May2020.R"... |
#' read Stock Synthesis data file
#'
#' Read Stock Synthesis data file into list object in R. This function is a
#' wrapper which calls SS_readdat_2.00, SS_readdat_3.00, SS_readdat_3.24, or SS_readdat_3.30
#' (and potentially additional functions in the future). This setup allows those
#' functions to be cleaner (if so... | /R/SS_readdat.R | no_license | amart/r4ss | R | false | false | 3,726 | r | #' read Stock Synthesis data file
#'
#' Read Stock Synthesis data file into list object in R. This function is a
#' wrapper which calls SS_readdat_2.00, SS_readdat_3.00, SS_readdat_3.24, or SS_readdat_3.30
#' (and potentially additional functions in the future). This setup allows those
#' functions to be cleaner (if so... |
with(aa53f79bdffed440e9878c0a57e2678e5, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';rm(list=ls())}); | /80bb2a25-ac5d-47d0-abfc-b3f3811f0936/R/Temp/ahP2iQqS7eqaZ.R | no_license | ayanmanna8/test | R | false | false | 212 | r | with(aa53f79bdffed440e9878c0a57e2678e5, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';rm(list=ls())}); |
#' Calculate the single entropy
#' @description
#' To calculate entropy for single branch, the data is first separated into two sections. One is feature section which contains the attributes and the other one is class section which contains the classification result in the dataset. The two inputs in this function featu... | /SoySauce/R/get_entropy.R | no_license | cherishwsx/SoySaucePackage | R | false | false | 1,064 | r | #' Calculate the single entropy
#' @description
#' To calculate entropy for single branch, the data is first separated into two sections. One is feature section which contains the attributes and the other one is class section which contains the classification result in the dataset. The two inputs in this function featu... |
# distance matrix
distM = read.csv(paste0(readwd,"distM_2Doutlines_dtw_1B150_20210802.csv"), row.names = 1)
# circumference data
load(paste0(readwd, "circumference_scaled_Rim_1B150_selectedERlist_20210802.RData"))
rowN = max(unlist(lapply(mat_circumference_scaled, dim)))
names(mat_circumference_scaled) = names(dis... | /R/get_data.R | permissive | kafetzakid/morphotypeShiny | R | false | false | 55,134 | r | # distance matrix
distM = read.csv(paste0(readwd,"distM_2Doutlines_dtw_1B150_20210802.csv"), row.names = 1)
# circumference data
load(paste0(readwd, "circumference_scaled_Rim_1B150_selectedERlist_20210802.RData"))
rowN = max(unlist(lapply(mat_circumference_scaled, dim)))
names(mat_circumference_scaled) = names(dis... |
setwd("~/Dropbox/Wisconsin Study")
url <- "http://www.ssc.wisc.edu/wlsresearch/data/downloads/wls-pub-13.03.stata.zip"
f <- file.path(getwd(), "wls-pub-13.03.stata.zip")
download.file(url, f, mode = "wb")
unzip("wls-pub-13.03.stata.zip")
# input Stata file
library(foreign)
wisconsin <- read.dta("wls_pub_13_03.dta")
sav... | /wisconsin code.R | no_license | yissylevi/work | R | false | false | 711 | r | setwd("~/Dropbox/Wisconsin Study")
url <- "http://www.ssc.wisc.edu/wlsresearch/data/downloads/wls-pub-13.03.stata.zip"
f <- file.path(getwd(), "wls-pub-13.03.stata.zip")
download.file(url, f, mode = "wb")
unzip("wls-pub-13.03.stata.zip")
# input Stata file
library(foreign)
wisconsin <- read.dta("wls_pub_13_03.dta")
sav... |
\name{mtaBin_next}
\alias{mtaBin_next}
\alias{print.mtaBin_next}
\title{Optimal dose determination for MTA with binary outcomes}
\description{
\code{mtaBin_next} is used to determine the next optimal dose to administer in a Phase I/II clinical trial for Molecularly Targeted Agent using the design proposed by Riviere et... | /fuzzedpackages/dfmta/man/mtaBin_next.Rd | no_license | akhikolla/testpackages | R | false | false | 9,048 | rd | \name{mtaBin_next}
\alias{mtaBin_next}
\alias{print.mtaBin_next}
\title{Optimal dose determination for MTA with binary outcomes}
\description{
\code{mtaBin_next} is used to determine the next optimal dose to administer in a Phase I/II clinical trial for Molecularly Targeted Agent using the design proposed by Riviere et... |
# gg is the output of load_ldsc_gene_groups()
get.celltype.annot <- function(gg){
library(stringi)
files=names(gg)
count=0
for(ff in files){
count=count+1
tmp = data.frame(file=ff,celltypes=names(gg[[ff]]),writtenName="")
tmp$writtenName = get.written.cellnames(files=tmp$file,cel... | /get.celltype.annot.r | no_license | neurogenomics/LDSC_Celltyping | R | false | false | 634 | r | # gg is the output of load_ldsc_gene_groups()
get.celltype.annot <- function(gg){
library(stringi)
files=names(gg)
count=0
for(ff in files){
count=count+1
tmp = data.frame(file=ff,celltypes=names(gg[[ff]]),writtenName="")
tmp$writtenName = get.written.cellnames(files=tmp$file,cel... |
library(keras)
library(readr)
library(stringr)
library(purrr)
library(tibble)
library(dplyr)
library(tools)
source(file_path_as_absolute("utils/getDados.R"))
source(file_path_as_absolute("utils/tokenizer.R"))
load("rdas/sequences.RData")
FLAGS <- flags(
flag_numeric("dropout1", 0.2),
flag_numeric("dropout2", 0.2... | /modelos/dadosok/cnn_drunk_tres_janelas.R | no_license | MarcosGrzeca/drunktweets | R | false | false | 3,103 | r | library(keras)
library(readr)
library(stringr)
library(purrr)
library(tibble)
library(dplyr)
library(tools)
source(file_path_as_absolute("utils/getDados.R"))
source(file_path_as_absolute("utils/tokenizer.R"))
load("rdas/sequences.RData")
FLAGS <- flags(
flag_numeric("dropout1", 0.2),
flag_numeric("dropout2", 0.2... |
# Project 1 - Plot 2
# Read the data file
filename = "power_data/household_power_consumption.txt"
message("Reading data from ", filename)
pdata <- read.table(filename, header=TRUE, sep=";", na.strings=c("?",""))
# set class type for date column
message("Set date type")
pdata$Date <- as.Date(pdata$Date, fo... | /plot2.R | no_license | RAHansen/ExData_Plotting1 | R | false | false | 885 | r | # Project 1 - Plot 2
# Read the data file
filename = "power_data/household_power_consumption.txt"
message("Reading data from ", filename)
pdata <- read.table(filename, header=TRUE, sep=";", na.strings=c("?",""))
# set class type for date column
message("Set date type")
pdata$Date <- as.Date(pdata$Date, fo... |
#' @title Get URL of a Fandom
#'
#' @description For a given fandom in a certain medium,
#' this function gives the URL of its story page.
#'
#' @param story Which Fandom would you like the URL for?
#' @param type Which type of media? Must be one of the following
#' ("anime", "book", "cartoon", "comic", "game", "... | /R/getUrl.R | no_license | ekmaus19/absentfan | R | false | false | 953 | r | #' @title Get URL of a Fandom
#'
#' @description For a given fandom in a certain medium,
#' this function gives the URL of its story page.
#'
#' @param story Which Fandom would you like the URL for?
#' @param type Which type of media? Must be one of the following
#' ("anime", "book", "cartoon", "comic", "game", "... |
library(ggplot2)
library(dplyr)
# Data here: http://regulomics.mimuw.edu.pl/~ilona/metatranscriptomics_in_DS/DeSeq2/
#setwd('/mnt/chr3/People/Ilona/Analyses_microbiomes_gene_exprs/2021_10_02_volcano_plots/')
# WT vs DS volcano plot
data <- read.csv('wt_tri_pvals.csv', stringsAsFactors = F, sep = ',')
data$color <- ... | /data_visualisation/volcano_plot.R | no_license | ilona-grabowicz/metatranscriptomics_in_DS | R | false | false | 2,296 | r | library(ggplot2)
library(dplyr)
# Data here: http://regulomics.mimuw.edu.pl/~ilona/metatranscriptomics_in_DS/DeSeq2/
#setwd('/mnt/chr3/People/Ilona/Analyses_microbiomes_gene_exprs/2021_10_02_volcano_plots/')
# WT vs DS volcano plot
data <- read.csv('wt_tri_pvals.csv', stringsAsFactors = F, sep = ',')
data$color <- ... |
library(shiny)
library(shinydashboard)
library(tidyverse)
library(openxlsx)
library(DT)
library(shinyWidgets)
policing_data <- read.xlsx("Completed Policing Legislation-4SB.xlsx", detectDates = TRUE)
topics_data <- read.csv("topics_data.csv")
# cleaning up column names
policing_data <- rename(policing_data, "LawNum" ... | /police_legislation_db.R | no_license | gugek/policing_legislation_database | R | false | false | 7,841 | r | library(shiny)
library(shinydashboard)
library(tidyverse)
library(openxlsx)
library(DT)
library(shinyWidgets)
policing_data <- read.xlsx("Completed Policing Legislation-4SB.xlsx", detectDates = TRUE)
topics_data <- read.csv("topics_data.csv")
# cleaning up column names
policing_data <- rename(policing_data, "LawNum" ... |
library(ggplot2)
library(grid)
library(RColorBrewer)
########### Example plots #################
####Bar
##1 color
#ggplot(data = mtcars, mapping = aes(factor(cyl))) +
# geom_bar() +
# ylim(c(0, 50)) +
# labs(title = "Title")
##3 colors
#ggplot(data = mtcars, mapping = aes(x = factor(cyl), fill = factor(cyl))) ... | /urban_ggplot_theme_new_formatting.R | no_license | dc0sic/urban_R_theme | R | false | false | 21,065 | r | library(ggplot2)
library(grid)
library(RColorBrewer)
########### Example plots #################
####Bar
##1 color
#ggplot(data = mtcars, mapping = aes(factor(cyl))) +
# geom_bar() +
# ylim(c(0, 50)) +
# labs(title = "Title")
##3 colors
#ggplot(data = mtcars, mapping = aes(x = factor(cyl), fill = factor(cyl))) ... |
\name{exampleRAD}
\alias{exampleRAD}
\alias{exampleRAD_mapping}
\alias{Msi01genes}
\docType{data}
\title{
Miniature Datasets for Testing polyRAD Functions
}
\description{
\code{exampleRAD} and \code{exampleRAD_mapping} are two very small
simulated \code{"\link{RADdata}"} datasets for testing polyRAD
functions. Each ha... | /man/exampleRAD.Rd | no_license | lvclark/polyRAD | R | false | false | 1,419 | rd | \name{exampleRAD}
\alias{exampleRAD}
\alias{exampleRAD_mapping}
\alias{Msi01genes}
\docType{data}
\title{
Miniature Datasets for Testing polyRAD Functions
}
\description{
\code{exampleRAD} and \code{exampleRAD_mapping} are two very small
simulated \code{"\link{RADdata}"} datasets for testing polyRAD
functions. Each ha... |
##############################################################################
########## EDA
##############################################################################
load("ERCM_MPLE_cl.RData")
# Number of new cases every year
counts<- table(scc1$year)
barplot(counts, main="Number of new Cases every Year", xl... | /RCode/EDA.R | no_license | desmarais-lab/Supreme_Court_Citation_Network | R | false | false | 3,178 | r | ##############################################################################
########## EDA
##############################################################################
load("ERCM_MPLE_cl.RData")
# Number of new cases every year
counts<- table(scc1$year)
barplot(counts, main="Number of new Cases every Year", xl... |
################################################################################################################
## detach specific loaded package
################################################################################################################
detach_package <- function(pkg, character.only = FALSE)
{
... | /clinical_data/clinical_data_pipeline.R | no_license | wjdddj/my_R_respository | R | false | false | 52,537 | r | ################################################################################################################
## detach specific loaded package
################################################################################################################
detach_package <- function(pkg, character.only = FALSE)
{
... |
library('testthat')
context('insertRowAndKeepAttr')
test_that("Keeps attributes", {
test <- matrix(1:4, ncol=2)
attr(test, 'wow') <- 1000
test <- insertRowAndKeepAttr(test, 1)
expect_equal(attr(test, 'wow'), 1000)
expect_equal(nrow(test), 3)
})
test_that("Keeps class", {
test <- matrix(1:4, ncol=2)
a... | /tests/testthat/test-insertRowAndKeepAttr.R | no_license | Holzhauer/Gmisc | R | false | false | 479 | r | library('testthat')
context('insertRowAndKeepAttr')
test_that("Keeps attributes", {
test <- matrix(1:4, ncol=2)
attr(test, 'wow') <- 1000
test <- insertRowAndKeepAttr(test, 1)
expect_equal(attr(test, 'wow'), 1000)
expect_equal(nrow(test), 3)
})
test_that("Keeps class", {
test <- matrix(1:4, ncol=2)
a... |
#' draws a graph of multiple names over time
#'
#' @param my_names list of names
#' @param the_sex Male or female, both by default
#'
#' @return a plot
#' @export
#' @import dplyr
#' @import ggplot2
#'
#' @examples
#' draw_names(c("Clément","Bertrand"),"M")
#'
draw_names <- function(my_names, the_sex = c("M","F")){
... | /R/draw_names.R | no_license | clemonster/nameplay | R | false | false | 590 | r |
#' draws a graph of multiple names over time
#'
#' @param my_names list of names
#' @param the_sex Male or female, both by default
#'
#' @return a plot
#' @export
#' @import dplyr
#' @import ggplot2
#'
#' @examples
#' draw_names(c("Clément","Bertrand"),"M")
#'
draw_names <- function(my_names, the_sex = c("M","F")){
... |
preda <- function(x,k) {
n <- length(x)
k2 <- k/2
# the vector pred will contain our predicted values
pred <- vector(length=n-k)
for (i in 1:(n-k)) {
if (sum(x[i:(i+(k-1))]) >= k2) pred[i] <- 1 else pred[i] <- 0 _label~sumx@
}
return(mean(abs(pred-x[(k+1):n])))
}
| /Art of R Programming Code/Ch2/preda.R | no_license | abhi8893/Intensive-R | R | false | false | 291 | r | preda <- function(x,k) {
n <- length(x)
k2 <- k/2
# the vector pred will contain our predicted values
pred <- vector(length=n-k)
for (i in 1:(n-k)) {
if (sum(x[i:(i+(k-1))]) >= k2) pred[i] <- 1 else pred[i] <- 0 _label~sumx@
}
return(mean(abs(pred-x[(k+1):n])))
}
|
\name{eulerian}
\alias{eulerian}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Method for finding an eulerian path or cycle.
}
\description{
An eulerian path is a path in a graph which visits every edge exactly once. This function returns an eulerian path from a graph (if there is any). It wo... | /eulerian/man/eulerian.Rd | no_license | alorchhota/eulerian | R | false | false | 1,605 | rd | \name{eulerian}
\alias{eulerian}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Method for finding an eulerian path or cycle.
}
\description{
An eulerian path is a path in a graph which visits every edge exactly once. This function returns an eulerian path from a graph (if there is any). It wo... |
## Functions to cache the inverse of a matrix.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
invr <- NULL
set <- function(y){
x <<- y
invr <<- NULL
}
get <- function() x
setInv <- function(solveMatrix) invr <<- solveMatrix
... | /cachematrix.R | no_license | Shashank9830/ProgrammingAssignment2 | R | false | false | 736 | r | ## Functions to cache the inverse of a matrix.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
invr <- NULL
set <- function(y){
x <<- y
invr <<- NULL
}
get <- function() x
setInv <- function(solveMatrix) invr <<- solveMatrix
... |
data <- read.table("household.txt", sep = ";")
# rename column names
colnames(data) <- as.character(unlist(data[1,]))
data = data[-1,]
# extract data with date between 2007-02-01 and 2007-02-02
dateStart <- "2007-02-01"
dateEnd <- "2007-02-02"
data$Date <- as.Date(strptime((data$Date), format = "%d/%m/%Y"))
data... | /plot3.R | no_license | mcb17/ExData_Plotting1 | R | false | false | 997 | r | data <- read.table("household.txt", sep = ";")
# rename column names
colnames(data) <- as.character(unlist(data[1,]))
data = data[-1,]
# extract data with date between 2007-02-01 and 2007-02-02
dateStart <- "2007-02-01"
dateEnd <- "2007-02-02"
data$Date <- as.Date(strptime((data$Date), format = "%d/%m/%Y"))
data... |
martingaleRun <- function(startMoney, baseBet = 1, betIncrease = 2.0, houseEdge=0.01) {
mVector <- c();
money <- startMoney;
bet <- baseBet;
bettingAgainst <- (0.5-(houseEdge/2));
maxMoney <- startMoney;
maxMoneyAtStep <- 0;
step <- 0;
while (bet < money) {
step <- step + 1;
#mVector[step] <-... | /martingale.R | no_license | Coornail/r-martingale-simulator | R | false | false | 800 | r | martingaleRun <- function(startMoney, baseBet = 1, betIncrease = 2.0, houseEdge=0.01) {
mVector <- c();
money <- startMoney;
bet <- baseBet;
bettingAgainst <- (0.5-(houseEdge/2));
maxMoney <- startMoney;
maxMoneyAtStep <- 0;
step <- 0;
while (bet < money) {
step <- step + 1;
#mVector[step] <-... |
library(quantmod)
library(ggplot2)
library(plyr)
library(grid)
library(gridExtra)
library(scales)
library(xlsx)
library(rgdal)
library(gdata)
library(sp)
# Carga data barril brent
getSymbols('DCOILBRENTEU', src='FRED')
# Carga datos Gasolina 95 y Gasoleo A de 2000 a 2015
precioCombust <- read.csv('src/precio_combusti... | /main.R | no_license | David-Carrasco/Brent-Oil-Prices-Analysis | R | false | false | 6,206 | r | library(quantmod)
library(ggplot2)
library(plyr)
library(grid)
library(gridExtra)
library(scales)
library(xlsx)
library(rgdal)
library(gdata)
library(sp)
# Carga data barril brent
getSymbols('DCOILBRENTEU', src='FRED')
# Carga datos Gasolina 95 y Gasoleo A de 2000 a 2015
precioCombust <- read.csv('src/precio_combusti... |
context("JSS article 2013")
suppressPackageStartupMessages(library("texreg"))
# example models from ?lm
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2, 10, 20, labels = c("Ctl", "Trt"))
weight <- c(ctl, trt)
m1 <- lm(weight ~ group)... | /tests/testthat/test-jss.R | no_license | leifeld/texreg | R | false | false | 6,058 | r | context("JSS article 2013")
suppressPackageStartupMessages(library("texreg"))
# example models from ?lm
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2, 10, 20, labels = c("Ctl", "Trt"))
weight <- c(ctl, trt)
m1 <- lm(weight ~ group)... |
#---------------------------
# tabs4-subgroup-ses.R
#
# Kishor Das (kishorisrt@gmail.com)
#
# estimate the effects of WASH
# interventions on easq
# subgroup analysis by socio-
# economic status
#-----------------------------
#----------------------------
# input files :
# washb-bangladesh-easq-year2.dta
# ... | /easq/subgroup-ses.R | no_license | kishor-das/WBB-child-development-outcomes | R | false | false | 17,153 | r | #---------------------------
# tabs4-subgroup-ses.R
#
# Kishor Das (kishorisrt@gmail.com)
#
# estimate the effects of WASH
# interventions on easq
# subgroup analysis by socio-
# economic status
#-----------------------------
#----------------------------
# input files :
# washb-bangladesh-easq-year2.dta
# ... |
#' @title
#' Print Method for Seroincidence Object
#'
#' @description
#' Custom \code{\link{print}} function to show output of the seroincidence calculator \code{\link{estimateSeroincidence}}.
#'
#' @param x A list containing output of function \code{\link{estimateSeroincidence}}.
#' @param ... Additional arguments aff... | /R/print.seroincidence.R | no_license | cran/seroincidence | R | false | false | 1,636 | r | #' @title
#' Print Method for Seroincidence Object
#'
#' @description
#' Custom \code{\link{print}} function to show output of the seroincidence calculator \code{\link{estimateSeroincidence}}.
#'
#' @param x A list containing output of function \code{\link{estimateSeroincidence}}.
#' @param ... Additional arguments aff... |
# Location of local schools with geocodes
ames_schools <- AmesHousing::ames_schools
# Function to compute distance to
distance_to_schools <- function(lon, lat) {
x <- c(lon, ames_schools$Longitude)
y <- c(lat, ames_schools$Latitude)
res <- as.matrix(dist(cbind(x, y)))[-1L, 1L, drop = TRUE]
names(res) <- ames_... | /docs/distance_to_schools.R | no_license | bgreenwell/intro-ml-r | R | false | false | 766 | r | # Location of local schools with geocodes
ames_schools <- AmesHousing::ames_schools
# Function to compute distance to
distance_to_schools <- function(lon, lat) {
x <- c(lon, ames_schools$Longitude)
y <- c(lat, ames_schools$Latitude)
res <- as.matrix(dist(cbind(x, y)))[-1L, 1L, drop = TRUE]
names(res) <- ames_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.