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
# Generate random numbers n <- 100 x <- rnorm(n, mean = 10, sd = 5) b1 <- 5 b0 <- 3 sigma <- 2 y <- b0 + b1*x + rnorm(n, mean = 0, sd = sigma) x.bar <- mean(x) y.bar <- mean(y) xi.sq <- sum(x^2) yi.sq <- sum(y^2) xi.yi <- sum(x*y) b1.check <-cov(x,y)/var(x) == (xi.yi - n*x.bar*y.bar)/(xi.sq - n*x.bar^2) b1.hat <-...
/course_work/syde_334/assignment_1/valid_check.R
no_license
chrisngan24/stats-practice
R
false
false
605
r
# Generate random numbers n <- 100 x <- rnorm(n, mean = 10, sd = 5) b1 <- 5 b0 <- 3 sigma <- 2 y <- b0 + b1*x + rnorm(n, mean = 0, sd = sigma) x.bar <- mean(x) y.bar <- mean(y) xi.sq <- sum(x^2) yi.sq <- sum(y^2) xi.yi <- sum(x*y) b1.check <-cov(x,y)/var(x) == (xi.yi - n*x.bar*y.bar)/(xi.sq - n*x.bar^2) b1.hat <-...
############# dvi on remote sensing data and deforestation # presentazione su biomass https://cran.r-project.org/web/packages/rasterdiv/vignettes/vignettes_rasterdiv.html # biomass install.packages("rasterdiv") # plot dell'ndvi library(rasterdiv) defor1 <- brick("~/Documents/lectures_and_seminars/images/defor1_.jpg...
/90_R_code_defor_ndvi.r
no_license
EnneFico/Monitoring
R
false
false
966
r
############# dvi on remote sensing data and deforestation # presentazione su biomass https://cran.r-project.org/web/packages/rasterdiv/vignettes/vignettes_rasterdiv.html # biomass install.packages("rasterdiv") # plot dell'ndvi library(rasterdiv) defor1 <- brick("~/Documents/lectures_and_seminars/images/defor1_.jpg...
\name{qdgAlgo} \alias{qdgAlgo} \alias{summary.qdgAlgo} \alias{print.qdgAlgo} \title{ Produces a directed graph using QDG algorithm } \description{ This function implements the QDG algorithm described in Chaibub Neto et al 2008. It creates and scores QDGs. The computed scores (log-likelihood and BIC) are only...
/man/qdgAlgo.Rd
no_license
cran/qdg
R
false
false
6,236
rd
\name{qdgAlgo} \alias{qdgAlgo} \alias{summary.qdgAlgo} \alias{print.qdgAlgo} \title{ Produces a directed graph using QDG algorithm } \description{ This function implements the QDG algorithm described in Chaibub Neto et al 2008. It creates and scores QDGs. The computed scores (log-likelihood and BIC) are only...
/my code/模型日志/GAFS_C50.R
no_license
miission/RProj
R
false
false
184
r
# Set Seed set.seed(1234) # Load Package library(tidyverse) library(hrbrthemes) library(scales) library(lubridate) # Load data df <- read_rds("data/tweet-whatsappdown.rds") # Plot Trend trend <- df %>% mutate(created_at = created_at + 7 * 60 * 60) %>% mutate(tanggal = floor_date(created_at, "2 hours")) %>% gro...
/src/001_trend.R
no_license
apriandito/explore-sma
R
false
false
1,133
r
# Set Seed set.seed(1234) # Load Package library(tidyverse) library(hrbrthemes) library(scales) library(lubridate) # Load data df <- read_rds("data/tweet-whatsappdown.rds") # Plot Trend trend <- df %>% mutate(created_at = created_at + 7 * 60 * 60) %>% mutate(tanggal = floor_date(created_at, "2 hours")) %>% gro...
## makeCacheMatrix takes matrix and initializes internal structure ## to cache the inverse of the matrix, as calculating the inverse is computationally expensive ## cacheSolve stores the inverse internally & retrieves it for future calls ## makeCacheMatrix creates an object that stores the matrix ## and caches the inv...
/cachematrix.R
no_license
hlalgudi/ProgrammingAssignment2
R
false
false
1,422
r
## makeCacheMatrix takes matrix and initializes internal structure ## to cache the inverse of the matrix, as calculating the inverse is computationally expensive ## cacheSolve stores the inverse internally & retrieves it for future calls ## makeCacheMatrix creates an object that stores the matrix ## and caches the inv...
library(shiny) library(leaflet) # for the map library(shinythemes) library(dplyr) # filter and reactive library(geosphere) # for the distance between two points library(shinydashboard) # for the display library(readr) ships <- read_csv(file= "ships.csv", n_max=10000) attach(ships) #######################...
/ui.R
no_license
landaeta96/rec_task
R
false
false
1,072
r
library(shiny) library(leaflet) # for the map library(shinythemes) library(dplyr) # filter and reactive library(geosphere) # for the distance between two points library(shinydashboard) # for the display library(readr) ships <- read_csv(file= "ships.csv", n_max=10000) attach(ships) #######################...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cv_task_by_task.R \name{RunTBTCrossvalidation} \alias{RunTBTCrossvalidation} \title{Cross-validation wrapper for task-by-task lasso model.} \usage{ RunTBTCrossvalidation(X = NULL, task.specific.features = list(), Y, lambda.vec, num.folds = ...
/man/RunTBTCrossvalidation.Rd
no_license
tohein/linearMTL
R
false
true
1,249
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cv_task_by_task.R \name{RunTBTCrossvalidation} \alias{RunTBTCrossvalidation} \title{Cross-validation wrapper for task-by-task lasso model.} \usage{ RunTBTCrossvalidation(X = NULL, task.specific.features = list(), Y, lambda.vec, num.folds = ...
# Reading the given dataset data_full <- read.csv("./household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y") # Extracting a subset from the dat...
/plot2.R
no_license
chaitusb/ExData_Plotting1
R
false
false
726
r
# Reading the given dataset data_full <- read.csv("./household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y") # Extracting a subset from the dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wilkinson.R \name{wilkinson} \alias{wilkinson} \title{Wilkinson's Polynomial} \usage{ wilkinson(x, w = 20) } \arguments{ \item{x}{the \code{x}-value} \item{w}{the number of terms in the polynomial} } \value{ the value of the function at \cod...
/man/wilkinson.Rd
no_license
helixcn/cmna
R
false
true
750
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wilkinson.R \name{wilkinson} \alias{wilkinson} \title{Wilkinson's Polynomial} \usage{ wilkinson(x, w = 20) } \arguments{ \item{x}{the \code{x}-value} \item{w}{the number of terms in the polynomial} } \value{ the value of the function at \cod...
stat_cube_class <- R6::R6Class("stat_cube", inherit = stat_basic_class, lock_objects = FALSE, lock_class = TRUE, private = list( break_values = numeric(), calc_break_values = function(values, props) { "calculate the actual values for break_values" break_values <- unique(quantile(values, props, n...
/R/stat_cube.R
no_license
statgenlmu/jaatha
R
false
false
2,607
r
stat_cube_class <- R6::R6Class("stat_cube", inherit = stat_basic_class, lock_objects = FALSE, lock_class = TRUE, private = list( break_values = numeric(), calc_break_values = function(values, props) { "calculate the actual values for break_values" break_values <- unique(quantile(values, props, n...
library(glmnet) mydata = read.table("./TrainingSet/RF/thyroid.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.35,family="gaussian",standardize=TRUE) sink('./Model/EN/Classifier/thyroid/thyroid_047.txt',append=TR...
/Model/EN/Classifier/thyroid/thyroid_047.R
no_license
leon1003/QSMART
R
false
false
353
r
library(glmnet) mydata = read.table("./TrainingSet/RF/thyroid.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.35,family="gaussian",standardize=TRUE) sink('./Model/EN/Classifier/thyroid/thyroid_047.txt',append=TR...
\name{HCthresh} \alias{HCthresh} \title{Biomarker thresholding by Higher Criticism} \description{ Higher Criticism (HC) is a second-level significance testing approach to determine which variables in a multivariate set show significant differences in two classes. Function \code{HCthresh} selects those p values ...
/man/HCthresh.Rd
no_license
cran/BioMark
R
false
false
2,231
rd
\name{HCthresh} \alias{HCthresh} \title{Biomarker thresholding by Higher Criticism} \description{ Higher Criticism (HC) is a second-level significance testing approach to determine which variables in a multivariate set show significant differences in two classes. Function \code{HCthresh} selects those p values ...
## 0330_inverseGamma_005005.R #setwd("/Users/shuaiqizhang/Desktop/project /data ") table<-read.table("/dscrhome/gd44/SQProject/RStan/2016_spring/exon_level_process_v2.txt") colnames(table)<- c("chr", "gene", "dom", "subdom", "exon", "gene.dom", "gene.dom.subdom", "envarp", # pass ...
/OriginalScripts/code_0330/0330_inverseGamma_005005.R
no_license
breezedu/InverseGamma
R
false
false
4,436
r
## 0330_inverseGamma_005005.R #setwd("/Users/shuaiqizhang/Desktop/project /data ") table<-read.table("/dscrhome/gd44/SQProject/RStan/2016_spring/exon_level_process_v2.txt") colnames(table)<- c("chr", "gene", "dom", "subdom", "exon", "gene.dom", "gene.dom.subdom", "envarp", # pass ...
## ----setup, include=FALSE------------------------------------------------ library(ggplot2) library(tint) # invalidate cache when the package version changes knitr::opts_chunk$set(tidy = FALSE, cache.extra = packageVersion('tint')) options(htmltools.dir.version = FALSE) ## ----fig-nocap-margin-first, fig.margin=TRUE,...
/data/genthat_extracted_code/tint/vignettes/tintHTML.R
no_license
surayaaramli/typeRrh
R
false
false
3,507
r
## ----setup, include=FALSE------------------------------------------------ library(ggplot2) library(tint) # invalidate cache when the package version changes knitr::opts_chunk$set(tidy = FALSE, cache.extra = packageVersion('tint')) options(htmltools.dir.version = FALSE) ## ----fig-nocap-margin-first, fig.margin=TRUE,...
library(testthat) library(metascoretest) test_check("metascoretest")
/tests/testthat.R
no_license
jepusto/metascore
R
false
false
70
r
library(testthat) library(metascoretest) test_check("metascoretest")
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(ggplot2) # Define UI for application that draws a histogram ui <- fluidPage( # Applicat...
/3_Reactivity/app_Ex3.R
no_license
R-LadiesMelbourne/2017-11-23-Introduction-To-RShiny
R
false
false
2,286
r
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(ggplot2) # Define UI for application that draws a histogram ui <- fluidPage( # Applicat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/row2colnames.r \name{row2colnames} \alias{row2colnames} \title{add a column to a dataframe consisting of the current rownames} \usage{ row2colnames(df, colname) } \arguments{ \item{df}{dataframe} \item{colname}{character vector specifying ne...
/man/row2colnames.Rd
permissive
hbc/CHBUtils
R
false
true
514
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/row2colnames.r \name{row2colnames} \alias{row2colnames} \title{add a column to a dataframe consisting of the current rownames} \usage{ row2colnames(df, colname) } \arguments{ \item{df}{dataframe} \item{colname}{character vector specifying ne...
#' Clean up the prodromal diagnostic questionnaire table. #' @param df The input dataframe from the CSVs. clean_updrs1_both = function(df, df_patient) { ################################ # Manual review. if (F) { df = files$mds_updrs_part_i dim(df) names(df) str(df) df_patient = files$mds_upd...
/lib/clean_updrs1_both.R
no_license
tygrin/ppmi-challenge-2016
R
false
false
3,142
r
#' Clean up the prodromal diagnostic questionnaire table. #' @param df The input dataframe from the CSVs. clean_updrs1_both = function(df, df_patient) { ################################ # Manual review. if (F) { df = files$mds_updrs_part_i dim(df) names(df) str(df) df_patient = files$mds_upd...
#Instacart Problem #Remove Existing variables rm(list=ls()) #Loading dependencies library(dplyr) library(ggplot2) library(data.table) library(caret) library(modeest) library(MLmetrics) #Set current working directory setwd("C:/Users/Aravind Atreya/Desktop/Kaggle/Instacart") #Importing files aisles <- fread("aisle...
/Script_latest.R
no_license
guitarremote/instacart-kaggle
R
false
false
6,418
r
#Instacart Problem #Remove Existing variables rm(list=ls()) #Loading dependencies library(dplyr) library(ggplot2) library(data.table) library(caret) library(modeest) library(MLmetrics) #Set current working directory setwd("C:/Users/Aravind Atreya/Desktop/Kaggle/Instacart") #Importing files aisles <- fread("aisle...
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common get_config new_operation new_request send_request #' @include sagemaker_service.R NULL #' Adds or overwrites one or more tags for the specified Amazon SageMaker #' resource #' #' Adds or overwrites one or more tags for the speci...
/paws/R/sagemaker_operations.R
permissive
johnnytommy/paws
R
false
false
342,000
r
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common get_config new_operation new_request send_request #' @include sagemaker_service.R NULL #' Adds or overwrites one or more tags for the specified Amazon SageMaker #' resource #' #' Adds or overwrites one or more tags for the speci...
library(phyloseq) library(qiime2R) library(ggplot2) library(reshape) library(DESeq2) library(tidyverse) library(ggrepel) setwd('/Users/sophiecurio/16s/Sophie/') Genotypes = c("APC_KO3", "KO_ctrl") Timepoints = "18" name <- paste(Genotypes, Timepoints, collapse = '_') phy<-qza_to_phyloseq("table.qza", "rooted-tree.q...
/Microbiota/DEseq_phylum.R
no_license
sophiecurio/phd
R
false
false
2,944
r
library(phyloseq) library(qiime2R) library(ggplot2) library(reshape) library(DESeq2) library(tidyverse) library(ggrepel) setwd('/Users/sophiecurio/16s/Sophie/') Genotypes = c("APC_KO3", "KO_ctrl") Timepoints = "18" name <- paste(Genotypes, Timepoints, collapse = '_') phy<-qza_to_phyloseq("table.qza", "rooted-tree.q...
#--begin file_dir_params.R script--# ### Credit goes to Derek Darves ### Step by step explanations availble at http://derekyves.github.io/2016/05/10/codeshare.html #----------------------------# # Make a new environment: fdirs <- new.env() # Function to standardize host OS name get_os <- function(){ sysinf <- Sys.i...
/functions/file_dir_params.R
permissive
jmallon/R-manuscripts
R
false
false
1,867
r
#--begin file_dir_params.R script--# ### Credit goes to Derek Darves ### Step by step explanations availble at http://derekyves.github.io/2016/05/10/codeshare.html #----------------------------# # Make a new environment: fdirs <- new.env() # Function to standardize host OS name get_os <- function(){ sysinf <- Sys.i...
# Go to whatsapp web , open a group chat and right click on the name of the group and press inspect element # Copy paste the numbers as a string in the 'input' variable # Write a group name # --- NOTE --- # When we copy paste from the inspect element, there are two sets of same numbers. Make sure to delete half of th...
/Save Whatsapp Group Chat Contacts to CSV Files.R
no_license
Razhfad/Save-Whatsapp-Group-Chat-Contacts
R
false
false
1,186
r
# Go to whatsapp web , open a group chat and right click on the name of the group and press inspect element # Copy paste the numbers as a string in the 'input' variable # Write a group name # --- NOTE --- # When we copy paste from the inspect element, there are two sets of same numbers. Make sure to delete half of th...
## This code creates the second plot for the EDA course project 1 # install required packages library(data.table) # function getdata() checks for the existence of a directory containing a file to # be downloaded, and if it is not present, downloads a linked file and stores it # in a directory in the current workspa...
/plot2.R
no_license
Budotron/ExData_Plotting1
R
false
false
2,125
r
## This code creates the second plot for the EDA course project 1 # install required packages library(data.table) # function getdata() checks for the existence of a directory containing a file to # be downloaded, and if it is not present, downloads a linked file and stores it # in a directory in the current workspa...
library(ggplot2) library(ggthemes) library(extrafont) library(plyr) library(scales) library("ggpubr") ################## ### HOW TO USE ### ################## # Set WD to folder containing csv files. # These files can be generated by dumping the db into csv. ### General statements # Import csv files items <- read...
/block4/code/stat_analysis.R
no_license
InvictusRMC/WM0824TU---Underground-Markets
R
false
false
3,930
r
library(ggplot2) library(ggthemes) library(extrafont) library(plyr) library(scales) library("ggpubr") ################## ### HOW TO USE ### ################## # Set WD to folder containing csv files. # These files can be generated by dumping the db into csv. ### General statements # Import csv files items <- read...
library(R2jags) library(boot) # Some R code to simulate data from the above model TT = 100 set.seed(123) x_1 = sort(runif(TT,0,10)) x_2 = sort(runif(TT,0,10)) x <- cbind(x_1, x_2) alpha = 1 beta_1 = 0.2 beta_2 = -0.5 logit_p = alpha + beta_1 * x_1 + beta_2 * x_2 p = inv.logit(logit_p) y = rbinom(TT,1,p) y # Have a ...
/tests/regression_tests/logistic_test_jags.R
no_license
npetraco/CRFutil
R
false
false
3,449
r
library(R2jags) library(boot) # Some R code to simulate data from the above model TT = 100 set.seed(123) x_1 = sort(runif(TT,0,10)) x_2 = sort(runif(TT,0,10)) x <- cbind(x_1, x_2) alpha = 1 beta_1 = 0.2 beta_2 = -0.5 logit_p = alpha + beta_1 * x_1 + beta_2 * x_2 p = inv.logit(logit_p) y = rbinom(TT,1,p) y # Have a ...
library(glmnet) mydata = read.table("./TrainingSet/RF/bone.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.1,family="gaussian",standardize=TRUE) sink('./Model/EN/Classifier/bone/bone_027.txt',append=TRUE) print(...
/Model/EN/Classifier/bone/bone_027.R
no_license
leon1003/QSMART
R
false
false
343
r
library(glmnet) mydata = read.table("./TrainingSet/RF/bone.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.1,family="gaussian",standardize=TRUE) sink('./Model/EN/Classifier/bone/bone_027.txt',append=TRUE) print(...
A = read.table(file="C:/92file.txt",col.names = c("ID","Name","Gender")) A
/01Basic/92Input__table_without_variable_name_in_txt.R
no_license
MomusChao/R
R
false
false
75
r
A = read.table(file="C:/92file.txt",col.names = c("ID","Name","Gender")) A
library(exreport) ### Name: expRemoveDuplicated ### Title: Remove duplicated rows from an experiment ### Aliases: expRemoveDuplicated ### ** Examples # We duplicate some of the rows of a given experiment: e <- expCreate(wekaExperiment, parameters="fold", name="Test Experiment") redundant <- expCreate(wekaExperiment...
/data/genthat_extracted_code/exreport/examples/expRemoveDuplicated.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
517
r
library(exreport) ### Name: expRemoveDuplicated ### Title: Remove duplicated rows from an experiment ### Aliases: expRemoveDuplicated ### ** Examples # We duplicate some of the rows of a given experiment: e <- expCreate(wekaExperiment, parameters="fold", name="Test Experiment") redundant <- expCreate(wekaExperiment...
#' Set Targomo Environment Variables #' #' This helper function allows you to set your API key in either a global or local #' .Renviron file, for ease of use. All of the \code{TargomoR} functions which call #' the Targomo API require an API key, and use the \code{TARGOMO_API_KEY} environment #' variable by default...
/R/setup.R
no_license
cran/TargomoR
R
false
false
2,267
r
#' Set Targomo Environment Variables #' #' This helper function allows you to set your API key in either a global or local #' .Renviron file, for ease of use. All of the \code{TargomoR} functions which call #' the Targomo API require an API key, and use the \code{TARGOMO_API_KEY} environment #' variable by default...
library(gganimate) library(ggplot2) library(plotly) library(cowplot) library(tools) plotWaveFronts <- function(WaveFront,WaveEnd,ACC){ f <- file.choose() df <- read.table(f,header = TRUE) ##WaveFront 906b0de3-8076-4b8e-84f2-e0016348d39a ##WaveEnd e3af6668-ccb0-4cba-8eda-1841fbb10c5f ##ACC 1.0 #WaveFront<-'906b0de3-8...
/R/WaveFrontPosition/WaveFrontPosition2408.r
no_license
Longman006/TransportNetwork
R
false
false
2,455
r
library(gganimate) library(ggplot2) library(plotly) library(cowplot) library(tools) plotWaveFronts <- function(WaveFront,WaveEnd,ACC){ f <- file.choose() df <- read.table(f,header = TRUE) ##WaveFront 906b0de3-8076-4b8e-84f2-e0016348d39a ##WaveEnd e3af6668-ccb0-4cba-8eda-1841fbb10c5f ##ACC 1.0 #WaveFront<-'906b0de3-8...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{find_intersecting_nodes} \alias{find_intersecting_nodes} \title{alternative find_edges from both} \usage{ find_intersecting_nodes(in_graph, start_nodes, end_nodes) } \arguments{ \item{in_graph}{a graphBAM} \item{start_nodes}{th...
/man/find_intersecting_nodes.Rd
permissive
rmflight/STRINGDatabaseManipulation
R
false
true
1,019
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{find_intersecting_nodes} \alias{find_intersecting_nodes} \title{alternative find_edges from both} \usage{ find_intersecting_nodes(in_graph, start_nodes, end_nodes) } \arguments{ \item{in_graph}{a graphBAM} \item{start_nodes}{th...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MODULE_1_CELP_BIAS.R \name{print_period_region} \alias{print_period_region} \title{print_period_region} \usage{ print_period_region(reads_psite_list, outfile) } \arguments{ \item{reads_psite_list}{A reads_psite_list object produced by \code{\...
/man/print_period_region.Rd
permissive
goodarzilab/Ribolog
R
false
true
813
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MODULE_1_CELP_BIAS.R \name{print_period_region} \alias{print_period_region} \title{print_period_region} \usage{ print_period_region(reads_psite_list, outfile) } \arguments{ \item{reads_psite_list}{A reads_psite_list object produced by \code{\...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pixset.R \name{where} \alias{where} \title{Return locations in pixel set} \usage{ where(x) } \arguments{ \item{x}{a pixset} } \description{ Return locations in pixel set } \examples{ #All pixel locations with value greater than .99 where(boat...
/man/where.Rd
no_license
anishsingh20/imager
R
false
true
333
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pixset.R \name{where} \alias{where} \title{Return locations in pixel set} \usage{ where(x) } \arguments{ \item{x}{a pixset} } \description{ Return locations in pixel set } \examples{ #All pixel locations with value greater than .99 where(boat...
#' Download Arctic Sea Ice Concentrations from NSIDC #' #' Download National Snow and Ice Data Center (NSIDC) Arctic Sea Ice Concentrations binary flat file and then convert to a raster object #' #' @param url A character string naming the URL of a binary file to be downloaded #' @param x Raster* object defining th...
/R/Get_Arctic_Sea_Ice.R
no_license
xiaoyaowjw/OceanData
R
false
false
3,779
r
#' Download Arctic Sea Ice Concentrations from NSIDC #' #' Download National Snow and Ice Data Center (NSIDC) Arctic Sea Ice Concentrations binary flat file and then convert to a raster object #' #' @param url A character string naming the URL of a binary file to be downloaded #' @param x Raster* object defining th...
library(ggplot2) library(scales) library(lubridate) load("elections1.rda") shinyServer(function(input, output) { position <- reactiveValues(x = NULL) hash <- reactiveValues(hash = NULL) observeEvent(input$plot_hower, { hower <- input$plot_hower if (!is.null(hower)) { position$x <- hower$x } ...
/2015/wybory2015b/server.R
no_license
pbiecek/SmarterPoland_blog
R
false
false
1,838
r
library(ggplot2) library(scales) library(lubridate) load("elections1.rda") shinyServer(function(input, output) { position <- reactiveValues(x = NULL) hash <- reactiveValues(hash = NULL) observeEvent(input$plot_hower, { hower <- input$plot_hower if (!is.null(hower)) { position$x <- hower$x } ...
#Optimizar matriz de transición tal que X se parezca a la mtriz de transición estimada #Modelo #Valor #Estado # 1 No sexualmente activa # 2 Sexualmente activa con Pastilla/Parche # 3 Sexualmente activa con LARCS (DIU, Implante, Inyección) # 4 Sexualmente activa con Condón # 5 ...
/Bases/Optimizaciones_PX_no_homogeneo.R
no_license
INSP-RH/Embarazo_Adolescente
R
false
false
2,654
r
#Optimizar matriz de transición tal que X se parezca a la mtriz de transición estimada #Modelo #Valor #Estado # 1 No sexualmente activa # 2 Sexualmente activa con Pastilla/Parche # 3 Sexualmente activa con LARCS (DIU, Implante, Inyección) # 4 Sexualmente activa con Condón # 5 ...
testlist <- list(n = c(10L, 167772160L, 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, 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, ...
/gdalcubes/inst/testfiles/libgdalcubes_set_threads/libFuzzer_libgdalcubes_set_threads/libgdalcubes_set_threads_valgrind_files/1609874419-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
503
r
testlist <- list(n = c(10L, 167772160L, 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, 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, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils-strings.R \name{extract_num} \alias{extract_num} \title{Extract numbers from a string} \usage{ extract_num(string) } \arguments{ \item{string}{String to pull numbers from} } \value{ String of numbers } \description{ Extract numbers from...
/man/extract_num.Rd
permissive
jimbrig/lossrx
R
false
true
332
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils-strings.R \name{extract_num} \alias{extract_num} \title{Extract numbers from a string} \usage{ extract_num(string) } \arguments{ \item{string}{String to pull numbers from} } \value{ String of numbers } \description{ Extract numbers from...
gkmsvm_delta<- function( seqfile_allele1, seqfile_allele2, svmfnprfx, outfile, L=10, K=6, maxnmm=3, maxseqlen=10000,...
/fuzzedpackages/gkmSVM/R/gkmsvm_delta.R
no_license
akhikolla/testpackages
R
false
false
2,283
r
gkmsvm_delta<- function( seqfile_allele1, seqfile_allele2, svmfnprfx, outfile, L=10, K=6, maxnmm=3, maxseqlen=10000,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/app.R \name{noaa_app} \alias{noaa_app} \title{Creates a NOAA Shiny App} \usage{ noaa_app(selected_location = "Ed Levin, CA (1750 ft)", as = c("shiny", "list")) } \arguments{ \item{selected_location}{(character) ...} \item{as}{(character) Whe...
/man/noaa_app.Rd
no_license
BHGC/bhgc.wx
R
false
true
441
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/app.R \name{noaa_app} \alias{noaa_app} \title{Creates a NOAA Shiny App} \usage{ noaa_app(selected_location = "Ed Levin, CA (1750 ft)", as = c("shiny", "list")) } \arguments{ \item{selected_location}{(character) ...} \item{as}{(character) Whe...
#' Get Soil Area for a Single Image #' #' Determine the total area (in pixels) of soil present within an image after masking. Masking can be conducted interactively, programmatically with circular or rectangular areas, or automatically using the normalized difference between red and green bands. #' #' @details `area_fr...
/R/area_from_image.R
permissive
Soil-Health-Institute/SlakeItEasy
R
false
false
9,935
r
#' Get Soil Area for a Single Image #' #' Determine the total area (in pixels) of soil present within an image after masking. Masking can be conducted interactively, programmatically with circular or rectangular areas, or automatically using the normalized difference between red and green bands. #' #' @details `area_fr...
library(tidyverse) library(janitor) mc_data = list() relapse1 = read_csv("./data/Examp_data.csv", col_types = cols()) mc_data$example$col_names = colnames(relapse1) relapse1 = relapse1 %>% clean_names() relapse1 = relapse1 %>% mutate(subject = factor(subject), gro...
/scripts/prod_load_files.R
no_license
ba-code-review/BA_Monte_Carlo_Review
R
false
false
776
r
library(tidyverse) library(janitor) mc_data = list() relapse1 = read_csv("./data/Examp_data.csv", col_types = cols()) mc_data$example$col_names = colnames(relapse1) relapse1 = relapse1 %>% clean_names() relapse1 = relapse1 %>% mutate(subject = factor(subject), gro...
S = c("A","C","T","G") M= matrix(c( 1,-1,-1,-1, -1, 1,-1,-1, -1,-1, 1,-1, -1,-1,-1, 1), nrow=4, ncol=4, byrow=TRUE) d = -1 s = list(c("A","A"), c("A","A"), c("A","A")) STATE = DynAlignInit(S, M,d,s) test.TFill <- function() { checkEquals(STATE$TIndex...
/tests/4.r
no_license
fiedukow/MBIAlign
R
false
false
1,389
r
S = c("A","C","T","G") M= matrix(c( 1,-1,-1,-1, -1, 1,-1,-1, -1,-1, 1,-1, -1,-1,-1, 1), nrow=4, ncol=4, byrow=TRUE) d = -1 s = list(c("A","A"), c("A","A"), c("A","A")) STATE = DynAlignInit(S, M,d,s) test.TFill <- function() { checkEquals(STATE$TIndex...
\name{datanugget-package} \alias{datanugget-package} \title{ Data Nuggets } \description{ This package contains functions to create and refine data nuggets which serve as representative samples of large datasets. The functions which perform these processes are create.DN, refine.DN, and AC, respectively. } \author{ T...
/man/datanugget-package.Rd
no_license
cran/datanugget
R
false
false
851
rd
\name{datanugget-package} \alias{datanugget-package} \title{ Data Nuggets } \description{ This package contains functions to create and refine data nuggets which serve as representative samples of large datasets. The functions which perform these processes are create.DN, refine.DN, and AC, respectively. } \author{ T...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/em_functions.R \name{func.E} \alias{func.E} \title{func.E} \usage{ func.E(dat.tss, external.perturbation = NULL, m, sample.filter, lambda.inits = NULL, ncpu = 4, center = FALSE, ...) } \arguments{ \item{dat.tss}{relative abundances matrix (...
/man/func.E.Rd
permissive
Geralddtan/BEEM-static
R
false
true
928
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/em_functions.R \name{func.E} \alias{func.E} \title{func.E} \usage{ func.E(dat.tss, external.perturbation = NULL, m, sample.filter, lambda.inits = NULL, ncpu = 4, center = FALSE, ...) } \arguments{ \item{dat.tss}{relative abundances matrix (...
############################################################################### # GARCH modelling - stylized facts and intro to rugarch package # # Author: Tamas Vadasz ############################################################################### install.packages("quantmod");library("quantmod") ##################...
/Mastering R/2078OT_01_Codes/2078OT_01_3_GARCH.R
no_license
goal1234/practice
R
false
false
4,865
r
############################################################################### # GARCH modelling - stylized facts and intro to rugarch package # # Author: Tamas Vadasz ############################################################################### install.packages("quantmod");library("quantmod") ##################...
# Existing project added to GitHub afterwards print(' This project was added to GitHub after created') print(' Linked through GitHub Bash')
/Hello GitHub World.R
no_license
johnnymolina/Temporay_add_to_version_control
R
false
false
141
r
# Existing project added to GitHub afterwards print(' This project was added to GitHub after created') print(' Linked through GitHub Bash')
#' @include class_definitions.R Workbook$methods(initialize = function(creator = "", title = NULL, subject = NULL, category = NULL) { charts <<- list() isChartSheet <<- logical(0) colWidths <<- list() connections <<- NULL Content_Types <<- genBaseContent_Type() core <<- genBaseCore(creator = creator, tit...
/R/WorkbookClass.R
no_license
pachadotdev/openxlsx
R
false
false
205,029
r
#' @include class_definitions.R Workbook$methods(initialize = function(creator = "", title = NULL, subject = NULL, category = NULL) { charts <<- list() isChartSheet <<- logical(0) colWidths <<- list() connections <<- NULL Content_Types <<- genBaseContent_Type() core <<- genBaseCore(creator = creator, tit...
#load packages, you will need to install these if you don't have them already library(cowplot) library(tidyverse) theme_set(theme_cowplot()) library(jcolors) library(forcats) library(ggforce) library(Hmisc) library(argparse) parser <- ArgumentParser(description = "Generate Final Figures") parser$add_argument('--figur...
/R/Figure-comparednds.R
permissive
Jin005/dnds-clonesize
R
false
false
8,051
r
#load packages, you will need to install these if you don't have them already library(cowplot) library(tidyverse) theme_set(theme_cowplot()) library(jcolors) library(forcats) library(ggforce) library(Hmisc) library(argparse) parser <- ArgumentParser(description = "Generate Final Figures") parser$add_argument('--figur...
arr = sample(10:20,3, replace = T) x = arr[1] y = arr[2] z = arr[3] Limits = function(x, y , z) { p = x/(x + y) emp = rhyper(1000,x,y,z) EX = mean(emp) print(EX) DX = z*p*(1-p)*(x + y - z)/(x + y - 1) print(DX) return(c(min(emp),max(emp))) } EmpAndTheoDistribution = fun...
/homeworks/Homework1.R
no_license
BobbyTodorov/Statistics
R
false
false
859
r
arr = sample(10:20,3, replace = T) x = arr[1] y = arr[2] z = arr[3] Limits = function(x, y , z) { p = x/(x + y) emp = rhyper(1000,x,y,z) EX = mean(emp) print(EX) DX = z*p*(1-p)*(x + y - z)/(x + y - 1) print(DX) return(c(min(emp),max(emp))) } EmpAndTheoDistribution = fun...
library(gap) ### Name: mhtplot2 ### Title: Manhattan plot with annotations ### Aliases: mhtplot2 ### Keywords: hplot ### ** Examples ## Not run: ##D # The following example uses only chromosomes 14 and 20 of the Nat Genet paper. ##D # ##D mdata <- within(hr1420,{ ##D c1<-colour==1 ##D c2<-colour==2 ##D c3<-c...
/data/genthat_extracted_code/gap/examples/mhtplot2.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,639
r
library(gap) ### Name: mhtplot2 ### Title: Manhattan plot with annotations ### Aliases: mhtplot2 ### Keywords: hplot ### ** Examples ## Not run: ##D # The following example uses only chromosomes 14 and 20 of the Nat Genet paper. ##D # ##D mdata <- within(hr1420,{ ##D c1<-colour==1 ##D c2<-colour==2 ##D c3<-c...
# Factor weather = c("sunny", "rainy", "cloudy", "rainy", "cloudy") # 類別有大小關係 # 字串 > 複數 > 數值 > 布林 # 小的會被轉換為大的 weather = factor(weather) weather[4] <- "typhoon" # 使用 levels 取值 levels(weather) levels(weather) <- c(levels(weather), ...
/factor.R
no_license
fiamma66/R-basic
R
false
false
595
r
# Factor weather = c("sunny", "rainy", "cloudy", "rainy", "cloudy") # 類別有大小關係 # 字串 > 複數 > 數值 > 布林 # 小的會被轉換為大的 weather = factor(weather) weather[4] <- "typhoon" # 使用 levels 取值 levels(weather) levels(weather) <- c(levels(weather), ...
gmmlogit <- function(form,inst=NULL,winst=NULL,wmat=NULL,shpfile,startb=NULL,startrho=0,blockid=0,cvcrit=.0001,data=NULL,silent=FALSE) { library(car) if (identical(wmat,NULL)) { library(spdep) neighbors <- poly2nb(shpfile,queen=TRUE) wmat <- nb2mat(neighbors,zero.policy=TRUE) } xmat <- model.frame(...
/McSpatial/R/gmmlogit.R
no_license
albrizre/spatstat.revdep
R
false
false
4,263
r
gmmlogit <- function(form,inst=NULL,winst=NULL,wmat=NULL,shpfile,startb=NULL,startrho=0,blockid=0,cvcrit=.0001,data=NULL,silent=FALSE) { library(car) if (identical(wmat,NULL)) { library(spdep) neighbors <- poly2nb(shpfile,queen=TRUE) wmat <- nb2mat(neighbors,zero.policy=TRUE) } xmat <- model.frame(...
data <- SmarterPoland::countries %>% group_by(continent) %>% summarise(avg_death = mean(death.rate)) data2 <- SmarterPoland::countries %>% na.omit() %>% group_by(continent) %>% summarise(avg_birth = mean(birth.rate))
/Wyjsciowki/W7/gr1/MynaJacek/preprocessing.R
no_license
ramusz1/WizualizacjaDanych2018
R
false
false
217
r
data <- SmarterPoland::countries %>% group_by(continent) %>% summarise(avg_death = mean(death.rate)) data2 <- SmarterPoland::countries %>% na.omit() %>% group_by(continent) %>% summarise(avg_birth = mean(birth.rate))
##' @title List Naming Scheme ##' @description Lists the naming scheme, either as default, or ##' as modified by the user. ##' @details See \code{\link{assignNames}}. ##' @examples ##' varnames() ##' @export varnames <- function() { # cat('\n') # cat('bio:\t', .var$bio, '\t\t\t##\t', .var$bio_post, '\n') # cat('...
/envirem/R/varnames.R
permissive
scidam/envirem
R
false
false
1,626
r
##' @title List Naming Scheme ##' @description Lists the naming scheme, either as default, or ##' as modified by the user. ##' @details See \code{\link{assignNames}}. ##' @examples ##' varnames() ##' @export varnames <- function() { # cat('\n') # cat('bio:\t', .var$bio, '\t\t\t##\t', .var$bio_post, '\n') # cat('...
context("reduce_ranges method") test_that("matches IRanges/GenomicRanges", { x <- IRanges() expect_identical(x, reduce_ranges(x)) x <- IRanges(c(1:4, 10:11, 11), width=c(0,1,1,0,0,0,1)) mcols(x) <- DataFrame(mapping = paste0("a", seq_along(x))) target <- IRanges(c(1:2, 10:11), width=c(0,2,0,1)) mcols(targ...
/tests/testthat/test-reduce.R
no_license
jonocarroll/plyranges
R
false
false
5,794
r
context("reduce_ranges method") test_that("matches IRanges/GenomicRanges", { x <- IRanges() expect_identical(x, reduce_ranges(x)) x <- IRanges(c(1:4, 10:11, 11), width=c(0,1,1,0,0,0,1)) mcols(x) <- DataFrame(mapping = paste0("a", seq_along(x))) target <- IRanges(c(1:2, 10:11), width=c(0,2,0,1)) mcols(targ...
\name{L2p} \alias{L2p} %- Also NEED an '\alias' for EACH other topic documented here. \title{Function to transforme an L table to an p object %% ~~function to do ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ L2p(L,ct) } %- maybe also 'usage' for other objects d...
/P1v2/man/L2p.Rd
no_license
franciscorichter/Project1
R
false
false
1,122
rd
\name{L2p} \alias{L2p} %- Also NEED an '\alias' for EACH other topic documented here. \title{Function to transforme an L table to an p object %% ~~function to do ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ L2p(L,ct) } %- maybe also 'usage' for other objects d...
## ## DPLYR Sample codes ## library(dplyr) library(readxl) ## Importing Excel Data excelFile <- "governors_county.xlsx" excelImport <- read_xlsx(excelFile) View(excelImport) ## "Select" Function voteSelect <- select(excelImport, c(county,percent)) View(voteSelect) ## "Filter" Function voteFilter <- filter(excel...
/Beginner_RStudio_Course/lesson_16/dplyr_sample.R
no_license
wany1d1001/droiduino
R
false
false
1,221
r
## ## DPLYR Sample codes ## library(dplyr) library(readxl) ## Importing Excel Data excelFile <- "governors_county.xlsx" excelImport <- read_xlsx(excelFile) View(excelImport) ## "Select" Function voteSelect <- select(excelImport, c(county,percent)) View(voteSelect) ## "Filter" Function voteFilter <- filter(excel...
noMissing <- function() { job <- list() job$map <- expression({ lapply(seq_along(map.keys), function(r) { if(sum(is.na(map.values[[r]]$resp)) == 0) { value <- arrange(map.values[[r]], year, match(month, month.abb)) rhcollect(map.keys[[r]], value) } }) }) job$setup <- express...
/NCAR/rhcode/noMiss/rh.nomissing.R
no_license
XiaosuTong/Spatial
R
false
false
1,992
r
noMissing <- function() { job <- list() job$map <- expression({ lapply(seq_along(map.keys), function(r) { if(sum(is.na(map.values[[r]]$resp)) == 0) { value <- arrange(map.values[[r]], year, match(month, month.abb)) rhcollect(map.keys[[r]], value) } }) }) job$setup <- express...
vec.unity <- function(lenghts){ unity.vector <- matrix(rep(1, lenghts)) return(t(unity.vector)) }
/code/getVectorOnes.R
no_license
LukasClermont/DCW-model-by-Cipolini-et-al.--2021-
R
false
false
101
r
vec.unity <- function(lenghts){ unity.vector <- matrix(rep(1, lenghts)) return(t(unity.vector)) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/yr_hour_by_hour.R \name{yr_hour_by_hour} \alias{yr_hour_by_hour} \title{Get hourly forecast from YR.no} \usage{ yr_hour_by_hour(place = NULL, country = NULL, place_url = NULL, search_no = 1) } \arguments{ \item{place}{Place name. Ex 'Copenh...
/man/yr_hour_by_hour.Rd
no_license
krose/yrno
R
false
true
1,267
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/yr_hour_by_hour.R \name{yr_hour_by_hour} \alias{yr_hour_by_hour} \title{Get hourly forecast from YR.no} \usage{ yr_hour_by_hour(place = NULL, country = NULL, place_url = NULL, search_no = 1) } \arguments{ \item{place}{Place name. Ex 'Copenh...
## plots made for TMB-INLA paper ## AOZ - 2020 require(raster) require(viridis) ## ~~~~~~~~~~~~~~~~ ## varying meshes ~ ## ~~~~~~~~~~~~~~~~ source("./make_mesh_plot.R") ## ~~~~~~~~~~~~~~~~ ## make cov plots ~ ## ~~~~~~~~~~~~~~~~ cov_list <- readRDS('/media/FantomHD/IHME_DUMP/from_the_cluster/tmb_inla_sim/2020_08_08_1...
/continuous_sims/paper_figs.R
no_license
aaron-oz/tmb-inla-paper
R
false
false
848
r
## plots made for TMB-INLA paper ## AOZ - 2020 require(raster) require(viridis) ## ~~~~~~~~~~~~~~~~ ## varying meshes ~ ## ~~~~~~~~~~~~~~~~ source("./make_mesh_plot.R") ## ~~~~~~~~~~~~~~~~ ## make cov plots ~ ## ~~~~~~~~~~~~~~~~ cov_list <- readRDS('/media/FantomHD/IHME_DUMP/from_the_cluster/tmb_inla_sim/2020_08_08_1...
#' An algorthm to identify the largest rectangle in a histogram #' #' @param heights a list of the heights of the histogram. #' @return list #' @export #' @importFrom magrittr %>% get_max_area_bf <- function(heights){ # browser() maxarea = 0 for(i in 1:length(heights)){ minheight = heights[i] for (j i...
/R/get_max_area_bf.R
permissive
flumenhabitans/mmtable2
R
false
false
636
r
#' An algorthm to identify the largest rectangle in a histogram #' #' @param heights a list of the heights of the histogram. #' @return list #' @export #' @importFrom magrittr %>% get_max_area_bf <- function(heights){ # browser() maxarea = 0 for(i in 1:length(heights)){ minheight = heights[i] for (j i...
# Author: Erik Strand # Version: 2021-03-13 library(tidyverse) library(sf) library(ggmap) library(lubridate) api <- # removed for privacy reasons register_google(key = api) nyc_ih_raw <- read_csv("../data/final project/HPD Inclusionary Housing Sites.csv") nyc_all_housing <- read_csv("../data/final project/Hous...
/script/nyc.r
no_license
erikstrand2/urban-data-ml
R
false
false
2,938
r
# Author: Erik Strand # Version: 2021-03-13 library(tidyverse) library(sf) library(ggmap) library(lubridate) api <- # removed for privacy reasons register_google(key = api) nyc_ih_raw <- read_csv("../data/final project/HPD Inclusionary Housing Sites.csv") nyc_all_housing <- read_csv("../data/final project/Hous...
\name{rao} \alias{rao} \docType{data} \title{Circular orientation of homing pigeons (Rao 1976)} \description{The angular degree orientation of 10 homing pigeons used by Rao (1976) for his spacing test of uniformity on a circular distribution. } \usage{data(rao)} \format{ A data frame with 10 observations on...
/man/rao.Rd
no_license
cran/Blossom
R
false
false
1,076
rd
\name{rao} \alias{rao} \docType{data} \title{Circular orientation of homing pigeons (Rao 1976)} \description{The angular degree orientation of 10 homing pigeons used by Rao (1976) for his spacing test of uniformity on a circular distribution. } \usage{data(rao)} \format{ A data frame with 10 observations on...
# Assignment 1 # Yoohan Ko # "I pledge my honor I have abided by the Stevens Honor System." # Fall 2019, Stevens Institute of Technology # Please submit R code as well as a pdf file to include results. 10 points will be deducted if there is any missing file. # Exercise I # Vector # – Create two vectors for your first...
/Assignment1.R
no_license
yoohanko98/FE513_databasedesign
R
false
false
2,653
r
# Assignment 1 # Yoohan Ko # "I pledge my honor I have abided by the Stevens Honor System." # Fall 2019, Stevens Institute of Technology # Please submit R code as well as a pdf file to include results. 10 points will be deducted if there is any missing file. # Exercise I # Vector # – Create two vectors for your first...
library(dplyr) library(ggplot2) library(ggthemes) library(hexbin) remove_outliers <- function(x, na.rm = TRUE, ...) { qnt <- quantile(x, probs=c(.25, .75), na.rm = na.rm, ...) H <- 1.5 * IQR(x, na.rm = na.rm) y <- x y[x < (qnt[1] - H)] <- NA y[x > (qnt[2] + H)] <- NA y } cropdat <- readRDS("data/full_ag_d...
/density_of_rev_per_crop.R
no_license
johnwoodill/adaptation-along-the-envelope
R
false
false
10,651
r
library(dplyr) library(ggplot2) library(ggthemes) library(hexbin) remove_outliers <- function(x, na.rm = TRUE, ...) { qnt <- quantile(x, probs=c(.25, .75), na.rm = na.rm, ...) H <- 1.5 * IQR(x, na.rm = na.rm) y <- x y[x < (qnt[1] - H)] <- NA y[x > (qnt[2] + H)] <- NA y } cropdat <- readRDS("data/full_ag_d...
#' An S4 class to represent a spatiotemporal POMP model and data. #' #' @slot unit_names A vector containing the spatial units of a spatiotemporal POMP. #' @slot unit_statenames A vector containing the state names such that appending the unit indices to the #' unit statenames will result in the each unit's correspondin...
/R/spatPomp_class.R
no_license
kidusasfaw/spatPomp
R
false
false
1,144
r
#' An S4 class to represent a spatiotemporal POMP model and data. #' #' @slot unit_names A vector containing the spatial units of a spatiotemporal POMP. #' @slot unit_statenames A vector containing the state names such that appending the unit indices to the #' unit statenames will result in the each unit's correspondin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper-functions.R \name{rename_clusters} \alias{rename_clusters} \title{Renames cluster names for consistency in visualization} \usage{ rename_clusters(clusterdata) } \arguments{ \item{clusterdata}{Dataframe containing cluster information at...
/man/rename_clusters.Rd
no_license
kzintas/TreeSE
R
false
true
493
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper-functions.R \name{rename_clusters} \alias{rename_clusters} \title{Renames cluster names for consistency in visualization} \usage{ rename_clusters(clusterdata) } \arguments{ \item{clusterdata}{Dataframe containing cluster information at...
testlist <- list(x = c(-1L, 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, 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, 0L, 0L, ...
/diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962070-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
483
r
testlist <- list(x = c(-1L, 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, 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, 0L, 0L, ...
#도전 미션 3-1 프로 야구 선수 밥값하나요? setwd("D:/workspace/R_Data_Analysis/Part2/Stage3/Ch3-1 Baseball player") library(ggplot2) library(dplyr) library(RColorBrewer) data <- read.csv("야구성적.csv") head(data) data <- data %>% mutate(OPS = 출루율 + 장타율) palete <- brewer.pal() avg <- mean(data$연봉대비출루율) avg ggplot(data, aes(선수명,연봉대비출...
/Part2/Stage3/과제/Q 3-1 Baseball.R
no_license
jaballet/R-Lecture
R
false
false
2,303
r
#도전 미션 3-1 프로 야구 선수 밥값하나요? setwd("D:/workspace/R_Data_Analysis/Part2/Stage3/Ch3-1 Baseball player") library(ggplot2) library(dplyr) library(RColorBrewer) data <- read.csv("야구성적.csv") head(data) data <- data %>% mutate(OPS = 출루율 + 장타율) palete <- brewer.pal() avg <- mean(data$연봉대비출루율) avg ggplot(data, aes(선수명,연봉대비출...
# Load and Save Data list.files() scan1 <- scan('scan_1.txt') scan1 scan2 <- scan('scan_2.txt') # 1.00 2.00 3.00 4.00 scan2 scan2 <- scan('scan_2.txt',what=""); scan2 class(scan2) scan3 <- scan('scan_3.txt',"what="); scan3 scan4 <- scan('scan_4.txt',what=""); scan4 input <- scan() # 사용자로부터 입력 받을 때 input input <- scan...
/Part3/sec7_load_save_data.R
no_license
gangki/R-Lecture
R
false
false
2,144
r
# Load and Save Data list.files() scan1 <- scan('scan_1.txt') scan1 scan2 <- scan('scan_2.txt') # 1.00 2.00 3.00 4.00 scan2 scan2 <- scan('scan_2.txt',what=""); scan2 class(scan2) scan3 <- scan('scan_3.txt',"what="); scan3 scan4 <- scan('scan_4.txt',what=""); scan4 input <- scan() # 사용자로부터 입력 받을 때 input input <- scan...
##### # Author: Kamrine Poels # Description: predicts number of cells by resistance type. Input of drug concentrations # is from UBIQUITY # Notes: death rates are kept constant # WARNING: These functions use trapezoidal integration ##### library(pracma) # source("gettingVarianceOfOutcome.R") # Functions to return ...
/Demo/Code_demo/predictCount_ubiquity.R
no_license
Michorlab/NSCLC_OsimDacoOptimization
R
false
false
5,754
r
##### # Author: Kamrine Poels # Description: predicts number of cells by resistance type. Input of drug concentrations # is from UBIQUITY # Notes: death rates are kept constant # WARNING: These functions use trapezoidal integration ##### library(pracma) # source("gettingVarianceOfOutcome.R") # Functions to return ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MG_RastPipeline.R \name{FT.cor} \alias{FT.cor} \title{function-correlation matrix} \usage{ FT.cor(x, y) } \arguments{ \item{x}{taxon} \item{y}{functional abundance} \item{data}{data} } \description{ function-correlation matrix } \examples{ ...
/man/FT.cor.Rd
no_license
Djeppschmidt/mgrastr
R
false
true
331
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MG_RastPipeline.R \name{FT.cor} \alias{FT.cor} \title{function-correlation matrix} \usage{ FT.cor(x, y) } \arguments{ \item{x}{taxon} \item{y}{functional abundance} \item{data}{data} } \description{ function-correlation matrix } \examples{ ...
source(file.path(getwd(),"GetData.R")) # Convert date and time to date:time format. dateData <- strptime(paste(interest$Date,interest$Time,sep = " "),"%d/%m/%Y %H:%M:%S") # fetching Global Active Power data. GlobalActivePower <- as.numeric(interest$Global_active_power) # open a png file names "plot1.png" png("plot2....
/plot2.R
no_license
nrjptl/ExData_Plotting1
R
false
false
488
r
source(file.path(getwd(),"GetData.R")) # Convert date and time to date:time format. dateData <- strptime(paste(interest$Date,interest$Time,sep = " "),"%d/%m/%Y %H:%M:%S") # fetching Global Active Power data. GlobalActivePower <- as.numeric(interest$Global_active_power) # open a png file names "plot1.png" png("plot2....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reformat_results.R \name{reformat_results} \alias{reformat_results} \title{Result formating} \usage{ reformat_results(myfit, mydata) } \arguments{ \item{myfit}{a runjags object as returned by \code{\link[runjags]{run.jags}}} \item{mydata}{a ...
/man/reformat_results.Rd
permissive
Irstea/escroc
R
false
true
585
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reformat_results.R \name{reformat_results} \alias{reformat_results} \title{Result formating} \usage{ reformat_results(myfit, mydata) } \arguments{ \item{myfit}{a runjags object as returned by \code{\link[runjags]{run.jags}}} \item{mydata}{a ...
rm(list=ls()) #Columns containing relevant data (means and standard deviations) based on grep() search of features.txt alllabels <- read.table("features.txt",stringsAsFactors=F)[,2] colToExt <- sort(setdiff(union(grep("*-mean", alllabels),grep("*-std", alllabels)),grep("*-meanFreq", alllabels))) #Extracting relevant ...
/run_analysis.R
no_license
mpedruski/Getting_and_Cleaning_Data
R
false
false
2,472
r
rm(list=ls()) #Columns containing relevant data (means and standard deviations) based on grep() search of features.txt alllabels <- read.table("features.txt",stringsAsFactors=F)[,2] colToExt <- sort(setdiff(union(grep("*-mean", alllabels),grep("*-std", alllabels)),grep("*-meanFreq", alllabels))) #Extracting relevant ...
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(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, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0...
/IntervalSurgeon/inst/testfiles/rcpp_depth/AFL_rcpp_depth/rcpp_depth_valgrind_files/1609857143-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
713
r
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(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, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0...
testlist <- list(ends = c(1533208973L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, -96688997L, 1632068659L, -1985290631L, -1286875988L, 1686393228L, -1178994978L, -161631656L, 1758370433L, -1895223127L, 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/1609859938-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
807
r
testlist <- list(ends = c(1533208973L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, -96688997L, 1632068659L, -1985290631L, -1286875988L, 1686393228L, -1178994978L, -161631656L, 1758370433L, -1895223127L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, ...
library(MASS) lm.fit <- glm(medv ~ lstat + age, data = Boston) summary(Boston) #Q1 sum((Boston$medv - median(Boston$medv))^2) #Fit medv (median house value) as a linear function of lstat (percentage of lower status of the population) and age (proportion of units built prior to 1940). lm.fit <- glm(medv ~ lstat + age, ...
/dsa-6000/lab-exercise-w4.R
no_license
borodark/wsu
R
false
false
3,252
r
library(MASS) lm.fit <- glm(medv ~ lstat + age, data = Boston) summary(Boston) #Q1 sum((Boston$medv - median(Boston$medv))^2) #Fit medv (median house value) as a linear function of lstat (percentage of lower status of the population) and age (proportion of units built prior to 1940). lm.fit <- glm(medv ~ lstat + age, ...
## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'pollutant' is a character vector of length 1 indicating ## the name of the pollutant for which we will calculate the ## mean; either "sulfate" or "nitrate". ## 'id' is an integer vector indicating the monitor ID numbers #...
/pollutantmean.R
no_license
TeasingGnat/datasciencecoursera
R
false
false
1,354
r
## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'pollutant' is a character vector of length 1 indicating ## the name of the pollutant for which we will calculate the ## mean; either "sulfate" or "nitrate". ## 'id' is an integer vector indicating the monitor ID numbers #...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 6.30189661857436e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615778715-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
348
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 6.30189661857436e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling...
library(daewr) ### Name: Bff ### Title: Confounded block fractional mouse growth experiment ### Aliases: Bff ### Keywords: datasets ### ** Examples data(Bff)
/data/genthat_extracted_code/daewr/examples/Bff.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
165
r
library(daewr) ### Name: Bff ### Title: Confounded block fractional mouse growth experiment ### Aliases: Bff ### Keywords: datasets ### ** Examples data(Bff)
#' Results of repeated measurements #' #' Example dataset of Olofsen et al. containing results of #' 15 repeated measurements (second and third column) with #' two different tools in 20 individuals (first column). #' The variables are as follows: #' #' \describe{ #' \item{subject}{subject ID} #' \item{measurement_x...
/R/data.R
no_license
imbs-hl/blandxtr
R
false
false
560
r
#' Results of repeated measurements #' #' Example dataset of Olofsen et al. containing results of #' 15 repeated measurements (second and third column) with #' two different tools in 20 individuals (first column). #' The variables are as follows: #' #' \describe{ #' \item{subject}{subject ID} #' \item{measurement_x...
library(shiny) shinyUI(fluidPage( titlePanel("Temperature Converter"), sidebarLayout( sidebarPanel( fluidRow( fluidRow( column(12, textInput(inputId = 'temp', label = textOutput(''), value = "", placeholder = "Enter the v...
/ui.R
no_license
giduerme/Developing-Data-Products-Course-Project
R
false
false
765
r
library(shiny) shinyUI(fluidPage( titlePanel("Temperature Converter"), sidebarLayout( sidebarPanel( fluidRow( fluidRow( column(12, textInput(inputId = 'temp', label = textOutput(''), value = "", placeholder = "Enter the v...
## Exploratory Data Analysis ## Course Project 1 ## May 7, 2014 setwd("~/Documents/Exploratory Data Analysis/Code") alldata <- read.table ("./data/household_power_consumption 2.txt", header = T, sep = ";", na.strings = "?") head(alldata) str(alldata) # Add a column where the original Date (fac...
/plot2.R
no_license
kmborchert/ExData_Plotting1
R
false
false
1,565
r
## Exploratory Data Analysis ## Course Project 1 ## May 7, 2014 setwd("~/Documents/Exploratory Data Analysis/Code") alldata <- read.table ("./data/household_power_consumption 2.txt", header = T, sep = ";", na.strings = "?") head(alldata) str(alldata) # Add a column where the original Date (fac...
plot3 <- function() { ## read chunks of data from file in batches of 45k lines (about a month) with 5k lines overlap ## stop when desired time frame is found tChunk <- read.delim("household_power_consumption.txt", nrows = 1, skip =1, header = FALSE, sep = ";", dec=".") dEnd = as.Date(t...
/plot3.R
no_license
hktoler/ExData_Plotting1
R
false
false
1,890
r
plot3 <- function() { ## read chunks of data from file in batches of 45k lines (about a month) with 5k lines overlap ## stop when desired time frame is found tChunk <- read.delim("household_power_consumption.txt", nrows = 1, skip =1, header = FALSE, sep = ";", dec=".") dEnd = as.Date(t...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{derivatives} \alias{derivatives} \title{implied vol for options on SPX} \description{ implied vol for options on SPX for different time to maturity and moneyness. } \author{ Xavier Valls\email{xaviervallspl...
/RforgeCode/Meucci/man/derivatives.Rd
no_license
dsnaveen/symmys
R
false
false
463
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{derivatives} \alias{derivatives} \title{implied vol for options on SPX} \description{ implied vol for options on SPX for different time to maturity and moneyness. } \author{ Xavier Valls\email{xaviervallspl...
\name{Many univariate simple linear regressions} \alias{regression} \title{ Many univariate simple linear regressions } \description{ It performs very many univariate simple linear regressions with or without categorical variables. } \usage{ regression(x, y, poia = NULL, logged = FALSE) } \arguments{ \item{x}{ A dat...
/man/regression.Rd
no_license
RfastOfficial/Rfast
R
false
false
1,971
rd
\name{Many univariate simple linear regressions} \alias{regression} \title{ Many univariate simple linear regressions } \description{ It performs very many univariate simple linear regressions with or without categorical variables. } \usage{ regression(x, y, poia = NULL, logged = FALSE) } \arguments{ \item{x}{ A dat...
# plot4.R # as question requires preprocessing code to be in each of the plot r scripts, # it is included here as ### preprocessing code ### followed by a separate section # for ### plot code ### #################################################################### #################################################...
/plot6.R
no_license
warrenroos/DS_EDA_PeerAssessment2
R
false
false
5,628
r
# plot4.R # as question requires preprocessing code to be in each of the plot r scripts, # it is included here as ### preprocessing code ### followed by a separate section # for ### plot code ### #################################################################### #################################################...
library(dplyr) library(ggpubr) library(cowplot) folder <- 'C:\\<your-folder>\\Chapter14' barchart_lst <- readRDS(file.path(folder, 'Demo\\barchart_lst.rds')) # Uncomment if the script is not run in Power BI #dataset <- data.frame(categorical_col_name = names(barchart_lst)) col_name <- (dataset %>% pull(1))[1] bar...
/Chapter14/R/06-plot-categorical-variables.R
permissive
Micseb/Extending-Power-BI-with-Python-and-R
R
false
false
342
r
library(dplyr) library(ggpubr) library(cowplot) folder <- 'C:\\<your-folder>\\Chapter14' barchart_lst <- readRDS(file.path(folder, 'Demo\\barchart_lst.rds')) # Uncomment if the script is not run in Power BI #dataset <- data.frame(categorical_col_name = names(barchart_lst)) col_name <- (dataset %>% pull(1))[1] bar...
best <- function(state, outcome) { ## Read outcome data outcomedf <- read.csv("outcome-of-care-measures.csv") ## Check that state and outcome are valid stateslist <- unique(outcomedf$State) outcomelist <- c('heart attack', 'heart failure', 'pneumonia') if(!(state %in% stateslist)){ stop("invalid sta...
/best.R
no_license
rajeshdrao/datasciencecoursera
R
false
false
1,765
r
best <- function(state, outcome) { ## Read outcome data outcomedf <- read.csv("outcome-of-care-measures.csv") ## Check that state and outcome are valid stateslist <- unique(outcomedf$State) outcomelist <- c('heart attack', 'heart failure', 'pneumonia') if(!(state %in% stateslist)){ stop("invalid sta...
#' This function queries HaploReg web-based tool and returns results. #' #' @param query Query (a vector of rsIDs). #' @param file A text file (one refSNP ID per line). #' @param study A particular study. See function \code{getHaploRegStudyList(...)}. #' Default: \code{NULL}. #' @param ldThresh LD threshold, r2 (selec...
/R/haploreg.R
no_license
timyers/haploR
R
false
false
14,335
r
#' This function queries HaploReg web-based tool and returns results. #' #' @param query Query (a vector of rsIDs). #' @param file A text file (one refSNP ID per line). #' @param study A particular study. See function \code{getHaploRegStudyList(...)}. #' Default: \code{NULL}. #' @param ldThresh LD threshold, r2 (selec...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rtiesShared.R \name{Max_Min_CCF_Signed} \alias{Max_Min_CCF_Signed} \title{A helper function for makeCrossCorr} \usage{ Max_Min_CCF_Signed(a, b) } \arguments{ \item{a}{First time-series used in the cross-correlation} \item{b}{Second time-seri...
/man/Max_Min_CCF_Signed.Rd
no_license
cran/rties
R
false
true
506
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rtiesShared.R \name{Max_Min_CCF_Signed} \alias{Max_Min_CCF_Signed} \title{A helper function for makeCrossCorr} \usage{ Max_Min_CCF_Signed(a, b) } \arguments{ \item{a}{First time-series used in the cross-correlation} \item{b}{Second time-seri...
# Author: Yuchen Yang (yy5819@ic.ac.uk) # Version: 0.0.1 ## Clear the directory ## rm(list=ls()) ############### i <- 0 #Initialize i while(i < Inf) { if (i == 10) { break } # Break out of the while loop! else { cat("i equals " , i , " \n") i <- i + 1 # Update i } }
/Week3/Code/break.R
no_license
gregiee/CMEEcoursework
R
false
false
301
r
# Author: Yuchen Yang (yy5819@ic.ac.uk) # Version: 0.0.1 ## Clear the directory ## rm(list=ls()) ############### i <- 0 #Initialize i while(i < Inf) { if (i == 10) { break } # Break out of the while loop! else { cat("i equals " , i , " \n") i <- i + 1 # Update i } }
# Team 10 - TP2 # Instacart Market Basket Analysis # Adapted from starter code from user Branden Murray: https://www.kaggle.com/brandenkmurray/xgboost-in-h2o # Load Required Packages library(data.table) library(h2o) # Initialization parameters for h2o h2o.init(nthreads = 15, max_mem_size = "16g") # Load a...
/Team10_TP2.R
no_license
sbbrown-wm/ML2_TP2
R
false
false
5,971
r
# Team 10 - TP2 # Instacart Market Basket Analysis # Adapted from starter code from user Branden Murray: https://www.kaggle.com/brandenkmurray/xgboost-in-h2o # Load Required Packages library(data.table) library(h2o) # Initialization parameters for h2o h2o.init(nthreads = 15, max_mem_size = "16g") # Load a...
#*************************************** # # [ --- Operational functions --- ] ---- # #*************************************** # package check #************** # Example #******** # lapply(c("geepack"), checkpackages) checkpackages=function(package){ # Checking the Availability of packages # Installs them. # Ex...
/old/2020-02-21 (simple version)/Functions.R
no_license
JinCheolChoi/Functions
R
false
false
177,621
r
#*************************************** # # [ --- Operational functions --- ] ---- # #*************************************** # package check #************** # Example #******** # lapply(c("geepack"), checkpackages) checkpackages=function(package){ # Checking the Availability of packages # Installs them. # Ex...
# simulation - zero bias (env covariate) # simulation study # load libraries #### library(INLA) INLA:::inla.dynload.workaround() library(reshape2) library(deldir) library(rgeos) library(fields) library(RColorBrewer) #display.brewer.all(colorblindFriendly = TRUE) ### Set parameters #### #genData dim = c(100,100) ...
/simulation_study_repeat.R
no_license
NERC-CEH/IDM_comparisons
R
false
false
21,226
r
# simulation - zero bias (env covariate) # simulation study # load libraries #### library(INLA) INLA:::inla.dynload.workaround() library(reshape2) library(deldir) library(rgeos) library(fields) library(RColorBrewer) #display.brewer.all(colorblindFriendly = TRUE) ### Set parameters #### #genData dim = c(100,100) ...