content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/highplos.r
\name{highplos}
\alias{highplos}
\title{Do highlighted searches on PLOS Journals full-text content}
\usage{
highplos(q, fl = NULL, fq = NULL, hl.fl = NULL, hl.snippets = NULL,
hl.fragsize = NULL, hl.q = NULL, hl.mergeCont... | /man/highplos.Rd | permissive | Darkoe/rplos | R | false | false | 11,065 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/highplos.r
\name{highplos}
\alias{highplos}
\title{Do highlighted searches on PLOS Journals full-text content}
\usage{
highplos(q, fl = NULL, fq = NULL, hl.fl = NULL, hl.snippets = NULL,
hl.fragsize = NULL, hl.q = NULL, hl.mergeCont... |
corr <- function(directory, threshold = 0) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'threshold' is a numeric vector of length 1 indicating the
## number of completely observed observations (on all
## variables) required to compute the correlation bet... | /corr.R | no_license | mulargui/datasciencecoursera | R | false | false | 780 | r | corr <- function(directory, threshold = 0) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'threshold' is a numeric vector of length 1 indicating the
## number of completely observed observations (on all
## variables) required to compute the correlation bet... |
states <- 0:20
actions <- states
observed_states <- states
reward_fn <- function(x,h) pmin(x,h)
discount <- 0.95
# Re-scale a sigma = 0.1 for lognormal
sigma_g <- sqrt(log(1 + 0.1 / 6))
sigma_m <- sigma_g
f <- function(x, h, r = 1, K = 20){
s <- pmax(x - h, 0)
s * exp(r * (1 - s / K) )
}
# m <- fisheries_matrices... | /inst/examples/fisheries-ex.R | no_license | boettiger-lab/despot | R | false | false | 2,355 | r | states <- 0:20
actions <- states
observed_states <- states
reward_fn <- function(x,h) pmin(x,h)
discount <- 0.95
# Re-scale a sigma = 0.1 for lognormal
sigma_g <- sqrt(log(1 + 0.1 / 6))
sigma_m <- sigma_g
f <- function(x, h, r = 1, K = 20){
s <- pmax(x - h, 0)
s * exp(r * (1 - s / K) )
}
# m <- fisheries_matrices... |
ratingCurve.fun <- function(data){
# Find a and b parameters for We=aQ^b
fit <- try(nls(We~intercept*I(Q^power), data = data, start = list(intercept=1,power=1),trace = F,control = list(maxiter = 50000000)))
if("try-error" %in% class(fit)){
return(data.frame(a=NA,b=NA))
}
else{
a <- coeffici... | /09-Bootstrap.R | no_license | JoostBrombacher/NearDailyDischargeEstimations | R | false | false | 2,072 | r | ratingCurve.fun <- function(data){
# Find a and b parameters for We=aQ^b
fit <- try(nls(We~intercept*I(Q^power), data = data, start = list(intercept=1,power=1),trace = F,control = list(maxiter = 50000000)))
if("try-error" %in% class(fit)){
return(data.frame(a=NA,b=NA))
}
else{
a <- coeffici... |
expect_equal( geometries:::rcpp_calculate_bbox( 1L:4L, NULL ), c(1L,2L,1L,2L) )
expect_equal( geometries:::rcpp_calculate_bbox( 1L:4L, c(2L,3L) ), c(3L,4L,3L,4L) )
expect_equal( geometries:::rcpp_calculate_bbox( c(1,2,3,4.4), NULL ), c(1,2,1,2) )
expect_equal( geometries:::rcpp_calculate_bbox( c(1,2,3,4.4), c(2L,3L) ... | /fuzzedpackages/geometries/inst/tinytest/test_bbox.R | no_license | akhikolla/testpackages | R | false | false | 3,352 | r |
expect_equal( geometries:::rcpp_calculate_bbox( 1L:4L, NULL ), c(1L,2L,1L,2L) )
expect_equal( geometries:::rcpp_calculate_bbox( 1L:4L, c(2L,3L) ), c(3L,4L,3L,4L) )
expect_equal( geometries:::rcpp_calculate_bbox( c(1,2,3,4.4), NULL ), c(1,2,1,2) )
expect_equal( geometries:::rcpp_calculate_bbox( c(1,2,3,4.4), c(2L,3L) ... |
### Jinliang Yang
### April 5th, 2016
teo67 <- read.csv("largedata/ip/imp67.csv")
teo67[teo67 == 0] <- "A A"
teo67[teo67 == 1] <- "A T"
teo67[teo67 == 2] <- "T T"
teo67[teo67 == 3] <- "0 0"
#The first 4 columns of a TPED file are the same as a standard 4-column MAP file.
#Then all genotypes are listed for all indiv... | /profiling/7.IBD_homo/7.1.A_ibd_homo.R | no_license | yangjl/phasing | R | false | false | 1,748 | r | ### Jinliang Yang
### April 5th, 2016
teo67 <- read.csv("largedata/ip/imp67.csv")
teo67[teo67 == 0] <- "A A"
teo67[teo67 == 1] <- "A T"
teo67[teo67 == 2] <- "T T"
teo67[teo67 == 3] <- "0 0"
#The first 4 columns of a TPED file are the same as a standard 4-column MAP file.
#Then all genotypes are listed for all indiv... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cut_functions.R
\name{cut_at}
\alias{cut_at}
\title{Cut a vector at breakpoints defined by quantiles}
\usage{
cut_at(x, at, ...)
}
\arguments{
\item{x}{A numeric vector.}
\item{at}{The quantiles at which to break x
(defined either in the ran... | /man/cut_at.Rd | no_license | bbcuffer/rcutils | R | false | true | 668 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cut_functions.R
\name{cut_at}
\alias{cut_at}
\title{Cut a vector at breakpoints defined by quantiles}
\usage{
cut_at(x, at, ...)
}
\arguments{
\item{x}{A numeric vector.}
\item{at}{The quantiles at which to break x
(defined either in the ran... |
#' @title Display Number of Forecasts Available
#'
#' @description
#'
#' Given a data set with forecasts, count the number of available forecasts
#' for arbitrary grouping (e.g. the number of forecasts per model, or the
#' number of forecasts per model and location).
#' This is useful to determine whether there are any... | /R/avail_forecasts.R | permissive | epiforecasts/scoringutils | R | false | false | 2,337 | r | #' @title Display Number of Forecasts Available
#'
#' @description
#'
#' Given a data set with forecasts, count the number of available forecasts
#' for arbitrary grouping (e.g. the number of forecasts per model, or the
#' number of forecasts per model and location).
#' This is useful to determine whether there are any... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Category.R
\name{getCategory}
\alias{getCategory}
\title{Get a single category}
\usage{
getCategory(categoryId)
}
\arguments{
\item{categoryId}{The categoryId}
}
\value{
none
}
\description{
Gets a single Category
}
\concept{Category}
| /man/getCategory.Rd | no_license | bpb824/brewerydb | R | false | true | 313 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Category.R
\name{getCategory}
\alias{getCategory}
\title{Get a single category}
\usage{
getCategory(categoryId)
}
\arguments{
\item{categoryId}{The categoryId}
}
\value{
none
}
\description{
Gets a single Category
}
\concept{Category}
|
library(testthat)
library(ghk)
test_check("ghk")
| /tests/testthat.R | no_license | c5sire/ghk | R | false | false | 50 | r | library(testthat)
library(ghk)
test_check("ghk")
|
library(plyr)
library(dplyr)
library(ggplot2)
library(reshape2)
#Set working directory
mainDir = '' #CHANGE this to reflect the main directory you've selected
setwd(mainDir)
#Source scripts
source('plot_theme.R')
source('load_data.R')
source('fig_2/a/fig_2a_helper.R')
#Source data
load('counts_gene_li... | /pregnancy_cfRNA/supplement/fig_s1.R | no_license | JLMarin64/Capstone | R | false | false | 1,826 | r | library(plyr)
library(dplyr)
library(ggplot2)
library(reshape2)
#Set working directory
mainDir = '' #CHANGE this to reflect the main directory you've selected
setwd(mainDir)
#Source scripts
source('plot_theme.R')
source('load_data.R')
source('fig_2/a/fig_2a_helper.R')
#Source data
load('counts_gene_li... |
NRM <- function(X){
d <- dim(X)[1]
n <- dim(X)[2]
r <- min(n-2, d)
Mean <- apply(X, 1, mean)
X <- sweep(X, 1, Mean, '-')
Sd <- t(X) %*% X / (n - 1)
eig <- eigen(Sd)
dualval <- eig$values[1:r]
dualvec <- eig$vectors
nrmval <- numeric(r)
nrmvec <- matrix(0, d, r)
nrmscore <- matrix... | /NRM.R | no_license | Takumaro12/HDLSS_functions | R | false | false | 667 | r | NRM <- function(X){
d <- dim(X)[1]
n <- dim(X)[2]
r <- min(n-2, d)
Mean <- apply(X, 1, mean)
X <- sweep(X, 1, Mean, '-')
Sd <- t(X) %*% X / (n - 1)
eig <- eigen(Sd)
dualval <- eig$values[1:r]
dualvec <- eig$vectors
nrmval <- numeric(r)
nrmvec <- matrix(0, d, r)
nrmscore <- matrix... |
ingarch.parametercheck <- function(param){
stopifnot(
param$intercept>0,
param$past_obs>=0,
param$past_mean>=0,
param$xreg>=0
)
sum_param_past <- sum(param$past_obs)+sum(param$past_mean)
if(sum_param_past>=1) stop(paste("Parameters are outside the stationary region, sum of parameter... | /tscount/R/ingarch.parametercheck.r | no_license | ingted/R-Examples | R | false | false | 423 | r | ingarch.parametercheck <- function(param){
stopifnot(
param$intercept>0,
param$past_obs>=0,
param$past_mean>=0,
param$xreg>=0
)
sum_param_past <- sum(param$past_obs)+sum(param$past_mean)
if(sum_param_past>=1) stop(paste("Parameters are outside the stationary region, sum of parameter... |
#rm(list=ls(all=TRUE))
library(parallel)
getwd()
dir()
source('../../../../R Functions/RF functions 20JAN19.R')
load(file="../../../Data/contData.RData")
### Housing ###
nsim=50
ntrees=100
# housing #
housing<-contData$housing
form<-as.formula("Response ~ town + tract + lon + lat + crim + zn + indus + chas + nox... | /Datasets/R Code/Bootstrapping/Individual Dataset/predHousing.R | no_license | pcalhoun1/AR-Code | R | false | false | 2,233 | r | #rm(list=ls(all=TRUE))
library(parallel)
getwd()
dir()
source('../../../../R Functions/RF functions 20JAN19.R')
load(file="../../../Data/contData.RData")
### Housing ###
nsim=50
ntrees=100
# housing #
housing<-contData$housing
form<-as.formula("Response ~ town + tract + lon + lat + crim + zn + indus + chas + nox... |
library(ape)
testtree <- read.tree("337_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="337_0_unrooted.txt") | /codeml_files/newick_trees_processed/337_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 133 | r | library(ape)
testtree <- read.tree("337_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="337_0_unrooted.txt") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/msfc_class.R
\docType{methods}
\name{plot,MSFC-method}
\alias{plot,MSFC-method}
\title{S4 method for the plot generic}
\usage{
\S4method{plot}{MSFC}(x, y = NULL, title = "", xlab = "",
ylab = "Price", legend = "top", ...)
}
\description{
S4... | /man/plot-MSFC-method.Rd | no_license | Karagul/etrm | R | false | true | 352 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/msfc_class.R
\docType{methods}
\name{plot,MSFC-method}
\alias{plot,MSFC-method}
\title{S4 method for the plot generic}
\usage{
\S4method{plot}{MSFC}(x, y = NULL, title = "", xlab = "",
ylab = "Price", legend = "top", ...)
}
\description{
S4... |
\name{MethodsBenchmarking.run}
\alias{MethodsBenchmarking.run}
\title{Clustering Methods Benchmarking App}
\usage{
MethodsBenchmarking.run()
}
\description{
Launch a shiny app allowing the user to benchmark clustering methods
}
\examples{
MethodsBenchmarking.run()
}
| /man/main.Rd | no_license | IsamBenS/Clustering-Methods-Benchmarking | R | false | false | 267 | rd | \name{MethodsBenchmarking.run}
\alias{MethodsBenchmarking.run}
\title{Clustering Methods Benchmarking App}
\usage{
MethodsBenchmarking.run()
}
\description{
Launch a shiny app allowing the user to benchmark clustering methods
}
\examples{
MethodsBenchmarking.run()
}
|
#' Connected pedigree components
#'
#' Compute the connected parts of a pedigree. This is an important step when
#' converting pedigree data from other formats (where disconnected pedigrees may
#' be allowed) to `pedtools` (which requires pedigrees to be connected).
#'
#' @param id A vector of ID labels (characte... | /R/ped_connected.R | no_license | cran/pedtools | R | false | false | 1,775 | r | #' Connected pedigree components
#'
#' Compute the connected parts of a pedigree. This is an important step when
#' converting pedigree data from other formats (where disconnected pedigrees may
#' be allowed) to `pedtools` (which requires pedigrees to be connected).
#'
#' @param id A vector of ID labels (characte... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pathcat.R
\name{make.path.relative}
\alias{make.path.relative}
\title{Converts one absolute path into relative}
\usage{
make.path.relative(base.path, target.path, fsep = .Platform$file.sep)
}
\arguments{
\item{base.path}{character string with... | /man/make.path.relative.Rd | no_license | adamryczkowski/pathcat | R | false | true | 768 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pathcat.R
\name{make.path.relative}
\alias{make.path.relative}
\title{Converts one absolute path into relative}
\usage{
make.path.relative(base.path, target.path, fsep = .Platform$file.sep)
}
\arguments{
\item{base.path}{character string with... |
ui = fluidPage(theme = add_theme(getShinyOption('theme')),
add_css(),
sidebarLayout(
sidebarPanel(width = 3,
hr(),
sliderInput("range.pois",
label = "Range",
min = 0,
max = 50,
step = 1,
value = c(0,10)),
hr()... | /teachingApps/inst/apps/distribution_poisson_functions/ui.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 1,219 | r | ui = fluidPage(theme = add_theme(getShinyOption('theme')),
add_css(),
sidebarLayout(
sidebarPanel(width = 3,
hr(),
sliderInput("range.pois",
label = "Range",
min = 0,
max = 50,
step = 1,
value = c(0,10)),
hr()... |
#!/usr/bin/env Rscript
#Sys.setlocale("LC_MESSAGES", 'en_GB.UTF-8')
ATCG_To_1234<-function(sequence_temp) ## OK
{
sequence_temp=gsub("A",as.numeric("1"),sequence_temp)
sequence_temp=gsub("T",as.numeric("2"),sequence_temp)
sequence_temp=gsub("C",as.numeric("3"),sequence_temp)
sequence_temp=gsub("G",as.numer... | /Targomics_methyl/Targomics_Methyl_Alignment.R | no_license | CochinGeste/Targomics | R | false | false | 31,093 | r | #!/usr/bin/env Rscript
#Sys.setlocale("LC_MESSAGES", 'en_GB.UTF-8')
ATCG_To_1234<-function(sequence_temp) ## OK
{
sequence_temp=gsub("A",as.numeric("1"),sequence_temp)
sequence_temp=gsub("T",as.numeric("2"),sequence_temp)
sequence_temp=gsub("C",as.numeric("3"),sequence_temp)
sequence_temp=gsub("G",as.numer... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "ionosphere")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "class")
lrn = makeLearner(... | /models/openml_ionosphere/classification_class/e8896fb48fc944492461e11630efdd46/code.R | no_license | lukaszbrzozowski/CaseStudies2019S | R | false | false | 731 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "ionosphere")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "class")
lrn = makeLearner(... |
## Deterministic SEIR model
## five periods: Jan 1-9 (index 1-9), Jan 10-22 (index 10-22), Jan 23-Feb 1 (index 23-32), Feb 2-16 (index 33-47), Feb 17- (index 48-60)
#' @param pars a vetor of parameters: c(b12, b3, b3, b5, r12, delta3, delta4, delta5)
#' @param init_settings a list of initia... | /SAPHIRE/R/fun_SEIRpred.R | no_license | GongChao-PKU/TE | R | false | false | 3,599 | r | ## Deterministic SEIR model
## five periods: Jan 1-9 (index 1-9), Jan 10-22 (index 10-22), Jan 23-Feb 1 (index 23-32), Feb 2-16 (index 33-47), Feb 17- (index 48-60)
#' @param pars a vetor of parameters: c(b12, b3, b3, b5, r12, delta3, delta4, delta5)
#' @param init_settings a list of initia... |
#Aim: Correlation Matrix of Mittagstisch Outcomes
#data of interest: data201118 to include only numeric variables
#show cor between complete observations to include missing values
# Outcomes Mittagstisch ---------------------------------------------------
#1. Correlation matrix: Outcomes Mittagstisch
#Create subset ... | /ANALYSIS/CorrelationMatrixMittagstisch.R | no_license | rafael-schuetz/Pareto | R | false | false | 3,768 | r | #Aim: Correlation Matrix of Mittagstisch Outcomes
#data of interest: data201118 to include only numeric variables
#show cor between complete observations to include missing values
# Outcomes Mittagstisch ---------------------------------------------------
#1. Correlation matrix: Outcomes Mittagstisch
#Create subset ... |
library(data.table)
library(rlang)
library(ggplot2)
library(RColorBrewer)
library(here)
library(RplotterPkg)
file_path <- file.path(here::here(), "demo", "data", "spinrates.csv")
spinrates_dt <- data.table::fread(file = file_path)
RplotterPkg::create_heatmap(
df = spinrates_dt,
aes_x = "velocity",
aes_y = "spi... | /demo/heatmap_baseball_spinvelocity.R | permissive | deandevl/RplotterPkg | R | false | false | 742 | r | library(data.table)
library(rlang)
library(ggplot2)
library(RColorBrewer)
library(here)
library(RplotterPkg)
file_path <- file.path(here::here(), "demo", "data", "spinrates.csv")
spinrates_dt <- data.table::fread(file = file_path)
RplotterPkg::create_heatmap(
df = spinrates_dt,
aes_x = "velocity",
aes_y = "spi... |
getNamedLinkOnCode <- function(vnz, code){
if (vnz=="knu"){
switch(code,
'-37616464' = 'knustudents',
'-77525343' = 'shetebe',
'-77126154' = 'shevchenkopost',
'-100567023' = 'shev_it',
'-91257455' = 'knuchan',
'-191562... | /codenames.R | no_license | SHEV-IT/vkgroupsreposts | R | false | false | 3,257 | r | getNamedLinkOnCode <- function(vnz, code){
if (vnz=="knu"){
switch(code,
'-37616464' = 'knustudents',
'-77525343' = 'shetebe',
'-77126154' = 'shevchenkopost',
'-100567023' = 'shev_it',
'-91257455' = 'knuchan',
'-191562... |
# Time Series
#https://rpubs.com/ryankelly/tsa6
library(astsa, quietly=TRUE, warn.conflicts=FALSE)
require(knitr)
library(ggplot2)
kings<-scan('http://robjhyndman.com/tsdldata/misc/kings.dat', skip=3)
kings
(kings = ts(kings))
births <- scan("http://robjhyndman.com/tsdldata/data/nybirths.dat")
(births <- ts(births, ... | /77-TS/24b-timeseries1.R | no_license | DUanalytics/rAnalytics | R | false | false | 2,430 | r | # Time Series
#https://rpubs.com/ryankelly/tsa6
library(astsa, quietly=TRUE, warn.conflicts=FALSE)
require(knitr)
library(ggplot2)
kings<-scan('http://robjhyndman.com/tsdldata/misc/kings.dat', skip=3)
kings
(kings = ts(kings))
births <- scan("http://robjhyndman.com/tsdldata/data/nybirths.dat")
(births <- ts(births, ... |
# A plotting R script produced by the REVIGO server at http://revigo.irb.hr/
# If you found REVIGO useful in your work, please cite the following reference:
# Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology
# terms" PLoS ONE 2011. doi:10.1371/journal.pone.0021800
# ---------------------... | /Analysis/REVIGO/REVIGO-AD_MF.r | no_license | avahoffman/gene-expression | R | false | false | 6,053 | r |
# A plotting R script produced by the REVIGO server at http://revigo.irb.hr/
# If you found REVIGO useful in your work, please cite the following reference:
# Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology
# terms" PLoS ONE 2011. doi:10.1371/journal.pone.0021800
# ---------------------... |
old_ops <- options(lintr.exclude = "#TeSt_NoLiNt",
lintr.exclude_start = "#TeSt_NoLiNt_StArT",
lintr.exclude_end = "#TeSt_NoLiNt_EnD")
a <- tempfile()
b <- tempfile()
c <- tempfile(tmpdir = ".")
file.create(a, b, c)
a <- normalizePath(a)
b <- normalizePath(b)
c <- normalizePath(c)... | /tests/testthat/test-normalize_exclusions.R | permissive | russHyde/lintr | R | false | false | 4,367 | r | old_ops <- options(lintr.exclude = "#TeSt_NoLiNt",
lintr.exclude_start = "#TeSt_NoLiNt_StArT",
lintr.exclude_end = "#TeSt_NoLiNt_EnD")
a <- tempfile()
b <- tempfile()
c <- tempfile(tmpdir = ".")
file.create(a, b, c)
a <- normalizePath(a)
b <- normalizePath(b)
c <- normalizePath(c)... |
# Non-reactive objects/expressions
# Load package libraries
library(ggplot2)
# Define activities
activity <- c("Sleep", "SB", "LPA", "MVPA")
nact <- length(activity)
# Define functions
inGrid <- function(coord, axis, n) {
out <- coord
if (coord[axis] < 1) {
out[axis] <- 1
} else if (coor... | /apps/interactiveplot_heatmap/server.R | no_license | jhhughes256/comp_app | R | false | false | 3,020 | r | # Non-reactive objects/expressions
# Load package libraries
library(ggplot2)
# Define activities
activity <- c("Sleep", "SB", "LPA", "MVPA")
nact <- length(activity)
# Define functions
inGrid <- function(coord, axis, n) {
out <- coord
if (coord[axis] < 1) {
out[axis] <- 1
} else if (coor... |
/eHGDP_G.R | no_license | loicpillard/Master | R | false | false | 3,064 | r | ||
#plotting scripts
rm(list = ls())
#libraries
library(tidyverse)
library(ggthemes)
library(scales)
library(lubridate)
#read in data
data2 <- read_tsv(
#file = "out/OgeltreeResults.txt",
file = "out/PonderResults.txt",
col_names = FALSE,
skip = 2
)
#get header
hhh <- read.table("out/PonderResults.txt",sep="... | /plot_script_pond.R | no_license | jeromemaleski/R-EC-process | R | false | false | 15,220 | r |
#plotting scripts
rm(list = ls())
#libraries
library(tidyverse)
library(ggthemes)
library(scales)
library(lubridate)
#read in data
data2 <- read_tsv(
#file = "out/OgeltreeResults.txt",
file = "out/PonderResults.txt",
col_names = FALSE,
skip = 2
)
#get header
hhh <- read.table("out/PonderResults.txt",sep="... |
#!/usr/bin/Rscript --vanilla
library("cleanr")
file_name <- system.file("source", "R", "utils.R", package = "cleanr")
message("If a file passes all checks, cleanr returns invisibly TRUE")
print(suppressWarnings(check_file(file_name)))
message("Show current options:")
get_cleanr_options(flatten_list = TRUE)
message("... | /demo/cleanr.R | no_license | cran/cleanr | R | false | false | 581 | r | #!/usr/bin/Rscript --vanilla
library("cleanr")
file_name <- system.file("source", "R", "utils.R", package = "cleanr")
message("If a file passes all checks, cleanr returns invisibly TRUE")
print(suppressWarnings(check_file(file_name)))
message("Show current options:")
get_cleanr_options(flatten_list = TRUE)
message("... |
#Goal: Create fractions (Generated by random selection of j (No. of genes in 3,4,...48 gene pathway) strains). If needed, I will have to use supercomputer to get the number
##How to run on ada?
#1.
#Objects or files needed: least10pcc.hclust_pcc_complete, ECK.Pathway_table, functions.R
load("distances_and_hclusts.RDat... | /pwyBottomToTopExperiment/random.result.FromADA_least10pcc/random12.R | no_license | peterwu19881230/Microbial_phenotype_data_mining | R | false | false | 1,683 | r | #Goal: Create fractions (Generated by random selection of j (No. of genes in 3,4,...48 gene pathway) strains). If needed, I will have to use supercomputer to get the number
##How to run on ada?
#1.
#Objects or files needed: least10pcc.hclust_pcc_complete, ECK.Pathway_table, functions.R
load("distances_and_hclusts.RDat... |
\name{epsilon_hypergraph}
\alias{epsilon_hypergraph}
\title{
Epsilon-Ball Hypergraph
}
\description{
Build a hypergraph by constructing hyperedges from balls around a set of points.
}
\usage{
epsilon_hypergraph(x, epsilon, method = "Euclidean", reduce=FALSE,
as.graph=FALSE)
}
\arguments{
\item{x}{
a matrix of poi... | /man/epsilon_hypergraph.Rd | no_license | cran/HyperG | R | false | false | 1,987 | rd | \name{epsilon_hypergraph}
\alias{epsilon_hypergraph}
\title{
Epsilon-Ball Hypergraph
}
\description{
Build a hypergraph by constructing hyperedges from balls around a set of points.
}
\usage{
epsilon_hypergraph(x, epsilon, method = "Euclidean", reduce=FALSE,
as.graph=FALSE)
}
\arguments{
\item{x}{
a matrix of poi... |
Viterbi.mmglmlong1 <- function (object, ...){
subjects <- unique(object$longitude)
N <- length(subjects)
k <- length(object$y)
n <- k/N
states <- rep(NA, k)
for (i in 1:N){
a <- (object$longitude==subjects[i])
if (object$glmfamily$family=="binomial") size <- object$size[a]
... | /thirdParty/HiddenMarkov.mod/R/Viterbi.mmglmlong1.R | no_license | karl616/gNOMePeaks | R | false | false | 650 | r | Viterbi.mmglmlong1 <- function (object, ...){
subjects <- unique(object$longitude)
N <- length(subjects)
k <- length(object$y)
n <- k/N
states <- rep(NA, k)
for (i in 1:N){
a <- (object$longitude==subjects[i])
if (object$glmfamily$family=="binomial") size <- object$size[a]
... |
# Get lyrics
library(genius)
library(tidyverse)
spotify_lyrics <- here::here(
"data",
"spotify_added.rds"
) %>%
read_rds() %>%
genius::add_genius(
artist = artist_result,
title = song_result,
type = "lyrics"
)
write_rds(
spotify_lyrics,
here::here(
"data",
"spotify_lyrics.rds"
... | /data/spotify_lyrics.R | no_license | rachhels/covid_music | R | false | false | 324 | r | # Get lyrics
library(genius)
library(tidyverse)
spotify_lyrics <- here::here(
"data",
"spotify_added.rds"
) %>%
read_rds() %>%
genius::add_genius(
artist = artist_result,
title = song_result,
type = "lyrics"
)
write_rds(
spotify_lyrics,
here::here(
"data",
"spotify_lyrics.rds"
... |
library(magick)
library(magrittr)
newlogo <- image_scale(image_read("./R/criando_animacao/correspondencia_com_efeito.jpg"))
oldlogo <- image_scale(image_read("./R/criando_animacao/correspondencia.jpg"))
image_resize(c(oldlogo, newlogo), '1500x550!') %>%
image_background('white') %>%
image_morph() %>%
image_anima... | /R/criando_animacao/programa.R | no_license | prdm0/prdm0 | R | false | false | 372 | r | library(magick)
library(magrittr)
newlogo <- image_scale(image_read("./R/criando_animacao/correspondencia_com_efeito.jpg"))
oldlogo <- image_scale(image_read("./R/criando_animacao/correspondencia.jpg"))
image_resize(c(oldlogo, newlogo), '1500x550!') %>%
image_background('white') %>%
image_morph() %>%
image_anima... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_167}
\alias{movie_167}
\title{Citizen Kane}
\format{igraph object}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0033467
}
\usage... | /man/movie_167.Rd | permissive | physthoth/networkdata | R | false | true | 651 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_167}
\alias{movie_167}
\title{Citizen Kane}
\format{igraph object}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0033467
}
\usage... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/androidenterprise_objects.R
\name{Permission}
\alias{Permission}
\title{Permission Object}
\usage{
Permission(description = NULL, name = NULL, permissionId = NULL)
}
\arguments{
\item{description}{A longer description of the permissions givin... | /googleandroidenterprisev1.auto/man/Permission.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 1,069 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/androidenterprise_objects.R
\name{Permission}
\alias{Permission}
\title{Permission Object}
\usage{
Permission(description = NULL, name = NULL, permissionId = NULL)
}
\arguments{
\item{description}{A longer description of the permissions givin... |
library( "ape" )
library( "geiger" )
library( "expm" )
library( "nloptr" )
source( "masternegloglikeeps1.R" )
source( "Qmatrixwoodherb2.R" )
source("Pruning2.R")
sim.tree<-read.tree("tree1000taxa76.txt")
sim.chrom<-read.table("chrom1000taxa76.txt", header=FALSE)
last.state=50
x.0<- log(c(0.12, 0.001, 0.25, 0.002,0.0... | /SImulations number of taxa/1000 taxa/optim1000taxa76.R | no_license | roszenil/Bichromdryad | R | false | false | 827 | r | library( "ape" )
library( "geiger" )
library( "expm" )
library( "nloptr" )
source( "masternegloglikeeps1.R" )
source( "Qmatrixwoodherb2.R" )
source("Pruning2.R")
sim.tree<-read.tree("tree1000taxa76.txt")
sim.chrom<-read.table("chrom1000taxa76.txt", header=FALSE)
last.state=50
x.0<- log(c(0.12, 0.001, 0.25, 0.002,0.0... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{rbivNorm}
\alias{rbivNorm}
\title{Simulate dependent categorical variables}
\usage{
rbivNorm(n, mu = 0, var1 = 1, var2 = 1, rho = 0, probs = c(0.25, 0.5, 0.25))
}
\description{
Simulate dependent categorical variables
}
| /man/rbivNorm.Rd | no_license | rmtrane/ATEBounds | R | false | true | 311 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{rbivNorm}
\alias{rbivNorm}
\title{Simulate dependent categorical variables}
\usage{
rbivNorm(n, mu = 0, var1 = 1, var2 = 1, rho = 0, probs = c(0.25, 0.5, 0.25))
}
\description{
Simulate dependent categorical variables
}
|
#' A scale the sum or product of a vector to another value
#'
#' @param input_array Vector of values to be scaled.
#' @param target Desired result for the sum or product of the scaled result.
#' @param method 'sum' to scale the sum of the totals, or 'product'.
#' @param reduce_target Logical. If \code{target} has more ... | /R/ia_scale.R | no_license | ryantimpe/ipfitr | R | false | false | 1,404 | r | #' A scale the sum or product of a vector to another value
#'
#' @param input_array Vector of values to be scaled.
#' @param target Desired result for the sum or product of the scaled result.
#' @param method 'sum' to scale the sum of the totals, or 'product'.
#' @param reduce_target Logical. If \code{target} has more ... |
## The following functions are used to create a special object, that stores a
## matrix and caches its inverse.
## The first function makeCacheMatrix creates a special matrix, which is really
## list containing the function to:
##1. set the value of the matrix
##2. get the value of the matrix
##3. set the value o... | /cachematrix.R | no_license | EmiliaHerz/ProgrammingAssignment2 | R | false | false | 1,382 | r | ## The following functions are used to create a special object, that stores a
## matrix and caches its inverse.
## The first function makeCacheMatrix creates a special matrix, which is really
## list containing the function to:
##1. set the value of the matrix
##2. get the value of the matrix
##3. set the value o... |
function (T, x, order)
{
e <- get("data.env", .GlobalEnv)
e[["f"]][[length(e[["f"]]) + 1]] <- list(T = T, x = x, order = order)
.Call("_Opt5PL_f", T, x, order)
}
| /valgrind_test_dir/f-test.R | no_license | akhikolla/RcppDeepStateTest | R | false | false | 175 | r | function (T, x, order)
{
e <- get("data.env", .GlobalEnv)
e[["f"]][[length(e[["f"]]) + 1]] <- list(T = T, x = x, order = order)
.Call("_Opt5PL_f", T, x, order)
}
|
library(rvest)
library(stringr)
#벅스 연도별 html
html <- read_html('https://music.bugs.co.kr/years')
#각 연도별 link 정보
yurl <- html_nodes(html, xpath='//*[@id="container"]/section/div/ul/li/figure/figcaption/a[1]')%>%
html_attr('href')
#연도별 text
year <- html_nodes(html, xpath='//*[@id="container"]/section/div/ul/li/figure/... | /project_scrap_bugs.R | no_license | gjlee8712/k_pop_analysis_by_period | R | false | false | 4,766 | r | library(rvest)
library(stringr)
#벅스 연도별 html
html <- read_html('https://music.bugs.co.kr/years')
#각 연도별 link 정보
yurl <- html_nodes(html, xpath='//*[@id="container"]/section/div/ul/li/figure/figcaption/a[1]')%>%
html_attr('href')
#연도별 text
year <- html_nodes(html, xpath='//*[@id="container"]/section/div/ul/li/figure/... |
## OpenET_03_EstimateIrrigation+Confidence-gridMET.R
# This script will estimate irrigation at the field and LEMA scales, and confidence in field-scale irrigation status.
# This script uses gridMET precipitation as input.
source(file.path("code", "paths+packages.R"))
# period to calculate/map
yr_start <- 2016
yr_end ... | /code/OpenET_03-EstimateIrrigation+Confidence-gridMET.R | no_license | samzipper/SD-6_MapWaterConservation | R | false | false | 6,965 | r | ## OpenET_03_EstimateIrrigation+Confidence-gridMET.R
# This script will estimate irrigation at the field and LEMA scales, and confidence in field-scale irrigation status.
# This script uses gridMET precipitation as input.
source(file.path("code", "paths+packages.R"))
# period to calculate/map
yr_start <- 2016
yr_end ... |
###
### Set base case parameters
###
#1-3. Unchanged.
#4. p_change_alert
p_change_alert_default<-p_change_alert
#5. p_change_no_alert
p_change_no_alert_default<-p_change_no_alert
#6. qaly_change_clo
qaly_change_clo_default<-qaly_change_clo
#7. qaly_change_war
qaly_change_war_default<-qaly_change_war
#8. cost_change_clo... | /src/precise_value_psa.R | permissive | ndhendrix/precise-value | R | false | false | 7,731 | r | ###
### Set base case parameters
###
#1-3. Unchanged.
#4. p_change_alert
p_change_alert_default<-p_change_alert
#5. p_change_no_alert
p_change_no_alert_default<-p_change_no_alert
#6. qaly_change_clo
qaly_change_clo_default<-qaly_change_clo
#7. qaly_change_war
qaly_change_war_default<-qaly_change_war
#8. cost_change_clo... |
step_subset <- function(parent,
vars = parent$vars,
groups = parent$groups,
i = NULL,
j = NULL,
on = character()
) {
stopifnot(is_step(parent))
stopifnot(is.null(i) || is_... | /R/step-subset.R | no_license | batpigandme/dtplyr | R | false | false | 7,798 | r | step_subset <- function(parent,
vars = parent$vars,
groups = parent$groups,
i = NULL,
j = NULL,
on = character()
) {
stopifnot(is_step(parent))
stopifnot(is.null(i) || is_... |
\name{PID.db}
\docType{data}
\alias{PID.db}
\title{
pathway catalogues from Pathway Interaction Database(PID)
}
\description{
pathway catalogues from Pathway Interaction Database(PID)
}
\usage{
data(PID.db)
}
\details{
The pathway data is parsed from XML format file provided by PID FTP site.
The perl code for parsing p... | /man/PID.db.Rd | no_license | cran/CePa | R | false | false | 2,489 | rd | \name{PID.db}
\docType{data}
\alias{PID.db}
\title{
pathway catalogues from Pathway Interaction Database(PID)
}
\description{
pathway catalogues from Pathway Interaction Database(PID)
}
\usage{
data(PID.db)
}
\details{
The pathway data is parsed from XML format file provided by PID FTP site.
The perl code for parsing p... |
format_county_str <- function(x){
tmp1 <- str_split(x,",")[[1]][1]
return (str_remove(tmp1," County"))
}
library(stringr)
library(dplyr)
##
confirmed <- read.csv("/Users/gcgibson/Downloads/covid_us_county.csv")
confirmed_nm <- confirmed[confirmed$state == "New Mexico",]
num_counties <- length(unique(confirmed_n... | /tmp.R | no_license | gcgibson/navajo_nation_analysis | R | false | false | 6,540 | r |
format_county_str <- function(x){
tmp1 <- str_split(x,",")[[1]][1]
return (str_remove(tmp1," County"))
}
library(stringr)
library(dplyr)
##
confirmed <- read.csv("/Users/gcgibson/Downloads/covid_us_county.csv")
confirmed_nm <- confirmed[confirmed$state == "New Mexico",]
num_counties <- length(unique(confirmed_n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphs_utils.R
\name{type_constr}
\alias{type_constr}
\title{Histogram Type Constructor}
\source{
derived from \pkg{lattice} from Deepayan Sarkar
}
\usage{
type_constr(x, br, type, include.lowest = TRUE, right = TRUE, plot = FALSE)
}
\descrip... | /IFC/man/type_constr.Rd | no_license | akhikolla/InformationHouse | R | false | true | 377 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/graphs_utils.R
\name{type_constr}
\alias{type_constr}
\title{Histogram Type Constructor}
\source{
derived from \pkg{lattice} from Deepayan Sarkar
}
\usage{
type_constr(x, br, type, include.lowest = TRUE, right = TRUE, plot = FALSE)
}
\descrip... |
#' Summary statistics for evaluated crowns
#'
#' \code{summary_statistics} returns a standardized summary of plot evaluations. The mean recall and precision can be calculated either for the entire dataset, or for each of the 22 geographic sites.
#' @param results A data frame of matched predictions and ground truth ret... | /R/summary_statistics.R | no_license | weecology/NeonTreeEvaluation_package | R | false | false | 3,079 | r | #' Summary statistics for evaluated crowns
#'
#' \code{summary_statistics} returns a standardized summary of plot evaluations. The mean recall and precision can be calculated either for the entire dataset, or for each of the 22 geographic sites.
#' @param results A data frame of matched predictions and ground truth ret... |
#loading_libraries
library(tidyverse)
#load_gapminder_dataset
library(gapminder)
View(gapminder)
head(gapminder)
library(tidyr)
data<-gapminder %>%
drop_na()
View(head)
#plotting_viz
library(gganimate)
library(ggplot2)
library(plotly)
p<-ggplot(data=data)+
geom_point(mapping = aes(x=gdpPer... | /gapminder_dataset.R | no_license | abhiijndal/Data_viz-R | R | false | false | 440 | r | #loading_libraries
library(tidyverse)
#load_gapminder_dataset
library(gapminder)
View(gapminder)
head(gapminder)
library(tidyr)
data<-gapminder %>%
drop_na()
View(head)
#plotting_viz
library(gganimate)
library(ggplot2)
library(plotly)
p<-ggplot(data=data)+
geom_point(mapping = aes(x=gdpPer... |
#tests for correctness of output given known input distributions
testthat::test_that("test with normal distribution", {
f <- dnorm
samples <- ars(f, 1000,-Inf, Inf)
p <- ks.test(samples, "pnorm")
testthat::expect_gte(p$p.value, 0.1)
})
testthat::test_that("test with beta(2,2) distribution", {
f <- functi... | /ars/inst/tests/testthat/testArsOutputs.R | no_license | yuanweijie123/adaptive_rejection_sampling_package | R | false | false | 1,628 | r | #tests for correctness of output given known input distributions
testthat::test_that("test with normal distribution", {
f <- dnorm
samples <- ars(f, 1000,-Inf, Inf)
p <- ks.test(samples, "pnorm")
testthat::expect_gte(p$p.value, 0.1)
})
testthat::test_that("test with beta(2,2) distribution", {
f <- functi... |
library(caret) #machine learinign workflow
library(caTools) #sample split is from this package
library(tidyverse) #helps us to write concise code
library(plotly)
library(extrafont)
loadfonts(device = "win")
# Importing the data with read_delim
dataset <- read_delim('data_ret_time_200514.csv',
... | /old/Code for initial model development.R | no_license | M-R-JONES/ionization_efficiency_without_structure | R | false | false | 89,826 | r |
library(caret) #machine learinign workflow
library(caTools) #sample split is from this package
library(tidyverse) #helps us to write concise code
library(plotly)
library(extrafont)
loadfonts(device = "win")
# Importing the data with read_delim
dataset <- read_delim('data_ret_time_200514.csv',
... |
# FSO performance plots
# Moritz Feigl, 2019
#
setwd("FSO_paper")
source("Functions/FSO_functions.R")
transfer_functions <- list(GR4Jx1 = "0.5 + evi*1.5 + exp(bdim)*0.9", # production store
GR4Jx2 = "0", # interaction direct runoff and routing store
GR4... | /Paper code/6_FSO_plots.R | permissive | MoritzFeigl/FSO_paper | R | false | false | 25,323 | r | # FSO performance plots
# Moritz Feigl, 2019
#
setwd("FSO_paper")
source("Functions/FSO_functions.R")
transfer_functions <- list(GR4Jx1 = "0.5 + evi*1.5 + exp(bdim)*0.9", # production store
GR4Jx2 = "0", # interaction direct runoff and routing store
GR4... |
rm(list=ls())
library(tidyverse)
source('H:/ericg/16666LAWA/LAWA2019/scripts/LAWAFunctions.R')
EndYear <- lubridate::isoyear(Sys.Date())-1
startYear15 <- EndYear - 15+1
StartYear10 <- EndYear - 10+1
StartYear5 <- EndYear - 5+1
# ############################################################################... | /WaterQuality/Scripts/DownloadDatafiles.R | no_license | eogoodwin/LAWA2020 | R | false | false | 16,113 | r | rm(list=ls())
library(tidyverse)
source('H:/ericg/16666LAWA/LAWA2019/scripts/LAWAFunctions.R')
EndYear <- lubridate::isoyear(Sys.Date())-1
startYear15 <- EndYear - 15+1
StartYear10 <- EndYear - 10+1
StartYear5 <- EndYear - 5+1
# ############################################################################... |
# Probeset normalization
#
# Qianqian Zhu, 8/2010
#
normalize.ExpressionSet.methods = c(normalize.ExpressionSet.methods, "constant", "vsn", "loess", "group")
normalize.ExpressionSet.constant = function (eset, refindex = 1, FUN = mean, na.rm = TRUE) {
n <- ncol(eset)
if (!(refindex %in% 1:n)) stop("invalid referen... | /organizedScripts/probesetnormalize.R | no_license | andrewthomasjones/PtSpike | R | false | false | 2,214 | r | # Probeset normalization
#
# Qianqian Zhu, 8/2010
#
normalize.ExpressionSet.methods = c(normalize.ExpressionSet.methods, "constant", "vsn", "loess", "group")
normalize.ExpressionSet.constant = function (eset, refindex = 1, FUN = mean, na.rm = TRUE) {
n <- ncol(eset)
if (!(refindex %in% 1:n)) stop("invalid referen... |
\name{choice.optimal.h}
\docType{methods}
\alias{choice.optimal.h}
\title{Choose the optimal smoothing parameter matrix under the
cross-validation criteria}
\description{
This funciton returns the optimal smoothing parameter matrix under the
cross-validation criteria for Nadaraya-Watson estimator. To minimize
t... | /man/choice.optimal.h.Rd | no_license | syou6162/nw | R | false | false | 508 | rd | \name{choice.optimal.h}
\docType{methods}
\alias{choice.optimal.h}
\title{Choose the optimal smoothing parameter matrix under the
cross-validation criteria}
\description{
This funciton returns the optimal smoothing parameter matrix under the
cross-validation criteria for Nadaraya-Watson estimator. To minimize
t... |
library(ggplot2)
library(reshape2)
x = seq(0,10)
plot(x,x)
dat = data.frame(sqftArea = x, sqftAreaSquared = x^2, housePrice = 3*x^2 + 4*x)# squaredOutput = -x^2, squaredOutput2 = 3*x^2) # outputSquared = 4+13*x^2, outputCube = x^3, inputSq = x^2
dat = melt(dat,id.vars = 'input', variable.name = c('output'),value... | /RegressionIntroduction/plotLines.R | no_license | SyedRaza/DataScienceWorkshops | R | false | false | 589 | r | library(ggplot2)
library(reshape2)
x = seq(0,10)
plot(x,x)
dat = data.frame(sqftArea = x, sqftAreaSquared = x^2, housePrice = 3*x^2 + 4*x)# squaredOutput = -x^2, squaredOutput2 = 3*x^2) # outputSquared = 4+13*x^2, outputCube = x^3, inputSq = x^2
dat = melt(dat,id.vars = 'input', variable.name = c('output'),value... |
#Scatterplot of % of women on contraceptives VS
## of abortion clincs grouped by region
#Loading Libraries
library(dplyr)
library(ggplot2)
library(gapminder)
library(plotly)
#Reading CSV's
Resources_csv <- read.csv('guttmacher_abortion_data.csv',
stringsAsFactors = FALSE)
Region_csv <- r... | /scripts/Char_Three.R | permissive | info-201a-sp20/final-project-achenn98 | R | false | false | 3,229 | r | #Scatterplot of % of women on contraceptives VS
## of abortion clincs grouped by region
#Loading Libraries
library(dplyr)
library(ggplot2)
library(gapminder)
library(plotly)
#Reading CSV's
Resources_csv <- read.csv('guttmacher_abortion_data.csv',
stringsAsFactors = FALSE)
Region_csv <- r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/algorithms.R
\name{predict.ssr}
\alias{predict.ssr}
\title{Predictions from a fitted ssr object}
\usage{
\method{predict}{ssr}(object, newdata, ...)
}
\arguments{
\item{object}{fitted object of class ssr.}
\item{newdata}{data fram... | /man/predict.ssr.Rd | no_license | cran/ssr | R | false | true | 1,421 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/algorithms.R
\name{predict.ssr}
\alias{predict.ssr}
\title{Predictions from a fitted ssr object}
\usage{
\method{predict}{ssr}(object, newdata, ...)
}
\arguments{
\item{object}{fitted object of class ssr.}
\item{newdata}{data fram... |
# Ian Castillo Rosales
# Getting and Cleaning Data
# 20072014
# Pregunta 1
library(httr)
require(httpuv)
require(jsonlite)
# 1. Find OAuth settings for github:
# http://developer.github.com/v3/oauth/
oauth_endpoints("github")
# 2. Register an application at https://github.com/settings/applications
# Insert you... | /Getting and Cleaning Data/quizz2.R | no_license | donelianc/coursera-data-science | R | false | false | 1,304 | r | # Ian Castillo Rosales
# Getting and Cleaning Data
# 20072014
# Pregunta 1
library(httr)
require(httpuv)
require(jsonlite)
# 1. Find OAuth settings for github:
# http://developer.github.com/v3/oauth/
oauth_endpoints("github")
# 2. Register an application at https://github.com/settings/applications
# Insert you... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quest_functions.R
\name{recodes}
\alias{recodes}
\title{Recode Data}
\usage{
recodes(data, vrb.nm, recodes, suffix = "_r", as.factor, as.numeric = TRUE)
}
\arguments{
\item{data}{data.frame of data.}
\item{vrb.nm}{character vector of colname... | /man/recodes.Rd | no_license | cran/quest | R | false | true | 2,774 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quest_functions.R
\name{recodes}
\alias{recodes}
\title{Recode Data}
\usage{
recodes(data, vrb.nm, recodes, suffix = "_r", as.factor, as.numeric = TRUE)
}
\arguments{
\item{data}{data.frame of data.}
\item{vrb.nm}{character vector of colname... |
setwd("D:/Study/Data Science/The Analytics Edge-edX/Assignment 4_Trees")
getwd()
gerber = read.csv("gerber.csv")
str(gerber)
# proportion of people voted in the election
table(gerber$voting) # - 0.316
# Subsetting the data
CvD = subset(gerber, civicduty == 1)
HwT = subset(gerber, hawthorne == 1)
NeB = subs... | /Assignment_4_Trees/VotingBehaviour.R | no_license | abhishekporwal1991/AnalyticsEdge_Assignments | R | false | false | 2,192 | r | setwd("D:/Study/Data Science/The Analytics Edge-edX/Assignment 4_Trees")
getwd()
gerber = read.csv("gerber.csv")
str(gerber)
# proportion of people voted in the election
table(gerber$voting) # - 0.316
# Subsetting the data
CvD = subset(gerber, civicduty == 1)
HwT = subset(gerber, hawthorne == 1)
NeB = subs... |
#' Combinatrial model approximation of the number of motif hits
#'
#' This function approxmiates the distribution of the number of motif hits.
#' To this end, it sums over all combinations of obtaining k hits
#' in a random sequence of a given length using an efficient
#' dynamic programming algorithm.
#'
#' This fun... | /R/combinatorial_wrapper.R | no_license | IlyaFinkelshteyn/motifcounter | R | false | false | 3,758 | r | #' Combinatrial model approximation of the number of motif hits
#'
#' This function approxmiates the distribution of the number of motif hits.
#' To this end, it sums over all combinations of obtaining k hits
#' in a random sequence of a given length using an efficient
#' dynamic programming algorithm.
#'
#' This fun... |
% Auto-generated: do not edit by hand
\name{dccInput}
\alias{dccInput}
\title{Input component}
\description{
A basic HTML input control for entering text, numbers, or passwords. Note that checkbox and radio types are supported through the Checklist and RadioItems component. Dates, times, and file uploads are also s... | /man/dccInput.Rd | permissive | ChrisJobs046/dash-core-components | R | false | false | 11,351 | rd | % Auto-generated: do not edit by hand
\name{dccInput}
\alias{dccInput}
\title{Input component}
\description{
A basic HTML input control for entering text, numbers, or passwords. Note that checkbox and radio types are supported through the Checklist and RadioItems component. Dates, times, and file uploads are also s... |
##
## Programming Assignment 2: Lexical Scoping
##
## Given a matrix, calculate its inverse. If the inverse was previously calcu-
## lated and the original matrix has not changed, return the cached inverse
## matrix.
##
## The first function constructs an object to store the original matrix and its
## inverse.
##
## ... | /cachematrix.R | no_license | tjsantamaria/ProgrammingAssignment2 | R | false | false | 1,959 | r | ##
## Programming Assignment 2: Lexical Scoping
##
## Given a matrix, calculate its inverse. If the inverse was previously calcu-
## lated and the original matrix has not changed, return the cached inverse
## matrix.
##
## The first function constructs an object to store the original matrix and its
## inverse.
##
## ... |
#' Get surrounding sequence context
#' uses the Bioconductor BSGenome framework to find
#' @param VCF a VCF tbl with columns containing at least "chr", "start.position", and "end.position"
#' @param expand The numberof upstream and downstream bases to get
#' @param genomeseq The Bioconductor genome annotation package ... | /R/expandseq.R | no_license | alenzhao/kat | R | false | false | 1,627 | r | #' Get surrounding sequence context
#' uses the Bioconductor BSGenome framework to find
#' @param VCF a VCF tbl with columns containing at least "chr", "start.position", and "end.position"
#' @param expand The numberof upstream and downstream bases to get
#' @param genomeseq The Bioconductor genome annotation package ... |
\name{indentPrint}
\alias{indentPrint}
\title{Print an Object with Indentation}
\description{
Allows the printed representation of an R object to be indented by
a specified number of spaces.
}
\usage{
indentPrint(object, indent=4, ...)
}
\arguments{
\item{object}{An R object}
\item{indent}{The number of spaces ... | /man/indentPrint.Rd | no_license | duncantl/CGIwithR | R | false | false | 553 | rd | \name{indentPrint}
\alias{indentPrint}
\title{Print an Object with Indentation}
\description{
Allows the printed representation of an R object to be indented by
a specified number of spaces.
}
\usage{
indentPrint(object, indent=4, ...)
}
\arguments{
\item{object}{An R object}
\item{indent}{The number of spaces ... |
#install.packages('adespatial')
#install.packages('readxl')
library(adespatial)
library(readxl)
#load data
setwd('/home/jonas/Documents/Masterthesis/manuscript/data/')
envdata <- read_excel('Cleaned SNP datasets.xlsx', sheet = 1)
alc.xy <- envdata[,6:5]
envdata$PopID
rownames(alc.xy) <- envdata$PopID
gen.xy <- read.de... | /dbMEM.R | no_license | JWarson/Masterthesis | R | false | false | 4,154 | r | #install.packages('adespatial')
#install.packages('readxl')
library(adespatial)
library(readxl)
#load data
setwd('/home/jonas/Documents/Masterthesis/manuscript/data/')
envdata <- read_excel('Cleaned SNP datasets.xlsx', sheet = 1)
alc.xy <- envdata[,6:5]
envdata$PopID
rownames(alc.xy) <- envdata$PopID
gen.xy <- read.de... |
library(datasets)
View(mtcars)
cars=mtcars
model <- lm(mpg~disp+wt,data =cars)
summary(model)
model$coefficients
x <- matrix(rep(1,32), nrow = 32, ncol = 3)
x[,2] <- mtcars$disp
x[,3] <- mtcars$wt
B1 <- model$coefficients[2]
B2 <- model$coefficients[3]
g <- solve(t(x)%*%x)
e <- c(resid(model))
s <- ... | /tr 3.R | no_license | yotambraun/regression | R | false | false | 749 | r |
library(datasets)
View(mtcars)
cars=mtcars
model <- lm(mpg~disp+wt,data =cars)
summary(model)
model$coefficients
x <- matrix(rep(1,32), nrow = 32, ncol = 3)
x[,2] <- mtcars$disp
x[,3] <- mtcars$wt
B1 <- model$coefficients[2]
B2 <- model$coefficients[3]
g <- solve(t(x)%*%x)
e <- c(resid(model))
s <- ... |
## libraries -------------------------------------------------------------------
library(nlme) # lmes
library(doBy) # for summaryBy - data mongering
library(dplyr) # piping operators etc, the select function
library(plyr) # join
library(lmerTest) # for the step function
library(sjPlot) #to visualize the lmes
library(g... | /R/old/for_dave_lmms.R | no_license | admahood/dissertation | R | false | false | 44,672 | r | ## libraries -------------------------------------------------------------------
library(nlme) # lmes
library(doBy) # for summaryBy - data mongering
library(dplyr) # piping operators etc, the select function
library(plyr) # join
library(lmerTest) # for the step function
library(sjPlot) #to visualize the lmes
library(g... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\docType{class}
\name{Token-class}
\alias{Token}
\alias{Token-class}
\alias{Token1.0}
\alias{Token2.0}
\alias{TokenServiceAccount}
\title{OAuth token objects.}
\format{An R6 class object.}
\usage{
Token
Token1.0
Token2.0
TokenServiceAccount
}
\description{
These o... | /man/Token-class.Rd | no_license | ginaliyi/httr | R | false | false | 1,600 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\docType{class}
\name{Token-class}
\alias{Token}
\alias{Token-class}
\alias{Token1.0}
\alias{Token2.0}
\alias{TokenServiceAccount}
\title{OAuth token objects.}
\format{An R6 class object.}
\usage{
Token
Token1.0
Token2.0
TokenServiceAccount
}
\description{
These o... |
# Download and unzip to ./data/UCI HAR Dataset/
# Read data description
# 1 - Merges the training and the test sets to create one data set
## Loading data sets
train <- read.table("./UCI HAR Dataset/train/X_train.txt")
str(train)
test <- read.table("./UCI HAR Dataset/test/X_test.txt")
## Add into one big set
datas... | /run_analysis.R | no_license | SachinSShinde/Getting-and-Cleaning-Data | R | false | false | 3,912 | r | # Download and unzip to ./data/UCI HAR Dataset/
# Read data description
# 1 - Merges the training and the test sets to create one data set
## Loading data sets
train <- read.table("./UCI HAR Dataset/train/X_train.txt")
str(train)
test <- read.table("./UCI HAR Dataset/test/X_test.txt")
## Add into one big set
datas... |
#Manual
set.seed(45)
n1=15
Ch2_1 <- rchisq(100000,n1)
mean(Ch2_1)
var(Ch2_1)
n2=10
Ch2_2 <- rchisq(100000,n2)
mean(Ch2_2)
var(Ch2_2)
F1 <- (Ch2_1/n1) / (Ch2_2/n2)
mean(F1)
print(n2/(n2-2))
var(F1)
print(2*(n2^2)*(n2+n1-2)/(n1*((n2-2)^2)*(n2-4)) )
#-----------------------------------
C2_R <- rf(100000,15,10)
mean... | /Extra/F.R | no_license | nima14/TA_Codes | R | false | false | 686 | r | #Manual
set.seed(45)
n1=15
Ch2_1 <- rchisq(100000,n1)
mean(Ch2_1)
var(Ch2_1)
n2=10
Ch2_2 <- rchisq(100000,n2)
mean(Ch2_2)
var(Ch2_2)
F1 <- (Ch2_1/n1) / (Ch2_2/n2)
mean(F1)
print(n2/(n2-2))
var(F1)
print(2*(n2^2)*(n2+n1-2)/(n1*((n2-2)^2)*(n2-4)) )
#-----------------------------------
C2_R <- rf(100000,15,10)
mean... |
# Load libraries
library(dplyr)
# Function to calculate the tax on capital gains based on capital gains, income,
# duration of investment and whether or not the filing is joint
# Income brackets and tax calculations based off of the following resources:
# https://www.irs.gov/pub/irs-drop/rp-18-57.pdf
# https://www.ir... | /calculate_taxes.R | no_license | babayefarzan/opportunity_zones-1 | R | false | false | 5,784 | r | # Load libraries
library(dplyr)
# Function to calculate the tax on capital gains based on capital gains, income,
# duration of investment and whether or not the filing is joint
# Income brackets and tax calculations based off of the following resources:
# https://www.irs.gov/pub/irs-drop/rp-18-57.pdf
# https://www.ir... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distributions.R
\name{tfd_negative_binomial}
\alias{tfd_negative_binomial}
\title{NegativeBinomial distribution.}
\usage{
tfd_negative_binomial(total_count, logits = NULL, probs = NULL,
validate_args = FALSE, allow_nan_stats = TRUE,
name ... | /man/tfd_negative_binomial.Rd | permissive | kevinykuo/tfprobability-1 | R | false | true | 5,287 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distributions.R
\name{tfd_negative_binomial}
\alias{tfd_negative_binomial}
\title{NegativeBinomial distribution.}
\usage{
tfd_negative_binomial(total_count, logits = NULL, probs = NULL,
validate_args = FALSE, allow_nan_stats = TRUE,
name ... |
library(magic)
### Name: hudson
### Title: Pandiagonal magic squares due to Hudson
### Aliases: hudson
### Keywords: array
### ** Examples
hudson(n=11)
magicplot(hudson(n=11))
is.associative(hudson(n=13))
hudson(a=(2*1:13)%%13 , b=(8*1:13)%%13)
all(replicate(10,is.magic(hudson(a=sample(13),b=sample(13)))))
| /data/genthat_extracted_code/magic/examples/hudson.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 316 | r | library(magic)
### Name: hudson
### Title: Pandiagonal magic squares due to Hudson
### Aliases: hudson
### Keywords: array
### ** Examples
hudson(n=11)
magicplot(hudson(n=11))
is.associative(hudson(n=13))
hudson(a=(2*1:13)%%13 , b=(8*1:13)%%13)
all(replicate(10,is.magic(hudson(a=sample(13),b=sample(13)))))
|
library("rpart")
library("rpart.plot")
dados <- read.table("Concrete_Slump_adaptado.csv",header = TRUE, sep = ",")
exemplos_separados <- c(sample(1:33,8), sample(34:66,8), sample(66:100, 9))
dados_teste <- dados[exemplos_separados,]
dados_treinamento <- dados[-exemplos_separados, ]
arvore_regressao <- rpart(FL... | /ArvoreRegressao.R | no_license | FranksonTeotonho/T3_IA_2017 | R | false | false | 1,097 | r | library("rpart")
library("rpart.plot")
dados <- read.table("Concrete_Slump_adaptado.csv",header = TRUE, sep = ",")
exemplos_separados <- c(sample(1:33,8), sample(34:66,8), sample(66:100, 9))
dados_teste <- dados[exemplos_separados,]
dados_treinamento <- dados[-exemplos_separados, ]
arvore_regressao <- rpart(FL... |
# Exercise 2: writing and executing functions (II)
# Write a function `CompareLength` that takes in 2 vectors, and returns the sentence:
# "The difference in lengths is N"
CompareLength <- function(a, b) {
return("The difference in lengths is " a - b)
}
# Pass two vectors of different length to your `CompareLength` ... | /exercise-2/exercise.R | permissive | Karlpa/m6-functions | R | false | false | 685 | r | # Exercise 2: writing and executing functions (II)
# Write a function `CompareLength` that takes in 2 vectors, and returns the sentence:
# "The difference in lengths is N"
CompareLength <- function(a, b) {
return("The difference in lengths is " a - b)
}
# Pass two vectors of different length to your `CompareLength` ... |
############################################
# Data Professor #
# http://youtube.com/dataprofessor #
# http://github.com/dataprofessor #
# http://facebook.com/dataprofessor #
# https://www.instagram.com/data.professor #
############################################
# Im... | /ui.R | no_license | Sambit78/attrition-master | R | false | false | 2,005 | r | ############################################
# Data Professor #
# http://youtube.com/dataprofessor #
# http://github.com/dataprofessor #
# http://facebook.com/dataprofessor #
# https://www.instagram.com/data.professor #
############################################
# Im... |
# 3,3 histograms of high low average temps/precipitation amounts
# highlight the frequency of high, low average temperatures
library(forecast)
library(ncdf4)
library(gridExtra)
library(grid)
library(scales)
library(grid)
library(gtable)
read.wcr = function(fname){
fullname = strsplit(fname, "/")
dataset_str = fulln... | /met_validation/mds_extreme_hist_overlay.R | no_license | jsimkins2/metdownscaling | R | false | false | 7,896 | r | # 3,3 histograms of high low average temps/precipitation amounts
# highlight the frequency of high, low average temperatures
library(forecast)
library(ncdf4)
library(gridExtra)
library(grid)
library(scales)
library(grid)
library(gtable)
read.wcr = function(fname){
fullname = strsplit(fname, "/")
dataset_str = fulln... |
# extend subset method
subset.variogram <- function(x,...)
{
info <- attr(x,"info")
x <- data.frame(x)
x <- subset.data.frame(x,...)
x < - droplevels(x) # why is this here?
new.variogram(x,info=info)
}
`[.variogram` <- function(x,...)
{
info <- attr(x,"info")
x <- data.frame(x)
x <- "[.data.frame"(x,.... | /R/variogram.R | no_license | cran/ctmm | R | false | false | 19,472 | r | # extend subset method
subset.variogram <- function(x,...)
{
info <- attr(x,"info")
x <- data.frame(x)
x <- subset.data.frame(x,...)
x < - droplevels(x) # why is this here?
new.variogram(x,info=info)
}
`[.variogram` <- function(x,...)
{
info <- attr(x,"info")
x <- data.frame(x)
x <- "[.data.frame"(x,.... |
#' Get assessment data
#' Expects assessment.dbname, assessment.host, assessment.user, assessment.password to be set for access to the assessment database
#' @export
#'
get_assessmemt <- function(geography=NA){
if (nchar(getOption("assessment.password"))>1) {
conn = RPostgreSQL::dbConnect(RPostgreSQL::PostgreSQL(... | /R/assessment.R | no_license | mountainMath/assessment | R | false | false | 5,674 | r | #' Get assessment data
#' Expects assessment.dbname, assessment.host, assessment.user, assessment.password to be set for access to the assessment database
#' @export
#'
get_assessmemt <- function(geography=NA){
if (nchar(getOption("assessment.password"))>1) {
conn = RPostgreSQL::dbConnect(RPostgreSQL::PostgreSQL(... |
# source('/mnt/raid/illumina/geo/progs/RTrans/RTrans_base/RTrans.methods 1.51.R')
setClass("RTransParameters",
representation("list")
)
setClass("RTransStartupData",
representation("list")
)
RTransAnalysisData.prototype = vector(mode="list")
RTransAnalysisData.prototype$GLM.analysis.performed = FALS... | /RTrans_main_scripts/RTrans.methods 1.55.R | no_license | gskrasnov/RTrans | R | false | false | 907,538 | r | # source('/mnt/raid/illumina/geo/progs/RTrans/RTrans_base/RTrans.methods 1.51.R')
setClass("RTransParameters",
representation("list")
)
setClass("RTransStartupData",
representation("list")
)
RTransAnalysisData.prototype = vector(mode="list")
RTransAnalysisData.prototype$GLM.analysis.performed = FALS... |
#' Suitable for regression:
#' This function creates a plot for Cook's distance values
#' @param df_original # original dataframe
#' @param y # name of dependent variable
#' @param predictors # name of predictors, for example c("expert", "conflict)
#' @keywords Cooks distance, Regression
#' @importFrom stats lm runif r... | /R/plotRegression_CooksDistance.R | no_license | rjbderooij/blindData_Git | R | false | false | 2,603 | r | #' Suitable for regression:
#' This function creates a plot for Cook's distance values
#' @param df_original # original dataframe
#' @param y # name of dependent variable
#' @param predictors # name of predictors, for example c("expert", "conflict)
#' @keywords Cooks distance, Regression
#' @importFrom stats lm runif r... |
library(icesVocab)
### Name: findCode
### Title: Find a Key
### Aliases: findCode
### ** Examples
## Not run:
##D findCode("aphia", "cod")
##D
##D # Multiple matches
##D findCode("aphia", c("cod", "haddock", "saithe"), full = TRUE)
##D
##D findCodeType("ship", full = TRUE)
##D findCode("ship", "clupea", full = T... | /data/genthat_extracted_code/icesVocab/examples/findCode.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 345 | r | library(icesVocab)
### Name: findCode
### Title: Find a Key
### Aliases: findCode
### ** Examples
## Not run:
##D findCode("aphia", "cod")
##D
##D # Multiple matches
##D findCode("aphia", c("cod", "haddock", "saithe"), full = TRUE)
##D
##D findCodeType("ship", full = TRUE)
##D findCode("ship", "clupea", full = T... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/costexplorer_operations.R
\name{costexplorer_get_savings_plans_utilization_details}
\alias{costexplorer_get_savings_plans_utilization_details}
\title{Retrieves attribute data along with aggregate utilization and savings
data for a given time ... | /paws/man/costexplorer_get_savings_plans_utilization_details.Rd | permissive | johnnytommy/paws | R | false | true | 3,240 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/costexplorer_operations.R
\name{costexplorer_get_savings_plans_utilization_details}
\alias{costexplorer_get_savings_plans_utilization_details}
\title{Retrieves attribute data along with aggregate utilization and savings
data for a given time ... |
############################### Utilities ################################
# Read data coming from the app
# bbb <- seq(as.Date("2017/02/06"), by = "day",
# length.out = as.Date("2017/05/15") - as.Date("2017/02/06"))
######### LIBRARY OF QUESTIONS : libeducaper #######
# 1 clarity libeducaper[[1]][[... | /educaper_utilities.R | no_license | sayed2/educapeR | R | false | false | 24,365 | r | ############################### Utilities ################################
# Read data coming from the app
# bbb <- seq(as.Date("2017/02/06"), by = "day",
# length.out = as.Date("2017/05/15") - as.Date("2017/02/06"))
######### LIBRARY OF QUESTIONS : libeducaper #######
# 1 clarity libeducaper[[1]][[... |
# A poor man's oo system.
#' @export
print.jeroen <- function(x, title = paste0("<", class(x)[1], ">"), ...){
ns <- ls(x)
cat(title, "\n")
lapply(ns, function(fn){
cat(format_function(x[[fn]], fn), sep = "\n")
})
invisible()
}
#' @export
`$.jeroen` <- function(x, y){
if(!exists(y, x, inherits = FALSE)... | /R/jeroen.R | permissive | ropensci/jenkins | R | false | false | 1,007 | r | # A poor man's oo system.
#' @export
print.jeroen <- function(x, title = paste0("<", class(x)[1], ">"), ...){
ns <- ls(x)
cat(title, "\n")
lapply(ns, function(fn){
cat(format_function(x[[fn]], fn), sep = "\n")
})
invisible()
}
#' @export
`$.jeroen` <- function(x, y){
if(!exists(y, x, inherits = FALSE)... |
library(tidyverse)
members <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-09-22/members.csv')
expeditions <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-09-22/expeditions.csv')
peaks <- readr::read_c... | /2020/week 39/week 39 (everest).r | no_license | baltti/TidyTuesday | R | false | false | 4,312 | r |
library(tidyverse)
members <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-09-22/members.csv')
expeditions <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-09-22/expeditions.csv')
peaks <- readr::read_c... |
original <- read.table('../original/original_genes.txt', header=T, stringsAsFactors=F)
oGenes <- original[, 1]
oF <- oGenes[original[, 2] > 0]
oE <- oGenes[original[, 3] > 0]
oT <- oGenes[original[, 4] > 0]
setwd('../0.05')
mF <- scan("g_FUS.txt", what="chracters")
mE <- scan("g_EWSR1.txt", what="chracters")
mT <- sca... | /scripts/CLIP/FET_compare.R | no_license | mavishou/project | R | false | false | 2,426 | r | original <- read.table('../original/original_genes.txt', header=T, stringsAsFactors=F)
oGenes <- original[, 1]
oF <- oGenes[original[, 2] > 0]
oE <- oGenes[original[, 3] > 0]
oT <- oGenes[original[, 4] > 0]
setwd('../0.05')
mF <- scan("g_FUS.txt", what="chracters")
mE <- scan("g_EWSR1.txt", what="chracters")
mT <- sca... |
library(ggplot2)
library(dplyr)
library(tidyr)
source('utilities/pc_sa.R', chdir = T)
load("output/src_future.Rda")
ss <- correct_bias(src_future@result[[7]])
ss <- ss %>% mutate(var = ordered(var, levels = c('ideo','risk.tak','n.traders',
'n.edg', 'seg', 'true.mode... | /timeseries/jg_plot_sa.R | no_license | JohnNay/predMarket | R | false | false | 1,123 | r | library(ggplot2)
library(dplyr)
library(tidyr)
source('utilities/pc_sa.R', chdir = T)
load("output/src_future.Rda")
ss <- correct_bias(src_future@result[[7]])
ss <- ss %>% mutate(var = ordered(var, levels = c('ideo','risk.tak','n.traders',
'n.edg', 'seg', 'true.mode... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/challenge_results.R
\docType{data}
\name{challenge_results}
\alias{challenge_results}
\title{Each baker's signature, technical, and showstopper challenges, plus their fate, by episode}
\format{A data frame with 886 rows representing individua... | /man/challenge_results.Rd | permissive | isteves/bakeoff | R | false | true | 1,820 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/challenge_results.R
\docType{data}
\name{challenge_results}
\alias{challenge_results}
\title{Each baker's signature, technical, and showstopper challenges, plus their fate, by episode}
\format{A data frame with 886 rows representing individua... |
#######################################################################################################*
# CORE-TRANSIENT FUNCTIONS *
#######################################################################################################*
# Thi... | /scripts/R-scripts/core-transient_functions.R | no_license | ssnell6/core-transient | R | false | false | 42,779 | r | #######################################################################################################*
# CORE-TRANSIENT FUNCTIONS *
#######################################################################################################*
# Thi... |
evaluacion=function(XE,thetaE,yE,muEval,sdEval){
source(file="C:/Master/Logistic Regression/LR_R/prediccion.R")
pE<-prediccion(XE,thetaE,muEval,sdEval)
mediaE<-mean(pE==yE)
return(round(mediaE*100,digits = 2))
} | /diverse/LR/evaluacion.R | no_license | LafArt/R-util-functions | R | false | false | 219 | r | evaluacion=function(XE,thetaE,yE,muEval,sdEval){
source(file="C:/Master/Logistic Regression/LR_R/prediccion.R")
pE<-prediccion(XE,thetaE,muEval,sdEval)
mediaE<-mean(pE==yE)
return(round(mediaE*100,digits = 2))
} |
##The below function gets a Matrix input, sets and gets the value of it and
## sets and gets the Inverse value of it. The matrix object is able to cache
## its own object.
##taking a Matrix as input
makeCacheMatrix <- function(x = matrix()) {
invrs <- NULL
##setting the Matrix value
set <- function(y) {
... | /cachematrix.R | no_license | Jules22/Coursera | R | false | false | 1,569 | r | ##The below function gets a Matrix input, sets and gets the value of it and
## sets and gets the Inverse value of it. The matrix object is able to cache
## its own object.
##taking a Matrix as input
makeCacheMatrix <- function(x = matrix()) {
invrs <- NULL
##setting the Matrix value
set <- function(y) {
... |
#' Perform an iterative match by tier
#'
#' Constructs a tier_match by running \code{merge_plus} with different parameters sequentially
#' on the same data. Allows for sequential removal of observations after each tier.
#'
#' See the tier match vignette to get a clear understanding of the tier_match syntax.
#'
#' @para... | /R/tier_match.R | permissive | ER-Research/fedmatch | R | false | false | 12,594 | r | #' Perform an iterative match by tier
#'
#' Constructs a tier_match by running \code{merge_plus} with different parameters sequentially
#' on the same data. Allows for sequential removal of observations after each tier.
#'
#' See the tier match vignette to get a clear understanding of the tier_match syntax.
#'
#' @para... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.