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
#plot2 plot2 <- function() { plot(timestamp,power$GlobalActivePower, type="l", xlab="", ylab="Global Active Power (kilowatts)") dev.copy(png, file="plot2.png", width=480, height=480) dev.off() } plot2()
/plot2.R
no_license
smcnish/ExData_Plotting1
R
false
false
216
r
#plot2 plot2 <- function() { plot(timestamp,power$GlobalActivePower, type="l", xlab="", ylab="Global Active Power (kilowatts)") dev.copy(png, file="plot2.png", width=480, height=480) dev.off() } plot2()
/eCE Direct Method, TC (直接法)/拉伸曲线统计卸载功&超弹性应变&加载功及内耗【v19.11.6】(使用cubintegrate积分).R
no_license
laye-d/statistics-in-eCE-by-R
R
false
false
8,855
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{division} \alias{division} \title{Divisiones de actividad} \format{Un data-frame con dos variables: \code{division} y \code{desc_division}. (\code{division} está desagregada en las 88 divisiones de actividad, cada ...
/man/division.Rd
no_license
transformauy/codigueras
R
false
true
467
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{division} \alias{division} \title{Divisiones de actividad} \format{Un data-frame con dos variables: \code{division} y \code{desc_division}. (\code{division} está desagregada en las 88 divisiones de actividad, cada ...
setwd("~/Downloads/TP") # install.packages("bnlearn") source("http://bioconductor.org/biocLite.R") biocLite(c("graph", "Rgraphviz")) library("bnlearn") # charge la base de données alarm data("alarm") # infos sur les colonnes (nos variables) ncol(alarm) colnames(alarm) # infos sur les lignes (nos observations) nrow(a...
/code_R_bnlearn.R
no_license
ppmdatix/TP_pytorch
R
false
false
4,282
r
setwd("~/Downloads/TP") # install.packages("bnlearn") source("http://bioconductor.org/biocLite.R") biocLite(c("graph", "Rgraphviz")) library("bnlearn") # charge la base de données alarm data("alarm") # infos sur les colonnes (nos variables) ncol(alarm) colnames(alarm) # infos sur les lignes (nos observations) nrow(a...
###### Pie Platform #### library(billboarder) library(dplyr) setwd("C:\\College\\R Project\\R Case Study") data<- read.csv("ott data.csv") c <- table(data$Platform) billboarder() %>% bb_piechart(c)
/Analysis-on-OTT-Platforms/Pie Platform.R
no_license
Nemwos/Analysis-on-OTT-Platforms
R
false
false
217
r
###### Pie Platform #### library(billboarder) library(dplyr) setwd("C:\\College\\R Project\\R Case Study") data<- read.csv("ott data.csv") c <- table(data$Platform) billboarder() %>% bb_piechart(c)
\name{Test.Paired} \alias{Test.Paired} \title{Test Paired Data Sets} \description{Tests two paired data sets for similarity.} \usage{Test.Paired(group.data, numPerms = 1000, parallel = FALSE, cores = 3)} \arguments{ \item{group.data}{A list of 2 matrices of taxonomic counts(columns) for each sample(rows).} ...
/man/Test.Paired.Rd
no_license
cran/HMP
R
false
false
1,005
rd
\name{Test.Paired} \alias{Test.Paired} \title{Test Paired Data Sets} \description{Tests two paired data sets for similarity.} \usage{Test.Paired(group.data, numPerms = 1000, parallel = FALSE, cores = 3)} \arguments{ \item{group.data}{A list of 2 matrices of taxonomic counts(columns) for each sample(rows).} ...
#rm(list=ls()) #installing packages install.packages(c("Rcpp", "downloader", "rgdal")) #installing SplitR package devtools::install_github("lhenneman/SplitR", force = TRUE) # devtools::install_github("lhenneman/hyspdisp", force = TRUE) install.packages("USAboundariesData", repos = "http://packages.ropensci.org", t...
/disperser.R
no_license
mmrasel/mello
R
false
false
13,543
r
#rm(list=ls()) #installing packages install.packages(c("Rcpp", "downloader", "rgdal")) #installing SplitR package devtools::install_github("lhenneman/SplitR", force = TRUE) # devtools::install_github("lhenneman/hyspdisp", force = TRUE) install.packages("USAboundariesData", repos = "http://packages.ropensci.org", t...
dataFile <- "./data/household_power_consumption.txt" #reading the data file consumpData <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors = FALSE, dec=".") #selecting data only from the dates 2007-02-01 and 2007-02-02 subsetConsumpData <- consumpData[consumpData$Date %in% c("1/2/2007","2/2/2007"),] dat...
/plot4.R
no_license
ParamitaBasu/ExData_Plotting1
R
false
false
1,679
r
dataFile <- "./data/household_power_consumption.txt" #reading the data file consumpData <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors = FALSE, dec=".") #selecting data only from the dates 2007-02-01 and 2007-02-02 subsetConsumpData <- consumpData[consumpData$Date %in% c("1/2/2007","2/2/2007"),] dat...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 20611 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 20611 c c Input Parameter (command line, file): c input filename QBFLIB/Faber-Leone-Maratea-Ricca/Strategic_Companies/x220.0.q...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Faber-Leone-Maratea-Ricca/Strategic_Companies/x220.0/x220.0.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
672
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 20611 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 20611 c c Input Parameter (command line, file): c input filename QBFLIB/Faber-Leone-Maratea-Ricca/Strategic_Companies/x220.0.q...
#' @export #' @title add section #' @description add a section in a Word document. A section affects #' preceding paragraphs or tables. #' #' @details #' A section starts at the end of the previous section (or the beginning of #' the document if no preceding section exists), and stops where the section is declared. #' ...
/R/docx_section.R
no_license
fredguinog/officer
R
false
false
16,303
r
#' @export #' @title add section #' @description add a section in a Word document. A section affects #' preceding paragraphs or tables. #' #' @details #' A section starts at the end of the previous section (or the beginning of #' the document if no preceding section exists), and stops where the section is declared. #' ...
# Manipulating data with dplyr and tidyr # library packages library(dplyr) # data manipulation functions, akin to manual filtering, reordering, calculation library(tidyr) # reshaping data functions library(readr) # reading and writing csvs library(udunits2) # unit conversions # read in data # read_csv: 1) faster 2) s...
/scripts/manipulating_data.R
no_license
fanelson/SEEDS-Critical-Skills
R
false
false
1,229
r
# Manipulating data with dplyr and tidyr # library packages library(dplyr) # data manipulation functions, akin to manual filtering, reordering, calculation library(tidyr) # reshaping data functions library(readr) # reading and writing csvs library(udunits2) # unit conversions # read in data # read_csv: 1) faster 2) s...
library(readr) extract_value <- function(input_filename, output_filename){ scanned_risk <- read_csv(input_filename, col_names = F) age <- unique(round(scanned_risk$X1)) risk_1_year <- data.frame(age = age, risk = 0) scanned_risk$X1 <- as.numeric(format(round(scanned_risk$X1, 2), nsmall = 2)) for (i ...
/LiteratureReview/MSH2/colorectal/Final Paper/extract_value.R
no_license
joseivm/NLP_Project
R
false
false
894
r
library(readr) extract_value <- function(input_filename, output_filename){ scanned_risk <- read_csv(input_filename, col_names = F) age <- unique(round(scanned_risk$X1)) risk_1_year <- data.frame(age = age, risk = 0) scanned_risk$X1 <- as.numeric(format(round(scanned_risk$X1, 2), nsmall = 2)) for (i ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/qualitycheck_lotes.R \name{qualitycheck_lotes} \alias{qualitycheck_lotes} \title{qualititycheck_lotes} \usage{ qualitycheck_lotes(Producto, Lista_lotes, Lista_fechas) } \arguments{ \item{Producto}{A character of the name of the product. Ej: "...
/man/qualitycheck_lotes.Rd
no_license
Erickcufe/qualitycheck
R
false
true
723
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/qualitycheck_lotes.R \name{qualitycheck_lotes} \alias{qualitycheck_lotes} \title{qualititycheck_lotes} \usage{ qualitycheck_lotes(Producto, Lista_lotes, Lista_fechas) } \arguments{ \item{Producto}{A character of the name of the product. Ej: "...
library(tidyverse) data <- read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2018-10-23/movie_profit.csv") glimpse(data) data %>% group_by(genre) %>% summarise(numero = n()) %>% mutate(p = numero/sum(numero)) data %>% count(genre) data %>% count(distributor, sort = ...
/clase-17/script.R
no_license
jbkunst/usach-ingemat-intro-elementos-ds-201802
R
false
false
5,726
r
library(tidyverse) data <- read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2018-10-23/movie_profit.csv") glimpse(data) data %>% group_by(genre) %>% summarise(numero = n()) %>% mutate(p = numero/sum(numero)) data %>% count(genre) data %>% count(distributor, sort = ...
library(scater) library(DropletUtils) library(Matrix) library(Seurat) library(stringr) library(SingleCellExperiment) library(mvoutlier) library(limma) library(ggplot2) library(ggpmisc) #load the dataset raw_folder_address <- readRDS(file="10x_raw_folder_address.rds") keyword <- readRDS(file = "keyword.rds") scater_fil...
/20191510_scater_hislet_h5.R
no_license
whelena/human_islet_cellbender
R
false
false
5,087
r
library(scater) library(DropletUtils) library(Matrix) library(Seurat) library(stringr) library(SingleCellExperiment) library(mvoutlier) library(limma) library(ggplot2) library(ggpmisc) #load the dataset raw_folder_address <- readRDS(file="10x_raw_folder_address.rds") keyword <- readRDS(file = "keyword.rds") scater_fil...
library(dplyr) library(lubridate) setwd("C:/Users/ldewit/Documents/coursera_local/Exploratory_Data_Analysis_Coursera/assignment 1") ## Loading data df <- read.csv("../../Data/household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment....
/assignment 1/plot3.R
no_license
laurensdw/Exploratory_Data_Analysis
R
false
false
1,015
r
library(dplyr) library(lubridate) setwd("C:/Users/ldewit/Documents/coursera_local/Exploratory_Data_Analysis_Coursera/assignment 1") ## Loading data df <- read.csv("../../Data/household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment....
exceptionalScores <- function(dat, items=NULL, exception=.025, totalOnly=TRUE, append=TRUE, both=TRUE, silent=FALSE, suffix = "_isExceptional", totalVarName = "exceptionalScores") { if (is.data.frame(dat)) { if (is....
/userfriendlyscience/R/exceptionalScores.R
no_license
ingted/R-Examples
R
false
false
1,719
r
exceptionalScores <- function(dat, items=NULL, exception=.025, totalOnly=TRUE, append=TRUE, both=TRUE, silent=FALSE, suffix = "_isExceptional", totalVarName = "exceptionalScores") { if (is.data.frame(dat)) { if (is....
## ----------------------------------------------------------------------- ## delete db.data.frame objects ## ----------------------------------------------------------------------- setGeneric ( "delete", def = function (x, ...) { rst <- standardGeneric("delete") res <- rst$res conn.id...
/PivotalR/R/method-delete_.R
no_license
ingted/R-Examples
R
false
false
8,326
r
## ----------------------------------------------------------------------- ## delete db.data.frame objects ## ----------------------------------------------------------------------- setGeneric ( "delete", def = function (x, ...) { rst <- standardGeneric("delete") res <- rst$res conn.id...
#' Remove PCR duplicates using bwa and Picard #' @param idxbase name of bwa index #' @param in1_fq left reads or 1 reads (of pair-end reads) fastq file #' @param in2_fq right or 2 reads (of pair-end reads) fastq file #' @param threads number of threads to run with (depends on server resources) #' @param output_filename...
/R/map_with_bwa_and_remove_PCR_duplicates.R
no_license
abshah/RADseqR
R
false
false
1,336
r
#' Remove PCR duplicates using bwa and Picard #' @param idxbase name of bwa index #' @param in1_fq left reads or 1 reads (of pair-end reads) fastq file #' @param in2_fq right or 2 reads (of pair-end reads) fastq file #' @param threads number of threads to run with (depends on server resources) #' @param output_filename...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/hanlp.R \name{hanlp.updateWord} \alias{hanlp.updateWord} \title{Add,remove,get a word.} \usage{ hanlp.updateWord(x, mode = "insert") } \arguments{ \item{x}{a word like \code{c('word')} or \code{c('words','nz',freq)} .} \item{mode}{\code{ins...
/man/hanlp.updateWord.Rd
no_license
SimmsJeason/RHanLP
R
false
true
718
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/hanlp.R \name{hanlp.updateWord} \alias{hanlp.updateWord} \title{Add,remove,get a word.} \usage{ hanlp.updateWord(x, mode = "insert") } \arguments{ \item{x}{a word like \code{c('word')} or \code{c('words','nz',freq)} .} \item{mode}{\code{ins...
library(tidyverse) library(tuneR) source("clean.R") ###### library(corrplot) x <- midi_melodies %>% mutate_all(as.numeric) %>% cor(method = "pearson") corr.p <- corrplot(x) x["ME",] %>% sort(decreasing = TRUE) ######Density multiplot p1 <- ggplot(midi_melodies, aes(x = channel, fill = as....
/Visualize.r
no_license
areeves87/midi-analysis
R
false
false
6,539
r
library(tidyverse) library(tuneR) source("clean.R") ###### library(corrplot) x <- midi_melodies %>% mutate_all(as.numeric) %>% cor(method = "pearson") corr.p <- corrplot(x) x["ME",] %>% sort(decreasing = TRUE) ######Density multiplot p1 <- ggplot(midi_melodies, aes(x = channel, fill = as....
library(shiny) library(tidyverse) library(quantmod) library(PerformanceAnalytics) library(RColorBrewer) library(tseries) library(lubridate) library(Quandl) Quandl.api_key("zrcB2Ejv9UmvhPCUsy2_") options("getSymbols.yahoo.warning"=FALSE) options("getSymbols.warning4.0"=FALSE) shinyUI(fluidPage( titlePa...
/ui.R
no_license
World-of-Python-and-R/Stock-Market-Analysis-Project
R
false
false
3,117
r
library(shiny) library(tidyverse) library(quantmod) library(PerformanceAnalytics) library(RColorBrewer) library(tseries) library(lubridate) library(Quandl) Quandl.api_key("zrcB2Ejv9UmvhPCUsy2_") options("getSymbols.yahoo.warning"=FALSE) options("getSymbols.warning4.0"=FALSE) shinyUI(fluidPage( titlePa...
library(glmnet) mydata = read.table("./TrainingSet/Correlation/stomach.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.2,family="gaussian",standardize=FALSE) sink('./Model/EN/Correlation/stomach/stomach_034.txt'...
/Model/EN/Correlation/stomach/stomach_034.R
no_license
leon1003/QSMART
R
false
false
363
r
library(glmnet) mydata = read.table("./TrainingSet/Correlation/stomach.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.2,family="gaussian",standardize=FALSE) sink('./Model/EN/Correlation/stomach/stomach_034.txt'...
#' Print Method for S3 \code{spv} classes #' #' Simple print methods for S3 classes \code{spv}, \code{spvlist}, \code{spvforlist} and \code{spvlistforlist}. See #' \code{\link{plot.spv}} for examples. #' #' @aliases print.spv print.spvlist print.spvforlist print.spvlistforlist #' @param x Object of class \code{spv}...
/vdg/R/print.spv.R
no_license
ingted/R-Examples
R
false
false
1,042
r
#' Print Method for S3 \code{spv} classes #' #' Simple print methods for S3 classes \code{spv}, \code{spvlist}, \code{spvforlist} and \code{spvlistforlist}. See #' \code{\link{plot.spv}} for examples. #' #' @aliases print.spv print.spvlist print.spvforlist print.spvlistforlist #' @param x Object of class \code{spv}...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/oauth-endpoint.r \name{oauth_endpoints} \alias{oauth_endpoints} \title{Popular oauth endpoints.} \usage{ oauth_endpoints(name) } \arguments{ \item{name}{One of the following endpoints: linkedin, twitter, vimeo, google, facebook, githu...
/Data Science/Miscellaenous/Misc - httr info/man/oauth_endpoints.Rd
no_license
Mike-Kuklinski/Coursera
R
false
false
421
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/oauth-endpoint.r \name{oauth_endpoints} \alias{oauth_endpoints} \title{Popular oauth endpoints.} \usage{ oauth_endpoints(name) } \arguments{ \item{name}{One of the following endpoints: linkedin, twitter, vimeo, google, facebook, githu...
# TODO: Add comment # # Author: lsalas ############################################################################### ## This file sets the BodyConditionHistory object for the simple WESE simulation #' Abstract class for BodyConditionHistory #' #' Abstract class for BodyConditionHistory #' #' @slot Curren...
/DemogObjects/BodyConditionHistory.R
permissive
pointblue/weddell-seal-toothfish-model
R
false
false
9,180
r
# TODO: Add comment # # Author: lsalas ############################################################################### ## This file sets the BodyConditionHistory object for the simple WESE simulation #' Abstract class for BodyConditionHistory #' #' Abstract class for BodyConditionHistory #' #' @slot Curren...
.mplusObjectArgNames <- formalArgs(mplusObject) .mplusModelerArgNames <- formalArgs(mplusModeler) #' Estimate latent profiles using Mplus #' #' Estimates latent profiles (finite mixture models) using the commercial #' program Mplus, through the R-interface of #' \code{\link[MplusAutomation:mplusModeler]{MplusAutomatio...
/R/estimate-profiles-mplus.R
no_license
bretsw/tidyLPA
R
false
false
14,204
r
.mplusObjectArgNames <- formalArgs(mplusObject) .mplusModelerArgNames <- formalArgs(mplusModeler) #' Estimate latent profiles using Mplus #' #' Estimates latent profiles (finite mixture models) using the commercial #' program Mplus, through the R-interface of #' \code{\link[MplusAutomation:mplusModeler]{MplusAutomatio...
# Data import and processsing - Cosumnes # All data is reprojected (if necessary) to lat/long source("R/0_utilities.R") # --------------------------------------------------------------------- # Import VIC data # Import basin-averaged daily VIC data etqswe_cosumnes_canesm2_hist <- readr::read_csv("../BasinAvg/Cosum...
/R/1.1_data_processing_cosumnes.R
no_license
ryanrbart/vic_sierra_nevada_analysis
R
false
false
4,524
r
# Data import and processsing - Cosumnes # All data is reprojected (if necessary) to lat/long source("R/0_utilities.R") # --------------------------------------------------------------------- # Import VIC data # Import basin-averaged daily VIC data etqswe_cosumnes_canesm2_hist <- readr::read_csv("../BasinAvg/Cosum...
#---------------------------------------------------------------- # Environment Set-up #---------------------------------------------------------------- rm(list=ls(all=TRUE)) gc() options(scipen=999) library(xgboost) setwd("/home/rstudio/Dropbox/Public/Springleaf") subversion <- 1 version <- "24_4" startTime <- Sys.ti...
/Benchmark Scripts/Seed/test_submission_seed_24_4.R
no_license
vikasnitk85/SpringleafMarketingesponse
R
false
false
4,621
r
#---------------------------------------------------------------- # Environment Set-up #---------------------------------------------------------------- rm(list=ls(all=TRUE)) gc() options(scipen=999) library(xgboost) setwd("/home/rstudio/Dropbox/Public/Springleaf") subversion <- 1 version <- "24_4" startTime <- Sys.ti...
library(checkarg) ### Name: isStrictlyNegativeIntegerOrNanVectorOrNull ### Title: Wrapper for the checkarg function, using specific parameter ### settings. ### Aliases: isStrictlyNegativeIntegerOrNanVectorOrNull ### ** Examples isStrictlyNegativeIntegerOrNanVectorOrNull(-2) # returns TRUE (argument is valid) i...
/data/genthat_extracted_code/checkarg/examples/isStrictlyNegativeIntegerOrNanVectorOrNull.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
982
r
library(checkarg) ### Name: isStrictlyNegativeIntegerOrNanVectorOrNull ### Title: Wrapper for the checkarg function, using specific parameter ### settings. ### Aliases: isStrictlyNegativeIntegerOrNanVectorOrNull ### ** Examples isStrictlyNegativeIntegerOrNanVectorOrNull(-2) # returns TRUE (argument is valid) i...
options(stringsAsFactors=FALSE) file.sensitivity <- "auc_recomputed_drug_association.RData" require(stringr) || stop("Library stringr is not available!") require(corrplot) || stop("Library corrplot is not available!") require(VennDiagram) || stop("Library VennDiagram is not available!") require(RColorBrewer) || stop("...
/training_results.R
no_license
xulijunji/RNASeqDrug
R
false
false
17,618
r
options(stringsAsFactors=FALSE) file.sensitivity <- "auc_recomputed_drug_association.RData" require(stringr) || stop("Library stringr is not available!") require(corrplot) || stop("Library corrplot is not available!") require(VennDiagram) || stop("Library VennDiagram is not available!") require(RColorBrewer) || stop("...
ggplot(gapminder, aes(x = year, y = lifeExp, group = continent, color = continent)) + geom_point(lwd = 1, show.legend = FALSE) + geom_smooth(method="auto") + facet_wrap(~ continent) scale_color_manual(values = continent_colors) + theme_bw() + theme(strip.text = element_text(size = rel(1.1)))
/Fanli_Si.R
no_license
FanliSi/Alpha_GW1
R
false
false
308
r
ggplot(gapminder, aes(x = year, y = lifeExp, group = continent, color = continent)) + geom_point(lwd = 1, show.legend = FALSE) + geom_smooth(method="auto") + facet_wrap(~ continent) scale_color_manual(values = continent_colors) + theme_bw() + theme(strip.text = element_text(size = rel(1.1)))
library(intrinsicDimension) ### Name: oblongNormal ### Title: Oblong Normal Distribution ### Aliases: oblongNormal ### Keywords: datagen ### ** Examples datap <- oblongNormal(100, 10) par(mfrow = c(1, 2)) plot(datap[, 1], datap[, 2]) plot(datap[, 1], datap[, 6])
/data/genthat_extracted_code/intrinsicDimension/examples/oblong.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
270
r
library(intrinsicDimension) ### Name: oblongNormal ### Title: Oblong Normal Distribution ### Aliases: oblongNormal ### Keywords: datagen ### ** Examples datap <- oblongNormal(100, 10) par(mfrow = c(1, 2)) plot(datap[, 1], datap[, 2]) plot(datap[, 1], datap[, 6])
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/errcheck_times.R \name{errcheck_times} \alias{errcheck_times} \title{Error check \code{times}} \usage{ errcheck_times(times, callfunc) } \arguments{ \item{times}{Tests whether this is a numeric vector with unit-spaced increasing values} \ite...
/man/errcheck_times.Rd
no_license
cran/wsyn
R
false
true
662
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/errcheck_times.R \name{errcheck_times} \alias{errcheck_times} \title{Error check \code{times}} \usage{ errcheck_times(times, callfunc) } \arguments{ \item{times}{Tests whether this is a numeric vector with unit-spaced increasing values} \ite...
testlist <- list(Beta = 0, CAL = numeric(0), CVLinf = 0, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), nage = 0L, nlen = 0L, pars = c(3.81959242373749e-313, 0), rLens = numeric(0)) result <- do.call(DLMtool:::LBSPRo...
/DLMtool/inst/testfiles/LBSPRopt/AFL_LBSPRopt/LBSPRopt_valgrind_files/1615838117-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
344
r
testlist <- list(Beta = 0, CAL = numeric(0), CVLinf = 0, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), nage = 0L, nlen = 0L, pars = c(3.81959242373749e-313, 0), rLens = numeric(0)) result <- do.call(DLMtool:::LBSPRo...
# Tidy Tuesday 2020 Week 15 # Tour de France # data provided by Alastair Rushworth library(remotes) devtools::install_github("alastairrushworth/tdf") library(tdf) library(tidyverse) glimpse(editions) library(ggthemes) library(ggplot2) library(ggrepl) caption <- paste (strwrap ("TidyTuesday wk 15 ...
/tt2020w15TourdeFrance.R
permissive
regiso/tidytuesday
R
false
false
981
r
# Tidy Tuesday 2020 Week 15 # Tour de France # data provided by Alastair Rushworth library(remotes) devtools::install_github("alastairrushworth/tdf") library(tdf) library(tidyverse) glimpse(editions) library(ggthemes) library(ggplot2) library(ggrepl) caption <- paste (strwrap ("TidyTuesday wk 15 ...
library(tidyverse) library(ggpubr) library(gridExtra) data <- read_tsv("Swaziland.txt") data <- data %>% mutate(deathBirth = babyDeath / babyBirth) p1 <- ggscatter( data, x = "lifeMan", y = "lifeWoman", add = "reg.line", add.params = list(color = "blue", fill = "lightgray"), conf.int = TRUE...
/show/Swaziland/Swaziland_cor.R
no_license
Yixf-Education/course_Statistics_Story
R
false
false
2,027
r
library(tidyverse) library(ggpubr) library(gridExtra) data <- read_tsv("Swaziland.txt") data <- data %>% mutate(deathBirth = babyDeath / babyBirth) p1 <- ggscatter( data, x = "lifeMan", y = "lifeWoman", add = "reg.line", add.params = list(color = "blue", fill = "lightgray"), conf.int = TRUE...
#Figure 4.5 #http://www.amazon.com/Lattice-Multivariate-Data-Visualization-Use/dp/0387759689/ref=cm_cr_pr_product_top require(rCharts) require(reshape2) data( postdoc, package = "latticeExtra") #get data in form that the example uses and then melt it data = melt(data.frame(prop.table(postdoc,margin=1))) colnames( da...
/polycharts_versions/figure4_05.R
no_license
arturochian/rCharts_lattice_book
R
false
false
677
r
#Figure 4.5 #http://www.amazon.com/Lattice-Multivariate-Data-Visualization-Use/dp/0387759689/ref=cm_cr_pr_product_top require(rCharts) require(reshape2) data( postdoc, package = "latticeExtra") #get data in form that the example uses and then melt it data = melt(data.frame(prop.table(postdoc,margin=1))) colnames( da...
#------------------------------------------------------------ ### Acute #------------------------------------------------------------ # load("all__matrices__norm__and__raw.Rdata") # remove outlier sample # acute.meta = acute.meta[-14,] # acute.matrix = acute.matrix %>% select(-s_11043640) acute.InputMatrix = cbind(c...
/04__permute__bacteria__acute.v.ctrl.R
no_license
bixBeta/FHC-heart
R
false
false
2,631
r
#------------------------------------------------------------ ### Acute #------------------------------------------------------------ # load("all__matrices__norm__and__raw.Rdata") # remove outlier sample # acute.meta = acute.meta[-14,] # acute.matrix = acute.matrix %>% select(-s_11043640) acute.InputMatrix = cbind(c...
# Walmart Sales # Data Visualization # library(readr) # Store Dept Date Weekly_Sales IsHoliday: 2010-02-05 ~ 2012-10-26 data1<-read_csv("C:\\Users\\44180\\Documents\\Surface-workandstudy\\soe\\bigdata\\Walmart_train.csv") data1<-read_csv("D:\\PC-workandstudy\\soe\\bigdata\\data of case3\\Walmart_train.csv") # Store Typ...
/R/big data/case3/case3_1.R
no_license
hunterlinsq/R-in-SOE
R
false
false
3,421
r
# Walmart Sales # Data Visualization # library(readr) # Store Dept Date Weekly_Sales IsHoliday: 2010-02-05 ~ 2012-10-26 data1<-read_csv("C:\\Users\\44180\\Documents\\Surface-workandstudy\\soe\\bigdata\\Walmart_train.csv") data1<-read_csv("D:\\PC-workandstudy\\soe\\bigdata\\data of case3\\Walmart_train.csv") # Store Typ...
setwd("../../analysis/hiccup_loops") files= list.files(pattern="requested_list_10000",path="merged_loops",full.names=T,recursive=T) names = sub("merged_loops/(D.._HiC_Rep.)/requested_list_10000","\\1",files) dat = list() for (i in 1:12){ dat[[i]] = data.frame(fread(files[[i]])) } datm = Reduce(function(...)merge(...
/archive/hiccup_loop/concatenate_loop_tests.r
no_license
bioinfx/cvdc_scripts
R
false
false
947
r
setwd("../../analysis/hiccup_loops") files= list.files(pattern="requested_list_10000",path="merged_loops",full.names=T,recursive=T) names = sub("merged_loops/(D.._HiC_Rep.)/requested_list_10000","\\1",files) dat = list() for (i in 1:12){ dat[[i]] = data.frame(fread(files[[i]])) } datm = Reduce(function(...)merge(...
# Set dir set_wdir <- function(){ library(rstudioapi) current_path <- getActiveDocumentContext()$path setwd(dirname(current_path )) print( getwd() ) } # Set directory set_wdir() # Libraries library(ggplot2) library(reshape) library(dplyr) library(plyr) library(tidyr) library(kernlab) library(ggsci) library(...
/r-datapreprocess/cluster.R
permissive
jonathanalmd/anomaly-detection-in-mobile-networks
R
false
false
19,072
r
# Set dir set_wdir <- function(){ library(rstudioapi) current_path <- getActiveDocumentContext()$path setwd(dirname(current_path )) print( getwd() ) } # Set directory set_wdir() # Libraries library(ggplot2) library(reshape) library(dplyr) library(plyr) library(tidyr) library(kernlab) library(ggsci) library(...
library(rMEA) ### Name: MEAccf ### Title: Moving-windows lagged cross-correlation routine for 'MEA' ### objects ### Aliases: MEAccf ### ** Examples ## read a single file path_normal <- system.file("extdata/normal/200_01.txt", package = "rMEA") mea_normal <- readMEA(path_normal, sampRate = 25, s1Col = 1, s2Col = 2...
/data/genthat_extracted_code/rMEA/examples/MEAccf.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
668
r
library(rMEA) ### Name: MEAccf ### Title: Moving-windows lagged cross-correlation routine for 'MEA' ### objects ### Aliases: MEAccf ### ** Examples ## read a single file path_normal <- system.file("extdata/normal/200_01.txt", package = "rMEA") mea_normal <- readMEA(path_normal, sampRate = 25, s1Col = 1, s2Col = 2...
library(FutureManager) library(testthat) test_that( desc = "fmStatus methods work correctly", code = { status <- fmStatus( id = "dummy", status = "success", message = "Job completed", value = iris ) expect_equal( object = status %>% filter(Species == "setosa") %>% nro...
/tests/testthat/test-methods.R
permissive
Boehringer-Ingelheim/FutureManager
R
false
false
2,677
r
library(FutureManager) library(testthat) test_that( desc = "fmStatus methods work correctly", code = { status <- fmStatus( id = "dummy", status = "success", message = "Job completed", value = iris ) expect_equal( object = status %>% filter(Species == "setosa") %>% nro...
#------------------------------------------------------------------------------# #' Coerce a list of rows to a data frame #' #' Function to coerce a list (of rows) to a data frame. #' #' @param x A list. Each element corresponds to a row of the upcoming data frame. #' @param col_names Optional. If not provided and if t...
/R/list2df.R
no_license
chgigot/cgmisc
R
false
false
1,906
r
#------------------------------------------------------------------------------# #' Coerce a list of rows to a data frame #' #' Function to coerce a list (of rows) to a data frame. #' #' @param x A list. Each element corresponds to a row of the upcoming data frame. #' @param col_names Optional. If not provided and if t...
#Jash Mehta #04/13/2016 #hw svm install.packages("kernlab") library("kernlab") #STEP1 Food <- read.csv("C:\\Users\\jashm\\Google Drive\\IM\\687\\Home Work\\SVM\\Food_Service_Establishment__Last_Inspection.csv") Food$V <-NULL #Step2 Food <- na.omit(Food) Food$NewVio <- "Null" head(Food$NewVio,20) fi...
/week 10 SVM/Jash Mehta, HW SVM, JM.R
no_license
jashmehta89/IST-687-Applied-Data-Science-LabWork
R
false
false
4,763
r
#Jash Mehta #04/13/2016 #hw svm install.packages("kernlab") library("kernlab") #STEP1 Food <- read.csv("C:\\Users\\jashm\\Google Drive\\IM\\687\\Home Work\\SVM\\Food_Service_Establishment__Last_Inspection.csv") Food$V <-NULL #Step2 Food <- na.omit(Food) Food$NewVio <- "Null" head(Food$NewVio,20) fi...
ncvint <- function(X, y, family=c("gaussian","binomial","poisson"), penalty=c("MCP", "SCAD", "lasso"), gamma=switch(penalty, SCAD=3.7, 3), alpha=1, lambda.min=ifelse(n>p,.001,.05), nlambda=100, lambda=NULL, eps=.001, max.iter=1000, convex=TRUE, dfmax=p+1, penalty.factor=rep(1, ncol...
/R/ncvint.R
no_license
Jiahua1982/TVsMiss
R
false
false
5,907
r
ncvint <- function(X, y, family=c("gaussian","binomial","poisson"), penalty=c("MCP", "SCAD", "lasso"), gamma=switch(penalty, SCAD=3.7, 3), alpha=1, lambda.min=ifelse(n>p,.001,.05), nlambda=100, lambda=NULL, eps=.001, max.iter=1000, convex=TRUE, dfmax=p+1, penalty.factor=rep(1, ncol...
# # Exploratory Data Analysis # Project 1 # 2015.04.10 # setwd("C://Users//jnewell.BI//Documents//Coursera//Exploratory Data Analysis//Project1") # Date;Time;Global_active_power;Global_reactive_power;Voltage;Global_intensity;Sub_metering_1;Sub_metering_2;Sub_metering_3 # 1/2/2007;00:00:00;0.326;0.128;243.150;1.400;0.00...
/plot1.R
no_license
gtjnewell/ExData_Plotting1
R
false
false
1,314
r
# # Exploratory Data Analysis # Project 1 # 2015.04.10 # setwd("C://Users//jnewell.BI//Documents//Coursera//Exploratory Data Analysis//Project1") # Date;Time;Global_active_power;Global_reactive_power;Voltage;Global_intensity;Sub_metering_1;Sub_metering_2;Sub_metering_3 # 1/2/2007;00:00:00;0.326;0.128;243.150;1.400;0.00...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calcular.optimo.derivada.R \name{calcular.optimo.derivada} \alias{calcular.optimo.derivada} \title{calculates optimum: second derivative equals 0 (change signs from - to +, or + to -)} \usage{ calcular.optimo.derivada(i.curva.map) } \...
/man/calcular.optimo.derivada.Rd
no_license
cran/mem
R
false
true
443
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calcular.optimo.derivada.R \name{calcular.optimo.derivada} \alias{calcular.optimo.derivada} \title{calculates optimum: second derivative equals 0 (change signs from - to +, or + to -)} \usage{ calcular.optimo.derivada(i.curva.map) } \...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/weightedDetection.R \name{weightedDetection} \alias{weightedDetection} \title{weightedDetection} \usage{ weightedDetection(occWeights = data.frame(sites = 1:10, weights = c(0.05, 0.05, 0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2)), visWeight...
/man/weightedDetection.Rd
no_license
NINAnor/SurveyPower
R
false
true
1,169
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/weightedDetection.R \name{weightedDetection} \alias{weightedDetection} \title{weightedDetection} \usage{ weightedDetection(occWeights = data.frame(sites = 1:10, weights = c(0.05, 0.05, 0.05, 0.05, 0.1, 0.1, 0.1, 0.1, 0.2, 0.2)), visWeight...
x <- 4 class(x) x <- c(4, TRUE) class(x) x <- c(1,3, 5) y <- c(3, 2, 10) rbind(x, y) x <- list(2, "a", "b", TRUE) x[[2]] x <- 1:4 y <- 2:3 x+y x <- c(3, 5, 1, 10, 12, 6) x x[x < 6] <- 0 x x <- c(3, 5, 1, 10, 12, 6) x[x %in% 1:5] <- 0 x data <- read.csv("hw1_data.csv") head(data) data[c(152,153),] dim(data) data$Ozone[4...
/02_R_programming/quizz_week_1.R
no_license
danpon/coursera_jhu_datascience
R
false
false
729
r
x <- 4 class(x) x <- c(4, TRUE) class(x) x <- c(1,3, 5) y <- c(3, 2, 10) rbind(x, y) x <- list(2, "a", "b", TRUE) x[[2]] x <- 1:4 y <- 2:3 x+y x <- c(3, 5, 1, 10, 12, 6) x x[x < 6] <- 0 x x <- c(3, 5, 1, 10, 12, 6) x[x %in% 1:5] <- 0 x data <- read.csv("hw1_data.csv") head(data) data[c(152,153),] dim(data) data$Ozone[4...
darken <- function(color, factor=1.4){ col <- col2rgb(color) col <- col/factor col <- rgb(t(col), maxColorValue=255) col } #' @export plot_hospital<- function(initial_report= 1000, final_report = 10000, distribution= "exponential", ...
/R/plot_hospital.R
permissive
ctesta01/covid19_icu
R
false
false
6,643
r
darken <- function(color, factor=1.4){ col <- col2rgb(color) col <- col/factor col <- rgb(t(col), maxColorValue=255) col } #' @export plot_hospital<- function(initial_report= 1000, final_report = 10000, distribution= "exponential", ...
## ## (1) Make R packages available ## library(devtools) library(roxygen2) ## ## (2) Create documentation file(s) ## document("../nmarank") ## ## (3) Build R package and PDF file with help pages ## build("../nmarank") build_manual("../nmarank") ## ## (4) Install R package ## install("../nmarank") ## ## (5) Chec...
/roxygen2.R
no_license
esm-ispm-unibe-ch/nmarank
R
false
false
503
r
## ## (1) Make R packages available ## library(devtools) library(roxygen2) ## ## (2) Create documentation file(s) ## document("../nmarank") ## ## (3) Build R package and PDF file with help pages ## build("../nmarank") build_manual("../nmarank") ## ## (4) Install R package ## install("../nmarank") ## ## (5) Chec...
setSummaryTemplate(lmerMod = c("Log-likelihood" = "($logLik:f#)", "Deviance" = "($deviance:f#)", "AIC" = "($AIC:f#)", "BIC" = "($BIC:f#)", N = "($N:d)")) setSummaryTemplate(glmerMod = c("Log-likelihood" = "($logLik:f#)", ...
/pkg/R/yz-getSummary-merMod.R
no_license
jeffreyhanson/memisc
R
false
false
3,203
r
setSummaryTemplate(lmerMod = c("Log-likelihood" = "($logLik:f#)", "Deviance" = "($deviance:f#)", "AIC" = "($AIC:f#)", "BIC" = "($BIC:f#)", N = "($N:d)")) setSummaryTemplate(glmerMod = c("Log-likelihood" = "($logLik:f#)", ...
#' Boxcox transformation of a vector/number #' #' Transforms via the Box-Cox transform. #' #' @param x The vector to be boxcoxed boxcoxed. Default is 1. #' @param lambda The parameter of Box–Cox transformation. Default is 1. #' #' @return A vector/number that is the boxcox boxcox transformation of \code{x}. #' #' @deta...
/R/boxcox.R
no_license
zxkathy/powers
R
false
false
683
r
#' Boxcox transformation of a vector/number #' #' Transforms via the Box-Cox transform. #' #' @param x The vector to be boxcoxed boxcoxed. Default is 1. #' @param lambda The parameter of Box–Cox transformation. Default is 1. #' #' @return A vector/number that is the boxcox boxcox transformation of \code{x}. #' #' @deta...
# ------------------------ # # Assess Variants in # # Sequencing Runs # # Literature Data # # K. Sumner # # September 12, 2019 # # ------------------------ # #### ------- read in the libraries ------- #### library(tidyverse) #### ------ read in the variant tables -------...
/SpatialR21_project/code/miscellaneous/assess_variants_in_literature.R
no_license
kelseysumner/taylorlab
R
false
false
2,333
r
# ------------------------ # # Assess Variants in # # Sequencing Runs # # Literature Data # # K. Sumner # # September 12, 2019 # # ------------------------ # #### ------- read in the libraries ------- #### library(tidyverse) #### ------ read in the variant tables -------...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clarifai.R \name{clarifai_check_auth} \alias{clarifai_check_auth} \title{Check if authentication information is in the environment} \usage{ clarifai_check_auth() } \description{ Check if authentication information is in the environme...
/man/clarifai_check_auth.Rd
permissive
cran/clarifai
R
false
true
327
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clarifai.R \name{clarifai_check_auth} \alias{clarifai_check_auth} \title{Check if authentication information is in the environment} \usage{ clarifai_check_auth() } \description{ Check if authentication information is in the environme...
################################################################################ # # Social interaction model: Sweep beta and group size parameter space # ################################################################################ rm(list = ls()) #################### # Source necessary scripts/libraries ########...
/scripts/3_para_sweep/3a_BetaParaSweep_NegEpsilon_2.R
no_license
christokita/socially-modulated-threshold-model
R
false
false
7,036
r
################################################################################ # # Social interaction model: Sweep beta and group size parameter space # ################################################################################ rm(list = ls()) #################### # Source necessary scripts/libraries ########...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_slurm_out.R \name{get_slurm_out} \alias{get_slurm_out} \title{Reads the output of a function calculated on the SLURM cluster} \usage{ get_slurm_out(slr_job, outtype = "raw") } \arguments{ \item{slr_job}{A \code{slurm_job} object.} \item{...
/man/get_slurm_out.Rd
no_license
calufrax/rslurm
R
false
true
1,543
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_slurm_out.R \name{get_slurm_out} \alias{get_slurm_out} \title{Reads the output of a function calculated on the SLURM cluster} \usage{ get_slurm_out(slr_job, outtype = "raw") } \arguments{ \item{slr_job}{A \code{slurm_job} object.} \item{...
#' @export #' @import rstan #' @import parallel #' @import R1magic #' @import HDInterval #' @import dplyr #' @import reshape2 #' @useDynLib bnets, .registration = TRUE proj_pred_blasso <- function(x, prior_scale){ nodes <- 1:x$stan_dat$K beta_list <- list() search_path <- list() list_res <- list() d <- max(...
/R/proj_pred_blasso.R
no_license
donaldRwilliams/bnets
R
false
false
4,481
r
#' @export #' @import rstan #' @import parallel #' @import R1magic #' @import HDInterval #' @import dplyr #' @import reshape2 #' @useDynLib bnets, .registration = TRUE proj_pred_blasso <- function(x, prior_scale){ nodes <- 1:x$stan_dat$K beta_list <- list() search_path <- list() list_res <- list() d <- max(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/transdistfuncs.r \name{est.transdist.temporal.bootstrap.ci} \alias{est.transdist.temporal.bootstrap.ci} \title{Bootstrapped confidence intervals for the change in mean transmission distance over time} \usage{ est.transdist.temporal.bootstrap....
/man/est.transdist.temporal.bootstrap.ci.Rd
no_license
shauntruelove/IDSpatialStats
R
false
true
3,202
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/transdistfuncs.r \name{est.transdist.temporal.bootstrap.ci} \alias{est.transdist.temporal.bootstrap.ci} \title{Bootstrapped confidence intervals for the change in mean transmission distance over time} \usage{ est.transdist.temporal.bootstrap....
library(rmarkdown) library(tidyverse) #---------------------------------------------------------------------------- ############################################################################# ## APPLY MD RENDER ACROSS ALL SPECIES ############################################################################# # pull ...
/code/md_render.R
no_license
jeremyash/tree_CL
R
false
false
823
r
library(rmarkdown) library(tidyverse) #---------------------------------------------------------------------------- ############################################################################# ## APPLY MD RENDER ACROSS ALL SPECIES ############################################################################# # pull ...
000010 000020 READ-CONTRF. 000030 READ CONTRF. 000040 IF WS-STATUS = "00" 000050 GO TO READ-CONTRF-EXIT. 000040 IF WS-STATUS = "23" 000070 MOVE 34 TO WS-F-ERROR 000050 GO TO READ-CONTRF-EXIT. 000060 IF WS-STAT1 = "2" OR "3" OR "4" 000070 MOVE 34 ...
/CONTRF.RD
no_license
pingleware/apac-accounting-code
R
false
false
640
rd
000010 000020 READ-CONTRF. 000030 READ CONTRF. 000040 IF WS-STATUS = "00" 000050 GO TO READ-CONTRF-EXIT. 000040 IF WS-STATUS = "23" 000070 MOVE 34 TO WS-F-ERROR 000050 GO TO READ-CONTRF-EXIT. 000060 IF WS-STAT1 = "2" OR "3" OR "4" 000070 MOVE 34 ...
# mcSuperLearner # # Created by Eric Polley on 2011-01-01. # mcSuperLearner <- function(Y, X, newX = NULL, family = gaussian(), SL.library, method = 'method.NNLS', id = NULL, verbose = FALSE, control = list(), cvControl = list(), obsWeights = NULL) { .SL.require('parallel') if(is.character(method)) { if(exist...
/R/mcSuperLearner.R
no_license
mathyCathy/SuperLearner
R
false
false
11,681
r
# mcSuperLearner # # Created by Eric Polley on 2011-01-01. # mcSuperLearner <- function(Y, X, newX = NULL, family = gaussian(), SL.library, method = 'method.NNLS', id = NULL, verbose = FALSE, control = list(), cvControl = list(), obsWeights = NULL) { .SL.require('parallel') if(is.character(method)) { if(exist...
## makeCacheMatric and cacheColve will create and cache ## the inverse of a given matrix ## This function will store the matrix along with the cached ## inverse, if computed makeCacheMatrix <- function(x = matrix()) { i <- NULL ## declare set function set <- function(y) { x <<- y i <<- NUL...
/cachematrix.R
no_license
raekenn/ProgrammingAssignment2
R
false
false
1,012
r
## makeCacheMatric and cacheColve will create and cache ## the inverse of a given matrix ## This function will store the matrix along with the cached ## inverse, if computed makeCacheMatrix <- function(x = matrix()) { i <- NULL ## declare set function set <- function(y) { x <<- y i <<- NUL...
##function reads series of wearable technology test data ##output is data.frame which ##provides average time/freq measurement values per subject, activity and ##action and function being measured ##should be executed from directory with test/train directories ##this should be rewritten so you pass that directory a...
/run_analysis.R
no_license
juliastudent/getandcleandata
R
false
false
3,565
r
##function reads series of wearable technology test data ##output is data.frame which ##provides average time/freq measurement values per subject, activity and ##action and function being measured ##should be executed from directory with test/train directories ##this should be rewritten so you pass that directory a...
/BIG5/04/ch04.R
no_license
Evonne0623/CH_R_Meta
R
false
false
4,429
r
###loading necessary libraries library(cluster) library(corrplot) ###reading the file cust<-read.csv("Wholesalecustomersdata.csv",header=TRUE,sep = ",") cust <- cust[,3:8] head(cust) ###summary of the dataset summary(cust) ###exploring the dataset more and finding out strong correlations among variables c <- cor(cu...
/clustering project/customerSegmentation.R
no_license
TaralikaPenmetsa/Machine-Learning-Projects
R
false
false
2,270
r
###loading necessary libraries library(cluster) library(corrplot) ###reading the file cust<-read.csv("Wholesalecustomersdata.csv",header=TRUE,sep = ",") cust <- cust[,3:8] head(cust) ###summary of the dataset summary(cust) ###exploring the dataset more and finding out strong correlations among variables c <- cor(cu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model.R \name{mlflow_rfunc_predict} \alias{mlflow_rfunc_predict} \title{Predict using RFunc MLflow Model} \usage{ mlflow_rfunc_predict(model_dir, data, output_file = NULL, restore = FALSE) } \arguments{ \item{model_dir}{The path to the MLfl...
/R/mlflow/man/mlflow_rfunc_predict.Rd
permissive
rstudio/mlflow-original
R
false
true
975
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model.R \name{mlflow_rfunc_predict} \alias{mlflow_rfunc_predict} \title{Predict using RFunc MLflow Model} \usage{ mlflow_rfunc_predict(model_dir, data, output_file = NULL, restore = FALSE) } \arguments{ \item{model_dir}{The path to the MLfl...
hdbscanClustering <- function(db, datasetBugId){ library("dbscan") res.hdbs <- dbscan::hdbscan(x = db, minPts = 5) # Obter os clusters datasetBugId$Cluster <- res.hdbs$cluster datasetBugId$Qtd = 1; #Realizar um agrupamento library(data.table) dt <- data.table(datasetBugId) return(dt) }
/evaluation/codeR/model/HDbScanClustering.R
permissive
MackMendes/Application-Clustering-Algorithms-for-Discovering-Bug-Patterns-JavaScript-Software
R
false
false
318
r
hdbscanClustering <- function(db, datasetBugId){ library("dbscan") res.hdbs <- dbscan::hdbscan(x = db, minPts = 5) # Obter os clusters datasetBugId$Cluster <- res.hdbs$cluster datasetBugId$Qtd = 1; #Realizar um agrupamento library(data.table) dt <- data.table(datasetBugId) return(dt) }
library(ggplot2) library(shiny) shinyServer(function(input, output) { source("../plottheme/styling.R", local = TRUE) #Limits of scales xmin <- 0 xmax <- 5 ymin <- 0 ymax <- 0.9 #Size of point psize <- 5 #Sampling distribution standard error se <- runif(1, 0.4, 0.6) #Draw sample mean ...
/apps/pop-means-ci/server.R
no_license
WdeNooy/Statistical-Inference
R
false
false
10,763
r
library(ggplot2) library(shiny) shinyServer(function(input, output) { source("../plottheme/styling.R", local = TRUE) #Limits of scales xmin <- 0 xmax <- 5 ymin <- 0 ymax <- 0.9 #Size of point psize <- 5 #Sampling distribution standard error se <- runif(1, 0.4, 0.6) #Draw sample mean ...
/eye/R/combinedresult.R
no_license
XiangGuo1992/My-Master-Graduation-Thesis
R
false
false
443
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/response_heatmap_custom.r \name{response_heatmap_custom} \alias{response_heatmap_custom} \title{Plot the response probabilities for all observations as a heatmap} \usage{ response_heatmap_custom(result, xorderTable, yorderTable, responseThr...
/man/response_heatmap_custom.Rd
no_license
RGLab/BAMBA
R
false
true
1,673
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/response_heatmap_custom.r \name{response_heatmap_custom} \alias{response_heatmap_custom} \title{Plot the response probabilities for all observations as a heatmap} \usage{ response_heatmap_custom(result, xorderTable, yorderTable, responseThr...
#' Creates a description file for a compendium #' #' The idea behind a compendium is to have a minimal description file that makes #' it easy for anyone to 'install' your analysis dependencies. This makes it #' possible for someone to run your code easily. #' #' To automatically populate author information, you may set...
/R/write_compendium_description.R
permissive
annakrystalli/holepunch
R
false
false
3,118
r
#' Creates a description file for a compendium #' #' The idea behind a compendium is to have a minimal description file that makes #' it easy for anyone to 'install' your analysis dependencies. This makes it #' possible for someone to run your code easily. #' #' To automatically populate author information, you may set...
% Generated by roxygen2 (4.0.2): do not edit by hand \docType{package} \name{exsic-package} \alias{exsic-package} \title{Provides botanists with convenience functions to create exsiccatae indices} \description{ The tool allows creating simple specimen indices as found in taxonomic treatments based on a table of ...
/man/exsic-package.Rd
no_license
cran/exsic
R
false
false
2,096
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \docType{package} \name{exsic-package} \alias{exsic-package} \title{Provides botanists with convenience functions to create exsiccatae indices} \description{ The tool allows creating simple specimen indices as found in taxonomic treatments based on a table of ...
# Usually I would extract the getData() function into its own file to be # sourced by all plot scripts, but I deliberately decided against it since the # instructions explicitly state that "There should be four PNG files and four # R code files" in my GitHub repository and I want to be formally on the safe # side here....
/plot3.R
no_license
s-bolz/ExData_Plotting1
R
false
false
2,264
r
# Usually I would extract the getData() function into its own file to be # sourced by all plot scripts, but I deliberately decided against it since the # instructions explicitly state that "There should be four PNG files and four # R code files" in my GitHub repository and I want to be formally on the safe # side here....
plotTheme <- function() { theme( plot.title = element_text(size = 14, family = "sans", face = "plain", hjust = 0), plot.subtitle=element_text(size = 11, family = "sans", hjust = 0), plot.caption=element_text(size = 12, family = "sans", face = "italic", hjust = 0), axis.title.x = element_text(size = r...
/qis/vertical_funs.r
no_license
DattaHub/DattaHub.github.io
R
false
false
2,108
r
plotTheme <- function() { theme( plot.title = element_text(size = 14, family = "sans", face = "plain", hjust = 0), plot.subtitle=element_text(size = 11, family = "sans", hjust = 0), plot.caption=element_text(size = 12, family = "sans", face = "italic", hjust = 0), axis.title.x = element_text(size = r...
summary(dataset)
/Mode/demo/spaces/Sales/✔️✔️Loyalty Segmentation.1441b8fdcdc9/notebook/cell-number-4.493391ba49bf.r
no_license
demo-mode/demo-github-sync
R
false
false
16
r
summary(dataset)
#Create mask profile including ocean and interior library(pracma) library(ncdf4) library(maps) setwd("h:/GPCC_1982_2019") nc<-nc_open("full.data_daily_v2018_1982.nc") lon<-ncvar_get(nc,varid = "lon") lat<-ncvar_get(nc,varid = "lat") prcp<-ncvar_get(nc,varid = "precip") nc_close(nc); rm(nc) llon<-which(lon<=-115.5 ...
/data/prcp/gpcc_mask_plot.R
no_license
zpb4/ms_project1
R
false
false
2,330
r
#Create mask profile including ocean and interior library(pracma) library(ncdf4) library(maps) setwd("h:/GPCC_1982_2019") nc<-nc_open("full.data_daily_v2018_1982.nc") lon<-ncvar_get(nc,varid = "lon") lat<-ncvar_get(nc,varid = "lat") prcp<-ncvar_get(nc,varid = "precip") nc_close(nc); rm(nc) llon<-which(lon<=-115.5 ...
build<-function(){ rm(list=ls()) detach("package:reachR") this_script_path<-(dirname(rstudioapi::getActiveDocumentContext()$path)) setwd(this_script_path) getwd() reachr_files<-paste0("./R/", list.files("./R/")) sapply(reachr_files,source) require("roxygen2") require("devtools") roxygenize(clean=T) } build()
/build_package.R
no_license
mabafaba/reachR2
R
false
false
317
r
build<-function(){ rm(list=ls()) detach("package:reachR") this_script_path<-(dirname(rstudioapi::getActiveDocumentContext()$path)) setwd(this_script_path) getwd() reachr_files<-paste0("./R/", list.files("./R/")) sapply(reachr_files,source) require("roxygen2") require("devtools") roxygenize(clean=T) } build()
#:# libraries library(digest) library(mlr) library(OpenML) library(farff) #:# config set.seed(1) #:# data dataset <- getOMLDataSet(data.name = "blogger") head(dataset$data) #:# preprocessing head(dataset$data) #:# model task = makeClassifTask(id = "task", data = dataset$data, target = "Class") lrn = makeLearner("cl...
/models/openml_blogger/classification_Class/86695398211f58c62ccef44fb4a119e3/code.R
no_license
pysiakk/CaseStudies2019S
R
false
false
709
r
#:# libraries library(digest) library(mlr) library(OpenML) library(farff) #:# config set.seed(1) #:# data dataset <- getOMLDataSet(data.name = "blogger") head(dataset$data) #:# preprocessing head(dataset$data) #:# model task = makeClassifTask(id = "task", data = dataset$data, target = "Class") lrn = makeLearner("cl...
\name{closestColor} \alias{closestColor} \title{find color corresponding to an integer} \usage{ closestColor(x, colscale) } \arguments{ \item{x}{number} \item{colscale}{vector representing range of numbers the color scale is representing} } \value{ color (from \code{heat.colors}) that most closely matches \code{...
/man/closestColor.Rd
no_license
jtleek/ballgown
R
false
false
554
rd
\name{closestColor} \alias{closestColor} \title{find color corresponding to an integer} \usage{ closestColor(x, colscale) } \arguments{ \item{x}{number} \item{colscale}{vector representing range of numbers the color scale is representing} } \value{ color (from \code{heat.colors}) that most closely matches \code{...
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #****************************************************************** #* * #* Features2Mart * #* ...
/CustomFunctions/Features2Mart.R
permissive
gretchunkim/NEAT
R
false
false
3,210
r
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ #****************************************************************** #* * #* Features2Mart * #* ...
setwd('/Users/vega/Desktop/MSophtho/coursera R/exploratory') p1df <- read.table('household_power_consumption.txt', sep=';', skip=66637, nrows = 2880) header <- read.table('household_power_consumption.txt', nrows = 1, sep =';') colnames(p1df) <- unlist(header) hist(p1df$Global_active_power, col='red', main="Global Act...
/plot1.R
no_license
saltiago/ExData_Plotting1
R
false
false
378
r
setwd('/Users/vega/Desktop/MSophtho/coursera R/exploratory') p1df <- read.table('household_power_consumption.txt', sep=';', skip=66637, nrows = 2880) header <- read.table('household_power_consumption.txt', nrows = 1, sep =';') colnames(p1df) <- unlist(header) hist(p1df$Global_active_power, col='red', main="Global Act...
library(NISTunits) ### Name: NISTcoulombMeterTOdebye ### Title: Convert coulomb meter to debye ### Aliases: NISTcoulombMeterTOdebye ### Keywords: programming ### ** Examples NISTcoulombMeterTOdebye(10)
/data/genthat_extracted_code/NISTunits/examples/NISTcoulombMeterTOdebye.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
209
r
library(NISTunits) ### Name: NISTcoulombMeterTOdebye ### Title: Convert coulomb meter to debye ### Aliases: NISTcoulombMeterTOdebye ### Keywords: programming ### ** Examples NISTcoulombMeterTOdebye(10)
library(ape) testtree <- read.tree("267_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="267_0_unrooted.txt")
/codeml_files/newick_trees_processed/267_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
133
r
library(ape) testtree <- read.tree("267_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="267_0_unrooted.txt")
library(fields) library(rstan) library(sp) library(rgdal) library(ggplot2) library(mvtnorm) library(maptools) library(maps) library(plyr) source('r/utils/pred_helper_funs.r') ###################################################################################################################################### # user d...
/r/pred_build_data.r
no_license
andydawson/stepps-prediction
R
false
false
23,242
r
library(fields) library(rstan) library(sp) library(rgdal) library(ggplot2) library(mvtnorm) library(maptools) library(maps) library(plyr) source('r/utils/pred_helper_funs.r') ###################################################################################################################################### # user d...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PrepareSQL.R \name{r2hpcc.PrepareSQL} \alias{r2hpcc.PrepareSQL} \title{Use this method to submit a free-hand SQL request for later use as a parameterized query. This compiles the query and returns the Wuid. This Wuid is later used to execute ...
/man/r2hpcc.PrepareSQL.Rd
no_license
hpcc-systems/r2hpcc
R
false
true
917
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PrepareSQL.R \name{r2hpcc.PrepareSQL} \alias{r2hpcc.PrepareSQL} \title{Use this method to submit a free-hand SQL request for later use as a parameterized query. This compiles the query and returns the Wuid. This Wuid is later used to execute ...
#' beta_init_condits. #' #' A function that calculates the initial conditions and the average contact rate and success between unvaccinated susceptibles and infectious individuals #' given the age distributed new hospitalizations by week. The method assumes that the time derivatives of infected variables are zero. #' ...
/functions/beta_init_condits.R
permissive
covid19br/VaxModel-paper
R
false
false
4,675
r
#' beta_init_condits. #' #' A function that calculates the initial conditions and the average contact rate and success between unvaccinated susceptibles and infectious individuals #' given the age distributed new hospitalizations by week. The method assumes that the time derivatives of infected variables are zero. #' ...
## Below are two functions that are used to create a special object ## that stores a square matrix and cache's its inverse. ## This function creates a special "matrix" object that can cache its inverse. ## This is really a list containing a function to ## 1. Set the value of the Matrix ## 2. Get the value of t...
/cachematrix.R
no_license
sreeramkumar/ProgrammingAssignment2
R
false
false
1,314
r
## Below are two functions that are used to create a special object ## that stores a square matrix and cache's its inverse. ## This function creates a special "matrix" object that can cache its inverse. ## This is really a list containing a function to ## 1. Set the value of the Matrix ## 2. Get the value of t...
#' ggtimeline #' #' #' @param x is a data.frame with three columns #' @param begin is the date the timeline begins in the form "dd/mm/yyyy" #' @param end is the date the timeline ends in the form "dd/mm/yyyy" #' @param group Boolean denoting whether activities should be grouped in terms of colour #' #' @return This fu...
/R/charts.R
no_license
G-Thomson/gthor
R
false
false
2,705
r
#' ggtimeline #' #' #' @param x is a data.frame with three columns #' @param begin is the date the timeline begins in the form "dd/mm/yyyy" #' @param end is the date the timeline ends in the form "dd/mm/yyyy" #' @param group Boolean denoting whether activities should be grouped in terms of colour #' #' @return This fu...
############################## ## TOPIC MODELING USING LDA ## ############################## ## ------------------------------------------------------------------------ # Removing stop words library(tidytext) library(dplyr) library(stringr) load("postdata.Rdata") reg = "&quot;|\\$|&lt;" Title <- postdata %>% select(...
/explore/TopicModel/Topic_LDA.R
no_license
vynguyent/Stack_Exchange_Data_Explore
R
false
false
1,324
r
############################## ## TOPIC MODELING USING LDA ## ############################## ## ------------------------------------------------------------------------ # Removing stop words library(tidytext) library(dplyr) library(stringr) load("postdata.Rdata") reg = "&quot;|\\$|&lt;" Title <- postdata %>% select(...
source("/home/mr984/diversity_metrics/scripts/checkplot_initials.R") source("/home/mr984/diversity_metrics/scripts/checkplot_inf.R") reps<-50 outerreps<-1000 size<-rev(round(10^seq(2, 5, 0.25)))[ 7 ] nc<-12 plan(strategy=multisession, workers=nc) map(rev(1:outerreps), function(x){ start<-Sys.time() out<-checkpl...
/scripts/checkplots_for_parallel_amarel/asy_517.R
no_license
dushoff/diversity_metrics
R
false
false
533
r
source("/home/mr984/diversity_metrics/scripts/checkplot_initials.R") source("/home/mr984/diversity_metrics/scripts/checkplot_inf.R") reps<-50 outerreps<-1000 size<-rev(round(10^seq(2, 5, 0.25)))[ 7 ] nc<-12 plan(strategy=multisession, workers=nc) map(rev(1:outerreps), function(x){ start<-Sys.time() out<-checkpl...
#' @title Predictions for a new dataset using an existing probit_bartBMA object #' #' @description This function produces predictions for a new dataset using a previously obtained bartBMA object. #' @param object A probit_bartBMA object obtained using the probit_bartBMA function. #' @param newdata Covariate matrix for...
/R/predict_probit_bartBMA.R
no_license
EoghanONeill/bartBMAnew
R
false
false
2,031
r
#' @title Predictions for a new dataset using an existing probit_bartBMA object #' #' @description This function produces predictions for a new dataset using a previously obtained bartBMA object. #' @param object A probit_bartBMA object obtained using the probit_bartBMA function. #' @param newdata Covariate matrix for...
\name{rate02} \alias{rate02} \docType{data} \title{ Rate data for the year 2002 } \description{ Visual meteor rate data for the year 2002. } \usage{rate02} \format{ A data frame with 13380 observations on the following 34 variables. \describe{ \item{\code{IMOcode}}{factor IMO observer code} \item...
/man/rate02.Rd
no_license
arturochian/MetFns
R
false
false
2,708
rd
\name{rate02} \alias{rate02} \docType{data} \title{ Rate data for the year 2002 } \description{ Visual meteor rate data for the year 2002. } \usage{rate02} \format{ A data frame with 13380 observations on the following 34 variables. \describe{ \item{\code{IMOcode}}{factor IMO observer code} \item...
library(DAMEfinder) DATA_PATH_DIR <- "inst/extdata" get_data_path <- function(file_name) file.path(DATA_PATH_DIR, file_name) bam_files <- sapply(c("CRC1_chr19_trim.bam", "moredata/CRC2_chr19_trim.bam", "moredata/CRC3_chr19_trim.bam", "moredata/CRC4_ch...
/data-raw/extractbams_output.R
permissive
katwre/DAMEfinder
R
false
false
1,391
r
library(DAMEfinder) DATA_PATH_DIR <- "inst/extdata" get_data_path <- function(file_name) file.path(DATA_PATH_DIR, file_name) bam_files <- sapply(c("CRC1_chr19_trim.bam", "moredata/CRC2_chr19_trim.bam", "moredata/CRC3_chr19_trim.bam", "moredata/CRC4_ch...
corr <- function(directory, threshold = 0) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'threshold' is a numeric vector of length 1 indicating the ## number of completely observed observations (on all ## variables) requi...
/corr.R
no_license
addseq/r_datascience
R
false
false
817
r
corr <- function(directory, threshold = 0) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'threshold' is a numeric vector of length 1 indicating the ## number of completely observed observations (on all ## variables) requi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/parametric.R \name{dini.surface} \alias{dini.surface} \title{Dini Surface} \usage{ dini.surface(n = 10000, a = 1, b = 1) } \arguments{ \item{n}{number of points} \item{a}{outer radius of object} \item{b}{space between loops} } \value{ \item...
/man/dini.surface.Rd
no_license
schloerke/geozoo
R
false
true
645
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/parametric.R \name{dini.surface} \alias{dini.surface} \title{Dini Surface} \usage{ dini.surface(n = 10000, a = 1, b = 1) } \arguments{ \item{n}{number of points} \item{a}{outer radius of object} \item{b}{space between loops} } \value{ \item...
# Ex. 6.7 on p. 298) g1 = c(9, 6, 9) g2 = c(0, 2) g3 = c(3, 1, 2) Data <- data.frame(Y = c(g1, g2, g3), Group = factor(rep(c("g1", "g2", "g3"), times=c(length(g1), length(g2), length(g3))))) Data m1 = aov(Y~ Group, data=Data) anova(m1) # Read QueenslandFuel.txt data x <- read.table(file....
/Multivariate Analysis I/class/week5/05-MANOVA.R
no_license
yc3356/courses
R
false
false
1,040
r
# Ex. 6.7 on p. 298) g1 = c(9, 6, 9) g2 = c(0, 2) g3 = c(3, 1, 2) Data <- data.frame(Y = c(g1, g2, g3), Group = factor(rep(c("g1", "g2", "g3"), times=c(length(g1), length(g2), length(g3))))) Data m1 = aov(Y~ Group, data=Data) anova(m1) # Read QueenslandFuel.txt data x <- read.table(file....
setwd("C:/Users/faisal/OneDrive - eSevens/HD Backup/My University/Study/Kanazawa University/Riset/Code/R/AminoAcidComposition") #setwd("C:/Users/M Reza Faisal/Documents/OneDriveBussiness/OneDrive - eSevens/HD Backup/My University/Study/Kanazawa University/Riset/Code/R/AminoAcidComposition") rm(list = ls()) library(ran...
/Step6.OverlappedOriginal.AllFeature.ExistingFeatures.Classification.KSVM.Counter50.Acc.Ver7.R
no_license
rezafaisal/ProteinClassification
R
false
false
10,353
r
setwd("C:/Users/faisal/OneDrive - eSevens/HD Backup/My University/Study/Kanazawa University/Riset/Code/R/AminoAcidComposition") #setwd("C:/Users/M Reza Faisal/Documents/OneDriveBussiness/OneDrive - eSevens/HD Backup/My University/Study/Kanazawa University/Riset/Code/R/AminoAcidComposition") rm(list = ls()) library(ran...