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
library(lme4) ### Name: golden-class ### Title: Class '"golden"' and Generator for Golden Search Optimizer Class ### Aliases: golden-class golden ### Keywords: classes ### ** Examples showClass("golden") golden(lower= -100, upper= 1e100)
/data/genthat_extracted_code/lme4/examples/golden-class.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
246
r
library(lme4) ### Name: golden-class ### Title: Class '"golden"' and Generator for Golden Search Optimizer Class ### Aliases: golden-class golden ### Keywords: classes ### ** Examples showClass("golden") golden(lower= -100, upper= 1e100)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fpRerF.R \name{fpRerF} \alias{fpRerF} \title{Packs a forest and saves modified forest to disk for use by PackPredict function} \usage{ fpRerF(X = NULL, Y = NULL, csvFileName = NULL, columnWithY = NULL, maxDepth = Inf, minParent = 1, numTree...
/R-Project/man/fpRerF.Rd
permissive
neurodata/SPORF
R
false
true
3,642
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fpRerF.R \name{fpRerF} \alias{fpRerF} \title{Packs a forest and saves modified forest to disk for use by PackPredict function} \usage{ fpRerF(X = NULL, Y = NULL, csvFileName = NULL, columnWithY = NULL, maxDepth = Inf, minParent = 1, numTree...
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. library(shiny) library(ggplot2) library(maps) library(RColorBrewer) library(grid) library(mapproj) shinyServer(function(input, output) { world_map<-map_data("world") world_map$region<-factor(...
/C9Week4/world/server.R
no_license
Shawvin/Data-Specilisation
R
false
false
1,153
r
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. library(shiny) library(ggplot2) library(maps) library(RColorBrewer) library(grid) library(mapproj) shinyServer(function(input, output) { world_map<-map_data("world") world_map$region<-factor(...
#' Unit Conversion - Length - Inch to Foot #' #' Performs a conversion of lengths from inches to feet. #' #' @param x Vector - Values in units of inches #' #' @return x, but converted to feet #' #' @references #' NIST. Handbook 133 - Checking the Net Contents of Packaged Goods - Appendix E - General Tables of Unit...
/R/unitconversion.inch.to.foot.R
permissive
burrm/lolcat
R
false
false
592
r
#' Unit Conversion - Length - Inch to Foot #' #' Performs a conversion of lengths from inches to feet. #' #' @param x Vector - Values in units of inches #' #' @return x, but converted to feet #' #' @references #' NIST. Handbook 133 - Checking the Net Contents of Packaged Goods - Appendix E - General Tables of Unit...
### Model fitting, Greenhouse experiment 2019 ### Goal: Use measured parameters to predict water potential, build a model to fill in ### missing data (so we can treat leaf water potential as a continuous variable) rm(list=ls()) require(ggplot2) require(plyr) require(lubridate) require(readODS) require(tidyr) require(...
/second_fall_experiment/scripts/clay_R_scripts/analysis/model_psi_leaf/crap/predicting_leaf_wp.R
no_license
sean-gl/2020_greenhouse
R
false
false
12,308
r
### Model fitting, Greenhouse experiment 2019 ### Goal: Use measured parameters to predict water potential, build a model to fill in ### missing data (so we can treat leaf water potential as a continuous variable) rm(list=ls()) require(ggplot2) require(plyr) require(lubridate) require(readODS) require(tidyr) require(...
library(magrittr) library(dplyr) library(data.table) library(stringr) library(tm) #dati di input dir_input="sample2" dir_output="sample2" file_visite<-"visite_sample" file_piattaforma<-"piattaforma_sample" file_pagine<-"pagine_sample" file_prodotti<-"prodotti_sample" file_log<-"log_sample" ##-------------------------...
/code_SKY/Gab_09_sample_features_DPLYR.R
no_license
gabritaglia/smartstat
R
false
false
26,838
r
library(magrittr) library(dplyr) library(data.table) library(stringr) library(tm) #dati di input dir_input="sample2" dir_output="sample2" file_visite<-"visite_sample" file_piattaforma<-"piattaforma_sample" file_pagine<-"pagine_sample" file_prodotti<-"prodotti_sample" file_log<-"log_sample" ##-------------------------...
#' miceRanger: Fast Imputation with Random Forests #' #' Performs multiple imputation by chained random forests. #' Returns a miceDefs object, which contains information about the imputation process. #' #' @param data A data.frame or data.table to be imputed. #' @param m The number of datasets to produce. #' @param m...
/R/miceRanger.R
permissive
FarrellDay/miceRanger
R
false
false
13,281
r
#' miceRanger: Fast Imputation with Random Forests #' #' Performs multiple imputation by chained random forests. #' Returns a miceDefs object, which contains information about the imputation process. #' #' @param data A data.frame or data.table to be imputed. #' @param m The number of datasets to produce. #' @param m...
library(tidyverse) library(tidylda) library(textmineR) library(cluster) # get a cluster summary matrix load("data_derived/cluster_eval.RData") load("data_derived/clustering_distances.RData") load("data_derived/cluster_solution.RData") load("data_derived/20_newsgroups_formatted.RData") cluster_summary <- tibble...
/R/05_compare_models.R
no_license
TommyJones/comps
R
false
false
4,313
r
library(tidyverse) library(tidylda) library(textmineR) library(cluster) # get a cluster summary matrix load("data_derived/cluster_eval.RData") load("data_derived/clustering_distances.RData") load("data_derived/cluster_solution.RData") load("data_derived/20_newsgroups_formatted.RData") cluster_summary <- tibble...
shinyServer(function(input, output, clientData, session) { observe({ # We'll use these multiple times, so use short var names for # convenience. c_label <- input$control_label c_num <- input$control_num # Text ===================================================== # Change both the label and ...
/99-ReferenceApps/shiny-examples/065-update-input-demo/server.R
no_license
nwstephens/shiny-day-2016
R
false
false
4,649
r
shinyServer(function(input, output, clientData, session) { observe({ # We'll use these multiple times, so use short var names for # convenience. c_label <- input$control_label c_num <- input$control_num # Text ===================================================== # Change both the label and ...
#' CA generaliser using arbitrage #' #' @param obj a \code{\link{constructive_aggregation-class}} #' object class #' @param predict_info predict information -- output #' of \code{\link{hat_info}} function #' @param newdata newdata to predict #' #' @keywords internal CA.ADE_hat <- function(obj, predict_info, newdata) ...
/R/ca-generalisers.r
no_license
Libardo1/tsensembler
R
false
false
6,020
r
#' CA generaliser using arbitrage #' #' @param obj a \code{\link{constructive_aggregation-class}} #' object class #' @param predict_info predict information -- output #' of \code{\link{hat_info}} function #' @param newdata newdata to predict #' #' @keywords internal CA.ADE_hat <- function(obj, predict_info, newdata) ...
## i think makeCacheMatrix operates as a container/methods ## for the overall caching; it doesn't seem to do any of the ## heavy lifting, rather it just describes rules for assigning ## values for the matrix, the cache value, and the solution ## (inverse). Does not compute the inverse. ## the actual computationally u...
/cachematrix.R
no_license
steeles/ProgrammingAssignment2
R
false
false
2,704
r
## i think makeCacheMatrix operates as a container/methods ## for the overall caching; it doesn't seem to do any of the ## heavy lifting, rather it just describes rules for assigning ## values for the matrix, the cache value, and the solution ## (inverse). Does not compute the inverse. ## the actual computationally u...
#Project week 4 Cleaning Data #Written by Dr Andrew Meyenn, Date: 3/6/2020 #Purpose: Complition of Data Cleaning Course #Program is divided in sections. ###SECTION A: download the Zip and unpack, set path and working Directory url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%2...
/run_analysis.R
no_license
ameyenn/Data-Cleaning
R
false
false
6,270
r
#Project week 4 Cleaning Data #Written by Dr Andrew Meyenn, Date: 3/6/2020 #Purpose: Complition of Data Cleaning Course #Program is divided in sections. ###SECTION A: download the Zip and unpack, set path and working Directory url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%2...
library(dplyr) library(caret) library(xgboost) library(fastDummies) setwd("/Users/mac/Documents/Kaggle/Titanic/") train_org <- read.csv("train.csv",stringsAsFactors = F,na.strings = c("NA", "")) # ,stringsAsFactors = F test_org <- read.csv("test.csv",stringsAsFactors = F,na.strings = c("NA", "")) # ,stringsAsFactors =...
/Titanic_Survivor.R
no_license
sherrysliang/Kaggle_Titanic
R
false
false
6,615
r
library(dplyr) library(caret) library(xgboost) library(fastDummies) setwd("/Users/mac/Documents/Kaggle/Titanic/") train_org <- read.csv("train.csv",stringsAsFactors = F,na.strings = c("NA", "")) # ,stringsAsFactors = F test_org <- read.csv("test.csv",stringsAsFactors = F,na.strings = c("NA", "")) # ,stringsAsFactors =...
% Generated by roxygen2: do not edit by hand % Please edit documentation in LFMethod/LFMethod.R \name{clean} \alias{clean} \title{Clean all estimates} \usage{ clean(m) } \description{ Clean all estimates }
/ThesisRpackage/man/clean.Rd
permissive
cayek/Thesis
R
false
true
207
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in LFMethod/LFMethod.R \name{clean} \alias{clean} \title{Clean all estimates} \usage{ clean(m) } \description{ Clean all estimates }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/metacoder-formatting.R \name{as_custom_format} \alias{as_custom_format} \title{As Custom MicrobiomeR Format} \usage{ as_custom_format(obj, format, change_name_list = NULL, ...) } \arguments{ \item{obj}{An object to be converted to a Taxmap ob...
/man/as_custom_format.Rd
permissive
sekingsley/MicrobiomeR
R
false
true
1,542
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/metacoder-formatting.R \name{as_custom_format} \alias{as_custom_format} \title{As Custom MicrobiomeR Format} \usage{ as_custom_format(obj, format, change_name_list = NULL, ...) } \arguments{ \item{obj}{An object to be converted to a Taxmap ob...
library(shiny) library(tidyverse) library(knitr) library(kableExtra) library(DT) library(caret) library(tree) library(randomForest) library(shinycssloaders) # read in data #raw_data_original <- read_csv("California_Houses.csv") raw_data <- read_csv("California_Houses.csv") raw_data_original <- raw_data #%>% sample_fra...
/server.R
no_license
siare1023/ST558-Project3
R
false
false
27,807
r
library(shiny) library(tidyverse) library(knitr) library(kableExtra) library(DT) library(caret) library(tree) library(randomForest) library(shinycssloaders) # read in data #raw_data_original <- read_csv("California_Houses.csv") raw_data <- read_csv("California_Houses.csv") raw_data_original <- raw_data #%>% sample_fra...
# Run Post Processor HVAC-Diagram # # `hvac_diagram()` takes an EnergyPlus version and a file paht of `Bind Node # Detail` (`.bnd`) file as input, runs post processor program `HVAC-Diagram` # and returns the path of generated `.svg` file. # # @param eplus A valid EnergyPlus version. # @param path A path of EnergyPlus `...
/R/diagram.R
permissive
hongyuanjia/eplusr
R
false
false
2,243
r
# Run Post Processor HVAC-Diagram # # `hvac_diagram()` takes an EnergyPlus version and a file paht of `Bind Node # Detail` (`.bnd`) file as input, runs post processor program `HVAC-Diagram` # and returns the path of generated `.svg` file. # # @param eplus A valid EnergyPlus version. # @param path A path of EnergyPlus `...
######################################################################################## ## For ST-GPR, Generate input data (path_to_data.csv) ## Required columns: location_id, year_id, age_group_id=22, val, sample_size=1000, ## measure=proportion, is_outlier=0, nid=50505, variance=? ## Author: Emili...
/Immunization Financing Project/code/out-of-pocket/03_stgpr/03d_1_scalar_prep_code.R
no_license
hashimig/Resource_Tracking_Domestic_Health_Accounts
R
false
false
5,631
r
######################################################################################## ## For ST-GPR, Generate input data (path_to_data.csv) ## Required columns: location_id, year_id, age_group_id=22, val, sample_size=1000, ## measure=proportion, is_outlier=0, nid=50505, variance=? ## Author: Emili...
L2norm = function(Z,Z0){ stat = sum(Z^2) stat0 = (Z0^2)%*%matrix(1,ncol=1,nrow=ncol(Z0)) p = mean(stat0>=stat) return(list(p=p,TZ=stat,TZ0=stat0)) } minP = function(Z,Z0){ stat = max(Z^2) stat0 = apply(Z0^2,1,max) p = mean(stat0>=stat) return(list(p=p,TZ=stat,TZ0=stat0)) } HC = function(...
/R/OmniGGInterTest.R
no_license
fhebert/GeneGeneInteractions
R
false
false
6,051
r
L2norm = function(Z,Z0){ stat = sum(Z^2) stat0 = (Z0^2)%*%matrix(1,ncol=1,nrow=ncol(Z0)) p = mean(stat0>=stat) return(list(p=p,TZ=stat,TZ0=stat0)) } minP = function(Z,Z0){ stat = max(Z^2) stat0 = apply(Z0^2,1,max) p = mean(stat0>=stat) return(list(p=p,TZ=stat,TZ0=stat0)) } HC = function(...
####################################################################### ## Made by: Dr. Keungoui Kim ## Title: Using microdemic to pull MAG data ## goal : ## Data set: Microsoft Academic Graph ## Time Span: ## Variables ## Input: ## Output: ## Methodology: ## Time-stamp: ## Notice : ### Ste...
/Microdemic_sample.R
no_license
awekim/SCI-TECH-PROJECT
R
false
false
2,384
r
####################################################################### ## Made by: Dr. Keungoui Kim ## Title: Using microdemic to pull MAG data ## goal : ## Data set: Microsoft Academic Graph ## Time Span: ## Variables ## Input: ## Output: ## Methodology: ## Time-stamp: ## Notice : ### Ste...
library(lubridate) # get the week day, only the number wday('2021-04-08') # get the week day, get the name of the day wday('2021-04-08', label=TRUE) birthDate <- ymd(19830408) wday(birthDate, label = TRUE)
/date.r
no_license
danielbastidas/R-tutorial
R
false
false
208
r
library(lubridate) # get the week day, only the number wday('2021-04-08') # get the week day, get the name of the day wday('2021-04-08', label=TRUE) birthDate <- ymd(19830408) wday(birthDate, label = TRUE)
plot2 <- function() { fileUrl <- "./data/household_power_consumption.txt" data <- read.table(text = grep("^[1,2]/2/2007", readLines(fileUrl), value = TRUE), col.names = c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_meter...
/plot2.R
no_license
shabirjan/ExData_Plotting1
R
false
false
648
r
plot2 <- function() { fileUrl <- "./data/household_power_consumption.txt" data <- read.table(text = grep("^[1,2]/2/2007", readLines(fileUrl), value = TRUE), col.names = c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_meter...
#k-mean Clustering set.seed(1234) x=rnorm(12, mean=rep(1:3,each=4),sd=0.2) y=rnorm(12, mean=rep(c(1,2,1),each=4),sd=0.2) dataFrame= data.frame(x,y) kmeansObj = kmeans(dataFrame, centers=3) names(kmeansObj) plot(x,y,col=kmeansObj$cluster, pch=19,cex=1.5) text(x+0.05, y+0.05, labels=as.character(1:12)) points(kmeansObj$c...
/K-Mean Cluster.R
no_license
weiweivv2222/Cluster-Analysis
R
false
false
356
r
#k-mean Clustering set.seed(1234) x=rnorm(12, mean=rep(1:3,each=4),sd=0.2) y=rnorm(12, mean=rep(c(1,2,1),each=4),sd=0.2) dataFrame= data.frame(x,y) kmeansObj = kmeans(dataFrame, centers=3) names(kmeansObj) plot(x,y,col=kmeansObj$cluster, pch=19,cex=1.5) text(x+0.05, y+0.05, labels=as.character(1:12)) points(kmeansObj$c...
stepsPerDay<- function(){ library(dplyr) activity_data <- read.csv("activity.csv", header=T, sep=',', na.strings="?", nrows=17568, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') activity_data$steps <- as.numeric(activity_data$steps) ...
/activity_analysis.R
no_license
deeptischauhan/RepData_PeerAssessment1
R
false
false
4,790
r
stepsPerDay<- function(){ library(dplyr) activity_data <- read.csv("activity.csv", header=T, sep=',', na.strings="?", nrows=17568, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') activity_data$steps <- as.numeric(activity_data$steps) ...
## script of surv_converter() function ## Converts HMI survival data to long format. Output file has information on flies alive per day # and number of flies with different status for survival analysis. ## Author: Luis Teixeira, Host-Microorganism Interactions lab ##version 1.0 # requires tidyverse library surv_conv...
/surv_converter.R
no_license
Migaalee/Survival
R
false
false
5,361
r
## script of surv_converter() function ## Converts HMI survival data to long format. Output file has information on flies alive per day # and number of flies with different status for survival analysis. ## Author: Luis Teixeira, Host-Microorganism Interactions lab ##version 1.0 # requires tidyverse library surv_conv...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SatelliteFunctions.R \name{generateFlowtoDollarCoefficient} \alias{generateFlowtoDollarCoefficient} \title{Calculates intensity coefficient (kg/$) for a standard satellite table.} \usage{ generateFlowtoDollarCoefficient(sattable, outputyear, ...
/man/generateFlowtoDollarCoefficient.Rd
permissive
ccourtUF/useeior
R
false
true
1,024
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SatelliteFunctions.R \name{generateFlowtoDollarCoefficient} \alias{generateFlowtoDollarCoefficient} \title{Calculates intensity coefficient (kg/$) for a standard satellite table.} \usage{ generateFlowtoDollarCoefficient(sattable, outputyear, ...
`recalculateLogLik` <- function(model, fixef = fixef(model), vcor = VarCorr(model)) { if (class(model) == 'lmerMod') { sig2 <- attr(vcor, "sc") D = matrix(0, max(model@Gp), max(model@Gp)) npos <- diff(model@Gp) for (i in seq_along(vcor)) { Dpart <- kronecker(vcor[[i]], diag...
/R/recalculateLogLik.R
no_license
pbiecek/PBImisc
R
false
false
2,201
r
`recalculateLogLik` <- function(model, fixef = fixef(model), vcor = VarCorr(model)) { if (class(model) == 'lmerMod') { sig2 <- attr(vcor, "sc") D = matrix(0, max(model@Gp), max(model@Gp)) npos <- diff(model@Gp) for (i in seq_along(vcor)) { Dpart <- kronecker(vcor[[i]], diag...
\docType{package} \name{grpack-package} \alias{grpack-package} \title{grpack} \description{ grpack: useful functions, classes, and methods for econometric analysis. } \details{ A Package for Econometric Applications \tabular{ll}{ Package: \tab grpack\cr Type: \tab Package\cr Version: \tab 0.1-1\cr Date: \tab...
/man/grpack-package.Rd
no_license
gragusa/grpack
R
false
false
522
rd
\docType{package} \name{grpack-package} \alias{grpack-package} \title{grpack} \description{ grpack: useful functions, classes, and methods for econometric analysis. } \details{ A Package for Econometric Applications \tabular{ll}{ Package: \tab grpack\cr Type: \tab Package\cr Version: \tab 0.1-1\cr Date: \tab...
all.data <- read.csv("/cluster/project8/vyp/Winship_GVHD/claire/data_files/ImmGen_sample_data/all_celltypes.csv", stringsAsFactors = FALSE) all.data[,2] <- gsub(pattern = "^ ", all.data[,2], replacement = "") ######## some magic below with that dplyr package library(dplyr) collapsed.data <- all.data[, -c(1,3)] %>%...
/immvar/get_correlations.R
no_license
plagnollab/GVHD
R
false
false
2,213
r
all.data <- read.csv("/cluster/project8/vyp/Winship_GVHD/claire/data_files/ImmGen_sample_data/all_celltypes.csv", stringsAsFactors = FALSE) all.data[,2] <- gsub(pattern = "^ ", all.data[,2], replacement = "") ######## some magic below with that dplyr package library(dplyr) collapsed.data <- all.data[, -c(1,3)] %>%...
library(testthat) library(recipes) n <- 50 set.seed(424) dat <- data.frame( x1 = rnorm(n), x2 = rep(1:5, each = 10), x3 = factor(rep(letters[1:3], c(2, 2, 46))), x4 = 1, y = runif(n) ) ratios <- function(x) { tab <- sort(table(x), decreasing = TRUE) if (length(tab) > 1) { tab[1] / tab[2] } else {...
/tests/testthat/test-zv.R
permissive
tidymodels/recipes
R
false
false
3,117
r
library(testthat) library(recipes) n <- 50 set.seed(424) dat <- data.frame( x1 = rnorm(n), x2 = rep(1:5, each = 10), x3 = factor(rep(letters[1:3], c(2, 2, 46))), x4 = 1, y = runif(n) ) ratios <- function(x) { tab <- sort(table(x), decreasing = TRUE) if (length(tab) > 1) { tab[1] / tab[2] } else {...
library(survival) library(survminer) library(dplyr) ## REMOVE LATER, TEMPORARY cat("\014") #clear console rm(list=ls()) #clear memory ## REMOVE ABOVE if(!exists("comb")){ cat("No comb object found in memory: running prepare.r script!\n") source("clean.r") } comb <- comb[which(comb$origin == 1),] #comb$PA[is.na(c...
/plot/survival-curve_PA-(un)proven.R
no_license
Krijnrien/survival_lungstereo
R
false
false
1,810
r
library(survival) library(survminer) library(dplyr) ## REMOVE LATER, TEMPORARY cat("\014") #clear console rm(list=ls()) #clear memory ## REMOVE ABOVE if(!exists("comb")){ cat("No comb object found in memory: running prepare.r script!\n") source("clean.r") } comb <- comb[which(comb$origin == 1),] #comb$PA[is.na(c...
getwd() cars1 <- read.csv("Cars.csv") cars1 View(cars1) MPGcars1 <- cars1$MPG MPGcars1 shapiro.test(MPGcars1) # Since p-value is greater than 0.05, we can assume the normality waistat <- read.csv("wc-at.csv") waistat waist <- waistat$Waist waist shapiro.test(waist) # Since p-value is less than 0.05, dat...
/Normality test.R
no_license
SinghAbhi3/Myfiles
R
false
false
470
r
getwd() cars1 <- read.csv("Cars.csv") cars1 View(cars1) MPGcars1 <- cars1$MPG MPGcars1 shapiro.test(MPGcars1) # Since p-value is greater than 0.05, we can assume the normality waistat <- read.csv("wc-at.csv") waistat waist <- waistat$Waist waist shapiro.test(waist) # Since p-value is less than 0.05, dat...
#' @name getSQLSardaraQueries #' @aliases getSQLSardaraQueries #' @title Get a list of queries to execute to plug services to the datasets available in Sardara #' @description Get a list of queries to execute to manage the datasets available in Sardara (extract in csv format, in netcdf, etc.) #' @export #' #' @usage ...
/R/getSQLSardaraQueries.R
no_license
ptaconet/rtunaatlas
R
false
false
31,855
r
#' @name getSQLSardaraQueries #' @aliases getSQLSardaraQueries #' @title Get a list of queries to execute to plug services to the datasets available in Sardara #' @description Get a list of queries to execute to manage the datasets available in Sardara (extract in csv format, in netcdf, etc.) #' @export #' #' @usage ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/elb_operations.R \name{elb_delete_load_balancer} \alias{elb_delete_load_balancer} \title{Deletes the specified load balancer} \usage{ elb_delete_load_balancer(LoadBalancerName) } \arguments{ \item{LoadBalancerName}{[required] The name of the ...
/cran/paws.networking/man/elb_delete_load_balancer.Rd
permissive
ryanb8/paws
R
false
true
1,117
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/elb_operations.R \name{elb_delete_load_balancer} \alias{elb_delete_load_balancer} \title{Deletes the specified load balancer} \usage{ elb_delete_load_balancer(LoadBalancerName) } \arguments{ \item{LoadBalancerName}{[required] The name of the ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/produce.table1.R \name{produce.table1} \alias{produce.table1} \title{Produce a "Table 1" for many clinical research reports.} \usage{ produce.table1(x, labels = NULL) } \arguments{ \item{x}{a data frame of patient characteristics from a study...
/man/produce.table1.Rd
permissive
jraffa/MIMICbook
R
false
true
2,097
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/produce.table1.R \name{produce.table1} \alias{produce.table1} \title{Produce a "Table 1" for many clinical research reports.} \usage{ produce.table1(x, labels = NULL) } \arguments{ \item{x}{a data frame of patient characteristics from a study...
# R Programming - Assignment 3 capwords <- function(s, strict = FALSE) { cap <- function(s) paste(toupper(substring(s, 1, 1)), {s <- substring(s, 2); if(strict) tolower(s) else s}, sep = "", collapse = " ") sapply(strsplit(s, split = " "), cap, USE.NAMES = !is.null(names(s))) } validateInput <- function...
/r/assn/assn3/util.R
no_license
jad-b/datasciencecoursera
R
false
false
838
r
# R Programming - Assignment 3 capwords <- function(s, strict = FALSE) { cap <- function(s) paste(toupper(substring(s, 1, 1)), {s <- substring(s, 2); if(strict) tolower(s) else s}, sep = "", collapse = " ") sapply(strsplit(s, split = " "), cap, USE.NAMES = !is.null(names(s))) } validateInput <- function...
> dat = read.csv('C:/Users/Kyle/Desktop/pottery.csv') > Y.o = dat[,1:9]; > n = nrow(Y.o); p = ncol(Y.o) > G = as.factor(dat[,10]) > R = as.factor(1*(G==1)+2*(G==2|G==3)+3*(G==4|G==5)) > Y = scale(Y.o,center=TRUE,scale=TRUE) > set.seed(23) > fit = > (G~.,data=dat) > randomForest > import = importance(fit) > ...
/Assignment4/Assignment4.R
no_license
Kadiz102/Applied-Multivariate-Analysis-RStudio
R
false
false
3,534
r
> dat = read.csv('C:/Users/Kyle/Desktop/pottery.csv') > Y.o = dat[,1:9]; > n = nrow(Y.o); p = ncol(Y.o) > G = as.factor(dat[,10]) > R = as.factor(1*(G==1)+2*(G==2|G==3)+3*(G==4|G==5)) > Y = scale(Y.o,center=TRUE,scale=TRUE) > set.seed(23) > fit = > (G~.,data=dat) > randomForest > import = importance(fit) > ...
############################################## # Backward Removal Procedure # ############################################## train <- read.csv("/home/saikat/Documents/2020/Project/Dataset_ML_reg.csv") train <- train[0:2610,] head(train) library(faraway) close_pred <- lm(close_norm ~. ,data = train) vif...
/Multivariate Regression/mul_reg.R
no_license
saikatmondal15/Stock-Price-Prediction-of-Indian-Banking-Sector-Using-Machine-Learning-Tecniques
R
false
false
3,672
r
############################################## # Backward Removal Procedure # ############################################## train <- read.csv("/home/saikat/Documents/2020/Project/Dataset_ML_reg.csv") train <- train[0:2610,] head(train) library(faraway) close_pred <- lm(close_norm ~. ,data = train) vif...
#' @export js.div<-function(xp2d,events.code,n=40,n.x=NULL,n.y=NULL){ if(missing(n.x)){ n.x=n } if(missing(n.y)){ n.y=n } w=!apply(xp2d,1,function(x)any(is.na(x))) xp2d=xp2d[w,] events.code=events.code[w] lab.x=as.character(cut(xp2d[,1],n.x,labels=1:n.x)) ...
/R/JS.R
permissive
ebecht/ebmisc
R
false
false
1,107
r
#' @export js.div<-function(xp2d,events.code,n=40,n.x=NULL,n.y=NULL){ if(missing(n.x)){ n.x=n } if(missing(n.y)){ n.y=n } w=!apply(xp2d,1,function(x)any(is.na(x))) xp2d=xp2d[w,] events.code=events.code[w] lab.x=as.character(cut(xp2d[,1],n.x,labels=1:n.x)) ...
library(colorRamps) library(mgcv) library(viridis) setwd('d:/dropbox/working/covid19/urop/github/greg1/' ) ############################################################## ## READ DATA ################################################# ############################################################## dat <- read....
/greg1/data.r
no_license
JuliaEpi/Epidemics-on-Earth
R
false
false
12,946
r
library(colorRamps) library(mgcv) library(viridis) setwd('d:/dropbox/working/covid19/urop/github/greg1/' ) ############################################################## ## READ DATA ################################################# ############################################################## dat <- read....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/convenience.R \name{prob_association} \alias{prob_association} \title{Calculate probability of association} \usage{ prob_association(by_model = FALSE, ...) } \arguments{ \item{by_model}{Logical value determining whether to return pro...
/fuzzedpackages/BeviMed/man/prob_association.Rd
no_license
akhikolla/testpackages
R
false
true
714
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/convenience.R \name{prob_association} \alias{prob_association} \title{Calculate probability of association} \usage{ prob_association(by_model = FALSE, ...) } \arguments{ \item{by_model}{Logical value determining whether to return pro...
library(glmnet) mydata = read.table("./TrainingSet/ReliefF/oesophagus.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=0.35,family="gaussian",standardize=FALSE) sink('./Model/EN/ReliefF/oesophagus/oesophagus_046.tx...
/Model/EN/ReliefF/oesophagus/oesophagus_046.R
no_license
leon1003/QSMART
R
false
false
365
r
library(glmnet) mydata = read.table("./TrainingSet/ReliefF/oesophagus.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=0.35,family="gaussian",standardize=FALSE) sink('./Model/EN/ReliefF/oesophagus/oesophagus_046.tx...
library(brainGraph) ### Name: plot.brainGraph ### Title: Plot a brain graph with a specific spatial layout ### Aliases: plot.brainGraph plot_brainGraph ### ** Examples ## Not run: ##D plot(g[[1]], hemi='R') ##D plot(g[[1]], subgraph='degree > 10 | btwn.cent > 50') ## End(Not run)
/data/genthat_extracted_code/brainGraph/examples/plot.brainGraph.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
289
r
library(brainGraph) ### Name: plot.brainGraph ### Title: Plot a brain graph with a specific spatial layout ### Aliases: plot.brainGraph plot_brainGraph ### ** Examples ## Not run: ##D plot(g[[1]], hemi='R') ##D plot(g[[1]], subgraph='degree > 10 | btwn.cent > 50') ## End(Not run)
# Verification # Include parameters and Functions source("Functions.R") source("Parameters.R") source("MainFunctions.R") ######## PR and IR inputs n.test <- 2*pool.r*100 # going from bottom to up sensor.test.up.x <- rep(0,n.test) sensor.test.up.y <- c(-(n.test/2):(n.test/2))/100 PR.test.up <- numeric(n.test) IR.te...
/Verifications.R
no_license
quantumesx/TadroSimulation
R
false
false
4,833
r
# Verification # Include parameters and Functions source("Functions.R") source("Parameters.R") source("MainFunctions.R") ######## PR and IR inputs n.test <- 2*pool.r*100 # going from bottom to up sensor.test.up.x <- rep(0,n.test) sensor.test.up.y <- c(-(n.test/2):(n.test/2))/100 PR.test.up <- numeric(n.test) IR.te...
#' @title pathway build function #' @description Based on the expression level, this function constructs a predicted pathway map pathM<-function(data,FC=2,FDR=0.05,group="med",scale=TRUE){ results=weight=list() if(class(data)[1]!="matrix"){ stop("The data is not a matrix!") } if(dim(data)[2]<...
/R/pathM.R
permissive
onesand1/GRC.0.1.2
R
false
false
5,700
r
#' @title pathway build function #' @description Based on the expression level, this function constructs a predicted pathway map pathM<-function(data,FC=2,FDR=0.05,group="med",scale=TRUE){ results=weight=list() if(class(data)[1]!="matrix"){ stop("The data is not a matrix!") } if(dim(data)[2]<...
#!/usr/bin/Rscript #Author: "Emma Fox (e.fox16@imperial.ac.uk)" ##IMPORTS require(ggplot2) require(gridExtra) require(grid) require(RColorBrewer) ##PART 1 #Create data frame for RMSD plot MinMafDF<-data.frame(NumReads=c(50, 20, 20, 10, 10, 5, 5, 2, 2), DataType=c("Posterior Probability", "Called...
/Code/Thesis_Figure_Constant_GLS.R
no_license
eafox/FurtherLD
R
false
false
4,699
r
#!/usr/bin/Rscript #Author: "Emma Fox (e.fox16@imperial.ac.uk)" ##IMPORTS require(ggplot2) require(gridExtra) require(grid) require(RColorBrewer) ##PART 1 #Create data frame for RMSD plot MinMafDF<-data.frame(NumReads=c(50, 20, 20, 10, 10, 5, 5, 2, 2), DataType=c("Posterior Probability", "Called...
# # Chapter 11 Simple Linear Regression for height and weight data # # In RStudio, use File, Import Dataset, From Excel... # to get Excel data file # Note the name for the imported Excel file str(height_and_weight) # To have most of our R code reuseable for future # analyses, we will use a data object called dat...
/STAT_541_Statistical_Methods_2/Week_2/Simple Linear Regression height weight example.R
no_license
shahidnawazkhan/Machine-Learning-Book
R
false
false
2,001
r
# # Chapter 11 Simple Linear Regression for height and weight data # # In RStudio, use File, Import Dataset, From Excel... # to get Excel data file # Note the name for the imported Excel file str(height_and_weight) # To have most of our R code reuseable for future # analyses, we will use a data object called dat...
# This script assesses the variable importance of a Random Forest classification using # the randomForest package. The objective is to determine the importance of predictor # variables. # # Script By: Jose Don T De Alban # Date Created: 03 Mar 2017 # Last Modified: 26 Mar 2018 # Set Working Directory ---------...
/scripts/R/VariableImportance.LandsatSAR.L4.R
permissive
leoneluefs/alos-kc4
R
false
false
5,123
r
# This script assesses the variable importance of a Random Forest classification using # the randomForest package. The objective is to determine the importance of predictor # variables. # # Script By: Jose Don T De Alban # Date Created: 03 Mar 2017 # Last Modified: 26 Mar 2018 # Set Working Directory ---------...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ensemble.R \name{write.ensemble.configs} \alias{write.ensemble.configs} \title{Write ensemble config files} \usage{ write.ensemble.configs( defaults, ensemble.samples, settings, model, clean = FALSE, write.to.db = TRUE, restart ...
/modules/uncertainty/man/write.ensemble.configs.Rd
permissive
ashiklom/pecan
R
false
true
2,266
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ensemble.R \name{write.ensemble.configs} \alias{write.ensemble.configs} \title{Write ensemble config files} \usage{ write.ensemble.configs( defaults, ensemble.samples, settings, model, clean = FALSE, write.to.db = TRUE, restart ...
install.packages('wordcloud2') install.packages('wordcloud') library(wordcloud2) head(demoFreq) ?demoFreq wordcloud2(demoFreq, size=1.6) # Gives a proposed palette wordcloud2(demoFreq, size=1.6, color='random-dark') # or a vector of colors. vector must be same length than input data wordcloud2(demoFreq, size=1.6...
/wordcloud.R
no_license
KetakiJethani/analytics
R
false
false
485
r
install.packages('wordcloud2') install.packages('wordcloud') library(wordcloud2) head(demoFreq) ?demoFreq wordcloud2(demoFreq, size=1.6) # Gives a proposed palette wordcloud2(demoFreq, size=1.6, color='random-dark') # or a vector of colors. vector must be same length than input data wordcloud2(demoFreq, size=1.6...
find_conversion <- function(x, pattern) { x[grepl(pattern, x$variable)][["value"]] } dollars <- function(x, pattern, conversion) { `:=` = NULL benefit = NULL benefit_value = NULL x[grepl(pattern, benefit), "dollars" := benefit_value * conversion] } extract_money <- function(tree_data, money_data) { # To...
/R/utils-extract_money.R
permissive
tylerlittlefield/treeco
R
false
false
1,681
r
find_conversion <- function(x, pattern) { x[grepl(pattern, x$variable)][["value"]] } dollars <- function(x, pattern, conversion) { `:=` = NULL benefit = NULL benefit_value = NULL x[grepl(pattern, benefit), "dollars" := benefit_value * conversion] } extract_money <- function(tree_data, money_data) { # To...
setwd("/Users/sarath.chandra/Desktop/Study/Residency") doctorVisits <- read.csv("dataset_DoctorContacts.csv") summary (doctorVisits) View(doctorVisits) age <- doctorVisits[13] View(age) length(age) mdu <- doctorVisits[2] length(mdu) View(mdu) df <- data.frame(age,mdu) plot(df) install.packages("mosaic") l...
/Myscript_Sarath.R
no_license
AmishaJain10/RProject
R
false
false
664
r
setwd("/Users/sarath.chandra/Desktop/Study/Residency") doctorVisits <- read.csv("dataset_DoctorContacts.csv") summary (doctorVisits) View(doctorVisits) age <- doctorVisits[13] View(age) length(age) mdu <- doctorVisits[2] length(mdu) View(mdu) df <- data.frame(age,mdu) plot(df) install.packages("mosaic") l...
/Chapter 4/analysis_script.R
no_license
Begia/PhD-thesis
R
false
false
101,019
r
# Helper which generates an initial design (if none provided). # # If no design is passed, create it. otherwise sanity-check it. # Either do y-evals or log points to opt.path manually. # # @param design [\code{data.frame} | NULL]\cr # Initial design as data frame. If none provided one is constructed. # @param fun [\c...
/R/generateMBODesign.R
no_license
mapleyustat/mlrMBO
R
false
false
3,284
r
# Helper which generates an initial design (if none provided). # # If no design is passed, create it. otherwise sanity-check it. # Either do y-evals or log points to opt.path manually. # # @param design [\code{data.frame} | NULL]\cr # Initial design as data frame. If none provided one is constructed. # @param fun [\c...
## NDWI SCRIPT TO MAP GLACIAL LAKES IN ARUNACHAL packages <- c("raster", "rgdal", "sp", "plotly", "maptools") lapply(X = packages, FUN = library, character.only=TRUE) ##setwd("/home/csheth/documents/work/remote-sensing/lohit-dibang-glaciers/satellite-images/mathun-basin/2015/") mathun_basin_2015_list <- list.fi...
/R/NDWI-scirpt.R
no_license
monsoonforest/scripts-forever
R
false
false
1,728
r
## NDWI SCRIPT TO MAP GLACIAL LAKES IN ARUNACHAL packages <- c("raster", "rgdal", "sp", "plotly", "maptools") lapply(X = packages, FUN = library, character.only=TRUE) ##setwd("/home/csheth/documents/work/remote-sensing/lohit-dibang-glaciers/satellite-images/mathun-basin/2015/") mathun_basin_2015_list <- list.fi...
#' Censor time to event end point at a certain time. #' #' #' Censor time to event end point at a certain time. #' #' #' @param time Progression Indicator #' @param status Progression Date #' @param censor.time Death indicator #' @return A data frame to be used with \code{\link{cbind}} #' @examples #' #' #' tim...
/R/censorAt.R
no_license
lbraglia/yapomif
R
false
false
2,699
r
#' Censor time to event end point at a certain time. #' #' #' Censor time to event end point at a certain time. #' #' #' @param time Progression Indicator #' @param status Progression Date #' @param censor.time Death indicator #' @return A data frame to be used with \code{\link{cbind}} #' @examples #' #' #' tim...
################################################################################ # Training to identify duplicates ################################################################################ if (train) { names(stringdists) <- seq_along(stringdists) sscut <- stringdists[stringdists < cutoff] if (length(sscut...
/R_temp/training.R
no_license
celiason/phenotools
R
false
false
2,839
r
################################################################################ # Training to identify duplicates ################################################################################ if (train) { names(stringdists) <- seq_along(stringdists) sscut <- stringdists[stringdists < cutoff] if (length(sscut...
#' Parse Field Measurement Data #' @description Takes in a V diagram report and returns the field visit measurement data #' @param reportObject An R object with the raw data required for a V Diagram #' @return A list containing the field visit measurement data #' parseFieldMeasurementData <- function(reportObject){ m...
/R/vdiagram-data.R
permissive
USGS-R/repgen
R
false
false
3,249
r
#' Parse Field Measurement Data #' @description Takes in a V diagram report and returns the field visit measurement data #' @param reportObject An R object with the raw data required for a V Diagram #' @return A list containing the field visit measurement data #' parseFieldMeasurementData <- function(reportObject){ m...
########################################################################### # Script Comparing genes (Core-Variable) between population # IM 24.11.17 ############################################################################# library(ggplot2) require(scales) library(RColorBrewer) library(UpSetR) ##############...
/PanGenes_Analysis_inPOP_v1.R
no_license
ivandamg/Pan-genes
R
false
false
57,953
r
########################################################################### # Script Comparing genes (Core-Variable) between population # IM 24.11.17 ############################################################################# library(ggplot2) require(scales) library(RColorBrewer) library(UpSetR) ##############...
## TODO draw a sine wave curve(sin, 0, pi * 2) # solution oneliner x <- seq(0, pi * 2, by = 0.1) #solution with helper variable sin(x) plot(x, sin(x), type = 'l') ## TODO draw 2x+1 f <- function(x){ 2 * x + 1 invisible(NULL)} f f(pi) plot(x, f(x), type = 'l') str(f(1:5)) ## TODO draw 2x+1 and x+3 g <- functio...
/1_2018-10-31.R
no_license
benedekpasztor/CEU-RSkills
R
false
false
2,330
r
## TODO draw a sine wave curve(sin, 0, pi * 2) # solution oneliner x <- seq(0, pi * 2, by = 0.1) #solution with helper variable sin(x) plot(x, sin(x), type = 'l') ## TODO draw 2x+1 f <- function(x){ 2 * x + 1 invisible(NULL)} f f(pi) plot(x, f(x), type = 'l') str(f(1:5)) ## TODO draw 2x+1 and x+3 g <- functio...
testlist <- list(hi = 1.21944036119359e+199, lo = 1.3251505101737e-105, mu = 1.24594413436042e-258, sig = 6.96742180489936e+252) result <- do.call(gjam:::tnormRcpp,testlist) str(result)
/gjam/inst/testfiles/tnormRcpp/libFuzzer_tnormRcpp/tnormRcpp_valgrind_files/1610047269-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
190
r
testlist <- list(hi = 1.21944036119359e+199, lo = 1.3251505101737e-105, mu = 1.24594413436042e-258, sig = 6.96742180489936e+252) result <- do.call(gjam:::tnormRcpp,testlist) str(result)
#Related Functions #number of the order in specific day when broadcasting dailyGoodsNUM <- function(df_orderList,df_goods,broad_day){ orderList_WOsale<-subset(df_orderList,format(df_orderList$BD_DATE,"%Y-%m-%d")==broad_day, select = c('GOODS_CODE','BD_DATE')) dayGoodsN_plot <- as.da...
/sources/BroadCasting record/orderAndsalesPlot.R
no_license
hyosari/DataVisualization
R
false
false
3,140
r
#Related Functions #number of the order in specific day when broadcasting dailyGoodsNUM <- function(df_orderList,df_goods,broad_day){ orderList_WOsale<-subset(df_orderList,format(df_orderList$BD_DATE,"%Y-%m-%d")==broad_day, select = c('GOODS_CODE','BD_DATE')) dayGoodsN_plot <- as.da...
#' Get GHCND daily data from NOAA FTP server #' #' @export #' #' @param stationid Stationid to get #' @param path (character) A path to store the files, Default: \code{~/.rnoaa/isd} #' @param ... Curl options passed on to \code{\link[httr]{GET}} #' @param n Number of rows to print #' @param x Input object to print meth...
/rnoaa/R/ghcnd.R
no_license
ingted/R-Examples
R
false
false
10,003
r
#' Get GHCND daily data from NOAA FTP server #' #' @export #' #' @param stationid Stationid to get #' @param path (character) A path to store the files, Default: \code{~/.rnoaa/isd} #' @param ... Curl options passed on to \code{\link[httr]{GET}} #' @param n Number of rows to print #' @param x Input object to print meth...
#' Plot hodograph based on rawinsonde data #' #' Plot rawinsonde hodograph to show changes in wind speed and direction with height #' #' @param wd wind direction [azimuth in degrees] #' @param ws wind speed [knots] #' @param altitude altitude [m] (can be above sea level or above ground level as function always consid...
/R/sounding_hodograph.R
permissive
Leonardo0027/thundeR
R
false
false
5,276
r
#' Plot hodograph based on rawinsonde data #' #' Plot rawinsonde hodograph to show changes in wind speed and direction with height #' #' @param wd wind direction [azimuth in degrees] #' @param ws wind speed [knots] #' @param altitude altitude [m] (can be above sea level or above ground level as function always consid...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mitocarta2.mm10.R \docType{data} \name{mitocarta2.mm10} \alias{mitocarta2.mm10} \title{MitoCarta 2.0: an atlas of mitochondrial genes and proteins} \format{A GRanges object.} \source{ \url{http://www.broadinstitute.org/ftp/distribution/metabo...
/man/mitocarta2.mm10.Rd
no_license
trichelab/MTseekerData
R
false
true
1,065
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mitocarta2.mm10.R \docType{data} \name{mitocarta2.mm10} \alias{mitocarta2.mm10} \title{MitoCarta 2.0: an atlas of mitochondrial genes and proteins} \format{A GRanges object.} \source{ \url{http://www.broadinstitute.org/ftp/distribution/metabo...
###########simulate data with four tumor characteristics containing three binary tumor characteristics and one oridinal tumor characteristics. ###########one genotype with MAF 0.25 is simulated ###########one covariate with rnorm(n) simulated ###########simulate results for MTOP, standard log istic regresssion, and TOP...
/whole_genome_age/code/simulation/power/1_stat_power_four_marker.R
no_license
andrewhaoyu/breast_cancer_data_analysis
R
false
false
20,275
r
###########simulate data with four tumor characteristics containing three binary tumor characteristics and one oridinal tumor characteristics. ###########one genotype with MAF 0.25 is simulated ###########one covariate with rnorm(n) simulated ###########simulate results for MTOP, standard log istic regresssion, and TOP...
library(leaflet) library(geosphere) # Airports ---- airp<-read.table("airports.dat.txt",sep=",",header=TRUE) colnames(airp)<-c("Airport","Name","City","Country","IATA","ICAO","Latitude", "Longitude","Altitude","Timezone","DST","Tz","Type","Source") #Altitude in feet airp<-airp[,c(2:5,7:8)] br.air<-s...
/Map3.R
no_license
hbcavalheri/Flights-from-Brazil
R
false
false
2,246
r
library(leaflet) library(geosphere) # Airports ---- airp<-read.table("airports.dat.txt",sep=",",header=TRUE) colnames(airp)<-c("Airport","Name","City","Country","IATA","ICAO","Latitude", "Longitude","Altitude","Timezone","DST","Tz","Type","Source") #Altitude in feet airp<-airp[,c(2:5,7:8)] br.air<-s...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reports.R \docType{data} \name{members} \alias{members} \title{Members of The Travel Reports} \format{Data frame with columns \describe{ \item{id}{Report id, join this id with table 'reports'} \item{member_name}{} \item{member_office}{} \item...
/man/members.Rd
no_license
ChihChengLiang/abroadplayr
R
false
true
479
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reports.R \docType{data} \name{members} \alias{members} \title{Members of The Travel Reports} \format{Data frame with columns \describe{ \item{id}{Report id, join this id with table 'reports'} \item{member_name}{} \item{member_office}{} \item...
test_that("scaleMatrix", { }) test_that("structMatrix", { }) test_that("mcSearch", { }) test_that("buildParentList", { }) test_that("pvecToCutpoints", { }) test_that("pvecToMidpoints", { }) test_that("areaProbs", { }) test_that("buildRegressions", { }) test_that("buildRegressionTables",...
/tests/testthat/test-invVar.R
permissive
ralmond/CPTtools
R
false
false
329
r
test_that("scaleMatrix", { }) test_that("structMatrix", { }) test_that("mcSearch", { }) test_that("buildParentList", { }) test_that("pvecToCutpoints", { }) test_that("pvecToMidpoints", { }) test_that("areaProbs", { }) test_that("buildRegressions", { }) test_that("buildRegressionTables",...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_expressed_genes.R \name{add_expressed_genes} \alias{add_expressed_genes} \title{Adding the nearest expressed genes} \usage{ add_expressed_genes( input_file = NULL, tissue, gtf, species = "Homo_sapiens", annot_ers, type_col_nam...
/man/add_expressed_genes.Rd
no_license
eolagbaju/ODER
R
false
true
1,964
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_expressed_genes.R \name{add_expressed_genes} \alias{add_expressed_genes} \title{Adding the nearest expressed genes} \usage{ add_expressed_genes( input_file = NULL, tissue, gtf, species = "Homo_sapiens", annot_ers, type_col_nam...
RegimenReconstruct <- function(x, data){ # reconstruct the regimen # divide drugs into different classes and sort them alphabetically # # args: x: regimen used by individual i at visit j # data: the preprocessed data from WIHS dataset # returns: regimen: regimen with drugs divided into different...
/BNP_DrugComb_WIHS/Subset_Tree_Kernel_Similarity.R
no_license
bluejw/BayesDrugComb
R
false
false
5,038
r
RegimenReconstruct <- function(x, data){ # reconstruct the regimen # divide drugs into different classes and sort them alphabetically # # args: x: regimen used by individual i at visit j # data: the preprocessed data from WIHS dataset # returns: regimen: regimen with drugs divided into different...
#' K fold cross validation for ctStanFit objects #' #' @param fit ctStanfit object #' @param folds Number of cross validation splits to use -- 10 folds implies that the #' model is re-fit 10 times, each time to a data set with 1/10 of the observations randomly removed. #' @param cores Number of processor cores to...
/R/ctLOO.R
no_license
cran/ctsem
R
false
false
4,613
r
#' K fold cross validation for ctStanFit objects #' #' @param fit ctStanfit object #' @param folds Number of cross validation splits to use -- 10 folds implies that the #' model is re-fit 10 times, each time to a data set with 1/10 of the observations randomly removed. #' @param cores Number of processor cores to...
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
/mepstrends/hc_care/json/code/r/totPOP__insurance__diab_flu__.r
permissive
RandomCriticalAnalysis/MEPS-summary-tables
R
false
false
2,950
r
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
# fit the parameters of the bayesian network for a given network stucture. bn.fit = function(x, data, cluster, method = "mle", ..., keep.fitted = TRUE, debug = FALSE) { # check x's class. check.bn(x) # check the data. if (is(x, c("bn.naive", "bn.tan"))) data.info = check.data(data, allowed.types = dis...
/R/frontend-fit.R
no_license
nbngoc87/bnlearn
R
false
false
9,753
r
# fit the parameters of the bayesian network for a given network stucture. bn.fit = function(x, data, cluster, method = "mle", ..., keep.fitted = TRUE, debug = FALSE) { # check x's class. check.bn(x) # check the data. if (is(x, c("bn.naive", "bn.tan"))) data.info = check.data(data, allowed.types = dis...
require (data.table) require (glmnet) require(doMC) setwd("~/projects/dse/dse-production/projects/ctr_data_generation/src") data<- fread('../data/20140623T0100_20140623T0200_ext.csv') # 30 times faster log.loss<-function (targets,predicts){ # we assume targets is 2 column amounts -(targets$clicks * log(predicts) +...
/glmnet_munge.R
no_license
seanv507/crea
R
false
false
2,213
r
require (data.table) require (glmnet) require(doMC) setwd("~/projects/dse/dse-production/projects/ctr_data_generation/src") data<- fread('../data/20140623T0100_20140623T0200_ext.csv') # 30 times faster log.loss<-function (targets,predicts){ # we assume targets is 2 column amounts -(targets$clicks * log(predicts) +...
# program spuRs/resources/scripts/simpson.r simpson <- function(ftn, a, b, tol = 1e-8, verbose = FALSE) { # numerical integral of ftn from a to b # using Simpson's rule with tolerance tol # # ftn is a function of a single variable and a < b # if verbose is TRUE then n is printed to the screen # i...
/inst/resources/scripts/simpson.r
no_license
cran/spuRs
R
false
false
994
r
# program spuRs/resources/scripts/simpson.r simpson <- function(ftn, a, b, tol = 1e-8, verbose = FALSE) { # numerical integral of ftn from a to b # using Simpson's rule with tolerance tol # # ftn is a function of a single variable and a < b # if verbose is TRUE then n is printed to the screen # i...
#!/usr/bin/Rscript # methylation utils library(Rsamtools) library(GenomicRanges) ############################################################ # # data reading # ############################################################ read_data <- function(infp){ if (infp == "stdin"){ infp <- file(infp) } read_...
/utils/methylation_R_utils.R
no_license
Musketeer-D/T2T-Epigenetics
R
false
false
28,930
r
#!/usr/bin/Rscript # methylation utils library(Rsamtools) library(GenomicRanges) ############################################################ # # data reading # ############################################################ read_data <- function(infp){ if (infp == "stdin"){ infp <- file(infp) } read_...
TotalCount=1807033 Period(ms)=192486 Throughput(ops/sec)=9387,87 Min=186 Mean=323,52 50.000ptile=321 90.000ptile=389 99.000ptile=459 99.900ptile=568 99.990ptile=1721 99.999ptile=12975 Max=43007 0,0,0,0,000000 1,0,0,0,000000 2,0,0,0,000000 3,0,0,0,000000 4,0,0,0,000000 5,0,0,0,000000 6,0,0,0,000000 7,0,0,0,000000 8,0,0,...
/usage_example/data/Highlander/200_400_d-2016.06.22-19.10.00-ycsb-run-READ.rd
no_license
rykachevskiy/azul-results
R
false
false
181,189
rd
TotalCount=1807033 Period(ms)=192486 Throughput(ops/sec)=9387,87 Min=186 Mean=323,52 50.000ptile=321 90.000ptile=389 99.000ptile=459 99.900ptile=568 99.990ptile=1721 99.999ptile=12975 Max=43007 0,0,0,0,000000 1,0,0,0,000000 2,0,0,0,000000 3,0,0,0,000000 4,0,0,0,000000 5,0,0,0,000000 6,0,0,0,000000 7,0,0,0,000000 8,0,0,...
################################################################################ ### ### Separate mcmc and summary functions. ### ################################################################################ ##' Generate MCMC chains for global run of FPEM ##' ##' This function generates an MCMC sample for a global...
/R/user_interface.R
no_license
markalava/FPEMglobal
R
false
false
169,453
r
################################################################################ ### ### Separate mcmc and summary functions. ### ################################################################################ ##' Generate MCMC chains for global run of FPEM ##' ##' This function generates an MCMC sample for a global...
# 정규표현식 char <- c('apple', 'Apple', 'APPLE', 'banana', 'grape') grep('apple',char) #grep을 이용해 특정 패턴을 찾아내기 char2 <- c('apple', 'banana') grep(char2, char) grep(paste(char2, collapse='|'), char, value=T) grep('pp', char) grep('pp', char, value = T) #pp가 포함된 단어 찾기 grep('^A', char, value = T) #첫번째 글자가 A인 단어 찾기 grep('e$'...
/Part3/sec10_regexp.R
no_license
Pis02/R-Lecture
R
false
false
1,748
r
# 정규표현식 char <- c('apple', 'Apple', 'APPLE', 'banana', 'grape') grep('apple',char) #grep을 이용해 특정 패턴을 찾아내기 char2 <- c('apple', 'banana') grep(char2, char) grep(paste(char2, collapse='|'), char, value=T) grep('pp', char) grep('pp', char, value = T) #pp가 포함된 단어 찾기 grep('^A', char, value = T) #첫번째 글자가 A인 단어 찾기 grep('e$'...
my_packages <- c("jsonlite","dplyr","rvest") install_if_missing <- function(p) { if(p %in% rownames(installed.packages())==FALSE){ install.packages(p)} } invisible(sapply(my_packages, install_if_missing))
/init.R
no_license
rufrajput/scrap
R
false
false
212
r
my_packages <- c("jsonlite","dplyr","rvest") install_if_missing <- function(p) { if(p %in% rownames(installed.packages())==FALSE){ install.packages(p)} } invisible(sapply(my_packages, install_if_missing))
setwd("E:\\PUBLICATION WORK\\Chapter 4_making a paper\\Model work\\RANDOM FOREST FOR WATER LEVEL\\SWL separation\\Other variables") getwd() dir() #Bring the SWL dataset data<-read.csv("Silo plus all variable.csv") head(data) names(data) # VVVV. important note # Lithology values to symbols already changes in step 2. ...
/Step 04_SWL data set without complete depth/Final data set prepared_18.10.2018/Lithology number to symbol.R
no_license
WillemVervoort/MuttamaGW
R
false
false
2,775
r
setwd("E:\\PUBLICATION WORK\\Chapter 4_making a paper\\Model work\\RANDOM FOREST FOR WATER LEVEL\\SWL separation\\Other variables") getwd() dir() #Bring the SWL dataset data<-read.csv("Silo plus all variable.csv") head(data) names(data) # VVVV. important note # Lithology values to symbols already changes in step 2. ...
library(pacman) p_load(shapes, geomorph, plyr, stringr, reshape2, cluster, MASS, nnet, randomForest, caret, parallel, doParallel, xtable, boot, pROC, ggplot2, grid, scales, Metrics) # source files source(here::here('R', 'helper02_array2df.r')) source(here::here('R', 'helper03_caret_funcs.r')) source(he...
/R/03_clear_cut.r
no_license
psmits/shape_identification
R
false
false
9,780
r
library(pacman) p_load(shapes, geomorph, plyr, stringr, reshape2, cluster, MASS, nnet, randomForest, caret, parallel, doParallel, xtable, boot, pROC, ggplot2, grid, scales, Metrics) # source files source(here::here('R', 'helper02_array2df.r')) source(here::here('R', 'helper03_caret_funcs.r')) source(he...
% File src/library/graphics/man/plot.design.Rd % Part of the R package, https://www.R-project.org % Copyright 1995-2013 R Core Team % Distributed under GPL 2 or later \name{plot.design} \alias{plot.design} \title{Plot Univariate Effects of a Design or Model} \description{ Plot univariate effects of one or more \code...
/bin/R-3.5.1/src/library/graphics/man/plot.design.Rd
permissive
lifebit-ai/exomedepth
R
false
false
3,436
rd
% File src/library/graphics/man/plot.design.Rd % Part of the R package, https://www.R-project.org % Copyright 1995-2013 R Core Team % Distributed under GPL 2 or later \name{plot.design} \alias{plot.design} \title{Plot Univariate Effects of a Design or Model} \description{ Plot univariate effects of one or more \code...
setwd("~/Documents/Statistical Thermodynamics/ising") T15 = read.table("1_5.txt") T19 = read.table("1_9.txt") T227 = read.table("2_27.txt") T32 = read.table("3_2.txt") T46 = read.table("4_6.txt") T52 = read.table("5_2.txt") T1 = read.table("1.txt") T05 = read.table("0_5.txt") library(ggplot2) dat <- data.frame(T15) dat...
/correlation.R
no_license
mengzhensun/plot
R
false
false
1,005
r
setwd("~/Documents/Statistical Thermodynamics/ising") T15 = read.table("1_5.txt") T19 = read.table("1_9.txt") T227 = read.table("2_27.txt") T32 = read.table("3_2.txt") T46 = read.table("4_6.txt") T52 = read.table("5_2.txt") T1 = read.table("1.txt") T05 = read.table("0_5.txt") library(ggplot2) dat <- data.frame(T15) dat...
rm(list=ls()) # #FUNCTIONS # # goodRatios = function( loggedStuff ){ #loggedStuff: the log(x) of the values (x) to compute the following ratio # r_i = x_i/sum(x) # if(any(is.na(loggedStuff))){ # warning("'NA' present in loggedStuff") ...
/sscRuns/metricRunTable.r
no_license
gasduster99/sppComp
R
false
false
2,005
r
rm(list=ls()) # #FUNCTIONS # # goodRatios = function( loggedStuff ){ #loggedStuff: the log(x) of the values (x) to compute the following ratio # r_i = x_i/sum(x) # if(any(is.na(loggedStuff))){ # warning("'NA' present in loggedStuff") ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/time_to_runoff.R \name{time_of_runoff} \alias{time_of_runoff} \title{Determine time of inital runoff} \usage{ time_of_runoff(scenario_file) } \arguments{ \item{scenario_file}{a scenario_file generated with param()} } \description{ This is an ...
/man/time_of_runoff.Rd
permissive
mikejohnson51/RainSlope
R
false
true
523
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/time_to_runoff.R \name{time_of_runoff} \alias{time_of_runoff} \title{Determine time of inital runoff} \usage{ time_of_runoff(scenario_file) } \arguments{ \item{scenario_file}{a scenario_file generated with param()} } \description{ This is an ...
#################################################################### # This is used for 085_dis_count_edges_3rd_byPeriod Tableau display #################################################################### library(data.table) library(stringi) library(stringr) library(sqldf) library(tidyr) ##################...
/085_dis_counts_edges.R
no_license
coursephd/PostgreSQL
R
false
false
11,695
r
#################################################################### # This is used for 085_dis_count_edges_3rd_byPeriod Tableau display #################################################################### library(data.table) library(stringi) library(stringr) library(sqldf) library(tidyr) ##################...
QSUBENV = new.env() qsub_reset = function() { if(!is.null(QSUBENV$image_file)) { file.remove(QSUBENV$image_file) } QSUBENV$image_file = NULL } qsub = function(name, options, code, share = FALSE, private = NULL, dependency = NULL, tmpdir = co_opt("tmpdir")) { if(missing(name)) { name = qq("R_chunk_@{past...
/candidate/qsub.R
no_license
inambioinfo/cotools
R
false
false
2,604
r
QSUBENV = new.env() qsub_reset = function() { if(!is.null(QSUBENV$image_file)) { file.remove(QSUBENV$image_file) } QSUBENV$image_file = NULL } qsub = function(name, options, code, share = FALSE, private = NULL, dependency = NULL, tmpdir = co_opt("tmpdir")) { if(missing(name)) { name = qq("R_chunk_@{past...
mssg <- function(v, ...) if (v) message(...) try_default <- function(expr, default, quiet = FALSE){ result <- default if (quiet) { tryCatch(result <- expr, error = function(e) { }) } else { try(result <- expr) } result } failwith <- function(default = NULL, f, quiet = FALSE){ f <- match.fun(...
/R/zzz.R
permissive
fozy81/brranching
R
false
false
1,340
r
mssg <- function(v, ...) if (v) message(...) try_default <- function(expr, default, quiet = FALSE){ result <- default if (quiet) { tryCatch(result <- expr, error = function(e) { }) } else { try(result <- expr) } result } failwith <- function(default = NULL, f, quiet = FALSE){ f <- match.fun(...
rm(list=ls()) pacman::p_load(pracma, data.table, wpp2015, ggplot2, knitr, bayesPop) # question 1 asmig <- subset(age.specific.migration(years=2010)$female, name == "Mexico") leslie_project <- function(les, v, proj=1, migrate=0){ for(i in 1:proj){ migpop <- v * migrate v <- c(les %*% v) + migpop...
/week3/hw3.R
no_license
nmmarquez/statdemog
R
false
false
10,905
r
rm(list=ls()) pacman::p_load(pracma, data.table, wpp2015, ggplot2, knitr, bayesPop) # question 1 asmig <- subset(age.specific.migration(years=2010)$female, name == "Mexico") leslie_project <- function(les, v, proj=1, migrate=0){ for(i in 1:proj){ migpop <- v * migrate v <- c(les %*% v) + migpop...
# Define server logic to plot various variables against mpg ---- library(shiny) shinyServer(function(input,output){ output$img1 <- renderUI({ if(input$populatie == "tw"){ img(height = 300, width = 400, src = "twitter.png") } else if(input$populati...
/ESTHERRA_LAB1/Part3/Shiny/server.R
no_license
EstherKatti/CSE587
R
false
false
516
r
# Define server logic to plot various variables against mpg ---- library(shiny) shinyServer(function(input,output){ output$img1 <- renderUI({ if(input$populatie == "tw"){ img(height = 300, width = 400, src = "twitter.png") } else if(input$populati...
\name{error_632plus} \alias{error_632plus} \title{Classification error rate estimation via the 632+ estimator} \usage{ error_632plus(d, list_classifiers, num_folds = 5, ...) } \arguments{ \item{d}{TODO} \item{list_classifiers}{TODO} \item{num_folds}{TODO} } \value{ error_results TODO } \description{ TODO ...
/man/error_632plus.Rd
no_license
xshang/classify
R
false
false
323
rd
\name{error_632plus} \alias{error_632plus} \title{Classification error rate estimation via the 632+ estimator} \usage{ error_632plus(d, list_classifiers, num_folds = 5, ...) } \arguments{ \item{d}{TODO} \item{list_classifiers}{TODO} \item{num_folds}{TODO} } \value{ error_results TODO } \description{ TODO ...
args = commandArgs(TRUE) argc = length(args) if (argc!=2) stop("\nusage:R --no-save --silent --slave <ASM_snpfreq.R --args <ASM.out> <output>\nAuthor:gaoshengjie\nE-mail:gaoshengjie@genomics.cn") data <- read.table(args[1], head=T, stringsAsFactors=F) options(digits=10) len = dim(data)[1] m <- table(data[!duplicated...
/bin/ASM_snpfreq.R
no_license
hellbelly/SMAPdigger
R
false
false
1,607
r
args = commandArgs(TRUE) argc = length(args) if (argc!=2) stop("\nusage:R --no-save --silent --slave <ASM_snpfreq.R --args <ASM.out> <output>\nAuthor:gaoshengjie\nE-mail:gaoshengjie@genomics.cn") data <- read.table(args[1], head=T, stringsAsFactors=F) options(digits=10) len = dim(data)[1] m <- table(data[!duplicated...
library(shiny) library(ggplot2) shinyUI(pageWithSidebar( headerPanel("Hill analysis"), sidebarPanel( withMathJax(), sliderInput('n', 'n', min = 3, max = 35, value = 3, step = 2), sliderInput('a', 'Alpha', min = 1, max = 10000, value = 18, step = 0.01), sliderInput('b', 'Beta', min = 0.05, max...
/ui.R
no_license
CyclicDynamicalSystems/Hill
R
false
false
963
r
library(shiny) library(ggplot2) shinyUI(pageWithSidebar( headerPanel("Hill analysis"), sidebarPanel( withMathJax(), sliderInput('n', 'n', min = 3, max = 35, value = 3, step = 2), sliderInput('a', 'Alpha', min = 1, max = 10000, value = 18, step = 0.01), sliderInput('b', 'Beta', min = 0.05, max...
\name{display} \alias{display} \title{Display data by mimetype, with optional alternative representations.} \usage{ display(data, metadata = NULL) } \arguments{ \item{data}{A named list mapping mimetypes to content (base64 encoded for binary data)} \item{metadata}{A named list mapping mimetypes to named lists ...
/man/display.Rd
permissive
takluyver/IRdisplay
R
false
false
430
rd
\name{display} \alias{display} \title{Display data by mimetype, with optional alternative representations.} \usage{ display(data, metadata = NULL) } \arguments{ \item{data}{A named list mapping mimetypes to content (base64 encoded for binary data)} \item{metadata}{A named list mapping mimetypes to named lists ...
#' Creates a BARA fit object #' #' The function is applied to the training set and returns a BaraFit #' object that can be used to adjust batch effects in subsequently acquired #' test sets. #' #' @param x Matrix, the training data set with samples in rows. #' @param ref Numeric vector, index of the reference sa...
/R/bara.R
no_license
robingradin/bara
R
false
false
16,456
r
#' Creates a BARA fit object #' #' The function is applied to the training set and returns a BaraFit #' object that can be used to adjust batch effects in subsequently acquired #' test sets. #' #' @param x Matrix, the training data set with samples in rows. #' @param ref Numeric vector, index of the reference sa...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { s <- NULL set <- function(y) { x <<- y s <<- NULL } get <- function() x setsolve <- function(solve) s <<- solve get...
/cachematrix.R
no_license
sinagho/ProgrammingAssignment2
R
false
false
737
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { s <- NULL set <- function(y) { x <<- y s <<- NULL } get <- function() x setsolve <- function(solve) s <<- solve get...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reference_classes.R \docType{class} \name{BdQuestion-class} \alias{BdQuestion-class} \alias{BdQuestion} \title{The Question Reference Class} \description{ The Question Reference Class }
/man/BdQuestion-class.Rd
no_license
cran/bdclean
R
false
true
276
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reference_classes.R \docType{class} \name{BdQuestion-class} \alias{BdQuestion-class} \alias{BdQuestion} \title{The Question Reference Class} \description{ The Question Reference Class }
### ========================================================================= ### Group elements of a vector-like object into a list-like object ### ------------------------------------------------------------------------- ### ### What should go in this file? ### ### - All "relist" methods defined in IRanges should go ...
/R/extractList.R
no_license
rajaldebnath/IRanges
R
false
false
12,007
r
### ========================================================================= ### Group elements of a vector-like object into a list-like object ### ------------------------------------------------------------------------- ### ### What should go in this file? ### ### - All "relist" methods defined in IRanges should go ...