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
#' 99_utils.R #' ======================================================= #+ setup, include=FALSE knitr::opts_chunk$set(eval = FALSE) #+ # ---- source_utils ---- library(sp) suppressMessages(library(dplyr)) library(gstat) library(ggplot2) library(sf) library(LAGOSNEgis) library(LAGOSNE) library(lwgeom) library(classI...
/scripts/99_utils.R
no_license
jsta/spatial_disaggregation_ms
R
false
false
6,167
r
#' 99_utils.R #' ======================================================= #+ setup, include=FALSE knitr::opts_chunk$set(eval = FALSE) #+ # ---- source_utils ---- library(sp) suppressMessages(library(dplyr)) library(gstat) library(ggplot2) library(sf) library(LAGOSNEgis) library(LAGOSNE) library(lwgeom) library(classI...
#Clean the canvas remove(list = ls()) #Set WD to the location of the script setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) # Load the relevant libraries - do this every time library(lubridate) library(ggplot2) library(dplyr) library(data.table) library(ggrepel) library(tidyverse) library(ggmap) library(o...
/Provider Location mappR.R
no_license
bkerly/OpioidProvders
R
false
false
1,632
r
#Clean the canvas remove(list = ls()) #Set WD to the location of the script setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) # Load the relevant libraries - do this every time library(lubridate) library(ggplot2) library(dplyr) library(data.table) library(ggrepel) library(tidyverse) library(ggmap) library(o...
infer_form <- function(n_x = n_x, n_y = n_y, t = t_stat, test = test, hypotheses = hypotheses, ni_margin = ni_margin, prior_scale = prior_scale, bf = bf, ...
/R/infer_form.R
no_license
maxlinde/baymedr_shiny_app
R
false
false
1,815
r
infer_form <- function(n_x = n_x, n_y = n_y, t = t_stat, test = test, hypotheses = hypotheses, ni_margin = ni_margin, prior_scale = prior_scale, bf = bf, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pokeFightModule.R \name{pokeFight} \alias{pokeFight} \title{Server module for generating the pokeFight section} \usage{ pokeFight(input, output, session, mainData, sprites, attacks, types) } \arguments{ \item{input}{Shiny inputs.} \item{outp...
/man/pokeFight.Rd
no_license
eupimenta/shinyMons
R
false
true
655
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pokeFightModule.R \name{pokeFight} \alias{pokeFight} \title{Server module for generating the pokeFight section} \usage{ pokeFight(input, output, session, mainData, sprites, attacks, types) } \arguments{ \item{input}{Shiny inputs.} \item{outp...
library(igraph) library(RNeo4j) library(plyr) library(ggplot2) #Imports graph from Neo4j, converts it into igraph format, and calculates the betweenness of each node. #Values are then written into a CSV neo4j = startGraph("http://localhost:7474/db/data") getAllNodesQuery = "MATCH n OPTIONAL MATCH (n)-[r]-() RETURN D...
/R_scripts/calculate_node_betweeness.R
no_license
mjrosengrant/TGen_Helios_Scholar_Project
R
false
false
1,011
r
library(igraph) library(RNeo4j) library(plyr) library(ggplot2) #Imports graph from Neo4j, converts it into igraph format, and calculates the betweenness of each node. #Values are then written into a CSV neo4j = startGraph("http://localhost:7474/db/data") getAllNodesQuery = "MATCH n OPTIONAL MATCH (n)-[r]-() RETURN D...
#' Regional weibull height-diameter parameters #' #' Regional height-diameter parameters for Weibull models from Feldpausch et al. 2012. #' #' @format A data frame with 9 rows and 4 variables: #' \describe{ #' \item{AllometricRegionID}{ID for allometric regions from Feldpausch et al. 2012.} #' \item{a_par}{a parameter ...
/R/data.R
no_license
ForestPlots/BiomasaFP
R
false
false
655
r
#' Regional weibull height-diameter parameters #' #' Regional height-diameter parameters for Weibull models from Feldpausch et al. 2012. #' #' @format A data frame with 9 rows and 4 variables: #' \describe{ #' \item{AllometricRegionID}{ID for allometric regions from Feldpausch et al. 2012.} #' \item{a_par}{a parameter ...
#' Re-run expressions multiple times. #' #' @description #' #' `r lifecycle::badge("questioning")` #' #' This is a convenient way of generating sample data. It works similarly to #' \code{\link{replicate}(..., simplify = FALSE)}. #' #' @param .n Number of times to run expressions #' @param ... Expressions to re-run. #'...
/R/rerun.R
permissive
BB1464/purrr
R
false
false
1,498
r
#' Re-run expressions multiple times. #' #' @description #' #' `r lifecycle::badge("questioning")` #' #' This is a convenient way of generating sample data. It works similarly to #' \code{\link{replicate}(..., simplify = FALSE)}. #' #' @param .n Number of times to run expressions #' @param ... Expressions to re-run. #'...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setInverse <- function(solve) m <<- solve getInverse <- fun...
/cachematrix.R
no_license
rfht/ProgrammingAssignment2
R
false
false
700
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setInverse <- function(solve) m <<- solve getInverse <- fun...
uniqueDateTime<-function(data, NAMES, replaceNAs, sumFunc = "mean", startTime,endTime, timeStep, period){ data<-data[,NAMES] if (replaceNAs){ #replace NAs with zeros for (c in which(names(data)!="Date2")){ data[,c]<-sapply(data[,c], function(x) as.numeric(ifelse(is.na(x),0,x)...
/BG.library/R/uniqueDateTime.R
no_license
rscmbc3/BG.library
R
false
false
1,594
r
uniqueDateTime<-function(data, NAMES, replaceNAs, sumFunc = "mean", startTime,endTime, timeStep, period){ data<-data[,NAMES] if (replaceNAs){ #replace NAs with zeros for (c in which(names(data)!="Date2")){ data[,c]<-sapply(data[,c], function(x) as.numeric(ifelse(is.na(x),0,x)...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ntstiles.R \name{nts.bybbox} \alias{nts.bybbox} \title{Get NTS References by Bounding Box} \usage{ nts.bybbox(bbox, atscale) } \arguments{ \item{bbox}{A bounding box of lat/lon values in the form returned by \code{sp::bbox()}.} \item{atscale...
/man/nts.bybbox.Rd
no_license
paleolimbot/rcanvec
R
false
true
793
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ntstiles.R \name{nts.bybbox} \alias{nts.bybbox} \title{Get NTS References by Bounding Box} \usage{ nts.bybbox(bbox, atscale) } \arguments{ \item{bbox}{A bounding box of lat/lon values in the form returned by \code{sp::bbox()}.} \item{atscale...
#' @title Supply and demand curves #' #' @description Create supply and demand curves. By default, the function will use a default supply and a default demand curve, but this can be overridden passing new curves as additional arguments or modifying the `xmax` and `ymax` arguments. #' Moreover, the function provides sev...
/R/sdcurve.R
permissive
carmineapice/econocharts
R
false
false
8,729
r
#' @title Supply and demand curves #' #' @description Create supply and demand curves. By default, the function will use a default supply and a default demand curve, but this can be overridden passing new curves as additional arguments or modifying the `xmax` and `ymax` arguments. #' Moreover, the function provides sev...
#' Magistrates court outcomes. #' #' Outcomes for all defendants appearing at magistrates courts in England and Wales in 2018, published by the Ministry of Justice. #' #' Names have been cleaned for easy use with R, and additional fields for the region and country of the relevant police force added. #' #' @source \url{...
/R/data.R
no_license
odaniel1/courtOutcomes
R
false
false
435
r
#' Magistrates court outcomes. #' #' Outcomes for all defendants appearing at magistrates courts in England and Wales in 2018, published by the Ministry of Justice. #' #' Names have been cleaned for easy use with R, and additional fields for the region and country of the relevant police force added. #' #' @source \url{...
#' Run Directory #' #' Timestamped directory for storing training/logging data in a separate #' location for each training run. Note that if the `RUNDIR` environment #' variable is availale it will be returned as the run directory. #' #' @param runs_dir Parent directory for runs #' @param keep Number of most recent ...
/R/runs.R
permissive
victory2015/tensorflow-1
R
false
false
2,374
r
#' Run Directory #' #' Timestamped directory for storing training/logging data in a separate #' location for each training run. Note that if the `RUNDIR` environment #' variable is availale it will be returned as the run directory. #' #' @param runs_dir Parent directory for runs #' @param keep Number of most recent ...
# Mental health data library(tidyverse) library(readxl) library(rvest) website <- read_html("https://www.england.nhs.uk/publication/nhs-mental-health-dashboard/") links <- website %>% html_nodes("a") %>% html_attr("href") xlsx_links <- unique(links[grepl('xls', links)]) file_loc <- xlsx_links[1] file_loc2 <- str_spl...
/NH-stats.R
permissive
RichardPilbery/MH-dashboard
R
false
false
1,682
r
# Mental health data library(tidyverse) library(readxl) library(rvest) website <- read_html("https://www.england.nhs.uk/publication/nhs-mental-health-dashboard/") links <- website %>% html_nodes("a") %>% html_attr("href") xlsx_links <- unique(links[grepl('xls', links)]) file_loc <- xlsx_links[1] file_loc2 <- str_spl...
context("Error localization: numerical data.frames") test_that('localizeErrors works without specified weight',{ expect_equivalent(localizeErrors( E = editmatrix(c('x+y==z','x<1')), dat = data.frame( x = c(1,1,1), y = c(1,1,1), z...
/pkg/tests/testthat/testLocalizeErrors.R
no_license
data-cleaning/editrules
R
false
false
4,041
r
context("Error localization: numerical data.frames") test_that('localizeErrors works without specified weight',{ expect_equivalent(localizeErrors( E = editmatrix(c('x+y==z','x<1')), dat = data.frame( x = c(1,1,1), y = c(1,1,1), z...
#' Get Layer Names #' #' This function returns the names of all layers in a model. #' #' @param model A keras model. #' @return A character vector. The layer names. #' @export get_layer_names <- function(model){ sapply(model$layers, function(x) x$name) } #' Get Incoming Layer Name #' #' This function returns the na...
/R/5-get.R
no_license
tpq/caress
R
false
false
3,096
r
#' Get Layer Names #' #' This function returns the names of all layers in a model. #' #' @param model A keras model. #' @return A character vector. The layer names. #' @export get_layer_names <- function(model){ sapply(model$layers, function(x) x$name) } #' Get Incoming Layer Name #' #' This function returns the na...
library(robis) ### Name: dataset ### Title: Fetch dataset metadata. ### Aliases: dataset ### ** Examples datasets <- dataset(id = 1) datasets <- dataset(q = "MICROBIS") datasets <- dataset(nodeid = c(0,1))
/data/genthat_extracted_code/robis/examples/dataset.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
213
r
library(robis) ### Name: dataset ### Title: Fetch dataset metadata. ### Aliases: dataset ### ** Examples datasets <- dataset(id = 1) datasets <- dataset(q = "MICROBIS") datasets <- dataset(nodeid = c(0,1))
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gbRecord-class.R \name{gbRecord} \alias{gbRecord} \title{Read a GenBank/GenPept or Embl format file.} \usage{ gbRecord(rcd, progress = FALSE) } \arguments{ \item{rcd}{A vector of paths to GenBank/Embl format records, an \code{\link[reutils]{e...
/man/gbRecord.Rd
no_license
awenocur/biofiles
R
false
true
2,513
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gbRecord-class.R \name{gbRecord} \alias{gbRecord} \title{Read a GenBank/GenPept or Embl format file.} \usage{ gbRecord(rcd, progress = FALSE) } \arguments{ \item{rcd}{A vector of paths to GenBank/Embl format records, an \code{\link[reutils]{e...
#R CART with BOLKER library("knitr") install.packages("rpart", dependencies = TRUE) install.packages("ade4", dependencies = TRUE) install.packages("mvpart", dependencies = TRUE) install.packages("vegan", dependencies = TRUE) library("vegan") #library("mvpart") use this LATER...not yet library("ade4") library("rpart") ...
/CART/CART_Bolker_day17.R
no_license
slomascolo/NCEAS-RENCI_2014
R
false
false
1,999
r
#R CART with BOLKER library("knitr") install.packages("rpart", dependencies = TRUE) install.packages("ade4", dependencies = TRUE) install.packages("mvpart", dependencies = TRUE) install.packages("vegan", dependencies = TRUE) library("vegan") #library("mvpart") use this LATER...not yet library("ade4") library("rpart") ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ecs_operations.R \name{ecs_deregister_task_definition} \alias{ecs_deregister_task_definition} \title{Deregisters the specified task definition by family and revision} \usage{ ecs_deregister_task_definition(taskDefinition) } \arguments{ \item{...
/cran/paws.compute/man/ecs_deregister_task_definition.Rd
permissive
TWarczak/paws
R
false
true
8,078
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ecs_operations.R \name{ecs_deregister_task_definition} \alias{ecs_deregister_task_definition} \title{Deregisters the specified task definition by family and revision} \usage{ ecs_deregister_task_definition(taskDefinition) } \arguments{ \item{...
#'calculadora.fresco #' #' ###### curt ######### # CHD #'@export calculadora.fresco.curt<-function(sexo,edad,fuma,imc,rang.edat=c(35,79), anys=10){ if (anys!=10 & anys!=5) stop("Els anys nom?s poden ser 5 o 10") ## homes # prevalences meansmen <- c( 55.83768882, 0.295619335, 0.239954683 ) # b...
/R/calculadora.fresco.r
no_license
isubirana/rutinesPkg
R
false
false
5,556
r
#'calculadora.fresco #' #' ###### curt ######### # CHD #'@export calculadora.fresco.curt<-function(sexo,edad,fuma,imc,rang.edat=c(35,79), anys=10){ if (anys!=10 & anys!=5) stop("Els anys nom?s poden ser 5 o 10") ## homes # prevalences meansmen <- c( 55.83768882, 0.295619335, 0.239954683 ) # b...
require(cmscu) ##Create dictionaries ##set order here n<- 3 frequencies = replicate(n, new(FrequencyDictionary, 4,2^26)) # twitter_1g <- new(FrequencyDictionary,4,2^26) # twitter_2g <- new(FrequencyDictionary,4,2^26) # twitter_3g <- new(FrequencyDictionary,4,2^26) # twitter_4g <- new(FrequencyDictionary,4,2^26) # help...
/mknExploration.R
no_license
behaeghe/capstone
R
false
false
2,799
r
require(cmscu) ##Create dictionaries ##set order here n<- 3 frequencies = replicate(n, new(FrequencyDictionary, 4,2^26)) # twitter_1g <- new(FrequencyDictionary,4,2^26) # twitter_2g <- new(FrequencyDictionary,4,2^26) # twitter_3g <- new(FrequencyDictionary,4,2^26) # twitter_4g <- new(FrequencyDictionary,4,2^26) # help...
setwd("D:/My Documents/Coursera Data Science/exploratory_data_analysis/wd") #set the working directory library(data.table) library(dplyr) file <- tbl_df(read.table("household_power_consumption.txt", header=TRUE, sep= ";", na.strings = c("?",""))) file$Date <- as.Date(file$Date, format = "%d/%m/%Y") file$timetemp <- p...
/plot3.R
no_license
151141/ExData_Plotting1
R
false
false
1,628
r
setwd("D:/My Documents/Coursera Data Science/exploratory_data_analysis/wd") #set the working directory library(data.table) library(dplyr) file <- tbl_df(read.table("household_power_consumption.txt", header=TRUE, sep= ";", na.strings = c("?",""))) file$Date <- as.Date(file$Date, format = "%d/%m/%Y") file$timetemp <- p...
\name{describe.simmap} \alias{describe.simmap} \alias{summary.simmap} \alias{summary.multiSimmap} \alias{plot.describe.simmap} \title{Summarizes a stochastic mapped tree or set of trees} \usage{ describe.simmap(tree, ...) \method{summary}{simmap}(object, ...) \method{summary}{multiSimmap}(object, ...) \method...
/man/describe.simmap.Rd
no_license
bmpvieira-forks/phytools
R
false
false
2,284
rd
\name{describe.simmap} \alias{describe.simmap} \alias{summary.simmap} \alias{summary.multiSimmap} \alias{plot.describe.simmap} \title{Summarizes a stochastic mapped tree or set of trees} \usage{ describe.simmap(tree, ...) \method{summary}{simmap}(object, ...) \method{summary}{multiSimmap}(object, ...) \method...
set.seed(24) n <- 40 lambda <- 0.2 nosim <- 1000 means = NULL for (i in 1 : 1000) { means = c(means, mean(rexp(n,lambda))) } head(means) theromean <- round(1/lambda) theromean actualMean <- round(mean(means),3) actualMean library(ggplot2) sDf <- as.data.frame(means) ggplot(sDf, aes(x=means))+ geom_histogram(binwidt...
/statss.R
no_license
ritik-11182/statsitical-inferences
R
false
false
1,437
r
set.seed(24) n <- 40 lambda <- 0.2 nosim <- 1000 means = NULL for (i in 1 : 1000) { means = c(means, mean(rexp(n,lambda))) } head(means) theromean <- round(1/lambda) theromean actualMean <- round(mean(means),3) actualMean library(ggplot2) sDf <- as.data.frame(means) ggplot(sDf, aes(x=means))+ geom_histogram(binwidt...
##' @import httpuv ##' @import gistr ##' @import switchr ##' @import methods NULL ##' publishManifest ##' ##' publish a manifest to Github in the form of a gist ##' ##' @param manifest The manifest to be published ##' @param dest a GistDest object ##' @param desc description to apply to the Gist ##' @param fname The n...
/R/publishManifest.R
no_license
gmbecker/switchrGist
R
false
false
1,902
r
##' @import httpuv ##' @import gistr ##' @import switchr ##' @import methods NULL ##' publishManifest ##' ##' publish a manifest to Github in the form of a gist ##' ##' @param manifest The manifest to be published ##' @param dest a GistDest object ##' @param desc description to apply to the Gist ##' @param fname The n...
### Simple fallback methods for all dense matrices ### These are "cheap" to program, but potentially far from efficient; ### Methods for specific subclasses will overwrite these: setAs("ANY", "denseMatrix", function(from) Matrix(from, sparse=FALSE)) ## dense to sparse: setAs("denseMatrix", "dsparseMatrix", ## MM tho...
/branches/Matrix-for-R-2.3.x/R/denseMatrix.R
no_license
LTLA/Matrix
R
false
false
4,981
r
### Simple fallback methods for all dense matrices ### These are "cheap" to program, but potentially far from efficient; ### Methods for specific subclasses will overwrite these: setAs("ANY", "denseMatrix", function(from) Matrix(from, sparse=FALSE)) ## dense to sparse: setAs("denseMatrix", "dsparseMatrix", ## MM tho...
# Feature generation and model creation # LA = Local Authority. These are sub regions in the UK # MSOA = Middle Layer Super Output Area. These are sub regions inside LAs # Set up ---- # Load packages library(dplyr) library(readr) # Loading the data library(tidyr) library(sf) # For the maps library(ggplot2) library(v...
/blog post 2.R
no_license
theOtherJLo/using_networks_to_predict_covid_cases
R
false
false
14,008
r
# Feature generation and model creation # LA = Local Authority. These are sub regions in the UK # MSOA = Middle Layer Super Output Area. These are sub regions inside LAs # Set up ---- # Load packages library(dplyr) library(readr) # Loading the data library(tidyr) library(sf) # For the maps library(ggplot2) library(v...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/f_as_is.R \name{fac_as_is} \alias{fac_as_is} \title{Factors as is} \usage{ fac_as_is(x, ...) } \arguments{ \item{x}{a vector of data} \item{...}{Name-value pairs of summary functions like factor()} } \value{ factor } \description{ Wrapped ar...
/man/fac_as_is.Rd
no_license
lmguzman/MelissaFactors
R
false
true
497
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/f_as_is.R \name{fac_as_is} \alias{fac_as_is} \title{Factors as is} \usage{ fac_as_is(x, ...) } \arguments{ \item{x}{a vector of data} \item{...}{Name-value pairs of summary functions like factor()} } \value{ factor } \description{ Wrapped ar...
# # # quadscheme.S # # $Revision: 4.33 $ $Date: 2014/11/22 02:19:30 $ # # quadscheme() generate a quadrature scheme from # data and dummy point patterns. # # quadscheme.spatial() case where both patterns are unmarked # # quadscheme.replicated() case where data are multitype # ...
/R/quadscheme.R
no_license
keithschulze/spatstat
R
false
false
10,067
r
# # # quadscheme.S # # $Revision: 4.33 $ $Date: 2014/11/22 02:19:30 $ # # quadscheme() generate a quadrature scheme from # data and dummy point patterns. # # quadscheme.spatial() case where both patterns are unmarked # # quadscheme.replicated() case where data are multitype # ...
library(geoR) ### Name: s256i ### Title: Simulated Data-Set which Illustrate the Usage of krige.bayes ### Aliases: s256i ### Keywords: datasets ### ** Examples points(s256i, pt.div="quintiles", cex.min=1, cex.max=1)
/data/genthat_extracted_code/geoR/examples/s256i.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
223
r
library(geoR) ### Name: s256i ### Title: Simulated Data-Set which Illustrate the Usage of krige.bayes ### Aliases: s256i ### Keywords: datasets ### ** Examples points(s256i, pt.div="quintiles", cex.min=1, cex.max=1)
getDaymet <- function(state = NULL, county = NULL, clip_unit = NULL, tile.ids = NULL, year = NULL, parameters = NULL, aggregate = NULL, crop.data = FALSE) { parameters <- tolower(parameters) all.parameters <- c("dayl", "prcp", "srad", "swe", "tmax", "tmin", "vp") if (!all(parameters %in% all.parameters)) ...
/R/getDaymet.R
permissive
yangxhcaf/ET
R
false
false
6,706
r
getDaymet <- function(state = NULL, county = NULL, clip_unit = NULL, tile.ids = NULL, year = NULL, parameters = NULL, aggregate = NULL, crop.data = FALSE) { parameters <- tolower(parameters) all.parameters <- c("dayl", "prcp", "srad", "swe", "tmax", "tmin", "vp") if (!all(parameters %in% all.parameters)) ...
rm(list=ls()) library(data.table) # par(mfrow=c(3,2)) setwd("/Users/wenrurumon/Documents/GSK/model") library(openxlsx) library(dplyr) f <- function(x,i){ x <- try(read.xlsx(x,i)) print(i) if(class(x)=="try-error"){ print('close') return(NA) }else{ x } } databtb <- lapply(1:17,function(i){ f(dir(...
/MROI/projects/WW.R
no_license
wenrurumon/AAC_tradition
R
false
false
13,504
r
rm(list=ls()) library(data.table) # par(mfrow=c(3,2)) setwd("/Users/wenrurumon/Documents/GSK/model") library(openxlsx) library(dplyr) f <- function(x,i){ x <- try(read.xlsx(x,i)) print(i) if(class(x)=="try-error"){ print('close') return(NA) }else{ x } } databtb <- lapply(1:17,function(i){ f(dir(...
# --------------------------------------------------------------------------- # test_R_aggre.R # Created on: 2015-06-11 # Author : Romain Louvet, PhD student # Contact : romain.louvet@alumni.univ-avignon.fr # Description: # This script must be executed with R. # It was tested with R 3.1.2 and Rstudio 0.98.1091 # # ...
/tools_comparison/test_R_aggre.R
no_license
romain-louvet/sageo_rig2015
R
false
false
3,348
r
# --------------------------------------------------------------------------- # test_R_aggre.R # Created on: 2015-06-11 # Author : Romain Louvet, PhD student # Contact : romain.louvet@alumni.univ-avignon.fr # Description: # This script must be executed with R. # It was tested with R 3.1.2 and Rstudio 0.98.1091 # # ...
#Time complexity. Optimal Partitioning and PELT algorithms devtools::install_github("lpishchagina/OptPartitioning2D") library(OptPartitioning2D) #Function OneStep returns the execution time of a given algorithm OneStep <- function(data1, data2, penalty, type, func = "OptPart2D") { if(type == "null"){t <- system....
/simulation/SimpleTest3 Time complexity of Optimal Partitioning and PELT.R
no_license
lpishchagina/OptPartitioning2D
R
false
false
10,653
r
#Time complexity. Optimal Partitioning and PELT algorithms devtools::install_github("lpishchagina/OptPartitioning2D") library(OptPartitioning2D) #Function OneStep returns the execution time of a given algorithm OneStep <- function(data1, data2, penalty, type, func = "OptPart2D") { if(type == "null"){t <- system....
# set working directory setwd(file.path("C:", "Users", "LucaK", "Desktop", "GitHub", "Big Data Analytics")) # packages library(data.table) library(pryr) library(tidyverse) library(maps) library(mapdata) # Countries in the ESS-data set ESS_countries <- c("Albania", "Austria", "Be...
/Scripts/Migration_population_skript.R
no_license
LucaKeiser/1.BigDataProject
R
false
false
16,595
r
# set working directory setwd(file.path("C:", "Users", "LucaK", "Desktop", "GitHub", "Big Data Analytics")) # packages library(data.table) library(pryr) library(tidyverse) library(maps) library(mapdata) # Countries in the ESS-data set ESS_countries <- c("Albania", "Austria", "Be...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/createAlexNetModel.R \name{createAlexNetModel3D} \alias{createAlexNetModel3D} \title{3-D implementation of the AlexNet deep learning architecture.} \usage{ createAlexNetModel3D(inputImageSize, numberOfClassificationLabels = 1000, numberOfDe...
/man/createAlexNetModel3D.Rd
no_license
msharrock/ANTsRNet
R
false
true
2,638
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/createAlexNetModel.R \name{createAlexNetModel3D} \alias{createAlexNetModel3D} \title{3-D implementation of the AlexNet deep learning architecture.} \usage{ createAlexNetModel3D(inputImageSize, numberOfClassificationLabels = 1000, numberOfDe...
library(dplyr) library(ggplot2) library(lintr) library(maps) library(plotly) library(leaflet) library(styler) top50_by_country <- read.csv( "data/spotify_top50_by_country.csv", stringsAsFactors = FALSE ) # Use most_common_string to create a new df grouped by country, with the most # popular genre in each country,...
/scripts/top_50_country_bar.R
permissive
kellychu202/info201-dataviz-final
R
false
false
1,256
r
library(dplyr) library(ggplot2) library(lintr) library(maps) library(plotly) library(leaflet) library(styler) top50_by_country <- read.csv( "data/spotify_top50_by_country.csv", stringsAsFactors = FALSE ) # Use most_common_string to create a new df grouped by country, with the most # popular genre in each country,...
con <- dbConnect(MySQL(), host = '10.21.3.101', port = 3306, username = 'r', password = '123456', dbname = 'shiny_data') log_data <- reactive({ return(c(input$user_name, session$clientData$url_hostname, session$clientData$url_pathname, session$c...
/userManage/shinyServerLog.R
no_license
ashther/shinyApp
R
false
false
684
r
con <- dbConnect(MySQL(), host = '10.21.3.101', port = 3306, username = 'r', password = '123456', dbname = 'shiny_data') log_data <- reactive({ return(c(input$user_name, session$clientData$url_hostname, session$clientData$url_pathname, session$c...
library(testthat) context("seeds") test_that("get.seed retrieves properly", { set.seed(123, "L'Ecuyer-CMRG", "Inversion") seed <- get.seed() eseed <- c(407L , 1806547166L , -983674937L , 643431772L , 1162448557L , -959247990L , -133913213L) ...
/harvestr/inst/tests/test-seeds.R
no_license
ingted/R-Examples
R
false
false
2,555
r
library(testthat) context("seeds") test_that("get.seed retrieves properly", { set.seed(123, "L'Ecuyer-CMRG", "Inversion") seed <- get.seed() eseed <- c(407L , 1806547166L , -983674937L , 643431772L , 1162448557L , -959247990L , -133913213L) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/presta_data.R \name{presta_data} \alias{presta_data} \title{Extract order data from Prestashop} \usage{ presta_data( token, hostname, endpoint = "orders", id_column = "id", ids = NULL, group_dim = 100, include_nested = F, verb...
/man/presta_data.Rd
no_license
Ander-LIN3S/prestashopR
R
false
true
1,346
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/presta_data.R \name{presta_data} \alias{presta_data} \title{Extract order data from Prestashop} \usage{ presta_data( token, hostname, endpoint = "orders", id_column = "id", ids = NULL, group_dim = 100, include_nested = F, verb...
# import libraries library(stringdist) library(data.table) library(stringi) library(stringr) # define function: make capitalization proper case toproper <- function(x) ifelse(!is.na(x), paste0(toupper(substr(x, 1, 1)), tolower(substring(x, 2))),NA) # define function: remove '\xa0' chars and non-conforming punc...
/tpt_text_cleaning.r
permissive
Jegelewicz/tpt-acari
R
false
false
2,127
r
# import libraries library(stringdist) library(data.table) library(stringi) library(stringr) # define function: make capitalization proper case toproper <- function(x) ifelse(!is.na(x), paste0(toupper(substr(x, 1, 1)), tolower(substring(x, 2))),NA) # define function: remove '\xa0' chars and non-conforming punc...
head(PlateSize)
/inst/snippets/Exploration10.1.2.R
no_license
rpruim/ISIwithR
R
false
false
17
r
head(PlateSize)
preproc <- function(x, y=NULL,method="log",add=1) { ## ------------------------------------------------------------ ## TIC normalisation TICnorm <- function(x,y=NULL){ scale <- apply(x, 1,function(x) sum(x,na.rm=T)) if(!is.null(y)){ grpm = as.vector(by(scale,y,mean)) grpm = grpm - mean(sc...
/R/preproc.R
no_license
tonedivad/FIEmspro
R
false
false
1,911
r
preproc <- function(x, y=NULL,method="log",add=1) { ## ------------------------------------------------------------ ## TIC normalisation TICnorm <- function(x,y=NULL){ scale <- apply(x, 1,function(x) sum(x,na.rm=T)) if(!is.null(y)){ grpm = as.vector(by(scale,y,mean)) grpm = grpm - mean(sc...
# This script imports crashes from the UK, subsets them to high severity crashes, finds clusters of crashes and exports to kml require (sp) require (rgdal) require (fossil) require (plyr) #2005 to 2012 crash data in the UK fileIn = "./Input/Accidents0512.csv" # read in data input12 = read.csv (fileIn, stringsAsFacto...
/scripts/a_crash.R
no_license
finbarr/safespeedo
R
false
false
2,835
r
# This script imports crashes from the UK, subsets them to high severity crashes, finds clusters of crashes and exports to kml require (sp) require (rgdal) require (fossil) require (plyr) #2005 to 2012 crash data in the UK fileIn = "./Input/Accidents0512.csv" # read in data input12 = read.csv (fileIn, stringsAsFacto...
library(smds) ### Name: oil.idiss ### Title: Interval-valued dissimilarity data based on Ichino's fats and ### oil data ### Aliases: oil.idiss ### Keywords: datasets ### ** Examples data(oil.idiss)
/data/genthat_extracted_code/smds/examples/oil.idiss.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
208
r
library(smds) ### Name: oil.idiss ### Title: Interval-valued dissimilarity data based on Ichino's fats and ### oil data ### Aliases: oil.idiss ### Keywords: datasets ### ** Examples data(oil.idiss)
library(ProfileLikelihood) ### Name: profilelike.polr ### Title: Profile Likelihood for Proportional Odds Models ### Aliases: profilelike.polr ### ** Examples data(datapolr) datapolr$y <- as.factor(datapolr$y) xx <- profilelike.polr(y ~ x1 + x2, data=datapolr, profile.theta="group", method="logistic", lo.theta...
/data/genthat_extracted_code/ProfileLikelihood/examples/profilelike.polr.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
435
r
library(ProfileLikelihood) ### Name: profilelike.polr ### Title: Profile Likelihood for Proportional Odds Models ### Aliases: profilelike.polr ### ** Examples data(datapolr) datapolr$y <- as.factor(datapolr$y) xx <- profilelike.polr(y ~ x1 + x2, data=datapolr, profile.theta="group", method="logistic", lo.theta...
#' This script is a function to create and save biplots #' comparing sourcing data for obsidian. #' Original Created: 2.2.2018 #' Latest version: 2.5.2018 #' Author: Robert J. Bischoff #' Dependent package: ggplot2 ############################################################################################# # Create ...
/R/AllBiplotsFunction.R
no_license
bischrob/ElementSourcing
R
false
false
3,912
r
#' This script is a function to create and save biplots #' comparing sourcing data for obsidian. #' Original Created: 2.2.2018 #' Latest version: 2.5.2018 #' Author: Robert J. Bischoff #' Dependent package: ggplot2 ############################################################################################# # Create ...
BiocManager::install("DESeq2") BiocManager::install("DEFormats") BiocManager::install("edgeR") #Packages----------------------- library("DESeq2") library("DEFormats") library("edgeR") library("pheatmap") library("ggplot2") library("cluster") library("factoextra") #Data loading------------------- rm(list=ls()) dev.off...
/Script/2020-Parent_Transcriptomics.R
no_license
gjparent/2021-Connecting_phenotypes_genotypes_MolEcol
R
false
false
6,103
r
BiocManager::install("DESeq2") BiocManager::install("DEFormats") BiocManager::install("edgeR") #Packages----------------------- library("DESeq2") library("DEFormats") library("edgeR") library("pheatmap") library("ggplot2") library("cluster") library("factoextra") #Data loading------------------- rm(list=ls()) dev.off...
# Packages -------------------- library(bibtex) library(metafor) library(grid) library(gridExtra) library(lme4) library(ggplot2) library(downloader) library(knitr) library(tinytex) # Source function scripts ----------- source("R/data_processing.R") source("R/figures.R") source("R/model.R") source("R/plots.R") source(...
/analysis.R
permissive
dindiarto/Growth_trait_metaanalysis
R
false
false
3,121
r
# Packages -------------------- library(bibtex) library(metafor) library(grid) library(gridExtra) library(lme4) library(ggplot2) library(downloader) library(knitr) library(tinytex) # Source function scripts ----------- source("R/data_processing.R") source("R/figures.R") source("R/model.R") source("R/plots.R") source(...
library(ggplot2) library(tibble) library(gridExtra) library(grid) GeomCustom <- ggproto( "GeomCustom", Geom, setup_data = function(self, data, params) { data <- ggproto_parent(Geom, self)$setup_data(data, params) data }, draw_group = function(data, panel_scales, coord) { vp <- grid::viewport(x...
/R/helper_functions/geom_grob.R
no_license
nevrome/neomod_analysis
R
false
false
1,341
r
library(ggplot2) library(tibble) library(gridExtra) library(grid) GeomCustom <- ggproto( "GeomCustom", Geom, setup_data = function(self, data, params) { data <- ggproto_parent(Geom, self)$setup_data(data, params) data }, draw_group = function(data, panel_scales, coord) { vp <- grid::viewport(x...
#' Process PCA Precipitation data before merging with survey data. #' #' @param x Output PCA data (from SAS). #' @description For use with SAS data. #' #' @export process_precip_PCA_data <- function(data) { data$Location %<>% factor data$Date %<>% as.Date data %>% setnames("Factor1", "P1") %>% setnames("Factor2...
/R/process_precip_PCA_data.R
no_license
ksauby/modresproc
R
false
false
1,180
r
#' Process PCA Precipitation data before merging with survey data. #' #' @param x Output PCA data (from SAS). #' @description For use with SAS data. #' #' @export process_precip_PCA_data <- function(data) { data$Location %<>% factor data$Date %<>% as.Date data %>% setnames("Factor1", "P1") %>% setnames("Factor2...
varNames<-read.table("household_power_consumption.txt",sep=";",nrow=1); var<-sapply(varNames,toString); dataDay<-read.table("household_power_consumption.txt",sep=";",skip=1,colClasses=c(NA, "NULL","NULL","NULL","NULL","NULL","NULL","NULL","NULL")); dataDay<-as.Date(dataDay[,1],"%d/%m/%Y"); date1=as.Date("1/2/200...
/plot2.R
no_license
hsalami/ExData_Plotting1
R
false
false
808
r
varNames<-read.table("household_power_consumption.txt",sep=";",nrow=1); var<-sapply(varNames,toString); dataDay<-read.table("household_power_consumption.txt",sep=";",skip=1,colClasses=c(NA, "NULL","NULL","NULL","NULL","NULL","NULL","NULL","NULL")); dataDay<-as.Date(dataDay[,1],"%d/%m/%Y"); date1=as.Date("1/2/200...
### # Do a plot of the Global Active Power # of electric power consumption for one household over 2 days # measured in in kilowatts ### library(lubridate) library(dplyr) # set local explicitly to US English Sys.setlocale("LC_TIME","English_United States.1252") # define some variables for later use mainDir <- getwd() ...
/plot2.R
no_license
dreammaster38/ExData_Plotting1
R
false
false
2,610
r
### # Do a plot of the Global Active Power # of electric power consumption for one household over 2 days # measured in in kilowatts ### library(lubridate) library(dplyr) # set local explicitly to US English Sys.setlocale("LC_TIME","English_United States.1252") # define some variables for later use mainDir <- getwd() ...
# This function is used in unit testing to skip tests if the config file is missing # skip_if_missing_config <- function(f){ if(!file.exists(f)) { msg <- paste("To run tests, add a file ~/.azureml/settings.json containing AzureML keys.", "See ?workspace for help", sep = "\n...
/AzureML/R/zzz_test_helpers.R
no_license
ingted/R-Examples
R
false
false
403
r
# This function is used in unit testing to skip tests if the config file is missing # skip_if_missing_config <- function(f){ if(!file.exists(f)) { msg <- paste("To run tests, add a file ~/.azureml/settings.json containing AzureML keys.", "See ?workspace for help", sep = "\n...
if(!require(devtools)){install.packages("devtools")}; require(devtools) devtools::install_github("dkahle/ggmap", ref="tidyup");require(ggmap) # 2.7ver. if(!require(googleway)){install.packages("googleway")}; require(googleway) if(!require(ggplot2)){install.packages("ggplot2")}; require(ggplot2) if(!require(raster)){i...
/src/seoul_map.R
no_license
chamchi-kimbap/La-La-Land
R
false
false
1,506
r
if(!require(devtools)){install.packages("devtools")}; require(devtools) devtools::install_github("dkahle/ggmap", ref="tidyup");require(ggmap) # 2.7ver. if(!require(googleway)){install.packages("googleway")}; require(googleway) if(!require(ggplot2)){install.packages("ggplot2")}; require(ggplot2) if(!require(raster)){i...
#' #' Box-Cox Formula #' #' #' #' Box-Cox estimation #' #' @param formula object of type formula with the model to transform #' #' @param data an optional data frame containing the variables in the model #' #' @param \dots additional arguments to be passed to the estimation function; see bcxEst() #' #' @return an obj...
/Sandbox/Old object possibilities/bx_cx.formula.R
no_license
akreutzmann/trafo
R
false
false
878
r
#' #' Box-Cox Formula #' #' #' #' Box-Cox estimation #' #' @param formula object of type formula with the model to transform #' #' @param data an optional data frame containing the variables in the model #' #' @param \dots additional arguments to be passed to the estimation function; see bcxEst() #' #' @return an obj...
library(MAINT.Data) ### Name: Robda-methods ### Title: Robust Discriminant Analysis of Interval Data ### Aliases: Roblda Roblda-methods Roblda,IData-method Robqda ### Robqda-methods Robqda,IData-method ### Keywords: methods Interval Data Discriminant Analysis Interval Data ### ** Examples # Create an Interval-Dat...
/data/genthat_extracted_code/MAINT.Data/examples/Robda-methods.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,779
r
library(MAINT.Data) ### Name: Robda-methods ### Title: Robust Discriminant Analysis of Interval Data ### Aliases: Roblda Roblda-methods Roblda,IData-method Robqda ### Robqda-methods Robqda,IData-method ### Keywords: methods Interval Data Discriminant Analysis Interval Data ### ** Examples # Create an Interval-Dat...
# anaesthesia in th muscle,blood,liver # muscle M, blood B and liver L # parameter e is the efflux from the muscle, c is the clearance from the blood, and δ is the degradation in the liver # 3 simultaneous equations: # dM/dt = -e*M # dB/dt = e*M - c*B # dL/dt = c*B - delta*L # Parameters: e,c,delta library(deSolve...
/rootSolve/Muscle_blood_Liver.r
no_license
swetaleena2206/systems_biology
R
false
false
1,260
r
# anaesthesia in th muscle,blood,liver # muscle M, blood B and liver L # parameter e is the efflux from the muscle, c is the clearance from the blood, and δ is the degradation in the liver # 3 simultaneous equations: # dM/dt = -e*M # dB/dt = e*M - c*B # dL/dt = c*B - delta*L # Parameters: e,c,delta library(deSolve...
library(NISTunits) ### Name: NISTkilocalITtOjoule ### Title: Convert kilocalorieIT to joule ### Aliases: NISTkilocalITtOjoule ### Keywords: programming ### ** Examples NISTkilocalITtOjoule(10)
/data/genthat_extracted_code/NISTunits/examples/NISTkilocalITtOjoule.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
200
r
library(NISTunits) ### Name: NISTkilocalITtOjoule ### Title: Convert kilocalorieIT to joule ### Aliases: NISTkilocalITtOjoule ### Keywords: programming ### ** Examples NISTkilocalITtOjoule(10)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/viz_htwt.R \name{viz_htwt} \alias{viz_htwt} \title{Height and Weight graphing function.} \usage{ viz_htwt(p, category, sex, inf_only = FALSE, percentiles = c("P3", "P50", "P97")) } \arguments{ \item{p}{a ggplot object.} \item{category}{"WT...
/man/viz_htwt.Rd
permissive
jadonwagstaff/pkpd
R
false
true
1,853
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/viz_htwt.R \name{viz_htwt} \alias{viz_htwt} \title{Height and Weight graphing function.} \usage{ viz_htwt(p, category, sex, inf_only = FALSE, percentiles = c("P3", "P50", "P97")) } \arguments{ \item{p}{a ggplot object.} \item{category}{"WT...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utility.R \name{smog.default} \alias{smog.default} \alias{smog.formula} \title{Generalized linear model constraint on hierarchical structure by using overlapped group penalty} \usage{ \method{smog}{default}(x, y, g, v, lambda, hierarchy, fami...
/man/smog.default.Rd
no_license
chongma1989/smog
R
false
true
9,034
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utility.R \name{smog.default} \alias{smog.default} \alias{smog.formula} \title{Generalized linear model constraint on hierarchical structure by using overlapped group penalty} \usage{ \method{smog}{default}(x, y, g, v, lambda, hierarchy, fami...
## Function for preparing the data #@param level which level to prepare it for (0 is the whole tree) #@param lvl.inc which levels to include (e.g. 1 and 2 for the super orders and the orders) #@param clades the clade levels list #@param space the space #@param dim the dimensions to include #@param consensus the consens...
/Functions/prep.data.R
no_license
TGuillerme/elaboration_exploration_bird_beaks
R
false
false
5,345
r
## Function for preparing the data #@param level which level to prepare it for (0 is the whole tree) #@param lvl.inc which levels to include (e.g. 1 and 2 for the super orders and the orders) #@param clades the clade levels list #@param space the space #@param dim the dimensions to include #@param consensus the consens...
context("metab_bayes") # # NB: these lines work within testthat() calls: # skip() # skip_on_cran() # skip_on_travis() # skip_on_appveyor() # skip_if_not_installed('deSolve') manual_test4 <- function() { library(streamMetabolizer) library(testthat) library(dplyr) library(tidyr) library(gridExtra) librar...
/tests/testthat/test-metab_bayes.R
permissive
lsdeel/streamMetabolizer
R
false
false
18,502
r
context("metab_bayes") # # NB: these lines work within testthat() calls: # skip() # skip_on_cran() # skip_on_travis() # skip_on_appveyor() # skip_if_not_installed('deSolve') manual_test4 <- function() { library(streamMetabolizer) library(testthat) library(dplyr) library(tidyr) library(gridExtra) librar...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fonctions_complementaires.R \name{prep_tb} \alias{prep_tb} \title{Fonction de tableaux de bord Mise en forme du tableau -> remplacement des lignes vides par '-'} \usage{ prep_tb(tab) } \arguments{ \item{tab}{tableau résultats de table/tapply ...
/man/prep_tb.Rd
no_license
24p11/dimRactivite
R
false
true
495
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fonctions_complementaires.R \name{prep_tb} \alias{prep_tb} \title{Fonction de tableaux de bord Mise en forme du tableau -> remplacement des lignes vides par '-'} \usage{ prep_tb(tab) } \arguments{ \item{tab}{tableau résultats de table/tapply ...
# Sidebar panel for inputs sidebar_inputs <- function() { sidebarPanel( tabsetPanel( tabPanel( title = "Upload Data", radioButtons( "sample_or_real", label = h4("Which Data to Use?"), choices = list( "Sample Data" = "sample", "Upload from...
/R/ui_sidebar_inputs.R
no_license
rmetaverse/eviatlas
R
false
false
3,047
r
# Sidebar panel for inputs sidebar_inputs <- function() { sidebarPanel( tabsetPanel( tabPanel( title = "Upload Data", radioButtons( "sample_or_real", label = h4("Which Data to Use?"), choices = list( "Sample Data" = "sample", "Upload from...
rankhospital <- function(state, outcome, num="best") { ## Read outcome data data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") ## Check that state and outcome are valid if (!(outcome %in% c("heart attack", "heart failure", "pneumonia"))) { ...
/week4/ProgrammingAssignment3/rankhospital.R
permissive
rajeshb/DataScience
R
false
false
1,595
r
rankhospital <- function(state, outcome, num="best") { ## Read outcome data data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") ## Check that state and outcome are valid if (!(outcome %in% c("heart attack", "heart failure", "pneumonia"))) { ...
library(ape) testtree <- read.tree("2775_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2775_0_unrooted.txt")
/codeml_files/newick_trees_processed/2775_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("2775_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="2775_0_unrooted.txt")
############################################################################################### # program name : PRS_UKB_201711_step11-01_inner-join_summedPRS-across-all-traits_PCs_impCov.R # modifiied from : zPRS_UKB_201711_step11_inner-join-PRS-across-phenotypes-PC-impCov-remapID.sh # purpose : # (...
/scripts/PRS_UKB_201711_step11-01_inner-join_summedPRS-across-all-traits_PCs_impCov.R
no_license
yanch86/PhD_polygenic_risk_score_analysis
R
false
false
12,485
r
############################################################################################### # program name : PRS_UKB_201711_step11-01_inner-join_summedPRS-across-all-traits_PCs_impCov.R # modifiied from : zPRS_UKB_201711_step11_inner-join-PRS-across-phenotypes-PC-impCov-remapID.sh # purpose : # (...
#' Calculate relative humidity of air #' #' @details #' #' `rh_from_tdb_rhov_lbnd0c()` calculates relative humidity of air from dry-bulb #' temperature (in Celsius) and vapor density (in kg/m3). The name signifies #' derivation and temperatures were used with 0C as minimum. #' #' `rh_from_tdb_rhov()` calculates relativ...
/R/relative_humidity.R
permissive
hongyuanjia/psychro
R
false
false
2,083
r
#' Calculate relative humidity of air #' #' @details #' #' `rh_from_tdb_rhov_lbnd0c()` calculates relative humidity of air from dry-bulb #' temperature (in Celsius) and vapor density (in kg/m3). The name signifies #' derivation and temperatures were used with 0C as minimum. #' #' `rh_from_tdb_rhov()` calculates relativ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/f7Popup.R \name{f7Popup} \alias{f7Popup} \title{Create a f7 popup} \usage{ f7Popup( ..., id, title, backdrop = TRUE, closeByBackdropClick = TRUE, closeOnEscape = FALSE, animate = TRUE, swipeToClose = FALSE ) } \arguments{ \ite...
/man/f7Popup.Rd
no_license
pvictor/shinyMobile
R
false
true
1,923
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/f7Popup.R \name{f7Popup} \alias{f7Popup} \title{Create a f7 popup} \usage{ f7Popup( ..., id, title, backdrop = TRUE, closeByBackdropClick = TRUE, closeOnEscape = FALSE, animate = TRUE, swipeToClose = FALSE ) } \arguments{ \ite...
palette <- function(start, end, length) { r_1 <- col2rgb(start)[1]/255 r_2 <- col2rgb(end)[1]/255 g_1 <- col2rgb(start)[2]/255 g_2 <- col2rgb(end)[2]/255 b_1 <- col2rgb(start)[3]/255 b_2 <- col2rgb(end)[3]/255 out <- cbind(seq(r_1, r_2, length.out = length),seq(g_1, g_2, length.out = length),seq(b_1, b_2,...
/Code and data/palette.R
no_license
EllaKaye/ABC
R
false
false
356
r
palette <- function(start, end, length) { r_1 <- col2rgb(start)[1]/255 r_2 <- col2rgb(end)[1]/255 g_1 <- col2rgb(start)[2]/255 g_2 <- col2rgb(end)[2]/255 b_1 <- col2rgb(start)[3]/255 b_2 <- col2rgb(end)[3]/255 out <- cbind(seq(r_1, r_2, length.out = length),seq(g_1, g_2, length.out = length),seq(b_1, b_2,...
## ## Brand Tweets Analysis ## ## Data Set - 300 Tweets about McDonald's, 300 about Wendy's ## ## Goal: Determine some sort of sentiment score for each brand ## to give insights in consumer thoughts ## library(tidytext) source("sample_code/r_samples/tweets_analysis/tweets_utils.R") ## ## Data Ingestion and Prep...
/r_samples/tweets_analysis/tweets_sentiment_analysis.R
no_license
will-data-science/sample_code
R
false
false
2,652
r
## ## Brand Tweets Analysis ## ## Data Set - 300 Tweets about McDonald's, 300 about Wendy's ## ## Goal: Determine some sort of sentiment score for each brand ## to give insights in consumer thoughts ## library(tidytext) source("sample_code/r_samples/tweets_analysis/tweets_utils.R") ## ## Data Ingestion and Prep...
## Exploratory Data Analysis ## Course project 1 Plot2 ## reading csv file rawData <- read.csv( "household_power_consumption.txt", sep=";", dec=".", na.strings = "?", colClasses=c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric") ) ...
/plot2.R
no_license
Lothje/Exploratory-data-analysis-Assign1
R
false
false
925
r
## Exploratory Data Analysis ## Course project 1 Plot2 ## reading csv file rawData <- read.csv( "household_power_consumption.txt", sep=";", dec=".", na.strings = "?", colClasses=c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric") ) ...
#' Load local phytoplankton cell count file #' #' @param xlsx chr string path for local excel file, to overwrite if not current #' @param download_latest logical passed to \code{\link{read_dlcurrent}} to download raw data and compare with existing in \code{xlsx} if available #' @param na chr vector of strings to interp...
/R/read_importphyto.R
permissive
tbep-tech/tbeptools
R
false
false
1,795
r
#' Load local phytoplankton cell count file #' #' @param xlsx chr string path for local excel file, to overwrite if not current #' @param download_latest logical passed to \code{\link{read_dlcurrent}} to download raw data and compare with existing in \code{xlsx} if available #' @param na chr vector of strings to interp...
# * Bar Charts are useful when need to plot categorical data. # * Bar Charts are different from Histograms. # * In Bar Charts, the horizontal axis (x) list categories. # * In Histograms, the horizontal axis (x) contains ranges of numbers that represent a continuum (e.g. 0-10, 10-20, 20-30) # * In Bar Charts, there is s...
/02.1 Bar Charts.R
permissive
freddyiniguez/BigDataZacatecas
R
false
false
1,526
r
# * Bar Charts are useful when need to plot categorical data. # * Bar Charts are different from Histograms. # * In Bar Charts, the horizontal axis (x) list categories. # * In Histograms, the horizontal axis (x) contains ranges of numbers that represent a continuum (e.g. 0-10, 10-20, 20-30) # * In Bar Charts, there is s...
context("neuronlist") test_that("as.neuronlist behaves", { n14=Cell07PNs[1:4] df=attr(n14,'df') expect_equal(as.neuronlist(n14, df = df), n14) # check that we can make names null or empty and all OK n14.nonames=n14 names(n14.nonames)=NULL expect_equal(as.neuronlist(n14.nonames, df=df), n14) names(n14.n...
/tests/testthat/test-neuronlist.R
no_license
michaeljohndolan/nat
R
false
false
6,181
r
context("neuronlist") test_that("as.neuronlist behaves", { n14=Cell07PNs[1:4] df=attr(n14,'df') expect_equal(as.neuronlist(n14, df = df), n14) # check that we can make names null or empty and all OK n14.nonames=n14 names(n14.nonames)=NULL expect_equal(as.neuronlist(n14.nonames, df=df), n14) names(n14.n...
########################################################### ##Code corresponding to activities in course: ##Introduction to Data Science Using R ##_Your_Name_Here_ ##August 7-8, 2017 ########################################################### ########################################################### ##Objects and Co...
/starterFile (1).R
no_license
mwschultz/RApp
R
false
false
7,855
r
########################################################### ##Code corresponding to activities in course: ##Introduction to Data Science Using R ##_Your_Name_Here_ ##August 7-8, 2017 ########################################################### ########################################################### ##Objects and Co...
#' rhtmlMoonPlot #' #' Uses correspondence analysis to create a Moon Plot #' #' @author Po Liu <po.liu@displayr.com> #' #' @source https://github.com/Displayr/rhtmlMoonPlot #' #' @param coreNodes : Coordinates of nodes in the center of the moon (assumes coreNodes is transformed output of MASS::corresp then $rscore[, 1:...
/R/rhtmlMoonPlot.R
no_license
CelloHealthInsight/rhtmlMoonPlot
R
false
false
6,422
r
#' rhtmlMoonPlot #' #' Uses correspondence analysis to create a Moon Plot #' #' @author Po Liu <po.liu@displayr.com> #' #' @source https://github.com/Displayr/rhtmlMoonPlot #' #' @param coreNodes : Coordinates of nodes in the center of the moon (assumes coreNodes is transformed output of MASS::corresp then $rscore[, 1:...
## Geolocation analysis with Open Source Tools ## 2016 North American Ornithological Congress, Washington D.C. ## Sponsored by: ## Migrate Technology LLC.-- www.migratetech.co.uk ## The Cooper Ornithological Society ## The National Science Foundation #--------------------------------------------------------------...
/SGAT_analysis_NoMask.R
no_license
Eli-S-Bridge/NAOC_Geos_2016
R
false
false
11,146
r
## Geolocation analysis with Open Source Tools ## 2016 North American Ornithological Congress, Washington D.C. ## Sponsored by: ## Migrate Technology LLC.-- www.migratetech.co.uk ## The Cooper Ornithological Society ## The National Science Foundation #--------------------------------------------------------------...
run_analysis <- function() { require(data.table) require(dplyr) # read files # activity_tables is a list of activities (length=6) # features is a list of measuements and summaries (length=561), # corresponding to the columns of X.test and X.train activity.labels <<- read.table("activ...
/run_analysis.R
no_license
aeschreiner/GetDataAssignment
R
false
false
3,196
r
run_analysis <- function() { require(data.table) require(dplyr) # read files # activity_tables is a list of activities (length=6) # features is a list of measuements and summaries (length=561), # corresponding to the columns of X.test and X.train activity.labels <<- read.table("activ...
#' Discrete Survival Analysis #' #' Includes functions for data transformations, estimation, evaluation and #' simulation of discrete survival analysis. The most important functions are listed below: \itemize{ #' \item\code{\link{contToDisc}}: Discretizes continuous time variable into a #' specified grid of censo...
/R/discSurv-package.R
no_license
cran/discSurv
R
false
false
2,959
r
#' Discrete Survival Analysis #' #' Includes functions for data transformations, estimation, evaluation and #' simulation of discrete survival analysis. The most important functions are listed below: \itemize{ #' \item\code{\link{contToDisc}}: Discretizes continuous time variable into a #' specified grid of censo...
#' Get a IUCN Redlist taxon #' #' @export #' @param x (character) A vector of common or scientific names #' @param messages logical; should progress be printed? #' @param key (character) required. you IUCN Redlist API key. See #' [rredlist::rredlist-package] for help on authenticating with #' IUCN Redlist #' @param che...
/R/get_iucn.R
permissive
fuyanli-UHM/taxize
R
false
false
5,037
r
#' Get a IUCN Redlist taxon #' #' @export #' @param x (character) A vector of common or scientific names #' @param messages logical; should progress be printed? #' @param key (character) required. you IUCN Redlist API key. See #' [rredlist::rredlist-package] for help on authenticating with #' IUCN Redlist #' @param che...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/met2CF.AmerifluxLBL.R \name{met2CF.AmerifluxLBL} \alias{met2CF.AmerifluxLBL} \title{met2CF.AmerifluxLBL} \usage{ met2CF.AmerifluxLBL(in.path, in.prefix, outfolder, start_date, end_date, format, overwrite = FALSE, verbose = FALSE, ...) } \ar...
/modules/data.atmosphere/man/met2CF.AmerifluxLBL.Rd
permissive
annethomas/pecan
R
false
true
944
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/met2CF.AmerifluxLBL.R \name{met2CF.AmerifluxLBL} \alias{met2CF.AmerifluxLBL} \title{met2CF.AmerifluxLBL} \usage{ met2CF.AmerifluxLBL(in.path, in.prefix, outfolder, start_date, end_date, format, overwrite = FALSE, verbose = FALSE, ...) } \ar...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818252170339e+295, 1.22810546528174e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual...
/CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615830757-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
362
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818252170339e+295, 1.22810546528174e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual...
# Cargar base de datos CEP<-readRDS("Data/IntermediateData/CEP-editada.rds") # ---- 1. ANÁLISIS ESTADÍSTICO DESCRIPTIVO ---- # Tabla 1. Estadísticos Descriptivos índice justificación protestas tabla1 <- descr(CEP$Protesta, stats = c("min","max","med","mean","q1","q3","sd"), transpose...
/Scripts/Analysis/3-construccion-resultados.R
no_license
Crismoc/flujo_reproducible
R
false
false
1,358
r
# Cargar base de datos CEP<-readRDS("Data/IntermediateData/CEP-editada.rds") # ---- 1. ANÁLISIS ESTADÍSTICO DESCRIPTIVO ---- # Tabla 1. Estadísticos Descriptivos índice justificación protestas tabla1 <- descr(CEP$Protesta, stats = c("min","max","med","mean","q1","q3","sd"), transpose...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/gng.R \name{meanError} \alias{meanError} \title{meanError} \usage{ meanError(object) } \arguments{ \item{object}{GNG object} } \description{ Gets mean error of the graph (note: blocks the execution, O(n)) } \examples{ gng <- GNG(gng.p...
/man/meanError.Rd
no_license
Silveryu/gng.r
R
false
false
357
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/gng.R \name{meanError} \alias{meanError} \title{meanError} \usage{ meanError(object) } \arguments{ \item{object}{GNG object} } \description{ Gets mean error of the graph (note: blocks the execution, O(n)) } \examples{ gng <- GNG(gng.p...
\name{extractKeywordB} \alias{extractKeywordB} \title{ Extracts email with specified keyword in the email body text } \description{ This function extracts email data with specific keyword in the body message } \usage{ extractKeywordB(username, password, kw, nmail = -1) } \arguments{ \item{username}{ A character stri...
/man/extractKeywordB.Rd
no_license
jaynal83/edeR
R
false
false
1,338
rd
\name{extractKeywordB} \alias{extractKeywordB} \title{ Extracts email with specified keyword in the email body text } \description{ This function extracts email data with specific keyword in the body message } \usage{ extractKeywordB(username, password, kw, nmail = -1) } \arguments{ \item{username}{ A character stri...
\name{assets} \alias{assets} \docType{data} \title{Returns of the daily closing prices of assets, Standard and Poors 500 Index and T-bill rates} \description{Returns for all the trading days from November 1, 1993 to April 3, 2003.} \usage{data("assets")} \format{ A data frame with 2363 observations on the fo...
/man/assets.Rd
no_license
HELENBENADUCE/sym.arma
R
false
false
1,182
rd
\name{assets} \alias{assets} \docType{data} \title{Returns of the daily closing prices of assets, Standard and Poors 500 Index and T-bill rates} \description{Returns for all the trading days from November 1, 1993 to April 3, 2003.} \usage{data("assets")} \format{ A data frame with 2363 observations on the fo...
rm(list=ls()) # Clear workspace graphics.off() # Clear plots cat("\014") # Clear console ######## PACKAGES ############# library(dplyr) library(ampvis2) library(readxl) library(stringr) ######## FUNCTIONS ############ gtdb_formatted = function(test) { m1 = c() for(i in 1:nrow(test)) { if(test[i,4] == tes...
/WWTP_sequences/ClassificationOutputToAmpvis/2021-02-08_Kraken2_Taxclass_to_ampvisCSV.R
no_license
FPlatz95/master_thesis
R
false
false
10,773
r
rm(list=ls()) # Clear workspace graphics.off() # Clear plots cat("\014") # Clear console ######## PACKAGES ############# library(dplyr) library(ampvis2) library(readxl) library(stringr) ######## FUNCTIONS ############ gtdb_formatted = function(test) { m1 = c() for(i in 1:nrow(test)) { if(test[i,4] == tes...
#' Add authorized user for application #' #' @param username The user name. #' @param password The password. #' @param appDir Directory containing application. Defaults to current working directory. #' @examples #' \dontrun{ #' #' # add a user (prompts for password) #' addAuthroizedUser("andy") #' #' # add a user us...
/R/auth.R
no_license
gergness/shinyapps
R
false
false
5,682
r
#' Add authorized user for application #' #' @param username The user name. #' @param password The password. #' @param appDir Directory containing application. Defaults to current working directory. #' @examples #' \dontrun{ #' #' # add a user (prompts for password) #' addAuthroizedUser("andy") #' #' # add a user us...
library(testthat) credential <- retrieve_credential_testing(project_id = 2603L) update_expectation <- FALSE test_that("smoke test", { testthat::skip_on_cran() returned_object <- redcap_read( redcap_uri = credential$redcap_uri, token = credential$token, verbose = FALSE ...
/tests/testthat/test-read-batch-repeating-sparse.R
permissive
OuhscBbmc/REDCapR
R
false
false
5,414
r
library(testthat) credential <- retrieve_credential_testing(project_id = 2603L) update_expectation <- FALSE test_that("smoke test", { testthat::skip_on_cran() returned_object <- redcap_read( redcap_uri = credential$redcap_uri, token = credential$token, verbose = FALSE ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nest_dt.R \name{nest_dt} \alias{nest_dt} \alias{unnest_dt} \alias{squeeze_dt} \alias{chop_dt} \alias{unchop_dt} \title{Nest and unnest} \usage{ nest_dt(.data, ..., mcols = NULL, .name = "ndt") unnest_dt(.data, ...) squeeze_dt(.data, ..., .n...
/man/nest.Rd
permissive
hope-data-science/tidyfst
R
false
true
3,311
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nest_dt.R \name{nest_dt} \alias{nest_dt} \alias{unnest_dt} \alias{squeeze_dt} \alias{chop_dt} \alias{unchop_dt} \title{Nest and unnest} \usage{ nest_dt(.data, ..., mcols = NULL, .name = "ndt") unnest_dt(.data, ...) squeeze_dt(.data, ..., .n...
##Guillermo F Programming Assignment 2 functions. ##Creates a "matrix" object that can cache its inverse makeCacheMatrix<-function(x = matrix()){ m <- NULL set <- function(y){ x <<- y m <<- NULL } get <- function() x setsolve <- function(solve) m <<- solve getsolve <- function() m list(set = set,...
/cachematrix.R
no_license
Guillejof/ProgrammingAssignment2
R
false
false
629
r
##Guillermo F Programming Assignment 2 functions. ##Creates a "matrix" object that can cache its inverse makeCacheMatrix<-function(x = matrix()){ m <- NULL set <- function(y){ x <<- y m <<- NULL } get <- function() x setsolve <- function(solve) m <<- solve getsolve <- function() m list(set = set,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{ref_agemat} \alias{ref_agemat} \title{agemat.} \format{ \describe{ \item{species}{Name of the functional groups given as character string. The names match with the column 'LongName' in the functionalGroups.csv file...
/man/ref_agemat.Rd
no_license
hollyannperryman/atlantistools
R
false
true
431
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{ref_agemat} \alias{ref_agemat} \title{agemat.} \format{ \describe{ \item{species}{Name of the functional groups given as character string. The names match with the column 'LongName' in the functionalGroups.csv file...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/games.R \name{sample_degseq} \alias{sample_degseq} \alias{degree.sequence.game} \alias{degseq} \title{Generate random graphs with a given degree sequence} \usage{ sample_degseq(out.deg, in.deg = NULL, method = c("simple", "vl", "simple.no.m...
/man/sample_degseq.Rd
no_license
andresrabinovich/igraph
R
false
true
3,697
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/games.R \name{sample_degseq} \alias{sample_degseq} \alias{degree.sequence.game} \alias{degseq} \title{Generate random graphs with a given degree sequence} \usage{ sample_degseq(out.deg, in.deg = NULL, method = c("simple", "vl", "simple.no.m...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
/r/tests/testthat/helper-data.R
permissive
projjal/arrow
R
false
false
4,440
r
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#' @importFrom ggplot2 aes #' @importFrom ggplot2 aes_string #' @importFrom ggplot2 geom_bar #' @importFrom ggplot2 geom_text #' @importFrom ggplot2 ggplot #' @importFrom ggplot2 guides #' @importFrom ggplot2 labs #' @importFrom ggplot2 scale_fill_discrete #' @importFrom ggplot2 theme # annotate a bar plot add_annotat...
/R/add_annotation_to_bars.R
no_license
xtmgah/inspectdf
R
false
false
2,275
r
#' @importFrom ggplot2 aes #' @importFrom ggplot2 aes_string #' @importFrom ggplot2 geom_bar #' @importFrom ggplot2 geom_text #' @importFrom ggplot2 ggplot #' @importFrom ggplot2 guides #' @importFrom ggplot2 labs #' @importFrom ggplot2 scale_fill_discrete #' @importFrom ggplot2 theme # annotate a bar plot add_annotat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model_ph.R \name{ph.var} \alias{ph.var} \title{Variance of PH distribution} \usage{ ph.var(ph, ...) } \arguments{ \item{ph}{An instance of PH distribution} \item{...}{Others} } \value{ A value of variance } \description{ Compute the variance...
/man/ph.var.Rd
permissive
okamumu/mapfit
R
false
true
795
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model_ph.R \name{ph.var} \alias{ph.var} \title{Variance of PH distribution} \usage{ ph.var(ph, ...) } \arguments{ \item{ph}{An instance of PH distribution} \item{...}{Others} } \value{ A value of variance } \description{ Compute the variance...
######## Shiny APP ######## ### visByGene ### #'shiny interface to eQTL,HS,FP,TF files #'@import shiny #'@export runvisByGene<-function(){ myapp = system.file("shinyApps",package="visByGene") runApp(myapp) }
/R/runvisByGene.R
no_license
shwetagopaul92/visByGene
R
false
false
212
r
######## Shiny APP ######## ### visByGene ### #'shiny interface to eQTL,HS,FP,TF files #'@import shiny #'@export runvisByGene<-function(){ myapp = system.file("shinyApps",package="visByGene") runApp(myapp) }