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 |
|---|---|---|---|---|---|---|---|---|---|
## The data household_power_comsumption has been stored in the working directiory
#read the data into the working environment
ndata <- read.csv("household_power_consumption.txt", header =T, sep=";", na.strings ="?")
### use subset() to select 2 days of data for plotting
ndata <- subset(ndata, ndata$Date == '1/2/2007'... | /plot4.R | no_license | vivianni/ExploratoryDataAnalysis | R | false | false | 1,484 | r | ## The data household_power_comsumption has been stored in the working directiory
#read the data into the working environment
ndata <- read.csv("household_power_consumption.txt", header =T, sep=";", na.strings ="?")
### use subset() to select 2 days of data for plotting
ndata <- subset(ndata, ndata$Date == '1/2/2007'... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{no_region_id_metadata}
\alias{no_region_id_metadata}
\title{Simple toy metadata defining three experiments, with one condition (\code{test}) per experiment.
Implicitly, 20 individuals are in each experiment
It serv... | /man/no_region_id_metadata.Rd | no_license | cran/scopr | R | false | true | 694 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{no_region_id_metadata}
\alias{no_region_id_metadata}
\title{Simple toy metadata defining three experiments, with one condition (\code{test}) per experiment.
Implicitly, 20 individuals are in each experiment
It serv... |
library(httr)
library(ggplot2)
library(Peptides)
rm(list=ls())
# results
res_path <- ("/Users/rmylonas/tmp/datamining_pumba/results/")
res_name <- "homodimers_"
# internal library
source("./R/functions/all_functions.R")
all_datasets <- get_all_datasets()
samples <- get_samples(all_datasets)
sel_samples <- c("HCT")... | /R/find_merged_min_max.R | permissive | UNIL-PAF/pumba-datamining | R | false | false | 7,032 | r | library(httr)
library(ggplot2)
library(Peptides)
rm(list=ls())
# results
res_path <- ("/Users/rmylonas/tmp/datamining_pumba/results/")
res_name <- "homodimers_"
# internal library
source("./R/functions/all_functions.R")
all_datasets <- get_all_datasets()
samples <- get_samples(all_datasets)
sel_samples <- c("HCT")... |
library("shiny")
library("shinydashboard")
dashboardPage(
dashboardHeader(title="MM*Stat"),
dashboardSidebar(
sidebarMenu(
menuItem(text=gettext("Confidence interval parameter"), startExpanded=TRUE,
uiOutput("conflevelUI"),
uiOutput("varequalUI"),
uiOutput("si... | /inst/examples/stat/confidence_two_means/ui.R | no_license | Kale14/mmstat4 | R | false | false | 2,744 | r | library("shiny")
library("shinydashboard")
dashboardPage(
dashboardHeader(title="MM*Stat"),
dashboardSidebar(
sidebarMenu(
menuItem(text=gettext("Confidence interval parameter"), startExpanded=TRUE,
uiOutput("conflevelUI"),
uiOutput("varequalUI"),
uiOutput("si... |
PKG <- "garel"
RLOAD <- "anaconda3/personal" #"R/3.3.3"
OUTSH <- "code"
TIMEPBS <- "#PBS -l walltime=24:00:00"
SMALLPBS <- "#PBS -l select=1:ncpus=1:mem=1gb"
LARGEPBS <- "#PBS -l select=1:ncpus=16:mem=8gb"
#PATHRS <- system.file("ext", "do_funr.Rscript", package = PKG, mustWork = TRUE)
####---- hpc.cmd.funr ----
#' @t... | /R/generate_bash.R | no_license | slevu/garel | R | false | false | 8,275 | r | PKG <- "garel"
RLOAD <- "anaconda3/personal" #"R/3.3.3"
OUTSH <- "code"
TIMEPBS <- "#PBS -l walltime=24:00:00"
SMALLPBS <- "#PBS -l select=1:ncpus=1:mem=1gb"
LARGEPBS <- "#PBS -l select=1:ncpus=16:mem=8gb"
#PATHRS <- system.file("ext", "do_funr.Rscript", package = PKG, mustWork = TRUE)
####---- hpc.cmd.funr ----
#' @t... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{getPackagesLogs}
\alias{getPackagesLogs}
\title{Get package(s) logs configuration}
\usage{
getPackagesLogs()
}
\value{
data.frame.
}
\description{
Get package(s) logs configuration. Level and log file
}
\details{
Get package(s) logs configuration. Level and log... | /man/getPackagesLogs.Rd | no_license | bthieurmel/logeasier | R | false | false | 360 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{getPackagesLogs}
\alias{getPackagesLogs}
\title{Get package(s) logs configuration}
\usage{
getPackagesLogs()
}
\value{
data.frame.
}
\description{
Get package(s) logs configuration. Level and log file
}
\details{
Get package(s) logs configuration. Level and log... |
spectral <- function(numcolors = 256) {
require(RColorBrewer)
rev(colorRampPalette(brewer.pal(11, "Spectral"))(numcolors))
}
raster_plot <- function(x, png_file = NULL, maxpixels = ncell(x), cuts = 255, pal_fun = viridis,
bg_color = "white", ...) {
library(viridis)
plot_theme <- list(la... | /R/raster_plot.R | permissive | ecohealthalliance/hotspots2 | R | false | false | 1,556 | r | spectral <- function(numcolors = 256) {
require(RColorBrewer)
rev(colorRampPalette(brewer.pal(11, "Spectral"))(numcolors))
}
raster_plot <- function(x, png_file = NULL, maxpixels = ncell(x), cuts = 255, pal_fun = viridis,
bg_color = "white", ...) {
library(viridis)
plot_theme <- list(la... |
getwd()
#setwd('/media/bulk_01/users/goryu003/samples/')
ls()
#GO=read.table("ITAG2.3_desc_and_GO.txt", as.is =T,header=T )
setwd('/media/bulk_01/users/goryu003/samples/topGO_ITAG2.3')
enrichment_list = dir (pattern='.*_corresponding_overrepresent_.*')
print(enrichment_list)
GOI_list = dir (pattern='.*map.txt'... | /GO_to_H-2.R | permissive | PBR/scripts | R | false | false | 1,093 | r | getwd()
#setwd('/media/bulk_01/users/goryu003/samples/')
ls()
#GO=read.table("ITAG2.3_desc_and_GO.txt", as.is =T,header=T )
setwd('/media/bulk_01/users/goryu003/samples/topGO_ITAG2.3')
enrichment_list = dir (pattern='.*_corresponding_overrepresent_.*')
print(enrichment_list)
GOI_list = dir (pattern='.*map.txt'... |
makeCacheMatrix <- function(m = matrix() ) {
## Initialize the inverse property
i <- NULL
set <- function( matrix ) {
m <<- matrix
i <<- NULL
}
## Method the get the matrix
get <- function() {
m
}
## Way to set the inverse of the matrix
setInverse <- function(inverse) ... | /cachematrix.R | no_license | hoptran/ProgrammingAssignment2 | R | false | false | 952 | r | makeCacheMatrix <- function(m = matrix() ) {
## Initialize the inverse property
i <- NULL
set <- function( matrix ) {
m <<- matrix
i <<- NULL
}
## Method the get the matrix
get <- function() {
m
}
## Way to set the inverse of the matrix
setInverse <- function(inverse) ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TextInput.R
\name{TextInput}
\alias{TextInput}
\title{TextInput}
\usage{
TextInput(input, output, session, n, checkFun = NULL, addArgs = NULL)
}
\arguments{
\item{input}{argument used by shiny session}
\item{output}{argument used by shiny se... | /man/TextInput.Rd | no_license | nishuai/shinyTools | R | false | true | 2,278 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TextInput.R
\name{TextInput}
\alias{TextInput}
\title{TextInput}
\usage{
TextInput(input, output, session, n, checkFun = NULL, addArgs = NULL)
}
\arguments{
\item{input}{argument used by shiny session}
\item{output}{argument used by shiny se... |
setwd("/ifs/scratch/msph/biostat/sw2206/yuqi")
.libPaths("/ifs/scratch/msph/biostat/sw2206/yuqi/R_libs")
# Goal: large scale parameter tunning for gl_simlr_clust:
# scenario setting:
## 2 changes: division_methods(data_divide): div4: 123, div2: 456
## vars_of_feature(sigma): 1:14, 3:25, 5:36
library(parall... | /code/simulation_scripts/simulation_0206_mk_generation.R | no_license | yuqimiao/multiomics-SIMLR | R | false | false | 2,185 | r | setwd("/ifs/scratch/msph/biostat/sw2206/yuqi")
.libPaths("/ifs/scratch/msph/biostat/sw2206/yuqi/R_libs")
# Goal: large scale parameter tunning for gl_simlr_clust:
# scenario setting:
## 2 changes: division_methods(data_divide): div4: 123, div2: 456
## vars_of_feature(sigma): 1:14, 3:25, 5:36
library(parall... |
library(rcrossref)
### Name: cr_cn
### Title: Get citations in various formats from CrossRef.
### Aliases: cr_cn
### ** Examples
## Not run:
##D cr_cn(dois="10.1126/science.169.3946.635")
##D cr_cn(dois="10.1126/science.169.3946.635", "citeproc-json")
##D cr_cn(dois="10.1126/science.169.3946.635", "citeproc-json-i... | /data/genthat_extracted_code/rcrossref/examples/cr_cn.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,928 | r | library(rcrossref)
### Name: cr_cn
### Title: Get citations in various formats from CrossRef.
### Aliases: cr_cn
### ** Examples
## Not run:
##D cr_cn(dois="10.1126/science.169.3946.635")
##D cr_cn(dois="10.1126/science.169.3946.635", "citeproc-json")
##D cr_cn(dois="10.1126/science.169.3946.635", "citeproc-json-i... |
library(DSviaDRM)
### Name: expressionBasedfilter
### Title: Filter genes according to expression level
### Aliases: expressionBasedfilter
### Keywords: gene filtering
### ** Examples
data(exprs1)
expressionBasedfilter(exprs1)
| /data/genthat_extracted_code/DSviaDRM/examples/expressionBasedfilter.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 234 | r | library(DSviaDRM)
### Name: expressionBasedfilter
### Title: Filter genes according to expression level
### Aliases: expressionBasedfilter
### Keywords: gene filtering
### ** Examples
data(exprs1)
expressionBasedfilter(exprs1)
|
processSTR = function(file, model = c("SBE","RBR")) {
# Set environment variables to UTC
Sys.setenv(TZ = 'UTC')
if (model == "SBE") {
#Load data
test = read.csv(file, header = FALSE)[1:20 ,]
#Find number of rows to skip in header
skip = min(which(test == "Date")) - 1
#Ski... | /R/processSTR.r | no_license | npomeroy/occ | R | false | false | 9,745 | r | processSTR = function(file, model = c("SBE","RBR")) {
# Set environment variables to UTC
Sys.setenv(TZ = 'UTC')
if (model == "SBE") {
#Load data
test = read.csv(file, header = FALSE)[1:20 ,]
#Find number of rows to skip in header
skip = min(which(test == "Date")) - 1
#Ski... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{flu_data}
\alias{flu_data}
\title{Regional influenza incidence in the US (1997 - 2018)}
\format{A data.frame with 12,056 observations on weighted influenza-like illness
measurements from all HHS regions, including... | /man/flu_data.Rd | no_license | reichlab/2018-2019-cdc-flu-contest | R | false | true | 472 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{flu_data}
\alias{flu_data}
\title{Regional influenza incidence in the US (1997 - 2018)}
\format{A data.frame with 12,056 observations on weighted influenza-like illness
measurements from all HHS regions, including... |
# Load libraries ----------------------------------------------------------
library(MiniModel)
library(ggplot2)
library(readr)
library(dplyr)
library(doParallel)
library(Hmisc)
# Load data ---------------------------------------------------------------
# Parameters fitted to literature
load("Intermediate/ParametersLi... | /Code/Simulations/LimitingFactors.R | no_license | AleMorales/DynamicPhotosynthesis | R | false | false | 29,011 | r | # Load libraries ----------------------------------------------------------
library(MiniModel)
library(ggplot2)
library(readr)
library(dplyr)
library(doParallel)
library(Hmisc)
# Load data ---------------------------------------------------------------
# Parameters fitted to literature
load("Intermediate/ParametersLi... |
## JavaScript that dis/enables the ABILITY to click the tab (without changing aesthetics)
# app_jscode <-
# "shinyjs.disableTab = function(name) {
# var tab = $('.nav li a[data-value=' + name + ']');
# tab.bind('click.tab', function(e) {
# e.preventDefault();
# return false;
# });
# tab.ad... | /inst/DRomicsInterpreter-shiny/ui.R | no_license | cran/DRomics | R | false | false | 28,029 | r | ## JavaScript that dis/enables the ABILITY to click the tab (without changing aesthetics)
# app_jscode <-
# "shinyjs.disableTab = function(name) {
# var tab = $('.nav li a[data-value=' + name + ']');
# tab.bind('click.tab', function(e) {
# e.preventDefault();
# return false;
# });
# tab.ad... |
########################
########################
##unit.handlers
########################
########################
#this uses checkInput
#in place
#################
#getUnits
#setUnits
#convertUnits
#addUnitConversion
#addUnitAlias
#listUnitConversions
#TO DO
################
#urgent
#conver... | /pems.utils/R/unit.handlers.R | no_license | akhikolla/updatedatatype-list4 | R | false | false | 16,386 | r | ########################
########################
##unit.handlers
########################
########################
#this uses checkInput
#in place
#################
#getUnits
#setUnits
#convertUnits
#addUnitConversion
#addUnitAlias
#listUnitConversions
#TO DO
################
#urgent
#conver... |
##' Plot two profiles and order the terms by ones that have the most difference
##' in enrichment
## Plot go profiles with biggest differences
plotProfilesMostDiff <- function(aProf, aTitle="Functional Profiles",
anOnto=NULL, percentage=FALSE, HORIZVERT=TRUE,
... | /R/goprofiles.R | no_license | lianos/ARE.utils | R | false | false | 1,656 | r | ##' Plot two profiles and order the terms by ones that have the most difference
##' in enrichment
## Plot go profiles with biggest differences
plotProfilesMostDiff <- function(aProf, aTitle="Functional Profiles",
anOnto=NULL, percentage=FALSE, HORIZVERT=TRUE,
... |
\name{coord_trans}
\alias{coord_trans}
\title{Transformed cartesian coordinate system.}
\usage{
coord_trans(xtrans = "identity", ytrans = "identity",
limx = NULL, limy = NULL)
}
\arguments{
\item{xtrans,ytrans}{transformers for x and y axes}
\item{limx,limy}{limits for x and y axes. (Named so for
backward ... | /man/coord_trans.Rd | no_license | ThierryO/ggplot2 | R | false | false | 2,370 | rd | \name{coord_trans}
\alias{coord_trans}
\title{Transformed cartesian coordinate system.}
\usage{
coord_trans(xtrans = "identity", ytrans = "identity",
limx = NULL, limy = NULL)
}
\arguments{
\item{xtrans,ytrans}{transformers for x and y axes}
\item{limx,limy}{limits for x and y axes. (Named so for
backward ... |
# Cluster cars for the same vendor:
rm(list=ls())
library("data.table")
library("sets")
library("survival")
#Set working directory
project_directory<- "C:/Users/Nk/Documents/Uni/MA"
data_directory<-"/Pkw/MobileDaten/generatedData/final_dataset/"
wd<- paste0(project_directory, data_directory)
setwd(wd)
#Load dataset... | /post_data_prep/step3_cluster_cars_same_vendor.R | no_license | nvkov/MA_Code | R | false | false | 2,655 | r | # Cluster cars for the same vendor:
rm(list=ls())
library("data.table")
library("sets")
library("survival")
#Set working directory
project_directory<- "C:/Users/Nk/Documents/Uni/MA"
data_directory<-"/Pkw/MobileDaten/generatedData/final_dataset/"
wd<- paste0(project_directory, data_directory)
setwd(wd)
#Load dataset... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_and_reporting.R
\name{umx_aggregate}
\alias{umx_aggregate}
\title{Convenient formula-based cross-tabs & built-in summary functions}
\usage{
umx_aggregate(
formula = DV ~ condition,
data = df,
what = c("mean_sd", "n"),
digits = 2,
... | /man/umx_aggregate.Rd | no_license | MATA62N/umx | R | false | true | 2,665 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_and_reporting.R
\name{umx_aggregate}
\alias{umx_aggregate}
\title{Convenient formula-based cross-tabs & built-in summary functions}
\usage{
umx_aggregate(
formula = DV ~ condition,
data = df,
what = c("mean_sd", "n"),
digits = 2,
... |
# Simple but effective by way of Unicode regex group
cleanArabicString <- function(string) {
return(
gsub(
# Second, collapse all occurances of multiple
# spaces into a single space each.
'[ ]{2,}', ' ',
gsub(
# First, remove everything that is not a space
# or an Arabic ... | /homework/schmid_jonathan/lib/cleanup.R | no_license | Islamicate-DH/hw | R | false | false | 499 | r | # Simple but effective by way of Unicode regex group
cleanArabicString <- function(string) {
return(
gsub(
# Second, collapse all occurances of multiple
# spaces into a single space each.
'[ ]{2,}', ' ',
gsub(
# First, remove everything that is not a space
# or an Arabic ... |
#' @title Apply a function to all elements in a list
#'
#' @description
#' Applies a function to the unlisted elements of a list
#'
#' @param alist a list
#' @param f a function to be applied
#' @param ... further arguments passed on to \code{f}
#' @return value
#' @author Gaston Sanchez
#' @seealso \code{\link{lappl... | /R/funlist.r | no_license | gastonstat/turner | R | false | false | 4,527 | r | #' @title Apply a function to all elements in a list
#'
#' @description
#' Applies a function to the unlisted elements of a list
#'
#' @param alist a list
#' @param f a function to be applied
#' @param ... further arguments passed on to \code{f}
#' @return value
#' @author Gaston Sanchez
#' @seealso \code{\link{lappl... |
corr <- function(directory, threshold = 0) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'threshold' is a numeric vector of length 1 indicating the
## number of completely observed observations (on all
## variables) required to compute the correlation bet... | /R Programming/Programming Assignment 1/corr.R | no_license | hebuguiqu/jhu_data_science_coursera | R | false | false | 908 | r | corr <- function(directory, threshold = 0) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'threshold' is a numeric vector of length 1 indicating the
## number of completely observed observations (on all
## variables) required to compute the correlation bet... |
library(geozoning)
### Name: contourArea
### Title: contourArea
### Aliases: contourArea
### ** Examples
data(mapTest)
cL=list()
cL=contourAuto(cL,mapTest$step,mapTest$xsize,mapTest$ysize,mapTest$krigGrid,c(5,7),mapTest$boundary)
contourArea(cL[[8]])
| /data/genthat_extracted_code/geozoning/examples/contourArea.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 258 | r | library(geozoning)
### Name: contourArea
### Title: contourArea
### Aliases: contourArea
### ** Examples
data(mapTest)
cL=list()
cL=contourAuto(cL,mapTest$step,mapTest$xsize,mapTest$ysize,mapTest$krigGrid,c(5,7),mapTest$boundary)
contourArea(cL[[8]])
|
##
## Question 2: Have total emissions from PM2.5 decreased in the Baltimore City,
## Maryland (fips == "24510") from 1999 to 2008? Use the base plotting system to
## make a plot answering this question.
##
library(dplyr)
rm(list = ls())
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Cod... | /plot2.R | no_license | wanyx2015/ExData_Plotting2 | R | false | false | 887 | r | ##
## Question 2: Have total emissions from PM2.5 decreased in the Baltimore City,
## Maryland (fips == "24510") from 1999 to 2008? Use the base plotting system to
## make a plot answering this question.
##
library(dplyr)
rm(list = ls())
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Cod... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/name_builder.R
\name{pkg_name_changed}
\alias{pkg_name_changed}
\title{Scan package changes by name only}
\usage{
pkg_name_changed(startNew = FALSE)
}
\arguments{
\item{startNew}{Default FALSE, compare user's environment with name table
shipp... | /man/pkg_name_changed.Rd | no_license | dracodoc/namebrowser | R | false | true | 810 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/name_builder.R
\name{pkg_name_changed}
\alias{pkg_name_changed}
\title{Scan package changes by name only}
\usage{
pkg_name_changed(startNew = FALSE)
}
\arguments{
\item{startNew}{Default FALSE, compare user's environment with name table
shipp... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/sum_up.R
\name{sum_up}
\alias{sum_up}
\alias{sum_up_}
\title{Gives summary statistics (corresponds to Stata command summarize)}
\usage{
sum_up(x, ..., d = FALSE, w = NULL, i = NULL, digits = 3)
sum_up_(x, ..., .dots, d = FALSE, w = N... | /man/sum_up.Rd | no_license | eloualiche/statar | R | false | false | 1,102 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/sum_up.R
\name{sum_up}
\alias{sum_up}
\alias{sum_up_}
\title{Gives summary statistics (corresponds to Stata command summarize)}
\usage{
sum_up(x, ..., d = FALSE, w = NULL, i = NULL, digits = 3)
sum_up_(x, ..., .dots, d = FALSE, w = N... |
BRISC_bootstrap <- function(BRISC_Out, n_boot = 100, h = 1, n_omp = 1, init = "Initial", verbose = TRUE, nugget_status = 1){
if(missing(BRISC_Out)){stop("error: BRISC_bootstrap expects BRISC_Out\n")}
if(nugget_status == 0){fix_nugget = 0}
if(nugget_status == 1){fix_nugget = 1}
X <- BRISC_Out$X
n.omp.threads... | /R/bootstrap.R | no_license | ArkajyotiSaha/BRISC | R | false | false | 5,517 | r | BRISC_bootstrap <- function(BRISC_Out, n_boot = 100, h = 1, n_omp = 1, init = "Initial", verbose = TRUE, nugget_status = 1){
if(missing(BRISC_Out)){stop("error: BRISC_bootstrap expects BRISC_Out\n")}
if(nugget_status == 0){fix_nugget = 0}
if(nugget_status == 1){fix_nugget = 1}
X <- BRISC_Out$X
n.omp.threads... |
\name{ex01.43}
\alias{ex01.43}
\docType{data}
\title{R Data set: ex01.43}
\description{
The \code{ex01.43} data frame has 10 rows and 1 column.
}
\usage{data(ex01.43)}
\format{
A data frame with 10 observations on the following variable.
\describe{
\item{\code{Lifetime}}{a numeric vector}
}
}
\details{
Consul... | /man/ex01.43.Rd | no_license | cran/Devore7 | R | false | false | 672 | rd | \name{ex01.43}
\alias{ex01.43}
\docType{data}
\title{R Data set: ex01.43}
\description{
The \code{ex01.43} data frame has 10 rows and 1 column.
}
\usage{data(ex01.43)}
\format{
A data frame with 10 observations on the following variable.
\describe{
\item{\code{Lifetime}}{a numeric vector}
}
}
\details{
Consul... |
#//MMM - Sept 2014
#// Modified code to allow specification of filename with
#// extension. Cases exist where 2 files have the same name, but
#// different extensions (e.g.StAnnsMPA.csv vs StAnnsMPA.dat) - the
#// original code could never get an exact match since it ignored the
#// extension.
#
#//Also changed so tha... | /R/polygon_file.r | permissive | PEDsnowcrab/aegis.polygons | R | false | false | 3,410 | r | #//MMM - Sept 2014
#// Modified code to allow specification of filename with
#// extension. Cases exist where 2 files have the same name, but
#// different extensions (e.g.StAnnsMPA.csv vs StAnnsMPA.dat) - the
#// original code could never get an exact match since it ignored the
#// extension.
#
#//Also changed so tha... |
library(shiny)
# Define UI for miles per gallon app ----
ui <- fluidPage(
# App title ----
titlePanel("Demo App 3: Miles Per Gallon"),
# Sidebar layout with input and output definitions ----
sidebarLayout(
# Sidebar panel for inputs ----
sidebarPanel(
# Input: Selector for variable to plot ag... | /shiny-apps/demo-app-3/app.R | no_license | joshpencheon/r-shiny-poc | R | false | false | 1,937 | r | library(shiny)
# Define UI for miles per gallon app ----
ui <- fluidPage(
# App title ----
titlePanel("Demo App 3: Miles Per Gallon"),
# Sidebar layout with input and output definitions ----
sidebarLayout(
# Sidebar panel for inputs ----
sidebarPanel(
# Input: Selector for variable to plot ag... |
library(tidyverse)
library(hexbin)
library(jsonlite)
library(httr)
library(scales)
percent_formatter = function(x) {
scales::percent(x, accuracy = 1)
}
players_url = "http://stats.nba.com/stats/commonallplayers?LeagueID=00&Season=2019-20&IsOnlyCurrentSeason=0"
request_headers = c(
`Connection` = '... | /NBA/NBA.R/NBA_Shot_Charts.R | no_license | Jared-A/NBA | R | false | false | 2,697 | r | library(tidyverse)
library(hexbin)
library(jsonlite)
library(httr)
library(scales)
percent_formatter = function(x) {
scales::percent(x, accuracy = 1)
}
players_url = "http://stats.nba.com/stats/commonallplayers?LeagueID=00&Season=2019-20&IsOnlyCurrentSeason=0"
request_headers = c(
`Connection` = '... |
#' Distance of kth nearest neighbour
#'
#' @param X the sample to work out the distance between a value and its kth
#' nearest neighbour
#' @param k the order of nearest neighbour to be used
#' @param d the dimension of the sample
#' @export
#' @import FNN
# The kth NN function
Rho <- function(X, k, d=1) {
if (d ... | /EntropyEst/R/Rho.R | no_license | KarinaMarks/Entropy-Estimators | R | false | false | 659 | r | #' Distance of kth nearest neighbour
#'
#' @param X the sample to work out the distance between a value and its kth
#' nearest neighbour
#' @param k the order of nearest neighbour to be used
#' @param d the dimension of the sample
#' @export
#' @import FNN
# The kth NN function
Rho <- function(X, k, d=1) {
if (d ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grab_funs.R
\name{grab_design_matrix}
\alias{grab_design_matrix}
\title{Grab a matrix of fixed effects from a model object}
\usage{
grab_design_matrix(data, rhs_formula, ...)
}
\arguments{
\item{data}{the data from which to extract the matrix... | /man/grab_design_matrix.Rd | permissive | bsaul/geex | R | false | true | 774 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grab_funs.R
\name{grab_design_matrix}
\alias{grab_design_matrix}
\title{Grab a matrix of fixed effects from a model object}
\usage{
grab_design_matrix(data, rhs_formula, ...)
}
\arguments{
\item{data}{the data from which to extract the matrix... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lazytensor_operations.R
\name{Arg.ComplexLazyTensor}
\alias{Arg.ComplexLazyTensor}
\title{Element-wise angle (or argument) of complex.}
\usage{
\method{Arg}{ComplexLazyTensor}(z)
}
\description{
Element-wise angle (or argument) of complex.
}
... | /rkeops/man/Arg.ComplexLazyTensor.Rd | permissive | getkeops/keops | R | false | true | 383 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lazytensor_operations.R
\name{Arg.ComplexLazyTensor}
\alias{Arg.ComplexLazyTensor}
\title{Element-wise angle (or argument) of complex.}
\usage{
\method{Arg}{ComplexLazyTensor}(z)
}
\description{
Element-wise angle (or argument) of complex.
}
... |
# load data
houseHold <- as.data.frame(read.table ("household_power_consumption.txt", sep = ";", header = TRUE))
houseHold <- houseHold[as.character(houseHold$Date) == "1/2/2007" | as.character(houseHold$Date) == "2/2/2007", ]
houseHold$Time = strptime(paste(houseHold[,1],houseHold[,2]),"%d/%m/%Y %H:%M:%S")
# Assig... | /plot2.R | no_license | filmonisme/EDA-Course-project-1 | R | false | false | 553 | r |
# load data
houseHold <- as.data.frame(read.table ("household_power_consumption.txt", sep = ";", header = TRUE))
houseHold <- houseHold[as.character(houseHold$Date) == "1/2/2007" | as.character(houseHold$Date) == "2/2/2007", ]
houseHold$Time = strptime(paste(houseHold[,1],houseHold[,2]),"%d/%m/%Y %H:%M:%S")
# Assig... |
fig <- plot_ly(regdata, x= ~x, y = ~y, type = 'bar',
text = y, texposition = 'auto',
marker = list(color = 'rgb(158,202,225)',
line = list(color = 'rgb(8,48,107')))
fig <- fig %>% layout(title = "Regional Job Performance",
xaxis = list(ti... | /plotly.R | no_license | meyerjoe-R/Spoketh | R | false | false | 479 | r | fig <- plot_ly(regdata, x= ~x, y = ~y, type = 'bar',
text = y, texposition = 'auto',
marker = list(color = 'rgb(158,202,225)',
line = list(color = 'rgb(8,48,107')))
fig <- fig %>% layout(title = "Regional Job Performance",
xaxis = list(ti... |
\name{is.exp}
\alias{is.exp}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{is.exp}
\description{judge if the data obeys exp exponential distribution.}
\usage{
is.exp(x, m, a, lambda = NULL)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{data}
\item... | /man/is.exp.Rd | no_license | cran/DnE | R | false | false | 2,060 | rd | \name{is.exp}
\alias{is.exp}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{is.exp}
\description{judge if the data obeys exp exponential distribution.}
\usage{
is.exp(x, m, a, lambda = NULL)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{data}
\item... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preText_score_plot.R
\name{preText_score_plot}
\alias{preText_score_plot}
\title{preText specification plot}
\usage{
preText_score_plot(preText_results, display_raw_rankings = FALSE,
remove_labels = FALSE, num_docs = NULL, text_size = 1)
}
... | /man/preText_score_plot.Rd | no_license | paddytobias/preText | R | false | true | 1,435 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/preText_score_plot.R
\name{preText_score_plot}
\alias{preText_score_plot}
\title{preText specification plot}
\usage{
preText_score_plot(preText_results, display_raw_rankings = FALSE,
remove_labels = FALSE, num_docs = NULL, text_size = 1)
}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bi_model.R
\name{insert_lines}
\alias{insert_lines}
\alias{insert_lines.bi_model}
\title{Insert lines in a LibBi model}
\usage{
\method{insert_lines}{bi_model}(x, lines, before, after, at_beginning_of,
at_end_of, ...)
}
\arguments{
\item{x}... | /man/insert_lines.Rd | no_license | thigm85/RBi | R | false | true | 1,244 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bi_model.R
\name{insert_lines}
\alias{insert_lines}
\alias{insert_lines.bi_model}
\title{Insert lines in a LibBi model}
\usage{
\method{insert_lines}{bi_model}(x, lines, before, after, at_beginning_of,
at_end_of, ...)
}
\arguments{
\item{x}... |
library(leaflet)
library(lubridate)
library(visdat)
library(patchwork)
library(janitor)
# The dataset contains 3 months of transactions for 100 customers
library(tidyverse)
# read data
file <- readxl::read_xlsx("data/synthesised-transaction-dataset.xlsx",
trim_ws = TRUE,
... | /R/customer_analysis.R | permissive | petestylianos/anz_virtual_experience | R | false | false | 8,784 | r | library(leaflet)
library(lubridate)
library(visdat)
library(patchwork)
library(janitor)
# The dataset contains 3 months of transactions for 100 customers
library(tidyverse)
# read data
file <- readxl::read_xlsx("data/synthesised-transaction-dataset.xlsx",
trim_ws = TRUE,
... |
plot3 <- function() {
## -------------------------
## read input file
## -------------------------
tpower<-read.table("household_power_consumption.txt",header=TRUE,sep=";",dec=".",na.strings="?")
## -------------------------
## get subset of data
## -------------------------
spower<-subset(tpower,Date=="1/2/2007" |... | /plot3.R | no_license | przytula/Electric_power | R | false | false | 1,088 | r | plot3 <- function() {
## -------------------------
## read input file
## -------------------------
tpower<-read.table("household_power_consumption.txt",header=TRUE,sep=";",dec=".",na.strings="?")
## -------------------------
## get subset of data
## -------------------------
spower<-subset(tpower,Date=="1/2/2007" |... |
regions = snakemake@params$regions
#Load in table that contains the positions of the causal variants from HAPGEN2
causal_snps = read.table(sprintf("hapgen2/snps_gwas_causal_region_%s",regions), header = F)
snp_1_causal_position = causal_snps[1]
snp_2_causal_position = causal_snps[2]
snp_3_causal_position ... | /three_way_admixture/calculate_credible_set.R | no_license | marcustutert/thesis_code | R | false | false | 2,642 | r | regions = snakemake@params$regions
#Load in table that contains the positions of the causal variants from HAPGEN2
causal_snps = read.table(sprintf("hapgen2/snps_gwas_causal_region_%s",regions), header = F)
snp_1_causal_position = causal_snps[1]
snp_2_causal_position = causal_snps[2]
snp_3_causal_position ... |
computeKernelArray <- function(sample, tPar, bandWidth){
size <- length(sample)
kernelArray <- array(data = 0, dim = size)
for(i in 1:length(kernelArray)){
kernelArray[i] <- dnorm((i/size - tPar)/bandWidth)/bandWidth
}
return(kernelArray)
}
| /Alex's assignments/computeKernelArray.R | no_license | evorition/introduction-to-speciality | R | false | false | 257 | r | computeKernelArray <- function(sample, tPar, bandWidth){
size <- length(sample)
kernelArray <- array(data = 0, dim = size)
for(i in 1:length(kernelArray)){
kernelArray[i] <- dnorm((i/size - tPar)/bandWidth)/bandWidth
}
return(kernelArray)
}
|
## Download data from:
## https://archive.ics.uci.edu/ml/datasets/Individual+household+electric+power+consumption.
## Unzip it to a text file named "household_power_consumption.txt".
##Open the data in R, creating dataset named "raw"
raw <- read.table("household_power_consumption.txt", header = TRUE, sep = ";",
... | /plot2.R | no_license | QHR/ExData_Plotting1 | R | false | false | 943 | r | ## Download data from:
## https://archive.ics.uci.edu/ml/datasets/Individual+household+electric+power+consumption.
## Unzip it to a text file named "household_power_consumption.txt".
##Open the data in R, creating dataset named "raw"
raw <- read.table("household_power_consumption.txt", header = TRUE, sep = ";",
... |
library(tidyverse)
source("R/basic_metrics.R")
file <- "R/clean_batters_overall.csv"
data <- read_csv(file)
columns <- c("name", "team", "season", "pa", "ab", "h", "x2b", "x3b", "hr",
"bb", "so", "hbp", "sf", "sh", "sb", "cs")
data <- data %>%
select(columns)
basic_calcs <- data %>%
mutate(hbp_... | /R/main.R | no_license | troymoench/baseballstats | R | false | false | 694 | r | library(tidyverse)
source("R/basic_metrics.R")
file <- "R/clean_batters_overall.csv"
data <- read_csv(file)
columns <- c("name", "team", "season", "pa", "ab", "h", "x2b", "x3b", "hr",
"bb", "so", "hbp", "sf", "sh", "sb", "cs")
data <- data %>%
select(columns)
basic_calcs <- data %>%
mutate(hbp_... |
## Two functions will be created
## makeCacheMatrix will take a matrix and cache the results
## cacheSolve will return the cache if already solved or solve it
# makeCacheMatrix creates a list containing a function to
# 1. set the value of the matrix
# 2. get the value of the matrix
# 3. set the value of inverse of the... | /cachematrix.R | no_license | scottgrey/ProgrammingAssignment2 | R | false | false | 1,841 | r | ## Two functions will be created
## makeCacheMatrix will take a matrix and cache the results
## cacheSolve will return the cache if already solved or solve it
# makeCacheMatrix creates a list containing a function to
# 1. set the value of the matrix
# 2. get the value of the matrix
# 3. set the value of inverse of the... |
library(AHMbook)
### Name: sim.ldata
### Title: Simulation of distance sampling data.
### Aliases: sim.ldata
### ** Examples
# Simulate a data set with the default arguments and look at the structure of the output:
tmp <- sim.ldata()
str(tmp)
| /data/genthat_extracted_code/AHMbook/examples/sim.ldata.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 250 | r | library(AHMbook)
### Name: sim.ldata
### Title: Simulation of distance sampling data.
### Aliases: sim.ldata
### ** Examples
# Simulate a data set with the default arguments and look at the structure of the output:
tmp <- sim.ldata()
str(tmp)
|
source("../AQ_data_preparation/utilities.R")
source("../AQ_data_preparation/nested_models.r")
source("full_year/scripts/variables.r")
df_2min_roll <- readRDS(DF_JOINED)
output_folder <-"C:/Github/AQ_analysis_calibration/output/full_year/calibration/scenarios/2weeks_24weeks_2weeks/"
if (!dir.exists(output_folder)){
... | /R/calibration_scenarios_Xweeks_Xmonths/calibration_2weeks_24weeks_2weeks_2.R | permissive | FEEprojects/Paper_calibration_nocs_data_analysis | R | false | false | 3,514 | r | source("../AQ_data_preparation/utilities.R")
source("../AQ_data_preparation/nested_models.r")
source("full_year/scripts/variables.r")
df_2min_roll <- readRDS(DF_JOINED)
output_folder <-"C:/Github/AQ_analysis_calibration/output/full_year/calibration/scenarios/2weeks_24weeks_2weeks/"
if (!dir.exists(output_folder)){
... |
library(pipe.design)
### Name: pipe.design
### Title: Dual-Agent Dose Escalation for Phase I Trials using the PIPE
### Design
### Aliases: pipe.design
### ** Examples
## Reproducing Figure 5 from Mander and Sweeting, Statistics in Medicine 2015.
## The true probability of DLT for a 6x6 grid of dose combinations... | /data/genthat_extracted_code/pipe.design/examples/pipe.design.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 3,091 | r | library(pipe.design)
### Name: pipe.design
### Title: Dual-Agent Dose Escalation for Phase I Trials using the PIPE
### Design
### Aliases: pipe.design
### ** Examples
## Reproducing Figure 5 from Mander and Sweeting, Statistics in Medicine 2015.
## The true probability of DLT for a 6x6 grid of dose combinations... |
funcH1 <- function(x)
{
c(cos(x[1])+2,sin(x[1])+2)
}
funcH2 <- function(x)
{
c(cos(x[1]),sin(x[1]))
}
funcH3 <- function(x)
{
c(4*cos(x[1]),4*sin(x[1]))
}
vertex1 <- function(x)
{
c( numDeriv::grad(funcH1,funcH1(x))[2]/norm(as.matrix(numDeriv::grad(funcH1,funcH1(x)))),
-numDeriv::grad... | /K1.R | no_license | Andrushkaa/LIR | R | false | false | 2,428 | r | funcH1 <- function(x)
{
c(cos(x[1])+2,sin(x[1])+2)
}
funcH2 <- function(x)
{
c(cos(x[1]),sin(x[1]))
}
funcH3 <- function(x)
{
c(4*cos(x[1]),4*sin(x[1]))
}
vertex1 <- function(x)
{
c( numDeriv::grad(funcH1,funcH1(x))[2]/norm(as.matrix(numDeriv::grad(funcH1,funcH1(x)))),
-numDeriv::grad... |
# Intrinio API
#
# Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://d... | /R/SecurityScreenClause.r | no_license | intrinio/r-sdk | R | false | false | 4,332 | r | # Intrinio API
#
# Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getObjects.R
\name{getObjects}
\alias{getObjects}
\title{Get objects of a certain class}
\usage{
getObjects(cls = "function")
}
\arguments{
\item{cls}{class type (default \code{function})}
}
\value{
list of objects of the specified class
}
\d... | /pascal/man/getObjects.Rd | no_license | rededsky/pascal | R | false | true | 705 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getObjects.R
\name{getObjects}
\alias{getObjects}
\title{Get objects of a certain class}
\usage{
getObjects(cls = "function")
}
\arguments{
\item{cls}{class type (default \code{function})}
}
\value{
list of objects of the specified class
}
\d... |
estimateCVM.crawl <- function(z, t, ...)
{
x = Re(z)
y = Im(z)
data <- data.frame(x, y, t)
initial.state <- list(
a1.x=c(x[1],0),
a1.y=c(y[1],0),
P1.x=diag(c(1,1)),
P1.y=diag(c(1,1)))
Fit.crawl <- crwMLE(
mov.model=~1,
data=data, coord=c("x","y"), Time.name="t", po... | /cvm/cvm/R/estimateCVM.crawl.r | no_license | xiang-chen-git/ecomove | R | false | false | 962 | r | estimateCVM.crawl <- function(z, t, ...)
{
x = Re(z)
y = Im(z)
data <- data.frame(x, y, t)
initial.state <- list(
a1.x=c(x[1],0),
a1.y=c(y[1],0),
P1.x=diag(c(1,1)),
P1.y=diag(c(1,1)))
Fit.crawl <- crwMLE(
mov.model=~1,
data=data, coord=c("x","y"), Time.name="t", po... |
rm(list=ls(all=TRUE))
# Download .asc file
#Download of NOAA Merged Land Ocean Global Surface Temperature Analysis Dataset (NOAAGlobalTemp) Data in the root/working directory of RStudio:
#NOAAGlobalTemp Dataset (8.7 MB)
#[ftp://ftp.ncdc.noaa.gov/pub/data/noaaglobaltemp/operational/gridded/NOAAGlobalTemp.gridded.v4.0.1... | /Script.R | no_license | ronnie-fr/Climate | R | false | false | 8,627 | r | rm(list=ls(all=TRUE))
# Download .asc file
#Download of NOAA Merged Land Ocean Global Surface Temperature Analysis Dataset (NOAAGlobalTemp) Data in the root/working directory of RStudio:
#NOAAGlobalTemp Dataset (8.7 MB)
#[ftp://ftp.ncdc.noaa.gov/pub/data/noaaglobaltemp/operational/gridded/NOAAGlobalTemp.gridded.v4.0.1... |
library(pcadapt)
### Name: plot.pcadapt
### Title: pcadapt visualization tool
### Aliases: plot.pcadapt
### ** Examples
## see ?pcadapt for examples
| /data/genthat_extracted_code/pcadapt/examples/plot.pcadapt.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 157 | r | library(pcadapt)
### Name: plot.pcadapt
### Title: pcadapt visualization tool
### Aliases: plot.pcadapt
### ** Examples
## see ?pcadapt for examples
|
# Project 2 - Linear Regression
# Getting the data
library(readxl)
mydata<- read_xlsx("E:\\Analytixlabs\\Module 6 (Data science using R)\\Case Studies\\Case study 2 - Linear Regression\\Linear Regression Case.xlsx")
View(mydata)
dim(mydata)
str(mydata)
names(mydata)
mydata$spoused[my... | /Linear regression.R | no_license | AmanAkshansh/Linear-Regression | R | false | false | 11,245 | r | # Project 2 - Linear Regression
# Getting the data
library(readxl)
mydata<- read_xlsx("E:\\Analytixlabs\\Module 6 (Data science using R)\\Case Studies\\Case study 2 - Linear Regression\\Linear Regression Case.xlsx")
View(mydata)
dim(mydata)
str(mydata)
names(mydata)
mydata$spoused[my... |
testthat::context('sampling')
rats <- readRDS('../files/rats.Rds')
testthat::describe('slice',{
it('default',{
rstan::summary(rats)
x <- rats%>%shredder::stan_slice(1:10)
testthat::expect_equal(length(x@sim$samples[[1]][[1]]),1010)
})
it('no warmup',{
x <- rats%>%shredder::stan_slice(1:10,... | /tests/testthat/test-sampling.R | permissive | yonicd/shredder | R | false | false | 1,179 | r | testthat::context('sampling')
rats <- readRDS('../files/rats.Rds')
testthat::describe('slice',{
it('default',{
rstan::summary(rats)
x <- rats%>%shredder::stan_slice(1:10)
testthat::expect_equal(length(x@sim$samples[[1]][[1]]),1010)
})
it('no warmup',{
x <- rats%>%shredder::stan_slice(1:10,... |
library(zinbwave)
cpuTime = lapply(c(50, 100, 500, 1000, 5000, 10000), function(nc){
fileName = sprintf('fig5-S10-S11-S15-S9/simZeisel_nc%s_ratio1_offs2', nc)
load(paste0(fileName, ".rda"))
tt = lapply(1:10, function(j){
counts = t(simData[[j]]$counts)
counts = counts[rowSums(counts) > 5, colSums(counts)... | /sims/figures/fig5-S10-S11-S15-S9/timeZinb.R | no_license | drisso/zinb_analysis | R | false | false | 495 | r | library(zinbwave)
cpuTime = lapply(c(50, 100, 500, 1000, 5000, 10000), function(nc){
fileName = sprintf('fig5-S10-S11-S15-S9/simZeisel_nc%s_ratio1_offs2', nc)
load(paste0(fileName, ".rda"))
tt = lapply(1:10, function(j){
counts = t(simData[[j]]$counts)
counts = counts[rowSums(counts) > 5, colSums(counts)... |
\name{trainControl}
\alias{trainControl}
\title{Control parameters for train}
\description{Control the computational nuances of the \code{\link{train}} function}
\usage{
trainControl(method = "boot",
number = ifelse(grepl("cv", method), 10, 25),
repeats = ifelse(grepl("cv", method), 1, number... | /caret_6.0-37/caret/man/trainControl.Rd | permissive | QunCh/Applied-Predictive-Modeling-with-Python | R | false | false | 7,634 | rd | \name{trainControl}
\alias{trainControl}
\title{Control parameters for train}
\description{Control the computational nuances of the \code{\link{train}} function}
\usage{
trainControl(method = "boot",
number = ifelse(grepl("cv", method), 10, 25),
repeats = ifelse(grepl("cv", method), 1, number... |
#
# Functions for ClusterStability
# Authors: Etienne Lord, Matthieu Willems, Vladimir Makarenkov
# Since: December 2015-July 2015
#
# Function to return the Stirling numbers of the second kind
Stirling2nd<-function(n,k) {
total=0;
somme=0;
for (j in 0:k) {
tt=(-1)^(k-j)*choose(k,j)*j^n;
somme=somme+tt;
}
... | /ClusterStability/R/ClusterStability.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 9,929 | r | #
# Functions for ClusterStability
# Authors: Etienne Lord, Matthieu Willems, Vladimir Makarenkov
# Since: December 2015-July 2015
#
# Function to return the Stirling numbers of the second kind
Stirling2nd<-function(n,k) {
total=0;
somme=0;
for (j in 0:k) {
tt=(-1)^(k-j)*choose(k,j)*j^n;
somme=somme+tt;
}
... |
#' Import a graph from various graph formats
#' @description Import a variety of graphs from
#' different graph formats and create a graph object.
#' @param graph_file a connection to a graph file.
#' @param file_type the type of file to be imported.
#' Options are: \code{graphml} (GraphML), \code{gml}
#' (GML), \code{... | /R/import_graph.R | no_license | Oscar-Deng/DiagrammeR | R | false | false | 13,426 | r | #' Import a graph from various graph formats
#' @description Import a variety of graphs from
#' different graph formats and create a graph object.
#' @param graph_file a connection to a graph file.
#' @param file_type the type of file to be imported.
#' Options are: \code{graphml} (GraphML), \code{gml}
#' (GML), \code{... |
rm(list=ls())
library(rpart)
library(rpart.plot)
library(pROC)
training<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/ATLEAST4/CAD Dataset Train70p.csv")
testing<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/ATLEAST4/CAD Dataset Test30p.csv")
sapdata<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/ATLEAST4/Sa... | /ATLEAST4/DT.R | permissive | UtshaDas/CAD-Classification | R | false | false | 2,345 | r | rm(list=ls())
library(rpart)
library(rpart.plot)
library(pROC)
training<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/ATLEAST4/CAD Dataset Train70p.csv")
testing<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/ATLEAST4/CAD Dataset Test30p.csv")
sapdata<-read.csv("F:/Thesis/DataMing+MachieLeaning/CAD/ATLEAST4/Sa... |
library(dplyr)
## Load and prepare dataset
dat <- read.table("household_power_consumption.txt", header = T, sep = ";")
dat$Date <- as.Date(dat$Date, "%d/%m/%Y")
X <- filter(dat, Date == "2007-02-01" | Date == "2007-02-02")
## Subset data for histogram and create the plot
GAP <- as.numeric(as.character(X$Global_active... | /plot1.R | no_license | lonely-luckily/ExData_Plotting1 | R | false | false | 463 | r | library(dplyr)
## Load and prepare dataset
dat <- read.table("household_power_consumption.txt", header = T, sep = ";")
dat$Date <- as.Date(dat$Date, "%d/%m/%Y")
X <- filter(dat, Date == "2007-02-01" | Date == "2007-02-02")
## Subset data for histogram and create the plot
GAP <- as.numeric(as.character(X$Global_active... |
# Peer-graded Assignment: Getting and Cleaning Data Course Project
# Name: Byungman Choi
setwd("./W4Assignment/UCI HAR Dataset/")
trainData <- read.table("./train/X_train.txt")
trainLabel <- read.table("./train/y_train.txt")
testData <- read.table("./test/X_test.txt")
testLabel <- read.table("./test/y_test.tx... | /run_analysis.R | no_license | bmwilliam/Getting-and-Cleaning-Data | R | false | false | 1,801 | r | # Peer-graded Assignment: Getting and Cleaning Data Course Project
# Name: Byungman Choi
setwd("./W4Assignment/UCI HAR Dataset/")
trainData <- read.table("./train/X_train.txt")
trainLabel <- read.table("./train/y_train.txt")
testData <- read.table("./test/X_test.txt")
testLabel <- read.table("./test/y_test.tx... |
##### author: CAI YUN-TING ######
##### The Survey of Family Income and Expenditure, 2017 #####
##### prep and options #####
# set working directory
setwd("D:/R_wd/")
# clear objects
rm(list = ls())
# loading packages
# expss must be loaded after haven
l <- c("tidyverse", "docxtractr", "readtext",
... | /106income_CP950.R | no_license | caiyuntingcfrc/misc | R | false | false | 11,431 | r | ##### author: CAI YUN-TING ######
##### The Survey of Family Income and Expenditure, 2017 #####
##### prep and options #####
# set working directory
setwd("D:/R_wd/")
# clear objects
rm(list = ls())
# loading packages
# expss must be loaded after haven
l <- c("tidyverse", "docxtractr", "readtext",
... |
context("sar_loga")
library(sars)
test_that("sar_loga returns correct results", {
fit <- sar_loga(galap)
expect_equal(round(fit$AICc, 2), 143.78)
expect_equal(as.vector(round(fit$par[2], 2)), 30.28)
expect_is(fit, "sars")
expect_match(fit$normaTest[[1]], "lillie")
expect_error(sar_linear(5), "data... | /data/genthat_extracted_code/sars/tests/test_loga.R | no_license | surayaaramli/typeRrh | R | false | false | 653 | r | context("sar_loga")
library(sars)
test_that("sar_loga returns correct results", {
fit <- sar_loga(galap)
expect_equal(round(fit$AICc, 2), 143.78)
expect_equal(as.vector(round(fit$par[2], 2)), 30.28)
expect_is(fit, "sars")
expect_match(fit$normaTest[[1]], "lillie")
expect_error(sar_linear(5), "data... |
# stopTimer.r
#######################################################
#' stopTimer() stops the timer and returns the time in seconds since start_timer() was launched
#' @keywords timer
#' @export
#' @author Laura Tremblay-Boyer (laura.t.boyer@gmail.com)
#' stopTimer()
stopTimer <- function() print(proc.time()[3] - time... | /R/stop_timer.r | no_license | lauratboyer/ltb.utils | R | false | false | 325 | r | # stopTimer.r
#######################################################
#' stopTimer() stops the timer and returns the time in seconds since start_timer() was launched
#' @keywords timer
#' @export
#' @author Laura Tremblay-Boyer (laura.t.boyer@gmail.com)
#' stopTimer()
stopTimer <- function() print(proc.time()[3] - time... |
\name{ColPicker}
\alias{ColPicker}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Plot All Named R Colors
%% ~~function to do ... ~~
}
\description{\code{ColPicker()} plots the R-colors in a dense manner and allows to collect colors by using a locator. This can be helpful when some colors... | /man/ColPicker.Rd | no_license | cran/DescToolsAddIns | R | false | false | 1,814 | rd | \name{ColPicker}
\alias{ColPicker}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Plot All Named R Colors
%% ~~function to do ... ~~
}
\description{\code{ColPicker()} plots the R-colors in a dense manner and allows to collect colors by using a locator. This can be helpful when some colors... |
library(testthat)
library(nat)
library(httr)
# suppress RGL in headless environments (some CRAN build machines fail otherwise)
if(!interactive())
Sys.setenv(RGL_USE_NULL=TRUE)
# Is internet accessible?
internet.ok=isTRUE(try(url_ok('http://flybrain.mrc-lmb.cam.ac.uk/')))
if(Sys.getenv('NOT_CRAN') == "true" && inte... | /tests/test-all.R | no_license | cyang-2014/nat | R | false | false | 659 | r | library(testthat)
library(nat)
library(httr)
# suppress RGL in headless environments (some CRAN build machines fail otherwise)
if(!interactive())
Sys.setenv(RGL_USE_NULL=TRUE)
# Is internet accessible?
internet.ok=isTRUE(try(url_ok('http://flybrain.mrc-lmb.cam.ac.uk/')))
if(Sys.getenv('NOT_CRAN') == "true" && inte... |
rm(list=ls())
setwd("/home/bonnie/Dropbox (Palmer Lab)/Palmer Lab/Bonnie Lin/Tom_Jhou_U01DA044468_Dropbox_copy/U01")
library(readxl)
library(dplyr)
library(stringr)
library(lubridate)
library(purrr)
library(data.table)
## helpful ##
list.files()
length(IDs[!is.na(IDs)])
####
### obtain a table of all text files... | /Bonnie's Codes/QC/QC_ID.R | no_license | bonnfire/Jhou_U01DA044468 | R | false | false | 7,386 | r | rm(list=ls())
setwd("/home/bonnie/Dropbox (Palmer Lab)/Palmer Lab/Bonnie Lin/Tom_Jhou_U01DA044468_Dropbox_copy/U01")
library(readxl)
library(dplyr)
library(stringr)
library(lubridate)
library(purrr)
library(data.table)
## helpful ##
list.files()
length(IDs[!is.na(IDs)])
####
### obtain a table of all text files... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{dpdata}
\alias{dpdata}
\title{Retrieve the data of a resource}
\usage{
dpdata(meta, resource = 1)
}
\arguments{
\item{meta}{a \code{datapackage} object or a \code{\link{dpresource}} object
in which case the \code{resource} argument is ignored.}
\item{resource... | /man/dpdata.Rd | no_license | djvanderlaan/datapackage | R | false | false | 1,101 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{dpdata}
\alias{dpdata}
\title{Retrieve the data of a resource}
\usage{
dpdata(meta, resource = 1)
}
\arguments{
\item{meta}{a \code{datapackage} object or a \code{\link{dpresource}} object
in which case the \code{resource} argument is ignored.}
\item{resource... |
library(leaflet)
library(rgdal)
library(sp)
library(ggmap)
library(maptools)
#Import survey and fishery data
read.csv("data/fishery/gkc_logbook.csv") %>%
clean_names() -> gkc_log
read.csv("data/survey/tanner_survey_specimen.csv") %>% #data pre-filtered for GKC in OceanAK
clean_names() -> bio_survey
read.csv("dat... | /r/maps.R | no_license | apolson8/seak_gkc | R | false | false | 2,367 | r | library(leaflet)
library(rgdal)
library(sp)
library(ggmap)
library(maptools)
#Import survey and fishery data
read.csv("data/fishery/gkc_logbook.csv") %>%
clean_names() -> gkc_log
read.csv("data/survey/tanner_survey_specimen.csv") %>% #data pre-filtered for GKC in OceanAK
clean_names() -> bio_survey
read.csv("dat... |
# Manuscript: Epigenetic and transcriptomic characterization reveals progression markers and essential pathways in clear cell renal cell carcinoma
# Author: Yige Wu
# Description: UMAP illustration of the tumor-cell clusters for four tumor samples, colored by the cluster name
# Section: Results - Transcri... | /R/4_Tumorclusters/4b_UMAP_tumorclusters.R | permissive | yigewu/ccRCC_sn_publication | R | false | false | 5,202 | r | # Manuscript: Epigenetic and transcriptomic characterization reveals progression markers and essential pathways in clear cell renal cell carcinoma
# Author: Yige Wu
# Description: UMAP illustration of the tumor-cell clusters for four tumor samples, colored by the cluster name
# Section: Results - Transcri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_gran.R
\name{create_gran}
\alias{create_gran}
\title{Build dynamic temporal granularities}
\usage{
create_gran(
.data,
gran1 = NULL,
hierarchy_tbl = NULL,
label = TRUE,
abbr = TRUE,
...
)
}
\arguments{
\item{.data}{A tsibbl... | /man/create_gran.Rd | no_license | Sayani07/gravitas | R | false | true | 2,964 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_gran.R
\name{create_gran}
\alias{create_gran}
\title{Build dynamic temporal granularities}
\usage{
create_gran(
.data,
gran1 = NULL,
hierarchy_tbl = NULL,
label = TRUE,
abbr = TRUE,
...
)
}
\arguments{
\item{.data}{A tsibbl... |
library(shiny)
library(mosaic)
#source("helper.R")
choose_data_source <- radioButtons(
"file_or_package",
label = NULL,
choices = list("Choose Datasets" = 1, "Upload Datasets" = 2),
selected = 1)
condition1 <-
conditionalPanel(
condition = "input.file_or_package == 1",
selectizeInput("data", labe... | /navBar/data.R | no_license | dtkaplan/MOSAIC-Summer-2015 | R | false | false | 1,374 | r | library(shiny)
library(mosaic)
#source("helper.R")
choose_data_source <- radioButtons(
"file_or_package",
label = NULL,
choices = list("Choose Datasets" = 1, "Upload Datasets" = 2),
selected = 1)
condition1 <-
conditionalPanel(
condition = "input.file_or_package == 1",
selectizeInput("data", labe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/auto_auth.R
\name{gar_auto_auth}
\alias{gar_auto_auth}
\title{Perform auto authentication}
\usage{
gar_auto_auth(required_scopes, no_auto = NULL,
environment_var = "GAR_AUTH_FILE", new_user = NULL)
}
\arguments{
\item{required_scopes}{Requi... | /man/gar_auto_auth.Rd | no_license | jeffwzhong1994/googleAuthR | R | false | true | 1,715 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/auto_auth.R
\name{gar_auto_auth}
\alias{gar_auto_auth}
\title{Perform auto authentication}
\usage{
gar_auto_auth(required_scopes, no_auto = NULL,
environment_var = "GAR_AUTH_FILE", new_user = NULL)
}
\arguments{
\item{required_scopes}{Requi... |
EvoFold.file = "EvoFold_liftOver_sacCer1-to-sacCer2.bed"
PARS.file = "../Kertesz_et_al_2010/GSE22393_processed_merged_PARS_sacCer2_1.bed"
genes.file = "../Kertesz_et_al_2010/sce_transcriptome_global.tab"
EvoFold.table = read.table(EvoFold.file, head=F, sep="\t")
PARS.table = read.table(PARS.file, head=F, sep="\t")
gen... | /Kertesz_et_al_2010_Comp/compare_predictions.R | no_license | cwarden45/Coding-fRNA-Comment | R | false | false | 4,373 | r | EvoFold.file = "EvoFold_liftOver_sacCer1-to-sacCer2.bed"
PARS.file = "../Kertesz_et_al_2010/GSE22393_processed_merged_PARS_sacCer2_1.bed"
genes.file = "../Kertesz_et_al_2010/sce_transcriptome_global.tab"
EvoFold.table = read.table(EvoFold.file, head=F, sep="\t")
PARS.table = read.table(PARS.file, head=F, sep="\t")
gen... |
######################################
# Boosting
######################################
install.packages("gbm")
library(gbm)
library(MASS)
library(ISLR)
set.seed(1)
train=sample(1:nrow(Boston),nrow(Boston)/2)
boston.test=Boston[-train,"medv"]
# boosting: distribution=gaussian for regression probs, bernoulli... | /boosting.R | no_license | just4jin/date-mining-algorithms | R | false | false | 1,532 | r | ######################################
# Boosting
######################################
install.packages("gbm")
library(gbm)
library(MASS)
library(ISLR)
set.seed(1)
train=sample(1:nrow(Boston),nrow(Boston)/2)
boston.test=Boston[-train,"medv"]
# boosting: distribution=gaussian for regression probs, bernoulli... |
testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902832.06, 6.68889884134308e+51, -4.05003163986346e... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615853543-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 659 | r | testlist <- list(Rs = numeric(0), atmp = 0, relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902832.06, 6.68889884134308e+51, -4.05003163986346e... |
## BS code
BSprice<-function(pc, S, k, vol, d, r, t)
{
#pc put/call indicator call=1, put=-1
#S Stock price at 0
#K strike
#vol volatility
#d dividend yield
#r riskless rate
#t time to maturity
d1 = (log(S / k) + t * (r - d + (vol ^ 2) / 2)) / (vol * sqrt(t))
d2 = d1 - vol * sqrt(t)... | /Untitled.R | no_license | NancyGahlot/FM408 | R | false | false | 6,859 | r |
## BS code
BSprice<-function(pc, S, k, vol, d, r, t)
{
#pc put/call indicator call=1, put=-1
#S Stock price at 0
#K strike
#vol volatility
#d dividend yield
#r riskless rate
#t time to maturity
d1 = (log(S / k) + t * (r - d + (vol ^ 2) / 2)) / (vol * sqrt(t))
d2 = d1 - vol * sqrt(t)... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
glbin_lcd_cpp <- function(X, y, offset, G0, G1, group_weight, lambda, add_intercept, alpha, verb, eps, dfmax, maxiter, AIC_stop, penalty, pen_tuning) {
.Call('_glbinc_glbin_lcd_cpp', PACKAG... | /R/RcppExports.R | no_license | jeliason/glbinc | R | false | false | 1,943 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
glbin_lcd_cpp <- function(X, y, offset, G0, G1, group_weight, lambda, add_intercept, alpha, verb, eps, dfmax, maxiter, AIC_stop, penalty, pen_tuning) {
.Call('_glbinc_glbin_lcd_cpp', PACKAG... |
library(oro.nifti)
library(neurobase)
library(tidyverse)
library(stringr)
#output_selected_clusters
#this function output, for each fold, the selected clusters for each modality as nifti images
#---PARAMETERS---
#output_list: the list that is output of a call of the fit_and_eval function
#space_defining_image : the ab... | /evaluation_of_model_and_cluster_writing.r | no_license | fnemmi-tonic/multimodal_MRI_pipeline_classification | R | false | false | 4,532 | r | library(oro.nifti)
library(neurobase)
library(tidyverse)
library(stringr)
#output_selected_clusters
#this function output, for each fold, the selected clusters for each modality as nifti images
#---PARAMETERS---
#output_list: the list that is output of a call of the fit_and_eval function
#space_defining_image : the ab... |
LoadParameters<-function()
{
parameters = data.frame(matrix(vector(), 1, 15, dimnames=list(c(), c("seed", "numtrain","numtest","itertrain","percGroup","indirect1","indirect2","daylength", "traveltime","detaintime","alpha","gamma","epsilon","pop","movereward"))),stringsAsFactors=F)
parameters$seed=2671 #... | /Ready to Upload/Alethea.2671.R | no_license | Kgatliffe/Alethea | R | false | false | 47,180 | r |
LoadParameters<-function()
{
parameters = data.frame(matrix(vector(), 1, 15, dimnames=list(c(), c("seed", "numtrain","numtest","itertrain","percGroup","indirect1","indirect2","daylength", "traveltime","detaintime","alpha","gamma","epsilon","pop","movereward"))),stringsAsFactors=F)
parameters$seed=2671 #... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DsAcc-class.R
\docType{methods}
\name{getSamples,DsAcc-method}
\alias{getSamples,DsAcc-method}
\alias{getSamples}
\title{getSamples-methods}
\usage{
\S4method{getSamples}{DsAcc}(.object)
}
\arguments{
\item{.object}{\code{\linkS4class{DsAcc}}... | /man/getSamples-DsAcc-method.Rd | no_license | GreenleafLab/ChrAccR | R | false | true | 460 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DsAcc-class.R
\docType{methods}
\name{getSamples,DsAcc-method}
\alias{getSamples,DsAcc-method}
\alias{getSamples}
\title{getSamples-methods}
\usage{
\S4method{getSamples}{DsAcc}(.object)
}
\arguments{
\item{.object}{\code{\linkS4class{DsAcc}}... |
##################################################
## Brief: Identify discontinuities in travel times to adjacent tracts.
## Date: 05/13/2021
## Author: Eric Chandler <echandler@uchicago.edu>
## Details: Measures variance of travel times to adjacent tracts.
## Tracts with large variance may indicate routing ha... | /routing/r5r/discontinuity_finder_differential.R | no_license | dfsnow/travel-time-matrices | R | false | false | 3,364 | r | ##################################################
## Brief: Identify discontinuities in travel times to adjacent tracts.
## Date: 05/13/2021
## Author: Eric Chandler <echandler@uchicago.edu>
## Details: Measures variance of travel times to adjacent tracts.
## Tracts with large variance may indicate routing ha... |
findfactors <- function(num) {
x <- c()
1stprime<- 2; 2ndprime <- 3; everyprime <- num
while( everyprime != 1 ) {
while( everyprime%%1stprime == 0 ) {
x <- c(x, 1stprime)
everyprime <- floor(everyprime/ 1stprime)
}
1stprime <- 2ndprime
2ndprime <- 2ndprime + 2
}
x
}
print(findfact... | /Scripts/Task/prime-decomposition/r/prime-decomposition.r | no_license | stefanos1316/Rosetta-Code-Research | R | false | false | 333 | r | findfactors <- function(num) {
x <- c()
1stprime<- 2; 2ndprime <- 3; everyprime <- num
while( everyprime != 1 ) {
while( everyprime%%1stprime == 0 ) {
x <- c(x, 1stprime)
everyprime <- floor(everyprime/ 1stprime)
}
1stprime <- 2ndprime
2ndprime <- 2ndprime + 2
}
x
}
print(findfact... |
#' @title Animate cases on a process map
#'
#' @description This function animates the cases stored in a `bupaR` event log on top of a process model.
#' Each case is represented by a token that travels through the process model according to the waiting and processing times of activities.
#' Currently, animation is on... | /R/processanimateR.R | permissive | jennifer-cooper/processanimateR | R | false | false | 17,795 | r | #' @title Animate cases on a process map
#'
#' @description This function animates the cases stored in a `bupaR` event log on top of a process model.
#' Each case is represented by a token that travels through the process model according to the waiting and processing times of activities.
#' Currently, animation is on... |
context("Input MCMCiter and Burnin of function for correlated version")
test_that("Throws warning if MCMCiter parameter is not a integer greater than a cutoff", {
skip_on_cran()
expect_warning(cpbayes_cor(1:10, 1:10, ExampleDataCor$cor, MCMCiter = 1), "MCMCiter should be at least 2200*")
expect_warning(cpbayes_c... | /tests/testthat/test-InputRestCor.R | no_license | ArunabhaCodes/CPBayes | R | false | false | 2,151 | r | context("Input MCMCiter and Burnin of function for correlated version")
test_that("Throws warning if MCMCiter parameter is not a integer greater than a cutoff", {
skip_on_cran()
expect_warning(cpbayes_cor(1:10, 1:10, ExampleDataCor$cor, MCMCiter = 1), "MCMCiter should be at least 2200*")
expect_warning(cpbayes_c... |
#' Compcors the input matrix using SVD and returns the result.
#'
#' @param fmri input fmri image or matrix
#' @param ncompcor n compcor vectors
#' @param variance_extreme high variance threshold e.g 0.95 for 95 percent
#' @param mask optional mask for image
#' @param randomSamples take this many random samples to spee... | /R/compcor.R | permissive | ANTsX/ANTsR | R | false | false | 2,752 | r | #' Compcors the input matrix using SVD and returns the result.
#'
#' @param fmri input fmri image or matrix
#' @param ncompcor n compcor vectors
#' @param variance_extreme high variance threshold e.g 0.95 for 95 percent
#' @param mask optional mask for image
#' @param randomSamples take this many random samples to spee... |
#' UI for barplot module
#'
#' @param id string used to namespace module
#' @return an UI snippet
#' @import shiny
#' @import plotly
#' @noRd
barplot_ui <- function (id) {
ns <- shiny::NS(id)
shiny::tagList(
plotly::plotlyOutput(ns("barplot"), height = "500px")
)
}
| /R/mod-barplot_ui.R | permissive | ikbentimkramer/cdphmd | R | false | false | 276 | r | #' UI for barplot module
#'
#' @param id string used to namespace module
#' @return an UI snippet
#' @import shiny
#' @import plotly
#' @noRd
barplot_ui <- function (id) {
ns <- shiny::NS(id)
shiny::tagList(
plotly::plotlyOutput(ns("barplot"), height = "500px")
)
}
|
output$MPelect <- renderPlot({
votesperMP=read.csv("source/data/votesperMP.csv")
dat<-votesperMP[votesperMP$Year == input$year,]
cols <- c(AP="hotpink3",APNI="hotpink3", Alliance="hotpink3", Alliance..Lib.="orange3", Alliance..SDP.="blue4",BNP="steelblue4", British.National="steelblue4",Con="dodgerblue", Conse... | /Shiny/source/servermpelect.R | no_license | macarda/Concentrated-Vote | R | false | false | 5,676 | r | output$MPelect <- renderPlot({
votesperMP=read.csv("source/data/votesperMP.csv")
dat<-votesperMP[votesperMP$Year == input$year,]
cols <- c(AP="hotpink3",APNI="hotpink3", Alliance="hotpink3", Alliance..Lib.="orange3", Alliance..SDP.="blue4",BNP="steelblue4", British.National="steelblue4",Con="dodgerblue", Conse... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/all_mailinglists.R
\name{all_mailinglists}
\alias{all_mailinglists}
\title{Retrieve a data frame of all mailing lists from Qualtrics}
\usage{
all_mailinglists()
}
\description{
Retrieve a data frame of all mailing lists from Qualtrics
}
\exam... | /man/all_mailinglists.Rd | permissive | jntrcs/qualtRics | R | false | true | 567 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/all_mailinglists.R
\name{all_mailinglists}
\alias{all_mailinglists}
\title{Retrieve a data frame of all mailing lists from Qualtrics}
\usage{
all_mailinglists()
}
\description{
Retrieve a data frame of all mailing lists from Qualtrics
}
\exam... |
#' Model the per-gene variance
#'
#' Model the variance of the log-expression profiles for each gene,
#' decomposing it into technical and biological components based on a fitted mean-variance trend.
#'
#' @param x A numeric matrix of log-normalized expression values where rows are genes and columns are cells.
#'
#' ... | /R/modelGeneVar.R | no_license | zzzsssyyy1995/scran | R | false | false | 10,311 | r | #' Model the per-gene variance
#'
#' Model the variance of the log-expression profiles for each gene,
#' decomposing it into technical and biological components based on a fitted mean-variance trend.
#'
#' @param x A numeric matrix of log-normalized expression values where rows are genes and columns are cells.
#'
#' ... |
# supplementary figure showing correlation between case strength & punishment
library(tidyverse)
library(grid)
library(gridExtra)
library(gtable)
library(gridBase)
library(factoextra)
library(ggarrange)
source('ggplot_setup.R')
load('data/stan_postprocess_2v_t.rdata')
#effects <- effects %>% filter(group =='mri')
#dat... | /behavior/make_supp_fig_3.R | no_license | jcastrel/juror_fmri_bias | R | false | false | 4,763 | r | # supplementary figure showing correlation between case strength & punishment
library(tidyverse)
library(grid)
library(gridExtra)
library(gtable)
library(gridBase)
library(factoextra)
library(ggarrange)
source('ggplot_setup.R')
load('data/stan_postprocess_2v_t.rdata')
#effects <- effects %>% filter(group =='mri')
#dat... |
#' @title sim_multiple_rows: Simulate tree from multiple rows and apply summary statistics
#' @description Function runs multiple simulations. Can be specified by row.
#' Also provides summary statistics like total fossil count, fossil
#' count per interval, and origin time.
#'
#' @param data data frame
#' @par... | /R/multiple_simulations.R | no_license | jaishimuku/WrightLab_FBD | R | false | false | 2,352 | r |
#' @title sim_multiple_rows: Simulate tree from multiple rows and apply summary statistics
#' @description Function runs multiple simulations. Can be specified by row.
#' Also provides summary statistics like total fossil count, fossil
#' count per interval, and origin time.
#'
#' @param data data frame
#' @par... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/decom.adaptive.R
\name{decom.adaptive}
\alias{decom.adaptive}
\title{decom: decompose waveform with adaptive Gaussian function.}
\usage{
decom.adaptive(x, smooth = "TRUE", thres = 0.22, width = 3)
}
\arguments{
\item{x}{is a waveform with a i... | /man/decom.adaptive.Rd | no_license | parvezrana/waveformlidar | R | false | true | 2,153 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/decom.adaptive.R
\name{decom.adaptive}
\alias{decom.adaptive}
\title{decom: decompose waveform with adaptive Gaussian function.}
\usage{
decom.adaptive(x, smooth = "TRUE", thres = 0.22, width = 3)
}
\arguments{
\item{x}{is a waveform with a i... |
# orcid.R
# Take ORCID ID and make a list of papers
# use rcrossref to get better formatted data
# Version for shiny
# March 2018
# set token as an environmental variable (March 2018)
x <- "07073399-4dcc-47b3-a0a8-925327224519"
Sys.setenv(ORCID_TOKEN=x)
## Test IDs
# orcid.id = '0000-0003-1602-4544'
# orcid.id = '000... | /orcid.R | permissive | edward-burn/helping.funders | R | false | false | 11,449 | r | # orcid.R
# Take ORCID ID and make a list of papers
# use rcrossref to get better formatted data
# Version for shiny
# March 2018
# set token as an environmental variable (March 2018)
x <- "07073399-4dcc-47b3-a0a8-925327224519"
Sys.setenv(ORCID_TOKEN=x)
## Test IDs
# orcid.id = '0000-0003-1602-4544'
# orcid.id = '000... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.