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
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/optimizeTrial.r \name{get_case_perf_obj} \alias{get_case_perf_obj} \title{Get trial performance for each case.} \usage{ get_case_perf_obj(base_args, cases, objective_fun, trial_method, return_entries = c("performance"), ...) } \arguments{ \...
/man/get_case_perf_obj.Rd
no_license
biostata/designOptim
R
false
true
1,673
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/optimizeTrial.r \name{get_case_perf_obj} \alias{get_case_perf_obj} \title{Get trial performance for each case.} \usage{ get_case_perf_obj(base_args, cases, objective_fun, trial_method, return_entries = c("performance"), ...) } \arguments{ \...
library(shiny) # Define UI for application shinyUI(fluidPage( # Header or Title Panel titlePanel(title = h4("Demostration of the Histogram with iris dataset", align="center")), sidebarLayout( # Sidebar panel sidebarPanel( selectInput("var", "1. Slect the variable from the iris dataset", choices ...
/ui.R
no_license
kennej18/Developing-Data-Products
R
false
false
1,030
r
library(shiny) # Define UI for application shinyUI(fluidPage( # Header or Title Panel titlePanel(title = h4("Demostration of the Histogram with iris dataset", align="center")), sidebarLayout( # Sidebar panel sidebarPanel( selectInput("var", "1. Slect the variable from the iris dataset", choices ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/node_count.R \name{node_count} \alias{node_count} \title{Get count of all nodes or certain types of nodes} \usage{ node_count(graph, type = FALSE) } \arguments{ \item{graph}{a graph object of class \code{dgr_graph} that is created using \code...
/man/node_count.Rd
no_license
UweBlock/DiagrammeR
R
false
true
1,884
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/node_count.R \name{node_count} \alias{node_count} \title{Get count of all nodes or certain types of nodes} \usage{ node_count(graph, type = FALSE) } \arguments{ \item{graph}{a graph object of class \code{dgr_graph} that is created using \code...
rm(list= ls()) library(verification) setwd("/Users/neelanshuthapar/Desktop/crypto_csc687_final") library(corrplot) original = read.csv("./coin_Bitcoin.csv") original = original names(original) dim(original) sum(is.na(original)) ###TO BE RUN ONLY ONCE! tomorrowHigh = original$High for(i in 1:length(tomorrowHigh)){ to...
/bitcoin_lm.R
no_license
ndthapar/statLearning
R
false
false
9,784
r
rm(list= ls()) library(verification) setwd("/Users/neelanshuthapar/Desktop/crypto_csc687_final") library(corrplot) original = read.csv("./coin_Bitcoin.csv") original = original names(original) dim(original) sum(is.na(original)) ###TO BE RUN ONLY ONCE! tomorrowHigh = original$High for(i in 1:length(tomorrowHigh)){ to...
##Merges the training and the test sets to create one data set. ##Extracts only the measurements on the mean and standard deviation for each measurement. ##Uses descriptive activity names to name the activities in the data set ##Appropriately labels the data set with descriptive activity names. ##Creates a second, i...
/run_analysis.R
no_license
annwitbrock/DataClean
R
false
false
2,140
r
##Merges the training and the test sets to create one data set. ##Extracts only the measurements on the mean and standard deviation for each measurement. ##Uses descriptive activity names to name the activities in the data set ##Appropriately labels the data set with descriptive activity names. ##Creates a second, i...
library(rgeolocate) setwd("C:/Users/bapti/Onedrive/Bureau/Securite_challenge") bdd = read.table("test.csv", sep=";", header = TRUE, encoding="utf-8") print(head(bdd)) file <- system.file("extdata","GeoLite2-Country.mmdb", package = "rgeolocate") results <- maxmind("45.129.33.10" ,file, c("country_name")) print(re...
/brouillon.R
no_license
fabthered/Securite_challenge
R
false
false
1,206
r
library(rgeolocate) setwd("C:/Users/bapti/Onedrive/Bureau/Securite_challenge") bdd = read.table("test.csv", sep=";", header = TRUE, encoding="utf-8") print(head(bdd)) file <- system.file("extdata","GeoLite2-Country.mmdb", package = "rgeolocate") results <- maxmind("45.129.33.10" ,file, c("country_name")) print(re...
## ----setup, include=FALSE------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) ## ----shots on goal------------------------------------------------------- ## ----formations---------------------------------------------------------- ## ----var---------------------------------------...
/cache/Ryo-N7|soccer_ggplots|World Cup 2018__RMarkdown__soccer_plots_part4.R
permissive
a-rosenberg/github-content-scraper
R
false
false
349
r
## ----setup, include=FALSE------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) ## ----shots on goal------------------------------------------------------- ## ----formations---------------------------------------------------------- ## ----var---------------------------------------...
\name{tremmel_shape_pal} \alias{tremmel_shape_pal} \title{Shape palette from Tremmel (1995) (discrete)} \usage{ tremmel_shape_pal(overlap = FALSE, n3alt = TRUE) } \arguments{ \item{overlap}{use an empty circle instead of a solid circle when \code{n == 2}.} \item{n3alt}{If \code{TRUE} then use a solid circle, p...
/man/tremmel_shape_pal.Rd
no_license
tomhiatt/ggthemes
R
false
false
1,458
rd
\name{tremmel_shape_pal} \alias{tremmel_shape_pal} \title{Shape palette from Tremmel (1995) (discrete)} \usage{ tremmel_shape_pal(overlap = FALSE, n3alt = TRUE) } \arguments{ \item{overlap}{use an empty circle instead of a solid circle when \code{n == 2}.} \item{n3alt}{If \code{TRUE} then use a solid circle, p...
\name{fit_multi} \alias{fit_multi} \title{Estimate model parameters for multiple disease progress curves } \description{ Estimate model parameters for multiple disease progress curves } \usage{ fit_multi(time_col, intensity_col, data, strata_cols , startin...
/man/fit_multi.Rd
permissive
cran/epifitter
R
false
false
2,800
rd
\name{fit_multi} \alias{fit_multi} \title{Estimate model parameters for multiple disease progress curves } \description{ Estimate model parameters for multiple disease progress curves } \usage{ fit_multi(time_col, intensity_col, data, strata_cols , startin...
#Second R Program for Fish 505 #Mike Hawkshaw #Jan 15 2014 #CHANGED FOR CATARINA #COHO modeling ######################################################################################################### #Model Steps: #####################################################################################################...
/Second.R
no_license
mikehawkshaw/Fish_505
R
false
false
4,813
r
#Second R Program for Fish 505 #Mike Hawkshaw #Jan 15 2014 #CHANGED FOR CATARINA #COHO modeling ######################################################################################################### #Model Steps: #####################################################################################################...
#' Main function for the \pkg{\link{MaRyam}} package. #' #' Wrapper function to run SV calling after having the NB parmeters and segment read counts. #' #' @param bin.size the size of the bins #' @param K The number of chromosomes (autosomes). #TODO I suggest that user can define what chromosome wants to analyze. So th...
/R/wrapper_SVcalling.R
no_license
friendsofstrandseq/MaRyam
R
false
false
7,582
r
#' Main function for the \pkg{\link{MaRyam}} package. #' #' Wrapper function to run SV calling after having the NB parmeters and segment read counts. #' #' @param bin.size the size of the bins #' @param K The number of chromosomes (autosomes). #TODO I suggest that user can define what chromosome wants to analyze. So th...
rm(list=ls()) # clear environment # setwd to wherever the income files are stored p <- "C:/Users/Tomas/Documents/LEI/NutritionTZA/Scripts" setwd(p) # source all of the income variables # and the panel key source("income_TZA_2008.R") source("income_TZA_2010.R") source("income_TZA_2012.R") source("panel_key.R") # We o...
/Scripts/group_by_source_balance_example.R
no_license
vincentlinderhof/NutritionTZA
R
false
false
1,503
r
rm(list=ls()) # clear environment # setwd to wherever the income files are stored p <- "C:/Users/Tomas/Documents/LEI/NutritionTZA/Scripts" setwd(p) # source all of the income variables # and the panel key source("income_TZA_2008.R") source("income_TZA_2010.R") source("income_TZA_2012.R") source("panel_key.R") # We o...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GoldDataParam.R \name{GoldDataParam} \alias{GoldDataParam} \title{User Constructor for class} \usage{ GoldDataParam(titv.coding.confirmed.l = 0, titv.coding.confirmed.u = 5, titv.noncoding.confirmed.l = 0, titv.noncoding.confirmed.u = 5, ...
/man/GoldDataParam.Rd
no_license
jentom/genotypeeval
R
false
true
1,735
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GoldDataParam.R \name{GoldDataParam} \alias{GoldDataParam} \title{User Constructor for class} \usage{ GoldDataParam(titv.coding.confirmed.l = 0, titv.coding.confirmed.u = 5, titv.noncoding.confirmed.l = 0, titv.noncoding.confirmed.u = 5, ...
library(RODBC) library(plyr) library(raster) library(rgeos) library(rgdal) file_output.mgt = "C:/TEMP/WRB.Sufi2.SwatCup/output.mgt" file_swat_prj = "K:/WRB/WRB.mdb" file_lc = "T:/Projects/Wisconsin_River/Model_Inputs/SWAT_Inputs/LandCoverLandManagement/swat_lc_fullForestDef_wtm.tif" file_lc_xw = "T:/Projects/Wisconsin...
/NDTI/compare_ndti_to_swat_soil_residue.r
no_license
dnrwaterqualitymodeling/wisconsinRiverTMDL
R
false
false
11,031
r
library(RODBC) library(plyr) library(raster) library(rgeos) library(rgdal) file_output.mgt = "C:/TEMP/WRB.Sufi2.SwatCup/output.mgt" file_swat_prj = "K:/WRB/WRB.mdb" file_lc = "T:/Projects/Wisconsin_River/Model_Inputs/SWAT_Inputs/LandCoverLandManagement/swat_lc_fullForestDef_wtm.tif" file_lc_xw = "T:/Projects/Wisconsin...
testlist <- list(bytes1 = c(590681344L, 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), pmutation = 0) result <- do...
/mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612803193-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
371
r
testlist <- list(bytes1 = c(590681344L, 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), pmutation = 0) result <- do...
## Modified version of Dirk's impoved ls() ## function and shortcut ## (http://stackoverflow.com/questions/1358003/tricks-to-manage-the-available-memory-in-an-r-session) ## improved list of objects ## from: https://gist.githubusercontent.com/PeteHaitch/8929540/raw/64e6d1181d28da63025d9de7ed4f848718d53bae/lsos.R .l...
/R/lsos.R
no_license
YaoYu-PDS/knitr.timing
R
false
false
1,551
r
## Modified version of Dirk's impoved ls() ## function and shortcut ## (http://stackoverflow.com/questions/1358003/tricks-to-manage-the-available-memory-in-an-r-session) ## improved list of objects ## from: https://gist.githubusercontent.com/PeteHaitch/8929540/raw/64e6d1181d28da63025d9de7ed4f848718d53bae/lsos.R .l...
#' Publish Google Drive file. #' #' @template file #' @param ... Name-value pairs to add to the API request body, for example #' `publishAuto = FALSE` will ensure that each subsequent revision will not be #' automatically published (default here is `publishAuto = TRUE`). #' @template verbose #' #' @template dribble...
/R/drive_publish.R
no_license
castillosebastian/googledrive
R
false
false
3,947
r
#' Publish Google Drive file. #' #' @template file #' @param ... Name-value pairs to add to the API request body, for example #' `publishAuto = FALSE` will ensure that each subsequent revision will not be #' automatically published (default here is `publishAuto = TRUE`). #' @template verbose #' #' @template dribble...
rm(list = ls()) setwd("~/InfluenzaForecastNPI-main/example_estimation/") library(tidyverse) library(glue) library(xlsx) library(cowplot) library(scales) # library(grid) # library(pBrackets) #https://blog.datawrapper.de/beautifulcolors/ makelabel <- function(timeidx) { len = length(timeidx) startyear <- 2012 end...
/example_estimation/Source plot/plot_validation18.R
no_license
ShashaHan-collab/InfluenzaForecastNPI
R
false
false
14,158
r
rm(list = ls()) setwd("~/InfluenzaForecastNPI-main/example_estimation/") library(tidyverse) library(glue) library(xlsx) library(cowplot) library(scales) # library(grid) # library(pBrackets) #https://blog.datawrapper.de/beautifulcolors/ makelabel <- function(timeidx) { len = length(timeidx) startyear <- 2012 end...
# PDF extractor library(grImport) library(tidyverse) library(devtools) #install_github("adamkucharski/scrapR") library(scrapR) rm(list=ls()) setwd("~/Documents/GitHub/scrapR/") # - - - # Simulate some cartoon data scrapR::simulate_PDF_data() # - - - # STEP 1: # Open your plot in Affinity/Illustrator and remove e...
/scripts/scrape_PDF.R
permissive
adamkucharski/scrapR
R
false
false
816
r
# PDF extractor library(grImport) library(tidyverse) library(devtools) #install_github("adamkucharski/scrapR") library(scrapR) rm(list=ls()) setwd("~/Documents/GitHub/scrapR/") # - - - # Simulate some cartoon data scrapR::simulate_PDF_data() # - - - # STEP 1: # Open your plot in Affinity/Illustrator and remove e...
testlist <- list(type = -1140850688L, z = 5.85655535267297e-319) result <- do.call(esreg::G1_fun,testlist) str(result)
/esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609894694-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
118
r
testlist <- list(type = -1140850688L, z = 5.85655535267297e-319) result <- do.call(esreg::G1_fun,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{generate_pwd} \alias{generate_pwd} \title{Simple password generation} \usage{ generate_pwd(n = 1) } \arguments{ \item{n}{Number of password(s)} } \value{ a \code{character} } \description{ Simple password generati...
/man/generate_pwd.Rd
no_license
cran/shinymanager
R
false
true
377
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{generate_pwd} \alias{generate_pwd} \title{Simple password generation} \usage{ generate_pwd(n = 1) } \arguments{ \item{n}{Number of password(s)} } \value{ a \code{character} } \description{ Simple password generati...
#' json file to pitcher dataframe #' #' This function changes pitcher data in json file to dataframe data #' #' ## You can read the json file in the json_sample folder and use it. #' ## You can use the fromJSON function of the jsonlite package to read the json file. #' ## You can also get the KBO full game json file. #...
/R/jsondata2pitcherdf.R
permissive
choosunsick/kbodatamining
R
false
false
1,360
r
#' json file to pitcher dataframe #' #' This function changes pitcher data in json file to dataframe data #' #' ## You can read the json file in the json_sample folder and use it. #' ## You can use the fromJSON function of the jsonlite package to read the json file. #' ## You can also get the KBO full game json file. #...
#' Building augmented data for multi-state models: the \code{msmtools} package #' #' \code{msmtools} introduces a fast and general method for restructuring classical longitudinal datasets #' into \emph{augmented} ones. Augmented data enhances longitudinal datasets and allow to model each #' transition under a multi-sta...
/R/msmtools.R
no_license
imanojkumar/msmtools
R
false
false
724
r
#' Building augmented data for multi-state models: the \code{msmtools} package #' #' \code{msmtools} introduces a fast and general method for restructuring classical longitudinal datasets #' into \emph{augmented} ones. Augmented data enhances longitudinal datasets and allow to model each #' transition under a multi-sta...
# shiny server, ancestry mixtures research project server = function(input, output, session) { # store correct data frames in reactive value bbranchrdat = reactiveValues(bbdat = NULL, randat = NULL, chrdat = NULL) # updates reactive data frame when new gnomAD group or genome/exome is selected observeEvent...
/AncestryEstimation-App/server.R
no_license
ianarriagamackenzie/mixturesresearch
R
false
false
2,958
r
# shiny server, ancestry mixtures research project server = function(input, output, session) { # store correct data frames in reactive value bbranchrdat = reactiveValues(bbdat = NULL, randat = NULL, chrdat = NULL) # updates reactive data frame when new gnomAD group or genome/exome is selected observeEvent...
#' @title Disable active extension portfolios #' #' @description #' \code{long.only} switches a portfolio.model back to long-only by #' disabling the active extension #' #' @param model the portfolio.model to deactivate active extensions #' #' @return portfolio.model with active extension disabled #' #' @author Rona...
/R/long.only.R
no_license
CaptainTsao/portfolio.optimization
R
false
false
617
r
#' @title Disable active extension portfolios #' #' @description #' \code{long.only} switches a portfolio.model back to long-only by #' disabling the active extension #' #' @param model the portfolio.model to deactivate active extensions #' #' @return portfolio.model with active extension disabled #' #' @author Rona...
# Launch the ShinyApp (Do not remove this comment) # To deploy, run: rsconnect::deployApp() # Or use the blue button on top of this file pkgload::load_all(export_all = FALSE,helpers = FALSE,attach_testthat = FALSE) options( "golem.app.prod" = TRUE) hamiltonSeirVaccinationControl:::run_app() # add parameters here (if a...
/app.R
permissive
hamilton-institute/hamiltonSeirVaccinationControl
R
false
false
324
r
# Launch the ShinyApp (Do not remove this comment) # To deploy, run: rsconnect::deployApp() # Or use the blue button on top of this file pkgload::load_all(export_all = FALSE,helpers = FALSE,attach_testthat = FALSE) options( "golem.app.prod" = TRUE) hamiltonSeirVaccinationControl:::run_app() # add parameters here (if a...
#Reading,naming and subsetting power consumption data power <- read.table("power-consumption.txt", na.strings="?", skip=1, sep=";") names(power) <- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3") subpower <- subset(...
/explo_plots/plot1.R
no_license
Arya-CP/Datascience
R
false
false
563
r
#Reading,naming and subsetting power consumption data power <- read.table("power-consumption.txt", na.strings="?", skip=1, sep=";") names(power) <- c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3") subpower <- subset(...
##vowel labels RecordingComparison["VowelIPA"] <- "placeholder" RecordingComparison$VowelIPA[RecordingComparison$Segment == "AA1"] <- "ɑ" RecordingComparison$VowelIPA[RecordingComparison$Segment == "AO0"] <- "ɑ" RecordingComparison$VowelIPA[RecordingComparison$Segment == "AO1"] <- "ɑ" RecordingComparison$VowelIPA[Reco...
/scripts/StatisticalAnalysis.R
permissive
chirila/recording-device-comparison
R
false
false
10,359
r
##vowel labels RecordingComparison["VowelIPA"] <- "placeholder" RecordingComparison$VowelIPA[RecordingComparison$Segment == "AA1"] <- "ɑ" RecordingComparison$VowelIPA[RecordingComparison$Segment == "AO0"] <- "ɑ" RecordingComparison$VowelIPA[RecordingComparison$Segment == "AO1"] <- "ɑ" RecordingComparison$VowelIPA[Reco...
#' @examples #' \dontrun{ #' res <- dfp_updateBaseRates(request_data) #' }
/examples/examples-dfp_updateBaseRates.R
no_license
StevenMMortimer/rdfp
R
false
false
76
r
#' @examples #' \dontrun{ #' res <- dfp_updateBaseRates(request_data) #' }
## This function will create a new matrix square matrix ## where x is the size of the new square matrix makeCacheMatrix <- function(x = matrix()) { #makes sure we have an empty variable i <- NULL ## Create a list to store values set <- function(y) { x <<- y #Link to object i <<- Null #Holder fo...
/cachematrix.R
no_license
mncockerham/ProgrammingAssignment2
R
false
false
902
r
## This function will create a new matrix square matrix ## where x is the size of the new square matrix makeCacheMatrix <- function(x = matrix()) { #makes sure we have an empty variable i <- NULL ## Create a list to store values set <- function(y) { x <<- y #Link to object i <<- Null #Holder fo...
12 * 12 curve(x^2, from=1, to=50, , xlab="x", ylab="y")
/test.R
no_license
Battlepenny2122/cs229-2018-autumn
R
false
false
56
r
12 * 12 curve(x^2, from=1, to=50, , xlab="x", ylab="y")
#' @export model_quantreg_rsubbins <- function(formula, data_pnad, tau = .5, groups = NULL, confidence_intervals = F, binSampleSize = 1000, CI_lowerBound = .025, CI_upperBound = .975, ...
/R/model_quantreg_rsubbins.R
no_license
antrologos/tableInequality
R
false
false
14,775
r
#' @export model_quantreg_rsubbins <- function(formula, data_pnad, tau = .5, groups = NULL, confidence_intervals = F, binSampleSize = 1000, CI_lowerBound = .025, CI_upperBound = .975, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/devicefarm_operations.R \name{devicefarm_list_jobs} \alias{devicefarm_list_jobs} \title{Gets information about jobs for a given test run} \usage{ devicefarm_list_jobs(arn, nextToken) } \arguments{ \item{arn}{[required] The run's Amazon Resour...
/paws/man/devicefarm_list_jobs.Rd
permissive
peoplecure/paws
R
false
true
885
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/devicefarm_operations.R \name{devicefarm_list_jobs} \alias{devicefarm_list_jobs} \title{Gets information about jobs for a given test run} \usage{ devicefarm_list_jobs(arn, nextToken) } \arguments{ \item{arn}{[required] The run's Amazon Resour...
library(readr) library(h2o) d = read_csv("~/Desktop/Data Analysis/murder_suicide.csv") d$Sex = as.factor(d$Sex) d$MaritalStatus = as.factor(d$MaritalStatus) d$InjuryAtWork = as.factor(d$InjuryAtWork) d$MethodOfDisposition= as.factor(d$MethodOfDisposition) d$Autopsy = as.factor(d$Autopsy) d$MannerOfDeath = d$MannerOfDe...
/HW7/HW7-9.R
no_license
praal/data_analysis_course
R
false
false
725
r
library(readr) library(h2o) d = read_csv("~/Desktop/Data Analysis/murder_suicide.csv") d$Sex = as.factor(d$Sex) d$MaritalStatus = as.factor(d$MaritalStatus) d$InjuryAtWork = as.factor(d$InjuryAtWork) d$MethodOfDisposition= as.factor(d$MethodOfDisposition) d$Autopsy = as.factor(d$Autopsy) d$MannerOfDeath = d$MannerOfDe...
##' Plot of leave-one-out crossvalidation Outputs from the one-step Joint surrogate model for evaluating a ##' canditate surrogate endpoint. ##' ##' @description{ ##' Plot of leave-one-out crossvalidation Outputs for evaluating the joint surrogate model ##' } ##' ##' @aliases plot.jointSurroPenalloocv ##' @...
/R/plot.jointSurroPenalloocv.R
no_license
muschellij2/frailtypack
R
false
false
6,113
r
##' Plot of leave-one-out crossvalidation Outputs from the one-step Joint surrogate model for evaluating a ##' canditate surrogate endpoint. ##' ##' @description{ ##' Plot of leave-one-out crossvalidation Outputs for evaluating the joint surrogate model ##' } ##' ##' @aliases plot.jointSurroPenalloocv ##' @...
# (c) 2019 Brian Romanchuk source('startup.R') auto_inv <- pfetch('F@AISRSA') ser <- auto_inv recession <- pfetch('F@USREC') pp <- ShadeBars1(ser, recession, '', main='U.S.: Auto Inventory-Sales Ratio', startdate = '1993-01-01') pp <- SetXAxis(pp,"1993-01-01", "2019-06-01") pp <- pp + geom...
/legacy/R/c20190803_auto_inventory.R
permissive
brianr747/platform
R
false
false
1,105
r
# (c) 2019 Brian Romanchuk source('startup.R') auto_inv <- pfetch('F@AISRSA') ser <- auto_inv recession <- pfetch('F@USREC') pp <- ShadeBars1(ser, recession, '', main='U.S.: Auto Inventory-Sales Ratio', startdate = '1993-01-01') pp <- SetXAxis(pp,"1993-01-01", "2019-06-01") pp <- pp + geom...
# Load packages library("shiny") library("shinyjs") library("shinydashboard") library("data.table") library("magrittr") library("DT") library("progressdatenbankderivate") # Source functions source("functions/quicksofa_simple.R") source("functions/scap_simple.R") source("functions/smartcop_simple.R")
/functions/app_init.R
no_license
cfbeuchel/imise_cap_severity_scores
R
false
false
304
r
# Load packages library("shiny") library("shinyjs") library("shinydashboard") library("data.table") library("magrittr") library("DT") library("progressdatenbankderivate") # Source functions source("functions/quicksofa_simple.R") source("functions/scap_simple.R") source("functions/smartcop_simple.R")
testlist <- list(a = 65390L, b = 1429143551L, x = integer(0)) result <- do.call(grattan:::anyOutside,testlist) str(result)
/grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610128883-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
122
r
testlist <- list(a = 65390L, b = 1429143551L, x = integer(0)) result <- do.call(grattan:::anyOutside,testlist) str(result)
library('data.table') library('WGCNA') library("org.Hs.eg.db") library(ggplot2) ##### set constants ###### significance <- 0.05 nTests <- 6555886 ####### ###### read in deconGW filtered set ##### path <- "DeconGW_filtered_for\ Outliers_eQTLs" files <- list.files(path) decon_eQTLs <- vector(mode="list", lengt=length(fi...
/genetics/deconvolution/pathways_filtered_outliers.R
no_license
npklein/random_scripts
R
false
false
10,145
r
library('data.table') library('WGCNA') library("org.Hs.eg.db") library(ggplot2) ##### set constants ###### significance <- 0.05 nTests <- 6555886 ####### ###### read in deconGW filtered set ##### path <- "DeconGW_filtered_for\ Outliers_eQTLs" files <- list.files(path) decon_eQTLs <- vector(mode="list", lengt=length(fi...
# taxi data summaries library(data.table) # Data read # setwd("~/Documents/Princeton/Senior Year/Thesis/Sandbox") setwd("~/Desktop/ThesisWork/thesis/csv/raw/") # Make one-weekish sample rawdata <- fread("yellow_tripdata_2016-01.csv") # uncomment for large dataread setorder(rawdata, "tpep_pickup_datetime") # fwrite(ra...
/R/nyctaxi.R
permissive
kgladstone/thesis
R
false
false
4,938
r
# taxi data summaries library(data.table) # Data read # setwd("~/Documents/Princeton/Senior Year/Thesis/Sandbox") setwd("~/Desktop/ThesisWork/thesis/csv/raw/") # Make one-weekish sample rawdata <- fread("yellow_tripdata_2016-01.csv") # uncomment for large dataread setorder(rawdata, "tpep_pickup_datetime") # fwrite(ra...
# # Based on code from https://github.com/gertjanssenswillen/processmapR # (c) Hasselt University under MIT license # #' @title Custom map profile #' @description Function to create a custom map profile based on some event log attribute. #' @details If used for edges, it will show the attribute values which related to...
/R/causal_custom.R
permissive
nacnudus/heuristicsmineR
R
false
false
5,969
r
# # Based on code from https://github.com/gertjanssenswillen/processmapR # (c) Hasselt University under MIT license # #' @title Custom map profile #' @description Function to create a custom map profile based on some event log attribute. #' @details If used for edges, it will show the attribute values which related to...
## Libraries library(ggplot2) library(sp) library(lattice) library(RColorBrewer) library(grid) library(gridExtra) ## Setup printing figures configuration readEpaDataset <- function(version=1){ if(version==1){ epa <- readRDS("data/epa/epa_daily/2016/california_ozone_plus_rcov_3.RDS") } else if (version==2){ ...
/util/my_helper.R
permissive
rgualan/soton-data-science-thesis
R
false
false
24,086
r
## Libraries library(ggplot2) library(sp) library(lattice) library(RColorBrewer) library(grid) library(gridExtra) ## Setup printing figures configuration readEpaDataset <- function(version=1){ if(version==1){ epa <- readRDS("data/epa/epa_daily/2016/california_ozone_plus_rcov_3.RDS") } else if (version==2){ ...
A <- c("A1", "A2", "A3") B <- c("B1", "B2","B3") C <- c("C1","C2", "C3") factor_levels <- as.data.frame(c(A, B, C)) colnames(factor_levels) <- "levels" data <- expand.grid(A, B, C) colnames(data) <- c("A", "B", "C") #Creating a set of profiles for the factors facdesign <- caFactorialDesign(data = data, type...
/Examples/Orthogonal design.R
no_license
Zoe0409/Applying-Data-Analytics-in-Marketing
R
false
false
379
r
A <- c("A1", "A2", "A3") B <- c("B1", "B2","B3") C <- c("C1","C2", "C3") factor_levels <- as.data.frame(c(A, B, C)) colnames(factor_levels) <- "levels" data <- expand.grid(A, B, C) colnames(data) <- c("A", "B", "C") #Creating a set of profiles for the factors facdesign <- caFactorialDesign(data = data, type...
\name{Gfox} \alias{Gfox} \alias{Jfox} \title{ Foxall's Distance Functions } \description{ Given a point pattern \code{X} and a spatial object \code{Y}, compute estimates of Foxall's \eqn{G} and \eqn{J} functions. } \usage{ Gfox(X, Y, r=NULL, breaks=NULL, correction=c("km", "rs", "han"), W, \dots) Jfox(X, Y, r=NU...
/man/Gfox.Rd
no_license
spatstat/spatstat.core
R
false
false
4,167
rd
\name{Gfox} \alias{Gfox} \alias{Jfox} \title{ Foxall's Distance Functions } \description{ Given a point pattern \code{X} and a spatial object \code{Y}, compute estimates of Foxall's \eqn{G} and \eqn{J} functions. } \usage{ Gfox(X, Y, r=NULL, breaks=NULL, correction=c("km", "rs", "han"), W, \dots) Jfox(X, Y, r=NU...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/extract_taxonomy--parsers.R \name{get_name_from_id} \alias{get_name_from_id} \title{Get taxon name from ID} \usage{ get_name_from_id(id, database) } \arguments{ \item{id}{(\code{character}) Id to look up names for} \item{database}{(\code{cha...
/man/get_name_from_id.Rd
permissive
seninp/metacoder
R
false
true
442
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/extract_taxonomy--parsers.R \name{get_name_from_id} \alias{get_name_from_id} \title{Get taxon name from ID} \usage{ get_name_from_id(id, database) } \arguments{ \item{id}{(\code{character}) Id to look up names for} \item{database}{(\code{cha...
### using tutorial from here: https://tensorflow.rstudio.com/tfestimators/ ### Load libraries------- library("tfestimators") ### Pull and clean data from github--------- panelOrig <- readRDS(url("https://github.com/Matt-Brigida/FFIEC_Call_Reports/blob/master/querying_data_and_analysis/analyses/panel_data_analysis/f...
/3_machine_learning/r_keras_tf/regression_model/change_SB_regression_models.R
no_license
Matt-Brigida/FFIEC_Call_Reports
R
false
false
2,973
r
### using tutorial from here: https://tensorflow.rstudio.com/tfestimators/ ### Load libraries------- library("tfestimators") ### Pull and clean data from github--------- panelOrig <- readRDS(url("https://github.com/Matt-Brigida/FFIEC_Call_Reports/blob/master/querying_data_and_analysis/analyses/panel_data_analysis/f...
## The functions below provide a way to calculate the inverse of a matrix and ## store the result in cache memory. ## Function makeCacheMatrix accepts a matrix argument (the matrix supplied must be invertible) and ## returns a list of functions that can be used to save/retrieve its inverse to/from cache memory makeCa...
/cachematrix.R
no_license
jeffjaylacs/ProgrammingAssignment2
R
false
false
2,029
r
## The functions below provide a way to calculate the inverse of a matrix and ## store the result in cache memory. ## Function makeCacheMatrix accepts a matrix argument (the matrix supplied must be invertible) and ## returns a list of functions that can be used to save/retrieve its inverse to/from cache memory makeCa...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{spectrumDB} \alias{spectrumDB} \title{standard metabolite MS2 spectrum} \format{ A list containing two elements \describe{ \item{spectrum}{standard MS2 spectrum, each spectrum is a list, whose name is th...
/man/spectrumDB.Rd
no_license
luanenhui/RFQI
R
false
true
604
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{spectrumDB} \alias{spectrumDB} \title{standard metabolite MS2 spectrum} \format{ A list containing two elements \describe{ \item{spectrum}{standard MS2 spectrum, each spectrum is a list, whose name is th...
\name{get_historical_data} \alias{get_historical_data} \title{Download historical climate data} \usage{ get_historical_data(locator, cvar, time_scale) } \arguments{ \item{locator}{The ISO3 country code that you want data about. (http://unstats.un.org/unsd/methods/m49/m49alpha.htm) or the basin ID [1-468]. The...
/man/get_historical_data.Rd
no_license
imclab/rWBclimate
R
false
false
1,299
rd
\name{get_historical_data} \alias{get_historical_data} \title{Download historical climate data} \usage{ get_historical_data(locator, cvar, time_scale) } \arguments{ \item{locator}{The ISO3 country code that you want data about. (http://unstats.un.org/unsd/methods/m49/m49alpha.htm) or the basin ID [1-468]. The...
set.seed(12345) N1 = 15 N2 = 20 x = c(runif(N1) * 0.55, 0.5 + runif(N2) * 0.45) y = c(rep(0, N1), rep(1, N2)) df = data.frame(x=x, y=y) m = lm(y ~ x, df) plot(df$x, df$y, col = 'black', bg = 'black', pch = 19, cex = 0.5, xlim=c(-0.1, 1.2), ylim=c(-0.1,1.1), ylab='y', xlab='x', axes=FALSE) box(col="gray") axi...
/images/logreg/logreg.R
permissive
marceval13/statistics-for-analytics
R
false
false
1,250
r
set.seed(12345) N1 = 15 N2 = 20 x = c(runif(N1) * 0.55, 0.5 + runif(N2) * 0.45) y = c(rep(0, N1), rep(1, N2)) df = data.frame(x=x, y=y) m = lm(y ~ x, df) plot(df$x, df$y, col = 'black', bg = 'black', pch = 19, cex = 0.5, xlim=c(-0.1, 1.2), ylim=c(-0.1,1.1), ylab='y', xlab='x', axes=FALSE) box(col="gray") axi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rsos_article.R \name{rsos_article} \alias{rsos_article} \title{Royal Society Open Science journal format.} \usage{ rsos_article( ..., keep_tex = TRUE, latex_engine = "xelatex", pandoc_args = NULL, includes = NULL, fig_crop = TRUE ...
/man/rsos_article.Rd
no_license
MicGold/rticles
R
false
true
1,083
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rsos_article.R \name{rsos_article} \alias{rsos_article} \title{Royal Society Open Science journal format.} \usage{ rsos_article( ..., keep_tex = TRUE, latex_engine = "xelatex", pandoc_args = NULL, includes = NULL, fig_crop = TRUE ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vis.r \name{pcoa} \alias{pcoa} \title{pcoa} \usage{ pcoa(countData, col = "Color", k = 2) } \arguments{ \item{countData}{OTU/species abundance table (each row is one species, each column is one site)} \item{col}{a vector of colors for the po...
/man/pcoa.Rd
permissive
satopan/beem-static
R
false
true
473
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vis.r \name{pcoa} \alias{pcoa} \title{pcoa} \usage{ pcoa(countData, col = "Color", k = 2) } \arguments{ \item{countData}{OTU/species abundance table (each row is one species, each column is one site)} \item{col}{a vector of colors for the po...
library("umx") library("tidyverse") #Receiving processed table edges <- read_delim("final_table.txt", col_names=T, delim="\t") #Change sex to 0 or 1 ## edges <- mutate(edges, Gender = if_else(Gender=="M", 1, 0)) #Multiply all by 100 edges[,7:dim(edges)[2]] <- edges[,7:dim(edges)[2]]*100 #Sex and age setti...
/multiprocessing_fin.R
no_license
frcsantos/Heritability_FunctionalNetworks
R
false
false
1,438
r
library("umx") library("tidyverse") #Receiving processed table edges <- read_delim("final_table.txt", col_names=T, delim="\t") #Change sex to 0 or 1 ## edges <- mutate(edges, Gender = if_else(Gender=="M", 1, 0)) #Multiply all by 100 edges[,7:dim(edges)[2]] <- edges[,7:dim(edges)[2]]*100 #Sex and age setti...
#' Canvas 9 #' #' @return #' @export #' #' @examples #' @import dplyr #' @import tidyr #' @import purrr #' @importFrom glue glue canvas09 <- function( width = 300, height = 500, bgColour = '#29274C', accent_color = '#933A16', # line_colors = c("#f4e409","#eeba0b","#c36f09","#a63c06","#710000"), line_colors ...
/R/09-prisma.R
no_license
dariomavec/canvasr
R
false
false
1,295
r
#' Canvas 9 #' #' @return #' @export #' #' @examples #' @import dplyr #' @import tidyr #' @import purrr #' @importFrom glue glue canvas09 <- function( width = 300, height = 500, bgColour = '#29274C', accent_color = '#933A16', # line_colors = c("#f4e409","#eeba0b","#c36f09","#a63c06","#710000"), line_colors ...
##Import and prepare data data <- read.table("household_power_consumption.txt", sep=";",header=TRUE) data$Date <- as.Date(data$Date, "%d/%m/%Y") data$Time <- strptime(paste(data$Date,data$Time), "%Y-%m-%d %H:%M:%S") d_feb <- subset(data, data$Date <= as.Date("2007-02-02") & data$Date >= as.Date("2007-02-01")) ##Convert...
/plot2.R
no_license
mk1310/ExData_Plotting1
R
false
false
1,144
r
##Import and prepare data data <- read.table("household_power_consumption.txt", sep=";",header=TRUE) data$Date <- as.Date(data$Date, "%d/%m/%Y") data$Time <- strptime(paste(data$Date,data$Time), "%Y-%m-%d %H:%M:%S") d_feb <- subset(data, data$Date <= as.Date("2007-02-02") & data$Date >= as.Date("2007-02-01")) ##Convert...
\name{CheckIt} \alias{CheckIt} \alias{WhatIs} \alias{what_is} \alias{check_it} \title{Investigate data objects} \usage{ CheckIt(x, ...) check_it(x, ...) what_is(x, ...) WhatIs(x, ...) } \arguments{ \item{x}{The object to be investigated and passed out again.} \item{...}{extra parameters to be passed o...
/man/WhatIs.Rd
no_license
cran/BrailleR
R
false
false
1,080
rd
\name{CheckIt} \alias{CheckIt} \alias{WhatIs} \alias{what_is} \alias{check_it} \title{Investigate data objects} \usage{ CheckIt(x, ...) check_it(x, ...) what_is(x, ...) WhatIs(x, ...) } \arguments{ \item{x}{The object to be investigated and passed out again.} \item{...}{extra parameters to be passed o...
################################################################### #Stage 0. Downloading and unzipping dataset ################################################################### fileUrl1 <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" # Code book for variables: http://a...
/run_analysis.R
no_license
Alexandershemetev/Data_Cleaning_Code_for_Samsung_Project
R
false
false
9,933
r
################################################################### #Stage 0. Downloading and unzipping dataset ################################################################### fileUrl1 <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" # Code book for variables: http://a...
## Establish Environment # Install and packages needed for execution of this script packages <- c("data.table", "reshape2", "dplyr") packages sapply(packages, require, character.only = TRUE, quietly = TRUE) # Set working directory setwd("C:/Users/SR/Documents/Coursera/GettingAndCleaningData/CourseProject/UCI HAR Data...
/run_analysis.r
no_license
Martin77PP/GettingAndCleaningData
R
false
false
2,812
r
## Establish Environment # Install and packages needed for execution of this script packages <- c("data.table", "reshape2", "dplyr") packages sapply(packages, require, character.only = TRUE, quietly = TRUE) # Set working directory setwd("C:/Users/SR/Documents/Coursera/GettingAndCleaningData/CourseProject/UCI HAR Data...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rwx2.R \name{read.rbya} \alias{read.rbya} \title{Reads the stock in numbers and fishing mortality} \usage{ read.rbya(x, Scale = 1) } \arguments{ \item{x}{Object from read.fit} \item{Scale}{A numerical value. If 1 (default) returns the stock ...
/man/read.rbya.Rd
no_license
einarhjorleifsson/mac
R
false
true
520
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rwx2.R \name{read.rbya} \alias{read.rbya} \title{Reads the stock in numbers and fishing mortality} \usage{ read.rbya(x, Scale = 1) } \arguments{ \item{x}{Object from read.fit} \item{Scale}{A numerical value. If 1 (default) returns the stock ...
# _targets.R # Libraries # install.packages("devtools") library(devtools) # devtools::install_version("Matrix", version = "1.2.8") library(Matrix) # devtools::install_version("TMB", "1.7.18") # devtools::install_github("James-Thorson-NOAA/FishStatsUtils", force = TRUE, upgrade = FALSE) # devtools::install_github("James...
/_targets.R
no_license
adamkemberling/TargetsSDM
R
false
false
19,206
r
# _targets.R # Libraries # install.packages("devtools") library(devtools) # devtools::install_version("Matrix", version = "1.2.8") library(Matrix) # devtools::install_version("TMB", "1.7.18") # devtools::install_github("James-Thorson-NOAA/FishStatsUtils", force = TRUE, upgrade = FALSE) # devtools::install_github("James...
context("binds") test_requires("dplyr") sc <- testthat_spark_connection() df1a <- data.frame(a = 1:3, b = letters[1:3], stringsAsFactors = FALSE) df2a <- data.frame(c = letters[1:3], d = letters[24:26], stringsAsFactors = FALSE) df3a <- data.frame(e = 1:2, f = letters[1:2], stringsAsFactors = FALSE) df4a <- data.fram...
/tests/testthat/test-binds.R
permissive
zero323/sparklyr
R
false
false
6,934
r
context("binds") test_requires("dplyr") sc <- testthat_spark_connection() df1a <- data.frame(a = 1:3, b = letters[1:3], stringsAsFactors = FALSE) df2a <- data.frame(c = letters[1:3], d = letters[24:26], stringsAsFactors = FALSE) df3a <- data.frame(e = 1:2, f = letters[1:2], stringsAsFactors = FALSE) df4a <- data.fram...
\name{focus.example.data} \alias{focus.hypercube.vertices} \alias{focus.torus} \alias{focus.sphere} \alias{focus.sinusoids.grid} \alias{focus.sinusoids} \title{Focus - Interactive exploratory visualization for high-dimensional data} \description{ Example data sets for focus projection visualizations. The sinusoids me...
/Rpackage/focus/man/focus.example.data.Rd
no_license
suppechasper/focus
R
false
false
1,032
rd
\name{focus.example.data} \alias{focus.hypercube.vertices} \alias{focus.torus} \alias{focus.sphere} \alias{focus.sinusoids.grid} \alias{focus.sinusoids} \title{Focus - Interactive exploratory visualization for high-dimensional data} \description{ Example data sets for focus projection visualizations. The sinusoids me...
## ============================================================== ## Project definition ## ============================================================== ## Amadeus data manipulation challenge, working with real big data ## bookings: Information about bookings, date, time, ports, etc. ## searches: Information about se...
/amadeus_3_data_analyzing.R
no_license
minhpth/Amadeus_MP
R
false
false
7,617
r
## ============================================================== ## Project definition ## ============================================================== ## Amadeus data manipulation challenge, working with real big data ## bookings: Information about bookings, date, time, ports, etc. ## searches: Information about se...
## Beginning of program. ## Import data and take it out for a spin epc <- read.table(file.choose(),header=TRUE,sep=";",colClasses=c("character", "character", rep("numeric",7)),na="?") attach(epc) str(epc) head(epc,10) ## Change dates and times as recommended epc$Time <- strptime(paste(epc$Date, epc$Time), "%d/%m/%...
/plot3.R
no_license
grezavi/C4-Plotting-Assignment-1
R
false
false
977
r
## Beginning of program. ## Import data and take it out for a spin epc <- read.table(file.choose(),header=TRUE,sep=";",colClasses=c("character", "character", rep("numeric",7)),na="?") attach(epc) str(epc) head(epc,10) ## Change dates and times as recommended epc$Time <- strptime(paste(epc$Date, epc$Time), "%d/%m/%...
testlist <- list(m = NULL, repetitions = -304992360L, in_m = structure(c(2.33450097893083e+77, 9.53818252170339e+295, 1.22810536108214e+146), .Dim = c(3L, 1L ))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) str(result)
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615786224-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
254
r
testlist <- list(m = NULL, repetitions = -304992360L, in_m = structure(c(2.33450097893083e+77, 9.53818252170339e+295, 1.22810536108214e+146), .Dim = c(3L, 1L ))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/context_methylation_functions.r \name{CoverageFilter} \alias{CoverageFilter} \title{Filter Cs for coverage} \usage{ CoverageFilter(MethGR, thr) } \arguments{ \item{MethGR}{Granges obj of average methylation} \item{thr}{converage threshold} }...
/man/CoverageFilter.Rd
no_license
Krebslabrep/SingleMoleculeFootprinting
R
false
true
386
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/context_methylation_functions.r \name{CoverageFilter} \alias{CoverageFilter} \title{Filter Cs for coverage} \usage{ CoverageFilter(MethGR, thr) } \arguments{ \item{MethGR}{Granges obj of average methylation} \item{thr}{converage threshold} }...
## GNU License, written by Moreno I. Coco ## original Matlab code by Rick Dale ## calculate recurrence over different sized windows ## arguments: windowstep = interval considered on the serie; ## window_size = the size of the window wherin crqa is runned. ## lag_profile_width = lags within...
/R/windowdrp.R
no_license
cran/crqa
R
false
false
3,208
r
## GNU License, written by Moreno I. Coco ## original Matlab code by Rick Dale ## calculate recurrence over different sized windows ## arguments: windowstep = interval considered on the serie; ## window_size = the size of the window wherin crqa is runned. ## lag_profile_width = lags within...
## Set Working Data to Data Location and Unzip from Zip File on Website Before Using This File ## Load Lubridate Package library(lubridate) ## Open Data fulldata <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?") ## Coerce Date as Date Variable fulldata$Date <- as.Date(fu...
/plot1.R
no_license
kwmoffett/ExData_Plotting1
R
false
false
949
r
## Set Working Data to Data Location and Unzip from Zip File on Website Before Using This File ## Load Lubridate Package library(lubridate) ## Open Data fulldata <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?") ## Coerce Date as Date Variable fulldata$Date <- as.Date(fu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binomal.R \name{bin_variable} \alias{bin_variable} \title{Binomial Variable Function} \usage{ bin_variable(trials, prob) } \arguments{ \item{trials}{Total number of trials} \item{prob}{Probability of success} } \value{ A binomial random vari...
/Desktop/binomial/man/bin_variable.Rd
no_license
stat133-sp19/hw-stat133-eunicesou-1
R
false
true
619
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/binomal.R \name{bin_variable} \alias{bin_variable} \title{Binomial Variable Function} \usage{ bin_variable(trials, prob) } \arguments{ \item{trials}{Total number of trials} \item{prob}{Probability of success} } \value{ A binomial random vari...
library('testthat') source('NAME/NAME.R') test_dir('tests', reporter = 'summary')
/run_tests.R
no_license
Transcriptase/r-skeleton
R
false
false
83
r
library('testthat') source('NAME/NAME.R') test_dir('tests', reporter = 'summary')
gerar_certificados <- function(listadepresenca,modelocertificado) { ## Loop for (i in 1:ncol(listadepresenca)){ presenca[,i]<-iconv(listadepresenca[,i], "latin1", "UTF-8")} ## Loop for (i in 1:nrow(presenca)){ rmarkdown::render(input = paste(modelocertificado), output_format =...
/R/Meucertificado.R
no_license
Lucianea/Certifyevent
R
false
false
532
r
gerar_certificados <- function(listadepresenca,modelocertificado) { ## Loop for (i in 1:ncol(listadepresenca)){ presenca[,i]<-iconv(listadepresenca[,i], "latin1", "UTF-8")} ## Loop for (i in 1:nrow(presenca)){ rmarkdown::render(input = paste(modelocertificado), output_format =...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/keywords.R \name{keywords} \alias{keywords} \title{Tags text with likely keywords} \usage{ keywords(text, version = 2, language = "english", ...) } \arguments{ \item{text}{text for analysis} \item{version}{for api version} \item{...}{additi...
/man/keywords.Rd
permissive
denrou/IndicoIo-R
R
false
true
1,112
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/keywords.R \name{keywords} \alias{keywords} \title{Tags text with likely keywords} \usage{ keywords(text, version = 2, language = "english", ...) } \arguments{ \item{text}{text for analysis} \item{version}{for api version} \item{...}{additi...
#' Counting population and person-time in the joint PHA/Medicaid data #' #' \code{popcount} summarizes population data in the joint PHA/Medicaid data. #' #' This function takes the date range supplied by \code{\link{time_range}} and #' counts individuals enrolled and person time by group. #' The function works for PH...
/R/popcount.R
no_license
timathomas/Housing
R
false
false
14,230
r
#' Counting population and person-time in the joint PHA/Medicaid data #' #' \code{popcount} summarizes population data in the joint PHA/Medicaid data. #' #' This function takes the date range supplied by \code{\link{time_range}} and #' counts individuals enrolled and person time by group. #' The function works for PH...
# ----------------------------------------------------------------------------- # column # ----------------------------------------------------------------------------- check_df_cols = function(df) { for (j in 1:NCOL(df)) { type = class(df[, j])[1] if (type != "numeric" && type != "integer" && type != "log...
/R/write_h5df.r
permissive
awilli69/hdfio
R
false
false
8,787
r
# ----------------------------------------------------------------------------- # column # ----------------------------------------------------------------------------- check_df_cols = function(df) { for (j in 1:NCOL(df)) { type = class(df[, j])[1] if (type != "numeric" && type != "integer" && type != "log...
#'@name freq_xtable_totale #'@title freq_xtable_totale #'@description as xtable, but put a line between befor the total. Also substitute `Sum` with `Totale` #'@param tab a freq table #'@param digits as in xtable #'@export freq_xtable_totale <-function(tab,digits = NULL,...){ if(length(dim(tab))==1) tab=cbind(f=t...
/R/freq_xtable_totale.R
no_license
livioivil/rospo
R
false
false
765
r
#'@name freq_xtable_totale #'@title freq_xtable_totale #'@description as xtable, but put a line between befor the total. Also substitute `Sum` with `Totale` #'@param tab a freq table #'@param digits as in xtable #'@export freq_xtable_totale <-function(tab,digits = NULL,...){ if(length(dim(tab))==1) tab=cbind(f=t...
### tests for df_ functions context("df_") # df_standardize ------------------------------------------------------------------ set.seed(1) l_dfs = list(t1 = df_standardize(iris, messages = F), t2 = df_standardize(iris, exclude_factors = F, messages = F), t3 = df_standardize(iris, w = runif(1...
/tests/testthat/test_df.R
permissive
sbibauw/kirkegaard
R
false
false
13,396
r
### tests for df_ functions context("df_") # df_standardize ------------------------------------------------------------------ set.seed(1) l_dfs = list(t1 = df_standardize(iris, messages = F), t2 = df_standardize(iris, exclude_factors = F, messages = F), t3 = df_standardize(iris, w = runif(1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GatingSet2GatingML_hack_version.R \name{gatingML} \alias{gatingML} \title{this function retrieves the gates from GatingSet and writes a customed GatingML-2.0 file which can then be imported into cytobank operation: 1. Read in gate geomet...
/man/gatingML.Rd
no_license
malisas/flowIncubator
R
false
true
1,306
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GatingSet2GatingML_hack_version.R \name{gatingML} \alias{gatingML} \title{this function retrieves the gates from GatingSet and writes a customed GatingML-2.0 file which can then be imported into cytobank operation: 1. Read in gate geomet...
library(LabourMarketAreas) ### Name: findClusters ### Title: findClusters ### Aliases: findClusters ### ** Examples out<- findClusters(LWCom=Brindisi, minSZ=1000,minSC=0.6667,tarSZ=10000,tarSC=0.75, verbose=TRUE)
/data/genthat_extracted_code/LabourMarketAreas/examples/findClusters.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
221
r
library(LabourMarketAreas) ### Name: findClusters ### Title: findClusters ### Aliases: findClusters ### ** Examples out<- findClusters(LWCom=Brindisi, minSZ=1000,minSC=0.6667,tarSZ=10000,tarSC=0.75, verbose=TRUE)
\name{ccfkms} \alias{ccfkms} \title{Clustering with Conjugate Convex Functions} \description{ Partition a data set into convex sets using conjugate convex functions. } \usage{ ccfkms(x, n, p = NULL, par = 2, max.iter = 100, opt.std = FALSE, opt.retry = 0, debug = FALSE) } \arguments{ \item{x}{a data matrix.}...
/man/ccfkms.Rd
no_license
cran/cba
R
false
false
3,687
rd
\name{ccfkms} \alias{ccfkms} \title{Clustering with Conjugate Convex Functions} \description{ Partition a data set into convex sets using conjugate convex functions. } \usage{ ccfkms(x, n, p = NULL, par = 2, max.iter = 100, opt.std = FALSE, opt.retry = 0, debug = FALSE) } \arguments{ \item{x}{a data matrix.}...
library(knitr) (f = system.file("examples", "knitr-minimal.Rnw", package = "knitr")) knit(f) # compile to tex purl(f) # tangle R code purl(f, documentation = 0) # extract R code only purl(f, documentation = 2) # also include documentation
/report/knit2.R
no_license
DUanalytics/rAnalytics
R
false
false
244
r
library(knitr) (f = system.file("examples", "knitr-minimal.Rnw", package = "knitr")) knit(f) # compile to tex purl(f) # tangle R code purl(f, documentation = 0) # extract R code only purl(f, documentation = 2) # also include documentation
library(tidyverse) library(cowplot) datasaurus <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-10-13/datasaurus.csv') dtsaurus <- datasaurus %>% mutate(dataset = str_to_title(str_replace(dataset, "_", " "))) p <- ggplot(dtsaurus, aes(x, y)) + stat_density_...
/2020-week42/datasaurus.R
permissive
FBaudron/tidytuesday
R
false
false
1,444
r
library(tidyverse) library(cowplot) datasaurus <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-10-13/datasaurus.csv') dtsaurus <- datasaurus %>% mutate(dataset = str_to_title(str_replace(dataset, "_", " "))) p <- ggplot(dtsaurus, aes(x, y)) + stat_density_...
# Load the libraries----------------------------------------------------------- library(shiny) library(tidyverse) # Read in Dataset--------------------------------------------------------------- dataset <- read.csv("https://query.data.world/s/x7qrjzoufcjzx6agzg5d6omncpzup7", header = TRUE, string...
/app_server.R
no_license
nmnobbs/final
R
false
false
8,714
r
# Load the libraries----------------------------------------------------------- library(shiny) library(tidyverse) # Read in Dataset--------------------------------------------------------------- dataset <- read.csv("https://query.data.world/s/x7qrjzoufcjzx6agzg5d6omncpzup7", header = TRUE, string...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/radius_of_gyration.R \name{radius.of.gyration} \alias{radius.of.gyration} \title{Radius of gyration for human mobility} \usage{ radius.of.gyration(lat, lon, w = rep(1, length(lat))) } \arguments{ \item{lat, lon}{The geographic coordinates of ...
/man/radius.of.gyration.Rd
no_license
caojinzhou/movr
R
false
true
848
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/radius_of_gyration.R \name{radius.of.gyration} \alias{radius.of.gyration} \title{Radius of gyration for human mobility} \usage{ radius.of.gyration(lat, lon, w = rep(1, length(lat))) } \arguments{ \item{lat, lon}{The geographic coordinates of ...
# Libraries library(sp) library(raster) library(dplyr) # File Names dataCSVFileName = "traffic_violations.csv" dataRDSFileName = "traffic_violations.rds" # Save CSV as Binary if(!file.exists(dataRDSFileName)) { dataCSV = read.csv(dataCSVFileName) saveRDS(dataCSV, dataRDSFileName) } # Read Data data = readRDS(da...
/traffic_analysis.R
no_license
Erlchr/TrafficViolations
R
false
false
1,648
r
# Libraries library(sp) library(raster) library(dplyr) # File Names dataCSVFileName = "traffic_violations.csv" dataRDSFileName = "traffic_violations.rds" # Save CSV as Binary if(!file.exists(dataRDSFileName)) { dataCSV = read.csv(dataCSVFileName) saveRDS(dataCSV, dataRDSFileName) } # Read Data data = readRDS(da...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{print.psrange} \alias{print.psrange} \title{Prints information about a psrange result.} \usage{ \method{print}{psrange}(x, ...) } \arguments{ \item{x}{psrange to print info about.} \item{...}{currently unused} } \description{ Prints information about a psrange...
/man/print.psrange.Rd
no_license
Libardo1/multilevelPSA
R
false
false
332
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{print.psrange} \alias{print.psrange} \title{Prints information about a psrange result.} \usage{ \method{print}{psrange}(x, ...) } \arguments{ \item{x}{psrange to print info about.} \item{...}{currently unused} } \description{ Prints information about a psrange...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_sqlite.R \name{create_sqlite} \alias{create_sqlite} \title{Make a new ODM2 sqlite database} \usage{ create_sqlite(dir = ".", filename = "odm2", connect = FALSE) } \arguments{ \item{dir}{Name of existing directory for the sqlite databas...
/man/create_sqlite.Rd
permissive
DagHjermann/rodm2
R
false
true
879
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_sqlite.R \name{create_sqlite} \alias{create_sqlite} \title{Make a new ODM2 sqlite database} \usage{ create_sqlite(dir = ".", filename = "odm2", connect = FALSE) } \arguments{ \item{dir}{Name of existing directory for the sqlite databas...
#' TransformSigma_PDtoR3 #' #' @param vec A length 3 vector of the variance of equation 1, followed by the #' covariance of equations 1 and 2, followed by the variance of equation 2. #' #' @return A length 3 vector spanning unrestricted R3. #' #' @export #' #' @examples #'PD_vec <- c(1, 0, 1) #'Transform...
/R/Disequilibrium.R
no_license
NateLatshaw/Disequilibrium
R
false
false
53,577
r
#' TransformSigma_PDtoR3 #' #' @param vec A length 3 vector of the variance of equation 1, followed by the #' covariance of equations 1 and 2, followed by the variance of equation 2. #' #' @return A length 3 vector spanning unrestricted R3. #' #' @export #' #' @examples #'PD_vec <- c(1, 0, 1) #'Transform...
library(shiny) library(data.table) source('./ui.R') library(flowCore) library(shinyalert) source('./global.R') library(shinyWidgets) options(bitmapType='cairo') # maximum size 10000MB options(shiny.maxRequestSize = 1024*1024*100*100) # plan('multicore') shinyServer = function(input, output, session) { v = reactive...
/inst/shiny/server.R
no_license
EnJun-Yang/cytofkit2
R
false
false
77,861
r
library(shiny) library(data.table) source('./ui.R') library(flowCore) library(shinyalert) source('./global.R') library(shinyWidgets) options(bitmapType='cairo') # maximum size 10000MB options(shiny.maxRequestSize = 1024*1024*100*100) # plan('multicore') shinyServer = function(input, output, session) { v = reactive...
#' Create an animation by specifying the frame membership directly #' #' This transition allows you to map a variable in your data to a specific frame #' in the animation. No tweening of data will be made and the number of frames #' in the animation will be decided by the number of levels in the frame #' variable. #' #...
/R/transition-manual.R
no_license
tgrimes/gganimate
R
false
false
3,900
r
#' Create an animation by specifying the frame membership directly #' #' This transition allows you to map a variable in your data to a specific frame #' in the animation. No tweening of data will be made and the number of frames #' in the animation will be decided by the number of levels in the frame #' variable. #' #...
# title : home credit # author : jacob # library options(scipen = 999) rm(list=ls()) gc(reset=TRUE) library(data.table) library(e1071) library(caret) library(Metrics) require(Matrix) require(lightgbm) library(xgboost) library(catboost) library(rBayesianOptimization) # path path_code = "~/GitHub/2econsulting/K...
/R/lightgbm_w_bayesianOptimization/base/homecredit_w_ERROR.R
no_license
2econsulting/rAutoML
R
false
false
1,747
r
# title : home credit # author : jacob # library options(scipen = 999) rm(list=ls()) gc(reset=TRUE) library(data.table) library(e1071) library(caret) library(Metrics) require(Matrix) require(lightgbm) library(xgboost) library(catboost) library(rBayesianOptimization) # path path_code = "~/GitHub/2econsulting/K...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/castToMatrix.R \name{castToMatrix} \alias{castToMatrix} \title{Cast a data.table to a matrix} \usage{ castToMatrix(data, formula, value.var, fun.aggregate, fill = NA, ...) } \arguments{ \item{data}{ A \code{data.table}.} \item{formula}{A for...
/man/castToMatrix.Rd
no_license
nstroustrup/HelpingHand
R
false
true
1,397
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/castToMatrix.R \name{castToMatrix} \alias{castToMatrix} \title{Cast a data.table to a matrix} \usage{ castToMatrix(data, formula, value.var, fun.aggregate, fill = NA, ...) } \arguments{ \item{data}{ A \code{data.table}.} \item{formula}{A for...
# Akash Lodha # Data Science Specialisation - Coursera # Course 3 - Getting and cleading data # Quiz 2 # Question 2 # The sqldf package allows for execution of SQL commands on R data frames. We will use the sqldf package to practice the queries we might send with the dbSendQuery command in RMySQL. Download the...
/GEttingAndCleaningData/q2.R
no_license
lodhaakash07/DataScienceTrack
R
false
false
2,424
r
# Akash Lodha # Data Science Specialisation - Coursera # Course 3 - Getting and cleading data # Quiz 2 # Question 2 # The sqldf package allows for execution of SQL commands on R data frames. We will use the sqldf package to practice the queries we might send with the dbSendQuery command in RMySQL. Download the...
default_template <- function(file, feature_num){ Utxt <- sapply(1:feature_num, function(ii){ paste(c('U', ii, ':%x[0,', ii-1, ']\n'), collapse = '') }) Btxt <- c('B\n') cat(c('# Unigram\n', Utxt,'\n# Bigram\n', Btxt), file = file ) }
/R/default_template.R
no_license
cangfengzhe/BioNER
R
false
false
249
r
default_template <- function(file, feature_num){ Utxt <- sapply(1:feature_num, function(ii){ paste(c('U', ii, ':%x[0,', ii-1, ']\n'), collapse = '') }) Btxt <- c('B\n') cat(c('# Unigram\n', Utxt,'\n# Bigram\n', Btxt), file = file ) }
library(secr) ### Name: read.capthist ### Title: Import or export data ### Aliases: read.capthist write.capthist ### Keywords: IO ### ** Examples ## export ovenbird capture histories ## the files "ovenCHcapt.txt" and "ovenCHtrap.txt" are ## placed in the current folder (check with dir()) write.capthist(ovenCH) ...
/data/genthat_extracted_code/secr/examples/DENSITY.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
322
r
library(secr) ### Name: read.capthist ### Title: Import or export data ### Aliases: read.capthist write.capthist ### Keywords: IO ### ** Examples ## export ovenbird capture histories ## the files "ovenCHcapt.txt" and "ovenCHtrap.txt" are ## placed in the current folder (check with dir()) write.capthist(ovenCH) ...
#' @import ape # input: pars - c(alp1, alp2, ..., sig1, sig2,...,the1...theN, root), map, vcv and vector of size 4 giving the number of regime every parameter is undergoing for nr # does: calculate log-likelihood; see Butler and King 2004, appendix eq. A8 and A9 and Beaulieu et al. 2012 lik_ou <- function(x, n, pars,...
/R/lik_ou.R
no_license
theogab/bite
R
false
false
1,871
r
#' @import ape # input: pars - c(alp1, alp2, ..., sig1, sig2,...,the1...theN, root), map, vcv and vector of size 4 giving the number of regime every parameter is undergoing for nr # does: calculate log-likelihood; see Butler and King 2004, appendix eq. A8 and A9 and Beaulieu et al. 2012 lik_ou <- function(x, n, pars,...
context("polygons") test_that("winding number works", { ## expect point inside polygon polyX = c(1, 1, -1, -1, 1) polyY = c(-1, 1, 1, -1, -1) pointX = 0 pointY = 0 expect_gt(WindingNumber(pointX, pointY, polyX, polyY), 0) ## expect point outside polygon pointX = 2 pointY = 2 expect_equal(WindingNumber(p...
/tests/testthat/test-polygons.R
no_license
floswald/spatial.data.table
R
false
false
1,535
r
context("polygons") test_that("winding number works", { ## expect point inside polygon polyX = c(1, 1, -1, -1, 1) polyY = c(-1, 1, 1, -1, -1) pointX = 0 pointY = 0 expect_gt(WindingNumber(pointX, pointY, polyX, polyY), 0) ## expect point outside polygon pointX = 2 pointY = 2 expect_equal(WindingNumber(p...
# En una empresa el Jefe de Producción plantea que el 20% de los tornillos producidos por una # máquina son defectuosos, toma una muestra de cuatro tornillos. # a) Determinar la variable bajo estudio. Indique los supuestos que debe realizar para justificar el # modelo elegido. n = 4 p = .2 # b) Determine la función de...
/tp3_p23.r
no_license
MarianoSaez/TP3-ESTAD_2020
R
false
false
932
r
# En una empresa el Jefe de Producción plantea que el 20% de los tornillos producidos por una # máquina son defectuosos, toma una muestra de cuatro tornillos. # a) Determinar la variable bajo estudio. Indique los supuestos que debe realizar para justificar el # modelo elegido. n = 4 p = .2 # b) Determine la función de...
plot4 <- function() { ## This assignment uses data from the UC Irvine Machine Learning Repository ## Dataset: Electric power consumption [20Mb] ## Description: Measurements of electric power consumption in one household with a one-minute sampling ## rate over a period of almost 4 years. Different elect...
/plot4.R
no_license
elzbkiel/ExData_Plotting1
R
false
false
3,623
r
plot4 <- function() { ## This assignment uses data from the UC Irvine Machine Learning Repository ## Dataset: Electric power consumption [20Mb] ## Description: Measurements of electric power consumption in one household with a one-minute sampling ## rate over a period of almost 4 years. Different elect...
setwd("D:\\WORK\\风控征信\\FICO评分结果\\评分结果0510_A") library(digest) library(readr) library(dplyr) file = list.files(".\\") df <- NULL for(i in 1:length(file)) { print(file[i]) d <- read.csv(file[i],stringsAsFactors = F,colClasses=c("character")) df <- rbind(df,d) } md5 <- function(x){ digest(x,algo = "md5",seria...
/FICO.R
no_license
AlKavaev/RSource
R
false
false
4,457
r
setwd("D:\\WORK\\风控征信\\FICO评分结果\\评分结果0510_A") library(digest) library(readr) library(dplyr) file = list.files(".\\") df <- NULL for(i in 1:length(file)) { print(file[i]) d <- read.csv(file[i],stringsAsFactors = F,colClasses=c("character")) df <- rbind(df,d) } md5 <- function(x){ digest(x,algo = "md5",seria...
#' Create pretty table from \code{clusso} output #' #'@title #'clussopretty #'@description #'This function takes the cluster detection results from the \code{clusso} function and creates a nice table of detected clusters. #'@param outclusso Object with output from \code{clusso}. #'@param analysis A stri...
/R/clussopretty.R
no_license
mkamenet3/clusso
R
false
false
35,904
r
#' Create pretty table from \code{clusso} output #' #'@title #'clussopretty #'@description #'This function takes the cluster detection results from the \code{clusso} function and creates a nice table of detected clusters. #'@param outclusso Object with output from \code{clusso}. #'@param analysis A stri...