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 R script to explore themes ##
###############################################
library(ggplot2)
library(dplyr)
source('functions.R')
## hello
head(iris)
iris %>% group_by(Species) %>% summarise(Mean=mean(Petal.Length))
a <- function(x) {
##this i... | /tests/test.R | no_license | pcinereus/.emacs.d.old | R | false | false | 623 | r | ###############################################
## This is a test R script to explore themes ##
###############################################
library(ggplot2)
library(dplyr)
source('functions.R')
## hello
head(iris)
iris %>% group_by(Species) %>% summarise(Mean=mean(Petal.Length))
a <- function(x) {
##this i... |
library(plyr)
library(dplyr)
library(tidyr)
library(tidyverse)
library(data.table)
bureau <- fread('bureau_score.csv')
count(bureau, bureau$BUREAU_SCORE)
count(bureau, bureau$BAL_NON_DELQ)
count(bureau, bureau$BAL_30DPD)
colnames(bureau)
unique(bureau$CUSTOMER_UNIQUE_ID)
#customer unique id as a string
... | /debt_history.R | no_license | datascientist-kenn/Loan_Credit_Score_Framework | R | false | false | 1,379 | r | library(plyr)
library(dplyr)
library(tidyr)
library(tidyverse)
library(data.table)
bureau <- fread('bureau_score.csv')
count(bureau, bureau$BUREAU_SCORE)
count(bureau, bureau$BAL_NON_DELQ)
count(bureau, bureau$BAL_30DPD)
colnames(bureau)
unique(bureau$CUSTOMER_UNIQUE_ID)
#customer unique id as a string
... |
library(sp)
library(RgoogleMaps)
library(ggmap)
library(tidyverse)
library(maptools)
library(datasets)
library(tigris)
library(leaflet)
library(plyr)
library(ggplot2)
library(splitstackshape)
library(stringr)
library(png)
library(gridExtra)
##Map##
thor<-read.csv("Thor3_tweets.csv",header = TRUE, sep = ",")
thor<-data... | /EDA.R | no_license | cassiewcs/MA615Twitter | R | false | false | 12,029 | r | library(sp)
library(RgoogleMaps)
library(ggmap)
library(tidyverse)
library(maptools)
library(datasets)
library(tigris)
library(leaflet)
library(plyr)
library(ggplot2)
library(splitstackshape)
library(stringr)
library(png)
library(gridExtra)
##Map##
thor<-read.csv("Thor3_tweets.csv",header = TRUE, sep = ",")
thor<-data... |
library(partycalls)
library(xtable)
load("test_data/senate_party_calls_p_03.RData")
names(senate_party_calls) <- paste0("sen", 93:112)
# table for all congresses
senate_coding_record <- data.table(congress = 93:112)
senate_coding_record[, party_call_count := sapply(93:112, function(x)
length(get_party_calls(senate_... | /old/vote_coding_summary_senate_p_03.R | no_license | Hershberger/partycalls | R | false | false | 5,047 | r | library(partycalls)
library(xtable)
load("test_data/senate_party_calls_p_03.RData")
names(senate_party_calls) <- paste0("sen", 93:112)
# table for all congresses
senate_coding_record <- data.table(congress = 93:112)
senate_coding_record[, party_call_count := sapply(93:112, function(x)
length(get_party_calls(senate_... |
# Load data from file in working directory
data <- read.table('household_power_consumption.txt', sep = ';', header = TRUE)
# Subset data for 1/2/2007 and 2/2/2007
set <- data[(data$Date == '1/2/2007' | data$Date == '2/2/2007'),]
# Plot the histogram
hist(as.numeric(as.character(set$Global_active_power)), main = "Glob... | /plot1.R | no_license | ast77/ExData_Plotting1 | R | false | false | 491 | r | # Load data from file in working directory
data <- read.table('household_power_consumption.txt', sep = ';', header = TRUE)
# Subset data for 1/2/2007 and 2/2/2007
set <- data[(data$Date == '1/2/2007' | data$Date == '2/2/2007'),]
# Plot the histogram
hist(as.numeric(as.character(set$Global_active_power)), main = "Glob... |
library(arfima)
### Name: distance
### Title: The distance between modes of an 'arfima' fit.
### Aliases: distance
### Keywords: ts
### ** Examples
## No test:
set.seed(8564)
sim <- arfima.sim(1000, model = list(phi = c(0.2, 0.1), dfrac = 0.4, theta = 0.9))
fit <- arfima(sim, order = c(2, 0, 1), back=TRUE)
fit
... | /data/genthat_extracted_code/arfima/examples/distance.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 354 | r | library(arfima)
### Name: distance
### Title: The distance between modes of an 'arfima' fit.
### Aliases: distance
### Keywords: ts
### ** Examples
## No test:
set.seed(8564)
sim <- arfima.sim(1000, model = list(phi = c(0.2, 0.1), dfrac = 0.4, theta = 0.9))
fit <- arfima(sim, order = c(2, 0, 1), back=TRUE)
fit
... |
# Getting bird and covariates' data information
###### BIRDS
birdsList <- c("ALFL", "AMCR", "AMRE", "AMRO", "ATSP", "BAWW", "BBWA", "BBWO",
"BCCH", "BHCO", "BHVI", "BLPW", "BOCH", "BRBL", "BRCR", "BTNW",
"CAWA", "CHSP", "CORA", "COYE", "DEJU", "EAKI", "EAPH", "FOSP",
"GRAJ", "HETH", "HOLA", "LCSP", "LEFL", "L... | /temporaryScripts/birdsCovariateDataInformation.R | no_license | tati-micheletti/NWT | R | false | false | 3,050 | r | # Getting bird and covariates' data information
###### BIRDS
birdsList <- c("ALFL", "AMCR", "AMRE", "AMRO", "ATSP", "BAWW", "BBWA", "BBWO",
"BCCH", "BHCO", "BHVI", "BLPW", "BOCH", "BRBL", "BRCR", "BTNW",
"CAWA", "CHSP", "CORA", "COYE", "DEJU", "EAKI", "EAPH", "FOSP",
"GRAJ", "HETH", "HOLA", "LCSP", "LEFL", "L... |
require("project.init")
require(Seurat)
require(dplyr)
require(Matrix)
require(methods)
require(pheatmap)
require(gplots)
project.init2("cll-time_course")
out <- "30_2_SignaturesDownsampled/"
dir.create(dirout(out))
sample.x <- "allDataBest_noIGH"
load(file=dirout("10_Seurat/", sample.x, "/",sample.x,".RData"))
pD... | /src/single_cell_RNA/30_2_Signatures_Downsampled.R | no_license | nattzy94/cll-ibrutinib_time | R | false | false | 5,872 | r | require("project.init")
require(Seurat)
require(dplyr)
require(Matrix)
require(methods)
require(pheatmap)
require(gplots)
project.init2("cll-time_course")
out <- "30_2_SignaturesDownsampled/"
dir.create(dirout(out))
sample.x <- "allDataBest_noIGH"
load(file=dirout("10_Seurat/", sample.x, "/",sample.x,".RData"))
pD... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.r
\name{summary_plot}
\alias{summary_plot}
\title{Summary plots of the estimated FAR}
\usage{
summary_plot(merged_res, pdf_name = "summary.pdf")
}
\arguments{
\item{merged_res}{results of the compute_far_fonction}
\item{pdf_name}{the na... | /man/summary_plot.Rd | no_license | thaos/FARallnat | R | false | true | 928 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.r
\name{summary_plot}
\alias{summary_plot}
\title{Summary plots of the estimated FAR}
\usage{
summary_plot(merged_res, pdf_name = "summary.pdf")
}
\arguments{
\item{merged_res}{results of the compute_far_fonction}
\item{pdf_name}{the na... |
#### Train a model with the bare minimum of marks:
# - DNase
# - H3K4me1
# - H3K4me3
par(mfrow = c(1, 2))
rm(list = ls())
gc()
require(pROC)
require(h2o)
## Initiate H2O instance
localH2O = h2o.init(nthreads=-1)
nfolds <- 5
require(RColorBrewer)
clrs <- brewer.pal(5, "Dark2")
#### Check feature importance on loosely... | /src/bare.minimum.R | no_license | ophiothrix/varRanker | R | false | false | 6,380 | r | #### Train a model with the bare minimum of marks:
# - DNase
# - H3K4me1
# - H3K4me3
par(mfrow = c(1, 2))
rm(list = ls())
gc()
require(pROC)
require(h2o)
## Initiate H2O instance
localH2O = h2o.init(nthreads=-1)
nfolds <- 5
require(RColorBrewer)
clrs <- brewer.pal(5, "Dark2")
#### Check feature importance on loosely... |
# make PBS scripts for specific westgrid servers given Slim input scripts
make.pbs <- function(filename, RAM, walltime=NULL, westgrid.server=NULL){
# currently have slim 2.1 installed on: orcinus, bugaboo, grex and jasper
# orcinus, walltime limit = 240:00:00 (10 days)
# bugaboo, walltime limit = 122 days, so as... | /MakePBSfiles_WestgridSlim.R | no_license | kjgilbert/SlimSimCode | R | false | false | 2,846 | r |
# make PBS scripts for specific westgrid servers given Slim input scripts
make.pbs <- function(filename, RAM, walltime=NULL, westgrid.server=NULL){
# currently have slim 2.1 installed on: orcinus, bugaboo, grex and jasper
# orcinus, walltime limit = 240:00:00 (10 days)
# bugaboo, walltime limit = 122 days, so as... |
library(shinymanager)
credentials <- data.frame(
user = c("asitav", "zewdu", "aldo", "rigobert", "shiraz", "fuelcompany", "mcdonalds"),
password = c("lanubia@2021", "lanubia@2021", "lanubia@2021","lanubia@2021", "lanubia@2021", "lanubia@2021", "lanubia@2021"),
# password will automatically be hashed
admin = c(T... | /newapp/SetUpCred.R | no_license | asitav-sen/Customer-Loyalty-Scoring | R | false | false | 802 | r | library(shinymanager)
credentials <- data.frame(
user = c("asitav", "zewdu", "aldo", "rigobert", "shiraz", "fuelcompany", "mcdonalds"),
password = c("lanubia@2021", "lanubia@2021", "lanubia@2021","lanubia@2021", "lanubia@2021", "lanubia@2021", "lanubia@2021"),
# password will automatically be hashed
admin = c(T... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/homr.R
\name{homr}
\alias{homr}
\title{Historical Observing Metadata Repository (HOMR) station metadata}
\usage{
homr(
qid = NULL,
qidMod = NULL,
station = NULL,
state = NULL,
county = NULL,
country = NULL,
name = NULL,
nameMo... | /man/homr.Rd | permissive | mpettis/rnoaa | R | false | true | 4,280 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/homr.R
\name{homr}
\alias{homr}
\title{Historical Observing Metadata Repository (HOMR) station metadata}
\usage{
homr(
qid = NULL,
qidMod = NULL,
station = NULL,
state = NULL,
county = NULL,
country = NULL,
name = NULL,
nameMo... |
library(wordspace)
### Name: wordspace.openmp
### Title: Control multi-core processing in wordspace functions (wordspace)
### Aliases: wordspace.openmp
### ** Examples
wordspace.openmp()
| /data/genthat_extracted_code/wordspace/examples/wordspace_openmp.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 194 | r | library(wordspace)
### Name: wordspace.openmp
### Title: Control multi-core processing in wordspace functions (wordspace)
### Aliases: wordspace.openmp
### ** Examples
wordspace.openmp()
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitMultiMigration.R
\name{fitMultiMigration}
\alias{fitMultiMigration}
\title{Fit multiple migrations}
\usage{
fitMultiMigration(data, span1, span2, plot)
}
\arguments{
\item{data}{A processed daily averaged data frame, i.e. output of \code{\... | /man/fitMultiMigration.Rd | no_license | ABoVE-AotM/above | R | false | true | 1,788 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitMultiMigration.R
\name{fitMultiMigration}
\alias{fitMultiMigration}
\title{Fit multiple migrations}
\usage{
fitMultiMigration(data, span1, span2, plot)
}
\arguments{
\item{data}{A processed daily averaged data frame, i.e. output of \code{\... |
meta4diagGUI <-function(){
if(requireNamespace("INLA", quietly = TRUE)){
if (!(sum(search()=="package:INLA"))==1){
stop("INLA need to be loaded! \n
Please use the following command to load INLA,\n
library(INLA) \n")
}
shiny::runApp(system.file('meta4diagGUI', package='meta4diag'), launch.browser=TRU... | /R/meta4diagGUI.R | no_license | cran/meta4diag | R | false | false | 142,707 | r | meta4diagGUI <-function(){
if(requireNamespace("INLA", quietly = TRUE)){
if (!(sum(search()=="package:INLA"))==1){
stop("INLA need to be loaded! \n
Please use the following command to load INLA,\n
library(INLA) \n")
}
shiny::runApp(system.file('meta4diagGUI', package='meta4diag'), launch.browser=TRU... |
#' ################################################################################
#' #
#' # iprior: Linear Regression using I-priors
#' # Copyright (C) 2017 Haziq Jamil
#' #
#' # This program is free software: you can redistribute it and/or modify
#' # it under the terms of the GNU General Public License as ... | /iprior/R/LEGACY-Kernel_functions.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 6,792 | r | #' ################################################################################
#' #
#' # iprior: Linear Regression using I-priors
#' # Copyright (C) 2017 Haziq Jamil
#' #
#' # This program is free software: you can redistribute it and/or modify
#' # it under the terms of the GNU General Public License as ... |
###############################
#admitidos A PREGRADO 2017-I##
###############################
########***** Admmisión especial por lugar de residencia
#Se requieren las siguientes librerías#
library(rgdal)
library(leaflet)
library(htmlwidgets)
library(tidyverse)
library(rjson)
library(readxl)
library(extrafont)
#... | /static/slides/maps_adm_script.R | no_license | mamaciasq/martin | R | false | false | 7,020 | r | ###############################
#admitidos A PREGRADO 2017-I##
###############################
########***** Admmisión especial por lugar de residencia
#Se requieren las siguientes librerías#
library(rgdal)
library(leaflet)
library(htmlwidgets)
library(tidyverse)
library(rjson)
library(readxl)
library(extrafont)
#... |
## Team Project 1
## Naycari de Luna
## Marc Grabiel
## Objective 1
## Confirmed cases
## Sets up absolute path directory
getwd()
setwd("/Users/mrgrabiel/Desktop/Courses/R_Programming_32880/Project_1")
getwd()
confirmed <- read.csv("2021-Project-01/time_series_covid19_confirmed_global.csv", stringsAsFactors = FALSE)... | /MRG_Objective_3_share.R | no_license | ndeluna-i/2021-Project-01 | R | false | false | 3,425 | r | ## Team Project 1
## Naycari de Luna
## Marc Grabiel
## Objective 1
## Confirmed cases
## Sets up absolute path directory
getwd()
setwd("/Users/mrgrabiel/Desktop/Courses/R_Programming_32880/Project_1")
getwd()
confirmed <- read.csv("2021-Project-01/time_series_covid19_confirmed_global.csv", stringsAsFactors = FALSE)... |
setwd('/Users/pawankarki/Desktop/sta705/C++_from_R_src')
dyn.load("Fibonacci.so")
n <- 10
# create memory for the result
f <- vector(mode = "integer", length = n);
# f <- rep(0, n) # this would also work
result <- .C("Fibonacci", as.integer(n), as.integer(f))
# result contains a list with an element fo... | /C++_from_R_src/Fibonacci.R | no_license | pawankarki23/sta705 | R | false | false | 360 | r |
setwd('/Users/pawankarki/Desktop/sta705/C++_from_R_src')
dyn.load("Fibonacci.so")
n <- 10
# create memory for the result
f <- vector(mode = "integer", length = n);
# f <- rep(0, n) # this would also work
result <- .C("Fibonacci", as.integer(n), as.integer(f))
# result contains a list with an element fo... |
modelProteinDigestion=function()
{
# some starting parameters
cells = 1E6;
# create a proteome with 20k proteins according to the copy numbers given in
proteins = data.frame(copy=10^rnorm(seq(1:20000), log10(5000), 1.1))
proteins$fmol = proteins$copy * cells * 1E15 / 6.023E23
# check the ditribution of... | /codes/modelProteinDigestion.r | no_license | wyu/R | R | false | false | 463 | r | modelProteinDigestion=function()
{
# some starting parameters
cells = 1E6;
# create a proteome with 20k proteins according to the copy numbers given in
proteins = data.frame(copy=10^rnorm(seq(1:20000), log10(5000), 1.1))
proteins$fmol = proteins$copy * cells * 1E15 / 6.023E23
# check the ditribution of... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BiomodModel.R
\name{BiomodModel}
\alias{BiomodModel}
\title{Model module: BiomodModel}
\usage{
BiomodModel(.df, modelType = "GLM")
}
\arguments{
\item{.df}{\strong{Internal parameter, do not use in the workflow function}.
\code{.df} is data f... | /man/BiomodModel.Rd | no_license | cvisintin/modules | R | false | true | 1,568 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BiomodModel.R
\name{BiomodModel}
\alias{BiomodModel}
\title{Model module: BiomodModel}
\usage{
BiomodModel(.df, modelType = "GLM")
}
\arguments{
\item{.df}{\strong{Internal parameter, do not use in the workflow function}.
\code{.df} is data f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdatabase_utils.R
\name{srdb.homologousAntigens}
\alias{srdb.homologousAntigens}
\title{Get homologous sera}
\usage{
srdb.homologousAntigens(srdb, agdb)
}
\arguments{
\item{agdb}{}
}
\value{
list
}
\description{
Gets homologous antigens for ... | /man/srdb.homologousAntigens.Rd | permissive | SamT123/acutilsLite | R | false | true | 359 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdatabase_utils.R
\name{srdb.homologousAntigens}
\alias{srdb.homologousAntigens}
\title{Get homologous sera}
\usage{
srdb.homologousAntigens(srdb, agdb)
}
\arguments{
\item{agdb}{}
}
\value{
list
}
\description{
Gets homologous antigens for ... |
\name{DDPGPSurv-package}
\alias{DDPGPSurv-package}
\alias{DDPGPSurv}
\docType{package}
\title{DDP-GP Survival Analysis Package}
\description{
\packageDescription{DDPGPSurv}
}
\details{
The Dependent Dirichlet Process-Gaussian Process model is summarized below. The Dependent Dirichlet Process has a
Gaussian P... | /man/DDPGPSurv-package.Rd | no_license | cran/DDPGPSurv | R | false | false | 2,890 | rd | \name{DDPGPSurv-package}
\alias{DDPGPSurv-package}
\alias{DDPGPSurv}
\docType{package}
\title{DDP-GP Survival Analysis Package}
\description{
\packageDescription{DDPGPSurv}
}
\details{
The Dependent Dirichlet Process-Gaussian Process model is summarized below. The Dependent Dirichlet Process has a
Gaussian P... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reporter-multi.R
\docType{data}
\name{MultiReporter}
\alias{MultiReporter}
\title{Multi reporter: combine several reporters in one.}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
MultiReporter
}
\description{
This ... | /man/MultiReporter.Rd | no_license | bedatadriven/testthat | R | false | true | 868 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reporter-multi.R
\docType{data}
\name{MultiReporter}
\alias{MultiReporter}
\title{Multi reporter: combine several reporters in one.}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
MultiReporter
}
\description{
This ... |
#' @title fun_name
#'
#' @description kolejna funkcja podmieniona
#'
#' @param param fun_name
#'
#'
#'
#' @export
isSymmetric.matrix<- function(params){
rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina",
"Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka",
... | /R/isSymmetric.matrix.R | no_license | granatb/RapeR | R | false | false | 691 | r |
#' @title fun_name
#'
#' @description kolejna funkcja podmieniona
#'
#' @param param fun_name
#'
#'
#'
#' @export
isSymmetric.matrix<- function(params){
rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina",
"Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka",
... |
testlist <- list(data = structure(c(-Inf, 2.48106391936929e-265, 1.53246508392285e-309, NA, 6.14293298947794e-183, 6.14293298947798e-183, 1.15953891055378e-152, 5.77662200276746e-275, 2.48408629556361e-304, 1.42602581597035e-105, 1.42602581597035e-105, 2.6239679208175e-29, 1.4260258183634e-105, 7.45844727504317e-30... | /distr6/inst/testfiles/C_EmpiricalMVPdf/libFuzzer_C_EmpiricalMVPdf/C_EmpiricalMVPdf_valgrind_files/1610036352-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 1,217 | r | testlist <- list(data = structure(c(-Inf, 2.48106391936929e-265, 1.53246508392285e-309, NA, 6.14293298947794e-183, 6.14293298947798e-183, 1.15953891055378e-152, 5.77662200276746e-275, 2.48408629556361e-304, 1.42602581597035e-105, 1.42602581597035e-105, 2.6239679208175e-29, 1.4260258183634e-105, 7.45844727504317e-30... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FeatureSelection.R
\name{FS.greedy.heuristic.reduct.RST}
\alias{FS.greedy.heuristic.reduct.RST}
\title{The greedy heuristic algorithm for computing decision reducts and approximate decision reducts}
\usage{
FS.greedy.heuristic.reduct.RST(
d... | /man/FS.greedy.heuristic.reduct.RST.Rd | no_license | JerryChiang87/RoughSets | R | false | true | 5,584 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FeatureSelection.R
\name{FS.greedy.heuristic.reduct.RST}
\alias{FS.greedy.heuristic.reduct.RST}
\title{The greedy heuristic algorithm for computing decision reducts and approximate decision reducts}
\usage{
FS.greedy.heuristic.reduct.RST(
d... |
oraclefit <-
function(data,testdata,family="gaussian"){
fit = NULL
x = data$x0
y = data$y
xtest = testdata$x0
ytest = testdata$y
#x = scale(x)
lmfit = glm(y~x,family=family)
fit$a0 = coef(lmfit)[1]
fit$beta = coef(lmfit)[-1]
#fit$beta = fit$beta/attr(x,'scaled:scale')
#fit$a0 = fit$a0-sum(fit$beta*attr(x,'... | /RAMP/R/oraclefit.R | no_license | ingted/R-Examples | R | false | false | 575 | r | oraclefit <-
function(data,testdata,family="gaussian"){
fit = NULL
x = data$x0
y = data$y
xtest = testdata$x0
ytest = testdata$y
#x = scale(x)
lmfit = glm(y~x,family=family)
fit$a0 = coef(lmfit)[1]
fit$beta = coef(lmfit)[-1]
#fit$beta = fit$beta/attr(x,'scaled:scale')
#fit$a0 = fit$a0-sum(fit$beta*attr(x,'... |
#' Quick map plot
#'
#' qmap is a wrapper for \code{\link{ggmap}} and
#' \code{\link{get_map}}.
#'
#' @param location character; location of interest
#' @param ... stuff to pass to \code{\link{ggmap}} and
#' \code{\link{get_map}}.
#' @return a ggplot object
#' @author David Kahle \email{david.kahle@@gmail.com}
#' @se... | /ggmap/R/qmap.R | no_license | ingted/R-Examples | R | false | false | 4,762 | r | #' Quick map plot
#'
#' qmap is a wrapper for \code{\link{ggmap}} and
#' \code{\link{get_map}}.
#'
#' @param location character; location of interest
#' @param ... stuff to pass to \code{\link{ggmap}} and
#' \code{\link{get_map}}.
#' @return a ggplot object
#' @author David Kahle \email{david.kahle@@gmail.com}
#' @se... |
setwd(dirname(parent.frame(2)$ofile))
library(mlxR)
# source("../../../initMlxR220.R")
library(reshape2)
library(gridExtra)
#-------------------------------------
p <- c(ka=0.5, V=10, k=0.2, a=0.3, b=0.1)
f <- list(name=c('f1','f2'), time=seq(0, 30, by=0.1))
y1 <- list(name='y1', time=seq(0, 30, by=2))
y2 <- list(n... | /demos/userGuide/simulx/continuous.R | no_license | Anathawa/mlxR | R | false | false | 786 | r | setwd(dirname(parent.frame(2)$ofile))
library(mlxR)
# source("../../../initMlxR220.R")
library(reshape2)
library(gridExtra)
#-------------------------------------
p <- c(ka=0.5, V=10, k=0.2, a=0.3, b=0.1)
f <- list(name=c('f1','f2'), time=seq(0, 30, by=0.1))
y1 <- list(name='y1', time=seq(0, 30, by=2))
y2 <- list(n... |
# Run DPSA Modules --------------------------------------------------------
# Created by Dan Ovando, July 20 2015
# This is the generic wrapper for the DPSA modules
rm(list=ls())
set.seed(441)
library(plyr)
library(gridExtra)
library(ggplot2)
library(dplyr)
library(ggmap)
library(animation)
library(R2admb)
library(t... | /Run DPSA Modules.R | no_license | lennon-thomas/DPSA | R | false | false | 28,483 | r |
# Run DPSA Modules --------------------------------------------------------
# Created by Dan Ovando, July 20 2015
# This is the generic wrapper for the DPSA modules
rm(list=ls())
set.seed(441)
library(plyr)
library(gridExtra)
library(ggplot2)
library(dplyr)
library(ggmap)
library(animation)
library(R2admb)
library(t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plate.R
\name{reset}
\alias{reset}
\title{Reset a plate}
\usage{
reset(plate, type, params, keep_type = FALSE, keep_params = FALSE)
}
\arguments{
\item{plate}{A ddPCR plate}
\item{type}{A ddPCR plate type (see \code{\link[ddpcr]{plate_types}... | /man/reset.Rd | permissive | andrepvieira/ddpcr | R | false | true | 1,261 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plate.R
\name{reset}
\alias{reset}
\title{Reset a plate}
\usage{
reset(plate, type, params, keep_type = FALSE, keep_params = FALSE)
}
\arguments{
\item{plate}{A ddPCR plate}
\item{type}{A ddPCR plate type (see \code{\link[ddpcr]{plate_types}... |
library(readr)
library(ggplot2)
library(MASS)
setwd("~/Applied_Quant_Finance")
rm(list=ls())
#Question 1B
raw_market <- read_csv("PS3_Market.csv")
raw_market <- raw_market / 100
raw_market$excess <- raw_market$`Mkt-RF` - raw_market$RF
rf_return <- mean(raw_market$RF)
raw_industry <- read_csv("PS3_Industry_Returns.csv... | /Problem Sets/PS3.R | no_license | alexgarland/Applied_Quant_Finance | R | false | false | 11,294 | r | library(readr)
library(ggplot2)
library(MASS)
setwd("~/Applied_Quant_Finance")
rm(list=ls())
#Question 1B
raw_market <- read_csv("PS3_Market.csv")
raw_market <- raw_market / 100
raw_market$excess <- raw_market$`Mkt-RF` - raw_market$RF
rf_return <- mean(raw_market$RF)
raw_industry <- read_csv("PS3_Industry_Returns.csv... |
library(reshape2)
library(data.table)
library(dplyr)
##setwd("C:/Users/sylvia.seow/sylviadatascience/sylviadatascience/r")
## download file "tidy_feature.csv" from my github, and save it into working directory
use_local <- 1
## use_local <-0 ##is for download data from internet link
## use_local <-1 ##for using f... | /run_analysis.R | no_license | cutesylvia79/GettingCleaningData | R | false | false | 5,037 | r |
library(reshape2)
library(data.table)
library(dplyr)
##setwd("C:/Users/sylvia.seow/sylviadatascience/sylviadatascience/r")
## download file "tidy_feature.csv" from my github, and save it into working directory
use_local <- 1
## use_local <-0 ##is for download data from internet link
## use_local <-1 ##for using f... |
### *** European Protein Consumption, in grams/person-day *** ###
food <- read.csv("protein.csv", row.names=1) # 1st column is country name
## scale the data
xfood <- scale(food)
## first, 3 means
(grpMeat <- kmeans(xfood, centers=3, nstart=10))
plot(xfood[,"RedMeat"], xfood[,"WhiteMeat"], xlim=c(-2,2.75),
ty... | /examples/protein.R | no_license | anishsingh20/MBAmaterials | R | false | false | 2,430 | r | ### *** European Protein Consumption, in grams/person-day *** ###
food <- read.csv("protein.csv", row.names=1) # 1st column is country name
## scale the data
xfood <- scale(food)
## first, 3 means
(grpMeat <- kmeans(xfood, centers=3, nstart=10))
plot(xfood[,"RedMeat"], xfood[,"WhiteMeat"], xlim=c(-2,2.75),
ty... |
## Put comments here that give an overall description of what your
## functions do
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- func... | /cachematrix.R | no_license | michem/ProgrammingAssignment2 | R | false | false | 973 | r | ## Put comments here that give an overall description of what your
## functions do
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- func... |
lasker <- function(x){
somme <- colSums(x)
M <- matrix(data=0,nrow=length(somme),ncol=length(somme))
rownames(M) <- dimnames(x)[[2]]
colnames(M) <- dimnames(x)[[2]]
for(i in 1:length(somme)){
for(j in 1:length(somme)){
M[i,j] <- (sum(x[,i]*x[,j]))/(2*(somme[i]*somme[j]))
}
}
M
}
| /R/lasker.R | no_license | cran/Biodem | R | false | false | 309 | r | lasker <- function(x){
somme <- colSums(x)
M <- matrix(data=0,nrow=length(somme),ncol=length(somme))
rownames(M) <- dimnames(x)[[2]]
colnames(M) <- dimnames(x)[[2]]
for(i in 1:length(somme)){
for(j in 1:length(somme)){
M[i,j] <- (sum(x[,i]*x[,j]))/(2*(somme[i]*somme[j]))
}
}
M
}
|
## Test 2
## Christopher Peters
## Reliability and Survival Anaylsis
## Luis A. Escobar
## Fall 2011
library(ggplot2)
library(e1071)
library(qAnalyst)
p <- c(0.01, 0.02, 0.05, 0.1, 0.2, 0.3, 0.4,
0.5, 0.6, 0.7 0.8, 0.9, 0.95, 0.98)
# log(tp) = mu + inverse_norm(p)*sigma
## 1a.
mu <- log(5)
sigma <- 1
time <... | /Problems1and2.R | no_license | statwonk/Test2 | R | false | false | 489 | r | ## Test 2
## Christopher Peters
## Reliability and Survival Anaylsis
## Luis A. Escobar
## Fall 2011
library(ggplot2)
library(e1071)
library(qAnalyst)
p <- c(0.01, 0.02, 0.05, 0.1, 0.2, 0.3, 0.4,
0.5, 0.6, 0.7 0.8, 0.9, 0.95, 0.98)
# log(tp) = mu + inverse_norm(p)*sigma
## 1a.
mu <- log(5)
sigma <- 1
time <... |
HGLMFrames <-
function (mc, formula, contrasts, vnms = character(0))
{
mf <- mc
m <- match(c("DataMain", "weights", "na.action", "offset"),
names(mf), 0)
mf <- mf[c(1, m)]
frame.form <- subbars(formula)
if (length(vnms) > 0)
frame.form[[3]] <- substitute(foo + bar, list(f... | /R/HGLMFrames.R | no_license | cran/dhglm | R | false | false | 1,911 | r | HGLMFrames <-
function (mc, formula, contrasts, vnms = character(0))
{
mf <- mc
m <- match(c("DataMain", "weights", "na.action", "offset"),
names(mf), 0)
mf <- mf[c(1, m)]
frame.form <- subbars(formula)
if (length(vnms) > 0)
frame.form[[3]] <- substitute(foo + bar, list(f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cache.R
\name{mdq_get}
\alias{mdq_get}
\title{cache.R}
\usage{
mdq_get(url)
}
\arguments{
\item{url}{(character) Any URL}
}
\value{
(character) The path to the file
}
\description{
Functions related to downloading and caching objects.
Get the... | /man/mdq_get.Rd | no_license | dmullen17/metadig-r | R | false | true | 469 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cache.R
\name{mdq_get}
\alias{mdq_get}
\title{cache.R}
\usage{
mdq_get(url)
}
\arguments{
\item{url}{(character) Any URL}
}
\value{
(character) The path to the file
}
\description{
Functions related to downloading and caching objects.
Get the... |
\name{ltm}
\alias{ltm}
\title{ Latent Trait Model - Latent Variable Model for Binary Data}
\description{
Fit a latent trait model under the Item Response Theory (IRT) approach.
}
\usage{
ltm(formula, constraint = NULL, IRT.param, start.val,
na.action = NULL, control = list())
}
\arguments{
\item{for... | /man/ltm.Rd | no_license | state-o-flux/ltm | R | false | false | 11,124 | rd | \name{ltm}
\alias{ltm}
\title{ Latent Trait Model - Latent Variable Model for Binary Data}
\description{
Fit a latent trait model under the Item Response Theory (IRT) approach.
}
\usage{
ltm(formula, constraint = NULL, IRT.param, start.val,
na.action = NULL, control = list())
}
\arguments{
\item{for... |
library(stringr)
#read m04a
m04a = read.csv("../lab/m04a.csv")
head(m04a)
#def way5
way_5_number <- c("01F0182S","01F0248S","01F0264S","01F0293S","01F0339S","01F0376S","01F0413S","01F0467S","01F0509S","01F0532S","01F0557S","01F0578S",
"01F0633S","01F0664S","01F0681S","01F0750S","01F0880S","01F0928S","01F0950S","01... | /final.r | no_license | skywayoo/kaokon | R | false | false | 12,992 | r | library(stringr)
#read m04a
m04a = read.csv("../lab/m04a.csv")
head(m04a)
#def way5
way_5_number <- c("01F0182S","01F0248S","01F0264S","01F0293S","01F0339S","01F0376S","01F0413S","01F0467S","01F0509S","01F0532S","01F0557S","01F0578S",
"01F0633S","01F0664S","01F0681S","01F0750S","01F0880S","01F0928S","01F0950S","01... |
\name{TestPattern}
\alias{TestPattern}
\title{Make Test Pattern}
\description{
Make a simple test pattern to explore the function \code{\link{CircDataimage}} for interactive imaging of circular-spatial data.
}
\usage{
TestPattern()
}
\details{
Section J.7 in Appendices.J.PackageDocumentation in the inst... | /man/TestPattern.Rd | no_license | cran/CircSpatial | R | false | false | 873 | rd | \name{TestPattern}
\alias{TestPattern}
\title{Make Test Pattern}
\description{
Make a simple test pattern to explore the function \code{\link{CircDataimage}} for interactive imaging of circular-spatial data.
}
\usage{
TestPattern()
}
\details{
Section J.7 in Appendices.J.PackageDocumentation in the inst... |
shinyUI(pageWithSidebar(
headerPanel("recharts on Shiny server"),
sidebarPanel(
selectInput("YearSelector", "Choose a year:",
choices = c(2011, 2012, 2013))
),
mainPanel(
### includeHTML(recharts.shiny.init()) is fatal to run apps.
includeHTML(recharts.shiny.init()),
htmlOutput("rechartPie")
)
))
| /inst/shiny/recharts_shiny_pie/ui.R | permissive | kener/recharts | R | false | false | 319 | r | shinyUI(pageWithSidebar(
headerPanel("recharts on Shiny server"),
sidebarPanel(
selectInput("YearSelector", "Choose a year:",
choices = c(2011, 2012, 2013))
),
mainPanel(
### includeHTML(recharts.shiny.init()) is fatal to run apps.
includeHTML(recharts.shiny.init()),
htmlOutput("rechartPie")
)
))
|
testlist <- list(b = c(-1667457875L, -1667472541L, 67964173L, 67964173L, -1835887972L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) | /mcga/inst/testfiles/ByteVectorToDoubles/AFL_ByteVectorToDoubles/ByteVectorToDoubles_valgrind_files/1613106535-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 155 | r | testlist <- list(b = c(-1667457875L, -1667472541L, 67964173L, 67964173L, -1835887972L))
result <- do.call(mcga:::ByteVectorToDoubles,testlist)
str(result) |
context("test-ratkowsky_1983.R")
# do not run the test on CRAN as they take too long
testthat::skip_on_cran()
# method: fit model and get predictions. Check these are consistent.
# load in ggplot
library(ggplot2)
# laod in data
data('chlorella_tpc')
d <- subset(chlorella_tpc, curve_id == 1)
# get start values and ... | /tests/testthat/test-ratkowsky_1983.R | no_license | padpadpadpad/rTPC | R | false | false | 1,595 | r | context("test-ratkowsky_1983.R")
# do not run the test on CRAN as they take too long
testthat::skip_on_cran()
# method: fit model and get predictions. Check these are consistent.
# load in ggplot
library(ggplot2)
# laod in data
data('chlorella_tpc')
d <- subset(chlorella_tpc, curve_id == 1)
# get start values and ... |
# Code from the RHEA pipeline
# Calculate the species richness in a sample
Species.richness <- function(x) {
# Count only the OTUs that are present >0.5 normalized counts (normalization produces real values for counts)
count <- sum(x > 0.5)
return(count)
}
# Calculate the Shannon diversity index
Shannon.entrop... | /R/alpha_diversity.R | permissive | llrs/integration-helper | R | false | false | 960 | r |
# Code from the RHEA pipeline
# Calculate the species richness in a sample
Species.richness <- function(x) {
# Count only the OTUs that are present >0.5 normalized counts (normalization produces real values for counts)
count <- sum(x > 0.5)
return(count)
}
# Calculate the Shannon diversity index
Shannon.entrop... |
testlist <- list(type = 1246382666L, z = 7.68463292285632e+49)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609889835-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 116 | r | testlist <- list(type = 1246382666L, z = 7.68463292285632e+49)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
#===================================================================================================
#
# Multi-variate empirical Bayes with proper accounting for sigma
#
#===================================================================================================
.colWeightedMeans.x = function(data, weights, na... | /R/empiricalBayesLM.R | no_license | iancuo/WGCNA | R | false | false | 17,127 | r | #===================================================================================================
#
# Multi-variate empirical Bayes with proper accounting for sigma
#
#===================================================================================================
.colWeightedMeans.x = function(data, weights, na... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/basicTable.R
\name{renderBasicTable}
\alias{renderBasicTable}
\title{Output a table into a package vignette.}
\usage{
renderBasicTable(matrix = NULL, stylePrefix = NULL,
rowNamesAsHeader = FALSE)
}
\arguments{
\item{matrix}{Tabular data to ... | /man/renderBasicTable.Rd | no_license | wulixin/pivottabler | R | false | true | 747 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/basicTable.R
\name{renderBasicTable}
\alias{renderBasicTable}
\title{Output a table into a package vignette.}
\usage{
renderBasicTable(matrix = NULL, stylePrefix = NULL,
rowNamesAsHeader = FALSE)
}
\arguments{
\item{matrix}{Tabular data to ... |
# ------------------------------------
# Author: Andreas Alfons
# Erasmus University Rotterdam
# ------------------------------------
#' Extract coefficients from a sequence of regression models
#'
#' Extract coefficients from a sequence of regression models, such as submodels
#' along a robust or groupwise ... | /robustHD/R/coef.R | no_license | ingted/R-Examples | R | false | false | 4,288 | r | # ------------------------------------
# Author: Andreas Alfons
# Erasmus University Rotterdam
# ------------------------------------
#' Extract coefficients from a sequence of regression models
#'
#' Extract coefficients from a sequence of regression models, such as submodels
#' along a robust or groupwise ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/inflect_points_df.R
\name{inflect_points_df}
\alias{inflect_points_df}
\title{Find inflection points and curve numbers}
\usage{
inflect_points_df(Dataframe, Trial)
}
\arguments{
\item{Dataframe}{a GCalcium-format data frame or matrix... | /man/inflect_points_df.Rd | no_license | cran/GCalcium | R | false | true | 731 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/inflect_points_df.R
\name{inflect_points_df}
\alias{inflect_points_df}
\title{Find inflection points and curve numbers}
\usage{
inflect_points_df(Dataframe, Trial)
}
\arguments{
\item{Dataframe}{a GCalcium-format data frame or matrix... |
#' PLOT DETECTIONS
#'
#' @description \code{PlotDetections} shows in a graph the results obtained after the application
#' of one of the anomaly detectors included in this package.
#'
#' @param data data.frame composed of at least one column called timestamp and another column
#' called value. You can also include othe... | /R/PlotDetections.R | permissive | JacintoCC/otsad | R | false | false | 5,284 | r | #' PLOT DETECTIONS
#'
#' @description \code{PlotDetections} shows in a graph the results obtained after the application
#' of one of the anomaly detectors included in this package.
#'
#' @param data data.frame composed of at least one column called timestamp and another column
#' called value. You can also include othe... |
#' Group V-Fold Cross-Validation
#'
#' Group V-fold cross-validation creates splits of the data based
#' on some grouping variable (which may have more than a single row
#' associated with it). The function can create as many splits as
#' there are unique values of the grouping variable or it can
#' create a smalle... | /R/groups.R | no_license | jyuu/rsample | R | false | false | 3,595 | r | #' Group V-Fold Cross-Validation
#'
#' Group V-fold cross-validation creates splits of the data based
#' on some grouping variable (which may have more than a single row
#' associated with it). The function can create as many splits as
#' there are unique values of the grouping variable or it can
#' create a smalle... |
influence.blm <- function(formula, data, weights=NULL,initial){
fit <- do.call("glm", args=list(formula=formula,
data=data,
start=initial,
weights=weights,
family=binomial(link=make.link("identity"))))
lm.influence(fit)$coefficients
}
influence.lexpit <- function(f... | /R/influence_measures.R | no_license | cran/blm | R | false | false | 2,793 | r | influence.blm <- function(formula, data, weights=NULL,initial){
fit <- do.call("glm", args=list(formula=formula,
data=data,
start=initial,
weights=weights,
family=binomial(link=make.link("identity"))))
lm.influence(fit)$coefficients
}
influence.lexpit <- function(f... |
library(parallel)
simRep <- 5000 # Replication times in one simulation
pvalue.true <- .05 # Testing type I error
b.var <- c(0.0049) # The set of varaince of random covariates b as random slope
smooth <- 1 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1
cores <- 4
r.sim <- b.... | /full simulation/03.13.2018/power test/variance0.0049/seed4/power_0.0049_pca_s_seed4_200_50.R | no_license | wma9/FMRI-project | R | false | false | 9,166 | r | library(parallel)
simRep <- 5000 # Replication times in one simulation
pvalue.true <- .05 # Testing type I error
b.var <- c(0.0049) # The set of varaince of random covariates b as random slope
smooth <- 1 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1
cores <- 4
r.sim <- b.... |
# Plots.r
# ------------------------------------------------------------------------------
# Plots
# ------------------------------------------------------------------------------
# 95th 75th pctl
percentileOfEachSampleDf <- outlierResults %>%
group_by(sampleID) %>%
summarise(p95 = quantile(sample, c(0.95)),p75 = ... | /plors.R | no_license | liammckay19/OutlierRNAseq_Treehouse_Repo | R | false | false | 5,573 | r | # Plots.r
# ------------------------------------------------------------------------------
# Plots
# ------------------------------------------------------------------------------
# 95th 75th pctl
percentileOfEachSampleDf <- outlierResults %>%
group_by(sampleID) %>%
summarise(p95 = quantile(sample, c(0.95)),p75 = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_drugresistance_stochastic.R
\name{simulate_drugresistance_stochastic}
\alias{simulate_drugresistance_stochastic}
\title{Stochastic simulation of a compartmental acute virus infection model
with treatment and drug resistant strain}
\u... | /man/simulate_drugresistance_stochastic.Rd | no_license | SpencerDH/DSAIRM | R | false | true | 3,018 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_drugresistance_stochastic.R
\name{simulate_drugresistance_stochastic}
\alias{simulate_drugresistance_stochastic}
\title{Stochastic simulation of a compartmental acute virus infection model
with treatment and drug resistant strain}
\u... |
#
# TTR: Technical Trading Rules
#
# Copyright (C) 2007-2013 Joshua M. Ulrich
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option... | /R/aroon.R | no_license | cran/TTR | R | false | false | 3,585 | r | #
# TTR: Technical Trading Rules
#
# Copyright (C) 2007-2013 Joshua M. Ulrich
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option... |
#==========================================================================================#
#==========================================================================================#
# Function terraclass.map #
# ... | /Models/26jan17/R-utils/terraclass.map.r | no_license | hamiddashti/ED_BSU | R | false | false | 25,200 | r | #==========================================================================================#
#==========================================================================================#
# Function terraclass.map #
# ... |
# https://www.blendo.co/blog/access-data-google-bigquery-python-r/
#install.packages("bigrquery")
library(bigrquery)
# Use your project ID here
project_id <- "emerald-ether-217704" # put your project ID here
# Example query
sql_string <- "SELECT * FROM [emerald-ether-217704:londonhouse.inner_outer_london] LIMIT 1000... | /bigquery/src/GoogleBigQueryRExample.R | no_license | caiomsouza/google-big-data-scientist-and-ai | R | false | false | 445 | r | # https://www.blendo.co/blog/access-data-google-bigquery-python-r/
#install.packages("bigrquery")
library(bigrquery)
# Use your project ID here
project_id <- "emerald-ether-217704" # put your project ID here
# Example query
sql_string <- "SELECT * FROM [emerald-ether-217704:londonhouse.inner_outer_london] LIMIT 1000... |
#' @title Estimate residual variance
#' @param X an n by p matrix of covariantes
#' @param Y an n vector of data
#' @param s a susie fit
estimate_residual_variance = function(X,Y, s){
n = nrow(X)
return( (1/n)* get_ER2(X,Y,s) )
}
| /R/estimate_residual_variance.R | no_license | jhmarcus/susieR | R | false | false | 236 | r | #' @title Estimate residual variance
#' @param X an n by p matrix of covariantes
#' @param Y an n vector of data
#' @param s a susie fit
estimate_residual_variance = function(X,Y, s){
n = nrow(X)
return( (1/n)* get_ER2(X,Y,s) )
}
|
library(DBEST)
### Encoding: UTF-8
### Name: DBEST
### Title: Detecting Breakpoints and Estimating Segments in Trend (DBEST)
### Aliases: DBEST
### Keywords: ts
### ** Examples
# NDVI data for Site 1 and Site 2 used in Fig. 5, Jamali et al. 2015
data(NDVI.Site1)
NDVI.Site1 <- ts(NDVI.Site1, start=1982, frequency=... | /data/genthat_extracted_code/DBEST/examples/DBEST.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 5,041 | r | library(DBEST)
### Encoding: UTF-8
### Name: DBEST
### Title: Detecting Breakpoints and Estimating Segments in Trend (DBEST)
### Aliases: DBEST
### Keywords: ts
### ** Examples
# NDVI data for Site 1 and Site 2 used in Fig. 5, Jamali et al. 2015
data(NDVI.Site1)
NDVI.Site1 <- ts(NDVI.Site1, start=1982, frequency=... |
\name{phylosig}
\alias{phylosig}
\alias{plot.phylosig}
\title{Compute phylogenetic signal with two methods}
\usage{
phylosig(tree, x, method="K", test=FALSE, nsim=1000, se=NULL, start=NULL,
control=list())
\method{plot}{phylosig}(x, ...)
}
\arguments{
\item{tree}{a phylogenetic tree in \code{"phylo"} format.}
\ite... | /man/phylosig.Rd | no_license | phamasaur/phytools | R | false | false | 4,613 | rd | \name{phylosig}
\alias{phylosig}
\alias{plot.phylosig}
\title{Compute phylogenetic signal with two methods}
\usage{
phylosig(tree, x, method="K", test=FALSE, nsim=1000, se=NULL, start=NULL,
control=list())
\method{plot}{phylosig}(x, ...)
}
\arguments{
\item{tree}{a phylogenetic tree in \code{"phylo"} format.}
\ite... |
##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##
#### setplotparams() ####
##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##
setplotparams <- function(plot_input,plottype,custom_line_colors) {
# plot_input <- plot_input
# plottype <- "Lift"
# custom_line_colors <- NA
pp <- list()
# ALL PLOTS
pp$plottype <- plottype... | /R/plottingmodelplots.R | no_license | statkclee/modelplotr | R | false | false | 47,229 | r | ##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##
#### setplotparams() ####
##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##
setplotparams <- function(plot_input,plottype,custom_line_colors) {
# plot_input <- plot_input
# plottype <- "Lift"
# custom_line_colors <- NA
pp <- list()
# ALL PLOTS
pp$plottype <- plottype... |
library(shiny)
library(shinydashboard)
dashboardPage(
dashboardHeader(title = "TRAVAIL INDIVIDUEL 02"),
dashboardSidebar(
menuItem("Global"),
menuSubItem("submenu"),
menuItem("finances"),
menuItem("Marketing")
),
dashboardBody(
box(width = 6,
title = "Graph 2",
color =... | /attelier2/ui.R | no_license | zouheyr/MKA6005_Attelier2 | R | false | false | 459 | r | library(shiny)
library(shinydashboard)
dashboardPage(
dashboardHeader(title = "TRAVAIL INDIVIDUEL 02"),
dashboardSidebar(
menuItem("Global"),
menuSubItem("submenu"),
menuItem("finances"),
menuItem("Marketing")
),
dashboardBody(
box(width = 6,
title = "Graph 2",
color =... |
library(data.table)
raw_data <- fread("../household_power_consumption.txt", header=TRUE)
plot_data <- raw_data["Date" %in% c("1/2/2007","2/2/2007")]
plot_data <- within(plot_data, {
my_date <- as.POSIXct(strptime(paste(Date, Time, sep=" "), format="%d/%m/%Y %H:%M:%S"))
Sub_metering_1 <- as.numeric(Sub_metering_1)... | /plot3.R | no_license | jefffletcher/ExData_Plotting1 | R | false | false | 788 | r | library(data.table)
raw_data <- fread("../household_power_consumption.txt", header=TRUE)
plot_data <- raw_data["Date" %in% c("1/2/2007","2/2/2007")]
plot_data <- within(plot_data, {
my_date <- as.POSIXct(strptime(paste(Date, Time, sep=" "), format="%d/%m/%Y %H:%M:%S"))
Sub_metering_1 <- as.numeric(Sub_metering_1)... |
context("test-is_fy")
test_that("is_fy works", {
expect_true(is_fy("2014 15"))
expect_false(is_fy("2014 14"))
expect_true(all(is_fy(c("2014-15", "2015-16", "2015-15")) == c(TRUE, TRUE, FALSE)))
})
test_that("Century issue #3", {
expect_true(is_fy("2014-2015"))
expect_true(is_fy("1999-2000"))
})
| /tests/testthat/test-is_fy.R | no_license | HughParsonage/fy | R | false | false | 308 | r | context("test-is_fy")
test_that("is_fy works", {
expect_true(is_fy("2014 15"))
expect_false(is_fy("2014 14"))
expect_true(all(is_fy(c("2014-15", "2015-16", "2015-15")) == c(TRUE, TRUE, FALSE)))
})
test_that("Century issue #3", {
expect_true(is_fy("2014-2015"))
expect_true(is_fy("1999-2000"))
})
|
# author: Huayue Lu G410, Holly Williams
# date: 2020-01-24
"This script is for downloading and saving data only.
This was used to download league data from https://github.com/hwilliams10/fifa_data
which was created by myself manually using this website https://www.ea.com/games/fifa/news/fifa-19-leagues-and-t... | /src/download_and_save_league_data.R | permissive | UBC-MDS/DSCI_522_G410 | R | false | false | 1,043 | r | # author: Huayue Lu G410, Holly Williams
# date: 2020-01-24
"This script is for downloading and saving data only.
This was used to download league data from https://github.com/hwilliams10/fifa_data
which was created by myself manually using this website https://www.ea.com/games/fifa/news/fifa-19-leagues-and-t... |
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /IntervalSurgeon/inst/testfiles/rcpp_pile/AFL_rcpp_pile/rcpp_pile_valgrind_files/1609860645-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 730 | r | testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
### Functions associated with Sample Size Calculations
require(foreach); require(TTR); require(zoo); require(expm)
### Simulation functions
rand.probs <- function(X.t, H.t, T, N, pi, lambda, min.p, max.p) {
## Calculate randomization probabilities given pi, x.t, lambda,
## T, and N
power = length(H.t$X):1
rema... | /Sense2Stop/marginal-case/simulations/model_misspec/mm_functions.R | no_license | wdempsey/stratified_mrt | R | false | false | 8,998 | r | ### Functions associated with Sample Size Calculations
require(foreach); require(TTR); require(zoo); require(expm)
### Simulation functions
rand.probs <- function(X.t, H.t, T, N, pi, lambda, min.p, max.p) {
## Calculate randomization probabilities given pi, x.t, lambda,
## T, and N
power = length(H.t$X):1
rema... |
# Missing data plot
# Needs HeatIndex.R and HeatIndexCenicafe.R
library(ggplot2)
# Make table of available data in yearly format
# Color scale according to number of missing days in that year
#total_missing
#total_missing_cc
# 1st column year
# 2nd column station name
# 3rd column data
missing.df <- matrix(NA, 182... | /R Scripts/MissingDataPlot.R | no_license | mtnorton/Coffee_Ins_Heat_Index | R | false | false | 2,514 | r | # Missing data plot
# Needs HeatIndex.R and HeatIndexCenicafe.R
library(ggplot2)
# Make table of available data in yearly format
# Color scale according to number of missing days in that year
#total_missing
#total_missing_cc
# 1st column year
# 2nd column station name
# 3rd column data
missing.df <- matrix(NA, 182... |
\name{simulate, covAll-method}
\alias{simulate,covAll-method}
\title{
Simulation of a \code{covAll} Object
}
\description{
Simulation of a \code{covAll} object.
}
\usage{
\S4method{simulate}{covAll}(object, nsim = 1, seed = NULL,
X, mu = NULL, method = "mvrnorm", checkNames = TRUE,
...)... | /fuzzedpackages/kergp/man/simulate.covAll.Rd | no_license | akhikolla/testpackages | R | false | false | 2,397 | rd | \name{simulate, covAll-method}
\alias{simulate,covAll-method}
\title{
Simulation of a \code{covAll} Object
}
\description{
Simulation of a \code{covAll} object.
}
\usage{
\S4method{simulate}{covAll}(object, nsim = 1, seed = NULL,
X, mu = NULL, method = "mvrnorm", checkNames = TRUE,
...)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pls.R
\name{step_pls}
\alias{step_pls}
\title{Partial Least Squares Feature Extraction}
\usage{
step_pls(
recipe,
...,
role = "predictor",
trained = FALSE,
num_comp = 2,
predictor_prop = 1,
outcome = NULL,
options = list(scale... | /man/step_pls.Rd | permissive | tidymodels/recipes | R | false | true | 7,423 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pls.R
\name{step_pls}
\alias{step_pls}
\title{Partial Least Squares Feature Extraction}
\usage{
step_pls(
recipe,
...,
role = "predictor",
trained = FALSE,
num_comp = 2,
predictor_prop = 1,
outcome = NULL,
options = list(scale... |
data <- read.table(file="./CPAT/Especie59/modelo/Especie59.feature.xls",sep="\t",header=T)
attach(data)
mylogit <- glm(Label ~ mRNA + ORF + Fickett + Hexamer, family=binomial(link="logit"), na.action=na.pass)
save.image("./CPAT/Especie59/modelo/Especie59.logit.RData")
| /Semana 07/CPAT/Especie59/modelo/Especie59.make_logitModel.r | no_license | JoseSantillan/tesis2 | R | false | false | 269 | r | data <- read.table(file="./CPAT/Especie59/modelo/Especie59.feature.xls",sep="\t",header=T)
attach(data)
mylogit <- glm(Label ~ mRNA + ORF + Fickett + Hexamer, family=binomial(link="logit"), na.action=na.pass)
save.image("./CPAT/Especie59/modelo/Especie59.logit.RData")
|
print("Installing libraries to:")
.libPaths()
source("https://bioconductor.org/biocLite.R")
biocLite(c("GeneNet", "GENIE3", "glasso", "BDgraph"))
install.packages("packages/iRafNet_1.1-2.tar.gz", repos=NULL, type="source")
#install.packages("packages/R_peer_source_1.3.tgz", repos=NULL, type="source", INSTALL_opts=c("... | /scripts/config_R.R | no_license | heiniglab/multiomics-network-inference | R | false | false | 338 | r | print("Installing libraries to:")
.libPaths()
source("https://bioconductor.org/biocLite.R")
biocLite(c("GeneNet", "GENIE3", "glasso", "BDgraph"))
install.packages("packages/iRafNet_1.1-2.tar.gz", repos=NULL, type="source")
#install.packages("packages/R_peer_source_1.3.tgz", repos=NULL, type="source", INSTALL_opts=c("... |
library(stats)
library(ggplot2)
library(dplyr)
library(tidyr)
library(RODBC)
read.csv2("mba.csv", stringsAsFactors = FALSE) -> mba
mean(mba$salary)
median(mba$salary)
hist(mba$salary)
filter(mba, salary!= 999 & salary != 998 ) -> mba2
hist(mba2$salary)
filter(mba2, salary != 0) -> mba3
hist(mba3$salary)
View(mba3)
... | /AnaliseExploratoriaMBA/mba.R | no_license | lucasjmatias/big-data-projeto-final-analise-exporatoria-dados | R | false | false | 1,323 | r | library(stats)
library(ggplot2)
library(dplyr)
library(tidyr)
library(RODBC)
read.csv2("mba.csv", stringsAsFactors = FALSE) -> mba
mean(mba$salary)
median(mba$salary)
hist(mba$salary)
filter(mba, salary!= 999 & salary != 998 ) -> mba2
hist(mba2$salary)
filter(mba2, salary != 0) -> mba3
hist(mba3$salary)
View(mba3)
... |
# Generate the second plot
plot2 <- function(hsub, filename=NULL, ...){
tf = transform(hsub, DOW=factor(DayOfWeek))
p = xyplot(gap ~ minutes | DOW, tf, type="s", xlab="Day",
ylab="Global Active Power (kilowatts)")
# Save to file is requested
if(!is.null(filename)){
png(filename=filename, ...... | /plot2.r | no_license | wasntnate/ExData_Plotting1 | R | false | false | 350 | r | # Generate the second plot
plot2 <- function(hsub, filename=NULL, ...){
tf = transform(hsub, DOW=factor(DayOfWeek))
p = xyplot(gap ~ minutes | DOW, tf, type="s", xlab="Day",
ylab="Global Active Power (kilowatts)")
# Save to file is requested
if(!is.null(filename)){
png(filename=filename, ...... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/measures_net_dis.R
\name{netdis_one_to_many}
\alias{netdis_one_to_many}
\title{Netdis comparisons between one graph and many other graphs.}
\usage{
netdis_one_to_many(
graph_1 = NULL,
graphs_compare = NULL,
ref_graph = 0,
max_graphlet... | /man/netdis_one_to_many.Rd | permissive | alan-turing-institute/network-comparison | R | false | true | 3,810 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/measures_net_dis.R
\name{netdis_one_to_many}
\alias{netdis_one_to_many}
\title{Netdis comparisons between one graph and many other graphs.}
\usage{
netdis_one_to_many(
graph_1 = NULL,
graphs_compare = NULL,
ref_graph = 0,
max_graphlet... |
#!/usr/bin/env Rscript
# date <- "20180410"
# config <- "medium_range"
# type <- "channel_rt"
# run <- "t00z"
# out_dir <- "temp/20180410_medium_range_nwm_t00z/temp"
args = commandArgs(trailingOnly=TRUE)
if (length(args)<5) {
stop("Need date, config, type, run, and out_dir.\n", call.=FALSE)
} else if (length(args)... | /bin/dl_ostore.R | permissive | dblodgett-usgs/nwm_subset | R | false | false | 2,232 | r | #!/usr/bin/env Rscript
# date <- "20180410"
# config <- "medium_range"
# type <- "channel_rt"
# run <- "t00z"
# out_dir <- "temp/20180410_medium_range_nwm_t00z/temp"
args = commandArgs(trailingOnly=TRUE)
if (length(args)<5) {
stop("Need date, config, type, run, and out_dir.\n", call.=FALSE)
} else if (length(args)... |
# CassavaMap v1 15 May 2020
# This code illustrates the methodology of disaggregating cassava harvested
# area data between rural population.
# Various shapefiles of different formats were used for the continental scale map.
# This example shows calculations for a chosen country (Uganda)
# and can be upscaled to the e... | /HarvArea_disaggregation.R | no_license | aniaszy/CassavaMap | R | false | false | 9,379 | r | # CassavaMap v1 15 May 2020
# This code illustrates the methodology of disaggregating cassava harvested
# area data between rural population.
# Various shapefiles of different formats were used for the continental scale map.
# This example shows calculations for a chosen country (Uganda)
# and can be upscaled to the e... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcmcPriors.R
\name{indepGaussianprior}
\alias{indepGaussianprior}
\title{indepGaussianprior function}
\usage{
indepGaussianprior(beta = NULL, omega = NULL, eta = NULL, priors)
}
\arguments{
\item{beta}{parameter beta at which prior is to be e... | /man/indepGaussianprior.Rd | no_license | cran/spatsurv | R | false | true | 868 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcmcPriors.R
\name{indepGaussianprior}
\alias{indepGaussianprior}
\title{indepGaussianprior function}
\usage{
indepGaussianprior(beta = NULL, omega = NULL, eta = NULL, priors)
}
\arguments{
\item{beta}{parameter beta at which prior is to be e... |
#NOTE: uncomment the lines from 6 to 12 if the packages are not installed and loaded
# in your system. Installing and loading the libraries everytime you run the
# program makes the execution time longer. Hence commented those parts.
#installing and importing the library
install.packages('stringr')
library(s... | /RScriptsAsPerTask/DS2_Part_1.R | no_license | himajavadaga/AdvanceDataScience_Team6_A1 | R | false | false | 7,514 | r | #NOTE: uncomment the lines from 6 to 12 if the packages are not installed and loaded
# in your system. Installing and loading the libraries everytime you run the
# program makes the execution time longer. Hence commented those parts.
#installing and importing the library
install.packages('stringr')
library(s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vector_paste.R
\name{vector_paste}
\alias{vector_paste}
\title{vector_paste}
\usage{
vector_paste(input_vector, output_context = guess_output_context())
}
\arguments{
\item{input_vector}{An input vector to be formatted for output. If supplied... | /man/vector_paste.Rd | no_license | wkapga/datapasta | R | false | true | 849 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vector_paste.R
\name{vector_paste}
\alias{vector_paste}
\title{vector_paste}
\usage{
vector_paste(input_vector, output_context = guess_output_context())
}
\arguments{
\item{input_vector}{An input vector to be formatted for output. If supplied... |
# Creating the Life Expectancy T-test for Males only.
lifexpectancy.ttest<-function(lifeexpectancy.ttest){
+ Maleage<-lifeexpectancy$Male[6:80]
+ return(Maleage)}
> lifexpectancy.ttest()
| /R/LifeExpectancyMales.R | no_license | daltonwesley/Lifeexpectancy-R-project | R | false | false | 196 | r | # Creating the Life Expectancy T-test for Males only.
lifexpectancy.ttest<-function(lifeexpectancy.ttest){
+ Maleage<-lifeexpectancy$Male[6:80]
+ return(Maleage)}
> lifexpectancy.ttest()
|
library(testthat)
library(rssr)
test_check("rssr")
| /tests/testthat.R | no_license | MoisesExpositoAlonso/rssr | R | false | false | 52 | r | library(testthat)
library(rssr)
test_check("rssr")
|
#Run CNVkit for BREASTv6 tumors, test set, use 5 normals as reference
#Created by Rebecka Bergström on 2016-04-09
path_main <- "/home/Crisp/clinseq/from_rasta/BREASTv6/"
load("/home/rebecka.bergstrom/cnvkit/BREASTv6_all/test50/test50") #loads the testset variable
bamFiles <- c()
for (i in 1:length(testset[,1])) {
b... | /runCNVkitBv6testset_ref5norm.R | no_license | rebber/master_thesis | R | false | false | 1,951 | r | #Run CNVkit for BREASTv6 tumors, test set, use 5 normals as reference
#Created by Rebecka Bergström on 2016-04-09
path_main <- "/home/Crisp/clinseq/from_rasta/BREASTv6/"
load("/home/rebecka.bergstrom/cnvkit/BREASTv6_all/test50/test50") #loads the testset variable
bamFiles <- c()
for (i in 1:length(testset[,1])) {
b... |
testlist <- list(x = c(-151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151650304L, 1996550143L, -1L), y = c(-1L, -687865865L, NA, 1884711269L,... | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962669-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 1,326 | r | testlist <- list(x = c(-151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151587082L, -151650304L, 1996550143L, -1L), y = c(-1L, -687865865L, NA, 1884711269L,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/od-funs.R
\name{points2flow}
\alias{points2flow}
\title{Convert a series of points into geographical flows}
\usage{
points2flow(p)
}
\arguments{
\item{p}{SpatialPointsDataFrame}
}
\description{
Takes a series of geographical points and conver... | /man/points2flow.Rd | permissive | seanolondon/stplanr | R | false | true | 590 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/od-funs.R
\name{points2flow}
\alias{points2flow}
\title{Convert a series of points into geographical flows}
\usage{
points2flow(p)
}
\arguments{
\item{p}{SpatialPointsDataFrame}
}
\description{
Takes a series of geographical points and conver... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/crosstalk-cntk.R
\name{RnnArgs}
\alias{RnnArgs}
\title{RNN Variable Arguments}
\usage{
RnnArgs()
}
\description{
RNN Variable Arguments
}
| /man/RnnArgs.Rd | permissive | Bhaskers-Blu-Org2/CNTK-R | R | false | true | 216 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/crosstalk-cntk.R
\name{RnnArgs}
\alias{RnnArgs}
\title{RNN Variable Arguments}
\usage{
RnnArgs()
}
\description{
RNN Variable Arguments
}
|
context("Draw random ages test")
#set.seed(1)
#
# time <- as.numeric(start(treering)[1]:end(treering)[1])
# time <- time[1:300]
# data <- as.numeric(unclass(treering))[1:300]
# sigma <- abs(rnorm(n = length(data), mean = 0, sd = 0.03))
#
# test_that("Agemodel fails when ages are not strictly increasing.", {
# ages = ... | /tests/testthat/test-draw-random-ages.R | permissive | kahaaga/tstools | R | false | false | 1,352 | r | context("Draw random ages test")
#set.seed(1)
#
# time <- as.numeric(start(treering)[1]:end(treering)[1])
# time <- time[1:300]
# data <- as.numeric(unclass(treering))[1:300]
# sigma <- abs(rnorm(n = length(data), mean = 0, sd = 0.03))
#
# test_that("Agemodel fails when ages are not strictly increasing.", {
# ages = ... |
# Apriori
# Data Preprocessing
# install.packages('arules')
library(arules)
dataset = read.csv('Market_Basket_Optimisation.csv', header = FALSE)
dataset = read.transactions('Market_Basket_Optimisation.csv', sep = ',', rm.duplicates = TRUE)
summary(dataset)
itemFrequencyPlot(dataset, topN = 10)
# Training Apriori on ... | /apriori.R | no_license | Jjrex8988/R_Project_DS_Apriori_Association_Rule_Learning | R | false | false | 572 | r | # Apriori
# Data Preprocessing
# install.packages('arules')
library(arules)
dataset = read.csv('Market_Basket_Optimisation.csv', header = FALSE)
dataset = read.transactions('Market_Basket_Optimisation.csv', sep = ',', rm.duplicates = TRUE)
summary(dataset)
itemFrequencyPlot(dataset, topN = 10)
# Training Apriori on ... |
==Pointer declaration must be also definition. (line: 2, column: 1) [DeclError].
k : °int;
==Use of undeclared identifier 'k'. (line: 4, column: 13) [DeclError].
l : °int := k;
m : °°int := l;
==Incompatible conversion from '°int' to '°°int'. (line: 5, column: 11) [TypeError].
n : °bool := l;
==Incompatible conversion... | /ourtests/analysis/testUnit/type02.r | permissive | IdrissRio/RNB-Compiler | R | false | false | 2,556 | r | ==Pointer declaration must be also definition. (line: 2, column: 1) [DeclError].
k : °int;
==Use of undeclared identifier 'k'. (line: 4, column: 13) [DeclError].
l : °int := k;
m : °°int := l;
==Incompatible conversion from '°int' to '°°int'. (line: 5, column: 11) [TypeError].
n : °bool := l;
==Incompatible conversion... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linelist_tools.R
\name{sample_delay}
\alias{sample_delay}
\title{Sample Onset Dates for Cases missing them}
\usage{
sample_delay(linelist = NULL, delay_fn = NULL, earliest_allowed_onset = NULL)
}
\arguments{
\item{linelist}{Dataframe with two... | /man/sample_delay.Rd | permissive | link2matt/EpiNow | R | false | true | 826 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/linelist_tools.R
\name{sample_delay}
\alias{sample_delay}
\title{Sample Onset Dates for Cases missing them}
\usage{
sample_delay(linelist = NULL, delay_fn = NULL, earliest_allowed_onset = NULL)
}
\arguments{
\item{linelist}{Dataframe with two... |
###### Random Forest ######
## 1
# train <- function(feat_train, label_train, params=NULL, run_gbm = F,
# run_xgb = F,run_lr=F, run_rf = F){
#
# ### Train a Gradient Boosting Model (GBM) using processed features from training images
#
# ### Input:
# ### - features from LR images
# ... | /lib/Random Forest.R | no_license | TZstatsADS/Spring2019-Proj3-grp4 | R | false | false | 2,281 | r | ###### Random Forest ######
## 1
# train <- function(feat_train, label_train, params=NULL, run_gbm = F,
# run_xgb = F,run_lr=F, run_rf = F){
#
# ### Train a Gradient Boosting Model (GBM) using processed features from training images
#
# ### Input:
# ### - features from LR images
# ... |
### Adapted from Thomas' script, sent to Kris and then to me on June 11 2019
library(MASS)
library(vegan)
library(tidyverse)
## Working directory should be the dir with isoMDS solutions
setwd("C:/Users/u0118974/xampp/htdocs/GitHub/montesmariana.github.io/NephoVis/")
lemma <- 'zwart'
models_file <- paste0(lemma, '/',... | /NephoVis/semevalProcrustes.R | permissive | AlexScigalszky/montesmariana.github.io | R | false | false | 3,679 | r | ### Adapted from Thomas' script, sent to Kris and then to me on June 11 2019
library(MASS)
library(vegan)
library(tidyverse)
## Working directory should be the dir with isoMDS solutions
setwd("C:/Users/u0118974/xampp/htdocs/GitHub/montesmariana.github.io/NephoVis/")
lemma <- 'zwart'
models_file <- paste0(lemma, '/',... |
setwd("~/work/urmi/geoscripts")
library(SRAdb)
sra_con <- dbConnect(SQLite(),'SRAmetadb.sqlite')
dbListTables(sra_con)
library(GEOmetadb)
congeo <- dbConnect(SQLite(),'GEOmetadb.sqlite')
rw <- dbGetQuery(congeo, paste("select * from gse LIMIT 5",sep=""))
# #get human RNA-seq from SRA
# sra_data_human_rnaseq <-dbGetQu... | /gethuman_rnaseq.R | no_license | urmi-21/RNAseq | R | false | false | 14,584 | r | setwd("~/work/urmi/geoscripts")
library(SRAdb)
sra_con <- dbConnect(SQLite(),'SRAmetadb.sqlite')
dbListTables(sra_con)
library(GEOmetadb)
congeo <- dbConnect(SQLite(),'GEOmetadb.sqlite')
rw <- dbGetQuery(congeo, paste("select * from gse LIMIT 5",sep=""))
# #get human RNA-seq from SRA
# sra_data_human_rnaseq <-dbGetQu... |
library(Rspotify)
library(readr)
library(tidyverse)
keys <- spotifyOAuth("EDAV","2396242d1c2043ae90fa37810b334c56","e972f10fc0384e5683be1f603b869a55")
df <- read.csv("data/raw/global.csv")
regions <- c("gb","us","ad","ar","at","au","be","bg","bo","br",
"ca","ch","cl","co","cr","cy","cz","de","dk",
... | /preprocessing/get_feature.R | no_license | ruibai118/Edav-Final-Project-1 | R | false | false | 2,447 | r | library(Rspotify)
library(readr)
library(tidyverse)
keys <- spotifyOAuth("EDAV","2396242d1c2043ae90fa37810b334c56","e972f10fc0384e5683be1f603b869a55")
df <- read.csv("data/raw/global.csv")
regions <- c("gb","us","ad","ar","at","au","be","bg","bo","br",
"ca","ch","cl","co","cr","cy","cz","de","dk",
... |
list_a <- list(
AFD,
sha_diff,
one_D_alpha_pop1,
one_D_alpha_pop2,
two_D_alpha_pop1,
two_D_alpha_pop2,
one_D_beta,
two_D_beta,
sha_pop1,
sha_pop2,
sha_pops,
shua,
expected_het_pop1,
expected_het_pop2,
het_pop1,
het_pop2,
Ht,
Fst,
Fstp,
De... | /save_script.R | no_license | mijangos81/AOD | R | false | false | 12,386 | r | list_a <- list(
AFD,
sha_diff,
one_D_alpha_pop1,
one_D_alpha_pop2,
two_D_alpha_pop1,
two_D_alpha_pop2,
one_D_beta,
two_D_beta,
sha_pop1,
sha_pop2,
sha_pops,
shua,
expected_het_pop1,
expected_het_pop2,
het_pop1,
het_pop2,
Ht,
Fst,
Fstp,
De... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.