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
# This code accesses the afltables.com site and uses html tags to scrape data # It goes through the in-scope teams and years to get all player stats for all games # It writes the final results to an Rda file for further analysis and blending with other data sources setwd("C:\\Users\\james.hooi\\Documents\\data ana...
/code-01-scrape-xvars-playermetrics.R
no_license
r3nault/Springboard-FDS-Capstone-submission
R
false
false
8,032
r
# This code accesses the afltables.com site and uses html tags to scrape data # It goes through the in-scope teams and years to get all player stats for all games # It writes the final results to an Rda file for further analysis and blending with other data sources setwd("C:\\Users\\james.hooi\\Documents\\data ana...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 39775 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 39775 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query09_query45_1344/query09_query45_1344.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
717
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 39775 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 39775 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4...
####################### # # Map the studies from the meta-analysis # # Changelog # # 5/12/2014 - JEKB added code to turn maps into pdfs, and some geom_text for better labeling # 5/12/2014 - JEKB fixed effect size names ####################### # Meta-analysis #setwd('Meta_analysis_2014') library(rworldmap) library(ggp...
/R/extra-code-chunks/Mapping.R
no_license
jdunic/local-marine-meta
R
false
false
16,565
r
####################### # # Map the studies from the meta-analysis # # Changelog # # 5/12/2014 - JEKB added code to turn maps into pdfs, and some geom_text for better labeling # 5/12/2014 - JEKB fixed effect size names ####################### # Meta-analysis #setwd('Meta_analysis_2014') library(rworldmap) library(ggp...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lgb.Booster.R \name{lgb.load} \alias{lgb.load} \title{Load LightGBM model} \usage{ lgb.load(filename = NULL, model_str = NULL) } \arguments{ \item{filename}{path of model file} \item{model_str}{a str containing the model} } \value{ lgb.Boost...
/R-package/man/lgb.load.Rd
permissive
cyfdecyf/LightGBM
R
false
true
1,261
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lgb.Booster.R \name{lgb.load} \alias{lgb.load} \title{Load LightGBM model} \usage{ lgb.load(filename = NULL, model_str = NULL) } \arguments{ \item{filename}{path of model file} \item{model_str}{a str containing the model} } \value{ lgb.Boost...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AzureHDI.R \name{azureRunScriptAction} \alias{azureRunScriptAction} \title{Run Script Action on HDI Cluster.} \usage{ azureRunScriptAction(azureActiveContext, scriptname = "script1", scriptURL, headNode = TRUE, workerNode = FALSE, edgeNode ...
/man/azureRunScriptAction.Rd
no_license
strategist922/AzureSMR
R
false
true
1,583
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AzureHDI.R \name{azureRunScriptAction} \alias{azureRunScriptAction} \title{Run Script Action on HDI Cluster.} \usage{ azureRunScriptAction(azureActiveContext, scriptname = "script1", scriptURL, headNode = TRUE, workerNode = FALSE, edgeNode ...
data <- read.table("household_power_consumption.txt", header = FALSE, sep = ";", skip = 66637, nrows = 2880, na.strings = "?") header <- read.table ("household_power_consumption.txt", header = TRUE, sep = ";", nrows = 1) colnames(data) <- names(header) dat...
/plot2.R
no_license
Jonmdill/ExData_Plotting1
R
false
false
584
r
data <- read.table("household_power_consumption.txt", header = FALSE, sep = ";", skip = 66637, nrows = 2880, na.strings = "?") header <- read.table ("household_power_consumption.txt", header = TRUE, sep = ";", nrows = 1) colnames(data) <- names(header) dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wcb.R \name{wcb} \alias{wcb} \title{wcb() read excel input from clipboard} \usage{ wcb(mydata, Head = T, ...) } \arguments{ \item{mydata}{} } \description{ wcb() read excel input from clipboard } \examples{ somedata<-matrix(c(1:20),ncol=4) na...
/man/wcb.Rd
no_license
Vancamjr/jvctools
R
false
true
472
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wcb.R \name{wcb} \alias{wcb} \title{wcb() read excel input from clipboard} \usage{ wcb(mydata, Head = T, ...) } \arguments{ \item{mydata}{} } \description{ wcb() read excel input from clipboard } \examples{ somedata<-matrix(c(1:20),ncol=4) na...
############################################################ #This is the Shiny file for the HCV model and treatment App #inspired by a study on HCV and IFN treatment (Neumann et al. 1998, Science) #written and maintained by Andreas Handel (ahandel@uga.edu) #last updated 5/16/2018 ######################################...
/inst/shinyapps/VirusandTx/app.R
no_license
henok535/DSAIRM
R
false
false
9,967
r
############################################################ #This is the Shiny file for the HCV model and treatment App #inspired by a study on HCV and IFN treatment (Neumann et al. 1998, Science) #written and maintained by Andreas Handel (ahandel@uga.edu) #last updated 5/16/2018 ######################################...
#' Separate a collapsed column into multiple rows #' #' @description #' `r lifecycle::badge("superseded")` #' #' `separate_rows()` has been superseded in favour of [separate_longer_delim()] #' because it has a more consistent API with other separate functions. #' Superseded functions will not go away, but will only rec...
/R/separate-rows.R
permissive
tidyverse/tidyr
R
false
false
1,785
r
#' Separate a collapsed column into multiple rows #' #' @description #' `r lifecycle::badge("superseded")` #' #' `separate_rows()` has been superseded in favour of [separate_longer_delim()] #' because it has a more consistent API with other separate functions. #' Superseded functions will not go away, but will only rec...
message("[2 - init]: creation of file paths") ################# OBJECTS ############################################### ################# ############################################### #list of Rmd files with domains and studies that will be included in the current harmonization { path_list...
/data/list_Rmd_files.R
no_license
mindmap-cities/Harmonized-Datasets
R
false
false
5,409
r
message("[2 - init]: creation of file paths") ################# OBJECTS ############################################### ################# ############################################### #list of Rmd files with domains and studies that will be included in the current harmonization { path_list...
library(readxl) library(magrittr) library(hutils) library(data.table) library(knitr) URL_Table2 <- "https://data.gov.au/dataset/d170213c-4391-4d10-ac24-b0c11768da3f/resource/ca3d7752-e689-47fa-a746-20cfee9f2630/download/taxstats2016individual02lodgmentmethodgendertaxablestatusstateage.xlsx" destfile <- "data-raw/Ta...
/data-raw/put-individuals-table2.R
no_license
HughParsonage/taxstats1516
R
false
false
4,314
r
library(readxl) library(magrittr) library(hutils) library(data.table) library(knitr) URL_Table2 <- "https://data.gov.au/dataset/d170213c-4391-4d10-ac24-b0c11768da3f/resource/ca3d7752-e689-47fa-a746-20cfee9f2630/download/taxstats2016individual02lodgmentmethodgendertaxablestatusstateage.xlsx" destfile <- "data-raw/Ta...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CoreSetClass.R \docType{class} \name{CoreSet-class} \alias{CoreSet-class} \alias{.CoreSet} \alias{cellInfo,CoreSet-method} \alias{cellInfo<-,CoreSet,data.frame-method} \alias{phenoInfo,CoreSet-method} \alias{phenoInfo<-,CoreSet,character,data...
/man/CoreSet-class.Rd
no_license
cran/CoreGx
R
false
true
7,153
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CoreSetClass.R \docType{class} \name{CoreSet-class} \alias{CoreSet-class} \alias{.CoreSet} \alias{cellInfo,CoreSet-method} \alias{cellInfo<-,CoreSet,data.frame-method} \alias{phenoInfo,CoreSet-method} \alias{phenoInfo<-,CoreSet,character,data...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/learn.R \name{learn_curve} \alias{learn_curve} \title{Learning Curve Function} \usage{ learn_curve(T1, LC, RC, Qty, rate = 1) } \arguments{ \item{T1}{numeric value} \item{LC}{decimal value} \item{rate}{} } \value{ } \description{ Learning ...
/man/learn_curve.Rd
no_license
frankij11/RCostTools
R
false
true
337
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/learn.R \name{learn_curve} \alias{learn_curve} \title{Learning Curve Function} \usage{ learn_curve(T1, LC, RC, Qty, rate = 1) } \arguments{ \item{T1}{numeric value} \item{LC}{decimal value} \item{rate}{} } \value{ } \description{ Learning ...
# revisions i <- seq(0, 1, 1/1000) plot(jitter(i,100) ) prior <-dbeta(i,1,1) hist(prior) posterior<- dbeta(i,) f <- function(a) { curve(exp(a*x)-a*x-1, xlim=c(-10,10)) } par(mfrow=c(2,2)) f(0.1) f(0.5) f(1) f(2)
/Revisions/revisions.R
no_license
mordor-ai/M2-traitement-avance-information
R
false
false
217
r
# revisions i <- seq(0, 1, 1/1000) plot(jitter(i,100) ) prior <-dbeta(i,1,1) hist(prior) posterior<- dbeta(i,) f <- function(a) { curve(exp(a*x)-a*x-1, xlim=c(-10,10)) } par(mfrow=c(2,2)) f(0.1) f(0.5) f(1) f(2)
## File Name: slca_calc_counts.R ## File Version: 0.06 ################################################ # calculation of expected counts slca_calc_counts <- function(G, weights, dat.ind, dat, dat.resp, p.aj.xi, K, n.ik, TP,I,group, dat.ind2, ind.group, use.freqpatt ) { N.ik <- array( 0, dim=c...
/CDM/R/slca_calc_counts.R
no_license
akhikolla/InformationHouse
R
false
false
1,942
r
## File Name: slca_calc_counts.R ## File Version: 0.06 ################################################ # calculation of expected counts slca_calc_counts <- function(G, weights, dat.ind, dat, dat.resp, p.aj.xi, K, n.ik, TP,I,group, dat.ind2, ind.group, use.freqpatt ) { N.ik <- array( 0, dim=c...
#Reading from txt file #Sub setting by by dates between 1/2/2007 to 2/2/2007 dataFile <- "./data/household_power_consumption.txt" data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #Exploring the data head(subData) #Convere...
/plot2.R
no_license
hersuen/tomwang
R
false
false
811
r
#Reading from txt file #Sub setting by by dates between 1/2/2007 to 2/2/2007 dataFile <- "./data/household_power_consumption.txt" data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #Exploring the data head(subData) #Convere...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/logging_functions.R \name{projects.logs.list} \alias{projects.logs.list} \title{Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.} \usage{ projects.logs.list(parent, pageToken = N...
/googleloggingv2beta1.auto/man/projects.logs.list.Rd
permissive
GVersteeg/autoGoogleAPI
R
false
true
1,257
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/logging_functions.R \name{projects.logs.list} \alias{projects.logs.list} \title{Lists the logs in projects, organizations, folders, or billing accounts. Only logs that have entries are listed.} \usage{ projects.logs.list(parent, pageToken = N...
##Long version of reading in # de_DE.blogs_locale <- "C:/Users/Kyle.ligon/Desktop/Working Directory/Captstone Project/final/de_DE/de_DE.blogs.txt" # de_DE.news.txt_locale <- "C:/Users/Kyle.ligon/Desktop/Working Directory/Captstone Project/final/de_DE/de_DE.news.txt" # de_DE.twitter.txt_locale <- "C:/Users/Kyle.ligon/De...
/reading_data_script.R
no_license
nschampions2004/Capstone-Project-for-Data-Science-from-Coursera-
R
false
false
1,339
r
##Long version of reading in # de_DE.blogs_locale <- "C:/Users/Kyle.ligon/Desktop/Working Directory/Captstone Project/final/de_DE/de_DE.blogs.txt" # de_DE.news.txt_locale <- "C:/Users/Kyle.ligon/Desktop/Working Directory/Captstone Project/final/de_DE/de_DE.news.txt" # de_DE.twitter.txt_locale <- "C:/Users/Kyle.ligon/De...
library(mosaic) library(pander) library(readr) library(tidyverse) library(knitr) library(ggplot2) library(viridis) library(readxl) GDP <- read_xls('C:/Users/jscot/Documents/Econometrics_R/Real GDP growth (Annual percent change).xls') Countries <- select(GDP, c("Year", "Angola", "Venezuela", "United States", "Saudi A...
/oil_futures/Africa_Oil_Plots.R
no_license
jonferrin/Econometrics---Group
R
false
false
1,178
r
library(mosaic) library(pander) library(readr) library(tidyverse) library(knitr) library(ggplot2) library(viridis) library(readxl) GDP <- read_xls('C:/Users/jscot/Documents/Econometrics_R/Real GDP growth (Annual percent change).xls') Countries <- select(GDP, c("Year", "Angola", "Venezuela", "United States", "Saudi A...
library(VIM) library(mice) setwd("C:/Users/Hayes/Desktop/BDS 005/Projects/Project 4") train = read.csv("training.csv") str(train) #View(train) #train2 = train train[train==-999]=NA #View(train2) #str(train2) summary(train) which(colSums(is.na(train)) != 0 ) which(rowSums(is.na(train)) != 0 ) md.pattern(trai...
/Cozart/examinations.R
no_license
kszela24/higgs-bozon
R
false
false
5,560
r
library(VIM) library(mice) setwd("C:/Users/Hayes/Desktop/BDS 005/Projects/Project 4") train = read.csv("training.csv") str(train) #View(train) #train2 = train train[train==-999]=NA #View(train2) #str(train2) summary(train) which(colSums(is.na(train)) != 0 ) which(rowSums(is.na(train)) != 0 ) md.pattern(trai...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GDSFileResourceResolver.R \docType{class} \name{GDSFileResourceResolver} \alias{GDSFileResourceResolver} \title{GDS file resource resolver} \format{ A R6 object of class GDSFileResourceResolver } \description{ Build a GDS resource client from...
/man/GDSFileResourceResolver.Rd
permissive
epigeny/dsOmics
R
false
true
2,227
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GDSFileResourceResolver.R \docType{class} \name{GDSFileResourceResolver} \alias{GDSFileResourceResolver} \title{GDS file resource resolver} \format{ A R6 object of class GDSFileResourceResolver } \description{ Build a GDS resource client from...
library(NISTunits) ### Name: NISTinchOfMercury60FtOkpascal ### Title: Convert inch of mercury 12 to kilopascal ### Aliases: NISTinchOfMercury60FtOkpascal ### Keywords: programming ### ** Examples NISTinchOfMercury60FtOkpascal(10)
/data/genthat_extracted_code/NISTunits/examples/NISTinchOfMercury60FtOkpascal.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
237
r
library(NISTunits) ### Name: NISTinchOfMercury60FtOkpascal ### Title: Convert inch of mercury 12 to kilopascal ### Aliases: NISTinchOfMercury60FtOkpascal ### Keywords: programming ### ** Examples NISTinchOfMercury60FtOkpascal(10)
### Plot aggregation against the ensemble library(ggplot2) ### Get aggregated obs data_dir = "../Leeuwarden_Data/" years = 2008:2019 total_num_days_for_aggr <- 10 daily_obs <- Get_daily_obs(years, data_dir = data_dir) aggr_daily_obs <- Wrapper_obs_aggr( total_num_days_for_aggr = total_num_days_for_aggr, daily_obs = ...
/code/rainHelpers/Helper/plot_aggregations_temporary.R
no_license
katerobsau/NWO_Project
R
false
false
1,570
r
### Plot aggregation against the ensemble library(ggplot2) ### Get aggregated obs data_dir = "../Leeuwarden_Data/" years = 2008:2019 total_num_days_for_aggr <- 10 daily_obs <- Get_daily_obs(years, data_dir = data_dir) aggr_daily_obs <- Wrapper_obs_aggr( total_num_days_for_aggr = total_num_days_for_aggr, daily_obs = ...
# Total Medicare Enrollment: Total, Original Medicare, and Medicare Advantage and Other Health Plan Enrollment library(magrittr) # Get a temporary directory to extract zip files to. tmpdir <- tempdir() # unzip the files unzip("program_statistics/2013_enrollment/Total_Med_Enroll_XLSX.zip", junkpaths = TRUE, exdi...
/data-raw/MDCR_ENROLL_AB_06.R
permissive
dewittpe/cms.codes
R
false
false
3,201
r
# Total Medicare Enrollment: Total, Original Medicare, and Medicare Advantage and Other Health Plan Enrollment library(magrittr) # Get a temporary directory to extract zip files to. tmpdir <- tempdir() # unzip the files unzip("program_statistics/2013_enrollment/Total_Med_Enroll_XLSX.zip", junkpaths = TRUE, exdi...
function (N, S, r, min_its, max_its, signif, log_dismiss) { e <- get("data.env", .GlobalEnv) e[["gset_raw"]][[length(e[["gset_raw"]]) + 1]] <- list(N = N, S = S, r = r, min_its = min_its, max_its = max_its, signif = signif, log_dismiss = log_dismiss) .Call("_gsEasy_gset_raw", PACKAGE = "g...
/valgrind_test_dir/gset_raw-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
387
r
function (N, S, r, min_its, max_its, signif, log_dismiss) { e <- get("data.env", .GlobalEnv) e[["gset_raw"]][[length(e[["gset_raw"]]) + 1]] <- list(N = N, S = S, r = r, min_its = min_its, max_its = max_its, signif = signif, log_dismiss = log_dismiss) .Call("_gsEasy_gset_raw", PACKAGE = "g...
#Kendyl Barron #Biostats F15 #Assignment 5 #Chapter9Question24 #part b. create matrix for table of data. DataMatrix<-matrix(c(32,20,18,30),ncol=2, byrow=T) DataMatrix #label columns of matrix. colnames(DataMatrix)<- c("France (cool)", "India (warm)") rownames(DataMatrix)<- c("Sterile", "Fertile") DataMatrix #plot da...
/Source Code/assign 5 chp9q24.R
no_license
kendylbarron/Biostats-Projects
R
false
false
1,020
r
#Kendyl Barron #Biostats F15 #Assignment 5 #Chapter9Question24 #part b. create matrix for table of data. DataMatrix<-matrix(c(32,20,18,30),ncol=2, byrow=T) DataMatrix #label columns of matrix. colnames(DataMatrix)<- c("France (cool)", "India (warm)") rownames(DataMatrix)<- c("Sterile", "Fertile") DataMatrix #plot da...
library(shiny) function(input, output) { output$contents <- renderTable({ # input$file1 will be NULL initially. After the user selects # and uploads a file, it will be a data frame with 'name', # 'size', 'type', and 'datapath' columns. The 'datapath' # column will contain the local filenames whe...
/R-Portable/library/shiny/examples/09_upload/server.R
permissive
ksasso/Electron_ShinyApp_Deployment
R
false
false
534
r
library(shiny) function(input, output) { output$contents <- renderTable({ # input$file1 will be NULL initially. After the user selects # and uploads a file, it will be a data frame with 'name', # 'size', 'type', and 'datapath' columns. The 'datapath' # column will contain the local filenames whe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/skitools.R \name{splot} \alias{splot} \title{splot} \usage{ splot(x, y, cex = 0.4, poutlier = 0.01, col = alpha("black", 0.3), xlim = quantile(x, na.rm = T, prob = c(poutlier[1], 1 - poutlier[length(poutlier)])), ylim = quantile(y, na.rm ...
/man/splot.Rd
no_license
xtYao/skitools
R
false
true
2,128
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/skitools.R \name{splot} \alias{splot} \title{splot} \usage{ splot(x, y, cex = 0.4, poutlier = 0.01, col = alpha("black", 0.3), xlim = quantile(x, na.rm = T, prob = c(poutlier[1], 1 - poutlier[length(poutlier)])), ylim = quantile(y, na.rm ...
library("crayon", lib.loc = "/exports/csce/eddie/inf/groups/mamode_prendergast/R_packages/") library("rstudioapi", lib.loc = "/exports/csce/eddie/inf/groups/mamode_prendergast/R_packages/") library("cli", lib.loc = "/exports/csce/eddie/inf/groups/mamode_prendergast/R_packages/") library("withr", lib.loc = "/exports/csc...
/ML_models/trials/caret_gbm_no_data_transform_no_center_no_scale.R
permissive
HIM003/edinburgh-university-dissertation
R
false
false
4,845
r
library("crayon", lib.loc = "/exports/csce/eddie/inf/groups/mamode_prendergast/R_packages/") library("rstudioapi", lib.loc = "/exports/csce/eddie/inf/groups/mamode_prendergast/R_packages/") library("cli", lib.loc = "/exports/csce/eddie/inf/groups/mamode_prendergast/R_packages/") library("withr", lib.loc = "/exports/csc...
testlist <- list(Beta = 0, CVLinf = -1.37672045511449e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794...
/DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615829072-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
487
r
testlist <- list(Beta = 0, CVLinf = -1.37672045511449e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794...
# rm(list=ls()) require(pacman) p_load(tidyverse,rio,skimr) #=========# # Punto 1 # #=========# 1:100 n_1_100 = seq(1,100,1) impares = seq(1,99,2) pares = a = 10:15 a a[1] a[4] a[2] a[-4] 1:5 %in% 3:6 !1:5 %in% 3:6 !n_1_100 %in% impares n_1_100[!n_1_100 %in% impares] a[c(T,F,F,F,F,T)] pares = n_1_100[!n...
/task_1/source/Horario_atencion.R
no_license
Santiago-Prieto/task1
R
false
false
1,383
r
# rm(list=ls()) require(pacman) p_load(tidyverse,rio,skimr) #=========# # Punto 1 # #=========# 1:100 n_1_100 = seq(1,100,1) impares = seq(1,99,2) pares = a = 10:15 a a[1] a[4] a[2] a[-4] 1:5 %in% 3:6 !1:5 %in% 3:6 !n_1_100 %in% impares n_1_100[!n_1_100 %in% impares] a[c(T,F,F,F,F,T)] pares = n_1_100[!n...
#' @include FLMatrix.R NULL #' Constructor function for FLTableMD. #' #' \code{FLTableMD} constructs an object of class \code{FLTableMD}. #' #' \code{FLTableMD} refers to an in-database table with multiple data sets. #' This object is commonly used as input for some data mining functions #' which operate parallelly o...
/R/FLTableMD.R
no_license
amalshri/AdapteR
R
false
false
8,033
r
#' @include FLMatrix.R NULL #' Constructor function for FLTableMD. #' #' \code{FLTableMD} constructs an object of class \code{FLTableMD}. #' #' \code{FLTableMD} refers to an in-database table with multiple data sets. #' This object is commonly used as input for some data mining functions #' which operate parallelly o...
#' checkDates #' #' @param data the data you're checking for dates, should be TS objects #' @param minDate proposed minimum date to start with #' @param maxDate proposed maximum date to start with #' @param freqN the frequency of the data you're dealing with #' #' @return list with matrix of minimum and maximum dates a...
/R/checkDates.R
no_license
stephstammel/forecastHelpR
R
false
false
1,870
r
#' checkDates #' #' @param data the data you're checking for dates, should be TS objects #' @param minDate proposed minimum date to start with #' @param maxDate proposed maximum date to start with #' @param freqN the frequency of the data you're dealing with #' #' @return list with matrix of minimum and maximum dates a...
install.packages('randomForest') library('randomForest') library('party') inputdata <- readingSkills[, c('nativeSpeaker', 'age','shoeSize', 'score')] forest = randomForest(formula = nativeSpeaker ~ (age + shoeSize + score), data = inputdata) print(forest) print(importance(forest, type=2))
/Demonstrations/understanding-random-forest.r
no_license
Aaditya005/fidelityrscripts
R
false
false
307
r
install.packages('randomForest') library('randomForest') library('party') inputdata <- readingSkills[, c('nativeSpeaker', 'age','shoeSize', 'score')] forest = randomForest(formula = nativeSpeaker ~ (age + shoeSize + score), data = inputdata) print(forest) print(importance(forest, type=2))
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../../findNSourceUtils.R') check.deeplearning_imbalanced <- function(conn) { Log.info("Test checks if Deep Learning works fine with an imbalanced dataset") prostate = h2o.uploadFile(conn, locate("smalldata/logreg/prostate.csv")) hh...
/R/tests/testdir_algos/deeplearning/runit_DeepLearning_imbalance_large.R
permissive
apprisi/h2o
R
false
false
948
r
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../../findNSourceUtils.R') check.deeplearning_imbalanced <- function(conn) { Log.info("Test checks if Deep Learning works fine with an imbalanced dataset") prostate = h2o.uploadFile(conn, locate("smalldata/logreg/prostate.csv")) hh...
WI.data=read.table("WI15.txt", header=T,sep = ",") WI.data.intre=data.frame(bridgeID=WI.data$STRUCTURE_NUMBER_008,year=WI.data$YEAR_BUILT_027,filpscode=WI.data$STATE_CODE_001, Conditionrating_DECK=WI.data$DECK_COND_058,Conditionrating_SUPERSTRC=WI.data$SUPERSTRUCTURE_COND_059, ...
/WI_2015_data.R
no_license
MadStats/bridges-xye43
R
false
false
574
r
WI.data=read.table("WI15.txt", header=T,sep = ",") WI.data.intre=data.frame(bridgeID=WI.data$STRUCTURE_NUMBER_008,year=WI.data$YEAR_BUILT_027,filpscode=WI.data$STATE_CODE_001, Conditionrating_DECK=WI.data$DECK_COND_058,Conditionrating_SUPERSTRC=WI.data$SUPERSTRUCTURE_COND_059, ...
# Function to produce very basic table, no lines or headings # by Rob Hyndman # https://github.com/robjhyndman/CV/blob/master/functions.R baretable <- function(tbl, digits = 0, include.colnames=FALSE, include.rownames=FALSE, hline.after=NULL, size = g...
/matthew-rees-CV/functions.R
no_license
matt-w-rees/cv
R
false
false
911
r
# Function to produce very basic table, no lines or headings # by Rob Hyndman # https://github.com/robjhyndman/CV/blob/master/functions.R baretable <- function(tbl, digits = 0, include.colnames=FALSE, include.rownames=FALSE, hline.after=NULL, size = g...
r=0.58 https://sandbox.dams.library.ucdavis.edu/fcrepo/rest/collection/sherry-lehmann/catalogs/d7ts3m/media/images/d7ts3m-014/svc:tesseract/full/full/0.58/default.jpg Accept:application/hocr+xml
/tesseract/rotate/d7ts3m-014.r
permissive
ucd-library/wine-price-extraction
R
false
false
195
r
r=0.58 https://sandbox.dams.library.ucdavis.edu/fcrepo/rest/collection/sherry-lehmann/catalogs/d7ts3m/media/images/d7ts3m-014/svc:tesseract/full/full/0.58/default.jpg Accept:application/hocr+xml
require(tidyverse) require(gridExtra) require(scales) require(vegan) require(reshape2) require(rlang) require(lubridate) source("~/ggplot_theme.txt") fancy_scientific <- function(l) { # turn in to character string in scientific notation l <- format(l, scientific = TRUE) #reformat zeros l <- gsub("0e\\+00","0",l) ...
/NMDS_plots_axes_over_time.r
no_license
ewmorr/diel_RNAseq
R
false
false
7,471
r
require(tidyverse) require(gridExtra) require(scales) require(vegan) require(reshape2) require(rlang) require(lubridate) source("~/ggplot_theme.txt") fancy_scientific <- function(l) { # turn in to character string in scientific notation l <- format(l, scientific = TRUE) #reformat zeros l <- gsub("0e\\+00","0",l) ...
# Aim is to calculate the number of DE genes between intermediate tissues in Bayer all vs all # 18.7.2017 # Philippa Borrill #### prep data ###### # setwd setwd("/nbi/group-data/NBI/Cristobal-Uauy/expression_browser/WGA/Bayer_analysis/DE") library("matrixStats") library("DESeq2") # read in counts coun...
/scripts/Tissue_differential_expression/1_DE_intermediate_tissues_script_for_cluster_one_tissue_at_a_time_leaf_blades_excl_flag.R
no_license
Musketeer-D/WheatHomoeologExpression
R
false
false
3,904
r
# Aim is to calculate the number of DE genes between intermediate tissues in Bayer all vs all # 18.7.2017 # Philippa Borrill #### prep data ###### # setwd setwd("/nbi/group-data/NBI/Cristobal-Uauy/expression_browser/WGA/Bayer_analysis/DE") library("matrixStats") library("DESeq2") # read in counts coun...
#' Creates a boxplot ussing ggplot2 using variables in a metadata (Map) structure. #' #' The boxplot can represent up to three variables from the Map object #' @keywords boxplot #' @export #' @examples #' chibi.boxplot() chibi.boxplot<-function(Map=Map,x_val=NULL,y_val=NULL,col_val=NULL,shape_val=NULL,style="mix", ...
/R/chibi.boxplot.R
no_license
isaisg/ohchibi
R
false
false
54,711
r
#' Creates a boxplot ussing ggplot2 using variables in a metadata (Map) structure. #' #' The boxplot can represent up to three variables from the Map object #' @keywords boxplot #' @export #' @examples #' chibi.boxplot() chibi.boxplot<-function(Map=Map,x_val=NULL,y_val=NULL,col_val=NULL,shape_val=NULL,style="mix", ...
#' @title Core OTU matrix #' @description Creates the core matrix. #' @param x \code{\link{phyloseq}} object or a taxa x samples abundance matrix #' @param prevalence.intervals a vector of prevalence percentages in [0,100] #' @param detection.thresholds a vector of intensities around the data range #' @return Estimate...
/R/core_matrix.R
no_license
TTloveTT/microbiome
R
false
false
1,962
r
#' @title Core OTU matrix #' @description Creates the core matrix. #' @param x \code{\link{phyloseq}} object or a taxa x samples abundance matrix #' @param prevalence.intervals a vector of prevalence percentages in [0,100] #' @param detection.thresholds a vector of intensities around the data range #' @return Estimate...
\name{IsoModel} \alias{IsoModel} \title{Detection of genes with Isoforms with different gene expression in time course experiments} \description{ \code{IsoModel} Performs a model comparison for each gene to detect genes with different trends in time course experiments and applies maSigPro to the Isoforms bel...
/man/IsoModel.Rd
no_license
XingSiyuan/maSigPro
R
false
false
3,466
rd
\name{IsoModel} \alias{IsoModel} \title{Detection of genes with Isoforms with different gene expression in time course experiments} \description{ \code{IsoModel} Performs a model comparison for each gene to detect genes with different trends in time course experiments and applies maSigPro to the Isoforms bel...
datafile<-"/home/niyin/桌面/household_power_consumption.txt" data <- read.table(datafile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S") globalActivePower <-...
/p2.R
no_license
bitniyin/ExData_Plotting1
R
false
false
510
r
datafile<-"/home/niyin/桌面/household_power_consumption.txt" data <- read.table(datafile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S") globalActivePower <-...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/report_query.r \name{reportXnotY} \alias{reportXnotY} \title{Title} \usage{ reportXnotY(tokens, hits.x, hits.y, doc.col = getOption("doc.col", "doc_id"), position.col = getOption("position.col", "position"), word.col = getOption("wor.col"...
/man/reportXnotY.Rd
permissive
shouwangbuqi/semnet
R
false
true
388
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/report_query.r \name{reportXnotY} \alias{reportXnotY} \title{Title} \usage{ reportXnotY(tokens, hits.x, hits.y, doc.col = getOption("doc.col", "doc_id"), position.col = getOption("position.col", "position"), word.col = getOption("wor.col"...
#' Get NCBI taxonomy UID from GenBankID #' #' @export #' @param id A GenBank accession alphanumeric string, or a gi numeric string. #' @param ... Curl args passed on to \code{\link[httr]{GET}} #' @details See \url{http://www.ncbi.nlm.nih.gov/Sitemap/sequenceIDs.html} for help on why #' there are two identifiers, and th...
/taxize/R/genbank2uid.R
no_license
ingted/R-Examples
R
false
false
2,653
r
#' Get NCBI taxonomy UID from GenBankID #' #' @export #' @param id A GenBank accession alphanumeric string, or a gi numeric string. #' @param ... Curl args passed on to \code{\link[httr]{GET}} #' @details See \url{http://www.ncbi.nlm.nih.gov/Sitemap/sequenceIDs.html} for help on why #' there are two identifiers, and th...
# load libraries library(deSolve) library(ggplot2) library(dplyr) library(tidyr) # reactor parameters L = 10 vz = 1 D = 1e-4 D_uL = D/(vz*L) tau = L/vz # reaction parameters # 1. A + B -> C # 2. B + C -> D # k1 = 1 k2 = 1 # reactor inlet conditions cinlet = c(1.0, 1.0, 0.0, 0.0) # other parameters ngrid = 100 n...
/R/NumericalMethods_Beers/ch6_PFR_dyn_wDisp.R
no_license
notesofdabbler/textbook_companion
R
false
false
1,321
r
# load libraries library(deSolve) library(ggplot2) library(dplyr) library(tidyr) # reactor parameters L = 10 vz = 1 D = 1e-4 D_uL = D/(vz*L) tau = L/vz # reaction parameters # 1. A + B -> C # 2. B + C -> D # k1 = 1 k2 = 1 # reactor inlet conditions cinlet = c(1.0, 1.0, 0.0, 0.0) # other parameters ngrid = 100 n...
context("Joins") # Univariate keys -------------------------------------------------------------- a <- data.frame(x = c(1, 1, 2, 3), y = 1:4) b <- data.frame(x = c(1, 2, 2, 4), z = 1:4) test_that("univariate inner join has all columns, repeated matching rows", { j <- inner_join(a, b, "x") expect_equal(names(j),...
/tests/testthat/test-joins.r
no_license
msaidf/dplyr-dev
R
false
false
16,002
r
context("Joins") # Univariate keys -------------------------------------------------------------- a <- data.frame(x = c(1, 1, 2, 3), y = 1:4) b <- data.frame(x = c(1, 2, 2, 4), z = 1:4) test_that("univariate inner join has all columns, repeated matching rows", { j <- inner_join(a, b, "x") expect_equal(names(j),...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{simGWAS} \alias{simGWAS} \title{Get simulated GWAS results} \usage{ simGWAS(gene, pheno, config, parallel = F, cl) } \arguments{ \item{gene}{the result of a call to \link{simBlockSet}} \item{pheno}{the result of a ca...
/man/simGWAS.Rd
no_license
weinstockj/gwassim
R
false
true
627
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{simGWAS} \alias{simGWAS} \title{Get simulated GWAS results} \usage{ simGWAS(gene, pheno, config, parallel = F, cl) } \arguments{ \item{gene}{the result of a call to \link{simBlockSet}} \item{pheno}{the result of a ca...
library(ed4forte) stopifnot( requireNamespace("here", quietly = TRUE), requireNamespace("future", quietly = TRUE), requireNamespace("PEcAn.ED2", quietly = TRUE) ) start_date <- "1979-01-01" end_date <- "2019-12-31" lat <- 45.5625 lon <- -84.6975 outdir <- here::here("unsynced-data", "narr") dir.create(outdir, s...
/scripts/download-NARR-met.R
permissive
FoRTExperiment/ed4forte
R
false
false
680
r
library(ed4forte) stopifnot( requireNamespace("here", quietly = TRUE), requireNamespace("future", quietly = TRUE), requireNamespace("PEcAn.ED2", quietly = TRUE) ) start_date <- "1979-01-01" end_date <- "2019-12-31" lat <- 45.5625 lon <- -84.6975 outdir <- here::here("unsynced-data", "narr") dir.create(outdir, s...
##GGplots for honors thesis into manuscript #040220 ##Set 1 #reading in data dat1 = read.csv(file="DistalSites_PhysWQ_HT_030220.csv", header=TRUE) View(dat1) #need to run ggplot install.packages("devtools") library(devtools) library(ggplot2) install.packages("ggpubr") library(ggpubr) # install.packages("devtools")-...
/RAnalysis/Plots/HT_GGplots_BarPlots_051320.R
no_license
JillAshey/Oysters_EnvHistory
R
false
false
17,773
r
##GGplots for honors thesis into manuscript #040220 ##Set 1 #reading in data dat1 = read.csv(file="DistalSites_PhysWQ_HT_030220.csv", header=TRUE) View(dat1) #need to run ggplot install.packages("devtools") library(devtools) library(ggplot2) install.packages("ggpubr") library(ggpubr) # install.packages("devtools")-...
# entityType = "BLANK_LOT" # barcode = "BLK1-1" # coreApi <- creds # # api <- CoreAPIV2::coreAPI("Credentialsfreq_prod.txt") # # api$user <- "" # api$pwd<- "" # # # # coreApi <- CoreAPI::authBasic(api)$coreApi # # # # # # # useVerbose=T jsongetEntityByBarcode<-function (coreApi,entityType,barcode,useVerb...
/R_Code/jsongetEntityByBarcode.R
no_license
ceparman/Imaging-App2
R
false
false
1,492
r
# entityType = "BLANK_LOT" # barcode = "BLK1-1" # coreApi <- creds # # api <- CoreAPIV2::coreAPI("Credentialsfreq_prod.txt") # # api$user <- "" # api$pwd<- "" # # # # coreApi <- CoreAPI::authBasic(api)$coreApi # # # # # # # useVerbose=T jsongetEntityByBarcode<-function (coreApi,entityType,barcode,useVerb...
#' Visualize a Time Series Resample Plan #' #' The `plot_time_series_cv_plan()` function provides a visualization #' for a time series resample specification (`rset`) of either `rolling_origin` #' or `time_series_cv` class. #' #' @inheritParams plot_time_series #' @param .data A time series resample specificatio...
/R/rsample-plot_time_series_cv_plan.R
no_license
cran/timetk
R
false
false
5,620
r
#' Visualize a Time Series Resample Plan #' #' The `plot_time_series_cv_plan()` function provides a visualization #' for a time series resample specification (`rset`) of either `rolling_origin` #' or `time_series_cv` class. #' #' @inheritParams plot_time_series #' @param .data A time series resample specificatio...
############################################################################### ### Required functions for"When do we see the impact of social distancing?" ### ############################################################################### ############################################################# # This is the ...
/FigureS1/FigureS1top/sd_funcs.R
permissive
jessicastockdale/LongTimeFrames
R
false
false
16,938
r
############################################################################### ### Required functions for"When do we see the impact of social distancing?" ### ############################################################################### ############################################################# # This is the ...
library(shiny) <<<<<<< HEAD library(ggplot2) library(data.table) library(dplyr) unigram <- as.data.table(read.csv("./appdata/unigram.csv")) bigram.s <- as.data.table(read.csv("./appdata/bigram.csv")) trigram.s <- as.data.table(read.csv("./appdata/trigram.csv")) quadgram.s <- as.data.table(read.csv("./appdata/quadgram....
/server.R
no_license
hahendri/jhdscapstone
R
false
false
29,752
r
library(shiny) <<<<<<< HEAD library(ggplot2) library(data.table) library(dplyr) unigram <- as.data.table(read.csv("./appdata/unigram.csv")) bigram.s <- as.data.table(read.csv("./appdata/bigram.csv")) trigram.s <- as.data.table(read.csv("./appdata/trigram.csv")) quadgram.s <- as.data.table(read.csv("./appdata/quadgram....
rf <- TRUE if(rf){ library(rerf, lib.loc="~/R/mult/v1") }else{ #library(rerf, lib.loc="~/R/mult/v2") library(rerf, lib.loc="~/R/mult/v3") } library(ggplot2) rangeNormalize <- function(x){(x-min(x))/(max(x)-min(x))} rangeTest <- function(x,y){ minNon <- sort(unique(x))[2] y[y<minNon] <- 0 y <- (y-min(x))/(...
/exper/exp0040/test1000p.R
no_license
jbrowne6/exper
R
false
false
6,553
r
rf <- TRUE if(rf){ library(rerf, lib.loc="~/R/mult/v1") }else{ #library(rerf, lib.loc="~/R/mult/v2") library(rerf, lib.loc="~/R/mult/v3") } library(ggplot2) rangeNormalize <- function(x){(x-min(x))/(max(x)-min(x))} rangeTest <- function(x,y){ minNon <- sort(unique(x))[2] y[y<minNon] <- 0 y <- (y-min(x))/(...
\name{fb_allefreq} \alias{fb_allefreq} \title{ Obtain the list of populations with available electrophoretic studies. } \description{ Download, as a table, the list of populations with available electrophoretic studies. Read the HTMLwebpage, recognize the table and transform it into a Data.Frame object. } \usage{ fb_al...
/FishBase/man/fb_allefreq.Rd
permissive
cornejotux/FishBaseR
R
false
false
1,351
rd
\name{fb_allefreq} \alias{fb_allefreq} \title{ Obtain the list of populations with available electrophoretic studies. } \description{ Download, as a table, the list of populations with available electrophoretic studies. Read the HTMLwebpage, recognize the table and transform it into a Data.Frame object. } \usage{ fb_al...
library(ggplot2) theme_set(theme_bw() + theme(panel.spacing=grid::unit(0,"lines"))) set.seed(257) # Wrapper to hold roc plot to report roc_plot <- ( ggplot(roc_df, aes(x = x, y = y, group = model, colour = model)) + geom_line(aes(lty = model)) + scale_x_continuous(limits = c(0, 0.5)) + scale_y_continuous(limits...
/roc_Plots.R
no_license
CYGUBICKO/WDBC-Codes
R
false
false
531
r
library(ggplot2) theme_set(theme_bw() + theme(panel.spacing=grid::unit(0,"lines"))) set.seed(257) # Wrapper to hold roc plot to report roc_plot <- ( ggplot(roc_df, aes(x = x, y = y, group = model, colour = model)) + geom_line(aes(lty = model)) + scale_x_continuous(limits = c(0, 0.5)) + scale_y_continuous(limits...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DataDocumentation.R \docType{data} \name{Summary_Import_2017_BeforeRedef} \alias{Summary_Import_2017_BeforeRedef} \title{Summary 2017 Import Before Redefinition (2012 schema)} \format{ A dataframe with 73 obs. and 93 variables } \source{ \url...
/man/Summary_Import_2017_BeforeRedef.Rd
permissive
USEPA/useeior
R
false
true
554
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DataDocumentation.R \docType{data} \name{Summary_Import_2017_BeforeRedef} \alias{Summary_Import_2017_BeforeRedef} \title{Summary 2017 Import Before Redefinition (2012 schema)} \format{ A dataframe with 73 obs. and 93 variables } \source{ \url...
library(Rtsne) library(stats) library(MASS) source("l2_map.R") dataset = "clusters" iterations = 10 scale_this <- function(x){ (x - mean(x, na.rm=TRUE)) / ifelse(sd(x, na.rm=TRUE)==0,1,sd(x, na.rm=TRUE)) } generate_clusters <- function(mean_vals,n_per_cluster){ df <- c() labels <- c() p <- dim(mean_vals)...
/run_aug_sammon3.R
no_license
JonathanJohann/EE364BFinalProject
R
false
false
2,079
r
library(Rtsne) library(stats) library(MASS) source("l2_map.R") dataset = "clusters" iterations = 10 scale_this <- function(x){ (x - mean(x, na.rm=TRUE)) / ifelse(sd(x, na.rm=TRUE)==0,1,sd(x, na.rm=TRUE)) } generate_clusters <- function(mean_vals,n_per_cluster){ df <- c() labels <- c() p <- dim(mean_vals)...
setwd("F:/data science/Hackathon2") #reading the files train=read.csv("train.csv") test=read.csv("test.csv") str(train) str(test) test$shares=0 #dropping the categorial variables drops <- c("Day_of_publishing","Category_article") train=train[,!(names(train) %in% drops)] test=test[,!(names(test) %in% drops)] #fitt...
/benchmark.R
no_license
adityashrm21/AnalyticsVidhya_hackathon
R
false
false
594
r
setwd("F:/data science/Hackathon2") #reading the files train=read.csv("train.csv") test=read.csv("test.csv") str(train) str(test) test$shares=0 #dropping the categorial variables drops <- c("Day_of_publishing","Category_article") train=train[,!(names(train) %in% drops)] test=test[,!(names(test) %in% drops)] #fitt...
library(plyr) library(dplyr) library(tidyr) # spread library(ggplot2) library(readr) library(tidytext) library(magrittr) library(topicmodels) library(cowplot) library(viridis) library(RColorBrewer) library(stringr) # to use str_detect for numbers # paths path_data <- "./Data/Rocio-temporal/" # path to main dataset...
/R/02-prevalence_topic_barplot.R
permissive
rociojoo/mov-eco-review
R
false
false
3,361
r
library(plyr) library(dplyr) library(tidyr) # spread library(ggplot2) library(readr) library(tidytext) library(magrittr) library(topicmodels) library(cowplot) library(viridis) library(RColorBrewer) library(stringr) # to use str_detect for numbers # paths path_data <- "./Data/Rocio-temporal/" # path to main dataset...
################################################### ### code chunk number 3: fig1 ################################################### d <- harborSealWA dat <- d[, 2:ncol(d)] # first col is years x <- d[, 1] # first col is years n <- ncol(dat) # num time series # set up the graphical parameters to give each data a uniq...
/inst/userguide/figures/CS2--fig1.R
permissive
nwfsc-timeseries/MARSS
R
false
false
692
r
################################################### ### code chunk number 3: fig1 ################################################### d <- harborSealWA dat <- d[, 2:ncol(d)] # first col is years x <- d[, 1] # first col is years n <- ncol(dat) # num time series # set up the graphical parameters to give each data a uniq...
#' @import dplyr #' @export tidy_property_verification_data <- function(frame) { frame %>% # drop practice trials filter(block_type != "practice") %>% mutate( # only measure errors of commission is_correct = ifelse(response == "timeout", NA, is_correct), raw_rt = rt, # only measur...
/propertyverificationdata/R/tidy.R
no_license
lupyanlab/property-verification
R
false
false
813
r
#' @import dplyr #' @export tidy_property_verification_data <- function(frame) { frame %>% # drop practice trials filter(block_type != "practice") %>% mutate( # only measure errors of commission is_correct = ifelse(response == "timeout", NA, is_correct), raw_rt = rt, # only measur...
library(cowplot) library(magrittr) library(cupcake) library(ggplot2) library(scales) samps<-list.files(path='/home/ob219/rds/hpc-work/as_basis/t1d_bootstrap/sims_ws',pattern="wtccc*",full.names=TRUE) all.res.alt <- lapply(samps,function(path){ message(path) vars <- lapply(list.files(path=path,pattern="^proj*",f...
/R/align_OR/t1d_bootstrap/plot_bootstrap_variances.R
no_license
ollyburren/as_basis
R
false
false
5,184
r
library(cowplot) library(magrittr) library(cupcake) library(ggplot2) library(scales) samps<-list.files(path='/home/ob219/rds/hpc-work/as_basis/t1d_bootstrap/sims_ws',pattern="wtccc*",full.names=TRUE) all.res.alt <- lapply(samps,function(path){ message(path) vars <- lapply(list.files(path=path,pattern="^proj*",f...
NaCols<-rep(NA,100) for(i in 1:ncol(Z_StreamTemps13)){ if(NA %in% Z_StreamTemps13[,i]){ NaCols[i]<-i } } NaCols<-na.omit(NaCols) noNA_Stream<-Z_StreamTemps13[,-NaCols] noNA_Air<-Z_AirTemp13[-NaCols] streamSet<-c(3,8,23)#c(3,8,10,15,23) mod13<-runDFA(obs=noNA_Stream[streamSet,],NumStates=1,ErrStruc='UNC',EstCova...
/SimulationTesting/TestMARSSvsTMB.R
no_license
tjcline/dfaTMB
R
false
false
2,972
r
NaCols<-rep(NA,100) for(i in 1:ncol(Z_StreamTemps13)){ if(NA %in% Z_StreamTemps13[,i]){ NaCols[i]<-i } } NaCols<-na.omit(NaCols) noNA_Stream<-Z_StreamTemps13[,-NaCols] noNA_Air<-Z_AirTemp13[-NaCols] streamSet<-c(3,8,23)#c(3,8,10,15,23) mod13<-runDFA(obs=noNA_Stream[streamSet,],NumStates=1,ErrStruc='UNC',EstCova...
loadlib <- function(p) { if (!is.element(p, installed.packages()[,1])) install.packages(p, dep = TRUE) suppressMessages(suppressPackageStartupMessages(library(p, character.only=TRUE))) } library(stringi) library(shiny) library(data.table) library(quanteda) library(doParallel) library(foreach) lib...
/backEndCode.R
no_license
dauheeIRL/Capstone
R
false
false
4,960
r
loadlib <- function(p) { if (!is.element(p, installed.packages()[,1])) install.packages(p, dep = TRUE) suppressMessages(suppressPackageStartupMessages(library(p, character.only=TRUE))) } library(stringi) library(shiny) library(data.table) library(quanteda) library(doParallel) library(foreach) lib...
setwd("H:/Project/Screening Aging Genes/") library(gplots) # select WRN DEG gene1 <- read.table("./data/RNA-seq/20200825/DEG/liver_2m_vs_28m_DEG_clean.xls", header = T) gene1_up <- gene1[gene1$cluster == "28m", ] gene1_down <- gene1[gene1$cluster == "2m", ] # select KO DEG gene2 <- read.table("./data/RNA-seq/202008...
/scripts/[Fig_4_I] [RNA] heatmap_commone_DEG_between_2mVS28m_and_sgNTCVSsgKAT7.R
no_license
YuxuanZheng94/CRISPR_screen_KAT7
R
false
false
2,081
r
setwd("H:/Project/Screening Aging Genes/") library(gplots) # select WRN DEG gene1 <- read.table("./data/RNA-seq/20200825/DEG/liver_2m_vs_28m_DEG_clean.xls", header = T) gene1_up <- gene1[gene1$cluster == "28m", ] gene1_down <- gene1[gene1$cluster == "2m", ] # select KO DEG gene2 <- read.table("./data/RNA-seq/202008...
library(shiny) library(shinyjqui) library(highcharter) server <- function(input, output) { output$foo <- renderHighchart({ hchart(mtcars, "scatter", hcaes(x = cyl, y = mpg)) }) output$position <- renderPrint({ print(input$foo_position) }) } ui <- fluidPage( # no id jqui_resizable(...
/inst/shinydemos/resizable_combine_with_other_interactions.R
no_license
cran/shinyjqui
R
false
false
649
r
library(shiny) library(shinyjqui) library(highcharter) server <- function(input, output) { output$foo <- renderHighchart({ hchart(mtcars, "scatter", hcaes(x = cyl, y = mpg)) }) output$position <- renderPrint({ print(input$foo_position) }) } ui <- fluidPage( # no id jqui_resizable(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/packagename-data.R \docType{data} \name{Biopratice.test} \alias{Biopratice.test} \title{A dataset containing two sequences and Scoring_system.} \description{ A dataset containing two sequences and Scoring_system. }
/man/Biopratice.test.Rd
no_license
xzj-14035/Biopratice
R
false
true
293
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/packagename-data.R \docType{data} \name{Biopratice.test} \alias{Biopratice.test} \title{A dataset containing two sequences and Scoring_system.} \description{ A dataset containing two sequences and Scoring_system. }
library(dplyr) library(data.table) setwd('C:/Users/Administrator/Desktop/Big Data Analytics/project') # intelligent dataframe out of the excel file ----------------------------- df_final_cluster <- read.csv('df_artists_clustered_final.csv',header = TRUE, sep = ";") col_to_be <- c('artists', 'clusters') df_f...
/Part 3: Engine.R
no_license
ZsigmondKun/Spotify_project
R
false
false
6,321
r
library(dplyr) library(data.table) setwd('C:/Users/Administrator/Desktop/Big Data Analytics/project') # intelligent dataframe out of the excel file ----------------------------- df_final_cluster <- read.csv('df_artists_clustered_final.csv',header = TRUE, sep = ";") col_to_be <- c('artists', 'clusters') df_f...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exportToJson.R \name{exportObservationToJson} \alias{exportObservationToJson} \title{exportObservationToJson} \usage{ exportObservationToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath = getwd(), vocabD...
/man/exportObservationToJson.Rd
permissive
mdsung/Achilles
R
false
true
1,631
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exportToJson.R \name{exportObservationToJson} \alias{exportObservationToJson} \title{exportObservationToJson} \usage{ exportObservationToJson( connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema, outputPath = getwd(), vocabD...
pdf("plot.pdf"); w <- 32/32; df <- read.table(paste('data/data',32,'_nb.dat', sep=""), FALSE, sep=" "); t <- boxplot(V2~V1, data=df, main="D,p vs bw non blocking", xlab="D", ylab="Bandwidth", col=rgb(0.0, 0.0, 1.0, 0.5, maxColorValue=1.0), boxwex=w, border="brown", range=...
/Assignment1/1.2/s.r
no_license
Jenil2910/cs633
R
false
false
399
r
pdf("plot.pdf"); w <- 32/32; df <- read.table(paste('data/data',32,'_nb.dat', sep=""), FALSE, sep=" "); t <- boxplot(V2~V1, data=df, main="D,p vs bw non blocking", xlab="D", ylab="Bandwidth", col=rgb(0.0, 0.0, 1.0, 0.5, maxColorValue=1.0), boxwex=w, border="brown", range=...
#' Extract regression model data for 2 way interaction (predictor 1 & 3) #' with one covariate #' #' Pull the regression coefficient, standard error, t-value and p-value #' for the two way interaction between the first and third predictors #' specified in your linear model. If you have no covariates in your model, #' u...
/R/cov_interact13.R
no_license
antonyagonzalez/betatones
R
false
false
1,005
r
#' Extract regression model data for 2 way interaction (predictor 1 & 3) #' with one covariate #' #' Pull the regression coefficient, standard error, t-value and p-value #' for the two way interaction between the first and third predictors #' specified in your linear model. If you have no covariates in your model, #' u...
source('../config.R') model.latent.eagerness = glm(Y~soph+junior+senior+grad+alum+seconds_after_start, family=binomial(), data=master.frame) summary(model.latent.eagerness)
/build/build_model_latent_eagerness.R
no_license
willyxiao/stat139-datamatch
R
false
false
232
r
source('../config.R') model.latent.eagerness = glm(Y~soph+junior+senior+grad+alum+seconds_after_start, family=binomial(), data=master.frame) summary(model.latent.eagerness)
####################################################################### ########################### brca survival ############################# ####################################################################### library(survival) setwd('/Users/liurui/Documents/my documents/MATLAB/breast tumor3/whole dataset/mcf7_s...
/mcf7_survival_results/expressionSurvial_mi.R
no_license
rabbitpei/drug-resistance-of-breast-cancer
R
false
false
5,873
r
####################################################################### ########################### brca survival ############################# ####################################################################### library(survival) setwd('/Users/liurui/Documents/my documents/MATLAB/breast tumor3/whole dataset/mcf7_s...
library(ReporteRs) # création de documents Word et PPTx sortie <- docx(title="Texte seul") # création du document Word # paragraphes de texte par1 <- pot("L'objet ") + pot("flats", # mise en forme textProperties(font.family="Courier New")) + " est constitué de " + pot(format(nrow(flats), # résultat...
/exemples/chap9/9.10.R
no_license
fmigone/livreR
R
false
false
1,126
r
library(ReporteRs) # création de documents Word et PPTx sortie <- docx(title="Texte seul") # création du document Word # paragraphes de texte par1 <- pot("L'objet ") + pot("flats", # mise en forme textProperties(font.family="Courier New")) + " est constitué de " + pot(format(nrow(flats), # résultat...
test_that("growthrate_works",{ expect_that(growthrate(a=-0.2425, b=0.1519, c=0.05520, d= -0.002931, T=13.8), equals(4.66)) expect_that(growthrate(a=-0.1596, b=0.1498, c=0.02442, d= -0.001515, T=13.2), equals(2.59)) expect_that(growthrate(a= 0.0034, b=0.1702, c=0.00769, d= -0.000813, T=12.1), equals(1.75)) })
/Assignment3/package/test/growthrate_works.R
no_license
mattgargiulo/ESM262
R
false
false
318
r
test_that("growthrate_works",{ expect_that(growthrate(a=-0.2425, b=0.1519, c=0.05520, d= -0.002931, T=13.8), equals(4.66)) expect_that(growthrate(a=-0.1596, b=0.1498, c=0.02442, d= -0.001515, T=13.2), equals(2.59)) expect_that(growthrate(a= 0.0034, b=0.1702, c=0.00769, d= -0.000813, T=12.1), equals(1.75)) })
#Ex. 1 library(glmnet) #Read the mushrooms data data_mushrooms <- read.table("./agaricus-lepiota.data.txt", header=FALSE, sep=",") #clases y - first column. dim(data_mushrooms) head(data_mushrooms) #-------------------------------------- #Data preprocessing #1. Dexp = (ID, labels); labels = (1,2) 1-eatable, 2 - poiso...
/majority_voting.R
no_license
joope/HCOMP2018
R
false
false
2,413
r
#Ex. 1 library(glmnet) #Read the mushrooms data data_mushrooms <- read.table("./agaricus-lepiota.data.txt", header=FALSE, sep=",") #clases y - first column. dim(data_mushrooms) head(data_mushrooms) #-------------------------------------- #Data preprocessing #1. Dexp = (ID, labels); labels = (1,2) 1-eatable, 2 - poiso...
dup_mth_dis_gene_3context<-function(CG,CHG,CHH,pdf){ cg<-read.table(CG) chg<-read.table(CHG) chh<-read.table(CHH) par(mfrow=c(3,1),mar=c(3,4,2,1)); maxi<-max(cg[cg[,1]=="paired1_rpkm_big",][,4],cg[cg[,1]=="paired2_rpkm_small",][,4]) plot(cg[cg[,1]=="paired1_rpkm_big",][,4],type="l",col="re...
/bak_bioinformatics2_perl_scripts/perl_scripts3/R_code/dup_mth_dis_gene_3context.R
no_license
KaoruTSai/CAU_PhD_scripts
R
false
false
1,587
r
dup_mth_dis_gene_3context<-function(CG,CHG,CHH,pdf){ cg<-read.table(CG) chg<-read.table(CHG) chh<-read.table(CHH) par(mfrow=c(3,1),mar=c(3,4,2,1)); maxi<-max(cg[cg[,1]=="paired1_rpkm_big",][,4],cg[cg[,1]=="paired2_rpkm_small",][,4]) plot(cg[cg[,1]=="paired1_rpkm_big",][,4],type="l",col="re...
args=commandArgs(trailingOnly=TRUE) source("https://bioconductor.org/biocLite.R") biocLite("hicrep", lib=.libPaths()[1]) print(.libPaths(new)) install.packages("reshape2", lib=.libPaths()[1],repos="http://cran.rstudio.com/") install.packages("pheatmap", lib=.libPaths()[1],repos="http://cran.rstudio.com/")
/install_scripts/install_R_packages.R
permissive
resurgo-genetics/3DChromatin_ReplicateQC
R
false
false
308
r
args=commandArgs(trailingOnly=TRUE) source("https://bioconductor.org/biocLite.R") biocLite("hicrep", lib=.libPaths()[1]) print(.libPaths(new)) install.packages("reshape2", lib=.libPaths()[1],repos="http://cran.rstudio.com/") install.packages("pheatmap", lib=.libPaths()[1],repos="http://cran.rstudio.com/")
library(SCGLR) # load sample data data(genus) # get variable names from dataset n <- names(genus) ny <- n[grep("^gen",n)] # Y <- names that begins with "gen" nx <- n[-grep("^gen",n)] # X <- remaining names # remove "geology" and "surface" from nx # as surface is offset and we want to use geology as additional c...
/demo/scglrCrossVal.r
no_license
SCnext/SCGLR
R
false
false
841
r
library(SCGLR) # load sample data data(genus) # get variable names from dataset n <- names(genus) ny <- n[grep("^gen",n)] # Y <- names that begins with "gen" nx <- n[-grep("^gen",n)] # X <- remaining names # remove "geology" and "surface" from nx # as surface is offset and we want to use geology as additional c...
fetch_region <- function() { suppressMessages(library(dplyr)) chr <- 1 start <- 159175353 end <- 159525679 M <- 1e6 r <- paste0(chr,":",start-M,"-",end+M) for (i in 1:6) { f <- file.path(INF,"METAL","gwas2vcf","LP",paste0(p[i],".tsv.gz")) t <- seqminer::tabix.read.table(tabixFile = f, tabixRange...
/rsid/rs12075-circos.R
no_license
jinghuazhao/INF
R
false
false
4,143
r
fetch_region <- function() { suppressMessages(library(dplyr)) chr <- 1 start <- 159175353 end <- 159525679 M <- 1e6 r <- paste0(chr,":",start-M,"-",end+M) for (i in 1:6) { f <- file.path(INF,"METAL","gwas2vcf","LP",paste0(p[i],".tsv.gz")) t <- seqminer::tabix.read.table(tabixFile = f, tabixRange...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TPRRegTable.R \name{TPRRegTable} \alias{TPRRegTable} \title{TPR Results for regression} \usage{ TPRRegTable(QTL_true, QTL_detected, d_QTL, n_des = 9, n_mod = 4, n_QTL = 8, mod_names = c("cr", "par", "anc", "biall"), des_names = NULL, n_pa...
/man/TPRRegTable.Rd
no_license
vincentgarin/mppSim
R
false
true
1,404
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TPRRegTable.R \name{TPRRegTable} \alias{TPRRegTable} \title{TPR Results for regression} \usage{ TPRRegTable(QTL_true, QTL_detected, d_QTL, n_des = 9, n_mod = 4, n_QTL = 8, mod_names = c("cr", "par", "anc", "biall"), des_names = NULL, n_pa...
# This code identifies the RELATIVE location of the shapefile you wish to call # into the application to serve as your Regional Assessment Unit layer. ### NOTE: This RELATIVE location is called from the working directory (where # your application .Rproj is stored). Calling a file from outside this # re...
/R&S_app_v1/AUshapefileLocation.R
no_license
EmmaVJones/Rivers-StreamsAssessment
R
false
false
815
r
# This code identifies the RELATIVE location of the shapefile you wish to call # into the application to serve as your Regional Assessment Unit layer. ### NOTE: This RELATIVE location is called from the working directory (where # your application .Rproj is stored). Calling a file from outside this # re...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stratified.R \name{vstrat} \alias{vstrat} \title{Estimated Variance of Stratified Abundance Estimator} \usage{ vstrat(n1, n2, m2, estimator = "Chapman") } \arguments{ \item{n1}{Vector of individuals captured and marked in the first sample, fr...
/man/vstrat.Rd
no_license
mbtyers/recapr
R
false
true
1,592
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stratified.R \name{vstrat} \alias{vstrat} \title{Estimated Variance of Stratified Abundance Estimator} \usage{ vstrat(n1, n2, m2, estimator = "Chapman") } \arguments{ \item{n1}{Vector of individuals captured and marked in the first sample, fr...
context("authors match") test_that("Authors match correctly", { df <- data.frame( authorID = 1:6, AF = c("Smith, Jon J.", "Thompson, Bob B.", "Smith,J", "Smith, Jon James", "Aide, TM", "Aide, T.Mitchel"), AU = c("Smith, Jon J.", "Thompson, Bob", "Smith, J", "Smith, Jon James",'Aide, TM',"Aide, TM"), ...
/tests/testthat/test_authors_match.R
no_license
ropensci/refsplitr
R
false
false
7,096
r
context("authors match") test_that("Authors match correctly", { df <- data.frame( authorID = 1:6, AF = c("Smith, Jon J.", "Thompson, Bob B.", "Smith,J", "Smith, Jon James", "Aide, TM", "Aide, T.Mitchel"), AU = c("Smith, Jon J.", "Thompson, Bob", "Smith, J", "Smith, Jon James",'Aide, TM',"Aide, TM"), ...
#============================================================================================================================================================================================================================= # PREREQUISITES, READING IN DATA SET, AND TIDYING DATA #=========================================...
/medical-appointments.R
no_license
Kevin-Nguyen-Tran/Medical-Appointments
R
false
false
21,005
r
#============================================================================================================================================================================================================================= # PREREQUISITES, READING IN DATA SET, AND TIDYING DATA #=========================================...
\name{get_veg_species_from_MT_veg_db} \alias{get_veg_species_from_MT_veg_db} \title{Extract species-level Data from a Montana RangeDB database} \description{Get species-level data from a Montana RangeDB database.} \usage{ get_veg_species_from_MT_veg_db(dsn) } %- maybe also 'usage' for other objects documented...
/man/get_veg_species_from_MT_veg_db.Rd
no_license
bocinsky/soilDB
R
false
false
825
rd
\name{get_veg_species_from_MT_veg_db} \alias{get_veg_species_from_MT_veg_db} \title{Extract species-level Data from a Montana RangeDB database} \description{Get species-level data from a Montana RangeDB database.} \usage{ get_veg_species_from_MT_veg_db(dsn) } %- maybe also 'usage' for other objects documented...
#'Diagnostic Plots #' #'Plot average M-H acceptance percentage, tree nodes, tree leaves, tree depth, and predictor inclusion proportions. #'@param bfit Fitted object from BART related calls, #'@param response_type Type of the response variable. Options are "continuous", "binary", and "multinomial", #'@param plot_type 0...
/R/DiagPlots.R
no_license
yizhenxu/allBART
R
false
false
4,525
r
#'Diagnostic Plots #' #'Plot average M-H acceptance percentage, tree nodes, tree leaves, tree depth, and predictor inclusion proportions. #'@param bfit Fitted object from BART related calls, #'@param response_type Type of the response variable. Options are "continuous", "binary", and "multinomial", #'@param plot_type 0...
#' Get financial statements from simfin #' #' Uses the simfim api <https://simfin.com/> for downloading corporate financial datasets available at the website. #' In order to use the function, you'll need a valid api key from <https://simfin.com/data/access/api>. #' All data from the site is locally cached with package ...
/R/get_fin_statements.R
no_license
tpopenfoose/simfinR
R
false
false
3,777
r
#' Get financial statements from simfin #' #' Uses the simfim api <https://simfin.com/> for downloading corporate financial datasets available at the website. #' In order to use the function, you'll need a valid api key from <https://simfin.com/data/access/api>. #' All data from the site is locally cached with package ...
#simulate some salmon catch data and fit splits to it #super useful markdown file on splines in stan! #https://github.com/milkha/Splines_in_Stan/blob/master/splines_in_stan.Rmd #https://mc-stan.org/users/documentation/case-studies/splines_in_stan.html #housekeeping #rm(list=ls()) options(stringsAsFactors = FALSE) # ...
/analyses/fit_splines_recdat_multilevel.R
no_license
AileneKane/recphen
R
false
false
2,794
r
#simulate some salmon catch data and fit splits to it #super useful markdown file on splines in stan! #https://github.com/milkha/Splines_in_Stan/blob/master/splines_in_stan.Rmd #https://mc-stan.org/users/documentation/case-studies/splines_in_stan.html #housekeeping #rm(list=ls()) options(stringsAsFactors = FALSE) # ...
# file is closed | no more update # tvsobi of original Yeredor's paper # all supporting and utility functions are packed into function tvsobi <- function(X, lag.max = 12, useQuadratic = TRUE, epsilon.method = 1, jd.method = "frjd"){ # TV-SOBI support ------...
/rlab_x.R
no_license
yyyaaan/bss
R
false
false
7,065
r
# file is closed | no more update # tvsobi of original Yeredor's paper # all supporting and utility functions are packed into function tvsobi <- function(X, lag.max = 12, useQuadratic = TRUE, epsilon.method = 1, jd.method = "frjd"){ # TV-SOBI support ------...
# set working directory to Exploratory Data Analysis folder rootpath <- "~/R/ExploratoryAnalysis" # set Input and Output folders if(!file.exists(paste(rootpath,"/data",sep=""))) { dir.create(paste(rootpath,"/data",sep="")) } if(!file.exists(paste(rootpath,"/figure",sep=""))) { dir.create(paste(rootpath,"/figure",...
/Plot1.R
no_license
paritosh149/ExData_Plotting1
R
false
false
1,462
r
# set working directory to Exploratory Data Analysis folder rootpath <- "~/R/ExploratoryAnalysis" # set Input and Output folders if(!file.exists(paste(rootpath,"/data",sep=""))) { dir.create(paste(rootpath,"/data",sep="")) } if(!file.exists(paste(rootpath,"/figure",sep=""))) { dir.create(paste(rootpath,"/figure",...
ComputeSimilarityMetric <- function(...) { .Call("ComputeSimilarityMetric", as.character(c(...))) }
/R/ComputeSimilarityMetric.R
no_license
stnava/itkImageR
R
false
false
103
r
ComputeSimilarityMetric <- function(...) { .Call("ComputeSimilarityMetric", as.character(c(...))) }
skip_on_cran() tests.home <- getwd() setwd(tempdir()) write.csv(example.spatial, "spatial.csv", row.names = FALSE) spatial <- loadSpatial() file.remove("spatial.csv") write.csv(example.biometrics, "biometrics.csv", row.names = FALSE) bio <- loadBio(input = "biometrics.csv", tz = "Europe/Copenhagen") file....
/tests/testthat/test_transformSpatial.R
no_license
cran/actel
R
false
false
5,897
r
skip_on_cran() tests.home <- getwd() setwd(tempdir()) write.csv(example.spatial, "spatial.csv", row.names = FALSE) spatial <- loadSpatial() file.remove("spatial.csv") write.csv(example.biometrics, "biometrics.csv", row.names = FALSE) bio <- loadBio(input = "biometrics.csv", tz = "Europe/Copenhagen") file....
# Simple Linear Regression # Data Preprocessing Template # Importing the dataset dataset = read.csv('Salary_Data.csv') # Splitting the dataset into the Training set and Test set # install.packages('caTools') library(caTools) set.seed(123) split = sample.split(dataset$Salary, SplitRatio = 2/3) training_set = subset(d...
/Part 2 - Regression/Section 4 - Simple Linear Regression/simple_linear_regression.R
no_license
bhavinrshah/machine_learning
R
false
false
2,987
r
# Simple Linear Regression # Data Preprocessing Template # Importing the dataset dataset = read.csv('Salary_Data.csv') # Splitting the dataset into the Training set and Test set # install.packages('caTools') library(caTools) set.seed(123) split = sample.split(dataset$Salary, SplitRatio = 2/3) training_set = subset(d...
dataFile <- "./R/R file folder/household_power_consumption.txt" data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #str(subSetData) datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H...
/Plot3.R
no_license
JamesHancock89/ExData_Plotting1
R
false
false
928
r
dataFile <- "./R/R file folder/household_power_consumption.txt" data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #str(subSetData) datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H...
# Retrieve data library(tidyverse) library(haven) # load experimental group data nsw <- # import haven::read_dta("https://github.com/scunning1975/mixtape/raw/master/nsw_mixtape.dta") %>% # drop if treat == 0 filter(treat != 0) # merge CPS controls (Dehejia and Wahba 2002) cps <- haven::read_dta("https://g...
/Code/data_pull.R
permissive
orsdemir/abadie_replication
R
false
false
1,060
r
# Retrieve data library(tidyverse) library(haven) # load experimental group data nsw <- # import haven::read_dta("https://github.com/scunning1975/mixtape/raw/master/nsw_mixtape.dta") %>% # drop if treat == 0 filter(treat != 0) # merge CPS controls (Dehejia and Wahba 2002) cps <- haven::read_dta("https://g...
attach(m2data) modelflag<-5 if (modelflag==0) { m2<-m2ols0 } else if (modelflag==5) { m2<-m2ols5 } # Plot price vs motorway i1<-grep("motorway",names(m2$coefficients)) b1<-m2$coefficients[i1] p_motorway<- b1[1] * (distance_motorway>=10) + (distance_motorway<10) * (b1[2]*log(distance_motorway)+b1[3]*log(distanc...
/code/currentversion/model/PlotResults.R
no_license
UCL/provis
R
false
false
2,360
r
attach(m2data) modelflag<-5 if (modelflag==0) { m2<-m2ols0 } else if (modelflag==5) { m2<-m2ols5 } # Plot price vs motorway i1<-grep("motorway",names(m2$coefficients)) b1<-m2$coefficients[i1] p_motorway<- b1[1] * (distance_motorway>=10) + (distance_motorway<10) * (b1[2]*log(distance_motorway)+b1[3]*log(distanc...