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
#-------------(11)------- set.seed(1) x=rnorm(100) y=2*x+rnorm(100) #---------(a)------------ par(mfrow=c(1,1)) plot(x,y) lm.fit1=lm(y~x+0) summary(lm.fit1) abline(lm.fit1) #-Coeff 1.99,std.er= 0.106,RSE=0.95,R^2=0.777,p-values close to zero. #---------(b)------------ lm.fit2=lm(x~y+0) summary(lm.fit2) plot(y,x) ablin...
/chapter 3/ch3.11.R
no_license
deepaksharma64/ISLR-Book-Programming-Exercises-
R
false
false
673
r
#-------------(11)------- set.seed(1) x=rnorm(100) y=2*x+rnorm(100) #---------(a)------------ par(mfrow=c(1,1)) plot(x,y) lm.fit1=lm(y~x+0) summary(lm.fit1) abline(lm.fit1) #-Coeff 1.99,std.er= 0.106,RSE=0.95,R^2=0.777,p-values close to zero. #---------(b)------------ lm.fit2=lm(x~y+0) summary(lm.fit2) plot(y,x) ablin...
# This function will identify areas with high probability of occurrence of vegetation guilds # Last edited by Elaina Passero 3/2/20 id.high.prob.areas <- function(scene_veg_out,scene_name){ prob_veg_map <- scene_veg_out[[scene_name]] threshold <- 0.7 # threshold to be considered high probability of occurrence ...
/id.high.prob.areas.R
no_license
passeroe/verde-refdss
R
false
false
605
r
# This function will identify areas with high probability of occurrence of vegetation guilds # Last edited by Elaina Passero 3/2/20 id.high.prob.areas <- function(scene_veg_out,scene_name){ prob_veg_map <- scene_veg_out[[scene_name]] threshold <- 0.7 # threshold to be considered high probability of occurrence ...
require(jsonlite) require(logging) twitter_oauth2 <- function(consumer_api_key, consumer_secret_api_key) { ## Check if hidden twitter environment exists if(!(exists('.env_twitter'))) { loginfo('Making first authentication in this session: building hidden environment') .env_twitter <<- new.env(parent=basee...
/twitter_scraper.R
no_license
chris-kelly/ds_blog
R
false
false
6,988
r
require(jsonlite) require(logging) twitter_oauth2 <- function(consumer_api_key, consumer_secret_api_key) { ## Check if hidden twitter environment exists if(!(exists('.env_twitter'))) { loginfo('Making first authentication in this session: building hidden environment') .env_twitter <<- new.env(parent=basee...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/probe.R \name{probe} \alias{probe} \title{Interrogate the elements of a list with a predicate function.} \usage{ probe(.x, .p, ...) } \arguments{ \item{.x}{A list or vector.} \item{.p}{A single predicate function, a formula describin...
/man/probe.Rd
no_license
earino/purrr
R
false
false
1,259
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/probe.R \name{probe} \alias{probe} \title{Interrogate the elements of a list with a predicate function.} \usage{ probe(.x, .p, ...) } \arguments{ \item{.x}{A list or vector.} \item{.p}{A single predicate function, a formula describin...
format_number <- function(x) { sprintf('{\\tablenum[table-format = 1.2]{%1.2f}}', x) } format_row <- function(xrow) { paste(xrow, collapse=" & ") } format_all <- function(xall) { cat(paste(xall, collapse=" \\\\\n ")) } ######################### ================== mtry =========================== ##############...
/analysis/codes/plot_and_tables_tvary.R
no_license
davidmeester/TimeVaryingData_LTRCforests
R
false
false
12,498
r
format_number <- function(x) { sprintf('{\\tablenum[table-format = 1.2]{%1.2f}}', x) } format_row <- function(xrow) { paste(xrow, collapse=" & ") } format_all <- function(xall) { cat(paste(xall, collapse=" \\\\\n ")) } ######################### ================== mtry =========================== ##############...
# write concordance array for scRNA-seq/bulk comparisons # FCC array fcc_opts = list( method = 'fcc', cor_method = 'spearman' ) fcc_array = do.call(expand.grid, c(fcc_opts, stringsAsFactors = F)) # AUCC array aucc_opts = list( method = 'aucc', k = c(100, 200, 500, 1000) ) aucc_array = do.call(expand.grid, c(auc...
/R/analysis/bulk_concordance/write_grid.R
no_license
phycomlab/DE-analysis
R
false
false
460
r
# write concordance array for scRNA-seq/bulk comparisons # FCC array fcc_opts = list( method = 'fcc', cor_method = 'spearman' ) fcc_array = do.call(expand.grid, c(fcc_opts, stringsAsFactors = F)) # AUCC array aucc_opts = list( method = 'aucc', k = c(100, 200, 500, 1000) ) aucc_array = do.call(expand.grid, c(auc...
#' Run a windowed analysis on either a Zoom transcript or chat #' This function conducts a temporal window analysis on the conversation in #' either a Zoom transcript or chat. It replicates the textConversationAnalysis #' function across a set of windows at a window size specified by the user. #' @param inputData dat...
/R/windowedTextConversationAnalysis.R
permissive
NastashaVelasco1987/zoomGroupStats
R
false
false
4,838
r
#' Run a windowed analysis on either a Zoom transcript or chat #' This function conducts a temporal window analysis on the conversation in #' either a Zoom transcript or chat. It replicates the textConversationAnalysis #' function across a set of windows at a window size specified by the user. #' @param inputData dat...
zscore_EUR_AFR<-read.table("1w_zscore_EUR_AFR",header=T,stringsAsFactors=F) zscore_EUR_SAS<-read.table("1w_zscore_EUR_SAS",header=T,stringsAsFactors=F) zscore_EUR_EAS<-read.table("1w_zscore_EUR_EAS",header=T,stringsAsFactors=F) zscore_AFR_SAS<-read.table("1w_zscore_AFR_SAS",header=T,stringsAsFactors=F) zscore_AFR_EAS<-...
/Phenotype/02_raw_ancestry_between_sex_1wp.R
no_license
guiyuanyuan123/UKB_brain
R
false
false
3,126
r
zscore_EUR_AFR<-read.table("1w_zscore_EUR_AFR",header=T,stringsAsFactors=F) zscore_EUR_SAS<-read.table("1w_zscore_EUR_SAS",header=T,stringsAsFactors=F) zscore_EUR_EAS<-read.table("1w_zscore_EUR_EAS",header=T,stringsAsFactors=F) zscore_AFR_SAS<-read.table("1w_zscore_AFR_SAS",header=T,stringsAsFactors=F) zscore_AFR_EAS<-...
library("reshape2") # Download and create a directory for the dataset. Please note that the dataset is enclosed in a Zip archive file # and must therefore be stored in a temporary file before it can be unzipped to the directory that the user is # working in. datasetUrl <- "https://d396qusza40orc.cloudfront.net/getdat...
/run_analysis.R
no_license
Skrie/Course3PeerReviewAssignment
R
false
false
3,276
r
library("reshape2") # Download and create a directory for the dataset. Please note that the dataset is enclosed in a Zip archive file # and must therefore be stored in a temporary file before it can be unzipped to the directory that the user is # working in. datasetUrl <- "https://d396qusza40orc.cloudfront.net/getdat...
## GETTING AND CLEANING DATA COURSE PROJECT ## LIZ WOELFEL #________________________________________________________________________________ ##1. MERGES THE TRAINING AND THE TEST SETS TO CREATE ONE DATA SET #READING IN THE TRAINING & TEST DATA SETS & LABELS COLUMNS feature.names <- read.table('./features.txt') #READ...
/run_analysis.R
no_license
lizwoelfel/GettingAndCleaningData
R
false
false
3,740
r
## GETTING AND CLEANING DATA COURSE PROJECT ## LIZ WOELFEL #________________________________________________________________________________ ##1. MERGES THE TRAINING AND THE TEST SETS TO CREATE ONE DATA SET #READING IN THE TRAINING & TEST DATA SETS & LABELS COLUMNS feature.names <- read.table('./features.txt') #READ...
#ETP 20170412 #this function accepts a list of fits and generates a visual matrix of significance #library(corrplot) #library(ggcorrplot) #library(plyr) #library(reshape2) fnum2str <- function(numdf, c=0.05, fstr="%0.2f", estr="%0.1e"){ numstr <- ldply(numdf, function(num) if(...
/sigplot.R
permissive
etpeterson/sigplot
R
false
false
4,559
r
#ETP 20170412 #this function accepts a list of fits and generates a visual matrix of significance #library(corrplot) #library(ggcorrplot) #library(plyr) #library(reshape2) fnum2str <- function(numdf, c=0.05, fstr="%0.2f", estr="%0.1e"){ numstr <- ldply(numdf, function(num) if(...
####################################### # Objective #1: # # Find the Perfect Matched Alignments # ####################################### rm(list=ls()) setwd("/home/kiemele/HXB/UpdateRatGenome") results <- read.table(file="output4.try2.bed",sep="\t") dim(results) # 10,190,795 rows 9 columns results<-result...
/Genomics/UpdateGenomes/UpdatingRatGenome/Lauren's Attempt/findPerfectMatches.R
no_license
TabakoffLab/General
R
false
false
5,974
r
####################################### # Objective #1: # # Find the Perfect Matched Alignments # ####################################### rm(list=ls()) setwd("/home/kiemele/HXB/UpdateRatGenome") results <- read.table(file="output4.try2.bed",sep="\t") dim(results) # 10,190,795 rows 9 columns results<-result...
#!/usr/bin/env Rscript suppressPackageStartupMessages(library(optparse)) option_list <- list( make_option(c("-b", "--bam"), default="NULL", type="character", help="File name for the bam file"), make_option(c("-f", "--fasta"), default="NULL", type="character", help="File name for the fasta file"), make...
/R/assemblyBubblePlot.R
no_license
Ecogenomics/scriptShed
R
false
false
1,845
r
#!/usr/bin/env Rscript suppressPackageStartupMessages(library(optparse)) option_list <- list( make_option(c("-b", "--bam"), default="NULL", type="character", help="File name for the bam file"), make_option(c("-f", "--fasta"), default="NULL", type="character", help="File name for the fasta file"), make...
library(dplyr) library(ggplot2) library(plotly) library(tidyr) data <- read.csv("../data/pokemon.csv", stringsAsFactors = FALSE) # DATA CLEANING clean_data <- subset(data, select = -c(abilities, japanese_name, base_happiness, classfication, percentage_male, generation)) str(clea...
/RMarkdown/Pokemon Project.R
no_license
jellymawan/Pokemon-Project
R
false
false
6,017
r
library(dplyr) library(ggplot2) library(plotly) library(tidyr) data <- read.csv("../data/pokemon.csv", stringsAsFactors = FALSE) # DATA CLEANING clean_data <- subset(data, select = -c(abilities, japanese_name, base_happiness, classfication, percentage_male, generation)) str(clea...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vaccine_fxns.R \name{plan_vaccines} \alias{plan_vaccines} \title{Plan vaccines based on gacc information} \usage{ plan_vaccines(table, x, y) } \arguments{ \item{table}{Contingency table created by "table" containing frequency of either gaccs ...
/man/plan_vaccines.Rd
permissive
jakedilliott/covidfireMASS
R
false
true
1,032
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vaccine_fxns.R \name{plan_vaccines} \alias{plan_vaccines} \title{Plan vaccines based on gacc information} \usage{ plan_vaccines(table, x, y) } \arguments{ \item{table}{Contingency table created by "table" containing frequency of either gaccs ...
## Validate TCGA READ patients via Average pathway Hellinger distances ## and Empirical Enrichment ## applying filters to reduce noise ## AG Schissler ## Created 25 Jul 2017 ############################################################################## #### 1. Load and systematically explore load("~/Dropbox/Splice-n-...
/Code/validate_TCGA_READ_hel_Avg_EE_Iso30_expressed_pathwayfilter_KEGG.R
no_license
grizant/nof1-splice
R
false
false
794
r
## Validate TCGA READ patients via Average pathway Hellinger distances ## and Empirical Enrichment ## applying filters to reduce noise ## AG Schissler ## Created 25 Jul 2017 ############################################################################## #### 1. Load and systematically explore load("~/Dropbox/Splice-n-...
Transform <- function(nom, data, parametre) { if(nom == 'Linear') { result = parametre[1] + data*parametre[2] } else if(nom == 'Logged') { result = data for(i in c(1:length(result))) { if(result[i] > 0) { result[i] = parametre[1] + log(result[i])*parametre[2] } } } els...
/projetStage/FonctionTransform.R
no_license
ShangzhiH/ad_influence_research_sys
R
false
false
1,593
r
Transform <- function(nom, data, parametre) { if(nom == 'Linear') { result = parametre[1] + data*parametre[2] } else if(nom == 'Logged') { result = data for(i in c(1:length(result))) { if(result[i] > 0) { result[i] = parametre[1] + log(result[i])*parametre[2] } } } els...
# File: 06_deAnalysis.R # Auth: umar.niazi@kcl.ac.uk # DESC: Modelling and selecting DE genes # Date: 12/07/2018 ## load the data source('header.R') ## load the data library(RMySQL) db = dbConnect(MySQL(), user='rstudio', password='12345', dbname='Projects', host='127.0.0.1') dbListTables(db) # get the query g_did ...
/06_deAnalysis.R
permissive
uhkniazi/BRC_Organoids_Geraldine
R
false
false
10,019
r
# File: 06_deAnalysis.R # Auth: umar.niazi@kcl.ac.uk # DESC: Modelling and selecting DE genes # Date: 12/07/2018 ## load the data source('header.R') ## load the data library(RMySQL) db = dbConnect(MySQL(), user='rstudio', password='12345', dbname='Projects', host='127.0.0.1') dbListTables(db) # get the query g_did ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/docx_add.R \name{body_add_blocks} \alias{body_add_blocks} \title{Add a list of blocks into a 'Word' document} \usage{ body_add_blocks(x, blocks, pos = "after") } \arguments{ \item{x}{an rdocx object} \item{blocks}{set of blocks to be used as...
/man/body_add_blocks.Rd
permissive
davidgohel/officer
R
false
true
1,440
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/docx_add.R \name{body_add_blocks} \alias{body_add_blocks} \title{Add a list of blocks into a 'Word' document} \usage{ body_add_blocks(x, blocks, pos = "after") } \arguments{ \item{x}{an rdocx object} \item{blocks}{set of blocks to be used as...
testlist <- list(metric = 0L, vec = NULL, vec = NULL, w_vec = structure(0, .Dim = c(1L, 1L)), y_vec = structure(c(1.67151669335079e+69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:5)) result <- do.call(UniIsoRegression:::reg_2d,testlist) str(result)
/UniIsoRegression/inst/testfiles/reg_2d/libFuzzer_reg_2d/reg_2d_valgrind_files/1612737101-test.R
no_license
akhikolla/updatedatatype-list1
R
false
false
274
r
testlist <- list(metric = 0L, vec = NULL, vec = NULL, w_vec = structure(0, .Dim = c(1L, 1L)), y_vec = structure(c(1.67151669335079e+69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:5)) result <- do.call(UniIsoRegression:::reg_2d,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataset_documentation.R \docType{data} \name{longevity_rates} \alias{longevity_rates} \title{The Longevity rate lookup file contains a sequence of integers from -1 to 100 corresponding to the years of service and associated longevity percent ...
/man/longevity_rates.Rd
no_license
iancj88/msuopa
R
false
true
753
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataset_documentation.R \docType{data} \name{longevity_rates} \alias{longevity_rates} \title{The Longevity rate lookup file contains a sequence of integers from -1 to 100 corresponding to the years of service and associated longevity percent ...
# Resolve footnotes or styles #' @importFrom dplyr filter bind_rows mutate inner_join group_by #' @importFrom dplyr summarize select arrange pull tibble distinct #' @importFrom tibble rownames_to_column #' @noRd resolve_footnotes_styles <- function(output_df, boxh_df, ...
/R/utils_render_footnotes.R
permissive
elong0527/gt
R
false
false
17,259
r
# Resolve footnotes or styles #' @importFrom dplyr filter bind_rows mutate inner_join group_by #' @importFrom dplyr summarize select arrange pull tibble distinct #' @importFrom tibble rownames_to_column #' @noRd resolve_footnotes_styles <- function(output_df, boxh_df, ...
setwd(list.dirs()[3]) setwd(list.dirs()[2]) list.dirs() list.files() d <- read.table(list.files()[1]) dim(d) View(d) setwd("../") d <- read.table(list.files()[3]) ########################################### library(dplyr) ## load activity lables activity <- read.table("activity_labels.txt") ## load the features.txt ...
/run_analysis.R
no_license
Sudeep2406/getting_cleaning_data_project
R
false
false
1,752
r
setwd(list.dirs()[3]) setwd(list.dirs()[2]) list.dirs() list.files() d <- read.table(list.files()[1]) dim(d) View(d) setwd("../") d <- read.table(list.files()[3]) ########################################### library(dplyr) ## load activity lables activity <- read.table("activity_labels.txt") ## load the features.txt ...
#install.packages('hflights') library(dplyr) library(hflights) # explore data data(hflights) head(hflights) #tbl_df creates a “local data frame” # convert to local data frame flights <- tbl_df(hflights) # printing only shows 10 rows and as many columns as can fit on your screen flights ##Filter: # base R approach to...
/dplyr.R
no_license
yangcelinexu/r-learning
R
false
false
10,864
r
#install.packages('hflights') library(dplyr) library(hflights) # explore data data(hflights) head(hflights) #tbl_df creates a “local data frame” # convert to local data frame flights <- tbl_df(hflights) # printing only shows 10 rows and as many columns as can fit on your screen flights ##Filter: # base R approach to...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Publications.R \name{cyBosworth2013Parathyroid} \alias{cyBosworth2013Parathyroid} \title{Parathyroid hormone and arterial dysfunction in the multi-ethnic study of atherosclerosis (2013) \emph{CLINICAL ENDOCRINOLOGY}} \description{ Bosworth, C...
/man/cyBosworth2013Parathyroid.Rd
no_license
sachsmc/sachsmc.github.io
R
false
true
557
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Publications.R \name{cyBosworth2013Parathyroid} \alias{cyBosworth2013Parathyroid} \title{Parathyroid hormone and arterial dysfunction in the multi-ethnic study of atherosclerosis (2013) \emph{CLINICAL ENDOCRINOLOGY}} \description{ Bosworth, C...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { j <- NULL set <- function(y){ x <<- y j <<- NULL } get <- function()x setInverse <- function(inverse) j <<- inverse get...
/cachematrix.R
no_license
Shashwenth/ProgrammingAssignment2
R
false
false
773
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { j <- NULL set <- function(y){ x <<- y j <<- NULL } get <- function()x setInverse <- function(inverse) j <<- inverse get...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/table.R \name{tabler} \alias{tabler} \title{Table} \usage{ tabler(node, Property, ProjectID = NULL, y = NULL, STAT = NULL) } \arguments{ \item{node}{A dataframe} \item{ProjectID}{Specify TRUE or FALSE to include Project ID in count} \item{y...
/xplorer/man/tabler.Rd
permissive
uc-cdis/gen3sdk-R
R
false
true
1,068
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/table.R \name{tabler} \alias{tabler} \title{Table} \usage{ tabler(node, Property, ProjectID = NULL, y = NULL, STAT = NULL) } \arguments{ \item{node}{A dataframe} \item{ProjectID}{Specify TRUE or FALSE to include Project ID in count} \item{y...
## Put comments here that give an overall description of what your ## functions do ##The pair of functions that cache the inverse of a matrix. ## Write a short comment describing this function ##This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { ...
/cachematrix.R
no_license
RPSDataSME/ProgrammingAssignment2
R
false
false
1,116
r
## Put comments here that give an overall description of what your ## functions do ##The pair of functions that cache the inverse of a matrix. ## Write a short comment describing this function ##This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { ...
data<-read.table("household_power_consumption.txt", header=TRUE, sep=";", colClasses="character") data<-subset(data, Date%in%c("2/2/2007","1/2/2007")) data$Global_active_power<-as.numeric(data$Global_active_power) png(file = "plot1.png", bg = "transparent", width=480, height=480) with(data,hist(Global_active_power, ...
/plot1.R
no_license
sriks8019/ExData_Plotting1
R
false
false
427
r
data<-read.table("household_power_consumption.txt", header=TRUE, sep=";", colClasses="character") data<-subset(data, Date%in%c("2/2/2007","1/2/2007")) data$Global_active_power<-as.numeric(data$Global_active_power) png(file = "plot1.png", bg = "transparent", width=480, height=480) with(data,hist(Global_active_power, ...
#read data data_full <- read.table("household_power_consumption.txt", header=TRUE, na.strings="?", sep=";") data <- data_full[(data_full$Date=="1/2/2007" | data_full$Date=="2/2/2007" ), ] #format date and time data$Date <- as.Date(data$Date, format="%d/%m/%Y") dateTime <- paste(data$Date, data$Time) data$DateTime <- ...
/plot3.R
no_license
ItsRRM97/ExData_Plotting1
R
false
false
771
r
#read data data_full <- read.table("household_power_consumption.txt", header=TRUE, na.strings="?", sep=";") data <- data_full[(data_full$Date=="1/2/2007" | data_full$Date=="2/2/2007" ), ] #format date and time data$Date <- as.Date(data$Date, format="%d/%m/%Y") dateTime <- paste(data$Date, data$Time) data$DateTime <- ...
e5317bb17984b0bf299cfbf461a14fc5 incrementer-enc02-nonuniform-depth-30.qdimacs 18508 48013
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Miller-Marin/incrementer-encoder/incrementer-enc02-nonuniform-depth-30/incrementer-enc02-nonuniform-depth-30.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
90
r
e5317bb17984b0bf299cfbf461a14fc5 incrementer-enc02-nonuniform-depth-30.qdimacs 18508 48013
memory.limit(size = 5000000000) library('readr') library('tidyverse') library('RecordLinkage') setwd('C:/Users/Jared/Dropbox/CHAMP-Net/Data/Show-Year CSVs/data frames to check') load('Speakers.Rda') Updated_Speaker_File <- all_speakers %>% #sort(., Speaker) %>% mutate(., Original_Field = ...
/Match_Speakers.R
no_license
jfedgerton/Cleaning_CHAMP_Speakers
R
false
false
538
r
memory.limit(size = 5000000000) library('readr') library('tidyverse') library('RecordLinkage') setwd('C:/Users/Jared/Dropbox/CHAMP-Net/Data/Show-Year CSVs/data frames to check') load('Speakers.Rda') Updated_Speaker_File <- all_speakers %>% #sort(., Speaker) %>% mutate(., Original_Field = ...
############################# # < Yiqian Jin > # < Nov.25 > # < 05 - 6, 7 > ############# use code from 04, obtain 4 dtm ############## #(a) #setwd() install.packages('tm') install.packages('SnowballC') library(tm) library('SnowballC') source('prepare.R') ## using modified code preprocess.directory('fp_hamilton_tra...
/R/tree_logit_model.R
no_license
aliciajin/TextMining
R
false
false
4,647
r
############################# # < Yiqian Jin > # < Nov.25 > # < 05 - 6, 7 > ############# use code from 04, obtain 4 dtm ############## #(a) #setwd() install.packages('tm') install.packages('SnowballC') library(tm) library('SnowballC') source('prepare.R') ## using modified code preprocess.directory('fp_hamilton_tra...
# Function maker library(rvest) library(magrittr) library(purrr) tag_app <- function(var) { sprintf("#' %s", var) } ap_em_rox <- function(val){ val %<>% c( "#' " ) val } fun_make <- function( url, prefix ){ prefix <- thinkr::clean_vec(prefix) page <- read_html(url) fun_args <- page %>% h...
/data-raw/DATASET.R
no_license
ColinFay/rrocketchat
R
false
false
4,787
r
# Function maker library(rvest) library(magrittr) library(purrr) tag_app <- function(var) { sprintf("#' %s", var) } ap_em_rox <- function(val){ val %<>% c( "#' " ) val } fun_make <- function( url, prefix ){ prefix <- thinkr::clean_vec(prefix) page <- read_html(url) fun_args <- page %>% h...
library(SelfControlledCaseSeries) setwd("s:/temp") options(fftempdir = "s:/fftemp") pw <- NULL dbms <- "sql server" user <- NULL server <- "RNDUSRDHIT07" # cdmDatabaseSchema <- 'cdm4_sim.dbo' cdmDatabaseSchema <- "CDM_Truven_MDCd.dbo" resultsDatabaseSchema <- "scratch.dbo" port <- NULL cdmVersion <- "4" connectionDeta...
/extras/testCode.R
permissive
alondhe/SelfControlledCaseSeries
R
false
false
13,195
r
library(SelfControlledCaseSeries) setwd("s:/temp") options(fftempdir = "s:/fftemp") pw <- NULL dbms <- "sql server" user <- NULL server <- "RNDUSRDHIT07" # cdmDatabaseSchema <- 'cdm4_sim.dbo' cdmDatabaseSchema <- "CDM_Truven_MDCd.dbo" resultsDatabaseSchema <- "scratch.dbo" port <- NULL cdmVersion <- "4" connectionDeta...
context('database') library(webmockr) webmockr::enable() conn <- Td(apikey = "xxxxxxx") test_that('list_databases works with mock', { stub_request("get", "https://api.treasuredata.com/v3/database/list") %>% to_return(body = "{\"databases\":[{\"name\":\"test\",\"created_at\":\"2011-07-23 00:00:00 UTC\",\"upda...
/data/genthat_extracted_code/RTD/tests/test-database.R
no_license
surayaaramli/typeRrh
R
false
false
1,456
r
context('database') library(webmockr) webmockr::enable() conn <- Td(apikey = "xxxxxxx") test_that('list_databases works with mock', { stub_request("get", "https://api.treasuredata.com/v3/database/list") %>% to_return(body = "{\"databases\":[{\"name\":\"test\",\"created_at\":\"2011-07-23 00:00:00 UTC\",\"upda...
\name{ABCanalysis} \alias{ABCanalysis} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Computed ABC analysis: calculates a division of the data in 3 classes A, B and C } \description{ divide the Data in 3 classes A, B and C such that A=Data[Aind] : with low effort much yield B=Data[Bind] ...
/man/ABCanalysis.Rd
no_license
Mthrun/ABCanalysis
R
false
false
2,782
rd
\name{ABCanalysis} \alias{ABCanalysis} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Computed ABC analysis: calculates a division of the data in 3 classes A, B and C } \description{ divide the Data in 3 classes A, B and C such that A=Data[Aind] : with low effort much yield B=Data[Bind] ...
library(shiny) library(ggplot2) library(RColorBrewer) library(shinyWidgets) library(fst) library(plotly) library(DT) library(igraph) library(visNetwork) library(dplyr) # Load data ilo <- read.fst("ilo.fst") gva <- read.fst("gva_data_ch.fst") labprod <- read.fst("labprod.fst") # Define UI ui <- fluidPage( html...
/report_en/interactive_stuff/pharma_app.R
no_license
ch54321/innoscape-part-II-descriptive-analysis
R
false
false
9,766
r
library(shiny) library(ggplot2) library(RColorBrewer) library(shinyWidgets) library(fst) library(plotly) library(DT) library(igraph) library(visNetwork) library(dplyr) # Load data ilo <- read.fst("ilo.fst") gva <- read.fst("gva_data_ch.fst") labprod <- read.fst("labprod.fst") # Define UI ui <- fluidPage( html...
### Count model # Read in Marion Island data nb_females_all <- read.table('females.txt',header=T) nb_pups <- read.table('pups.txt',header=T) N <- nb_pups$number_pups # Nb of females per males nb_females_per_males <- nb_females_all$nb_females[nb_females_all$component=='females_per_adult_male'] # Adult sex rati...
/countmodel_with_a_estimated.r
no_license
oliviergimenez/socialseals
R
false
false
4,200
r
### Count model # Read in Marion Island data nb_females_all <- read.table('females.txt',header=T) nb_pups <- read.table('pups.txt',header=T) N <- nb_pups$number_pups # Nb of females per males nb_females_per_males <- nb_females_all$nb_females[nb_females_all$component=='females_per_adult_male'] # Adult sex rati...
# ======================================================================= # Group Name: AmaIA # Students: Lander San Millan, Amaia Acha # ======================================================================= local.beam.search = function(problem, beams, max_it...
/search-template-p2/algorithms/informed/local-beam-search.R
no_license
landersanmi/Proyecto2_Sis_Inteligentes
R
false
false
4,591
r
# ======================================================================= # Group Name: AmaIA # Students: Lander San Millan, Amaia Acha # ======================================================================= local.beam.search = function(problem, beams, max_it...
######################### ## testPlotRandom.R ## ## A short script to test the function ## that we wrote in PlotRandom.R ## ## Load the function in the environment. source("PlotRandom.R") plotRandomNormals() out <- plotRandomNormals() str(out) out2 <- plotRandomNormals(numpts=100, mu=3, sigma=0.5, ...
/testPlotRandom.R
no_license
benrutledge/PlotRandomNormalFunc
R
false
false
593
r
######################### ## testPlotRandom.R ## ## A short script to test the function ## that we wrote in PlotRandom.R ## ## Load the function in the environment. source("PlotRandom.R") plotRandomNormals() out <- plotRandomNormals() str(out) out2 <- plotRandomNormals(numpts=100, mu=3, sigma=0.5, ...
library(tidyverse) library(rio) #Exercise 8.1 (Import and Examine) jems <- read_csv("data/diamonds.csv") jems #Exercise 8.3 (Counting individual groups) #How many diamonds with a clarity of category “IF” are present in the data-set? # sum(jems$clarity == "IF") clarity <- jems %>% filter(clarity =="IF") nrow(cla...
/class case studies_R/Diamonds Analysis.R
no_license
wejdansaleh/DS_EDA_example
R
false
false
2,204
r
library(tidyverse) library(rio) #Exercise 8.1 (Import and Examine) jems <- read_csv("data/diamonds.csv") jems #Exercise 8.3 (Counting individual groups) #How many diamonds with a clarity of category “IF” are present in the data-set? # sum(jems$clarity == "IF") clarity <- jems %>% filter(clarity =="IF") nrow(cla...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Fcreation.R \name{opps_gen_iter} \alias{opps_gen_iter} \title{Features are created by iteratively performing all possible operations on a dataframe based on the depth value, taking 1 or 2 columns at a time} \usage{ opps_gen_iter(dataframe, de...
/man/opps_gen_iter.Rd
no_license
SrinivasaSaketh/FeatureCreation
R
false
true
992
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Fcreation.R \name{opps_gen_iter} \alias{opps_gen_iter} \title{Features are created by iteratively performing all possible operations on a dataframe based on the depth value, taking 1 or 2 columns at a time} \usage{ opps_gen_iter(dataframe, de...
# Load datasets ------------------- #datasets we use for testing purposes library(dplyr) alt_data95 <- read.csv(paste0('data/alt_data95/alt_data95.csv')) sim_var <- read.csv(paste0('data/simvar/simulated_var.csv')) %>% dplyr::select(-starts_with('X'))
/R/datasets.R
permissive
tleers/tsim
R
false
false
253
r
# Load datasets ------------------- #datasets we use for testing purposes library(dplyr) alt_data95 <- read.csv(paste0('data/alt_data95/alt_data95.csv')) sim_var <- read.csv(paste0('data/simvar/simulated_var.csv')) %>% dplyr::select(-starts_with('X'))
plot3 <- function() { # Read in data dat <- read.csv("./Data/household_power_consumption.txt", header=T, sep=';', na.strings="?", stringsAsFactors=F, comment.char="", quote='\"') dat$Date <- as.Date(dat$Date, format="%d/%m/%Y") # Subsetting the ...
/ExploratoryDataAnalysis/Assignment1/plot3.R
no_license
woxiaoyuan/datasciencecoursera-2
R
false
false
1,201
r
plot3 <- function() { # Read in data dat <- read.csv("./Data/household_power_consumption.txt", header=T, sep=';', na.strings="?", stringsAsFactors=F, comment.char="", quote='\"') dat$Date <- as.Date(dat$Date, format="%d/%m/%Y") # Subsetting the ...
#' Create a protocol template for the study #' #' @details #' This function will create a template protocol #' #' @param outputLocation Directory location where you want the protocol written to #' @export createPlpProtocol <- function(outputLocation = getwd()){ predictionAnalysisListFile <- system.file("setti...
/AbxBetterChoice/ABCtmpsmx/R/createPlpProtocol.R
no_license
ABMI/AbxBetterChoice
R
false
false
52,097
r
#' Create a protocol template for the study #' #' @details #' This function will create a template protocol #' #' @param outputLocation Directory location where you want the protocol written to #' @export createPlpProtocol <- function(outputLocation = getwd()){ predictionAnalysisListFile <- system.file("setti...
##Determine which rows to read, minutes=rows date1 <- as.POSIXlt("2006-12-16 17:24:00") date2 <- as.POSIXlt("2007-02-01 00:00:00") date3 <- as.POSIXlt("2007-02-02 23:59:00") #number of minutes between first time pt in data set & 2/1/07 0:00 exclusive skip <- (date2-date1)*1440 #1440 minutes in 1 day skip <- as.numeric...
/plot4.R
no_license
srbanton/ExData_Plotting1
R
false
false
1,759
r
##Determine which rows to read, minutes=rows date1 <- as.POSIXlt("2006-12-16 17:24:00") date2 <- as.POSIXlt("2007-02-01 00:00:00") date3 <- as.POSIXlt("2007-02-02 23:59:00") #number of minutes between first time pt in data set & 2/1/07 0:00 exclusive skip <- (date2-date1)*1440 #1440 minutes in 1 day skip <- as.numeric...
BaseAnalysis <- R6Class("BaseAnalysis", #define variables public = list( #basic definitions dir = NULL, id = NULL, data_directory = NULL, session = NULL, initialize = function(dir, id){ self$dir = dir self$SetParticipant(id) }, SetParticipant = function(id = "...
/R/Classes/BaseAnalysis.R
no_license
hejtmy/VR_City_Analysis
R
false
false
424
r
BaseAnalysis <- R6Class("BaseAnalysis", #define variables public = list( #basic definitions dir = NULL, id = NULL, data_directory = NULL, session = NULL, initialize = function(dir, id){ self$dir = dir self$SetParticipant(id) }, SetParticipant = function(id = "...
init_linucb <- function(k, dim, alpha = 1) { k <- as.integer(k) dim <- as.integer(dim) alpha <- as.double(alpha) # === === === === === b <- matrix(0, k, dim) A <- array(diag(dim), c(dim, dim, k)) th_hat <- array(0, c(k, dim)) A_inv <- array(diag(dim), c(dim, dim, k)) # === === === ===...
/R/linear_upper_confidence_bound.R
no_license
onbernard/funbandit
R
false
false
1,165
r
init_linucb <- function(k, dim, alpha = 1) { k <- as.integer(k) dim <- as.integer(dim) alpha <- as.double(alpha) # === === === === === b <- matrix(0, k, dim) A <- array(diag(dim), c(dim, dim, k)) th_hat <- array(0, c(k, dim)) A_inv <- array(diag(dim), c(dim, dim, k)) # === === === ===...
library("knitr") # создание отчётов opts_chunk$set(fig.align = 'center') # выравнивание картинок по центру library("ggplot2") # графики library("forecast") # прогнозирование временных рядов: ARMA и ETS модели library("xts") # операции с временными рядами library("dplyr") set.seed(49) y <- c( 0.096606, 0.0785...
/Ис. ИНС/arima.r
no_license
defersa/VKR
R
false
false
15,764
r
library("knitr") # создание отчётов opts_chunk$set(fig.align = 'center') # выравнивание картинок по центру library("ggplot2") # графики library("forecast") # прогнозирование временных рядов: ARMA и ETS модели library("xts") # операции с временными рядами library("dplyr") set.seed(49) y <- c( 0.096606, 0.0785...
\name{fun.plot.q} \alias{fun.plot.q} %- Also NEED an '\alias' for EACH other topic documented here. \title{ 2-D Plot for Quantile Regression lines } \description{ This function plots quantile regression lines from \code{\link{GLD.lm}} and one of \code{\link{fun.gld.slope.vary.int.fixed}}, \code{\link{fun.gld.s...
/man/fun.plot.q.Rd
no_license
cran/GLDreg
R
false
false
2,822
rd
\name{fun.plot.q} \alias{fun.plot.q} %- Also NEED an '\alias' for EACH other topic documented here. \title{ 2-D Plot for Quantile Regression lines } \description{ This function plots quantile regression lines from \code{\link{GLD.lm}} and one of \code{\link{fun.gld.slope.vary.int.fixed}}, \code{\link{fun.gld.s...
# == title # Draw legends for All Heatmaps # # == param # -object A `HeatmapList-class` object. # -legend_list A list of self-defined legends, should be wrapped into `grid::grob` objects. It is # normally constructed by `Legend`. # -... Other arguments. # # == details # Actually we call the "heatmap legends" ...
/R/HeatmapList-legends.R
permissive
jokergoo/ComplexHeatmap
R
false
false
45,726
r
# == title # Draw legends for All Heatmaps # # == param # -object A `HeatmapList-class` object. # -legend_list A list of self-defined legends, should be wrapped into `grid::grob` objects. It is # normally constructed by `Legend`. # -... Other arguments. # # == details # Actually we call the "heatmap legends" ...
/Data Visualization/ggplot8.R
no_license
JinxiaoDu/STAT-5206
R
false
false
10,605
r
\name{Fprima} \alias{Fprima} %- Also NEED an '\alias' for EACH other topic documented here. \title{Resitance of water vapor transport %% ~~function to do ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ Fprima(x) } %- maybe also 'usage' for other objects documente...
/man/Fprima.Rd
no_license
rventuradiaz/baresoilevap
R
false
false
1,295
rd
\name{Fprima} \alias{Fprima} %- Also NEED an '\alias' for EACH other topic documented here. \title{Resitance of water vapor transport %% ~~function to do ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ Fprima(x) } %- maybe also 'usage' for other objects documente...
library(rdfp) ### Name: dfp_createUserTeamAssociations ### Title: UserTeamAssociationService ### Aliases: dfp_createUserTeamAssociations ### ** Examples ## Not run: ##D request_data <- data.frame(teamid=rep(dfp_createTeams_result$id, 3), ##D userid=dfp_createUsers_result$id) ##D result <...
/data/genthat_extracted_code/rdfp/examples/dfp_createUserTeamAssociations.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
386
r
library(rdfp) ### Name: dfp_createUserTeamAssociations ### Title: UserTeamAssociationService ### Aliases: dfp_createUserTeamAssociations ### ** Examples ## Not run: ##D request_data <- data.frame(teamid=rep(dfp_createTeams_result$id, 3), ##D userid=dfp_createUsers_result$id) ##D result <...
pbd_sim = function(pars,age,soc = 2,plotit = FALSE) { la1 = pars[1] la2 = pars[2] la3 = pars[3] mu1 = pars[4] mu2 = pars[5] i = 1 while(i <= soc) { t = 0 if(i == 1) { id1 = 0 id = id1 + 1 Sid1 = 0 Sid = 1 sg = id si = NULL L = t(as.matrix(c(id,0,-1...
/PBD/R/pbd_sim.R
no_license
ingted/R-Examples
R
false
false
5,362
r
pbd_sim = function(pars,age,soc = 2,plotit = FALSE) { la1 = pars[1] la2 = pars[2] la3 = pars[3] mu1 = pars[4] mu2 = pars[5] i = 1 while(i <= soc) { t = 0 if(i == 1) { id1 = 0 id = id1 + 1 Sid1 = 0 Sid = 1 sg = id si = NULL L = t(as.matrix(c(id,0,-1...
# Removing the effect of NTCs # New method as discussed on Feb 3rd lab meeting. setwd("/data/Users/kmccauley/WaldStudy/MakeOTUtable") old.OTU <- read.table("otu_table_nochimera_filtered_0_00001.txt",header=TRUE, check.names=F, comment="", skip=1,sep="\t") #First, identify the columns that are negative controls, and k...
/NTC_filter_script.R
no_license
lynchlab-ucsf/SinusitisMicrobiome
R
false
false
4,279
r
# Removing the effect of NTCs # New method as discussed on Feb 3rd lab meeting. setwd("/data/Users/kmccauley/WaldStudy/MakeOTUtable") old.OTU <- read.table("otu_table_nochimera_filtered_0_00001.txt",header=TRUE, check.names=F, comment="", skip=1,sep="\t") #First, identify the columns that are negative controls, and k...
# server.R shinyServer( function(input,output) { output$pole<-renderText({as.numeric((input$length))*as.numeric((input$width))*as.numeric((input$height)) }) output$obj<-renderText({as.numeric(input$length)*as.numeric(input$width)+ as.numeric(input$height)*as.numeric(input$width)+ as.numer...
/server.R
no_license
apeirohedra/shiny
R
false
false
369
r
# server.R shinyServer( function(input,output) { output$pole<-renderText({as.numeric((input$length))*as.numeric((input$width))*as.numeric((input$height)) }) output$obj<-renderText({as.numeric(input$length)*as.numeric(input$width)+ as.numeric(input$height)*as.numeric(input$width)+ as.numer...
.onLoad <- function(libname, pkgname) { op <- options() op.dplyr <- list( httr_oob_default = FALSE, httr_oauth_cache = NA ) toset <- !(names(op.dplyr) %in% names(op)) if (any(toset)) options(op.dplyr[toset]) invisible() } release_questions <- function() { c( "Have you run all the OAuth demos...
/R/zzz.R
permissive
r-lib/httr
R
false
false
329
r
.onLoad <- function(libname, pkgname) { op <- options() op.dplyr <- list( httr_oob_default = FALSE, httr_oauth_cache = NA ) toset <- !(names(op.dplyr) %in% names(op)) if (any(toset)) options(op.dplyr[toset]) invisible() } release_questions <- function() { c( "Have you run all the OAuth demos...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/printFFTrees_function.R \name{print.FFTrees} \alias{print.FFTrees} \title{Prints summary information from an FFTrees object} \usage{ \method{print}{FFTrees}(x = NULL, ...) } \arguments{ \item{x}{FFTrees. A FFTrees x created from FFTrees()} \...
/man/print.FFTrees.Rd
no_license
stefanherzog/FFTrees
R
false
true
427
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/printFFTrees_function.R \name{print.FFTrees} \alias{print.FFTrees} \title{Prints summary information from an FFTrees object} \usage{ \method{print}{FFTrees}(x = NULL, ...) } \arguments{ \item{x}{FFTrees. A FFTrees x created from FFTrees()} \...
source(here::here("CODE", "SOURCED.R"))
/CODE/MAIN.R
no_license
chrisumphlett/test_databricks
R
false
false
40
r
source(here::here("CODE", "SOURCED.R"))
% Generated by roxygen2 (4.0.0): do not edit by hand \name{checkMD5sums2} \alias{checkMD5sums2} \title{Check and Create MD5 Checksum Files} \usage{ checkMD5sums2(package, dir, md5file, omit_files, ...) } \arguments{ \item{package}{the name of an installed package} \item{dir}{the path to the top-level directory of ...
/man/checkMD5sums2.Rd
no_license
jrnold/installr
R
false
false
1,077
rd
% Generated by roxygen2 (4.0.0): do not edit by hand \name{checkMD5sums2} \alias{checkMD5sums2} \title{Check and Create MD5 Checksum Files} \usage{ checkMD5sums2(package, dir, md5file, omit_files, ...) } \arguments{ \item{package}{the name of an installed package} \item{dir}{the path to the top-level directory of ...
.onUnload <- function (libpath) { library.dynam.unload("dplR", libpath) } .onAttach <- function(libname, pkgname) { packageStartupMessage("This is dplR version ", packageVersion("dplR"), ".\n", "dplR is part of openDendro https://opendendro....
/R/zzz.R
no_license
AndyBunn/dplR
R
false
false
466
r
.onUnload <- function (libpath) { library.dynam.unload("dplR", libpath) } .onAttach <- function(libname, pkgname) { packageStartupMessage("This is dplR version ", packageVersion("dplR"), ".\n", "dplR is part of openDendro https://opendendro....
/multivariada_2017/scripts/Script 4.R
no_license
marcosvital/scriptsR
R
false
false
2,453
r
#' Creates the twitter message to be shared #' #' @param url a valid url to be shared on LinkedIn #' #' @return a string with the concatenation of the arguments plus the required skeleton. #' @export #' #' @examples #' share_message_twitter(text = "see", url = "how", "it works") share_message_linkedin <- function(url) ...
/R/share_message_linkedin.R
permissive
brunocarlin/shinyShare
R
false
false
446
r
#' Creates the twitter message to be shared #' #' @param url a valid url to be shared on LinkedIn #' #' @return a string with the concatenation of the arguments plus the required skeleton. #' @export #' #' @examples #' share_message_twitter(text = "see", url = "how", "it works") share_message_linkedin <- function(url) ...
nCv=100 tols=c(0.001,.005,.01,.1) # set threshold values a=seq(1,length(sim.params[,1]))[sim.params[,1]<25 & sim.params[,2]<70] cvsamp <- sample(a, nCv) #sample parameters cv.param.true=sim.params[cvsamp,] cv.fits.nn=list() cv.fits.rj=list() cv.fits.lc=list() for (t in 1:length(tols)) { cv.fits.nn[[t]]=matrix(NA,n...
/CvAnalysis.R
no_license
sofiar/ABC-steps-and-turns-
R
false
false
7,110
r
nCv=100 tols=c(0.001,.005,.01,.1) # set threshold values a=seq(1,length(sim.params[,1]))[sim.params[,1]<25 & sim.params[,2]<70] cvsamp <- sample(a, nCv) #sample parameters cv.param.true=sim.params[cvsamp,] cv.fits.nn=list() cv.fits.rj=list() cv.fits.lc=list() for (t in 1:length(tols)) { cv.fits.nn[[t]]=matrix(NA,n...
/R/description.R
no_license
jjesusfilho/FactoInvestigateBR
R
false
false
65,371
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/slurm.R \name{edgeRcommand} \alias{edgeRcommand} \title{Export an DGEList, designMatrix, and contrastMatrix to files and return the command to run the edgeR script} \usage{ edgeRcommand( dgeList, designMatrix, contrastMatrix, outdir =...
/man/edgeRcommand.Rd
no_license
DingailuM/ribiosNGS
R
false
true
2,185
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/slurm.R \name{edgeRcommand} \alias{edgeRcommand} \title{Export an DGEList, designMatrix, and contrastMatrix to files and return the command to run the edgeR script} \usage{ edgeRcommand( dgeList, designMatrix, contrastMatrix, outdir =...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{scan_lin_interp} \alias{scan_lin_interp} \title{Braodly scan dating input for reversals/outliers and increase errors at tagged depths.} \usage{ scan_lin_interp(dating_tb) } \arguments{ \item{dating_tb}{Table containing dates...
/man/scan_lin_interp.Rd
no_license
paleovar/SISAL.AM
R
false
true
575
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{scan_lin_interp} \alias{scan_lin_interp} \title{Braodly scan dating input for reversals/outliers and increase errors at tagged depths.} \usage{ scan_lin_interp(dating_tb) } \arguments{ \item{dating_tb}{Table containing dates...
# A console version of the game mastermind. # # Updated: August 19, 2021 # Author: James Henderson # 79: ------------------------------------------------------------------------- # create a dictionary of eight colors: ---------------------------------------- col_dict = c( R = 'Red', Gr = 'Green', Bu = 'Blue',...
/rsc/exercises/part5/masteRmind_task3.R
no_license
jbhender/CSCAR_Workshops
R
false
false
2,795
r
# A console version of the game mastermind. # # Updated: August 19, 2021 # Author: James Henderson # 79: ------------------------------------------------------------------------- # create a dictionary of eight colors: ---------------------------------------- col_dict = c( R = 'Red', Gr = 'Green', Bu = 'Blue',...
x <- c(1,2,3,4,5) y <- c(2,1,2,1,2) z <- c(1,2,3,4,5) c <- 1:5 t <- c("Downstream / Conditions","Tools / Teams","Place / Time / Person","Standards","Upstream / SDOH") source("e:/0.CBD/myCBD/myFunctions/helperFunctions/wrapLabels.R") work <- as.data.frame(cbind(x,y,z)) library(ggplot2) ggplot(...
/myUpstream/ccbImage.R
no_license
aculich/CACommunityBurden
R
false
false
627
r
x <- c(1,2,3,4,5) y <- c(2,1,2,1,2) z <- c(1,2,3,4,5) c <- 1:5 t <- c("Downstream / Conditions","Tools / Teams","Place / Time / Person","Standards","Upstream / SDOH") source("e:/0.CBD/myCBD/myFunctions/helperFunctions/wrapLabels.R") work <- as.data.frame(cbind(x,y,z)) library(ggplot2) ggplot(...
############################################################# # # Program: tblLAB_VIRO_checks.R # Project: IeDEA # # PI: Stephany Duda, PhD # Programmer: Larry Riggen, MS # Purpose: Read in IeDEAS standard and write # data queries # # INPUT: "tblLAB_VIRO.csv" # OUTPUT: # # Notes: As long ...
/code/tblLAB_VIRO_checks.R
no_license
ldriggen-iu/qa-checks-r
R
false
false
3,646
r
############################################################# # # Program: tblLAB_VIRO_checks.R # Project: IeDEA # # PI: Stephany Duda, PhD # Programmer: Larry Riggen, MS # Purpose: Read in IeDEAS standard and write # data queries # # INPUT: "tblLAB_VIRO.csv" # OUTPUT: # # Notes: As long ...
if_smaller_f<-function(region1,region2){ sapply(strsplit(region1,":|-"),"[",2)->region1_start; sapply(strsplit(region2,":|-"),"[",2)->region2_start; region1_start<region2_start; } strReverse <- function(x) sapply(lapply(strsplit(x, NULL), rev), paste, collapse="") cal_intron_pair_cov<-function(t_mat){ ...
/code/utils.R
no_license
limeng12/intron_order
R
false
false
671
r
if_smaller_f<-function(region1,region2){ sapply(strsplit(region1,":|-"),"[",2)->region1_start; sapply(strsplit(region2,":|-"),"[",2)->region2_start; region1_start<region2_start; } strReverse <- function(x) sapply(lapply(strsplit(x, NULL), rev), paste, collapse="") cal_intron_pair_cov<-function(t_mat){ ...
P <- c(1:99)/100 EP <- rep(0, length(P)) N <- 30 Nt <- 1000# number of trials for each "P" # adpot a beta prior alpha <- 1 beta <- 1 ep <- rep(0, Nt) for (i in 1:length(P)) { count <- 0 for (j in 1:Nt) { # simulate from Bernoulli(p) with N=30 rb <- rbinom(N, 1, P[i]) # compute CI for p lci = qbe...
/R/R code/hw8/hw8.R
no_license
tonycao/CodeSnippets
R
false
false
653
r
P <- c(1:99)/100 EP <- rep(0, length(P)) N <- 30 Nt <- 1000# number of trials for each "P" # adpot a beta prior alpha <- 1 beta <- 1 ep <- rep(0, Nt) for (i in 1:length(P)) { count <- 0 for (j in 1:Nt) { # simulate from Bernoulli(p) with N=30 rb <- rbinom(N, 1, P[i]) # compute CI for p lci = qbe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/with_opt.R \name{with_golem_options} \alias{with_golem_options} \title{Add Golem options to a Shiny App} \usage{ with_golem_options(app, golem_opts, print = FALSE) } \arguments{ \item{app}{the app object.} \item{golem_opts}{A list of Options...
/man/with_golem_options.Rd
permissive
DivadNojnarg/golem
R
false
true
888
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/with_opt.R \name{with_golem_options} \alias{with_golem_options} \title{Add Golem options to a Shiny App} \usage{ with_golem_options(app, golem_opts, print = FALSE) } \arguments{ \item{app}{the app object.} \item{golem_opts}{A list of Options...
#!/usr/bin/env Rscript filename = commandArgs(trailingOnly = TRUE)[1] data = read.table(filename, sep = '\t', header = FALSE, row.names = 1) data = data[nrow(data) - 5, , drop = FALSE] summary(data[, 1])
/scripts/count-summary.r
no_license
klmr/pol3-seq
R
false
false
204
r
#!/usr/bin/env Rscript filename = commandArgs(trailingOnly = TRUE)[1] data = read.table(filename, sep = '\t', header = FALSE, row.names = 1) data = data[nrow(data) - 5, , drop = FALSE] summary(data[, 1])
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/aaaGenerics.R, R/fastRankSchemes.R, % R/rankScheme.R, R/rankTimePoints.R \docType{methods} \name{rankObject} \alias{rankObject} \alias{fastRankSchemes} \alias{rankObject,SetOfSchemes-method} \alias{rankObject,SetOfTimePoints-method} \title{...
/man/rankObject.Rd
no_license
cran/microsamplingDesign
R
false
true
5,141
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/aaaGenerics.R, R/fastRankSchemes.R, % R/rankScheme.R, R/rankTimePoints.R \docType{methods} \name{rankObject} \alias{rankObject} \alias{fastRankSchemes} \alias{rankObject,SetOfSchemes-method} \alias{rankObject,SetOfTimePoints-method} \title{...
#' Tidying methods for MCMC (Stan, JAGS, etc.) fits #' #' @param x an object of class \sQuote{"stanfit"} #' @param pars (character) specification of which parameters to include #' @param estimate.method method for computing point estimate ("mean" or median") #' @param conf.int (logical) include confidence interval? #' ...
/R/mcmc_tidiers.R
no_license
talgalili/broom
R
false
false
4,367
r
#' Tidying methods for MCMC (Stan, JAGS, etc.) fits #' #' @param x an object of class \sQuote{"stanfit"} #' @param pars (character) specification of which parameters to include #' @param estimate.method method for computing point estimate ("mean" or median") #' @param conf.int (logical) include confidence interval? #' ...
lister<-function(element){ #' Creates a list of blended/non-bladed files for some climate variable #' @description This function creates a list of blended or non-bladed files containing data of a specified element #' to be QCed. #' @param element climatological element (defined by means of two letters, i....
/R/lister.R
no_license
cran/INQC
R
false
false
2,458
r
lister<-function(element){ #' Creates a list of blended/non-bladed files for some climate variable #' @description This function creates a list of blended or non-bladed files containing data of a specified element #' to be QCed. #' @param element climatological element (defined by means of two letters, i....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ch3-fn.R \name{union2} \alias{union2} \title{Union of Events} \usage{ union2(x, y) } \description{ Union of Events in Data frame Format. }
/man/union2.Rd
no_license
tjssu/ssutat
R
false
true
217
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ch3-fn.R \name{union2} \alias{union2} \title{Union of Events} \usage{ union2(x, y) } \description{ Union of Events in Data frame Format. }
% Generated by roxygen2: do not edit by hand % Please edit documentation in r/utilities_cache.R \name{cache.load.dataOLD} \alias{cache.load.dataOLD} \title{Downloads and/or loads data from cache directory} \usage{ cache.load.dataOLD(file, dir, cache.only = F, is.rdata = T, col.names = NULL, server.url = "http://felek...
/man/cache.load.dataOLD.Rd
permissive
anarosner/conteStreamflow
R
false
true
551
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in r/utilities_cache.R \name{cache.load.dataOLD} \alias{cache.load.dataOLD} \title{Downloads and/or loads data from cache directory} \usage{ cache.load.dataOLD(file, dir, cache.only = F, is.rdata = T, col.names = NULL, server.url = "http://felek...
data <- read.table("household_power_consumption.txt",sep=";",header=TRUE) subData <- data[data$Date %in% c("1/2/2007","2/2/2007"),] timeData <- strptime(paste(subData$Date,subData$Time,sep=" "), "%d/%m/%Y %H:%M:%S") png("plot2.png",width=480,height=480) plot(timeData,as.numeric(subData$Global_active_power,length = 1),t...
/ExploratoryDataAnalysis/Assignment1/plot2.R
no_license
SlightlyUnorthodox/CouseraClasses
R
false
false
448
r
data <- read.table("household_power_consumption.txt",sep=";",header=TRUE) subData <- data[data$Date %in% c("1/2/2007","2/2/2007"),] timeData <- strptime(paste(subData$Date,subData$Time,sep=" "), "%d/%m/%Y %H:%M:%S") png("plot2.png",width=480,height=480) plot(timeData,as.numeric(subData$Global_active_power,length = 1),t...
\name{residuals.moc} \alias{residuals.moc} \alias{post.moc} \alias{post} \alias{npmle.gradient} \title{Posterior and residuals methods for MOC models} \description{ \code{post} is a generic method for computing posterior probabilities of a fitted model. \code{post.moc} computes the posterior mixture probabilit...
/man/residuals.moc.Rd
no_license
cran/moc
R
false
false
5,462
rd
\name{residuals.moc} \alias{residuals.moc} \alias{post.moc} \alias{post} \alias{npmle.gradient} \title{Posterior and residuals methods for MOC models} \description{ \code{post} is a generic method for computing posterior probabilities of a fitted model. \code{post.moc} computes the posterior mixture probabilit...
library(lattice) library(matrixcalc) rm(list=ls()) source('functions.R', chdir = TRUE) A<-ImportMatrices() # Werner (NTN) burn data p.burn<-matrix(c(0,0,0.947,0.531,1,1,0.986,0.932), nrow=4, ncol=2, byrow=TRUE) colnames(p.burn)<-c("sorghum", "non-sorghum") rownames(p.burn)<-c("no fire", "early", "late", "wet") # R...
/1-baseline_matrices.R
no_license
sjpeacock/WernerPeacock2017
R
false
false
3,980
r
library(lattice) library(matrixcalc) rm(list=ls()) source('functions.R', chdir = TRUE) A<-ImportMatrices() # Werner (NTN) burn data p.burn<-matrix(c(0,0,0.947,0.531,1,1,0.986,0.932), nrow=4, ncol=2, byrow=TRUE) colnames(p.burn)<-c("sorghum", "non-sorghum") rownames(p.burn)<-c("no fire", "early", "late", "wet") # R...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bold_tax_name.R \name{bold_tax_name} \alias{bold_tax_name} \title{Search BOLD for taxonomy data by taxonomic name} \usage{ bold_tax_name( name, fuzzy = FALSE, response = FALSE, tax_division = NULL, tax_rank = NULL, ......
/man/bold_tax_name.Rd
permissive
cran/bold
R
false
true
2,577
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bold_tax_name.R \name{bold_tax_name} \alias{bold_tax_name} \title{Search BOLD for taxonomy data by taxonomic name} \usage{ bold_tax_name( name, fuzzy = FALSE, response = FALSE, tax_division = NULL, tax_rank = NULL, ......
source("IGDA_synthetic_data_generation.R") ##################Generation TRAINING DATA################# # generation 5-dataset - MIXING data set.seed(5460) dataset <- gperf_separating_sphere_data(ndata.by.label = 75, p=45, nlabels = 25, d...
/dsyn05_conf_45x25_mix.R
no_license
salmuz/synthetic_noise_igda
R
false
false
3,300
r
source("IGDA_synthetic_data_generation.R") ##################Generation TRAINING DATA################# # generation 5-dataset - MIXING data set.seed(5460) dataset <- gperf_separating_sphere_data(ndata.by.label = 75, p=45, nlabels = 25, d...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_timeseries.R \name{plot_timeseries} \alias{plot_timeseries} \title{Parameter plot} \usage{ plot_timeseries( df, yaxis_type = "number", text_size = 12, site_types = c("upgradient", "nogradient", "downgradient", "lake", "lake_botto...
/man/plot_timeseries.Rd
no_license
cvoter/CSLSchem
R
false
true
1,125
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_timeseries.R \name{plot_timeseries} \alias{plot_timeseries} \title{Parameter plot} \usage{ plot_timeseries( df, yaxis_type = "number", text_size = 12, site_types = c("upgradient", "nogradient", "downgradient", "lake", "lake_botto...
library(ACSWR) ### Name: pareto_quantile ### Title: Quantile of Pareto RV ### Aliases: pareto_quantile ### Keywords: Quantile of Pareto RV ### ** Examples pareto_quantile(c(0.05,0.95),scale=10000,shape=10)
/data/genthat_extracted_code/ACSWR/examples/pareto_quantile.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
213
r
library(ACSWR) ### Name: pareto_quantile ### Title: Quantile of Pareto RV ### Aliases: pareto_quantile ### Keywords: Quantile of Pareto RV ### ** Examples pareto_quantile(c(0.05,0.95),scale=10000,shape=10)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/html.R \name{html_attr} \alias{html_attr} \alias{html_attrs} \title{Get element attributes} \usage{ html_attr(x, name, default = NA_character_) html_attrs(x) } \arguments{ \item{x}{A document (from \code{\link[=read_html]{read_html()}}), nod...
/man/html_attr.Rd
permissive
jackelineromio/rvest
R
false
true
1,215
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/html.R \name{html_attr} \alias{html_attr} \alias{html_attrs} \title{Get element attributes} \usage{ html_attr(x, name, default = NA_character_) html_attrs(x) } \arguments{ \item{x}{A document (from \code{\link[=read_html]{read_html()}}), nod...
library(gethr) ### Name: net_listening ### Title: Whether client is listening or not. ### Aliases: net_listening ### ** Examples ## No test: net_listening() ## End(No test)
/data/genthat_extracted_code/gethr/examples/net_listening.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
182
r
library(gethr) ### Name: net_listening ### Title: Whether client is listening or not. ### Aliases: net_listening ### ** Examples ## No test: net_listening() ## End(No test)
## MIT License ## ## Copyright (c) 2018 Jan Lasek ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to deal ## in the Software without restriction, including without limitation the rights ## to use, copy, modify,...
/scripts/league_formats.R
permissive
janekl/league-formats-efficacy
R
false
false
13,468
r
## MIT License ## ## Copyright (c) 2018 Jan Lasek ## ## Permission is hereby granted, free of charge, to any person obtaining a copy ## of this software and associated documentation files (the "Software"), to deal ## in the Software without restriction, including without limitation the rights ## to use, copy, modify,...
#libraries library(rKenyaCensus) library(tidyverse) library(ggplot2) library(forcats) library(extrafont) library(RColorBrewer) #get data population_density <- rKenyaCensus::V2_T2.2 water_source <- rKenyaCensus::V4_T2.15 #tidy/manipulate data water_source <- water_source %>% filter(AdminArea == "Count...
/kenya-census.R
no_license
djpib/tidy.tuesday
R
false
false
4,260
r
#libraries library(rKenyaCensus) library(tidyverse) library(ggplot2) library(forcats) library(extrafont) library(RColorBrewer) #get data population_density <- rKenyaCensus::V2_T2.2 water_source <- rKenyaCensus::V4_T2.15 #tidy/manipulate data water_source <- water_source %>% filter(AdminArea == "Count...
library(hmm.discnp) ### Name: anova.hmm.discnp ### Title: Anova for hmm.discnp models ### Aliases: anova.hmm.discnp ### Keywords: models methods ### ** Examples xxx <- with(SydColDisc,split(y,f=list(locn,depth))) fit1 <- hmm(xxx,K=1,itmax=10) fit2 <- hmm(xxx,K=2,itmax=10) anova(fit1,fit2)
/data/genthat_extracted_code/hmm.discnp/examples/anova.hmm.discnp.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
298
r
library(hmm.discnp) ### Name: anova.hmm.discnp ### Title: Anova for hmm.discnp models ### Aliases: anova.hmm.discnp ### Keywords: models methods ### ** Examples xxx <- with(SydColDisc,split(y,f=list(locn,depth))) fit1 <- hmm(xxx,K=1,itmax=10) fit2 <- hmm(xxx,K=2,itmax=10) anova(fit1,fit2)
#' Title #' #' location: /net/hafkaldi/export/u2/reikn/Splus5/GETALK/.RData #' #' @param ALK XXX #' @param LDIST XXX #' #' @return XXX #' @export #' Calc.fj.per.station <- function (ALK, LDIST) { FjPerAldur <- LDIST$LDIST.ALLS %*% ALK$ALK.TOT LengdSinnumFjPerAldur <- LDIST$LENGD.SINNUM.FJOLDI %*% ALK$ALK.TO...
/R/Calc_fj_per_station.R
no_license
fishvice/husky
R
false
false
1,386
r
#' Title #' #' location: /net/hafkaldi/export/u2/reikn/Splus5/GETALK/.RData #' #' @param ALK XXX #' @param LDIST XXX #' #' @return XXX #' @export #' Calc.fj.per.station <- function (ALK, LDIST) { FjPerAldur <- LDIST$LDIST.ALLS %*% ALK$ALK.TOT LengdSinnumFjPerAldur <- LDIST$LENGD.SINNUM.FJOLDI %*% ALK$ALK.TO...
## read in dataset filename <- "household_power_consumption.txt" DF4 <- read.table(filename, sep=";", header= TRUE, colClasses = c("Date", "character", "character", "character","character","character","character","character")) ## filter subset of data into DFFeb for 01-02 Feb 2007 DFFeb <- subset(DF4, as.Date(Date, ...
/plot4.R
no_license
scook82/ExData_Plotting1
R
false
false
2,287
r
## read in dataset filename <- "household_power_consumption.txt" DF4 <- read.table(filename, sep=";", header= TRUE, colClasses = c("Date", "character", "character", "character","character","character","character","character")) ## filter subset of data into DFFeb for 01-02 Feb 2007 DFFeb <- subset(DF4, as.Date(Date, ...
Sys.setenv(TZ = 'UTC') set.seed(42) library(data.table) library(glue) # Multiple plot function # # ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects) # - cols: Number of columns in layout # - layout: A matrix specifying the layout. If present, 'cols' is ignored. # # If the layout is ...
/post_proc/pre_process_wind_with_noise.R
no_license
J3FALL/SwanEvolution
R
false
false
14,816
r
Sys.setenv(TZ = 'UTC') set.seed(42) library(data.table) library(glue) # Multiple plot function # # ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects) # - cols: Number of columns in layout # - layout: A matrix specifying the layout. If present, 'cols' is ignored. # # If the layout is ...
AOQ <- function (p, n, k, N, type = c("exact", "napprox","ewmaSK","ewma2"),lam=1) (1 - n/N) * p * OC(p, n, k, type,lam)
/R/AOQ.R
no_license
cran/LTPDvar
R
false
false
120
r
AOQ <- function (p, n, k, N, type = c("exact", "napprox","ewmaSK","ewma2"),lam=1) (1 - n/N) * p * OC(p, n, k, type,lam)
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/MutualModel.R \docType{data} \name{MutualModel} \alias{MutualModel} \title{The root class of Model for Mutualistic systems.} \format{\preformatted{Class 'R6ClassGenerator' <MutualModel> object generator Public: n1: NULL n2: ...
/man/MutualModel.Rd
no_license
keepsimpler/StabEco
R
false
false
1,441
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/MutualModel.R \docType{data} \name{MutualModel} \alias{MutualModel} \title{The root class of Model for Mutualistic systems.} \format{\preformatted{Class 'R6ClassGenerator' <MutualModel> object generator Public: n1: NULL n2: ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/api.R \name{failed_checks} \alias{failed_checks} \title{Names of the failed checks} \usage{ failed_checks(gp) } \arguments{ \item{gp}{\code{\link{gp}} output.} } \value{ Names of the failed checks. } \description{ Names of the failed checks }...
/man/failed_checks.Rd
permissive
noamross/goodpractice
R
false
true
388
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/api.R \name{failed_checks} \alias{failed_checks} \title{Names of the failed checks} \usage{ failed_checks(gp) } \arguments{ \item{gp}{\code{\link{gp}} output.} } \value{ Names of the failed checks. } \description{ Names of the failed checks }...
#--------------------------------------------# Sign.Dir <- commandArgs(TRUE)[1] In.RData.File <- commandArgs(TRUE)[2] Out.RData.File <- commandArgs(TRUE)[3] #--------------------------------------------# #Sign.Dir <- "." #In.RData.File <- "signmatrix.RData" #Out.RData.File <- "newsignmatrix.RData" #-----------...
/tools/make_public/create_signmatrix4distance.R
permissive
umr1085-irset/toxsign_v2
R
false
false
3,140
r
#--------------------------------------------# Sign.Dir <- commandArgs(TRUE)[1] In.RData.File <- commandArgs(TRUE)[2] Out.RData.File <- commandArgs(TRUE)[3] #--------------------------------------------# #Sign.Dir <- "." #In.RData.File <- "signmatrix.RData" #Out.RData.File <- "newsignmatrix.RData" #-----------...