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
#################################################################################################" #################### February 2019 ##########################" #################### Computing the mean of climatic variables ##########################" ################### ...
/scripts/DataMunging/02_CalculatingProvAnnualClimaticVariables.R
no_license
JulietteArchambeau/HeightPinpinClonapin
R
false
false
1,564
r
#################################################################################################" #################### February 2019 ##########################" #################### Computing the mean of climatic variables ##########################" ################### ...
# 1. How is the power consumption per hour? # 2. How is the power consumption over days? # 3. How do temperature and consumption vary? train_nonNa <- train_meta_lj %>% na.omit() head(train_nonNa$consumption) ggplot(train_nonNa) + facet_grid(consumption ~ factor(hour)) getwd()
/scripts/02_visualization.R
no_license
saurabhkankriya/Power-Consumption-Challenge
R
false
false
286
r
# 1. How is the power consumption per hour? # 2. How is the power consumption over days? # 3. How do temperature and consumption vary? train_nonNa <- train_meta_lj %>% na.omit() head(train_nonNa$consumption) ggplot(train_nonNa) + facet_grid(consumption ~ factor(hour)) getwd()
\name{seizure} \alias{seizure} \non_function{} \title{Epiliptic Seizures} \usage{data(seizure)} \description{ The dataset has the number of epiliptic seizures in each of four two-week intervals,and in a baseline eight-week inverval, for treatment and control groups with a total of 59 individuals. } \format{ This d...
/man/seizure.Rd
no_license
cran/wgeesel
R
false
false
1,240
rd
\name{seizure} \alias{seizure} \non_function{} \title{Epiliptic Seizures} \usage{data(seizure)} \description{ The dataset has the number of epiliptic seizures in each of four two-week intervals,and in a baseline eight-week inverval, for treatment and control groups with a total of 59 individuals. } \format{ This d...
library(simPH) ### Name: simGG.simlinear ### Title: Plot simulated linear, non-time interacted quantities of ### interest from Cox Proportional Hazards Models ### Aliases: simGG.simlinear ### ** Examples # Load survival package library(survival) # Load Carpenter (2002) data data("CarpenterFdaData") # Estimate b...
/data/genthat_extracted_code/simPH/examples/simGG.simlinear.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,262
r
library(simPH) ### Name: simGG.simlinear ### Title: Plot simulated linear, non-time interacted quantities of ### interest from Cox Proportional Hazards Models ### Aliases: simGG.simlinear ### ** Examples # Load survival package library(survival) # Load Carpenter (2002) data data("CarpenterFdaData") # Estimate b...
#--------------------------------------------------------------------------------------- #I confirm that the attached is my own work, except where clearly indicated in the text #--------------------------------------------------------------------------------------- Marsaglia.method <- function() { #Function of "Marsa...
/959993207.r
no_license
erex/MT4113-2015
R
false
false
5,123
r
#--------------------------------------------------------------------------------------- #I confirm that the attached is my own work, except where clearly indicated in the text #--------------------------------------------------------------------------------------- Marsaglia.method <- function() { #Function of "Marsa...
# UI ---------------------------------------------------------------------- display_info_ui <- function(id) { ns <- NS(id) tagList( uiOutput(outputId = ns('label')) ) } # Server ------------------------------------------------------------------ display_info_server <- function(id, authentification, ...
/R/module_display_info.R
permissive
pr2database/metapr2-shiny
R
false
false
1,026
r
# UI ---------------------------------------------------------------------- display_info_ui <- function(id) { ns <- NS(id) tagList( uiOutput(outputId = ns('label')) ) } # Server ------------------------------------------------------------------ display_info_server <- function(id, authentification, ...
rm(list=ls()) library(INLA) library(rgdal) library(ggplot2) library(splancs) library(sp) # Users of this script can pass in other locations to project to. Search for the read.csv() line # that stores the info in the object 'myAreas' below runFromDB = TRUE sppList = as.character(read.csv("speciesNames.csv",header=F)[...
/goaTrawl/R Scripts/processINLAOutput.R
no_license
NCEAS/pfx-groundfish
R
false
false
11,404
r
rm(list=ls()) library(INLA) library(rgdal) library(ggplot2) library(splancs) library(sp) # Users of this script can pass in other locations to project to. Search for the read.csv() line # that stores the info in the object 'myAreas' below runFromDB = TRUE sppList = as.character(read.csv("speciesNames.csv",header=F)[...
#' Makes adjacent or sliding windows across a genome or BED file. #' #' @param g <genome> OR #' @param b <bed> #' @param w <window_size> OR #' @param s <step_size> #' Step size: i.e., how many base pairs to step before #' creating a new window. Used to create "sliding" windows. #' - Defaults to window size (non-...
/R/bt.makewindows.R
permissive
PhanstielLab/bedtoolsr
R
false
false
2,205
r
#' Makes adjacent or sliding windows across a genome or BED file. #' #' @param g <genome> OR #' @param b <bed> #' @param w <window_size> OR #' @param s <step_size> #' Step size: i.e., how many base pairs to step before #' creating a new window. Used to create "sliding" windows. #' - Defaults to window size (non-...
## make climate file # libs required # library(tidyverse) # library(lubridate) ## Path scenarios climate file # path <- '//dapadfs/Workspace_cluster_9/USAID_Project/Product_3_agro-climatic_forecast/crop/Rice/Clima/Escenarios/' # path <- 'D:/CIAT/USAID/DSSAT/multiple_runs/R-DSSATv4.6/stations/Forecasts/Escenarios_upda...
/modeloArroz/make_weather.R
no_license
CIAT-DAPA/usaid_procesos_interfaz
R
false
false
1,337
r
## make climate file # libs required # library(tidyverse) # library(lubridate) ## Path scenarios climate file # path <- '//dapadfs/Workspace_cluster_9/USAID_Project/Product_3_agro-climatic_forecast/crop/Rice/Clima/Escenarios/' # path <- 'D:/CIAT/USAID/DSSAT/multiple_runs/R-DSSATv4.6/stations/Forecasts/Escenarios_upda...
#### 5.1 Situation 1 (Construction of CV) rm(list=ls()) n <- 4000 ite <- 300 x_cate <- 4 gamma_estimate <- seq(1,1,length.out = ite) gamma_estimate2 <- seq(1,1,length.out = ite) var_list2 <- seq(1,1,length.out = ite) count_list2 <- 0.0 gamma_estimate3 <- seq(1,1,length.out = ite) gamma_estimate4 <- seq(1,1,length.out...
/NMAR/Expert-1-1cv-revise-expectation.R
no_license
masa-ue/statistics
R
false
false
14,231
r
#### 5.1 Situation 1 (Construction of CV) rm(list=ls()) n <- 4000 ite <- 300 x_cate <- 4 gamma_estimate <- seq(1,1,length.out = ite) gamma_estimate2 <- seq(1,1,length.out = ite) var_list2 <- seq(1,1,length.out = ite) count_list2 <- 0.0 gamma_estimate3 <- seq(1,1,length.out = ite) gamma_estimate4 <- seq(1,1,length.out...
library(DIME) ### Name: nudge.plot.comp ### Title: Plot NUDGE Individual Components ### Aliases: nudge.plot.comp ### Keywords: aplot dplot ### ** Examples library(DIME); # generate simulated datasets with underlying uniform and 1-normal components set.seed(1234); N1 <- 1500; N2 <- 500; rmu <- c(1.5); rsigma <- c(1)...
/data/genthat_extracted_code/DIME/examples/nudge.plot.comp.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
803
r
library(DIME) ### Name: nudge.plot.comp ### Title: Plot NUDGE Individual Components ### Aliases: nudge.plot.comp ### Keywords: aplot dplot ### ** Examples library(DIME); # generate simulated datasets with underlying uniform and 1-normal components set.seed(1234); N1 <- 1500; N2 <- 500; rmu <- c(1.5); rsigma <- c(1)...
library(ape) testtree <- read.tree("5968_5.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="5968_5_unrooted.txt")
/codeml_files/newick_trees_processed/5968_5/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("5968_5.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="5968_5_unrooted.txt")
rankall <- function(outcome, num = "best") { ## Read outcome data data_ini <- read.csv("outcome-of-care-measures.csv", colClasses = "character") data_ini$State <- as.factor(data_ini$State) data<-data_ini[,c("State","Hospital.Name")] ## Check that state and outcome are valid if (outcome=="heart attack"){ ...
/rprog/rprog-data-ProgAssignment3-data/rankall.R
no_license
garoegonzalez/datasciencecoursera
R
false
false
1,910
r
rankall <- function(outcome, num = "best") { ## Read outcome data data_ini <- read.csv("outcome-of-care-measures.csv", colClasses = "character") data_ini$State <- as.factor(data_ini$State) data<-data_ini[,c("State","Hospital.Name")] ## Check that state and outcome are valid if (outcome=="heart attack"){ ...
library(plyr) library(arules) library(arulesViz) data_csv = read.csv('OnlineRetail.csv') items = ddply(data_csv,c("InvoiceNo"), function(x)paste(x$Description, collapse = ",")) names(items)=c('Invoice_no','Description') dataset=data.frame(items$Description) write.table(dataset,"Items_List.csv",quote=FALSE,row.na...
/MLA/assg7/mba_final.R
no_license
niravsshaha/PICTLAB
R
false
false
730
r
library(plyr) library(arules) library(arulesViz) data_csv = read.csv('OnlineRetail.csv') items = ddply(data_csv,c("InvoiceNo"), function(x)paste(x$Description, collapse = ",")) names(items)=c('Invoice_no','Description') dataset=data.frame(items$Description) write.table(dataset,"Items_List.csv",quote=FALSE,row.na...
\name{generic_ews} \alias{generic_ews} \title{Description: Generic Early Warning Signals} \usage{ generic_ews(timeseries, winsize = 50, detrending = c("no", "gaussian", "linear", "first-diff"), bandwidth = NULL, logtransform = FALSE, interpolate = FALSE, AR_n = FALSE, powerspectrum = FALSE) } \argumen...
/WICC_application_folder/Dakos_Lahti_DatasetsExecutables/earlywarnings/man/generic_ews.Rd
no_license
yuanmingshdyy/development
R
false
false
4,593
rd
\name{generic_ews} \alias{generic_ews} \title{Description: Generic Early Warning Signals} \usage{ generic_ews(timeseries, winsize = 50, detrending = c("no", "gaussian", "linear", "first-diff"), bandwidth = NULL, logtransform = FALSE, interpolate = FALSE, AR_n = FALSE, powerspectrum = FALSE) } \argumen...
#' Plot estimated track, behavioural states and observations on a map. #' #' Takes a fitted \code{fit_ssm} object and plots the observed (data) and estimated #' locations on a map. For the behavioural models (DCRWS, hDCRWS), the estimated #' locations are coloured according to the posterior mean behavioural state es...
/R/map_ssm.R
no_license
farcego/bsam
R
false
false
4,894
r
#' Plot estimated track, behavioural states and observations on a map. #' #' Takes a fitted \code{fit_ssm} object and plots the observed (data) and estimated #' locations on a map. For the behavioural models (DCRWS, hDCRWS), the estimated #' locations are coloured according to the posterior mean behavioural state es...
# Code for QC of CSV files generated from GIA Server # QC of Nation-CL1 Rx Trends Tab at Nation and RM Level dp <- "H:\\01. GIP BAI\\MBR\\Automation\\Automation" dpv <- "" dpv[1]<- "H:\\01. GIP BAI\\MBR\\Automation\\Automation\\POA\\CL2_Nation" dpv[2]<- "H:\\01. GIP BAI\\MBR\\Automation\\Automation\\PO...
/R-Codes/POA Codes/POA-CL2 QC Code.R
no_license
namann1209/pehla_account
R
false
false
2,363
r
# Code for QC of CSV files generated from GIA Server # QC of Nation-CL1 Rx Trends Tab at Nation and RM Level dp <- "H:\\01. GIP BAI\\MBR\\Automation\\Automation" dpv <- "" dpv[1]<- "H:\\01. GIP BAI\\MBR\\Automation\\Automation\\POA\\CL2_Nation" dpv[2]<- "H:\\01. GIP BAI\\MBR\\Automation\\Automation\\PO...
# formatKrakenTaxonomyCounts.R # Purpose: to format kraken output files for downstream taxonomy-based analyses, with counts of sequences assigned to each taxonomic assignment library(stringr) library(argparse) options(stringsAsFactors=F) parser=ArgumentParser() parser$add_argument("-i", "--inputFile", help="Input krak...
/scripts/formatKrakenTaxonomyCounts.R
no_license
lkov0/bladderwort-analysis
R
false
false
1,246
r
# formatKrakenTaxonomyCounts.R # Purpose: to format kraken output files for downstream taxonomy-based analyses, with counts of sequences assigned to each taxonomic assignment library(stringr) library(argparse) options(stringsAsFactors=F) parser=ArgumentParser() parser$add_argument("-i", "--inputFile", help="Input krak...
### title: "MGMTMFE407-2 HW5" ### author: "Cohort 2, Group 7 - Hyeuk Jung, Jiaqi Li, Xichen Luo, Huanyu Liu" ### date: "March , 2019" library(data.table) library(dplyr) library(sandwich) library(ggplot2) #http://www.sthda.com/english/wiki/print.php?id=206 #http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_l...
/hw5/HW5_Group7-Cohort2.R
no_license
JohnnyBarber/Empirical-Method
R
false
false
6,747
r
### title: "MGMTMFE407-2 HW5" ### author: "Cohort 2, Group 7 - Hyeuk Jung, Jiaqi Li, Xichen Luo, Huanyu Liu" ### date: "March , 2019" library(data.table) library(dplyr) library(sandwich) library(ggplot2) #http://www.sthda.com/english/wiki/print.php?id=206 #http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/data_l...
library(shiny) library(safetyGraphics) library(dplyr) meta <- rbind( safetyCharts::meta_labs, safetyCharts::meta_aes, safetyCharts::meta_dm, safetyCharts::meta_hepExplorer ) #reactlogReset() measure_meta <- meta%>%filter(domain=="labs")%>%filter(col_key=="measure_col") mm_default<-data.frame( text_key = c...
/tests/testthat/module_examples/mappingDomain/app.R
permissive
SafetyGraphics/safetyGraphics
R
false
false
3,042
r
library(shiny) library(safetyGraphics) library(dplyr) meta <- rbind( safetyCharts::meta_labs, safetyCharts::meta_aes, safetyCharts::meta_dm, safetyCharts::meta_hepExplorer ) #reactlogReset() measure_meta <- meta%>%filter(domain=="labs")%>%filter(col_key=="measure_col") mm_default<-data.frame( text_key = c...
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554...
/DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615833048-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
2,047
r
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554...
test_that("should_stop_for_warnings", { withr::local_options(pkg.build_stop_for_warnings = NULL) withr::local_envvar(PKG_BUILD_STOP_FOR_WARNINGS = NA_character_) expect_false(should_stop_for_warnings()) withr::local_options(pkg.build_stop_for_warnings = FALSE) withr::local_envvar(PKG_BUILD_STOP_FOR_WARNINGS...
/tests/testthat/test-utils.R
permissive
r-lib/pkgbuild
R
false
false
3,936
r
test_that("should_stop_for_warnings", { withr::local_options(pkg.build_stop_for_warnings = NULL) withr::local_envvar(PKG_BUILD_STOP_FOR_WARNINGS = NA_character_) expect_false(should_stop_for_warnings()) withr::local_options(pkg.build_stop_for_warnings = FALSE) withr::local_envvar(PKG_BUILD_STOP_FOR_WARNINGS...
setwd('F:\\Library\\Analytics Path\\02-R\\02-R DataSets\\Sentiment Analysis and Navie Baye') sms_raw<-read.csv('sms_spam.csv') head(sms_raw) View(sms_raw) sms_raw$type<-as.factor(sms_raw$type) str(sms_raw) library(tm) library(NLP) sms_corpus<-Corpus(VectorSource(sms_raw$text)) clean_corpus<-tm_map(...
/03_R_Codes/08_NLP/02_Naive_Baye's_Classification/01_NaiveBayes.R
no_license
wenki1990/Data_Science_1
R
false
false
3,384
r
setwd('F:\\Library\\Analytics Path\\02-R\\02-R DataSets\\Sentiment Analysis and Navie Baye') sms_raw<-read.csv('sms_spam.csv') head(sms_raw) View(sms_raw) sms_raw$type<-as.factor(sms_raw$type) str(sms_raw) library(tm) library(NLP) sms_corpus<-Corpus(VectorSource(sms_raw$text)) clean_corpus<-tm_map(...
# place the data file in the same directory as this .R file # Set working directory for my own use, comment / replace with your own. #setwd("C:/MOOC/Exploratory Data Analysis/Project 1/plot3") setwd("C:/Documents and Settings/gohks/Desktop/Exploratory Data Analysis/Project 1/plot3") # read in data file data <- read...
/plot3.R
no_license
gohks/ExData_Plotting1
R
false
false
1,484
r
# place the data file in the same directory as this .R file # Set working directory for my own use, comment / replace with your own. #setwd("C:/MOOC/Exploratory Data Analysis/Project 1/plot3") setwd("C:/Documents and Settings/gohks/Desktop/Exploratory Data Analysis/Project 1/plot3") # read in data file data <- read...
rm(list=ls()) library(tidyverse) library(glmnet) library(spaMM) library(ranger) # modify your working directory with the data file if necessary (using the setwd() command): # setwd("my-working-directory") # read data: load("d1.RData") load("d2.RData") load("d3.RData") data_train_DF=rbind(d1,d2,d3) rm(d1,d2,d3) summa...
/Competition_dm_2.R
no_license
rempart/feux
R
false
false
8,475
r
rm(list=ls()) library(tidyverse) library(glmnet) library(spaMM) library(ranger) # modify your working directory with the data file if necessary (using the setwd() command): # setwd("my-working-directory") # read data: load("d1.RData") load("d2.RData") load("d3.RData") data_train_DF=rbind(d1,d2,d3) rm(d1,d2,d3) summa...
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 fourierin_1d_cpp <- function(f, a, b, c, d, r, s) { .Call(`_fourierin_fourierin_1d_cpp`, f, a, b, c, d, r, s) } fourierin_1d_nonregular_cpp <- function(f, a, b, w, resolution, r, s) { ...
/fuzzedpackages/fourierin/R/RcppExports.R
no_license
akhikolla/testpackages
R
false
false
1,415
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 fourierin_1d_cpp <- function(f, a, b, c, d, r, s) { .Call(`_fourierin_fourierin_1d_cpp`, f, a, b, c, d, r, s) } fourierin_1d_nonregular_cpp <- function(f, a, b, w, resolution, r, s) { ...
| pc = 0xc002 | a = 0xc0 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 10110100 | | pc = 0xc005 | a = 0xc0 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 10110100 | MEM[0x010f] = 0xc0 | | pc = 0xc007 | a = 0xa5 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 10110100 | | pc = 0xc009 | a = 0xa5 | x = 0x00...
/res/lda_absolute.r
permissive
JSpuri/EmuParadise
R
false
false
591
r
| pc = 0xc002 | a = 0xc0 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 10110100 | | pc = 0xc005 | a = 0xc0 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 10110100 | MEM[0x010f] = 0xc0 | | pc = 0xc007 | a = 0xa5 | x = 0x00 | y = 0x00 | sp = 0x01fd | p[NV-BDIZC] = 10110100 | | pc = 0xc009 | a = 0xa5 | x = 0x00...
seq(5) # find "working directory" or project folder getwd() # use CTRL+ENTER to run code lines # see Code menu for other ways to run # save values to "objects" weight_kg <- 55 weight_kg weight_lb <- weight_kg * 2.2 weight_lb # use functions seq(5) weight_kg_sqrt <- sqrt(weight_kg) round(weight_kg_sqrt) # for he...
/Scripts/Basics.R
no_license
ChristinaLK/DC-prep
R
false
false
367
r
seq(5) # find "working directory" or project folder getwd() # use CTRL+ENTER to run code lines # see Code menu for other ways to run # save values to "objects" weight_kg <- 55 weight_kg weight_lb <- weight_kg * 2.2 weight_lb # use functions seq(5) weight_kg_sqrt <- sqrt(weight_kg) round(weight_kg_sqrt) # for he...
context("get_immig_rate") test_that("classic behavior", { carr_cap <- 10 ps_imm_rate <- 0.1 n_island_species <- 5 n_mainland_species <- 2 expected <- DAISIE_calc_clade_imm_rate( ps_imm_rate = ps_imm_rate, n_island_species = n_island_species, n_mainland_species = n_mainland_species, carr_ca...
/tests/testthat/test-get_immig_rate.R
no_license
xieshu95/Test-Trasie
R
false
false
641
r
context("get_immig_rate") test_that("classic behavior", { carr_cap <- 10 ps_imm_rate <- 0.1 n_island_species <- 5 n_mainland_species <- 2 expected <- DAISIE_calc_clade_imm_rate( ps_imm_rate = ps_imm_rate, n_island_species = n_island_species, n_mainland_species = n_mainland_species, carr_ca...
epc<-read.csv("household_power_consumption.txt",sep=";") epc$Time<-strptime(paste(epc$Date,epc$Time),format="%d/%m/%Y %H:%M:%S") epc$Date<-as.Date(epc$Date,format="%d/%m/%Y") sepc<-subset(epc,Date==as.Date("2007-02-01") | Date==as.Date("2007-02-02")) sepc$Global_active_power<-as.numeric(as.character(sepc$Global_active_...
/plot4.R
no_license
mpancotti/ExData_Plotting1
R
false
false
1,340
r
epc<-read.csv("household_power_consumption.txt",sep=";") epc$Time<-strptime(paste(epc$Date,epc$Time),format="%d/%m/%Y %H:%M:%S") epc$Date<-as.Date(epc$Date,format="%d/%m/%Y") sepc<-subset(epc,Date==as.Date("2007-02-01") | Date==as.Date("2007-02-02")) sepc$Global_active_power<-as.numeric(as.character(sepc$Global_active_...
#sqldf package allows the ability to read specific rows from a csv file using a sql syntax #install.packages("sqldf") library(sqldf) plot1 <- function(){ # Read the file, only contents for the two dates we are interested in edata <- read.csv.sql(file = "./data/household_power_consumption.txt",...
/plot1.R
no_license
pawsha/ExData_Plotting1
R
false
false
957
r
#sqldf package allows the ability to read specific rows from a csv file using a sql syntax #install.packages("sqldf") library(sqldf) plot1 <- function(){ # Read the file, only contents for the two dates we are interested in edata <- read.csv.sql(file = "./data/household_power_consumption.txt",...
#' Gets All Currencies #' #' @examples #' ttmGetAllCurrencies() #' @export ttmGetAllCurrencies <- function() { rClr::clrCallStatic('rTTManApi.rTTManApiHost', 'GetAllCurrencies') GetAllCurrencyFrame() } # Get All Currency Table GetAllCurrencyFrame <- function(){ Id = GetAllCurrenciesId() Currency = GetAllCurren...
/rTTManApi/R/R/Currency.R
no_license
SoftFx/TTManagerAPI
R
false
false
1,581
r
#' Gets All Currencies #' #' @examples #' ttmGetAllCurrencies() #' @export ttmGetAllCurrencies <- function() { rClr::clrCallStatic('rTTManApi.rTTManApiHost', 'GetAllCurrencies') GetAllCurrencyFrame() } # Get All Currency Table GetAllCurrencyFrame <- function(){ Id = GetAllCurrenciesId() Currency = GetAllCurren...
#read the data from working directory #subset the data setwd("C:/Users/victor.rotariu/Desktop/workdir/exploratory/week1") data_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\...
/plot3.R
no_license
victorwho/ExData_Plotting1
R
false
false
998
r
#read the data from working directory #subset the data setwd("C:/Users/victor.rotariu/Desktop/workdir/exploratory/week1") data_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\...
## this function should cache the matrix makeCacheMatrix <- function(x = matrix()) { #cache the matrix } cacheSolve <- function(x, ...) { }
/cachematrix.R
no_license
enichols25/ProgrammingAssignment2
R
false
false
146
r
## this function should cache the matrix makeCacheMatrix <- function(x = matrix()) { #cache the matrix } cacheSolve <- function(x, ...) { }
## code to prepare `cce_sst` dataset goes here # Attach packages library(usethis) library(metajam) library(janitor) # Save link location for the data package: cce_url <- "https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-cce.15.4&entityid=411c8b8769c4578be6702ee44bdb712e" # Download the data package...
/data-raw/cce_sst.R
permissive
karenezhao/alohakez
R
false
false
574
r
## code to prepare `cce_sst` dataset goes here # Attach packages library(usethis) library(metajam) library(janitor) # Save link location for the data package: cce_url <- "https://portal.edirepository.org/nis/dataviewer?packageid=knb-lter-cce.15.4&entityid=411c8b8769c4578be6702ee44bdb712e" # Download the data package...
require("scmamp") ARRAY <- c(0.002339681368326715,0.007315616803049349,0.0015978214839412982,0.6753029504767759,0.059346191165712846,9.154813803481165E-4,0.00604130457399386,2.0369620668307205,0.011123558615645606,0.013766693954229955,0.059879454605893355,0.01170620062015303,0.0019263280902962708,0.004099464100090518,0...
/MaFMethodology/R/full/IGD/friedmanplot.R
no_license
fritsche/hhcopreliminaryresults
R
false
false
15,627
r
require("scmamp") ARRAY <- c(0.002339681368326715,0.007315616803049349,0.0015978214839412982,0.6753029504767759,0.059346191165712846,9.154813803481165E-4,0.00604130457399386,2.0369620668307205,0.011123558615645606,0.013766693954229955,0.059879454605893355,0.01170620062015303,0.0019263280902962708,0.004099464100090518,0...
## QUESTION ---- #' Offence counts in Adelaide for different offence level in postcode/suburb #' #' \code{crime_analysis_no_titles} <The function shows the trend of offence counts in adelaide different #' postcode/suburb areas of a kind of offence description in level 1 or 3> #' @param crime_data A data.table o...
/R/crime_analysis_no_titles.R
permissive
zhangwt07/prfaweitongz
R
false
false
5,558
r
## QUESTION ---- #' Offence counts in Adelaide for different offence level in postcode/suburb #' #' \code{crime_analysis_no_titles} <The function shows the trend of offence counts in adelaide different #' postcode/suburb areas of a kind of offence description in level 1 or 3> #' @param crime_data A data.table o...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CESKalman_Estimation.R \name{CESKalman_Estimation} \alias{CESKalman_Estimation} \title{Function for estimating a CES production function with the Kalman filter.} \usage{ CESKalman_Estimation(Y,X,grid.param_init=c(-9,-1,5),nlags,lambda, Leont...
/man/CESKalman_Estimation.Rd
no_license
Rainy1993/CESKalman
R
false
true
5,322
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CESKalman_Estimation.R \name{CESKalman_Estimation} \alias{CESKalman_Estimation} \title{Function for estimating a CES production function with the Kalman filter.} \usage{ CESKalman_Estimation(Y,X,grid.param_init=c(-9,-1,5),nlags,lambda, Leont...
library("changepoint") library("grid") library("ggplot2") library(scales) library(plyr) library(iterators) library(foreach) library(data.table) library(gdata) library(openxlsx) library(stringr) library(gridExtra)
/R/main/libraries.R
permissive
bwhsleepamu/sleep.tools
R
false
false
213
r
library("changepoint") library("grid") library("ggplot2") library(scales) library(plyr) library(iterators) library(foreach) library(data.table) library(gdata) library(openxlsx) library(stringr) library(gridExtra)
##alpha diversity diversity_iNEXT<-function(abundance){ suppressPackageStartupMessages(require("dplyr")) suppressPackageStartupMessages(require("vegan")) require(iNEXT) print(packageVersion("iNEXT")) iNEXT_diversity = iNEXT(abundance, q=0,datatype = "abundance", conf = 0.95,nboot = 10) iNEXT_diversity ...
/alpha_div/alpha_diversity.R
no_license
AGJohnAWI/ArcticPicos
R
false
false
1,907
r
##alpha diversity diversity_iNEXT<-function(abundance){ suppressPackageStartupMessages(require("dplyr")) suppressPackageStartupMessages(require("vegan")) require(iNEXT) print(packageVersion("iNEXT")) iNEXT_diversity = iNEXT(abundance, q=0,datatype = "abundance", conf = 0.95,nboot = 10) iNEXT_diversity ...
#*** cumlogit.help.R ***/ ## ## AUTHOR: Arnost Komarek (my name in TeX: Arno\v{s}t Kom\'arek) ## arnost.komarek[AT]mff.cuni.cz ## ## CREATED: 25/09/2006 ## ## PURPOSE: Cumulative logit model ## * low level functions ## * not to be called by the users ## ## FUNCTIONS: design....
/R/cumlogit.help.R
no_license
cran/glmmAK
R
false
false
18,511
r
#*** cumlogit.help.R ***/ ## ## AUTHOR: Arnost Komarek (my name in TeX: Arno\v{s}t Kom\'arek) ## arnost.komarek[AT]mff.cuni.cz ## ## CREATED: 25/09/2006 ## ## PURPOSE: Cumulative logit model ## * low level functions ## * not to be called by the users ## ## FUNCTIONS: design....
library(raster) ; library(dplyr) ; library(sf) ecoregions<-st_transform(read_sf("D:/PA GIS/Ecoregions/ecoregions.Americas.withbiomes.shp"), st_crs("+proj=moll +lon_0=-80 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs")) hfi00<-raster("D:/PA GIS/Human Footprint Watson/hfp2000_merisINT.tif") %>% crop(., extent(st_tra...
/HFI.30.Extract.GIS.R
no_license
victorcazalis/sensitivity_paper
R
false
false
2,676
r
library(raster) ; library(dplyr) ; library(sf) ecoregions<-st_transform(read_sf("D:/PA GIS/Ecoregions/ecoregions.Americas.withbiomes.shp"), st_crs("+proj=moll +lon_0=-80 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs")) hfi00<-raster("D:/PA GIS/Human Footprint Watson/hfp2000_merisINT.tif") %>% crop(., extent(st_tra...
deriv1LikeMult = function(theta,u1,u2,family,multFactor) { side = getSideIfParameterAtBound(theta,family) result = grad(likeMultFactor,theta, method='simple',u1=u1,u2=u2,family=family,multFactor=multFactor, side=side) return(result) } likeMult = function(params2,v1,v2,family2,params1,u1,u2,family1) { nP...
/pacotest/R/utilitiesRVineEqualCorrOmega.R
no_license
akhikolla/updatedatatype-list1
R
false
false
29,450
r
deriv1LikeMult = function(theta,u1,u2,family,multFactor) { side = getSideIfParameterAtBound(theta,family) result = grad(likeMultFactor,theta, method='simple',u1=u1,u2=u2,family=family,multFactor=multFactor, side=side) return(result) } likeMult = function(params2,v1,v2,family2,params1,u1,u2,family1) { nP...
# Group : We have two datasets # HW : Final Project # Algorithm : K-means #install.packages("car") library(corrplot) library("factoextra") library(car) ## remove all objects rm(list=ls()) dev.off #read CSV data<-read.csv("attrition_data.csv", header = TRUE, na.strings = "?") data_keep <-...
/kmeansAttrition.R
no_license
fengzechen0615/Attrition-Classification
R
false
false
3,167
r
# Group : We have two datasets # HW : Final Project # Algorithm : K-means #install.packages("car") library(corrplot) library("factoextra") library(car) ## remove all objects rm(list=ls()) dev.off #read CSV data<-read.csv("attrition_data.csv", header = TRUE, na.strings = "?") data_keep <-...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cal_length.R \name{cal_length} \alias{cal_length} \title{Recursive function to calculate the length of branches} \usage{ cal_length(x1, x2, subtree, center, nodePar, edgePar, horiz = FALSE, sum) } \arguments{ \item{x1}{A x coordinate\code{x1}...
/man/cal_length.Rd
no_license
evanbiederstedt/dendsort
R
false
true
1,347
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cal_length.R \name{cal_length} \alias{cal_length} \title{Recursive function to calculate the length of branches} \usage{ cal_length(x1, x2, subtree, center, nodePar, edgePar, horiz = FALSE, sum) } \arguments{ \item{x1}{A x coordinate\code{x1}...
library(saAlloc) ################# generate data ###################### set.seed(400) nHigh <- 40 nMed <- 20 nLow <- 60 # high density cultivation, few farms highCult <- cbind( rnorm(nHigh, 500, 80), rnorm(nHigh, 500, 80) #rlnorm(nHigh, 1,.3) )...
/tests.old/minCV_kmeans.R
no_license
jlisic/saAlloc
R
false
false
1,667
r
library(saAlloc) ################# generate data ###################### set.seed(400) nHigh <- 40 nMed <- 20 nLow <- 60 # high density cultivation, few farms highCult <- cbind( rnorm(nHigh, 500, 80), rnorm(nHigh, 500, 80) #rlnorm(nHigh, 1,.3) )...
library(dplyr) #' Read in the data plants = read.csv("data/final_data.csv") priors = read.csv("data/final_prior_data.csv") # Days is missing for plant 9 plants <- plants[plants$Plant != 'Plant9',] # ignore variables iwth missing data for now # ignore variables which have no variance missing <- apply(plants[,1:146], ...
/report/table.R
no_license
jmarshallnz/meatplantecoli
R
false
false
2,135
r
library(dplyr) #' Read in the data plants = read.csv("data/final_data.csv") priors = read.csv("data/final_prior_data.csv") # Days is missing for plant 9 plants <- plants[plants$Plant != 'Plant9',] # ignore variables iwth missing data for now # ignore variables which have no variance missing <- apply(plants[,1:146], ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geos-geometry.R, R/sf-compat.R, R/wk-compat.R \name{as_geos_geometry} \alias{as_geos_geometry} \alias{as_geos_geometry.geos_geometry} \alias{as_geos_geometry.character} \alias{as_geos_geometry.blob} \alias{as_geos_geometry.WKB} \alias{as_geos...
/man/as_geos_geometry.Rd
permissive
edzer/geos
R
false
true
1,143
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geos-geometry.R, R/sf-compat.R, R/wk-compat.R \name{as_geos_geometry} \alias{as_geos_geometry} \alias{as_geos_geometry.geos_geometry} \alias{as_geos_geometry.character} \alias{as_geos_geometry.blob} \alias{as_geos_geometry.WKB} \alias{as_geos...
# Project: comics # # Author: Aditya Bhagwat ############################################################################### # Load packages require(KEGGREST) require(magrittr) ## Origin: https://stat.ethz.ch/pipermail/bioconductor/2013-September/054902.html ## http://stackoverflow.com/questions/12193779/how...
/autonomics.ora/inst/scripts/create_kegg_collection.R
no_license
bhagwataditya/autonomics0
R
false
false
4,223
r
# Project: comics # # Author: Aditya Bhagwat ############################################################################### # Load packages require(KEGGREST) require(magrittr) ## Origin: https://stat.ethz.ch/pipermail/bioconductor/2013-September/054902.html ## http://stackoverflow.com/questions/12193779/how...
strchr("fooeyfooeyfoo", 'f') = "fooeyfooeyfoo" strrchr("fooeyfooeyfoo", 'f') = "foo" strchr("fooeyfooeyfoo", 'y') = "yfooeyfoo" strrchr("fooeyfooeyfoo", 'y') = "yfoo" strrchr("yfooeyfoo", 'y') = "yfoo"
/third_party/virtualbox/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/funcs/tst.strchr.d.out
permissive
thalium/icebox
R
false
false
203
out
strchr("fooeyfooeyfoo", 'f') = "fooeyfooeyfoo" strrchr("fooeyfooeyfoo", 'f') = "foo" strchr("fooeyfooeyfoo", 'y') = "yfooeyfoo" strrchr("fooeyfooeyfoo", 'y') = "yfoo" strrchr("yfooeyfoo", 'y') = "yfoo"
#### ### ### ## #### ### ### ## #### ### ### ## # Created by Marc-Olivier Beausoleil # Sunday, April 5, 2020 at 11:37 # Why: # Output: # Requires: # NOTES: #### ### ### ## #### ### ### ## #### ### ### ## # Generate normal distribution from binomial ------------------------------ par(mfrow=c(1,1)) # Generate bimo...
/R/distributions/Distribution of sample mean.R
no_license
beausoleilmo/handy_r_functions
R
false
false
1,970
r
#### ### ### ## #### ### ### ## #### ### ### ## # Created by Marc-Olivier Beausoleil # Sunday, April 5, 2020 at 11:37 # Why: # Output: # Requires: # NOTES: #### ### ### ## #### ### ### ## #### ### ### ## # Generate normal distribution from binomial ------------------------------ par(mfrow=c(1,1)) # Generate bimo...
pollutantmean <- function(directory, pollutant, id = 1:332) { temp_data <- data.frame() for(i in id){ if(i < 10) { name <- paste("00", i, ".csv", sep = "") } else if (i > 9 & i < 100) { name <- paste("0", i, ".csv", sep = "") } else { name <- paste(i, ".csv", sep ="") } name <-...
/specdata_functions.R
no_license
lespinoza182/datasciencecoursera
R
false
false
2,755
r
pollutantmean <- function(directory, pollutant, id = 1:332) { temp_data <- data.frame() for(i in id){ if(i < 10) { name <- paste("00", i, ".csv", sep = "") } else if (i > 9 & i < 100) { name <- paste("0", i, ".csv", sep = "") } else { name <- paste(i, ".csv", sep ="") } name <-...
#!/usr/bin/env Rscript args <- commandArgs(TRUE) print_usage <- function() { cat("usage: Rscript pma-analytics.R scripts_directory storage_directory form_id export_directory export_filename") cat("\n\n") cat("Positional arguments:") cat("\n") cat(" scripts_directory ", "Directory where R scripts a...
/pma-analytics.R
no_license
shyamalee93/pma2020-analytics
R
false
false
2,207
r
#!/usr/bin/env Rscript args <- commandArgs(TRUE) print_usage <- function() { cat("usage: Rscript pma-analytics.R scripts_directory storage_directory form_id export_directory export_filename") cat("\n\n") cat("Positional arguments:") cat("\n") cat(" scripts_directory ", "Directory where R scripts a...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/quant_est.R \name{quant_est} \alias{quant_est} \title{Estimate the Marginal Quantile Given a Specific Treatment Regime} \usage{ quant_est(beta, x, y, a, prob, tau) } \arguments{ \item{beta}{a vector indexing the treatment regime. It indexes a...
/man/quant_est.Rd
no_license
cran/quantoptr
R
false
true
1,157
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/quant_est.R \name{quant_est} \alias{quant_est} \title{Estimate the Marginal Quantile Given a Specific Treatment Regime} \usage{ quant_est(beta, x, y, a, prob, tau) } \arguments{ \item{beta}{a vector indexing the treatment regime. It indexes a...
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') test.head_empty_frame <- function(conn) { a_initial = cbind(c(0,0,0,0), c(1,1,1,1)) # create data frame without col names in R, transfer to h2o (V* names preserved from R) a.h2o <- as.h2o(conn, a_initial, destinati...
/h2o-r/tests/testdir_jira/runit_pub_682_head_empty_frame.R
permissive
mrgloom/h2o-3
R
false
false
524
r
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') test.head_empty_frame <- function(conn) { a_initial = cbind(c(0,0,0,0), c(1,1,1,1)) # create data frame without col names in R, transfer to h2o (V* names preserved from R) a.h2o <- as.h2o(conn, a_initial, destinati...
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(2.48890639549224e+130, 7.290231990013e-304, 3.04823681514674e-319, 1.39067116156644e-309, 2.7814420610807e-308, 4.24414538258983e-313, 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,...
/palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612987696-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
423
r
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(2.48890639549224e+130, 7.290231990013e-304, 3.04823681514674e-319, 1.39067116156644e-309, 2.7814420610807e-308, 4.24414538258983e-313, 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,...
#' @include services.r #' @include setup.r #' @include util.r #' @include list.r #' @include getters.r NULL #' Result Data Query #' #' Get data for the specified result id. #' #' @inheritParams wqp-programs #' @inheritParams wqp-databases #' @inheritParams wqp-versions #' @param result.id The WQP result id. #' @param...
/R/results.r
no_license
mkoohafkan/wqpr-clone
R
false
false
11,466
r
#' @include services.r #' @include setup.r #' @include util.r #' @include list.r #' @include getters.r NULL #' Result Data Query #' #' Get data for the specified result id. #' #' @inheritParams wqp-programs #' @inheritParams wqp-databases #' @inheritParams wqp-versions #' @param result.id The WQP result id. #' @param...
library(dplyr) library(data.table) library(reshape2) directory <- "C:\\Users\\Akash Poonja\\Desktop\\datasciencecoursera\\week4data\\UCI HAR Dataset\\" directory_test <- "C:\\Users\\Akash Poonja\\Desktop\\datasciencecoursera\\week4data\\UCI HAR Dataset\\test\\" directory_train <- "C:\\Users\\Akash Poonja\\Desktop\\dat...
/run_analysis.R
no_license
APoonja15/Getting-and-Cleaning-Data---Week-4-Assignment
R
false
false
2,426
r
library(dplyr) library(data.table) library(reshape2) directory <- "C:\\Users\\Akash Poonja\\Desktop\\datasciencecoursera\\week4data\\UCI HAR Dataset\\" directory_test <- "C:\\Users\\Akash Poonja\\Desktop\\datasciencecoursera\\week4data\\UCI HAR Dataset\\test\\" directory_train <- "C:\\Users\\Akash Poonja\\Desktop\\dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dalys.R \name{calculate_dalys} \alias{calculate_dalys} \alias{create_dalys_parameters} \alias{create_dalys_life_table} \title{DALYs calculation} \usage{ calculate_dalys(con, touchstone_name, year_min = 2000, year_max = 2030, vimc_dalys_only...
/man/calculate_dalys.Rd
permissive
vimc/jenner
R
false
true
2,224
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dalys.R \name{calculate_dalys} \alias{calculate_dalys} \alias{create_dalys_parameters} \alias{create_dalys_life_table} \title{DALYs calculation} \usage{ calculate_dalys(con, touchstone_name, year_min = 2000, year_max = 2030, vimc_dalys_only...
star_assign <- function(x) { if(!is.na(x)) { if(x < 0.001) "***" else if (x < 0.01) "**" else if (x < 0.05) "*" else "" } else "" } vstar_assign <- Vectorize(star_assign)
/star_assign.R
permissive
franciscowilhelm/r-collection
R
false
false
194
r
star_assign <- function(x) { if(!is.na(x)) { if(x < 0.001) "***" else if (x < 0.01) "**" else if (x < 0.05) "*" else "" } else "" } vstar_assign <- Vectorize(star_assign)
library(maps) ### Name: nz ### Title: New Zealand Basic Map ### Aliases: nz nzMapEnv ### Keywords: datasets ### ** Examples map('nz') map('nz', xlim = c(166, 179), ylim = c(-48, -34))
/data/genthat_extracted_code/maps/examples/nz.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
191
r
library(maps) ### Name: nz ### Title: New Zealand Basic Map ### Aliases: nz nzMapEnv ### Keywords: datasets ### ** Examples map('nz') map('nz', xlim = c(166, 179), ylim = c(-48, -34))
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/createMassBank.R \name{gatherDataUnknown} \alias{gatherDataUnknown} \title{Retrieve annotation data} \usage{ gatherDataUnknown(id, mode, retrieval) } \arguments{ \item{id}{The compound ID.} \item{mode}{\code{"pH", "pNa", "pM", "pN...
/man/gatherDataUnknown.Rd
no_license
MassBank/RMassBank
R
false
true
1,854
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/createMassBank.R \name{gatherDataUnknown} \alias{gatherDataUnknown} \title{Retrieve annotation data} \usage{ gatherDataUnknown(id, mode, retrieval) } \arguments{ \item{id}{The compound ID.} \item{mode}{\code{"pH", "pNa", "pM", "pN...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{rw_Metro_C} \alias{rw_Metro_C} \title{Random Walk Metropolis sampler using Rcpp} \usage{ rw_Metro_C(sigma, x0, N) } \arguments{ \item{sigma}{the standard deviation of the normal random increment with a zero mean} \item{x0...
/man/rw_Metro_C.Rd
no_license
Daniel-1997127/SC19085
R
false
true
824
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{rw_Metro_C} \alias{rw_Metro_C} \title{Random Walk Metropolis sampler using Rcpp} \usage{ rw_Metro_C(sigma, x0, N) } \arguments{ \item{sigma}{the standard deviation of the normal random increment with a zero mean} \item{x0...
library(censusapi) ### Name: listCensusMetadata ### Title: Get variable or geography metadata for a given API as a data ### frame ### Aliases: listCensusMetadata ### Keywords: metadata ### ** Examples bds_vars <- listCensusMetadata(name = "timeseries/bds/firms", type = "variables") head(bds_vars) bds_geos <- lis...
/data/genthat_extracted_code/censusapi/examples/listCensusMetadata.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
610
r
library(censusapi) ### Name: listCensusMetadata ### Title: Get variable or geography metadata for a given API as a data ### frame ### Aliases: listCensusMetadata ### Keywords: metadata ### ** Examples bds_vars <- listCensusMetadata(name = "timeseries/bds/firms", type = "variables") head(bds_vars) bds_geos <- lis...
load("~/Dropbox/Cell Line Drug Response Prediction Project/Ensemble Of Similarity Networks/Cheng/Epirubicin/WS/epi_best_plot.RData") # AUC for (temp.alt_ind in 1:9) { temp.wtest <- wilcox.test(cpp.best$auc[, temp.alt_ind + 1], pp.best$matrix[, temp.alt_ind], paired = FALSE, alternative = "great") print(temp.wt...
/Epirubicin/script/calculate_sig.R
no_license
chengzhao41/CP2P
R
false
false
1,424
r
load("~/Dropbox/Cell Line Drug Response Prediction Project/Ensemble Of Similarity Networks/Cheng/Epirubicin/WS/epi_best_plot.RData") # AUC for (temp.alt_ind in 1:9) { temp.wtest <- wilcox.test(cpp.best$auc[, temp.alt_ind + 1], pp.best$matrix[, temp.alt_ind], paired = FALSE, alternative = "great") print(temp.wt...
# Load the ggplot2 library library(ggplot2) df2 <- data.frame(status = factor(c("incluídos", "incluídos", "incluídos", "excluídos", "excluídos", "excluídos", "duplicados", "duplicados", "duplicados" )), time = factor(c("IEEE", "...
/ApresentacaoDaDefesa_ES/pic/ScriptR/GraficosQualificacao.R
no_license
khouri/Presentacion_Univ_Andes
R
false
false
1,374
r
# Load the ggplot2 library library(ggplot2) df2 <- data.frame(status = factor(c("incluídos", "incluídos", "incluídos", "excluídos", "excluídos", "excluídos", "duplicados", "duplicados", "duplicados" )), time = factor(c("IEEE", "...
parafac2_4way <- function(data, nfac, xcx = sumsq(data), const = rep("uncons", 4), control = const.control(const), maxit = 500, ctol = 1e-4, Gfixed = NULL, Bfixed = NULL, Cfixed = NULL, Dfixed = NULL, Gstart = NULL, Bstart = NULL, Cstart = NULL, Dstart = NULL, Gstruc = ...
/R/parafac2_4way.R
no_license
cran/multiway
R
false
false
12,224
r
parafac2_4way <- function(data, nfac, xcx = sumsq(data), const = rep("uncons", 4), control = const.control(const), maxit = 500, ctol = 1e-4, Gfixed = NULL, Bfixed = NULL, Cfixed = NULL, Dfixed = NULL, Gstart = NULL, Bstart = NULL, Cstart = NULL, Dstart = NULL, Gstruc = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ISOPixelOrientation.R \docType{class} \name{ISOPixelOrientation} \alias{ISOPixelOrientation} \title{ISOPixelOrientation} \format{ \code{\link{R6Class}} object. } \value{ Object of \code{\link{R6Class}} for modelling an ISOPixelOrien...
/man/ISOPixelOrientation.Rd
no_license
cran/geometa
R
false
true
9,671
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ISOPixelOrientation.R \docType{class} \name{ISOPixelOrientation} \alias{ISOPixelOrientation} \title{ISOPixelOrientation} \format{ \code{\link{R6Class}} object. } \value{ Object of \code{\link{R6Class}} for modelling an ISOPixelOrien...
find_mismatch_vars <- function(str1, str2) { vlist <- list() for (cvar in str1) { if (!(cvar %in% str2)) { vlist[length(vlist)+1] <- cvar } } if (length(vlist)==0) { return(NULL) } else { cvars <- c() tvars <- unlist(vlist) for (i in 1:length(tvars)) {...
/RCodes/StatMatch.R
no_license
yangx227/SimmonsResearchR
R
false
false
23,295
r
find_mismatch_vars <- function(str1, str2) { vlist <- list() for (cvar in str1) { if (!(cvar %in% str2)) { vlist[length(vlist)+1] <- cvar } } if (length(vlist)==0) { return(NULL) } else { cvars <- c() tvars <- unlist(vlist) for (i in 1:length(tvars)) {...
setwd("C:\\Users\\DELL\\Desktop\\DS\\DataScience_2019501097\\Data Mining\\DM Assignment2") getwd() #myData<-read.csv("myfirstdata.csv",header=FALSE) #str(myData) #plot(myData[,1]) #myData<-read.csv("twomillion.csv",header=FALSE) #data<-sample(myData[,1],10000,replace=TRUE) #mean(data) #max(data) #var(data) #quan...
/Data Mining/DM Assignment2/DMAssignment2.R
no_license
Hima-Bindu97/DataScience_2019501097
R
false
false
1,756
r
setwd("C:\\Users\\DELL\\Desktop\\DS\\DataScience_2019501097\\Data Mining\\DM Assignment2") getwd() #myData<-read.csv("myfirstdata.csv",header=FALSE) #str(myData) #plot(myData[,1]) #myData<-read.csv("twomillion.csv",header=FALSE) #data<-sample(myData[,1],10000,replace=TRUE) #mean(data) #max(data) #var(data) #quan...
# 3. faza: Vizualizacija podatkov #------------------------VSE DELNICE------------------------# zacetne <- zdruzena %>% group_by(Ime, Tip) %>% slice_min(Datum, n=1, with_ties=FALSE) %>% transmute(Ime, Tip, ZacetnaVrednost=Vrednost) normirana <- inner_join(zdruzena, zacetne) %>% mutate(NormiranaVrednost=Vrednost...
/vizualizacija/vizualizacija.r
permissive
tilenklinc/APPR_projektna
R
false
false
2,429
r
# 3. faza: Vizualizacija podatkov #------------------------VSE DELNICE------------------------# zacetne <- zdruzena %>% group_by(Ime, Tip) %>% slice_min(Datum, n=1, with_ties=FALSE) %>% transmute(Ime, Tip, ZacetnaVrednost=Vrednost) normirana <- inner_join(zdruzena, zacetne) %>% mutate(NormiranaVrednost=Vrednost...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/method.R \name{fg.inference} \alias{fg.inference} \title{Core procedure of floodgate} \usage{ fg.inference( S, mu_X, mu_Xk, Y, V_mean = NULL, useMC = TRUE, one.sided = TRUE, alevel = 0.05, test = "z", verbose = TRUE ) } \a...
/man/fg.inference.Rd
permissive
LuZhangH/floodgate
R
false
true
1,715
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/method.R \name{fg.inference} \alias{fg.inference} \title{Core procedure of floodgate} \usage{ fg.inference( S, mu_X, mu_Xk, Y, V_mean = NULL, useMC = TRUE, one.sided = TRUE, alevel = 0.05, test = "z", verbose = TRUE ) } \a...
library(memnet) ### Name: edg_to_adj ### Title: Edge list to adjacency matrix ### Aliases: edg_to_adj ### ** Examples # get fluency data data(animal_fluency) # edge list of fluency graph edge_list = threshold_graph(animal_fluency[1:3]) # transfrom to adjacency matrix edg_to_adj(edge_list)
/data/genthat_extracted_code/memnet/examples/edg_to_adj.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
301
r
library(memnet) ### Name: edg_to_adj ### Title: Edge list to adjacency matrix ### Aliases: edg_to_adj ### ** Examples # get fluency data data(animal_fluency) # edge list of fluency graph edge_list = threshold_graph(animal_fluency[1:3]) # transfrom to adjacency matrix edg_to_adj(edge_list)
\name{genes_permutation} \alias{genes_permutation} \title{ Gene-level Permutations } \description{ Performs gene-level circular genomic permutations. In each permutation,the complete set of\cr SNP association p-values are permuted by rotation with respect to the SNPs' genomic locations.\cr Once these 'simulat...
/man/genes_permutation.Rd
no_license
Genomicper/genomicper
R
false
false
2,826
rd
\name{genes_permutation} \alias{genes_permutation} \title{ Gene-level Permutations } \description{ Performs gene-level circular genomic permutations. In each permutation,the complete set of\cr SNP association p-values are permuted by rotation with respect to the SNPs' genomic locations.\cr Once these 'simulat...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 1700 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 1700 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query45_query21_1344/query45_query21_1344.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
708
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 1700 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 1700 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/q...
#' @export plot.maxnet <- function(x, vars=names(x$samplemeans), common.scale=T, type=c("link","exponential","cloglog","logistic"), ylab=NULL, ...) { type <- match.arg(type) nc <- ceiling(sqrt(length(vars))) nr <- ceiling(length(vars)/nc) graphics::par(mfrow=c(nr,nc), mar=c(5,5,4,2)+.1) ylim=NULL if (...
/R/plot.maxnet.R
permissive
gepinillab/maxnet
R
false
false
640
r
#' @export plot.maxnet <- function(x, vars=names(x$samplemeans), common.scale=T, type=c("link","exponential","cloglog","logistic"), ylab=NULL, ...) { type <- match.arg(type) nc <- ceiling(sqrt(length(vars))) nr <- ceiling(length(vars)/nc) graphics::par(mfrow=c(nr,nc), mar=c(5,5,4,2)+.1) ylim=NULL if (...
######################SPS #@tab_displayname@# tab###################### ## creation date: #@crt_date@# ## Author: #@author@# # #@tab_id@# UI #@tab_id@#UI <- function(id){ ns <- NS(id) # describe your tab in markdown format, this will go right under the title desc <- " #@{desc}@# " tagList( ...
/inst/app/templates/data_tab_template.R
no_license
systemPipeR/systemPipeShiny
R
false
false
6,843
r
######################SPS #@tab_displayname@# tab###################### ## creation date: #@crt_date@# ## Author: #@author@# # #@tab_id@# UI #@tab_id@#UI <- function(id){ ns <- NS(id) # describe your tab in markdown format, this will go right under the title desc <- " #@{desc}@# " tagList( ...
setClass('xgb.DMatrix') #' Get information of an xgb.DMatrix object #' #' Get information of an xgb.DMatrix object #' #' The information can be one of the following: #' #' \itemize{ #' \item \code{label}: label Xgboost learn from ; #' \item \code{weight}: to do a weight rescale ; #' \item \code{base_mar...
/R-package/R/getinfo.xgb.DMatrix.R
permissive
Censio/xgboost
R
false
false
1,860
r
setClass('xgb.DMatrix') #' Get information of an xgb.DMatrix object #' #' Get information of an xgb.DMatrix object #' #' The information can be one of the following: #' #' \itemize{ #' \item \code{label}: label Xgboost learn from ; #' \item \code{weight}: to do a weight rescale ; #' \item \code{base_mar...
#Metric Unfolding after: #Schoenemann, Peter E. 1970. #On Metric Multidimensional Unfolding. #Psychometrika 35,5:349-366 # #Author: Martin Elff #(c) 2002 # # # schoenemann.unfolding <- function( D, m=NULL, svd.eps=1e-7, ...
/pkg/R/schoenemann.R
no_license
melff/munfold
R
false
false
5,446
r
#Metric Unfolding after: #Schoenemann, Peter E. 1970. #On Metric Multidimensional Unfolding. #Psychometrika 35,5:349-366 # #Author: Martin Elff #(c) 2002 # # # schoenemann.unfolding <- function( D, m=NULL, svd.eps=1e-7, ...
FiguresPage = R6Class( "FiguresPage", inherit = ShinyModule, public = list( # attributes id = "figures", # initializer initialize = function(){ }, # UI ui = function(){ ns = NS(self$id) tagList( ...
/src/apps/app/views/pages/FiguresPage.R
no_license
zhuchcn/sec-method-study
R
false
false
2,319
r
FiguresPage = R6Class( "FiguresPage", inherit = ShinyModule, public = list( # attributes id = "figures", # initializer initialize = function(){ }, # UI ui = function(){ ns = NS(self$id) tagList( ...
library(clustifyr) library(tidyverse) library(usethis) tf = tempfile(fileext = ".xlsx") curl::curl_download("https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE112903&format=file&file=GSE112903%5FTable%5FS1%5FMean%5FExpression%2Exlsx", tf) ref_lymphnodestromal <- readxl::read_excel(tf) %>% select(-contains("_in")) %>...
/ref/ref_lymphnodestromal.R
permissive
rnabioco/antigen-tracking
R
false
false
562
r
library(clustifyr) library(tidyverse) library(usethis) tf = tempfile(fileext = ".xlsx") curl::curl_download("https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE112903&format=file&file=GSE112903%5FTable%5FS1%5FMean%5FExpression%2Exlsx", tf) ref_lymphnodestromal <- readxl::read_excel(tf) %>% select(-contains("_in")) %>...
# Yesterday's baseline AQI forecasting metrics # Packages library(tidyverse) # Include results for these models: #### - Persistance #### - Rolling 7 day median #### - Historical week median # AQI conversion functions source(paste0(aqiwatch_path, "R/aqi_convert.R")) # Set dates today <- Sys.Date() yesterday ...
/R/run_baseline_predictions.R
permissive
dKvale/aircast
R
false
false
3,725
r
# Yesterday's baseline AQI forecasting metrics # Packages library(tidyverse) # Include results for these models: #### - Persistance #### - Rolling 7 day median #### - Historical week median # AQI conversion functions source(paste0(aqiwatch_path, "R/aqi_convert.R")) # Set dates today <- Sys.Date() yesterday ...
library(SportsAnalytics270) library(igraph) library(network) library(intergraph) library(ggplot2) library(circlize) load("passing.rda") load("gsw.rda") x <- gsw$PLAYER_ID passing <- passing[passing$PASS_TYPE == "made",] passing <- passing[passing$PASS_TEAMMATE_PLAYER_ID %in% x,] i_pass <- graph_from_edgelist( as....
/Class_Practice/NetworkAnalysis/nba_passing.R
no_license
sahNarek/CSE_270_Practice
R
false
false
3,787
r
library(SportsAnalytics270) library(igraph) library(network) library(intergraph) library(ggplot2) library(circlize) load("passing.rda") load("gsw.rda") x <- gsw$PLAYER_ID passing <- passing[passing$PASS_TYPE == "made",] passing <- passing[passing$PASS_TEAMMATE_PLAYER_ID %in% x,] i_pass <- graph_from_edgelist( as....
#' @export clip_practice <- function(start_index, window_size = 5L, dir = here("temp", "practice.tsv")){ dir %>% read_lesson() %>% slice_lesson(start_index = start_index, window_size = window_size) %>% clip_lesson() } #' @importFrom h...
/R/practice.R
no_license
jameslairdsmith/stenor
R
false
false
351
r
#' @export clip_practice <- function(start_index, window_size = 5L, dir = here("temp", "practice.tsv")){ dir %>% read_lesson() %>% slice_lesson(start_index = start_index, window_size = window_size) %>% clip_lesson() } #' @importFrom h...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/checkAnalytics.R \name{analyze_pmtctknownpos} \alias{analyze_pmtctknownpos} \title{Check Data Pack data for PMTCT Known Pos Ratio > 75\%.} \usage{ analyze_pmtctknownpos(data) } \arguments{ \item{data}{Analytics object to analyze} } \value{ a ...
/man/analyze_pmtctknownpos.Rd
permissive
pepfar-datim/datapackr
R
false
true
427
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/checkAnalytics.R \name{analyze_pmtctknownpos} \alias{analyze_pmtctknownpos} \title{Check Data Pack data for PMTCT Known Pos Ratio > 75\%.} \usage{ analyze_pmtctknownpos(data) } \arguments{ \item{data}{Analytics object to analyze} } \value{ a ...
data(geyser, package = "MASS") snippet("faithful-mle01", echo = FALSE) snippet("faithful-mle02", echo = FALSE) loglik0.faithful <- function(theta, x) { theta <- c(0.5, theta) return(loglik.faithful(theta, x)) }
/inst/snippet/faithful-lrt01.R
no_license
rpruim/fastR2
R
false
false
223
r
data(geyser, package = "MASS") snippet("faithful-mle01", echo = FALSE) snippet("faithful-mle02", echo = FALSE) loglik0.faithful <- function(theta, x) { theta <- c(0.5, theta) return(loglik.faithful(theta, x)) }
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Classifier/autonomic_ganglia.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=1,family="gaussian",standardize=TRUE) sink('./autonomic_ganglia_097...
/Model/EN/Classifier/autonomic_ganglia/autonomic_ganglia_097.R
no_license
esbgkannan/QSMART
R
false
false
368
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Classifier/autonomic_ganglia.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=1,family="gaussian",standardize=TRUE) sink('./autonomic_ganglia_097...
## This function returns a list containing getters and setters ## for the matrix and its inverse makeCacheMatrix <- function(x = matrix()) { inv <- NULL ## initialize inverse as null set <- function(y){ ## set matrix x <<- y ## set/super-assign new value fo...
/cachematrix.R
no_license
jks85/ProgrammingAssignment2
R
false
false
1,456
r
## This function returns a list containing getters and setters ## for the matrix and its inverse makeCacheMatrix <- function(x = matrix()) { inv <- NULL ## initialize inverse as null set <- function(y){ ## set matrix x <<- y ## set/super-assign new value fo...
#' read qiime2 artifacts (.qza) #' #' extracts embedded data and object metadata into an R session #' #' @param file path to the input file, ex: file="~/data/moving_pictures/table.qza" #' @param tmp a temporary directory that the object will be decompressed to (default="tempdir()") #' @param rm should the decompressed ...
/R/read_qza.R
permissive
ropolomx/qiime2R
R
false
false
5,607
r
#' read qiime2 artifacts (.qza) #' #' extracts embedded data and object metadata into an R session #' #' @param file path to the input file, ex: file="~/data/moving_pictures/table.qza" #' @param tmp a temporary directory that the object will be decompressed to (default="tempdir()") #' @param rm should the decompressed ...
library(latentnet) ### Name: gof.ergmm ### Title: Conduct Goodness-of-Fit Diagnostics on a Exponential Family ### Random Graph Mixed Model Fit ### Aliases: gof.ergmm gof ### Keywords: models ### ** Examples ## No test: # data(sampson) # # test the gof.ergm function # samplike.fit <- ergmm(samplike ~ euclidean(d...
/data/genthat_extracted_code/latentnet/examples/gof.ergmm.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
706
r
library(latentnet) ### Name: gof.ergmm ### Title: Conduct Goodness-of-Fit Diagnostics on a Exponential Family ### Random Graph Mixed Model Fit ### Aliases: gof.ergmm gof ### Keywords: models ### ** Examples ## No test: # data(sampson) # # test the gof.ergm function # samplike.fit <- ergmm(samplike ~ euclidean(d...
\name{Get_Logistic_Weights} \alias{Get_Logistic_Weights} \alias{Get_Logistic_Weights_MAF} \title{Get the logistic weight} \description{ Get the logistic weights from either a genotype matrix (Z) or a vector of minor allele frequncies (MAF). You can apply this weights to SKAT by giving it as the ``weigh...
/man/Get_Logistic_Weights.rd
no_license
weinstockj/SKAT
R
false
false
1,777
rd
\name{Get_Logistic_Weights} \alias{Get_Logistic_Weights} \alias{Get_Logistic_Weights_MAF} \title{Get the logistic weight} \description{ Get the logistic weights from either a genotype matrix (Z) or a vector of minor allele frequncies (MAF). You can apply this weights to SKAT by giving it as the ``weigh...
# Simple logistic model on just elevation. fit_logistic <- function(data) { glm(Cover_Type ~ Elevation, family="binomial") }
/models/logistic.r
no_license
louiedinh/forest-cover
R
false
false
127
r
# Simple logistic model on just elevation. fit_logistic <- function(data) { glm(Cover_Type ~ Elevation, family="binomial") }
#' @export sql_translate_env.OraConnection <- function(con) { sql_translate_env.Oracle(con) } #' @export sql_select.OraConnection <- function(con, select, from, where = NULL, group_by = NULL, having = NULL, order_by = NULL, limit ...
/R/db-roracle.R
permissive
dereksz/dbplyr
R
false
false
1,165
r
#' @export sql_translate_env.OraConnection <- function(con) { sql_translate_env.Oracle(con) } #' @export sql_select.OraConnection <- function(con, select, from, where = NULL, group_by = NULL, having = NULL, order_by = NULL, limit ...
library(shiny) # Define server logic required to draw a histogram shinyServer(function(input, output, session) { output$content <- renderTable({ if(is.null(input$variable)) return() iris[input$variable] }) })
/Week2-Shiny/Experiment/server.R
no_license
OEBsource/2015-Spring
R
false
false
233
r
library(shiny) # Define server logic required to draw a histogram shinyServer(function(input, output, session) { output$content <- renderTable({ if(is.null(input$variable)) return() iris[input$variable] }) })
library(data.table) # Read in pileup summary data for all chromosomes pileup.summary <- fread("data/all_summary.txt", col.names=c('chr', 'end', 'a', 'c', 'g', 't', 'del')) # Read in annotation data file from MetaPlotR (See GitHub page) that contains the gene information for every nucleotide g...
/final_rpileup_analysis.R
no_license
olarerin/misincorporation_mapping
R
false
false
1,805
r
library(data.table) # Read in pileup summary data for all chromosomes pileup.summary <- fread("data/all_summary.txt", col.names=c('chr', 'end', 'a', 'c', 'g', 't', 'del')) # Read in annotation data file from MetaPlotR (See GitHub page) that contains the gene information for every nucleotide g...
# Initialisation rm(list = ls()) gc() library(data.table) library(xgboost) # Read data dt <- fread('processed_data/final_dataset.csv') # Specify the types of variables (numeric, factor...) target <- 'IND_BAIXA' id_vars <- c('IDMIEMBRO', 'IDVERSION') numeric_vars <- c('AGE', 'DAY_NACIM', grep(pattern = 'NUM_INTERACC...
/old_scripts/MAIN_train_cesc.R
no_license
CescMateu/msf-datathon
R
false
false
1,758
r
# Initialisation rm(list = ls()) gc() library(data.table) library(xgboost) # Read data dt <- fread('processed_data/final_dataset.csv') # Specify the types of variables (numeric, factor...) target <- 'IND_BAIXA' id_vars <- c('IDMIEMBRO', 'IDVERSION') numeric_vars <- c('AGE', 'DAY_NACIM', grep(pattern = 'NUM_INTERACC...
library(testit) # helper function to convert raw src to params list read_params <- function(src, evaluate = TRUE) { lines <- strsplit(src, "\n")[[1]] knit_params(lines, evaluate = evaluate) } # helper function to convert raw src yaml to params list read_params_yaml <- function(src, evaluate = TRUE) { knit_param...
/packrat/lib/x86_64-w64-mingw32/3.4.3/knitr/tests/testit/test-params.R
permissive
UBC-MDS/Karl
R
false
false
3,922
r
library(testit) # helper function to convert raw src to params list read_params <- function(src, evaluate = TRUE) { lines <- strsplit(src, "\n")[[1]] knit_params(lines, evaluate = evaluate) } # helper function to convert raw src yaml to params list read_params_yaml <- function(src, evaluate = TRUE) { knit_param...
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(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, 0...
/IntervalSurgeon/inst/testfiles/rcpp_depth/AFL_rcpp_depth/rcpp_depth_valgrind_files/1609856762-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
713
r
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(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, 0...
#' Synthetic control estimation #' #' Estimates synthetic control predicted values. Gurobi optimizer required. #' @param Y The outcome (post-treatment) variables for the control group #' @param X The features on which to match, usually pre-treatment outcomes #' @param space Space on which to predict, typically pre-tre...
/R/synthetic.control.R
no_license
samuelhigbee/myRtools
R
false
false
1,154
r
#' Synthetic control estimation #' #' Estimates synthetic control predicted values. Gurobi optimizer required. #' @param Y The outcome (post-treatment) variables for the control group #' @param X The features on which to match, usually pre-treatment outcomes #' @param space Space on which to predict, typically pre-tre...
#' Retrieves global variables of an expression and their associated packages #' #' @param expr An R expression whose globals should be found. #' @param envir The environment from which globals should be searched. #' @param tweak (optional) A function that takes an expression and returned a modified one. #' @param glob...
/R/globals.R
no_license
guhjy/future
R
false
false
12,573
r
#' Retrieves global variables of an expression and their associated packages #' #' @param expr An R expression whose globals should be found. #' @param envir The environment from which globals should be searched. #' @param tweak (optional) A function that takes an expression and returned a modified one. #' @param glob...