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
## ----readin, message = FALSE--------------------------------------------- # readin is just a "label" for this code chunk ## code chunk is just a "chunk" of code, where this code usually ## does just one thing, aka a module ### comments are still # here ### you can do all your reading in there ### let's say we loaded ...
/Knitr/lecture/Knitr.R
permissive
anhnguyendepocen/winterR_2017
R
false
false
11,392
r
## ----readin, message = FALSE--------------------------------------------- # readin is just a "label" for this code chunk ## code chunk is just a "chunk" of code, where this code usually ## does just one thing, aka a module ### comments are still # here ### you can do all your reading in there ### let's say we loaded ...
##https://shirinsplayground.netlify.com/2018/01/plumber/ library(tidyverse) library(rjson) # take first test case for prediction input_data <- test[1, ] %>% select(-class) # predict test case using model pred <- predict(model_rf, input_data) cat("----------------\nTest case predicted to be", as.characte...
/API_creation.R
no_license
saranyashalya/Plumber_API_creation
R
false
false
1,053
r
##https://shirinsplayground.netlify.com/2018/01/plumber/ library(tidyverse) library(rjson) # take first test case for prediction input_data <- test[1, ] %>% select(-class) # predict test case using model pred <- predict(model_rf, input_data) cat("----------------\nTest case predicted to be", as.characte...
# Author: Patrick Ericx # Creation date: 20-feb-2016 # Coursera - Exploratory Data Analysis # Assignment: course project 1 # plot1.R contains the code to create output file plot1.png # The zip file with the source data is downloaded and unzipped manually on Windows. setwd("C:/Coursera/04_graphs") dir <- "exdata_...
/plot1.R
no_license
PatrickEricx/ExData_Plotting1
R
false
false
1,252
r
# Author: Patrick Ericx # Creation date: 20-feb-2016 # Coursera - Exploratory Data Analysis # Assignment: course project 1 # plot1.R contains the code to create output file plot1.png # The zip file with the source data is downloaded and unzipped manually on Windows. setwd("C:/Coursera/04_graphs") dir <- "exdata_...
## first one is cache object. so if store matrix and if fetch something, then return is ## second one is calculate part. if some matrix was given, this function ## try to find that result from cached object. ## if couldn't found target, then calculate invert matrix and save it to cache ## Write a short comment descri...
/cachematrix.R
no_license
pickled/ProgrammingAssignment2
R
false
false
1,222
r
## first one is cache object. so if store matrix and if fetch something, then return is ## second one is calculate part. if some matrix was given, this function ## try to find that result from cached object. ## if couldn't found target, then calculate invert matrix and save it to cache ## Write a short comment descri...
####using historical data to estimate mu and sigma, then use GBM to simulate price. library(tseries) library(lmtest) library(TSA) library(fBasics) library(fGarch) #library(rugarch) library(forecast) library(stats) library(PerformanceAnalytics) library(quantmod) library(car) library(FinTS) require(stochvol) setwd("~/Des...
/simulation.R
no_license
kikibean/Coursework-Projects
R
false
false
10,368
r
####using historical data to estimate mu and sigma, then use GBM to simulate price. library(tseries) library(lmtest) library(TSA) library(fBasics) library(fGarch) #library(rugarch) library(forecast) library(stats) library(PerformanceAnalytics) library(quantmod) library(car) library(FinTS) require(stochvol) setwd("~/Des...
# # # example histogram equalization for iris # # # h <- hist(iris$Sepal.Length, breaks = length(iris$Sepal.Length)) # pmf <- h$counts/sum(h$counts) # cdf <- cumsum(pmf) # # cdf * n # cdfn <- cdf * length(h$counts) # # fl_cdfn <- floor(cdfn) # eq_hst_vals <- rep(cdfn, h$counts) # eq_hst <- hist(eq_hst_vals, breaks = ...
/examples/example-equalize_hist.R
no_license
p-soma/cedarmapper
R
false
false
8,040
r
# # # example histogram equalization for iris # # # h <- hist(iris$Sepal.Length, breaks = length(iris$Sepal.Length)) # pmf <- h$counts/sum(h$counts) # cdf <- cumsum(pmf) # # cdf * n # cdfn <- cdf * length(h$counts) # # fl_cdfn <- floor(cdfn) # eq_hst_vals <- rep(cdfn, h$counts) # eq_hst <- hist(eq_hst_vals, breaks = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllClass.R \docType{class} \name{DE-class} \alias{DE-class} \title{An S4 class for simulating dose-titration study designs} \description{ An S4 class for simulating dose-titration study designs } \section{Slots}{ \describe{ \item{\code{doses...
/man/DE-class.Rd
no_license
cran/DTAT
R
false
true
1,978
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllClass.R \docType{class} \name{DE-class} \alias{DE-class} \title{An S4 class for simulating dose-titration study designs} \description{ An S4 class for simulating dose-titration study designs } \section{Slots}{ \describe{ \item{\code{doses...
library(data.table) library(ggplot2) library(dplyr) library(lubridate) library(rgdal) library(ggmap) library(scales) library(raster) # Quick analysis of geocoded data - show some possibilities using dplr data <- fread('./PPRDataCombined.csv') data$date <- data[, ymd(date)] # ---------- Match rates and accu...
/AnalysisSecond.r
no_license
Zakoleary/DataProject
R
false
false
6,400
r
library(data.table) library(ggplot2) library(dplyr) library(lubridate) library(rgdal) library(ggmap) library(scales) library(raster) # Quick analysis of geocoded data - show some possibilities using dplr data <- fread('./PPRDataCombined.csv') data$date <- data[, ymd(date)] # ---------- Match rates and accu...
library(data.table) france_tb <- function(dt) { if(grepl('06$',dt$Date[1])) { ## Pitch invasion, go figure dt[HomeTeam == 'Nantes'& AwayTeam == 'Toulouse', FTR := 'A'] } t <- rbindlist(list(dt[FTR == 'H', .(p = uniqueN(AwayTeam) * 3), by = 'HomeTeam'], dt[FTR...
/functions/tb/france_tb.R
no_license
stcondon/shiny_football
R
false
false
1,845
r
library(data.table) france_tb <- function(dt) { if(grepl('06$',dt$Date[1])) { ## Pitch invasion, go figure dt[HomeTeam == 'Nantes'& AwayTeam == 'Toulouse', FTR := 'A'] } t <- rbindlist(list(dt[FTR == 'H', .(p = uniqueN(AwayTeam) * 3), by = 'HomeTeam'], dt[FTR...
############################ # Author: Konrad Mrozewski # # Date: 20-03-2015 # ############################ ################################### Packages import # install.packages("ggplot2") # install.packages("reshape2") # install.packages("dplyr") library(ggplot2, quietly = TRUE) library(reshape2, quietly = T...
/scripts/launch_earf.R
no_license
kmrozewski/EventStudies-StockExchange
R
false
false
3,474
r
############################ # Author: Konrad Mrozewski # # Date: 20-03-2015 # ############################ ################################### Packages import # install.packages("ggplot2") # install.packages("reshape2") # install.packages("dplyr") library(ggplot2, quietly = TRUE) library(reshape2, quietly = T...
#' Select each client's first administration of a specified survey #' #' @param data data frame #' @param order_by variable to order by when selecting the first administration. #' @param keep_all Columns to keep. `TRUE` will keep all columns, while `FALSE` will keep only IDs and CCAPS subscales, SDS items, or CLICC ite...
/R/select_first_CCAPS.R
permissive
CCMH-PSU/CCMHr
R
false
false
7,050
r
#' Select each client's first administration of a specified survey #' #' @param data data frame #' @param order_by variable to order by when selecting the first administration. #' @param keep_all Columns to keep. `TRUE` will keep all columns, while `FALSE` will keep only IDs and CCAPS subscales, SDS items, or CLICC ite...
## Exploratory Data Analysis ## Week 1 - Project 1 - Plot 3 ## Prepare environment rm(list=ls()) library(readr) library(lubridate) ## Use read.csv to load household_power_consumption EPData <- read.csv("Elect Pwr dataset/household_power_consumption.txt", sep = ";", na...
/Plot3.R
no_license
brucetx/ExData_Plotting1
R
false
false
1,312
r
## Exploratory Data Analysis ## Week 1 - Project 1 - Plot 3 ## Prepare environment rm(list=ls()) library(readr) library(lubridate) ## Use read.csv to load household_power_consumption EPData <- read.csv("Elect Pwr dataset/household_power_consumption.txt", sep = ";", na...
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.24869846744371e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), 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/1613112468-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
257
r
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.24869846744371e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
#' @title emotional_impact_response_experienced #' #' @description Builds the "Type of emotional response experienced" part of one subtable of an "Emotional impact of #' incidents" table for a Nature of Crime dataset. #' #' @details This function builds the "Type of emotional response experienced" part of one subtable ...
/autotable/R/emotional_impact_response_experienced.R
no_license
ONS-centre-for-crime-and-justice/nature-of-crime-r
R
false
false
11,290
r
#' @title emotional_impact_response_experienced #' #' @description Builds the "Type of emotional response experienced" part of one subtable of an "Emotional impact of #' incidents" table for a Nature of Crime dataset. #' #' @details This function builds the "Type of emotional response experienced" part of one subtable ...
suppressMessages(library(ggplot2)) suppressMessages(library(scales)) suppressMessages(library(dplyr)) suppressMessages(library(reshape2)) suppressMessages(library(ggpubr)) preprocess <- function(ta, meta, methods, phenotype) { if(methods != "CIBERSORT") { rownames(ta) <- ta[[1]] ta <- ta[-1] ta <- melt(...
/plotfunction.R
no_license
kateyliu/RIMA
R
false
false
2,880
r
suppressMessages(library(ggplot2)) suppressMessages(library(scales)) suppressMessages(library(dplyr)) suppressMessages(library(reshape2)) suppressMessages(library(ggpubr)) preprocess <- function(ta, meta, methods, phenotype) { if(methods != "CIBERSORT") { rownames(ta) <- ta[[1]] ta <- ta[-1] ta <- melt(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cochrane.R \name{parse.studies} \alias{parse.studies} \title{Reads only study data.} \usage{ parse.studies(file, path) } \arguments{ \item{file}{RevMan (.rm5) file name.} \item{path}{path where data file is located.} } \value{ data frame wit...
/man/parse.studies.Rd
no_license
schw4b/cochrane
R
false
true
390
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cochrane.R \name{parse.studies} \alias{parse.studies} \title{Reads only study data.} \usage{ parse.studies(file, path) } \arguments{ \item{file}{RevMan (.rm5) file name.} \item{path}{path where data file is located.} } \value{ data frame wit...
library(readxl) tabela <- read_excel("exercicio3.xlsx") dir.create('graficos') filhs <- tabela$filhos fams <- tabela$familia fam_fil <- sort(tabela$filhos_fam, decreasing=F) mediana <- median(fam_fil) mediana jpeg('graficos/exercicio3_graf1.jpg') plot(mediana) dev.off() getmode <- function(v) { uniqv <- unique(...
/3/3.R
permissive
Logerfo/data-science
R
false
false
463
r
library(readxl) tabela <- read_excel("exercicio3.xlsx") dir.create('graficos') filhs <- tabela$filhos fams <- tabela$familia fam_fil <- sort(tabela$filhos_fam, decreasing=F) mediana <- median(fam_fil) mediana jpeg('graficos/exercicio3_graf1.jpg') plot(mediana) dev.off() getmode <- function(v) { uniqv <- unique(...
#' @title fun_name #' #' @description kolejna funkcja podmieniona #' #' @param param fun_name #' #' #' #' @export as.Date.numeric<- function(params){ rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina", "Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka", ...
/R/as.Date.numeric.R
no_license
granatb/RapeR
R
false
false
685
r
#' @title fun_name #' #' @description kolejna funkcja podmieniona #' #' @param param fun_name #' #' #' #' @export as.Date.numeric<- function(params){ rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina", "Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka", ...
library(tidyverse) library(palmerpenguins) library(cowplot) library(magick) # Prepare the data to plot ------------------------------------------------ my_data <- penguins # Data can contain rows with missing values, so we will discard them just to facilitate the visualization rows_without_NA <- apply(X = my_d...
/penguins_plot.R
no_license
Adrian-AlvarezMolina/Posts
R
false
false
2,601
r
library(tidyverse) library(palmerpenguins) library(cowplot) library(magick) # Prepare the data to plot ------------------------------------------------ my_data <- penguins # Data can contain rows with missing values, so we will discard them just to facilitate the visualization rows_without_NA <- apply(X = my_d...
#FIXME: this package should load while loading naiveBayes package as a dependency if (!require("ramify")) { install.packages("ramify", repo=NULL, type="source") } if (!require("naiveBayes")) { install.packages("naiveBayes", repo=NULL, type="source") } if (!require("e1071")) { install.packages("e1071", repo=NULL, ...
/src/runBernoulli.R
no_license
tom3097/NaiveBayesClassifier
R
false
false
1,350
r
#FIXME: this package should load while loading naiveBayes package as a dependency if (!require("ramify")) { install.packages("ramify", repo=NULL, type="source") } if (!require("naiveBayes")) { install.packages("naiveBayes", repo=NULL, type="source") } if (!require("e1071")) { install.packages("e1071", repo=NULL, ...
#' Train a learning algorithm. #' #' Given a [Task], creates a model for the learning machine #' which can be used for predictions on new data. #' #' @template arg_learner #' @template arg_task #' @template arg_subset #' @param weights ([numeric])\cr #' Optional, non-negative case weight vector to be used during fitt...
/R/train.R
no_license
abhik2609/mlr
R
false
false
4,198
r
#' Train a learning algorithm. #' #' Given a [Task], creates a model for the learning machine #' which can be used for predictions on new data. #' #' @template arg_learner #' @template arg_task #' @template arg_subset #' @param weights ([numeric])\cr #' Optional, non-negative case weight vector to be used during fitt...
rm( list = ls( ) ) # Dependencies require( "data.table" ) require( "ggplot2" ) # dataset -- (single Nace 2 assignment) load( file = paste0( "outputData/compCases.RData"), verbose = T ) str( dta.cases ) # # , after_stat( count ) # ggplot( dta.cases, aes( mkt, colour = type ) ) + # geom_density() + # scale_x_cont...
/code/histogram_cartels_vs_mergers.R
no_license
mattia-cai/SICOMA_2020
R
false
false
1,290
r
rm( list = ls( ) ) # Dependencies require( "data.table" ) require( "ggplot2" ) # dataset -- (single Nace 2 assignment) load( file = paste0( "outputData/compCases.RData"), verbose = T ) str( dta.cases ) # # , after_stat( count ) # ggplot( dta.cases, aes( mkt, colour = type ) ) + # geom_density() + # scale_x_cont...
library(dplyr) library(ggplot2) Loan = read.csv("kiva_loans.csv", stringsAsFactors = F) location = read.csv("kiva_mpi_region_locations.csv", stringsAsFactors = F) theme = read.csv("loan_theme_ids.csv", stringsAsFactors = F) theme_region = read.csv("loan_themes_by_region.csv", stringsAsFactors = F) summary(Loan) summ...
/Analysis.R
no_license
nishant2feb/Kiva
R
false
false
1,927
r
library(dplyr) library(ggplot2) Loan = read.csv("kiva_loans.csv", stringsAsFactors = F) location = read.csv("kiva_mpi_region_locations.csv", stringsAsFactors = F) theme = read.csv("loan_theme_ids.csv", stringsAsFactors = F) theme_region = read.csv("loan_themes_by_region.csv", stringsAsFactors = F) summary(Loan) summ...
## ------------------------------------------------------------------------ x3 = function(x){ return(x^3) } y = rjmcmc::adiff(x3, c(5,6)) attr(y, "gradient") ## ------------------------------------------------------------------------ dgomp = function(t, A, b, c){ A*exp(-b*exp(-c*t)) } dbert = function(t, L, t0, k){ L...
/data/genthat_extracted_code/rjmcmc/vignettes/rjmcmcVig.R
no_license
surayaaramli/typeRrh
R
false
false
8,722
r
## ------------------------------------------------------------------------ x3 = function(x){ return(x^3) } y = rjmcmc::adiff(x3, c(5,6)) attr(y, "gradient") ## ------------------------------------------------------------------------ dgomp = function(t, A, b, c){ A*exp(-b*exp(-c*t)) } dbert = function(t, L, t0, k){ L...
\name{rolling.delta} \alias{rolling.delta} \title{Sequential stylometric analysis} \description{ Function that analyses collaborative works and tries to determine the authorship of their fragments. } \usage{ rolling.delta(gui = TRUE, path = "", primary.corpus.dir = "primary_set", secondary.corpus.dir = "secondary_set")...
/man/rolling.delta.Rd
no_license
mikekestemont/stylo
R
false
false
2,809
rd
\name{rolling.delta} \alias{rolling.delta} \title{Sequential stylometric analysis} \description{ Function that analyses collaborative works and tries to determine the authorship of their fragments. } \usage{ rolling.delta(gui = TRUE, path = "", primary.corpus.dir = "primary_set", secondary.corpus.dir = "secondary_set")...
context('accounting') ## Can't really test these functions on Travis since it depends on `qacct` test_that('accouting_read', { if(is_travis()) expect_error(accounting_read('92500'), 'error in running command') if(is_travis()) expect_error(accounting('92500'), 'error in running command') }) accounting_info <- ...
/tests/testthat/test-accounting.R
no_license
RyAMiller/sgejobs
R
false
false
1,005
r
context('accounting') ## Can't really test these functions on Travis since it depends on `qacct` test_that('accouting_read', { if(is_travis()) expect_error(accounting_read('92500'), 'error in running command') if(is_travis()) expect_error(accounting('92500'), 'error in running command') }) accounting_info <- ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lasso_estimation.R \name{goLASSO} \alias{goLASSO} \title{LASSO} \usage{ goLASSO(datafile, predDat) } \arguments{ \item{datafile}{Used for estimating model.} \item{predDat}{Used for prediction.} } \value{ List of results. } \description{ Perf...
/man/goLASSO.Rd
permissive
dnepple/tprstats
R
false
true
354
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lasso_estimation.R \name{goLASSO} \alias{goLASSO} \title{LASSO} \usage{ goLASSO(datafile, predDat) } \arguments{ \item{datafile}{Used for estimating model.} \item{predDat}{Used for prediction.} } \value{ List of results. } \description{ Perf...
#' @title Line Map Package #' @rdname linemap-package #' @name linemap-package #' @description #' Create maps made of lines. The package contains two functions: \code{\link{linemap}} and \code{\link{getgrid}}. #' #' \code{\link{linemap}} displays a map made of lines using a data frame of gridded data. #' #' \code{\link...
/R/package.R
no_license
npp2016/linemap
R
false
false
2,028
r
#' @title Line Map Package #' @rdname linemap-package #' @name linemap-package #' @description #' Create maps made of lines. The package contains two functions: \code{\link{linemap}} and \code{\link{getgrid}}. #' #' \code{\link{linemap}} displays a map made of lines using a data frame of gridded data. #' #' \code{\link...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/glance.R \name{glance.rma} \alias{glance.rma} \title{Construct a one-row summary of meta-analysis model fit statistics.} \usage{ \method{glance}{rma}(x, ...) } \arguments{ \item{x}{a meta-analysis object. Currently supports \code{rma.uni} fro...
/man/glance.rma.Rd
permissive
kylehamilton/metabroom
R
false
true
597
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/glance.R \name{glance.rma} \alias{glance.rma} \title{Construct a one-row summary of meta-analysis model fit statistics.} \usage{ \method{glance}{rma}(x, ...) } \arguments{ \item{x}{a meta-analysis object. Currently supports \code{rma.uni} fro...
library(UsingR) ### Name: blood ### Title: blood pressure readings ### Aliases: blood ### Keywords: datasets ### ** Examples data(blood) attach(blood) t.test(Machine,Expert) detach(blood)
/data/genthat_extracted_code/UsingR/examples/blood.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
195
r
library(UsingR) ### Name: blood ### Title: blood pressure readings ### Aliases: blood ### Keywords: datasets ### ** Examples data(blood) attach(blood) t.test(Machine,Expert) detach(blood)
test.pval <- c(1e-07, 3e-04, 0.1, 5e-04) test.decision.times <- seq_len(4) test.decision.times2 <- rep(4,4) test.lags <- rep(0,4) test.lags2 <- rep(4,4) test.batch.sizes <- rep(1,4) test.batch.sizes <- 4 test.df <- data.frame(id = seq_len(4), pval = test.pval, decision.times = test.decision.times) test.df2 <- data.fram...
/tests/testthat/test_LORDstar.R
no_license
dsrobertson/onlineFDR
R
false
false
3,095
r
test.pval <- c(1e-07, 3e-04, 0.1, 5e-04) test.decision.times <- seq_len(4) test.decision.times2 <- rep(4,4) test.lags <- rep(0,4) test.lags2 <- rep(4,4) test.batch.sizes <- rep(1,4) test.batch.sizes <- 4 test.df <- data.frame(id = seq_len(4), pval = test.pval, decision.times = test.decision.times) test.df2 <- data.fram...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scatterchart.R \name{Scatter} \alias{Scatter} \title{Scatter} \usage{ Scatter( x = NULL, y = NULL, scatter.x.column = 1, scatter.y.column = 2, scatter.labels = NULL, scatter.labels.name = NULL, scatter.sizes = NULL, scatter.si...
/man/Scatter.Rd
no_license
cedchin/flipStandardCharts
R
false
true
20,402
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scatterchart.R \name{Scatter} \alias{Scatter} \title{Scatter} \usage{ Scatter( x = NULL, y = NULL, scatter.x.column = 1, scatter.y.column = 2, scatter.labels = NULL, scatter.labels.name = NULL, scatter.sizes = NULL, scatter.si...
\name{R4dfp.Copy} \alias{R4dfp.Copy} \title{Copy a Loaded 4dfp MRI Image.} \author{Kevin P. Barry <ta0kira@users.berlios.de> with contributions from Avi Z. Snyder <avi@npg.wustl.edu>} \description{ Copies a loaded 4dfp MRI image into memory. } \usage{ R4dfp.Copy(object,file="") } \arguments{ \item{object}{ Object o...
/man/copy.4dfp.Rd
no_license
cran/R4dfp
R
false
false
875
rd
\name{R4dfp.Copy} \alias{R4dfp.Copy} \title{Copy a Loaded 4dfp MRI Image.} \author{Kevin P. Barry <ta0kira@users.berlios.de> with contributions from Avi Z. Snyder <avi@npg.wustl.edu>} \description{ Copies a loaded 4dfp MRI image into memory. } \usage{ R4dfp.Copy(object,file="") } \arguments{ \item{object}{ Object o...
library(dplyr) library(stringr) library(rvest) #library(saprklyr) df <- read.csv("/home/kilio/R/status10000.csv", sep = ",", header = TRUE) a <- as.character(df$time) b <- paste0(substr(a,1,4),substr(a,6,7),substr(a,9,10),substr(a,12,13)) d <- as.integer(substr(a,15,16)) df[d>=30,"id"] <- paste0(b[d>=30],"30") df[d<3...
/dataclean_trip.R
no_license
YenChia/Final_report_for_iii
R
false
false
10,052
r
library(dplyr) library(stringr) library(rvest) #library(saprklyr) df <- read.csv("/home/kilio/R/status10000.csv", sep = ",", header = TRUE) a <- as.character(df$time) b <- paste0(substr(a,1,4),substr(a,6,7),substr(a,9,10),substr(a,12,13)) d <- as.integer(substr(a,15,16)) df[d>=30,"id"] <- paste0(b[d>=30],"30") df[d<3...
library(lawstat) ### Name: mma.test ### Title: Mudholkar-McDermott-Aumont test for ordered variances for normal ### samples ### Aliases: mma.test ### Keywords: htest ### ** Examples data(pot) mma.test(pot[,"obs"], pot[,"type"], tail="left")$N ## Mudholkar et al. (1993) test (left-tailed) ## ## data: pot[, "o...
/data/genthat_extracted_code/lawstat/examples/mma.test.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
382
r
library(lawstat) ### Name: mma.test ### Title: Mudholkar-McDermott-Aumont test for ordered variances for normal ### samples ### Aliases: mma.test ### Keywords: htest ### ** Examples data(pot) mma.test(pot[,"obs"], pot[,"type"], tail="left")$N ## Mudholkar et al. (1993) test (left-tailed) ## ## data: pot[, "o...
my.clean.lipid <- function(qvec){ qvec <- qvec; # first remove A/B qvec <- gsub("/A", "", qvec, fixed = TRUE) qvec <- gsub("_A", "", qvec, fixed = TRUE) qvec <- gsub("/B", "", qvec, fixed = TRUE) qvec <- gsub("_B", "", qvec, fixed = TRUE) dash <- paste(c("-1", "-2", "_1", "_2", "_3", "_4", "_5"...
/R/util_lipid.R
permissive
xia-lab/MetaboAnalystR
R
false
false
5,720
r
my.clean.lipid <- function(qvec){ qvec <- qvec; # first remove A/B qvec <- gsub("/A", "", qvec, fixed = TRUE) qvec <- gsub("_A", "", qvec, fixed = TRUE) qvec <- gsub("/B", "", qvec, fixed = TRUE) qvec <- gsub("_B", "", qvec, fixed = TRUE) dash <- paste(c("-1", "-2", "_1", "_2", "_3", "_4", "_5"...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cluster_analysis.R \name{cluster_analysis} \alias{cluster_analysis} \title{Cluster Analysis} \usage{ cluster_analysis( data, genes, cluster, c.names = NULL, dif.exp = TRUE, s.pval = 10^-2, markers = NULL, write = TRUE, verbo...
/SingleCellSignalR/man/cluster_analysis.Rd
no_license
MaximilianLombardo/SingleCellSignalR_v1
R
false
true
1,397
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cluster_analysis.R \name{cluster_analysis} \alias{cluster_analysis} \title{Cluster Analysis} \usage{ cluster_analysis( data, genes, cluster, c.names = NULL, dif.exp = TRUE, s.pval = 10^-2, markers = NULL, write = TRUE, verbo...
## makeCacheMatrix generates a Matrix ## cacheSolve inverts a Matrix and stores it in the cache ## and gets it from there if the same data are called again ## mmatrix <- matrix(rnorm(size^2), nrow=size, ncol=size) ## smatrix <- makeCacheMatrix(mmatrix) ## create the invert matrix ## invmatrix <- cacheSolve(smatri...
/cachematrix.R
no_license
beeekey/ProgrammingAssignment2
R
false
false
1,796
r
## makeCacheMatrix generates a Matrix ## cacheSolve inverts a Matrix and stores it in the cache ## and gets it from there if the same data are called again ## mmatrix <- matrix(rnorm(size^2), nrow=size, ncol=size) ## smatrix <- makeCacheMatrix(mmatrix) ## create the invert matrix ## invmatrix <- cacheSolve(smatri...
############################################################################################# # functions to conduct emprical cross entropy calculations # these functions are a reworking of Danial Ramos' ECE functions for Matlab # (c) David Lucy 22 June 2010 # uses the gpava() function from the isotone() package as a c...
/comparison/R/calc.ece.r
no_license
ingted/R-Examples
R
false
false
2,437
r
############################################################################################# # functions to conduct emprical cross entropy calculations # these functions are a reworking of Danial Ramos' ECE functions for Matlab # (c) David Lucy 22 June 2010 # uses the gpava() function from the isotone() package as a c...
mers<-read.csv('cases.csv') head(mers) class(mers$onset) mers$hospitalized[890]<-c('2015-02-20') mers<-mers[-471,] library(lubridate) mers$onset2<-ymd(mers$onset) mers$hospitalized2<-ymd(mers$hospitalized) class(mers$onset2) day0<-min(na.omit(mers$onset2)) #Question 1: You use the function na.omit to remove the data po...
/mers-5-13-19.R
no_license
abp36673/IDEAs-Computational-Workshop
R
false
false
5,123
r
mers<-read.csv('cases.csv') head(mers) class(mers$onset) mers$hospitalized[890]<-c('2015-02-20') mers<-mers[-471,] library(lubridate) mers$onset2<-ymd(mers$onset) mers$hospitalized2<-ymd(mers$hospitalized) class(mers$onset2) day0<-min(na.omit(mers$onset2)) #Question 1: You use the function na.omit to remove the data po...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paws.ec2_operations.R \name{describe_vpc_endpoint_services} \alias{describe_vpc_endpoint_services} \title{Describes available services to which you can create a VPC endpoint} \usage{ describe_vpc_endpoint_services(DryRun = NULL, ServiceNames ...
/service/paws.ec2/man/describe_vpc_endpoint_services.Rd
permissive
CR-Mercado/paws
R
false
true
1,578
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paws.ec2_operations.R \name{describe_vpc_endpoint_services} \alias{describe_vpc_endpoint_services} \title{Describes available services to which you can create a VPC endpoint} \usage{ describe_vpc_endpoint_services(DryRun = NULL, ServiceNames ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LinfK_scatterhist.R \name{LinfK_scatterhist} \alias{LinfK_scatterhist} \title{Link/K scatterplot of bootstrapping results} \usage{ LinfK_scatterhist(res, Linf.breaks = "Sturges", K.breaks = "Sturges", gridsize = rep(151, 2), H = NULL, shadi...
/man/LinfK_scatterhist.Rd
no_license
PachoAlvarez/fishboot
R
false
true
2,915
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LinfK_scatterhist.R \name{LinfK_scatterhist} \alias{LinfK_scatterhist} \title{Link/K scatterplot of bootstrapping results} \usage{ LinfK_scatterhist(res, Linf.breaks = "Sturges", K.breaks = "Sturges", gridsize = rep(151, 2), H = NULL, shadi...
#' @importFrom glmnet glmnet #' @noRd #' @keywords internal ridge_betas <- function(X, Y, penalty_factor=rep(1:ncol(X)), lambda=.01) { fit <- glmnet::glmnet(X, Y, penalty.factor=penalty_factor, alpha=0,lambda=lambda) coef(fit)[,1,drop=FALSE] } #' @importFrom pls plsr #' @noRd pls_betas <- function(X, Y, ncomp=3...
/R/fmri_betas.R
no_license
bbuchsbaum/fmrireg
R
false
false
19,507
r
#' @importFrom glmnet glmnet #' @noRd #' @keywords internal ridge_betas <- function(X, Y, penalty_factor=rep(1:ncol(X)), lambda=.01) { fit <- glmnet::glmnet(X, Y, penalty.factor=penalty_factor, alpha=0,lambda=lambda) coef(fit)[,1,drop=FALSE] } #' @importFrom pls plsr #' @noRd pls_betas <- function(X, Y, ncomp=3...
## AUTHOR: Marta Blanco ## DATE: May 8, 2017 ## Project: Lesson 6 ## In this exercise I query for industrial railways, perform a 1000m buffer, ## find intersections of cities in the buffer, create a summary plot, provide ## necessary information on the intersecting cities, and provide a well ## documented script on G...
/Lesson 5/main.R
no_license
martabc/Geoscripting
R
false
false
2,025
r
## AUTHOR: Marta Blanco ## DATE: May 8, 2017 ## Project: Lesson 6 ## In this exercise I query for industrial railways, perform a 1000m buffer, ## find intersections of cities in the buffer, create a summary plot, provide ## necessary information on the intersecting cities, and provide a well ## documented script on G...
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = c(NaN, NaN, 6.4633974096058e+286, 1.94893964229134e+289, NaN, NaN, NaN, NaN, NaN, NaN, 6.53867576132537e+286, 0), temp = -Inf, u = numeric(0)) result <- do.call(meteor:::E_Penman,testlist) s...
/meteor/inst/testfiles/E_Penman/libFuzzer_E_Penman/E_Penman_valgrind_files/1612738895-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
330
r
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = c(NaN, NaN, 6.4633974096058e+286, 1.94893964229134e+289, NaN, NaN, NaN, NaN, NaN, NaN, 6.53867576132537e+286, 0), temp = -Inf, u = numeric(0)) result <- do.call(meteor:::E_Penman,testlist) s...
#' Get FST from genotypes #' #' Takes a matrix genotypes as input and calculates FST (Weir and Cockerham 1984) #' over all populations in the input data. Options to report per SNP #' or whole region FST value, as well as extended output #' of individual terms for estimates #' #' @param gt genotype matrix, dimensions SN...
/R/fstats.R
no_license
martinsikora/admixr
R
false
false
15,988
r
#' Get FST from genotypes #' #' Takes a matrix genotypes as input and calculates FST (Weir and Cockerham 1984) #' over all populations in the input data. Options to report per SNP #' or whole region FST value, as well as extended output #' of individual terms for estimates #' #' @param gt genotype matrix, dimensions SN...
#' execute_atlantis function #' #' This function calls the terminal and executes an Atlantis model #' @param atlantis_location location of atlantis file (location may not #' have spaces (e.g. not C:/Desktop/John Doe/bgm)) #' @param atlantis_exe name of Atlantis executable file (typically atlantismain but #' may differ ...
/R/execute_atlantis.R
no_license
slucey/ratlantis
R
false
false
2,904
r
#' execute_atlantis function #' #' This function calls the terminal and executes an Atlantis model #' @param atlantis_location location of atlantis file (location may not #' have spaces (e.g. not C:/Desktop/John Doe/bgm)) #' @param atlantis_exe name of Atlantis executable file (typically atlantismain but #' may differ ...
##' @export coef.cumres <- function(object,...) { res <- with(object, data.frame(KS, CvM)) colnames(res) <- c("p-value(Sup)", "p-value(L2)") rownames(res) <- object$variable res }
/R-package/gof/R/coef.R
permissive
kkholst/target
R
false
false
196
r
##' @export coef.cumres <- function(object,...) { res <- with(object, data.frame(KS, CvM)) colnames(res) <- c("p-value(Sup)", "p-value(L2)") rownames(res) <- object$variable res }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/block_articles.R \name{article} \alias{article} \title{Specify the components of an article} \usage{ article(image = NULL, title = NULL, content = NULL, link = NULL) } \arguments{ \item{image}{An optional URL pointing to an image resource.} ...
/man/article.Rd
permissive
hdykiel/blastula
R
false
true
1,158
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/block_articles.R \name{article} \alias{article} \title{Specify the components of an article} \usage{ article(image = NULL, title = NULL, content = NULL, link = NULL) } \arguments{ \item{image}{An optional URL pointing to an image resource.} ...
# Author: David Black # Date: Jan '20 # GUI that reads and cleans APS, Nano scan, and ELPI data # Produces the raw (APS and Nano scan) or normalized (ELPI) data # Generates total concentration, median size, particle size distribution, and # relative frequency plots # Animates the particle size distribution ...
/Aerosol App/Composite_Data GUI_1_4.R
no_license
blackdp1/Apps
R
false
false
37,236
r
# Author: David Black # Date: Jan '20 # GUI that reads and cleans APS, Nano scan, and ELPI data # Produces the raw (APS and Nano scan) or normalized (ELPI) data # Generates total concentration, median size, particle size distribution, and # relative frequency plots # Animates the particle size distribution ...
# To give you more choices, I've added another item in the assignment. You need to answer and submit just 5 questions among these: # # # 1. Define an R function that removes NA values from a vector. x<-c(1,NA,3,4,5,NA) remove_na=function(d){d[!is.na(d)]} remove_na(x) # 2. Define an R function that computes the fa...
/Julie-San_Zoilo_MP.R
no_license
aParticularCode/ComputingForAnalytics
R
false
false
3,968
r
# To give you more choices, I've added another item in the assignment. You need to answer and submit just 5 questions among these: # # # 1. Define an R function that removes NA values from a vector. x<-c(1,NA,3,4,5,NA) remove_na=function(d){d[!is.na(d)]} remove_na(x) # 2. Define an R function that computes the fa...
################################################################################ # Test for the PredictorROutput Class ################################################################################ ################################################################################ # External dependencies ##############...
/test/PredictoROutput_test.R
permissive
htssouza/predictoR
R
false
false
1,357
r
################################################################################ # Test for the PredictorROutput Class ################################################################################ ################################################################################ # External dependencies ##############...
spatiotemporal.covariance <- function(geo.dist,time.dist,alpha,nu,zeta){ d <- 2 # two spatial dimensions return( exp( d/2 * log(pi) + d * log(alpha) - ( (nu + zeta*time.dist - 1)*log(2) + gsl::lngamma(nu + zeta*time.dist + d/2) ) + ...
/datasets/HumanData/analyses/old/nontemporal/spatial/k_2/SpaceTimeStructureMix.R
no_license
gbradburd/spatialStructure
R
false
false
36,683
r
spatiotemporal.covariance <- function(geo.dist,time.dist,alpha,nu,zeta){ d <- 2 # two spatial dimensions return( exp( d/2 * log(pi) + d * log(alpha) - ( (nu + zeta*time.dist - 1)*log(2) + gsl::lngamma(nu + zeta*time.dist + d/2) ) + ...
################################################################################ # Looking more into NPPA-correlated genes # Load this volcano by execyting ..geneCorrelationsOfInterest.. file, or # directly load this volcano CURRENT_GENE='ENSG00000175206:NPPA' CURRENT_DATASET="ROOIJonly.sp.bt_RID2l" load(file = past...
/Projects/HCM_SCS_bigdatval/2022_10_NppaRelGenes.R
no_license
vanrooij-lab/scRNAseq-HCM-human
R
false
false
7,315
r
################################################################################ # Looking more into NPPA-correlated genes # Load this volcano by execyting ..geneCorrelationsOfInterest.. file, or # directly load this volcano CURRENT_GENE='ENSG00000175206:NPPA' CURRENT_DATASET="ROOIJonly.sp.bt_RID2l" load(file = past...
## Matrix inversion can be a costly computation. ## These functions will cache the inverse of a matrix instead of than computing it repeatedly. ## This function creates a special "matrix" object, which can cache its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y...
/cachematrix.R
no_license
kacollins12/ProgrammingAssignment2
R
false
false
997
r
## Matrix inversion can be a costly computation. ## These functions will cache the inverse of a matrix instead of than computing it repeatedly. ## This function creates a special "matrix" object, which can cache its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y...
library(data.table) library(stringr) df <- fread(file = "kindle_reviews.csv") df_s <- df[sample(nrow(df), 10000)] df_s$helpful_a = numeric(10000) for(i in 1:nrow(df_s)){ temp <- str_split(str_remove_all(df_s[i,]$helpful, "[^a-zA-Z|0-9|,]"), ',', simplify = TRUE) if(as.integer(temp[,2]) != 0){ df_s[i...
/helpfulness.R
no_license
t-aoyam/ANLY511-Final
R
false
false
427
r
library(data.table) library(stringr) df <- fread(file = "kindle_reviews.csv") df_s <- df[sample(nrow(df), 10000)] df_s$helpful_a = numeric(10000) for(i in 1:nrow(df_s)){ temp <- str_split(str_remove_all(df_s[i,]$helpful, "[^a-zA-Z|0-9|,]"), ',', simplify = TRUE) if(as.integer(temp[,2]) != 0){ df_s[i...
#' Convert between Hz and Barks. #' #' Use \code{bark()} to convert Hz into Barks. Use \code{hz()} to convert Barks #' back into Hz. Both of these functions are based on the formula provided #' Traunmüller (1990). #' #' @section Note: Because the Traunmüller's formula is not especially precise #' (especially because ...
/R/bark_and_hz.R
permissive
JoeyStanley/barktools
R
false
false
2,408
r
#' Convert between Hz and Barks. #' #' Use \code{bark()} to convert Hz into Barks. Use \code{hz()} to convert Barks #' back into Hz. Both of these functions are based on the formula provided #' Traunmüller (1990). #' #' @section Note: Because the Traunmüller's formula is not especially precise #' (especially because ...
# This is a code for Assignment 4 in Getting and Cleaning Data course # # #The data set is found at: https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip # It contains the following files: # 'README.txt' # # - 'features_info.txt': Shows information about the ...
/run_analysis.R
no_license
janinaf/ProgrammingAssignment4
R
false
false
5,079
r
# This is a code for Assignment 4 in Getting and Cleaning Data course # # #The data set is found at: https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip # It contains the following files: # 'README.txt' # # - 'features_info.txt': Shows information about the ...
#' @title Filter: Time Period #' @description Function to filter eventlog using a time period. #' @param eventlog The event log to be used. An object of class #' \code{eventlog}. #' @param start_point Start timestamp of the time period. This should be a date object. #' @param end_point End timestamp of the time pe...
/edeaR/R/filter_time_period.R
no_license
ingted/R-Examples
R
false
false
4,846
r
#' @title Filter: Time Period #' @description Function to filter eventlog using a time period. #' @param eventlog The event log to be used. An object of class #' \code{eventlog}. #' @param start_point Start timestamp of the time period. This should be a date object. #' @param end_point End timestamp of the time pe...
library(datasets) head(iris) summary(iris) plot(iris) cat("\014") install.packages("pacman") require(pacman) library(pacman) pacman::p_load(pacman,dplyr,GGally,ggplot2, ggthemes,ggvis,httr,lubridate,plotly, rio,rmarkdown,shiny,stringr,tidyr) library(datasets) p_unload(dpylr,tidyr,stri...
/file1.R
no_license
yassin2021/testing
R
false
false
2,203
r
library(datasets) head(iris) summary(iris) plot(iris) cat("\014") install.packages("pacman") require(pacman) library(pacman) pacman::p_load(pacman,dplyr,GGally,ggplot2, ggthemes,ggvis,httr,lubridate,plotly, rio,rmarkdown,shiny,stringr,tidyr) library(datasets) p_unload(dpylr,tidyr,stri...
# Plot Henry waterlevel data with precipitation data from nearest NOAA weather station # modified example to show summary of only large events -- in same graph as water table data # # @purpose: Show use of two new experimental soilDB-type functions for the NOAA API # # - get_NOAA_stations_nearXY() - find al...
/misc/noaa-henry-bigevent.R
no_license
ncss-tech/soilDB
R
false
false
8,065
r
# Plot Henry waterlevel data with precipitation data from nearest NOAA weather station # modified example to show summary of only large events -- in same graph as water table data # # @purpose: Show use of two new experimental soilDB-type functions for the NOAA API # # - get_NOAA_stations_nearXY() - find al...
context('Remove taxa') library(taxonomyCleanr) # Parameterize ---------------------------------------------------------------- data <- data.table::fread( file = system.file('test_data.txt', package = 'taxonomyCleanr'), fill = TRUE, blank.lines.skip = TRUE ) path <- system.file('test_data.txt', package = 'taxono...
/tests/testthat/test_remove_taxa.R
permissive
EDIorg/taxonomyCleanr
R
false
false
1,796
r
context('Remove taxa') library(taxonomyCleanr) # Parameterize ---------------------------------------------------------------- data <- data.table::fread( file = system.file('test_data.txt', package = 'taxonomyCleanr'), fill = TRUE, blank.lines.skip = TRUE ) path <- system.file('test_data.txt', package = 'taxono...
#' \code{Require} options #' #' These provide top-level, powerful settings for a comprehensive #' reproducible workflow. To see defaults, run \code{RequireOptions()}. #' See Details below. #' #' @export #' @details #' #' Below are options that can be set with \code{options("Require.xxx" = newValue)}, #' where \code{xxx...
/R/RequireOptions.R
no_license
jimsforks/Require
R
false
false
4,210
r
#' \code{Require} options #' #' These provide top-level, powerful settings for a comprehensive #' reproducible workflow. To see defaults, run \code{RequireOptions()}. #' See Details below. #' #' @export #' @details #' #' Below are options that can be set with \code{options("Require.xxx" = newValue)}, #' where \code{xxx...
library(OptimalCutpoints) ### Name: plot.optimal.cutpoints ### Title: Default optimal.cutpoints plotting ### Aliases: plot.optimal.cutpoints ### ** Examples library(OptimalCutpoints) data(elas) ########################################################### # Youden Index method ("Youden"): Covariate gender ###########...
/data/genthat_extracted_code/OptimalCutpoints/examples/plot.optimal.cutpoints.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
828
r
library(OptimalCutpoints) ### Name: plot.optimal.cutpoints ### Title: Default optimal.cutpoints plotting ### Aliases: plot.optimal.cutpoints ### ** Examples library(OptimalCutpoints) data(elas) ########################################################### # Youden Index method ("Youden"): Covariate gender ###########...
# This is an RStudio Addin that provides a field-based viewer of # nearest neighbor relationships # Suppress CMD CHECK notes for things that look like global vars utils::globalVariables( c('.csd_path', '.export_path')) #' Spatial map viewer addin #' #' This function starts a GUI which allows you to select a `Consol...
/R/spatial_map_viewer_addin.R
permissive
iceberg22/phenoptrReports
R
false
false
6,774
r
# This is an RStudio Addin that provides a field-based viewer of # nearest neighbor relationships # Suppress CMD CHECK notes for things that look like global vars utils::globalVariables( c('.csd_path', '.export_path')) #' Spatial map viewer addin #' #' This function starts a GUI which allows you to select a `Consol...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/kolm.R \name{kolm} \alias{kolm} \title{Kolm's inequality index} \usage{ kolm( x, w = rep(1, length(x)), eta = 1, data = NULL, absolute = FALSE, na.rm = TRUE ) } \arguments{ \item{x}{a numerical vector whose index is to be estimate...
/man/kolm.Rd
no_license
mjantti/incdist
R
false
true
1,079
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/kolm.R \name{kolm} \alias{kolm} \title{Kolm's inequality index} \usage{ kolm( x, w = rep(1, length(x)), eta = 1, data = NULL, absolute = FALSE, na.rm = TRUE ) } \arguments{ \item{x}{a numerical vector whose index is to be estimate...
library(FinCal) ### Name: iss ### Title: calculate the net increase in common shares from the potential ### exercise of stock options or warrants ### Aliases: iss ### ** Examples iss(amp=20,ep=15,n=10000)
/data/genthat_extracted_code/FinCal/examples/iss.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
214
r
library(FinCal) ### Name: iss ### Title: calculate the net increase in common shares from the potential ### exercise of stock options or warrants ### Aliases: iss ### ** Examples iss(amp=20,ep=15,n=10000)
/DevendraPrasat Thiagarajan_Job Recommendation Engine.R
no_license
devaprasat/My-repos
R
false
false
8,488
r
rm(list = objects()) ls() library(janitor) library(tidyverse) library(tidylog) library(readr) library(data.table) library(rrBLUP) library(broom) ##### Set up work space #### #### Theme set custom_theme <- theme_minimal() %+replace% theme( axis.title = element_text( colour = "black", size = rel(2) ...
/HypothesisTwelve.R
no_license
megzcalvert/AMtoo
R
false
false
22,207
r
rm(list = objects()) ls() library(janitor) library(tidyverse) library(tidylog) library(readr) library(data.table) library(rrBLUP) library(broom) ##### Set up work space #### #### Theme set custom_theme <- theme_minimal() %+replace% theme( axis.title = element_text( colour = "black", size = rel(2) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/shapeconnect.R \name{get_connect} \alias{get_connect} \title{Calculate connectivity index} \usage{ get_connect(lsc, alpha, cell_size) } \arguments{ \item{lsc}{Landscape raster with habitat and matrix cells. Habitat cells are marked by integer...
/man/get_connect.Rd
no_license
FelixMay/shapeconnect
R
false
true
1,517
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/shapeconnect.R \name{get_connect} \alias{get_connect} \title{Calculate connectivity index} \usage{ get_connect(lsc, alpha, cell_size) } \arguments{ \item{lsc}{Landscape raster with habitat and matrix cells. Habitat cells are marked by integer...
# Making BoxPlot of the results about 46 leaves samples in figure 11 library(reshape2) library(ggplot2) library(readr) setwd("C:/Users/49688/Documents/simulation/pycharm/Janes") Names <- c("Cospeciation","Duplication","Switch","Sorting","Groups") eventName = c("Events","Differences", "Conditions") mName <- c("Conditio...
/BoxPlot46.R
no_license
redddlion/MasterProject
R
false
false
3,191
r
# Making BoxPlot of the results about 46 leaves samples in figure 11 library(reshape2) library(ggplot2) library(readr) setwd("C:/Users/49688/Documents/simulation/pycharm/Janes") Names <- c("Cospeciation","Duplication","Switch","Sorting","Groups") eventName = c("Events","Differences", "Conditions") mName <- c("Conditio...
library("shiny") library("shinydashboard") library('stringr') library('shinyBS') library("zoo") library("dplyr") library("lubridate") library("DT") library("utils") library("highcharter") library("corrplot") AAPL <- read.csv("AAPL.csv") AMZN <- read.csv("AMZN.csv") FB <- read.csv("FB.csv") GOOG <-read.csv("GOOG.csv"...
/ui.R
no_license
iamjmehdi/R-Data-Analysis
R
false
false
2,651
r
library("shiny") library("shinydashboard") library('stringr') library('shinyBS') library("zoo") library("dplyr") library("lubridate") library("DT") library("utils") library("highcharter") library("corrplot") AAPL <- read.csv("AAPL.csv") AMZN <- read.csv("AMZN.csv") FB <- read.csv("FB.csv") GOOG <-read.csv("GOOG.csv"...
## The following two functions are used to create a special object ## that stores a matrix and caches its inverse. ## This function creates a special "matrix" object that can cache ## its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get...
/cachematrix.R
no_license
KK0h/ProgrammingAssignment2
R
false
false
995
r
## The following two functions are used to create a special object ## that stores a matrix and caches its inverse. ## This function creates a special "matrix" object that can cache ## its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get...
testlist <- list(testX = c(191493125665849920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), trainX ...
/dann/inst/testfiles/calc_distance_C/AFL_calc_distance_C/calc_distance_C_valgrind_files/1609867303-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
1,199
r
testlist <- list(testX = c(191493125665849920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), trainX ...
## There will be a pair of functions that cache the inverse of a matrix. ## In particular, it allows use to calculate in inverse of a matrix and ## store it in the cache, so that in the case of multiple uses, ## the computation will be faster and take less space on the RAM. ## makeCacheMatrix creates a special "matri...
/cachematrix.R
no_license
mindmui/ProgrammingAssignment2
R
false
false
1,251
r
## There will be a pair of functions that cache the inverse of a matrix. ## In particular, it allows use to calculate in inverse of a matrix and ## store it in the cache, so that in the case of multiple uses, ## the computation will be faster and take less space on the RAM. ## makeCacheMatrix creates a special "matri...
#' Sum of all Use Reports (UR) for all species #' #' Calculates the sum of all ethnobotany use reports (UR) for all species, a common metric for ethnobotany studies. #' @usage URsum(data) #' #' @references #' Prance, G. T., W. Balee, B. M. Boom, and R. L. Carneiro. 1987. “Quantitative Ethnobotany and the Case for Co...
/R/URsum.R
no_license
CWWhitney/ethnobotanyR
R
false
false
2,827
r
#' Sum of all Use Reports (UR) for all species #' #' Calculates the sum of all ethnobotany use reports (UR) for all species, a common metric for ethnobotany studies. #' @usage URsum(data) #' #' @references #' Prance, G. T., W. Balee, B. M. Boom, and R. L. Carneiro. 1987. “Quantitative Ethnobotany and the Case for Co...
#Load dependencies load.libraries <- c('dplyr','ggplot2','readr','mice','Hmisc','missForest','xgboost', 'dummies','randomForest','Metrics','rpart','caret') install.lib <- load.libraries[!load.libraries %in% installed.packages()] for (libs in install.lib) install.packages(libs,dependencies = TRUE) sa...
/Script-Caret.R
no_license
guitarremote/kaggle-house-prices
R
false
false
11,954
r
#Load dependencies load.libraries <- c('dplyr','ggplot2','readr','mice','Hmisc','missForest','xgboost', 'dummies','randomForest','Metrics','rpart','caret') install.lib <- load.libraries[!load.libraries %in% installed.packages()] for (libs in install.lib) install.packages(libs,dependencies = TRUE) sa...
source('scDataAnalysis_Utilities.R') mtx1 = readRDS('data/filtered_matrix/PBMC10k_filtered_mat.rds') ## run part3 of prepData.R to generate it args = commandArgs(T) frac_veg = as.numeric(args[1]) cost_time1 = system.time(seurat.tmp <- doBasicSeurat_new(mtx1, top_variable_features = frac_veg, ...
/compare2seurat_correct.R
no_license
wbaopaul/scATAC-pro_paper
R
false
false
2,363
r
source('scDataAnalysis_Utilities.R') mtx1 = readRDS('data/filtered_matrix/PBMC10k_filtered_mat.rds') ## run part3 of prepData.R to generate it args = commandArgs(T) frac_veg = as.numeric(args[1]) cost_time1 = system.time(seurat.tmp <- doBasicSeurat_new(mtx1, top_variable_features = frac_veg, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dirichlet_process_mvnormal2.R \name{DirichletProcessMvnormal2} \alias{DirichletProcessMvnormal2} \title{Create a Dirichlet mixture of multivariate normal distributions with semi-conjugate prior.} \usage{ DirichletProcessMvnormal2(y, g0Priors,...
/man/DirichletProcessMvnormal2.Rd
no_license
cran/dirichletprocess
R
false
true
620
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dirichlet_process_mvnormal2.R \name{DirichletProcessMvnormal2} \alias{DirichletProcessMvnormal2} \title{Create a Dirichlet mixture of multivariate normal distributions with semi-conjugate prior.} \usage{ DirichletProcessMvnormal2(y, g0Priors,...
FullDataset <- read.table("/Volumes/Files /Coursera/Data Science /EDA/household_power_consumption.txt",header=T, sep=';', na.strings="?", + nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') subSetData <- FullDataset[FullDataset$Date %in% c("1/2/2007","2/2/2007") ...
/plot3.R
no_license
Ahmed0028/Exploratory-Data-Analysis-EDA-.CourseProject1
R
false
false
982
r
FullDataset <- read.table("/Volumes/Files /Coursera/Data Science /EDA/household_power_consumption.txt",header=T, sep=';', na.strings="?", + nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') subSetData <- FullDataset[FullDataset$Date %in% c("1/2/2007","2/2/2007") ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/ecotoxicology.R \name{IsMonotonicallyIncreasing} \alias{IsMonotonicallyIncreasing} \title{Determine if a series is monotonically increasing} \usage{ IsMonotonicallyIncreasing(p) } \arguments{ \item{p}{numeric vector} } \value{ True is...
/man/IsMonotonicallyIncreasing.Rd
no_license
cran/ecotoxicology
R
false
false
1,141
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/ecotoxicology.R \name{IsMonotonicallyIncreasing} \alias{IsMonotonicallyIncreasing} \title{Determine if a series is monotonically increasing} \usage{ IsMonotonicallyIncreasing(p) } \arguments{ \item{p}{numeric vector} } \value{ True is...
library(tidyverse) library(keras) library(tensorflow) setwd("C:/Users/Owen/Dropbox/Analysis/Database/Digit Recognizer") train<-data.matrix(read_csv("train.csv")) test<-data.matrix(read_csv("test.csv")) dim(train) dim(test) colnames(train) train[,1] %>% table() %>% barplot(col=1:10) train[4,-1] %>% matrix(nrow=sq...
/DRKerasFinal.R
no_license
couyang24/DigitRecognizer
R
false
false
2,909
r
library(tidyverse) library(keras) library(tensorflow) setwd("C:/Users/Owen/Dropbox/Analysis/Database/Digit Recognizer") train<-data.matrix(read_csv("train.csv")) test<-data.matrix(read_csv("test.csv")) dim(train) dim(test) colnames(train) train[,1] %>% table() %>% barplot(col=1:10) train[4,-1] %>% matrix(nrow=sq...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/yingtools2.R \name{age.years} \alias{age.years} \title{Age in years} \usage{ age.years(bdate, now) } \arguments{ \item{bdate}{\code{Date}, vector of birthdays.} \item{now, }{\code{Date}, vector representing the time by which to calculate age...
/man/age.years.Rd
no_license
ying14/yingtools2
R
false
true
639
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/yingtools2.R \name{age.years} \alias{age.years} \title{Age in years} \usage{ age.years(bdate, now) } \arguments{ \item{bdate}{\code{Date}, vector of birthdays.} \item{now, }{\code{Date}, vector representing the time by which to calculate age...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prop.R \name{prop} \alias{prop} \title{Proportion of an alternative distribution} \usage{ prop( bin, weights = NULL, sort = NULL, years = NULL, breakdown = NULL, design = NULL, cluster = NULL, data = NULL, var = NULL, alph...
/man/prop.Rd
no_license
aalfons/laeken
R
false
true
5,853
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prop.R \name{prop} \alias{prop} \title{Proportion of an alternative distribution} \usage{ prop( bin, weights = NULL, sort = NULL, years = NULL, breakdown = NULL, design = NULL, cluster = NULL, data = NULL, var = NULL, alph...
#load the libraries library(dplyr) library(lubridate) # set the download location fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata/data/household_power_consumption.zip" #create a temporary file temp <- tempfile() #download the file download.file(fileUrl,temp, method="curl") #read the data hpc <- read.csv(un...
/plot3.R
no_license
chahidazarkan/ExData_Plotting1
R
false
false
1,577
r
#load the libraries library(dplyr) library(lubridate) # set the download location fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata/data/household_power_consumption.zip" #create a temporary file temp <- tempfile() #download the file download.file(fileUrl,temp, method="curl") #read the data hpc <- read.csv(un...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/OData.R \name{retrieveData} \alias{retrieveData} \title{Retrieve data as list from a dataset} \usage{ retrieveData(url) } \arguments{ \item{url}{URL to dataset (needs to include $format=json as parameter)} } \value{ Data from the ...
/man/retrieveData.Rd
no_license
cran/OData
R
false
true
529
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/OData.R \name{retrieveData} \alias{retrieveData} \title{Retrieve data as list from a dataset} \usage{ retrieveData(url) } \arguments{ \item{url}{URL to dataset (needs to include $format=json as parameter)} } \value{ Data from the ...
theme_ts <- theme(panel.border = element_rect(fill = NA, colour = "grey10"), panel.background = element_blank(), panel.grid.minor = element_line(colour = "grey85"), panel.grid.major = element_line(colour = "grey85"), ...
/Scripts/Forecast/utiles/theme_ts.R
no_license
DanielRZapataS/Demanda_transaccional
R
false
false
1,000
r
theme_ts <- theme(panel.border = element_rect(fill = NA, colour = "grey10"), panel.background = element_blank(), panel.grid.minor = element_line(colour = "grey85"), panel.grid.major = element_line(colour = "grey85"), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllGenerics.R, R/correlationPlot-methods.R \name{correlationPlot} \alias{correlationPlot} \alias{correlationPlot,INSPEcT_model,INSPEcT-method} \title{Display rate classification performance} \usage{ correlationPlot(object, object2, plot = TRU...
/man/correlationPlot.Rd
no_license
ste-depo/INSPEcT
R
false
true
790
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllGenerics.R, R/correlationPlot-methods.R \name{correlationPlot} \alias{correlationPlot} \alias{correlationPlot,INSPEcT_model,INSPEcT-method} \title{Display rate classification performance} \usage{ correlationPlot(object, object2, plot = TRU...
add2 <- function(x,y){ x+y } above10 < function(x){ use <- x>10 x[use] } above <- function(x,n=10){ # setting equal in function def creates defaults use <- x > n x[use] } columnmean <- function(y, removeNA=TRUE){ nc <- ncol(y) means <- numeric(nc) for(i in nc){ means[i] <...
/01_Getting_Started_And_R_Nuts_And_Bolts/week2.R
no_license
danbowden/datasciencecoursera
R
false
false
389
r
add2 <- function(x,y){ x+y } above10 < function(x){ use <- x>10 x[use] } above <- function(x,n=10){ # setting equal in function def creates defaults use <- x > n x[use] } columnmean <- function(y, removeNA=TRUE){ nc <- ncol(y) means <- numeric(nc) for(i in nc){ means[i] <...
# Created by Matthew A. Birk # Calculates the geometric mean of a vector geom_mean=function(x,add0.001=FALSE,ignore_neg=FALSE,...){ if(ignore_neg==TRUE) x=x[x>=0] if(add0.001==TRUE) exp(mean(log(x+0.001),...)) else exp(mean(log(x),...)) }
/birk_1.2/R/geom_mean.R
no_license
matthewabirk/birk
R
false
false
244
r
# Created by Matthew A. Birk # Calculates the geometric mean of a vector geom_mean=function(x,add0.001=FALSE,ignore_neg=FALSE,...){ if(ignore_neg==TRUE) x=x[x>=0] if(add0.001==TRUE) exp(mean(log(x+0.001),...)) else exp(mean(log(x),...)) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/main_funcs.R \name{balancer_att} \alias{balancer_att} \title{Balancing weights for ATT (in subgroups)} \usage{ balancer_att(X, trt, y = NULL, weightfunc, weightfunc_ptr, proxfunc, balancefunc, lambda = NULL, nlambda = 20, lambda.min.ratio =...
/man/balancer_att.Rd
no_license
benjilu/balancer
R
false
true
1,700
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/main_funcs.R \name{balancer_att} \alias{balancer_att} \title{Balancing weights for ATT (in subgroups)} \usage{ balancer_att(X, trt, y = NULL, weightfunc, weightfunc_ptr, proxfunc, balancefunc, lambda = NULL, nlambda = 20, lambda.min.ratio =...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllGenerics.R, R/ridgeplot.R \name{ridgeplot} \alias{ridgeplot} \alias{ridgeplot,gseaResult-method} \alias{ridgeplot.gseaResult} \title{ridgeplot} \usage{ ridgeplot( x, showCategory = 30, fill = "p.adjust", core_enrichment = TRUE, l...
/man/ridgeplot.Rd
no_license
MatthieuRouland/enrichplot
R
false
true
1,136
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllGenerics.R, R/ridgeplot.R \name{ridgeplot} \alias{ridgeplot} \alias{ridgeplot,gseaResult-method} \alias{ridgeplot.gseaResult} \title{ridgeplot} \usage{ ridgeplot( x, showCategory = 30, fill = "p.adjust", core_enrichment = TRUE, l...
#' Make cluster level plot #' #' @import ggplot2 #' @import gridExtra #' @export saveClusterPlot <- function(myPlot) { pdf("~/Desktop/cluster_plot.pdf", height = 7, width = 15) print(myPlot) dev.off() } make_sQTL_cluster_plot <- function( cluster_to_plot, main_title = NA, exons_table = NULL, vcf = NULL,...
/R/make_sQTL_cluster_plot.R
no_license
rmccoy7541/sqtlviztools
R
false
false
22,543
r
#' Make cluster level plot #' #' @import ggplot2 #' @import gridExtra #' @export saveClusterPlot <- function(myPlot) { pdf("~/Desktop/cluster_plot.pdf", height = 7, width = 15) print(myPlot) dev.off() } make_sQTL_cluster_plot <- function( cluster_to_plot, main_title = NA, exons_table = NULL, vcf = NULL,...
testlist <- list(a = 0L, b = 0L, x = c(-65536L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, ...
/grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610388351-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
398
r
testlist <- list(a = 0L, b = 0L, x = c(-65536L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, ...
library('readr') library('dplyr') library('lubridate') library('reshape2') library('SPEI') library('xts') source('xhcn_data_reduction.R') get_spei <- function(cwdiff, freq=12, int_per=6, plot=TRUE){ # Helper function to calculate spei # This comes from my climate tools repo on github # Get start date ...
/bin/xhcn_calculate_values.R
no_license
yangxhcaf/droughtnet_precipsens_ecolets
R
false
false
17,919
r
library('readr') library('dplyr') library('lubridate') library('reshape2') library('SPEI') library('xts') source('xhcn_data_reduction.R') get_spei <- function(cwdiff, freq=12, int_per=6, plot=TRUE){ # Helper function to calculate spei # This comes from my climate tools repo on github # Get start date ...
library(ggplot2) library(reshape2) library(plyr) data.folder <- "Data/CAUBO/" years <- 1999:2011 data.sets <- c() for (year in years) { data.sets <- c(data.sets, paste(year, year+1, sep="")) } comp.schools <- c("McMaster University", "University of Waterloo", "University of Windsor", "Queen's University", "Universit...
/OperatingGrant.R
no_license
Brideau/UNBStrikeWatch
R
false
false
12,517
r
library(ggplot2) library(reshape2) library(plyr) data.folder <- "Data/CAUBO/" years <- 1999:2011 data.sets <- c() for (year in years) { data.sets <- c(data.sets, paste(year, year+1, sep="")) } comp.schools <- c("McMaster University", "University of Waterloo", "University of Windsor", "Queen's University", "Universit...
test_that("tbl_format_body() results", { expect_snapshot({ "Various column types" tbl_format_body(tbl_format_setup(df_all, width = 30)) tbl_format_body(tbl_format_setup(df_all, width = 300)) "POSIXct and POSIXlt" df <- new_tbl(list(x = as.POSIXct("2016-01-01 12:34:56 GMT") + 1:12)) df$y <- a...
/tests/testthat/test-tbl-format-body.R
permissive
r-lib/pillar
R
false
false
999
r
test_that("tbl_format_body() results", { expect_snapshot({ "Various column types" tbl_format_body(tbl_format_setup(df_all, width = 30)) tbl_format_body(tbl_format_setup(df_all, width = 300)) "POSIXct and POSIXlt" df <- new_tbl(list(x = as.POSIXct("2016-01-01 12:34:56 GMT") + 1:12)) df$y <- a...
# graph results of msteh in a grid # stepped wedge, T vs sigU vs rho library(gridExtra) library(ggplot2) library(reshape2) library(scales) library(grid) library(dplyr) library(latex2exp) specify_ICCs = 1 source('./TEH/rho_to_sigma_ratio2.R',local=TRUE) ht=10 wd=17 Tlist = seq(4, 20 ,1) Clist = c(2,5,...
/mteh_shiny/msteh_results_grid_cxo_sh.R
no_license
rhysbowden/mteh
R
false
false
2,181
r
# graph results of msteh in a grid # stepped wedge, T vs sigU vs rho library(gridExtra) library(ggplot2) library(reshape2) library(scales) library(grid) library(dplyr) library(latex2exp) specify_ICCs = 1 source('./TEH/rho_to_sigma_ratio2.R',local=TRUE) ht=10 wd=17 Tlist = seq(4, 20 ,1) Clist = c(2,5,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ES.R \name{ETL} \alias{ETL} \alias{ES} \alias{CVaR} \title{calculates Expected Shortfall(ES) (or Conditional Value-at-Risk(CVaR) for univariate and component, using a variety of analytical methods.} \usage{ ETL(R = NULL, p = 0.95, ..., method...
/man/ES.Rd
no_license
JustinMShea/PerformanceAnalytics
R
false
true
8,968
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ES.R \name{ETL} \alias{ETL} \alias{ES} \alias{CVaR} \title{calculates Expected Shortfall(ES) (or Conditional Value-at-Risk(CVaR) for univariate and component, using a variety of analytical methods.} \usage{ ETL(R = NULL, p = 0.95, ..., method...
unzip("./exdata-data-household_power_consumption.zip") data <- read.table("./household_power_consumption.txt", header=TRUE, sep=";") ## Converts Date column to Date type data <- transform(data, Date=as.Date(Date, "%d/%m/%Y")) ## filters only data we need data <- data[data$Date >= as.Date("2007-02-01") & data$Date <=...
/plot3.R
no_license
ivorwan/ExData_Plotting1
R
false
false
1,487
r
unzip("./exdata-data-household_power_consumption.zip") data <- read.table("./household_power_consumption.txt", header=TRUE, sep=";") ## Converts Date column to Date type data <- transform(data, Date=as.Date(Date, "%d/%m/%Y")) ## filters only data we need data <- data[data$Date >= as.Date("2007-02-01") & data$Date <=...