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
# Chapter 6 # Example 6.15 Page no. 191 from the pdf.. # Normal Approximation To the Binomial.. # given- P(patient recovers from disease)=0.4 # to find prob. that less than 30 survive if 100 have prone to this diesease # since n=100, this binomial variable can be approx. to normal model p_survive=0.4 mu ...
/Probability_And_Statistics_For_Engineers_And_Scientists_by_Ronald_E._Walpole,_Raymond_H._Myers,_Sharon_L._Myers,_Keying_Ye/CH6/EX6.15/Ex6_15.R
permissive
FOSSEE/R_TBC_Uploads
R
false
false
611
r
# Chapter 6 # Example 6.15 Page no. 191 from the pdf.. # Normal Approximation To the Binomial.. # given- P(patient recovers from disease)=0.4 # to find prob. that less than 30 survive if 100 have prone to this diesease # since n=100, this binomial variable can be approx. to normal model p_survive=0.4 mu ...
#Shared functions heatMapHelper <- function(x, qs, testvals, varval = 'm'){ x.spread <- reformatForHeatMap(x, qs, varval) intervals <- foreach(test = testvals, .combine = "rbind") %do% { x.spread %>% mutate(testm = test, inInt = low <= test & high >= test ) } return(intervals) } reformatFo...
/code/shared-functions.r
no_license
affeder/fst_dynamics
R
false
false
1,190
r
#Shared functions heatMapHelper <- function(x, qs, testvals, varval = 'm'){ x.spread <- reformatForHeatMap(x, qs, varval) intervals <- foreach(test = testvals, .combine = "rbind") %do% { x.spread %>% mutate(testm = test, inInt = low <= test & high >= test ) } return(intervals) } reformatFo...
context("KP - Get four factors") test_that("KP - Get four factors", { skip_on_cran() skip_on_ci() x <- kp_fourfactors(min_year = 2020, max_year = 2020) cols <- c( "team", "conf", "adj_t", "adj_t_rk", "adj_o", "adj_o_rk", "off_e_fg_pct", "off_e_fg_pct_rk", "off_to_pct", "off_to_pct_rk", "off_or_p...
/tests/testthat/test-kp_fourfactors.R
permissive
mrcaseb/hoopR
R
false
false
645
r
context("KP - Get four factors") test_that("KP - Get four factors", { skip_on_cran() skip_on_ci() x <- kp_fourfactors(min_year = 2020, max_year = 2020) cols <- c( "team", "conf", "adj_t", "adj_t_rk", "adj_o", "adj_o_rk", "off_e_fg_pct", "off_e_fg_pct_rk", "off_to_pct", "off_to_pct_rk", "off_or_p...
data <- read.table("household_power_consumption.txt",sep=";",header = TRUE,stringsAsFactors = FALSE) data$Date <- as.Date(data$Date,"%d/%m/%Y") data <- data[data$Date >= as.Date("01/02/2007","%d/%m/%Y") & data$Date <= as.Date("02/02/2007","%d/%m/%Y"),] data$Global_active_power <- as.numeric(data$Global_active_power) ...
/plot4.r
no_license
gitttt-1234/ExData_Plotting1
R
false
false
1,053
r
data <- read.table("household_power_consumption.txt",sep=";",header = TRUE,stringsAsFactors = FALSE) data$Date <- as.Date(data$Date,"%d/%m/%Y") data <- data[data$Date >= as.Date("01/02/2007","%d/%m/%Y") & data$Date <= as.Date("02/02/2007","%d/%m/%Y"),] data$Global_active_power <- as.numeric(data$Global_active_power) ...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{pickbranch} \alias{pickbranch} \title{Pick a random branch from a tree} \usage{ pickbranch(tree, n, r) } \arguments{ \item{tree}{A simualted coalescent history} \item{n}{The sample size corresponding to tree} \item{r}{A random number corresponding to runif(1,...
/man/pickbranch.Rd
no_license
BioinformaticsMaterials/Rcode4teaching
R
false
false
474
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{pickbranch} \alias{pickbranch} \title{Pick a random branch from a tree} \usage{ pickbranch(tree, n, r) } \arguments{ \item{tree}{A simualted coalescent history} \item{n}{The sample size corresponding to tree} \item{r}{A random number corresponding to runif(1,...
#' List your gaug.es #' #' @import httr #' @template all #' @importFrom plyr rbind.fill #' @param page Page to return. #' @param keyname Your API key name in your .Rprofile file #' @examples \dontrun{ #' gs_gauge_list() #' } #' @export gs_gauge_list <- function(keyname='GaugesKey', page=NULL) { key <- getOption(keyn...
/R/gauges.R
no_license
imclab/rgauges
R
false
false
5,769
r
#' List your gaug.es #' #' @import httr #' @template all #' @importFrom plyr rbind.fill #' @param page Page to return. #' @param keyname Your API key name in your .Rprofile file #' @examples \dontrun{ #' gs_gauge_list() #' } #' @export gs_gauge_list <- function(keyname='GaugesKey', page=NULL) { key <- getOption(keyn...
#' Zhang and Pan Cluster Subspaces Test #' #' @param x Data set 1. #' @param y Data set 2. #' @param k k Number of dimensions to select. Defaults to floor((n1 + n2 - 2) / 2). #' @param B1 Number of times to randomly subset full data. Defaults to 100. #' @param B2 Number of permutations for calculating pvalue. Defaults ...
/R/csTest.R
permissive
whitneyworley/HighDim2Means
R
false
false
4,336
r
#' Zhang and Pan Cluster Subspaces Test #' #' @param x Data set 1. #' @param y Data set 2. #' @param k k Number of dimensions to select. Defaults to floor((n1 + n2 - 2) / 2). #' @param B1 Number of times to randomly subset full data. Defaults to 100. #' @param B2 Number of permutations for calculating pvalue. Defaults ...
############################# plot a decision tree ########################################## library(rpart) # Popular decision tree algorithm library(caret) library("rpart.plot") library(Rmisc) source("load_ames_data.R") source("utils/quick_preprocessing.R") # to perform the naive preprocessing step imple...
/Modeling/CARTplot.R
no_license
koehnden/SPL16
R
false
false
1,047
r
############################# plot a decision tree ########################################## library(rpart) # Popular decision tree algorithm library(caret) library("rpart.plot") library(Rmisc) source("load_ames_data.R") source("utils/quick_preprocessing.R") # to perform the naive preprocessing step imple...
\name{ds.mode} \alias{ds.mode} \title{Calculating mode for numeric data} \usage{ ds.mode(x) } \arguments{ \item{x}{:a numeric variable} } \description{ Calculating mode for numeric data. } \examples{ ds.mode(mtcars[,2]) }
/man/ds.mode.Rd
no_license
cran/YRmisc
R
false
false
241
rd
\name{ds.mode} \alias{ds.mode} \title{Calculating mode for numeric data} \usage{ ds.mode(x) } \arguments{ \item{x}{:a numeric variable} } \description{ Calculating mode for numeric data. } \examples{ ds.mode(mtcars[,2]) }
# reading features and activity data features <- read.table("./UCI HAR Dataset/features.txt") activities <- read.table("./UCI HAR Dataset/activity_labels.txt") # reading train data train <- read.table("./UCI HAR Dataset/train/X_train.txt") #features data colnames(train) <- features$V2 #descriptive column names for d...
/run_analysis.R
no_license
Vassilis-M/getting-and-cleaning-data-Assignment
R
false
false
1,938
r
# reading features and activity data features <- read.table("./UCI HAR Dataset/features.txt") activities <- read.table("./UCI HAR Dataset/activity_labels.txt") # reading train data train <- read.table("./UCI HAR Dataset/train/X_train.txt") #features data colnames(train) <- features$V2 #descriptive column names for d...
rm(list = ls()) library(lmtest); library(sandwich) # data sim install.packages('texreg') install.packages('sandwich') install.packages('lmtest') library(texreg) set.seed(1) x <- rnorm(1000) y <- 5 + 2 * x + rnorm(1000, 0, 1) # regression m1 <- lm(y ~ x) summary(m1) # triple data dat <- data.frame(x = c(x, x, x), y =...
/src/modeling/utils/fancy_tables.R
no_license
MiVaVo/Speculation-and-volatility-of-cryptocurrencies
R
false
false
2,535
r
rm(list = ls()) library(lmtest); library(sandwich) # data sim install.packages('texreg') install.packages('sandwich') install.packages('lmtest') library(texreg) set.seed(1) x <- rnorm(1000) y <- 5 + 2 * x + rnorm(1000, 0, 1) # regression m1 <- lm(y ~ x) summary(m1) # triple data dat <- data.frame(x = c(x, x, x), y =...
#' Calculate initial margin on opening trades #' #' @description{ #' calc_mrgn calculates the opening margin required depending on strategy type #' } #' #' #' #' @param strat String representing option strategy used in the study ie. Short Put #' @param prc numeric stock price #' @param spstrk numeric short put strike #...
/R/calc_mrgn.R
no_license
themechanicalbear/mobstrs
R
false
false
1,625
r
#' Calculate initial margin on opening trades #' #' @description{ #' calc_mrgn calculates the opening margin required depending on strategy type #' } #' #' #' #' @param strat String representing option strategy used in the study ie. Short Put #' @param prc numeric stock price #' @param spstrk numeric short put strike #...
testlist <- list(con = c(1.27890654606226e-188, 7527485546020.59, -2.14488209182332e+105, Inf, -2.02048162434253e-44, NaN, 3.42032101584627e-93, 8.27932373953685e-269, -4.36408839884835e-38, Inf, 0), length = 1.86834229974026e-97, pos = c(-5.70400762505135e-238, -2.07081855709675e-80, 8.5455382271307e+192, ...
/issuestests/corpustools/inst/testfiles/sequence_hit_ids_cpp/sequence_hit_ids_cpp_output/log_31b699c7c16d2d3ef22fb16a65ab5ff80aea4a10/sequence_hit_ids_cpp-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
4,003
r
testlist <- list(con = c(1.27890654606226e-188, 7527485546020.59, -2.14488209182332e+105, Inf, -2.02048162434253e-44, NaN, 3.42032101584627e-93, 8.27932373953685e-269, -4.36408839884835e-38, Inf, 0), length = 1.86834229974026e-97, pos = c(-5.70400762505135e-238, -2.07081855709675e-80, 8.5455382271307e+192, ...
########################################################## # Simuation : this function does physician-level (NB model) simulation given: # 1) x : data set in data frame; # 2) b : coefficients in data frame; # 3) delta : simulation scenarios; # 4) SimuVar : the variables to be simulated; ...
/Functions/Simulation.R
no_license
yuxidchen/LupronCode
R
false
false
2,556
r
########################################################## # Simuation : this function does physician-level (NB model) simulation given: # 1) x : data set in data frame; # 2) b : coefficients in data frame; # 3) delta : simulation scenarios; # 4) SimuVar : the variables to be simulated; ...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## makecacheMatrix function takes input as matrix, this sets"I"-inverse as NULL ## this function returns list of functions as part of the object and declares ## and defines four functi...
/cachematrix.R
no_license
manubunny/ProgrammingAssignment2
R
false
false
1,533
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## makecacheMatrix function takes input as matrix, this sets"I"-inverse as NULL ## this function returns list of functions as part of the object and declares ## and defines four functi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_fcts.R \name{list_available_data} \alias{list_available_data} \title{List available datasets with description} \usage{ list_available_data() } \value{ A dataframe with the data information } \description{ This function will list all avai...
/man/list_available_data.Rd
permissive
Microsmd/adfeR
R
false
true
462
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_fcts.R \name{list_available_data} \alias{list_available_data} \title{List available datasets with description} \usage{ list_available_data() } \value{ A dataframe with the data information } \description{ This function will list all avai...
# Generated by extendr: Do not edit by hand # # This file was created with the following call: # .Call("wrap__make_extendrtests_wrappers", use_symbols = TRUE, package_name = "extendrtests") #' @docType package #' @usage NULL #' @useDynLib extendrtests, .registration = TRUE NULL hello_world <- function() .Call(wrap_...
/tests/extendrtests/R/extendr-wrappers.R
permissive
brendanrbrown/extendr
R
false
false
3,398
r
# Generated by extendr: Do not edit by hand # # This file was created with the following call: # .Call("wrap__make_extendrtests_wrappers", use_symbols = TRUE, package_name = "extendrtests") #' @docType package #' @usage NULL #' @useDynLib extendrtests, .registration = TRUE NULL hello_world <- function() .Call(wrap_...
library(tidyverse) # hug genomes list hug = read.csv("metadata/Hug2016-genomes-proks.csv") colnames(hug) = c("organism", "ncbi", "jgi") # all genbank metadata genbank = read.csv("metadata/2019-08-15-all-genbank-genomes.csv") gbk = genbank %>% select(X.Organism.Name, BioSample, BioProject, Assembly) # refseq complete...
/scripts/Hug2016-genome-accessions-cleaning.R
no_license
elizabethmcd/genomes-MAGs-database
R
false
false
2,353
r
library(tidyverse) # hug genomes list hug = read.csv("metadata/Hug2016-genomes-proks.csv") colnames(hug) = c("organism", "ncbi", "jgi") # all genbank metadata genbank = read.csv("metadata/2019-08-15-all-genbank-genomes.csv") gbk = genbank %>% select(X.Organism.Name, BioSample, BioProject, Assembly) # refseq complete...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{density_cell_f2} \alias{density_cell_f2} \title{Function to compute stationary distribution of HMM} \usage{ density_cell_f2(y1, y2, q01, Q12, mu1, mu2) } \arguments{ \item{x,}{alpha, log=False} } \description{ density of dirichlet } \examples{ dDirichlet(c(.1, ...
/man/density_cell_f2.Rd
no_license
samclifford/ZmixHMM
R
false
false
360
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{density_cell_f2} \alias{density_cell_f2} \title{Function to compute stationary distribution of HMM} \usage{ density_cell_f2(y1, y2, q01, Q12, mu1, mu2) } \arguments{ \item{x,}{alpha, log=False} } \description{ density of dirichlet } \examples{ dDirichlet(c(.1, ...
library(PET) ### Name: partEllipse ### Title: Generates a Fragment of an Ellipse ### Aliases: partEllipse ### Keywords: math smooth ### ** Examples ## Not run: ##D ellip1 <- partEllipse() ##D ellip2 <- partEllipse(x=0.1, y=-0.1, ring.wide=0.4) ##D ellip3 <- partEllipse(mod="hcirc2", y=0.2, intensity=0.4, ##D ...
/data/genthat_extracted_code/PET/examples/partEllipse.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
741
r
library(PET) ### Name: partEllipse ### Title: Generates a Fragment of an Ellipse ### Aliases: partEllipse ### Keywords: math smooth ### ** Examples ## Not run: ##D ellip1 <- partEllipse() ##D ellip2 <- partEllipse(x=0.1, y=-0.1, ring.wide=0.4) ##D ellip3 <- partEllipse(mod="hcirc2", y=0.2, intensity=0.4, ##D ...
library(xlsx) posSelect <- function(theData){ values <- c("M", "D", "F", "G") cleanDatasets <- vector("list", 4) for(i in 1:4) { clean_data <- theData %>% filter(X4 == values[i]) cleanDatasets[[i]] <- clean_data } return(cleanDatasets) } scrapeFunc <- function(teamname,URL_link){ webpage_url <...
/16_17_height_code.R
no_license
hosavagyan/CS252-Data-Science-Premier-League-Analysis
R
false
false
9,273
r
library(xlsx) posSelect <- function(theData){ values <- c("M", "D", "F", "G") cleanDatasets <- vector("list", 4) for(i in 1:4) { clean_data <- theData %>% filter(X4 == values[i]) cleanDatasets[[i]] <- clean_data } return(cleanDatasets) } scrapeFunc <- function(teamname,URL_link){ webpage_url <...
#'@import zoo #'@importFrom graphics matplot #'@export plot.MSGARCH_SIM <- function(x, main = NULL, type = NULL, xlab = NULL, ylab = NULL, ...) { draw <- x$draw if (is.null(ylab)) { ylab <- "Draws" } if (is.null(xlab)) { xlab <- "Index" } if (is.null(main)) { main <- "Simulat...
/fuzzedpackages/MSGARCH/R/Plot.R
no_license
akhikolla/testpackages
R
false
false
5,973
r
#'@import zoo #'@importFrom graphics matplot #'@export plot.MSGARCH_SIM <- function(x, main = NULL, type = NULL, xlab = NULL, ylab = NULL, ...) { draw <- x$draw if (is.null(ylab)) { ylab <- "Draws" } if (is.null(xlab)) { xlab <- "Index" } if (is.null(main)) { main <- "Simulat...
// CORTEX-M Register Definition File REG=sp 0x00000034 CRNT 4 REG=lr 0x00000038 CRNT 4 REG=status 0x00000000 STATUS 4 SEQ 0 20 1 REG=apsr 0x00000000 STATUS 4 REG=iapsr 0x00000004 STATUS 4 REG=eapsr 0x00000008 STATUS 4 REG=xpsr 0x0000000C STATUS 4 REG=ipsr 0x00000014 ST...
/i686-pc-linux-gnu/arm-xilinx-linux-gnueabi/mep/bin/arm/cortex-m3.rd
no_license
qiupq/Xilinx-Compile-Tools-Sourcery-CodeBench
R
false
false
7,527
rd
// CORTEX-M Register Definition File REG=sp 0x00000034 CRNT 4 REG=lr 0x00000038 CRNT 4 REG=status 0x00000000 STATUS 4 SEQ 0 20 1 REG=apsr 0x00000000 STATUS 4 REG=iapsr 0x00000004 STATUS 4 REG=eapsr 0x00000008 STATUS 4 REG=xpsr 0x0000000C STATUS 4 REG=ipsr 0x00000014 ST...
# https://www.kaggle.com/zynicide/wine-reviews # ler arquivo .csv crashes <- read.csv2("suici2.csv", header = TRUE, sep = ";", stringsAsFactors = FALSE, encoding = "UTF-8") colnames(crashes)[1] <- c("country") library(dplyr) # as.data.frame(table(wine$country)) numMillenials <- filter(cr...
/suicides4.r
no_license
IsabelaBianchi/visualization
R
false
false
2,106
r
# https://www.kaggle.com/zynicide/wine-reviews # ler arquivo .csv crashes <- read.csv2("suici2.csv", header = TRUE, sep = ";", stringsAsFactors = FALSE, encoding = "UTF-8") colnames(crashes)[1] <- c("country") library(dplyr) # as.data.frame(table(wine$country)) numMillenials <- filter(cr...
#' @include combinatorics.model.R NULL ##Модификация модели. Добавления нового мероприятия # #' Method add arrangement #' @description #' Добавляет мероприятие в комбинаторную модель. #' #' @param model объект класса \code{"Combinatorics"}, содержащий комбинаторную модель #' @param name объект класса \code{"characte...
/R/combinatorics.design.add.R
no_license
mbich/combinatorics
R
false
false
14,584
r
#' @include combinatorics.model.R NULL ##Модификация модели. Добавления нового мероприятия # #' Method add arrangement #' @description #' Добавляет мероприятие в комбинаторную модель. #' #' @param model объект класса \code{"Combinatorics"}, содержащий комбинаторную модель #' @param name объект класса \code{"characte...
head(SP) summary(SP500) plot(SP500) plot(SP500,xlab="date",ylab="price",main="S&P 500",type="l") acf(SP500)
/time-series-in-r/presentation/R/xts/playing_around.R
no_license
apragacz/public-presentations
R
false
false
108
r
head(SP) summary(SP500) plot(SP500) plot(SP500,xlab="date",ylab="price",main="S&P 500",type="l") acf(SP500)
#' @param max_attempts \code{integer}; defines then max number attempts to check for job #' completion before stopping.
/man-roxygen/max_attempts.R
permissive
StevenMMortimer/salesforcer
R
false
false
121
r
#' @param max_attempts \code{integer}; defines then max number attempts to check for job #' completion before stopping.
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' OrgApacheJackrabbitOakQueryQuery...
/clients/r/generated/R/OrgApacheJackrabbitOakQueryQueryEngineSettingsServiceProperties.r
permissive
shinesolutions/swagger-aem-osgi
R
false
false
6,194
r
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' OrgApacheJackrabbitOakQueryQuery...
getwd() setwd("D:/limworkspace/R_Data_Analysis/Part4") setwd("D:/limworkspace/R_Data_Analysis/Part4/data") setwd("D:/limworkspace/R_Data_Analysis/Part4/graph") getwd() #--------------------------------------------------------------# #------------------- Part 5 데이터 분석 기초 ------------------# #---------------------------...
/Part4_시각화/anscombe.R
no_license
limwonki0619/R_Data_Analysis
R
false
false
2,570
r
getwd() setwd("D:/limworkspace/R_Data_Analysis/Part4") setwd("D:/limworkspace/R_Data_Analysis/Part4/data") setwd("D:/limworkspace/R_Data_Analysis/Part4/graph") getwd() #--------------------------------------------------------------# #------------------- Part 5 데이터 분석 기초 ------------------# #---------------------------...
#' Dijkstra Algorithm #' #' @param graph A data frame that represents the graph. #' @param init_node A number that represents the starting node . #' @return A vector, the shortest path to every other node. #' @references \url{https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm} #' @examples #' dijkstra(wiki_graph, 1)...
/Rlab3/R/dijkstra.R
permissive
spirosdim/adv_R_course_lab3
R
false
false
1,041
r
#' Dijkstra Algorithm #' #' @param graph A data frame that represents the graph. #' @param init_node A number that represents the starting node . #' @return A vector, the shortest path to every other node. #' @references \url{https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm} #' @examples #' dijkstra(wiki_graph, 1)...
#' Correlation skill analysis for ensemble forecasts #' #' Calculate correlation between forecasts and observations for an ensemble forecast, including an adjustment for finite ensemble sizes #' #' @param ens a N*R matrix representing N time instances of real-valued R-member ensemble forecasts #' @param obs a numeric ...
/R/EnsCorr.R
no_license
sieste/SpecsVerification
R
false
false
2,166
r
#' Correlation skill analysis for ensemble forecasts #' #' Calculate correlation between forecasts and observations for an ensemble forecast, including an adjustment for finite ensemble sizes #' #' @param ens a N*R matrix representing N time instances of real-valued R-member ensemble forecasts #' @param obs a numeric ...
## Week 3 - R Programming ## In this assignment, a pair of functions that cache the inverse of a matrix was written below. ## Caching the inverse of a matrix rather than computing it repeatedly is more efficient. ## This first function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- ...
/cachematrix.R
no_license
SeleneB/ProgrammingAssignment2
R
false
false
1,519
r
## Week 3 - R Programming ## In this assignment, a pair of functions that cache the inverse of a matrix was written below. ## Caching the inverse of a matrix rather than computing it repeatedly is more efficient. ## This first function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/idframe.R \name{idframe} \alias{idframe} \title{S3 class for storing input-output data.} \usage{ idframe(output, input = NULL, Ts = 1, start = 0, end = NULL, unit = c("seconds", "minutes", "hours", "days")[1]) } \arguments{ \item{output}{da...
/man/idframe.Rd
no_license
syerramilli/R-sysid
R
false
true
999
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/idframe.R \name{idframe} \alias{idframe} \title{S3 class for storing input-output data.} \usage{ idframe(output, input = NULL, Ts = 1, start = 0, end = NULL, unit = c("seconds", "minutes", "hours", "days")[1]) } \arguments{ \item{output}{da...
imputecolmed<-function(x) { z <- median(x, na.rm = TRUE) x[is.na(x)] <- z return(x) } getmode <- function(v) { uniqv <- unique(v) uniqv[which.max(tabulate(match(v, uniqv)))] } require(mice) require(missForest) require(pcaMethods) #mean ptmmean<-proc.time() meanimputed<-list() for (i in 1:10){ thedata<- da...
/Step 3 Perform All Imputations and Measure Imputation Time.R
no_license
JonathanBailiss/BHI-missing-data
R
false
false
5,056
r
imputecolmed<-function(x) { z <- median(x, na.rm = TRUE) x[is.na(x)] <- z return(x) } getmode <- function(v) { uniqv <- unique(v) uniqv[which.max(tabulate(match(v, uniqv)))] } require(mice) require(missForest) require(pcaMethods) #mean ptmmean<-proc.time() meanimputed<-list() for (i in 1:10){ thedata<- da...
######################################### # "Making word cloud graphs with ggplot" ######################################### # This will make wordcloud graphs using ggworldcloud. In most cases it will work for any # Other input youd like with some minor modifications ### Read in libraries and arguments # Arguments ar...
/_book/R/02-wordcloud_plot_II.R
permissive
rociojoo/mov-eco-review
R
false
false
7,044
r
######################################### # "Making word cloud graphs with ggplot" ######################################### # This will make wordcloud graphs using ggworldcloud. In most cases it will work for any # Other input youd like with some minor modifications ### Read in libraries and arguments # Arguments ar...
get_cron_freq <- function(freq){ freq_easy <- c("minutely", "hourly", "daily", "monthly","yearly") minute_base <- "*/@minutes@ * * * *" if(freq %in% freq_easy){ freq_ <- freq } if(grepl('minutes',freq)){ m_ <- as.integer(gsub('[^[:digit:]]+','',freq)) freq_ <- gsub('@minutes@',m_,minute_base) } ...
/R/get_cron_freq.R
no_license
frandiego/covidTracker
R
false
false
338
r
get_cron_freq <- function(freq){ freq_easy <- c("minutely", "hourly", "daily", "monthly","yearly") minute_base <- "*/@minutes@ * * * *" if(freq %in% freq_easy){ freq_ <- freq } if(grepl('minutes',freq)){ m_ <- as.integer(gsub('[^[:digit:]]+','',freq)) freq_ <- gsub('@minutes@',m_,minute_base) } ...
#### I - ASSESS BY USE AND WATERBODY or PARAMETER AND WATERBODY #### # Create ATTAINS Assessment Unit Files. location.csv, water_type.csv and assessment_units.csv # Identify Retired Reaches i.retired <- c("15070102-334", "15020001-011", "15030204-003", "15050100-12B", "15050100-12A") # Remove from human File (this...
/ADEQ/modules/i_assess_use_wbid_or_param_wbid.R
no_license
AZDEQ/Water-Assessment-Calculator-Public
R
false
false
31,142
r
#### I - ASSESS BY USE AND WATERBODY or PARAMETER AND WATERBODY #### # Create ATTAINS Assessment Unit Files. location.csv, water_type.csv and assessment_units.csv # Identify Retired Reaches i.retired <- c("15070102-334", "15020001-011", "15030204-003", "15050100-12B", "15050100-12A") # Remove from human File (this...
library(maps) library(maptools) library(scales) EcoContext <- read_excel("RFModels/EcoContext.xlsx") regressionstats <- read_csv("BayHModels/regressionstats.csv") global.slope = as.numeric(quantile(out$BUGSoutput$sims.list$mu.beta,c(0.025,0.975))) sims.out = as.data.frame(out$BUGSoutput$sims.list$BB[1:4500,1:466,2]) la...
/RFModels/maps of slope class.R
no_license
nrlottig/waterlevels
R
false
false
1,164
r
library(maps) library(maptools) library(scales) EcoContext <- read_excel("RFModels/EcoContext.xlsx") regressionstats <- read_csv("BayHModels/regressionstats.csv") global.slope = as.numeric(quantile(out$BUGSoutput$sims.list$mu.beta,c(0.025,0.975))) sims.out = as.data.frame(out$BUGSoutput$sims.list$BB[1:4500,1:466,2]) la...
# Programação funcional - aula 1 # Funcional na prática com R ################################# # Para instalar as bibliotecas #install.packages(c( "readr", "dplyr", 'purrr', 'microbenchmark' )) # Carregar as bibliotecas necessárias library(readr) # Fazer a leitura dos dados library(dplyr) # fazer manipulação de da...
/prog_funcional/funcional01.R
no_license
mateusengq/funcional_oo_aulas
R
false
false
2,238
r
# Programação funcional - aula 1 # Funcional na prática com R ################################# # Para instalar as bibliotecas #install.packages(c( "readr", "dplyr", 'purrr', 'microbenchmark' )) # Carregar as bibliotecas necessárias library(readr) # Fazer a leitura dos dados library(dplyr) # fazer manipulação de da...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/M_Pauly.R \name{M_Pauly} \alias{M_Pauly} \title{Pauly's empirical formula for natural mortality (M)} \usage{ M_Pauly(Linf, K, temp, schooling = FALSE) } \arguments{ \item{Linf}{Infinite length for investigated species in cm [cm].} \item{K}{G...
/man/M_Pauly.Rd
permissive
iagomosqueira/TropFishR
R
false
true
1,496
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/M_Pauly.R \name{M_Pauly} \alias{M_Pauly} \title{Pauly's empirical formula for natural mortality (M)} \usage{ M_Pauly(Linf, K, temp, schooling = FALSE) } \arguments{ \item{Linf}{Infinite length for investigated species in cm [cm].} \item{K}{G...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter_pairs_for_deduplication.R \name{filter_pairs_for_deduplication} \alias{filter_pairs_for_deduplication} \title{Remove pairs which do not have to be compared for deduplication} \usage{ filter_pairs_for_deduplication(pairs) } \arguments{ ...
/man/filter_pairs_for_deduplication.Rd
no_license
djvanderlaan/reclin
R
false
true
673
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter_pairs_for_deduplication.R \name{filter_pairs_for_deduplication} \alias{filter_pairs_for_deduplication} \title{Remove pairs which do not have to be compared for deduplication} \usage{ filter_pairs_for_deduplication(pairs) } \arguments{ ...
#Page No. 380 A<-matrix(c(1,2,-2,4,0,1,2,1,3,2,2,-1,-1,1,4,1,1,2,3,2,1,0,3,0),c(6,4)) b<-matrix(c(1,5,-2,1,3,5),c(6,1)) trans<-t(A) LHS<-trans%*%A RHS<-trans%*%b solve(LHS,RHS) #The answer may slightly vary due to rounding off values.
/Introductory_Linear_Algebra_An_Applied_First_Course_by_Bernard_Kolman__David_R_Hill/CH7/EX7.2.1/Ex7_2_1.R
permissive
FOSSEE/R_TBC_Uploads
R
false
false
253
r
#Page No. 380 A<-matrix(c(1,2,-2,4,0,1,2,1,3,2,2,-1,-1,1,4,1,1,2,3,2,1,0,3,0),c(6,4)) b<-matrix(c(1,5,-2,1,3,5),c(6,1)) trans<-t(A) LHS<-trans%*%A RHS<-trans%*%b solve(LHS,RHS) #The answer may slightly vary due to rounding off values.
library(vcd); ALPHA = 0.05 toNumeric <- function(vector) { vector.character = apply(X=vector, MARGIN=2, FUN=as.character, na.omit=T); vector.numeric = apply(X=vector.character, MARGIN=2, FUN=as.numeric, na.omit=T); return(vector.numeric); } chiSquared <- function(x, y, exclude=NA) { temp = table(x,y,e...
/correlation.R
no_license
smitparaggua/197
R
false
false
3,408
r
library(vcd); ALPHA = 0.05 toNumeric <- function(vector) { vector.character = apply(X=vector, MARGIN=2, FUN=as.character, na.omit=T); vector.numeric = apply(X=vector.character, MARGIN=2, FUN=as.numeric, na.omit=T); return(vector.numeric); } chiSquared <- function(x, y, exclude=NA) { temp = table(x,y,e...
######################## #### EMdemoIMDb2 ####### ######################## set.seed(0) data("IMDb") Y <- IMDb$Y/100 p <- dim(Y)[1] T <- dim(Y)[2] n <- dim(Y)[3] K <- 3 init <- MatTrans.init(Y, K=K, n.start = 2) system.time(M2 <- MatTrans.EM(Y, initial = init, trans = "Power", short.iter = 5, l...
/demo/EMdemoIMDb2.R
no_license
cran/MatTransMix
R
false
false
534
r
######################## #### EMdemoIMDb2 ####### ######################## set.seed(0) data("IMDb") Y <- IMDb$Y/100 p <- dim(Y)[1] T <- dim(Y)[2] n <- dim(Y)[3] K <- 3 init <- MatTrans.init(Y, K=K, n.start = 2) system.time(M2 <- MatTrans.EM(Y, initial = init, trans = "Power", short.iter = 5, l...
# Explain the difference between | , || , & and &&
/6.1.3 Exercise.R
permissive
PacktPublishing/Programming-for-Statistics-and-Data-Science
R
false
false
56
r
# Explain the difference between | , || , & and &&
#Read in data data <- read.table( "household_power_consumption.txt", header = TRUE,sep = ";", stringsAsFactors = FALSE ) #Convert Date column to date class data$Date <- as.Date(data$Date, "%d/%m/%Y") head(data$Date) #Subset days of interest data_sub <- subset(data, Date == as.Date("2007-...
/plot4.R
no_license
clecroy/ExData_Plotting1
R
false
false
3,208
r
#Read in data data <- read.table( "household_power_consumption.txt", header = TRUE,sep = ";", stringsAsFactors = FALSE ) #Convert Date column to date class data$Date <- as.Date(data$Date, "%d/%m/%Y") head(data$Date) #Subset days of interest data_sub <- subset(data, Date == as.Date("2007-...
#!/usr/bin/env Rscript #============================================================================ #==============SUPER-ENHANCER CALLING AND PLOTTING FUNCTIONS================= #============================================================================ #This function calculates the cutoff by sliding a diagonal li...
/bin/ROSE_callSuper.R
permissive
Deoyeh/ROSE
R
false
false
9,190
r
#!/usr/bin/env Rscript #============================================================================ #==============SUPER-ENHANCER CALLING AND PLOTTING FUNCTIONS================= #============================================================================ #This function calculates the cutoff by sliding a diagonal li...
######################################################################################### ### Script Name: run_analysis.R ### Written by: Preeti Mehta, submitted on March 18, 2018 ### In completion of requirements for the Week 4 assignment of Getting and Cleaning Data ############################################...
/run_analysis.R
no_license
pmehta01/GettingCleaningDataAssignment
R
false
false
3,797
r
######################################################################################### ### Script Name: run_analysis.R ### Written by: Preeti Mehta, submitted on March 18, 2018 ### In completion of requirements for the Week 4 assignment of Getting and Cleaning Data ############################################...
################################################################################################### # ## Kontext: Version 1.0 R - Skript Projekt "Prima Campusklima" 2013 # # ## Zweck: Funktion zum read in des Humveprotokolls. # ## Aufbau: # ## Eingabe: Die ausgefüllte Excelvorlage, in der die Daten ...
/data/FGClimatology/R/LV_readin_humveprotokoll.R
no_license
gavin971/r_dev_messkonzept
R
false
false
1,302
r
################################################################################################### # ## Kontext: Version 1.0 R - Skript Projekt "Prima Campusklima" 2013 # # ## Zweck: Funktion zum read in des Humveprotokolls. # ## Aufbau: # ## Eingabe: Die ausgefüllte Excelvorlage, in der die Daten ...
#Messages(Pg no. 76) x = c(10,11,12,13,14,15) # number of messages probability = c(0.08,0.15,0.30,0.20,0.20,0.07) u = weighted.mean(x,probability) #expectation v = weighted.mean((x-u)^2,probability)#variance sd = sqrt(v) cat("Expectation E(X) =",u) cat("Variance V(X) =",v) cat("Standard Deviat...
/Applied_Statistics_And_Probability_For_Engineers_by_Douglas_C._Montgomery_And_George_C._Runger/CH3/EX3.11/EX3_11.R
permissive
FOSSEE/R_TBC_Uploads
R
false
false
394
r
#Messages(Pg no. 76) x = c(10,11,12,13,14,15) # number of messages probability = c(0.08,0.15,0.30,0.20,0.20,0.07) u = weighted.mean(x,probability) #expectation v = weighted.mean((x-u)^2,probability)#variance sd = sqrt(v) cat("Expectation E(X) =",u) cat("Variance V(X) =",v) cat("Standard Deviat...
#Bioacoustic index # #Inspired from the "bioacoustic index" from the paper: # Boelman NT, Asner GP, Hart PJ, Martin RE. 2007. Multi-trophic invasion # resistance in Hawaii: bioacoustics, field surveys, and airborne # remote sensing. Ecol Applications 17(8):2137-44. # # Inspired on Matlab code provided by NT Boelman...
/soundecology/R/bioacoust_index.R
no_license
bholg/soundecology
R
false
false
4,089
r
#Bioacoustic index # #Inspired from the "bioacoustic index" from the paper: # Boelman NT, Asner GP, Hart PJ, Martin RE. 2007. Multi-trophic invasion # resistance in Hawaii: bioacoustics, field surveys, and airborne # remote sensing. Ecol Applications 17(8):2137-44. # # Inspired on Matlab code provided by NT Boelman...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Slurm_Map.R, R/Slurm_lapply.R, R/Slurm_sapply.R \name{Slurm_Map} \alias{Slurm_Map} \alias{Slurm_lapply} \alias{Slurm_sapply} \title{The Slurm version of the \code{\link[=lapply]{*apply}} family of functions.} \usage{ Slurm_Map( f, ..., ...
/man/Slurm_lapply.Rd
permissive
USCbiostats/slurmR
R
false
true
5,006
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Slurm_Map.R, R/Slurm_lapply.R, R/Slurm_sapply.R \name{Slurm_Map} \alias{Slurm_Map} \alias{Slurm_lapply} \alias{Slurm_sapply} \title{The Slurm version of the \code{\link[=lapply]{*apply}} family of functions.} \usage{ Slurm_Map( f, ..., ...
pbmc.res <- readRDS("../../output/pbmc_res.rds") montoro.res <- readRDS("../../output/montoro_res.rds") pbmc.t <- pbmc.res$t pbmc.t["flashier.snn"] <- pbmc.t["flashier.pn"] + pbmc.t["flashier.snn"] montoro.t <- montoro.res$t tib <- tibble( Method = c(names(pbmc.t), names(montoro.t)), Time = c(pbmc.t, montoro.t), ...
/code/make_output/scRNA_fit_times.R
no_license
willwerscheid/flashier-chapter
R
false
false
680
r
pbmc.res <- readRDS("../../output/pbmc_res.rds") montoro.res <- readRDS("../../output/montoro_res.rds") pbmc.t <- pbmc.res$t pbmc.t["flashier.snn"] <- pbmc.t["flashier.pn"] + pbmc.t["flashier.snn"] montoro.t <- montoro.res$t tib <- tibble( Method = c(names(pbmc.t), names(montoro.t)), Time = c(pbmc.t, montoro.t), ...
### seqrise_color_pal library("scales") library('seqriseR') show_col(seqrise_color_pal('seqrise9')(9)) show_col(seqrise_color_pal('seqrise9light')(9)) show_col(seqrise_color_pal('seqrise18')(18))
/inst/examples/ex-seqrise_color_pal.R
no_license
linruichai/seqriseR
R
false
false
198
r
### seqrise_color_pal library("scales") library('seqriseR') show_col(seqrise_color_pal('seqrise9')(9)) show_col(seqrise_color_pal('seqrise9light')(9)) show_col(seqrise_color_pal('seqrise18')(18))
library(polynom) ### Name: integral.polynomial ### Title: Integrate a Polynomial ### Aliases: integral integral.polynomial ### Keywords: symbolmath ### ** Examples p <- poly.calc(1:5) p ## -120 + 274*x - 225*x^2 + 85*x^3 - 15*x^4 + x^5 deriv(p) ## 274 - 450*x + 255*x^2 - 60*x^3 + 5*x^4 integral(deriv(p)) - 120 ## -...
/data/genthat_extracted_code/polynom/examples/integral.polynomial.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
369
r
library(polynom) ### Name: integral.polynomial ### Title: Integrate a Polynomial ### Aliases: integral integral.polynomial ### Keywords: symbolmath ### ** Examples p <- poly.calc(1:5) p ## -120 + 274*x - 225*x^2 + 85*x^3 - 15*x^4 + x^5 deriv(p) ## 274 - 450*x + 255*x^2 - 60*x^3 + 5*x^4 integral(deriv(p)) - 120 ## -...
#' Shiny Module UI for Geo Selection #' #' @param id \code{character} id for the the Shiny namespace #' @param ... other arguments to \code{leafletOutput()} #' #' @return ui for Shiny module #' @export selectModUI <- function(id, ...) { ns <- shiny::NS(id) leaflet::leafletOutput(ns("map"), ...) } #...
/R/modules.R
no_license
cran/mapedit
R
false
false
8,335
r
#' Shiny Module UI for Geo Selection #' #' @param id \code{character} id for the the Shiny namespace #' @param ... other arguments to \code{leafletOutput()} #' #' @return ui for Shiny module #' @export selectModUI <- function(id, ...) { ns <- shiny::NS(id) leaflet::leafletOutput(ns("map"), ...) } #...
/Ch17 Classification.R
no_license
cogneuro/RiA2
R
false
false
5,616
r
\name{selfcut.psp} \alias{selfcut.psp} \title{Cut Line Segments Where They Intersect} \description{ Finds any crossing points between the line segments in a line segment pattern, and cuts the segments into pieces at these crossing-points. } \usage{ selfcut.psp(A, \dots, eps) } \arguments{ \item{A}{ Line se...
/man/selfcut.psp.Rd
no_license
rubak/spatstat
R
false
false
1,560
rd
\name{selfcut.psp} \alias{selfcut.psp} \title{Cut Line Segments Where They Intersect} \description{ Finds any crossing points between the line segments in a line segment pattern, and cuts the segments into pieces at these crossing-points. } \usage{ selfcut.psp(A, \dots, eps) } \arguments{ \item{A}{ Line se...
#This file is used for calculating RMSE and temporal moments of BTC at each well rm(list=ls()) #set the path to the files main_path = '/files2/scratch/chenxy/' paths = c('Tracer_Mar2011_UK3_Inj5_700to750h_Err20_Iter13/') prior_path = 'Tracer_Mar2011_UK3_Inj5_600to700h_Err20_Iter12' npath = length(paths) fi...
/scripts_on_file1/Smoother_Iter14.R
no_license
mrubayet/archived_codes_for_sfa_modeling
R
false
false
7,308
r
#This file is used for calculating RMSE and temporal moments of BTC at each well rm(list=ls()) #set the path to the files main_path = '/files2/scratch/chenxy/' paths = c('Tracer_Mar2011_UK3_Inj5_700to750h_Err20_Iter13/') prior_path = 'Tracer_Mar2011_UK3_Inj5_600to700h_Err20_Iter12' npath = length(paths) fi...
#script to collapse seqeunce data to single barcodes and collect numbers #this script is specifically for ligation to SP26N #initialise file to contain output output_sum<-c() output_seq<-list() #from my work computer dropbox<-"D:/dropbox/" #at home dropbox<-"C:/Users/Benny Chain/dropbox/" #Data input expt_path<-"...
/collapsinatoR_6NSP2.R
no_license
innate2adaptive/Decombinator_v2
R
false
false
3,530
r
#script to collapse seqeunce data to single barcodes and collect numbers #this script is specifically for ligation to SP26N #initialise file to contain output output_sum<-c() output_seq<-list() #from my work computer dropbox<-"D:/dropbox/" #at home dropbox<-"C:/Users/Benny Chain/dropbox/" #Data input expt_path<-"...
testlist <- list(x = structure(c(-6.80523011577824e+38, 1.61877020351798e+223 ), .Dim = 1:2)) result <- do.call(borrowr:::matchesToCor,testlist) str(result)
/borrowr/inst/testfiles/matchesToCor/libFuzzer_matchesToCor/matchesToCor_valgrind_files/1609958038-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
156
r
testlist <- list(x = structure(c(-6.80523011577824e+38, 1.61877020351798e+223 ), .Dim = 1:2)) result <- do.call(borrowr:::matchesToCor,testlist) str(result)
#' knitr data.frame printer as nice HTML table with several options #' #' @export table.knit_print.data.frame = function(x, table.max.rows=100, round.digits=8, signif.digits=8, html.data.frame=TRUE, show.col.tooltips=TRUE, col.tooltips=NULL, output="html", options=NULL, ...) { restore.point("table.knit_print.data.fra...
/R/knit_print.r
no_license
jimsforks/rmdtools
R
false
false
2,481
r
#' knitr data.frame printer as nice HTML table with several options #' #' @export table.knit_print.data.frame = function(x, table.max.rows=100, round.digits=8, signif.digits=8, html.data.frame=TRUE, show.col.tooltips=TRUE, col.tooltips=NULL, output="html", options=NULL, ...) { restore.point("table.knit_print.data.fra...
\name{tpl.example} \alias{tpl.example} \title{Template Examples} \usage{ tpl.example(fp, index = NULL, env = .GlobalEnv) } \arguments{ \item{fp}{a template file pointer (see \code{\link{tpl.find}} for details)} \item{index}{a numeric vector indicating the example index - meaningful only for templates with mu...
/man/tpl.example.Rd
no_license
casunlight/rapport
R
false
false
1,514
rd
\name{tpl.example} \alias{tpl.example} \title{Template Examples} \usage{ tpl.example(fp, index = NULL, env = .GlobalEnv) } \arguments{ \item{fp}{a template file pointer (see \code{\link{tpl.find}} for details)} \item{index}{a numeric vector indicating the example index - meaningful only for templates with mu...
\name{fungus} \alias{fungus} \docType{data} \title{Sperm Precedence Data from the Fungus Beetle} \description{Offspring counts and proportional paternity by mating order for a breeding experiment of the fungus beetle conducted by JK Conner (1995).} \usage{data(fungus)} \format{ A data frame with 12 observations on th...
/man/fungus.Rd
no_license
cran/ABCp2
R
false
false
1,013
rd
\name{fungus} \alias{fungus} \docType{data} \title{Sperm Precedence Data from the Fungus Beetle} \description{Offspring counts and proportional paternity by mating order for a breeding experiment of the fungus beetle conducted by JK Conner (1995).} \usage{data(fungus)} \format{ A data frame with 12 observations on th...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RCyjs-class.R \docType{methods} \name{setDefaultEdgeColor,RCyjs-method} \alias{setDefaultEdgeColor,RCyjs-method} \alias{setDefaultEdgeColor} \title{setDefaultEdgeColor} \usage{ \S4method{setDefaultEdgeColor}{RCyjs}(obj, newValue) } \arguments...
/man/setDefaultEdgeColor.Rd
permissive
fengweijp/RCyjs
R
false
true
658
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RCyjs-class.R \docType{methods} \name{setDefaultEdgeColor,RCyjs-method} \alias{setDefaultEdgeColor,RCyjs-method} \alias{setDefaultEdgeColor} \title{setDefaultEdgeColor} \usage{ \S4method{setDefaultEdgeColor}{RCyjs}(obj, newValue) } \arguments...
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # #ui.R library(shiny) library(raster) library(rasterVis) library(ggplot2) library(shinyIncubator) library(shinysky) shinyUI( navbarPage( "KRESS...
/ui.R
no_license
AaronGDay/KRESS
R
false
false
5,680
r
# This is the user-interface definition of a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # #ui.R library(shiny) library(raster) library(rasterVis) library(ggplot2) library(shinyIncubator) library(shinysky) shinyUI( navbarPage( "KRESS...
# source file 'main.R' "sm" <- function(dir = getwd(), return = FALSE) { filename <- paste(dir, "/", "main.R", sep = "") if (file.exists(filename)) { oldwd <- getwd() setwd(dir) source("main.R") if (isTRUE(return)) { setwd(oldwd) } } else { stop(paste("File '", file...
/dh/R/misc.R
permissive
dhaase-de/dh-r-dh
R
false
false
10,247
r
# source file 'main.R' "sm" <- function(dir = getwd(), return = FALSE) { filename <- paste(dir, "/", "main.R", sep = "") if (file.exists(filename)) { oldwd <- getwd() setwd(dir) source("main.R") if (isTRUE(return)) { setwd(oldwd) } } else { stop(paste("File '", file...
dmvnb <- function(bug, sims, MU, COV, P){ if(is.null(colnames(sims))) stop("columns of sims can not be NULL. names should correspond to parameters") if(class(bug)!="tsbugs") stop("bug must be a object of class tsbugs") nn<-paste0("delta.", 1:bug$info$n) nn<-nn[nn %in% colnames(sims)] nn<-colna...
/tsbridge/R/dmvnb.R
no_license
ingted/R-Examples
R
false
false
573
r
dmvnb <- function(bug, sims, MU, COV, P){ if(is.null(colnames(sims))) stop("columns of sims can not be NULL. names should correspond to parameters") if(class(bug)!="tsbugs") stop("bug must be a object of class tsbugs") nn<-paste0("delta.", 1:bug$info$n) nn<-nn[nn %in% colnames(sims)] nn<-colna...
#!/usr/bin/env Rscript library(stringr) library(data.table) source("lib.r") args = commandArgs(trailingOnly=TRUE) #tpch.list <- c(1:4, 6:14, 16:22) tpch.list <- c(1,2,6,"11a",12,14,"18a") if (length(args) == 0) { cat("Please specify which result folder to collect into a data frame\n") stop() } dat.all <- rbindl...
/measure/collect.r
no_license
lfd/btw2021
R
false
false
457
r
#!/usr/bin/env Rscript library(stringr) library(data.table) source("lib.r") args = commandArgs(trailingOnly=TRUE) #tpch.list <- c(1:4, 6:14, 16:22) tpch.list <- c(1,2,6,"11a",12,14,"18a") if (length(args) == 0) { cat("Please specify which result folder to collect into a data frame\n") stop() } dat.all <- rbindl...
### Model Selection Algorithm library(tidyverse) library(fmsb) library(MASS) # Load Data model_data <- read_csv("final data set.csv") test_data <- filter(model_data, tickers == "AAPL" | is.na(tickers) == TRUE)%>% filter(`Scenario Name` == 'Actual')%>% na.omit() data <- model_data # Algo to build model ti...
/Model Selection.R
no_license
nalewellen/Portfolio_Stress
R
false
false
1,902
r
### Model Selection Algorithm library(tidyverse) library(fmsb) library(MASS) # Load Data model_data <- read_csv("final data set.csv") test_data <- filter(model_data, tickers == "AAPL" | is.na(tickers) == TRUE)%>% filter(`Scenario Name` == 'Actual')%>% na.omit() data <- model_data # Algo to build model ti...
/redes_neurais_youth_risk_1.R
no_license
arthurpcs/TrabalhoFinalCienciadeDadosemR
R
false
false
3,276
r
# This script runs the global extrapolation based on the data collected through the # extract_study_data.R library(readxl) source("TheLancetCAH_global_age_analysis_2022/R/format_tfr_europe.R") format_tfr_europe(orphans_path = "TheLancet_global_minimum_estimates_2021/orphans.RDS", deaths_path = "TheL...
/TheLancetCAH_global_age_analysis_2022/R/run_global_extrapolation_europe_april.R
permissive
ImperialCollegeLondon/covid19_orphans
R
false
false
777
r
# This script runs the global extrapolation based on the data collected through the # extract_study_data.R library(readxl) source("TheLancetCAH_global_age_analysis_2022/R/format_tfr_europe.R") format_tfr_europe(orphans_path = "TheLancet_global_minimum_estimates_2021/orphans.RDS", deaths_path = "TheL...
#' Generate Large Loss probability for Numerical experiments in OptCredRisk #' #' @param PlainMC_Sampling_Num scenarios for MC simiulation, positive integer #' @param IS_Sampling_Num scenarios for IS simiulation, positive integer #' @param m number of obligors, positive integer #' @param d number of risk factors, ...
/R/NumExas.R
no_license
heeryerate/OptCredRisk
R
false
false
4,855
r
#' Generate Large Loss probability for Numerical experiments in OptCredRisk #' #' @param PlainMC_Sampling_Num scenarios for MC simiulation, positive integer #' @param IS_Sampling_Num scenarios for IS simiulation, positive integer #' @param m number of obligors, positive integer #' @param d number of risk factors, ...
#' Colour key #' #' Display a colour key based on the most recent trapping records for a given #' grid and year. #' #' @param con Connection to KRSP database #' @param grid character; grid to display colour key for. #' @param year integer; year to display colour key for. Defaults to current year. #' #' @return A data f...
/R/krsp-colours.r
no_license
mstrimas/krsp
R
false
false
5,746
r
#' Colour key #' #' Display a colour key based on the most recent trapping records for a given #' grid and year. #' #' @param con Connection to KRSP database #' @param grid character; grid to display colour key for. #' @param year integer; year to display colour key for. Defaults to current year. #' #' @return A data f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{getFunctionCallArgs} \alias{getFunctionCallArgs} \title{Get string of function call} \usage{ getFunctionCallArgs(func_args_list) } \arguments{ \item{func_args_list}{A list object containing information of arguments to a functi...
/man/getFunctionCallArgs.Rd
permissive
Roestlab/DrawAlignR
R
false
true
429
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{getFunctionCallArgs} \alias{getFunctionCallArgs} \title{Get string of function call} \usage{ getFunctionCallArgs(func_args_list) } \arguments{ \item{func_args_list}{A list object containing information of arguments to a functi...
#' Symmetric, conditional, and proportional jitter to avoid overplotting. #' #' @description \code{position_swarm} is an upgraded #' \code{position-jitter()} for data with a categorical variable on one axis. #' Also known as beeswarm plots. #' #' @param width degree of jitter in x direction. Defaults to 40\% of the #' ...
/R/position-swarm.r
no_license
seaaan/swarm
R
false
false
4,966
r
#' Symmetric, conditional, and proportional jitter to avoid overplotting. #' #' @description \code{position_swarm} is an upgraded #' \code{position-jitter()} for data with a categorical variable on one axis. #' Also known as beeswarm plots. #' #' @param width degree of jitter in x direction. Defaults to 40\% of the #' ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/syllable_sum.R \name{syllable_sum} \alias{syllable_sum} \alias{syllable_count} \alias{polysyllable_sum} \alias{combo_syllable_sum} \title{Syllabication} \usage{ syllable_sum(text.var, parallel = FALSE, ...) syllable_count( text, remove.b...
/man/syllabication.Rd
no_license
cran/qdap
R
false
true
2,834
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/syllable_sum.R \name{syllable_sum} \alias{syllable_sum} \alias{syllable_count} \alias{polysyllable_sum} \alias{combo_syllable_sum} \title{Syllabication} \usage{ syllable_sum(text.var, parallel = FALSE, ...) syllable_count( text, remove.b...
library(shiny) rm(list=ls()) library(dplyr) # "data pliers" #setwd("C:\\WORK\\Cursos\\Coursera\\BigData\\Capstone\\Data\\final\\en_US") unigram1<-read.table("unigram.txt") bigram1<-read.table("bigram.txt") trigram1<-read.table("trigram.txt") fourgram1<-read.table("fourgram.txt") #fivegram<-read.table("fivegra...
/App/server.R
no_license
jepalomar/DataScienceCapstoneJohnHopkins
R
false
false
1,008
r
library(shiny) rm(list=ls()) library(dplyr) # "data pliers" #setwd("C:\\WORK\\Cursos\\Coursera\\BigData\\Capstone\\Data\\final\\en_US") unigram1<-read.table("unigram.txt") bigram1<-read.table("bigram.txt") trigram1<-read.table("trigram.txt") fourgram1<-read.table("fourgram.txt") #fivegram<-read.table("fivegra...
#' Extract time series data as typically contained in -Series.csv output from Wildlife Computers #' #' Extract time series data as typically contained in -Series.csv output from Wildlife Computers #' #' @param etuff is object of class etuff #' @param temp_res is temporal resolution as valid argument to "by" in \code{se...
/R/get_series.r
no_license
galuardi/tags2etuff
R
false
false
2,866
r
#' Extract time series data as typically contained in -Series.csv output from Wildlife Computers #' #' Extract time series data as typically contained in -Series.csv output from Wildlife Computers #' #' @param etuff is object of class etuff #' @param temp_res is temporal resolution as valid argument to "by" in \code{se...
#' retrieve_links: Retrieving Links of Lower-level web pages of mementos from the Internet Archive #' #' `retrieve_links` retrieves the Urls of mementos stored in the Internet Archive #' #' @param ArchiveUrls A string of the memento of the Internet Archive #' @param encoding Specify a encoding for the homepage. Defau...
/R/retrieve_links.R
permissive
KostaGav/archiveRetriever
R
false
false
5,044
r
#' retrieve_links: Retrieving Links of Lower-level web pages of mementos from the Internet Archive #' #' `retrieve_links` retrieves the Urls of mementos stored in the Internet Archive #' #' @param ArchiveUrls A string of the memento of the Internet Archive #' @param encoding Specify a encoding for the homepage. Defau...
fusteUnico <- function(dados, fuste = "stemtag", tag= "tag", dap= "dbh", censos= c("01","02"), sufixo= ".mm") { namedbh=paste(dap, censos,sufixo, sep="") new_namedbh= paste(dap, censos,".cm", sep="") dap.cm <- aggregate(dados[,namedbh], list(tag=dados[,tag]), FUN= dap2cm) dap.cm[dap.cm==0]<-NA dados...
/R/fusteUnico.R
no_license
adalardo/Rppsp
R
false
false
705
r
fusteUnico <- function(dados, fuste = "stemtag", tag= "tag", dap= "dbh", censos= c("01","02"), sufixo= ".mm") { namedbh=paste(dap, censos,sufixo, sep="") new_namedbh= paste(dap, censos,".cm", sep="") dap.cm <- aggregate(dados[,namedbh], list(tag=dados[,tag]), FUN= dap2cm) dap.cm[dap.cm==0]<-NA dados...
source('Scripts/crowdMovement/algorithms/cdbscan.r') source('Scripts/crowdMovement/runGeneric.r') source('Scripts/crowdMovement/util/distance_GPS.r') getValuesOfKnobs = function() { Eps = c(100) minPts = c(5) mergeTime = c(600) valuesOfKnobs = expand.grid(Eps = Eps, minPts = minPts, mergeTime = mergeTime) return(...
/executors/GPS/run_cdbscan_short2.r
no_license
cristianchilipirea/crowdMovement
R
false
false
670
r
source('Scripts/crowdMovement/algorithms/cdbscan.r') source('Scripts/crowdMovement/runGeneric.r') source('Scripts/crowdMovement/util/distance_GPS.r') getValuesOfKnobs = function() { Eps = c(100) minPts = c(5) mergeTime = c(600) valuesOfKnobs = expand.grid(Eps = Eps, minPts = minPts, mergeTime = mergeTime) return(...
#' @title SCR negative log-likelihood #' #' @description Calculates the log-likelihood for an SCR model. Currently only multi-catch traps and #' count detectors with a single session implemented, and no detection function or density model covariates implemented. #' #' @return Value of negative log-likelihood #' #' ...
/R/basicSCRfunctions.r
no_license
david-borchers/scrmlebook
R
false
false
6,869
r
#' @title SCR negative log-likelihood #' #' @description Calculates the log-likelihood for an SCR model. Currently only multi-catch traps and #' count detectors with a single session implemented, and no detection function or density model covariates implemented. #' #' @return Value of negative log-likelihood #' #' ...
############################################################################# # Copyright (c) 2012 Christophe Dutang # ...
/R/solv-SE.R
no_license
cran/GNE
R
false
false
33,878
r
############################################################################# # Copyright (c) 2012 Christophe Dutang # ...
if(!file.exists("./hardata")){dir.create("./hardata")} fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileUrl, destfile="./hardata/harDataset.zip") # Unzip dataSet to /data directory unzip(zipfile="./hardata/harDataset.zip", exdir="./hardata") # Mergi...
/run_analysis.R
no_license
rajd216/Getting-and-Cleaning-Data-project
R
false
false
2,336
r
if(!file.exists("./hardata")){dir.create("./hardata")} fileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileUrl, destfile="./hardata/harDataset.zip") # Unzip dataSet to /data directory unzip(zipfile="./hardata/harDataset.zip", exdir="./hardata") # Mergi...
## function to compute the marginal posterior probabilities for nodes ## using the rerooting method ## written by Liam J. Revell 2013, 2015, 2017, 2018, 2020 rerootingMethod<-function(tree,x,model=c("ER","SYM"),...){ if(!inherits(tree,"phylo")) stop("tree should be an object of class \"phylo\".") if(hasAr...
/R/rerootingMethod.R
no_license
Phyo-Khine/phytools
R
false
false
3,111
r
## function to compute the marginal posterior probabilities for nodes ## using the rerooting method ## written by Liam J. Revell 2013, 2015, 2017, 2018, 2020 rerootingMethod<-function(tree,x,model=c("ER","SYM"),...){ if(!inherits(tree,"phylo")) stop("tree should be an object of class \"phylo\".") if(hasAr...
#' Confidence Interval V #' #' Ths function computes a confidence interval for the variance of a normal random variable. #' The result is a data frame with variables #' variance (the sample variance), #' size (the sample size), #' lower and upper (the lower and upper confidence interval limits) #' conf.level the con...
/material original/TemasMATIII_1819/06_Intervalos/IntervalosMatesII/R/IC.var.R
no_license
fenixin15/curso-estadistica-inferencial
R
false
false
1,365
r
#' Confidence Interval V #' #' Ths function computes a confidence interval for the variance of a normal random variable. #' The result is a data frame with variables #' variance (the sample variance), #' size (the sample size), #' lower and upper (the lower and upper confidence interval limits) #' conf.level the con...
library(HIest) ### Name: longX2 ### Title: Longs heterogeneity test for admixture proportions in a single ### population. ### Aliases: longX2 ### Keywords: ~kwd1 ~kwd2 ### ** Examples longX2(c(0.95,rbeta(20,2,5)))
/data/genthat_extracted_code/HIest/examples/longX2.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
223
r
library(HIest) ### Name: longX2 ### Title: Longs heterogeneity test for admixture proportions in a single ### population. ### Aliases: longX2 ### Keywords: ~kwd1 ~kwd2 ### ** Examples longX2(c(0.95,rbeta(20,2,5)))
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/acs.R \name{get_acs_data} \alias{get_acs_data} \title{Returns a list representing American Community Survey (ACS) estimates} \usage{ get_acs_data(tableId, map, endyear = 2012, span = 5, column_idx = -1) } \arguments{ \item{tableId}{The id of ...
/man/get_acs_data.Rd
no_license
Emaasit/choroplethr
R
false
true
2,046
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/acs.R \name{get_acs_data} \alias{get_acs_data} \title{Returns a list representing American Community Survey (ACS) estimates} \usage{ get_acs_data(tableId, map, endyear = 2012, span = 5, column_idx = -1) } \arguments{ \item{tableId}{The id of ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classroom_functions.R \name{gc_courses_course_work_student_submissions_get} \alias{gc_courses_course_work_student_submissions_get} \title{Get Submissions} \usage{ gc_courses_course_work_student_submissions_get(courseId, courseWorkId, id) } \a...
/man/gc_courses_course_work_student_submissions_get.Rd
no_license
curso-r/googleclassroom
R
false
true
2,083
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classroom_functions.R \name{gc_courses_course_work_student_submissions_get} \alias{gc_courses_course_work_student_submissions_get} \title{Get Submissions} \usage{ gc_courses_course_work_student_submissions_get(courseId, courseWorkId, id) } \a...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cloudfront_operations.R \name{cloudfront_get_field_level_encryption} \alias{cloudfront_get_field_level_encryption} \title{Get the field-level encryption configuration information} \usage{ cloudfront_get_field_level_encryption(Id) } \arguments...
/cran/paws.networking/man/cloudfront_get_field_level_encryption.Rd
permissive
paws-r/paws
R
false
true
618
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cloudfront_operations.R \name{cloudfront_get_field_level_encryption} \alias{cloudfront_get_field_level_encryption} \title{Get the field-level encryption configuration information} \usage{ cloudfront_get_field_level_encryption(Id) } \arguments...
############################################################ # SET SEED AND LOAD REQUIRED PACKAGES ############################################################ # To make sure the results can be replicated set.seed(1234) ############################################################ # Check and load required missing pac...
/Decision Model Example - Chemotherapy/chemotherapy_decision_model.R
no_license
convoigroup/EVSIExample
R
false
false
22,387
r
############################################################ # SET SEED AND LOAD REQUIRED PACKAGES ############################################################ # To make sure the results can be replicated set.seed(1234) ############################################################ # Check and load required missing pac...
ExStateAMOs <- function(.lv){ .qry <- "SELECT * FROM [dbo].[amo_state_targets]" .amo_dat <- sqlQuery(dbrepcard, .qry) .ret <- c() if(nrow(.amo_dat) > 0){ for(i in 1:nrow(.amo_dat)){ for(j in c("math", "read")){ .add <- indent(.lv) %+% '{\n' ...
/state_functions.R
no_license
DC-OSSE/LearnDC
R
false
false
25,495
r
ExStateAMOs <- function(.lv){ .qry <- "SELECT * FROM [dbo].[amo_state_targets]" .amo_dat <- sqlQuery(dbrepcard, .qry) .ret <- c() if(nrow(.amo_dat) > 0){ for(i in 1:nrow(.amo_dat)){ for(j in c("math", "read")){ .add <- indent(.lv) %+% '{\n' ...
library(raster) library(ggplot2) if (require("maps")) { # Create a lat-long dataframe from the maps package gol <- map_data("france",xlim=c(2.18,6.98),ylim=c(41.30,43.50)) golmap <- ggplot(gol, aes(x=long, y=lat, group=group)) + geom_polygon(fill="black", colour="black") # Use cartesian coordinates ...
/extreme/R/scripts/testCoordmap.R
no_license
rchailan/mirmidon-toolbox
R
false
false
623
r
library(raster) library(ggplot2) if (require("maps")) { # Create a lat-long dataframe from the maps package gol <- map_data("france",xlim=c(2.18,6.98),ylim=c(41.30,43.50)) golmap <- ggplot(gol, aes(x=long, y=lat, group=group)) + geom_polygon(fill="black", colour="black") # Use cartesian coordinates ...
createUM = function() { UM = rbind(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) write.csv(UM, file = "./output/UM.csv") summary(UM) }
/R/createUM.R
no_license
Anjs04/UM
R
false
false
175
r
createUM = function() { UM = rbind(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z) write.csv(UM, file = "./output/UM.csv") summary(UM) }
#Author: Gyan Shashwat #Tuning Code with model # model instantiation ----------------------------------------------- # set defaul flags FLAGS <- flags( flag_numeric("dropout", 0.4), flag_integer("unit1", 100), flag_integer("unit2", 100), flag_integer("unit3", 100), flag_numeric("lambda", 0.01) ) # mode...
/tuning.R
no_license
GyanShashwat1611/DNN-Model-Tuning-on-different-hyperparameter-
R
false
false
1,517
r
#Author: Gyan Shashwat #Tuning Code with model # model instantiation ----------------------------------------------- # set defaul flags FLAGS <- flags( flag_numeric("dropout", 0.4), flag_integer("unit1", 100), flag_integer("unit2", 100), flag_integer("unit3", 100), flag_numeric("lambda", 0.01) ) # mode...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/actual_correlation.R \name{actual_correlation} \alias{actual_correlation} \title{Actual correlation} \usage{ actual_correlation(M, a_vector, scale = 1, vect_dir = T) } \arguments{ \item{M}{a matrix} \item{a_vector}{2 coordinates vector which...
/man/actual_correlation.Rd
permissive
C-Juliette/randomfields
R
false
true
1,318
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/actual_correlation.R \name{actual_correlation} \alias{actual_correlation} \title{Actual correlation} \usage{ actual_correlation(M, a_vector, scale = 1, vect_dir = T) } \arguments{ \item{M}{a matrix} \item{a_vector}{2 coordinates vector which...
library(ape) testtree <- read.tree("7300_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7300_0_unrooted.txt")
/codeml_files/newick_trees_processed/7300_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("7300_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7300_0_unrooted.txt")
##必要なパッケージ library(leaflet) library(htmlTable) library(leaflet.extras) ## データ作成 df <- read.csv(textConnection( "CityName,Lat,Long,製造業,卸売業,小売業,サービス業,天気,cl1,cl2 名古屋市,35.168673,136.910323,12.5,22.4,2.2,-22.1,day-sunny,red,white あま市,35.200526,136.783584,12.5,22.4,2.2,-22.1,day-sunny,red,white 岡崎市,34.954845,137.173...
/leaflet_weather.R
no_license
kmbsweb/data_box
R
false
false
1,881
r
##必要なパッケージ library(leaflet) library(htmlTable) library(leaflet.extras) ## データ作成 df <- read.csv(textConnection( "CityName,Lat,Long,製造業,卸売業,小売業,サービス業,天気,cl1,cl2 名古屋市,35.168673,136.910323,12.5,22.4,2.2,-22.1,day-sunny,red,white あま市,35.200526,136.783584,12.5,22.4,2.2,-22.1,day-sunny,red,white 岡崎市,34.954845,137.173...
context("Missing Summary") DesiredOutput <- structure( list( record_id = structure(c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"), label = "Record ID", ...
/tests/testthat/test-356-missingSummary.R
no_license
nutterb/redcapAPI
R
false
false
5,756
r
context("Missing Summary") DesiredOutput <- structure( list( record_id = structure(c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"), label = "Record ID", ...