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 |
|---|---|---|---|---|---|---|---|---|---|
skip_on_cran()
t1 <- trial %>% tbl_summary()
t2 <- trial %>% tbl_summary(by = trt)
test_that("no errors/warnings with standard use", {
expect_error(t1 %>% add_n(), NA)
expect_error(t2 %>% add_n(), NA)
expect_warning(t1 %>% add_n(), NA)
expect_warning(t2 %>% add_n(), NA)
expect_error(t1 %>% add_n(last = TRUE... | /tests/testthat/test-add_n.R | permissive | eliascrapa/gtsummary | R | false | false | 5,159 | r | skip_on_cran()
t1 <- trial %>% tbl_summary()
t2 <- trial %>% tbl_summary(by = trt)
test_that("no errors/warnings with standard use", {
expect_error(t1 %>% add_n(), NA)
expect_error(t2 %>% add_n(), NA)
expect_warning(t1 %>% add_n(), NA)
expect_warning(t2 %>% add_n(), NA)
expect_error(t1 %>% add_n(last = TRUE... |
# Loading required libraries
library(dplyr)
# Downloading Data
if(!dir.exists('data')) dir.create('data')
if(!file.exists('data/data.zip')){
download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip', 'data/data.zip')
unzip('data/data.zip', exdir = 'data')
}
# Reading in data
nei <- re... | /Exploratory Data Analysis Week 4/plot1.R | no_license | blazyy/assignment_submissions | R | false | false | 1,161 | r | # Loading required libraries
library(dplyr)
# Downloading Data
if(!dir.exists('data')) dir.create('data')
if(!file.exists('data/data.zip')){
download.file('https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip', 'data/data.zip')
unzip('data/data.zip', exdir = 'data')
}
# Reading in data
nei <- re... |
\name{abcSGP}
\alias{abcSGP}
\title{Perform 6 step sequence: prepareSGP, analyzeSGP, combineSGP, summarizeSGP, visualizeSGP, and outputSGP}
\description{
Utility function to perform sequence of 6 steps going from data preparation, \code{\link{prepareSGP}}, SGP data analysis, \code{\link{analyzeSGP}},
data combining... | /man/abcSGP.Rd | no_license | shangyi/SGP.experiment | R | false | false | 12,125 | rd | \name{abcSGP}
\alias{abcSGP}
\title{Perform 6 step sequence: prepareSGP, analyzeSGP, combineSGP, summarizeSGP, visualizeSGP, and outputSGP}
\description{
Utility function to perform sequence of 6 steps going from data preparation, \code{\link{prepareSGP}}, SGP data analysis, \code{\link{analyzeSGP}},
data combining... |
library(vocaldia)
### Name: write.vocaldia
### Title: write.vocaldia
### Aliases: write.vocaldia
### ** Examples
data(vocdia)
write.vocaldia(getSampledVocalMatrix(subset(atddia,
id=='Abbott_Maddock_01'),
individual=TRUE, nodecolumn='speaker'),
... | /data/genthat_extracted_code/vocaldia/examples/write.vocaldia.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 393 | r | library(vocaldia)
### Name: write.vocaldia
### Title: write.vocaldia
### Aliases: write.vocaldia
### ** Examples
data(vocdia)
write.vocaldia(getSampledVocalMatrix(subset(atddia,
id=='Abbott_Maddock_01'),
individual=TRUE, nodecolumn='speaker'),
... |
ipm<-function(index_id,variables,args=NA){
library(RODBC)
smsh<-odbcConnect('smsh','nretail','nretail')
varos<-paste0(variables,collapse = ", ")
per<-ult.periodo(index_id)
if (!is.na(args)) {
linea<-paste0("SELECT ",varos," FROM index_period_market WHERE status_id IN (2) AND index_id... | /ExtraeDeSMS.R | no_license | Tezzzcatlipoca/ntools | R | false | false | 6,824 | r |
ipm<-function(index_id,variables,args=NA){
library(RODBC)
smsh<-odbcConnect('smsh','nretail','nretail')
varos<-paste0(variables,collapse = ", ")
per<-ult.periodo(index_id)
if (!is.na(args)) {
linea<-paste0("SELECT ",varos," FROM index_period_market WHERE status_id IN (2) AND index_id... |
#' European Standard Population 2013
#'
#' A numeric vector containing nineteen 5-year age band populations making up the 2013 European Standard Population
#' ordered from age 0-4, 5-9, 10-14 ... to ... 85-89, 90+. Sorted by increasing age band.
#'
#' @section Notes: The 2013 European Standard Population is modelled ... | /R/data.R | no_license | sebastian-fox/PHEindicatormethods | R | false | false | 1,385 | r | #' European Standard Population 2013
#'
#' A numeric vector containing nineteen 5-year age band populations making up the 2013 European Standard Population
#' ordered from age 0-4, 5-9, 10-14 ... to ... 85-89, 90+. Sorted by increasing age band.
#'
#' @section Notes: The 2013 European Standard Population is modelled ... |
#subset data in all data tables based on MRNUMBERS that meet inclusion criteria
#how to use: paste the lines below into your R code and modify per criteria
#source("subset_pop.R")
#table_name <- subset_pop(table_name, pop0000xx)
subset_pop <- function(x,y){
table <- subset(x,MRNUMBER %in% y$MRNUMBER)
return(t... | /subset_pop.R | no_license | borumlab/functions | R | false | false | 507 | r | #subset data in all data tables based on MRNUMBERS that meet inclusion criteria
#how to use: paste the lines below into your R code and modify per criteria
#source("subset_pop.R")
#table_name <- subset_pop(table_name, pop0000xx)
subset_pop <- function(x,y){
table <- subset(x,MRNUMBER %in% y$MRNUMBER)
return(t... |
rm (list = ls()) # clean up the table
# Dowload the dataset
fileURL= "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileURL, destfile = "./household_power_consumption.zip", method = "curl" , mode = "wb")
# unzip dataset
unzip(zipfile = "./household_power_consumpti... | /plot1.r | no_license | scheitelhecht/ExData_Plotting1 | R | false | false | 1,241 | r | rm (list = ls()) # clean up the table
# Dowload the dataset
fileURL= "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileURL, destfile = "./household_power_consumption.zip", method = "curl" , mode = "wb")
# unzip dataset
unzip(zipfile = "./household_power_consumpti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bijectors.R
\name{tfb_pad}
\alias{tfb_pad}
\title{Pads a value to the \code{event_shape} of a \code{Tensor}.}
\usage{
tfb_pad(
paddings = list(c(0, 1)),
mode = "CONSTANT",
constant_values = 0,
axis = NULL,
validate_args = FALSE,
n... | /man/tfb_pad.Rd | no_license | cran/tfprobability | R | false | true | 4,872 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bijectors.R
\name{tfb_pad}
\alias{tfb_pad}
\title{Pads a value to the \code{event_shape} of a \code{Tensor}.}
\usage{
tfb_pad(
paddings = list(c(0, 1)),
mode = "CONSTANT",
constant_values = 0,
axis = NULL,
validate_args = FALSE,
n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_flat.R
\name{get_flat}
\alias{get_flat}
\title{GET url and return data.frame}
\usage{
get_flat(url, token = NULL, query = NULL, retry = 3, wait = 1.5)
}
\arguments{
\item{url}{Url to get}
\item{token}{Secure token}
\item{query}{Addition... | /man/get_flat.Rd | no_license | vfulco/trelloR | R | false | true | 520 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_flat.R
\name{get_flat}
\alias{get_flat}
\title{GET url and return data.frame}
\usage{
get_flat(url, token = NULL, query = NULL, retry = 3, wait = 1.5)
}
\arguments{
\item{url}{Url to get}
\item{token}{Secure token}
\item{query}{Addition... |
items<-rep(LETTERS,2)[1:30]
lengths<-c(13.375,13.5,13.625,13.75,14,14.25,13.375,13.375,13.875,13.875,13.75,14,13.375,13.5,14,13.75,13.875,13.5,13.5,14,14,14,13.5,14.25,14.5,13.5,13.675,14.25,14.375,14.5)
#bathroom<-read.csv(file='bathroom.csv',colClasses=c("factor","numeric","numeric","numeric"))
spot<-rep(letters,2)... | /bath_ceil.r | no_license | briholt100/scripts | R | false | false | 2,372 | r | items<-rep(LETTERS,2)[1:30]
lengths<-c(13.375,13.5,13.625,13.75,14,14.25,13.375,13.375,13.875,13.875,13.75,14,13.375,13.5,14,13.75,13.875,13.5,13.5,14,14,14,13.5,14.25,14.5,13.5,13.675,14.25,14.375,14.5)
#bathroom<-read.csv(file='bathroom.csv',colClasses=c("factor","numeric","numeric","numeric"))
spot<-rep(letters,2)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analyze2DTPP.R
\name{analyze2DTPP}
\alias{analyze2DTPP}
\title{Analyze a 2D-TPP experiment}
\usage{
analyze2DTPP(
configTable,
data = NULL,
resultPath = NULL,
idVar = "gene_name",
fcStr = NULL,
intensityStr = "signal_sum_",
naSt... | /man/analyze2DTPP.Rd | no_license | andreaschrader/TPP | R | false | true | 6,739 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analyze2DTPP.R
\name{analyze2DTPP}
\alias{analyze2DTPP}
\title{Analyze a 2D-TPP experiment}
\usage{
analyze2DTPP(
configTable,
data = NULL,
resultPath = NULL,
idVar = "gene_name",
fcStr = NULL,
intensityStr = "signal_sum_",
naSt... |
## add matrix into the cash
makeCacheMatrix <- function(x = matrix()) {
if (dim(x)[1] != dim(x)[2]) {
message('Warrning, initial matrix should be square for inversing')
}
m <- NULL
setm <- function(y) {
x <<- y
m <<- NULL
}
getm <- function() x # our initial data
se... | /cachematrix.R | no_license | Mishkail/ProgrammingAssignment2 | R | false | false | 967 | r |
## add matrix into the cash
makeCacheMatrix <- function(x = matrix()) {
if (dim(x)[1] != dim(x)[2]) {
message('Warrning, initial matrix should be square for inversing')
}
m <- NULL
setm <- function(y) {
x <<- y
m <<- NULL
}
getm <- function() x # our initial data
se... |
#!/usr/bin/Rscript
#
# Seasonal Naive Method for Retail Forecasting Benchmark - OrangeJuice_Pt_3Weeks_Weekly
#
# This script can be executed with the following command
# Rscript <submission folder>/train_score.r --seed <seed value>
# where <seed value> is the random seed value from 1 to 5 (here since the fo... | /contrib/tsperf/OrangeJuice_Pt_3Weeks_Weekly/SeasonalNaive/train_score.r | permissive | cristinanichiforov/forecasting | R | false | false | 4,195 | r | #!/usr/bin/Rscript
#
# Seasonal Naive Method for Retail Forecasting Benchmark - OrangeJuice_Pt_3Weeks_Weekly
#
# This script can be executed with the following command
# Rscript <submission folder>/train_score.r --seed <seed value>
# where <seed value> is the random seed value from 1 to 5 (here since the fo... |
#model 1
trueMean <- 7.8
trueSd <-1.2
sampleSize <- 100
# create dependent values according to ax + b + N(0,sd)
y <- rnorm(n=sampleSize,mean=trueMean,sd=trueSd)
hist(y, main="Data Distribution")
likelihood <- function(param){
mu = param[1]
sd = param[2]
singlelikelihoods = dnorm(y, mean = mu, sd = sd, log ... | /learn_bayes/my_MCMC_script.R | no_license | ardittot/my_rstudio_workspace | R | false | false | 2,111 | r | #model 1
trueMean <- 7.8
trueSd <-1.2
sampleSize <- 100
# create dependent values according to ax + b + N(0,sd)
y <- rnorm(n=sampleSize,mean=trueMean,sd=trueSd)
hist(y, main="Data Distribution")
likelihood <- function(param){
mu = param[1]
sd = param[2]
singlelikelihoods = dnorm(y, mean = mu, sd = sd, log ... |
library(dplyr)
library(ggplot2)
library(tidyr)
library(readr)
library(zoo)
library(gganimate)
vehicle.type <- c("Car", "Truck", "Multi-axle")
vehicle.in <- c("NA")
wait.time <- c()
wait<-0
simulation <- 1000
#sample(vehicle.type, 1,prob = c(0.5, 0.5, 0.3))
for (i in 1:simulation) {
vehicle.in[i... | /toll_simulation.R | no_license | jaykhedekar7/Rprogramming | R | false | false | 2,064 | r | library(dplyr)
library(ggplot2)
library(tidyr)
library(readr)
library(zoo)
library(gganimate)
vehicle.type <- c("Car", "Truck", "Multi-axle")
vehicle.in <- c("NA")
wait.time <- c()
wait<-0
simulation <- 1000
#sample(vehicle.type, 1,prob = c(0.5, 0.5, 0.3))
for (i in 1:simulation) {
vehicle.in[i... |
testlist <- list(AgeVector = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ExpressionSet = structure(c(1.63064200184954e+212, 1.11558267938731e+157, 2.3453288146775e+59, 7.59955788945772e-256, 5.55398... | /myTAI/inst/testfiles/cpp_omitMatrix/AFL_cpp_omitMatrix/cpp_omitMatrix_valgrind_files/1615845066-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,090 | r | testlist <- list(AgeVector = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ExpressionSet = structure(c(1.63064200184954e+212, 1.11558267938731e+157, 2.3453288146775e+59, 7.59955788945772e-256, 5.55398... |
##### SCRIPT TO PLOT HISTOGRAMS OF META-ANALYSIS/GWAS RESULTS #####
#
# Originally from the MANTEL Package, MANTEL_RELEASE.May_2011
# made by De Bakker Lab members Sara Pulit, Jessica van Setten,
# Paul de Bakker
# website: http://debakker.med.harvard.edu/resources.html
#
# Description:
# This script creates two hist... | /SCRIPTS/plotter.n_eff_k_studies.R | permissive | GeneticResources/MetaGWASToolKit | R | false | false | 3,651 | r | ##### SCRIPT TO PLOT HISTOGRAMS OF META-ANALYSIS/GWAS RESULTS #####
#
# Originally from the MANTEL Package, MANTEL_RELEASE.May_2011
# made by De Bakker Lab members Sara Pulit, Jessica van Setten,
# Paul de Bakker
# website: http://debakker.med.harvard.edu/resources.html
#
# Description:
# This script creates two hist... |
# generate alpha data
n0.alpha <- c(1, 1)
n1.alpha <- c(1, 1)
n2.alpha <- structure(c(1, 1, 1, 1, 1, 1, 1, 1), .Dim = as.integer(c(2,2,2)))
n3.alpha <- structure(c(1, 1, 1, 1, 1, 1, 1, 1), .Dim = as.integer(c(2,2,2)))
n4.alpha <- c(1, 1)
n5.alpha <- structure(c(1, 1, 1, 1), .Dim = as.integer(c(2,2)))
n6.alpha <- struct... | /data_and_scripts/MoocSparsity/m1_2_2/data.r | no_license | DanielTakeshi/iclr2016_gibbs | R | false | false | 4,369,412 | r | # generate alpha data
n0.alpha <- c(1, 1)
n1.alpha <- c(1, 1)
n2.alpha <- structure(c(1, 1, 1, 1, 1, 1, 1, 1), .Dim = as.integer(c(2,2,2)))
n3.alpha <- structure(c(1, 1, 1, 1, 1, 1, 1, 1), .Dim = as.integer(c(2,2,2)))
n4.alpha <- c(1, 1)
n5.alpha <- structure(c(1, 1, 1, 1), .Dim = as.integer(c(2,2)))
n6.alpha <- struct... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metadata_functions.R
\name{create_button_html}
\alias{create_button_html}
\title{Create a button link from meta data}
\usage{
create_button_html(metadata)
}
\arguments{
\item{metadata}{The output of get_metadata}
}
\value{
HTML text defining ... | /man/create_button_html.Rd | permissive | jdtrat/buttonmakr | R | false | true | 568 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metadata_functions.R
\name{create_button_html}
\alias{create_button_html}
\title{Create a button link from meta data}
\usage{
create_button_html(metadata)
}
\arguments{
\item{metadata}{The output of get_metadata}
}
\value{
HTML text defining ... |
testlist <- list(x1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x2 = numeric(0), y1 = numeric(0), y2 = numeric(0))
result <- do.call(palm:::euc_distances,testlist)
str(result) | /palm/inst/testfiles/euc_distances/libFuzzer_euc_distances/euc_distances_valgrind_files/1612968098-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 220 | r | testlist <- list(x1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x2 = numeric(0), y1 = numeric(0), y2 = numeric(0))
result <- do.call(palm:::euc_distances,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/answerTests2.R
\name{func_of_newvar_equals}
\alias{func_of_newvar_equals}
\title{Test the result of a computation applied to a specific (user-named)
variable created in a previous question.}
\usage{
func_of_newvar_equals(correct_expression)
... | /man/func_of_newvar_equals.Rd | no_license | dabrze/swirl | R | false | true | 1,134 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/answerTests2.R
\name{func_of_newvar_equals}
\alias{func_of_newvar_equals}
\title{Test the result of a computation applied to a specific (user-named)
variable created in a previous question.}
\usage{
func_of_newvar_equals(correct_expression)
... |
\docType{data}
\name{OCN_250_PB}
\alias{OCN_250_PB}
\title{Example of single-outlet OCN with periodic boundaries}
\format{A \code{river} object. See \code{\link{create_OCN}} documentation for details.}
\usage{
data(OCN_250_PB)
}
\description{
A network built on a 250x250 lattice obtained by executing \code{set... | /man/OCN_250_PB.Rd | no_license | lucarraro/OCNet | R | false | false | 404 | rd | \docType{data}
\name{OCN_250_PB}
\alias{OCN_250_PB}
\title{Example of single-outlet OCN with periodic boundaries}
\format{A \code{river} object. See \code{\link{create_OCN}} documentation for details.}
\usage{
data(OCN_250_PB)
}
\description{
A network built on a 250x250 lattice obtained by executing \code{set... |
# Compute four values, in the following order, from
# the grouped data:
#
# 1. count = n()
# 2. unique = n_distinct(ip_id)
# 3. countries = n_distinct(country)
# 4. avg_bytes = mean(size)
#
# A few thing to be careful of:
#
# 1. Separate arguments by commas
# 2. Make sure you have a closing parenthesis
# 3. Check your ... | /summarize1.R | no_license | kgpavan/Rprogramming | R | false | false | 714 | r | # Compute four values, in the following order, from
# the grouped data:
#
# 1. count = n()
# 2. unique = n_distinct(ip_id)
# 3. countries = n_distinct(country)
# 4. avg_bytes = mean(size)
#
# A few thing to be careful of:
#
# 1. Separate arguments by commas
# 2. Make sure you have a closing parenthesis
# 3. Check your ... |
source("gC_day_model/model_plot_objects.R")
#read in observed mass and Cday---------------------------------------------------------------------------------
#harvest mass and leaf area for model comparison
mass_actual <- read.csv("calculated data/harvest_mass_means.csv")
mass_actual$mass_adj <- with(mass_actual, mass... | /master_scripts/Cday_scenario_plotting.R | no_license | npp97-field/EucPVE | R | false | false | 4,465 | r | source("gC_day_model/model_plot_objects.R")
#read in observed mass and Cday---------------------------------------------------------------------------------
#harvest mass and leaf area for model comparison
mass_actual <- read.csv("calculated data/harvest_mass_means.csv")
mass_actual$mass_adj <- with(mass_actual, mass... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/06-arithmetic-ops.R
\name{lsd_plus}
\alias{lsd_plus}
\title{Addition for deb_lsd}
\usage{
lsd_plus(x, y)
}
\description{
Enforce recycling rules, add by unit, and then normalize.
}
\keyword{internal}
| /man/lsd_plus.Rd | permissive | jessesadler/debvctrs | R | false | true | 278 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/06-arithmetic-ops.R
\name{lsd_plus}
\alias{lsd_plus}
\title{Addition for deb_lsd}
\usage{
lsd_plus(x, y)
}
\description{
Enforce recycling rules, add by unit, and then normalize.
}
\keyword{internal}
|
setwd(paste0(Sys.getenv('CS_HOME'),'/QuantEpistemo/Models/UKMigration'))
library(dplyr)
library(igraph)
library(glue)
library(reshape2)
library(ggplot2)
library(heatmaply)
source(paste0(Sys.getenv('CS_HOME'),'/Organisation/Models/Utils/R/plots.R'))
source('functions.R')
edge_file = 'export/corpus_filteredNonExcl_li... | /citation.R | no_license | Bonnie-Buyuklieva/UKMigration | R | false | false | 8,817 | r | setwd(paste0(Sys.getenv('CS_HOME'),'/QuantEpistemo/Models/UKMigration'))
library(dplyr)
library(igraph)
library(glue)
library(reshape2)
library(ggplot2)
library(heatmaply)
source(paste0(Sys.getenv('CS_HOME'),'/Organisation/Models/Utils/R/plots.R'))
source('functions.R')
edge_file = 'export/corpus_filteredNonExcl_li... |
#check the prices registered in the Excel files against data in all.mkt.Prices.RData files and hPrices files
#user can either check one curve only (by giving the curvename),
#or check a market (by giving the market type)
# User need to specify the Excel filepath, market,etc. the default is to check
# the IVaR.rmg.risk... | /R Extension/RMG/Models/Price/ForwardCurve/Network/check.excel.prices.R | no_license | uhasan1/QLExtension-backup | R | false | false | 6,832 | r | #check the prices registered in the Excel files against data in all.mkt.Prices.RData files and hPrices files
#user can either check one curve only (by giving the curvename),
#or check a market (by giving the market type)
# User need to specify the Excel filepath, market,etc. the default is to check
# the IVaR.rmg.risk... |
library(glmnet)
mydata = read.table("./TrainingSet/Correlation/ovary.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.15,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/ovary/ovary_031.txt',appen... | /Model/EN/Correlation/ovary/ovary_031.R | no_license | leon1003/QSMART | R | false | false | 357 | r | library(glmnet)
mydata = read.table("./TrainingSet/Correlation/ovary.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.15,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/ovary/ovary_031.txt',appen... |
#' @title Receive message
#' @description Receive one or more messages from an SQS queue
#' @param queue A character string containing a queue URL, or the name of the
#' queue.
#' @param attributes Currently ignored.
#' @param n The number of messages to retrieve (maximum 10).
#' @param timeout A number of seconds to m... | /R/messages.r | no_license | ludov04/aws.sqs | R | false | false | 6,646 | r | #' @title Receive message
#' @description Receive one or more messages from an SQS queue
#' @param queue A character string containing a queue URL, or the name of the
#' queue.
#' @param attributes Currently ignored.
#' @param n The number of messages to retrieve (maximum 10).
#' @param timeout A number of seconds to m... |
library (tidyverse)
library (tensorflow)
library (reticulate)
library (keras)
library (reshape2)
#Not run this code-chunk ----
reticulate::py_run_string(
"from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
s... | /MMDigit.R | permissive | alexanderbeatson/bhdd-nnet | R | false | false | 13,100 | r | library (tidyverse)
library (tensorflow)
library (reticulate)
library (keras)
library (reshape2)
#Not run this code-chunk ----
reticulate::py_run_string(
"from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
s... |
####################################################################################
####### Object: Analyse BFAST
####### Author: remi.dannunzio@fao.org
####### Update: 2017/10/22
###############################################################... | /Rscripts/install_packages.R | no_license | lecrabe/rci_ws_20171022 | R | false | false | 944 | r | ####################################################################################
####### Object: Analyse BFAST
####### Author: remi.dannunzio@fao.org
####### Update: 2017/10/22
###############################################################... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/isObviouslyRedundant.R
\name{isObviouslyRedundant}
\alias{isObviouslyRedundant}
\alias{isObviouslyRedundant.editarray}
\alias{isObviouslyRedundant.editenv}
\alias{isObviouslyRedundant.editlist}
\alias{isObviouslyRedundant.editmatrix}
... | /pkg/man/isObviouslyRedundant.Rd | no_license | jenifferYingyiWu/editrules | R | false | false | 1,788 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/isObviouslyRedundant.R
\name{isObviouslyRedundant}
\alias{isObviouslyRedundant}
\alias{isObviouslyRedundant.editarray}
\alias{isObviouslyRedundant.editenv}
\alias{isObviouslyRedundant.editlist}
\alias{isObviouslyRedundant.editmatrix}
... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 8.26798368096378e+298, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615784258-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 329 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 8.26798368096378e+298, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{unfinished.function}
\alias{unfinished.function}
\title{I switched to processing in ArcGIS, but there are already fragmentation data from Catrin Westphal.
Calculate Fragmentation Data}
\usage{
unfinished.function(NOTHING)
}
\description{
Turned out this was har... | /man/unfinished.function.Rd | no_license | akeyel/behlpr | R | false | false | 1,118 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{unfinished.function}
\alias{unfinished.function}
\title{I switched to processing in ArcGIS, but there are already fragmentation data from Catrin Westphal.
Calculate Fragmentation Data}
\usage{
unfinished.function(NOTHING)
}
\description{
Turned out this was har... |
setClass("SSM", representation(Info = "list", Bootstrap = "list",
show = "matrix"))
setMethod("show", "SSM", function(object) {
cat(paste("\n------------------------------------------"))
cat(paste("\n- Superior Set of Models -"))
cat(paste("\n------------------------... | /R/MCS.R | permissive | washingtonquintero/GarchMidas | R | false | false | 7,452 | r | setClass("SSM", representation(Info = "list", Bootstrap = "list",
show = "matrix"))
setMethod("show", "SSM", function(object) {
cat(paste("\n------------------------------------------"))
cat(paste("\n- Superior Set of Models -"))
cat(paste("\n------------------------... |
##' calculates kurtosis
##'
##' calculates kurtosis
##' @title calculates kurtosis
##' @param x vector
##' @param na.rm logical
##' @param method method used to calculates kurtosis
##' @return kurtosis
##' @export
##' @author Weilin Lin
kurtosis <- function(x, na.rm = F, method = "fisher") {
method <- ch... | /quantutils/R/kurtosis.r | no_license | dengyishuo/dengyishuo.github.com | R | false | false | 884 | r | ##' calculates kurtosis
##'
##' calculates kurtosis
##' @title calculates kurtosis
##' @param x vector
##' @param na.rm logical
##' @param method method used to calculates kurtosis
##' @return kurtosis
##' @export
##' @author Weilin Lin
kurtosis <- function(x, na.rm = F, method = "fisher") {
method <- ch... |
library(devtools)
install_github("genomicsclass/GSE5859Subset")
library(GSE5859Subset)
data(GSE5859Subset) ##this loads the three tables
head(sampleInfo)
## Exercise 1 - - Week 1
sum(sampleInfo$date == as.Date("2005-06-27"))
## Excercise 2
dim(geneAnnotation) # dimensions
dim(geneExpression)
dim(sampleInfo)
... | /ht_experiments/Week1.R | no_license | KennyYahir/courses-merk-edx | R | false | false | 3,971 | r | library(devtools)
install_github("genomicsclass/GSE5859Subset")
library(GSE5859Subset)
data(GSE5859Subset) ##this loads the three tables
head(sampleInfo)
## Exercise 1 - - Week 1
sum(sampleInfo$date == as.Date("2005-06-27"))
## Excercise 2
dim(geneAnnotation) # dimensions
dim(geneExpression)
dim(sampleInfo)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projectInit.R
\name{refreshPackage}
\alias{refreshPackage}
\title{Package handling function
Detach a custom packages, re-document, re-install, and re-load.
Useful if I'm debugging packages and want to try the new version.
Expects it to be in ... | /man/refreshPackage.Rd | no_license | vreuter/projectInit | R | false | true | 912 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projectInit.R
\name{refreshPackage}
\alias{refreshPackage}
\title{Package handling function
Detach a custom packages, re-document, re-install, and re-load.
Useful if I'm debugging packages and want to try the new version.
Expects it to be in ... |
#' Database versions of the nycflights13 data
#'
#' These functions cache the data from the `nycflights13` database in
#' a local database, for use in examples and vignettes. Indexes are created
#' to making joining tables on natural keys efficient.
#'
#' @keywords internal
#' @name nycflights13
NULL
#' @export
#' @rd... | /R/data-nycflights13.R | permissive | OssiLehtinen/dbplyr | R | false | false | 2,093 | r | #' Database versions of the nycflights13 data
#'
#' These functions cache the data from the `nycflights13` database in
#' a local database, for use in examples and vignettes. Indexes are created
#' to making joining tables on natural keys efficient.
#'
#' @keywords internal
#' @name nycflights13
NULL
#' @export
#' @rd... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xgb.opt.depth.R
\name{xgb.opt.depth}
\alias{xgb.opt.depth}
\title{xgboost depth automated optimizer}
\usage{
xgb.opt.depth(initial = 8, min_depth = 1, max_depth = 25, patience = 2,
sd_effect = 0.001, worst_score = 0, learner = NA, better = ... | /man/xgb.opt.depth.Rd | no_license | BruceZhaoR/Laurae | R | false | true | 5,924 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xgb.opt.depth.R
\name{xgb.opt.depth}
\alias{xgb.opt.depth}
\title{xgboost depth automated optimizer}
\usage{
xgb.opt.depth(initial = 8, min_depth = 1, max_depth = 25, patience = 2,
sd_effect = 0.001, worst_score = 0, learner = NA, better = ... |
testlist <- list(phi = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = c(1.36656528938164e-311, -1.657912... | /dcurver/inst/testfiles/ddc/AFL_ddc/ddc_valgrind_files/1609866674-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 831 | r | testlist <- list(phi = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = c(1.36656528938164e-311, -1.657912... |
required <- c("nandb", "filesstrings", "stringr", "tidyverse",
"EBImage", "autothresholdr", "rcompanion")
for (r in required) if (!require(r, character.only = TRUE)) install.packages(r)
invisible(sapply(required, library, character.only = TRUE))
FoldChange <- function(drug, brightness) {
epsilon.before... | /paper_data/fkbp/fkbp.R | no_license | rorynolan/nandb | R | false | false | 3,064 | r | required <- c("nandb", "filesstrings", "stringr", "tidyverse",
"EBImage", "autothresholdr", "rcompanion")
for (r in required) if (!require(r, character.only = TRUE)) install.packages(r)
invisible(sapply(required, library, character.only = TRUE))
FoldChange <- function(drug, brightness) {
epsilon.before... |
bestcod<-function(quantile,continuous,boxcox,cutpoint,PF,pval.naive){
posminp<-which.min(pval.naive)
if(missing(PF)){
if (missing(cutpoint)){
if (class(quantile)=="NULL"){
if (missing(boxcox)){
if (continuous=="TRUE"){
transf<-"original continuous variable"
}else{
transf<-... | /R/bestcod.R | no_license | cran/CPMCGLM | R | false | false | 8,754 | r | bestcod<-function(quantile,continuous,boxcox,cutpoint,PF,pval.naive){
posminp<-which.min(pval.naive)
if(missing(PF)){
if (missing(cutpoint)){
if (class(quantile)=="NULL"){
if (missing(boxcox)){
if (continuous=="TRUE"){
transf<-"original continuous variable"
}else{
transf<-... |
source('functions.R')
# Suppose that there's a mainchain block Btx which confirms a transaction
# tx. The attacker wants to reverse Btx to double-spend the money
# transfered in tx. We also assume that there's no delay in honest network.
# That is, the honest blocks always form a chain.
N = 3 # the number of success... | /min_ds.R | no_license | Qitmeer/inclusive-poc | R | false | false | 3,041 | r | source('functions.R')
# Suppose that there's a mainchain block Btx which confirms a transaction
# tx. The attacker wants to reverse Btx to double-spend the money
# transfered in tx. We also assume that there's no delay in honest network.
# That is, the honest blocks always form a chain.
N = 3 # the number of success... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_utils.R
\name{plot_features_curves}
\alias{plot_features_curves}
\title{Plot features}
\usage{
plot_features_curves(X, tau, feat_idx = NA, log_trans = FALSE)
}
\arguments{
\item{X}{A data frame of matrix.}
\item{tau}{A vector with laten... | /man/plot_features_curves.Rd | no_license | AsclepiusInformatica/buds | R | false | true | 651 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_utils.R
\name{plot_features_curves}
\alias{plot_features_curves}
\title{Plot features}
\usage{
plot_features_curves(X, tau, feat_idx = NA, log_trans = FALSE)
}
\arguments{
\item{X}{A data frame of matrix.}
\item{tau}{A vector with laten... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/time_regression_multi.R
\name{fit_time_reg}
\alias{fit_time_reg}
\title{Fit a time regression}
\usage{
fit_time_reg(X, trt, n_leads, reg_param, lowlim = 0, uplim = 1, ...)
}
\arguments{
\item{X}{Matrix of outcomes}
\item{trt}{Vector of treat... | /man/fit_time_reg.Rd | permissive | clarkest/augsynth | R | false | true | 813 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/time_regression_multi.R
\name{fit_time_reg}
\alias{fit_time_reg}
\title{Fit a time regression}
\usage{
fit_time_reg(X, trt, n_leads, reg_param, lowlim = 0, uplim = 1, ...)
}
\arguments{
\item{X}{Matrix of outcomes}
\item{trt}{Vector of treat... |
set.seed(1643)
replics <- 5000
n <- 1000
k <- 10
mu <- c(log(30),log(60))
#sd included here in paras
unifs <- c(10,30)
nafc <- c(2,4,8)
guess <- seq(.0,.5,.05)
paras <- as.data.frame(matrix(ncol=9,
nrow=replics*length(mu)*length(nafc)*length(guess)*length(unifs)))
paras[,1] <- rep(1:(length(mu)*length(n... | /SimulationStudy2.r | no_license | dbrookswr/tarre | R | false | false | 1,869 | r | set.seed(1643)
replics <- 5000
n <- 1000
k <- 10
mu <- c(log(30),log(60))
#sd included here in paras
unifs <- c(10,30)
nafc <- c(2,4,8)
guess <- seq(.0,.5,.05)
paras <- as.data.frame(matrix(ncol=9,
nrow=replics*length(mu)*length(nafc)*length(guess)*length(unifs)))
paras[,1] <- rep(1:(length(mu)*length(n... |
plot4 <- function(){
#load data
NEI <- readRDS("./exdata_data_NEI_data/summarySCC_PM25.rds")
SCC <- readRDS("./exdata_data_NEI_data/Source_Classification_Code.rds")
# use the grep function to subset the SCC values of the coal emissions
data <- SCC[grep("Coal", SCC$EI.Sector),]
# merge the N... | /plot4.R | no_license | Haxier/ExData2 | R | false | false | 853 | r | plot4 <- function(){
#load data
NEI <- readRDS("./exdata_data_NEI_data/summarySCC_PM25.rds")
SCC <- readRDS("./exdata_data_NEI_data/Source_Classification_Code.rds")
# use the grep function to subset the SCC values of the coal emissions
data <- SCC[grep("Coal", SCC$EI.Sector),]
# merge the N... |
titles <- function(p) {
print_debug_info(p)
if (is_world_map_www(p)) return(p) # Has its own title
p_return <- p # Don't pass the modified p (e.g. with swap) on to next function (bit of hack)
p <- swap_xy(p)
x_position_left <- p$labels_margin_left / p$width
x_position_right <- 1 - (p$labels_margin_ri... | /R/titles.R | permissive | data-science-made-easy/james | R | false | false | 2,510 | r | titles <- function(p) {
print_debug_info(p)
if (is_world_map_www(p)) return(p) # Has its own title
p_return <- p # Don't pass the modified p (e.g. with swap) on to next function (bit of hack)
p <- swap_xy(p)
x_position_left <- p$labels_margin_left / p$width
x_position_right <- 1 - (p$labels_margin_ri... |
###############################################################################
# #
# #
# Clustering of snATACseq #
... | /snATACseq/code/02_clustering.R | no_license | ListerLab/pfc_development | R | false | false | 8,009 | r | ###############################################################################
# #
# #
# Clustering of snATACseq #
... |
#Consensus Mechanism
#This is the mechanism that, theoretically,
# 1] allows the software to determine the state of Decisions truthfully, and
# 2] only allows an efficient number of most-traded-upon-Decisions.
try(setwd("~/GitHub/Truthcoin/lib"))
#To my knowledge, R does not feature 'automatic working directori... | /lib/consensus/ConsensusMechanism.r | no_license | PaulCapestany/Truthcoin | R | false | false | 14,214 | r | #Consensus Mechanism
#This is the mechanism that, theoretically,
# 1] allows the software to determine the state of Decisions truthfully, and
# 2] only allows an efficient number of most-traded-upon-Decisions.
try(setwd("~/GitHub/Truthcoin/lib"))
#To my knowledge, R does not feature 'automatic working directori... |
polygonizer <- function(x, outshape=NULL, pypath=NULL, readpoly=TRUE,
quietish=TRUE) {
# x: an R Raster layer, or the file path to a raster file recognised by GDAL
# outshape: the path to the output shapefile (if NULL, a temporary file will
# be created)
# pypath: the path ... | /DevInit/R/P20/poly.R | no_license | akmiller01/alexm-util | R | false | false | 1,949 | r | polygonizer <- function(x, outshape=NULL, pypath=NULL, readpoly=TRUE,
quietish=TRUE) {
# x: an R Raster layer, or the file path to a raster file recognised by GDAL
# outshape: the path to the output shapefile (if NULL, a temporary file will
# be created)
# pypath: the path ... |
##############################
#Clean Console and Environment
##############################
cat("\014")
rm(list = ls())
##############################
# read cleaned data and put them all together
##############################
WD<-setwd("C:\\Users\\Nikitas Marios\\Desktop\\Data Mining Techniques\\Assignment_... | /assignment-2/R/LamdaMART R Code/CleaningPietSData_Click_Book.R | no_license | arashparnia/Data-Mining | R | false | false | 3,752 | r | ##############################
#Clean Console and Environment
##############################
cat("\014")
rm(list = ls())
##############################
# read cleaned data and put them all together
##############################
WD<-setwd("C:\\Users\\Nikitas Marios\\Desktop\\Data Mining Techniques\\Assignment_... |
#Reads in .csv file as data1 variable
data1<-read.csv("rpa_log2.csv")
#Parse each column for each method
dataX=data1[,1]
dataComp5=data1[,2]*627.509
dataCoron=data1[,3]*627.509
dataBenz=data1[,4]*627.509
dataHe=data1[,5]*627.509
#Creates environment for high resolution png files
postscript("rpa_expand4.eps", width = ... | /doc/S12L_and_ROT34_paper/plots/rpa_expand/2x2/methods2.R | no_license | bdnguye2/divergence_mbpt_noncovalent | R | false | false | 2,774 | r | #Reads in .csv file as data1 variable
data1<-read.csv("rpa_log2.csv")
#Parse each column for each method
dataX=data1[,1]
dataComp5=data1[,2]*627.509
dataCoron=data1[,3]*627.509
dataBenz=data1[,4]*627.509
dataHe=data1[,5]*627.509
#Creates environment for high resolution png files
postscript("rpa_expand4.eps", width = ... |
## Getting full dataset
data_full <- read.csv("C:/Users/ddhar/Documents/household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y")
## Subse... | /plot4.R | no_license | debdhar/ExData_Plotting1 | R | false | false | 1,372 | r |
## Getting full dataset
data_full <- read.csv("C:/Users/ddhar/Documents/household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y")
## Subse... |
---
title: "Test of GO enrichment in Orthologs"
author: "Stéphanie Arnoux"
date: "5/28/2018"
output: html_document
---
###########################
### LOADING the library ###
###########################
```r
library("zoo")
library("grDevices")
library(fields)
library(plyr)
library(data.table)
library(missMethyl)
lib... | /4.Statistical_Analyses/19_GO_Enrichment_Orthologs.R | no_license | starnoux/arnoux_et_al_2018 | R | false | false | 7,197 | r | ---
title: "Test of GO enrichment in Orthologs"
author: "Stéphanie Arnoux"
date: "5/28/2018"
output: html_document
---
###########################
### LOADING the library ###
###########################
```r
library("zoo")
library("grDevices")
library(fields)
library(plyr)
library(data.table)
library(missMethyl)
lib... |
\name{removeFile}
\Rdversion{1.1}
\alias{removeFile}
\alias{removeBucket}
\title{Remove an S3 bucket or object}
\description{
These functions allow the R user to delete/remove
an S3 bucket or object within a bucket.
}
\usage{
removeFile(bucket, name, auth = getOption("AmazonS3"),
curl = getCurlHandle(),... | /man/removeFile.Rd | no_license | yongj/RAmazonS3 | R | false | false | 1,570 | rd | \name{removeFile}
\Rdversion{1.1}
\alias{removeFile}
\alias{removeBucket}
\title{Remove an S3 bucket or object}
\description{
These functions allow the R user to delete/remove
an S3 bucket or object within a bucket.
}
\usage{
removeFile(bucket, name, auth = getOption("AmazonS3"),
curl = getCurlHandle(),... |
# ------------------------------------------------------------------------------
# 14. 3 Yr Cohort Default Rate Comparisons ---
# ------------------------------------------------------------------------------
#############################################################################... | /munge/14-default.r | no_license | UTexas80/BookdownProjectTemplate | R | false | false | 24,938 | r | # ------------------------------------------------------------------------------
# 14. 3 Yr Cohort Default Rate Comparisons ---
# ------------------------------------------------------------------------------
#############################################################################... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
... | /cachematrix.R | no_license | ShivKabra/ProgrammingAssignment2 | R | false | false | 827 | 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()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
... |
#' @import purrr
#' @include utils.R
instruction_of <- function(opcode) {
name <- opcode_name_of(opcode)
if (!is.null(name)) instruction_set[[name]]
}
instruction <- function(name, opcode, arity) {
structure(list(name = name, opcode = opcode, arity = arity), class = "instruction")
}
instruction_set <- list(inst... | /R/instruction.R | permissive | igjit/jvmrr | R | false | false | 2,170 | r | #' @import purrr
#' @include utils.R
instruction_of <- function(opcode) {
name <- opcode_name_of(opcode)
if (!is.null(name)) instruction_set[[name]]
}
instruction <- function(name, opcode, arity) {
structure(list(name = name, opcode = opcode, arity = arity), class = "instruction")
}
instruction_set <- list(inst... |
testlist <- list(rates = numeric(0), thresholds = numeric(0), x = c(7.95445689804407e-322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) | /grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610051344-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 233 | r | testlist <- list(rates = numeric(0), thresholds = numeric(0), x = c(7.95445689804407e-322, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) |
#UI - Plot tab
tabItem(
"plot",
fluidRow(
column(
width = 12,
fluidRow(
valueBox(value = length(unique(data$DriverNum)),
subtitle = "Total Drivers", color = "orange",
icon = icon("user", lib = "font-awesome"),
width = 4
... | /FinalPlanApp/ui/02-plot-ui.R | no_license | Aj322/Rshiny | R | false | false | 2,912 | r | #UI - Plot tab
tabItem(
"plot",
fluidRow(
column(
width = 12,
fluidRow(
valueBox(value = length(unique(data$DriverNum)),
subtitle = "Total Drivers", color = "orange",
icon = icon("user", lib = "font-awesome"),
width = 4
... |
library(filesstrings)
### Name: all_equal
### Title: A more flexible version of all.equal for vectors.
### Aliases: all_equal
### ** Examples
all_equal(1, rep(1, 3))
all_equal(2, 1:3)
all_equal(1:4, 1:4)
all_equal(1:4, c(1, 2, 3, 3))
all_equal(rep(1, 10))
all_equal(c(1, 88))
all_equal(1:2)
all_equal(list(1:2))
all_... | /data/genthat_extracted_code/filesstrings/examples/all_equal.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 386 | r | library(filesstrings)
### Name: all_equal
### Title: A more flexible version of all.equal for vectors.
### Aliases: all_equal
### ** Examples
all_equal(1, rep(1, 3))
all_equal(2, 1:3)
all_equal(1:4, 1:4)
all_equal(1:4, c(1, 2, 3, 3))
all_equal(rep(1, 10))
all_equal(c(1, 88))
all_equal(1:2)
all_equal(list(1:2))
all_... |
N<-10000
n<-5
x<-rhyper(N,300,100,100) #help(rhyter)
hist(x,xlim=c(min(x),max(x)),probability=T,nclass = max(x)-min(x)+1,col='yellow',ylab="Densidad",main='distribucion geometrica, n=400, p=.75, k=100')
lines(density(x,bw=1), col='red', lwd=3)
| /distribucion3.R | no_license | Carlos-Chauca/CursoR | R | false | false | 247 | r | N<-10000
n<-5
x<-rhyper(N,300,100,100) #help(rhyter)
hist(x,xlim=c(min(x),max(x)),probability=T,nclass = max(x)-min(x)+1,col='yellow',ylab="Densidad",main='distribucion geometrica, n=400, p=.75, k=100')
lines(density(x,bw=1), col='red', lwd=3)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/axis.R
\name{CNTKAxis}
\alias{CNTKAxis}
\title{CNTKAxis}
\usage{
CNTKAxis(...)
}
\arguments{
\item{...}{}
}
\description{
An axis object describes the axis of a variable and is used for specifying
the axes parameters of certain functions such... | /man/CNTKAxis.Rd | permissive | Bhaskers-Blu-Org2/CNTK-R | R | false | true | 1,260 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/axis.R
\name{CNTKAxis}
\alias{CNTKAxis}
\title{CNTKAxis}
\usage{
CNTKAxis(...)
}
\arguments{
\item{...}{}
}
\description{
An axis object describes the axis of a variable and is used for specifying
the axes parameters of certain functions such... |
#Reading in the necessary packages
x <- c("tidyverse", "survey", "haven", "ggplot2", "purrr", "summarytools", "stringr", "sp", "rgdal", "raster",
"lubridate", "RColorBrewer","sf", "shinyjs", "tmap", "knitr", "labelled", "plotrix", "arules", "foreign",
"fuzzyjoin", "splitstackshape", "magrittr", "caTools"... | /Nigeria/Research/urban_rural_cluster_analysis_cc/urban_purposive selection.R | permissive | ifeomaozo/hbhi-dhs | R | false | false | 13,223 | r | #Reading in the necessary packages
x <- c("tidyverse", "survey", "haven", "ggplot2", "purrr", "summarytools", "stringr", "sp", "rgdal", "raster",
"lubridate", "RColorBrewer","sf", "shinyjs", "tmap", "knitr", "labelled", "plotrix", "arules", "foreign",
"fuzzyjoin", "splitstackshape", "magrittr", "caTools"... |
testlist <- list(kern = numeric(0), val = c(1.49166814676108e-154, 2.77448001762435e+180, 1.81520741279207e+148, 2.77448001762432e+180, -3.88401729831682e-45, 2.73850297661466e+180, 1.10252259409951e-229, -3.97858713802015e-45, 9.52156907447972e-307, -9.56753406718151e-275, -3.51359191822857e+175, 2.14631404924833e... | /lowpassFilter/inst/testfiles/convolve/AFL_convolve/convolve_valgrind_files/1616007461-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 467 | r | testlist <- list(kern = numeric(0), val = c(1.49166814676108e-154, 2.77448001762435e+180, 1.81520741279207e+148, 2.77448001762432e+180, -3.88401729831682e-45, 2.73850297661466e+180, 1.10252259409951e-229, -3.97858713802015e-45, 9.52156907447972e-307, -9.56753406718151e-275, -3.51359191822857e+175, 2.14631404924833e... |
######################################
# Loren Collingwood #
# Topic Modeling #
# Marijuana Topics News coverage #
######################################
rm(list=ls())
#install.packages(c("topicmodels", "tm")
library(quanteda)
library(topicmodels)
library(tm)
library(descr)
#... | /lecture/week6_tmodels.R | no_license | lorenc5/POSC-207 | R | false | false | 7,218 | r | ######################################
# Loren Collingwood #
# Topic Modeling #
# Marijuana Topics News coverage #
######################################
rm(list=ls())
#install.packages(c("topicmodels", "tm")
library(quanteda)
library(topicmodels)
library(tm)
library(descr)
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mongoose.R
\name{mongoose_start}
\alias{mongoose_start}
\title{Start a Mongoose Service
Manuall start a local mongoose service}
\usage{
mongoose_start(port = 8000L, path = getwd(), forward_to = NULL,
ssl_cert = NULL, auth_domain = NULL, glo... | /man/mongoose_start.Rd | no_license | bwlewis/feathercache | R | false | true | 1,083 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mongoose.R
\name{mongoose_start}
\alias{mongoose_start}
\title{Start a Mongoose Service
Manuall start a local mongoose service}
\usage{
mongoose_start(port = 8000L, path = getwd(), forward_to = NULL,
ssl_cert = NULL, auth_domain = NULL, glo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Group4.R
\name{analysis.df}
\alias{analysis.df}
\title{Parse botnet}
\usage{
analysis.df()
}
\description{
"main" file which downloads the file if needed
and processes it for a better understanding
}
\examples{
TBD
}
| /man/analysis.df.Rd | no_license | DDS-MCSM/spring19-group-assignment-foreverdraft | R | false | true | 296 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Group4.R
\name{analysis.df}
\alias{analysis.df}
\title{Parse botnet}
\usage{
analysis.df()
}
\description{
"main" file which downloads the file if needed
and processes it for a better understanding
}
\examples{
TBD
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filterVcfMuTect2.R
\name{filterVcfMuTect2}
\alias{filterVcfMuTect2}
\title{Filter VCF MuTect2}
\usage{
filterVcfMuTect2(
vcf,
tumor.id.in.vcf = NULL,
ignore = c("clustered_events", "t_lod", "str_contraction", "read_position",
"posit... | /man/filterVcfMuTect2.Rd | permissive | sahilseth/PureCN | R | false | true | 1,610 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filterVcfMuTect2.R
\name{filterVcfMuTect2}
\alias{filterVcfMuTect2}
\title{Filter VCF MuTect2}
\usage{
filterVcfMuTect2(
vcf,
tumor.id.in.vcf = NULL,
ignore = c("clustered_events", "t_lod", "str_contraction", "read_position",
"posit... |
" copiii diavolului " ( 1 )
zilele trecute , postul de televiziune francez Antenne 2 a difuzat un reportaj despre copiii abandonati din Romania .
cam in acelasi timp , revista " L' Express " , in numarul 2516 pentru 23 - 29 septembrie , publica si ea un reportaj amplu cu acelasi subiect .
" copiii diavolului " este ... | /data/Newspapers/1999.09.28.editorial.53825.0148.r | no_license | narcis96/decrypting-alpha | R | false | false | 4,588 | r | " copiii diavolului " ( 1 )
zilele trecute , postul de televiziune francez Antenne 2 a difuzat un reportaj despre copiii abandonati din Romania .
cam in acelasi timp , revista " L' Express " , in numarul 2516 pentru 23 - 29 septembrie , publica si ea un reportaj amplu cu acelasi subiect .
" copiii diavolului " este ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/styles.R
\name{style}
\alias{style}
\title{Set flextable style}
\usage{
style(x, i = NULL, j = NULL, pr_t = NULL, pr_p = NULL,
pr_c = NULL, part = "body")
}
\arguments{
\item{x}{a flextable object}
\item{i}{rows selection}
\item{j}{column... | /man/style.Rd | no_license | bschneidr/flextable | R | false | true | 967 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/styles.R
\name{style}
\alias{style}
\title{Set flextable style}
\usage{
style(x, i = NULL, j = NULL, pr_t = NULL, pr_p = NULL,
pr_c = NULL, part = "body")
}
\arguments{
\item{x}{a flextable object}
\item{i}{rows selection}
\item{j}{column... |
#########################################
### DMA-T.R ###
### ###
### Maria Ranci 02/09/2009 ###
### ###
#
#
# 26/11/09 MR e CR. Passaggio Flag_automatica 'G' -> 'P' e 'W'->'S'
# 2020-01-27 MR&MS dockerizzazio... | /DMA-T.R | no_license | ARPASMR/adqc | R | false | false | 11,448 | r | #########################################
### DMA-T.R ###
### ###
### Maria Ranci 02/09/2009 ###
### ###
#
#
# 26/11/09 MR e CR. Passaggio Flag_automatica 'G' -> 'P' e 'W'->'S'
# 2020-01-27 MR&MS dockerizzazio... |
library(MotilityLab)
### Name: TrackMeasures
### Title: Track Measures
### Aliases: TrackMeasures asphericity displacement displacementRatio
### displacementVector duration fractalDimension hurstExponent
### maxDisplacement meanTurningAngle outreachRatio overallAngle
### overallDot speed squareDisplacement stra... | /data/genthat_extracted_code/MotilityLab/examples/TrackMeasures.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 609 | r | library(MotilityLab)
### Name: TrackMeasures
### Title: Track Measures
### Aliases: TrackMeasures asphericity displacement displacementRatio
### displacementVector duration fractalDimension hurstExponent
### maxDisplacement meanTurningAngle outreachRatio overallAngle
### overallDot speed squareDisplacement stra... |
#' @import vegan
ComputeDistance <- function(X, Distance, Z = diag(1, nrow = dim(X))) {
# 'distance funtions' to use: 1. ScalarProduct 2. euclidean 3. manhatan 4. canberra 5. pearson 6.
# pearsonabs 7. spearman 8. spearmanabs 9. mahalanobis binary Data 10. jaccard 11. sm 12. sokal&Sneath 13.
# Rogery... | /R/ComputeDistance.R | no_license | lauzingaretti/LinkHD | R | false | false | 2,969 | r | #' @import vegan
ComputeDistance <- function(X, Distance, Z = diag(1, nrow = dim(X))) {
# 'distance funtions' to use: 1. ScalarProduct 2. euclidean 3. manhatan 4. canberra 5. pearson 6.
# pearsonabs 7. spearman 8. spearmanabs 9. mahalanobis binary Data 10. jaccard 11. sm 12. sokal&Sneath 13.
# Rogery... |
shinyUI(dashboardPage(
dashboardHeader(title = 'Analysis of Video Game Sales since 1980 to Dec 2016'),
dashboardSidebar(
sidebarUserPanel("Content"),
sidebarMenu(
menuItem("Intro", tabName = "markdown"),
menuItem("Correlation Matrix", tabName = "corr"),
menuItem("Genre Data Visualization... | /Project1-ExploreVis/dracezhan/VGSales/ui.R | no_license | liyuhaojohn/bootcamp008_project | R | false | false | 8,024 | r | shinyUI(dashboardPage(
dashboardHeader(title = 'Analysis of Video Game Sales since 1980 to Dec 2016'),
dashboardSidebar(
sidebarUserPanel("Content"),
sidebarMenu(
menuItem("Intro", tabName = "markdown"),
menuItem("Correlation Matrix", tabName = "corr"),
menuItem("Genre Data Visualization... |
#' Convert RGB to hex
#'
#' Enter a list of RGB color codes, or R colors, and get the appropriate hex color code.
#'
#' @param rgbcode List of rgb color codes, each list must be a vector of three objects representing
#' the three components of rgb color code from 0 - 255. This can be a named list where the nam... | /R/rgb2hex.r | no_license | cran/highlightHTML | R | false | false | 1,695 | r | #' Convert RGB to hex
#'
#' Enter a list of RGB color codes, or R colors, and get the appropriate hex color code.
#'
#' @param rgbcode List of rgb color codes, each list must be a vector of three objects representing
#' the three components of rgb color code from 0 - 255. This can be a named list where the nam... |
# Print information for example logging
message("")
message(cli::rule())
message("Initializing application")
message(Sys.time())
message(cli::rule())
message("")
# load dependencies
library(shiny)
library(dplyr)
library(rhandsontable)
library(sp)
library(leaflet)
library(leafpop)
| /app/global.R | no_license | NCC-CNC/shiny-docker-demo | R | false | false | 282 | r | # Print information for example logging
message("")
message(cli::rule())
message("Initializing application")
message(Sys.time())
message(cli::rule())
message("")
# load dependencies
library(shiny)
library(dplyr)
library(rhandsontable)
library(sp)
library(leaflet)
library(leafpop)
|
\name{tweedie}
\alias{tweedie}
\title{Tweedie Generalized Linear Models}
\description{
Produces a generalized linear model family object with any power variance function and any power link. Includes the Gaussian, Poisson, gamma and inverse-Gaussian families as special cases.
}
\usage{
tweedie(var.power=0, link... | /man/tweedie.Rd | no_license | franckess/statmod | R | false | false | 3,395 | rd | \name{tweedie}
\alias{tweedie}
\title{Tweedie Generalized Linear Models}
\description{
Produces a generalized linear model family object with any power variance function and any power link. Includes the Gaussian, Poisson, gamma and inverse-Gaussian families as special cases.
}
\usage{
tweedie(var.power=0, link... |
#import the data
library(dplyr)
library(leaflet)
library(readr)
state_cases <- read.csv("https://covidtracking.com/api/states.csv")
#add shape file
library(sf)
library(tigris)
states_census <- st_read("Data/tl_2019_us_state.shp")
states_census %>%
leaflet() %>%
addTiles() %>%
addPolygons(popup=~NAME)
states_m... | /maps.R | no_license | ewalkenhorst/covid19 | R | false | false | 1,459 | r | #import the data
library(dplyr)
library(leaflet)
library(readr)
state_cases <- read.csv("https://covidtracking.com/api/states.csv")
#add shape file
library(sf)
library(tigris)
states_census <- st_read("Data/tl_2019_us_state.shp")
states_census %>%
leaflet() %>%
addTiles() %>%
addPolygons(popup=~NAME)
states_m... |
testlist <- list(m = NULL, repetitions = -304992360L, in_m = structure(c(2.31584307507257e+77, 9.53818252170339e+295, 1.22810536108214e+146), .Dim = c(3L, 1L )))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615786293-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 254 | r | testlist <- list(m = NULL, repetitions = -304992360L, in_m = structure(c(2.31584307507257e+77, 9.53818252170339e+295, 1.22810536108214e+146), .Dim = c(3L, 1L )))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) |
# load data
load("regression-dataset.Rdata")
# Linear regression
lm.fit <- lm(y~x)
# Polynomial regression
lm.fit1 <- lm(y~poly(x,2, raw=TRUE))
lm.fit2 <- lm(y~poly(x,3, raw=TRUE))
lm.fit3 <- lm(y~poly(x,4, raw=TRUE))
lm.fit4 <- lm(y~poly(x,5, raw=TRUE))
lm.fit5 <- lm(y~poly(x,10, raw=TRUE))
lm.fit6 <- lm(y~poly(x,15, ... | /Cours TP/MesTPS/TP_1.R | no_license | HadramiNdoye/ADD2 | R | false | false | 885 | r | # load data
load("regression-dataset.Rdata")
# Linear regression
lm.fit <- lm(y~x)
# Polynomial regression
lm.fit1 <- lm(y~poly(x,2, raw=TRUE))
lm.fit2 <- lm(y~poly(x,3, raw=TRUE))
lm.fit3 <- lm(y~poly(x,4, raw=TRUE))
lm.fit4 <- lm(y~poly(x,5, raw=TRUE))
lm.fit5 <- lm(y~poly(x,10, raw=TRUE))
lm.fit6 <- lm(y~poly(x,15, ... |
library(dashBootstrapComponents)
progress_labels <- dbcProgress("25%", value = 25)
| /docs/components_page/components/progress/labels.R | permissive | goranstojkoski/dash-bootstrap-components | R | false | false | 84 | r | library(dashBootstrapComponents)
progress_labels <- dbcProgress("25%", value = 25)
|
library(FatTailsR)
### Name: elevate
### Title: Elevate
### Aliases: elevate
### ** Examples
require(graphics)
X <- (-50:100)/5
plot( X, elevate(X, e = 5), type = "l", ylim = c(0, 20) )
lines(X, elevate(X, e = 2), col = 2)
lines(X, elevate(X, e = 1), col = 3)
lines(X, elevate(X, e = 0.5), col = 4)
lines(X,... | /data/genthat_extracted_code/FatTailsR/examples/elevate.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 355 | r | library(FatTailsR)
### Name: elevate
### Title: Elevate
### Aliases: elevate
### ** Examples
require(graphics)
X <- (-50:100)/5
plot( X, elevate(X, e = 5), type = "l", ylim = c(0, 20) )
lines(X, elevate(X, e = 2), col = 2)
lines(X, elevate(X, e = 1), col = 3)
lines(X, elevate(X, e = 0.5), col = 4)
lines(X,... |
library(data.table)
source('format_as_tables.R')
datax <- format_as_table('b_lovely_landscapes.txt')
alltagsx <- expand_tags(datax)
data <- copy(datax)
alltags <- copy(alltagsx)
alltags[, N := .N, by = tag]
alltags <- alltags[N > 1]
alltags[order(tag)] | /2019/idea_3.R | no_license | azambranog/hash_code | R | false | false | 270 | r | library(data.table)
source('format_as_tables.R')
datax <- format_as_table('b_lovely_landscapes.txt')
alltagsx <- expand_tags(datax)
data <- copy(datax)
alltags <- copy(alltagsx)
alltags[, N := .N, by = tag]
alltags <- alltags[N > 1]
alltags[order(tag)] |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/folded.R
\name{transmutate.folded}
\alias{transmutate.folded}
\title{Transmutate Folded}
\usage{
transmutate.folded(.data, ...)
}
\arguments{
\item{.data}{passed to next method}
\item{...}{passed to next method}
\item{.dots}{pa... | /man/transmutate.folded.Rd | no_license | cran/fold | R | false | true | 425 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/folded.R
\name{transmutate.folded}
\alias{transmutate.folded}
\title{Transmutate Folded}
\usage{
transmutate.folded(.data, ...)
}
\arguments{
\item{.data}{passed to next method}
\item{...}{passed to next method}
\item{.dots}{pa... |
esa=read.csv("ESA.csv")
spx=read.csv("SPX.csv")
esa=esa[1:2000,2]
#esa=(esa-mean(esa))/sd(esa)
esa <- diff(sign(diff(esa, na.pad = FALSE)), na.pad = FALSE)
pks=which(esa<0)+2
thresh=3
if (!missing(thresh)) {
pks[esa[pks - 1] - esa[pks] > thresh]
} else pks
spx=spx[1:2000,2]
spx=(spx-mean(spx))/sd(spx)
l... | /R/Code/find_peak.R | no_license | apexdevelop/working_dir | R | false | false | 592 | r | esa=read.csv("ESA.csv")
spx=read.csv("SPX.csv")
esa=esa[1:2000,2]
#esa=(esa-mean(esa))/sd(esa)
esa <- diff(sign(diff(esa, na.pad = FALSE)), na.pad = FALSE)
pks=which(esa<0)+2
thresh=3
if (!missing(thresh)) {
pks[esa[pks - 1] - esa[pks] > thresh]
} else pks
spx=spx[1:2000,2]
spx=(spx-mean(spx))/sd(spx)
l... |
library(quantmod)
library(stringr)
library(ROI)
library(ROI.plugin.quadprog)
#function for download data
#I gonna use the getSymbols function
get_symbol = function(ticker, from = '2017-01-04'){
error_handler = function(e){
warning(paste0(ticker, ' is not present', sep = ''))
#return NA value
return(N... | /Min-Var portfolio.R | no_license | Rigo5/Portfolio-optimization-with-ROI | R | false | false | 4,858 | r | library(quantmod)
library(stringr)
library(ROI)
library(ROI.plugin.quadprog)
#function for download data
#I gonna use the getSymbols function
get_symbol = function(ticker, from = '2017-01-04'){
error_handler = function(e){
warning(paste0(ticker, ' is not present', sep = ''))
#return NA value
return(N... |
setwd("D:/Spring 2018/STA/Project/newcode/expt2/")
data = read.csv("results/tanh_voice_results.csv")
getname = function(x){
split = unlist(strsplit(as.character(x), "_"))
string = paste(trimws(split[1], "both"),
trimws(split[2], "both"), trimws(split[3], "both"), sep = "")
return(string)
}
data$... | /Project/expt2/plotting_expt2.R | no_license | saikiransunny/DataMining_Unsupervised_spring | R | false | false | 2,380 | r | setwd("D:/Spring 2018/STA/Project/newcode/expt2/")
data = read.csv("results/tanh_voice_results.csv")
getname = function(x){
split = unlist(strsplit(as.character(x), "_"))
string = paste(trimws(split[1], "both"),
trimws(split[2], "both"), trimws(split[3], "both"), sep = "")
return(string)
}
data$... |
#' Create a transparent colour.
#'
#' @name alpha
#' @export
#' @examples
#' ggplot(mpg, aes(displ, hwy)) +
#' geom_point(alpha = 0.5, colour = "blue")
#'
#' ggplot(mpg, aes(displ, hwy)) +
#' geom_point(colour = alpha("blue", 0.5))
NULL
# Null default
# Analog of || from ruby
#
# @keyword internal
# @name nulldefa... | /R/utilities.r | no_license | bbolker/ggplot2 | R | false | false | 8,290 | r | #' Create a transparent colour.
#'
#' @name alpha
#' @export
#' @examples
#' ggplot(mpg, aes(displ, hwy)) +
#' geom_point(alpha = 0.5, colour = "blue")
#'
#' ggplot(mpg, aes(displ, hwy)) +
#' geom_point(colour = alpha("blue", 0.5))
NULL
# Null default
# Analog of || from ruby
#
# @keyword internal
# @name nulldefa... |
library(dplyr)
library(magrittr)
library(lubridate)
################################################################################
# Plot 4
################################################################################
par(mfrow=c(2,2))
# Plot 4a
###############################################################... | /plot4.R | no_license | maxlcummins/ExData_Plotting1 | R | false | false | 1,826 | r | library(dplyr)
library(magrittr)
library(lubridate)
################################################################################
# Plot 4
################################################################################
par(mfrow=c(2,2))
# Plot 4a
###############################################################... |
normalization <- function(barcode, dimension = -1){
#------------------------------------------------------------------------------
# input: a [barcode] with the dimension of the bars in the first row and birth
# and death time in the second and third. The [dimension] of the barcode we
# want to work with, -1 if we... | /2_variables/normalization.R | permissive | Cimagroup/topo-summaries-for-packed-tissues | R | false | false | 1,001 | r | normalization <- function(barcode, dimension = -1){
#------------------------------------------------------------------------------
# input: a [barcode] with the dimension of the bars in the first row and birth
# and death time in the second and third. The [dimension] of the barcode we
# want to work with, -1 if we... |
# -------------------------------------------------------
# Scripts to read in, combine, & map output from the PalEON Regional Runs
# Created: Christy Rollinson, crollinson@gmail.com, Feb 2016
# -------------------------------------------------------
# -----------------------------
# libraries we're going to be using... | /processing_scripts/1_process_model_output_region.R | no_license | PalEON-Project/PalEON_MIP2_Region | R | false | false | 16,197 | r | # -------------------------------------------------------
# Scripts to read in, combine, & map output from the PalEON Regional Runs
# Created: Christy Rollinson, crollinson@gmail.com, Feb 2016
# -------------------------------------------------------
# -----------------------------
# libraries we're going to be using... |
#'@title European 2007 Data
#'
#'@description A function that converts the raw dataset into the need 2007 data.
#'
#'@details This datset is used in a pipeline which takes in the raw datset, and produces a GDP value, and gives this value in a denomination of choice, either Trillion, Billion or Million.
#'
#'@para... | /R/gapminder.R | no_license | Kiki-Jiji/CC_test | R | false | false | 1,322 | r | #'@title European 2007 Data
#'
#'@description A function that converts the raw dataset into the need 2007 data.
#'
#'@details This datset is used in a pipeline which takes in the raw datset, and produces a GDP value, and gives this value in a denomination of choice, either Trillion, Billion or Million.
#'
#'@para... |
\alias{gtkRadioButtonNewWithMnemonic}
\name{gtkRadioButtonNewWithMnemonic}
\title{gtkRadioButtonNewWithMnemonic}
\description{Creates a new \code{\link{GtkRadioButton}} containing a label, adding it to the same
group as \code{group}. The label will be created using
\code{\link{gtkLabelNewWithMnemonic}}, so underscore... | /man/gtkRadioButtonNewWithMnemonic.Rd | no_license | cran/RGtk2.10 | R | false | false | 770 | rd | \alias{gtkRadioButtonNewWithMnemonic}
\name{gtkRadioButtonNewWithMnemonic}
\title{gtkRadioButtonNewWithMnemonic}
\description{Creates a new \code{\link{GtkRadioButton}} containing a label, adding it to the same
group as \code{group}. The label will be created using
\code{\link{gtkLabelNewWithMnemonic}}, so underscore... |
#Page number--3.41
#Example number--3.37
#LOAD PACKAGE---->prob
s=cards()
s
#A= Probability that the card drawn is king
#B= Probability that the card drawn is heart
#C= Probability that the card drawn is red card
A=nrow(subset(s,rank=="K"))/nrow(s)
B=nrow(subset(s,suit=="Heart"))/nrow(s)
C=(nrow(s)/2)/nro... | /Fundamentals_Of_Mathematical_Statistics_by_S.c._Gupta,_V.k._Kapoor/CH3/EX3.37/EX3_37.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 723 | r | #Page number--3.41
#Example number--3.37
#LOAD PACKAGE---->prob
s=cards()
s
#A= Probability that the card drawn is king
#B= Probability that the card drawn is heart
#C= Probability that the card drawn is red card
A=nrow(subset(s,rank=="K"))/nrow(s)
B=nrow(subset(s,suit=="Heart"))/nrow(s)
C=(nrow(s)/2)/nro... |
#!/usr/local/bin/Rscript
options(stringsAsFactors = FALSE);
library(IRanges)
qw <- function(...) {
as.character(sys.call()[-1])
}
##for testing
#args <- commandArgs(trailingOnly=TRUE)
#filename = args[1]
filename = "results/alignment/bowtie/peakfinding/newannotation/peaks.RangedData.RData"
rd <- get(load(filenam... | /scripts/mm9RDtoGenes_strands.R | no_license | Bongomountainthesis/mouse_NSC_REST_ChIP | R | false | false | 3,164 | r | #!/usr/local/bin/Rscript
options(stringsAsFactors = FALSE);
library(IRanges)
qw <- function(...) {
as.character(sys.call()[-1])
}
##for testing
#args <- commandArgs(trailingOnly=TRUE)
#filename = args[1]
filename = "results/alignment/bowtie/peakfinding/newannotation/peaks.RangedData.RData"
rd <- get(load(filenam... |
# generate closure table
# a closure table has the following columns:
# ancestor: node id's
# descendants: node id's
# length: 0 if same, otherwise number of hops from adjacency list
# slide background on options
# https://www.slideshare.net/billkarwin/models-for-hierarchical-data
#' Make a closure table from an adja... | /R/closure_table.R | no_license | jameelalsalam/nestedcats | R | false | false | 1,457 | r | # generate closure table
# a closure table has the following columns:
# ancestor: node id's
# descendants: node id's
# length: 0 if same, otherwise number of hops from adjacency list
# slide background on options
# https://www.slideshare.net/billkarwin/models-for-hierarchical-data
#' Make a closure table from an adja... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.