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 |
|---|---|---|---|---|---|---|---|---|---|
# path utilities that CAN call the Drive API ----
root_folder <- function() {
# inlining env_cache() logic, so I don't need bleeding edge rlang
if (!env_has(.googledrive, "root_folder")) {
env_poke(.googledrive, "root_folder", drive_get(id = "root"))
}
env_get(.googledrive, "root_folder")
}
root_id <- funct... | /R/utils-paths.R | permissive | stjordanis/googledrive | R | false | false | 5,117 | r | # path utilities that CAN call the Drive API ----
root_folder <- function() {
# inlining env_cache() logic, so I don't need bleeding edge rlang
if (!env_has(.googledrive, "root_folder")) {
env_poke(.googledrive, "root_folder", drive_get(id = "root"))
}
env_get(.googledrive, "root_folder")
}
root_id <- funct... |
test_that("absolute_angle works", {
testthat::expect_equal(absolute_angle(NA, 10), NA)
testthat::expect_equal(absolute_angle(10, NA), NA)
testthat::expect_equal(absolute_angle(0, 20), 20)
testthat::expect_equal(absolute_angle(20, 0), -20)
testthat::expect_equal(absolute_angle(10, 0), -10)
testthat::expect_e... | /tests/testthat/test-absolute_angle.R | no_license | dbca-wa/wastdr | R | false | false | 502 | r | test_that("absolute_angle works", {
testthat::expect_equal(absolute_angle(NA, 10), NA)
testthat::expect_equal(absolute_angle(10, NA), NA)
testthat::expect_equal(absolute_angle(0, 20), 20)
testthat::expect_equal(absolute_angle(20, 0), -20)
testthat::expect_equal(absolute_angle(10, 0), -10)
testthat::expect_e... |
# This program illustrates how you can use conditional distribution
# for different words to generate documents (a collection of texts)
# This example is from an online discussion
# This only thing we need to do is to replace the states with our words
# and the transition with ours.
# https://stackoverflow.com/questi... | /lecture/example/mv03_cond_dist_ngram_markov.R | no_license | bfillmoreou/man2-2020 | R | false | false | 1,095 | r | # This program illustrates how you can use conditional distribution
# for different words to generate documents (a collection of texts)
# This example is from an online discussion
# This only thing we need to do is to replace the states with our words
# and the transition with ours.
# https://stackoverflow.com/questi... |
library(ape)
testtree <- read.tree("2947_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="2947_1_unrooted.txt") | /codeml_files/newick_trees_processed/2947_1/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("2947_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="2947_1_unrooted.txt") |
library(psych)
### Name: pairs.panels
### Title: SPLOM, histograms and correlations for a data matrix
### Aliases: pairs.panels panel.cor panel.cor.scale panel.hist panel.lm
### panel.lm.ellipse panel.hist.density panel.ellipse panel.smoother
### Keywords: multivariate hplot
### ** Examples
pairs.panels(attitude... | /data/genthat_extracted_code/psych/examples/pairs.panels.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,411 | r | library(psych)
### Name: pairs.panels
### Title: SPLOM, histograms and correlations for a data matrix
### Aliases: pairs.panels panel.cor panel.cor.scale panel.hist panel.lm
### panel.lm.ellipse panel.hist.density panel.ellipse panel.smoother
### Keywords: multivariate hplot
### ** Examples
pairs.panels(attitude... |
\name{blastReportDB.generator}
\alias{blastReportDB.generator}
\title{Generate a blast reporter}
\usage{
blastReportDB.generator(db = "16SMicrobial", max_hits = 25, evalue = 1e-6,
perc_identity = 90, n.threads = floor(detectCores()*0.25))
}
\arguments{
\item{db}{}
\item{max_hits}{}
\item{evalue}{}
\item{perc... | /man/blastReportDB.generator.Rd | no_license | psikon/metaR | R | false | false | 540 | rd | \name{blastReportDB.generator}
\alias{blastReportDB.generator}
\title{Generate a blast reporter}
\usage{
blastReportDB.generator(db = "16SMicrobial", max_hits = 25, evalue = 1e-6,
perc_identity = 90, n.threads = floor(detectCores()*0.25))
}
\arguments{
\item{db}{}
\item{max_hits}{}
\item{evalue}{}
\item{perc... |
set.seed(1123)
marks=ceiling(runif(11,5,10))
marks
sort(marks)
order(marks) # indices
marks[order(marks)] # similar to sort
rank(marks)
sort(rank(marks))
sort(marks, decreasing = T)
rev(sort(marks))
order(marks, decreasing = T)
marks2 = marks
marks2[5 ] =NA # check with NA value: display position
marks2
order(marks2)
o... | /Data Structure/Sort_Rank.R | no_license | ShrutiSi/RIA | R | false | false | 1,457 | r | set.seed(1123)
marks=ceiling(runif(11,5,10))
marks
sort(marks)
order(marks) # indices
marks[order(marks)] # similar to sort
rank(marks)
sort(rank(marks))
sort(marks, decreasing = T)
rev(sort(marks))
order(marks, decreasing = T)
marks2 = marks
marks2[5 ] =NA # check with NA value: display position
marks2
order(marks2)
o... |
#' Store session data in encrypted cookies.
#' @param key The secret key to use. This must be consistent across all sessions
#' where you want to save/restore encrypted cookies. It should be a long and
#' complex character string to bolster security.
#' @param name The name of the cookie in the user's browser.
#' @... | /R/session-cookie.R | permissive | FrankPortman/plumber | R | false | false | 2,279 | r | #' Store session data in encrypted cookies.
#' @param key The secret key to use. This must be consistent across all sessions
#' where you want to save/restore encrypted cookies. It should be a long and
#' complex character string to bolster security.
#' @param name The name of the cookie in the user's browser.
#' @... |
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615765752-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pickParams.R
\name{pick_Ami}
\alias{pick_Ami}
\title{Pick coefficient matrix}
\usage{
pick_Ami(p, M, d, params, m, i, structural_pars = NULL, unvec = TRUE)
}
\arguments{
\item{p}{a positive integer specifying the autoregressive order of the m... | /man/pick_Ami.Rd | no_license | saviviro/gmvarkit | R | false | true | 8,175 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pickParams.R
\name{pick_Ami}
\alias{pick_Ami}
\title{Pick coefficient matrix}
\usage{
pick_Ami(p, M, d, params, m, i, structural_pars = NULL, unvec = TRUE)
}
\arguments{
\item{p}{a positive integer specifying the autoregressive order of the m... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Year_Day.R
\name{Year_Day}
\alias{Year_Day}
\title{Regularly spaced year plus day of year}
\usage{
Year_Day(...)
}
\arguments{
\item{...}{Arguments passed to \link[timeDate]{timeSequence}}
\item{from}{starting date, required.}
\item... | /man/Year_Day.Rd | no_license | xiaoyaowjw/OceanData | R | false | false | 1,080 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Year_Day.R
\name{Year_Day}
\alias{Year_Day}
\title{Regularly spaced year plus day of year}
\usage{
Year_Day(...)
}
\arguments{
\item{...}{Arguments passed to \link[timeDate]{timeSequence}}
\item{from}{starting date, required.}
\item... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{r_home}
\alias{r_home}
\title{The R home directory}
\usage{
r_home(component = "home", ..., sep = c("/", "\\\\"))
}
\arguments{
\item{component}{\code{"home"} for the root of the R installation directory,
or the name of a sub... | /man/r_home.Rd | no_license | danilodpsantos/pathological | R | false | true | 1,000 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{r_home}
\alias{r_home}
\title{The R home directory}
\usage{
r_home(component = "home", ..., sep = c("/", "\\\\"))
}
\arguments{
\item{component}{\code{"home"} for the root of the R installation directory,
or the name of a sub... |
library(rstan)
library(here)
options(mc.cores = parallel::detectCores())
rstan_options(auto_write = TRUE)
stan_file <- here("8-schools", "8-Schools.stan")
schools_dat <- list(J = 8,
y = c(28, 8, -3, 7, -1, 1, 18, 12),
sigma = c(15, 10, 16, 11, 9, 11, 10, 18))
fit <- stan(... | /8-Schools/8-Schools-stan.R | no_license | lnsongxf/Bayes-Computational-Methods | R | false | false | 568 | r | library(rstan)
library(here)
options(mc.cores = parallel::detectCores())
rstan_options(auto_write = TRUE)
stan_file <- here("8-schools", "8-Schools.stan")
schools_dat <- list(J = 8,
y = c(28, 8, -3, 7, -1, 1, 18, 12),
sigma = c(15, 10, 16, 11, 9, 11, 10, 18))
fit <- stan(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdatabase_sera.R
\name{sr}
\alias{sr}
\title{Serum}
\description{
Serum
}
\details{
A serum entry (\code{sr}) is an environment containing some of:
\tabular{ll}{
id \tab serum id: 6 random capital letters and numbers \cr
long \tab a full... | /man/sr.Rd | permissive | SamT123/acutilsLite | R | false | true | 1,137 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acdatabase_sera.R
\name{sr}
\alias{sr}
\title{Serum}
\description{
Serum
}
\details{
A serum entry (\code{sr}) is an environment containing some of:
\tabular{ll}{
id \tab serum id: 6 random capital letters and numbers \cr
long \tab a full... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_498}
\alias{movie_498}
\title{My Girl}
\format{igraph object}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0102492
}
\usage{
mov... | /man/movie_498.Rd | permissive | kjhealy/networkdata | R | false | true | 995 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_498}
\alias{movie_498}
\title{My Girl}
\format{igraph object}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0102492
}
\usage{
mov... |
##' Print lmmot object.
##'
##' @title Print lmmot object
##'
##' @param x lmmot object to print.
##' @param digits number of decimal digits to print.
##' @param ... further arguments passed to or from other methods.
##'
##' @export
##' @seealso \link[stats]{lm} \link[lmmot]{lmmot}
##' @author Marvin Wright
print.lmmo... | /R/print.lmmot.R | no_license | cran/lmmot | R | false | false | 765 | r | ##' Print lmmot object.
##'
##' @title Print lmmot object
##'
##' @param x lmmot object to print.
##' @param digits number of decimal digits to print.
##' @param ... further arguments passed to or from other methods.
##'
##' @export
##' @seealso \link[stats]{lm} \link[lmmot]{lmmot}
##' @author Marvin Wright
print.lmmo... |
source("Functions.r")
# Parameterization
ca <- 400
k <- 0.05
MAP <- 1000
LAI <- 1
Vcmax <- 50
cp <- 30
Km <- 703
Rd <- 1
a <- 1.6
nZ <- 0.5
p <- 43200
l <- 1.8e-5
pe <- -1.58*10^-3
b <- 4.38
kxmax <- 5
c <- 2.64
d <- 3.54
h3 <- 10
h <- l*a*LAI/nZ*p
h2 <- l*LAI/nZ*p/1000
gamma <- 1/((MAP/365/k)/1000)*nZ
# Figures
Col... | /Sensitivity Analysis/gs(w)/px VPD given w.r | no_license | YaojieLu/Sensitivity-Analysis | R | false | false | 1,333 | r |
source("Functions.r")
# Parameterization
ca <- 400
k <- 0.05
MAP <- 1000
LAI <- 1
Vcmax <- 50
cp <- 30
Km <- 703
Rd <- 1
a <- 1.6
nZ <- 0.5
p <- 43200
l <- 1.8e-5
pe <- -1.58*10^-3
b <- 4.38
kxmax <- 5
c <- 2.64
d <- 3.54
h3 <- 10
h <- l*a*LAI/nZ*p
h2 <- l*LAI/nZ*p/1000
gamma <- 1/((MAP/365/k)/1000)*nZ
# Figures
Col... |
L <- 2 # number of knots to use for the basis functions
cv <- 1
cvs <- seq_len(5) # cross-validation sets
process <- "ebf" # ebf: empirical basis functions, gsk: gaussian kernels
margin <- "gsk" # ebf: empirical basis functions, gsk: gaussian kernels
times <- c("current", "future")
# for (... | /markdown/precip-rev-3/fit-ebf-2-1.R | permissive | sammorris81/extreme-decomp | R | false | false | 608 | r | L <- 2 # number of knots to use for the basis functions
cv <- 1
cvs <- seq_len(5) # cross-validation sets
process <- "ebf" # ebf: empirical basis functions, gsk: gaussian kernels
margin <- "gsk" # ebf: empirical basis functions, gsk: gaussian kernels
times <- c("current", "future")
# for (... |
## Assignment:
## You should create one R script called run_analysis.R that does the following.
## 1) Merges the training and the test sets to create one data set.
## 2) Extracts only the measurements on the mean and standard deviation for each measurement.
## 3) Uses descriptive activity names to name the activiti... | /run_analysis.R | no_license | jdscience/cleaningdataproject | R | false | false | 2,804 | r |
## Assignment:
## You should create one R script called run_analysis.R that does the following.
## 1) Merges the training and the test sets to create one data set.
## 2) Extracts only the measurements on the mean and standard deviation for each measurement.
## 3) Uses descriptive activity names to name the activiti... |
#!/usr/bin/env Rscript
source("scripts/plotpredict.R")
source("scripts/summarypop.R")
source("scripts/Gmatrices.R")
axis.type="percent0"
tovar.mat <- get.matrices("Tovar")
tulum.mat <- get.matrices("Tulum")
tovar <- summarypop("data/TovarData.txt")
tulum <- summarypop("data/TulumData.txt")
CI.factor <- 2
pdf("f... | /figure4.R | no_license | lerouzic/dalechampia | R | false | false | 1,475 | r | #!/usr/bin/env Rscript
source("scripts/plotpredict.R")
source("scripts/summarypop.R")
source("scripts/Gmatrices.R")
axis.type="percent0"
tovar.mat <- get.matrices("Tovar")
tulum.mat <- get.matrices("Tulum")
tovar <- summarypop("data/TovarData.txt")
tulum <- summarypop("data/TulumData.txt")
CI.factor <- 2
pdf("f... |
NetGen_Geo<-function(N,r){
x<-runif(N);
y<-runif(N);
r2=r^2;
s=N*N;
l=0;
L1<-vector("integer",s);
L2<-vector("integer",s);
for (i in 1:(N-1)){
for(j in (i+1):N){
d2=(x[i]-x[j])^2+(y[i]-y[j])^2;
if(d2<=r2){
l=l+1;
L1[l]=i; L2[l]=j;
l=l+... | /Diffusion_Simulations/MetaPopulation_Diffusion/tests/Riad_2009_Simulation/NetGen_Geo.R | no_license | ethanbhojani/IDEANet | R | false | false | 553 | r | NetGen_Geo<-function(N,r){
x<-runif(N);
y<-runif(N);
r2=r^2;
s=N*N;
l=0;
L1<-vector("integer",s);
L2<-vector("integer",s);
for (i in 1:(N-1)){
for(j in (i+1):N){
d2=(x[i]-x[j])^2+(y[i]-y[j])^2;
if(d2<=r2){
l=l+1;
L1[l]=i; L2[l]=j;
l=l+... |
simcoal <-
function(
splittime=120000, #time back to single population
internode = 0, #time between branching in a stepwise invasion
marker.type,# "mtDNA" or "usat"
p, # Number of populations
n.popsize, # Population size as the haploid number of chrom.
n.samples, # ... | /src/simcoal.R | no_license | stranda/holoSim.old | R | false | false | 5,056 | r | simcoal <-
function(
splittime=120000, #time back to single population
internode = 0, #time between branching in a stepwise invasion
marker.type,# "mtDNA" or "usat"
p, # Number of populations
n.popsize, # Population size as the haploid number of chrom.
n.samples, # ... |
df <- read.csv('regression.csv')
getwd()
class(df)
summary(df)
library(ggplot2)
num.cols <- sapply(df, is.numeric)
num.cols
cor.data <- cor(df[,num.cols])
cor.data
library(corrplot)
library(corrgram)
corrplot(cor.data,method='color')
#Model
model <- lm(df$Scores ~ .,df)
summary(df)
summar... | /regression.R | no_license | GouravKumarYadav/project_1 | R | false | false | 831 | r | df <- read.csv('regression.csv')
getwd()
class(df)
summary(df)
library(ggplot2)
num.cols <- sapply(df, is.numeric)
num.cols
cor.data <- cor(df[,num.cols])
cor.data
library(corrplot)
library(corrgram)
corrplot(cor.data,method='color')
#Model
model <- lm(df$Scores ~ .,df)
summary(df)
summar... |
#' @include timespans.r
#' @include durations.r
#' @include intervals.r
#' @include periods.r
#' @include Dates.r
#' @include difftimes.r
#' @include numeric.r
#' @include POSIXt.r
#' @include time-zones.r
NULL
#' Convert a variety of date-time classes to POSIXlt and POSIXct
#' @name DateCoercion
#' @keywords interna... | /R/coercion.r | no_license | McClellandLegge/lubridate | R | false | false | 20,539 | r | #' @include timespans.r
#' @include durations.r
#' @include intervals.r
#' @include periods.r
#' @include Dates.r
#' @include difftimes.r
#' @include numeric.r
#' @include POSIXt.r
#' @include time-zones.r
NULL
#' Convert a variety of date-time classes to POSIXlt and POSIXct
#' @name DateCoercion
#' @keywords interna... |
### making figure 1 for the Giuliana etc paper
# loading packages
library(tidyverse)
library(scales)
# data
data <-
data.frame(
stringsAsFactors = FALSE,
first_job = c("Creative (core): 3%",
"Creative (non-core): 3%","IT: 2%","Professional (other): 43%",
"O... | /figure_01.R | no_license | markrt/second_jobs | R | false | false | 2,169 | r | ### making figure 1 for the Giuliana etc paper
# loading packages
library(tidyverse)
library(scales)
# data
data <-
data.frame(
stringsAsFactors = FALSE,
first_job = c("Creative (core): 3%",
"Creative (non-core): 3%","IT: 2%","Professional (other): 43%",
"O... |
Sys.setenv("R_TESTS" = "")
library(testthat)
| /tests/testthat.R | permissive | ceibs-xuyixuan/SCIndex | R | false | false | 45 | r | Sys.setenv("R_TESTS" = "")
library(testthat)
|
applyRowAndColumnNames <- function(m) {
y <- m
rownames(y) <- colnames(y) <- 1:dim(y)[1]
return(y)
}
| /tests/testthat/helper-functions.R | no_license | matsengrp/sumrep | R | false | false | 114 | r | applyRowAndColumnNames <- function(m) {
y <- m
rownames(y) <- colnames(y) <- 1:dim(y)[1]
return(y)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{biomart_id_mapping_mouse}
\alias{biomart_id_mapping_mouse}
\title{Mouse ID mapping from biomaRt}
\format{
A data frame (tibble) with 57388 rows and 4 columns:
\describe{
\item{ensembl_gene_id}{Mouse Ensembl gene ID... | /man/biomart_id_mapping_mouse.Rd | permissive | travis-m-blimkie/tRavis | R | false | true | 563 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{biomart_id_mapping_mouse}
\alias{biomart_id_mapping_mouse}
\title{Mouse ID mapping from biomaRt}
\format{
A data frame (tibble) with 57388 rows and 4 columns:
\describe{
\item{ensembl_gene_id}{Mouse Ensembl gene ID... |
build_demographics_race1980standard_pnad <- function(Data){
# Loading the crosswalk
file_location <- system.file("extdata",
"crosswalk_pnad_race.csv",
package = "harmonizePNAD")
crosswalk <- data.table::fread(file_locat... | /R/build_demographics_race1980standard_pnad.R | no_license | arthurwelle/harmonizePNAD | R | false | false | 1,870 | r | build_demographics_race1980standard_pnad <- function(Data){
# Loading the crosswalk
file_location <- system.file("extdata",
"crosswalk_pnad_race.csv",
package = "harmonizePNAD")
crosswalk <- data.table::fread(file_locat... |
#' Aggregate time series fatality data from the Vestry report.
#'
#' @param vestry Logical. TRUE returns the data from the Vestry committee (Appendix B, p. 175). FALSE (default) returns John Snow's contribution to the report (p.117).
#' @return A R list with two objects: "data" and "source" ("snow" or "vestry").
#' \it... | /R/timeSeries.R | no_license | kuzmenkov111/cholera | R | false | false | 4,252 | r | #' Aggregate time series fatality data from the Vestry report.
#'
#' @param vestry Logical. TRUE returns the data from the Vestry committee (Appendix B, p. 175). FALSE (default) returns John Snow's contribution to the report (p.117).
#' @return A R list with two objects: "data" and "source" ("snow" or "vestry").
#' \it... |
# detrend population-level climate; put it in "long" form
clim_form <- function(clim_x, clim_type = "prate", foo){
# years
years_vec <- clim_x$year %>% unique %>% sort
# clim_x value rename
clim_x <- clim_x %>% base::subset( clim_var == clim_type )
# prepare indexes
split_id <- Filter(function... | /analysis/format_data/format_scripts.R | no_license | AldoCompagnoni/lupine | R | false | false | 2,039 | r | # detrend population-level climate; put it in "long" form
clim_form <- function(clim_x, clim_type = "prate", foo){
# years
years_vec <- clim_x$year %>% unique %>% sort
# clim_x value rename
clim_x <- clim_x %>% base::subset( clim_var == clim_type )
# prepare indexes
split_id <- Filter(function... |
# Loading packages needed (and installing if necessary) for this part
if (!require("pacman")) install.packages("pacman")
p_load(ggExtra,
install = TRUE,
update = getOption("pac_update"),
character.only = FALSE)
spreading$Valence <- ifelse (spreading$usvalence == -0.5, "Négative", "Positive")
# l... | /xp10/04c_plot_point_xp10.R | permissive | bricebeffara/rwa_evaluative_conditioning_data_analysis | R | false | false | 3,836 | r | # Loading packages needed (and installing if necessary) for this part
if (!require("pacman")) install.packages("pacman")
p_load(ggExtra,
install = TRUE,
update = getOption("pac_update"),
character.only = FALSE)
spreading$Valence <- ifelse (spreading$usvalence == -0.5, "Négative", "Positive")
# l... |
testlist <- list(A = structure(c(9.97947521331791e-316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), left = 0L, right = 0L, x = numeric(0))
result <- do.call(mgss:::MVP_normalfactor_rcpp,testlist)
str(result) | /mgss/inst/testfiles/MVP_normalfactor_rcpp/AFL_MVP_normalfactor_rcpp/MVP_normalfactor_rcpp_valgrind_files/1615951354-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 292 | r | testlist <- list(A = structure(c(9.97947521331791e-316, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), left = 0L, right = 0L, x = numeric(0))
result <- do.call(mgss:::MVP_normalfactor_rcpp,testlist)
str(result) |
##-------------------------------------------------------
## plot1.R
## ------------------------------------------------------
## Load the data
d <- read.table("household_power_consumption.txt", na.strings = "?", sep=";", header=T)
d$Date <- as.Date(d$Date , "%d/%m/%Y")
d1 <- subset(d, (d$Date == as.Date('2007-02-01... | /plot1.R | no_license | Sannepan/ExData_Plotting1 | R | false | false | 742 | r | ##-------------------------------------------------------
## plot1.R
## ------------------------------------------------------
## Load the data
d <- read.table("household_power_consumption.txt", na.strings = "?", sep=";", header=T)
d$Date <- as.Date(d$Date , "%d/%m/%Y")
d1 <- subset(d, (d$Date == as.Date('2007-02-01... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/faceratings.R
\docType{data}
\name{faceratings}
\alias{faceratings}
\title{Attractiveness ratings of faces}
\format{A data frame with 256326 rows and 9 variables:
\describe{
\item{rater_id}{rater's ID}
\item{rater_sex}{rater's sex (female... | /man/faceratings.Rd | permissive | andrewheiss/faux | R | false | true | 1,130 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/faceratings.R
\docType{data}
\name{faceratings}
\alias{faceratings}
\title{Attractiveness ratings of faces}
\format{A data frame with 256326 rows and 9 variables:
\describe{
\item{rater_id}{rater's ID}
\item{rater_sex}{rater's sex (female... |
../pfmix/vcfs/extractVcf.r | /benchMark/beagle/extractVcf.r | no_license | DEploid-dev/DEploid-Supplementary-Materials | R | false | false | 26 | r | ../pfmix/vcfs/extractVcf.r |
### Data Structure - List
# Creating List
x<-1:10
y<-5:1
z<-3
k<-list(x,y,z)
k
# List is a generic vector
n<-c(2,4,1,4,5,2)
s<-c("a","b","c")
b<-c(TRUE,FALSE)
x<-list(n,s,b)
x
# List slicing
x[2]
# List slicing using index vector
x[c(2,3)]
# Member Reference
x[[2]]
x[[2]][1] = "z"
x
# Named list members
student = ... | /List.R | no_license | abhinav-gautam/r-basics | R | false | false | 763 | r | ### Data Structure - List
# Creating List
x<-1:10
y<-5:1
z<-3
k<-list(x,y,z)
k
# List is a generic vector
n<-c(2,4,1,4,5,2)
s<-c("a","b","c")
b<-c(TRUE,FALSE)
x<-list(n,s,b)
x
# List slicing
x[2]
# List slicing using index vector
x[c(2,3)]
# Member Reference
x[[2]]
x[[2]][1] = "z"
x
# Named list members
student = ... |
.tmp.f <- function(){
require(testthat)
}
context("lognormal")
test_that("getLognormMoments and getParmsLognormFromMoments vector",{
mu = log(100)
sigma = log(1.2)
moments = getLognormMoments(mu, sigma)
coefEst <- getParmsLognormForMoments( moments[,1], moments[,2])
expect_equal( c(mu = mu, sigma = sigma... | /tests/testthat/test_lognorm.R | no_license | RCFilm/lognorm | R | false | false | 1,198 | r | .tmp.f <- function(){
require(testthat)
}
context("lognormal")
test_that("getLognormMoments and getParmsLognormFromMoments vector",{
mu = log(100)
sigma = log(1.2)
moments = getLognormMoments(mu, sigma)
coefEst <- getParmsLognormForMoments( moments[,1], moments[,2])
expect_equal( c(mu = mu, sigma = sigma... |
#!/bin/env Rscript
#
# Apply dimension reduction to the combined training set
#
suppressMessages(library(tidyverse))
options(stringsAsFactors = FALSE)
dat <- read_tsv(snakemake@input[[1]], col_types = cols())
# separate out cross-validation indicator and identify the train set
train_idx <- pull(dat, train_idx) == 1
... | /scripts/reduce_dimensions_late.R | permissive | amytildazhang/p3-model-iteration | R | false | false | 4,218 | r | #!/bin/env Rscript
#
# Apply dimension reduction to the combined training set
#
suppressMessages(library(tidyverse))
options(stringsAsFactors = FALSE)
dat <- read_tsv(snakemake@input[[1]], col_types = cols())
# separate out cross-validation indicator and identify the train set
train_idx <- pull(dat, train_idx) == 1
... |
context("Unload cleanly")
knitr::opts_chunk$set(error = FALSE)
test_that("Clean unloading", {
opts <- options()
optc <- knitr::opts_chunk$get()
optk <- knitr::opts_knit$get()
wd <- getwd()
files <- list.files(wd)
test_dir <- tempfile("unloading_rmdpartials")
dir.create(test_dir)
setwd(test_dir)
on... | /tests/testthat/test_unloading.R | no_license | rubenarslan/rmdpartials | R | false | false | 1,100 | r | context("Unload cleanly")
knitr::opts_chunk$set(error = FALSE)
test_that("Clean unloading", {
opts <- options()
optc <- knitr::opts_chunk$get()
optk <- knitr::opts_knit$get()
wd <- getwd()
files <- list.files(wd)
test_dir <- tempfile("unloading_rmdpartials")
dir.create(test_dir)
setwd(test_dir)
on... |
#' Data generation
#'
#' Creates plausible data as would be oserved by genome sequencing
#' @param number_of_clones The wanted number of observable clones (meaning bearing at least 1 mutation)
#' @param number_of_mutations The total observed number of mutations (across all clones)
#' @param number_of_samples The... | /R/QuantumCat.R | no_license | cran/QuantumClone | R | false | false | 6,030 | r |
#' Data generation
#'
#' Creates plausible data as would be oserved by genome sequencing
#' @param number_of_clones The wanted number of observable clones (meaning bearing at least 1 mutation)
#' @param number_of_mutations The total observed number of mutations (across all clones)
#' @param number_of_samples The... |
new_ml_model_gaussian_mixture <- function(pipeline_model, formula, dataset,
features_col) {
m <- new_ml_model_clustering(
pipeline_model = pipeline_model,
formula = formula,
dataset = dataset,
features_col = features_col,
class = "ml_model_gaussian_mixture... | /R/ml_model_gaussian_mixture.R | permissive | sparklyr/sparklyr | R | false | false | 451 | r | new_ml_model_gaussian_mixture <- function(pipeline_model, formula, dataset,
features_col) {
m <- new_ml_model_clustering(
pipeline_model = pipeline_model,
formula = formula,
dataset = dataset,
features_col = features_col,
class = "ml_model_gaussian_mixture... |
testlist <- list(x = structure(c(8.72092136294122e+241, 1.12511576474099e+224, 1.21362455944023e+132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(9L, 3L)))
result <- do.call(bravo:::colSumSq_matrix,testlist)
str(result) | /bravo/inst/testfiles/colSumSq_matrix/libFuzzer_colSumSq_matrix/colSumSq_matrix_valgrind_files/1609959199-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 259 | r | testlist <- list(x = structure(c(8.72092136294122e+241, 1.12511576474099e+224, 1.21362455944023e+132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(9L, 3L)))
result <- do.call(bravo:::colSumSq_matrix,testlist)
str(result) |
library(gridExtra)
library(ggplot2)
out<-list()
for (i in c(1,2,3)){
print(i)
out[[i]] <- qplot(1:100, rnorm(100), colour = runif(100))
print(out[[i]])
dev.off()
}
grid.arrange(out[[1]], out[[2]], out[[3]], nrow = 2)
| /multiple_plots_in_loop.R | no_license | amrrs/SO_Answers | R | false | false | 298 | r | library(gridExtra)
library(ggplot2)
out<-list()
for (i in c(1,2,3)){
print(i)
out[[i]] <- qplot(1:100, rnorm(100), colour = runif(100))
print(out[[i]])
dev.off()
}
grid.arrange(out[[1]], out[[2]], out[[3]], nrow = 2)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/centrality.R
\name{network.generic.parallel}
\alias{network.generic.parallel}
\title{Calculate the upper triu of the matrix}
\usage{
network.generic.parallel(fun, fun.prefix, xdata, build.output = "matrix",
n.cores = parallel:::detectCores(... | /man/network.generic.parallel.Rd | no_license | averissimo/network.cox | R | false | true | 1,076 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/centrality.R
\name{network.generic.parallel}
\alias{network.generic.parallel}
\title{Calculate the upper triu of the matrix}
\usage{
network.generic.parallel(fun, fun.prefix, xdata, build.output = "matrix",
n.cores = parallel:::detectCores(... |
library(testthat)
library(tdggraph)
test_check("tdggraph")
| /tests/testthat.R | permissive | CBEP-SoCB/tdggraph | R | false | false | 60 | r | library(testthat)
library(tdggraph)
test_check("tdggraph")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classify_da_id.R
\name{classify_da_id}
\alias{classify_da_id}
\title{Classify da_pa_ids}
\usage{
classify_da_id(x, agg.low, agg.high, id, tag = NULL)
}
\arguments{
\item{x}{A data frame of focal observations}
\item{agg.low}{A character vecto... | /man/classify_da_id.Rd | no_license | avrincon/phdfuns | R | false | true | 800 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classify_da_id.R
\name{classify_da_id}
\alias{classify_da_id}
\title{Classify da_pa_ids}
\usage{
classify_da_id(x, agg.low, agg.high, id, tag = NULL)
}
\arguments{
\item{x}{A data frame of focal observations}
\item{agg.low}{A character vecto... |
### Import helper_functions
source("helper_functions.R")
### Install and import required packages
# We are using a helper function that takes the name of a package as argument
# Checks if it's installed and installs it if not
# Loads the package
# List of required packages
package_list = c("dplyr", "tidyr", "ggplot2",... | /app.R | no_license | krishna5689/Onboarding_Madhan | R | false | false | 3,067 | r | ### Import helper_functions
source("helper_functions.R")
### Install and import required packages
# We are using a helper function that takes the name of a package as argument
# Checks if it's installed and installs it if not
# Loads the package
# List of required packages
package_list = c("dplyr", "tidyr", "ggplot2",... |
library(mosaic)
library(tidyverse)
library(ggplot2)
library(LICORS) # for kmeans++
library(foreach)
library(reshape2)
mkt = read.csv("social_marketing.csv")
# try hierarchical clustering
# convert integer variables to numeric to use scale() function
# mkt[2:37] <- lapply(mkt[2:37], as.numeric)
# mkt = mk... | /exercises/exercise3/market.R | no_license | Aubrey9922/SDS-323 | R | false | false | 1,679 | r | library(mosaic)
library(tidyverse)
library(ggplot2)
library(LICORS) # for kmeans++
library(foreach)
library(reshape2)
mkt = read.csv("social_marketing.csv")
# try hierarchical clustering
# convert integer variables to numeric to use scale() function
# mkt[2:37] <- lapply(mkt[2:37], as.numeric)
# mkt = mk... |
/autorun.R | no_license | user05011988/userproject | R | false | false | 10,530 | r | ||
setwd('~/replication_package/')
args = commandArgs(trailingOnly=TRUE)
project = args[1]
source('./misc.R')
library(lme4)
dep_var = 'IsVotePositive'
load(paste0("models/",project,"_JIT_model_RQ2.Rdata"))
print(project)
print(fit)
val_results = ComputeOptimism(fit)
save(val_results, file=paste0("models/",project,"_boo... | /Analysis2_validate.R | no_license | rpaul20/replication_review-dynamics | R | false | false | 369 | r | setwd('~/replication_package/')
args = commandArgs(trailingOnly=TRUE)
project = args[1]
source('./misc.R')
library(lme4)
dep_var = 'IsVotePositive'
load(paste0("models/",project,"_JIT_model_RQ2.Rdata"))
print(project)
print(fit)
val_results = ComputeOptimism(fit)
save(val_results, file=paste0("models/",project,"_boo... |
\name{error.bars.by}
\alias{error.bars.by}
\title{ Plot means and confidence intervals for multiple groups}
\description{One of the many functions in R to plot means and confidence intervals. Meant mainly for demonstration purposes for showing the probabilty of replication from multiple samples. Can also be combined... | /man/error.bars.by.Rd | no_license | Redhat44/psych | R | false | false | 7,258 | rd | \name{error.bars.by}
\alias{error.bars.by}
\title{ Plot means and confidence intervals for multiple groups}
\description{One of the many functions in R to plot means and confidence intervals. Meant mainly for demonstration purposes for showing the probabilty of replication from multiple samples. Can also be combined... |
setClass("histQuoteDriver", representation("DBIDriver", Id = "character"))
histQuote <- function() {
drv <- "histQuote"
attr(drv, "package") <- "TShistQuote"
new("histQuoteDriver", Id = drv)
}
# require("DBI") for this
setClass("TShistQuoteConnection", contains=c("DBIConnection", "conType","TSdb"),
repre... | /R/TSdbiMethods.R | no_license | cran/TShistQuote | R | false | false | 6,121 | r |
setClass("histQuoteDriver", representation("DBIDriver", Id = "character"))
histQuote <- function() {
drv <- "histQuote"
attr(drv, "package") <- "TShistQuote"
new("histQuoteDriver", Id = drv)
}
# require("DBI") for this
setClass("TShistQuoteConnection", contains=c("DBIConnection", "conType","TSdb"),
repre... |
library(data.table)
library(rmeta)
annot_cell = "/n/groups/price/kushal/Robocov/data/ANNOTATIONS/FigJoints/Joint_Jun15"
results_cell = "/n/groups/price/kushal/Robocov/data/LDSC_RESULTS/FigJoints/Joint_Jun15/baselineLD_v2.1"
annot_names = list.files(results_cell)
annot_idx = 1
all_traits = c('UKB_460K.body_BMIz','UKB_... | /code/single_tau_star.R | no_license | kkdey/Robocov-pages | R | false | false | 6,939 | r | library(data.table)
library(rmeta)
annot_cell = "/n/groups/price/kushal/Robocov/data/ANNOTATIONS/FigJoints/Joint_Jun15"
results_cell = "/n/groups/price/kushal/Robocov/data/LDSC_RESULTS/FigJoints/Joint_Jun15/baselineLD_v2.1"
annot_names = list.files(results_cell)
annot_idx = 1
all_traits = c('UKB_460K.body_BMIz','UKB_... |
#' Get BOLD specimen + sequence data.
#'
#' @export
#' @template args
#' @template otherargs
#' @references
#' \url{http://v4.boldsystems.org/index.php/resources/api?type=webservices}
#'
#' @param marker (character) Returns all records containing matching marker
#' codes. See Details.
#' @param format (character) One o... | /R/bold_seqspec.R | permissive | GhostsOfHiroshima/bold | R | false | false | 3,422 | r | #' Get BOLD specimen + sequence data.
#'
#' @export
#' @template args
#' @template otherargs
#' @references
#' \url{http://v4.boldsystems.org/index.php/resources/api?type=webservices}
#'
#' @param marker (character) Returns all records containing matching marker
#' codes. See Details.
#' @param format (character) One o... |
# Taking the base emissions (average of last 10 years) and
# the function rate_range, defined in anither file,
# the values of the limits for the sliders are defined
a <- rate_range(base_china_rate, last_china)
min_china_rate <- a$min_rate
max_china_rate <- a$max_rate
step_china_rate <- a$step_rate
a <- rate_range(b... | /slider_limits.R | no_license | aarteaga/climate_change_project | R | false | false | 601 | r | # Taking the base emissions (average of last 10 years) and
# the function rate_range, defined in anither file,
# the values of the limits for the sliders are defined
a <- rate_range(base_china_rate, last_china)
min_china_rate <- a$min_rate
max_china_rate <- a$max_rate
step_china_rate <- a$step_rate
a <- rate_range(b... |
library(dplyr)
library(stringr)
library(ggplot2)
library(plotly)
library(lubridate)
library(tibbletime)
library(scales)
options(error = function() traceback(2))
# -------------------------------------------------------------------------------------------------------------
covRegionPlot <- function(dr, Regions="World"... | /COVID-19-common.R | no_license | Tom-71/COVID-19-Austria | R | false | false | 19,622 | r | library(dplyr)
library(stringr)
library(ggplot2)
library(plotly)
library(lubridate)
library(tibbletime)
library(scales)
options(error = function() traceback(2))
# -------------------------------------------------------------------------------------------------------------
covRegionPlot <- function(dr, Regions="World"... |
##Analysis of PEC data CO data and compare direct and indirect Lascar concentration
#Feb 21st, 2018
message("Processing Children Lascar in household ",hhid_selected," in phase ",phase_selected)
#select ECM by hhid and phase (BL1/BL2FU1FU2)
Lascar_selected = Lascar_data2[phase == phase_selected&hhid == hhid_sele... | /scripts/PEC_CO_comparison.R | no_license | ces-psa/hapin-pilot-lascar | R | false | false | 5,647 | r | ##Analysis of PEC data CO data and compare direct and indirect Lascar concentration
#Feb 21st, 2018
message("Processing Children Lascar in household ",hhid_selected," in phase ",phase_selected)
#select ECM by hhid and phase (BL1/BL2FU1FU2)
Lascar_selected = Lascar_data2[phase == phase_selected&hhid == hhid_sele... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BetaCorrBin.R
\name{EstMLEBetaCorrBin}
\alias{EstMLEBetaCorrBin}
\title{Estimating the covariance, alpha and beta parameter values for Beta-Correlated Binomial
Distribution}
\usage{
EstMLEBetaCorrBin(x,freq,cov,a,b,...)
}
\arguments{
\item{x}... | /man/EstMLEBetaCorrBin.Rd | no_license | cran/fitODBOD | R | false | true | 1,865 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BetaCorrBin.R
\name{EstMLEBetaCorrBin}
\alias{EstMLEBetaCorrBin}
\title{Estimating the covariance, alpha and beta parameter values for Beta-Correlated Binomial
Distribution}
\usage{
EstMLEBetaCorrBin(x,freq,cov,a,b,...)
}
\arguments{
\item{x}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/meanJumpSize.R
\name{meanJumpSize}
\alias{meanJumpSize}
\title{Compute mean jump size given list of jump-dynamics variables}
\usage{
meanJumpSize(jump_specs, samples = 10000)
}
\arguments{
\item{jump_specs}{list of variables defining jump dyn... | /man/meanJumpSize.Rd | no_license | shill1729/sdes | R | false | true | 735 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/meanJumpSize.R
\name{meanJumpSize}
\alias{meanJumpSize}
\title{Compute mean jump size given list of jump-dynamics variables}
\usage{
meanJumpSize(jump_specs, samples = 10000)
}
\arguments{
\item{jump_specs}{list of variables defining jump dyn... |
\name{GBlockBoost}
\Rdversion{1.1}
\alias{GBlockBoost}
\title{
Computation of the GBlockBoost Algorithm or Componentwise Boosting
}
\description{
This function fits a GLM based on penalized likelihood inference by the GBlockBoost algorithm. However, it is primarily intended
for internal use. You
can access it via t... | /man/GBlockBoost.Rd | no_license | cran/lqa | R | false | false | 3,682 | rd | \name{GBlockBoost}
\Rdversion{1.1}
\alias{GBlockBoost}
\title{
Computation of the GBlockBoost Algorithm or Componentwise Boosting
}
\description{
This function fits a GLM based on penalized likelihood inference by the GBlockBoost algorithm. However, it is primarily intended
for internal use. You
can access it via t... |
suppressPackageStartupMessages({
library(SingleCellExperiment)
library(DropletUtils)
library(scran)
library(cellassign)
#library(pheatmap)
})
reticulate::use_condaenv("/gpfs/alpine/syb105/proj-shared/Personal/jmerlet/rhea/envs/cellassign")
data_dir <- "/gpfs/alpine/syb105/proj-shared/Personal/jmerlet/project... | /alpine/neg_gene_exp.R | no_license | jeanmerlet/stm_mouse_skin_ikkb | R | false | false | 4,217 | r | suppressPackageStartupMessages({
library(SingleCellExperiment)
library(DropletUtils)
library(scran)
library(cellassign)
#library(pheatmap)
})
reticulate::use_condaenv("/gpfs/alpine/syb105/proj-shared/Personal/jmerlet/rhea/envs/cellassign")
data_dir <- "/gpfs/alpine/syb105/proj-shared/Personal/jmerlet/project... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "sonar")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Class")
lrn = makeLearner("clas... | /models/openml_sonar/classification_Class/40c558fac1d3eed30b33cf8c84a20d3e/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 722 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "sonar")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Class")
lrn = makeLearner("clas... |
library(testthat)
library(gameOfLife)
test_check("gameOfLife")
| /tests/testthat.R | no_license | andreamelloncelli/gameOfLife | R | false | false | 64 | r | library(testthat)
library(gameOfLife)
test_check("gameOfLife")
|
# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common get_config new_operation new_request send_request
#' @include workspaces_service.R
NULL
#' Associates the specified IP access control group with the specified
#' directory
#'
#' Associates the specified IP access control group w... | /paws/R/workspaces_operations.R | permissive | jcheng5/paws | R | false | false | 63,729 | r | # This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common get_config new_operation new_request send_request
#' @include workspaces_service.R
NULL
#' Associates the specified IP access control group with the specified
#' directory
#'
#' Associates the specified IP access control group w... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TargetExperiment-plotGeneAttrPerFeat.R
\docType{methods}
\name{plotGeneAttrPerFeat}
\alias{plotGeneAttrPerFeat}
\alias{plotGeneAttrPerFeat,TargetExperiment-method}
\alias{plotGeneAttrPerFeat-methods}
\title{Plot the attribute value for all th... | /man/TargetExperiment-plotGeneAttrPerFeat.Rd | no_license | gamerino/TarSeqQC | R | false | true | 2,196 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TargetExperiment-plotGeneAttrPerFeat.R
\docType{methods}
\name{plotGeneAttrPerFeat}
\alias{plotGeneAttrPerFeat}
\alias{plotGeneAttrPerFeat,TargetExperiment-method}
\alias{plotGeneAttrPerFeat-methods}
\title{Plot the attribute value for all th... |
\name{burst}
\alias{burst}
\alias{burst,ANY,character-method}
\alias{burst,Move,factor-method}
\alias{burst,ANY,numeric-method}
\alias{burst,.MoveTrackSingleBurst,missing-method}
\alias{burst,.MoveTrackSingleBurst,factor-method}
\docType{methods}
\title{Bursting a track}
\description{Bursting a track by a specified... | /man/burst.Rd | no_license | cran/move | R | false | false | 1,298 | rd | \name{burst}
\alias{burst}
\alias{burst,ANY,character-method}
\alias{burst,Move,factor-method}
\alias{burst,ANY,numeric-method}
\alias{burst,.MoveTrackSingleBurst,missing-method}
\alias{burst,.MoveTrackSingleBurst,factor-method}
\docType{methods}
\title{Bursting a track}
\description{Bursting a track by a specified... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/racurves.r
\name{racurves}
\alias{racurves}
\title{Multiple rank-abundance curves}
\usage{
racurves(matrix, main = "Rank-abundance diagram", bw = TRUE)
}
\arguments{
\item{matrix}{Community data, a matrix-like object with samples in rows and ... | /man/racurves.Rd | no_license | fvlampe/goeveg | R | false | true | 1,973 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/racurves.r
\name{racurves}
\alias{racurves}
\title{Multiple rank-abundance curves}
\usage{
racurves(matrix, main = "Rank-abundance diagram", bw = TRUE)
}
\arguments{
\item{matrix}{Community data, a matrix-like object with samples in rows and ... |
# R Practice 1
# ctrl + l = clear console
library(tidyverse)
library(ggplot2)
ggplot2()::ggplot()
# create 2D scatter plot
ggplot(data = mpg) + geom_point(mapping = aes(x = displ, y = hwy))
# GRAPHING TEMPLATE
# ggplot(data=<DATA>) + <GEOM_FUNCTION>(mapping = aes(<MAPPINGS>))
#color class
ggplot(data = mpg) + ge... | /chp1_part1.R | no_license | NikkiBytes/R_Practice | R | false | false | 7,615 | r | # R Practice 1
# ctrl + l = clear console
library(tidyverse)
library(ggplot2)
ggplot2()::ggplot()
# create 2D scatter plot
ggplot(data = mpg) + geom_point(mapping = aes(x = displ, y = hwy))
# GRAPHING TEMPLATE
# ggplot(data=<DATA>) + <GEOM_FUNCTION>(mapping = aes(<MAPPINGS>))
#color class
ggplot(data = mpg) + ge... |
###
## Chapter 6
###
# Setup
## Load necessary packages
load_p <- function(x, character.only = TRUE, ...){
if(!require(x, character.only = character.only, ...))
install.packages(x, ...)
library(x, character.only = TRUE, ...)
}
load_p('textrecipes')
load_p('tidymodels')
load_p('recipes')
load_p('modeldata') # ... | /Chapter-6-research.R | no_license | Bijaelo/TidyModels-Examples-and-Research | R | false | false | 15,995 | r |
###
## Chapter 6
###
# Setup
## Load necessary packages
load_p <- function(x, character.only = TRUE, ...){
if(!require(x, character.only = character.only, ...))
install.packages(x, ...)
library(x, character.only = TRUE, ...)
}
load_p('textrecipes')
load_p('tidymodels')
load_p('recipes')
load_p('modeldata') # ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\name{read_in_haul}
\alias{read_in_haul}
\title{read in data from a single haul}
\usage{
read_in_haul(
x,
name = "Haul",
extension = ".txt",
raising = NULL,
sampling = NULL
)
}
\arguments{
\item{x}{possibly a number or oth... | /selfisher/man/read_in_haul.Rd | no_license | lmitchell4/selfisher | R | false | true | 743 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\name{read_in_haul}
\alias{read_in_haul}
\title{read in data from a single haul}
\usage{
read_in_haul(
x,
name = "Haul",
extension = ".txt",
raising = NULL,
sampling = NULL
)
}
\arguments{
\item{x}{possibly a number or oth... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pinpoint_operations.R
\name{pinpoint_get_apns_channel}
\alias{pinpoint_get_apns_channel}
\title{Retrieves information about the status and settings of the APNs channel
for an application}
\usage{
pinpoint_get_apns_channel(ApplicationId)
}
\ar... | /cran/paws.customer.engagement/man/pinpoint_get_apns_channel.Rd | permissive | TWarczak/paws | R | false | true | 1,165 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pinpoint_operations.R
\name{pinpoint_get_apns_channel}
\alias{pinpoint_get_apns_channel}
\title{Retrieves information about the status and settings of the APNs channel
for an application}
\usage{
pinpoint_get_apns_channel(ApplicationId)
}
\ar... |
## Introduction to ggplot
## Set working directory
setwd("slgora/Box/gg_plot_lesson")
# Install packages
library(ggplot2)
# Load data
data("midwest", package = "ggplot2")
# Other ways to read in datasets
# midwest <- read.csv("http://goo.gl/G1K41K")
#View data
View(midwest)
head(midwest)
attributes(midwest)
c... | /Undergraduate_Stats_Ggplot_P1_Course.R | no_license | SarahGora/Undergraduate_Stats_Ggplot_P1_Course | R | false | false | 2,313 | r | ## Introduction to ggplot
## Set working directory
setwd("slgora/Box/gg_plot_lesson")
# Install packages
library(ggplot2)
# Load data
data("midwest", package = "ggplot2")
# Other ways to read in datasets
# midwest <- read.csv("http://goo.gl/G1K41K")
#View data
View(midwest)
head(midwest)
attributes(midwest)
c... |
#load libraries
library(readxl)
library(ggpubr)
library(ggplot2)
library(dplyr)
#set working directory
setwd("working_directory")
#set parameters to prepare processing
#define path fo connectome matrices (in this case sd_stream results)
matrices_path = 'folder saving connectome matrices/'
matrices_prefix = 'S'
matri... | /scatter_plots_online.R | no_license | CUB-IGL/Network-analyses-reveal-global-and-local-glioma-related-decreases-in-ipsilesional-structural-connect | R | false | false | 19,974 | r | #load libraries
library(readxl)
library(ggpubr)
library(ggplot2)
library(dplyr)
#set working directory
setwd("working_directory")
#set parameters to prepare processing
#define path fo connectome matrices (in this case sd_stream results)
matrices_path = 'folder saving connectome matrices/'
matrices_prefix = 'S'
matri... |
library(plyr)
library(ggplot2)
library(scales)
library(reshape)
library(grid)
scalefactor=3;
samplebasedir = "/Users/leggettr/Documents/Projects/BAMBI/heatmaps"
outputdir = "/Users/leggettr/Documents/Projects/BAMBI/heatmaps"
# Yield plot
#pdf("BAMBI_P8_2D_Local_070317_yield.pdf", width=5, height=3);
#print(ggplot(da... | /scripts/plot_card_heatmap.R | no_license | richardmleggett/bambi | R | false | false | 4,683 | r | library(plyr)
library(ggplot2)
library(scales)
library(reshape)
library(grid)
scalefactor=3;
samplebasedir = "/Users/leggettr/Documents/Projects/BAMBI/heatmaps"
outputdir = "/Users/leggettr/Documents/Projects/BAMBI/heatmaps"
# Yield plot
#pdf("BAMBI_P8_2D_Local_070317_yield.pdf", width=5, height=3);
#print(ggplot(da... |
## Code to calculate the inverse of a matrix or retrieve the inverse
## from cache if it has already been calculated
## Creates a special matrix object, returns a list that sets the value of the matrix,
## gets the value of the matrix, sets the inverse and gets the inverse
makeCacheMatrix <- function(x = matrix()) {
... | /cachematrix.R | no_license | MridulaDamodaran/ProgrammingAssignment2 | R | false | false | 997 | r | ## Code to calculate the inverse of a matrix or retrieve the inverse
## from cache if it has already been calculated
## Creates a special matrix object, returns a list that sets the value of the matrix,
## gets the value of the matrix, sets the inverse and gets the inverse
makeCacheMatrix <- function(x = matrix()) {
... |
test_that("get_afghan_regional_cases data source is unchanged and up to date", {
skip_on_cran()
data <- readr::read_csv("https://docs.google.com/spreadsheets/d/1F-AMEDtqK78EA6LYME2oOsWQsgJi4CT3V_G4Uo-47Rg/export?format=csv")
expected_colnames <- c("Province", "Cases", "Deaths", "Recoveries", "Active Cases", "D... | /tests/testthat/test-get_afghan_regional_cases.R | permissive | GuilhermeShinobe/covidregionaldata | R | false | false | 1,240 | r | test_that("get_afghan_regional_cases data source is unchanged and up to date", {
skip_on_cran()
data <- readr::read_csv("https://docs.google.com/spreadsheets/d/1F-AMEDtqK78EA6LYME2oOsWQsgJi4CT3V_G4Uo-47Rg/export?format=csv")
expected_colnames <- c("Province", "Cases", "Deaths", "Recoveries", "Active Cases", "D... |
# DEFAULT FORECAST ACCURACY METRIC SET ----
#' Forecast Accuracy Metrics Sets
#'
#'
#' This is a wrapper for [metric_set()] with several common forecast / regression
#' accuracy metrics included. These are the default time series accuracy
#' metrics used with [modeltime_accuracy()].
#'
#' @param ... Add additional `ya... | /R/yardstick-metric-sets.R | permissive | SN4AI/modeltime | R | false | false | 4,754 | r | # DEFAULT FORECAST ACCURACY METRIC SET ----
#' Forecast Accuracy Metrics Sets
#'
#'
#' This is a wrapper for [metric_set()] with several common forecast / regression
#' accuracy metrics included. These are the default time series accuracy
#' metrics used with [modeltime_accuracy()].
#'
#' @param ... Add additional `ya... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.7798255308353e+200, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.295541... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615835458-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,047 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.7798255308353e+200, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.295541... |
install.packages("RCurl")
install.packages("rjson")
install.packages("shiny")
library(shiny)
library(RCurl)
library(rjson)
# Accept SSL certificates issued by public Certificate Authorities
#options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))
################... | /RShiny Code/R_ADS_final.R | no_license | bajajsweta/Outbrain-Click-Prediction | R | false | false | 7,234 | r |
install.packages("RCurl")
install.packages("rjson")
install.packages("shiny")
library(shiny)
library(RCurl)
library(rjson)
# Accept SSL certificates issued by public Certificate Authorities
#options(RCurlOptions = list(cainfo = system.file("CurlSSL", "cacert.pem", package = "RCurl")))
################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/d.ind.t.R
\name{d.ind.t}
\alias{d.ind.t}
\title{d.ind.t}
\usage{
d.ind.t(m1, m2, sd1, sd2, n1, n2, a = 0.05, k = 2)
}
\arguments{
\item{m1}{mean from first group}
\item{m2}{mean from second group}
\item{sd1}{standard deviation from first gr... | /man/d.ind.t.Rd | no_license | grne/MOTE | R | false | true | 741 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/d.ind.t.R
\name{d.ind.t}
\alias{d.ind.t}
\title{d.ind.t}
\usage{
d.ind.t(m1, m2, sd1, sd2, n1, n2, a = 0.05, k = 2)
}
\arguments{
\item{m1}{mean from first group}
\item{m2}{mean from second group}
\item{sd1}{standard deviation from first gr... |
source("plotdata.R")
plot2 <- function() {
df <- plotdata()
png(filename="plot2.png")
oldmfrow <- par("mfrow")
par(mfrow=c(1,1))
with(df, plot(DateTime, Global_active_power,type="l",main="",xlab="",ylab="Global Active Power (kilowatts)"))
par(mfrow=oldmfrow)
# dev.copy(... | /plot2.R | no_license | josephhu/ExData_Plotting1 | R | false | false | 362 | r | source("plotdata.R")
plot2 <- function() {
df <- plotdata()
png(filename="plot2.png")
oldmfrow <- par("mfrow")
par(mfrow=c(1,1))
with(df, plot(DateTime, Global_active_power,type="l",main="",xlab="",ylab="Global Active Power (kilowatts)"))
par(mfrow=oldmfrow)
# dev.copy(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cat_n.R
\name{cat_n}
\alias{cat_n}
\title{print vector by lines}
\usage{
cat_n(x, n = 3, ind = 0)
}
\arguments{
\item{x}{one vector}
\item{n}{number if element in each line, default is 3}
\item{ind}{indentation, default is 0}
}
\value{
prin... | /man/cat_n.Rd | no_license | cran/do | R | false | true | 421 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cat_n.R
\name{cat_n}
\alias{cat_n}
\title{print vector by lines}
\usage{
cat_n(x, n = 3, ind = 0)
}
\arguments{
\item{x}{one vector}
\item{n}{number if element in each line, default is 3}
\item{ind}{indentation, default is 0}
}
\value{
prin... |
## Load libraries ------------------------------------------------
require(tidyverse)
require(dplyr) ### dply library to manipulate table joins on dataframes
require(xml2) ### XML library to write hilltop XML
require(RCurl)
library(parallel)
library(doParallel)
setwd("H:/ericg/16666LAWA/LAWA2021/MacroInver... | /MacroInvertebrates/Scripts/loadES_list.R | no_license | lukefullard/LAWA2021 | R | false | false | 4,744 | r | ## Load libraries ------------------------------------------------
require(tidyverse)
require(dplyr) ### dply library to manipulate table joins on dataframes
require(xml2) ### XML library to write hilltop XML
require(RCurl)
library(parallel)
library(doParallel)
setwd("H:/ericg/16666LAWA/LAWA2021/MacroInver... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "fri_c4_250_50")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = mak... | /models/openml_fri_c4_250_50/classification_binaryClass/9d04ef0d96eada88324b3a7405b4f2ee/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 691 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "fri_c4_250_50")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = mak... |
library(reshape)
importdata<-`51637`
importdata<-rename(importdata,c(MEASUREMENT="measurement",SHAPE="shape",CRTWT="carat", COL="color", CLR="clarity", CUT="cut", POL="polish",SYM="symmetry",FLOURESENCE="fluorescence",LAB="report",CERT_NO="reportno",Stock.NO="stoneid", RAP_DIS="back",RAP_RTE="rapprice",RTE="price"))
i... | /R_script_inventory/51637.R | no_license | ShawnPengxy/loupeman | R | false | false | 1,396 | r | library(reshape)
importdata<-`51637`
importdata<-rename(importdata,c(MEASUREMENT="measurement",SHAPE="shape",CRTWT="carat", COL="color", CLR="clarity", CUT="cut", POL="polish",SYM="symmetry",FLOURESENCE="fluorescence",LAB="report",CERT_NO="reportno",Stock.NO="stoneid", RAP_DIS="back",RAP_RTE="rapprice",RTE="price"))
i... |
#' Generate a Random Sequence of H:M:S Times
#'
#' Generate a random vector of H:M:S times.
#'
#' @inheritParams r_sample_factor
#' @param random logical. If \code{TRUE} the times are randomized, otherwise the
#' times are sequential.
#' @return Returns a random vector of H:M:S time elements.
#' @keywords time hour
#'... | /R/hour.R | no_license | couthcommander/wakefield | R | false | false | 648 | r | #' Generate a Random Sequence of H:M:S Times
#'
#' Generate a random vector of H:M:S times.
#'
#' @inheritParams r_sample_factor
#' @param random logical. If \code{TRUE} the times are randomized, otherwise the
#' times are sequential.
#' @return Returns a random vector of H:M:S time elements.
#' @keywords time hour
#'... |
# Data Utilities
# R features a bunch of functions to juggle around with data structures::
#
# seq(): Generate sequences, by specifying the from, to, and by arguments.
# rep(): Replicate elements of vectors and lists.
# sort(): Sort a vector in ascending order. Works on numerics, but also on character strings and ... | /Intermediate R/Chapter 5-Utilities/3.R | no_license | Pranav-Polavarapu/Datacamp-Data-Scientist-with-R-Track- | R | false | false | 1,649 | r | # Data Utilities
# R features a bunch of functions to juggle around with data structures::
#
# seq(): Generate sequences, by specifying the from, to, and by arguments.
# rep(): Replicate elements of vectors and lists.
# sort(): Sort a vector in ascending order. Works on numerics, but also on character strings and ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/default_parameters.R
\name{viewAttributes}
\alias{viewAttributes}
\title{Prints the names of valid attributes}
\usage{
viewAttributes()
}
\description{
\code{viewAttributes()} prints the names of valid attributes that may be used to create an... | /foreSIGHT/man/viewAttributes.Rd | no_license | akhikolla/InformationHouse | R | false | true | 765 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/default_parameters.R
\name{viewAttributes}
\alias{viewAttributes}
\title{Prints the names of valid attributes}
\usage{
viewAttributes()
}
\description{
\code{viewAttributes()} prints the names of valid attributes that may be used to create an... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sdf_interface.R
\name{sdf_sort}
\alias{sdf_sort}
\title{Sort a Spark DataFrame}
\usage{
sdf_sort(x, columns)
}
\arguments{
\item{x}{An object coercable to a Spark DataFrame.}
\item{columns}{The column(s) to sort by.}
}
\description{
Sort a S... | /man/sdf_sort.Rd | permissive | sparklyr/sparklyr | R | false | true | 1,326 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sdf_interface.R
\name{sdf_sort}
\alias{sdf_sort}
\title{Sort a Spark DataFrame}
\usage{
sdf_sort(x, columns)
}
\arguments{
\item{x}{An object coercable to a Spark DataFrame.}
\item{columns}{The column(s) to sort by.}
}
\description{
Sort a S... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/ovary.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.45,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/ovary/ovary_055.txt',append=TRUE)
pr... | /Model/EN/Classifier/ovary/ovary_055.R | no_license | leon1003/QSMART | R | false | false | 347 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/ovary.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.45,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/ovary/ovary_055.txt',append=TRUE)
pr... |
library(shiny)
library(plotly)
data(diamonds, package = "ggplot2")
nms <- names(diamonds)
shinyUI(pageWithSidebar(
headerPanel("Prices of 50,000 round cut diamonds"),
sidebarPanel(
sliderInput('sampleSize', 'Size diamonds', min = 1, max = nrow(diamonds),
value = 1000, step = 500, r... | /ui.R | no_license | alejotima/Developing-Data-Products | R | false | false | 1,328 | r | library(shiny)
library(plotly)
data(diamonds, package = "ggplot2")
nms <- names(diamonds)
shinyUI(pageWithSidebar(
headerPanel("Prices of 50,000 round cut diamonds"),
sidebarPanel(
sliderInput('sampleSize', 'Size diamonds', min = 1, max = nrow(diamonds),
value = 1000, step = 500, r... |
# COVID-19 Tutorial
#------------------------
# https://mdl.library.utoronto.ca/technology/tutorials/covid-19-data-r
# IMPORT RAW DATA: Johns Hopkins Github data
confirmedraw <- read.csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_c... | /covid de.R | no_license | raymondclowe/rstudio-cloud-home | R | false | false | 9,875 | r | # COVID-19 Tutorial
#------------------------
# https://mdl.library.utoronto.ca/technology/tutorials/covid-19-data-r
# IMPORT RAW DATA: Johns Hopkins Github data
confirmedraw <- read.csv("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_c... |
library('readxl')
library('dplyr')
order_info_r <- read_xlsx('order_info_r.xlsx')
tmp_order_info_r <- order_info_r
#동일한 테이블 2개를 옆으로, 밑으로 붙이기
# cbind(tmp_order_info_r, order_info_r)
# bind_cols(tmp_order_info_r, order_info_r) # bind_cols를 쓰려면 dplyr 을 선언해야 한다
# bind_rows(tmp_order_info_r, order_info_r) ... | /rclass09.r | no_license | hyojk2001/Rstudio-basic | R | false | false | 3,956 | r | library('readxl')
library('dplyr')
order_info_r <- read_xlsx('order_info_r.xlsx')
tmp_order_info_r <- order_info_r
#동일한 테이블 2개를 옆으로, 밑으로 붙이기
# cbind(tmp_order_info_r, order_info_r)
# bind_cols(tmp_order_info_r, order_info_r) # bind_cols를 쓰려면 dplyr 을 선언해야 한다
# bind_rows(tmp_order_info_r, order_info_r) ... |
binsignal <- function(chr, thres = 0.05, group, window.size){
bin_counts <- get(x = paste0("bin_counts_", group))
z <- rowSums(bin_counts)
permutation_scores <- get(x = paste0("permutation_scores_", group))
x <- get(x = paste0("cor_final_", group))
x <- x[which(x$chrom == chr),]
x$cor[which(permutation_s... | /scripts/DCE_detection/compute_binsignal.R | permissive | Skourtis/SLE_spatial_gene_expression | R | false | false | 1,798 | r | binsignal <- function(chr, thres = 0.05, group, window.size){
bin_counts <- get(x = paste0("bin_counts_", group))
z <- rowSums(bin_counts)
permutation_scores <- get(x = paste0("permutation_scores_", group))
x <- get(x = paste0("cor_final_", group))
x <- x[which(x$chrom == chr),]
x$cor[which(permutation_s... |
#' Bivariate Moran's I
#'
#' @description
#' For lattice/polygon objects, sf or SpatialPolygonsDataFrame (spdep), calculate
#' Bivariate Moran's Index. Moran's I is used to calculate global spatial
#' autocorrelation. This statistic evaluate the existence of clusters in the spatial
#' context of two lattice data variab... | /R/moran.bi.R | no_license | alexyshr/spdepbi | R | false | false | 3,819 | r | #' Bivariate Moran's I
#'
#' @description
#' For lattice/polygon objects, sf or SpatialPolygonsDataFrame (spdep), calculate
#' Bivariate Moran's Index. Moran's I is used to calculate global spatial
#' autocorrelation. This statistic evaluate the existence of clusters in the spatial
#' context of two lattice data variab... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/amplican.R
\name{amplicanPipelineConservative}
\alias{amplicanPipelineConservative}
\title{Wraps main package functionality into one function.}
\usage{
amplicanPipelineConservative(config, fastq_folder, results_folder,
knit_reports = TRUE, ... | /man/amplicanPipelineConservative.Rd | no_license | vaofford/amplican | R | false | true | 6,902 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/amplican.R
\name{amplicanPipelineConservative}
\alias{amplicanPipelineConservative}
\title{Wraps main package functionality into one function.}
\usage{
amplicanPipelineConservative(config, fastq_folder, results_folder,
knit_reports = TRUE, ... |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(rCharts)
shinyUI(fluidPage(
# Application title
titlePanel("FITBIT!"),
# Sidebar with a slider input for number of b... | /fitbit/ui.R | no_license | danieltgustafson/gidb | R | false | false | 1,054 | r |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(rCharts)
shinyUI(fluidPage(
# Application title
titlePanel("FITBIT!"),
# Sidebar with a slider input for number of b... |
testlist <- list(a = 0L, b = 0L, x = c(-33L, -1696202753L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -16646145L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610386264-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 555 | r | testlist <- list(a = 0L, b = 0L, x = c(-33L, -1696202753L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -16646145L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... |
library(ggplot2)
data=read.csv('table.SC.csv')
pdf('AIT.pdf',width=6,height=6)
ggplot(data, aes(x=AIT, y= time, fill=AIT))+ geom_violin()+theme(axis.text.x = element_text(angle=90)) +theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),panel.background = element_blank(), axis.line = element_li... | /analysis/usability/AIT.R | no_license | xubeisi/good.software | R | false | false | 579 | r | library(ggplot2)
data=read.csv('table.SC.csv')
pdf('AIT.pdf',width=6,height=6)
ggplot(data, aes(x=AIT, y= time, fill=AIT))+ geom_violin()+theme(axis.text.x = element_text(angle=90)) +theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank(),panel.background = element_blank(), axis.line = element_li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.