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 |
|---|---|---|---|---|---|---|---|---|---|
library(plotly)
# Parallel computing
library(doParallel)
registerDoParallel(cores=4)
# n1: average rate of room background event creating 1 neutron
# n2: average rate of room background event creating 2 neutrons
# b1: average rate of beam-induced background event creating 1 neutron
# b2: average rate of beam-induced b... | /alpha_n_75Ga/Hendrik1/MC_beam_Hendrik.R | no_license | Fernando-Montes/alpha_n_cross_section | R | false | false | 3,143 | r | library(plotly)
# Parallel computing
library(doParallel)
registerDoParallel(cores=4)
# n1: average rate of room background event creating 1 neutron
# n2: average rate of room background event creating 2 neutrons
# b1: average rate of beam-induced background event creating 1 neutron
# b2: average rate of beam-induced b... |
source('testFunctions.R')
#------------initialization-------------------
M <- 200
N <- 100
m <- 30
n <- 10
crit <- sqrt(2*(m*log(M/m) + n*log(N/n))/m/n)
theta <- ((1:8) * 0.125 + 0.5) * crit
#------------iterations-----------------------
A <- length(theta)
B <- 200
MCPoi30 <- matrix(NA, nrow = A, ncol = B)
biPermuPoi30... | /simulationPoisson30.R | permissive | nozoeli/NPDetect | R | false | false | 721 | r | source('testFunctions.R')
#------------initialization-------------------
M <- 200
N <- 100
m <- 30
n <- 10
crit <- sqrt(2*(m*log(M/m) + n*log(N/n))/m/n)
theta <- ((1:8) * 0.125 + 0.5) * crit
#------------iterations-----------------------
A <- length(theta)
B <- 200
MCPoi30 <- matrix(NA, nrow = A, ncol = B)
biPermuPoi30... |
# DeclareDesign Wizard shiny app.
#
# This shiny app displays several tabs, each of which is a separate shiny module (http://shiny.rstudio.com/articles/modules.html)
# implemented in the respective "tab_ ... .R" file. Hence this file only implements the "skeleton" of the application.
#
# Clara Bicalho <clara.bicalho@wz... | /app.R | no_license | loankimrobinson/DDWizard | R | false | false | 6,253 | r | # DeclareDesign Wizard shiny app.
#
# This shiny app displays several tabs, each of which is a separate shiny module (http://shiny.rstudio.com/articles/modules.html)
# implemented in the respective "tab_ ... .R" file. Hence this file only implements the "skeleton" of the application.
#
# Clara Bicalho <clara.bicalho@wz... |
#create environment for global vars
#I chose global variables in order to facilitate code modularisation while keeping "passing arguments to"
# and "returning results from" functions to a minimum (speed and convenience)
#globvars = new.env(hash=TRUE, parent=emptyenv())
globvars = new.env(hash=TRUE)
#satisfying... | /R/globvars.R | no_license | ecustwy/ppso | R | false | false | 3,643 | r | #create environment for global vars
#I chose global variables in order to facilitate code modularisation while keeping "passing arguments to"
# and "returning results from" functions to a minimum (speed and convenience)
#globvars = new.env(hash=TRUE, parent=emptyenv())
globvars = new.env(hash=TRUE)
#satisfying... |
> diagDA
function (ls, cll, ts, pool = TRUE)
{
ls <- data.matrix(ls)
n <- nrow(ls)
p <- ncol(ls)
cl0 <- as.integer(min(cll, na.rm = TRUE) - 1)
cll <- as.integer(cll) - cl0
inaC <- is.na(cll)
clL <- cll[!inaC]
K <- max(clL)
if (K != length(unique(clL)))
stop(sQuote("cll"), " did not c... | /diagDA.R | no_license | xulijunji/voomDDA | R | false | false | 2,012 | r | > diagDA
function (ls, cll, ts, pool = TRUE)
{
ls <- data.matrix(ls)
n <- nrow(ls)
p <- ncol(ls)
cl0 <- as.integer(min(cll, na.rm = TRUE) - 1)
cll <- as.integer(cll) - cl0
inaC <- is.na(cll)
clL <- cll[!inaC]
K <- max(clL)
if (K != length(unique(clL)))
stop(sQuote("cll"), " did not c... |
#' Setting warbleR options
#'
#' \code{warbleR_options} sets global parameters for warbleR functions
#' @usage warbleR_options(reset = FALSE, ...)
#' @param reset Logical. If \code{TRUE} then all global parameters are removed. Default is \code{FALSE}.
#' @param ... Arguments in `parameter = value`` form, or a list of... | /R/warbleR_options.R | no_license | Tubbz-alt/warbleR | R | false | false | 5,360 | r | #' Setting warbleR options
#'
#' \code{warbleR_options} sets global parameters for warbleR functions
#' @usage warbleR_options(reset = FALSE, ...)
#' @param reset Logical. If \code{TRUE} then all global parameters are removed. Default is \code{FALSE}.
#' @param ... Arguments in `parameter = value`` form, or a list of... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metaplot.R
\name{scatter.folded}
\alias{scatter.folded}
\title{Scatterplot for Folded}
\usage{
\method{scatter}{folded}(x, ...)
}
\arguments{
\item{x}{folded}
\item{...}{unquoted names of variables to plot, or other named argument... | /man/scatter.folded.Rd | no_license | cran/fold | R | false | true | 479 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metaplot.R
\name{scatter.folded}
\alias{scatter.folded}
\title{Scatterplot for Folded}
\usage{
\method{scatter}{folded}(x, ...)
}
\arguments{
\item{x}{folded}
\item{...}{unquoted names of variables to plot, or other named argument... |
#1
s1 <- c(37, 49, 7, 38)
s2 = c(16, 37, 21, 42, 27, 40, 39, 51)
sp = s1+s2;sp
sn = (s1+s2)/2;sn
sd = s1/s2;sd
sm = s1*s2;sm
#2
a = seq(1,37,3);a
b = 1:13;b
length(a)
length(b)
c = a*b;c
d = a/b;d
e = a+b;e
f = a-b;f
#3
y = c(40,67,75,48,44,53,56,43,66,57,65,52,83,83,80,76,85,88,89,87)
mean(y)
median... | /1.r | no_license | dewashya/Prac.-of-R | R | false | false | 1,474 | r | #1
s1 <- c(37, 49, 7, 38)
s2 = c(16, 37, 21, 42, 27, 40, 39, 51)
sp = s1+s2;sp
sn = (s1+s2)/2;sn
sd = s1/s2;sd
sm = s1*s2;sm
#2
a = seq(1,37,3);a
b = 1:13;b
length(a)
length(b)
c = a*b;c
d = a/b;d
e = a+b;e
f = a-b;f
#3
y = c(40,67,75,48,44,53,56,43,66,57,65,52,83,83,80,76,85,88,89,87)
mean(y)
median... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tpadf2raster.R
\name{tpadf2raster}
\alias{tpadf2raster}
\title{Function to convert TIMESAT .tpa data.frame to an R raster.}
\usage{
tpadf2raster(x, base_image, variable)
}
\arguments{
\item{x}{A TPA data.frame as output by tpa2df}
\item{base... | /man/tpadf2raster.Rd | no_license | sumanjnu/teamlucc | R | false | true | 916 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tpadf2raster.R
\name{tpadf2raster}
\alias{tpadf2raster}
\title{Function to convert TIMESAT .tpa data.frame to an R raster.}
\usage{
tpadf2raster(x, base_image, variable)
}
\arguments{
\item{x}{A TPA data.frame as output by tpa2df}
\item{base... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/events.R
\name{live_events_gadget}
\alias{live_events_gadget}
\title{Events gadgets}
\usage{
live_events_gadget(account.id = NULL, key = NULL, which = c("past",
"upcoming", "draft", "private"))
}
\arguments{
\item{account.id}{your account i... | /man/live_events_gadget.Rd | no_license | JohnCoene/livestream | R | false | true | 720 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/events.R
\name{live_events_gadget}
\alias{live_events_gadget}
\title{Events gadgets}
\usage{
live_events_gadget(account.id = NULL, key = NULL, which = c("past",
"upcoming", "draft", "private"))
}
\arguments{
\item{account.id}{your account i... |
# Investigate shape of logistic curve for our optimization analysis
# Generalized logistic or Richards curve
richards <- function(x, A, K, B, nu, Q, C) A + (K - A)/((C + Q*exp(-B*x))^(1/nu))
curve(richards(x, A = 0.6, K = 0.2, B = 0.5, nu = 0.5, Q = 20, C = 1), from = 0, to = 10)
# My waste function. Q and C are se... | /exploratory/richardscurve.r | no_license | qdread/fwe | R | false | false | 3,928 | r | # Investigate shape of logistic curve for our optimization analysis
# Generalized logistic or Richards curve
richards <- function(x, A, K, B, nu, Q, C) A + (K - A)/((C + Q*exp(-B*x))^(1/nu))
curve(richards(x, A = 0.6, K = 0.2, B = 0.5, nu = 0.5, Q = 20, C = 1), from = 0, to = 10)
# My waste function. Q and C are se... |
# Jake Yeung
# Date of Creation: 2020-05-11
# File: ~/projects/scchic/scripts/rstudioserver_analysis/ZF_all_merged/8-finalize_plot_2D_distributions_fit_thresholds.OtherWinsizes.WtihGeneSets.R
# description
rm(list=ls())
library(ggrastr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(data.table)
library(Matrix... | /scripts/rstudioserver_analysis/ZF_all_merged/8-finalize_plot_2D_distributions_fit_thresholds.OtherWinsizes.WtihGeneSets.R | no_license | jakeyeung/sortchicAllScripts | R | false | false | 13,730 | r | # Jake Yeung
# Date of Creation: 2020-05-11
# File: ~/projects/scchic/scripts/rstudioserver_analysis/ZF_all_merged/8-finalize_plot_2D_distributions_fit_thresholds.OtherWinsizes.WtihGeneSets.R
# description
rm(list=ls())
library(ggrastr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(data.table)
library(Matrix... |
# info --------------------------------------------------------------------
# purpose: analyze and plot qPCR-based resection assay data (see Gnugge et al., 2018 [pmid 29458754] for details)
# author: Robert Gnuegge (robert.gnuegge@gmail.com)
# date: 02/22/22
# version: 1.0
# preamble ---------------------------------... | /14_qPCR_Resection_assays/qPCR_analysis.R | permissive | robert-gnuegge/MRX_nicking | R | false | false | 13,162 | r | # info --------------------------------------------------------------------
# purpose: analyze and plot qPCR-based resection assay data (see Gnugge et al., 2018 [pmid 29458754] for details)
# author: Robert Gnuegge (robert.gnuegge@gmail.com)
# date: 02/22/22
# version: 1.0
# preamble ---------------------------------... |
### environmental stuff -----
## working directory
setwd(switch(Sys.info()[["sysname"]],
"Linux" = "/media/permanent/xchange/tnauss",
"Windows" = "E:/xchange/tnauss"))
## packages and functions
lib <- c("raster", "rgdal", "TSA", "RColorBrewer")
Orcs::loadPkgs(lib)
source("R/cellHarmonics.... | /dfg_spp_exploratories/ndvieot_1981-2015/R/gimmsNdviHarmonics.R | no_license | environmentalinformatics-marburg/magic | R | false | false | 3,894 | r | ### environmental stuff -----
## working directory
setwd(switch(Sys.info()[["sysname"]],
"Linux" = "/media/permanent/xchange/tnauss",
"Windows" = "E:/xchange/tnauss"))
## packages and functions
lib <- c("raster", "rgdal", "TSA", "RColorBrewer")
Orcs::loadPkgs(lib)
source("R/cellHarmonics.... |
library(tidyverse)
library("iNEXT")
library(openxlsx)
library(rgdal)
dir_ini <- getwd()
##########################
#Data: DAINESE, Frei01: FREI06
##########################
data.site <- read.xlsx("Processing_files/Datasets_processing/DAINESE 2019 DATABASE/DATASETS/Frei01_Datacollection_pollination.xlsx",
... | /Processing_files/Datasets_Processing/DAINESE 2019 DATABASE/Breno_M_Freitas_Annona_squamosa_Brazil_2013.R | permissive | ibartomeus/OBservData | R | false | false | 10,281 | r |
library(tidyverse)
library("iNEXT")
library(openxlsx)
library(rgdal)
dir_ini <- getwd()
##########################
#Data: DAINESE, Frei01: FREI06
##########################
data.site <- read.xlsx("Processing_files/Datasets_processing/DAINESE 2019 DATABASE/DATASETS/Frei01_Datacollection_pollination.xlsx",
... |
#' @title interpolation
#' @description preforms a spatial interpolation either inverse distance weighted or kriging.
#' @param ticks = contour lines or strata definitions, 'define' will determine them according to the f(x) rule from Cochran 1977 (see Hubley et al. 2009)
#' @param nstrata = number of strata when ticks=... | /R/interpolation.r | no_license | BradHubley/SpatialHub | R | false | false | 5,873 | r | #' @title interpolation
#' @description preforms a spatial interpolation either inverse distance weighted or kriging.
#' @param ticks = contour lines or strata definitions, 'define' will determine them according to the f(x) rule from Cochran 1977 (see Hubley et al. 2009)
#' @param nstrata = number of strata when ticks=... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.servicecatalog_operations.R
\name{describe_tag_option}
\alias{describe_tag_option}
\title{Gets information about the specified TagOption}
\usage{
describe_tag_option(Id)
}
\arguments{
\item{Id}{[required] The TagOption identifier.}
}
\de... | /service/paws.servicecatalog/man/describe_tag_option.Rd | permissive | CR-Mercado/paws | R | false | true | 470 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.servicecatalog_operations.R
\name{describe_tag_option}
\alias{describe_tag_option}
\title{Gets information about the specified TagOption}
\usage{
describe_tag_option(Id)
}
\arguments{
\item{Id}{[required] The TagOption identifier.}
}
\de... |
#' @title subVector
#' @rdname subMultiple
#' @export subVector
#' @param toSub Named vector where the elements are the pattern and the names are the replacement values
#' @examples
#' theText <- c('Hi Bob & Cooper how is life today',
#' 'Anything happening now?',
#' 'Sally & Dave are playing with Jess & Julio | wit... | /R/subMultiple.r | no_license | kpivert/useful | R | false | false | 1,600 | r | #' @title subVector
#' @rdname subMultiple
#' @export subVector
#' @param toSub Named vector where the elements are the pattern and the names are the replacement values
#' @examples
#' theText <- c('Hi Bob & Cooper how is life today',
#' 'Anything happening now?',
#' 'Sally & Dave are playing with Jess & Julio | wit... |
sp_tables <- tibble::tribble(~table_num, ~table_id, ~table_name, ~dataset_id, ~implemented)
| /R/tables.R | permissive | jlacko/statnipokladna | R | false | false | 92 | r | sp_tables <- tibble::tribble(~table_num, ~table_id, ~table_name, ~dataset_id, ~implemented)
|
# 패키지 설치 및 로드
# 패키지 설치
install.packages("rJava")
install.packages("memoise")
install.packages("KoNLP")
# 사전 설정하기
useNIADic()
# 데이터 준비
# 데이터 불러오기
txt <- readLines("hiphop.txt")
head(txt)
# 특수문자 제거
install.packages("stringr")
library(stringr)
# 특수문자 제거
txt <- str_replace_all(txt, "\\W", " ")
class(txt)
View(txt... | /2020-04-03/wordcloud,varplot,ex1.R | no_license | 100-0-10/R-studio | R | false | false | 16,820 | r |
# 패키지 설치 및 로드
# 패키지 설치
install.packages("rJava")
install.packages("memoise")
install.packages("KoNLP")
# 사전 설정하기
useNIADic()
# 데이터 준비
# 데이터 불러오기
txt <- readLines("hiphop.txt")
head(txt)
# 특수문자 제거
install.packages("stringr")
library(stringr)
# 특수문자 제거
txt <- str_replace_all(txt, "\\W", " ")
class(txt)
View(txt... |
#==========================================================================================
# Project: Compare treatment response of Gilenya with Tecfidera
# Part II: create new vaibles and create table1 - table4
# Develop time: 12/10/2014 - .
# Developer: Zhao Jie
#=======================================... | /presentation/Gilenya vs Tecfidera POC/code/Jie/02. create table01-04.r | no_license | jzhao0802/documents_IMS | R | false | false | 34,101 | r | #==========================================================================================
# Project: Compare treatment response of Gilenya with Tecfidera
# Part II: create new vaibles and create table1 - table4
# Develop time: 12/10/2014 - .
# Developer: Zhao Jie
#=======================================... |
library(fs)
### Name: is_file
### Title: Functions to test for file types
### Aliases: is_file is_dir is_link
### ** Examples
## Don't show:
.old_wd <- setwd(tempdir())
## End(Don't show)
dir_create("d")
file_create("d/file.txt")
dir_create("d/dir")
link_create(path(path_abs("d"), "file.txt"), "d/link")
paths <-... | /data/genthat_extracted_code/fs/examples/is_file.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 457 | r | library(fs)
### Name: is_file
### Title: Functions to test for file types
### Aliases: is_file is_dir is_link
### ** Examples
## Don't show:
.old_wd <- setwd(tempdir())
## End(Don't show)
dir_create("d")
file_create("d/file.txt")
dir_create("d/dir")
link_create(path(path_abs("d"), "file.txt"), "d/link")
paths <-... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.R
\name{query_lake_poly}
\alias{query_lake_poly}
\title{Query polygon outline for LAGOS lakes}
\usage{
query_lake_poly(
lagoslakeid,
gis_path = lagosusgis_path(),
crs = albers_conic(),
utm = FALSE
)
}
\arguments{
\item{lagoslake... | /man/query_lake_poly.Rd | no_license | cont-limno/LAGOSUSgis | R | false | true | 588 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/query.R
\name{query_lake_poly}
\alias{query_lake_poly}
\title{Query polygon outline for LAGOS lakes}
\usage{
query_lake_poly(
lagoslakeid,
gis_path = lagosusgis_path(),
crs = albers_conic(),
utm = FALSE
)
}
\arguments{
\item{lagoslake... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vrac2.R
\name{create_dir}
\alias{create_dir}
\title{Create directory in a seafile repos}
\usage{
create_dir(dir = "/", repos_id = get_repo_id(),
seafile_url = get_seafile_url(), token = get_seafile_api_token())
}
\arguments{
\item... | /man/create_dir.Rd | no_license | VincentGuyader/seafile | R | false | true | 501 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vrac2.R
\name{create_dir}
\alias{create_dir}
\title{Create directory in a seafile repos}
\usage{
create_dir(dir = "/", repos_id = get_repo_id(),
seafile_url = get_seafile_url(), token = get_seafile_api_token())
}
\arguments{
\item... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 83
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 83
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query45_query24_1344/query45_query24_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 693 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 83
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 83
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query... |
library(DAAG)
### Name: plotSimScat
### Title: Simulate scatterplots, from 'lm' object with a single
### explanatory variable.
### Aliases: plotSimScat
### Keywords: regression graphics
### ** Examples
nihills.lm <- lm(timef~time, data=nihills)
plotSimDiags(nihills.lm)
## The function is currently defined as
fun... | /data/genthat_extracted_code/DAAG/examples/plotSimScat.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,593 | r | library(DAAG)
### Name: plotSimScat
### Title: Simulate scatterplots, from 'lm' object with a single
### explanatory variable.
### Aliases: plotSimScat
### Keywords: regression graphics
### ** Examples
nihills.lm <- lm(timef~time, data=nihills)
plotSimDiags(nihills.lm)
## The function is currently defined as
fun... |
\name{OTjitter}
\alias{OTjitter}
\title{
Add a small amount of noise to a numeric vector
}
\description{
Add a small amount of noise to a numeric vector keeping all the
values above the given threshold.
}
\usage{
OTjitter(x, threshold = NULL)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
... | /man/OTjitter.Rd | no_license | cran/Renext | R | false | false | 1,497 | rd | \name{OTjitter}
\alias{OTjitter}
\title{
Add a small amount of noise to a numeric vector
}
\description{
Add a small amount of noise to a numeric vector keeping all the
values above the given threshold.
}
\usage{
OTjitter(x, threshold = NULL)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
... |
job_getcurrent <- function(jobs) {
# search heuristic:
# - look first the active RStudio project
# - if that doesn't do it, look at working directory
# - if that doesn't do it, throw error
# get all job names and paths
job_names <- pull_jobnames(jobs)
job_paths <- pull_jobpaths(jobs)
# restrict to j... | /R/job_current.R | permissive | djnavarro/workbch | R | false | false | 1,692 | r |
job_getcurrent <- function(jobs) {
# search heuristic:
# - look first the active RStudio project
# - if that doesn't do it, look at working directory
# - if that doesn't do it, throw error
# get all job names and paths
job_names <- pull_jobnames(jobs)
job_paths <- pull_jobpaths(jobs)
# restrict to j... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/dataConstruct.R
\name{dataConstruct}
\alias{dataConstruct}
\title{Construct data object}
\usage{
dataConstruct(input_data)
}
\arguments{
\item{input_data}{A data frame of expression values (FPKM, TPM, UMI counts ...), with rows repres... | /man/dataConstruct.Rd | permissive | Victor-Chen7/RCA | R | false | false | 922 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/dataConstruct.R
\name{dataConstruct}
\alias{dataConstruct}
\title{Construct data object}
\usage{
dataConstruct(input_data)
}
\arguments{
\item{input_data}{A data frame of expression values (FPKM, TPM, UMI counts ...), with rows repres... |
library(remotes)
### Name: install_deps
### Title: Install package dependencies if needed.
### Aliases: install_deps
### ** Examples
## Not run: install_deps(".")
| /data/genthat_extracted_code/remotes/examples/install_deps.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 170 | r | library(remotes)
### Name: install_deps
### Title: Install package dependencies if needed.
### Aliases: install_deps
### ** Examples
## Not run: install_deps(".")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Incremental.R
\name{saveIncremental}
\alias{saveIncremental}
\title{Used in incremental mode to save values to a file}
\usage{
saveIncremental(data, fileName, ...)
}
\arguments{
\item{data}{The data to record in the file}
\item{fileName}{A C... | /man/saveIncremental.Rd | no_license | anthonysena/CohortGenerator | R | false | true | 647 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Incremental.R
\name{saveIncremental}
\alias{saveIncremental}
\title{Used in incremental mode to save values to a file}
\usage{
saveIncremental(data, fileName, ...)
}
\arguments{
\item{data}{The data to record in the file}
\item{fileName}{A C... |
require(datasets)
rankall <- function(outcome, rnknum="best")
{
fileName <- paste("week3data",sep = "/","outcome-of-care-measures.csv")
#valid outcome values
vaildoutcome <- c("heart attack","heart failure","pneumonia")
dFrame <- data.frame() #defining empty dataset to store clear data
validSta... | /assignment2/rankall.R | no_license | sudheerpaladugu/datasciencecoursera | R | false | false | 2,784 | r | require(datasets)
rankall <- function(outcome, rnknum="best")
{
fileName <- paste("week3data",sep = "/","outcome-of-care-measures.csv")
#valid outcome values
vaildoutcome <- c("heart attack","heart failure","pneumonia")
dFrame <- data.frame() #defining empty dataset to store clear data
validSta... |
library(EDR)
### Name: edr.R
### Title: Eigenvectors of the effective dimension reduction (EDR) space
### Aliases: edr.R
### Keywords: regression
### ** Examples
require(EDR)
## Not run: demo(edr_ex1)
## Not run: demo(edr_ex2)
| /data/genthat_extracted_code/EDR/examples/edr.R.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 234 | r | library(EDR)
### Name: edr.R
### Title: Eigenvectors of the effective dimension reduction (EDR) space
### Aliases: edr.R
### Keywords: regression
### ** Examples
require(EDR)
## Not run: demo(edr_ex1)
## Not run: demo(edr_ex2)
|
/code/fig3.r | no_license | DanielWYuan/H3K27me3 | R | false | false | 14,278 | r | ||
prcomp_WGCNA <- function(exp) {
require(WGCNA)
col <- rep("black",nrow(exp))
pc <- moduleEigengenes(t(exp),col)
pc <- pc$eigengenes
pc <- pc[,1]
names(pc) <- colnames(exp)
return(pc)
}
# suppress message when the package loads
sink("/dev/null")
# WGCNA package
ng_pca <- function(d, sample_s... | /R/pca2.R | permissive | bzhanglab/netgestalt-pub | R | false | false | 977 | r | prcomp_WGCNA <- function(exp) {
require(WGCNA)
col <- rep("black",nrow(exp))
pc <- moduleEigengenes(t(exp),col)
pc <- pc$eigengenes
pc <- pc[,1]
names(pc) <- colnames(exp)
return(pc)
}
# suppress message when the package loads
sink("/dev/null")
# WGCNA package
ng_pca <- function(d, sample_s... |
#Compare old and new GOS files
# Emily Linebarger 9/30/2019
library(data.table)
library(ggplot2)
old = readRDS("J:/Project/Evaluation/GF/resource_tracking/_gf_files_gos/gos/raw_data/raw_prepped_gos1.rds")
old[, start_date:=as.Date(start_date)]
#This file was saved on Sep. 30th, but was generated using the old GOS ... | /resource_tracking/archive/compare_gos_residuals.r | no_license | ihmeuw/gf | R | false | false | 2,441 | r | #Compare old and new GOS files
# Emily Linebarger 9/30/2019
library(data.table)
library(ggplot2)
old = readRDS("J:/Project/Evaluation/GF/resource_tracking/_gf_files_gos/gos/raw_data/raw_prepped_gos1.rds")
old[, start_date:=as.Date(start_date)]
#This file was saved on Sep. 30th, but was generated using the old GOS ... |
#### data rearrange from eddypro processed data ####
require(stringr)
muka <- read.csv('Data/rearrange data from eddy.csv')
t <- str_pad(muka$time, width=5, side="left", pad="0")
date <- paste(muka$date,t)
muka$date<- as.POSIXct(date, format = "%d/%m/%Y %H:%M", tz = "Asia/Kuala_Lumpur")
muka <- muka[,-2]
muka$win... | /full coding.R | no_license | missdinie/pCO2_analysis | R | false | false | 20,546 | r |
#### data rearrange from eddypro processed data ####
require(stringr)
muka <- read.csv('Data/rearrange data from eddy.csv')
t <- str_pad(muka$time, width=5, side="left", pad="0")
date <- paste(muka$date,t)
muka$date<- as.POSIXct(date, format = "%d/%m/%Y %H:%M", tz = "Asia/Kuala_Lumpur")
muka <- muka[,-2]
muka$win... |
## read the data from the file
dataR <- read.csv("household_power_consumption.txt" ,header=T,sep=";",stringsAsFactors=F, na.strings="?",colClasses=c("character", "character", "numeric", "numeric", "numeric","numeric","numeric", "numeric", "numeric"))
## subset the data from large data set
dataR <- dataR[dataR$Date %in... | /plot3.R | no_license | svsubbarao/ExData_Plotting1 | R | false | false | 875 | r | ## read the data from the file
dataR <- read.csv("household_power_consumption.txt" ,header=T,sep=";",stringsAsFactors=F, na.strings="?",colClasses=c("character", "character", "numeric", "numeric", "numeric","numeric","numeric", "numeric", "numeric"))
## subset the data from large data set
dataR <- dataR[dataR$Date %in... |
Exemple1<-matrix(c(21,2,19,13),byrow=T,nrow=2,dimnames=list(c("Traitement","Contrôle"),c("Tumeur présente","Tumeur absente")))
Exemple1
mosaicplot(Exemple1, type = "pearson", shade = T, las = 2, main = "Associations et résidus du test du chi2")
chisq.test(Exemple1,correct=FALSE)
chisq.test(Exemple1,correct=FALSE)$expec... | /TD5_GLM/Exemples_reglog.R | no_license | fbertran/m1bio_s2 | R | false | false | 2,574 | r | Exemple1<-matrix(c(21,2,19,13),byrow=T,nrow=2,dimnames=list(c("Traitement","Contrôle"),c("Tumeur présente","Tumeur absente")))
Exemple1
mosaicplot(Exemple1, type = "pearson", shade = T, las = 2, main = "Associations et résidus du test du chi2")
chisq.test(Exemple1,correct=FALSE)
chisq.test(Exemple1,correct=FALSE)$expec... |
# Incidence plots of recent cases
# https://rviews.rstudio.com/2020/03/05/covid-19-epidemiology-with-r/
rm(list=ls()); # Clear environment
library('jsonlite')
library('ggplot2')
# Set how many days you wish to see
last <- 90
areas <- list("Hart", "Rushmoor")
for (area in areas) {
# Import data from coronavi... | /analysis/local-cases-smooth-recent.R | permissive | paulmaunders/coronavirus-graphs | R | false | false | 3,834 | r | # Incidence plots of recent cases
# https://rviews.rstudio.com/2020/03/05/covid-19-epidemiology-with-r/
rm(list=ls()); # Clear environment
library('jsonlite')
library('ggplot2')
# Set how many days you wish to see
last <- 90
areas <- list("Hart", "Rushmoor")
for (area in areas) {
# Import data from coronavi... |
single_feature_panel_ui <- function(id, features, datasets_names, conditions) {
ns <- NS(id)
tabPanel(
id,
fluidPage(
tags$head(
tags$style(type="text/css", "select { max-width: 240px; }"),
tags$style(type="text/css", ".span4 { max-width: 290px; }... | /R/module_single_feature.R | no_license | ComputationalProteomics/FusariumResponseInOatMethods | R | false | false | 10,691 | r | single_feature_panel_ui <- function(id, features, datasets_names, conditions) {
ns <- NS(id)
tabPanel(
id,
fluidPage(
tags$head(
tags$style(type="text/css", "select { max-width: 240px; }"),
tags$style(type="text/css", ".span4 { max-width: 290px; }... |
setwd("/data/js95/ALSPAC/ARIES/F7/biopsy2019-rerun/")
## packages
## data
# load("ARIES_betas_noTwin_rfaminst_pcs_20181023.Rdata")
load("ARIES_BP_rerun_20200225.Rdata")
# colnames(aries)
outcome.vec <- colnames(aries)[103:ncol(aries)]
## double check the variable types
# lapply(aries[,1:101], function(x){
# cla... | /ALSPAC_data_differences/2. SLCMA scripts/04-newDNAm-educFWL-sI/06-newDNAm-educFWL-sI-abuse-20200415.R | no_license | alussier17/alussier_scripts | R | false | false | 1,901 | r |
setwd("/data/js95/ALSPAC/ARIES/F7/biopsy2019-rerun/")
## packages
## data
# load("ARIES_betas_noTwin_rfaminst_pcs_20181023.Rdata")
load("ARIES_BP_rerun_20200225.Rdata")
# colnames(aries)
outcome.vec <- colnames(aries)[103:ncol(aries)]
## double check the variable types
# lapply(aries[,1:101], function(x){
# cla... |
#' polypoly: Helper functions for orthogonal polynomials
#'
#' This package provides helpful functions for orthogonal polynomials created by
#' [stats::poly()]. These include plotting [poly_plot()], tidying [poly_melt()],
#' rescaling [poly_rescale()], and manipulating a dataframe
#' [poly_add_columns()].
#'
#' ... | /R/polypoly-package.R | no_license | cran/polypoly | R | false | false | 7,757 | r | #' polypoly: Helper functions for orthogonal polynomials
#'
#' This package provides helpful functions for orthogonal polynomials created by
#' [stats::poly()]. These include plotting [poly_plot()], tidying [poly_melt()],
#' rescaling [poly_rescale()], and manipulating a dataframe
#' [poly_add_columns()].
#'
#' ... |
# Empirical Application ====
# Implementation of Uhlig SV
# In Sample Analysis
# Date: 20.06.20
# Author: HB
# Contact: hbusshof@smail.uni-koeln.de
library(MASS)
library(stats)
library(coda)
library(mcmcse)
library(tidyverse)
library(reshape2)
library(plotly)
# setwd("~/Desktop/bayesian-gmvp/Computation/")
set.see... | /code/kmu_is.R | no_license | hannahbus/gmvp | R | false | false | 2,485 | r | # Empirical Application ====
# Implementation of Uhlig SV
# In Sample Analysis
# Date: 20.06.20
# Author: HB
# Contact: hbusshof@smail.uni-koeln.de
library(MASS)
library(stats)
library(coda)
library(mcmcse)
library(tidyverse)
library(reshape2)
library(plotly)
# setwd("~/Desktop/bayesian-gmvp/Computation/")
set.see... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/applyLayout.R
\name{applyLayout}
\alias{applyLayout}
\title{Apply a layout to the current network}
\usage{
applyLayout(layout, base.url = "http://localhost:1234/v1")
}
\arguments{
\item{layout}{(char) name of the layut, run commandHelp('layou... | /for-scripters/R/r2cytoscape/man/applyLayout.Rd | permissive | vivelespoireaux/cytoscape-automation | R | false | true | 708 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/applyLayout.R
\name{applyLayout}
\alias{applyLayout}
\title{Apply a layout to the current network}
\usage{
applyLayout(layout, base.url = "http://localhost:1234/v1")
}
\arguments{
\item{layout}{(char) name of the layut, run commandHelp('layou... |
# global.R script for Time-Use Optimisation shinydashboard prototype App
# Objects that are not reactive are written here
# -----------------------------------------------------------------------------
# Load package libraries
require(shinydashboard)
require(ggplot2)
require(compositions)
require(r2d3)
# Defin... | /apps/timeuse_optimisation_v1/global.R | no_license | jhhughes256/comp_app | R | false | false | 868 | r | # global.R script for Time-Use Optimisation shinydashboard prototype App
# Objects that are not reactive are written here
# -----------------------------------------------------------------------------
# Load package libraries
require(shinydashboard)
require(ggplot2)
require(compositions)
require(r2d3)
# Defin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.neptune_operations.R
\name{describe_pending_maintenance_actions}
\alias{describe_pending_maintenance_actions}
\title{Returns a list of resources (for example, DB instances) that have at least one pending maintenance action}
\usage{
descr... | /service/paws.neptune/man/describe_pending_maintenance_actions.Rd | permissive | CR-Mercado/paws | R | false | true | 2,049 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.neptune_operations.R
\name{describe_pending_maintenance_actions}
\alias{describe_pending_maintenance_actions}
\title{Returns a list of resources (for example, DB instances) that have at least one pending maintenance action}
\usage{
descr... |
#setwd("R/ExploratoryDataAnalysis/CourseProject1")
# Read in the data
data <- read.csv("household_power_consumption.txt", header=TRUE, sep=";")
# Clean up the date and time formats
data$Date <- as.Date(strptime(data$Date, format = "%d/%m/%Y"))
times <- strptime(data$Time, format = "%H:%M:%S")
data$Time <- strftime(ti... | /R/ExploratoryDataAnalysis/CourseProject1/plot1.R | no_license | theconnectome/ExData_Plotting1 | R | false | false | 943 | r | #setwd("R/ExploratoryDataAnalysis/CourseProject1")
# Read in the data
data <- read.csv("household_power_consumption.txt", header=TRUE, sep=";")
# Clean up the date and time formats
data$Date <- as.Date(strptime(data$Date, format = "%d/%m/%Y"))
times <- strptime(data$Time, format = "%H:%M:%S")
data$Time <- strftime(ti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/listMissing.R
\name{listMissing}
\alias{listMissing}
\title{flags variables and samples exceeding certain level of missingness}
\usage{
listMissing(x, maxMissVar = 0.25, maxMissSamp = 0.25,
rmMissing = FALSE)
}
\arguments{
\item{x}{(matrix ... | /man/listMissing.Rd | no_license | shraddhapai/dataExplore | R | false | true | 981 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/listMissing.R
\name{listMissing}
\alias{listMissing}
\title{flags variables and samples exceeding certain level of missingness}
\usage{
listMissing(x, maxMissVar = 0.25, maxMissSamp = 0.25,
rmMissing = FALSE)
}
\arguments{
\item{x}{(matrix ... |
#' Vector of weighted points
#'
#' This class is an extension (but not a subclass of) [point()]. It simply
#' attaches a numeric weight to the point that is carried along with it.
#' However, most of the functionality of points are lost with this vector class
#' as all the a math and sorting operations are gone due to ... | /R/point_w.R | permissive | KevCaz/euclid | R | false | false | 3,403 | r | #' Vector of weighted points
#'
#' This class is an extension (but not a subclass of) [point()]. It simply
#' attaches a numeric weight to the point that is carried along with it.
#' However, most of the functionality of points are lost with this vector class
#' as all the a math and sorting operations are gone due to ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MiscFuns.R
\name{model.matrix.fixest}
\alias{model.matrix.fixest}
\title{Design matrix of a \code{femlm} model}
\usage{
\method{model.matrix}{fixest}(object, data, type = "rhs", na.rm = TRUE, ...)
}
\arguments{
\item{object}{A \code{... | /fixest/man/model.matrix.fixest.Rd | no_license | akhikolla/InformationHouse | R | false | true | 1,815 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MiscFuns.R
\name{model.matrix.fixest}
\alias{model.matrix.fixest}
\title{Design matrix of a \code{femlm} model}
\usage{
\method{model.matrix}{fixest}(object, data, type = "rhs", na.rm = TRUE, ...)
}
\arguments{
\item{object}{A \code{... |
\name{NEWS}
\title{News for Package 'Rcpp'}
\newcommand{\cpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
\section{Changes in Rcpp version 0.12.1 (2015-09-10)}{
\itemize{
\item Changes in Rcpp API:
\itemize{
\item Correct use of WIN32 instead of _WIN32 to please Windows 10
\item Add ... | /win-library/3.2/Rcpp/NEWS.Rd | no_license | lawrenceouyang/191R | R | false | false | 94,394 | rd | \name{NEWS}
\title{News for Package 'Rcpp'}
\newcommand{\cpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
\section{Changes in Rcpp version 0.12.1 (2015-09-10)}{
\itemize{
\item Changes in Rcpp API:
\itemize{
\item Correct use of WIN32 instead of _WIN32 to please Windows 10
\item Add ... |
#' PipelinePredictiveModelling_Training
#'
#' @description Processes the data and runs training algorithms
#' @param Biomarker.Set: 'INF' or 'CVD.INF'
#' @param Drug: 'Tofa' or 'Etan'
#' @export
PipelinePredictiveModelling_Training<-function(Time.point='Hneg24',
n.bal.samp=50,
... | /R/PipelinePredictiveModelling_Training.R | no_license | LewisT1987/DREAM_Challenge | R | false | false | 2,224 | r | #' PipelinePredictiveModelling_Training
#'
#' @description Processes the data and runs training algorithms
#' @param Biomarker.Set: 'INF' or 'CVD.INF'
#' @param Drug: 'Tofa' or 'Etan'
#' @export
PipelinePredictiveModelling_Training<-function(Time.point='Hneg24',
n.bal.samp=50,
... |
### -------------------- Exercise 1: Creating data frames --------------------
## Create a vector of the number of points the Seahawks scored in the first 5 games
## Hint: google "Seahawks scores", or check the football database:
## http://www.footballdb.com/teams/nfl/seattle-seahawks/results
## here 'Result' displays... | /exercise-1/exercise.R | permissive | DavidJ2015/ch09-dataframes | R | false | false | 1,150 | r | ### -------------------- Exercise 1: Creating data frames --------------------
## Create a vector of the number of points the Seahawks scored in the first 5 games
## Hint: google "Seahawks scores", or check the football database:
## http://www.footballdb.com/teams/nfl/seattle-seahawks/results
## here 'Result' displays... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Ecoligenomics.R
\docType{package}
\name{Ecoligenomics}
\alias{Ecoligenomics}
\title{Ecoligenomics package}
\description{
This package can be used in order to type (using E coli MLST scheme) and screen (e.g. for the presence of virulence) E co... | /man/Ecoligenomics.Rd | no_license | JeromeAmbroise/EcoliGenomic | R | false | true | 467 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Ecoligenomics.R
\docType{package}
\name{Ecoligenomics}
\alias{Ecoligenomics}
\title{Ecoligenomics package}
\description{
This package can be used in order to type (using E coli MLST scheme) and screen (e.g. for the presence of virulence) E co... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/automl_objects.R
\name{OutputConfig}
\alias{OutputConfig}
\title{OutputConfig Object}
\usage{
OutputConfig(gcsDestination = NULL, bigqueryDestination = NULL)
}
\arguments{
\item{gcsDestination}{The Google Cloud Storage location where the outp... | /googleautomlv1beta1.auto/man/OutputConfig.Rd | no_license | justinjm/autoGoogleAPI | R | false | true | 1,700 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/automl_objects.R
\name{OutputConfig}
\alias{OutputConfig}
\title{OutputConfig Object}
\usage{
OutputConfig(gcsDestination = NULL, bigqueryDestination = NULL)
}
\arguments{
\item{gcsDestination}{The Google Cloud Storage location where the outp... |
#' Get records from an agentSim history
#'
#' @param sim An agentSim simulation
#'
#' @return a tibble
#' @export
#'
#' @examples
#' #' #Example simulation in which each agent prints its own id to the console
#' init_pop <- tibble::tibble(
#' id = c(1:50),
#' x = runif(50, 0, 1),
#' y = runif(50, 0, 1)
#' )
#'
... | /R/analysis.R | no_license | brandmaier/agentSim | R | false | false | 950 | r | #' Get records from an agentSim history
#'
#' @param sim An agentSim simulation
#'
#' @return a tibble
#' @export
#'
#' @examples
#' #' #Example simulation in which each agent prints its own id to the console
#' init_pop <- tibble::tibble(
#' id = c(1:50),
#' x = runif(50, 0, 1),
#' y = runif(50, 0, 1)
#' )
#'
... |
#' kableExtra
#'
#' @description When we are talking about table generators in R,
#' [knitr](https://yihui.name/knitr/)'s `kable()` function wins lots of flavor
#' by its ultimate simplicity. Unlike those powerful table rendering engines
#' such as [`xtable`](https://CRAN.R-project.org/package=xtable), the philosophy
#... | /R/kableExtra-package.R | no_license | EhrmannS/kableExtra | R | false | false | 3,802 | r | #' kableExtra
#'
#' @description When we are talking about table generators in R,
#' [knitr](https://yihui.name/knitr/)'s `kable()` function wins lots of flavor
#' by its ultimate simplicity. Unlike those powerful table rendering engines
#' such as [`xtable`](https://CRAN.R-project.org/package=xtable), the philosophy
#... |
### R code from vignette source 'MLCM/MLCM.Stex'
###################################################
### code chunk number 1: MLCM.Stex:8-27
###################################################
options(width=65, digits = 3)
pkg <- search()[2]
while (search()[2] != if(.Platform$GUI == "AQUA") "tools:RGUI" else "packag... | /inst/scripts/Ch8.R | no_license | cran/MPDiR | R | false | false | 13,913 | r | ### R code from vignette source 'MLCM/MLCM.Stex'
###################################################
### code chunk number 1: MLCM.Stex:8-27
###################################################
options(width=65, digits = 3)
pkg <- search()[2]
while (search()[2] != if(.Platform$GUI == "AQUA") "tools:RGUI" else "packag... |
processing_vms <- function(data, vessel = "Cod_Barco", harbor){
library(dplyr)
id_vessel <- lapply(split(data, data[[vessel]], drop = TRUE), function(data_vessel){
data_vessel <- data_vessel[order(data_vessel$Date),]
if(length(which(duplicated(data_vessel$Date)== T)) > 0){
data_vessel <- da... | /R/processing_vms.R | no_license | PabloMBooster/vmsR | R | false | false | 2,310 | r | processing_vms <- function(data, vessel = "Cod_Barco", harbor){
library(dplyr)
id_vessel <- lapply(split(data, data[[vessel]], drop = TRUE), function(data_vessel){
data_vessel <- data_vessel[order(data_vessel$Date),]
if(length(which(duplicated(data_vessel$Date)== T)) > 0){
data_vessel <- da... |
#' Add a TauCharts tooltip
#'
#' @param tau taucharts object
#' @param fields character vector of fields to display in the tooltip
#' (default is to use all columns in \code{data})
#' @seealso \code{\link{cars_data}} dataset
#' @export
#' @examples
#' if (interactive()) {
#' data(cars_data)
#' tauchart(cars_data... | /R/plugins.R | no_license | ktargows/taucharts | R | false | false | 6,114 | r | #' Add a TauCharts tooltip
#'
#' @param tau taucharts object
#' @param fields character vector of fields to display in the tooltip
#' (default is to use all columns in \code{data})
#' @seealso \code{\link{cars_data}} dataset
#' @export
#' @examples
#' if (interactive()) {
#' data(cars_data)
#' tauchart(cars_data... |
# load datasets only if they aren't already loaded
if (!exists("NEI")) {
NEI <- readRDS("summarySCC_PM25.rds")
}
if (!exists("SCC")) {
SCC <- readRDS("Source_Classification_Code.rds")
}
library(ggplot2)
library(plyr) # required for ddply
# select only SCCs which are vehicle related -- using grep to find proper ro... | /plot6.R | no_license | serweryn/coursera-exdata-project02 | R | false | false | 1,748 | r | # load datasets only if they aren't already loaded
if (!exists("NEI")) {
NEI <- readRDS("summarySCC_PM25.rds")
}
if (!exists("SCC")) {
SCC <- readRDS("Source_Classification_Code.rds")
}
library(ggplot2)
library(plyr) # required for ddply
# select only SCCs which are vehicle related -- using grep to find proper ro... |
library(tigerstats)
### Name: SlowGoodness
### Title: Chi Square Resampler (One at a Time) for Goodness-of-Fit
### Aliases: SlowGoodness
### ** Examples
## Not run:
##D throws <- c(one=8,two=18,three=11,four=7,five=9,six=7)
##D SlowGoodness(throws,p=rep(1/6,6))
## End(Not run)
| /data/genthat_extracted_code/tigerstats/examples/SlowGoodness.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 286 | r | library(tigerstats)
### Name: SlowGoodness
### Title: Chi Square Resampler (One at a Time) for Goodness-of-Fit
### Aliases: SlowGoodness
### ** Examples
## Not run:
##D throws <- c(one=8,two=18,three=11,four=7,five=9,six=7)
##D SlowGoodness(throws,p=rep(1/6,6))
## End(Not run)
|
#' check input to cnView
#'
#' Perform a data quality check for inputs to cnView
#' @name cnView_qual
#' @param x a data frame with columns chromosome, coordinate, cn
#' @param y a data frame with columns "chrom", "chromStart", "chromEnd", "name",
#' "gieStain"
#' @param CNscale Character string specifying if copy numb... | /R/cnView_qual.R | permissive | griffithlab/GenVisR | R | false | false | 5,843 | r | #' check input to cnView
#'
#' Perform a data quality check for inputs to cnView
#' @name cnView_qual
#' @param x a data frame with columns chromosome, coordinate, cn
#' @param y a data frame with columns "chrom", "chromStart", "chromEnd", "name",
#' "gieStain"
#' @param CNscale Character string specifying if copy numb... |
\name{combine}
\alias{combine}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
combine
}
\description{
Combine adjacent segments if they are similar.
}
\usage{
combine(cnvobj, alpha = 0.05)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{cnvobj}{
%% ~~Describe \... | /man/combine.Rd | no_license | cran/PSCN | R | false | false | 560 | rd | \name{combine}
\alias{combine}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
combine
}
\description{
Combine adjacent segments if they are similar.
}
\usage{
combine(cnvobj, alpha = 0.05)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{cnvobj}{
%% ~~Describe \... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fs_data_viz_preparation.R
\name{fold_spec_chart_data}
\alias{fold_spec_chart_data}
\title{Data parser for fold-specificity rectangle plot}
\usage{
fold_spec_chart_data(fs_res_up, fs_res_down, scope = NULL)
}
\arguments{
\item{fs_res_... | /man/fold_spec_chart_data.Rd | no_license | DanWiebe/fsgor | R | false | true | 988 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fs_data_viz_preparation.R
\name{fold_spec_chart_data}
\alias{fold_spec_chart_data}
\title{Data parser for fold-specificity rectangle plot}
\usage{
fold_spec_chart_data(fs_res_up, fs_res_down, scope = NULL)
}
\arguments{
\item{fs_res_... |
#' Create interactive plot for bioindicator versus year
#' @param bioindicator string with column of \code{data}
#' with bioindicator, either 'onderkaaklengte' or 'ontweid_gewicht'
#' @param sourceIndicator character, defines the data source to be used for
#' bioindicator 'onderkaak_comp_bron'
#' @param type animal typ... | /reporting-grofwild/R/plotBioindicator.R | permissive | inbo/reporting-rshiny-grofwildjacht | R | false | false | 7,281 | r | #' Create interactive plot for bioindicator versus year
#' @param bioindicator string with column of \code{data}
#' with bioindicator, either 'onderkaaklengte' or 'ontweid_gewicht'
#' @param sourceIndicator character, defines the data source to be used for
#' bioindicator 'onderkaak_comp_bron'
#' @param type animal typ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Dictionary_EngLish_Words.R
\name{Word3}
\alias{Word3}
\title{Add words to my dictionary}
\usage{
Word3(Stored_Data_File = "~/Documents/ADMIN/Academic_Words/Word_Database.csv")
}
\description{
Add words to my dictionary
}
| /man/Word3.Rd | no_license | likanzhan/acqr | R | false | true | 299 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Dictionary_EngLish_Words.R
\name{Word3}
\alias{Word3}
\title{Add words to my dictionary}
\usage{
Word3(Stored_Data_File = "~/Documents/ADMIN/Academic_Words/Word_Database.csv")
}
\description{
Add words to my dictionary
}
|
#----- -2 ----- -1 ----- 0 ----- 1 ------ 2
x <- rnorm(1)
# é muito similar ao while, a grande diferença é que o while roda enquanto a condição for atendida e já o IF roda apenas uma vez caso a condição for atendida
if( x > 1) {
answer <- "Maior que 1"
}
# se não for colocado o el... | /R Programming Basic and Intermediate/the IF statement.R | no_license | guilhermeaugusto9/R-Userful-Scripts | R | false | false | 1,070 | r |
#----- -2 ----- -1 ----- 0 ----- 1 ------ 2
x <- rnorm(1)
# é muito similar ao while, a grande diferença é que o while roda enquanto a condição for atendida e já o IF roda apenas uma vez caso a condição for atendida
if( x > 1) {
answer <- "Maior que 1"
}
# se não for colocado o el... |
#' Generate a simulated microbial community.
#'
#' Following the approach of Steven et al. 2017, `generate_community` generates
#' a simulated microbial community, including both cell and ribosomal RNA
#' abundances.
#'
#' rDNA abundances (i.e. cell counts) for each OTU are drawn from a log-normal
#' distribution with... | /R/generate_community.R | no_license | wilkox/rdrsimulate | R | false | false | 3,837 | r | #' Generate a simulated microbial community.
#'
#' Following the approach of Steven et al. 2017, `generate_community` generates
#' a simulated microbial community, including both cell and ribosomal RNA
#' abundances.
#'
#' rDNA abundances (i.e. cell counts) for each OTU are drawn from a log-normal
#' distribution with... |
\name{ud_colours}
\alias{ud_colours}
\title{
Set colours for UpAndDown plots
}
\description{
Provides a colour scheme for UpAndDown plots.
}
\usage{
ud_colours(colours = c("grey75", "grey65", "red", "blue", "green"), colors,
gcpal=colorblind_pal()(8))
}
\arguments{
\item{colours}{
A set of colours for UpA... | /man/ud_colours.Rd | no_license | heike/UpAndDown | R | false | false | 2,166 | rd | \name{ud_colours}
\alias{ud_colours}
\title{
Set colours for UpAndDown plots
}
\description{
Provides a colour scheme for UpAndDown plots.
}
\usage{
ud_colours(colours = c("grey75", "grey65", "red", "blue", "green"), colors,
gcpal=colorblind_pal()(8))
}
\arguments{
\item{colours}{
A set of colours for UpA... |
#----------------------------------------------------------------------------------------------------------------------------
filesGTR = c(paste0(getwd(), "/UserStudyData-JSON&CSV/GTR2/0/0.csv"),
paste0(getwd(), "/UserStudyData-JSON&CSV/GTR2/1/0.csv"),
paste0(getwd(), "/UserStudyData-JSON&CS... | /engagementRate-Calculator.R | no_license | Sabaoon96/GameEngagement_Classifier_Visualiser | R | false | false | 4,193 | r | #----------------------------------------------------------------------------------------------------------------------------
filesGTR = c(paste0(getwd(), "/UserStudyData-JSON&CSV/GTR2/0/0.csv"),
paste0(getwd(), "/UserStudyData-JSON&CSV/GTR2/1/0.csv"),
paste0(getwd(), "/UserStudyData-JSON&CS... |
## CBO Estimates viz
## Dumbbell geom and theme courtesty @hrbrmstr
library(tidyverse)
library(ggalt)
library(hrbrthemes)
library(Cairo)
## Make a "figures" subdirectory if one doesn't exist
ifelse(!dir.exists(file.path("figures")), dir.create(file.path("figures")), FALSE)
data <- read_csv("data/cbo-table4.csv")
##... | /trumpcare.r | no_license | kjhealy/cbofigure | R | false | false | 2,195 | r | ## CBO Estimates viz
## Dumbbell geom and theme courtesty @hrbrmstr
library(tidyverse)
library(ggalt)
library(hrbrthemes)
library(Cairo)
## Make a "figures" subdirectory if one doesn't exist
ifelse(!dir.exists(file.path("figures")), dir.create(file.path("figures")), FALSE)
data <- read_csv("data/cbo-table4.csv")
##... |
library(rsample)
### Name: drinks
### Title: Sample Time Series Data
### Aliases: drinks
### Keywords: datasets
### ** Examples
data(drinks)
str(drinks)
| /data/genthat_extracted_code/rsample/examples/drinks.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 160 | r | library(rsample)
### Name: drinks
### Title: Sample Time Series Data
### Aliases: drinks
### Keywords: datasets
### ** Examples
data(drinks)
str(drinks)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_data.R
\name{read_forcing}
\alias{read_forcing}
\title{Read forcing data from CSV}
\usage{
read_forcing(
scenario_list,
temp_prior,
N_temp,
climate_prior_kde,
mean_temp,
dataset
)
}
\arguments{
\item{scenario_list}{Scenarios ... | /modules/emulandice/shared/emulandice/man/read_forcing.Rd | permissive | radical-collaboration/facts | R | false | true | 668 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_data.R
\name{read_forcing}
\alias{read_forcing}
\title{Read forcing data from CSV}
\usage{
read_forcing(
scenario_list,
temp_prior,
N_temp,
climate_prior_kde,
mean_temp,
dataset
)
}
\arguments{
\item{scenario_list}{Scenarios ... |
## Function to support the lexical scoping of a inverse matrix calculation
## Input a square matrix in makeCachMatrix
makeCacheMatrix = function(ma = matrix()){
m <- NULL #declare m and set to null
set <- function(y) { #set the values for ma and m to exist in the parent environment
ma <<- y
m <<- NULL
... | /cachematrix.R | no_license | sjduenwald/ProgrammingAssignment2 | R | false | false | 1,339 | r | ## Function to support the lexical scoping of a inverse matrix calculation
## Input a square matrix in makeCachMatrix
makeCacheMatrix = function(ma = matrix()){
m <- NULL #declare m and set to null
set <- function(y) { #set the values for ma and m to exist in the parent environment
ma <<- y
m <<- NULL
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/install_github.R
\name{install_github}
\alias{install_github}
\title{Install R package from GitHub}
\usage{
install_github(repo, host = "github.com", credentials = NULL,
build_args = NULL, build_vignettes = TRUE, uninstall = FALSE,
verbos... | /man/install_github.Rd | no_license | imanuelcostigan/ghit | R | false | true | 3,265 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/install_github.R
\name{install_github}
\alias{install_github}
\title{Install R package from GitHub}
\usage{
install_github(repo, host = "github.com", credentials = NULL,
build_args = NULL, build_vignettes = TRUE, uninstall = FALSE,
verbos... |
# this is main file to estimate a route choice model using path-size logit
#----load packages-----
library("stringr", lib.loc="~/R/win-library/3.2")
library("oce", lib.loc="~/R/win-library/3.2")
library("data.table", lib.loc="~/R/win-library/3.2")
#==================INPUT FILES===========================
# 1) ... | /process-gtfs/public-transit-graph-generation/R files/MainFile_simEstimate_PSL.R | no_license | jimioke/virtual-city-generator | R | false | false | 4,399 | r | # this is main file to estimate a route choice model using path-size logit
#----load packages-----
library("stringr", lib.loc="~/R/win-library/3.2")
library("oce", lib.loc="~/R/win-library/3.2")
library("data.table", lib.loc="~/R/win-library/3.2")
#==================INPUT FILES===========================
# 1) ... |
## makeCacheMatrix and cacheSolve are used to create a special matrix,
## a "CacheMatrix", whose inverse needs to be computed only once.
## The first call for the inverse of the CacheMatrix using cacheSolve
## is computed with the solve function.
## Any subsequent call to cacheSolve on the same CacheMatrix will return
... | /cachematrix.R | no_license | nickypie/ProgrammingAssignment2 | R | false | false | 3,112 | r | ## makeCacheMatrix and cacheSolve are used to create a special matrix,
## a "CacheMatrix", whose inverse needs to be computed only once.
## The first call for the inverse of the CacheMatrix using cacheSolve
## is computed with the solve function.
## Any subsequent call to cacheSolve on the same CacheMatrix will return
... |
#!/usr/bin/env Rscript
## The script was used to run PennCNV on Minerva high performance cluster.
## You need to modifiy it according to the system you are using if you would like to use it.
## Please refer to original PennCNV documents (http://penncnv.openbioinformatics.org/en/latest/) for more information
path_to_p... | /01_initial_call/run_PennCNV/step.5.clean.PennCNV.res.R | no_license | jeffverboon/ensembleCNV | R | false | false | 4,357 | r | #!/usr/bin/env Rscript
## The script was used to run PennCNV on Minerva high performance cluster.
## You need to modifiy it according to the system you are using if you would like to use it.
## Please refer to original PennCNV documents (http://penncnv.openbioinformatics.org/en/latest/) for more information
path_to_p... |
test_that("non0ix")
test_that("binarize works", {
mat <- matrix(sample(c(rep.int(0, 1000), 0:100), 20000, T), 200)
rrm <- Matrix(mat, sparse = T)
ngc <- as(mat > 0, "ngCMatrix")
bin <- binarize(rrm, 1)
expect_equivalent(ngc, bin)
})
test_that("split know unknown works as expected",{
.splitKU ... | /tests/testthat/test-utils.R | no_license | vspinu/recor | R | false | false | 1,097 | r |
test_that("non0ix")
test_that("binarize works", {
mat <- matrix(sample(c(rep.int(0, 1000), 0:100), 20000, T), 200)
rrm <- Matrix(mat, sparse = T)
ngc <- as(mat > 0, "ngCMatrix")
bin <- binarize(rrm, 1)
expect_equivalent(ngc, bin)
})
test_that("split know unknown works as expected",{
.splitKU ... |
###############################################
## Merge2.R
## Sarah Fite and Chris Havenstein
## Created 10/27/2017
##
###############################################
## This script will merge "CleanSpotPrices.csv" with
## "CleanRigCountTrajectory.csv"
## First, ensure that you are in the Analysis folder.
## getwd(... | /Analysis/Data/Merge2.R | no_license | sarahjfite/MSDS-6372-Project-2 | R | false | false | 1,608 | r | ###############################################
## Merge2.R
## Sarah Fite and Chris Havenstein
## Created 10/27/2017
##
###############################################
## This script will merge "CleanSpotPrices.csv" with
## "CleanRigCountTrajectory.csv"
## First, ensure that you are in the Analysis folder.
## getwd(... |
require(brms)
require(tidyverse)
require(bayesplot)
# load the subset of data
df <- read_csv("df.csv")
# use as single level as the base level
dftest <- df %>% mutate(single = ifelse(Marital == "Single", 0, 1) )
glm01_test <- glm(single ~ age + age*sex , data = dftest, family = "binomial")
summary(glm01_test)
# fit ... | /ProbSet3/runModelBrms.R | no_license | Chelsea-Cheng99/STA304 | R | false | false | 5,346 | r | require(brms)
require(tidyverse)
require(bayesplot)
# load the subset of data
df <- read_csv("df.csv")
# use as single level as the base level
dftest <- df %>% mutate(single = ifelse(Marital == "Single", 0, 1) )
glm01_test <- glm(single ~ age + age*sex , data = dftest, family = "binomial")
summary(glm01_test)
# fit ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{AddClass}
\alias{AddClass}
\title{Add large or small flock information}
\usage{
AddClass(full.data)
}
\arguments{
\item{full.data}{A clean (greenlight) file of observations}
}
\value{
data frame of full.data with additional colum... | /man/AddClass.Rd | no_license | cfrost3/AKaerial | R | false | true | 670 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{AddClass}
\alias{AddClass}
\title{Add large or small flock information}
\usage{
AddClass(full.data)
}
\arguments{
\item{full.data}{A clean (greenlight) file of observations}
}
\value{
data frame of full.data with additional colum... |
hdr<-read.table("household_power_consumption.txt",header=TRUE,sep=";",nrows=2)
data<-read.table("household_power_consumption.txt",header=FALSE,sep=";",nrows=2880,skip=66637)
names(data)<-names(hdr)
data$datetime<-as.POSIXct((paste(data[,1],data[,2],sep=",",format="%m/%d/%Y,%H:%M:%S")))
png(file="Plot2.png", width=48... | /project1/Plot2.R | no_license | cshalinid/ExData_Plotting1 | R | false | false | 528 | r | hdr<-read.table("household_power_consumption.txt",header=TRUE,sep=";",nrows=2)
data<-read.table("household_power_consumption.txt",header=FALSE,sep=";",nrows=2880,skip=66637)
names(data)<-names(hdr)
data$datetime<-as.POSIXct((paste(data[,1],data[,2],sep=",",format="%m/%d/%Y,%H:%M:%S")))
png(file="Plot2.png", width=48... |
context("Pretty print OTU names")
test_that("process_bug_name works for greengenes names", {
bugname1 <- "k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Lactobacillaceae.g__Lactobacillus.s__"
expect_equal(process_bug_name(bugname1, sep="\\."),
"g__Lactobacillus.")
bugname4 <-... | /tests/testthat/test_process_bug_names.R | permissive | sagun98/mpuri | R | false | false | 2,092 | r | context("Pretty print OTU names")
test_that("process_bug_name works for greengenes names", {
bugname1 <- "k__Bacteria.p__Firmicutes.c__Bacilli.o__Lactobacillales.f__Lactobacillaceae.g__Lactobacillus.s__"
expect_equal(process_bug_name(bugname1, sep="\\."),
"g__Lactobacillus.")
bugname4 <-... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drug_stop_words.R
\docType{data}
\name{drug_stop_words}
\alias{drug_stop_words}
\title{A vector with drug-specific stop words in English}
\format{
A vector with 47 words:
}
\usage{
data(drug_stop_words)
}
\description{
These are ... | /man/drug_stop_words.Rd | no_license | cran/DOPE | R | false | true | 514 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drug_stop_words.R
\docType{data}
\name{drug_stop_words}
\alias{drug_stop_words}
\title{A vector with drug-specific stop words in English}
\format{
A vector with 47 words:
}
\usage{
data(drug_stop_words)
}
\description{
These are ... |
## aneurisk figures - Fri 06/02/17 11:01:39
## boxplot of tortuosity for different MORPHO_SHAPES
ggplot(aneurisk) + geom_boxplot(aes(x = as.factor(MORPHO_SHAPE), y = tortuosity), alpha = 0.3)
## volume
ggplot(data = aneurisk, x = sacVolume) + geom_histogram(aes(x = sacVolume, y = ..count.., fill = ESTADO_RUPTURA), b... | /SOURCE-S4M/4-aneurisk-figs.R | no_license | scienceformedicine/aneurisk-analysis | R | false | false | 808 | r | ## aneurisk figures - Fri 06/02/17 11:01:39
## boxplot of tortuosity for different MORPHO_SHAPES
ggplot(aneurisk) + geom_boxplot(aes(x = as.factor(MORPHO_SHAPE), y = tortuosity), alpha = 0.3)
## volume
ggplot(data = aneurisk, x = sacVolume) + geom_histogram(aes(x = sacVolume, y = ..count.., fill = ESTADO_RUPTURA), b... |
load_yaml_config <- function(config_path) yaml::yaml.load_file(config_path)
get_filtering_params <-
get_normalization_params <-
get_bmiq_params <-
get_analysis_params <- load_yaml_config
# Parse phenotype file configs -----
get_phenotype_info <- function(config_path) yaml::yaml.load_file(config_path)
get... | /illumina_450k/Scripts/config.R | no_license | Randner/easy-450k | R | false | false | 939 | r | load_yaml_config <- function(config_path) yaml::yaml.load_file(config_path)
get_filtering_params <-
get_normalization_params <-
get_bmiq_params <-
get_analysis_params <- load_yaml_config
# Parse phenotype file configs -----
get_phenotype_info <- function(config_path) yaml::yaml.load_file(config_path)
get... |
addSelectCountry <- function(id){
# Create a namespace function using the provided id
ns <- NS(id)
tags$div(id=paste0("countrySelect_",id),
selectInput(id,
label = "Change Lead Jurisdiction",
choices = '')
)
}
| /apps/osc/modules/add_select.R | no_license | global-trade-alert/ricardo | R | false | false | 279 | r | addSelectCountry <- function(id){
# Create a namespace function using the provided id
ns <- NS(id)
tags$div(id=paste0("countrySelect_",id),
selectInput(id,
label = "Change Lead Jurisdiction",
choices = '')
)
}
|
#####################################################################################################
# author: Jona Cederbaum and Fabian Scheipl
#####################################################################################################
# description: preparations for the covariance where only cross produ... | /R/get_cross_products.R | no_license | JonaCRC/sparseFLMM | R | false | false | 7,107 | r | #####################################################################################################
# author: Jona Cederbaum and Fabian Scheipl
#####################################################################################################
# description: preparations for the covariance where only cross produ... |
#Wordcloud of Top 75 Words in Hamlet
#Set the working directory
<<<<<<< Updated upstream
setwd("~/Text-Analysis/")
=======
setwd("~/Desktop/Text-Analysis/")
>>>>>>> Stashed changes
#Call libraries used in the script
library(wordcloud)
library(tm)
library(RColorBrewer)
#Create a corpus -- this creates a wordcloud of ... | /RScripts/wordcloudPlainText.R | no_license | avanderj/Text-Analysis | R | false | false | 1,695 | r | #Wordcloud of Top 75 Words in Hamlet
#Set the working directory
<<<<<<< Updated upstream
setwd("~/Text-Analysis/")
=======
setwd("~/Desktop/Text-Analysis/")
>>>>>>> Stashed changes
#Call libraries used in the script
library(wordcloud)
library(tm)
library(RColorBrewer)
#Create a corpus -- this creates a wordcloud of ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/author_df.R
\name{author_df}
\alias{author_df}
\alias{author_data}
\title{Search Author Content on SCOPUS}
\usage{
author_df(au_id, last_name, first_name, api_key = NULL, verbose = TRUE,
all_author_info = FALSE, ...)
author_data(au_id, las... | /man/author_df.Rd | no_license | WeaselMicu/rscopus | R | false | true | 1,167 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/author_df.R
\name{author_df}
\alias{author_df}
\alias{author_data}
\title{Search Author Content on SCOPUS}
\usage{
author_df(au_id, last_name, first_name, api_key = NULL, verbose = TRUE,
all_author_info = FALSE, ...)
author_data(au_id, las... |
#Scripts for clustering of insertions
args <- commandArgs(trailingOnly = FALSE)
myargument <- args[length(args)]
myargument <- sub("-","",myargument)
cat(myargument)
cat(paste(myargument, ".txt", sep=""))
# Read in the matrix file
sample <- read.table( paste(myargument, ".txt", sep=""), sep="\t", stringsAsFactors=FAL... | /insert.R | no_license | anthonyuren/MuLV_pipeline | R | false | false | 1,796 | r | #Scripts for clustering of insertions
args <- commandArgs(trailingOnly = FALSE)
myargument <- args[length(args)]
myargument <- sub("-","",myargument)
cat(myargument)
cat(paste(myargument, ".txt", sep=""))
# Read in the matrix file
sample <- read.table( paste(myargument, ".txt", sep=""), sep="\t", stringsAsFactors=FAL... |
library(stringr)
extract_urls <- function(tweet){
regex_expression = "(http|https)://([^\\s]+)"
extracted_url <- str_extract_all(string = tweet, regex(regex_expression))
return(extracted_url[[1]])
} | /R/extract_urls.R | permissive | wesley4546/twitterurlexpander | R | false | false | 215 | r | library(stringr)
extract_urls <- function(tweet){
regex_expression = "(http|https)://([^\\s]+)"
extracted_url <- str_extract_all(string = tweet, regex(regex_expression))
return(extracted_url[[1]])
} |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/echarty.R
\name{ec.data}
\alias{ec.data}
\title{Data helper}
\usage{
ec.data(df, format = "dataset", header = TRUE)
}
\arguments{
\item{df}{Chart data in data.frame format, required.}
\item{format}{A key on how to format the output list \cr ... | /man/ec.data.Rd | permissive | statunizaga/echarty | R | false | true | 1,258 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/echarty.R
\name{ec.data}
\alias{ec.data}
\title{Data helper}
\usage{
ec.data(df, format = "dataset", header = TRUE)
}
\arguments{
\item{df}{Chart data in data.frame format, required.}
\item{format}{A key on how to format the output list \cr ... |
# Load libraries
library(readxl)
library(data.table)
library(stringi)
library(taxotools)
library(dplyr)
# define function: name length
name_length <- function(x) ifelse(!is.na(x), length(unlist(strsplit(x, ' '))), 0)
# define function: is not in
'%!in%' <- function(x,y)!('%in%'(x,y))
# define right function
right = ... | /nmnh_transform.r | permissive | vijaybarve/tpt-siphonaptera | R | false | false | 10,495 | r | # Load libraries
library(readxl)
library(data.table)
library(stringi)
library(taxotools)
library(dplyr)
# define function: name length
name_length <- function(x) ifelse(!is.na(x), length(unlist(strsplit(x, ' '))), 0)
# define function: is not in
'%!in%' <- function(x,y)!('%in%'(x,y))
# define right function
right = ... |
# TODO: inspect all build_data initializer functions (e.g., `migrate_unformatted_to_output()`)
# TODO: make all functions dt methods
# TODO: make functions that modify footnotes/styles into dt methods
# TODO: fix rtf rendering
| /TODOS.R | permissive | marinamerlo/gt | R | false | false | 231 | r | # TODO: inspect all build_data initializer functions (e.g., `migrate_unformatted_to_output()`)
# TODO: make all functions dt methods
# TODO: make functions that modify footnotes/styles into dt methods
# TODO: fix rtf rendering
|
# Andrew Boslett
# University of Rochester Medical Center
# Academic email: andrew_boslett@urmc.rochester.edu
# Permanent email: aboslet1@gmail.com
# Goal: Generate a heat-map that highlights the change in opioid overdose rates from 2017 to 2018 under
# alternative proportions of opioid involvement in unidentified dr... | /scripts/7-create-heatmap-of-opioid-overdose-changes-over-time-alt-opioid-involvement.R | no_license | EHillLab/AJDAA-Paper | R | false | false | 5,019 | r | # Andrew Boslett
# University of Rochester Medical Center
# Academic email: andrew_boslett@urmc.rochester.edu
# Permanent email: aboslet1@gmail.com
# Goal: Generate a heat-map that highlights the change in opioid overdose rates from 2017 to 2018 under
# alternative proportions of opioid involvement in unidentified dr... |
#' ProjectManage
#'
#' A simple Project manage web server, designed for project manage.
#' In this web server,you can add,delete and edit the Project.
#' Yixuetongji Group developed this shiny App for his fans.
#' If you have any questions, pls feel free to contact me(dongliulou@126.com).
#' Furthermore, you can follo... | /R/pm.R | no_license | dming1024/pm0209 | R | false | false | 18,512 | r |
#' ProjectManage
#'
#' A simple Project manage web server, designed for project manage.
#' In this web server,you can add,delete and edit the Project.
#' Yixuetongji Group developed this shiny App for his fans.
#' If you have any questions, pls feel free to contact me(dongliulou@126.com).
#' Furthermore, you can follo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.