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
#' RFT p-values #' #' Calculates p-values of a statistical field using random field theory #' #' @param D Image dimensions. #' @param c Number of clusters. #' @param k Spatial extent in resels #' @param u Statistical threshold. #' @param n Number of statistical field in conjunction. #' @param resels Resel measurements...
/R/rftPval.R
no_license
Tokazama/iClass
R
false
false
7,156
r
#' RFT p-values #' #' Calculates p-values of a statistical field using random field theory #' #' @param D Image dimensions. #' @param c Number of clusters. #' @param k Spatial extent in resels #' @param u Statistical threshold. #' @param n Number of statistical field in conjunction. #' @param resels Resel measurements...
fetch_eqtl <- function(id="Alasoo_2018.macrophage_naive",ensembl_gene_id,chr=1,start=158175353,end=160525679,flank=1e6) { catalogueR::fetch_restAPI( unique_id=id, quant_method = "ge", infer_region = TRUE, gwas_data = NULL, chrom = chr, bp_lo...
/rsid/eqtlcatalogue.R
no_license
jinghuazhao/INF
R
false
false
1,797
r
fetch_eqtl <- function(id="Alasoo_2018.macrophage_naive",ensembl_gene_id,chr=1,start=158175353,end=160525679,flank=1e6) { catalogueR::fetch_restAPI( unique_id=id, quant_method = "ge", infer_region = TRUE, gwas_data = NULL, chrom = chr, bp_lo...
source("~/workspace/NHL_regression/R/setup.R") load("~/workspace/NHL_regression/R/gp.RData") skaterstats <- skaterstats[, -c(3:5, 38:41)] rfData <- nhlShape(2014, 2014, cols = gpModel[["columns"]], rm.nhlnum = FALSE) gbmData <- nhlShape(2013, 2014, cols = gpModel[["columns"]], rm.nhlnum = FALSE) rfData <- rfData[rfData...
/R/pred1_GP.R
permissive
kielejocain/NHL_regression
R
false
false
1,321
r
source("~/workspace/NHL_regression/R/setup.R") load("~/workspace/NHL_regression/R/gp.RData") skaterstats <- skaterstats[, -c(3:5, 38:41)] rfData <- nhlShape(2014, 2014, cols = gpModel[["columns"]], rm.nhlnum = FALSE) gbmData <- nhlShape(2013, 2014, cols = gpModel[["columns"]], rm.nhlnum = FALSE) rfData <- rfData[rfData...
# Name : Oshin Pojta # Remove '#' to install packages if error occurs during library calls # Make sure that you have Rtools install corresponding to R version ( here used is R.4.0.3 version with RTools4.0 ) # install.packages('class') # install.packages('psycho') # install.packages('tidyverse') # install.packa...
/Classification Algorithms (Supervised).R
no_license
oshinpojta/UCI---Dataset-Prediction-using-R
R
false
false
7,079
r
# Name : Oshin Pojta # Remove '#' to install packages if error occurs during library calls # Make sure that you have Rtools install corresponding to R version ( here used is R.4.0.3 version with RTools4.0 ) # install.packages('class') # install.packages('psycho') # install.packages('tidyverse') # install.packa...
LogJobSchedule <- runApp("\\fcespfsrp001\Diretorios\Divisao_Tecnologia_Informacao\Desenvolvimento\BI\BI\Diversos\R\LogJobSchedule\app.R")
/global.R
no_license
guimatheus92/Gantt-chart-using-the-Timevis-package-in-R-for-monitoring-processes
R
false
false
137
r
LogJobSchedule <- runApp("\\fcespfsrp001\Diretorios\Divisao_Tecnologia_Informacao\Desenvolvimento\BI\BI\Diversos\R\LogJobSchedule\app.R")
# Source http://blogs2.datall-analyse.nl/2016/02/11/rcode_extended_kalman_filter/ # R Code, simulations and modeling # by Stefan Gelissen library(dlm) library(numDeriv) #The R functions for the extended Kalman filter (EKF) and its smoother #can be downloaded from: source("http://www.datall-analyse.nl/EKF.R") #Take a...
/Kalman filter G1_eg2.R
no_license
rickwtcs/kalman-filter-R-code
R
false
false
5,341
r
# Source http://blogs2.datall-analyse.nl/2016/02/11/rcode_extended_kalman_filter/ # R Code, simulations and modeling # by Stefan Gelissen library(dlm) library(numDeriv) #The R functions for the extended Kalman filter (EKF) and its smoother #can be downloaded from: source("http://www.datall-analyse.nl/EKF.R") #Take a...
#### Libraries #### library(stringr) library(slam) library(ggplot2) library(reshape2) library(dplyr) library(gridExtra) library(ggthemes) library(RCurl) library(XML) library(tm) library(RWeka) library(parallel) library(tidytext) library(purrr) #### Data #### data("stop_words") options(mc.cores = 2) #### Data types ##...
/advertising.R
no_license
vbeakovic/principles_of_data_science
R
false
false
5,019
r
#### Libraries #### library(stringr) library(slam) library(ggplot2) library(reshape2) library(dplyr) library(gridExtra) library(ggthemes) library(RCurl) library(XML) library(tm) library(RWeka) library(parallel) library(tidytext) library(purrr) #### Data #### data("stop_words") options(mc.cores = 2) #### Data types ##...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_zombies.R \name{get_zombies} \alias{get_zombies} \title{get_zombies} \usage{ get_zombies(width, height) } \arguments{ \item{width}{numeric} \item{height}{numeric} } \value{ character } \description{ Gets a link that contains the picture ...
/man/get_zombies.Rd
no_license
bdacunha/randompic
R
false
true
405
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_zombies.R \name{get_zombies} \alias{get_zombies} \title{get_zombies} \usage{ get_zombies(width, height) } \arguments{ \item{width}{numeric} \item{height}{numeric} } \value{ character } \description{ Gets a link that contains the picture ...
auto.arima <- function(x, d=NA, D=NA, max.p=5, max.q=5, max.P=2, max.Q=2, max.order=5, max.d=2, max.D=1, start.p=2, start.q=2, start.P=1, start.Q=1, stationary=FALSE, seasonal=TRUE, ic=c("aicc","aic","bic"), stepwise=TRUE, trace=FALSE, approximation=(length(x)>100 | frequency(x)>12), xreg=NULL, ...
/R/newarima2.R
no_license
andrewflowers/forecast
R
false
false
21,079
r
auto.arima <- function(x, d=NA, D=NA, max.p=5, max.q=5, max.P=2, max.Q=2, max.order=5, max.d=2, max.D=1, start.p=2, start.q=2, start.P=1, start.Q=1, stationary=FALSE, seasonal=TRUE, ic=c("aicc","aic","bic"), stepwise=TRUE, trace=FALSE, approximation=(length(x)>100 | frequency(x)>12), xreg=NULL, ...
#' Download vertical profile (\code{vp}) files from the ENRAM data repository #' #' Download and unzip a selection of vertical profile (\code{vp}) files from the #' \href{http://enram.github.io/data-repository/}{ENRAM data repository}, where #' these are stored as monthly zips per radar. #' #' @param date_min character...
/R/download_vpfiles.R
permissive
Tubbz-alt/bioRad
R
false
false
5,023
r
#' Download vertical profile (\code{vp}) files from the ENRAM data repository #' #' Download and unzip a selection of vertical profile (\code{vp}) files from the #' \href{http://enram.github.io/data-repository/}{ENRAM data repository}, where #' these are stored as monthly zips per radar. #' #' @param date_min character...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/track.R \name{track_getInfo} \alias{track_getInfo} \title{Get the metadata for a track.} \usage{ track_getInfo(track, artist, mbid = NA, autocorrect = NA, username = NA) } \arguments{ \item{track}{The track name.} \item{artist}{The artist ...
/man/track_getInfo.Rd
no_license
juyeongkim/lastfmr
R
false
true
1,104
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/track.R \name{track_getInfo} \alias{track_getInfo} \title{Get the metadata for a track.} \usage{ track_getInfo(track, artist, mbid = NA, autocorrect = NA, username = NA) } \arguments{ \item{track}{The track name.} \item{artist}{The artist ...
# server.R script for state_saving function example # Allows user to save state of an object in the environment # Can then be recalled or reused # The use of "save states" or "state saving" is very useful when you want to # reuse a previous state of your app, with the current state. # ---------------------------------...
/save_state_example/server.R
no_license
jhhughes256/shiny-paganz
R
false
false
3,265
r
# server.R script for state_saving function example # Allows user to save state of an object in the environment # Can then be recalled or reused # The use of "save states" or "state saving" is very useful when you want to # reuse a previous state of your app, with the current state. # ---------------------------------...
library(shiny) library(shiny.semantic) library(tidyverse) library(lubridate) library(leaflet) ui <- semanticPage( titlePanel("Hello Appsilon"), sidebar_layout( sidebar_panel( shiny::selectInput('v_type','Select Vessel type', choices = c("Tanker","Cargo","Tug","Unspecified","Passenger",...
/drafts/no_module.R
no_license
magralo/appsilon_mateo
R
false
false
1,950
r
library(shiny) library(shiny.semantic) library(tidyverse) library(lubridate) library(leaflet) ui <- semanticPage( titlePanel("Hello Appsilon"), sidebar_layout( sidebar_panel( shiny::selectInput('v_type','Select Vessel type', choices = c("Tanker","Cargo","Tug","Unspecified","Passenger",...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/homework2.R \name{isweep_k} \alias{isweep_k} \title{Inverse Sweep k} \usage{ isweep_k(A, k) } \arguments{ \item{A}{The input symmetric matrix} \item{k}{Diagonal index on which to sweep} } \description{ \code{isweep_k} applies the inverse swe...
/sgxuST758/man/isweep_k.Rd
no_license
stevengxu/ST758-Computing-In-Statistical-Research
R
false
true
401
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/homework2.R \name{isweep_k} \alias{isweep_k} \title{Inverse Sweep k} \usage{ isweep_k(A, k) } \arguments{ \item{A}{The input symmetric matrix} \item{k}{Diagonal index on which to sweep} } \description{ \code{isweep_k} applies the inverse swe...
def fact(num) if n <= 1 1; else n * fact(n-1); end end puts "Factorial of #{ARGV[0]} is = " + fact(ARGV[0]);
/factorial.r
no_license
HrisikeshSinghaChowdhury/RubyImportCodes
R
false
false
119
r
def fact(num) if n <= 1 1; else n * fact(n-1); end end puts "Factorial of #{ARGV[0]} is = " + fact(ARGV[0]);
library(rvest) library(tidyverse) teams <- c("ATL","BOS","NJN","CHA","CHI","CLE","DAL","DEN","DET","GSW","HOU", "IND","LAC","LAL","MEM","MIA","MIL","MIN","NOH","NYK","OKC","ORL", "PHI","PHO","POR","SAC","SAS","TOR","UTA","WAS") # Scrape each team page all_seasons <- data.frame() for (team in teams...
/Analysis of Longitudinal Data/Final Project/Code/scrape.R
no_license
timothyvigers/School
R
false
false
1,081
r
library(rvest) library(tidyverse) teams <- c("ATL","BOS","NJN","CHA","CHI","CLE","DAL","DEN","DET","GSW","HOU", "IND","LAC","LAL","MEM","MIA","MIL","MIN","NOH","NYK","OKC","ORL", "PHI","PHO","POR","SAC","SAS","TOR","UTA","WAS") # Scrape each team page all_seasons <- data.frame() for (team in teams...
#!/usr/bin/env Rscript # df <- read.csv("final_rr.csv") # summary(df) # # # # Random Chance Reciprocal Ranks # # rand <- 1/sample(1:100, 100) # # # # # # # Model Values # tfidf <- df$Reciprocal_Rank[df$Model=="TF-IDF"] # lda <- df$Reciprocal_Rank[df$Model=="LDA"] # hdp <- df$Reciprocal_Rank[df$Model=="HDP-LDA"] # at...
/stat_test.R
permissive
hellodannyliu/topic-traceability
R
false
false
3,611
r
#!/usr/bin/env Rscript # df <- read.csv("final_rr.csv") # summary(df) # # # # Random Chance Reciprocal Ranks # # rand <- 1/sample(1:100, 100) # # # # # # # Model Values # tfidf <- df$Reciprocal_Rank[df$Model=="TF-IDF"] # lda <- df$Reciprocal_Rank[df$Model=="LDA"] # hdp <- df$Reciprocal_Rank[df$Model=="HDP-LDA"] # at...
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' ComDayCqDamHandlerStandardPsdPsd...
/clients/r/generated/R/ComDayCqDamHandlerStandardPsdPsdHandlerInfo.r
permissive
shinesolutions/swagger-aem-osgi
R
false
false
4,217
r
# Adobe Experience Manager OSGI config (AEM) API # # Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API # # OpenAPI spec version: 1.0.0-pre.0 # Contact: opensource@shinesolutions.com # Generated by: https://openapi-generator.tech #' ComDayCqDamHandlerStandardPsdPsd...
dfD <- eventReactive(c(input$selectSystemOfGovernment_1), { project <- "https://data.world/jeffrey-feng/s18-edv-project-3" data.world::set_config(cfg_env("DW_API")) paramQuery <- data.world::qry_sql( " select region, avg(contraceptive_prevalence - (0.00584648*income_per_person + 28.7903)) as contrac...
/Final_Project/Combined_Code/brandonsDataD.R
no_license
Arinze95/CS329DataViz
R
false
false
1,120
r
dfD <- eventReactive(c(input$selectSystemOfGovernment_1), { project <- "https://data.world/jeffrey-feng/s18-edv-project-3" data.world::set_config(cfg_env("DW_API")) paramQuery <- data.world::qry_sql( " select region, avg(contraceptive_prevalence - (0.00584648*income_per_person + 28.7903)) as contrac...
iteration_0 <- read.csv(file="current_iteration_0.csv", header=FALSE, sep=",") iteration_1 <- read.csv(file="current_iteration_1.csv", header=FALSE, sep=",") iteration_2 <- read.csv(file="current_iteration_2.csv", header=FALSE, sep=",") iteration_3 <- read.csv(file="current_iteration_3.csv", header=FALSE, sep=",") iter...
/201/meanGraph.R
no_license
auryn31/acoflowshop
R
false
false
9,611
r
iteration_0 <- read.csv(file="current_iteration_0.csv", header=FALSE, sep=",") iteration_1 <- read.csv(file="current_iteration_1.csv", header=FALSE, sep=",") iteration_2 <- read.csv(file="current_iteration_2.csv", header=FALSE, sep=",") iteration_3 <- read.csv(file="current_iteration_3.csv", header=FALSE, sep=",") iter...
############################################################################################################################## # Title: plot_time_wq.R # Type: Secondary Module for DCR Shiny App # Description: Time Series plot (for non-depth dependent data) # Written by: Nick Zinck, Spring 2017 #########...
/modules/plots/plot_time_wq.R
permissive
dancrocker/DCR-WAVE
R
false
false
23,203
r
############################################################################################################################## # Title: plot_time_wq.R # Type: Secondary Module for DCR Shiny App # Description: Time Series plot (for non-depth dependent data) # Written by: Nick Zinck, Spring 2017 #########...
## ----libraries, message=FALSE, warning=FALSE, cache=FALSE------------------------------------------------------------- library("tidyverse") ## ----set_seed, echo=FALSE--------------------------------------------------------------------------------------------- set.seed(2) ## --------------------------------------...
/courses/stat587Eng/slides/Inference/I06-Pvalues/Correspondence_between_pvalues_and_confidence_intervals.R
no_license
jarad/jarad.github.com
R
false
false
2,405
r
## ----libraries, message=FALSE, warning=FALSE, cache=FALSE------------------------------------------------------------- library("tidyverse") ## ----set_seed, echo=FALSE--------------------------------------------------------------------------------------------- set.seed(2) ## --------------------------------------...
modify <- new.env(parent = .GlobalEnv) adm <- copy(sql$output$adm) staff <- copy(sql$output$staff) setf(adm, j = Cs(cmh_effdt, team_effdt), as.Date) adm[, team_short := cmh_recode(team)] adm grep(pattern = "[[:alpha:+], :alpha:{0}]", replacement = "", x = "last, first", perl = FALSE) gsub(pattern = "[[:alpha:+], :al...
/PI/Dup Adms/Code/2 modify dup_adm.R
no_license
JamesDalrymple/CMH
R
false
false
797
r
modify <- new.env(parent = .GlobalEnv) adm <- copy(sql$output$adm) staff <- copy(sql$output$staff) setf(adm, j = Cs(cmh_effdt, team_effdt), as.Date) adm[, team_short := cmh_recode(team)] adm grep(pattern = "[[:alpha:+], :alpha:{0}]", replacement = "", x = "last, first", perl = FALSE) gsub(pattern = "[[:alpha:+], :al...
score.ecdf <- function(score, max.winsize=200, sample.size=10000, summary.fun=mean, max.winsize.asym=50, sample.size.asym=1000) { ## sample.fun <- function(ae.res,rep.n) { ## ecdf(apply(replicate(rep.n, sample(ae.res, sample.size)), 1, summary.fun)) ## } sample.fun <- function(ascore...
/R/score.ecdf.R
no_license
yaomin/dptmethods
R
false
false
671
r
score.ecdf <- function(score, max.winsize=200, sample.size=10000, summary.fun=mean, max.winsize.asym=50, sample.size.asym=1000) { ## sample.fun <- function(ae.res,rep.n) { ## ecdf(apply(replicate(rep.n, sample(ae.res, sample.size)), 1, summary.fun)) ## } sample.fun <- function(ascore...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{fastlm} \alias{fastlm} \title{fastlm} \usage{ fastlm(X, y, wi) } \arguments{ \item{X}{mat} \item{y}{vector} \item{wi}{vector} } \description{ fastlm }
/man/fastlm.Rd
permissive
jaymie18/blblm
R
false
true
251
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{fastlm} \alias{fastlm} \title{fastlm} \usage{ fastlm(X, y, wi) } \arguments{ \item{X}{mat} \item{y}{vector} \item{wi}{vector} } \description{ fastlm }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{plot_kmeans} \alias{plot_kmeans} \title{K-means cluster the data on the samples} \usage{ plot_kmeans(df, nstart = 25, iter.max = 1000) } \arguments{ \item{df}{dataframe, typically from `import_data()`} \item{nstart}{nstart poin...
/man/plot_kmeans.Rd
permissive
tangbozeng/pepdiff
R
false
true
635
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{plot_kmeans} \alias{plot_kmeans} \title{K-means cluster the data on the samples} \usage{ plot_kmeans(df, nstart = 25, iter.max = 1000) } \arguments{ \item{df}{dataframe, typically from `import_data()`} \item{nstart}{nstart poin...
######################################################################### #Code for calibration of N uptake parameters for the sugar kelp DEB model #for Venolia et al (in press) created on 7/12/19 ######################################################################### #function including just the parts of the sugar ...
/N_uptake_Calibration.R
no_license
CVenolia/SugarKelpDEB
R
false
false
1,695
r
######################################################################### #Code for calibration of N uptake parameters for the sugar kelp DEB model #for Venolia et al (in press) created on 7/12/19 ######################################################################### #function including just the parts of the sugar ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/survival-pyears-tidiers.R \name{tidy.pyears} \alias{tidy.pyears} \alias{pyears_tidiers} \title{Tidy a(n) pyears object} \usage{ \method{tidy}{pyears}(x, ...) } \arguments{ \item{x}{A \code{pyears} object returned from \code{\link[survival:pye...
/man/tidy.pyears.Rd
no_license
nemochina2008/broom
R
false
true
3,252
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/survival-pyears-tidiers.R \name{tidy.pyears} \alias{tidy.pyears} \alias{pyears_tidiers} \title{Tidy a(n) pyears object} \usage{ \method{tidy}{pyears}(x, ...) } \arguments{ \item{x}{A \code{pyears} object returned from \code{\link[survival:pye...
## ----------------------------------------------------------------------------- library(trip) d <- data.frame(x=1:10,y=rnorm(10), tms=Sys.time() + 1:10, id=gl(2, 5)) tr <- trip(d) summary(tr) ## ----------------------------------------------------------------------------- plot(tr) lines(tr) ## ----------------------...
/inst/doc/trip.R
no_license
cran/trip
R
false
false
2,400
r
## ----------------------------------------------------------------------------- library(trip) d <- data.frame(x=1:10,y=rnorm(10), tms=Sys.time() + 1:10, id=gl(2, 5)) tr <- trip(d) summary(tr) ## ----------------------------------------------------------------------------- plot(tr) lines(tr) ## ----------------------...
# predict = function(object, ...) UseMethod("generic") sem.predict = function(object, newdata, sefit = FALSE, ...) { # If not a model object, then coerce to a list if(class(object) != "list") object = list(object) # Isolate model(s) in the model list that contain the predictors in newdata new.x =...
/piecewiseSEM/R/sem.predict.R
no_license
ingted/R-Examples
R
false
false
2,774
r
# predict = function(object, ...) UseMethod("generic") sem.predict = function(object, newdata, sefit = FALSE, ...) { # If not a model object, then coerce to a list if(class(object) != "list") object = list(object) # Isolate model(s) in the model list that contain the predictors in newdata new.x =...
#' Check repositories #' #' Check if tools are in pkg repositories #' #' @param names Vector of tool names #' @param pkgs List of available packages #' #' @return list with repo information check_repos <- function(names, pkgs) { futile.logger::flog.info("Checking repositories...") repos <- jsonlite::fromJSON("...
/R/repositories.R
permissive
scottgigante/long_read_tools
R
false
false
8,561
r
#' Check repositories #' #' Check if tools are in pkg repositories #' #' @param names Vector of tool names #' @param pkgs List of available packages #' #' @return list with repo information check_repos <- function(names, pkgs) { futile.logger::flog.info("Checking repositories...") repos <- jsonlite::fromJSON("...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/textual.R \name{textInput} \alias{textInput} \alias{searchInput} \alias{emailInput} \alias{urlInput} \alias{telephoneInput} \alias{passwordInput} \alias{numberInput} \title{Textual inputs} \usage{ textInput(id, value = NULL, placeholder = NUL...
/man/textInput.Rd
permissive
rpodcast/yonder
R
false
true
3,437
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/textual.R \name{textInput} \alias{textInput} \alias{searchInput} \alias{emailInput} \alias{urlInput} \alias{telephoneInput} \alias{passwordInput} \alias{numberInput} \title{Textual inputs} \usage{ textInput(id, value = NULL, placeholder = NUL...
#' @title Specifications test-estimate_cuminc.R #' @section Last updated by: Steven Haesendonckx (haesendonckx.steven@@gmail.com) #' @section Last update date: 2022-05-01T14:21:53 #' #' @section List of tested specifications #' T1. The function accepts a `data.frame` `tibble` or `data.table` #' T1.1 No error when `data...
/tests/testthat/test-estimate_cuminc.R
permissive
bailliem/pharmavisR
R
false
false
8,685
r
#' @title Specifications test-estimate_cuminc.R #' @section Last updated by: Steven Haesendonckx (haesendonckx.steven@@gmail.com) #' @section Last update date: 2022-05-01T14:21:53 #' #' @section List of tested specifications #' T1. The function accepts a `data.frame` `tibble` or `data.table` #' T1.1 No error when `data...
#' Finding best C #' #' This function computes the best C using the timepoints and max lag in the dataset #' #' @param timepoints a vector of timepoints used in the dataset #' @param max.lag a numeric value with maximum lags allowed #' @param pi a numeric value between 0.5 and 1 for the upper bound on the penalty #' @p...
/R/findC.R
permissive
agitter/LPWC
R
false
false
1,295
r
#' Finding best C #' #' This function computes the best C using the timepoints and max lag in the dataset #' #' @param timepoints a vector of timepoints used in the dataset #' @param max.lag a numeric value with maximum lags allowed #' @param pi a numeric value between 0.5 and 1 for the upper bound on the penalty #' @p...
## Caching the Inverse of a Matrix ## Matrix inversion is usually a costly computation and ## there may be some benefit to caching the inverse of a ## matrix rather than compute it repeatedly. ## makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse. ## cacheSolve: This function...
/cachematrix.R
no_license
perry690/ProgrammingAssignment2
R
false
false
1,575
r
## Caching the Inverse of a Matrix ## Matrix inversion is usually a costly computation and ## there may be some benefit to caching the inverse of a ## matrix rather than compute it repeatedly. ## makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse. ## cacheSolve: This function...
library(copula) #The function newcop<-function(n,dim,rho,thresh_lo,thresh_hi) { U<-runif(n) ncop<-normalCopula(rho,dim=dim) #this is the copula of a multivariate normal with covariance matrix having 1s on #the diagonal and all rhos in all off-diagonal positions res<-rCopula(n,ncop) res<-(thresh_hi-thresh_lo...
/ForNoah20200601.R
no_license
nmrnm/copulas-and-tail-dependence
R
false
false
1,077
r
library(copula) #The function newcop<-function(n,dim,rho,thresh_lo,thresh_hi) { U<-runif(n) ncop<-normalCopula(rho,dim=dim) #this is the copula of a multivariate normal with covariance matrix having 1s on #the diagonal and all rhos in all off-diagonal positions res<-rCopula(n,ncop) res<-(thresh_hi-thresh_lo...
#' @include ModelPoset.R NULL #' Construct a poset of factor analysis models. #' #' Creates an object representing a collection of factor analysis models. There #' is one model for each fixed number of factors from 0 to some specified #' maximum number of factors. Each model is identified by a single #' number, in part...
/R/FactorAnalyses.R
no_license
yuinityk/sBIC
R
false
false
6,804
r
#' @include ModelPoset.R NULL #' Construct a poset of factor analysis models. #' #' Creates an object representing a collection of factor analysis models. There #' is one model for each fixed number of factors from 0 to some specified #' maximum number of factors. Each model is identified by a single #' number, in part...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{max_atraso} \alias{max_atraso} \title{Funcao auxiliar - encontra o voo de maior atraso de partida} \usage{ max_atraso(data) } \arguments{ \item{data}{dataset \code{meus_voos}} } \value{ uma linha do dataset \code{meus_voos} ...
/man/max_atraso.Rd
permissive
mendoncalf/tccR4ds2
R
false
true
433
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{max_atraso} \alias{max_atraso} \title{Funcao auxiliar - encontra o voo de maior atraso de partida} \usage{ max_atraso(data) } \arguments{ \item{data}{dataset \code{meus_voos}} } \value{ uma linha do dataset \code{meus_voos} ...
context("expression translation") test_that("translation of expression works for single filter/condition", { ## Check for some character filter. ## exon_id flt <- ExonIdFilter("EX1", condition = "==") flt2 <- AnnotationFilter(~ exon_id == "EX1") expect_equal(flt, flt2) flt <- ExonIdFilter(c("EX...
/tests/testthat/test_translate-utils.R
permissive
jwbargsten/AnnotationFilter
R
false
false
4,836
r
context("expression translation") test_that("translation of expression works for single filter/condition", { ## Check for some character filter. ## exon_id flt <- ExonIdFilter("EX1", condition = "==") flt2 <- AnnotationFilter(~ exon_id == "EX1") expect_equal(flt, flt2) flt <- ExonIdFilter(c("EX...
#' Read sgRNA summary in MAGeCK-RRA results #' #' @docType methods #' @name ReadsgRRA #' @rdname ReadsgRRA #' #' @param sgRNA_summary A file path or a data frame of sgRNA summary data. #' #' @return A data frame. #' #' @author Wubing Zhang #' #' @examples #' file2 = file.path(system.file("extdata", package = "MAGeCKFlu...
/R/ReadsgRRA.R
no_license
sysyangb/MAGeCKFlute
R
false
false
768
r
#' Read sgRNA summary in MAGeCK-RRA results #' #' @docType methods #' @name ReadsgRRA #' @rdname ReadsgRRA #' #' @param sgRNA_summary A file path or a data frame of sgRNA summary data. #' #' @return A data frame. #' #' @author Wubing Zhang #' #' @examples #' file2 = file.path(system.file("extdata", package = "MAGeCKFlu...
## La funzione 'makeCacheMatrix' consente l'archiviazione nella cache di una matrice e della sua matrice inversa ## mediante la creazione di una 'lista' di 4 funzioni (set, get, set.inv, get.inv) ## sfruttando l'operatore '<<', il quale consente di assegnare un valore definito nell'ambiente di lavoro ad un oggetto def...
/cachematrix.R
no_license
rledda/ProgrammingAssignment2
R
false
false
2,969
r
## La funzione 'makeCacheMatrix' consente l'archiviazione nella cache di una matrice e della sua matrice inversa ## mediante la creazione di una 'lista' di 4 funzioni (set, get, set.inv, get.inv) ## sfruttando l'operatore '<<', il quale consente di assegnare un valore definito nell'ambiente di lavoro ad un oggetto def...
# # This is the user-interface definition of a Shiny web application. You can # run the application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(shinythemes) library(shinydashboard) library(googleVis) library(corr...
/ui.R
no_license
karna2017/tedtalks
R
false
false
9,311
r
# # This is the user-interface definition of a Shiny web application. You can # run the application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(shinythemes) library(shinydashboard) library(googleVis) library(corr...
\name{GERnews-package} \alias{GERnews-package} \alias{GERnews} \docType{package} \title{GERnews simplifies online media research } \description{ GERnews simplifies online media research. It allows to access the search engines of the German online newspapers Faz, Spiegel and Zeit in RStudio and thus enables the user to ...
/man/GERnews-package.Rd
no_license
Wunderbelle/GERnews
R
false
false
2,000
rd
\name{GERnews-package} \alias{GERnews-package} \alias{GERnews} \docType{package} \title{GERnews simplifies online media research } \description{ GERnews simplifies online media research. It allows to access the search engines of the German online newspapers Faz, Spiegel and Zeit in RStudio and thus enables the user to ...
/Code_R/003_Main_Predictions_Naive.R
no_license
claudiadelgado92/Network-Data
R
false
false
3,647
r
# lists contain elements of different types # syntax: list(data) v1 = c(5.678, 32.9, 54, 31.6) v2 = c('hey', 'hello', 'bye') v3 = c(TRUE, FALSE) mylist = list(v1, v2, v3) song = list("Some song", 190, 5) name(song) = c("title", "duration", "track") # equivalent is: song = list(title = "Some song", duration = 190, tra...
/basics/lists.R
no_license
alexa984/R-playground
R
false
false
956
r
# lists contain elements of different types # syntax: list(data) v1 = c(5.678, 32.9, 54, 31.6) v2 = c('hey', 'hello', 'bye') v3 = c(TRUE, FALSE) mylist = list(v1, v2, v3) song = list("Some song", 190, 5) name(song) = c("title", "duration", "track") # equivalent is: song = list(title = "Some song", duration = 190, tra...
#' Multilevel FoSR using Variational Bayes and FPCA #' #' Fitting function for function-on-scalar regression for multilevel data. #' This function estimates model parameters using a VB and estimates #' the residual covariance surface using FPCA. #' #' @param formula a formula indicating the structure of the proposed ...
/R/VB_Mult_FPCA.R
no_license
dill/refund
R
false
false
11,288
r
#' Multilevel FoSR using Variational Bayes and FPCA #' #' Fitting function for function-on-scalar regression for multilevel data. #' This function estimates model parameters using a VB and estimates #' the residual covariance surface using FPCA. #' #' @param formula a formula indicating the structure of the proposed ...
0ac971b9381da1a8fc3a0a660a95286f cache-coherence-2-fixpoint-6.qdimacs 11578 34048
/code/dcnf-ankit-optimized/Results/PCNF-TRACK-2018/E1/Database/cache-coherence-2-fixpoint-6/cache-coherence-2-fixpoint-6.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
81
r
0ac971b9381da1a8fc3a0a660a95286f cache-coherence-2-fixpoint-6.qdimacs 11578 34048
library(deSolve) library(tidyverse) ## Get the data dataFiles <- list.files(path = "calibration/", full.names = T) dataList <- vector("list", length = length(dataFiles)) for (i in seq_along(dataFiles)) { dataList[[i]] <- read_csv(file = dataFiles[[i]], col_names = T) %>% rename(generation = "evolution$gen...
/scala/ode/src/main/scala/zombies/ode/RFiles/calib_analysis.R
no_license
openmole/exmodelo-model
R
false
false
393
r
library(deSolve) library(tidyverse) ## Get the data dataFiles <- list.files(path = "calibration/", full.names = T) dataList <- vector("list", length = length(dataFiles)) for (i in seq_along(dataFiles)) { dataList[[i]] <- read_csv(file = dataFiles[[i]], col_names = T) %>% rename(generation = "evolution$gen...
info_renderTable <- function(data, ...) { nice_col_headings2 <- plyr::mapvalues( colnames(data), from = display_table_labels$data.name, to = display_table_labels$display.name, warn_missing = FALSE ) %>% tools::toTitleCase() %>% trimws() the_na_labels <- display_table_labels %>...
/karanisTax/modal_summary_tab.R
no_license
jan2nov/oxrep
R
false
false
2,564
r
info_renderTable <- function(data, ...) { nice_col_headings2 <- plyr::mapvalues( colnames(data), from = display_table_labels$data.name, to = display_table_labels$display.name, warn_missing = FALSE ) %>% tools::toTitleCase() %>% trimws() the_na_labels <- display_table_labels %>...
#-#########################################################-# #-### web scraper for http://www.bigappleherp.com/ ########-# #-#########################################################-# library(rvest) library(stringr) #### Step 1: get URLs to main categories of animals for sale #### site = read_html("http://www.biga...
/scripts/pet_stores/bigappleherp.R
no_license
ocstringham/pet_store_web_scrapers
R
false
false
3,379
r
#-#########################################################-# #-### web scraper for http://www.bigappleherp.com/ ########-# #-#########################################################-# library(rvest) library(stringr) #### Step 1: get URLs to main categories of animals for sale #### site = read_html("http://www.biga...
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
/myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615767097-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,803
r
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704...
## Packages library(tidytext) library(tidyverse) ## Data Description # these data were generated from the filtered set of # 43761 grants using tidytext::unnest_tokens() and # stop_words(). # import word frequencies by year and rc file <- "tidy_texts/words_by_year_rc.txt" words_by_year_rc <- read.table(file, ...
/explore_words_bbsrc.R
no_license
3mmaRand/GtR
R
false
false
1,661
r
## Packages library(tidytext) library(tidyverse) ## Data Description # these data were generated from the filtered set of # 43761 grants using tidytext::unnest_tokens() and # stop_words(). # import word frequencies by year and rc file <- "tidy_texts/words_by_year_rc.txt" words_by_year_rc <- read.table(file, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iotanalytics_operations.R \name{iotanalytics_describe_datastore} \alias{iotanalytics_describe_datastore} \title{Retrieves information about a data store} \usage{ iotanalytics_describe_datastore(datastoreName, includeStatistics) } \arguments{ ...
/cran/paws.internet.of.things/man/iotanalytics_describe_datastore.Rd
permissive
johnnytommy/paws
R
false
true
796
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iotanalytics_operations.R \name{iotanalytics_describe_datastore} \alias{iotanalytics_describe_datastore} \title{Retrieves information about a data store} \usage{ iotanalytics_describe_datastore(datastoreName, includeStatistics) } \arguments{ ...
## File Name: mice_multilevel_imputation_draw_residuals.R ## File Version: 0.07 ################################################ # draw residuals mice_multilevel_imputation_draw_residuals <- function(predicted, sigma ){ N0 <- length(predicted) imp <- predicted + stats::rnorm(N0, mean=0, sd=sigma) r...
/R/mice_multilevel_imputation_draw_residuals.R
no_license
shahabjolani/miceadds
R
false
false
335
r
## File Name: mice_multilevel_imputation_draw_residuals.R ## File Version: 0.07 ################################################ # draw residuals mice_multilevel_imputation_draw_residuals <- function(predicted, sigma ){ N0 <- length(predicted) imp <- predicted + stats::rnorm(N0, mean=0, sd=sigma) r...
# Purpose: re-create Plot 1 in the first project, saving it as a .png. # # libraries we want library(dplyr) library(tidyr) library(lubridate) library(ggplot2) # what directory are we in? # currDir <- getwd() # print(currDir) # the date range we care about minDate <- ymd("2007-02-01") maxDate <- ymd("2007-02-02") # ...
/plot1.R
no_license
MVEFrontier/ExData_Plotting1
R
false
false
1,022
r
# Purpose: re-create Plot 1 in the first project, saving it as a .png. # # libraries we want library(dplyr) library(tidyr) library(lubridate) library(ggplot2) # what directory are we in? # currDir <- getwd() # print(currDir) # the date range we care about minDate <- ymd("2007-02-01") maxDate <- ymd("2007-02-02") # ...
options(shiny.maxRequestSize=30*1024^3) #' The application server-side #' #' @param input,output,session Internal parameters for {shiny}. #' DO NOT REMOVE. #' @import shiny #' @noRd app_server <- function( input, output, session ) { app_data <- shiny::reactive({ if (length(input$tribunal) == 0) { trib...
/App/R/app_server.R
no_license
camilatavarez/inovaCNJ
R
false
false
1,059
r
options(shiny.maxRequestSize=30*1024^3) #' The application server-side #' #' @param input,output,session Internal parameters for {shiny}. #' DO NOT REMOVE. #' @import shiny #' @noRd app_server <- function( input, output, session ) { app_data <- shiny::reactive({ if (length(input$tribunal) == 0) { trib...
df_row <- data.frame(var1 = c(1, 2, 1), var2 = c(2, 3, 2)) df_row install.packages(("dplyr")) library(dplyr) df_new <- df_row df_new df_new <- rename(df_new, v2= var2) df_row df_new mpg <- as.data.frame(ggplot2::mpg) mpg <- rename(mpg, city = cty, highway = hwy) head(mpg)
/chapter04/chapter04_02.R
no_license
Nam-SW/R_practice
R
false
false
299
r
df_row <- data.frame(var1 = c(1, 2, 1), var2 = c(2, 3, 2)) df_row install.packages(("dplyr")) library(dplyr) df_new <- df_row df_new df_new <- rename(df_new, v2= var2) df_row df_new mpg <- as.data.frame(ggplot2::mpg) mpg <- rename(mpg, city = cty, highway = hwy) head(mpg)
\name{docNgram2} \alias{docNgram2} %- Also NEED an '\alias' for EACH other topic documented here. \title{ docNgram2 } \description{ \code{ docNgram2} returns returns data frame of N-gram from a file or all files in a given directory. Each word of N-gram makes one column. } \usage{ docNgram2(directory, type = 0, p...
/man/docNgram2.Rd
no_license
IshidaMotohiro/RMeCab
R
false
false
1,913
rd
\name{docNgram2} \alias{docNgram2} %- Also NEED an '\alias' for EACH other topic documented here. \title{ docNgram2 } \description{ \code{ docNgram2} returns returns data frame of N-gram from a file or all files in a given directory. Each word of N-gram makes one column. } \usage{ docNgram2(directory, type = 0, p...
m=read.table("prok_representative.txt",sep="\t"); pdf("1.1.pdf"); x=m[,2]; y=m[,4]; plot(x,y,pch=16, xlab="Genome Size",ylab="Genes"); fit <- lm(y~x); abline( fit,col="blue",lwd=1.8 ); rr <- round( summary(fit)$adj.r.squared,2); intercept <- round( summary(fit)$coefficients[1],2); slope <- round( summary(fit)$c...
/someplotinr/figure/01.ScatterPlot/scatterplot.R
no_license
bladrome/bioinfoscripts
R
false
false
490
r
m=read.table("prok_representative.txt",sep="\t"); pdf("1.1.pdf"); x=m[,2]; y=m[,4]; plot(x,y,pch=16, xlab="Genome Size",ylab="Genes"); fit <- lm(y~x); abline( fit,col="blue",lwd=1.8 ); rr <- round( summary(fit)$adj.r.squared,2); intercept <- round( summary(fit)$coefficients[1],2); slope <- round( summary(fit)$c...
# Log execution output of nc2xdftest.R to a file. # Modified from thread: https://stackoverflow.com/questions/7096989 # In a reply by Tommy: https://stackoverflow.com/users/662787/tommy con <- file("nc2xdftest.log") sink(con, append=TRUE) sink(con, append=TRUE, type="message") # This will echo all input and n...
/nc2xdftest_log_wrapper.R
permissive
brianhigh/big-file-types
R
false
false
715
r
# Log execution output of nc2xdftest.R to a file. # Modified from thread: https://stackoverflow.com/questions/7096989 # In a reply by Tommy: https://stackoverflow.com/users/662787/tommy con <- file("nc2xdftest.log") sink(con, append=TRUE) sink(con, append=TRUE, type="message") # This will echo all input and n...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/auxiliary.functions.R \name{print.mlcc.fit} \alias{print.mlcc.fit} \title{Print mlcc.fit class object} \usage{ \method{print}{mlcc.fit}(x, ...) } \arguments{ \item{x}{mlcc.fit class object} \item{...}{Further arguments to be passed to or fro...
/man/print.mlcc.fit.Rd
no_license
psobczyk/varclust
R
false
true
438
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/auxiliary.functions.R \name{print.mlcc.fit} \alias{print.mlcc.fit} \title{Print mlcc.fit class object} \usage{ \method{print}{mlcc.fit}(x, ...) } \arguments{ \item{x}{mlcc.fit class object} \item{...}{Further arguments to be passed to or fro...
\name{residuals.TRMF} \alias{residuals.TRMF} \title{ Extract TRMF residuals } \description{ A function to extract residuals from a trained TRMF object. } \usage{ \method{residuals}{TRMF}(object, ...) } \arguments{ \item{object}{a trained TRMF object.} \item{...}{ignored} } \value{ residuals ...
/man/resid.TRMF.Rd
no_license
cran/TRMF
R
false
false
665
rd
\name{residuals.TRMF} \alias{residuals.TRMF} \title{ Extract TRMF residuals } \description{ A function to extract residuals from a trained TRMF object. } \usage{ \method{residuals}{TRMF}(object, ...) } \arguments{ \item{object}{a trained TRMF object.} \item{...}{ignored} } \value{ residuals ...
library(stepfun) model = commandArgs()[2] out_fname = commandArgs()[3] #title = commandArgs()[4] pdf( out_fname, width=4, height=4, pointsize=10 ) par( mar=c(4,4,1,1) ) datasets = list( c( "Reg. training set", "reg" ), #c( "Encode promoters training set", "pos_enc_proms_chopped" ), ...
/rp_2006_scripts/cdf-plot.r
no_license
jxtx/esperr-genomeresearch-2006
R
false
false
2,685
r
library(stepfun) model = commandArgs()[2] out_fname = commandArgs()[3] #title = commandArgs()[4] pdf( out_fname, width=4, height=4, pointsize=10 ) par( mar=c(4,4,1,1) ) datasets = list( c( "Reg. training set", "reg" ), #c( "Encode promoters training set", "pos_enc_proms_chopped" ), ...
msg_run <- function(...) { message(message_run(...)) } warn_deprecate <- function(...) { warning(warning_deprecate(...)) } warn_run <- function(...) { warning(warning_run(...)) } warn_validate <- function(...) { warning(warning_validate(...)) } throw_cancel <- function(...) { stop(error_cancel(...)) } th...
/R/utils_condition.R
permissive
ian-flores/targets
R
false
false
2,406
r
msg_run <- function(...) { message(message_run(...)) } warn_deprecate <- function(...) { warning(warning_deprecate(...)) } warn_run <- function(...) { warning(warning_run(...)) } warn_validate <- function(...) { warning(warning_validate(...)) } throw_cancel <- function(...) { stop(error_cancel(...)) } th...
source("DataLoader.R") file_6A = "../0921/exp6A/09_21_14_32_22_exp1_ACC.csv" file_88 = "../0921/exp88/01_26_05_05_40_exp1_ACC.csv" expData = readExpData(file_6A,file_88) summary(expData$lacc6A$lv2) #summary(expData$lacc88$lv2) file_6A = "../0921/exp6A/09_21_14_33_06_exp1_ACC.csv" file_88 = "../0921/exp88/01_26_05_06_...
/exp-0922.R
no_license
LeoCai/HandshakeAuth
R
false
false
843
r
source("DataLoader.R") file_6A = "../0921/exp6A/09_21_14_32_22_exp1_ACC.csv" file_88 = "../0921/exp88/01_26_05_05_40_exp1_ACC.csv" expData = readExpData(file_6A,file_88) summary(expData$lacc6A$lv2) #summary(expData$lacc88$lv2) file_6A = "../0921/exp6A/09_21_14_33_06_exp1_ACC.csv" file_88 = "../0921/exp88/01_26_05_06_...
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://www.rstudio.com/shiny/ # # library(shiny) # # shinyServer(function(input, output) { # # output$distPlot <- renderPlot({ # # # generate bins based on input$bins from ...
/server.R
no_license
andyvanyperen/optics-shiny-demo
R
false
false
1,215
r
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://www.rstudio.com/shiny/ # # library(shiny) # # shinyServer(function(input, output) { # # output$distPlot <- renderPlot({ # # # generate bins based on input$bins from ...
\name{bdspots} \alias{bdspots} \docType{data} \title{ Breakdown Spots in Microelectronic Materials } \description{ A list of three point patterns, each giving the locations of electrical breakdown spots on a circular electrode in a microelectronic capacitor. } \usage{data(bdspots)} \format{ A list (of class \...
/man/bdspots.Rd
no_license
benjaminbenwu/spatstat
R
false
false
3,051
rd
\name{bdspots} \alias{bdspots} \docType{data} \title{ Breakdown Spots in Microelectronic Materials } \description{ A list of three point patterns, each giving the locations of electrical breakdown spots on a circular electrode in a microelectronic capacitor. } \usage{data(bdspots)} \format{ A list (of class \...
library(ape) testtree <- read.tree("8333_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="8333_0_unrooted.txt")
/codeml_files/newick_trees_processed/8333_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("8333_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="8333_0_unrooted.txt")
library(MASS) attach(survey) mean(Height) var(Height,na.rm=T) sd(Height,na.rm=T)^2 y = Height quantile(Height,na.rm=T) quantile(Height,0.99,na.rm=T) hist(y) boxplot(y) m.m = mean(Height[Sex=="Male"],na.rm=T) s.m = sd(Height[Sex=="Male"],nar.rm=T) #p = sum (m - s < Height & Height>) #zad* HM = Heig...
/R/ex3.r
no_license
5ko99/FMI-Semester-5
R
false
false
612
r
library(MASS) attach(survey) mean(Height) var(Height,na.rm=T) sd(Height,na.rm=T)^2 y = Height quantile(Height,na.rm=T) quantile(Height,0.99,na.rm=T) hist(y) boxplot(y) m.m = mean(Height[Sex=="Male"],na.rm=T) s.m = sd(Height[Sex=="Male"],nar.rm=T) #p = sum (m - s < Height & Height>) #zad* HM = Heig...
# this script includes descriptive stats and visualizations for the data of the original survey # written by Rotem Botvinik-Nezer ################ # PREPERATIONS # ################ ## Use checkpoint for reproducibility library(checkpoint) checkpoint("2021-06-30") ## Required R package library(ggplot2) library(tidyver...
/code/original_survey_descriptive_and_visualization.R
permissive
rotemb9/election-beliefs-paper
R
false
false
11,130
r
# this script includes descriptive stats and visualizations for the data of the original survey # written by Rotem Botvinik-Nezer ################ # PREPERATIONS # ################ ## Use checkpoint for reproducibility library(checkpoint) checkpoint("2021-06-30") ## Required R package library(ggplot2) library(tidyver...
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = numeric(0), rs = numeric(0), temp = c(2.10105137770205e-289, 2.51923320755117e-267, -8.07635530489862e+229, -1.27430178049131e+162, 5.50859926945353e-311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
/meteor/inst/testfiles/ET0_PenmanMonteith/AFL_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1615841627-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
609
r
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = numeric(0), rs = numeric(0), temp = c(2.10105137770205e-289, 2.51923320755117e-267, -8.07635530489862e+229, -1.27430178049131e+162, 5.50859926945353e-311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
\name{pHoeff} \alias{pHoeff} \title{Hoeffding's D} \description{ Function to approximate the distribution of Hoeffding's D statistic using a Monte Carlo Sample under the null hypothesis. This code follows section 8.6 of Hollander, Wolfe & Chicken, Nonparametric Statistical Methods, 3e. This calls HoeffD, a small b...
/man/pHoeff.Rd
no_license
cran/NSM3
R
false
false
1,050
rd
\name{pHoeff} \alias{pHoeff} \title{Hoeffding's D} \description{ Function to approximate the distribution of Hoeffding's D statistic using a Monte Carlo Sample under the null hypothesis. This code follows section 8.6 of Hollander, Wolfe & Chicken, Nonparametric Statistical Methods, 3e. This calls HoeffD, a small b...
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(dplyr) library(ggplot2) library(hms) library(stringr) library(reshape2) # Defin...
/Projekt_2/lawniczakl/TWD02-Filmy/server.R
no_license
vaidasmo/TechnikiWizualizacjiDanych2017
R
false
false
5,568
r
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(dplyr) library(ggplot2) library(hms) library(stringr) library(reshape2) # Defin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GE_bias.R \name{GE_bias} \alias{GE_bias} \title{GE_bias.R} \usage{ GE_bias(beta_list, cov_list, cov_mat_list, mu_list, HOM_list) } \arguments{ \item{beta_list}{A list of the effect sizes in the true model. Use the order beta_0, beta_G, beta_E...
/man/GE_bias.Rd
no_license
cran/GEint
R
false
true
1,842
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GE_bias.R \name{GE_bias} \alias{GE_bias} \title{GE_bias.R} \usage{ GE_bias(beta_list, cov_list, cov_mat_list, mu_list, HOM_list) } \arguments{ \item{beta_list}{A list of the effect sizes in the true model. Use the order beta_0, beta_G, beta_E...
#------------------------------------------------------------------------------- # Purpose: Output on Radiant #------------------------------------------------------------------------------- radiant_output <- function() { library(radiant) mac_launcher() }
/R/radiant.R
permissive
oliverxchen/text-help
R
false
false
264
r
#------------------------------------------------------------------------------- # Purpose: Output on Radiant #------------------------------------------------------------------------------- radiant_output <- function() { library(radiant) mac_launcher() }
suppressPackageStartupMessages(library(GetoptLong)) GetoptLong("config=s", "configuration R script") library(epic) load_config(config) library(ComplexHeatmap) sample_id = rownames(SAMPLE) n_sample = length(sample_id) ha = HeatmapAnnotation(df = SAMPLE, col = COLOR) cat("general methylation distribution whole geno...
/inst/pipeline/script/general_methylation_distribution.R
no_license
AvinashGupta/epic
R
false
false
3,507
r
suppressPackageStartupMessages(library(GetoptLong)) GetoptLong("config=s", "configuration R script") library(epic) load_config(config) library(ComplexHeatmap) sample_id = rownames(SAMPLE) n_sample = length(sample_id) ha = HeatmapAnnotation(df = SAMPLE, col = COLOR) cat("general methylation distribution whole geno...
save.image(file="~/Documents/Logiciels/R/test.rda") load("~/Documents/Logiciels/R/test.rda") setwd("~/Desktop") getwd() dir()
/5_R_sessions.r
no_license
gdincu/R
R
false
false
142
r
save.image(file="~/Documents/Logiciels/R/test.rda") load("~/Documents/Logiciels/R/test.rda") setwd("~/Desktop") getwd() dir()
library(recommenderlab) library(dplyr) library(plyr) reviews <- readRDS("./data/reviews_filtered2.rds") reviews <- as.data.frame(reviews) reviews <- reviews[!duplicated(reviews[,1:2]),] reviews <- select(reviews, review_userid, product_productid, review_score) realRating <- as(reviews, "realRatingMatrix") set.seed(1)...
/lib/rec_sys.R
no_license
Jewelryland/project4-team1
R
false
false
1,478
r
library(recommenderlab) library(dplyr) library(plyr) reviews <- readRDS("./data/reviews_filtered2.rds") reviews <- as.data.frame(reviews) reviews <- reviews[!duplicated(reviews[,1:2]),] reviews <- select(reviews, review_userid, product_productid, review_score) realRating <- as(reviews, "realRatingMatrix") set.seed(1)...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/fit.mml5.R \name{plhood} \alias{plhood} \title{Pseudo-likelihood for a set of observations of Z_d and Z_a} \usage{ plhood(Z, pars, weights = rep(1, dim(Z)[1]), sumlog = TRUE, C = 1) } \arguments{ \item{Z}{an n x 2 array; Z[i,1], Z[i,2...
/man/plhood.Rd
no_license
chr1swallace/subtest
R
false
false
979
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/fit.mml5.R \name{plhood} \alias{plhood} \title{Pseudo-likelihood for a set of observations of Z_d and Z_a} \usage{ plhood(Z, pars, weights = rep(1, dim(Z)[1]), sumlog = TRUE, C = 1) } \arguments{ \item{Z}{an n x 2 array; Z[i,1], Z[i,2...
library(testthat) library(fars) ## Testing fars_read function test_that("fars_read - Load file", { df_fars_file <- fars_read("accident_2013.csv.bz2") expect_that(df_fars_file, is_a(c("tbl_df", "tbl", "data.frame"))) }) test_that("fars_read - Error Message", { throws_error(fars_read("accident_2013.cs...
/tests/test_fars_functions.R
no_license
TarsoRodriguez/fars
R
false
false
3,916
r
library(testthat) library(fars) ## Testing fars_read function test_that("fars_read - Load file", { df_fars_file <- fars_read("accident_2013.csv.bz2") expect_that(df_fars_file, is_a(c("tbl_df", "tbl", "data.frame"))) }) test_that("fars_read - Error Message", { throws_error(fars_read("accident_2013.cs...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ineq_gra.R \name{ineq_gra} \alias{ineq_gra} \title{Grafica de desigualdades} \usage{ ineq_gra(data_ineq, xlab = NULL, ylab = NULL, leyenda = "Años") } \arguments{ \item{data_ineq}{Data frame o Tibble. Datos obtenidos de la función 'data_proc'...
/man/ineq_gra.Rd
no_license
dantecasg/cdcperineq
R
false
true
677
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ineq_gra.R \name{ineq_gra} \alias{ineq_gra} \title{Grafica de desigualdades} \usage{ ineq_gra(data_ineq, xlab = NULL, ylab = NULL, leyenda = "Años") } \arguments{ \item{data_ineq}{Data frame o Tibble. Datos obtenidos de la función 'data_proc'...
Step2plus_Celltype_marker_inference_new_LowReso<-function(tg_R1_lists,data_CORS_cancer,tg_R1_cut=8,tg_R1_list_stat,cell_type_enrich_cut=0.5,resolution_level=resolution_level0,hcutn0=40) { #have two sets of parameters for BCV t tests #1. For testing total rank and determining adding the base of a new cel...
/R/temp_func2.r
permissive
changwn/ICTD
R
false
false
11,482
r
Step2plus_Celltype_marker_inference_new_LowReso<-function(tg_R1_lists,data_CORS_cancer,tg_R1_cut=8,tg_R1_list_stat,cell_type_enrich_cut=0.5,resolution_level=resolution_level0,hcutn0=40) { #have two sets of parameters for BCV t tests #1. For testing total rank and determining adding the base of a new cel...
context("pm 24h caaq") annual_values <- readRDS("annual_98_percentiles.rds") annual_values <- annual_values[annual_values$use, ] annual_values_one_id <- annual_values[annual_values$id == "a", ] test_that("Is a data frame", { expect_is(pm_24h_caaq(annual_values, year = "year", val = "ann_98_percentile", ...
/tests/testthat/test-pm_24hr_caaq.R
permissive
lselzer/rcaaqs
R
false
false
2,478
r
context("pm 24h caaq") annual_values <- readRDS("annual_98_percentiles.rds") annual_values <- annual_values[annual_values$use, ] annual_values_one_id <- annual_values[annual_values$id == "a", ] test_that("Is a data frame", { expect_is(pm_24h_caaq(annual_values, year = "year", val = "ann_98_percentile", ...
# special case: the matrix can have no row names make_comb_mat_from_matrix = function(x, mode, top_n_sets = Inf, min_set_size = -Inf, universal_set = NULL, complement_size = NULL, set_on_rows = TRUE) { # check whether x is a binary matrix if(is.data.frame(x)) { lc = sapply(x, function(x) { if(is.numeric(x)) ...
/R/Upset.R
permissive
j3gu/ComplexHeatmap
R
false
false
48,429
r
# special case: the matrix can have no row names make_comb_mat_from_matrix = function(x, mode, top_n_sets = Inf, min_set_size = -Inf, universal_set = NULL, complement_size = NULL, set_on_rows = TRUE) { # check whether x is a binary matrix if(is.data.frame(x)) { lc = sapply(x, function(x) { if(is.numeric(x)) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/visTree.R \name{visTreeEditor} \alias{visTreeEditor} \title{Run and edit a visTree, and get back in R} \usage{ visTreeEditor(data, ...) } \arguments{ \item{data}{\code{rpart or data.drame}} \item{...}{all arguments except \code{ob...
/man/visTreeEditor.Rd
no_license
42-Discworld/visNetwork
R
false
true
861
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/visTree.R \name{visTreeEditor} \alias{visTreeEditor} \title{Run and edit a visTree, and get back in R} \usage{ visTreeEditor(data, ...) } \arguments{ \item{data}{\code{rpart or data.drame}} \item{...}{all arguments except \code{ob...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rds_operations.R \name{rds_describe_events} \alias{rds_describe_events} \title{Returns events related to DB instances, DB security groups, DB snapshots, and DB parameter groups for the past 14 days} \usage{ rds_describe_events(SourceIdentifie...
/paws/man/rds_describe_events.Rd
permissive
peoplecure/paws
R
false
true
3,437
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rds_operations.R \name{rds_describe_events} \alias{rds_describe_events} \title{Returns events related to DB instances, DB security groups, DB snapshots, and DB parameter groups for the past 14 days} \usage{ rds_describe_events(SourceIdentifie...
\docType{class} \name{displ} \alias{displ} \alias{displ-class} \title{Maximum likelihood estimation of the discrete power law distribution.} \arguments{ \item{x}{data vector} \item{xmin}{Lower bound of the power-law distribution. For the continuous power-law, xmin >= 0 for the discrete distribution, xmin >0} ...
/man/displ.Rd
no_license
kikko1978/poweRlaw
R
false
false
761
rd
\docType{class} \name{displ} \alias{displ} \alias{displ-class} \title{Maximum likelihood estimation of the discrete power law distribution.} \arguments{ \item{x}{data vector} \item{xmin}{Lower bound of the power-law distribution. For the continuous power-law, xmin >= 0 for the discrete distribution, xmin >0} ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/shiny-utils.R \name{shiny-view-colors} \alias{shiny-view-colors} \alias{colors_rect} \title{Create rectangles in HTML to display colors} \usage{ colors_rect(colors, width = "100\%", height = "45px") } \arguments{ \item{colors}{A vector of col...
/man/shiny-view-colors.Rd
no_license
R-forks-to-learn/colorscale
R
false
true
886
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/shiny-utils.R \name{shiny-view-colors} \alias{shiny-view-colors} \alias{colors_rect} \title{Create rectangles in HTML to display colors} \usage{ colors_rect(colors, width = "100\%", height = "45px") } \arguments{ \item{colors}{A vector of col...
library(dplyr) library(tm) library(tidytext) library(xlsx) library(wordcloud) load("motive_tidy.rda") motive_tidy m1970 <- motive_tidy %>% filter(year == 1970) %>% group_by(term) %>% summarize(count = n()) %>% arrange(desc(count)) wordcloud(m1970$term, m1970$count, max.words = 100, colors = "red") # wordcloud for ye...
/pedro_sourcecode.R
no_license
Columbia-University-QMSS/final-project-team-18
R
false
false
1,247
r
library(dplyr) library(tm) library(tidytext) library(xlsx) library(wordcloud) load("motive_tidy.rda") motive_tidy m1970 <- motive_tidy %>% filter(year == 1970) %>% group_by(term) %>% summarize(count = n()) %>% arrange(desc(count)) wordcloud(m1970$term, m1970$count, max.words = 100, colors = "red") # wordcloud for ye...
####Geographically Weighted Regression #Let's say you are continuing with #your data from the regression analysis. #The first thing you need to do is to add the #polygon coordinates to the spatialpolygondataframe. #You can obtain the coordinates using the #"coordinates" function from the sp library income.tr...
/gwrCensus.R
no_license
Kharnadek/final418
R
false
false
2,028
r
####Geographically Weighted Regression #Let's say you are continuing with #your data from the regression analysis. #The first thing you need to do is to add the #polygon coordinates to the spatialpolygondataframe. #You can obtain the coordinates using the #"coordinates" function from the sp library income.tr...
############################## # AIL ############################## bgcolor <- broman::brocolors("bg") color <- broman::brocolors("crayons")[c("Cornflower", "Blush")] n.lines <- 80 pdf("../Figs/ail.pdf", width=9.75, height=5, pointsize=16, onefile=TRUE) par(mar=rep(0.1,4),las=1,fg="white",col="white",col.axis="white"...
/R/ail_fig.R
permissive
kbroman/Talk_Rstudio2019
R
false
false
5,324
r
############################## # AIL ############################## bgcolor <- broman::brocolors("bg") color <- broman::brocolors("crayons")[c("Cornflower", "Blush")] n.lines <- 80 pdf("../Figs/ail.pdf", width=9.75, height=5, pointsize=16, onefile=TRUE) par(mar=rep(0.1,4),las=1,fg="white",col="white",col.axis="white"...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/homologene.R \docType{data} \name{homologeneData} \alias{homologeneData} \title{homologeneData} \format{An object of class \code{data.frame} with 275237 rows and 4 columns.} \usage{ homologeneData } \description{ List of gene homologues used ...
/man/homologeneData.Rd
permissive
jimhester/homologene
R
false
true
365
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/homologene.R \docType{data} \name{homologeneData} \alias{homologeneData} \title{homologeneData} \format{An object of class \code{data.frame} with 275237 rows and 4 columns.} \usage{ homologeneData } \description{ List of gene homologues used ...
#' Single-Lag Hypothesis Test #' #' `single_lag_test` Computes the single-lag hypothesis test at a single user-specified lag. #' #' @param f_data The functional data matrix with observed functions in the columns #' @param lag Positive integer value. The lag to use to compute the single lag test statistic. #' @param alp...
/R/main_tests.R
no_license
cran/wwntests
R
false
false
19,471
r
#' Single-Lag Hypothesis Test #' #' `single_lag_test` Computes the single-lag hypothesis test at a single user-specified lag. #' #' @param f_data The functional data matrix with observed functions in the columns #' @param lag Positive integer value. The lag to use to compute the single lag test statistic. #' @param alp...
# This script creates scatterplots and boxplots from the Collaborative Cross founder # and F1 survey data in Mouse Phenome Database at # http://phenome.jax.org/db/q?rtn=projects/details&id=439 # Sue McClatchy # created 2015-06-14 # modified 2015-10-24 simplified by saving plots to a variable library(ggplot2) cc <- r...
/scatter-boxplot.R
no_license
smcclatchy/R-graphics
R
false
false
5,798
r
# This script creates scatterplots and boxplots from the Collaborative Cross founder # and F1 survey data in Mouse Phenome Database at # http://phenome.jax.org/db/q?rtn=projects/details&id=439 # Sue McClatchy # created 2015-06-14 # modified 2015-10-24 simplified by saving plots to a variable library(ggplot2) cc <- r...
library(shiny) #------------------------------------------------------------------------------ shinyUI( ## Barra de navegacion navbarPage("GoTSeason6", ## Panel 1 tabPanel(" Data Input", sidebarLayout( ...
/ui.R
no_license
andreu27/shiny_SEAST
R
false
false
2,466
r
library(shiny) #------------------------------------------------------------------------------ shinyUI( ## Barra de navegacion navbarPage("GoTSeason6", ## Panel 1 tabPanel(" Data Input", sidebarLayout( ...
# Calculating the inverse of a matrix can be a costly computation, so # it can be worthwhile to cache the inverse of a matrix rather than compute it # each time it is needed. # The two functions below cache a matrix inverse. ## makeCacheMatrix: a function that creates a matrix object and caches its inverse ## cache...
/cachematrix.R
no_license
joseph-r-taylor/ProgrammingAssignment2
R
false
false
1,949
r
# Calculating the inverse of a matrix can be a costly computation, so # it can be worthwhile to cache the inverse of a matrix rather than compute it # each time it is needed. # The two functions below cache a matrix inverse. ## makeCacheMatrix: a function that creates a matrix object and caches its inverse ## cache...
RobustScores <- function(IATdata, P1 = c("none", "fxtrim", "fxwins", "trim10", "wins10", "inve10"), P2 = c("ignore", "exclude", "recode", "separate", "recode600"), P3 = c("dsco...
/IATscores/R/RobustScores.R
no_license
ingted/R-Examples
R
false
false
4,194
r
RobustScores <- function(IATdata, P1 = c("none", "fxtrim", "fxwins", "trim10", "wins10", "inve10"), P2 = c("ignore", "exclude", "recode", "separate", "recode600"), P3 = c("dsco...
library(gamlss) ### Name: rvcov ### Title: Robust Variance-Covariance matrix of the parameters from a ### fitted GAMLSS model ### Aliases: rvcov get.K ### Keywords: regression ### ** Examples # gererate from a gamma distribution Y <- rGA(200, mu=1, sigma=2) hist(Y) # fitting the wrong model i.e. sigma=1 m1 <- g...
/data/genthat_extracted_code/gamlss/examples/rvcov.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
640
r
library(gamlss) ### Name: rvcov ### Title: Robust Variance-Covariance matrix of the parameters from a ### fitted GAMLSS model ### Aliases: rvcov get.K ### Keywords: regression ### ** Examples # gererate from a gamma distribution Y <- rGA(200, mu=1, sigma=2) hist(Y) # fitting the wrong model i.e. sigma=1 m1 <- g...
context("plotResiduals") test_that("plotResiduals with prediction object", { learner = makeLearner("regr.rpart") mod = train(learner, regr.task) preds = predict(mod, regr.task) plotResiduals(preds) dir = tempdir() path = paste0(dir, "/test.svg") ggsave(path) doc = XML::xmlParse(path) # points ex...
/tests/testthat/test_base_plotResiduals.R
no_license
albert3858/mlr
R
false
false
2,012
r
context("plotResiduals") test_that("plotResiduals with prediction object", { learner = makeLearner("regr.rpart") mod = train(learner, regr.task) preds = predict(mod, regr.task) plotResiduals(preds) dir = tempdir() path = paste0(dir, "/test.svg") ggsave(path) doc = XML::xmlParse(path) # points ex...
library(devtools) library(woe) library(ggplot2) library(caTools) library(dplyr) library(nnet) library(e1071) train_data = read.csv("C:\\machine_learning\\train.csv",na.strings = '') test_data = read.csv("C:\\machine_learning\\test_users.csv",na.strings = '') session=read.csv("C:\\machine_learning\\sessions...
/AirBnB Classification Final code.R
no_license
manishnanwani/AirBnb-Destination-Country-Prediction
R
false
false
12,783
r
library(devtools) library(woe) library(ggplot2) library(caTools) library(dplyr) library(nnet) library(e1071) train_data = read.csv("C:\\machine_learning\\train.csv",na.strings = '') test_data = read.csv("C:\\machine_learning\\test_users.csv",na.strings = '') session=read.csv("C:\\machine_learning\\sessions...