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
testlist <- list(type = 256L, z = 2.28752394024497e-321) result <- do.call(esreg::G1_fun,testlist) str(result)
/esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609891553-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
110
r
testlist <- list(type = 256L, z = 2.28752394024497e-321) result <- do.call(esreg::G1_fun,testlist) str(result)
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", "./zipped_data") unzip("./zipped_data") if(!file.exists("household_power_consumption")){ power_data <- read.table("household_power_consumption.txt", skip = 66637, nrows = 2879, sep = ";", na.strings = "?", stri...
/plot2.R
no_license
sonisvm/ExData_Plotting1
R
false
false
900
r
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", "./zipped_data") unzip("./zipped_data") if(!file.exists("household_power_consumption")){ power_data <- read.table("household_power_consumption.txt", skip = 66637, nrows = 2879, sep = ";", na.strings = "?", stri...
library("dplyr") library("reshape2") ##Read features_lables and activity_lables feature_labels<-read.table("./features.txt", header = FALSE, sep = "") activity_labels<-read.table("./activity_labels.txt", header = FALSE, sep = "") colnames(activity_labels)<-c("activity","activity_label") ##Assign column names to activ...
/run_analysis.R
no_license
gdsbhalla1980/data_w4_project
R
false
false
2,431
r
library("dplyr") library("reshape2") ##Read features_lables and activity_lables feature_labels<-read.table("./features.txt", header = FALSE, sep = "") activity_labels<-read.table("./activity_labels.txt", header = FALSE, sep = "") colnames(activity_labels)<-c("activity","activity_label") ##Assign column names to activ...
### This script analyses winter 2019 cover crop biomass. ### Reminder: Set working directory to source file location. library(tidyverse) library(agricolae) library(raster) library(RColorBrewer) matrix_plot <- function(data_for_matrix, title){ plotid_matrix <- matrix(data = c(1:144), nrow=24, ncol=6, byrow=TRUE) ...
/harvestanalysis.R
no_license
TREC-Agroecology/agroecosystems
R
false
false
16,441
r
### This script analyses winter 2019 cover crop biomass. ### Reminder: Set working directory to source file location. library(tidyverse) library(agricolae) library(raster) library(RColorBrewer) matrix_plot <- function(data_for_matrix, title){ plotid_matrix <- matrix(data = c(1:144), nrow=24, ncol=6, byrow=TRUE) ...
#!/bin/Rscript ##minus CARBEFORE<-tst$before[tst$Classs=="CARDINAL"] CARBEFORE<-gsub("^-","P",CARBEFORE) CARBEFORE<-gsub(":|,|-| ","",CARBEFORE) CARBEFORE<-gsub("\\.","",CARBEFORE) N<-length(CARBEFORE) ##convert romans to indoarabic CARBEFOREROMAN<-CARBEFORE[CARBEFORE %in% ROMANNUMERALS] NN<-length(CARBEFOREROMAN) i...
/normalize/normalizeCARDINAL.R
no_license
georgercarder/Kaggle-Text-Normalization-Challenge--English-version
R
false
false
1,032
r
#!/bin/Rscript ##minus CARBEFORE<-tst$before[tst$Classs=="CARDINAL"] CARBEFORE<-gsub("^-","P",CARBEFORE) CARBEFORE<-gsub(":|,|-| ","",CARBEFORE) CARBEFORE<-gsub("\\.","",CARBEFORE) N<-length(CARBEFORE) ##convert romans to indoarabic CARBEFOREROMAN<-CARBEFORE[CARBEFORE %in% ROMANNUMERALS] NN<-length(CARBEFOREROMAN) i...
#************************************ # # (C) Copyright IBM Corp. 2015 # # Author: Bradley J Eck # #************************************ # File: test_rptFuncs.r # context("test helper functions used with rpt ") test_that("testing binBreaker",{ vals1 <- c(-1,0,1,2,3,4,5) v1bb <- binBreaker(vals1, 4) ex...
/tests/testthat/test_rptFuncs.r
no_license
BlomTbl/epanetReader
R
false
false
6,522
r
#************************************ # # (C) Copyright IBM Corp. 2015 # # Author: Bradley J Eck # #************************************ # File: test_rptFuncs.r # context("test helper functions used with rpt ") test_that("testing binBreaker",{ vals1 <- c(-1,0,1,2,3,4,5) v1bb <- binBreaker(vals1, 4) ex...
sys = syscreate(n, seq(2,3,length.out = n), sample(c(rep(1,npref),rep(0,n-npref)))) sys %>% addcol(sample(seq(0.5,2,length.out = n)), "soc") nw = graph.formula() + vertices(1:n) termlist = lapply(1:n, term) supervisor = spvs() memo = list() memo[[1]] = list(npref=npref, sys=copy(sys), s...
/bigcycle.R
no_license
yojire/CSCS-530-Project
R
false
false
428
r
sys = syscreate(n, seq(2,3,length.out = n), sample(c(rep(1,npref),rep(0,n-npref)))) sys %>% addcol(sample(seq(0.5,2,length.out = n)), "soc") nw = graph.formula() + vertices(1:n) termlist = lapply(1:n, term) supervisor = spvs() memo = list() memo[[1]] = list(npref=npref, sys=copy(sys), s...
context('Checking that isTargetYN is working') test_that("For a vector of all 0's and 1's, function returns expected output, TRUE", { dat <- data.frame(a = c(0,1,1,0,0,0,1,1,1,0,1,0,1,0,1,0,1,1,1,0)) actualOut <- isTargetYN(dat[, 1]) expected <- FALSE expect_equal(actualOut, expect...
/tests/testthat/test-is-target-yn.R
permissive
Quantitative72/healthcareai-r
R
false
false
2,667
r
context('Checking that isTargetYN is working') test_that("For a vector of all 0's and 1's, function returns expected output, TRUE", { dat <- data.frame(a = c(0,1,1,0,0,0,1,1,1,0,1,0,1,0,1,0,1,1,1,0)) actualOut <- isTargetYN(dat[, 1]) expected <- FALSE expect_equal(actualOut, expect...
library(rvest) library(data.table) library(jsonlite) library(ggplot2) library(knitr) url <- 'https://www.imdb.com/chart/top' file_html <- read_html(url) write_html(file_html, 'html_file.html') boxes <- file_html %>% html_nodes('.titleColumn a') movie_names <- html_text(boxes) ratings <- as.numeric( file_html %...
/code_IMDB.R
no_license
abdu95/web_scraping_R_final
R
false
false
2,046
r
library(rvest) library(data.table) library(jsonlite) library(ggplot2) library(knitr) url <- 'https://www.imdb.com/chart/top' file_html <- read_html(url) write_html(file_html, 'html_file.html') boxes <- file_html %>% html_nodes('.titleColumn a') movie_names <- html_text(boxes) ratings <- as.numeric( file_html %...
if (("Rsubread" %in% rownames(installed.packages()) == FALSE) || (!require("Rsubread", quietly = TRUE))) { if (!require("BiocManager", quietly = TRUE)) { install.packages("BiocManager") } BiocManager::install("Rsubread",update=TRUE, ask=FALSE, force=TRUE) }
/rnalysis/data_files/r_templates/rsubread_install.R
permissive
GuyTeichman/RNAlysis
R
false
false
282
r
if (("Rsubread" %in% rownames(installed.packages()) == FALSE) || (!require("Rsubread", quietly = TRUE))) { if (!require("BiocManager", quietly = TRUE)) { install.packages("BiocManager") } BiocManager::install("Rsubread",update=TRUE, ask=FALSE, force=TRUE) }
setwd("~/Documents/School/2015spring/DataVis/DV_FinalProject/01\ Data") # Replace "." (i.e., period) with "_" in the column names. names(df) <- gsub("\\.+", "_", names(df)) # edible-or-poisonous # edible=e,poisonous=p df$edible_or_poisonous <- gsub("^e$", "edible", df$edible_or_poisonous) df$edible_or_poisonous <- gs...
/02 Data Wrangling/reformatting.R
no_license
widgewadge/DV_FinalProject
R
false
false
9,822
r
setwd("~/Documents/School/2015spring/DataVis/DV_FinalProject/01\ Data") # Replace "." (i.e., period) with "_" in the column names. names(df) <- gsub("\\.+", "_", names(df)) # edible-or-poisonous # edible=e,poisonous=p df$edible_or_poisonous <- gsub("^e$", "edible", df$edible_or_poisonous) df$edible_or_poisonous <- gs...
\name{geoSD} \alias{geoSD} \alias{Geometric Standard Deviation} \alias{geometric standard deviation} \alias{geometric SD} \alias{Geometric SD} \title{ Geometric Standard Deviation. } \description{ Compute the sample geometric standard deviation. } \usage{ geoSD(x, na.rm = FALSE, sqrt.unbiased = TRUE)...
/man/geoSD.Rd
no_license
alexkowa/EnvStats
R
false
false
4,449
rd
\name{geoSD} \alias{geoSD} \alias{Geometric Standard Deviation} \alias{geometric standard deviation} \alias{geometric SD} \alias{Geometric SD} \title{ Geometric Standard Deviation. } \description{ Compute the sample geometric standard deviation. } \usage{ geoSD(x, na.rm = FALSE, sqrt.unbiased = TRUE)...
data.1 <- read.csv("C:/users/nikos/Desktop/ap.spark.data/mixed.data/data1.txt", sep = "\t") data.2 <- read.csv("C:/users/nikos/Desktop/ap.spark.data/mixed.data/data2.txt", sep = "\t") data.3 <- read.csv("C:/users/nikos/Desktop/ap.spark.data/mixed.data/data3.txt", sep = "\t") names(data.1) <- names(data.2) names(dat...
/scripts/graphs.without.weights.R
no_license
nickbounas/Streaming-Affinity-Propagation
R
false
false
999
r
data.1 <- read.csv("C:/users/nikos/Desktop/ap.spark.data/mixed.data/data1.txt", sep = "\t") data.2 <- read.csv("C:/users/nikos/Desktop/ap.spark.data/mixed.data/data2.txt", sep = "\t") data.3 <- read.csv("C:/users/nikos/Desktop/ap.spark.data/mixed.data/data3.txt", sep = "\t") names(data.1) <- names(data.2) names(dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/EDR.R \name{EDR} \alias{EDR} \title{Effective Detection Radius (EDR) for estimated detection functions with point transects} \usage{ EDR(obj, newdata) } \arguments{ \item{obj}{An estimated detection function object. An estimated detection ...
/man/EDR.Rd
no_license
wmcdonald1/Rdistance
R
false
true
2,553
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/EDR.R \name{EDR} \alias{EDR} \title{Effective Detection Radius (EDR) for estimated detection functions with point transects} \usage{ EDR(obj, newdata) } \arguments{ \item{obj}{An estimated detection function object. An estimated detection ...
#' Extract cached objects #' #' Extract specific R objects from the knitr cache of a previously compiled Rmarkdown file. #' #' @param prefix String containing the prefix of the Rmarkdown file. #' @param chunk String containing the name of the requested chunk. #' @param objects Character vector containing variable name...
/package/R/extractCached.R
no_license
sa-lee/OSCABase
R
false
false
5,749
r
#' Extract cached objects #' #' Extract specific R objects from the knitr cache of a previously compiled Rmarkdown file. #' #' @param prefix String containing the prefix of the Rmarkdown file. #' @param chunk String containing the name of the requested chunk. #' @param objects Character vector containing variable name...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotKfltResult.R \name{plotKfltResult} \alias{plotKfltResult} \title{Plot kflt results.} \usage{ plotKfltResult(file) } \arguments{ \item{file}{A character string of Kalman filter result file (<fileName>.state).} } \description{ Plot the log2...
/man/plotKfltResult.Rd
no_license
sanadamakomi/kfltCNV
R
false
true
510
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotKfltResult.R \name{plotKfltResult} \alias{plotKfltResult} \title{Plot kflt results.} \usage{ plotKfltResult(file) } \arguments{ \item{file}{A character string of Kalman filter result file (<fileName>.state).} } \description{ Plot the log2...
packrat::init() ####### libraries required ############ library(jsonlite) library(dplyr) library(ggplot2) library(stringr) library(randomForest) library(data.table) ##### downloading data from the Etsy API ##### #listings <- fromJSON('https://openapi.etsy.com/v2/listings/active?api_key=gxx1r5uo1zpe5c55jf003xn5&ca...
/etsy_script.R
no_license
amrutahv/PaintPricer
R
false
false
24,031
r
packrat::init() ####### libraries required ############ library(jsonlite) library(dplyr) library(ggplot2) library(stringr) library(randomForest) library(data.table) ##### downloading data from the Etsy API ##### #listings <- fromJSON('https://openapi.etsy.com/v2/listings/active?api_key=gxx1r5uo1zpe5c55jf003xn5&ca...
= module Cairo::LineJoin == Constants --- BEVEL --- MITER --- ROUND == See Also == ChangeLog
/en/cairo-line-join.rd
no_license
rcairo/doc
R
false
false
99
rd
= module Cairo::LineJoin == Constants --- BEVEL --- MITER --- ROUND == See Also == ChangeLog
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/x_fe_master.R \name{x_fe_master} \alias{x_fe_master} \title{Compile Regression Coefficients for Output} \usage{ x_fe_master( regs, var_labels = NULL, var_indicates = NULL, var_omits = NULL, star_levels = star_level_default, beta_d...
/man/x_fe_master.Rd
no_license
jamesfeigenbaum/textablr
R
false
true
682
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/x_fe_master.R \name{x_fe_master} \alias{x_fe_master} \title{Compile Regression Coefficients for Output} \usage{ x_fe_master( regs, var_labels = NULL, var_indicates = NULL, var_omits = NULL, star_levels = star_level_default, beta_d...
################################################################################### #' DRDID: A package for computing doubly robust difference-in-differences estimators #' #' The \code{DRDID} package implements different estimators for the Average Treatment Effect on #' the Treated in Difference-in-Differences (DID) ...
/R/drdid_package.R
no_license
annobadan/DRDID
R
false
false
975
r
################################################################################### #' DRDID: A package for computing doubly robust difference-in-differences estimators #' #' The \code{DRDID} package implements different estimators for the Average Treatment Effect on #' the Treated in Difference-in-Differences (DID) ...
#' Themes #' #' Add a custom theme or apply a pre-built one. #' #' @inheritParams e_bar #' @param theme Theme, A json string or a see below. #' @param name Name of theme. #' #' @section Functions: #' \itemize{ #' \item{\code{e_theme} - Use a default theme by name.} #' \item{\code{e_theme_custom} - Use a custom theme....
/R/themes.R
permissive
shrektan/echarts4r
R
false
false
3,581
r
#' Themes #' #' Add a custom theme or apply a pre-built one. #' #' @inheritParams e_bar #' @param theme Theme, A json string or a see below. #' @param name Name of theme. #' #' @section Functions: #' \itemize{ #' \item{\code{e_theme} - Use a default theme by name.} #' \item{\code{e_theme_custom} - Use a custom theme....
# Third script - Run Ch2 seasonal plots View(a10) # This plot creates a line plot by year, with months on the X-axis. ggseasonplot(a10, year.labels=TRUE, year.labels.left=TRUE) + ylab("$ million") + ggtitle("Seasonal plot: antidiabetic drug sales") # Showing seasonality using polar coordinates: ggs...
/Third script - Run Ch2 seasonal plots.R
no_license
BarryDeCicco/RStudio_Projects_Time-Series
R
false
false
666
r
# Third script - Run Ch2 seasonal plots View(a10) # This plot creates a line plot by year, with months on the X-axis. ggseasonplot(a10, year.labels=TRUE, year.labels.left=TRUE) + ylab("$ million") + ggtitle("Seasonal plot: antidiabetic drug sales") # Showing seasonality using polar coordinates: ggs...
### descStat.R ###------------------------------------------------------------------------ ### $Id$ ###------------------------------------------------------------------------ ## --- Unit tests --- test(descStat) <- function() { ## Usage for one variable v <- 1:10 v[c(1, 2, 3)] <- NA z <- descStat(x=v) ...
/decStats.R
permissive
janaobsteter/Genotype_CODES
R
false
false
2,420
r
### descStat.R ###------------------------------------------------------------------------ ### $Id$ ###------------------------------------------------------------------------ ## --- Unit tests --- test(descStat) <- function() { ## Usage for one variable v <- 1:10 v[c(1, 2, 3)] <- NA z <- descStat(x=v) ...
install.packages("sessioninfo")
/packages.R
no_license
colinpmillar/action-test
R
false
false
31
r
install.packages("sessioninfo")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/se_ybar.R \name{se_ybar} \alias{se_ybar} \title{Standard error of sample mean for mixed models} \usage{ se_ybar(fit) } \arguments{ \item{fit}{Fitted mixed effects model (\code{\link[lme4]{merMod}}-class).} } \value{ The standard e...
/man/se_ybar.Rd
no_license
cran/sjstats
R
false
true
956
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/se_ybar.R \name{se_ybar} \alias{se_ybar} \title{Standard error of sample mean for mixed models} \usage{ se_ybar(fit) } \arguments{ \item{fit}{Fitted mixed effects model (\code{\link[lme4]{merMod}}-class).} } \value{ The standard e...
#faz todo o pre-processamento, tratamento de dados, #gera todos as informações necessárias para as visualizações #e exporta um arquivo .RData para ser importado no dashboard setwd("/home/micael/R_envs/text-mining/") source("relatorio/base/get_funs.R") options(java.parameters="-Xmx6g") library(dfrtopics) library(tidyt...
/txtmining/scripts/dossies/relatorio_dinamico.R
no_license
micaelfilipee/sbrt
R
false
false
3,196
r
#faz todo o pre-processamento, tratamento de dados, #gera todos as informações necessárias para as visualizações #e exporta um arquivo .RData para ser importado no dashboard setwd("/home/micael/R_envs/text-mining/") source("relatorio/base/get_funs.R") options(java.parameters="-Xmx6g") library(dfrtopics) library(tidyt...
library(tidyverse) library(haven) install.packages("survey") SALUD <- read_sav("C:/Users/ADMIN/Desktop/paperUAC/CSALUD01.SAV", encoding = 'UTF-8') <- read_sav("C:/Users/ADMIN/Desktop/paperUAC/CSALUD01.SAV", encoding = 'UTF-8') SALUD <- read_sav("C:/Users/ADMIN/Desktop/paperUAC/CSALUD01.SAV", encoding = 'UTF-8') MUJER_...
/ENDES.R
no_license
LuisEduardoC/Econom-tria-Espacial
R
false
false
5,914
r
library(tidyverse) library(haven) install.packages("survey") SALUD <- read_sav("C:/Users/ADMIN/Desktop/paperUAC/CSALUD01.SAV", encoding = 'UTF-8') <- read_sav("C:/Users/ADMIN/Desktop/paperUAC/CSALUD01.SAV", encoding = 'UTF-8') SALUD <- read_sav("C:/Users/ADMIN/Desktop/paperUAC/CSALUD01.SAV", encoding = 'UTF-8') MUJER_...
## Create User Interface ui <- fluidPage( tabsetPanel( #################################### tabPanel("Instructions", fluidRow( column(1), column(10,h3("Instructions for: Newport Half Marathon 2015 Results")), column(1) ...
/ui.r
no_license
dreherg/ddpProject
R
false
false
5,138
r
## Create User Interface ui <- fluidPage( tabsetPanel( #################################### tabPanel("Instructions", fluidRow( column(1), column(10,h3("Instructions for: Newport Half Marathon 2015 Results")), column(1) ...
## File Name: summary.NMIwaldtest.R ## File Version: 0.04 summary.NMIwaldtest <- function(object, digits=4,...) { require_namespace(pkg="CDM") cat("Wald Test\n") obji <- object$stat CDM::cdm_print_summary_data_frame(obji, from=1, digits=digits) cat("\nLinear Hypotheses\n") summary(object$line...
/R/summary.NMIwaldtest.R
no_license
alexanderrobitzsch/miceadds
R
false
false
345
r
## File Name: summary.NMIwaldtest.R ## File Version: 0.04 summary.NMIwaldtest <- function(object, digits=4,...) { require_namespace(pkg="CDM") cat("Wald Test\n") obji <- object$stat CDM::cdm_print_summary_data_frame(obji, from=1, digits=digits) cat("\nLinear Hypotheses\n") summary(object$line...
# ------------------------------------------------------------------------ # # Title : US # By : Victor # Date : 2018-05-11 # # ------------------------------------------------------------------------ # Packages ---------------------------------------------------------------- library( r2d3maps ) library( rna...
/dev/us.R
no_license
dreamRs/r2d3maps
R
false
false
2,686
r
# ------------------------------------------------------------------------ # # Title : US # By : Victor # Date : 2018-05-11 # # ------------------------------------------------------------------------ # Packages ---------------------------------------------------------------- library( r2d3maps ) library( rna...
library(astsa) library(rugarch) library(tseries) ts.plot(sales) sales.dif1 <- diff(sales) sales.dif1.sq <- sales.dif1**2 ts.plot(sales.dif1) spec <- ugarchspec() fit <- ugarchfit(spec = spec, data = sales.dif1) show(fit) summary(fit) acf(sales.dif1) acf(sales.dif1.sq) pacf(sales.dif1) pacf(s...
/tarea5sdt2.R
no_license
bastiansepulveda/TareasSDT2
R
false
false
477
r
library(astsa) library(rugarch) library(tseries) ts.plot(sales) sales.dif1 <- diff(sales) sales.dif1.sq <- sales.dif1**2 ts.plot(sales.dif1) spec <- ugarchspec() fit <- ugarchfit(spec = spec, data = sales.dif1) show(fit) summary(fit) acf(sales.dif1) acf(sales.dif1.sq) pacf(sales.dif1) pacf(s...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/sex.R \name{predict.sex} \alias{predict.sex} \title{Predict sample sexes based on genotype and intensity data} \usage{ \method{predict}{sex}(object, method = c("ycalls"), ...) } \arguments{ \item{object}{a \code{genotypes} object} \i...
/man/predict.sex.Rd
no_license
amustaf5/argyle
R
false
false
1,377
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/sex.R \name{predict.sex} \alias{predict.sex} \title{Predict sample sexes based on genotype and intensity data} \usage{ \method{predict}{sex}(object, method = c("ycalls"), ...) } \arguments{ \item{object}{a \code{genotypes} object} \i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/threshperf_plots.R \name{threshperf} \alias{threshperf} \title{Calculates threshold-performance data} \usage{ threshperf(df, outcome, prediction, positive = "has_sepsis", thresholds = NULL) } \arguments{ \item{df}{The df as a data.frame.} \i...
/man/threshperf.Rd
permissive
seanrmeyer/runway
R
false
true
1,078
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/threshperf_plots.R \name{threshperf} \alias{threshperf} \title{Calculates threshold-performance data} \usage{ threshperf(df, outcome, prediction, positive = "has_sepsis", thresholds = NULL) } \arguments{ \item{df}{The df as a data.frame.} \i...
% Generated by roxygen2 (4.0.2): do not edit by hand \docType{class} \name{Track_time-class} \alias{Track_time-class} \title{A class for tracking running time of individual sections of an R script} \description{ A class for tracking running time of individual sections of an R script } \section{Slots}{ \describe{ \item...
/man/Track_time-class.Rd
no_license
mauricioromero86/teamlucc
R
false
false
492
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \docType{class} \name{Track_time-class} \alias{Track_time-class} \title{A class for tracking running time of individual sections of an R script} \description{ A class for tracking running time of individual sections of an R script } \section{Slots}{ \describe{ \item...
library(openair) library(plyr) library(dplyr) library(rmweather) library(ranger) library(magrittr) library(globals) library(future) library(foreach) library(iterators) library(parallel) library(doFuture) library(readxl) library(doParallel) plan(multicore) registerDoParallel(cores = detectCores()- 1) registerDoFuture() ...
/Data and code/2016/LA_Traffic/RW.R
no_license
songnku/COVID-19-AQ
R
false
false
3,067
r
library(openair) library(plyr) library(dplyr) library(rmweather) library(ranger) library(magrittr) library(globals) library(future) library(foreach) library(iterators) library(parallel) library(doFuture) library(readxl) library(doParallel) plan(multicore) registerDoParallel(cores = detectCores()- 1) registerDoFuture() ...
surface <- function(x1,x2){ x1off = 320 x1scale = 20 x1s = (x1 - x1off)/x1scale x2off = 0 x2scale = 1 x2s = (x2 - x2off)/x2scale z = 18*x1s + 10*x2s + 60.5 - 7*x1s^2 - 4*x2s^2 - 7.5*x1s*x2s } Xoff = 320 # offset for X Xscale = 20.0 N = 15 # resolution of surface x1 <- seq(...
/doe/factorial-two-level-surface-example.R
no_license
kgdunn/figures
R
false
false
1,610
r
surface <- function(x1,x2){ x1off = 320 x1scale = 20 x1s = (x1 - x1off)/x1scale x2off = 0 x2scale = 1 x2s = (x2 - x2off)/x2scale z = 18*x1s + 10*x2s + 60.5 - 7*x1s^2 - 4*x2s^2 - 7.5*x1s*x2s } Xoff = 320 # offset for X Xscale = 20.0 N = 15 # resolution of surface x1 <- seq(...
library(liureg) ### Name: summary.liu ### Title: Summarizing Linear Liu Regression Fits ### Aliases: summary.liu print.summary.liu ### Keywords: Testing of Liu coefficient ### ** Examples mod <- liu(y~., as.data.frame(Hald), d = c(-2, -1.47218, 0, 0.5, 1) ) summary(mod) ## coefficients for first biasing parameter s...
/data/genthat_extracted_code/liureg/examples/summary.liu.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
478
r
library(liureg) ### Name: summary.liu ### Title: Summarizing Linear Liu Regression Fits ### Aliases: summary.liu print.summary.liu ### Keywords: Testing of Liu coefficient ### ** Examples mod <- liu(y~., as.data.frame(Hald), d = c(-2, -1.47218, 0, 0.5, 1) ) summary(mod) ## coefficients for first biasing parameter s...
update_size <- function(node) { if (!is.null(node)) node$n <- 1L + size(node$left) + size(node$right) }
/R/update_size.R
permissive
tarakc02/rbst
R
false
false
107
r
update_size <- function(node) { if (!is.null(node)) node$n <- 1L + size(node$left) + size(node$right) }
#' Low level logistic regression implementation #' #' @details #' #' - Using `glm.fit()`, not `glm()` because we want to pass x and y #' - x must be a matrix #' - y must be a vector of 0/1 values #' - `glm.fit()` assumes the first level of the outcome is failure #' - hardhat handles the intercept #' #' @param predi...
/templates/01-fit-impl.R
no_license
MaryleneH/2019-useR-workshop-design-for-humans
R
false
false
814
r
#' Low level logistic regression implementation #' #' @details #' #' - Using `glm.fit()`, not `glm()` because we want to pass x and y #' - x must be a matrix #' - y must be a vector of 0/1 values #' - `glm.fit()` assumes the first level of the outcome is failure #' - hardhat handles the intercept #' #' @param predi...
### https://github.com/dachuwu/TWmap ### download `TWmap demo.R` ### 0. Installation install.packages("devtools") devtools::install_github("dachuwu/TWmap") require(TWmap) require(sf) require(dplyr) ### 1. Preparation View(dict_admin) # dictionary View(attri_death_pm25) # demo data set # mo...
/TWmap demo.R
no_license
dachuwu/TWmap
R
false
false
2,264
r
### https://github.com/dachuwu/TWmap ### download `TWmap demo.R` ### 0. Installation install.packages("devtools") devtools::install_github("dachuwu/TWmap") require(TWmap) require(sf) require(dplyr) ### 1. Preparation View(dict_admin) # dictionary View(attri_death_pm25) # demo data set # mo...
library(data.table) library(diffloop) library(seqinr) library(rtracklayer) library(MutationalPatterns) # Import GTF and split by strand gtf <- import("../data/gencode.v29.appris_principle_1.gtf") # Filter for canonical chromosomes canonical <- paste0("chr", c(as.character(1:22), "X")) gtf <- gtf[(seqnames(gtf) %in% ...
/raw/00_helperdata.R
no_license
caleblareau/CRISPR-BE-RNA-editing
R
false
false
1,952
r
library(data.table) library(diffloop) library(seqinr) library(rtracklayer) library(MutationalPatterns) # Import GTF and split by strand gtf <- import("../data/gencode.v29.appris_principle_1.gtf") # Filter for canonical chromosomes canonical <- paste0("chr", c(as.character(1:22), "X")) gtf <- gtf[(seqnames(gtf) %in% ...
trainData=read.csv("trainData.csv", stringsAsFactors=T) library(ModelMetrics) library(caret) #Naive Bayes: accuracy=0.802260776059903 #AUC & MCC library(e1071) folds <- createFolds(trainData$y, k = 10) cv_results <- lapply(folds, function(x) { train <- trainData[-x, ] test <- trainData[x, ] actual=test$y mode...
/project.R
no_license
sherryquek/lendingclub
R
false
false
2,182
r
trainData=read.csv("trainData.csv", stringsAsFactors=T) library(ModelMetrics) library(caret) #Naive Bayes: accuracy=0.802260776059903 #AUC & MCC library(e1071) folds <- createFolds(trainData$y, k = 10) cv_results <- lapply(folds, function(x) { train <- trainData[-x, ] test <- trainData[x, ] actual=test$y mode...
install.packages("readxl") library(readxl) test <- read_excel("./teacher/Data/excel_exam.xlsx") #./ 현재 디렉터를 의미함. View(test)
/0202_test불러오기_sm.R
no_license
seumin7751/scnu_R_class
R
false
false
144
r
install.packages("readxl") library(readxl) test <- read_excel("./teacher/Data/excel_exam.xlsx") #./ 현재 디렉터를 의미함. View(test)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{resize} \alias{resize} \title{New Dimensions with Resizing} \usage{ resize(x_, di) } \arguments{ \item{x_}{A numeric array} \item{di}{An integer vector, new dimensions} } \value{ None } \description{ Write new dimension v...
/multbxxc/man/resize.Rd
no_license
akhikolla/InformationHouse
R
false
true
546
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{resize} \alias{resize} \title{New Dimensions with Resizing} \usage{ resize(x_, di) } \arguments{ \item{x_}{A numeric array} \item{di}{An integer vector, new dimensions} } \value{ None } \description{ Write new dimension v...
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' Distance for images #' #' Calculates distance matrix for a sample of images using the minimax metric. #' This fucntion can be seen as a wrapper of a sequential call of #' \code{images2curves...
/fuzzedpackages/curveDepth/R/RcppExports.R
no_license
akhikolla/testpackages
R
false
false
25,702
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' Distance for images #' #' Calculates distance matrix for a sample of images using the minimax metric. #' This fucntion can be seen as a wrapper of a sequential call of #' \code{images2curves...
####### function to find next word prediction ## Coursera Capstone Project # created by: pmccullo06 # # the goal of this code is to create 3 functions to predict the next word for each input type (twtitter,blogs,news) ############################## twitter first twitter_predict <- function(x) { require(tm) #load ...
/predict-functions-v1.R
no_license
pmccullo/Coursera-Capstone-ShinyApp
R
false
false
5,395
r
####### function to find next word prediction ## Coursera Capstone Project # created by: pmccullo06 # # the goal of this code is to create 3 functions to predict the next word for each input type (twtitter,blogs,news) ############################## twitter first twitter_predict <- function(x) { require(tm) #load ...
\name{lfbg} \alias{lfbg} \docType{data} \title{lfbg data} %\description{} \format{ The format is: chr "lfbg" } %\details{} %\source{} %\references{} \examples{ str(lfbg) } \keyword{datasets}
/man/lfbg.Rd
no_license
tmalsburg/RePsychLing
R
false
false
194
rd
\name{lfbg} \alias{lfbg} \docType{data} \title{lfbg data} %\description{} \format{ The format is: chr "lfbg" } %\details{} %\source{} %\references{} \examples{ str(lfbg) } \keyword{datasets}
\name{create.gif} \alias{create.gif} \title{Make a gif} \description{Takes a function and several sets of parameters and makes a gif of their function calls} \usage{ create.gif( exec.func, parameters, number.of.frames, delay = 40, filename) } \arguments{ \item{exec.func}{The function that will be used to mak...
/man/create.gif.Rd
no_license
asalcedo-bl/my_BPG
R
false
false
1,437
rd
\name{create.gif} \alias{create.gif} \title{Make a gif} \description{Takes a function and several sets of parameters and makes a gif of their function calls} \usage{ create.gif( exec.func, parameters, number.of.frames, delay = 40, filename) } \arguments{ \item{exec.func}{The function that will be used to mak...
file1 <- "household_power_consumption.txt" data1 <- read.table(file1, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data1[data1$Date %in% c("1/2/2007","2/2/2007") ,] globalActivePower <- as.numeric(subSetData$Global_active_power) hist(globalActivePower, col="red", main="Global Active Power", ...
/Plot1.R
no_license
braddugg/ExData_Plotting1
R
false
false
428
r
file1 <- "household_power_consumption.txt" data1 <- read.table(file1, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data1[data1$Date %in% c("1/2/2007","2/2/2007") ,] globalActivePower <- as.numeric(subSetData$Global_active_power) hist(globalActivePower, col="red", main="Global Active Power", ...
## using scoping rules of r we are first creating a function that can cache its ## inverse to save computation time of recalculating same thing everything. ## makeCachematrix : This function creates a specil matrix object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { inv = NULL set = fun...
/cachematrix.R
no_license
sonalicoursera/ProgrammingAssignment2
R
false
false
910
r
## using scoping rules of r we are first creating a function that can cache its ## inverse to save computation time of recalculating same thing everything. ## makeCachematrix : This function creates a specil matrix object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { inv = NULL set = fun...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/lgcpMethods.R \name{yvals.lgcpPredict} \alias{yvals.lgcpPredict} \title{yvals.lgcpPredict function} \usage{ \method{yvals}{lgcpPredict}(obj, ...) } \arguments{ \item{obj}{an object of class lgcpPredict} \item{...}{additional argument...
/man/yvals.lgcpPredict.Rd
no_license
bentaylor1/lgcp
R
false
false
494
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/lgcpMethods.R \name{yvals.lgcpPredict} \alias{yvals.lgcpPredict} \title{yvals.lgcpPredict function} \usage{ \method{yvals}{lgcpPredict}(obj, ...) } \arguments{ \item{obj}{an object of class lgcpPredict} \item{...}{additional argument...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/annotateCpG.R \name{annotateCpG} \alias{annotateCpG} \title{Annotate the CpG ID's with genetic information} \usage{ annotateCpG(EWAS) } \arguments{ \item{EWAS}{An EWAS results data frame with columns for CpG-ID, p-value, standard error and be...
/man/annotateCpG.Rd
no_license
Hobbeist/TKIepiR
R
false
true
819
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/annotateCpG.R \name{annotateCpG} \alias{annotateCpG} \title{Annotate the CpG ID's with genetic information} \usage{ annotateCpG(EWAS) } \arguments{ \item{EWAS}{An EWAS results data frame with columns for CpG-ID, p-value, standard error and be...
##### optimizing branin in 2D with mbo / EI ##### library(mlrMBO) library(ggplot2) library(smoof) set.seed(1) configureMlr(show.learner.output = FALSE) pause = interactive() set.seed(423) obj.fun = makeBraninFunction() ctrl = makeMBOControl(init.design.points = 10L, iters = 10L, propose.points = 1L) ctrl = setMBOCo...
/inst/examples/ex_2d_numeric.R
no_license
jakobbossek/mlrMBO
R
false
false
625
r
##### optimizing branin in 2D with mbo / EI ##### library(mlrMBO) library(ggplot2) library(smoof) set.seed(1) configureMlr(show.learner.output = FALSE) pause = interactive() set.seed(423) obj.fun = makeBraninFunction() ctrl = makeMBOControl(init.design.points = 10L, iters = 10L, propose.points = 1L) ctrl = setMBOCo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/barline.R \name{barline} \alias{barline} \title{Draws a bar-line plot} \usage{ barline( data, id, bars, line, order.by = id, decreasing = TRUE, labels.bars = NULL, label.line = NULL, title = NULL ) } \arguments{ \item{data}{...
/man/barline.Rd
no_license
cavfan96/BasketballAnalyzeR
R
false
true
1,366
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/barline.R \name{barline} \alias{barline} \title{Draws a bar-line plot} \usage{ barline( data, id, bars, line, order.by = id, decreasing = TRUE, labels.bars = NULL, label.line = NULL, title = NULL ) } \arguments{ \item{data}{...
## Analisi multivariata library(raster) library (RStoolbox) #settaggio working directory setwd("C:/lab/") # Funzione brick p224_2011 <- brick("p224r63_2011_masked.grd") plot(p224_2011) # mi indica tutte le informazioni sull'immagine p224_2011 # funzione plot plot(p224_2011$B1_sre, p224_2011$B2_sre, col="red", pch=...
/R_code_multivariate_analysis.r
no_license
Beatrice-aiello25/telerilevamento_2021
R
false
false
1,360
r
## Analisi multivariata library(raster) library (RStoolbox) #settaggio working directory setwd("C:/lab/") # Funzione brick p224_2011 <- brick("p224r63_2011_masked.grd") plot(p224_2011) # mi indica tutte le informazioni sull'immagine p224_2011 # funzione plot plot(p224_2011$B1_sre, p224_2011$B2_sre, col="red", pch=...
library(tidyverse) library(doMC) library(vroom) registerDoMC(4) base_url <- "http://www2.stat.duke.edu/~sms185/data/bike/" bike <- foreach(year = 2013:2017, .combine = 'bind_rows') %dopar% { this_url <- paste0(base_url, 'cbs_', year, '.csv') vroom(this_url) } test_url <- paste0(base_url, 'cbs_test.csv') bike_test...
/get_bike.R
no_license
ziyuan-shen/hw6
R
false
false
426
r
library(tidyverse) library(doMC) library(vroom) registerDoMC(4) base_url <- "http://www2.stat.duke.edu/~sms185/data/bike/" bike <- foreach(year = 2013:2017, .combine = 'bind_rows') %dopar% { this_url <- paste0(base_url, 'cbs_', year, '.csv') vroom(this_url) } test_url <- paste0(base_url, 'cbs_test.csv') bike_test...
# This script reads a CSV containing the quarterly download data from GOV.UK # It generates: # * an SVG graphing downloaded file types per quarter # Set working directory to be the same as the script source library(rstudioapi) current_path <- getActiveDocumentContext()$path setwd(dirname(current_path)) # Required li...
/File Formats Statistics/QuarterlyDownloads.R
no_license
uk-gov-mirror/alphagov.open-standards
R
false
false
3,276
r
# This script reads a CSV containing the quarterly download data from GOV.UK # It generates: # * an SVG graphing downloaded file types per quarter # Set working directory to be the same as the script source library(rstudioapi) current_path <- getActiveDocumentContext()$path setwd(dirname(current_path)) # Required li...
library(ggplot2) library(httr) library(magrittr) library(dplyr) library(stringr) library(tidytext) library(rvest) #擷取2020 google統計前一百手被哼唱歌曲 A <- GET("https://www.billboard.com/", path ="charts/year-end/top-hummed" ) html<-content(A) rank <-html%>% html_nodes(".chart-element__rank__number")%>% html_text() n...
/src/most_hummed/final .R
no_license
rlads2021/project-spacegray3128
R
false
false
3,913
r
library(ggplot2) library(httr) library(magrittr) library(dplyr) library(stringr) library(tidytext) library(rvest) #擷取2020 google統計前一百手被哼唱歌曲 A <- GET("https://www.billboard.com/", path ="charts/year-end/top-hummed" ) html<-content(A) rank <-html%>% html_nodes(".chart-element__rank__number")%>% html_text() n...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/p_information.R \name{p_information} \alias{p_information} \alias{p_info} \title{Package Information} \usage{ p_information(package = "base", ..., fields = NULL) p_info(package = "base", ..., fields = NULL) } \arguments{ \item{pa...
/man/p_information.Rd
no_license
cran/pacman
R
false
true
1,568
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/p_information.R \name{p_information} \alias{p_information} \alias{p_info} \title{Package Information} \usage{ p_information(package = "base", ..., fields = NULL) p_info(package = "base", ..., fields = NULL) } \arguments{ \item{pa...
# Exercise-1: practice with basic syntax # Create a variable `hometown` that stores the city in which you were born hometown <- 'Mukilteo' ho# Assign your name to the variable `my.name` my.name <- 'Evan Van Cotthem' # Assign your height to a variable `my.height` my.height <- 71 #inches # Create a variable `puppies`...
/exercise-1/exercise.R
permissive
evancotthem/m5-r-intro
R
false
false
851
r
# Exercise-1: practice with basic syntax # Create a variable `hometown` that stores the city in which you were born hometown <- 'Mukilteo' ho# Assign your name to the variable `my.name` my.name <- 'Evan Van Cotthem' # Assign your height to a variable `my.height` my.height <- 71 #inches # Create a variable `puppies`...
######################################## ###### Replication code for ######### ######################################## ### Reichel, David, Vink, Maarten and Grimheden, Jonas ### Regional Cooperation and EU conditionality: Council of Europe Treaty Ratification, 1949-2016 ### In: Journal of European Public Polic...
/R_script_analysis_regression_models.R
no_license
david-reichel/treaty-acceptance-paper
R
false
false
13,543
r
######################################## ###### Replication code for ######### ######################################## ### Reichel, David, Vink, Maarten and Grimheden, Jonas ### Regional Cooperation and EU conditionality: Council of Europe Treaty Ratification, 1949-2016 ### In: Journal of European Public Polic...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tagmanager_objects.R \name{TeardownTag} \alias{TeardownTag} \title{TeardownTag Object} \usage{ TeardownTag(stopTeardownOnFailure = NULL, tagName = NULL) } \arguments{ \item{stopTeardownOnFailure}{If true, fire the teardown tag if and only if ...
/googletagmanagerv1.auto/man/TeardownTag.Rd
permissive
GVersteeg/autoGoogleAPI
R
false
true
560
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tagmanager_objects.R \name{TeardownTag} \alias{TeardownTag} \title{TeardownTag Object} \usage{ TeardownTag(stopTeardownOnFailure = NULL, tagName = NULL) } \arguments{ \item{stopTeardownOnFailure}{If true, fire the teardown tag if and only if ...
# ----- Initialization of the project ----- # Installation and loading of required libraries require(bibliometrix, quietly = TRUE) # Importing data from WoS-export raw <- readFiles("0_data/ALL_i4+value.bib") # Conversion to dataframe bm <- convert2df(file = raw, dbsource = "isi", format = "bibtex") # ----- Blibliome...
/5_simpleBMA.R
permissive
carbajalcarlos/citation_analysis
R
false
false
10,344
r
# ----- Initialization of the project ----- # Installation and loading of required libraries require(bibliometrix, quietly = TRUE) # Importing data from WoS-export raw <- readFiles("0_data/ALL_i4+value.bib") # Conversion to dataframe bm <- convert2df(file = raw, dbsource = "isi", format = "bibtex") # ----- Blibliome...
EM <- function(y,X=NULL,ZETA=NULL,R=NULL,iters=30,draw=TRUE,silent=FALSE, constraint=TRUE, init=NULL, forced=NULL, tolpar = 1e-04, tolparinv = 1e-06){ convergence <- FALSE #### %%%%%%%%%%%%%%%%%%%%%%%% #### %%%%%%%%%%%%%%%%%%%%%%%% #### fix that some initially were not specified if(is.null(X)){ X <- matri...
/R/EM.R
no_license
qchengray/sommer
R
false
false
12,129
r
EM <- function(y,X=NULL,ZETA=NULL,R=NULL,iters=30,draw=TRUE,silent=FALSE, constraint=TRUE, init=NULL, forced=NULL, tolpar = 1e-04, tolparinv = 1e-06){ convergence <- FALSE #### %%%%%%%%%%%%%%%%%%%%%%%% #### %%%%%%%%%%%%%%%%%%%%%%%% #### fix that some initially were not specified if(is.null(X)){ X <- matri...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataSets.R \docType{data} \name{expenditures} \alias{expenditures} \title{synthetic household expenditures toy data set} \format{A data frame with 20 observations on the following 5 variables.} \usage{ data(expenditures) } \description{ This ...
/man/expenditures.Rd
no_license
bernhard-da/robCompositions
R
false
true
1,607
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataSets.R \docType{data} \name{expenditures} \alias{expenditures} \title{synthetic household expenditures toy data set} \format{A data frame with 20 observations on the following 5 variables.} \usage{ data(expenditures) } \description{ This ...
#!/usr/local/apps/R/gcc_4.9.1/3.4.0/bin/Rscript args = commandArgs(trailingOnly=TRUE) library(rmarkdown) render(input = args[1], output_file = args[5], output_format = 'html_document', params = list( gemini_return = args[2], patient_MVL_excel = args[3], patient_ID = args[4]), encodi...
/LEGACY_SYSTEM/src/write_report.R
permissive
davemcg/casey_to_gemini
R
false
false
334
r
#!/usr/local/apps/R/gcc_4.9.1/3.4.0/bin/Rscript args = commandArgs(trailingOnly=TRUE) library(rmarkdown) render(input = args[1], output_file = args[5], output_format = 'html_document', params = list( gemini_return = args[2], patient_MVL_excel = args[3], patient_ID = args[4]), encodi...
#----------------------------------------------# # Author: Laurent Berge # Date creation: Tue Apr 23 16:41:47 2019 # Purpose: All estimation functions #----------------------------------------------# #' Fixed-effects OLS estimation #' #' Estimates OLS with any number of fixed-effects. #' #' @inheritParams femlm #' #...
/R/ESTIMATION_FUNS.R
no_license
sleeubc/fixest
R
false
false
89,606
r
#----------------------------------------------# # Author: Laurent Berge # Date creation: Tue Apr 23 16:41:47 2019 # Purpose: All estimation functions #----------------------------------------------# #' Fixed-effects OLS estimation #' #' Estimates OLS with any number of fixed-effects. #' #' @inheritParams femlm #' #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iphc-data.R \name{iphc_data} \alias{iphc_data} \alias{get_iphc_sets} \alias{get_iphc_sets_info} \alias{get_iphc_skates_info} \alias{get_iphc_hooks} \alias{cache_pbs_data_iphc} \title{Get IPHC data} \usage{ get_iphc_sets(species, usability = N...
/man/iphc_data.Rd
no_license
pbs-assess/gfiphc
R
false
true
3,452
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iphc-data.R \name{iphc_data} \alias{iphc_data} \alias{get_iphc_sets} \alias{get_iphc_sets_info} \alias{get_iphc_skates_info} \alias{get_iphc_hooks} \alias{cache_pbs_data_iphc} \title{Get IPHC data} \usage{ get_iphc_sets(species, usability = N...
Источник is_mobile -- сомнительная полезность channel -- сомнительная полезность Откуда user_location_country -- user_location_region -- 1К вариантов user_location_city -- 40К вариантов Кто srch_adults_cnt -- может иметь с...
/features.R
no_license
SantyagoSeaman/Kaggle-Expedia-Hotel-Recommendations
R
false
false
1,844
r
Источник is_mobile -- сомнительная полезность channel -- сомнительная полезность Откуда user_location_country -- user_location_region -- 1К вариантов user_location_city -- 40К вариантов Кто srch_adults_cnt -- может иметь с...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mue_confidence_interval.R \name{mue_confidence_interval} \alias{mue_confidence_interval} \title{Generate the exact bootstrap interval for the MUE estimate.} \usage{ mue_confidence_interval(n1, p1, n2, p2, alpha) } \arguments{ \item{n1}{Sample...
/man/mue_confidence_interval.Rd
no_license
rickeycarter/mueRelativeRisk
R
false
true
806
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mue_confidence_interval.R \name{mue_confidence_interval} \alias{mue_confidence_interval} \title{Generate the exact bootstrap interval for the MUE estimate.} \usage{ mue_confidence_interval(n1, p1, n2, p2, alpha) } \arguments{ \item{n1}{Sample...
# refer to notes for motivation and plan for class # defining the class # this uses setClass() # Class is character string for name # represenation is deprecated: use slots # prototype declares prototype values. Note optional- R # gives adequate empty value if not declared setClass( Class = "trajectories", slots...
/s4-guide.R
no_license
philipgoddard/R-S4-tutorial
R
false
false
12,065
r
# refer to notes for motivation and plan for class # defining the class # this uses setClass() # Class is character string for name # represenation is deprecated: use slots # prototype declares prototype values. Note optional- R # gives adequate empty value if not declared setClass( Class = "trajectories", slots...
#' WatsonR - Load API Keys from KEYS.R file #' #' This Function will Load your API keys from KEYS.R file if it is in working directory #' You can create / edit this file yourself #' #' @param NONE #' @return NOTHING #' @export watson.keys.load <- function() { library(RCurl) # install.packages("RCurl") # if the packa...
/R/watson.keys.R
no_license
rustyoldrake/WatsonR
R
false
false
3,959
r
#' WatsonR - Load API Keys from KEYS.R file #' #' This Function will Load your API keys from KEYS.R file if it is in working directory #' You can create / edit this file yourself #' #' @param NONE #' @return NOTHING #' @export watson.keys.load <- function() { library(RCurl) # install.packages("RCurl") # if the packa...
require(mxnet) # TODO(KK, tong) think about setter getter interface(which breaks immutability, or current set and move interface. # We need to make a choice between # exec_old = exec # exec$arg.arrays = some.array, this changes exec_old$arg.arrays as well, user won't aware # V.S. # exec_old = exec # exec = mx.exec.set....
/R-package/demo/basic_executor.R
permissive
txd866/mxnet
R
false
false
963
r
require(mxnet) # TODO(KK, tong) think about setter getter interface(which breaks immutability, or current set and move interface. # We need to make a choice between # exec_old = exec # exec$arg.arrays = some.array, this changes exec_old$arg.arrays as well, user won't aware # V.S. # exec_old = exec # exec = mx.exec.set....
## This calculates and stores the inverse of a square matrix ## This function creates a matrix and sets the values & the inverse. makeCacheMatrix=function(x=matrix()){ i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setinverse <- function(inverse) i <<- inverse getinverse <...
/cachematrix.R
no_license
Lagnajita7654/datasciencecoursera
R
false
false
722
r
## This calculates and stores the inverse of a square matrix ## This function creates a matrix and sets the values & the inverse. makeCacheMatrix=function(x=matrix()){ i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setinverse <- function(inverse) i <<- inverse getinverse <...
## Code for Multivariate Functional Quantile Envelopes with Application to Radiosonde Wind Data ## ##Reading radiosonde wind data library(quantreg) setwd("/Users/agarwag/Desktop/KAUST/project 2/radiosonde wind") load(file="Denver.station.RData",verbose=T) str(Denver.station) Denver.station=as.data.frame(Denver.statio...
/manuscript code.R
no_license
agarwag/Bivariate-Functional-Quantile-Envelopes
R
false
false
290,189
r
## Code for Multivariate Functional Quantile Envelopes with Application to Radiosonde Wind Data ## ##Reading radiosonde wind data library(quantreg) setwd("/Users/agarwag/Desktop/KAUST/project 2/radiosonde wind") load(file="Denver.station.RData",verbose=T) str(Denver.station) Denver.station=as.data.frame(Denver.statio...
expr = expr.res kegg.list = kegg.paths y.vec = y.vec file.prefix = paste0(outdir, "SexAgeInteraction") model = "inter.model" Z.mat = NULL C.mat = getCmatrix(kegg.list, present.genes = rownames(expr), min.size = 5, max.size = 600) expr = expr[C.mat$row.names,] print(paste(nrow(expr), "genes &", ncol(C.mat$C.mat....
/Pathway/sandbox/safe_troubleshooting.R
permissive
ytakemon/JAC_DO_Kidney
R
false
false
5,886
r
expr = expr.res kegg.list = kegg.paths y.vec = y.vec file.prefix = paste0(outdir, "SexAgeInteraction") model = "inter.model" Z.mat = NULL C.mat = getCmatrix(kegg.list, present.genes = rownames(expr), min.size = 5, max.size = 600) expr = expr[C.mat$row.names,] print(paste(nrow(expr), "genes &", ncol(C.mat$C.mat....
# Read in required functions and libraries # Load in climate data source('ENM_setup.R') # List of species nsp <- length(read.table('data/all_birds_fixed.txt')$V1) species <- as.character(read.table('data/all_birds_fixed.txt')$V1)[4:nsp] # Run ENM models for all species # Occurrence records and predicted maps are save...
/8_R_analyses/ENM_run.R
no_license
msozzoni/GenomicDiversityBirds
R
false
false
2,450
r
# Read in required functions and libraries # Load in climate data source('ENM_setup.R') # List of species nsp <- length(read.table('data/all_birds_fixed.txt')$V1) species <- as.character(read.table('data/all_birds_fixed.txt')$V1)[4:nsp] # Run ENM models for all species # Occurrence records and predicted maps are save...
#Lab 4 part B load(url("http://bit.ly/dasi_gss_ws_cl")) summary(gss) boxplot(gss$wordsum ~ gss$class) inference(y=gss$wordsum, x=gss$class, est="mean", type="ht", alternative="greater", method="theoretical" ) load(url("http://bit.ly/dasi_gss_data")) summary(gss$educ) hist(gss$educ)
/Lab-4B.R
no_license
geoninja/Statistical_Inference
R
false
false
286
r
#Lab 4 part B load(url("http://bit.ly/dasi_gss_ws_cl")) summary(gss) boxplot(gss$wordsum ~ gss$class) inference(y=gss$wordsum, x=gss$class, est="mean", type="ht", alternative="greater", method="theoretical" ) load(url("http://bit.ly/dasi_gss_data")) summary(gss$educ) hist(gss$educ)
plot3 <- function() { #Plot the graph of Sub_metering_1 plot(dataFrame$timestamp,dataFrame$Sub_metering_1, type="l", xlab="", ylab="Energy sub metering") #Plot the graph of Sub_metering_2 lines(dataFrame$timestamp,dataFrame$Sub_metering_2,col="red") #Plot the graph of Sub_metering_3 lines(dataFrame$ti...
/Plot3.R
no_license
jerrymjames/ExData_Plotting1
R
false
false
605
r
plot3 <- function() { #Plot the graph of Sub_metering_1 plot(dataFrame$timestamp,dataFrame$Sub_metering_1, type="l", xlab="", ylab="Energy sub metering") #Plot the graph of Sub_metering_2 lines(dataFrame$timestamp,dataFrame$Sub_metering_2,col="red") #Plot the graph of Sub_metering_3 lines(dataFrame$ti...
# Stepwise regression df.trainx <- df.train[,c(9:10, 25, 35,122)] null=glm(WriteoffsDummy ~ 1, data=df.train, family="binomial", na.action=na.exclude) full=glm(WriteoffsDummy ~ ., data=df.trainx, family="binomial", na.action=na.exclude) step(null, scope=list(lower=null, upper=full), direction="forward") librar...
/Intermediate Model Building/# Stepwise regression.r
no_license
jonathanlittel/2.Model-Selection
R
false
false
1,988
r
# Stepwise regression df.trainx <- df.train[,c(9:10, 25, 35,122)] null=glm(WriteoffsDummy ~ 1, data=df.train, family="binomial", na.action=na.exclude) full=glm(WriteoffsDummy ~ ., data=df.trainx, family="binomial", na.action=na.exclude) step(null, scope=list(lower=null, upper=full), direction="forward") librar...
#' @include shape.R NULL #' Arcs and wedges as polygons #' #' This set of stats and geoms makes it possible to draw arcs and wedges as #' known from pie and donut charts as well as more specialized plottypes such as #' sunburst plots. #' #' @details An arc bar is the thick version of an arc; that is, a circle segment ...
/R/arc_bar.R
permissive
thomasp85/ggforce
R
false
false
10,001
r
#' @include shape.R NULL #' Arcs and wedges as polygons #' #' This set of stats and geoms makes it possible to draw arcs and wedges as #' known from pie and donut charts as well as more specialized plottypes such as #' sunburst plots. #' #' @details An arc bar is the thick version of an arc; that is, a circle segment ...
# Google Trends Clean Data # Master Script ## Filepath to code CODE_PATH <- file.path(github_file_path, "Dashboards", "google_trends") ## Run scripts source(file.path(CODE_PATH, "01_prepare_data_for_dashboard.R")) #source(file.path(CODE_PATH, "02_stylized_example_gif.R")) source(file.path(CODE_PATH, "03_data_to_githu...
/Dashboards/google_trends/_dash_master.R
no_license
ramarty/covid-social-media-analysis
R
false
false
330
r
# Google Trends Clean Data # Master Script ## Filepath to code CODE_PATH <- file.path(github_file_path, "Dashboards", "google_trends") ## Run scripts source(file.path(CODE_PATH, "01_prepare_data_for_dashboard.R")) #source(file.path(CODE_PATH, "02_stylized_example_gif.R")) source(file.path(CODE_PATH, "03_data_to_githu...
Datain <- read.csv(file.choose(),sep = ",",header=FALSE) YY <- Datain[,dim(Datain)[2]] XX <- Datain[,1:(dim(Datain)[2]-1)] pdata <- princomp(X, cor=T) pc.data <- pdata$scores pc.data1 <- -1*pc.data[,1] pc.data2 <- -1*pc.data[,2] X <- cbind(pc.data1, pc.data2) cl <- kmeans(X,10) cl$cluster plot(pc.data1, pc.data2,col=c...
/LAB-3/Source/Rscript/Kmeans.R
no_license
rakeshreddybandi/BigData-Spring16
R
false
false
358
r
Datain <- read.csv(file.choose(),sep = ",",header=FALSE) YY <- Datain[,dim(Datain)[2]] XX <- Datain[,1:(dim(Datain)[2]-1)] pdata <- princomp(X, cor=T) pc.data <- pdata$scores pc.data1 <- -1*pc.data[,1] pc.data2 <- -1*pc.data[,2] X <- cbind(pc.data1, pc.data2) cl <- kmeans(X,10) cl$cluster plot(pc.data1, pc.data2,col=c...
library(twitteR) library(base64enc) api_key <- "" api_secret <- "" access_token <- "" access_token_secret <- "" setup_twitter_oauth(api_key,api_secret) ## direct authentication not working Rdatamining_tweets<-userTimeline('RDataMining' , n=3200) # no of tweets n_rdatamining_tweet <-length(Rdatamining_tweets)...
/R Code/Sentiment_Analysis.r
no_license
Sandy4321/Twitter-Sentiment-Analysis-R
R
false
false
5,172
r
library(twitteR) library(base64enc) api_key <- "" api_secret <- "" access_token <- "" access_token_secret <- "" setup_twitter_oauth(api_key,api_secret) ## direct authentication not working Rdatamining_tweets<-userTimeline('RDataMining' , n=3200) # no of tweets n_rdatamining_tweet <-length(Rdatamining_tweets)...
#' Phase type frailty model #' #' Class of objects for univariate phase type frailty models. #' #' @slot name Name of the phase type distribution. #' @slot bhaz A list comprising of the parameters. #' @slot coefs Regression parameters. #' #' @return Class object. #' @export #' setClass("frailty", contains = c("phaset...
/R/2.phfrailty.R
permissive
jorgeyslas/phfrailty
R
false
false
9,548
r
#' Phase type frailty model #' #' Class of objects for univariate phase type frailty models. #' #' @slot name Name of the phase type distribution. #' @slot bhaz A list comprising of the parameters. #' @slot coefs Regression parameters. #' #' @return Class object. #' @export #' setClass("frailty", contains = c("phaset...
# # Train all models # # Logistic regression source("scripts/train-model1.R", echo = TRUE) # Restricted logistic regression source("scripts/train-model2.R", echo = TRUE) # Regularized logistic regression (glmnet) source("scripts/train-model3.R", echo = TRUE) # Random forest source("scripts/train-model4.R", echo =...
/Models/scripts/train-all.R
no_license
rickmorgan2/part
R
false
false
521
r
# # Train all models # # Logistic regression source("scripts/train-model1.R", echo = TRUE) # Restricted logistic regression source("scripts/train-model2.R", echo = TRUE) # Regularized logistic regression (glmnet) source("scripts/train-model3.R", echo = TRUE) # Random forest source("scripts/train-model4.R", echo =...
library(data.table) data = fread('household_power_consumption.txt', header=TRUE, sep=';', na.strings='?') data$Date = as.Date(data$Date, format='%d/%m/%Y') data = data[Date %in% as.Date(c('2007-02-01', '2007-02-02'))] data[,DateTime:=strptime(paste(Date, Time), format='%Y-%m-%d %H:%M:%S')] png('plot4.png') par(mfrow...
/plot4.R
no_license
bernardpazio/ExData_Plotting1
R
false
false
997
r
library(data.table) data = fread('household_power_consumption.txt', header=TRUE, sep=';', na.strings='?') data$Date = as.Date(data$Date, format='%d/%m/%Y') data = data[Date %in% as.Date(c('2007-02-01', '2007-02-02'))] data[,DateTime:=strptime(paste(Date, Time), format='%Y-%m-%d %H:%M:%S')] png('plot4.png') par(mfrow...
### preliminary ## packages library(ggplot2) library(lubridate) ## remarks ## clean workspace rm(list=setdiff(ls(), "base_path")) ## import data # chesstempo tactical puzzles load(file.path(base_path,"data","output","manual_puzzles","clean_manual_puzzles.RData")) ## specific data cleaning for this analysis pe...
/analysis/scripts/puzzles_summary_analysis.R
no_license
IsaacVerm/chess
R
false
false
3,229
r
### preliminary ## packages library(ggplot2) library(lubridate) ## remarks ## clean workspace rm(list=setdiff(ls(), "base_path")) ## import data # chesstempo tactical puzzles load(file.path(base_path,"data","output","manual_puzzles","clean_manual_puzzles.RData")) ## specific data cleaning for this analysis pe...
###Install packages #install.packages("shiny") library(shiny) #install.packages("gsheet") library(gsheet) #install.packages("shinythemes") library(shinythemes) #install.packages("gridExtra") library(gridExtra) #install.packages("plyr") library(plyr) ui <- fluidPage( tabsetPanel( tabPanel(title = "D...
/Beermat v6.R
no_license
UCLichCodeClub/Meeting_ICH_20May2020
R
false
false
5,461
r
###Install packages #install.packages("shiny") library(shiny) #install.packages("gsheet") library(gsheet) #install.packages("shinythemes") library(shinythemes) #install.packages("gridExtra") library(gridExtra) #install.packages("plyr") library(plyr) ui <- fluidPage( tabsetPanel( tabPanel(title = "D...
#' LuminophoR: HTMLWidget implementation of Lumino layout manager #' #' @docType package #' #' @name LuminophoR-package #' #' @seealso \code{\link{luminophor}}, \code{\link{luminophorOutput}} #' #' @examples #' if (interactive()) { #' library(shiny) #' library(luminophor) #' shinyApp( #' ui = fluidPage( #' ...
/R/luminophor.R
permissive
natallzl/luminophor
R
false
false
17,786
r
#' LuminophoR: HTMLWidget implementation of Lumino layout manager #' #' @docType package #' #' @name LuminophoR-package #' #' @seealso \code{\link{luminophor}}, \code{\link{luminophorOutput}} #' #' @examples #' if (interactive()) { #' library(shiny) #' library(luminophor) #' shinyApp( #' ui = fluidPage( #' ...
install.packages('Lahman') install.packages('openxlsx') install.packages('reticulate') install.packages('tidyverse')
/install.R
no_license
mastergrasshopper/satrday-r-powered-excel
R
false
false
117
r
install.packages('Lahman') install.packages('openxlsx') install.packages('reticulate') install.packages('tidyverse')
## This R function is able to cache potentially time-consuming computations--Matrix inversion. ## makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { inverse_matrix <- NULL set <- function(y) { x <<- ...
/cachematrix.R
no_license
downle/ProgrammingAssignment
R
false
false
1,191
r
## This R function is able to cache potentially time-consuming computations--Matrix inversion. ## makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { inverse_matrix <- NULL set <- function(y) { x <<- ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SCEM.R \name{SCEM} \alias{SCEM} \title{Splitting-Coalescence-Estimation Method (SCEM) for archaeological time series.} \usage{ SCEM(paths, bandwidth) } \arguments{ \item{paths}{A list of data frames, where each frame contains the data for one...
/man/SCEM.Rd
no_license
cran/SCEM
R
false
true
2,572
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SCEM.R \name{SCEM} \alias{SCEM} \title{Splitting-Coalescence-Estimation Method (SCEM) for archaeological time series.} \usage{ SCEM(paths, bandwidth) } \arguments{ \item{paths}{A list of data frames, where each frame contains the data for one...
## as in the example given # This function # 1. set the value of vector equal to matrix # 2. get the velue of the matrix # 3. set the value of inverse matrix # 4. get the value of inverse matrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- func...
/cachematrix.R
no_license
vearlen/ProgrammingAssignment2
R
false
false
884
r
## as in the example given # This function # 1. set the value of vector equal to matrix # 2. get the velue of the matrix # 3. set the value of inverse matrix # 4. get the value of inverse matrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- func...
#Central Limit Theorem Example #no tidyverse packages, base R rm(list=ls()) ##normal #exponential distribution, mean 5, rate 1/5 ---- exponential_variates <- rexp(n=1000000,rate=1/5) #sample just 50 of the 1M variates, 5000 times sampled_exponential_variate_means <- numeric(length=5000) for(i in 1:5000){ ...
/clt_gist.r
no_license
Krishnakumarshrestha/teaching_bits
R
false
false
4,780
r
#Central Limit Theorem Example #no tidyverse packages, base R rm(list=ls()) ##normal #exponential distribution, mean 5, rate 1/5 ---- exponential_variates <- rexp(n=1000000,rate=1/5) #sample just 50 of the 1M variates, 5000 times sampled_exponential_variate_means <- numeric(length=5000) for(i in 1:5000){ ...
PopulateAvailTable <- function(){ library(RMySQL) mydb<-dbConnect(MySQL(),user='g1090423',password='marioboys',dbname='g1090423',host='mydb.ics.purdue.edu') dbSendQuery(mydb,'DELETE FROM Availability') Warehouse <- fetch(dbSendQuery(mydb,'SELECT StorageCapacity AS StorageCapacity, ID AS ID FROM Warehouse'),...
/simulation/populating Availability table.R
no_license
awiddy/WARIE
R
false
false
819
r
PopulateAvailTable <- function(){ library(RMySQL) mydb<-dbConnect(MySQL(),user='g1090423',password='marioboys',dbname='g1090423',host='mydb.ics.purdue.edu') dbSendQuery(mydb,'DELETE FROM Availability') Warehouse <- fetch(dbSendQuery(mydb,'SELECT StorageCapacity AS StorageCapacity, ID AS ID FROM Warehouse'),...
`int` <- function(x) { x }
/R/int.R
no_license
xiaolaiyuguo/SNPassoc
R
false
false
38
r
`int` <- function(x) { x }
library(ggplot2) library(mvtnorm) #Simulation of a response interacted with a one kink linear spline covariate covariate_range <- seq(0,40) kink <- 20 # First representation : a unique spline covariate term # we have two gammas : # - one for the non interacted weather term # - one for the weather*covariatespline...
/simulations.R
no_license
emileten/non-linear-regressions
R
false
false
3,841
r
library(ggplot2) library(mvtnorm) #Simulation of a response interacted with a one kink linear spline covariate covariate_range <- seq(0,40) kink <- 20 # First representation : a unique spline covariate term # we have two gammas : # - one for the non interacted weather term # - one for the weather*covariatespline...
\alias{gtkEntryGetVisibility} \name{gtkEntryGetVisibility} \title{gtkEntryGetVisibility} \description{Retrieves whether the text in \code{entry} is visible. See \code{\link{gtkEntrySetVisibility}}.} \usage{gtkEntryGetVisibility(object)} \arguments{\item{\code{object}}{[\code{\link{GtkEntry}}] a \code{\link{GtkEntry}}}...
/man/gtkEntryGetVisibility.Rd
no_license
cran/RGtk2.10
R
false
false
457
rd
\alias{gtkEntryGetVisibility} \name{gtkEntryGetVisibility} \title{gtkEntryGetVisibility} \description{Retrieves whether the text in \code{entry} is visible. See \code{\link{gtkEntrySetVisibility}}.} \usage{gtkEntryGetVisibility(object)} \arguments{\item{\code{object}}{[\code{\link{GtkEntry}}] a \code{\link{GtkEntry}}}...
# Iterative reweighted least-squares fitting of Negative-Binomial general linear models nbreg.fit <- function (X, y, phi, beta.init=NULL, offset=0, max.iter=100, tol=1e-6, lambda.0=0.0001, lambda.max=100, verbose=FALSE){ # A General method to perform Iterative reweighted least-squares for a negative-binomial...
/R/nbreg.R
no_license
mstrazar/csDEX
R
false
false
6,774
r
# Iterative reweighted least-squares fitting of Negative-Binomial general linear models nbreg.fit <- function (X, y, phi, beta.init=NULL, offset=0, max.iter=100, tol=1e-6, lambda.0=0.0001, lambda.max=100, verbose=FALSE){ # A General method to perform Iterative reweighted least-squares for a negative-binomial...