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
########## Solutions to Homework 2 ########## #### Problem 4 #### ## @author: David Dobor ## ## Problem 1 x <- 0:3 # given support of r.v X p_x <- c(0.25, 0.125, 0.125, 0.5) # and given its pmf F_x <- cumsum(p_x) # compute the cdf of X #### create a data f...
/week2/q1hw1.R
no_license
david-dobor/8003
R
false
false
2,189
r
########## Solutions to Homework 2 ########## #### Problem 4 #### ## @author: David Dobor ## ## Problem 1 x <- 0:3 # given support of r.v X p_x <- c(0.25, 0.125, 0.125, 0.5) # and given its pmf F_x <- cumsum(p_x) # compute the cdf of X #### create a data f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/google_map.R \name{google_map-shiny} \alias{google_map-shiny} \alias{google_mapOutput} \alias{renderGoogle_map} \title{Shiny bindings for google_map} \usage{ google_mapOutput(outputId, width = "100\%", height = "400px") renderGoogle_map(expr...
/man/google_map-shiny.Rd
no_license
fdzul/googleway
R
false
true
981
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/google_map.R \name{google_map-shiny} \alias{google_map-shiny} \alias{google_mapOutput} \alias{renderGoogle_map} \title{Shiny bindings for google_map} \usage{ google_mapOutput(outputId, width = "100\%", height = "400px") renderGoogle_map(expr...
NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") library(dplyr) d <- filter(NEI, fips == "24510") d <- summarise(group_by(d, year), s = sum(Emissions)) png(filename = "plot2.png") plot(d, type = "l") dev.off()
/plot2.R
no_license
AaBelov/ExploratoryAnalysisWeek3
R
false
false
247
r
NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") library(dplyr) d <- filter(NEI, fips == "24510") d <- summarise(group_by(d, year), s = sum(Emissions)) png(filename = "plot2.png") plot(d, type = "l") dev.off()
## ----setup, include = FALSE---------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ------------------------------------------------------------------------ library(kwic) data(dickensl) kwic(dickensl, "the") ## ---------------------------------------------------...
/vignettes/kwic.R
permissive
sylvainloiseau/kwic
R
false
false
2,106
r
## ----setup, include = FALSE---------------------------------------------- knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ## ------------------------------------------------------------------------ library(kwic) data(dickensl) kwic(dickensl, "the") ## ---------------------------------------------------...
#load packages library(ggplot2) library(cowplot) #making data structure work figure 4 eqiuvalent i_sim <- read.csv(file="match comp i.csv", row.names = 1) j_sim <- read.csv(file="match comp j.csv", row.names = 1) generations <- 1:1000 df_i <- data.frame(generations, i_sim$V1) df_j <- data.frame(generations, j_sim$V1) ...
/R/making_figures_nonmatch_mut.R
permissive
kmkaur/coevolver
R
false
false
2,101
r
#load packages library(ggplot2) library(cowplot) #making data structure work figure 4 eqiuvalent i_sim <- read.csv(file="match comp i.csv", row.names = 1) j_sim <- read.csv(file="match comp j.csv", row.names = 1) generations <- 1:1000 df_i <- data.frame(generations, i_sim$V1) df_j <- data.frame(generations, j_sim$V1) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{simone} \alias{simone} \title{some comment} \usage{ simone(G, eta, epsilon, T) } \description{ some comment } \keyword{internal}
/LongMemoryTS/man/simone.Rd
no_license
akhikolla/TestedPackages-NoIssues
R
false
true
239
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{simone} \alias{simone} \title{some comment} \usage{ simone(G, eta, epsilon, T) } \description{ some comment } \keyword{internal}
# Load in amino acid chain sequences for meso and thermo bacteria and generate hydrophobicity signals library(tictoc) tic() meso_seq <- strsplit(scan("540_Mesophiles.txt", what = "list", sep = " "), split = NULL) therm_seq <- strsplit(scan("540_Thermophiles.txt", what = "list", sep = " "), split = NULL) # and now ...
/Data_IN.R
no_license
JackLinehan/Wavelet-Analysis-of-Hydrophobicity-Signals-in-mesophile-and-thermophile-bacteria
R
false
false
8,898
r
# Load in amino acid chain sequences for meso and thermo bacteria and generate hydrophobicity signals library(tictoc) tic() meso_seq <- strsplit(scan("540_Mesophiles.txt", what = "list", sep = " "), split = NULL) therm_seq <- strsplit(scan("540_Thermophiles.txt", what = "list", sep = " "), split = NULL) # and now ...
#' Global Two-Sample Test for Network-Valued Data #' #' This function carries out an hypothesis test where the null hypothesis is #' that the two populations of networks share the same underlying probabilistic #' distribution against the alternative hypothesis that the two populations come #' from different distributio...
/R/tests.R
no_license
cran/nevada
R
false
false
12,299
r
#' Global Two-Sample Test for Network-Valued Data #' #' This function carries out an hypothesis test where the null hypothesis is #' that the two populations of networks share the same underlying probabilistic #' distribution against the alternative hypothesis that the two populations come #' from different distributio...
### get data in a right form for analysis source(file='readAll.R') ## d is the data without intermezzo trials ## task 2 is the short task, task 4 is the long task ## TODO: quickly write the experimental design ## TODO: use rmarkdown! so we can ease up communication (also after publication) #### look at data head(d) u...
/preprocess.R
no_license
woutervoorspoels/ShortLongtask-R-code
R
false
false
838
r
### get data in a right form for analysis source(file='readAll.R') ## d is the data without intermezzo trials ## task 2 is the short task, task 4 is the long task ## TODO: quickly write the experimental design ## TODO: use rmarkdown! so we can ease up communication (also after publication) #### look at data head(d) u...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/QFactorGet-package.r \docType{package} \name{QFactorGet} \alias{QFactorGet} \alias{QFactorGet-package} \title{QFactorGet} \description{ QFactorGet }
/man/QFactorGet.Rd
no_license
raphael210/QFactorGet
R
false
true
227
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/QFactorGet-package.r \docType{package} \name{QFactorGet} \alias{QFactorGet} \alias{QFactorGet-package} \title{QFactorGet} \description{ QFactorGet }
## Download and unzip the data file. ## IMPORTANT: Just uncomment the next 2 lines to download and unzip the file. ## To save time, it's commented so I don't have to repeat downloading and ## extracting the file every time this script is executed. If the two lines ## are not commente, just ignore this. :) #downl...
/run_analysis.R
no_license
evision/getdataProject
R
false
false
2,893
r
## Download and unzip the data file. ## IMPORTANT: Just uncomment the next 2 lines to download and unzip the file. ## To save time, it's commented so I don't have to repeat downloading and ## extracting the file every time this script is executed. If the two lines ## are not commente, just ignore this. :) #downl...
################################################################################ # Joshua C. Fjelstul, Ph.D. # eutr R package ################################################################################ # define pipe function `%>%` <- magrittr::`%>%` # load data load("data/notifications.RData") load("data/comment...
/data-raw/code/07_ts_data.R
no_license
jfjelstul/eutr
R
false
false
3,302
r
################################################################################ # Joshua C. Fjelstul, Ph.D. # eutr R package ################################################################################ # define pipe function `%>%` <- magrittr::`%>%` # load data load("data/notifications.RData") load("data/comment...
# work.dir = "~/Google_Drive/MyPackages/WaSPU/data" # genename = "ANKRD34A" # GWAS.plink = "wgas_maf5"; # Weight.db = "TW_WholeBlood_ElasticNet.0.5.db" # method = "perm"; model = "binomial" # B = 1e3; pow = c(1:8, Inf) y = readRDS("binary_phenotype.rds")# convert to 1,0 coding WaSPU(work.dir = "~/Google_Drive/MyPackag...
/R/archieve/test.R
no_license
jasonzyx/WaSPU
R
false
false
563
r
# work.dir = "~/Google_Drive/MyPackages/WaSPU/data" # genename = "ANKRD34A" # GWAS.plink = "wgas_maf5"; # Weight.db = "TW_WholeBlood_ElasticNet.0.5.db" # method = "perm"; model = "binomial" # B = 1e3; pow = c(1:8, Inf) y = readRDS("binary_phenotype.rds")# convert to 1,0 coding WaSPU(work.dir = "~/Google_Drive/MyPackag...
#' Create the observation_ancillary table #' #' @param L0_flat (tbl_df, tbl, data.frame) The fully joined source L0 dataset, in "flat" format (see details). #' @param observation_id (character) Column in \code{L0_flat} containing the identifier assigned to each unique observation. #' @param variable_name (character) Co...
/R/create_observation_ancillary.R
permissive
sokole/ecocomDP
R
false
false
2,758
r
#' Create the observation_ancillary table #' #' @param L0_flat (tbl_df, tbl, data.frame) The fully joined source L0 dataset, in "flat" format (see details). #' @param observation_id (character) Column in \code{L0_flat} containing the identifier assigned to each unique observation. #' @param variable_name (character) Co...
#' @title Mark Positional data - monocentrics #' @description When several OTUs, some can be monocen. and others holocen. #' Marks distance for #' monocen. are measured from cen. and for #' holocen. from top or bottom depending on \code{param} \code{origin}. See #' vignettes. #' #' @docType data #' @name markposDFs NUL...
/R/markposDFs.R
no_license
cran/idiogramFISH
R
false
false
2,157
r
#' @title Mark Positional data - monocentrics #' @description When several OTUs, some can be monocen. and others holocen. #' Marks distance for #' monocen. are measured from cen. and for #' holocen. from top or bottom depending on \code{param} \code{origin}. See #' vignettes. #' #' @docType data #' @name markposDFs NUL...
library(FinCal) library(plotly)
/Global.R
no_license
tanvird3/MDS
R
false
false
34
r
library(FinCal) library(plotly)
# lec16_2_cnn.r # Convolutional Neural Network # Require mxnet package # install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip",repos = NULL) library(mxnet) # If you have Error message "no package called XML or DiagrmmeR", then install #install.packages("XML") #install.packages("DiagrammeR")...
/postech/머신러닝기법과 R프로그래밍 Ⅱ/data/week16_2/lec16_2_cnn.R
no_license
ne-choi/study
R
false
false
2,721
r
# lec16_2_cnn.r # Convolutional Neural Network # Require mxnet package # install.packages("https://github.com/jeremiedb/mxnet_winbin/raw/master/mxnet.zip",repos = NULL) library(mxnet) # If you have Error message "no package called XML or DiagrmmeR", then install #install.packages("XML") #install.packages("DiagrammeR")...
#This is a minimal version of seurat preparing #This snippet reads cells from the file Deduplicated.csv and creates _ipmc, the Seurat object. Initial cell types are found in _types variable #new cell types _newtypes are LETTERS A-H, W, I, M due to the preferrable single letter cell tags by Seurat visualizers. # Re...
/seurat2.r
no_license
SevaVigg/DrNCC
R
false
false
4,654
r
#This is a minimal version of seurat preparing #This snippet reads cells from the file Deduplicated.csv and creates _ipmc, the Seurat object. Initial cell types are found in _types variable #new cell types _newtypes are LETTERS A-H, W, I, M due to the preferrable single letter cell tags by Seurat visualizers. # Re...
function (file) { e <- get("data.env", .GlobalEnv) e[["file_coding"]][[length(e[["file_coding"]]) + 1]] <- list(file = file) .Call("_jiebaR_file_coding", file) }
/valgrind_test_dir/file_coding-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
175
r
function (file) { e <- get("data.env", .GlobalEnv) e[["file_coding"]][[length(e[["file_coding"]]) + 1]] <- list(file = file) .Call("_jiebaR_file_coding", file) }
# 3. Optional Plot fx <- function(x, plot) { i <- 1 y <- rep(0, length(x)) while(i <= length(x)) { if(x[i] <= -4 | x[i] >= 4) { y[i] <- "NA" i = i + 1 }else if(x[i] < 0) { y[i] <- x[i]^2 + 2*x[i] + 3 i = i + 1 }else if(x[i] < 2) { y[i] <- x[i] + 3 i = ...
/problem 3.R
no_license
yokielove/881new
R
false
false
488
r
# 3. Optional Plot fx <- function(x, plot) { i <- 1 y <- rep(0, length(x)) while(i <= length(x)) { if(x[i] <= -4 | x[i] >= 4) { y[i] <- "NA" i = i + 1 }else if(x[i] < 0) { y[i] <- x[i]^2 + 2*x[i] + 3 i = i + 1 }else if(x[i] < 2) { y[i] <- x[i] + 3 i = ...
# Vectors, Matrices And Arrays # ---------------------------- # Chapter Goals # ~~~~~~~~~~~~~ # Vectors # ~~~~~~~ 8.5:4.5 #sequence of numbers from 8.5 down to 4.5 c(1, 1:3, c(5, 8), 13) #values concatenated into single vector vector("numeric", 5) vector("complex", 5) vector("logical", 5) vector...
/XRPINPClassFiles/code_samples_rproj/Cotton_Learning_R_Chapter4_Vecmatarr_Code_Samples.r
no_license
CostelloTechnicalConsulting/XRPINPClassFiles
R
false
false
4,582
r
# Vectors, Matrices And Arrays # ---------------------------- # Chapter Goals # ~~~~~~~~~~~~~ # Vectors # ~~~~~~~ 8.5:4.5 #sequence of numbers from 8.5 down to 4.5 c(1, 1:3, c(5, 8), 13) #values concatenated into single vector vector("numeric", 5) vector("complex", 5) vector("logical", 5) vector...
checkComponentsCollapsed <- function(K, N, FZY, smallestClN, EMiteration, crisp = FALSE) { resetCl = NULL ComponentColapsedOntoSinglePoint = which(table(factor(apply(FZY, 1, which.max), levels = as.character(1:K))) < smallestClN) # ComponentColapsedOntoSinglePoint is true if cluster contains less than smal...
/Functions/checkComponentsCollapsed.R
permissive
AnieBee/LCVAR
R
false
false
1,814
r
checkComponentsCollapsed <- function(K, N, FZY, smallestClN, EMiteration, crisp = FALSE) { resetCl = NULL ComponentColapsedOntoSinglePoint = which(table(factor(apply(FZY, 1, which.max), levels = as.character(1:K))) < smallestClN) # ComponentColapsedOntoSinglePoint is true if cluster contains less than smal...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/struct.R \name{structList} \alias{structList} \title{Constructor for a structList object} \usage{ structList(...) } \arguments{ \item{...}{a list of a \code{\link{struct}} objects} } \description{ the structList class is a conatainer for stor...
/man/structList.Rd
no_license
italo-granato/starmie
R
false
true
359
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/struct.R \name{structList} \alias{structList} \title{Constructor for a structList object} \usage{ structList(...) } \arguments{ \item{...}{a list of a \code{\link{struct}} objects} } \description{ the structList class is a conatainer for stor...
\alias{gtkToggleButtonGetActive} \name{gtkToggleButtonGetActive} \title{gtkToggleButtonGetActive} \description{Queries a \code{\link{GtkToggleButton}} and returns its current state. Returns \code{TRUE} if the toggle button is pressed in and \code{FALSE} if it is raised.} \usage{gtkToggleButtonGetActive(object)} \argume...
/man/gtkToggleButtonGetActive.Rd
no_license
cran/RGtk2.10
R
false
false
525
rd
\alias{gtkToggleButtonGetActive} \name{gtkToggleButtonGetActive} \title{gtkToggleButtonGetActive} \description{Queries a \code{\link{GtkToggleButton}} and returns its current state. Returns \code{TRUE} if the toggle button is pressed in and \code{FALSE} if it is raised.} \usage{gtkToggleButtonGetActive(object)} \argume...
ChooseMarker <- function(pure_all, CellType, nMarkCT = 10, chooseSig = FALSE, verbose = TRUE) { K <- length(CellType) SelMarker <- list() for(k in 1:K) { desn <- rep(0, ncol(pure_all)) desn[CellType[[k]]] <- 1 ...
/R/ChooseMarker.R
no_license
ziyili20/TOAST
R
false
false
2,138
r
ChooseMarker <- function(pure_all, CellType, nMarkCT = 10, chooseSig = FALSE, verbose = TRUE) { K <- length(CellType) SelMarker <- list() for(k in 1:K) { desn <- rep(0, ncol(pure_all)) desn[CellType[[k]]] <- 1 ...
# Note: for all scripts I'm assuming the data has already been downloaded, # unzipped, and placed in a data folder locally. This is in line with the assignment. ## Read in data setwd("~/Documents/Helpful Docs/Coursera/ExploratoryDataAnalysis") power_data = read.csv2("./data/household_power_consumption.txt", ) # Cut d...
/plot4.R
no_license
rlapointe/ExData_Plotting1
R
false
false
2,543
r
# Note: for all scripts I'm assuming the data has already been downloaded, # unzipped, and placed in a data folder locally. This is in line with the assignment. ## Read in data setwd("~/Documents/Helpful Docs/Coursera/ExploratoryDataAnalysis") power_data = read.csv2("./data/household_power_consumption.txt", ) # Cut d...
#' Parses results from an xml object downloaded from clinicaltrials.gov #' #' Results of a clinical study are stored in a particular way. This reads and #' organizes the information and returns it as a list of dataframes. Throws an error if the xml has no \code{clinical_results} node. #' #' @param parsed A parsed XML o...
/R/gather_results.R
permissive
serayamaouche/rclinicaltrials
R
false
false
7,499
r
#' Parses results from an xml object downloaded from clinicaltrials.gov #' #' Results of a clinical study are stored in a particular way. This reads and #' organizes the information and returns it as a list of dataframes. Throws an error if the xml has no \code{clinical_results} node. #' #' @param parsed A parsed XML o...
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 qatd_cpp_fcm <- function(texts_, n_types, weights_, boolean, ordered) { .Call(`_quanteda_qatd_cpp_fcm`, texts_, n_types, weights_, boolean, ordered) } qatd_cpp_index <- function(texts_, ty...
/R/RcppExports.R
no_license
cran/quanteda
R
false
false
2,765
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 qatd_cpp_fcm <- function(texts_, n_types, weights_, boolean, ordered) { .Call(`_quanteda_qatd_cpp_fcm`, texts_, n_types, weights_, boolean, ordered) } qatd_cpp_index <- function(texts_, ty...
library(data.table) exprs <- read.delim("~/Abu-Dhabi/RNASeq/eQTL/Normalised_GEX_data.txt") colnames(exprs) <- gsub("X", "", colnames(exprs)) exprs <- as.matrix(exprs) info <- read.delim("~/Abu-Dhabi/RNASeq/eQTL/sample_info.txt") rownames(info) <- info$SampleID gex.pcs <- read.delim("~/Abu-Dhabi/RNASeq/eQTL/GEX_PCs.t...
/eQTL/Make_rda.R
no_license
jknightlab/Abu-Dhabi
R
false
false
1,964
r
library(data.table) exprs <- read.delim("~/Abu-Dhabi/RNASeq/eQTL/Normalised_GEX_data.txt") colnames(exprs) <- gsub("X", "", colnames(exprs)) exprs <- as.matrix(exprs) info <- read.delim("~/Abu-Dhabi/RNASeq/eQTL/sample_info.txt") rownames(info) <- info$SampleID gex.pcs <- read.delim("~/Abu-Dhabi/RNASeq/eQTL/GEX_PCs.t...
# Gráfico de barra com Rbase # https://youtu.be/8FEVt-qnZMs #mais simples dados<- 4:8 barplot(dados) #adicionando legendas e idenficações names(dados)<- 1:5 barplot(dados) names(dados)<- c("a","b","c","d","e") names(dados)<- c("abacate","berinjela","cebola","dados","elefante") barplot(dados) barplot(dados, xlab...
/barras_rbase.R
no_license
igoralmeidab/R_portugues
R
false
false
1,417
r
# Gráfico de barra com Rbase # https://youtu.be/8FEVt-qnZMs #mais simples dados<- 4:8 barplot(dados) #adicionando legendas e idenficações names(dados)<- 1:5 barplot(dados) names(dados)<- c("a","b","c","d","e") names(dados)<- c("abacate","berinjela","cebola","dados","elefante") barplot(dados) barplot(dados, xlab...
### R code from vignette source 'rmhPoster.Rtex' ################################################### ### code chunk number 1: rmhPoster.Rtex:15-149 ################################################### library(lattice) library(latticeExtra) library(microplot) ## options needed by Hmisc::latex options(latexcmd='pdflatex...
/inst/doc/rmhPoster.R
no_license
cran/microplot
R
false
false
4,816
r
### R code from vignette source 'rmhPoster.Rtex' ################################################### ### code chunk number 1: rmhPoster.Rtex:15-149 ################################################### library(lattice) library(latticeExtra) library(microplot) ## options needed by Hmisc::latex options(latexcmd='pdflatex...
\name{plot.bgeva} \alias{plot.bgeva} \title{bgeva plotting} \description{It takes a fitted \code{bgeva} object produced by \code{bgeva()} and plots the component smooth functions that make it up on the scale of the linear predictor. This function is based on \code{plot.gam()} in \code{mgcv}. Please see t...
/man/plot.bgeva.Rd
no_license
cran/bgeva
R
false
false
2,534
rd
\name{plot.bgeva} \alias{plot.bgeva} \title{bgeva plotting} \description{It takes a fitted \code{bgeva} object produced by \code{bgeva()} and plots the component smooth functions that make it up on the scale of the linear predictor. This function is based on \code{plot.gam()} in \code{mgcv}. Please see t...
test_that("read receipt", { expect_error(envelope() %>% request_receipt_read()) msg <- envelope() %>% from("olivia@google.com") %>% request_receipt_read() expect_match(headers(msg), "Disposition-Notification-To: +olivia@google.com") expect_match(headers(msg), "X-Confirm-Reading-To: +olivia@google.com"...
/tests/testthat/test-header-receipt.R
no_license
datawookie/emayili
R
false
false
580
r
test_that("read receipt", { expect_error(envelope() %>% request_receipt_read()) msg <- envelope() %>% from("olivia@google.com") %>% request_receipt_read() expect_match(headers(msg), "Disposition-Notification-To: +olivia@google.com") expect_match(headers(msg), "X-Confirm-Reading-To: +olivia@google.com"...
# nocov start .onLoad <- function(libname, pkgname) { .frame0 <<- new.env() shiny::addResourcePath("smrd_apps", system.file("smrd_apps", package = "SMRD")) shiny::shinyOptions('theme' = 'flatly') } .onUnload <- function (libpath) { library.dynam.unload("SMRD", libpath) } ...
/R/zzz.R
no_license
anhnguyendepocen/SMRD
R
false
false
5,794
r
# nocov start .onLoad <- function(libname, pkgname) { .frame0 <<- new.env() shiny::addResourcePath("smrd_apps", system.file("smrd_apps", package = "SMRD")) shiny::shinyOptions('theme' = 'flatly') } .onUnload <- function (libpath) { library.dynam.unload("SMRD", libpath) } ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lexmodelbuildingservice_operations.R \name{lexmodelbuildingservice_create_slot_type_version} \alias{lexmodelbuildingservice_create_slot_type_version} \title{Creates a new version of a slot type based on the $LATEST version of the specified sl...
/cran/paws.machine.learning/man/lexmodelbuildingservice_create_slot_type_version.Rd
permissive
paws-r/paws
R
false
true
1,376
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lexmodelbuildingservice_operations.R \name{lexmodelbuildingservice_create_slot_type_version} \alias{lexmodelbuildingservice_create_slot_type_version} \title{Creates a new version of a slot type based on the $LATEST version of the specified sl...
library(magick) ### Name: device ### Title: Magick Graphics Device ### Aliases: device image_graph image_device image_draw image_capture ### ** Examples # Regular image frink <- image_read("https://jeroen.github.io/images/frink.png") # Produce image using graphics device fig <- image_graph(res = 96) ggplot2::qplot...
/data/genthat_extracted_code/magick/examples/device.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,163
r
library(magick) ### Name: device ### Title: Magick Graphics Device ### Aliases: device image_graph image_device image_draw image_capture ### ** Examples # Regular image frink <- image_read("https://jeroen.github.io/images/frink.png") # Produce image using graphics device fig <- image_graph(res = 96) ggplot2::qplot...
// THIS IS ALSO CALLED LEVEL ORDER TRAVERSAL /* For Breadth First Traversal, we make use of a queue(circular may be) and it is implemented in the followning steps 1) We start from the root node and enqueue it in the queue 2) Dequeue root from the queue, print it and enqueue its children in the queue 3) Dequeue next el...
/BreadthFirstTraversal.rd
no_license
TriumphantAkash/DataStructureProblems
R
false
false
628
rd
// THIS IS ALSO CALLED LEVEL ORDER TRAVERSAL /* For Breadth First Traversal, we make use of a queue(circular may be) and it is implemented in the followning steps 1) We start from the root node and enqueue it in the queue 2) Dequeue root from the queue, print it and enqueue its children in the queue 3) Dequeue next el...
# We overwrite the base source function to allow us to keep track # of whether or not files loaded in a syberia directory have been modified. #' Overwrite built-in source function. #' @name source # TODO: (RK) Re-investigate this. Deprecated for now. .source <- function(filename, ...) { filename <- normalizePath(file...
/R/source.r
permissive
robertzk/syberiaStructure
R
false
false
878
r
# We overwrite the base source function to allow us to keep track # of whether or not files loaded in a syberia directory have been modified. #' Overwrite built-in source function. #' @name source # TODO: (RK) Re-investigate this. Deprecated for now. .source <- function(filename, ...) { filename <- normalizePath(file...
########################### Coursera Exploratory Data Annalysis Project 1 ###################################### ##### Load Data and identify missing values as "?" ##### household_energy_data <- read.table("household_power_consumption.txt", header= TRUE, sep=";", stringsAsFactors=FALSE, dec=".") summary(household_...
/Plot1.R
no_license
merrigan33/ExData_Plotting1
R
false
false
2,125
r
########################### Coursera Exploratory Data Annalysis Project 1 ###################################### ##### Load Data and identify missing values as "?" ##### household_energy_data <- read.table("household_power_consumption.txt", header= TRUE, sep=";", stringsAsFactors=FALSE, dec=".") summary(household_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calcVarPart.R \docType{methods} \name{calcVarPart} \alias{calcVarPart} \alias{calcVarPart,lm-method} \alias{calcVarPart,lmerMod-method} \alias{calcVarPart,glm-method} \title{Compute variance statistics} \usage{ calcVarPart(fit, showWarnings =...
/man/calcVarPart-method.Rd
no_license
DarwinAwardWinner/variancePartition
R
false
true
3,176
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calcVarPart.R \docType{methods} \name{calcVarPart} \alias{calcVarPart} \alias{calcVarPart,lm-method} \alias{calcVarPart,lmerMod-method} \alias{calcVarPart,glm-method} \title{Compute variance statistics} \usage{ calcVarPart(fit, showWarnings =...
CAAElementsPlanetaryOrbit_MarsMeanLongitudeJ2000 <- function(JD){ .Call("CAAElementsPlanetaryOrbit_MarsMeanLongitudeJ2000", JD) }
/R/CAAElementsPlanetaryOrbit_MarsMeanLongitudeJ2000.R
no_license
helixcn/skycalc
R
false
false
134
r
CAAElementsPlanetaryOrbit_MarsMeanLongitudeJ2000 <- function(JD){ .Call("CAAElementsPlanetaryOrbit_MarsMeanLongitudeJ2000", JD) }
library(GLDEX) ### Name: fun.bimodal.init ### Title: Finds the initial values for optimisation in fitting the bimodal ### generalised lambda distribution. ### Aliases: fun.bimodal.init ### Keywords: smooth ### ** Examples ## Split the first column of the faithful data into two using ## fun.class.regime.bi # fait...
/data/genthat_extracted_code/GLDEX/examples/fun.bimodal.init.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
900
r
library(GLDEX) ### Name: fun.bimodal.init ### Title: Finds the initial values for optimisation in fitting the bimodal ### generalised lambda distribution. ### Aliases: fun.bimodal.init ### Keywords: smooth ### ** Examples ## Split the first column of the faithful data into two using ## fun.class.regime.bi # fait...
#' Power of the 1/3-1/3-1/3 procedure #' #' Computes the power of the 1/3-1/3-1/3 procedure, that is, the power to #' detect the overall A effect, the simple A effect, or the simple AB effect. #' #' @param n total subjects with n/4 subjects in each of the C, A, B, and AB groups #' @param hrA group A to grou...
/FacTest6/R/power13_13_13.R
no_license
EricSLeifer/factorial2x2
R
false
false
7,528
r
#' Power of the 1/3-1/3-1/3 procedure #' #' Computes the power of the 1/3-1/3-1/3 procedure, that is, the power to #' detect the overall A effect, the simple A effect, or the simple AB effect. #' #' @param n total subjects with n/4 subjects in each of the C, A, B, and AB groups #' @param hrA group A to grou...
## ------------------------------------------------------------------------ # Notice that comments are started with the "#" character # The basic arithmetic operators (+, - , * , /, ^ [power], %% [modulus]) # The functions will operate element-wise on vectors too # This code will add these two numbers together 2 + 2 #...
/STAT405/Class .R files/class_01.R
no_license
apatoski/STAT405
R
false
false
3,744
r
## ------------------------------------------------------------------------ # Notice that comments are started with the "#" character # The basic arithmetic operators (+, - , * , /, ^ [power], %% [modulus]) # The functions will operate element-wise on vectors too # This code will add these two numbers together 2 + 2 #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{min_mp_idx} \alias{min_mp_idx} \title{Get index of the minimum value from a matrix profile and its nearest neighbor} \usage{ min_mp_idx(.mp, n_dim = NULL, valid = TRUE) } \arguments{ \item{.mp}{a \code{MatrixProfile} object.} \i...
/man/min_mp_idx.Rd
permissive
franzbischoff/tsmp
R
false
true
738
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{min_mp_idx} \alias{min_mp_idx} \title{Get index of the minimum value from a matrix profile and its nearest neighbor} \usage{ min_mp_idx(.mp, n_dim = NULL, valid = TRUE) } \arguments{ \item{.mp}{a \code{MatrixProfile} object.} \i...
pollutantmean <- function(directory,pollutant, id=1:332){ ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'pollutant' is a character vector of length 1 indicating ## the name of the pollutant for which we will calculate the ## mean; either "sulfate" or "nitra...
/pollutantmean.R
no_license
NRJA/rprogrammingcoursera
R
false
false
964
r
pollutantmean <- function(directory,pollutant, id=1:332){ ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'pollutant' is a character vector of length 1 indicating ## the name of the pollutant for which we will calculate the ## mean; either "sulfate" or "nitra...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ##The function 'makeCacheMatrix' creates a special 'matrix' object and is a list of #functions to firstly set the value of the matrix, get the value of the matrix, afterthat # set the ...
/cachematrix.R
no_license
LubanaTanvia-new/ProgrammingAssignment2
R
false
false
2,190
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ##The function 'makeCacheMatrix' creates a special 'matrix' object and is a list of #functions to firstly set the value of the matrix, get the value of the matrix, afterthat # set the ...
files <- list.files(paste0(.properties$SOURCE_DIR, "RefSeq/sequences")) files_splitted_names <- stri_match_first_regex(files, "(.*)(?>_aa\\.fasta)")[, 2] %>% .[!is.na(.)] rm(files) ##### c.seq_ext <- function(...) { objs <- list(...) ret <- list() ret$seqs <- do.call(c, lapply(objs, function(elem) elem$seqs)) ...
/R/load_sequences.R
no_license
DominikRafacz/PhyloPlastDB-initialization
R
false
false
1,641
r
files <- list.files(paste0(.properties$SOURCE_DIR, "RefSeq/sequences")) files_splitted_names <- stri_match_first_regex(files, "(.*)(?>_aa\\.fasta)")[, 2] %>% .[!is.na(.)] rm(files) ##### c.seq_ext <- function(...) { objs <- list(...) ret <- list() ret$seqs <- do.call(c, lapply(objs, function(elem) elem$seqs)) ...
>FilePath <- "C:/Users/fermi/Documents/Fall 2020/Lab 9/lung_cancer.txt" #1)**** dat<- read.table(FilePath, header=T, row.names=1) #2)*** > class=c("adeno","adeno","adeno","adeno","adeno","adeno","adeno","adeno","adeno","adeno","SCLC","SCLC","SCLC","SCLC","SCLC","SCLC","SCLC","SCLC","SCLC","Normal","Normal","Nor...
/Gene Expression Analysis/Data/Classification.r
no_license
fermingc/Bioinformatics
R
false
false
1,631
r
>FilePath <- "C:/Users/fermi/Documents/Fall 2020/Lab 9/lung_cancer.txt" #1)**** dat<- read.table(FilePath, header=T, row.names=1) #2)*** > class=c("adeno","adeno","adeno","adeno","adeno","adeno","adeno","adeno","adeno","adeno","SCLC","SCLC","SCLC","SCLC","SCLC","SCLC","SCLC","SCLC","SCLC","Normal","Normal","Nor...
#' create simulated data for demonstrating LDA analysis #' 2 topics #' #' @param nspecies = number of species in all topic groups #' @param tsteps = number of [monthly] time steps #' #' @return #' beta = matrix of species composition of the groups #' gamma = matrix of topic composition over time #' ...
/previous_work/paper/create_sim_data.R
no_license
ethanwhite/LDATS
R
false
false
6,148
r
#' create simulated data for demonstrating LDA analysis #' 2 topics #' #' @param nspecies = number of species in all topic groups #' @param tsteps = number of [monthly] time steps #' #' @return #' beta = matrix of species composition of the groups #' gamma = matrix of topic composition over time #' ...
#EQC-3-rain-import openandsave <- function(ncname) { ###### #Reading in the data library(ncdf4) ncfname <- paste(ncname, ".nc", sep="") dname <- "precipitation_amount" # note: rain = precipitation amount in kg m-2 - # or full description: "virtual climate station rainfall in mm/day from 9a...
/Archive/first histograms/EQC-03-rain-import.R
no_license
SallyFreanOwen/insurance-and-climate
R
false
false
10,369
r
#EQC-3-rain-import openandsave <- function(ncname) { ###### #Reading in the data library(ncdf4) ncfname <- paste(ncname, ".nc", sep="") dname <- "precipitation_amount" # note: rain = precipitation amount in kg m-2 - # or full description: "virtual climate station rainfall in mm/day from 9a...
#*************************************************** # VGH MDC - Reading in volumes and durations data # 2019-03-21 # Nayef #*************************************************** library(tidyverse) library(magrittr) library(lubridate) # 1. Read in data: ------------------------------ options(readr.default_locale...
/src/2019-03-21_vgh_mdc_read-data.R
no_license
nayefahmad/2019-13-15_vgh_mdc-capacity-planning-including-OPAT
R
false
false
1,275
r
#*************************************************** # VGH MDC - Reading in volumes and durations data # 2019-03-21 # Nayef #*************************************************** library(tidyverse) library(magrittr) library(lubridate) # 1. Read in data: ------------------------------ options(readr.default_locale...
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810619095752e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613114374-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
251
r
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810619095752e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/purrit.R \name{purrit} \alias{purrit} \title{helper function for comp data} \usage{ purrit(obs, pred = NULL, rec_age, plus_age, comp = "length", lenbins = NULL) } \arguments{ \item{obs}{observed data from .rep file} \item{pred}{predicted dat...
/man/purrit.Rd
no_license
BenWilliams-NOAA/rockfishr
R
false
true
829
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/purrit.R \name{purrit} \alias{purrit} \title{helper function for comp data} \usage{ purrit(obs, pred = NULL, rec_age, plus_age, comp = "length", lenbins = NULL) } \arguments{ \item{obs}{observed data from .rep file} \item{pred}{predicted dat...
repfdr_clusters <- function(pdf.binned.z, binned.z.mat,clusters, non.null = c('replication','meta-analysis'), Pi.previous.result=NULL, control = em.control(),clustering.ldr.report = NULL,clustering.verbose = F) { if(!(non.null %in% c('replication','meta-analysis'))){stop('for Cluster Analysis ...
/R/repfdr_clusters.R
no_license
cran/repfdr
R
false
false
8,138
r
repfdr_clusters <- function(pdf.binned.z, binned.z.mat,clusters, non.null = c('replication','meta-analysis'), Pi.previous.result=NULL, control = em.control(),clustering.ldr.report = NULL,clustering.verbose = F) { if(!(non.null %in% c('replication','meta-analysis'))){stop('for Cluster Analysis ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colour_clusters.R \name{set_leaf_colours} \alias{set_leaf_colours} \alias{set_leaf_colors} \alias{set_leaf_colors} \title{Set the leaf colours of a dendrogram} \usage{ set_leaf_colours(d, col, col_to_set = c("edge", "node", "label")) set_lea...
/man/set_leaf_colours.Rd
no_license
cran/dendroextras
R
false
true
947
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colour_clusters.R \name{set_leaf_colours} \alias{set_leaf_colours} \alias{set_leaf_colors} \alias{set_leaf_colors} \title{Set the leaf colours of a dendrogram} \usage{ set_leaf_colours(d, col, col_to_set = c("edge", "node", "label")) set_lea...
################################ #### List of models for which we have tran: list_models_tran_PCMDI <- c("bcc-csm1-1","bcc-csm1-1-m","BNU-ESM","CCSM4","CESM1-BGC","CESM1-CAM5", "CESM1-FASTCHEM","CESM1-WACCM","CMCC-CESM","CNRM-CM5","CNRM-CM5-2","CanESM2","FGOALS-g2", "FGOALS-s2","FIO-ESM","GFDL-CM3","GFDL-ESM2G","GFDL-...
/get_tran.R
no_license
alexismberg/Berg_McColl_2021_drylands
R
false
false
7,736
r
################################ #### List of models for which we have tran: list_models_tran_PCMDI <- c("bcc-csm1-1","bcc-csm1-1-m","BNU-ESM","CCSM4","CESM1-BGC","CESM1-CAM5", "CESM1-FASTCHEM","CESM1-WACCM","CMCC-CESM","CNRM-CM5","CNRM-CM5-2","CanESM2","FGOALS-g2", "FGOALS-s2","FIO-ESM","GFDL-CM3","GFDL-ESM2G","GFDL-...
# Author: Robert J. Hijmans, r.hijmans@gmail.com # Date: December 2009 # Version 0.1 # Licence GPL v3 setClass('MaxEnt', contains = 'DistModel', representation ( lambdas = 'vector', results = 'matrix', path = 'character', html = 'character' ), prototype ( lambdas = as.vector(NA), resu...
/dismo/R/maxent.R
no_license
ingted/R-Examples
R
false
false
11,678
r
# Author: Robert J. Hijmans, r.hijmans@gmail.com # Date: December 2009 # Version 0.1 # Licence GPL v3 setClass('MaxEnt', contains = 'DistModel', representation ( lambdas = 'vector', results = 'matrix', path = 'character', html = 'character' ), prototype ( lambdas = as.vector(NA), resu...
######################################################## # 1. Load Libraries and Data ######################################################## library(raster) library(lme4) ######################################################## # 2. Set Working Directory or Cluster Info ###########################################...
/10.1_MapCoefficients_spRichness.R
permissive
MaximilianPi/GlobalEWDiversity
R
false
false
7,759
r
######################################################## # 1. Load Libraries and Data ######################################################## library(raster) library(lme4) ######################################################## # 2. Set Working Directory or Cluster Info ###########################################...
#' The application User-Interface #' #' @param request Internal parameter for `{shiny}`. #' DO NOT REMOVE. #' @import shiny #' @noRd app_ui <- function(request) { tagList( # Leave this function for adding external resources golem_add_external_resources(), # List the first level UI elements here ...
/step-3-build/R/app_ui.R
permissive
ColinFay/minifying
R
false
false
1,015
r
#' The application User-Interface #' #' @param request Internal parameter for `{shiny}`. #' DO NOT REMOVE. #' @import shiny #' @noRd app_ui <- function(request) { tagList( # Leave this function for adding external resources golem_add_external_resources(), # List the first level UI elements here ...
context('Calendar register') test_that('it should list calendars thru register', { # expect_output(calendars(), 'actual/365') # expect_equal(length(calendars()), 1) l <- length(calendars()) cal <- Calendar_() expect_equal(length(calendars()), l) cal <- create.calendar('try-ANBIMA', holidaysANBIMA, weekday...
/inst/tests/test-register.R
no_license
miceli/R-bizdays
R
false
false
1,945
r
context('Calendar register') test_that('it should list calendars thru register', { # expect_output(calendars(), 'actual/365') # expect_equal(length(calendars()), 1) l <- length(calendars()) cal <- Calendar_() expect_equal(length(calendars()), l) cal <- create.calendar('try-ANBIMA', holidaysANBIMA, weekday...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{compile4float32} \alias{compile4float32} \title{Enable compiling of user-defined operators using float 32bits precision.} \usage{ compile4float32() } \value{ None } \description{ Set up \code{rkeops} compile options to compile u...
/rkeops/man/compile4float32.Rd
permissive
dvolgyes/keops
R
false
true
975
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{compile4float32} \alias{compile4float32} \title{Enable compiling of user-defined operators using float 32bits precision.} \usage{ compile4float32() } \value{ None } \description{ Set up \code{rkeops} compile options to compile u...
library(queueing) ### Name: Lk.o_CJN ### Title: Returns the vector with the mean number of customers in each ### node (server) of a Closed Jackson Network ### Aliases: Lk.o_CJN ### Keywords: Closed Jackson Network ### ** Examples ## See example 11.13 in reference [Sixto2004] for more details. ## create the nodes ...
/data/genthat_extracted_code/queueing/examples/Lk.o_CJN.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
771
r
library(queueing) ### Name: Lk.o_CJN ### Title: Returns the vector with the mean number of customers in each ### node (server) of a Closed Jackson Network ### Aliases: Lk.o_CJN ### Keywords: Closed Jackson Network ### ** Examples ## See example 11.13 in reference [Sixto2004] for more details. ## create the nodes ...
library("ggplot2") library("mvtnorm") shinyServer( function(input, output) { update_x <- reactive({ mu <- c(10, 15) A <- matrix(c(4, input$corr * 6, input$corr * 6, 9), nrow = 2) X <- rmvnorm(input$n_obs, mean = mu, sigma = A) X }) output$histog...
/2015/mtv_shiny/server.R
no_license
bdemeshev/pr201
R
false
false
516
r
library("ggplot2") library("mvtnorm") shinyServer( function(input, output) { update_x <- reactive({ mu <- c(10, 15) A <- matrix(c(4, input$corr * 6, input$corr * 6, 9), nrow = 2) X <- rmvnorm(input$n_obs, mean = mu, sigma = A) X }) output$histog...
#install.packages("pnn") #install.packages("neuralnet") library(png) library(imager) library(radiomics) library(pnn) library(neuralnet) normlinha <- function(vetor){ minimo = min(vetor) maximo = max(vetor) d = maximo-minimo vetor = (vetor - minimo)/d return(vetor) } normset <- function(dados){ return(appl...
/modelo.R
no_license
Cicconella/AI
R
false
false
2,983
r
#install.packages("pnn") #install.packages("neuralnet") library(png) library(imager) library(radiomics) library(pnn) library(neuralnet) normlinha <- function(vetor){ minimo = min(vetor) maximo = max(vetor) d = maximo-minimo vetor = (vetor - minimo)/d return(vetor) } normset <- function(dados){ return(appl...
# Note that this assumes `household_power_consumption.txt` is in your current directory. # I'm not adding a 127MB file to my repo. # This can be found at: https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip d <- read.csv("./household_power_consumption.txt", header=TRUE, sep=";", na.st...
/plot1.R
no_license
slpsys/ExData_Plotting1
R
false
false
680
r
# Note that this assumes `household_power_consumption.txt` is in your current directory. # I'm not adding a 127MB file to my repo. # This can be found at: https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip d <- read.csv("./household_power_consumption.txt", header=TRUE, sep=";", na.st...
getwd() util<-read.csv("P3-Machine-Utilization.csv") #?as.POSIXct util$posixtime<-as.POSIXct(util$Timestamp,format="%d/%m/%Y %H:%M") util$Percent.util<-1-util$Percent.Idle rl1<-util[util$Machine=="RL1",] rl2<-util[util$Machine=="RL2",] head(rl1,15) rl1<-rl1[,c(4,2,5,1,3)] head(rl1,15) rl1$Timestamp<-NULL rl1...
/Machine Utilization.R
no_license
shashwatb10/Machine-Utilization
R
false
false
1,119
r
getwd() util<-read.csv("P3-Machine-Utilization.csv") #?as.POSIXct util$posixtime<-as.POSIXct(util$Timestamp,format="%d/%m/%Y %H:%M") util$Percent.util<-1-util$Percent.Idle rl1<-util[util$Machine=="RL1",] rl2<-util[util$Machine=="RL2",] head(rl1,15) rl1<-rl1[,c(4,2,5,1,3)] head(rl1,15) rl1$Timestamp<-NULL rl1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper_funs.R \name{open_grass_help} \alias{open_grass_help} \title{Open the GRASS online help} \usage{ open_grass_help(alg) } \arguments{ \item{alg}{The name of the algorithm for which you wish to retrieve arguments and default values.} } \d...
/man/open_grass_help.Rd
no_license
rededsky/RQGIS
R
false
true
512
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper_funs.R \name{open_grass_help} \alias{open_grass_help} \title{Open the GRASS online help} \usage{ open_grass_help(alg) } \arguments{ \item{alg}{The name of the algorithm for which you wish to retrieve arguments and default values.} } \d...
# prepare_ea.r # Filters and prepare R's version of Ethnographic Atlas # 1. Fixes some errors in EA coding # 2. Modify slavery variable # 3. selection of variables of interest library("argparser") import::from("src/lib/prepare.r", "modify_slavery") import::from("src/lib/prepare.r", "select_variables") import::from("src...
/src/prepare_ea.r
no_license
J-Moravec/clustering_ethnographic_atlas
R
false
false
1,738
r
# prepare_ea.r # Filters and prepare R's version of Ethnographic Atlas # 1. Fixes some errors in EA coding # 2. Modify slavery variable # 3. selection of variables of interest library("argparser") import::from("src/lib/prepare.r", "modify_slavery") import::from("src/lib/prepare.r", "select_variables") import::from("src...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter.R \name{filter.univariate} \alias{filter.univariate} \title{Univariate Filtering} \usage{ filter.univariate( data, type, yvar, xvars, censorvar, trtvar, trtref = 1, pre.filter = length(xvars) ) } \arguments{ \item{data}...
/man/filter.univariate.Rd
no_license
xhuang4/optaucx
R
false
true
859
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter.R \name{filter.univariate} \alias{filter.univariate} \title{Univariate Filtering} \usage{ filter.univariate( data, type, yvar, xvars, censorvar, trtvar, trtref = 1, pre.filter = length(xvars) ) } \arguments{ \item{data}...
#' Filter the river data with a filter #' \code{datafilter.riv} #' @param x Input data #' @param filter Data filter #' @param plot Whether plot the data #' @importFrom grDevices dev.off graphics.off png rgb topo.colors #' @importFrom graphics grid hist lines par plot points #' @importFrom methods as #' @importFro...
/R/DataFilter.R
permissive
SHUD-System/rSHUD
R
false
false
1,355
r
#' Filter the river data with a filter #' \code{datafilter.riv} #' @param x Input data #' @param filter Data filter #' @param plot Whether plot the data #' @importFrom grDevices dev.off graphics.off png rgb topo.colors #' @importFrom graphics grid hist lines par plot points #' @importFrom methods as #' @importFro...
library(rgee) # ee_reattach() # reattach ee as a reserved word ee_Initialize() # Load a cloudy Landsat 8 image. image <- ee$Image("LANDSAT/LC08/C01/T1_TOA/LC08_044034_20130603") Map$addLayer( eeObject = image, visParams = list(bands = c("B5", "B4", "B3"), min = 0, max = 0.5), name = "original image" ) # Load a...
/examples/image/where_operators.R
permissive
benardonyango/rgee
R
false
false
837
r
library(rgee) # ee_reattach() # reattach ee as a reserved word ee_Initialize() # Load a cloudy Landsat 8 image. image <- ee$Image("LANDSAT/LC08/C01/T1_TOA/LC08_044034_20130603") Map$addLayer( eeObject = image, visParams = list(bands = c("B5", "B4", "B3"), min = 0, max = 0.5), name = "original image" ) # Load a...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/genomics_functions.R \name{datasets.list} \alias{datasets.list} \title{Lists datasets within a project. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fund...
/googlegenomicsv1.auto/man/datasets.list.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
1,330
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/genomics_functions.R \name{datasets.list} \alias{datasets.list} \title{Lists datasets within a project. For the definitions of datasets and other genomics resources, see [Fundamentals of Google Genomics](https://cloud.google.com/genomics/fund...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{coxprocess_logprior} \alias{coxprocess_logprior} \title{Evaluate multivariate Gaussian prior density} \usage{ coxprocess_logprior(x) } \arguments{ \item{x}{evaluation points} } \value{ density values } \description{ Evalua...
/man/coxprocess_logprior.Rd
no_license
jeremyhengjm/GibbsFlow
R
false
true
361
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{coxprocess_logprior} \alias{coxprocess_logprior} \title{Evaluate multivariate Gaussian prior density} \usage{ coxprocess_logprior(x) } \arguments{ \item{x}{evaluation points} } \value{ density values } \description{ Evalua...
## Coursera: Exploratory Data Analysis ## John Hopkins University ## Making Plot 2 downloadURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(url = downloadURL, destfile = "./EDAWeek1data.zip", method = "curl") rawData <- read.table(unz("EDAWeek1data.zip"...
/Plot2.R
no_license
SandervdBelt/ExData_Plotting1
R
false
false
1,085
r
## Coursera: Exploratory Data Analysis ## John Hopkins University ## Making Plot 2 downloadURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(url = downloadURL, destfile = "./EDAWeek1data.zip", method = "curl") rawData <- read.table(unz("EDAWeek1data.zip"...
# Activate the R virtualenv source(paste("renv", "activate.R", sep = .Platform$file.sep)) # Absolute path to project directory project_path = function(project_dir="PPP-Table"){ #' Returns the absolute project path string. #' args: none #' raises: error if <project_dir> is not within current wd absolut...
/.Rprofile
no_license
cjkeyes/PPP-Table
R
false
false
2,112
rprofile
# Activate the R virtualenv source(paste("renv", "activate.R", sep = .Platform$file.sep)) # Absolute path to project directory project_path = function(project_dir="PPP-Table"){ #' Returns the absolute project path string. #' args: none #' raises: error if <project_dir> is not within current wd absolut...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{getProteinFastaUrlFromUCSC} \alias{getProteinFastaUrlFromUCSC} \title{Get URL to download protein sequence FASTA from UCSC genome browser for a given dbkey.} \usage{ getProteinFastaUrlFromUCSC(dbkey) } \arguments{ \item{dbkey}{T...
/man/getProteinFastaUrlFromUCSC.Rd
no_license
liangdp1984/customProDB
R
false
true
614
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{getProteinFastaUrlFromUCSC} \alias{getProteinFastaUrlFromUCSC} \title{Get URL to download protein sequence FASTA from UCSC genome browser for a given dbkey.} \usage{ getProteinFastaUrlFromUCSC(dbkey) } \arguments{ \item{dbkey}{T...
# The first two consecutive numbers to have two distinct prime factors are: # 14 = 2 × 7 # 15 = 3 × 5 #The first three consecutive numbers to have three distinct prime factors are: # 644 = 2^2 × 7 × 23 # 645 = 3 × 5 × 43 # 646 = 2 × 17 × 19. # Find the first four consecutive integers to have four distinct pri...
/Problems_26_to_50/Euler047.R
permissive
lawphill/ProjectEuler
R
false
false
929
r
# The first two consecutive numbers to have two distinct prime factors are: # 14 = 2 × 7 # 15 = 3 × 5 #The first three consecutive numbers to have three distinct prime factors are: # 644 = 2^2 × 7 × 23 # 645 = 3 × 5 × 43 # 646 = 2 × 17 × 19. # Find the first four consecutive integers to have four distinct pri...
# Kaggle Santander 2 # predictions without models, purely based on a priori probabilities # Scores 0.0183025 on LB using all months # ... using May and June # https://www.kaggle.com/operdeck/santander-product-recommendation/predictions-without-models library(data.table) library(fasttime) # Read data data...
/apriori/apriori.R
no_license
operdeck/santa2
R
false
false
2,843
r
# Kaggle Santander 2 # predictions without models, purely based on a priori probabilities # Scores 0.0183025 on LB using all months # ... using May and June # https://www.kaggle.com/operdeck/santander-product-recommendation/predictions-without-models library(data.table) library(fasttime) # Read data data...
\name{probNonEquiv} \alias{probNonEquiv} \alias{probNonEquiv,ExpressionSet-method} \alias{probNonEquiv,list-method} \alias{pvalTreat} \alias{pvalTreat,ExpressionSet-method} \alias{pvalTreat,list-method} \title{ \code{probNonEquiv} performs a Bayesian hypothesis test for equivalence between group means. It returns t...
/man/probNonEquiv.Rd
no_license
davidrusi/casper
R
false
false
3,663
rd
\name{probNonEquiv} \alias{probNonEquiv} \alias{probNonEquiv,ExpressionSet-method} \alias{probNonEquiv,list-method} \alias{pvalTreat} \alias{pvalTreat,ExpressionSet-method} \alias{pvalTreat,list-method} \title{ \code{probNonEquiv} performs a Bayesian hypothesis test for equivalence between group means. It returns t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/save_plots.R \name{save_plots} \alias{save_plots} \title{Save multiple plots in one PDF.} \usage{ save_plots(.data, ..., files, width = 8, height = 6, bookmarks = NULL, gs.exec = "gs") } \arguments{ \item{.data}{a tbl.} \item{...}{one or m...
/man/save_plots.Rd
no_license
fkeck/xplots
R
false
true
1,189
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/save_plots.R \name{save_plots} \alias{save_plots} \title{Save multiple plots in one PDF.} \usage{ save_plots(.data, ..., files, width = 8, height = 6, bookmarks = NULL, gs.exec = "gs") } \arguments{ \item{.data}{a tbl.} \item{...}{one or m...
# utilities for parsing mplus output # Levels of nesting: # level 1: sections # level 2: classes # level 3: line types # section parser only needs to understand alternative parameterizations # define section headers section_headers <- c("alternative parameterizations for the categorical latent variable regression", ...
/mplus_parsing_utils.R
permissive
franciscowilhelm/r-collection
R
false
false
6,018
r
# utilities for parsing mplus output # Levels of nesting: # level 1: sections # level 2: classes # level 3: line types # section parser only needs to understand alternative parameterizations # define section headers section_headers <- c("alternative parameterizations for the categorical latent variable regression", ...
##BIONET ALGORITHM### D3bioNetwork<-function(File=NULL){ library(igraph) library(BioNet) library(DLBCL) data(interactome) source("geneInfoFromPortals.R") source("sortNetwork.R") source("rashidplotmodule.R") if(!is.null(File)) { logic<-read.csv(file=File,sep='\t') } else{ logic<-read.csv(f...
/examples/SigNetA/D3bioNetwork.R
permissive
Saadman/r-cytoscape.js.2
R
false
false
3,059
r
##BIONET ALGORITHM### D3bioNetwork<-function(File=NULL){ library(igraph) library(BioNet) library(DLBCL) data(interactome) source("geneInfoFromPortals.R") source("sortNetwork.R") source("rashidplotmodule.R") if(!is.null(File)) { logic<-read.csv(file=File,sep='\t') } else{ logic<-read.csv(f...
\name{writePeaklist} \alias{writePeaklist} \title{ Export a .csv peak table from an MSlist object } \description{ Given an MSlist object containing peak picking results from \code{\link[enviPick]{mzpick}}, export a peak table.csv. } \usage{ writePeaklist(MSlist, directory, filename, overwrite = FALSE) }...
/man/writePeaklist.Rd
no_license
cran/enviPick
R
false
false
1,072
rd
\name{writePeaklist} \alias{writePeaklist} \title{ Export a .csv peak table from an MSlist object } \description{ Given an MSlist object containing peak picking results from \code{\link[enviPick]{mzpick}}, export a peak table.csv. } \usage{ writePeaklist(MSlist, directory, filename, overwrite = FALSE) }...
#' 2015 Point-in-Time (PIT) homeless counts by CoC #' #' This is a raw data set that contains Point-in-Time (PIT) estimates of homelessness by CoC. #' #' @source https://www.hudexchange.info/resource/3031/pit-and-hic-data-since-2007/ "hud2015"
/R/hud2015.R
no_license
erinyunyou/USHomeless
R
false
false
244
r
#' 2015 Point-in-Time (PIT) homeless counts by CoC #' #' This is a raw data set that contains Point-in-Time (PIT) estimates of homelessness by CoC. #' #' @source https://www.hudexchange.info/resource/3031/pit-and-hic-data-since-2007/ "hud2015"
# Downloading and extracting the data. if (!file.exists ("Project1_Data")) { dir.create ("Project1_Data") download.file ("http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile="Project1_Data/exdata-data-household_power_consumption.zip",...
/plot2.R
no_license
Vaskoman/ExData_Plotting1
R
false
false
1,950
r
# Downloading and extracting the data. if (!file.exists ("Project1_Data")) { dir.create ("Project1_Data") download.file ("http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile="Project1_Data/exdata-data-household_power_consumption.zip",...
#' @include draws-class.R NULL #' Simulate from a model. #' #' Given a reference to a \code{\linkS4class{Model}} object, this function calls the #' model's \code{simulate} function on its \code{params}. It repeats this #' \code{nsim} times. For example, when simulating regression with a fixed #' design, this functio...
/R/draws.R
no_license
jasonabr/simulator
R
false
false
9,662
r
#' @include draws-class.R NULL #' Simulate from a model. #' #' Given a reference to a \code{\linkS4class{Model}} object, this function calls the #' model's \code{simulate} function on its \code{params}. It repeats this #' \code{nsim} times. For example, when simulating regression with a fixed #' design, this functio...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AEI.R \name{AEI} \alias{AEI} \title{Augmented Expected Improvement} \usage{ AEI(x, model, new.noise.var = 0, y.min = NULL, type = "UK", envir = NULL) } \arguments{ \item{x}{the input vector at which one wants to evaluate the criterio...
/man/AEI.Rd
no_license
ProgramMonkey-soso/DiceOptim
R
false
true
4,039
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AEI.R \name{AEI} \alias{AEI} \title{Augmented Expected Improvement} \usage{ AEI(x, model, new.noise.var = 0, y.min = NULL, type = "UK", envir = NULL) } \arguments{ \item{x}{the input vector at which one wants to evaluate the criterio...
### prepare data for treemap ## set your own working dir setwd('/home/jc/Bureau/GreenTech_Challenge/') # load csv file ma <- read.csv('DATA/Moyennes_analyses_pesticides\ dans\ eaux\ souterraines_HISTORIQUE/fichiers\ csv/ma_qp_fm_ttres_pesteso_2012_utf.csv',sep=';', header=TRUE, na.strings=c("–", "-","")) str(ma) pest...
/treemap/treemap_prep_data.r
no_license
KirosG/GreenTech-Challenge
R
false
false
834
r
### prepare data for treemap ## set your own working dir setwd('/home/jc/Bureau/GreenTech_Challenge/') # load csv file ma <- read.csv('DATA/Moyennes_analyses_pesticides\ dans\ eaux\ souterraines_HISTORIQUE/fichiers\ csv/ma_qp_fm_ttres_pesteso_2012_utf.csv',sep=';', header=TRUE, na.strings=c("–", "-","")) str(ma) pest...
\name{column_anno_barplot} \alias{column_anno_barplot} \title{ Column annotation which is represented as barplots } \description{ Column annotation which is represented as barplots } \usage{ column_anno_barplot(...)} \arguments{ \item{...}{pass to \code{\link{anno_barplot}}} } \details{ A wrapper of \code{\link{anno...
/man/column_anno_barplot.rd
no_license
Yixf-Self/ComplexHeatmap
R
false
false
381
rd
\name{column_anno_barplot} \alias{column_anno_barplot} \title{ Column annotation which is represented as barplots } \description{ Column annotation which is represented as barplots } \usage{ column_anno_barplot(...)} \arguments{ \item{...}{pass to \code{\link{anno_barplot}}} } \details{ A wrapper of \code{\link{anno...
# # # Use gradient boosted tree's # # Rev1 - Try to use a small subset of data # # # # Rev2 - Try to use all data and train over the set # # # Rev3 - predict the sum # # Rev4 - Use the time series to predict the output and % change. # # Submission Info: # Fri, 01 Jun 2012 05:13:23 # GBM + no negatives # RMLSE = 0.763...
/src/Titanic/titanic_gbm_1.r
no_license
jsrawan-mobo/mrbigdata
R
false
false
6,401
r
# # # Use gradient boosted tree's # # Rev1 - Try to use a small subset of data # # # # Rev2 - Try to use all data and train over the set # # # Rev3 - predict the sum # # Rev4 - Use the time series to predict the output and % change. # # Submission Info: # Fri, 01 Jun 2012 05:13:23 # GBM + no negatives # RMLSE = 0.763...
library(qualityTools) ### Name: rsmDesign ### Title: Generate a response surface design (i.e. central composite ### design) ### Aliases: rsmDesign ### Keywords: Design of Experiments Six Sigma ### ** Examples #central composite design for 2 factors with 2 blocks, alpha = 1.41, #5 centerpoints in the cube portion...
/data/genthat_extracted_code/qualityTools/examples/rsmDesign.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
925
r
library(qualityTools) ### Name: rsmDesign ### Title: Generate a response surface design (i.e. central composite ### design) ### Aliases: rsmDesign ### Keywords: Design of Experiments Six Sigma ### ** Examples #central composite design for 2 factors with 2 blocks, alpha = 1.41, #5 centerpoints in the cube portion...
# setwd("/Users/loey/Desktop/Research/RationalLying/analysis") expt.S <- expt.S.full %>% group_by(util, p, k, ksay) %>% summarise(n = n()) %>% ungroup() %>% complete(util, p, k, ksay, fill=list(n=0)) %>% group_by(util, p, k) %>% mutate(probability = n / sum(n), probTxt = paste0(round(probability*1...
/analysis/supplmodels.R
no_license
la-oey/RationalLying
R
false
false
5,714
r
# setwd("/Users/loey/Desktop/Research/RationalLying/analysis") expt.S <- expt.S.full %>% group_by(util, p, k, ksay) %>% summarise(n = n()) %>% ungroup() %>% complete(util, p, k, ksay, fill=list(n=0)) %>% group_by(util, p, k) %>% mutate(probability = n / sum(n), probTxt = paste0(round(probability*1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/post_theme.R \docType{data} \name{sf_palettes} \alias{sf_palettes} \title{List of sf main palettes} \format{ An object of class \code{list} of length 5. } \usage{ sf_palettes } \description{ List of sf main palettes } \keyword{datasets}
/man/sf_palettes.Rd
permissive
signaux-faibles/rsignauxfaibles
R
false
true
315
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/post_theme.R \docType{data} \name{sf_palettes} \alias{sf_palettes} \title{List of sf main palettes} \format{ An object of class \code{list} of length 5. } \usage{ sf_palettes } \description{ List of sf main palettes } \keyword{datasets}
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat-qq.r \name{stat_qq} \alias{stat_qq} \alias{geom_qq} \title{Calculation for quantile-quantile plot.} \usage{ stat_qq(mapping = NULL, data = NULL, geom = "point", position = "identity", ..., distribution = stats::qnorm, dparams = list(...
/man/stat_qq.Rd
no_license
lazycipher/animint2
R
false
true
3,388
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat-qq.r \name{stat_qq} \alias{stat_qq} \alias{geom_qq} \title{Calculation for quantile-quantile plot.} \usage{ stat_qq(mapping = NULL, data = NULL, geom = "point", position = "identity", ..., distribution = stats::qnorm, dparams = list(...
# # ============ start test script ================ # Test <- as.numeric(c(0,1,2,3,0,1,2,3,0,2)) # ID <- c("a","a","a","a","b","b","b","b","c","c") # DF <- data.frame(ID, Test) # # # library(plyr) # library(foreach) # library(pracma) # library(data.table) # # # ---- TRAPEZOIDAL RULE ---- # #cumtrapz # RATE <- as.num...
/CreepScript_SUBTEST.R
no_license
brandonlampe/R_CS-MatParFit
R
false
false
12,201
r
# # ============ start test script ================ # Test <- as.numeric(c(0,1,2,3,0,1,2,3,0,2)) # ID <- c("a","a","a","a","b","b","b","b","c","c") # DF <- data.frame(ID, Test) # # # library(plyr) # library(foreach) # library(pracma) # library(data.table) # # # ---- TRAPEZOIDAL RULE ---- # #cumtrapz # RATE <- as.num...
#Problem 3==== df.p3 <- NULL theta <- seq(from = 0.025, to = 0.975, length.out = 20) priorDist <- array(1/20, 20) numTook <- 15 numConcern <- 12 postDist <- priorDist * theta^numConcern*(1-theta)^(numTook-numConcern) postDist <- postDist/sum(postDist) df.p3$theta <- theta df.p3$priorDist <- priorDist df.p3$postDi...
/01/problem_3.R
no_license
tjwhalenUVA/664-Homework
R
false
false
552
r
#Problem 3==== df.p3 <- NULL theta <- seq(from = 0.025, to = 0.975, length.out = 20) priorDist <- array(1/20, 20) numTook <- 15 numConcern <- 12 postDist <- priorDist * theta^numConcern*(1-theta)^(numTook-numConcern) postDist <- postDist/sum(postDist) df.p3$theta <- theta df.p3$priorDist <- priorDist df.p3$postDi...
#' Filled 2d contours of a 3d surface #' #' While ggplot2's \code{\link[ggplot2]{geom_contour}} can plot nice contours, it #' doesn't work with the polygon geom. This stat makes some small manipulation #' of the data to ensure that all contours are closed and also computes a new #' aesthetic \code{int.level}, which dif...
/R/geom_contour_fill.R
no_license
brodieG/metR
R
false
false
2,711
r
#' Filled 2d contours of a 3d surface #' #' While ggplot2's \code{\link[ggplot2]{geom_contour}} can plot nice contours, it #' doesn't work with the polygon geom. This stat makes some small manipulation #' of the data to ensure that all contours are closed and also computes a new #' aesthetic \code{int.level}, which dif...
server <- function(input, output, session) { observeEvent(input$agency, { new_complaint_types = forecasts_daily %>% filter(agency == input$agency) %>% pull(complaint_type) %>% unique() %>% sort() disabled_choices <- !complaint_types %in% new_complaint_types # updateP...
/311_calls/server.R
no_license
bwaheed22/311-analysis
R
false
false
4,455
r
server <- function(input, output, session) { observeEvent(input$agency, { new_complaint_types = forecasts_daily %>% filter(agency == input$agency) %>% pull(complaint_type) %>% unique() %>% sort() disabled_choices <- !complaint_types %in% new_complaint_types # updateP...
getPlots <- function(chosen, df_prop, df_LYL){ # Plot settings panelCol <- "white" backgroundCol <- "white" foregroundCol <- "black" # ALL_SCENARIOS <- c("SQ", "MLA21", "MLA25", "SFG", "TAX5", "TAX2", "ELF", "E25", "EP", "MLATax5", "MLAEP", "Tax5EP", "MLATax5EP", "SFGELF") selected_idx <-...
/code/figures/microscenario_plots/plots/sens_plots/getPlotSet.R
no_license
KateDoan/gice
R
false
false
3,902
r
getPlots <- function(chosen, df_prop, df_LYL){ # Plot settings panelCol <- "white" backgroundCol <- "white" foregroundCol <- "black" # ALL_SCENARIOS <- c("SQ", "MLA21", "MLA25", "SFG", "TAX5", "TAX2", "ELF", "E25", "EP", "MLATax5", "MLAEP", "Tax5EP", "MLATax5EP", "SFGELF") selected_idx <-...