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
# library(yaml) l <- yaml.load_file("tree1.yaml") library(data.tree) jl <- as.Node(l) #Plotting library(igraph) library(ape) jl$Revert() jlp <- as.phylo(jl) library(igraph) G <- graph.tree(n=13,children=2) # let's print it using a tree-specific layout # (N.B. you must specify the root node) co <- layout.reingold.til...
/teksti/shiny_tree.R
no_license
hrmJ/matkakertomukset
R
false
false
3,051
r
# library(yaml) l <- yaml.load_file("tree1.yaml") library(data.tree) jl <- as.Node(l) #Plotting library(igraph) library(ape) jl$Revert() jlp <- as.phylo(jl) library(igraph) G <- graph.tree(n=13,children=2) # let's print it using a tree-specific layout # (N.B. you must specify the root node) co <- layout.reingold.til...
#' Retrieval functions for USGS data #' #' \tabular{ll}{ #' Package: \tab USGSwsDataRetrieval\cr #' Type: \tab Package\cr #' Version: \tab 0.0.0\cr #' Date: \tab 2014-07-03\cr #' License: \tab Unlimited for this package, dependencies have more restrictive licensing.\cr #' Copyright: \tab This software is in the public ...
/R/USGSwsDataRetrieval.R
permissive
wcdamsch/USGSwsDataRetrieval
R
false
false
1,150
r
#' Retrieval functions for USGS data #' #' \tabular{ll}{ #' Package: \tab USGSwsDataRetrieval\cr #' Type: \tab Package\cr #' Version: \tab 0.0.0\cr #' Date: \tab 2014-07-03\cr #' License: \tab Unlimited for this package, dependencies have more restrictive licensing.\cr #' Copyright: \tab This software is in the public ...
rm(list=ls()) subtype <- "~/GDAN/fpkm-uq/TCGA-BRCA/BRCA_subtype.txt" geneannot_file <- "~/GDAN/scripts/geneannot.rds" outdir <- "~/GDAN//fpkm-uq/TCGA-BRCA/output/" active_file_rds <- paste(outdir,"active.rds",sep="") legacy_file_rds <- paste(outdir,"legacy.rds",sep="") merged_file_rds <- paste(outdir,"merged_...
/tcga_brca_2.R
no_license
joelsparker1/gdan_rna_qc
R
false
false
2,140
r
rm(list=ls()) subtype <- "~/GDAN/fpkm-uq/TCGA-BRCA/BRCA_subtype.txt" geneannot_file <- "~/GDAN/scripts/geneannot.rds" outdir <- "~/GDAN//fpkm-uq/TCGA-BRCA/output/" active_file_rds <- paste(outdir,"active.rds",sep="") legacy_file_rds <- paste(outdir,"legacy.rds",sep="") merged_file_rds <- paste(outdir,"merged_...
\alias{gtkRecentInfoGetDescription} \name{gtkRecentInfoGetDescription} \title{gtkRecentInfoGetDescription} \description{Gets the (short) description of the resource.} \usage{gtkRecentInfoGetDescription(object)} \arguments{\item{\code{object}}{[\code{\link{GtkRecentInfo}}] a \code{\link{GtkRecentInfo}}}} \details{ Sin...
/man/gtkRecentInfoGetDescription.Rd
no_license
cran/RGtk2.10
R
false
false
455
rd
\alias{gtkRecentInfoGetDescription} \name{gtkRecentInfoGetDescription} \title{gtkRecentInfoGetDescription} \description{Gets the (short) description of the resource.} \usage{gtkRecentInfoGetDescription(object)} \arguments{\item{\code{object}}{[\code{\link{GtkRecentInfo}}] a \code{\link{GtkRecentInfo}}}} \details{ Sin...
#' Dupla Sena lottery game probability #' #' Does the ticket have 50 tens, in which the bettor can? dial from 6 to 15 numbers, #' consists of extracting 6 different numbers, you can win by hitting 3, 4, 5 or #' 6 numbers, with a differential, the player has two chances to win. #' #' To choose 6 numbers, the bet is simp...
/R/ProbDSena.R
permissive
farias741/Lotto
R
false
false
1,361
r
#' Dupla Sena lottery game probability #' #' Does the ticket have 50 tens, in which the bettor can? dial from 6 to 15 numbers, #' consists of extracting 6 different numbers, you can win by hitting 3, 4, 5 or #' 6 numbers, with a differential, the player has two chances to win. #' #' To choose 6 numbers, the bet is simp...
# connectivity with macrobond, try around when you get a chance # https://help.macrobond.com/add-ins/the-macrobond-api-for-r/
/Macrobond.R
no_license
mustang115/Rsetup
R
false
false
126
r
# connectivity with macrobond, try around when you get a chance # https://help.macrobond.com/add-ins/the-macrobond-api-for-r/
# setup temp folders --------------------------- temp_folder <- tempdir() dir2 <- file.path(temp_folder, "tmp2") dir3 <- file.path(temp_folder, "tmp3") setup({ dir.create(dir2) dir.create(dir3) }) teardown({ unlink(dir2, recursive = TRUE) unlink(dir3, recursive = TRUE) }) p1 <- ".." rr <- sample(1:29, 4) # g...
/tests/testthat/test-nfFileCreation.R
no_license
rabutler-usbr/CRSSIO
R
false
false
7,342
r
# setup temp folders --------------------------- temp_folder <- tempdir() dir2 <- file.path(temp_folder, "tmp2") dir3 <- file.path(temp_folder, "tmp3") setup({ dir.create(dir2) dir.create(dir3) }) teardown({ unlink(dir2, recursive = TRUE) unlink(dir3, recursive = TRUE) }) p1 <- ".." rr <- sample(1:29, 4) # g...
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Build and Reload Package: 'Ctrl + Shift + B' # Check Package: ...
/R/hello.R
no_license
jimmywle/tsoutlier
R
false
false
401
r
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Build and Reload Package: 'Ctrl + Shift + B' # Check Package: ...
\name{midint} \alias{midint} \title{ Calculation of the middle of time interval } \description{ Calculates the middle of observing time interval for a given visual meteor dataset. } \usage{ midint(data) } \arguments{ \item{data}{ data frame consisting of visual meteor data (rate or magnitude data). } } ...
/man/midint.Rd
no_license
cran/MetFns
R
false
false
885
rd
\name{midint} \alias{midint} \title{ Calculation of the middle of time interval } \description{ Calculates the middle of observing time interval for a given visual meteor dataset. } \usage{ midint(data) } \arguments{ \item{data}{ data frame consisting of visual meteor data (rate or magnitude data). } } ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Misc_Exported.R \name{setup} \alias{setup} \title{Setup parallel processing} \usage{ setup(cpus = parallel::detectCores() * 0.5, ...) } \arguments{ \item{cpus}{number of CPUs} \item{...}{other arguments passed to 'snowfall::sfInit'} } \descr...
/man/setup.Rd
no_license
DLMtool/DLMtool
R
false
true
488
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Misc_Exported.R \name{setup} \alias{setup} \title{Setup parallel processing} \usage{ setup(cpus = parallel::detectCores() * 0.5, ...) } \arguments{ \item{cpus}{number of CPUs} \item{...}{other arguments passed to 'snowfall::sfInit'} } \descr...
#' IOHexperimenter-based wrapper #' #' For easier use with the IOHexperimenter #' #' @rdname random_search #' @param IOHproblem An IOHproblem object #' #' @export #' @examples #' \donttest{ #' benchmark_algorithm(IOH_random_search, data.dir = NULL) #' } IOH_random_search <- function(IOHproblem, budget = NULL) { if...
/build/R/R/Algorithms.R
permissive
nojhan/IOHexperimenter
R
false
false
9,877
r
#' IOHexperimenter-based wrapper #' #' For easier use with the IOHexperimenter #' #' @rdname random_search #' @param IOHproblem An IOHproblem object #' #' @export #' @examples #' \donttest{ #' benchmark_algorithm(IOH_random_search, data.dir = NULL) #' } IOH_random_search <- function(IOHproblem, budget = NULL) { if...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gh3.R \name{gh_gists_get} \alias{gh_gists_get} \title{List the authenticated user's gists or if called anonymously, this will} \usage{ gh_gists_get(...) } \arguments{ \item{...}{Additional parameters to pass to \code{\link[gh]{gh}}. See detai...
/man/gh_gists_get.Rd
permissive
ramnathv/gh3
R
false
true
589
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gh3.R \name{gh_gists_get} \alias{gh_gists_get} \title{List the authenticated user's gists or if called anonymously, this will} \usage{ gh_gists_get(...) } \arguments{ \item{...}{Additional parameters to pass to \code{\link[gh]{gh}}. See detai...
if(!exists("NEI")){ NEI <- readRDS("C:\\Users\\winchesters\\Desktop\\coursera\\exploratory\\summarySCC_PM25.rds") } if(!exists("SCC")){ SCC <- readRDS("C:\\Users\\winchesters\\Desktop\\coursera\\exploratory\\Source_Classification_Code.rds") } TotalEmissionPerYear <- aggregate(Emissions ~ year, NEI,sum) p...
/Plot1.R
no_license
sahil411/Exploratory_analysis2
R
false
false
599
r
if(!exists("NEI")){ NEI <- readRDS("C:\\Users\\winchesters\\Desktop\\coursera\\exploratory\\summarySCC_PM25.rds") } if(!exists("SCC")){ SCC <- readRDS("C:\\Users\\winchesters\\Desktop\\coursera\\exploratory\\Source_Classification_Code.rds") } TotalEmissionPerYear <- aggregate(Emissions ~ year, NEI,sum) p...
#' Simulation of Synthetic Populations for Survey Data #' Considering Auxiliary Information #' #' The production of synthetic datasets has been proposed as a #' statistical disclosure control solution to generate public use #' files out of protected data, and as a tool to #' create ``augmented datasets'' to serve a...
/R/simPop-package.R
no_license
statistikat/simPop
R
false
false
5,083
r
#' Simulation of Synthetic Populations for Survey Data #' Considering Auxiliary Information #' #' The production of synthetic datasets has been proposed as a #' statistical disclosure control solution to generate public use #' files out of protected data, and as a tool to #' create ``augmented datasets'' to serve a...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggthemes_data.R \docType{data} \name{ggthemes_data} \alias{ggthemes_data} \title{Palette and theme data} \format{A \code{list} object.} \usage{ ggthemes_data } \description{ The \code{ggthemes} environment contains various values used in them...
/man/ggthemes_data.Rd
no_license
d2squared/ggthemes
R
false
true
402
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggthemes_data.R \docType{data} \name{ggthemes_data} \alias{ggthemes_data} \title{Palette and theme data} \format{A \code{list} object.} \usage{ ggthemes_data } \description{ The \code{ggthemes} environment contains various values used in them...
file <- file('./household_power_consumption.txt') data <- read.table(text = grep("^[1,2]/2/2007",readLines(file),value=TRUE), sep = ';', col.names = c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3"), na.strings = '?') ...
/plot4.R
no_license
pam-wichit/ExData_Plotting1
R
false
false
1,224
r
file <- file('./household_power_consumption.txt') data <- read.table(text = grep("^[1,2]/2/2007",readLines(file),value=TRUE), sep = ';', col.names = c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3"), na.strings = '?') ...
#please change the address before excution! Thank You:) data <- read.csv("G:/subjects/statistics and probabilities/HW4/movie_metadata.csv") correctData <- function(data){ data <- na.omit(data) color <- vector("numeric") # assign 1 for colory and assign 0 for black and white to make the comparison possible!:) f...
/Assignments/Assignment4/Practical Solution/IMDB.R
no_license
Ashkan-Soleymani98/ProbabilityStatistics---Fall2017-2018
R
false
false
4,061
r
#please change the address before excution! Thank You:) data <- read.csv("G:/subjects/statistics and probabilities/HW4/movie_metadata.csv") correctData <- function(data){ data <- na.omit(data) color <- vector("numeric") # assign 1 for colory and assign 0 for black and white to make the comparison possible!:) f...
library(ape) testtree <- read.tree("2999_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2999_0_unrooted.txt")
/codeml_files/newick_trees_processed/2999_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("2999_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2999_0_unrooted.txt")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fun.list.rw.R \name{make.robust} \alias{make.robust} \title{Add a vague componenet to mixture model to make robust} \usage{ make.robust(object, weight) } \arguments{ \item{object}{mixture.prior to update} \item{weight}{weight of vague compon...
/StudyPrior/man/make.robust.Rd
no_license
igrave/StudyPrior
R
false
true
491
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fun.list.rw.R \name{make.robust} \alias{make.robust} \title{Add a vague componenet to mixture model to make robust} \usage{ make.robust(object, weight) } \arguments{ \item{object}{mixture.prior to update} \item{weight}{weight of vague compon...
# Required data ---------------------------------------------------------------------------------------------------------------------- data("dataHigherMoments") # Formula transformations ------------------------------------------------------------------------------------------------------------ context("Correctness - ...
/tests/testthat/test-correctness_highermoments.R
no_license
mmeierer/REndo
R
false
false
4,104
r
# Required data ---------------------------------------------------------------------------------------------------------------------- data("dataHigherMoments") # Formula transformations ------------------------------------------------------------------------------------------------------------ context("Correctness - ...
M = cor(mtcars) (order.AOE = corrMatOrder(M, order = 'AOE')) (order.FPC = corrMatOrder(M, order = 'FPC')) (order.hc = corrMatOrder(M, order = 'hclust')) (order.hc2 = corrMatOrder(M, order = 'hclust', hclust.method = 'ward.D')) M.AOE = M[order.AOE,order.AOE] M.FPC = M[order.FPC,order.FPC] M.hc = M[order.hc, order.hc]...
/vignettes/example-corrMatOrder.R
permissive
ZhangYet/corrplot
R
false
false
600
r
M = cor(mtcars) (order.AOE = corrMatOrder(M, order = 'AOE')) (order.FPC = corrMatOrder(M, order = 'FPC')) (order.hc = corrMatOrder(M, order = 'hclust')) (order.hc2 = corrMatOrder(M, order = 'hclust', hclust.method = 'ward.D')) M.AOE = M[order.AOE,order.AOE] M.FPC = M[order.FPC,order.FPC] M.hc = M[order.hc, order.hc]...
# # test filtering via factors # setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') factorfilter <- function(conn){ Log.info('uploading ddply testing dataset') df.h <- h2o.importFile(conn, normalizePath(locate('smalldata/jira/pub-180.csv'))) Log.info('printing fr...
/h2o-r/tests/testdir_jira/runit_pub_168_dfpredicates.R
permissive
mrgloom/h2o-3
R
false
false
1,780
r
# # test filtering via factors # setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source('../h2o-runit.R') factorfilter <- function(conn){ Log.info('uploading ddply testing dataset') df.h <- h2o.importFile(conn, normalizePath(locate('smalldata/jira/pub-180.csv'))) Log.info('printing fr...
library(ape) testtree <- read.tree("3924_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="3924_0_unrooted.txt")
/codeml_files/newick_trees_processed/3924_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("3924_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="3924_0_unrooted.txt")
#A script to calculate similarity scores for gene expression library(proxy) setwd('Documents/public-datasets/TCGA/expressionData/Expression-Genes/UNC__AgilentG4502A_07_1/') source('~/Documents/Rscripts/120518-initialize.R') geneMatrix = read.delim('~/Documents/public-datasets/TCGA/expressionData/Expression-Genes/UNC__...
/PhD/120813-GeneExpressionSignature.R
no_license
dvbrown/Rscripts
R
false
false
2,203
r
#A script to calculate similarity scores for gene expression library(proxy) setwd('Documents/public-datasets/TCGA/expressionData/Expression-Genes/UNC__AgilentG4502A_07_1/') source('~/Documents/Rscripts/120518-initialize.R') geneMatrix = read.delim('~/Documents/public-datasets/TCGA/expressionData/Expression-Genes/UNC__...
rm(list=ls()) library(MASS) library(far) # remotes::install_github("isglobal-brge/mgcca") library(curatedTCGAData) library(TCGAutils) # Libraries needed by mgcca package library(MultiAssayExperiment) library(RSpectra) library(impute) # Benchmark library(microbenchmark) library(mgcca) fsim <- function(n, p, q, pro...
/simulations/case2/simulate2.R
permissive
isglobal-brge/paperGCCA
R
false
false
4,361
r
rm(list=ls()) library(MASS) library(far) # remotes::install_github("isglobal-brge/mgcca") library(curatedTCGAData) library(TCGAutils) # Libraries needed by mgcca package library(MultiAssayExperiment) library(RSpectra) library(impute) # Benchmark library(microbenchmark) library(mgcca) fsim <- function(n, p, q, pro...
if(getRversion() >= "3.1.0") { utils::globalVariables( c( '.', 'loc_lat', 'loc_lng', 'stop_id', 'stop_lat', 'stop_lon', 'stop_name', 'trip_id' ) ) }
/R/globals.R
no_license
r-transit/transitfeedr
R
false
false
208
r
if(getRversion() >= "3.1.0") { utils::globalVariables( c( '.', 'loc_lat', 'loc_lng', 'stop_id', 'stop_lat', 'stop_lon', 'stop_name', 'trip_id' ) ) }
library(dplyr) library(ggplot2) #to set outputs in english Sys.setlocale("LC_ALL", "en_US") #reading in temp file temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip", temp) data <- read.csv(unz(temp, "activity.csv"), stringsAsFactors = F) data$date <- as.Date(data$...
/PA1_script.R
no_license
andreluna15/reproducible_research
R
false
false
2,395
r
library(dplyr) library(ggplot2) #to set outputs in english Sys.setlocale("LC_ALL", "en_US") #reading in temp file temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip", temp) data <- read.csv(unz(temp, "activity.csv"), stringsAsFactors = F) data$date <- as.Date(data$...
#' Plot the biotracer data with one biplot for each combination of 2 biotracers #' #' @inheritParams plot_data #' #' @import ggplot2 #' #' @keywords internal #' @noRd plot_biotracer_data <- function(biotracer_data, save=FALSE, save_path){ # If the biotracer data contains 3 elements called d13C, d15N and ...
/R/plot.R
no_license
cran/EcoDiet
R
false
false
28,694
r
#' Plot the biotracer data with one biplot for each combination of 2 biotracers #' #' @inheritParams plot_data #' #' @import ggplot2 #' #' @keywords internal #' @noRd plot_biotracer_data <- function(biotracer_data, save=FALSE, save_path){ # If the biotracer data contains 3 elements called d13C, d15N and ...
#week4 finalExcersie #Jorge Balderas #You should create one R script called run_analysis.R that does the following. #Merges the training and the test sets to create one data set. #Extracts only the measurements on the mean and standard deviation for each measurement. #Uses descriptive activity names to name the ac...
/run_analysis.R
no_license
Jgbalderasa/Getting-and-Cleaning-Data-Course-Project
R
false
false
2,784
r
#week4 finalExcersie #Jorge Balderas #You should create one R script called run_analysis.R that does the following. #Merges the training and the test sets to create one data set. #Extracts only the measurements on the mean and standard deviation for each measurement. #Uses descriptive activity names to name the ac...
#' Dependency Summary (Console Output) #' #' This function gives a summary of the dependency structure of a given package #' and points out opportunities to eliminate depdendencies completely. The default #' assumption is that there is an R package in the current working #' directory and that the dependencies to be ana...
/R/dstr.R
no_license
iagomosqueira/dstr
R
false
false
6,688
r
#' Dependency Summary (Console Output) #' #' This function gives a summary of the dependency structure of a given package #' and points out opportunities to eliminate depdendencies completely. The default #' assumption is that there is an R package in the current working #' directory and that the dependencies to be ana...
# This module create investment return series. gen_returns <- function( sim_paramlist_ = sim_paramlist, Global_paramlist_ = Global_paramlist, returnScenarios_ = returnScenarios ){ ## Unquote for development # sim_paramlist_ = sim_para...
/model/simulation/model_sim_invReturns.R
no_license
yimengyin16/model_SJ
R
false
false
1,634
r
# This module create investment return series. gen_returns <- function( sim_paramlist_ = sim_paramlist, Global_paramlist_ = Global_paramlist, returnScenarios_ = returnScenarios ){ ## Unquote for development # sim_paramlist_ = sim_para...
############################################################## # seperate and total variance # ############################################################## variance<-function(){ varmat<-matrix(0,10,6) colnames(varmat)<-c("variance1-200","variance201-400", "variance...
/variance.R
no_license
TANKERS888/COMP396
R
false
false
1,037
r
############################################################## # seperate and total variance # ############################################################## variance<-function(){ varmat<-matrix(0,10,6) colnames(varmat)<-c("variance1-200","variance201-400", "variance...
unzipFile <- "household_power_consumption.txt" downloadFile <- "household_power_consumption.zip" downloadLink <- "https://d396qusza40orc.cloudfront.net/exdata/data/household_power_consumption.zip" plot3 <- function(){ ## Check if dataset file has already been unzipped if(!file.exists(unzipFile)){ ## Che...
/plot3.R
no_license
Vichar-Dev/ExData_Plotting1
R
false
false
1,951
r
unzipFile <- "household_power_consumption.txt" downloadFile <- "household_power_consumption.zip" downloadLink <- "https://d396qusza40orc.cloudfront.net/exdata/data/household_power_consumption.zip" plot3 <- function(){ ## Check if dataset file has already been unzipped if(!file.exists(unzipFile)){ ## Che...
\name{founder.event} \alias{founder.event} \title{Simulation of a founder event} \usage{ founder.event(p0=0.5,Ne=1000,Nf=10,ttime=100,etime=50,show="p") } \arguments{ \item{p0}{Starting frequency for the A allele.} \item{Ne}{Effective population size at the start of the simulation and after the founding event.} \it...
/man/founder.event.Rd
no_license
jmallon/PopGen
R
false
false
1,076
rd
\name{founder.event} \alias{founder.event} \title{Simulation of a founder event} \usage{ founder.event(p0=0.5,Ne=1000,Nf=10,ttime=100,etime=50,show="p") } \arguments{ \item{p0}{Starting frequency for the A allele.} \item{Ne}{Effective population size at the start of the simulation and after the founding event.} \it...
Geocode_Combined<-function(tidy_tracks,stormvalue,cname){ tryCatch ( { CountryMap = ggmap(get_googlemap(center=as.numeric(geocode(cname)), scale=2, zoom=4), extent="normal") }, warning = function(w) { message("Failure to fetch geo-location. Try again ") message(w) return(NULL) }, ...
/R/geocode - clubbed.R
no_license
vanita1/Hurricane1
R
false
false
3,944
r
Geocode_Combined<-function(tidy_tracks,stormvalue,cname){ tryCatch ( { CountryMap = ggmap(get_googlemap(center=as.numeric(geocode(cname)), scale=2, zoom=4), extent="normal") }, warning = function(w) { message("Failure to fetch geo-location. Try again ") message(w) return(NULL) }, ...
weld_bmillion <- function(filename){ lines <- readLines(filename) lines <- gsub("([0-9]) ([bm]illion)", "\\1~\\2", lines) writeLines(lines, filename) }
/R/weld_bmillion.R
permissive
grattaninstitute/Cost-overruns-report
R
false
false
159
r
weld_bmillion <- function(filename){ lines <- readLines(filename) lines <- gsub("([0-9]) ([bm]illion)", "\\1~\\2", lines) writeLines(lines, filename) }
#install and load plotrix-package / neccessary to use pyramid.plot install.packages("plotrix") library("plotrix") #function to calculate relative frequencies in % table for variable k with l different characteristics frequency = function(k, l){ if (missing(k)) stop("No data passed to the function. Va...
/SPLFreqPlot/SPLFreqPlot.R
no_license
maxr91/SPLUnionWageEffects
R
false
false
4,179
r
#install and load plotrix-package / neccessary to use pyramid.plot install.packages("plotrix") library("plotrix") #function to calculate relative frequencies in % table for variable k with l different characteristics frequency = function(k, l){ if (missing(k)) stop("No data passed to the function. Va...
## ---------------------------------------------------------------------- ## ## IGraph R package ## Copyright (C) 2005-2014 Gabor Csardi <csardi.gabor@gmail.com> ## 334 Harvard street, Cambridge, MA 02139 USA ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of...
/R/print.R
no_license
Ruchika8/Dgraph
R
false
false
25,526
r
## ---------------------------------------------------------------------- ## ## IGraph R package ## Copyright (C) 2005-2014 Gabor Csardi <csardi.gabor@gmail.com> ## 334 Harvard street, Cambridge, MA 02139 USA ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of...
rfiles <- list.files(path = "../data/classify/results", pattern = "HNG_res", full.names = T) wfiles <- list.files(path = "../data/classify/welcalc", pattern = "subdat", full.names = T) resdat <- list() for (i in 1:length(rfiles)) { print(rfiles[i]) print(wfiles[i]) load(rfiles[i]) load(wfiles[i]) resdat[[i]] <- c...
/append/mergeres.R
no_license
bamonroe/code-ch4
R
false
false
882
r
rfiles <- list.files(path = "../data/classify/results", pattern = "HNG_res", full.names = T) wfiles <- list.files(path = "../data/classify/welcalc", pattern = "subdat", full.names = T) resdat <- list() for (i in 1:length(rfiles)) { print(rfiles[i]) print(wfiles[i]) load(rfiles[i]) load(wfiles[i]) resdat[[i]] <- c...
# Name: Nithin S Nair #Last updated: June 19, 2019 #--------------------------------------------------------------------------------------------------------------# #RELATIVE WORKING DIRECTORY setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) ## IMPORTING REQUIRED PACKAGES #Packages will be installe...
/Traffic-Collision-Incidents-in-LA-R-Shiny-app.R
no_license
NithinNair/Traffic-Collision-Incidents-in-LA-R-Shiny-app-
R
false
false
5,421
r
# Name: Nithin S Nair #Last updated: June 19, 2019 #--------------------------------------------------------------------------------------------------------------# #RELATIVE WORKING DIRECTORY setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) ## IMPORTING REQUIRED PACKAGES #Packages will be installe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/execute_order.R \name{tn_place_order} \alias{tn_place_order} \title{Place an order (testnet)} \usage{ tn_place_order( symbol = NULL, side = NULL, orderQty = NULL, price = NULL, displayQty = NULL, stopPx = NULL, clOrdID = NULL, ...
/man/tn_place_order.Rd
permissive
hfshr/bitmexr
R
false
true
3,084
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/execute_order.R \name{tn_place_order} \alias{tn_place_order} \title{Place an order (testnet)} \usage{ tn_place_order( symbol = NULL, side = NULL, orderQty = NULL, price = NULL, displayQty = NULL, stopPx = NULL, clOrdID = NULL, ...
rm() #options(shiny.autoreload = TRUE) #options(shiny.maxRequestSize=2000*1024^2) library(shiny) library(shinyBS) library(shinyjs) #library(STRINGdb) library(ggplot2) library(tidyverse) library(data.table) library(MSstatsTMT) library(knitr) library(readxl) if (FALSE) require("V8") #library(MSnbase) ##################...
/ui.R
no_license
dhavalmohandas/ShinyMSstats
R
false
false
4,221
r
rm() #options(shiny.autoreload = TRUE) #options(shiny.maxRequestSize=2000*1024^2) library(shiny) library(shinyBS) library(shinyjs) #library(STRINGdb) library(ggplot2) library(tidyverse) library(data.table) library(MSstatsTMT) library(knitr) library(readxl) if (FALSE) require("V8") #library(MSnbase) ##################...
if (!exists("hpc")) source("load-dataset.R") png(filename = "figure/plot1.png", bg = "transparent") hist(hpc$Global_active_power, main = "Global Active Power", xlab = "Global Active Power (kilowatts)", col = "red") dev.off()
/plot1.R
no_license
sunsure/ExData_Plotting1
R
false
false
245
r
if (!exists("hpc")) source("load-dataset.R") png(filename = "figure/plot1.png", bg = "transparent") hist(hpc$Global_active_power, main = "Global Active Power", xlab = "Global Active Power (kilowatts)", col = "red") dev.off()
# ============================================================ # Similarity measures for sparse matrices. # ============================================================ #' Calculates correlations between columns of two sparse matrices. #' #' @param X (dgCMatrix) #' @param Y (dgCMatrix) #' @returns Matrix of correlatio...
/R/similarity_measures.R
no_license
Sandy4321/collaboratory
R
false
false
1,126
r
# ============================================================ # Similarity measures for sparse matrices. # ============================================================ #' Calculates correlations between columns of two sparse matrices. #' #' @param X (dgCMatrix) #' @param Y (dgCMatrix) #' @returns Matrix of correlatio...
library(raster) #library(dplyr) #library(lubridate) library(rwrfhydro) library(rgdal) library(tmap) library(parallel) ############################################################### ################# Parametry do ustawienia ##################### ############################################################### args = co...
/R/temperatura_min.R
no_license
bczernecki/drought
R
false
false
6,455
r
library(raster) #library(dplyr) #library(lubridate) library(rwrfhydro) library(rgdal) library(tmap) library(parallel) ############################################################### ################# Parametry do ustawienia ##################### ############################################################### args = co...
#You should create one R script called run_analysis.R that does the following. #---Merges the training and the test sets to create one data set. #---Extracts only the measurements on the mean and standard deviation for each measurement. #---Uses descriptive activity names to name the activities in the data set #---Ap...
/run_analysis.R
no_license
andratolbus/CleaningData
R
false
false
4,476
r
#You should create one R script called run_analysis.R that does the following. #---Merges the training and the test sets to create one data set. #---Extracts only the measurements on the mean and standard deviation for each measurement. #---Uses descriptive activity names to name the activities in the data set #---Ap...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/counts.R \name{sens} \alias{sens} \title{Sensitivity} \usage{ sens(thres, y, y.hat) } \arguments{ \item{thres}{thershold where to split. Must be in range of \code{y.hat}} \item{y}{status yes=1, no=0 or dead=1, alive=0} \item{y....
/man/sens.Rd
no_license
guhjy/Atools
R
false
true
391
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/counts.R \name{sens} \alias{sens} \title{Sensitivity} \usage{ sens(thres, y, y.hat) } \arguments{ \item{thres}{thershold where to split. Must be in range of \code{y.hat}} \item{y}{status yes=1, no=0 or dead=1, alive=0} \item{y....
###########################################################################/** # @RdocFunction withRepos # # @title "Evaluate an R expression with repositories set temporarily" # # \description{ # @get "title". # } # # @synopsis # # \arguments{ # \item{expr}{The R expression to be evaluated.} # \item{repos}{A @cha...
/R/withRepos.R
no_license
HenrikBengtsson/R.utils
R
false
false
2,173
r
###########################################################################/** # @RdocFunction withRepos # # @title "Evaluate an R expression with repositories set temporarily" # # \description{ # @get "title". # } # # @synopsis # # \arguments{ # \item{expr}{The R expression to be evaluated.} # \item{repos}{A @cha...
dataFile <- "./data/household_power_consumption.txt" data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #str(subSetData) datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S") gl...
/Plot3.R
no_license
GWdata/Exploratory-Course-Project1
R
false
false
908
r
dataFile <- "./data/household_power_consumption.txt" data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #str(subSetData) datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S") gl...
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. context("dbCreateTableAs and sqlCreateTableAs") source("utilities.R") test_that("sqlCreateTableAs works", { ...
/tests/testthat/test-dbCreateTableAs.R
permissive
prestodb/RPresto
R
false
false
2,264
r
# Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. context("dbCreateTableAs and sqlCreateTableAs") source("utilities.R") test_that("sqlCreateTableAs works", { ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{round_up_nice} \alias{round_up_nice} \title{Round up to nearest 'nice' number source: https://stackoverflow.com/a/6463946} \usage{ round_up_nice(x, nice = c(1, 2, 4, 5, 6, 8, 10)) } \arguments{ \item{x}{Number to round up} \i...
/man/round_up_nice.Rd
permissive
matthewgthomas/brclib
R
false
true
477
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{round_up_nice} \alias{round_up_nice} \title{Round up to nearest 'nice' number source: https://stackoverflow.com/a/6463946} \usage{ round_up_nice(x, nice = c(1, 2, 4, 5, 6, 8, 10)) } \arguments{ \item{x}{Number to round up} \i...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/providers.R \name{provider} \alias{provider} \title{Create a new provider.} \usage{ provider(tile_f, attr_tile, attr_data = osm_license) } \arguments{ \item{tile_f}{A tile function has inputs x, y and z and returns a url.} \item{attr...
/man/provider.Rd
no_license
junior128/rastermap
R
false
false
503
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/providers.R \name{provider} \alias{provider} \title{Create a new provider.} \usage{ provider(tile_f, attr_tile, attr_data = osm_license) } \arguments{ \item{tile_f}{A tile function has inputs x, y and z and returns a url.} \item{attr...
# # 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) options(shiny.maxRequestSize=100*1024^2) # Define server logic required to draw a histogr...
/server.R
no_license
gnetsanet/scViz
R
false
false
1,452
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) options(shiny.maxRequestSize=100*1024^2) # Define server logic required to draw a histogr...
#' @title Bayesian VAR #' @author Nikolas Kuschnig, Lukas Vashold #' @description Bayesian VAR with Hyperpriors #' #' @param data #' @param lags Number of lags to include. #' @param nsave Number of MCMC-draws to store. #' @param nburn Number of MCMC-draws to discard #' @param irf Boolean determining whether to compute...
/exercise_4/exercise_4_var.R
permissive
lnsongxf/econ_exercises
R
false
false
7,717
r
#' @title Bayesian VAR #' @author Nikolas Kuschnig, Lukas Vashold #' @description Bayesian VAR with Hyperpriors #' #' @param data #' @param lags Number of lags to include. #' @param nsave Number of MCMC-draws to store. #' @param nburn Number of MCMC-draws to discard #' @param irf Boolean determining whether to compute...
#' Load in data from 10x experiment #' #' Creates a full or sparse matrix from a sparse data matrix provided by 10X #' genomics. #' #' @param data_dir Directory containing the matrix.mtx, genes.tsv, and barcodes.tsv #' files provided by 10x. A vector or named vector can be given in order to load #' several data dir...
/R/10ximport-wrapper.R
permissive
Jun-Lizst/archive-scater
R
false
false
3,611
r
#' Load in data from 10x experiment #' #' Creates a full or sparse matrix from a sparse data matrix provided by 10X #' genomics. #' #' @param data_dir Directory containing the matrix.mtx, genes.tsv, and barcodes.tsv #' files provided by 10x. A vector or named vector can be given in order to load #' several data dir...
library(pirate) ### Name: gem_test ### Title: Implement Fitted GEM criterior on a Data Set ### Aliases: gem_test gem_test_sample gem_test_simsample ### ** Examples #constructing the covariance matrix co <- matrix(0.2, 10, 10) diag(co) <- 1 dataEx <- data_generator1(d = 0.3, R2 = 0.5, v2 = 1, n = 300, ...
/data/genthat_extracted_code/pirate/examples/gem_test.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
835
r
library(pirate) ### Name: gem_test ### Title: Implement Fitted GEM criterior on a Data Set ### Aliases: gem_test gem_test_sample gem_test_simsample ### ** Examples #constructing the covariance matrix co <- matrix(0.2, 10, 10) diag(co) <- 1 dataEx <- data_generator1(d = 0.3, R2 = 0.5, v2 = 1, n = 300, ...
atom_nom <- function(residuetype, atom, mode){ delta <- -1 natom <- "" switch(mode, full = switch(residuetype, ALA = switch(atom, HB1 = {natom = "QB" delta=1}, HB2 ...
/R/atom_nom.R
no_license
AdamRahman/sprosr
R
false
false
38,766
r
atom_nom <- function(residuetype, atom, mode){ delta <- -1 natom <- "" switch(mode, full = switch(residuetype, ALA = switch(atom, HB1 = {natom = "QB" delta=1}, HB2 ...
# THIS FUNCTION CALCULATES CLIMATIC WATER DEFICIT USING EITHER MONTHLY ANNUAL DATA oR MEAN MONTHLY DATA # DATA INPUT: site (i.e. a unique id for a given location), slope (degrees), latitude (decimal degrees), folded aspect (degrees), ppt, tmean, soilawc (in cm.; default is 200 cm), month, and year (if using annual d...
/resources/calculations/cwd_function.R
no_license
rahuezo/gdp_temperature_project
R
false
false
7,009
r
# THIS FUNCTION CALCULATES CLIMATIC WATER DEFICIT USING EITHER MONTHLY ANNUAL DATA oR MEAN MONTHLY DATA # DATA INPUT: site (i.e. a unique id for a given location), slope (degrees), latitude (decimal degrees), folded aspect (degrees), ppt, tmean, soilawc (in cm.; default is 200 cm), month, and year (if using annual d...
testlist <- list(x = c(2.58981145684914e-307, 4.94065645841247e-324, 0, 5.92314661134617e-304, 0, 0, 3.21687814903302e+181, 1.81250437761959e-207, 7.48552777617268e+247, 5.77636796151408e-275, NaN, -9.40591696517169e+24, 1.00496080260073e+180, -7.99990688549151e-280, 1.53047510903779e-314, 0, 0, -5.15273907786594e-3...
/blorr/inst/testfiles/blr_pairs_cpp/libFuzzer_blr_pairs_cpp/blr_pairs_cpp_valgrind_files/1609956838-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
2,626
r
testlist <- list(x = c(2.58981145684914e-307, 4.94065645841247e-324, 0, 5.92314661134617e-304, 0, 0, 3.21687814903302e+181, 1.81250437761959e-207, 7.48552777617268e+247, 5.77636796151408e-275, NaN, -9.40591696517169e+24, 1.00496080260073e+180, -7.99990688549151e-280, 1.53047510903779e-314, 0, 0, -5.15273907786594e-3...
Nginx provisioning
/Deploy/roles/nginx/readme.rd
no_license
lion-u/Mentorship_program
R
false
false
18
rd
Nginx provisioning
#Q1 Linear Regression Error sigma=0.1 d=8 N=10 ExpectedEin = sigma^2 *(1-(d+1)/N) ExpectedEin #0.001 N=25 sigma^2 *(1-(d+1)/N) #0.0064 N=100 sigma^2 *(1-(d+1)/N) #0.0091 N=500 #0.00982 #Q2 NonLinear Transforms #Q3 #number of parameters + 1 #Q4 Gradient Descent #use chain rule #https://www.khanacademy.org/math/multi...
/Assignment5/AssignWk5_V1.R
no_license
dxrodri/Caltech_ML
R
false
false
4,573
r
#Q1 Linear Regression Error sigma=0.1 d=8 N=10 ExpectedEin = sigma^2 *(1-(d+1)/N) ExpectedEin #0.001 N=25 sigma^2 *(1-(d+1)/N) #0.0064 N=100 sigma^2 *(1-(d+1)/N) #0.0091 N=500 #0.00982 #Q2 NonLinear Transforms #Q3 #number of parameters + 1 #Q4 Gradient Descent #use chain rule #https://www.khanacademy.org/math/multi...
# Script to update model hyperparameters and check convergence #source("check_conv.R") # First need script to update sigma2 and nu kappa.nu <- 5 lambda.nu <- 5/kappa.nu kappa.sigma2 <- 5 lambda.sigma2 <- 0.05/kappa.sigma2 inv.chisq.like <- function(par,tau2.vec){ nu <- par[1] sigma2 <- par[2] N.tau2 <- length(t...
/mmm_fit_code/mmm_fit_functions/hparam_update_OLD.R
no_license
jbischof/HPC_model
R
false
false
7,857
r
# Script to update model hyperparameters and check convergence #source("check_conv.R") # First need script to update sigma2 and nu kappa.nu <- 5 lambda.nu <- 5/kappa.nu kappa.sigma2 <- 5 lambda.sigma2 <- 0.05/kappa.sigma2 inv.chisq.like <- function(par,tau2.vec){ nu <- par[1] sigma2 <- par[2] N.tau2 <- length(t...
infoprobs <- function (betas, z) { cpr <- cprobs(betas, z) ipr <- iprobs(betas, z) sum.cprs <- lapply(cpr, function (x) { nr <- nrow(x) t((1 - rbind(x[1, ], x[-nr, ] + x[-1, ]))^2) }) betas. <- sapply(betas, function (x) x[length(x)]) for (i in 1:length(betas)) ...
/R/infoprobs.R
no_license
cran/ltm
R
false
false
427
r
infoprobs <- function (betas, z) { cpr <- cprobs(betas, z) ipr <- iprobs(betas, z) sum.cprs <- lapply(cpr, function (x) { nr <- nrow(x) t((1 - rbind(x[1, ], x[-nr, ] + x[-1, ]))^2) }) betas. <- sapply(betas, function (x) x[length(x)]) for (i in 1:length(betas)) ...
library("deSolve") growth = function(t, y, params) { with(as.list(c(params,y)), { ## function values zigma = P+FF+K+V f = (zigma/80)*(637.27 - 0.305*density)/12/7 # [density] = 1/(dm^2), (zigma/80) er et gæt for hver meget mere større larver spiser g = 0.125 * P # "gæt", sørger for maks 46% prote...
/globalsensitivitet.R
no_license
Dynamisk-Modellering-AEMMS/melorme-fagprojekt
R
false
false
4,249
r
library("deSolve") growth = function(t, y, params) { with(as.list(c(params,y)), { ## function values zigma = P+FF+K+V f = (zigma/80)*(637.27 - 0.305*density)/12/7 # [density] = 1/(dm^2), (zigma/80) er et gæt for hver meget mere større larver spiser g = 0.125 * P # "gæt", sørger for maks 46% prote...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ani-compression-profile.R \docType{class} \name{anisotropyprofile_summary-class} \alias{anisotropyprofile_summary-class} \title{Summary of Anisotropy profile} \description{ Information about the anisotropy-profile. }
/man/anisotropyprofile_summary-class.Rd
no_license
antiphon/Kdirectional
R
false
true
295
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ani-compression-profile.R \docType{class} \name{anisotropyprofile_summary-class} \alias{anisotropyprofile_summary-class} \title{Summary of Anisotropy profile} \description{ Information about the anisotropy-profile. }
\name{see.citations} \alias{see.citations} \title{see.citations} \description{ Extract author information from a saved search. } \usage{ see.citations(search = NULL, results = NULL, index = 'article.titles', ...) } \arguments{ \item{search}{a string or regular expression which identifies paper(s) to open in search resu...
/man/see.citations.Rd
no_license
ShawnBrad/SearchPubmed
R
false
false
1,029
rd
\name{see.citations} \alias{see.citations} \title{see.citations} \description{ Extract author information from a saved search. } \usage{ see.citations(search = NULL, results = NULL, index = 'article.titles', ...) } \arguments{ \item{search}{a string or regular expression which identifies paper(s) to open in search resu...
setwd("C:/Users/dusti/Box Sync/Personal Computer/Quantitative Biodiversity/Group Project/GroupProject") rm(list=ls()) library(vegan) library(psych) library(ggplot2) library(forcats) library(dplyr) library(corrplot) # SPECIES RICHNESS CODE, WITHOUT FORAGING GUILDS data.without.guilds <- read.csv("hf085-01-bird.csv"...
/GuildsData.R
no_license
dubrewer92/GroupProject
R
false
false
3,634
r
setwd("C:/Users/dusti/Box Sync/Personal Computer/Quantitative Biodiversity/Group Project/GroupProject") rm(list=ls()) library(vegan) library(psych) library(ggplot2) library(forcats) library(dplyr) library(corrplot) # SPECIES RICHNESS CODE, WITHOUT FORAGING GUILDS data.without.guilds <- read.csv("hf085-01-bird.csv"...
#' Inverse logit #' #' Return inverse logit of values. `-Inf` or `Inf` return logits of 0 or 1, respectively. #' #' @md #' @param x Values on logit scale #' #' @export #' inv_logit = function (x) { p = 1/(1 + exp(-x)) p[is.infinite(p)] = 1 p }
/R/inv_logit.R
no_license
hinkelman/YoloBypassSBM
R
false
false
264
r
#' Inverse logit #' #' Return inverse logit of values. `-Inf` or `Inf` return logits of 0 or 1, respectively. #' #' @md #' @param x Values on logit scale #' #' @export #' inv_logit = function (x) { p = 1/(1 + exp(-x)) p[is.infinite(p)] = 1 p }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mwu.R \name{mwu} \alias{mwu} \title{Mann-Whitney-U-Test} \usage{ mwu(x, grp, distribution = "asymptotic", weight.by = NULL) } \arguments{ \item{x}{Numeric vector or variable.} \item{grp}{Grouping variable indicating the groups that should be...
/man/mwu.Rd
no_license
stefanfritsch/sjstats
R
false
true
1,998
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mwu.R \name{mwu} \alias{mwu} \title{Mann-Whitney-U-Test} \usage{ mwu(x, grp, distribution = "asymptotic", weight.by = NULL) } \arguments{ \item{x}{Numeric vector or variable.} \item{grp}{Grouping variable indicating the groups that should be...
print.dspat=function(x,...) ################################################################################## # Prints relevant parts of a dspat object # # Jeff Laake # 9 April 2008 ################################################################################## { cat("\nStudy area: ") print(x$study.are...
/DSpat/R/internal.R
no_license
jlaake/DSpat
R
false
false
5,207
r
print.dspat=function(x,...) ################################################################################## # Prints relevant parts of a dspat object # # Jeff Laake # 9 April 2008 ################################################################################## { cat("\nStudy area: ") print(x$study.are...
testlist <- list(ExpressionSet = structure(c(3.10503529560174e+231, 1.23181983389617e+58, 1.52478221747831e+245, 6.36967296041789e+178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), Phylostratum = numeric(0)) result <- do.call(myTAI:::cpp_TAI,testlis...
/myTAI/inst/testfiles/cpp_TAI/AFL_cpp_TAI/cpp_TAI_valgrind_files/1615762279-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
334
r
testlist <- list(ExpressionSet = structure(c(3.10503529560174e+231, 1.23181983389617e+58, 1.52478221747831e+245, 6.36967296041789e+178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), Phylostratum = numeric(0)) result <- do.call(myTAI:::cpp_TAI,testlis...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/maps.R \name{agg_station_map} \alias{agg_station_map} \title{Aggregate scores by station} \usage{ agg_station_map(map.me, pct_sum, spatial, taxon.rank, todays.date) } \description{ Aggregate scores by station }
/man/agg_station_map.Rd
no_license
zsmith27/CHESSIE
R
false
true
289
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/maps.R \name{agg_station_map} \alias{agg_station_map} \title{Aggregate scores by station} \usage{ agg_station_map(map.me, pct_sum, spatial, taxon.rank, todays.date) } \description{ Aggregate scores by station }
## this script won't download the data file for you ## download and extract the zip file to ./data directory in you working directory ## data url: https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip ## this script assume you have household_power_consumption.txt in ./data directory ## ...
/coursera-exploratory data analysis/project 1/plot2.R
no_license
adamantoi/datasciencecoursera
R
false
false
1,049
r
## this script won't download the data file for you ## download and extract the zip file to ./data directory in you working directory ## data url: https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip ## this script assume you have household_power_consumption.txt in ./data directory ## ...
suppressMessages(library(cacheSweave)) infile <- system.file("example", "simpleRR.Rnw", package = "cacheSweave") setCacheDir("cache") Sweave(infile, driver = cacheSweaveDriver) ls() ## Check to see that objects were properly cached ## Database should contain 'airquality' and 'fit' dname <- dir("cache", full.name...
/tests/reg-tests.R
no_license
mclements/cachesweave
R
false
false
430
r
suppressMessages(library(cacheSweave)) infile <- system.file("example", "simpleRR.Rnw", package = "cacheSweave") setCacheDir("cache") Sweave(infile, driver = cacheSweaveDriver) ls() ## Check to see that objects were properly cached ## Database should contain 'airquality' and 'fit' dname <- dir("cache", full.name...
CETTActionsParser <- R6::R6Class( "CETTActionsParser", inherit = AbstractParser, private = list( parse_record = function() { cett_type <- strsplit(private$tibble_name, "_")[[1]][1] drugs <- xmlChildren(pkg_env$root) pb <- progress_bar$new(total = xmlSize(drugs)) ...
/R/cett_actions_parsers.R
no_license
cran/dbparser
R
false
false
1,644
r
CETTActionsParser <- R6::R6Class( "CETTActionsParser", inherit = AbstractParser, private = list( parse_record = function() { cett_type <- strsplit(private$tibble_name, "_")[[1]][1] drugs <- xmlChildren(pkg_env$root) pb <- progress_bar$new(total = xmlSize(drugs)) ...
TEAM_NAME="jakl" VERSION="R version 3.6.0 (2019-04-26)" load_data <- function(path){ # Loads the data using base R. # data <- read.csv(path, stringsAsFactors = T) data } computer_use_001 <- function(data){ # Computer use is defined using 'comp_week' and 'comp_wend' # IMPORTS # DEFINE COMPUTER...
/JAKLinFunctions.R
no_license
knedza/JAKL
R
false
false
3,518
r
TEAM_NAME="jakl" VERSION="R version 3.6.0 (2019-04-26)" load_data <- function(path){ # Loads the data using base R. # data <- read.csv(path, stringsAsFactors = T) data } computer_use_001 <- function(data){ # Computer use is defined using 'comp_week' and 'comp_wend' # IMPORTS # DEFINE COMPUTER...
library(ggplot2) library(ez) library(Hmisc) library(reshape2) library(psychReport) library(lsr) library(bayestestR) library(BayesFactor) library(TOSTER) #### clear environment rm(list = ls()) #### load data # on Inspiron 13 setwd("C:/Users/wuxiu/Documents/PhD@UBC/Lab/2ndYear/AnticipatoryPursuit/AnticipatoryPursuitMot...
/analysis/R/twowayANOVAs&plots.R
no_license
CaptainS5/AnticipatoryPursuit-MotionPerception
R
false
false
11,178
r
library(ggplot2) library(ez) library(Hmisc) library(reshape2) library(psychReport) library(lsr) library(bayestestR) library(BayesFactor) library(TOSTER) #### clear environment rm(list = ls()) #### load data # on Inspiron 13 setwd("C:/Users/wuxiu/Documents/PhD@UBC/Lab/2ndYear/AnticipatoryPursuit/AnticipatoryPursuitMot...
tabPanel( title = tagList( icon("globe-asia"), i18n$t("感染状況マップ") ), fluidRow( column( width = 5, tags$div( fluidRow( column( width = 6, switchInput( inputId = "switchMapVersion", value = T, onLabel = i18n$t...
/03_Components/Main/ConfirmedMap.ui.R
permissive
peppy/2019-ncov-japan
R
false
false
4,329
r
tabPanel( title = tagList( icon("globe-asia"), i18n$t("感染状況マップ") ), fluidRow( column( width = 5, tags$div( fluidRow( column( width = 6, switchInput( inputId = "switchMapVersion", value = T, onLabel = i18n$t...
fileile <- "household_power_consumption.txt" data <- read.table(file, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subdata <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] plot1 <- as.numeric(subdata$Global_active_power) png("plot1.png", width=480, height=480) hist(plot1, col="red", main="Global Active...
/plot1.r
no_license
mikeauld74/ExData_Plotting1
R
false
false
370
r
fileile <- "household_power_consumption.txt" data <- read.table(file, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subdata <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] plot1 <- as.numeric(subdata$Global_active_power) png("plot1.png", width=480, height=480) hist(plot1, col="red", main="Global Active...
#Load Source File #-the source file is a .RData file where all the functions and codes are preloaded place<-getwd() source("/home/tcrnerc/Scratch/models/incubator/SpatialModel.R") #load ABM load("/home/tcrnerc/Scratch/models/incubator/sweep1.RData") #load sweep setwd(place)#Load Source File #This allows the definition...
/submitLegion/completeRuns/submit_model1ext.R
no_license
ercrema/culturalincubators
R
false
false
1,340
r
#Load Source File #-the source file is a .RData file where all the functions and codes are preloaded place<-getwd() source("/home/tcrnerc/Scratch/models/incubator/SpatialModel.R") #load ABM load("/home/tcrnerc/Scratch/models/incubator/sweep1.RData") #load sweep setwd(place)#Load Source File #This allows the definition...
#' @param infile Path to the input file #' @param header T (Default) or F #' @return A matrix of the infile #' @export load_ped <- function(infile, header = TRUE){ ## read file as a matrix ## in.dt <- data.table::fread(infile, header = header) ## conduct checks ## #- check column names nameVec = c('IID', 'sa...
/R/load_ped.R
no_license
kopalgarg/gwas-vis
R
false
false
2,361
r
#' @param infile Path to the input file #' @param header T (Default) or F #' @return A matrix of the infile #' @export load_ped <- function(infile, header = TRUE){ ## read file as a matrix ## in.dt <- data.table::fread(infile, header = header) ## conduct checks ## #- check column names nameVec = c('IID', 'sa...
\name{grasp.cormat} \alias{grasp.cormat} \title{GRASP-R correlations map and matrix} \description{Calculates correlation between PVs and plots a matrix of correlation} \usage{grasp.cormat(gr.Yi, cols, thin = 1)} \arguments{ \item{gr.Yi}{Selected responses to be used in the form of a vector with column numbers} ...
/man/grasp.cormat.Rd
no_license
cran/grasper
R
false
false
1,087
rd
\name{grasp.cormat} \alias{grasp.cormat} \title{GRASP-R correlations map and matrix} \description{Calculates correlation between PVs and plots a matrix of correlation} \usage{grasp.cormat(gr.Yi, cols, thin = 1)} \arguments{ \item{gr.Yi}{Selected responses to be used in the form of a vector with column numbers} ...
source("shared.R") rankall <- function(outcome, num = "best") { ranked <- rankedByState(outcome = outcome) ## For each state, find the hospital of the given rank ## Return a data frame with the hospital names and the ## (abbreviated) state name byState <- split(ranked, ranked...
/rankall.R
no_license
paulCrsr/RProgrammingAssignment3
R
false
false
1,192
r
source("shared.R") rankall <- function(outcome, num = "best") { ranked <- rankedByState(outcome = outcome) ## For each state, find the hospital of the given rank ## Return a data frame with the hospital names and the ## (abbreviated) state name byState <- split(ranked, ranked...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_other.R \name{getRhat} \alias{getRhat} \title{Get rhat} \usage{ getRhat(stan_fit, parameters) } \arguments{ \item{stan_fit}{Output of stan} \item{parameters}{Parameter names to extract} } \description{ Get rhat }
/man/getRhat.Rd
no_license
wjoycezhao/hddmRstan
R
false
true
302
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_other.R \name{getRhat} \alias{getRhat} \title{Get rhat} \usage{ getRhat(stan_fit, parameters) } \arguments{ \item{stan_fit}{Output of stan} \item{parameters}{Parameter names to extract} } \description{ Get rhat }
# # vim:set ff=unix expandtab ts=2 sw=2: ################################################################# writeGenericFunctionRdFiles <- function(path,docs,nsi){ gens<-nsi[["gens_defined_by_package"]] funNamesToDocument <-names(gens) #funNamesToDocument <-names(nsi[["documentableMeths"]]) # note that ls wi...
/pkg/R/deprecated/writeGenericFunctionRdFiles.R
no_license
mamueller/linkeddocs
R
false
false
995
r
# # vim:set ff=unix expandtab ts=2 sw=2: ################################################################# writeGenericFunctionRdFiles <- function(path,docs,nsi){ gens<-nsi[["gens_defined_by_package"]] funNamesToDocument <-names(gens) #funNamesToDocument <-names(nsi[["documentableMeths"]]) # note that ls wi...
setwd("D:/FAIMS/20180822_DI2A/") ############### PEPTIDE LEVEL FDRs ## 3 dalton isolation, 60k OT resolution mso60k3i_3p10f<-peplvlfdr(msplitresults="mso3p10f_DIA2_OT_60k_3i1o_1.txt") ## < 1% FDR mso60k3i_3p20f<-peplvlfdr(msplitresults="mso3p20f_DIA2_OT_60k_3i1o_1.txt") ## < 1% FDR mso60k3i_3p30f<-peplvlfdr(msplitresu...
/explore_searchparams_DI2A.R
no_license
jgmeyerucsd/pRoteomics
R
false
false
7,554
r
setwd("D:/FAIMS/20180822_DI2A/") ############### PEPTIDE LEVEL FDRs ## 3 dalton isolation, 60k OT resolution mso60k3i_3p10f<-peplvlfdr(msplitresults="mso3p10f_DIA2_OT_60k_3i1o_1.txt") ## < 1% FDR mso60k3i_3p20f<-peplvlfdr(msplitresults="mso3p20f_DIA2_OT_60k_3i1o_1.txt") ## < 1% FDR mso60k3i_3p30f<-peplvlfdr(msplitresu...
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
/pgp/provenance/phenotype-prep.R
permissive
deflaux/bigquery-examples
R
false
false
9,276
r
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#Answer 2 NEI2<-NEI[NEI$fips=="24510",] ans2<-sapply(split(NEI2, NEI2$year),function(k) sum(k$Emissions)) png('plot2a.png', width=480, height=480) barplot(ans2, xlab="years", ylab="PM2.5 Emission", main="Total PM2.5 Emission across years for Baltimore City ") dev.off()
/plot2.R
no_license
adityatare/Exploratory-Data-Analysis2
R
false
false
278
r
#Answer 2 NEI2<-NEI[NEI$fips=="24510",] ans2<-sapply(split(NEI2, NEI2$year),function(k) sum(k$Emissions)) png('plot2a.png', width=480, height=480) barplot(ans2, xlab="years", ylab="PM2.5 Emission", main="Total PM2.5 Emission across years for Baltimore City ") dev.off()
## these functions will cache the inverse of a matrix by 1) storing the ## value of the inverse and 2) calculates the inverse of the matrix using the first function ## this function creates a special matrix object and stores 1) the matrix ad 2) the inverse of the matrix makeCacheMatrix <- function(x = matrix()) { ...
/cachematrix.R
no_license
jmoss13148/ProgrammingAssignment2
R
false
false
1,019
r
## these functions will cache the inverse of a matrix by 1) storing the ## value of the inverse and 2) calculates the inverse of the matrix using the first function ## this function creates a special matrix object and stores 1) the matrix ad 2) the inverse of the matrix makeCacheMatrix <- function(x = matrix()) { ...
\name{circos.genomicDensity} \alias{circos.genomicDensity} \title{ Calculate and add genomic density track } \description{ Calculate and add genomic density track } \usage{ circos.genomicDensity( data, ylim.force = FALSE, window.size = NULL, overlap = TRUE, col = ifelse(area, "grey", "black"), l...
/man/circos.genomicDensity.Rd
permissive
Amz965/circlize
R
false
false
1,970
rd
\name{circos.genomicDensity} \alias{circos.genomicDensity} \title{ Calculate and add genomic density track } \description{ Calculate and add genomic density track } \usage{ circos.genomicDensity( data, ylim.force = FALSE, window.size = NULL, overlap = TRUE, col = ifelse(area, "grey", "black"), l...
`rclust` <- function(dist, clusters = 2, runs = 1000, counter = FALSE) { if (runs == 1) return(relational.clustering(dist, clusters)) else { rc2return <- NULL rc2 <- sum(dist) for (i in 1:runs) { npart <- relational.clustering(dist, clusters) if (i%%10==0 && counter==TRUE) print(paste('Ca...
/fossil/R/rclust.R
no_license
ingted/R-Examples
R
false
false
907
r
`rclust` <- function(dist, clusters = 2, runs = 1000, counter = FALSE) { if (runs == 1) return(relational.clustering(dist, clusters)) else { rc2return <- NULL rc2 <- sum(dist) for (i in 1:runs) { npart <- relational.clustering(dist, clusters) if (i%%10==0 && counter==TRUE) print(paste('Ca...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_theme.R \name{plot_theme} \alias{plot_theme} \title{Plot Theme} \usage{ plot_theme(fontFamily = "Purisa", titleFont = 26) } \arguments{ \item{fontFamily}{A character string that defines the font family to be used for the axis / title / l...
/man/plot_theme.Rd
no_license
O1sims/FootballStats
R
false
true
406
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_theme.R \name{plot_theme} \alias{plot_theme} \title{Plot Theme} \usage{ plot_theme(fontFamily = "Purisa", titleFont = 26) } \arguments{ \item{fontFamily}{A character string that defines the font family to be used for the axis / title / l...
options(repos = c(cran = 'https://cran.rstudio.com')) ## local library for project-specific packages dir.create('.Rlib', showWarnings = FALSE, recursive = TRUE) .libPaths(new = '.Rlib') print("working in power-analyses repo")
/.Rprofile
no_license
jburos/power-analyses
R
false
false
226
rprofile
options(repos = c(cran = 'https://cran.rstudio.com')) ## local library for project-specific packages dir.create('.Rlib', showWarnings = FALSE, recursive = TRUE) .libPaths(new = '.Rlib') print("working in power-analyses repo")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Rsamplers.R \name{mvtnormSelectionProbs} \alias{mvtnormSelectionProbs} \title{A function for computing the probability of positive/negative selections} \usage{ mvtnormSelectionProbs(y, mu, sigma, threshold, selected = NULL) } \arguments{ \ite...
/man/mvtnormSelectionProbs.Rd
no_license
ammeir2/selectiveROI
R
false
true
1,182
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Rsamplers.R \name{mvtnormSelectionProbs} \alias{mvtnormSelectionProbs} \title{A function for computing the probability of positive/negative selections} \usage{ mvtnormSelectionProbs(y, mu, sigma, threshold, selected = NULL) } \arguments{ \ite...
\name{metaSub.character} \alias{as.filename} \alias{as.filename.character} \alias{metaSub.filename} \alias{metaSub.character} \alias{metaSub} \title{Create Replicate Text files with Systematic Substitutions} \description{ \code{metaSub} is generic. A method is defined for character; a convenience wrapper is provid...
/man/metaSub.character.Rd
no_license
cran/MIfuns
R
false
false
5,532
rd
\name{metaSub.character} \alias{as.filename} \alias{as.filename.character} \alias{metaSub.filename} \alias{metaSub.character} \alias{metaSub} \title{Create Replicate Text files with Systematic Substitutions} \description{ \code{metaSub} is generic. A method is defined for character; a convenience wrapper is provid...
dataSetsPath <- "C:\\Users\\samarths\\Desktop\\newdata\\" require(e1071) svm.models <- list() parentTestSet <- read.csv(paste(dataSetsPath, "test_FS.csv", sep=''), header = TRUE) parentTrainingSet <- read.csv(paste(dataSetsPath, "train_FS.csv", sep=''), header=TRUE) parentTrainingSet <- parentTrainingSet[,-1] mergedS...
/pca_merged_plus_svm/pcasvm.R
no_license
geramirez/digit-recognizer
R
false
false
1,665
r
dataSetsPath <- "C:\\Users\\samarths\\Desktop\\newdata\\" require(e1071) svm.models <- list() parentTestSet <- read.csv(paste(dataSetsPath, "test_FS.csv", sep=''), header = TRUE) parentTrainingSet <- read.csv(paste(dataSetsPath, "train_FS.csv", sep=''), header=TRUE) parentTrainingSet <- parentTrainingSet[,-1] mergedS...
# TODO: Add comment # # Author: Ruth ############################################################################### mytheme <-theme_bw(base_size=10) + theme(plot.title = element_text(vjust=2), plot.margin=unit(c(0.08, 0.08, 0.0, 0.08),"cm"), axis.title.y = element_text(vjust=0.50), axis.line = eleme...
/EcuRCode/BoxTrials/ThesisPresentation/BoxTrialsGraphs.R
no_license
ruthubc/ruthubc
R
false
false
1,284
r
# TODO: Add comment # # Author: Ruth ############################################################################### mytheme <-theme_bw(base_size=10) + theme(plot.title = element_text(vjust=2), plot.margin=unit(c(0.08, 0.08, 0.0, 0.08),"cm"), axis.title.y = element_text(vjust=0.50), axis.line = eleme...
#' Number of dimensions. #' Number of dimensions of an array or vector #' #' @param x array #' @keywords internal dims <- function(x) length(amv_dim(x)) #' Dimensions. #' Consistent dimensions for vectors, matrices and arrays. #' #' @param x array, matrix or vector #' @keywords internal amv_dim <- function(x) if (i...
/R/dimensions.r
no_license
froh/plyr
R
false
false
1,273
r
#' Number of dimensions. #' Number of dimensions of an array or vector #' #' @param x array #' @keywords internal dims <- function(x) length(amv_dim(x)) #' Dimensions. #' Consistent dimensions for vectors, matrices and arrays. #' #' @param x array, matrix or vector #' @keywords internal amv_dim <- function(x) if (i...
library(lubridate) library(plyr) library(dplyr) rawattendance<-read.csv("attendance2018.csv") cleanattendance <- rawattendance %>% filter(Attendance.Location.Name=="Seymour Dual Language Academy")%>% mutate(Day=1)%>% mutate(Pres=ifelse(Attendance.Desc=="Present",1,0))%>% mutate(Abs=ifelse(Pres==0,1,...
/Seymour Request.R
no_license
djrobillard/SCSD
R
false
false
6,096
r
library(lubridate) library(plyr) library(dplyr) rawattendance<-read.csv("attendance2018.csv") cleanattendance <- rawattendance %>% filter(Attendance.Location.Name=="Seymour Dual Language Academy")%>% mutate(Day=1)%>% mutate(Pres=ifelse(Attendance.Desc=="Present",1,0))%>% mutate(Abs=ifelse(Pres==0,1,...
library(shiny) library(poppr) library(phangorn) library(ape) library(igraph) ##################################################### # IMPORTANT: ALl the functions written before line 68 refer to functions loaded by R # before shiny is deployed and executes the custom functions. These functions are definitions of' # glo...
/shiny-server/www/genoid_ramorum/server.R
no_license
grunwaldlab/phytophthora_id
R
false
false
8,942
r
library(shiny) library(poppr) library(phangorn) library(ape) library(igraph) ##################################################### # IMPORTANT: ALl the functions written before line 68 refer to functions loaded by R # before shiny is deployed and executes the custom functions. These functions are definitions of' # glo...