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 |
|---|---|---|---|---|---|---|---|---|---|
#' pcabootAG
#'
#' @description this function produces confidence intervals for the eigenvector components and eigenvalues of a given data set
#' @details This function produces confidence intervals using bootstrap methods as well as theoretical large sample results from Anderson and Girshick
#'
#' @param data the data... | /R/pcabootAG.R | permissive | jacob-moser/MATH4793MOSER | R | false | false | 3,680 | r | #' pcabootAG
#'
#' @description this function produces confidence intervals for the eigenvector components and eigenvalues of a given data set
#' @details This function produces confidence intervals using bootstrap methods as well as theoretical large sample results from Anderson and Girshick
#'
#' @param data the data... |
library(RUVSeq)
mat <- matrix(data=rpois(100, lambda=10), ncol=10)
rownames(mat) <- paste("gene", 1:10, sep="")
es <- newSeqExpressionSet(mat)
## dimension of W
ks <- 1:5
## matrix
r1 <- lapply(ks, function(k) RUVg(mat, 1:10, k))
print(sapply(r1, function(x) dim(x$W)))
stopifnot(all(lapply(r1, function(x) dim(x$W)... | /tests/RUVg.R | no_license | drisso/RUVSeq | R | false | false | 1,188 | r | library(RUVSeq)
mat <- matrix(data=rpois(100, lambda=10), ncol=10)
rownames(mat) <- paste("gene", 1:10, sep="")
es <- newSeqExpressionSet(mat)
## dimension of W
ks <- 1:5
## matrix
r1 <- lapply(ks, function(k) RUVg(mat, 1:10, k))
print(sapply(r1, function(x) dim(x$W)))
stopifnot(all(lapply(r1, function(x) dim(x$W)... |
## code to prepare `earthquakes` dataset goes here
library(magrittr)
raw_data <- readr::read_delim("data-raw/earthquakes.tsv", "\t") %>%
readr::write_csv(file.path("data-raw", "raw_data.csv"))
earthquakes <- raw_data %>%
eq_location_clean() %>%
eq_clean_data() %>%
dplyr::select(date,
country... | /data-raw/setup.R | permissive | odiliameneses/earthquakes | R | false | false | 607 | r | ## code to prepare `earthquakes` dataset goes here
library(magrittr)
raw_data <- readr::read_delim("data-raw/earthquakes.tsv", "\t") %>%
readr::write_csv(file.path("data-raw", "raw_data.csv"))
earthquakes <- raw_data %>%
eq_location_clean() %>%
eq_clean_data() %>%
dplyr::select(date,
country... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reproDataCheck.R
\name{reproDataCheck}
\alias{reproDataCheck}
\title{Checks if an object can be used to perform reproduction toxicity data analysis}
\usage{
reproDataCheck(data, diagnosis.plot = TRUE)
}
\arguments{
\item{data}{any object}
\i... | /man/reproDataCheck.Rd | no_license | cran/morse | R | false | true | 2,047 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reproDataCheck.R
\name{reproDataCheck}
\alias{reproDataCheck}
\title{Checks if an object can be used to perform reproduction toxicity data analysis}
\usage{
reproDataCheck(data, diagnosis.plot = TRUE)
}
\arguments{
\item{data}{any object}
\i... |
"_________________________________NAIVE BAYES_________________________________________"
#Library
library(tm)
library(textcat)
setwd("D:\\STUDY PROCESS\\Excelr\\Assignments\\Pending\\Navie Bayes")
# Question Ham And Spam Mail Filtering
message <- read.csv("sms_raw_NB.csv",stringsAsFactors = F)
head(message)
message$t... | /NavieBayes/neoNavieBayes.R | no_license | neoaman/Assignments_ExcelR_Solutions | R | false | false | 2,576 | r | "_________________________________NAIVE BAYES_________________________________________"
#Library
library(tm)
library(textcat)
setwd("D:\\STUDY PROCESS\\Excelr\\Assignments\\Pending\\Navie Bayes")
# Question Ham And Spam Mail Filtering
message <- read.csv("sms_raw_NB.csv",stringsAsFactors = F)
head(message)
message$t... |
library(pbdTEST)
settings(mpi=TRUE)
.BLDIM <- 2
comm.set.seed(seed=1234, diff=FALSE)
### --------------------------------------
module("Reductions")
M <- 250
N <- 250
# M<- N<- 10
BL <- 4
x <- matrix(rnorm(M*N, 10, 100), M, N)
dx <- as.ddmatrix(x, BL)
x[1,1] <- x[1,1] + 1
dy <- as.ddmatrix(x, BL)
submodule("any, ... | /pbdDMAT/inst/tests/10_reductions.R | no_license | ingted/R-Examples | R | false | false | 2,117 | r | library(pbdTEST)
settings(mpi=TRUE)
.BLDIM <- 2
comm.set.seed(seed=1234, diff=FALSE)
### --------------------------------------
module("Reductions")
M <- 250
N <- 250
# M<- N<- 10
BL <- 4
x <- matrix(rnorm(M*N, 10, 100), M, N)
dx <- as.ddmatrix(x, BL)
x[1,1] <- x[1,1] + 1
dy <- as.ddmatrix(x, BL)
submodule("any, ... |
#Read the file
data<-read.table("household_power_consumption.txt",header = TRUE,sep = ";")
#Format the Date
data$Date <- as.Date(data$Date,"%d/%m/%Y")
#Subset the data with Date of "2007-02-01" & "2007-02-02"
subdata<-data[which(data$Date=="2007-02-01" | data$Date=="2007-02-02"),]
#Create Plot1 and output... | /plot1.R | no_license | ewoliver/ExData_Plotting1 | R | false | false | 603 | r | #Read the file
data<-read.table("household_power_consumption.txt",header = TRUE,sep = ";")
#Format the Date
data$Date <- as.Date(data$Date,"%d/%m/%Y")
#Subset the data with Date of "2007-02-01" & "2007-02-02"
subdata<-data[which(data$Date=="2007-02-01" | data$Date=="2007-02-02"),]
#Create Plot1 and output... |
pollutantmean <- function(directory, pollutant, id = 1:332) {
##create a character vector of the names of files in the named directory.
files <- list.files(directory ,full.names = TRUE)
##create data frame to load data into
dat <- data.frame()
##create a 'for loop' to enter data into the data frame
... | /pollutantmean.R | no_license | Hippoplex/specdata | R | false | false | 487 | r | pollutantmean <- function(directory, pollutant, id = 1:332) {
##create a character vector of the names of files in the named directory.
files <- list.files(directory ,full.names = TRUE)
##create data frame to load data into
dat <- data.frame()
##create a 'for loop' to enter data into the data frame
... |
################################################################################
# #
# WBP Demographic Model LAI data #
# ... | /Code/Keane LAI data .R | no_license | erpansing/WBPdemographicModel | R | false | false | 6,057 | r | ################################################################################
# #
# WBP Demographic Model LAI data #
# ... |
library(tidyverse)
#Random sample of 10000 SNPs from the full data set
data.geno = read_csv("Rice_44K_genotypes.csv.gz",
na=c("NA","00"))
data.geno = data.geno %>% select(-`6_17160794_1`)
names(data.geno)[1] = "ID"
data.geno.10000 = data.geno[,c(1,sample(2:ncol(data.geno),10000))]
geno.... | /GWAS of Indica and Japonica rice varieties.R | no_license | ian-whaling/GWAS-of-Indica-and-Japonica-rice-varieties | R | false | false | 7,420 | r | library(tidyverse)
#Random sample of 10000 SNPs from the full data set
data.geno = read_csv("Rice_44K_genotypes.csv.gz",
na=c("NA","00"))
data.geno = data.geno %>% select(-`6_17160794_1`)
names(data.geno)[1] = "ID"
data.geno.10000 = data.geno[,c(1,sample(2:ncol(data.geno),10000))]
geno.... |
# libraries ----
library(tidyverse)
library(here)
library(glue)
# variables ----
mpas_csv <- here("data/mpas.csv")
# make MPAs ----
mpas <- read_csv(mpas_csv, col_types=cols()) %>%
arrange(mpa_name)
make_mpa <- function(mpa_id, mpa_name, formats=c("html")){
# mpa_id = mpas$mpa_id[1]
# show message of progr... | /make.R | permissive | mci/mpatlas-report4r | R | false | false | 966 | r | # libraries ----
library(tidyverse)
library(here)
library(glue)
# variables ----
mpas_csv <- here("data/mpas.csv")
# make MPAs ----
mpas <- read_csv(mpas_csv, col_types=cols()) %>%
arrange(mpa_name)
make_mpa <- function(mpa_id, mpa_name, formats=c("html")){
# mpa_id = mpas$mpa_id[1]
# show message of progr... |
###############################################################################
## Applies mirror boundary conditions to a 1d or 2d object. Implemented in R ##
## version 3.4.3. Last update: Fuks 180203 ##
#############################################################################... | /mirrorbound.r | no_license | jonas-raposinha/R-trend-correct | R | false | false | 1,578 | r | ###############################################################################
## Applies mirror boundary conditions to a 1d or 2d object. Implemented in R ##
## version 3.4.3. Last update: Fuks 180203 ##
#############################################################################... |
### Set WD
setwd('/media/FD/RMISC/DaphStats/')
# Get the data
source('./preproc.R')
TABLES <- list(atcd = atcd2[-(1:4)], tech=tech2[-(1:5)], post=post2[-(1:7)]) #2 to get the modified names
tablenames <- names(TABLES)
dir.create('../DATA/', showWarnings=F)
save.image('../DATA/DBs.RData', safe = TRUE)
## Update the... | /legacy/web/DBWEB_get_data.R | no_license | antoine-lizee/Promonto-stats | R | false | false | 523 | r | ### Set WD
setwd('/media/FD/RMISC/DaphStats/')
# Get the data
source('./preproc.R')
TABLES <- list(atcd = atcd2[-(1:4)], tech=tech2[-(1:5)], post=post2[-(1:7)]) #2 to get the modified names
tablenames <- names(TABLES)
dir.create('../DATA/', showWarnings=F)
save.image('../DATA/DBs.RData', safe = TRUE)
## Update the... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/webpower.R
\name{wp.mc.chisq.diff}
\alias{wp.mc.chisq.diff}
\title{Statistical Power Analysis for SEM Based on Chi-square Difference Test}
\usage{
wp.mc.chisq.diff(full.model.pop, full.model,
reduced.model, N=100, R=1000, alpha=0.05)
... | /man/wp.mc.chisq.diff.Rd | no_license | cran/WebPower | R | false | true | 1,748 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/webpower.R
\name{wp.mc.chisq.diff}
\alias{wp.mc.chisq.diff}
\title{Statistical Power Analysis for SEM Based on Chi-square Difference Test}
\usage{
wp.mc.chisq.diff(full.model.pop, full.model,
reduced.model, N=100, R=1000, alpha=0.05)
... |
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837635476L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /IntervalSurgeon/inst/testfiles/rcpp_pile/AFL_rcpp_pile/rcpp_pile_valgrind_files/1609860290-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 729 | r | testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837635476L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
71ff1be93a9cb17f222962f65f056dac query33_query08_1344.qdimacs 954 2223 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/A1/Database/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query33_query08_1344/query33_query08_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 70 | r | 71ff1be93a9cb17f222962f65f056dac query33_query08_1344.qdimacs 954 2223 |
library(highcharter)
### Name: hc_theme_ggplot2
### Title: ggplot2 theme for highcharts
### Aliases: hc_theme_ggplot2
### ** Examples
highcharts_demo() %>%
hc_add_theme(hc_theme_ggplot2())
| /data/genthat_extracted_code/highcharter/examples/hc_theme_ggplot2.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 203 | r | library(highcharter)
### Name: hc_theme_ggplot2
### Title: ggplot2 theme for highcharts
### Aliases: hc_theme_ggplot2
### ** Examples
highcharts_demo() %>%
hc_add_theme(hc_theme_ggplot2())
|
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 28942
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 28942
c
c Input Parameter (command line, file):
c input filename QBFLIB/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#3.E#134.A#48.c#.w#9.s#27.asp/ctrl.e#1.a#3.E#134.A#48.c#.w#9.s#27.asp.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 732 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 28942
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 28942
c
c Input Parameter (command line, file):
c input filename QBFLIB/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#... |
Est.PI <-
function(group.data, conf=.95){
if(missing(group.data))
stop("group.data is missing.")
# Check the number of groups
numGroups <- length(group.data)
# Make sure we have the same columns
taxaCounts <- sapply(group.data, ncol)
numTaxa <- taxaCounts[1]
if(any(taxaCounts != numTaxa)){
wa... | /R/Est.PI.R | no_license | cran/HMP | R | false | false | 4,227 | r | Est.PI <-
function(group.data, conf=.95){
if(missing(group.data))
stop("group.data is missing.")
# Check the number of groups
numGroups <- length(group.data)
# Make sure we have the same columns
taxaCounts <- sapply(group.data, ncol)
numTaxa <- taxaCounts[1]
if(any(taxaCounts != numTaxa)){
wa... |
##Webscrapping Trial Run
library(rvest)
library(httr)
col = POST(url="https://sanctionssearch.ofac.treas.gov/",
encode="form",
body=list(Name="NAME OF ENTITY",
search="Search"))
col_html = read_html(col)
col_table = html_table(col_html,fill=F)
## Run selenium through docker
... | /Side Projects/Webscrapping_screenshot.R | no_license | remembrance1/Essential-R-Codes | R | false | false | 365 | r | ##Webscrapping Trial Run
library(rvest)
library(httr)
col = POST(url="https://sanctionssearch.ofac.treas.gov/",
encode="form",
body=list(Name="NAME OF ENTITY",
search="Search"))
col_html = read_html(col)
col_table = html_table(col_html,fill=F)
## Run selenium through docker
... |
library(tm)
library(wordcloud2)
library(plyr)
library(ggplot2)
library(dplyr)
library(tidytext)
library(writexl)
setwd("C:\\Users\\Lynn\\Dropbox\\BA\\17Fa\\BUAN 6357\\Assignment\\Assignment_2")
test <- read.csv('FewProducts.csv', stringsAsFactors=FALSE)
afinn <- read.table('AFINN-111.txt', stringsAsFactors=FALSE)
# Q... | /02_Natural Language Processing/for_tf_idf.R | no_license | xyLynn/RShiny | R | false | false | 3,104 | r | library(tm)
library(wordcloud2)
library(plyr)
library(ggplot2)
library(dplyr)
library(tidytext)
library(writexl)
setwd("C:\\Users\\Lynn\\Dropbox\\BA\\17Fa\\BUAN 6357\\Assignment\\Assignment_2")
test <- read.csv('FewProducts.csv', stringsAsFactors=FALSE)
afinn <- read.table('AFINN-111.txt', stringsAsFactors=FALSE)
# Q... |
library (ggvis)
library (tidyr)
rdata_file <- '../train_agg3.RData'
rtest_file <- '../test_agg3.RData'
run_id_pref <- 'csv_out/xgbm_allvars_100pct'
solver_script <- '../dave/gbm_cv.R'
create_submission <- FALSE
cv_frac_trn <- 1.0
tcheck.print <- TRUE
set_rain_thresh <- 65
mae_res <- data.frame()
run_time <- numeric(... | /dave/run_xgbm.R | no_license | dsdaveh/weddingcap_rain | R | false | false | 2,733 | r | library (ggvis)
library (tidyr)
rdata_file <- '../train_agg3.RData'
rtest_file <- '../test_agg3.RData'
run_id_pref <- 'csv_out/xgbm_allvars_100pct'
solver_script <- '../dave/gbm_cv.R'
create_submission <- FALSE
cv_frac_trn <- 1.0
tcheck.print <- TRUE
set_rain_thresh <- 65
mae_res <- data.frame()
run_time <- numeric(... |
# install.packages("ggdendro")
# install.packages("knitr")
# Load required libraries
suppressPackageStartupMessages({
library(configr) # NOT Required for Faust - Helps with user configurations
library(flowWorkspaceData) # Required for Faust
library(flowWorkspace) # Required for Faust
#... | /run_faust.R | no_license | FredHutch/FAUST_local | R | false | false | 4,032 | r | # install.packages("ggdendro")
# install.packages("knitr")
# Load required libraries
suppressPackageStartupMessages({
library(configr) # NOT Required for Faust - Helps with user configurations
library(flowWorkspaceData) # Required for Faust
library(flowWorkspace) # Required for Faust
#... |
source("Load data.R")
#Filter the data ith respect to baltimore and Los Angeles.
plot6_subdata <- subset(neidf, fips %in% c("24510","06037") & type == "ON-ROAD")
#sum the total emission for the respective cities.
aggregate(Emissions~(year+fips), plot6_subdata, sum) ->tot_plot6
colnames(tot_plot6)[2] <- "City"
... | /plot6.R | no_license | haripriyarishikesh/Exploratory-Data-Analysis-Course-Project-2 | R | false | false | 955 | r | source("Load data.R")
#Filter the data ith respect to baltimore and Los Angeles.
plot6_subdata <- subset(neidf, fips %in% c("24510","06037") & type == "ON-ROAD")
#sum the total emission for the respective cities.
aggregate(Emissions~(year+fips), plot6_subdata, sum) ->tot_plot6
colnames(tot_plot6)[2] <- "City"
... |
##### Version:2
##### Update Date:2020-02-12
setwd("~/137_share/147_backup/VIP/")
annovar_path<-"~/137_share/147_backup/annovar/"
interpretor_path<-"~/137_share/147_backup/interpretation/"
## check required packages
# if(!requireNamespace("data.table", quietly = TRUE)){
# install.packages("data.table")
# }else i... | /my_annotation_pipeline.R | no_license | cadilac7882/NCKUH_interpretion | R | false | false | 4,009 | r | ##### Version:2
##### Update Date:2020-02-12
setwd("~/137_share/147_backup/VIP/")
annovar_path<-"~/137_share/147_backup/annovar/"
interpretor_path<-"~/137_share/147_backup/interpretation/"
## check required packages
# if(!requireNamespace("data.table", quietly = TRUE)){
# install.packages("data.table")
# }else i... |
##### Book name: Beginning R
##### Author: Larry Pace
##### Published: 2012
##### Chapter 1: Getting R and Getting Started
##### Working with Data in R
# Vectors are most common data type in R, must be homogenous (all same data types--
# character, numeric or logical--but if mixed may be coerced (forced) into... | /PaceBeginningR.R | no_license | lenexajayhawk/R-Scripts | R | false | false | 45,941 | r | ##### Book name: Beginning R
##### Author: Larry Pace
##### Published: 2012
##### Chapter 1: Getting R and Getting Started
##### Working with Data in R
# Vectors are most common data type in R, must be homogenous (all same data types--
# character, numeric or logical--but if mixed may be coerced (forced) into... |
#This Method 'read.nii' can read NIFTI S4 class from .nii files
setGeneric("read.nii",function(object, filename) standardGeneric("read.nii"));
setMethod("read.nii", signature(object = "nifti_one"), function(object, filename)
{
object <- new('nifti_one')
con <- file(filename,'rb');
endian <- if ((sizeof_hdr <... | /Brainbase/R/readNIFTI.R | no_license | haixiao990/BrainConductor | R | false | false | 10,394 | r |
#This Method 'read.nii' can read NIFTI S4 class from .nii files
setGeneric("read.nii",function(object, filename) standardGeneric("read.nii"));
setMethod("read.nii", signature(object = "nifti_one"), function(object, filename)
{
object <- new('nifti_one')
con <- file(filename,'rb');
endian <- if ((sizeof_hdr <... |
library("dplyr")
library("magrittr")
library("data.table")
library("RCurl")
library("XML")
library("httr")
library("jsonlite")
#### Get Dig Data ####
load("01Data_alldig.RData")
load("01Data_case1.RData")
load("01Data_case2.RData")
#### 建立資料表 ####
appcase<-mutate(lottery.case2,StartDate=as.Date(AllowStart))
appcas... | /02toXML.R | no_license | lzxccc/110DigEvaluation | R | false | false | 7,688 | r | library("dplyr")
library("magrittr")
library("data.table")
library("RCurl")
library("XML")
library("httr")
library("jsonlite")
#### Get Dig Data ####
load("01Data_alldig.RData")
load("01Data_case1.RData")
load("01Data_case2.RData")
#### 建立資料表 ####
appcase<-mutate(lottery.case2,StartDate=as.Date(AllowStart))
appcas... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estP.r
\name{estP}
\alias{estP}
\title{Estimate atmospheric pressure (P)}
\usage{
estP(elev, control = list(Tko = 20))
}
\arguments{
\item{elev}{elevation [m]}
\item{control}{list for control parameters and empirical factors defined in
\code... | /man/estP.Rd | no_license | cran/MeTo | R | false | true | 1,137 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/estP.r
\name{estP}
\alias{estP}
\title{Estimate atmospheric pressure (P)}
\usage{
estP(elev, control = list(Tko = 20))
}
\arguments{
\item{elev}{elevation [m]}
\item{control}{list for control parameters and empirical factors defined in
\code... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_gmm.R
\name{sargan}
\alias{sargan}
\title{Hansen--Sargan Test of Overidentifying Restrictions}
\usage{
sargan(object, weights = c("twosteps", "onestep"))
}
\arguments{
\item{object}{an object of class \code{"pgmm"},}
\item{weights}{the w... | /man/sargan.Rd | no_license | cran/plm | R | false | true | 1,271 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/est_gmm.R
\name{sargan}
\alias{sargan}
\title{Hansen--Sargan Test of Overidentifying Restrictions}
\usage{
sargan(object, weights = c("twosteps", "onestep"))
}
\arguments{
\item{object}{an object of class \code{"pgmm"},}
\item{weights}{the w... |
##### info ####
# file: elymus_seedling_seed_production_model_2019_density_exp
# author: Amy Kendig
# date last edited: 11/12/20
# goal: estimate Elymus seedling seed production based on density and fungicide treatments
#### set up ####
# clear all existing data
rm(list=ls())
# load packages
library(tidyverse)
lib... | /code/elymus_seedling_seed_production_model_2019_density_exp.R | no_license | aekendig/microstegium-bipolaris | R | false | false | 6,113 | r | ##### info ####
# file: elymus_seedling_seed_production_model_2019_density_exp
# author: Amy Kendig
# date last edited: 11/12/20
# goal: estimate Elymus seedling seed production based on density and fungicide treatments
#### set up ####
# clear all existing data
rm(list=ls())
# load packages
library(tidyverse)
lib... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{gather_nrg}
\alias{gather_nrg}
\title{A function}
\usage{
gather_nrg(df)
}
\description{
This function allows you to
}
\examples{
gather_nrg()
}
| /man/gather_nrg.Rd | no_license | srhoads/srhoads | R | false | true | 241 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{gather_nrg}
\alias{gather_nrg}
\title{A function}
\usage{
gather_nrg(df)
}
\description{
This function allows you to
}
\examples{
gather_nrg()
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClasses.R
\docType{class}
\name{asinht-class}
\alias{asinht-class}
\alias{asinht}
\alias{eval,asinht,missing-method}
\title{Class "asinht"}
\description{
Inverse hyperbolic sine transform class, which represents a transformation
defined b... | /man/asinht-class.Rd | no_license | RGLab/flowCore | R | false | true | 2,753 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClasses.R
\docType{class}
\name{asinht-class}
\alias{asinht-class}
\alias{asinht}
\alias{eval,asinht,missing-method}
\title{Class "asinht"}
\description{
Inverse hyperbolic sine transform class, which represents a transformation
defined b... |
preproc <- function(filename) {
source('util/set_features.R')
source('util/set_kernel.R')
source('util/check_accuracy.R')
source('util/tobool.R')
source('util/fix_preproc_name_inconsistency.R');
if (!set_features('kernel_')) {
return(TRUE)
}
pname <- fix_preproc_name_inconsistency(preproc_name)
if (regexpr... | /JS-CS-Detection-byExample/Dataset (ALERT 5 GB)/362764/shogun-1.1.0/shogun-1.1.0/testsuite/r_static/preproc.R | permissive | mkaouer/Code-Smells-Detection-in-JavaScript | R | false | false | 846 | r | preproc <- function(filename) {
source('util/set_features.R')
source('util/set_kernel.R')
source('util/check_accuracy.R')
source('util/tobool.R')
source('util/fix_preproc_name_inconsistency.R');
if (!set_features('kernel_')) {
return(TRUE)
}
pname <- fix_preproc_name_inconsistency(preproc_name)
if (regexpr... |
#Read the "Human development" and "Gender inequality" datas into R.
hd <- read.csv("http://s3.amazonaws.com/assets.datacamp.com/production/course_2218/datasets/human_development.csv", stringsAsFactors = F)
gii <- read.csv("http://s3.amazonaws.com/assets.datacamp.com/production/course_2218/datasets/gender_inequality... | /data/create_human.R | no_license | EmmDah/IODS-project | R | false | false | 4,160 | r |
#Read the "Human development" and "Gender inequality" datas into R.
hd <- read.csv("http://s3.amazonaws.com/assets.datacamp.com/production/course_2218/datasets/human_development.csv", stringsAsFactors = F)
gii <- read.csv("http://s3.amazonaws.com/assets.datacamp.com/production/course_2218/datasets/gender_inequality... |
## Run analysis, write model results
## Before: VME_scores.csv (data)
## VME_survey_method.csv (data)
## VMEdb_Extraction_formatted.csv (data)
## After: Score_confidence.csv (model)
library(icesTAF)
library(data.table)
library(dplyr)
mkdir("model")
# Read VME indicator list with score; as agreed in ... | /vme_weighting_algorithm/model.R | no_license | ices-eg/wg_WGDEC | R | false | false | 9,635 | r | ## Run analysis, write model results
## Before: VME_scores.csv (data)
## VME_survey_method.csv (data)
## VMEdb_Extraction_formatted.csv (data)
## After: Score_confidence.csv (model)
library(icesTAF)
library(data.table)
library(dplyr)
mkdir("model")
# Read VME indicator list with score; as agreed in ... |
library(stats)
library(gplots)
library(cluster)
#computes cosine distance function
cosineDist <- function(x){
as.dist( 1-x%*%t(x)/(sqrt(rowSums(x^2) %*% t(rowSums(x^2)))))
}
#computes pearson correlation distance function
dist2 <- function(x, ...)
as.dist(1-cor(t(x),method="pearson"))
hierarchical <... | /hierarchical_clustering.R | no_license | amorrowunm7/Predictive | R | false | false | 3,159 | r | library(stats)
library(gplots)
library(cluster)
#computes cosine distance function
cosineDist <- function(x){
as.dist( 1-x%*%t(x)/(sqrt(rowSums(x^2) %*% t(rowSums(x^2)))))
}
#computes pearson correlation distance function
dist2 <- function(x, ...)
as.dist(1-cor(t(x),method="pearson"))
hierarchical <... |
#########################################
# Load libraries
#########################################
library(dplyr)
library(ggplot2)
library(ggExtra) # for boxplots on sides of scatterplot
library(scales) # for better ticks spacing on axis
#########################################
# settings manipulation for fig
... | /R/safety_shift_plot.R | permissive | zsigmas/safetyCharts | R | false | false | 4,009 | r | #########################################
# Load libraries
#########################################
library(dplyr)
library(ggplot2)
library(ggExtra) # for boxplots on sides of scatterplot
library(scales) # for better ticks spacing on axis
#########################################
# settings manipulation for fig
... |
colNames <- c(
'geoid',
'geoid2',
'geo_display',
'total',
'total_err',
'white',
'white_err',
'black',
'black_err',
'native',
'native_err',
'asian',
'asian_err',
'pacific',
'pacific_err',
'other',
'other_err',
'two',
'two_err',
'three',
'three_err',
'other',
'other_err')
ce... | /Census.R | no_license | MeredithConroy/Census-race-data | R | false | false | 623 | r | colNames <- c(
'geoid',
'geoid2',
'geo_display',
'total',
'total_err',
'white',
'white_err',
'black',
'black_err',
'native',
'native_err',
'asian',
'asian_err',
'pacific',
'pacific_err',
'other',
'other_err',
'two',
'two_err',
'three',
'three_err',
'other',
'other_err')
ce... |
library(splatter)
source("LAK.R")
library(SC3)
library(mclust)
dropout <- function(x){
length(which(x==0))/(ncol(x)*nrow(x))
}
#params.groups1 <- newSplatParams(batchCells = 1000, nGenes = 20000,dropout.type="none")
# One small group, one big group
#sim1 <- splatSimulateGroups(params.groups1, group.... | /R Scripts/simulate_1000.R | no_license | HIT-biostatistical/LAK | R | false | false | 6,239 | r |
library(splatter)
source("LAK.R")
library(SC3)
library(mclust)
dropout <- function(x){
length(which(x==0))/(ncol(x)*nrow(x))
}
#params.groups1 <- newSplatParams(batchCells = 1000, nGenes = 20000,dropout.type="none")
# One small group, one big group
#sim1 <- splatSimulateGroups(params.groups1, group.... |
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shiny)
# Load the ggplot2 package which provides
# the 'mpg' datas... | /ui.R | no_license | akohli70/Developing_Data_Products | R | false | false | 1,183 | r | #
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shiny)
# Load the ggplot2 package which provides
# the 'mpg' datas... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/weirds.R
\name{weirds_list}
\alias{weirds_list}
\title{Provides the list of available methods}
\usage{
weirds_list(onlynames = FALSE)
}
\arguments{
\item{onlynames}{- logical: should be return some details or only the nickname
of methods to b... | /man/weirds_list.Rd | no_license | welovedatascience/stranger | R | false | true | 484 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/weirds.R
\name{weirds_list}
\alias{weirds_list}
\title{Provides the list of available methods}
\usage{
weirds_list(onlynames = FALSE)
}
\arguments{
\item{onlynames}{- logical: should be return some details or only the nickname
of methods to b... |
#' Prior predictive checks
#'
#' @param n_draws An integer that indicates how many time-series will be
#' returned.
#' @inheritParams read_xmile
#' @inheritParams sd_Bayes
#' @inheritParams sd_simulate
#'
#' @return A list of two data frames.
#' @export
#'
#' @examples
#' filepath <- system.file("models/", "SEIR.st... | /R/prior_checks.R | permissive | jandraor/readsdr | R | false | false | 2,741 | r | #' Prior predictive checks
#'
#' @param n_draws An integer that indicates how many time-series will be
#' returned.
#' @inheritParams read_xmile
#' @inheritParams sd_Bayes
#' @inheritParams sd_simulate
#'
#' @return A list of two data frames.
#' @export
#'
#' @examples
#' filepath <- system.file("models/", "SEIR.st... |
# Graph 2: Violin plot of Album Ranks by Decade
library(dplyr)
library(ggplot2)
plot2 <- function(dataset) {
artist_data <- dataset %>%
mutate("decade" = floor(Year / 10) * 10)
artist_data$decade <- as.factor(artist_data$decade)
plot_ly(x = ~artist_data$decade, y = ~artist_data$Number,
split = ~artist_... | /scripts/chart2.R | no_license | sjain1224/purple_wranglers | R | false | false | 548 | r | # Graph 2: Violin plot of Album Ranks by Decade
library(dplyr)
library(ggplot2)
plot2 <- function(dataset) {
artist_data <- dataset %>%
mutate("decade" = floor(Year / 10) * 10)
artist_data$decade <- as.factor(artist_data$decade)
plot_ly(x = ~artist_data$decade, y = ~artist_data$Number,
split = ~artist_... |
#' @title DataReviewFile
#'
#' @import openxlsx
#'
#' @description Exports the data review of all tables in lists to an excel file
#'
#' @param pathfile: the path of the xlsx file where you want your output
#' listTables: list of the names of all the tables you want to include in your review
#'
#' @return NULL
#'
#' @e... | /R/DataReview.R | no_license | elecmc03/DataReview | R | false | false | 1,639 | r | #' @title DataReviewFile
#'
#' @import openxlsx
#'
#' @description Exports the data review of all tables in lists to an excel file
#'
#' @param pathfile: the path of the xlsx file where you want your output
#' listTables: list of the names of all the tables you want to include in your review
#'
#' @return NULL
#'
#' @e... |
#' Bruno is an R package of Bruno's random packages.
#'
#' @docType package
#' @name bruno
#' @import yaml RJDBC RPostgreSQL
NULL
| /R/bruno-package.R | permissive | bruno615/bruno | R | false | false | 130 | r | #' Bruno is an R package of Bruno's random packages.
#'
#' @docType package
#' @name bruno
#' @import yaml RJDBC RPostgreSQL
NULL
|
# Coursera - Developing Data Products- Course Project
# Authour: Velladurai of Malaysia
# server.R file for the shiny app
# This app was developed to help people choose the best car for their trip,
# using mtcars dataset, from [R]
library(shiny)
library(datasets)
library(dplyr)
shinyServer(function(input, output) ... | /Server.R | no_license | MSCDataScience/Developing_Data_Products | R | false | false | 1,208 | r | # Coursera - Developing Data Products- Course Project
# Authour: Velladurai of Malaysia
# server.R file for the shiny app
# This app was developed to help people choose the best car for their trip,
# using mtcars dataset, from [R]
library(shiny)
library(datasets)
library(dplyr)
shinyServer(function(input, output) ... |
# load necessary packages
libs <- c("tidyverse", "stringr", "readr", "dplyr", "ggplot2", "readstata13","foreign",
"magrittr","lubridate","here","ggrepel","treemapify","packcircles", "ggalluvial","ggrepel",
"extrafont","ggfittext","cowplot","googleway","ggspatial","sf","rnaturalearth",
"rn... | /d3_data_assembly.R | no_license | DSharm/cook-county-SAO-d3 | R | false | false | 20,295 | r | # load necessary packages
libs <- c("tidyverse", "stringr", "readr", "dplyr", "ggplot2", "readstata13","foreign",
"magrittr","lubridate","here","ggrepel","treemapify","packcircles", "ggalluvial","ggrepel",
"extrafont","ggfittext","cowplot","googleway","ggspatial","sf","rnaturalearth",
"rn... |
#' Clip CHM Data Based on extent of RGB file
#'
#' @param rgb_filename path to a projected file to extract coordinates
#' @param year year to match in CHM files
#' @param tif_base_dir where to search for CHM files
#' @param save_dir base path to save cropped files
#' @return Saved tif files for each plot
#' @importFrom... | /R/crop_target_CHM.R | no_license | weecology/TreeSegmentation | R | false | false | 1,525 | r | #' Clip CHM Data Based on extent of RGB file
#'
#' @param rgb_filename path to a projected file to extract coordinates
#' @param year year to match in CHM files
#' @param tif_base_dir where to search for CHM files
#' @param save_dir base path to save cropped files
#' @return Saved tif files for each plot
#' @importFrom... |
/4_capitalizacion_de_mercado.r | no_license | alejandroguipe/mercadobvc | R | false | false | 10,115 | r | ||
rm(list=ls())
# ==============
# Load libraries
# ==============
library(reshape2)
library(foreign)
library(tcltk)
library(dplyr)
library(lazyeval)
#===============
# Specify Inputs
#===============
inputsFilePath <- "C:/KPONEIL/GitHub/projects/shedsData/basinCharacteristics/zonalStatistics/INPUTS_NHDHRDV2.txt"
barr... | /basinCharacteristics/zonalStatistics/NHDHRDV2_3a_calculateUpstreamStatistics (TNC Dams).R | no_license | tarsacha/shedsGisData | R | false | false | 4,427 | r | rm(list=ls())
# ==============
# Load libraries
# ==============
library(reshape2)
library(foreign)
library(tcltk)
library(dplyr)
library(lazyeval)
#===============
# Specify Inputs
#===============
inputsFilePath <- "C:/KPONEIL/GitHub/projects/shedsData/basinCharacteristics/zonalStatistics/INPUTS_NHDHRDV2.txt"
barr... |
#rm(list =ls())
#wwd <- setwd("C:/Users/Dominic Cyr/Dropbox/NorthShore")
wwd <- getwd()
simInfo <- read.csv("simInfo.csv", colClasses = c(simDir = "character"))
simDir <- simInfo$simDir
require(parallel)
require(doSNOW)
n <- floor(detectCores() * 0.90)
# #######
cl = makeCluster(n, outfile = "") ##
registerDoSNOW(c... | /biasCorrection/SudStlBlank/simPilot.R | no_license | onetreetwotrees/PicusToLandisIIBiomassSuccession | R | false | false | 656 | r | #rm(list =ls())
#wwd <- setwd("C:/Users/Dominic Cyr/Dropbox/NorthShore")
wwd <- getwd()
simInfo <- read.csv("simInfo.csv", colClasses = c(simDir = "character"))
simDir <- simInfo$simDir
require(parallel)
require(doSNOW)
n <- floor(detectCores() * 0.90)
# #######
cl = makeCluster(n, outfile = "") ##
registerDoSNOW(c... |
#plot
percent_plot <- function(well_data,test_compound)
{
percent_data <- well_data %>% filter(var_compound == test_compound | !is.na(control))
compound_percent_data <- percent_data %>% mutate( concentration = ifelse( is.na(control),concentration,0) ) %>%
group_by(content... | /R_Code/percent_plot.R | no_license | ceparman/Imaging-App | R | false | false | 1,752 | r |
#plot
percent_plot <- function(well_data,test_compound)
{
percent_data <- well_data %>% filter(var_compound == test_compound | !is.na(control))
compound_percent_data <- percent_data %>% mutate( concentration = ifelse( is.na(control),concentration,0) ) %>%
group_by(content... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tar_option_set.R
\name{tar_option_set}
\alias{tar_option_set}
\title{Set target options.}
\usage{
tar_option_set(
tidy_eval = NULL,
packages = NULL,
imports = NULL,
library = NULL,
envir = NULL,
format = NULL,
iteration = NULL,
... | /man/tar_option_set.Rd | permissive | guhjy/targets | R | false | true | 15,567 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tar_option_set.R
\name{tar_option_set}
\alias{tar_option_set}
\title{Set target options.}
\usage{
tar_option_set(
tidy_eval = NULL,
packages = NULL,
imports = NULL,
library = NULL,
envir = NULL,
format = NULL,
iteration = NULL,
... |
pacman::p_load(leaflet, rgdal, dplyr, htmltools)
states <- readOGR("c2hgis_state/c2hgis_statePoint.shp")
states_bound <- readOGR("cb_2018_us_state_500k/cb_2018_us_state_500k.shp")
counties <- readOGR("c2hgis_county/c2hgis_countyPoint.shp")
counties_bound <- readOGR("cb_2018_us_county_500k/cb_2018_us_county_500k.shp")
... | /explore_broadband.R | no_license | augiege/serve | R | false | false | 2,630 | r | pacman::p_load(leaflet, rgdal, dplyr, htmltools)
states <- readOGR("c2hgis_state/c2hgis_statePoint.shp")
states_bound <- readOGR("cb_2018_us_state_500k/cb_2018_us_state_500k.shp")
counties <- readOGR("c2hgis_county/c2hgis_countyPoint.shp")
counties_bound <- readOGR("cb_2018_us_county_500k/cb_2018_us_county_500k.shp")
... |
\name{amdp}
\alias{amdp}
\title{
Create a pad object.
}
\description{
Create amdps
}
\usage{
amdp(object, X, y, predictor, predictfcn, newdata, verbose = TRUE,
frac_to_build = 1, indices_to_build = NULL, num_grid_pts,
logodds = F, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{... | /amdp/man/amdp.Rd | no_license | kapelner/advanced_marginal_dependence_plots | R | false | false | 4,279 | rd | \name{amdp}
\alias{amdp}
\title{
Create a pad object.
}
\description{
Create amdps
}
\usage{
amdp(object, X, y, predictor, predictfcn, newdata, verbose = TRUE,
frac_to_build = 1, indices_to_build = NULL, num_grid_pts,
logodds = F, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy-utils.R
\name{summarise_with_totals}
\alias{summarise_with_totals}
\title{Summarise a subgroup and create a summary row}
\usage{
summarise_with_totals(
.data,
...,
.groups = NULL,
.total = "Total",
.total_first = FALSE
)
}
\arg... | /man/summarise_with_totals.Rd | permissive | terminological/ggrrr | R | false | true | 1,294 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy-utils.R
\name{summarise_with_totals}
\alias{summarise_with_totals}
\title{Summarise a subgroup and create a summary row}
\usage{
summarise_with_totals(
.data,
...,
.groups = NULL,
.total = "Total",
.total_first = FALSE
)
}
\arg... |
#1. Interaction network
##adjacency matrix A and the normalized adjacency matrix M
normalizedMatrix = function(A_Matrix){
colsums = apply(A_Matrix, 2, sum)
M_Matrix = t(t(A_Matrix)/(colsums+1e-16))
return(M_Matrix)
}
##the diffused matrix D
diffusedMatrix = function(M_Matrix, beta){
D_Matrix = beta*s... | /R/MinNetRank.R | no_license | weitinging/MinNetRank | R | false | false | 9,856 | r | #1. Interaction network
##adjacency matrix A and the normalized adjacency matrix M
normalizedMatrix = function(A_Matrix){
colsums = apply(A_Matrix, 2, sum)
M_Matrix = t(t(A_Matrix)/(colsums+1e-16))
return(M_Matrix)
}
##the diffused matrix D
diffusedMatrix = function(M_Matrix, beta){
D_Matrix = beta*s... |
setwd("~/Acads/SS 2018-2019/Stat 197 DS/specdata")
library(data.table)
### PART 1 ### ----
pollutantmean <- function(directory, pollutant, id= 1:332){
pollutants = NULL #creates empty vector
filenames = list.files(directory) #lists files in the directory
for(i in id){
##concatenat... | /project_2.r | no_license | dnllmnll/Stat197DataScience | R | false | false | 4,414 | r | setwd("~/Acads/SS 2018-2019/Stat 197 DS/specdata")
library(data.table)
### PART 1 ### ----
pollutantmean <- function(directory, pollutant, id= 1:332){
pollutants = NULL #creates empty vector
filenames = list.files(directory) #lists files in the directory
for(i in id){
##concatenat... |
# Import data
nooutlierdata<-read.csv(file="Analysis/Data/NoOutliers.csv",header=TRUE,
sep=",",stringsAsFactors = TRUE)
nooutlierdata$TransactionNo<-nooutlierdata$id
data<-read.csv(file="Analysis/Data/HousePriceData.csv",header=TRUE,
sep=",",stringsAsFactors = TRUE)
data<-merge(data,n... | /Analysis/Anova.R | permissive | twoshotamericano/ThesisPublished | R | false | false | 1,563 | r | # Import data
nooutlierdata<-read.csv(file="Analysis/Data/NoOutliers.csv",header=TRUE,
sep=",",stringsAsFactors = TRUE)
nooutlierdata$TransactionNo<-nooutlierdata$id
data<-read.csv(file="Analysis/Data/HousePriceData.csv",header=TRUE,
sep=",",stringsAsFactors = TRUE)
data<-merge(data,n... |
library(plyr)
#Download and unzip data
if(!file.exists("./data")){dir.create("./data")}
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(url, destfile="./data/Dataset.zip")
unzip(zipfile="./data/Dataset.zip",exdir="./data")
#Read data
x_test <- rea... | /run_analysis.R | no_license | hdouwes/Getting-and-Cleaning-Data-Course-Project | R | false | false | 2,187 | r | library(plyr)
#Download and unzip data
if(!file.exists("./data")){dir.create("./data")}
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(url, destfile="./data/Dataset.zip")
unzip(zipfile="./data/Dataset.zip",exdir="./data")
#Read data
x_test <- rea... |
\name{as.listofindex}
\alias{as.listofindex}
\title{
Transform index results in a list of index
}
\description{
Transform various results from functions Tstast, ComIndex or ComIndexMulti in a list of index. Useful to use the functions plot.listofindex (S3 method) and ses.listofindex.
}
\usage{
as.listofindex(x, na... | /.Archive man/man/as.listofindex.Rd | no_license | ben9216/cati | R | false | false | 1,710 | rd | \name{as.listofindex}
\alias{as.listofindex}
\title{
Transform index results in a list of index
}
\description{
Transform various results from functions Tstast, ComIndex or ComIndexMulti in a list of index. Useful to use the functions plot.listofindex (S3 method) and ses.listofindex.
}
\usage{
as.listofindex(x, na... |
###Class 04 - Visualization & Intro to Mapping ###
## Author: Esteban Lopez
## Course: Spatial Analytics
## Program: Master in Business Analytics
## Institution: Universidad Adolfo Ibáñez....
#---- Part 1: Data Management -------------------
# Reading an exporting data
library(readxl)
library(data.table)
casos<... | /Class_04/Script_Clase04.R | permissive | mariajosevaldivieso/Clases2 | R | false | false | 6,749 | r | ###Class 04 - Visualization & Intro to Mapping ###
## Author: Esteban Lopez
## Course: Spatial Analytics
## Program: Master in Business Analytics
## Institution: Universidad Adolfo Ibáñez....
#---- Part 1: Data Management -------------------
# Reading an exporting data
library(readxl)
library(data.table)
casos<... |
## Step 1 - Load the data
# Load only records for 2007-02-01 and 2007-02-02
househ <- read.table("household_power_consumption.txt", header = FALSE,
sep = ";", dec = ".", skip = 66637, nrows = 2880,
col.names=c("Date",
"Time",
... | /Course 4 - Exploratory Data Analysis/Week1_Assignment/plot2.R | no_license | Leijtenss/Coursera-JHU-Data-Science-Specialization | R | false | false | 1,024 | r | ## Step 1 - Load the data
# Load only records for 2007-02-01 and 2007-02-02
househ <- read.table("household_power_consumption.txt", header = FALSE,
sep = ";", dec = ".", skip = 66637, nrows = 2880,
col.names=c("Date",
"Time",
... |
graphOrthographic <- function(nim, uid, modality, imgPath, htmlFile,
width=750, height=750, cornerText=NULL,
captionText=NULL) {
zrange <- switch(modality,
CT = c(-125, 225) - nim@"scl_inter",
PT = quantile(nim[nim > 0],... | /R/graph.R | no_license | bjw34032/qaqc | R | false | false | 4,104 | r | graphOrthographic <- function(nim, uid, modality, imgPath, htmlFile,
width=750, height=750, cornerText=NULL,
captionText=NULL) {
zrange <- switch(modality,
CT = c(-125, 225) - nim@"scl_inter",
PT = quantile(nim[nim > 0],... |
library(survival)
library(readxl)
library(ggplot2)
library(survminer)
setwd("E:/Summer Semester/Module 1/Advanced Business Analytics/Data/Project Data")
data <- read_excel("DiabeticData.xlsx")
str(data)
fit.all <- survfit(Surv(time,status==1)~1,data=data)
plot(fit.all, xlab = "Time", ylab = "Survival Prob... | /Final_Project_ABA.R | no_license | Usama93-PU/Diabetes-Patients-Survival-Analysis | R | false | false | 7,417 | r | library(survival)
library(readxl)
library(ggplot2)
library(survminer)
setwd("E:/Summer Semester/Module 1/Advanced Business Analytics/Data/Project Data")
data <- read_excel("DiabeticData.xlsx")
str(data)
fit.all <- survfit(Surv(time,status==1)~1,data=data)
plot(fit.all, xlab = "Time", ylab = "Survival Prob... |
# Exercise-1
# Implement code from this book chapter: http://r4ds.had.co.nz/many-models.html
# Packages
# install.packages('modelr')
# install.packages('tidyverse')
# install.packages('gapminder')
library(gapminder)
library(modelr)
library(tidyverse)
# Initial view of the data with ggplot
gapminder %>%
ggplot(aes(... | /exercise-1/exercise.R | permissive | tdhoxxi/m15-special-topics | R | false | false | 2,034 | r | # Exercise-1
# Implement code from this book chapter: http://r4ds.had.co.nz/many-models.html
# Packages
# install.packages('modelr')
# install.packages('tidyverse')
# install.packages('gapminder')
library(gapminder)
library(modelr)
library(tidyverse)
# Initial view of the data with ggplot
gapminder %>%
ggplot(aes(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sst_med.R
\docType{data}
\name{sst_Med}
\alias{sst_Med}
\title{Optimally interpolated 0.25 degree SST for the Mediterranean region.}
\format{
A data frame with 13514 rows and 2 variables:
\describe{
\item{t}{date, as.Date() format}
\item{... | /man/sst_Med.Rd | permissive | ShiQuanOoi/heatwaveR | R | false | true | 630 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sst_med.R
\docType{data}
\name{sst_Med}
\alias{sst_Med}
\title{Optimally interpolated 0.25 degree SST for the Mediterranean region.}
\format{
A data frame with 13514 rows and 2 variables:
\describe{
\item{t}{date, as.Date() format}
\item{... |
########################
#### H3, sentiments ####
########################
setwd("~/Egyetemi/survey/Szakdolgozat/thesis_polsenti/src")
corpus <- read.csv2("./corpus_predicted.csv", header = T, sep = ";",
fileEncoding = 'UTF-8', stringsAsFactors = F)
### libraries ###
#library(foreign)
library(... | /script/H3_senti.R | no_license | bgallina/Thesis_polsenti_2019 | R | false | false | 7,592 | r | ########################
#### H3, sentiments ####
########################
setwd("~/Egyetemi/survey/Szakdolgozat/thesis_polsenti/src")
corpus <- read.csv2("./corpus_predicted.csv", header = T, sep = ";",
fileEncoding = 'UTF-8', stringsAsFactors = F)
### libraries ###
#library(foreign)
library(... |
# H3K27ac density plot (Control)
H3k27ac_density = function(df,column,Title){
dat1 <- read.csv(df,sep = "\t",header =T,na.strings = "NA")
df1 <- dat1[,column]
colname <- gsub("...NCoR1_H3K27ac_analysis.tag_dir.|...NCoR1_H3K27ac_Rep2_analysis.tag_dir.","",colnames(df1))
colname <- gsub("..Coverage","",colname)
... | /R/Functions.R | no_license | sraghav-lab/NCoR1-TLR9-TLR3-Project | R | false | false | 19,219 | r | # H3K27ac density plot (Control)
H3k27ac_density = function(df,column,Title){
dat1 <- read.csv(df,sep = "\t",header =T,na.strings = "NA")
df1 <- dat1[,column]
colname <- gsub("...NCoR1_H3K27ac_analysis.tag_dir.|...NCoR1_H3K27ac_Rep2_analysis.tag_dir.","",colnames(df1))
colname <- gsub("..Coverage","",colname)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/praise.R
\name{praise}
\alias{praise}
\alias{feedback}
\title{Publish praise about \pkg{texreg}}
\usage{
praise(
academic_user,
organization,
name = NULL,
general_praise = NULL,
increase_productivity = NULL,
increase_quality = NUL... | /man/praise.Rd | no_license | zauster/texreg | R | false | true | 7,979 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/praise.R
\name{praise}
\alias{praise}
\alias{feedback}
\title{Publish praise about \pkg{texreg}}
\usage{
praise(
academic_user,
organization,
name = NULL,
general_praise = NULL,
increase_productivity = NULL,
increase_quality = NUL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checks.R
\name{check_data}
\alias{check_data}
\title{Check the data and grid}
\usage{
check_data(x, dim_check = NA, type)
}
\arguments{
\item{x}{Data or grid}
\item{dim_check}{How many columns do we expect?}
\item{type}{Is it the "grid" or ... | /man/check_data.Rd | no_license | cran/lg | R | false | true | 757 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checks.R
\name{check_data}
\alias{check_data}
\title{Check the data and grid}
\usage{
check_data(x, dim_check = NA, type)
}
\arguments{
\item{x}{Data or grid}
\item{dim_check}{How many columns do we expect?}
\item{type}{Is it the "grid" or ... |
## Gives count, mean, standard deviation, standard error of the mean, and confidence interval (default 95%).
## data: a data frame.
## measurevar: the name of a column that contains the variable to be summariezed
## groupvars: a vector containing names of columns that contain grouping variables
## na.rm: a ... | /dependencies/summarySE.R | no_license | michaelakent/AnThroM | R | false | false | 6,191 | r | ## Gives count, mean, standard deviation, standard error of the mean, and confidence interval (default 95%).
## data: a data frame.
## measurevar: the name of a column that contains the variable to be summariezed
## groupvars: a vector containing names of columns that contain grouping variables
## na.rm: a ... |
library(tibble)
input_df <- as.data.frame(tribble(
~age, ~gender, ~race, ~BMI, ~sbp, ~hdl, ~totchol, ~bp_med, ~smoker, ~diabetes,
55, "male", "white", 30, 140, 50, 213, 0, 0, 0,
45, "female", "white", 27, 125, 50, 200, 1, 0, 0,
45, "female", "white", 27, 125, 50, 200, NA, 0, 0
))
output_df <- cbind(input_df, ... | /tests/testthat/test-compute_CVrisk.R | no_license | minghao2016/CVrisk | R | false | false | 827 | r | library(tibble)
input_df <- as.data.frame(tribble(
~age, ~gender, ~race, ~BMI, ~sbp, ~hdl, ~totchol, ~bp_med, ~smoker, ~diabetes,
55, "male", "white", 30, 140, 50, 213, 0, 0, 0,
45, "female", "white", 27, 125, 50, 200, 1, 0, 0,
45, "female", "white", 27, 125, 50, 200, NA, 0, 0
))
output_df <- cbind(input_df, ... |
#' Gives values for the erythemal BSWF as a function of wavelength
#'
#' This function gives a set of numeric multipliers that can be used as a weight
#' to calculate effective doses and irradiances. The returned values are on
#' quantum based effectiveness relative units.
#'
#' @param w.length numeric array of w... | /photobiologyWavebands/R/cie.q.fun.r | no_license | ingted/R-Examples | R | false | false | 706 | r | #' Gives values for the erythemal BSWF as a function of wavelength
#'
#' This function gives a set of numeric multipliers that can be used as a weight
#' to calculate effective doses and irradiances. The returned values are on
#' quantum based effectiveness relative units.
#'
#' @param w.length numeric array of w... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/validate_clean_ballots.R
\name{cleanBallots}
\alias{cleanBallots}
\title{Tries to Address \code{validateBallots()} Warning(s).}
\usage{
cleanBallots(x, cand.names = NULL)
}
\arguments{
\item{x}{a \code{data.frame} with rows as ballots and col... | /man/cleanBallots.Rd | no_license | chandrasaksham/STV | R | false | true | 1,690 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/validate_clean_ballots.R
\name{cleanBallots}
\alias{cleanBallots}
\title{Tries to Address \code{validateBallots()} Warning(s).}
\usage{
cleanBallots(x, cand.names = NULL)
}
\arguments{
\item{x}{a \code{data.frame} with rows as ballots and col... |
source('./code/0-setup.R')
# data import -----------------------------------------------------------------------------------------------------
#' Write a function that imports the clean data template with the additional columns.
#' This makes it easy so seperate the data cleaning from using the data in modelling
#' or... | /code/2-data-analysis.R | no_license | gbisschoff/R-Training | R | false | false | 2,405 | r | source('./code/0-setup.R')
# data import -----------------------------------------------------------------------------------------------------
#' Write a function that imports the clean data template with the additional columns.
#' This makes it easy so seperate the data cleaning from using the data in modelling
#' or... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build-series.R
\name{build_series}
\alias{build_series}
\title{Builds Multi-year Series for the Station Variables.}
\usage{
build_series(station)
}
\arguments{
\item{station}{character string given the WIGOS compatible station
identifier.}
}
... | /man/build_series.Rd | no_license | mcmventura/fcdata2qc | R | false | true | 467 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build-series.R
\name{build_series}
\alias{build_series}
\title{Builds Multi-year Series for the Station Variables.}
\usage{
build_series(station)
}
\arguments{
\item{station}{character string given the WIGOS compatible station
identifier.}
}
... |
Day <- 5
# Load libraries ----------------------------------------------------------
library(here)
library(glue)
library(tidyverse)
# Read data ---------------------------------------------------------------
d <- readLines(here("2019", "data", glue("day_{Day}_input.txt")))
d <- strsplit(d, ",")[[1]] %>%
as.numer... | /2019/day5.R | no_license | jwinget/advent_of_code_2020 | R | false | false | 2,564 | r | Day <- 5
# Load libraries ----------------------------------------------------------
library(here)
library(glue)
library(tidyverse)
# Read data ---------------------------------------------------------------
d <- readLines(here("2019", "data", glue("day_{Day}_input.txt")))
d <- strsplit(d, ",")[[1]] %>%
as.numer... |
filtragemResultadosSCUT_BiVetor = function(matrizResultados, limiaresInferioresSCUT, limiaresSuperioresSCUT){
resultadosFiltrados = matrix(nrow=dim(matrizResultados)[1], ncol=dim(matrizResultados)[2]);
dimnames(resultadosFiltrados)[1]=dimnames(matrizResultados)[1];
#filtragem sobre a matriz de resultados, filt... | /scriptFiltragemResultadosSCUT_BiVetor.R | no_license | rnpeclat/A2E | R | false | false | 976 | r | filtragemResultadosSCUT_BiVetor = function(matrizResultados, limiaresInferioresSCUT, limiaresSuperioresSCUT){
resultadosFiltrados = matrix(nrow=dim(matrizResultados)[1], ncol=dim(matrizResultados)[2]);
dimnames(resultadosFiltrados)[1]=dimnames(matrizResultados)[1];
#filtragem sobre a matriz de resultados, filt... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 100452
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 100452
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc03-uniform-d... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/trafficlight-controller/tlc03-uniform-depth-106/tlc03-uniform-depth-106.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 697 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 100452
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 100452
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/trafficlight-controller/tlc03-uniform-d... |
# ui.R
shinyUI(fluidPage(
titlePanel("censusVis"),
sidebarLayout(
sidebarPanel(
helpText("Create demographic maps with
information from the 2010 US Census."),
selectInput("var",
... | /Coursera/Data Science (JHU)/09 Developing Data Products/Week 1 practice and quiz/Shiny apps/census-app/ui.R | no_license | abudish/Course_Materials_and_Certificates | R | false | false | 917 | r | # ui.R
shinyUI(fluidPage(
titlePanel("censusVis"),
sidebarLayout(
sidebarPanel(
helpText("Create demographic maps with
information from the 2010 US Census."),
selectInput("var",
... |
x <- function() {
columnnames <- read.table("features.txt", sep = " ", stringsAsFactors = FALSE)
columnnames$new <- paste(columnnames$V1, columnnames$V2, sep="_")
trainsample <- cbind(fread("train/X_train.txt", sep=" "), fread("train/y_train.txt"), fread("train/subject_train.txt"))
testsample <- cbind(fread... | /run_analysis.R | no_license | Ymget/Cleaning-data---Exam | R | false | false | 1,131 | r | x <- function() {
columnnames <- read.table("features.txt", sep = " ", stringsAsFactors = FALSE)
columnnames$new <- paste(columnnames$V1, columnnames$V2, sep="_")
trainsample <- cbind(fread("train/X_train.txt", sep=" "), fread("train/y_train.txt"), fread("train/subject_train.txt"))
testsample <- cbind(fread... |
context("Amplicon regressions")
test_that("AmpliconGraph", {
ag <- AmpliconGraph()
expect_true(validObject(ag))
})
cgov44t_preprocess <- function(){
extdata <- system.file("extdata", package="svbams")
id <- "cgov44t_revised.bam"
bamfile <- file.path(extdata, id)
irp.file <- file.path(extdata, "cgov44t_... | /tests/testthat/test_amplicon_regressions.R | no_license | cancer-genomics/trellis | R | false | false | 16,657 | r | context("Amplicon regressions")
test_that("AmpliconGraph", {
ag <- AmpliconGraph()
expect_true(validObject(ag))
})
cgov44t_preprocess <- function(){
extdata <- system.file("extdata", package="svbams")
id <- "cgov44t_revised.bam"
bamfile <- file.path(extdata, id)
irp.file <- file.path(extdata, "cgov44t_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compile_activities.R
\name{compile_activities}
\alias{compile_activities}
\title{converts a list of activities into a dataframe}
\usage{
compile_activities(actlist, acts = NULL, id = NULL, units = "metric")
}
\arguments{
\item{actlist}{an act... | /man/compile_activities.Rd | permissive | fawda123/rStrava | R | false | true | 1,430 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compile_activities.R
\name{compile_activities}
\alias{compile_activities}
\title{converts a list of activities into a dataframe}
\usage{
compile_activities(actlist, acts = NULL, id = NULL, units = "metric")
}
\arguments{
\item{actlist}{an act... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/create_weather_grid.R
\name{voronoipolygons}
\alias{voronoipolygons}
\title{voronoi polygons}
\usage{
voronoipolygons(layer, create.filename = T)
}
\description{
voronoi polygons
}
| /man/voronoipolygons.Rd | permissive | paulalsrees/conteStreamflow | R | false | false | 268 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/create_weather_grid.R
\name{voronoipolygons}
\alias{voronoipolygons}
\title{voronoi polygons}
\usage{
voronoipolygons(layer, create.filename = T)
}
\description{
voronoi polygons
}
|
# =====================================================================
# CSE487/587
# Author: your name
# Email: UBID@buffalo.edu
# =====================================================================
# need to install the following two packages in CCR(at least)
# data path /gpfs/courses/cse587/spring2015/data/hw2/d... | /Time-Series forecast of stocks in NASDAQ/Arima.R | no_license | pratik-chavan/Projects | R | false | false | 2,674 | r | # =====================================================================
# CSE487/587
# Author: your name
# Email: UBID@buffalo.edu
# =====================================================================
# need to install the following two packages in CCR(at least)
# data path /gpfs/courses/cse587/spring2015/data/hw2/d... |
gjamTrimY <- function(y, minObs = 2, maxCols = NULL, OTHER = TRUE){
# minObs - minimum no. of non-zero values in a column of y
# maxCols - number of columns to retain, those with highest values
# OTHER - logical or names to include in 'other' class
# if(OTHER) sum of rare are returned i... | /R/gjamTrimY.r | no_license | dbystrova/gjamed | R | false | false | 1,433 | r |
gjamTrimY <- function(y, minObs = 2, maxCols = NULL, OTHER = TRUE){
# minObs - minimum no. of non-zero values in a column of y
# maxCols - number of columns to retain, those with highest values
# OTHER - logical or names to include in 'other' class
# if(OTHER) sum of rare are returned i... |
a <- Variable(name = "a")
b <- Variable(name = "b")
c <- Variable(name = "c")
x <- Variable(2, name = "x")
y <- Variable(3, name = "y")
z <- Variable(2, name = "z")
A <- Variable(2, 2, name = "A")
B <- Variable(2, 2, name = "B")
C <- Variable(3, 2, name = "C")
assert_expression <- function(expr, size) {
expect_tru... | /tests/testthat/test-g01-matrices.R | permissive | aszekMosek/CVXR | R | false | false | 2,927 | r | a <- Variable(name = "a")
b <- Variable(name = "b")
c <- Variable(name = "c")
x <- Variable(2, name = "x")
y <- Variable(3, name = "y")
z <- Variable(2, name = "z")
A <- Variable(2, 2, name = "A")
B <- Variable(2, 2, name = "B")
C <- Variable(3, 2, name = "C")
assert_expression <- function(expr, size) {
expect_tru... |
freqs<-function(pp)
{
m<-union(pp$marks,NULL)
h<-NULL
for(i in m) h<-c(h, sum(pp$marks==i))
names(h)<-m
h
}
####################################################################################
clean.up.data<-function(pp,dbh=10,atleast=10)
{
h<-freqs(pp)
m<-union(pp$marks,NULL)
i<-pp$dbh>dbh & pp$marks%in%m[h>at... | /spatialsegregation/R/modifiers.R | no_license | ingted/R-Examples | R | false | false | 1,466 | r | freqs<-function(pp)
{
m<-union(pp$marks,NULL)
h<-NULL
for(i in m) h<-c(h, sum(pp$marks==i))
names(h)<-m
h
}
####################################################################################
clean.up.data<-function(pp,dbh=10,atleast=10)
{
h<-freqs(pp)
m<-union(pp$marks,NULL)
i<-pp$dbh>dbh & pp$marks%in%m[h>at... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/disk.frame.r
\name{disk.frame_folder}
\alias{disk.frame_folder}
\alias{disk.frame_fst}
\title{Create a data frame pointed to a folder}
\usage{
disk.frame_folder(path)
disk.frame_fst(path)
}
\arguments{
\item{path}{The path to store the outpu... | /man/disk.frame_fst.Rd | no_license | iqis/disk.frame | R | false | true | 440 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/disk.frame.r
\name{disk.frame_folder}
\alias{disk.frame_folder}
\alias{disk.frame_fst}
\title{Create a data frame pointed to a folder}
\usage{
disk.frame_folder(path)
disk.frame_fst(path)
}
\arguments{
\item{path}{The path to store the outpu... |
###################################
## Power, Voltage and Energy
#
# This script works on the
# "Individual household electric power consumption Data Set"
# extracted from the UC Irvine Machine Learning Repository and available for download
# via the https://github.com/rdpeng/ExData_Plotting1 repository
#
# Be sur... | /Plot4.R | no_license | kleinbot/ExData_Plotting1 | R | false | false | 3,477 | r | ###################################
## Power, Voltage and Energy
#
# This script works on the
# "Individual household electric power consumption Data Set"
# extracted from the UC Irvine Machine Learning Repository and available for download
# via the https://github.com/rdpeng/ExData_Plotting1 repository
#
# Be sur... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metabulate.R
\name{add_commas}
\alias{add_commas}
\title{Add commas to integers
Add commas to integers (e.g., convert "1000000" to "1,000,000")}
\usage{
add_commas(x, decimals = 0)
}
\arguments{
\item{x}{Integer value}
\item{decimals}{Number... | /man/add_commas.Rd | no_license | EnterStudios/psychmeta | R | false | true | 704 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metabulate.R
\name{add_commas}
\alias{add_commas}
\title{Add commas to integers
Add commas to integers (e.g., convert "1000000" to "1,000,000")}
\usage{
add_commas(x, decimals = 0)
}
\arguments{
\item{x}{Integer value}
\item{decimals}{Number... |
#' Apply numeric_np class to a numeric variable
#'
#' To allow \code{atable} to return different statistics for different variables
#' of the same type (e.g. we want some variables to be formatted as
#' \code{Mean (SD)} and others as \code{Median [IQR]}), they need to be passed
#' to \code{atable} as different classes.... | /R/numeric_np.R | no_license | aghaynes/atableExtra | R | false | false | 763 | r | #' Apply numeric_np class to a numeric variable
#'
#' To allow \code{atable} to return different statistics for different variables
#' of the same type (e.g. we want some variables to be formatted as
#' \code{Mean (SD)} and others as \code{Median [IQR]}), they need to be passed
#' to \code{atable} as different classes.... |
#' A Reference Class to represent a todo list item
#'
#' @field itemText Text of the todo list item
#' @field timeCreated Time item was created
#' @field timeCompleted Time item was completed
#' @field isCompleted Has the item been completed?
#' @field itemID Integer identifier of the todo item.
#' @export TodoItem
#'... | /R/todolist.R | no_license | markwh/todoList | R | false | false | 11,583 | r |
#' A Reference Class to represent a todo list item
#'
#' @field itemText Text of the todo list item
#' @field timeCreated Time item was created
#' @field timeCompleted Time item was completed
#' @field isCompleted Has the item been completed?
#' @field itemID Integer identifier of the todo item.
#' @export TodoItem
#'... |
# Classification Tree with rpart
library(rpart)
library(caret)
setwd("/Users/ritesh/pad-datascience/R/")
bcTree <- read.csv("machineLearning/data/breast-cancer-wisconsin.csv")
breast_cancer_wisconsin_col_names <-
c(
"Sample_code_number",
"Clump_Thickness",
"Uniformity_of_Cell_Size",
"Uniformity_of_Ce... | /R/machineLearning/classification/ClassificationBreastCancer.R | no_license | riteshsolankee/data-science | R | false | false | 2,435 | r | # Classification Tree with rpart
library(rpart)
library(caret)
setwd("/Users/ritesh/pad-datascience/R/")
bcTree <- read.csv("machineLearning/data/breast-cancer-wisconsin.csv")
breast_cancer_wisconsin_col_names <-
c(
"Sample_code_number",
"Clump_Thickness",
"Uniformity_of_Cell_Size",
"Uniformity_of_Ce... |
pathTiMEx<-function(initialGroupsStruct,Datamat,path,name,noReps,optionsSA,
noThreads,numsave,skipsteps,gamma,noNoOpen,additionalGenes,
limitChanged)
{
if (missing(noReps))
noReps<-100
if (missing(optionsSA))
optionsSA<-"-s -T 1 -N 200"
if (m... | /R/funcsPathTiMEx.R | no_license | cbg-ethz/pathTiMEx | R | false | false | 8,207 | r | pathTiMEx<-function(initialGroupsStruct,Datamat,path,name,noReps,optionsSA,
noThreads,numsave,skipsteps,gamma,noNoOpen,additionalGenes,
limitChanged)
{
if (missing(noReps))
noReps<-100
if (missing(optionsSA))
optionsSA<-"-s -T 1 -N 200"
if (m... |
#===============================================================================
# File: 08-treatment-group-comparisons.R
# Date: Feb 3, 2021
# Purpose: replicate appendix analyses: Section 7
# Data In:
# ./data/survey_data.csv
# ./data/daily_pulse_data.csv
#==============================... | /code/08-treatment-group-comparisons.r | permissive | NetDem-USC/homepage-experiment | R | false | false | 40,151 | r | #===============================================================================
# File: 08-treatment-group-comparisons.R
# Date: Feb 3, 2021
# Purpose: replicate appendix analyses: Section 7
# Data In:
# ./data/survey_data.csv
# ./data/daily_pulse_data.csv
#==============================... |
# Exploratory Data Analysis
# Project 1
# load data
setwd("F:/self-learning/data science/data exploratory/dataset/ExData_Plotting1")
data <- read.table("household_power_consumption.txt",skip=66636, nrows = 2880,sep=";",header=T)
header <- scan("household_power_consumption.txt", nlines = 1, sep = ";", what = character(... | /plot1.R | no_license | kittencai/ExData_Plotting1 | R | false | false | 505 | r | # Exploratory Data Analysis
# Project 1
# load data
setwd("F:/self-learning/data science/data exploratory/dataset/ExData_Plotting1")
data <- read.table("household_power_consumption.txt",skip=66636, nrows = 2880,sep=";",header=T)
header <- scan("household_power_consumption.txt", nlines = 1, sep = ";", what = character(... |
#' Generate correlated variables
#' @description
#' `r badge('experimental')`
#'
#' Generate correlated variables using a vector of know values and desired
#' maximum and minimum correlations
#'
#' @param y A vector to generate variables correlated with.
#' @param min_cor The minimum desired correlation.
#' @p... | /R/correlated_vars.R | no_license | cran/metan | R | false | false | 2,622 | r | #' Generate correlated variables
#' @description
#' `r badge('experimental')`
#'
#' Generate correlated variables using a vector of know values and desired
#' maximum and minimum correlations
#'
#' @param y A vector to generate variables correlated with.
#' @param min_cor The minimum desired correlation.
#' @p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.