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
rm(list = ls()) cat("\f") getwd() setwd("C:/Users/Lawson/Google Drive/Daily Temp/") daily <- read.csv(file="daily_tmax.txt",header=T,sep = ",") utils::View(daily)
/daily_weather_edit.R
no_license
lqconnor/yield_variance
R
false
false
162
r
rm(list = ls()) cat("\f") getwd() setwd("C:/Users/Lawson/Google Drive/Daily Temp/") daily <- read.csv(file="daily_tmax.txt",header=T,sep = ",") utils::View(daily)
#Read Data data <- read.table("exdata_data_household_power_consumption/household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") plot_data <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #Make sure that data is in datetime and numeric format datetime <- strptime(paste(plot_data$Date, ...
/plot4.R
no_license
MLQuantAndy/ExData_Plotting1
R
false
false
1,361
r
#Read Data data <- read.table("exdata_data_household_power_consumption/household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") plot_data <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #Make sure that data is in datetime and numeric format datetime <- strptime(paste(plot_data$Date, ...
#!/usr/bin/Rscript # plot ROCs, Accuracy curves of the predictors (in mirnaNonmirna.consensus) # Perform Principal Component Analysis library(ROCR) mynoncodrnas <- read.table("~/bin/mirnapseudomirna.consensus") # Pass the consensus file containing pos. and neg. cases: mirnaNonmirna.consensus_old, trainingset2.consens...
/project 1/Rcode/plotROCs.R
no_license
dev-spk/progs
R
false
false
5,648
r
#!/usr/bin/Rscript # plot ROCs, Accuracy curves of the predictors (in mirnaNonmirna.consensus) # Perform Principal Component Analysis library(ROCR) mynoncodrnas <- read.table("~/bin/mirnapseudomirna.consensus") # Pass the consensus file containing pos. and neg. cases: mirnaNonmirna.consensus_old, trainingset2.consens...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Source_1.R \name{get_data_dictionary} \alias{get_data_dictionary} \title{This function retrieves metadata for the raw ARC dataset.} \usage{ get_data_dictionary(daily_temperatures) } \arguments{ \item{daily_temperatures}{A dataframe from the f...
/man/get_data_dictionary.Rd
no_license
shrikanth95/EpiNOAA
R
false
true
620
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Source_1.R \name{get_data_dictionary} \alias{get_data_dictionary} \title{This function retrieves metadata for the raw ARC dataset.} \usage{ get_data_dictionary(daily_temperatures) } \arguments{ \item{daily_temperatures}{A dataframe from the f...
#' Download monthly prism data #' @description Download monthly data from the prism project #' at 4km grid cell resolution for precipitation, mean, min, and max temperature #' @inheritParams get_prism_dailys #' @param years a valid numeric years, or vector of years, #' to download data for. If no month is specified, ...
/R/get_prism_monthlys.R
no_license
sdtaylor/prism
R
false
false
3,603
r
#' Download monthly prism data #' @description Download monthly data from the prism project #' at 4km grid cell resolution for precipitation, mean, min, and max temperature #' @inheritParams get_prism_dailys #' @param years a valid numeric years, or vector of years, #' to download data for. If no month is specified, ...
# Yige Wu @ WashU 2018 Oct # test the trans correlation between individual kinase/phosphatase phosphosite with substrate phosphsoites ## to limit the search and facilitate interpretation, we only use function-known phosophosites on kinase/phosphatase # source -----------------------------------------------------------...
/phospho_network/regression/tables/backups/run_regression_with_enzyme_phosphosites_demo.R
no_license
ding-lab/phospho-signaling
R
false
false
8,312
r
# Yige Wu @ WashU 2018 Oct # test the trans correlation between individual kinase/phosphatase phosphosite with substrate phosphsoites ## to limit the search and facilitate interpretation, we only use function-known phosophosites on kinase/phosphatase # source -----------------------------------------------------------...
#' ReplicationBF: A package to calculate Replication Bayes Factors. #' #' The ReplicationBF package provides functions for two common statistical #' scenarios: t- and F-tests for difference in one or more group means. #' #' @docType package #' @name ReplicationBF NULL
/R/ReplicationBF.R
permissive
MarielleZZ/ReplicationBF
R
false
false
268
r
#' ReplicationBF: A package to calculate Replication Bayes Factors. #' #' The ReplicationBF package provides functions for two common statistical #' scenarios: t- and F-tests for difference in one or more group means. #' #' @docType package #' @name ReplicationBF NULL
#' Posterior density for CREDI subscales #' #' This calculates the posterior density function. #' @param THETAi Size K vector of scaled scores for the i-th individual. #' @param Yi Size Y vector of item responses for the i-th individual. #' @param MUi Size K vector of prior's mean conditional on MONTHS. #' @param invS ...
/R/lf_posterior_density.R
no_license
jmseiden/jms_credi
R
false
false
1,529
r
#' Posterior density for CREDI subscales #' #' This calculates the posterior density function. #' @param THETAi Size K vector of scaled scores for the i-th individual. #' @param Yi Size Y vector of item responses for the i-th individual. #' @param MUi Size K vector of prior's mean conditional on MONTHS. #' @param invS ...
testdata <<- sqlFetch(conn,"test2") count <- nrow(testdata) while(TRUE){ for(i in 1:20){ if(count == nrow(sqlFetch(conn,"test2"))){ cat("nothings changed...") next }else{ testdata <<- sqlFetch(conn,"test2") count <- nrow(testdata) cat("things dun changed...") } } if(i =...
/miscellaneous/util.R
no_license
kilimba/msc-impl-R
R
false
false
360
r
testdata <<- sqlFetch(conn,"test2") count <- nrow(testdata) while(TRUE){ for(i in 1:20){ if(count == nrow(sqlFetch(conn,"test2"))){ cat("nothings changed...") next }else{ testdata <<- sqlFetch(conn,"test2") count <- nrow(testdata) cat("things dun changed...") } } if(i =...
\name{wmean} \title{Internal objects} \alias{ wmean} \description{Internal objects.} \details{These are not to be called by the user.} \keyword{internal}
/man/wmean.Rd
no_license
cran/MAd
R
false
false
165
rd
\name{wmean} \title{Internal objects} \alias{ wmean} \description{Internal objects.} \details{These are not to be called by the user.} \keyword{internal}
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simple_AOO.R \name{AOOsimp} \alias{AOOsimp} \title{Area of Occupancy (AOO)} \usage{ AOOsimp(thepoints, cellsize) } \arguments{ \item{thepoints}{set of points in metres i.e. c(x,y)} \item{cellsize}{size of cell (length) in metres} } \value{ i...
/man/AOOsimp.Rd
no_license
cran/rCAT
R
false
true
1,087
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simple_AOO.R \name{AOOsimp} \alias{AOOsimp} \title{Area of Occupancy (AOO)} \usage{ AOOsimp(thepoints, cellsize) } \arguments{ \item{thepoints}{set of points in metres i.e. c(x,y)} \item{cellsize}{size of cell (length) in metres} } \value{ i...
###Change in Changes (Athey-Imbens-2006) ##Note that you need to pass in data where treated status is noted in ##every period. Data is form of (year-individual-outcome-x-evertreated) #'@title athey.imbens #' #' @description #' \code{compute.CiC} does the computational #' work for the Change in Changes model #' of Athe...
/R/CiC.R
no_license
cran/qte
R
false
false
10,451
r
###Change in Changes (Athey-Imbens-2006) ##Note that you need to pass in data where treated status is noted in ##every period. Data is form of (year-individual-outcome-x-evertreated) #'@title athey.imbens #' #' @description #' \code{compute.CiC} does the computational #' work for the Change in Changes model #' of Athe...
## Reading the data file downloaded and extracted from ## https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip power_cons <- read.table("./data/household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, na.strings="?") plot_data <- subset(power_cons, power_cons$D...
/plot2.R
no_license
gaurav2601/ExData_Plotting1
R
false
false
848
r
## Reading the data file downloaded and extracted from ## https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip power_cons <- read.table("./data/household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, na.strings="?") plot_data <- subset(power_cons, power_cons$D...
# Naive Bayes Classifier # Importing the dataset dataset = read.csv('Social_Network_Ads.csv') dataset = dataset[, 3:5] ### ============ Important =============== ### # Encoding the target feature as factor dataset$Purchased = factor(dataset$Purchased, levels = c(0,1)) # Splitting dataset into training set and test ...
/Part 3 - Classification/R/Naive Bayes Classification.R
no_license
its-Kumar/Machine-Learning
R
false
false
2,362
r
# Naive Bayes Classifier # Importing the dataset dataset = read.csv('Social_Network_Ads.csv') dataset = dataset[, 3:5] ### ============ Important =============== ### # Encoding the target feature as factor dataset$Purchased = factor(dataset$Purchased, levels = c(0,1)) # Splitting dataset into training set and test ...
ElaCovforTest <- function(X, Cr, Cv){ # Compute the estimated correlation coefficient matrix # and covariance matrix according to observation X # # Args: # X : nxp observation matrix # Cr: penalty parameter for the estimation of correlation coefficient # Cv: penalty parameter for the estima...
/ElaCovforR/ElaCovforTest.R
no_license
hangweiqiang/ElaCov
R
false
false
2,062
r
ElaCovforTest <- function(X, Cr, Cv){ # Compute the estimated correlation coefficient matrix # and covariance matrix according to observation X # # Args: # X : nxp observation matrix # Cr: penalty parameter for the estimation of correlation coefficient # Cv: penalty parameter for the estima...
# Lista de Exercícios - Capítulo 2 # Configurando o diretório de trabalho # Coloque entre aspas o diretório de trabalho que você está usando no seu computador # Não use diretórios com espaço no nome setwd("~/Cursos/DSA/FCD/BigDataRAzure/Cap02") # Para saber qual o diretório estou trabalhando: getwd() # Exercício 1...
/Cap02/Exercicios-Cap02.R
no_license
GasparPSousa/BigDataAnalytics-R-Azure
R
false
false
2,801
r
# Lista de Exercícios - Capítulo 2 # Configurando o diretório de trabalho # Coloque entre aspas o diretório de trabalho que você está usando no seu computador # Não use diretórios com espaço no nome setwd("~/Cursos/DSA/FCD/BigDataRAzure/Cap02") # Para saber qual o diretório estou trabalhando: getwd() # Exercício 1...
#data is wrangled in excel because it is easier source("inspack.R") navice_orig <- read.csv("D:/R program/Postdoc-R/Exported Tables/navice_alldata_foranalysis_200629.csv", sep=";") #averaged Cc beta_DS was used #BM library(readxl) BM_master7 <- read_excel("Postdoc-R/Exported Tables/BM_master7.xlsx") #DS DS...
/Dec 2020/navice dataset_ver12.R
no_license
kaye11/Postdoc-R
R
false
false
19,981
r
#data is wrangled in excel because it is easier source("inspack.R") navice_orig <- read.csv("D:/R program/Postdoc-R/Exported Tables/navice_alldata_foranalysis_200629.csv", sep=";") #averaged Cc beta_DS was used #BM library(readxl) BM_master7 <- read_excel("Postdoc-R/Exported Tables/BM_master7.xlsx") #DS DS...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Brain_Putamen_basal_ganglia.R \docType{data} \name{Brain_Putamen_basal_ganglia} \alias{Brain_Putamen_basal_ganglia} \title{Matrix of expression data of Brain_Putamen..basal.ganglia. from gtex} \format{ A [[matrix]] object } \source{ [Brain_Pu...
/man/Brain_Putamen_basal_ganglia.Rd
no_license
roderickslieker/CONQUER.db
R
false
true
505
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Brain_Putamen_basal_ganglia.R \docType{data} \name{Brain_Putamen_basal_ganglia} \alias{Brain_Putamen_basal_ganglia} \title{Matrix of expression data of Brain_Putamen..basal.ganglia. from gtex} \format{ A [[matrix]] object } \source{ [Brain_Pu...
# Text mining using (tm) package # Step 1 - collecting data # To develop the Naive Bayes classifier, we will use data # adapted from the SMS Spam # Collection at http://www.dt.fee.unicamp.br/~tiago/smsspamcollection/ getwd() setwd("C:/Users/BestintownACER1/Desktop/ML_R/Del_Naive_Bayes") #install.packages("tm...
/Naive_Bayes_(Text_Classification_Spam_Detection)/Naive_Bayes.R
no_license
umeshzgde/Machine_Learning_R
R
false
false
21,934
r
# Text mining using (tm) package # Step 1 - collecting data # To develop the Naive Bayes classifier, we will use data # adapted from the SMS Spam # Collection at http://www.dt.fee.unicamp.br/~tiago/smsspamcollection/ getwd() setwd("C:/Users/BestintownACER1/Desktop/ML_R/Del_Naive_Bayes") #install.packages("tm...
library(glmnet) mydata = read.table("./TrainingSet/RF/urinary_tract.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="mae",alpha=0.65,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/urinary_tract/urinary_tract...
/Model/EN/Classifier/urinary_tract/urinary_tract_072.R
no_license
leon1003/QSMART
R
false
false
372
r
library(glmnet) mydata = read.table("./TrainingSet/RF/urinary_tract.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="mae",alpha=0.65,family="gaussian",standardize=FALSE) sink('./Model/EN/Classifier/urinary_tract/urinary_tract...
library(MVar) ### Name: Plot.Regr ### Title: Graphs of the linear regression results. ### Aliases: Plot.Regr ### Keywords: Regression ### ** Examples data(DataMix) Y <- DataMix[,2] X <- DataMix[,7] NomeY <- "Medium grade" NomeX <- "Commercial coffees" Res <- Regr(Y, X, NameVarX = NomeX , Intercepts = TRUE, Sig...
/data/genthat_extracted_code/MVar/examples/Plot.Regr_English.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
976
r
library(MVar) ### Name: Plot.Regr ### Title: Graphs of the linear regression results. ### Aliases: Plot.Regr ### Keywords: Regression ### ** Examples data(DataMix) Y <- DataMix[,2] X <- DataMix[,7] NomeY <- "Medium grade" NomeX <- "Commercial coffees" Res <- Regr(Y, X, NameVarX = NomeX , Intercepts = TRUE, Sig...
## Analisis de los datos #PBH Nov 2018 library(skimr) library(ggplot2) # Resumen general df %>% skim() # Resumenes de tablas! # Precio total por Dormitorio/Bano df %>% filter(tipo!='s/i') %>% group_by(tipo) %>% summarise(count=n(), precio.p10=quantile(precio_MM,0.1,na.rm=T), precio.mea...
/Scripts/Respaldo Scripts/2019/05-analisis.R
no_license
pmbusch/Analisis-Viviendas
R
false
false
2,900
r
## Analisis de los datos #PBH Nov 2018 library(skimr) library(ggplot2) # Resumen general df %>% skim() # Resumenes de tablas! # Precio total por Dormitorio/Bano df %>% filter(tipo!='s/i') %>% group_by(tipo) %>% summarise(count=n(), precio.p10=quantile(precio_MM,0.1,na.rm=T), precio.mea...
## This script was written by David Rheinheimer ## Thanks to Vicky Espinoza for an earlier draft ## This script extracts a variable from a set of year-based netcdf (.nc) files ## for a given climate and variable ID library(raster) library(ncdf4) library(maptools) library(foreign) library(RNetCDF) lib...
/Extracting NetCDF data using coordinates.R
no_license
GustavoFacincani/GCMs
R
false
false
3,826
r
## This script was written by David Rheinheimer ## Thanks to Vicky Espinoza for an earlier draft ## This script extracts a variable from a set of year-based netcdf (.nc) files ## for a given climate and variable ID library(raster) library(ncdf4) library(maptools) library(foreign) library(RNetCDF) lib...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setters.R \name{set_coefficients_boolean} \alias{set_coefficients_boolean} \title{Set coefficients boolean.} \usage{ set_coefficients_boolean(algorithm) } \arguments{ \item{algorithm}{A character vector of length one; the algorithm to run on ...
/R/man/set_coefficients_boolean.Rd
permissive
Nathaniel-Haines/easyml
R
false
true
1,337
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/setters.R \name{set_coefficients_boolean} \alias{set_coefficients_boolean} \title{Set coefficients boolean.} \usage{ set_coefficients_boolean(algorithm) } \arguments{ \item{algorithm}{A character vector of length one; the algorithm to run on ...
## Assignment #Q4: Across the United States, how have emissions from coal ## combustion-related sources changed from 1999-2008? ## SCC.sub <- SCC[grepl("Coal" , SCC$Short.Name), ] NEI.sub <- NEI[NEI$SCC %in% SCC.sub$SCC, ] png("Plot4.png",width=400,height=400,units="px",bg="transparent") ggp <- ggplot(NEI....
/Plot4.R
no_license
adnane1/exploratory-data-analysis-
R
false
false
548
r
## Assignment #Q4: Across the United States, how have emissions from coal ## combustion-related sources changed from 1999-2008? ## SCC.sub <- SCC[grepl("Coal" , SCC$Short.Name), ] NEI.sub <- NEI[NEI$SCC %in% SCC.sub$SCC, ] png("Plot4.png",width=400,height=400,units="px",bg="transparent") ggp <- ggplot(NEI....
context("Building houses") # TODO: break dependencies in buildHouses() to make better unit tests tbv <- tryCatch( if(all(dim(tbv)==c(300,6))) return(tbv), error = function(e) return(loadDt("test_formatted_bv.csv")) ) test_that("Testing buildHouses",{ # treat 311 incidents like in the unit un...
/tests/test.build_houses.R
no_license
arto-pihlaja/ds-capstone
R
false
false
750
r
context("Building houses") # TODO: break dependencies in buildHouses() to make better unit tests tbv <- tryCatch( if(all(dim(tbv)==c(300,6))) return(tbv), error = function(e) return(loadDt("test_formatted_bv.csv")) ) test_that("Testing buildHouses",{ # treat 311 incidents like in the unit un...
test_that("Concordance Correlation Coefficient", { ex_dat <- generate_numeric_test_data() not_na <- !is.na(ex_dat$pred_na) expect_equal( ccc(ex_dat, truth = "obs", estimate = "pred", bias = TRUE)[[".estimate"]], # epiR::epi.ccc(x = ex_dat$obs, y = ex_dat$pred) 0.8322669, tolerance = 0.001 ) e...
/tests/testthat/test-num-ccc.R
permissive
tidymodels/yardstick
R
false
false
2,456
r
test_that("Concordance Correlation Coefficient", { ex_dat <- generate_numeric_test_data() not_na <- !is.na(ex_dat$pred_na) expect_equal( ccc(ex_dat, truth = "obs", estimate = "pred", bias = TRUE)[[".estimate"]], # epiR::epi.ccc(x = ex_dat$obs, y = ex_dat$pred) 0.8322669, tolerance = 0.001 ) e...
/Gera_Arquivo_Formato_Debito.R
no_license
jocelinojr/Codigos-R
R
false
false
1,152
r
rm(list = ls()) library(ggplot2) HPDinterval <- coda::HPDinterval as.mcmc <- coda::as.mcmc source("R/utils.R") # computeCRIandDensity <- function(x) { # cri <- coda::HPDinterval(coda::as.mcmc(x)) # d <- density(x, from = -1, to = 5) # df <- data.frame(x = d$x, y = d$y) # # y was picked by eye # dfh <- data....
/R/improvementInYears.R
permissive
anonymousjournalsubmission2020/Prior-Information-in-Educational-Analyses
R
false
false
4,679
r
rm(list = ls()) library(ggplot2) HPDinterval <- coda::HPDinterval as.mcmc <- coda::as.mcmc source("R/utils.R") # computeCRIandDensity <- function(x) { # cri <- coda::HPDinterval(coda::as.mcmc(x)) # d <- density(x, from = -1, to = 5) # df <- data.frame(x = d$x, y = d$y) # # y was picked by eye # dfh <- data....
############################################################################### # # # WIFI | TRAINING KNN MODEL ONE FOR FLOOR | VERSION 4.0 | by ELSE # # # ...
/old scripts/2. Prediction FLOOR by KNN (V5).R
no_license
elsemaja/WIFI-Fingerprinting
R
false
false
6,245
r
############################################################################### # # # WIFI | TRAINING KNN MODEL ONE FOR FLOOR | VERSION 4.0 | by ELSE # # # ...
### R code from vignette source 'risk_budget_optimization.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: risk_budget_optimization.Rnw:85-86 ################################################### options(width=80) ################################################### ...
/inst/doc/risk_budget_optimization.R
no_license
cran/PortfolioAnalytics
R
false
false
10,844
r
### R code from vignette source 'risk_budget_optimization.Rnw' ### Encoding: UTF-8 ################################################### ### code chunk number 1: risk_budget_optimization.Rnw:85-86 ################################################### options(width=80) ################################################### ...
# Library ----------------------------------------------------------------- library(data.table) library(tidyverse) library(zoo) # Reading ----------------------------------------------------------------- df <- fread("trabalhos_rbep.csv", header = TRUE, encoding = "UTF-8") # o output não é exatamente como previsto....
/rbep/publications/cleaning_web_scraping.R
no_license
estevaovilela/web-scraping
R
false
false
3,207
r
# Library ----------------------------------------------------------------- library(data.table) library(tidyverse) library(zoo) # Reading ----------------------------------------------------------------- df <- fread("trabalhos_rbep.csv", header = TRUE, encoding = "UTF-8") # o output não é exatamente como previsto....
# Packages and helper scripts ---- suppressPackageStartupMessages({ library(SingleCellExperiment) library(tidyverse) library(here) }) source(here("Scripts", "Replicability", "meta_components.R")) source(here("Scripts", "Replicability", "01-data.R")) # Helper functions ---- create_summary_figures <- function(lab...
/Scripts/Replicability/03-visualization.R
no_license
HectorRDB/Pancreas
R
false
false
17,450
r
# Packages and helper scripts ---- suppressPackageStartupMessages({ library(SingleCellExperiment) library(tidyverse) library(here) }) source(here("Scripts", "Replicability", "meta_components.R")) source(here("Scripts", "Replicability", "01-data.R")) # Helper functions ---- create_summary_figures <- function(lab...
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # ProjectName: TMIST # Purpose: sales training # programmer: Anqi Chen # Date: 20-11-2017 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ##-- handle the exception thrown out library(DT...
/stp_handler.R
no_license
RachelAnqi/TeamManagement
R
false
false
57,033
r
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # ProjectName: TMIST # Purpose: sales training # programmer: Anqi Chen # Date: 20-11-2017 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ##-- handle the exception thrown out library(DT...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_signal_plots.R \name{ssvSignalLineplot} \alias{ssvSignalLineplot} \title{construct line type plots where each region in each sample is represented} \usage{ ssvSignalLineplot( bw_data, x_ = "x", y_ = "y", color_ = "sample", ...
/man/ssvSignalLineplot.Rd
no_license
jrboyd/seqsetvis
R
false
true
2,621
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_signal_plots.R \name{ssvSignalLineplot} \alias{ssvSignalLineplot} \title{construct line type plots where each region in each sample is represented} \usage{ ssvSignalLineplot( bw_data, x_ = "x", y_ = "y", color_ = "sample", ...
remove(list = ls()) #' Load Libraries library(lavaan) library(sem) library(lavaanPlot) library(modelsummary) #' Load Data penst.graci <- read.csv( file = "Data/penst.graci.csv", header = T, stringsAsFactors = F) str(penst.graci) #' ### Path analysis model specification model<-' SP ~ 1+ C*H...
/Program/HIandSP/noDOBG_2/SEM_penstgraci_test1.R
no_license
echandle2228/bareground2020_2021
R
false
false
1,696
r
remove(list = ls()) #' Load Libraries library(lavaan) library(sem) library(lavaanPlot) library(modelsummary) #' Load Data penst.graci <- read.csv( file = "Data/penst.graci.csv", header = T, stringsAsFactors = F) str(penst.graci) #' ### Path analysis model specification model<-' SP ~ 1+ C*H...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_covs.R \name{make_names} \alias{make_names} \title{Create names for covariance matrices} \usage{ make_names(names, suffixes) } \arguments{ \item{names}{a string} \item{suffixes}{Adds _suffixes to names for each element of suffixes} }...
/man/make_names.Rd
permissive
surbut/mashr
R
false
true
374
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_covs.R \name{make_names} \alias{make_names} \title{Create names for covariance matrices} \usage{ make_names(names, suffixes) } \arguments{ \item{names}{a string} \item{suffixes}{Adds _suffixes to names for each element of suffixes} }...
############################################################################## # # # Analysis to accompany "The Only Good p-values Come from Catheters: Qualitative # Philosophies and Quantitative Results in Pediatric Brain Surgery Outcomes" # presentation by Dwight Barry at Advancing Analytics for Pediatric Hospitals #...
/pee-values/pee-values-R-code.R
permissive
Rmadillo/SCH_R_Training
R
false
false
12,077
r
############################################################################## # # # Analysis to accompany "The Only Good p-values Come from Catheters: Qualitative # Philosophies and Quantitative Results in Pediatric Brain Surgery Outcomes" # presentation by Dwight Barry at Advancing Analytics for Pediatric Hospitals #...
## makeCacheMatrix() Creates inverse matrix and cache it makeCacheMatrix <- function(original.matrix = matrix()) { inverted.matrix <- NULL set <- function(y) { original.matrix <<- y inverted.matrix <<- NULL } # Functions for getting and setting cached inv. matrix value get <- function() orig...
/cachematrix.R
no_license
JothiM/ProgrammingAssignment2
R
false
false
1,139
r
## makeCacheMatrix() Creates inverse matrix and cache it makeCacheMatrix <- function(original.matrix = matrix()) { inverted.matrix <- NULL set <- function(y) { original.matrix <<- y inverted.matrix <<- NULL } # Functions for getting and setting cached inv. matrix value get <- function() orig...
# ex3.02.R OU.lik <- function(theta1, theta2, theta3){ n <- length(X) dt <- deltat(X) -sum(dcOU(X[2:n], dt, X[1:(n-1)], c(theta1,theta2,theta3), log=TRUE)) } require(stats4) require(sde) set.seed(123) X <- sde.sim(model="OU", theta=c(0,3,2), N=1000, delta=1) mle(OU.lik, start=list(theta2=1.5, theta3=1), fixed=l...
/SIofSDE/r/ex3.02.R
no_license
KatsuyaITO/NSofSDE
R
false
false
913
r
# ex3.02.R OU.lik <- function(theta1, theta2, theta3){ n <- length(X) dt <- deltat(X) -sum(dcOU(X[2:n], dt, X[1:(n-1)], c(theta1,theta2,theta3), log=TRUE)) } require(stats4) require(sde) set.seed(123) X <- sde.sim(model="OU", theta=c(0,3,2), N=1000, delta=1) mle(OU.lik, start=list(theta2=1.5, theta3=1), fixed=l...
#---------------------------- # # Maerl Genomics Project # # Description: # Plot maerl bed distribution map # Plot Fal Estuary map # # https://github.com/Tom-Jenkins/maerl_genomics # #---------------------------- # Load packages library(sf) library(tidyverse) library(ggspatial) # ----------------- # # # Prepare OSPA...
/5.R_code/7.maerl_bed_fal_estuary_map.R
no_license
Tom-Jenkins/maerl_genomics
R
false
false
6,200
r
#---------------------------- # # Maerl Genomics Project # # Description: # Plot maerl bed distribution map # Plot Fal Estuary map # # https://github.com/Tom-Jenkins/maerl_genomics # #---------------------------- # Load packages library(sf) library(tidyverse) library(ggspatial) # ----------------- # # # Prepare OSPA...
#read in the data file electricPower <- read.csv('data/household_power_consumption.txt', sep=';', na.strings='?') electricPower$Date <- as.Date(electricPower$Date, format='%d/%m/%Y') #get only the 2007 set electricPower <- electricPower[electricPower$Date >= '2007-02-01' & electricPower$Date <= '2007-02-02',] electr...
/plot4.R
no_license
gautham-hegde/ExData_Plotting1
R
false
false
1,386
r
#read in the data file electricPower <- read.csv('data/household_power_consumption.txt', sep=';', na.strings='?') electricPower$Date <- as.Date(electricPower$Date, format='%d/%m/%Y') #get only the 2007 set electricPower <- electricPower[electricPower$Date >= '2007-02-01' & electricPower$Date <= '2007-02-02',] electr...
#################################################################### ## Code to download data from dataset GSE113904, # and draw heatmaps # # # August 4 2020 #################################################################### # Took some ideas from here https://f1000research.com/articles/5-1281/v3 suppressPackageSta...
/scripts/Luebeck.R
permissive
sorjuela/age_lesions_females
R
false
false
5,887
r
#################################################################### ## Code to download data from dataset GSE113904, # and draw heatmaps # # # August 4 2020 #################################################################### # Took some ideas from here https://f1000research.com/articles/5-1281/v3 suppressPackageSta...
## Write a short comment describing this function # Matrix inversion is usually a time and machine time consuming computation. # So It is advisable to use caching to compute inverse of a matrix than direct computation. #Two functions are used to cache the inverse of a matrix. # makeCacheMatrix creates a list containin...
/cachematrix.R
no_license
salorajan/ProgrammingAssignment2
R
false
false
1,303
r
## Write a short comment describing this function # Matrix inversion is usually a time and machine time consuming computation. # So It is advisable to use caching to compute inverse of a matrix than direct computation. #Two functions are used to cache the inverse of a matrix. # makeCacheMatrix creates a list containin...
install.packages('sentimentr') library('sentimentr') data <- read.csv(file="Twitter_sentiment_self_drive_DFE.csv",header=TRUE) tweets <- data[,ncol(data)] tweets for(i in tweets){ x <- sentiment(i) print(x) } #output # > install.packages('sentimentr') # Installing package into ‘/home/vrushil/R/x86_64-pc-linux-...
/CompEngg/BE/LP1 ASSIGNMENTS/daa/da for PS/A4_sentiment/sentiment.R
no_license
Vrushil-Soni/Engineering-Programs
R
false
false
13,295
r
install.packages('sentimentr') library('sentimentr') data <- read.csv(file="Twitter_sentiment_self_drive_DFE.csv",header=TRUE) tweets <- data[,ncol(data)] tweets for(i in tweets){ x <- sentiment(i) print(x) } #output # > install.packages('sentimentr') # Installing package into ‘/home/vrushil/R/x86_64-pc-linux-...
ddir <- "~/source/tpch-dbgen/sf-1" adir <- "~/source/dplyr-tpch/answers" library(DBI) con <- dbConnect(MonetDBLite::MonetDBLite(), "/tmp/dplyr-tpch") schema <- list( nation=c("n_nationkey","n_name","n_regionkey","n_comment"), region=c("r_regionkey","r_name","r_comment"), part=c("p_partkey","p_name","p_mfgr","p_brand...
/tpch.R
no_license
hannes/dplyr-tpch
R
false
false
9,599
r
ddir <- "~/source/tpch-dbgen/sf-1" adir <- "~/source/dplyr-tpch/answers" library(DBI) con <- dbConnect(MonetDBLite::MonetDBLite(), "/tmp/dplyr-tpch") schema <- list( nation=c("n_nationkey","n_name","n_regionkey","n_comment"), region=c("r_regionkey","r_name","r_comment"), part=c("p_partkey","p_name","p_mfgr","p_brand...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MC_simulate.R \name{simulate_MC} \alias{simulate_MC} \title{Simulate Metacommunity Dynamics} \usage{ simulate_MC( patches, species, dispersal = 0.01, plot = TRUE, torus = FALSE, kernel_exp = 0.1, env1Scale = 500, timesteps = 1...
/metacommunity/mcomsimr-master/man/simulate_MC.Rd
permissive
jusinowicz/info_theory_eco
R
false
true
2,980
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MC_simulate.R \name{simulate_MC} \alias{simulate_MC} \title{Simulate Metacommunity Dynamics} \usage{ simulate_MC( patches, species, dispersal = 0.01, plot = TRUE, torus = FALSE, kernel_exp = 0.1, env1Scale = 500, timesteps = 1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/normalize.R \name{normalize} \alias{normalize} \title{Normalization of microarray and RNA-seq expression data} \usage{ normalize( se, norm.method = "quantile", data.type = c(NA, "ma", "rseq"), filter.by.expr = TRUE ) } \arguments{ \it...
/man/normalize.Rd
no_license
reubenthomas/EnrichmentBrowser
R
false
true
5,267
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/normalize.R \name{normalize} \alias{normalize} \title{Normalization of microarray and RNA-seq expression data} \usage{ normalize( se, norm.method = "quantile", data.type = c(NA, "ma", "rseq"), filter.by.expr = TRUE ) } \arguments{ \it...
#--------------------------------------------------------- # Author: Robert Wildermuth, rwildermuth@umassd.edu # Created: 9/16/2020 # Last Modified: 9/16/2020 # Description: #--------------------------------------------------------- ### QPress QNMs ########################################################...
/SimpleExample_QNMCode.R
no_license
rwildermuth/WA_QNM_MSP
R
false
false
5,614
r
#--------------------------------------------------------- # Author: Robert Wildermuth, rwildermuth@umassd.edu # Created: 9/16/2020 # Last Modified: 9/16/2020 # Description: #--------------------------------------------------------- ### QPress QNMs ########################################################...
library("caret") library("deepnet") library(foreach) library(doSNOW) source("Rsource/model.base.R") source("Rsource/model.auxilary.R") source("Rsource/model.serial.R") model.getLinearModels.arlm = function(model.cfg,layer.cfg, rbm.cfg, RBMups, andsave = FALSE) { reg.L2 = layer.cfg$reg.L2 order = layer.cf...
/Rsource/model.R
no_license
hendrikTpl/PrecipitationDBN
R
false
false
8,527
r
library("caret") library("deepnet") library(foreach) library(doSNOW) source("Rsource/model.base.R") source("Rsource/model.auxilary.R") source("Rsource/model.serial.R") model.getLinearModels.arlm = function(model.cfg,layer.cfg, rbm.cfg, RBMups, andsave = FALSE) { reg.L2 = layer.cfg$reg.L2 order = layer.cf...
getwd() tele<-read.csv("telecomfinal.csv", stringsAsFactors = T) options(scipen = 999) library(dplyr) names(tele) str(tele) summary(tele) ##---------Creating Data Quality Report(dqr)-----------## #Extracting Variable names Variables<-names(tele) dqr<-as.data.frame(Variables) rm(Variables) #Reco...
/Mobicom Telecomfinal analysis.R
no_license
vbhatsaccnt/Telecom_Churn_Analysis
R
false
false
55,022
r
getwd() tele<-read.csv("telecomfinal.csv", stringsAsFactors = T) options(scipen = 999) library(dplyr) names(tele) str(tele) summary(tele) ##---------Creating Data Quality Report(dqr)-----------## #Extracting Variable names Variables<-names(tele) dqr<-as.data.frame(Variables) rm(Variables) #Reco...
#' Generates random deviates from a CosWeibull probability distribution. #' @export #' @importFrom fdrtool dhalfnorm #' @importFrom fdrtool rhalfnorm #' #' @param n Number of observations to be generated. #' @param alpha Alpha parameter. #' @param lambda Lambda parameter. #' @return A vector with n observations...
/R/rcosw.R
no_license
cran/CosW
R
false
false
735
r
#' Generates random deviates from a CosWeibull probability distribution. #' @export #' @importFrom fdrtool dhalfnorm #' @importFrom fdrtool rhalfnorm #' #' @param n Number of observations to be generated. #' @param alpha Alpha parameter. #' @param lambda Lambda parameter. #' @return A vector with n observations...
## Creates a special matrix object that can cache its inverse ## Matrix object with attributes get, set, getinverse and setinverse makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inv) m <<- inv getinverse <- ...
/cachematrix.R
no_license
sudhir-behani/ProgrammingAssignment2
R
false
false
1,444
r
## Creates a special matrix object that can cache its inverse ## Matrix object with attributes get, set, getinverse and setinverse makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inv) m <<- inv getinverse <- ...
\name{bingat-internal} \alias{bingat-internal} \alias{array2mat} \alias{full2lt} \alias{list2mat} \alias{lt2full} \alias{vec2mat} \alias{glrtReg} \alias{glmReg} \alias{gaScoring} \alias{gaCreation} \alias{gaPlot} \title{Internal Functions} \description{These files are only called from inside other functi...
/bingat/man/BinGAT-internal.Rd
no_license
BioRankings/BinGAT
R
false
false
503
rd
\name{bingat-internal} \alias{bingat-internal} \alias{array2mat} \alias{full2lt} \alias{list2mat} \alias{lt2full} \alias{vec2mat} \alias{glrtReg} \alias{glmReg} \alias{gaScoring} \alias{gaCreation} \alias{gaPlot} \title{Internal Functions} \description{These files are only called from inside other functi...
all_symbols <- c( 'star-triangle-down','circle','square',"diamond", "x",'triangle-up','triangle-down','hexagon','asterisk', 'diamond-cross',"square-cross","circle-cross","circle-x", "star-square","star","star-triangle-up","star-square", "star-diamond","diamond-tall","diamond-wide","hourglass", '...
/gui/server_logic/plot_options.R
permissive
phoenixding/cellar
R
false
false
4,194
r
all_symbols <- c( 'star-triangle-down','circle','square',"diamond", "x",'triangle-up','triangle-down','hexagon','asterisk', 'diamond-cross',"square-cross","circle-cross","circle-x", "star-square","star","star-triangle-up","star-square", "star-diamond","diamond-tall","diamond-wide","hourglass", '...
##Q1 x = 1:5 maxNumber = 0 input = integer() for (i in x) { print(paste("Number", i, ":")) input = scan(what = integer(), n = 1) if (maxNumber == 0) { maxNumber = input } else if (input > maxNumber) { maxNumber = input } if (i == max(x)) { message(c("Max number is ", maxNumber)) } } ##...
/T-29092020.R
no_license
chengkangzai/PDFA-R
R
false
false
2,174
r
##Q1 x = 1:5 maxNumber = 0 input = integer() for (i in x) { print(paste("Number", i, ":")) input = scan(what = integer(), n = 1) if (maxNumber == 0) { maxNumber = input } else if (input > maxNumber) { maxNumber = input } if (i == max(x)) { message(c("Max number is ", maxNumber)) } } ##...
library(forecast) set.seed(1234) y <- ts(sort(rnorm(30)), start = 1978, frequency = 1) # annual data fcasts <- vector(mode = "list", length = 10L) for (i in 1:10) { # start rolling forecast # start from 1997, every time one more year included win.y <- window(y, end = 1996 + i) fit <- auto.arima(win.y) fcasts[[...
/code/0-raw/walk forward validation auto arima.R
no_license
Allisterh/US-Real-GDP-Prediction
R
false
false
385
r
library(forecast) set.seed(1234) y <- ts(sort(rnorm(30)), start = 1978, frequency = 1) # annual data fcasts <- vector(mode = "list", length = 10L) for (i in 1:10) { # start rolling forecast # start from 1997, every time one more year included win.y <- window(y, end = 1996 + i) fit <- auto.arima(win.y) fcasts[[...
library(testthat) library(tidytree) test_check("tidytree")
/tests/testthat.R
no_license
xiangpin/tidytree
R
false
false
60
r
library(testthat) library(tidytree) test_check("tidytree")
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/age_calc.R \name{age_calc} \alias{age_calc} \title{unction to calculate age from date of birth.} \source{ This function was developed in part from this response on the R-Help mailing list. } \usage{ age_calc(dob, enddate = Sys.Date(),...
/man/age_calc.Rd
no_license
sgibb/eeptools
R
false
false
1,478
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/age_calc.R \name{age_calc} \alias{age_calc} \title{unction to calculate age from date of birth.} \source{ This function was developed in part from this response on the R-Help mailing list. } \usage{ age_calc(dob, enddate = Sys.Date(),...
library(readxl) library(stringr) library(plyr) library(dplyr) library(ggplot2) require(scales) library(lubridate) library(ggrepel) setwd("Z:\\Dropbox\\Econometrics by Simulation\\2020_04_April\\COVID2019") influenza = read_excel("Influenza.xlsx") %>% filter(Season == "2019-2020") influenza$date = influenza$`Week En...
/2020/04-April/11_COVID19.R
permissive
AdolfoGrossoGamboa/Ninja
R
false
false
6,907
r
library(readxl) library(stringr) library(plyr) library(dplyr) library(ggplot2) require(scales) library(lubridate) library(ggrepel) setwd("Z:\\Dropbox\\Econometrics by Simulation\\2020_04_April\\COVID2019") influenza = read_excel("Influenza.xlsx") %>% filter(Season == "2019-2020") influenza$date = influenza$`Week En...
\name{Collect pairs of LD} \alias{take.ld.pairs} \title{Calculate covariance matrix and transform into triangular form} \description{ } \usage{ take.ld.pairs(X, cutoff = 0.05, stdize = FALSE) } \arguments{ \item{X}{n x p matrix} \item{cutoff}{LD cutoff} \item{stdize}{standardize X matrix} } \value{ returns data...
/man/zqtl-ld-pairs.Rd
no_license
rintukutum/zqtl
R
false
false
417
rd
\name{Collect pairs of LD} \alias{take.ld.pairs} \title{Calculate covariance matrix and transform into triangular form} \description{ } \usage{ take.ld.pairs(X, cutoff = 0.05, stdize = FALSE) } \arguments{ \item{X}{n x p matrix} \item{cutoff}{LD cutoff} \item{stdize}{standardize X matrix} } \value{ returns data...
library(dplyr) ag_table <- function(df){ ret <- df %>% group_by(animal_type) %>% mutate( `Frequency` = length(animal_type), `Avg Intake Age` = round(mean(age_upon_intake_.years.),2), `Avg Outcome Age` = round(mean(age_upon_outcome_.years.),2) ) %>% ungroup() %>% group_by(animal...
/scripts/aggregate_table.R
no_license
AnthonyDinhNgo/AAC_Analysis
R
false
false
744
r
library(dplyr) ag_table <- function(df){ ret <- df %>% group_by(animal_type) %>% mutate( `Frequency` = length(animal_type), `Avg Intake Age` = round(mean(age_upon_intake_.years.),2), `Avg Outcome Age` = round(mean(age_upon_outcome_.years.),2) ) %>% ungroup() %>% group_by(animal...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{randomData} \alias{randomData} \title{randomData} \usage{ randomData() } \description{ generates random data for the openCPU example } \details{ Create some random data to plot. } \author{ Theo Van Rooy <theo@royaltyanalytics.com> }
/man/randomData.Rd
no_license
greentheo/OpenStreetMapR
R
false
false
293
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{randomData} \alias{randomData} \title{randomData} \usage{ randomData() } \description{ generates random data for the openCPU example } \details{ Create some random data to plot. } \author{ Theo Van Rooy <theo@royaltyanalytics.com> }
test_that("topojson_json works with numeric inputs", { skip_on_cran() aa <- topojson_json(c(-99.74, 32.45), quiet = TRUE) expect_s3_class(aa, "json") }) test_that("topojson_json works with numeric inputs for polygons", { skip_on_cran() poly <- c( c(-114.345703125, 39.436192999314095), c(-114.345703...
/tests/testthat/test-topojson_json.R
permissive
ropensci/geojsonio
R
false
false
1,452
r
test_that("topojson_json works with numeric inputs", { skip_on_cran() aa <- topojson_json(c(-99.74, 32.45), quiet = TRUE) expect_s3_class(aa, "json") }) test_that("topojson_json works with numeric inputs for polygons", { skip_on_cran() poly <- c( c(-114.345703125, 39.436192999314095), c(-114.345703...
/man/SPISA.Rd
no_license
yeagle/psychotree
R
false
false
6,965
rd
if (interactive()){ cv.fold=2 use.mrf=T alpha=1 truncate=T initial_size=50 burn.in=10 } else { args <- commandArgs(trailingOnly = TRUE) cv.fold=as.integer(args[1]) alpha=1 use.mrf=T truncate=T initial_size=50 burn.in=100 } source("load_CTRPv2.R") sens=y x=scale(x) x[is.na...
/code/run_lacrosse.R
no_license
davidaknowles/lacrosse
R
false
false
2,129
r
if (interactive()){ cv.fold=2 use.mrf=T alpha=1 truncate=T initial_size=50 burn.in=10 } else { args <- commandArgs(trailingOnly = TRUE) cv.fold=as.integer(args[1]) alpha=1 use.mrf=T truncate=T initial_size=50 burn.in=100 } source("load_CTRPv2.R") sens=y x=scale(x) x[is.na...
fl <- readLines("input_day_25.txt") dpk <- as.numeric(fl[1]) cpk <- as.numeric(fl[2]) it <- 0 x <- 1 t <- NULL while(x != dpk){ it <- it + 1 x <- (7 * x) %% 20201227 } it2 <- 0 x <- 1 while(it2 < it){ x <- (cpk * x) %% 20201227 it2 <- it2 + 1 } result <- x cat("Day 25 Part 1:", result)
/solutions/day_25.R
no_license
zapateros/aoc2020
R
false
false
302
r
fl <- readLines("input_day_25.txt") dpk <- as.numeric(fl[1]) cpk <- as.numeric(fl[2]) it <- 0 x <- 1 t <- NULL while(x != dpk){ it <- it + 1 x <- (7 * x) %% 20201227 } it2 <- 0 x <- 1 while(it2 < it){ x <- (cpk * x) %% 20201227 it2 <- it2 + 1 } result <- x cat("Day 25 Part 1:", result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cognitoidentityprovider_operations.R \name{cognitoidentityprovider_admin_update_device_status} \alias{cognitoidentityprovider_admin_update_device_status} \title{Updates the device status as an administrator} \usage{ cognitoidentityprovider_ad...
/cran/paws.security.identity/man/cognitoidentityprovider_admin_update_device_status.Rd
permissive
peoplecure/paws
R
false
true
991
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cognitoidentityprovider_operations.R \name{cognitoidentityprovider_admin_update_device_status} \alias{cognitoidentityprovider_admin_update_device_status} \title{Updates the device status as an administrator} \usage{ cognitoidentityprovider_ad...
\name{GeoTests} \alias{GeoTests} \encoding{UTF-8} \title{Statistical Hypothesis Tests for Nested Models} \description{ The function performs statistical hypothesis tests for nested models based on composite or standard likelihood versions of: Wald-type and Wilks-type (likelihood ratio) statistics. } \usage{ GeoT...
/man/GeoTests.Rd
no_license
kerchner/GeoModels-OCL
R
false
false
9,975
rd
\name{GeoTests} \alias{GeoTests} \encoding{UTF-8} \title{Statistical Hypothesis Tests for Nested Models} \description{ The function performs statistical hypothesis tests for nested models based on composite or standard likelihood versions of: Wald-type and Wilks-type (likelihood ratio) statistics. } \usage{ GeoT...
######################################################################################### # This code is adapted from the following: # # An R function to make a personalized map of people you follow and who follow you on twitter. # R functions Copyright (C) 2011 Jeff Leek (jtleek@gmail.com), and the Simply Statisti...
/twitterMap.R
no_license
knbknb/R_grabbag
R
false
false
5,883
r
######################################################################################### # This code is adapted from the following: # # An R function to make a personalized map of people you follow and who follow you on twitter. # R functions Copyright (C) 2011 Jeff Leek (jtleek@gmail.com), and the Simply Statisti...
BCV_ttest2<-function(data0,rounds=20,slice0=2,maxrank0=30,msep_cut=0.001) { x<-data0 fff_cc<-c() for(kk in 1:rounds) { cv_result <- cv.svd.gabriel(x, slice0, slice0, maxrank = maxrank0) fff_cc<-rbind(fff_cc,cv_result$msep) } pp<-c() ...
/BCV_ttest2.R
no_license
changwn/rankTest
R
false
false
853
r
BCV_ttest2<-function(data0,rounds=20,slice0=2,maxrank0=30,msep_cut=0.001) { x<-data0 fff_cc<-c() for(kk in 1:rounds) { cv_result <- cv.svd.gabriel(x, slice0, slice0, maxrank = maxrank0) fff_cc<-rbind(fff_cc,cv_result$msep) } pp<-c() ...
MHiC<-function(reads_file,Digest_file = NULL , outdir ,method="gothic",sample_name ,tools_name = NULL,res = 1000000 ,cistrans = "all" , parallel=FALSE, cores=NULL, removeDiagonal=TRUE,save = TRUE , remove = FALSE ,min_cov = 2 ,min_len = 0.1 ...
/R/MHiC.R
no_license
MHi-C/MHiC
R
false
false
3,186
r
MHiC<-function(reads_file,Digest_file = NULL , outdir ,method="gothic",sample_name ,tools_name = NULL,res = 1000000 ,cistrans = "all" , parallel=FALSE, cores=NULL, removeDiagonal=TRUE,save = TRUE , remove = FALSE ,min_cov = 2 ,min_len = 0.1 ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utilsSpec.R \name{fixDeadBand} \alias{fixDeadBand} \title{this only works for a very specific situation} \usage{ fixDeadBand(msc, zeroOffsetIdx, freqRangeIdx, band, df, replaceWith = 0) } \description{ this only works for a very specific situ...
/man/fixDeadBand.Rd
no_license
driegert/transfer3
R
false
true
328
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utilsSpec.R \name{fixDeadBand} \alias{fixDeadBand} \title{this only works for a very specific situation} \usage{ fixDeadBand(msc, zeroOffsetIdx, freqRangeIdx, band, df, replaceWith = 0) } \description{ this only works for a very specific situ...
testlist <- list(type = 0L, z = 8.28905925001084e-316) result <- do.call(esreg::G1_fun,testlist) str(result)
/esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609892508-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
108
r
testlist <- list(type = 0L, z = 8.28905925001084e-316) result <- do.call(esreg::G1_fun,testlist) str(result)
## Created: 11/30 ## Modified: 12/01 source("allFunc.R") doGibbsANWeight<-function(niter = 10000,burnin = 5000, data = sub_dat, alpha = alpha_s, gamma = gamma_s, pop_mean = pop_mean_HT, pop_sd = pop_sd_HT){ X1 <- sub_dat$X1 W <- sub_dat$W Rx <- sub_dat$Rx Y <- sub_dat$Y S <- ifelse(sub_dat$W >5,1,2) n_mis <...
/comp_stratify.R
no_license
jiuruitang/MissingData
R
false
false
6,381
r
## Created: 11/30 ## Modified: 12/01 source("allFunc.R") doGibbsANWeight<-function(niter = 10000,burnin = 5000, data = sub_dat, alpha = alpha_s, gamma = gamma_s, pop_mean = pop_mean_HT, pop_sd = pop_sd_HT){ X1 <- sub_dat$X1 W <- sub_dat$W Rx <- sub_dat$Rx Y <- sub_dat$Y S <- ifelse(sub_dat$W >5,1,2) n_mis <...
#' Report statistics about region gain and loss for future environment #' #' @param raster_presente_bin Raster object with values 0, 1 that shows the #' current species distribution #' @param raster_futuro_bin Raster object with values 0, 1 that show the future #' di...
/RangeShift.R
no_license
AngelaCrow/MNE
R
false
false
3,326
r
#' Report statistics about region gain and loss for future environment #' #' @param raster_presente_bin Raster object with values 0, 1 that shows the #' current species distribution #' @param raster_futuro_bin Raster object with values 0, 1 that show the future #' di...
######################################################################################################################### # The R minicourse in one shot (R basics, data structures, clustering, classification): ##############################################################################################################...
/rstudio/01stepfirsten.R
permissive
pwasiewi/dokerz
R
false
false
59,824
r
######################################################################################################################### # The R minicourse in one shot (R basics, data structures, clustering, classification): ##############################################################################################################...
#' Read MCD19A2 HDF-4 Files #' #' Read MCD19A2 HDF-4 files #' #' @param file.name the name of input HDF file with an \emph{absolute} path #' @param latlong.range the lat/long range with the structure \code{c(lon.min, lon.max, lat.min, lat.max)}, cannot be used with \code{border.shp} #' @param border.shp a shapefile (cl...
/R/readMCD19A2.R
no_license
jianzhaobi/bjzresc
R
false
false
7,169
r
#' Read MCD19A2 HDF-4 Files #' #' Read MCD19A2 HDF-4 files #' #' @param file.name the name of input HDF file with an \emph{absolute} path #' @param latlong.range the lat/long range with the structure \code{c(lon.min, lon.max, lat.min, lat.max)}, cannot be used with \code{border.shp} #' @param border.shp a shapefile (cl...
library(qtl) library(snowfall) load("/share/malooflab/Ruijuan/F2/QTL_analysis/data/LG.f2.after.crossover.43traits.Rdata") LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32) LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1) sfInit(parallel = TRUE, cpus = 16) sfExport("LG.f2....
/F2/scantwo/scantwo_perm_15.10_new.R
no_license
leejimmy93/KIAT_cabernet
R
false
false
684
r
library(qtl) library(snowfall) load("/share/malooflab/Ruijuan/F2/QTL_analysis/data/LG.f2.after.crossover.43traits.Rdata") LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32) LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1) sfInit(parallel = TRUE, cpus = 16) sfExport("LG.f2....
## call rmarkdown on first notebook rmarkdown::render(input = "notebook_one_demog_air_clean.Rmd")
/tests/render_notebook_one.R
no_license
katherinerosewolf/segregation_components
R
false
false
98
r
## call rmarkdown on first notebook rmarkdown::render(input = "notebook_one_demog_air_clean.Rmd")
## Assignment 1 ## rm(list=ls()) ## Step 2 ## Apps <- read.csv("07192013Apps.csv") ## Step 3 ## summary(Apps[,c('Rank','Price','Screenshots','Rating_Score','Rating_Num', 'Business', 'Finance', 'Games', 'Health', 'Utilities')]) # Variable Transformation # Sales <- -log(Apps$Rank) Log_Rating_Num <- log(A...
/BC2406 R EXERCISE/Seminar Notes/R Exercise_S6 (2).r
no_license
hengxiang/BC2406-R-EXERCISE
R
false
false
923
r
## Assignment 1 ## rm(list=ls()) ## Step 2 ## Apps <- read.csv("07192013Apps.csv") ## Step 3 ## summary(Apps[,c('Rank','Price','Screenshots','Rating_Score','Rating_Num', 'Business', 'Finance', 'Games', 'Health', 'Utilities')]) # Variable Transformation # Sales <- -log(Apps$Rank) Log_Rating_Num <- log(A...
##' @title AlignmentPairs ##' ##' @export ##' @rdname AlignmentPairs-class ##' setMethod("AlignmentPairs", signature = c("AlignmentItem", "AlignmentItem"), definition = function(query, subject, ...){ if (!missing(...)) { elementMetadata <- DataFrame(...) } else { elementMetadata <- new...
/R/methods-AlignmentPairs-class.R
permissive
NBISweden/ripr
R
false
false
4,238
r
##' @title AlignmentPairs ##' ##' @export ##' @rdname AlignmentPairs-class ##' setMethod("AlignmentPairs", signature = c("AlignmentItem", "AlignmentItem"), definition = function(query, subject, ...){ if (!missing(...)) { elementMetadata <- DataFrame(...) } else { elementMetadata <- new...
#' @title Visualize an abridged fast dependency graph. #' @export #' @family inspect #' @description Analyze the pipeline defined in `_targets.R` #' and visualize the directed acyclic graph of targets. #' Unlike [tar_visnetwork()], `tar_glimpse()` does not account for #' metadata or progress information, which me...
/R/tar_glimpse.R
permissive
krlmlr/targets
R
false
false
3,173
r
#' @title Visualize an abridged fast dependency graph. #' @export #' @family inspect #' @description Analyze the pipeline defined in `_targets.R` #' and visualize the directed acyclic graph of targets. #' Unlike [tar_visnetwork()], `tar_glimpse()` does not account for #' metadata or progress information, which me...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{cylinder} \alias{cylinder} \title{Diesel engine cylinder replacements} \format{ A \code{data.frame} with 276 rows and 4 variables: \tabular{rlll}{ [, 1] \tab engine \tab Type of engine used \tab \bold{Categoric}\...
/man/cylinder.Rd
no_license
anhnguyendepocen/SMRD
R
false
true
1,594
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{cylinder} \alias{cylinder} \title{Diesel engine cylinder replacements} \format{ A \code{data.frame} with 276 rows and 4 variables: \tabular{rlll}{ [, 1] \tab engine \tab Type of engine used \tab \bold{Categoric}\...
###### Short Lab: Exploring the "boosting" function from the "adabag" library ########## ## Below is the code we explored last week for detecting breast cancer using boosting. ## (1) Review the commands and compile a list of questions you have about the code (if any). ############################### Last Week's Boosti...
/DS 4559/Short Boosting Lab.R
no_license
pleng28/DataScience
R
false
false
6,306
r
###### Short Lab: Exploring the "boosting" function from the "adabag" library ########## ## Below is the code we explored last week for detecting breast cancer using boosting. ## (1) Review the commands and compile a list of questions you have about the code (if any). ############################### Last Week's Boosti...
install.packages("codyn", repos='http://cran.us.r-project.org') install.packages("dplyr", repos='http://cran.us.r-project.org') install.packages("tidyr", repos='http://cran.us.r-project.org') install.packages("lubridate", repos='http://cran.us.r-project.org') install.packages("ggplot2", repos='http://cran.us.r-proj...
/scripts/plankton_rac_analysis.R
no_license
miraSantos/plankton-index
R
false
false
7,384
r
install.packages("codyn", repos='http://cran.us.r-project.org') install.packages("dplyr", repos='http://cran.us.r-project.org') install.packages("tidyr", repos='http://cran.us.r-project.org') install.packages("lubridate", repos='http://cran.us.r-project.org') install.packages("ggplot2", repos='http://cran.us.r-proj...
library(testthat) library(systemPipeShiny) test_check('systemPipeShiny')
/tests/testthat.R
no_license
cpsievert/systemPipeShiny
R
false
false
73
r
library(testthat) library(systemPipeShiny) test_check('systemPipeShiny')
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{schools} \alias{schools} \title{schools data} \format{\Sexpr[results=rd]{bps6data:::doc_bps6_data("schools") }} \source{ \url{ http://content.bfwpub.com/webroot_pubcontent/Content/BCS_5/BPS6e/Student/DataSe...
/man/schools.Rd
no_license
jrnold/bps6data
R
false
false
608
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{schools} \alias{schools} \title{schools data} \format{\Sexpr[results=rd]{bps6data:::doc_bps6_data("schools") }} \source{ \url{ http://content.bfwpub.com/webroot_pubcontent/Content/BCS_5/BPS6e/Student/DataSe...
x<-function(b){ for(a in b){ if(a%%2==0){ y<-TRUE print(y) } else{ y<-FALSE print(y) } } } print(x(5))
/Unidad 6 A&LP/Panchita 1.14.R
no_license
arianavr/Algoritmos
R
false
false
160
r
x<-function(b){ for(a in b){ if(a%%2==0){ y<-TRUE print(y) } else{ y<-FALSE print(y) } } } print(x(5))
% Generated by roxygen2 (4.0.0): do not edit by hand \name{resolution} \alias{resolution} \title{Compute the "resolution" of a data vector.} \usage{ resolution(x, zero = TRUE) } \arguments{ \item{x}{numeric vector} \item{zero}{should a zero value be automatically included in the computation of resolution} } \des...
/man/resolution.Rd
no_license
nietzsche1993/ggplot2
R
false
false
777
rd
% Generated by roxygen2 (4.0.0): do not edit by hand \name{resolution} \alias{resolution} \title{Compute the "resolution" of a data vector.} \usage{ resolution(x, zero = TRUE) } \arguments{ \item{x}{numeric vector} \item{zero}{should a zero value be automatically included in the computation of resolution} } \des...
maxRows <- 550 getOrders <- function(store, newRowList, currentPos, params) { allzero <- rep(0,length(newRowList)) # used for initializing vectors if (is.null(store)) { #checkParams(params) store <- initStore(newRowList,params$series) } else store <- updateStore(store, newRowList,params$se...
/backtester_v4.2/strategies/W%R-MACD(pos-P&R)6.R
no_license
whyVeronica/backtester_v4.2
R
false
false
9,730
r
maxRows <- 550 getOrders <- function(store, newRowList, currentPos, params) { allzero <- rep(0,length(newRowList)) # used for initializing vectors if (is.null(store)) { #checkParams(params) store <- initStore(newRowList,params$series) } else store <- updateStore(store, newRowList,params$se...
### Relief Pitcher Aging Factors rp_aging_factors <- function(){ library(dplyr) library(XML) raw.data <- readHTMLTable("http://www.fangraphs.com/leaders.aspx?pos=all&stats=rel&lg=all&qual=y&type=c,3,6,14,19,20,21,24,48,49,120,121&season=2014&month=0&season1=2003&ind=1&team=0&rost=0&age=0&filter=&players=0&page...
/R/rp_aging_factors.R
no_license
masonhinckley/Projections2017
R
false
false
4,554
r
### Relief Pitcher Aging Factors rp_aging_factors <- function(){ library(dplyr) library(XML) raw.data <- readHTMLTable("http://www.fangraphs.com/leaders.aspx?pos=all&stats=rel&lg=all&qual=y&type=c,3,6,14,19,20,21,24,48,49,120,121&season=2014&month=0&season1=2003&ind=1&team=0&rost=0&age=0&filter=&players=0&page...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Opc4photo.R \name{print.mOpc4photo} \alias{print.mOpc4photo} \title{Printing method} \usage{ \method{print}{mOpc4photo}(x, ...) } \description{ Printing method }
/man/print.mOpc4photo.Rd
permissive
kimberlyh66/biocro
R
false
true
240
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Opc4photo.R \name{print.mOpc4photo} \alias{print.mOpc4photo} \title{Printing method} \usage{ \method{print}{mOpc4photo}(x, ...) } \description{ Printing method }
## There are 2 functions makeCachematrix(get/set matrix & its invrese) and ## cacheSolve for returning the inverse from cache ## This function gets and set a matrix, as well as its inverse makeCacheMatrix <- function(x = matrix()) { invMatrix <- NULL # get the Matrix get <- function() { x...
/cachematrix.R
no_license
SunderRaman/ProgrammingAssignment2
R
false
false
1,197
r
## There are 2 functions makeCachematrix(get/set matrix & its invrese) and ## cacheSolve for returning the inverse from cache ## This function gets and set a matrix, as well as its inverse makeCacheMatrix <- function(x = matrix()) { invMatrix <- NULL # get the Matrix get <- function() { x...
install.packages("rpart") #load data file dataDirectory <-file.path(Sys.getenv("HOME"),"programming","W261","Tableau") dataFile <- file.path(dataDirectory,"rail_demo_pop_casaulties_2011.csv") railway_suicide<-read.csv(dataFile) #converting data types to factor railway_suicide$SUICIDE_ATTEMPTED <- factor(railway_suic...
/analysis/BayesHack.R
no_license
bayeshack2016/data_mcdataface
R
false
false
7,358
r
install.packages("rpart") #load data file dataDirectory <-file.path(Sys.getenv("HOME"),"programming","W261","Tableau") dataFile <- file.path(dataDirectory,"rail_demo_pop_casaulties_2011.csv") railway_suicide<-read.csv(dataFile) #converting data types to factor railway_suicide$SUICIDE_ATTEMPTED <- factor(railway_suic...
## [[file:~/git/allo/code/allo.org::*libraries%20and%20functions][libraries and functions:1]] library(dplyr) library(brms) source("allo_functions.R") ## libraries and functions:1 ends here ## [[file:~/git/allo/code/allo.org::*set%20values][set values:1]] genus <- "many" species <- "many" cities <- "many" climate <- "n...
/code/genus_many_species_many_cities_many_climate_none_hetero_no_family_Gamma.R
no_license
TedwardErker/allo
R
false
false
1,213
r
## [[file:~/git/allo/code/allo.org::*libraries%20and%20functions][libraries and functions:1]] library(dplyr) library(brms) source("allo_functions.R") ## libraries and functions:1 ends here ## [[file:~/git/allo/code/allo.org::*set%20values][set values:1]] genus <- "many" species <- "many" cities <- "many" climate <- "n...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AuxDelaunay.R \name{rel.edge.basic.tri} \alias{rel.edge.basic.tri} \title{The index of the edge region in a standard basic triangle form that contains a point} \usage{ rel.edge.basic.tri(p, c1, c2, M) } \arguments{ \item{p}{A 2D point for whi...
/man/rel.edge.basic.tri.Rd
no_license
elvanceyhan/pcds
R
false
true
3,561
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AuxDelaunay.R \name{rel.edge.basic.tri} \alias{rel.edge.basic.tri} \title{The index of the edge region in a standard basic triangle form that contains a point} \usage{ rel.edge.basic.tri(p, c1, c2, M) } \arguments{ \item{p}{A 2D point for whi...
### ========================================================================= ### Connecting to Hail ### ------------------------------------------------------------------------- ### ### FIXME: are we sure that these settings are still needed? hail_config <- function() { list(spark.serializer="org.apache.spark.ser...
/R/HailConnection.R
no_license
lawremi/hailr
R
false
false
618
r
### ========================================================================= ### Connecting to Hail ### ------------------------------------------------------------------------- ### ### FIXME: are we sure that these settings are still needed? hail_config <- function() { list(spark.serializer="org.apache.spark.ser...
append_parameters <- function(filename, start_date, end_date, person_type = "D%20-%20DEFENDANT"){ # Read in the CAF data file df <- read.csv(filename, stringsAsFactors = FALSE) # Create a copy of Defendant.Name to modify df$Defendant.Name2 <- df$Defendant.Name # Remove suffixes and ot...
/PersonNameOrBusinessNameSearch.R
no_license
kevgar/CAF-data-scraping
R
false
false
11,970
r
append_parameters <- function(filename, start_date, end_date, person_type = "D%20-%20DEFENDANT"){ # Read in the CAF data file df <- read.csv(filename, stringsAsFactors = FALSE) # Create a copy of Defendant.Name to modify df$Defendant.Name2 <- df$Defendant.Name # Remove suffixes and ot...
library(XML) library(plyr) ##Pulling coaching tables from cfbdatawarehouse.com #getting coaching urls theurl <- "http://www.cfbdatawarehouse.com/data/div_ia_team_index.php" doc = htmlParse(theurl) tableNodes <- getNodeSet(doc, "//table//tr//td[position()=1]//a") tableNodes1 <- tableNodes[17:(length(tableNodes)-1)] a...
/R/football1.R
no_license
jeff10703/cfbFootball
R
false
false
3,198
r
library(XML) library(plyr) ##Pulling coaching tables from cfbdatawarehouse.com #getting coaching urls theurl <- "http://www.cfbdatawarehouse.com/data/div_ia_team_index.php" doc = htmlParse(theurl) tableNodes <- getNodeSet(doc, "//table//tr//td[position()=1]//a") tableNodes1 <- tableNodes[17:(length(tableNodes)-1)] a...