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(caret) library(randomForest) train = read.csv("C:\\Users\\Administratorsha\\Desktop\\dima\\pml-training.csv", na.strings= c("NA",""," ")) test = read.csv("C:\\Users\\Administratorsha\\Desktop\\dima\\pml-testing.csv", na.strings= c("NA",""," ")) train_NAs <- apply(train, 2, function(x) {sum(is.na(x))}) train_n...
/final_project.R
no_license
DimaGuk/R_project
R
false
false
797
r
library(caret) library(randomForest) train = read.csv("C:\\Users\\Administratorsha\\Desktop\\dima\\pml-training.csv", na.strings= c("NA",""," ")) test = read.csv("C:\\Users\\Administratorsha\\Desktop\\dima\\pml-testing.csv", na.strings= c("NA",""," ")) train_NAs <- apply(train, 2, function(x) {sum(is.na(x))}) train_n...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{data_frame} \alias{data_frame} \title{Alternative to data.frame} \usage{ data_frame(..., stringsAsFactors = FALSE) } \arguments{ \item{...}{Named data frame columns, or data frames.} \item{stringsAsFactors}{Just leave it on \co...
/man/data_frame.Rd
permissive
r-lib/rcmdcheck
R
false
true
672
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{data_frame} \alias{data_frame} \title{Alternative to data.frame} \usage{ data_frame(..., stringsAsFactors = FALSE) } \arguments{ \item{...}{Named data frame columns, or data frames.} \item{stringsAsFactors}{Just leave it on \co...
# Pipeline_function -------------------------------------------------------- #' @title AutoScore STEP(i): Rank variables with machine learning (AutoScore Module 1) #' @param train_set A processed \code{data.frame} that contains data to be analyzed, for training. #' @param ntree Number of trees in the random forest a...
/R/AutoScore.R
no_license
nyilin/AutoScore
R
false
false
41,560
r
# Pipeline_function -------------------------------------------------------- #' @title AutoScore STEP(i): Rank variables with machine learning (AutoScore Module 1) #' @param train_set A processed \code{data.frame} that contains data to be analyzed, for training. #' @param ntree Number of trees in the random forest a...
############################################################################################## ## ## null_model.r ## Constructing null models for Network-Area relationships of the European terrestrial food webs across bioregions ## ## This script implements two null models for the scaling of network properties of the E...
/null_model.r
no_license
mlurgi/network-area-europe
R
false
false
13,912
r
############################################################################################## ## ## null_model.r ## Constructing null models for Network-Area relationships of the European terrestrial food webs across bioregions ## ## This script implements two null models for the scaling of network properties of the E...
############################################################################## # Calendar Heatmap # # by # # Paul Bleicher # ...
/calendarHeat.R
no_license
jgabriellima/segup
R
false
false
10,017
r
############################################################################## # Calendar Heatmap # # by # # Paul Bleicher # ...
library(ggplot2) data("diamonds") names(diamonds) ggplot(diamonds, aes(x = price)) + facet_wrap(~ color) + geom_histogram(aes(fill = cut)) + scale_fill_brewer(type = 'qual') ggplot(diamonds, aes(x= table, y = price)) + geom_point(aes(color = cut)) + scale_color_brewer(type = 'qual') ggplot(diamonds, aes(...
/lesson_8_problem_set.r
no_license
qchenevier/udacity_exploratory_data_analysis
R
false
false
1,457
r
library(ggplot2) data("diamonds") names(diamonds) ggplot(diamonds, aes(x = price)) + facet_wrap(~ color) + geom_histogram(aes(fill = cut)) + scale_fill_brewer(type = 'qual') ggplot(diamonds, aes(x= table, y = price)) + geom_point(aes(color = cut)) + scale_color_brewer(type = 'qual') ggplot(diamonds, aes(...
server <- function(input, output) { # BORING INIT ------------------------------------------------------------- # https://stackoverflow.com/questions/51956807/current-path-of-an-r-script # library(rprojroot) # folder_address = dirname(thisfile()) # script.dir <- dirname(sys.frame(1)$ofile) # https://stackov...
/Apps_Shiny/inspect_outliers/server.R
no_license
petteriTeikari/R-PLR
R
false
false
24,497
r
server <- function(input, output) { # BORING INIT ------------------------------------------------------------- # https://stackoverflow.com/questions/51956807/current-path-of-an-r-script # library(rprojroot) # folder_address = dirname(thisfile()) # script.dir <- dirname(sys.frame(1)$ofile) # https://stackov...
\name{getFunctionDefinition_method__TimeMap} \alias{getFunctionDefinition_method__TimeMap} \title{getFunctionDefinition method TimeMap} \description{extract the function definition (the R-function) } \arguments{ \item{object}{ } } \author{Carlos A. Sierra <csierra@bgc-jena.mpg.de>, Markus Mueller <mam...
/man/165.Rd
no_license
haiyangzhang798/SoilR
R
false
false
356
rd
\name{getFunctionDefinition_method__TimeMap} \alias{getFunctionDefinition_method__TimeMap} \title{getFunctionDefinition method TimeMap} \description{extract the function definition (the R-function) } \arguments{ \item{object}{ } } \author{Carlos A. Sierra <csierra@bgc-jena.mpg.de>, Markus Mueller <mam...
require(rtweet) api_key <- "YOUR KEY GOES HERE" api_secret_key <- "YOUR KEY GOES HERE" access_token <- "YOUR KEY GOES HERE" access_token_secret <- "YOUR KEY GOES HERE" token <- create_token( app = "YOUR APP NAME GOES HERE", consumer_key = api_key, consumer_secret = api_secret_key, access_token = access_token...
/istandwithdan_new_analysis_25_sept_2020.R
no_license
timothyjgraham/istandwithdan_hashtag_analysis
R
false
false
1,238
r
require(rtweet) api_key <- "YOUR KEY GOES HERE" api_secret_key <- "YOUR KEY GOES HERE" access_token <- "YOUR KEY GOES HERE" access_token_secret <- "YOUR KEY GOES HERE" token <- create_token( app = "YOUR APP NAME GOES HERE", consumer_key = api_key, consumer_secret = api_secret_key, access_token = access_token...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/conversion.R \name{as.matrix.spectra} \alias{as.matrix.spectra} \title{Convert spectra to matrix} \usage{ \method{as.matrix}{spectra}(spec, fix_names = "none") } \arguments{ \item{spec}{spectra object} \item{fix_names}{Use make.names to norm...
/man/as.matrix.spectra.Rd
no_license
annakat/casper_defunct
R
false
true
503
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/conversion.R \name{as.matrix.spectra} \alias{as.matrix.spectra} \title{Convert spectra to matrix} \usage{ \method{as.matrix}{spectra}(spec, fix_names = "none") } \arguments{ \item{spec}{spectra object} \item{fix_names}{Use make.names to norm...
# Questions: # What initial data inspection should we do? # Was our model determination process correct? # What discussion would you like to see for leverage/cook outliers? swings <-1:30 ht <- c(71,71,76,77,74,69,69,76,69,72, 73,75,69,74,73,77,76,78,68,69, 78,72,78,69,71,73,73,74,68,69) wt <- c(180,...
/golf.R
no_license
pottsen/Stats511FinalProject
R
false
false
10,071
r
# Questions: # What initial data inspection should we do? # Was our model determination process correct? # What discussion would you like to see for leverage/cook outliers? swings <-1:30 ht <- c(71,71,76,77,74,69,69,76,69,72, 73,75,69,74,73,77,76,78,68,69, 78,72,78,69,71,73,73,74,68,69) wt <- c(180,...
library(shiny) ui <- fluidPage( # *Input() 함수로 입력받는 요소 # *Output() 함수로 결과물을 출력 후, 배치 ## titlePanel, sidebarLayout, mainPanel로 구성 # App title titlePanel("Hello My Shiny!"), # sidebarLayout # sidebar panel for inputs sidebarLayout ( sidebarPanel( # Input : bins의 수를 slider로...
/DataVis_R_Lab06_Shiny_HistLab02.R
no_license
YangJongWon/DataVisualization
R
false
false
884
r
library(shiny) ui <- fluidPage( # *Input() 함수로 입력받는 요소 # *Output() 함수로 결과물을 출력 후, 배치 ## titlePanel, sidebarLayout, mainPanel로 구성 # App title titlePanel("Hello My Shiny!"), # sidebarLayout # sidebar panel for inputs sidebarLayout ( sidebarPanel( # Input : bins의 수를 slider로...
## 외부에서 접속해서 분석할 경우.. ## getwd() ## dir.create("경로") ### RStudio 와 Oracle 연결 install.packages("rJava") install.packages("DBI") install.packages("RJDBC") library(rJava) library(DBI) library(RJDBC) ## jdbc 드라이버 로딩 ## 1차 java - oracle 연결 drv <- JDBC( driverClass = "oracle.jdbc.driver.OracleDriver", classPath = "C...
/ConnOracleDemo.R
no_license
younddong/R_180721
R
false
false
3,833
r
## 외부에서 접속해서 분석할 경우.. ## getwd() ## dir.create("경로") ### RStudio 와 Oracle 연결 install.packages("rJava") install.packages("DBI") install.packages("RJDBC") library(rJava) library(DBI) library(RJDBC) ## jdbc 드라이버 로딩 ## 1차 java - oracle 연결 drv <- JDBC( driverClass = "oracle.jdbc.driver.OracleDriver", classPath = "C...
#' @export createPopCharTable <- function(outputFolders, databaseNames, reportFolder) { primaryAnalysisId <- 1 # ITT tcosAnalyses <- read.csv(system.file("settings", "tcoAnalysisVariants.csv", package = "sglt2iDka"), stringsAsFactors = FALSE) primary...
/Sglt2iDka/programs/sglt2iDka/R/createPopCharTable.R
permissive
OHDSI/StudyProtocols
R
false
false
13,483
r
#' @export createPopCharTable <- function(outputFolders, databaseNames, reportFolder) { primaryAnalysisId <- 1 # ITT tcosAnalyses <- read.csv(system.file("settings", "tcoAnalysisVariants.csv", package = "sglt2iDka"), stringsAsFactors = FALSE) primary...
################################################################################## # this script will explore champions oncology data ########## # initialize libraries ########## library(plyr) library(dplyr) library(lumi) library(plotly) ########## # initiate folder ########## home_folder <- '/home/benbrew/Documents...
/Scripts/champions_oncology/explore_data.R
no_license
benmbrew/pdx_project
R
false
false
7,488
r
################################################################################## # this script will explore champions oncology data ########## # initialize libraries ########## library(plyr) library(dplyr) library(lumi) library(plotly) ########## # initiate folder ########## home_folder <- '/home/benbrew/Documents...
# Assign the value 21 to the variable edad_abel edad_abel <- 21 # Print out the value of the variable edad_abel print(edad_abel)
/1 - Basic/1 - Basics/3.personalizado.R
no_license
TopicosSelectos/tutoriales-2019-2-abel-rodriguez
R
false
false
129
r
# Assign the value 21 to the variable edad_abel edad_abel <- 21 # Print out the value of the variable edad_abel print(edad_abel)
dir.create("GoodnessOfFit/ChiSquareTests", showWarnings = FALSE) combineTableOrdinalColumns <- function(tableData) { combinedColumns <- cbind( tableData[,"1"] + tableData[,"2"] + tableData[,"3"], tableData[,"4"], tableData[,"5"] + tableData[,"6"] + tableData[,"7"]) return(combinedColumns) } combineT...
/6_1_chi_square_tests.R
no_license
PatKayongo/tdd-intention-analysis
R
false
false
2,680
r
dir.create("GoodnessOfFit/ChiSquareTests", showWarnings = FALSE) combineTableOrdinalColumns <- function(tableData) { combinedColumns <- cbind( tableData[,"1"] + tableData[,"2"] + tableData[,"3"], tableData[,"4"], tableData[,"5"] + tableData[,"6"] + tableData[,"7"]) return(combinedColumns) } combineT...
#' Builds a synthetic variable for education attainment #' @param data.frame #' @value data.frame #' @export build_demographics_race1980standard <- function(Data){ Data <- harmonizePNAD:::check_prepared_to_harmonize(Data) metadata = harmonizePNAD:::get_metadata(Data) if((metadata$type == "pna...
/R/build_demographics_race1980standard.R
no_license
arthurwelle/harmonizePNAD
R
false
false
910
r
#' Builds a synthetic variable for education attainment #' @param data.frame #' @value data.frame #' @export build_demographics_race1980standard <- function(Data){ Data <- harmonizePNAD:::check_prepared_to_harmonize(Data) metadata = harmonizePNAD:::get_metadata(Data) if((metadata$type == "pna...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/hist.R \name{qBreaks} \alias{qBreaks} \title{Internal function to re-calculate breaks of histograms when x-axis is clipped} \usage{ qBreaks(x, quantiles = c(0, 0.99), breaks = 100) } \arguments{ \item{x}{Value to draw histgrams with} \item{q...
/man/qBreaks.Rd
no_license
bedapub/ribiosPlot
R
false
true
894
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/hist.R \name{qBreaks} \alias{qBreaks} \title{Internal function to re-calculate breaks of histograms when x-axis is clipped} \usage{ qBreaks(x, quantiles = c(0, 0.99), breaks = 100) } \arguments{ \item{x}{Value to draw histgrams with} \item{q...
library(testthat) library(recipes) context("Formula stuff") test_that('is trained?', { rec1 <- recipe(~ ., data = iris) expect_true(fully_trained(rec1)) rec2 <- rec1 %>% step_sqrt(all_numeric()) %>% step_center(all_numeric()) expect_false(fully_trained(rec2)) rec3 <- prep(rec2, training = iris) ...
/tests/testthat/test_formula.R
no_license
juliasilge/recipes
R
false
false
1,343
r
library(testthat) library(recipes) context("Formula stuff") test_that('is trained?', { rec1 <- recipe(~ ., data = iris) expect_true(fully_trained(rec1)) rec2 <- rec1 %>% step_sqrt(all_numeric()) %>% step_center(all_numeric()) expect_false(fully_trained(rec2)) rec3 <- prep(rec2, training = iris) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/report.R \name{report_plots} \alias{report_plots} \title{Report plots} \usage{ report_plots(summarised_estimates, reported, target_folder) } \arguments{ \item{summarised_estimates}{A data.table of summarised estimates containing the following...
/man/report_plots.Rd
permissive
ellisp/EpiNow2
R
false
true
2,414
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/report.R \name{report_plots} \alias{report_plots} \title{Report plots} \usage{ report_plots(summarised_estimates, reported, target_folder) } \arguments{ \item{summarised_estimates}{A data.table of summarised estimates containing the following...
# process results processResults <- function(netName, method, samples, repetitions){ # se crea la matriz donde se almacenaran al final los resultados resultsMean <- matrix(0,4,length(samples)) resultsDev <- matrix(0,4,length(samples)) # considera cada posible tamaño de conjunto de datos for(i in 1:length(s...
/R/processResults.R
no_license
mgomez-olmedo/mampcg
R
false
false
1,084
r
# process results processResults <- function(netName, method, samples, repetitions){ # se crea la matriz donde se almacenaran al final los resultados resultsMean <- matrix(0,4,length(samples)) resultsDev <- matrix(0,4,length(samples)) # considera cada posible tamaño de conjunto de datos for(i in 1:length(s...
l4e <- function(varname,data=.data){ # Tim kiem trong ten va nhan cua bien namesdata<-names(data) labelsdata<-attr(data,"var.labels") varlist<- sort(union(grep(varname,namesdata),grep(varname,labelsdata))) cbind(Variable=namesdata[varlist],Descrition=labelsdata[varlist]) }
/R/l4e.r
no_license
gvdovandzung/thongke
R
false
false
275
r
l4e <- function(varname,data=.data){ # Tim kiem trong ten va nhan cua bien namesdata<-names(data) labelsdata<-attr(data,"var.labels") varlist<- sort(union(grep(varname,namesdata),grep(varname,labelsdata))) cbind(Variable=namesdata[varlist],Descrition=labelsdata[varlist]) }
#' standardBootIntervals #' #' This returns the quantiles of the bootstrap samples specified by the user. The quantiles uses the type=4 argument of the quantile function, which appears to function best. #' #' @param boot A vector of bootstrap results #' @param lower the lower alpha #' @param upper the upper alpha...
/R/standardBootIntervals.R
no_license
cran/Omisc
R
false
false
997
r
#' standardBootIntervals #' #' This returns the quantiles of the bootstrap samples specified by the user. The quantiles uses the type=4 argument of the quantile function, which appears to function best. #' #' @param boot A vector of bootstrap results #' @param lower the lower alpha #' @param upper the upper alpha...
#' @title FitMacroparProject #' #' @description Launch the shiny app #' #' @export launchApp <- function() { # Find directory of the package appDir <- system.file("myapp", package = "FitMacroparProject") if (appDir == "") { stop("Could not find myapp. Try re-installing `FitMacropar`.", call. = FALSE) } #...
/R/launchApp.R
no_license
NatheoB/FitMacroparProject
R
false
false
408
r
#' @title FitMacroparProject #' #' @description Launch the shiny app #' #' @export launchApp <- function() { # Find directory of the package appDir <- system.file("myapp", package = "FitMacroparProject") if (appDir == "") { stop("Could not find myapp. Try re-installing `FitMacropar`.", call. = FALSE) } #...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.35808969273627e-309, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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/1615829288-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
362
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(1.35808969273627e-309, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iotsitewise_operations.R \name{iotsitewise_update_asset_property} \alias{iotsitewise_update_asset_property} \title{Updates an asset property's alias and notification state} \usage{ iotsitewise_update_asset_property(assetId, propertyId, proper...
/paws/man/iotsitewise_update_asset_property.Rd
permissive
jcheng5/paws
R
false
true
2,378
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/iotsitewise_operations.R \name{iotsitewise_update_asset_property} \alias{iotsitewise_update_asset_property} \title{Updates an asset property's alias and notification state} \usage{ iotsitewise_update_asset_property(assetId, propertyId, proper...
library(shiny) shinyServer(function(input, output) { ############################################################################################################################################################# ######## condições dos parametros da distribuição binomial ########## output$XDaBin <- renderUI(withMa...
/server.R
no_license
pauloracj/Shiny-Distribui-es-Discretas
R
false
false
13,895
r
library(shiny) shinyServer(function(input, output) { ############################################################################################################################################################# ######## condições dos parametros da distribuição binomial ########## output$XDaBin <- renderUI(withMa...
\name{model.matrixBayes} %\docType{genericFunction} \alias{model.matrixBayes} %\alias{model.matrixBayes.h} %\alias{model.matrix.bayes,bayesglm-method} %\alias{model.matrix.bayes,bayesglm.h-method} \title{Construct Design Matrices} \description{ \code{model.matrixBayes} creates a design matrix. } \usag...
/man/model.matrix.bayes.Rd
no_license
casallas/arm
R
false
false
3,239
rd
\name{model.matrixBayes} %\docType{genericFunction} \alias{model.matrixBayes} %\alias{model.matrixBayes.h} %\alias{model.matrix.bayes,bayesglm-method} %\alias{model.matrix.bayes,bayesglm.h-method} \title{Construct Design Matrices} \description{ \code{model.matrixBayes} creates a design matrix. } \usag...
library(rtracklayer) library(dplyr) library(GenomicFeatures) gene_ids_key <- rtracklayer::import.gff("../../external_data/flybase/dmel-all-r6.30.gtf.gz") %>% as.data.frame() %>% dplyr::filter(type == "gene") %>% dplyr::select(gene_id, gene_symbol) txdb <- makeTxDbFromGFF("../../external_data/flybase/dmel-all-r...
/scripts/fig4_define_promoter_regions.R
permissive
baishengjun/Ing-Simmons_et_al_dorsoventral_3D_genome
R
false
false
3,979
r
library(rtracklayer) library(dplyr) library(GenomicFeatures) gene_ids_key <- rtracklayer::import.gff("../../external_data/flybase/dmel-all-r6.30.gtf.gz") %>% as.data.frame() %>% dplyr::filter(type == "gene") %>% dplyr::select(gene_id, gene_symbol) txdb <- makeTxDbFromGFF("../../external_data/flybase/dmel-all-r...
# this R script will choose one of the best hits based on the alignment length # and smallest evalue # pass blast out file from upstream library("dplyr", quietly = TRUE) ff <- commandArgs(TRUE) outname <- gsub(".out", "", ff) table <- read.table(ff, sep="\t", header=TRUE) best_id <- table %>% select(-c(qstar...
/Phylogeny/scripts/Select_best_hit.R
permissive
pebgroup/Seed_Plant_BackBone
R
false
false
572
r
# this R script will choose one of the best hits based on the alignment length # and smallest evalue # pass blast out file from upstream library("dplyr", quietly = TRUE) ff <- commandArgs(TRUE) outname <- gsub(".out", "", ff) table <- read.table(ff, sep="\t", header=TRUE) best_id <- table %>% select(-c(qstar...
# Regresión logística o binomial # Ejemplo de incidiencia (0 y 1) de una especie de mono en fragmentos de selva. # --------------------- # leer datos archivos datos <- read.table("clipboard", header = T) View(datos) names(datos) # ---------------------------------- # modelos para cada variable por separado modelo_are...
/Primer clase/regresión logística.R
no_license
gaitancarlos/Taller_FTR_Occ
R
false
false
1,998
r
# Regresión logística o binomial # Ejemplo de incidiencia (0 y 1) de una especie de mono en fragmentos de selva. # --------------------- # leer datos archivos datos <- read.table("clipboard", header = T) View(datos) names(datos) # ---------------------------------- # modelos para cada variable por separado modelo_are...
#' Plot seqtest #' #' This function plots the \code{seqtest} object #' #' @param x \code{seqtest} object #' @param ... further arguments passed to or from other methods #' #' @author #' Takuya Yanagida \email{takuya.yanagida@@univie.ac.at} #' #' @seealso #' \code{\link{seqtest.cor}}, \code{\link{...
/R/plot.seqtest.R
no_license
cran/miscor
R
false
false
3,207
r
#' Plot seqtest #' #' This function plots the \code{seqtest} object #' #' @param x \code{seqtest} object #' @param ... further arguments passed to or from other methods #' #' @author #' Takuya Yanagida \email{takuya.yanagida@@univie.ac.at} #' #' @seealso #' \code{\link{seqtest.cor}}, \code{\link{...
library(transformeR);library(loadeR.ECOMS);library(loadeR);library(downscaleR);library(lubridate) library(visualizeR); library(sp);library(rgdal); library(RNetCDF); library(sp);library(convertR) library(drought4R)#library(loadeR.2nc); #Ter_basin <- readOGR("/home/ry4902/Documents/Inputs_nhm-5.9/MorphologicalVar/DEM_Sou...
/paper1/Spain/Atmosphere/codes/BC_spring.R
no_license
icra/WATExR
R
false
false
3,375
r
library(transformeR);library(loadeR.ECOMS);library(loadeR);library(downscaleR);library(lubridate) library(visualizeR); library(sp);library(rgdal); library(RNetCDF); library(sp);library(convertR) library(drought4R)#library(loadeR.2nc); #Ter_basin <- readOGR("/home/ry4902/Documents/Inputs_nhm-5.9/MorphologicalVar/DEM_Sou...
setwd("~/") dataset <- read.table("household_power_consumption.txt",header=TRUE,sep=";",colClasses= c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric"),na = "?") str(dataset) attach(dataset) ##To attach set of Dataset Objects to Search Path datasub <- dataset[Date == "1/2...
/Starting.R
no_license
Karanvas1994/ExData_Plotting1
R
false
false
570
r
setwd("~/") dataset <- read.table("household_power_consumption.txt",header=TRUE,sep=";",colClasses= c("character","character","numeric","numeric","numeric","numeric","numeric","numeric","numeric"),na = "?") str(dataset) attach(dataset) ##To attach set of Dataset Objects to Search Path datasub <- dataset[Date == "1/2...
#' Create a data cube from an image collection #' #' Create a proxy data cube, which loads data from a given image collection #' #' @param image_collection Source image collection as from \code{gcbs_image_collection} or \code{gcbs_create_image_collection} #' @param view A data cube view defining the shape (spatiotemp...
/R/cube.R
permissive
edzer/gdalcubes_R
R
false
false
8,474
r
#' Create a data cube from an image collection #' #' Create a proxy data cube, which loads data from a given image collection #' #' @param image_collection Source image collection as from \code{gcbs_image_collection} or \code{gcbs_create_image_collection} #' @param view A data cube view defining the shape (spatiotemp...
#' Functional Principal Component Analysis #' #' FPCA for dense or sparse functional data. #' #' @param Ly A list of \emph{n} vectors containing the observed values for each individual. Missing values specified by \code{NA}s are supported for dense case (\code{dataType='Dense'}). #' @param Lt A list of \emph{n} vect...
/fdapace/R/FPCA.R
no_license
akhikolla/TestedPackages-NoIssues
R
false
false
15,710
r
#' Functional Principal Component Analysis #' #' FPCA for dense or sparse functional data. #' #' @param Ly A list of \emph{n} vectors containing the observed values for each individual. Missing values specified by \code{NA}s are supported for dense case (\code{dataType='Dense'}). #' @param Lt A list of \emph{n} vect...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mediaconnect_operations.R \name{mediaconnect_describe_reservation} \alias{mediaconnect_describe_reservation} \title{Displays the details of a reservation} \usage{ mediaconnect_describe_reservation(ReservationArn) } \arguments{ \item{Reservati...
/cran/paws.media.services/man/mediaconnect_describe_reservation.Rd
permissive
paws-r/paws
R
false
true
1,343
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mediaconnect_operations.R \name{mediaconnect_describe_reservation} \alias{mediaconnect_describe_reservation} \title{Displays the details of a reservation} \usage{ mediaconnect_describe_reservation(ReservationArn) } \arguments{ \item{Reservati...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RenderSql.R \name{translateSingleStatement} \alias{translateSingleStatement} \title{Translates a single SQL statement from one dialect to another} \usage{ translateSingleStatement( sql = "", targetDialect, tempEmulationSchema =...
/man/translateSingleStatement.Rd
permissive
cran/SqlRender
R
false
true
1,527
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RenderSql.R \name{translateSingleStatement} \alias{translateSingleStatement} \title{Translates a single SQL statement from one dialect to another} \usage{ translateSingleStatement( sql = "", targetDialect, tempEmulationSchema =...
forest.plot.or <- function(m0 = NULL, n0 = NULL, m1 = NULL, n1 = NULL, authors, group.labels = c('Group 0', 'Group 1'), log.scale = standard.or.plot, meta.ci = rep(NA,3), study.categories = numeric(0), ...
/forest-plot.R
no_license
jonhar97/Pinaceae-meta-regression
R
false
false
24,380
r
forest.plot.or <- function(m0 = NULL, n0 = NULL, m1 = NULL, n1 = NULL, authors, group.labels = c('Group 0', 'Group 1'), log.scale = standard.or.plot, meta.ci = rep(NA,3), study.categories = numeric(0), ...
library('locfit') PLOT_DIR = '../plots/' MODEL_DIR = '../models/' # Load and prepare the data region_data <- read.table('../dat/augmented_region_data.csv', header=TRUE, sep=',') # Add a little noise to the data to (we do this since there are a lot of repeated values # in the data that throw off density estimates) re...
/data_analysis/analysis.r
no_license
connectthefuture/traffic-analyzer
R
false
false
14,343
r
library('locfit') PLOT_DIR = '../plots/' MODEL_DIR = '../models/' # Load and prepare the data region_data <- read.table('../dat/augmented_region_data.csv', header=TRUE, sep=',') # Add a little noise to the data to (we do this since there are a lot of repeated values # in the data that throw off density estimates) re...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter_dates.R \name{shift_values_range} \alias{shift_values_range} \title{shift_values_range} \usage{ shift_values_range(dat, shift) } \arguments{ \item{dat}{data.table to filter (name, datetime)} \item{shift}{data.table of filter start and...
/man/shift_values_range.Rd
no_license
jkennel/rbr
R
false
true
1,107
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter_dates.R \name{shift_values_range} \alias{shift_values_range} \title{shift_values_range} \usage{ shift_values_range(dat, shift) } \arguments{ \item{dat}{data.table to filter (name, datetime)} \item{shift}{data.table of filter start and...
##' @name met.process ##' @title met.process ##' @export ##' ##' @param site Site info from settings file ##' @param input_met Which data source to process. ##' @param start_date the start date of the data to be downloaded (will only use the year part of the date) ##' @param end_date the end date of the data to be dow...
/modules/data.atmosphere/R/met.process.R
permissive
araiho/pecan
R
false
false
23,031
r
##' @name met.process ##' @title met.process ##' @export ##' ##' @param site Site info from settings file ##' @param input_met Which data source to process. ##' @param start_date the start date of the data to be downloaded (will only use the year part of the date) ##' @param end_date the end date of the data to be dow...
#Question2b #load data all1= read.csv("/Users/billy/Desktop/Biomi600/known-meth.csv") k_meth=data.frame(all1) all2= read.csv("/Users/billy/Desktop/Biomi600/known-unmeth.csv") k_unmeth=data.frame(all2) #cleanup data concat=left_join(k_unmeth,k_meth) m1=filter(k_meth, meth == "TRUE") m2=filter(k_unmeth,unme...
/hw1item2b.R
no_license
ilk1300/methylation-data
R
false
false
1,038
r
#Question2b #load data all1= read.csv("/Users/billy/Desktop/Biomi600/known-meth.csv") k_meth=data.frame(all1) all2= read.csv("/Users/billy/Desktop/Biomi600/known-unmeth.csv") k_unmeth=data.frame(all2) #cleanup data concat=left_join(k_unmeth,k_meth) m1=filter(k_meth, meth == "TRUE") m2=filter(k_unmeth,unme...
setwd("/usr/src/app/output/") fileEdge <- "/data/edge.csv" fileNode <- "/data/node.csv" source("Visualise_domain.R")
/input/Script.R
no_license
FlorianBourniquel/PFEAgile
R
false
false
116
r
setwd("/usr/src/app/output/") fileEdge <- "/data/edge.csv" fileNode <- "/data/node.csv" source("Visualise_domain.R")
#Problem=2.6 x = c(1, 8, 2, 6, 3, 8, 5, 5, 5, 5) sum(x)/10 #Output = [1] 4.8 q = log10(x) q #Output = [1] 0.0000000 0.9030900 0.3010300 0.7781513 0.4771213 0.9030900 0.6989700 0.6989700 0.6989700 0.6989700 (x-4.4)/2.875 #Output = [1] -1.1826087 1.2521739 -0.8347826 0....
/Problem 2/R_studio-master/2_6.R
no_license
worldofmine21/R_studio
R
false
false
460
r
#Problem=2.6 x = c(1, 8, 2, 6, 3, 8, 5, 5, 5, 5) sum(x)/10 #Output = [1] 4.8 q = log10(x) q #Output = [1] 0.0000000 0.9030900 0.3010300 0.7781513 0.4771213 0.9030900 0.6989700 0.6989700 0.6989700 0.6989700 (x-4.4)/2.875 #Output = [1] -1.1826087 1.2521739 -0.8347826 0....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/motif_analysis.R \name{ComputeMotifScore} \alias{ComputeMotifScore} \title{Compute the scores for SNP effects on motifs.} \usage{ ComputeMotifScore(motif.lib, snp.info, ncores = 1) } \arguments{ \item{motif.lib}{A list object with the output ...
/man/ComputeMotifScore.Rd
no_license
chandlerzuo/atSNP
R
false
true
2,860
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/motif_analysis.R \name{ComputeMotifScore} \alias{ComputeMotifScore} \title{Compute the scores for SNP effects on motifs.} \usage{ ComputeMotifScore(motif.lib, snp.info, ncores = 1) } \arguments{ \item{motif.lib}{A list object with the output ...
library(shiny) library(mwaved) # Check if ggplot2 is available and use it ggplot2Avail <- 'ggplot2' %in% .packages(all.available = TRUE) # Graphical settings shrinkLabel <- 'Shrinkage Type:' shrinkChoices <- list("Hard" = "Hard", "Soft" = "Soft", "Garrote" = "Garrote") fill.col <- 'light blue' outline.col <- 'b...
/mwaved/inst/mWaveDDemo/server.R
no_license
ingted/R-Examples
R
false
false
21,005
r
library(shiny) library(mwaved) # Check if ggplot2 is available and use it ggplot2Avail <- 'ggplot2' %in% .packages(all.available = TRUE) # Graphical settings shrinkLabel <- 'Shrinkage Type:' shrinkChoices <- list("Hard" = "Hard", "Soft" = "Soft", "Garrote" = "Garrote") fill.col <- 'light blue' outline.col <- 'b...
## Functions create a matrix and its inverse that are 'cached', i.e., stored ## This function stores the relevant data of the input matrix makeCacheMatrix <- function(x = matrix()) { im <- NULL set <- function(y) { x <<- y im <<- NULL } get <- function() x setsolve <- function(solve) im <<- solve getsolve...
/cachematrix.R
no_license
singming/ProgrammingAssignment2
R
false
false
682
r
## Functions create a matrix and its inverse that are 'cached', i.e., stored ## This function stores the relevant data of the input matrix makeCacheMatrix <- function(x = matrix()) { im <- NULL set <- function(y) { x <<- y im <<- NULL } get <- function() x setsolve <- function(solve) im <<- solve getsolve...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gg_scatterplot.R \name{gg_scatterplot_log10} \alias{gg_scatterplot_log10} \title{Use ggplot2 to plot X vs Y, on a log scale} \usage{ gg_scatterplot_log10(...) } \description{ Use ggplot2 to plot X vs Y, on a log scale }
/man/gg_scatterplot_log10.Rd
no_license
BAAQMD/ggtools
R
false
true
298
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gg_scatterplot.R \name{gg_scatterplot_log10} \alias{gg_scatterplot_log10} \title{Use ggplot2 to plot X vs Y, on a log scale} \usage{ gg_scatterplot_log10(...) } \description{ Use ggplot2 to plot X vs Y, on a log scale }
\name{find_average} \alias{find_average} %- Also NEED an '\alias' for EACH other topic documented here. \title{ find_average } \description{ find_average generates an average (mean) wave from a sample of segmented waveforms. Due to variance in waveform length, the tail section of the average wave is less robustly calcu...
/man/find_average.Rd
permissive
stw32/PulseWaveform
R
false
false
1,512
rd
\name{find_average} \alias{find_average} %- Also NEED an '\alias' for EACH other topic documented here. \title{ find_average } \description{ find_average generates an average (mean) wave from a sample of segmented waveforms. Due to variance in waveform length, the tail section of the average wave is less robustly calcu...
# AUTO GENERATED FILE - DO NOT EDIT dashTimeAgo <- function(id=NULL, date=NULL) { props <- list(id=id, date=date) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'DashTimeAgo', namespace = 'myda...
/R/dashTimeAgo.R
no_license
jchang10/mydash-library
R
false
false
479
r
# AUTO GENERATED FILE - DO NOT EDIT dashTimeAgo <- function(id=NULL, date=NULL) { props <- list(id=id, date=date) if (length(props) > 0) { props <- props[!vapply(props, is.null, logical(1))] } component <- list( props = props, type = 'DashTimeAgo', namespace = 'myda...
any_missing <- function(x) any(is.na(x)) is_key <- function(tbl, ...) { variables <- quos(...) has_nulls <- summarise_at(tbl, vars(UQS(variables)), any_missing) if (any(as.logical(has_nulls))) { return(FALSE) } nrow(distinct(tbl, !!!variables)) == nrow(tbl) } # check that columns in y are are foreign ke...
/bin/misc.R
permissive
rebeccasjones/r4ds-exercise-solutions
R
false
false
682
r
any_missing <- function(x) any(is.na(x)) is_key <- function(tbl, ...) { variables <- quos(...) has_nulls <- summarise_at(tbl, vars(UQS(variables)), any_missing) if (any(as.logical(has_nulls))) { return(FALSE) } nrow(distinct(tbl, !!!variables)) == nrow(tbl) } # check that columns in y are are foreign ke...
library(lattice) library(latticeExtra) cloud(tab, panel.3d.cloud=panel.3dbars, col="black", col.facet=2:4, xbase=0.9, ybase=0.9) sig <- subset(allsub, pfull > 16.5 & propG > 0.05) dups <- with(sig, paste(probe, chr1, chr2)) sig <- sig[!duplicated(dups), ] load("/Users/ghemani/wrayvisscher/eQTL_2D/data/residuals.RDat...
/analysis/orig_analysis.R
no_license
explodecomputer/eQTL-2D
R
false
false
2,453
r
library(lattice) library(latticeExtra) cloud(tab, panel.3d.cloud=panel.3dbars, col="black", col.facet=2:4, xbase=0.9, ybase=0.9) sig <- subset(allsub, pfull > 16.5 & propG > 0.05) dups <- with(sig, paste(probe, chr1, chr2)) sig <- sig[!duplicated(dups), ] load("/Users/ghemani/wrayvisscher/eQTL_2D/data/residuals.RDat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataGenerator.R \name{RandomTree} \alias{RandomTree} \title{Generating a random tree function} \usage{ RandomTree(n, proba = rep(1/3, 3)) } \arguments{ \item{n}{number of nodes in the tree} \item{proba}{probability to have 1, 2 or 3 children...
/man/RandomTree.Rd
no_license
vrunge/fpopTree
R
false
true
534
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataGenerator.R \name{RandomTree} \alias{RandomTree} \title{Generating a random tree function} \usage{ RandomTree(n, proba = rep(1/3, 3)) } \arguments{ \item{n}{number of nodes in the tree} \item{proba}{probability to have 1, 2 or 3 children...
context("utils") test_that("Seq_union always length one", { expect_equal(Seq_union(1, 5), 1:5) expect_equal(Seq_union(1, c(5, 10)), 1:10) expect_equal(Seq_union(c(73, 100), c(83, 105)), c(73:83, 100:105)) expect_equal(Seq_union(c(1, 10), c(9, 19)), 1:19) }) test_that("Seq_union coverage", { expect...
/data/genthat_extracted_code/TeXCheckR/tests/test_utils.R
no_license
surayaaramli/typeRrh
R
false
false
3,997
r
context("utils") test_that("Seq_union always length one", { expect_equal(Seq_union(1, 5), 1:5) expect_equal(Seq_union(1, c(5, 10)), 1:10) expect_equal(Seq_union(c(73, 100), c(83, 105)), c(73:83, 100:105)) expect_equal(Seq_union(c(1, 10), c(9, 19)), 1:19) }) test_that("Seq_union coverage", { expect...
# install reshape2 package is it does not exist if(!require("reshape2")) { install.packages("reshape2") } datadir <- "UCI HAR Dataset/" # reading activities and features data activities <- read.table(paste0(datadir, "activity_labels.txt"), header=FALSE, stringsAsFactors=FALSE) features <...
/run_analysis.R
no_license
oelprince/UCIHARDataSet
R
false
false
1,762
r
# install reshape2 package is it does not exist if(!require("reshape2")) { install.packages("reshape2") } datadir <- "UCI HAR Dataset/" # reading activities and features data activities <- read.table(paste0(datadir, "activity_labels.txt"), header=FALSE, stringsAsFactors=FALSE) features <...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/color_class.R \name{plot,color_class,missing-method} \alias{plot,color_class,missing-method} \title{plot} \usage{ \S4method{plot}{color_class,missing}(x, y, ...) } \arguments{ \item{x}{color_class object.} \item{y}{empty dummy variable, igno...
/man/plot-color_class-missing-method.Rd
no_license
bstatcomp/bayes4psy
R
false
true
843
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/color_class.R \name{plot,color_class,missing-method} \alias{plot,color_class,missing-method} \title{plot} \usage{ \S4method{plot}{color_class,missing}(x, y, ...) } \arguments{ \item{x}{color_class object.} \item{y}{empty dummy variable, igno...
cat("ex a ----------------\n") cat("\"The quick brown fox\n\tjumped over\n\t\tthe lazy dogs\"") cat("\nex b ----------------\n") B1 = 4 B2 = 0.75 print(paste("The result of multiplying ", B1, "by ", B2, " is ", B1 * B2)) cat("\nex c ----------------\n") print(sub("tdavies", "czaltran", "/Users/tdavies/Documents/RBook...
/Estudo-R/Part-1/ch 04/ex4-4.r
no_license
CZALTRAN/MiscPessoal
R
false
false
650
r
cat("ex a ----------------\n") cat("\"The quick brown fox\n\tjumped over\n\t\tthe lazy dogs\"") cat("\nex b ----------------\n") B1 = 4 B2 = 0.75 print(paste("The result of multiplying ", B1, "by ", B2, " is ", B1 * B2)) cat("\nex c ----------------\n") print(sub("tdavies", "czaltran", "/Users/tdavies/Documents/RBook...
## This file contains two main functions which take a matrix ##and then prints out its inverse. ## This function takes a matrix as input, initiates the matrix ##variable and its inverse and returns a list with input and output variables makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function...
/cachematrix.R
no_license
smirshamsi/ProgrammingAssignment2
R
false
false
1,021
r
## This file contains two main functions which take a matrix ##and then prints out its inverse. ## This function takes a matrix as input, initiates the matrix ##variable and its inverse and returns a list with input and output variables makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function...
#How to Run: #Rscript updateNN.R [crimeType] [directory to updated data] [directory to base model file] [Index of bagged Samples: {1,2,3,...number of bagged samples}] [number of hidden node] [number of iterations] [datetime of updating] #Example: Rscript updateNN.R "robbery_count" $DATAPATH $DATAPATH 1 10 "...
/Updater/updateNN.R
no_license
jiajunshen/Weather-and-Crime
R
false
false
4,956
r
#How to Run: #Rscript updateNN.R [crimeType] [directory to updated data] [directory to base model file] [Index of bagged Samples: {1,2,3,...number of bagged samples}] [number of hidden node] [number of iterations] [datetime of updating] #Example: Rscript updateNN.R "robbery_count" $DATAPATH $DATAPATH 1 10 "...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getCohortComponents.R \name{getCohortComponents} \alias{getCohortComponents} \title{\code{getCohortComponents} a function to read in and prepare basic data components for cohort calculations} \usage{ getCohortComponents(WORKING = getwd(), sex...
/HMDLifeTables/HMDLifeTables/man/getCohortComponents.Rd
no_license
timriffe/HMDLifeTables
R
false
true
2,313
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getCohortComponents.R \name{getCohortComponents} \alias{getCohortComponents} \title{\code{getCohortComponents} a function to read in and prepare basic data components for cohort calculations} \usage{ getCohortComponents(WORKING = getwd(), sex...
tweets <- read.csv("D:/evantwitter/total.csv") dim(tweets) library(tm) library(stringr) library(wordcloud2) library(syuzhet) library(lubridate) library(ggplot2) library(scales) library(reshape2) library(dplyr) library(RColorBrewer) library(ggstance) library(viridis) ## I am just going to exclude the accounts of actua...
/cleaning.R
no_license
ryanburge/evantwitter
R
false
false
3,006
r
tweets <- read.csv("D:/evantwitter/total.csv") dim(tweets) library(tm) library(stringr) library(wordcloud2) library(syuzhet) library(lubridate) library(ggplot2) library(scales) library(reshape2) library(dplyr) library(RColorBrewer) library(ggstance) library(viridis) ## I am just going to exclude the accounts of actua...
#################### ## PSCF program ## ~time_functions.r~ ## $Rev$ ## Sept. 2009 ## Satoshi Takahama (stakahama@ucsd.edu) #################### formatchron <- function(x,fmt="%Y-%m-%d %H:%M:%S") ## chr is a chron object ## example usage: format(chronobject,"%m/%d") format(as.POSIXct(paste(as.Date(dates(x)),times...
/functions/time_functions.r
no_license
songnku/pscf
R
false
false
2,569
r
#################### ## PSCF program ## ~time_functions.r~ ## $Rev$ ## Sept. 2009 ## Satoshi Takahama (stakahama@ucsd.edu) #################### formatchron <- function(x,fmt="%Y-%m-%d %H:%M:%S") ## chr is a chron object ## example usage: format(chronobject,"%m/%d") format(as.POSIXct(paste(as.Date(dates(x)),times...
.onAttach <- function(libname, pkgname) { packageStartupMessage("This is vaccineEarlyInvest v0.1;") packageStartupMessage("see ?vaccineEarlyInvest for basic information; vignette('countryPorfolio') for a tutorial") } #' vaccineEarlyInvest #' #' This is an R package that helps determine investments to accelerate a...
/R/vaccineEarlyInvest.R
no_license
jc-castillo/vaccineEarlyInvest
R
false
false
1,058
r
.onAttach <- function(libname, pkgname) { packageStartupMessage("This is vaccineEarlyInvest v0.1;") packageStartupMessage("see ?vaccineEarlyInvest for basic information; vignette('countryPorfolio') for a tutorial") } #' vaccineEarlyInvest #' #' This is an R package that helps determine investments to accelerate a...
## ----message=FALSE------------------------------------------------------------ library(Matrix) library(igraph) library(pagoda2) library(dplyr) library(ggplot2) ## ----message=FALSE------------------------------------------------------------ install.packages('p2data', repos='https://kharchenkolab.github.io/drat/', ty...
/pagoda2/inst/doc/pagoda2.walkthrough.R
no_license
akhikolla/updatedatatype-list4
R
false
false
10,067
r
## ----message=FALSE------------------------------------------------------------ library(Matrix) library(igraph) library(pagoda2) library(dplyr) library(ggplot2) ## ----message=FALSE------------------------------------------------------------ install.packages('p2data', repos='https://kharchenkolab.github.io/drat/', ty...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FlatLineTest.R \name{FlatLineTest} \alias{FlatLineTest} \title{Perform the Flat Line Test} \usage{ FlatLineTest(ExpressionSet, permutations = 1000, plotHistogram = FALSE, runs = 10, parallel = FALSE, custom.perm.matrix = NULL) } \arguments{...
/man/FlatLineTest.Rd
no_license
AcaDemIQ/myTAI
R
false
true
6,642
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FlatLineTest.R \name{FlatLineTest} \alias{FlatLineTest} \title{Perform the Flat Line Test} \usage{ FlatLineTest(ExpressionSet, permutations = 1000, plotHistogram = FALSE, runs = 10, parallel = FALSE, custom.perm.matrix = NULL) } \arguments{...
setwd("/home/bori/Desktop/Coursera/02_R/Ass2/ProgrammingAssignment2") source("cachematrix.R") ## Test1 - Identity Matrix: id <- (c(1, rep(c(rep(0,4), 1), 3))) dim(id) <- c(4,4) print("id = ") print(id) sid <- makeCacheMatrix(id) invId <- cacheSolve(sid) print("inverse of id: ") print(invId) ## Test2 – Rando...
/cachematrix_test.R
no_license
borcsa/ProgrammingAssignment2
R
false
false
480
r
setwd("/home/bori/Desktop/Coursera/02_R/Ass2/ProgrammingAssignment2") source("cachematrix.R") ## Test1 - Identity Matrix: id <- (c(1, rep(c(rep(0,4), 1), 3))) dim(id) <- c(4,4) print("id = ") print(id) sid <- makeCacheMatrix(id) invId <- cacheSolve(sid) print("inverse of id: ") print(invId) ## Test2 – Rando...
#' Green Fish River #' #' Redd counts taken at the weir above Green and Red Fish Confluence. #' #' @format A csv file. #' \describe{ #' \item{BROOD_YEAR}{The year that the redd count was made.} #' \item{SPAWNERS}{Spawners estimated from the redd counts. See details.} #' \item{FRACWILD}{Fracwild wild. This is assu...
/R/Green-Fish-River.R
no_license
eeholmes/testdata
R
false
false
679
r
#' Green Fish River #' #' Redd counts taken at the weir above Green and Red Fish Confluence. #' #' @format A csv file. #' \describe{ #' \item{BROOD_YEAR}{The year that the redd count was made.} #' \item{SPAWNERS}{Spawners estimated from the redd counts. See details.} #' \item{FRACWILD}{Fracwild wild. This is assu...
############################################################################################### #### Overlay plot with p-values for several slices given output of Marchini(). #### #### Written by: Wiktor Olszowy, University of Cambridge #### #### Contact: wo222@cam....
/Marchini_overlay_plot.R
no_license
wiktorolszowy/fMRI_Marchini_method
R
false
false
2,773
r
############################################################################################### #### Overlay plot with p-values for several slices given output of Marchini(). #### #### Written by: Wiktor Olszowy, University of Cambridge #### #### Contact: wo222@cam....
\name{nnzero} \title{The Number of Non-Zero Values of a Matrix} \alias{nnzero} \alias{nnzero,ANY-method} \alias{nnzero,denseMatrix-method} \alias{nnzero,diagonalMatrix-method} \alias{nnzero,pMatrix-method} \alias{nnzero,sparseMatrix-method} \alias{nnzero,CHMfactor-method} \description{ Returns the number of non-zero ...
/branches/Matrix-pre-R-2.15/man/nnzero.Rd
no_license
LTLA/Matrix
R
false
false
3,120
rd
\name{nnzero} \title{The Number of Non-Zero Values of a Matrix} \alias{nnzero} \alias{nnzero,ANY-method} \alias{nnzero,denseMatrix-method} \alias{nnzero,diagonalMatrix-method} \alias{nnzero,pMatrix-method} \alias{nnzero,sparseMatrix-method} \alias{nnzero,CHMfactor-method} \description{ Returns the number of non-zero ...
\name{Performance.Threshold.Poisson} \alias{Performance.Threshold.Poisson} \title{Performance and alpha spending for user-defined signaling threshold for sequential analysis with Poisson data.} \description{The function \code{Performance.Threshold.Poisson} calculates power, expected time to signal and alpha spending...
/man/Performance.Threshold.Poisson.Rd
no_license
cran/Sequential
R
false
false
8,401
rd
\name{Performance.Threshold.Poisson} \alias{Performance.Threshold.Poisson} \title{Performance and alpha spending for user-defined signaling threshold for sequential analysis with Poisson data.} \description{The function \code{Performance.Threshold.Poisson} calculates power, expected time to signal and alpha spending...
library(BSgenome.Mmusculus.UCSC.mm10) library(dplyr) # first create fasta files g <- BSgenome.Mmusculus.UCSC.mm10 base_names <- c(paste("chr", 1:19, sep=""), "chrX") base_fa <- "mm10_base_chromosomes.fa" if (!file.exists(base_fa)) { seq <- getSeq(g, base_names) writeXStringSet(seq, base_fa) } if (!file.exists("ch...
/Yoshida-GEO-ATACseq-process_workflow/create_blacklist/create_mm10_just_base_chr.R
no_license
SLeviyang/Yoshida_OCR_Clustering
R
false
false
1,996
r
library(BSgenome.Mmusculus.UCSC.mm10) library(dplyr) # first create fasta files g <- BSgenome.Mmusculus.UCSC.mm10 base_names <- c(paste("chr", 1:19, sep=""), "chrX") base_fa <- "mm10_base_chromosomes.fa" if (!file.exists(base_fa)) { seq <- getSeq(g, base_names) writeXStringSet(seq, base_fa) } if (!file.exists("ch...
\name{fileAddTags} \alias{fileAddTags} \title{fileAddTags API wrapper} \usage{ fileAddTags(objectID, inputParams = emptyNamedList, jsonifyData = TRUE, alwaysRetry = TRUE) } \arguments{ \item{objectID}{DNAnexus object ID} \item{inputParams}{Either an R object that will be converted into JSON using \code{RJS...
/src/R/dxR/man/fileAddTags.Rd
permissive
jameslz/dx-toolkit
R
false
false
1,177
rd
\name{fileAddTags} \alias{fileAddTags} \title{fileAddTags API wrapper} \usage{ fileAddTags(objectID, inputParams = emptyNamedList, jsonifyData = TRUE, alwaysRetry = TRUE) } \arguments{ \item{objectID}{DNAnexus object ID} \item{inputParams}{Either an R object that will be converted into JSON using \code{RJS...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{guinea_rice} \alias{guinea_rice} \title{Rice production (Guinea)} \format{ Annual time series of class `tsibble`. } \source{ World Bank. } \description{ Total annual rice production (million metric tons) for Guinea...
/man/guinea_rice.Rd
no_license
cran/fpp3
R
false
true
381
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{guinea_rice} \alias{guinea_rice} \title{Rice production (Guinea)} \format{ Annual time series of class `tsibble`. } \source{ World Bank. } \description{ Total annual rice production (million metric tons) for Guinea...
library(snow) source('ebola-GravNet-boarder.R') collect.wa <- function(cutoff=TRUE){ require(maptools) require(PBSmapping) polys <- readRDS("WestAfricaCountyPolygons.rds") centroids <- calcCentroid(SpatialPolygons2PolySet(polys), rollup=1) region <- as.integer(as.factor(polys$ISO)) outbreak <- readRDS("O...
/background-materials/EbolaDataAndCode/DataAndCode/newsims/location/ebola-location.simulator.R
no_license
jclifton333/spatial-RL
R
false
false
2,154
r
library(snow) source('ebola-GravNet-boarder.R') collect.wa <- function(cutoff=TRUE){ require(maptools) require(PBSmapping) polys <- readRDS("WestAfricaCountyPolygons.rds") centroids <- calcCentroid(SpatialPolygons2PolySet(polys), rollup=1) region <- as.integer(as.factor(polys$ISO)) outbreak <- readRDS("O...
library(SpatEntropy) ### Name: karlstrom ### Title: Karlstrom and Ceccato's entropy. ### Aliases: karlstrom ### ** Examples #LATTICE DATA data.lat=matrix(sample(c("a","b","c"), 100, replace=TRUE), nrow=10) ccc=coords_pix(area=square(10), nrow=10, ncol=10) partition=areapart(square(10), G=5, data.coords=ccc) karlstr...
/data/genthat_extracted_code/SpatEntropy/examples/karlstrom.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,036
r
library(SpatEntropy) ### Name: karlstrom ### Title: Karlstrom and Ceccato's entropy. ### Aliases: karlstrom ### ** Examples #LATTICE DATA data.lat=matrix(sample(c("a","b","c"), 100, replace=TRUE), nrow=10) ccc=coords_pix(area=square(10), nrow=10, ncol=10) partition=areapart(square(10), G=5, data.coords=ccc) karlstr...
# # setwd("/home/kanji") # a <- read.table("/home/kanji/Projects/TFG/experiments/1/raw/mem_dump.txt") head(a) # print("--------------------------") # # # head(a) # a$V1 <- as.numeric(a$V1) a$V2 <- as.numeric(a$V2) # # ## SEPARO LAS 't' # a_0 <- a[a$V2 == 0.0,] a_05 <- a[a$V2 == 0.5,] a_1 <- a[a$V2 ==...
/experiments/1/createGraphRAM.R
permissive
fd-rey/TFG
R
false
false
3,586
r
# # setwd("/home/kanji") # a <- read.table("/home/kanji/Projects/TFG/experiments/1/raw/mem_dump.txt") head(a) # print("--------------------------") # # # head(a) # a$V1 <- as.numeric(a$V1) a$V2 <- as.numeric(a$V2) # # ## SEPARO LAS 't' # a_0 <- a[a$V2 == 0.0,] a_05 <- a[a$V2 == 0.5,] a_1 <- a[a$V2 ==...
# Import the Wine Data Set. # As written, wine.txt must be in your current working directory # Check your current working directiory with `getwd()' wineData <- read.table('wine.txt',header=FALSE,sep=',') par(mfrow=c(3,1)) hist(wineData[,3],col='gold',breaks=25,main='Histogram of V3',xlab="") boxplot(wineData[,3],horiz...
/wine-malicacid.R
no_license
sahildshah1/mglcRWorkshop
R
false
false
427
r
# Import the Wine Data Set. # As written, wine.txt must be in your current working directory # Check your current working directiory with `getwd()' wineData <- read.table('wine.txt',header=FALSE,sep=',') par(mfrow=c(3,1)) hist(wineData[,3],col='gold',breaks=25,main='Histogram of V3',xlab="") boxplot(wineData[,3],horiz...
## Read Data NEI <- readRDS("summarySCC_PM25.rds") ## Set Factor Levels NEI$year <- factor(NEI$year, labels = c(1999,2002,2005,2008)) NEI$type <- factor(NEI$type, labels = c("point", "nonpoint", "onroad", "nonroad")) NEI$fips <- factor(NEI$fips) ## Create Baltimore Subset NEIBalt <- subset(NEI,NEI$fips == "24510") #...
/Plot2.R
no_license
imhasan/datasciencecoursera
R
false
false
620
r
## Read Data NEI <- readRDS("summarySCC_PM25.rds") ## Set Factor Levels NEI$year <- factor(NEI$year, labels = c(1999,2002,2005,2008)) NEI$type <- factor(NEI$type, labels = c("point", "nonpoint", "onroad", "nonroad")) NEI$fips <- factor(NEI$fips) ## Create Baltimore Subset NEIBalt <- subset(NEI,NEI$fips == "24510") #...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/dice.R \name{dice} \alias{dice} \title{Generate Random Vector of Dice Throws} \usage{ dice(n, x = 1:6, prob = NULL, name = "Dice") } \arguments{ \item{n}{The number elements to generate. This can be globally set within the environmen...
/man/dice.Rd
no_license
Snazz2001/wakefield
R
false
false
2,356
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/dice.R \name{dice} \alias{dice} \title{Generate Random Vector of Dice Throws} \usage{ dice(n, x = 1:6, prob = NULL, name = "Dice") } \arguments{ \item{n}{The number elements to generate. This can be globally set within the environmen...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geom-label.R, R/geom-text.r \name{geom_label} \alias{geom_label} \alias{geom_text} \title{Textual annotations.} \usage{ geom_label(mapping = NULL, data = NULL, stat = "identity", position = "identity", ..., parse = FALSE, nudge_x = 0, nudge...
/man/geom_text.Rd
no_license
pablorodrig16/ggplot2
R
false
true
7,256
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geom-label.R, R/geom-text.r \name{geom_label} \alias{geom_label} \alias{geom_text} \title{Textual annotations.} \usage{ geom_label(mapping = NULL, data = NULL, stat = "identity", position = "identity", ..., parse = FALSE, nudge_x = 0, nudge...
## ---- echo=FALSE--------------------------------------------------------- library(AsaLab) data(ex_data_1) head(ex_data_1) ## ---- echo=FALSE--------------------------------------------------------- library(AsaLab) data(ex_phenotype_1) head(ex_phenotype_1) ## ---------------------------------------------------------...
/vignettes/AsaLab-vignette.R
no_license
mashranga/GWAS-analysis
R
false
false
1,514
r
## ---- echo=FALSE--------------------------------------------------------- library(AsaLab) data(ex_data_1) head(ex_data_1) ## ---- echo=FALSE--------------------------------------------------------- library(AsaLab) data(ex_phenotype_1) head(ex_phenotype_1) ## ---------------------------------------------------------...
context("load-rec test output structure") d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools") test <- load_rec(yoy = file.path(d, "outputSETASYOY.txt"), ssb = file.path(d, "outputSETASSSB.txt"), prm_biol = file.path(d, "VMPA_setas_biol_fishing_Trunk.prm"))...
/tests/testthat/test-load-rec.R
no_license
hollyannperryman/atlantistools
R
false
false
648
r
context("load-rec test output structure") d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools") test <- load_rec(yoy = file.path(d, "outputSETASYOY.txt"), ssb = file.path(d, "outputSETASSSB.txt"), prm_biol = file.path(d, "VMPA_setas_biol_fishing_Trunk.prm"))...
# vector, array, matrix have same type. list can have different type. dataframe # has same type by column # string > numeric > bool c("a", TRUE) # ['a', 'TRUE'] c(3, TRUE) # [3, 1] # check is.numeric(1) is.character("1") is.vector(1) is.matrix(1) is.data.frame(1) is.factor(1) is.logical(1) # explicit convert as.n...
/r/learning/core/conversion.r
no_license
jk983294/math
R
false
false
426
r
# vector, array, matrix have same type. list can have different type. dataframe # has same type by column # string > numeric > bool c("a", TRUE) # ['a', 'TRUE'] c(3, TRUE) # [3, 1] # check is.numeric(1) is.character("1") is.vector(1) is.matrix(1) is.data.frame(1) is.factor(1) is.logical(1) # explicit convert as.n...
#' Load CCAMLR statistical Areas, Subareas and Divisions #' #' Download the up-to-date spatial layer from the online CCAMLRGIS (\url{http://gis.ccamlr.org/}) and load it to your environment. #' See examples for offline use. All layers use the Lambert azimuthal equal-area projection #' (\code{\link{CCAMLRp}}) #' #' @se...
/R/load.R
no_license
ccamlr/CCAMLRGIS
R
false
false
11,239
r
#' Load CCAMLR statistical Areas, Subareas and Divisions #' #' Download the up-to-date spatial layer from the online CCAMLRGIS (\url{http://gis.ccamlr.org/}) and load it to your environment. #' See examples for offline use. All layers use the Lambert azimuthal equal-area projection #' (\code{\link{CCAMLRp}}) #' #' @se...
sumRaster <- function(listRaster, outRaster, countries){ library(raster) i <- 1 t <- length(listRaster) for(fr in listRaster){ if(i == 1){ raster_out <- raster(fr) raster_out <- crop(raster_out, countries) raster_out <- mask(raster_out, countries) raster_out[is.na(raster_out)] <- 0 ...
/chaly/sum_raster_by_countries.R
no_license
hugocalcad/analysisv1
R
false
false
3,587
r
sumRaster <- function(listRaster, outRaster, countries){ library(raster) i <- 1 t <- length(listRaster) for(fr in listRaster){ if(i == 1){ raster_out <- raster(fr) raster_out <- crop(raster_out, countries) raster_out <- mask(raster_out, countries) raster_out[is.na(raster_out)] <- 0 ...
## The functions below cache the inverse of a matrix. ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(solve) m <<- solve ...
/cachematrix.R
no_license
momo476/ProgrammingAssignment2
R
false
false
989
r
## The functions below cache the inverse of a matrix. ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(solve) m <<- solve ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wafregional_operations.R \name{wafregional_get_sampled_requests} \alias{wafregional_get_sampled_requests} \title{Gets detailed information about a specified number of requests--a sample--that AWS WAF randomly selects from among the first 5,00...
/paws/man/wafregional_get_sampled_requests.Rd
permissive
peoplecure/paws
R
false
true
3,212
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wafregional_operations.R \name{wafregional_get_sampled_requests} \alias{wafregional_get_sampled_requests} \title{Gets detailed information about a specified number of requests--a sample--that AWS WAF randomly selects from among the first 5,00...
#=============================== # Project 1: American Community Survey (ACS) # Presentation Date: Weds 4/23/14 # GROUP EXPECTATIONS CONTRACT #=============================== We will show up to meetings on time. If a conflict arises, we will inform another member of the team as soon as possible. If we are having a d...
/Team Expectations Contract.R
permissive
kaeng/ST-599-Big-Data
R
false
false
1,132
r
#=============================== # Project 1: American Community Survey (ACS) # Presentation Date: Weds 4/23/14 # GROUP EXPECTATIONS CONTRACT #=============================== We will show up to meetings on time. If a conflict arises, we will inform another member of the team as soon as possible. If we are having a d...
read_BFILE_DOXY<-function(filenc_B) { STATION_PARAMETERS=ncvar_get(filenc_B,"STATION_PARAMETERS") # We are looking for DOXY DOXY_string="DOXY " # Find the profiles that contains DOXY index_doxy=which(STATION_PARAMETERS == DOXY_string, arr.ind=TRUE) i_pr...
/read_BFILE_DOXY.R
no_license
catsch/DM
R
false
false
850
r
read_BFILE_DOXY<-function(filenc_B) { STATION_PARAMETERS=ncvar_get(filenc_B,"STATION_PARAMETERS") # We are looking for DOXY DOXY_string="DOXY " # Find the profiles that contains DOXY index_doxy=which(STATION_PARAMETERS == DOXY_string, arr.ind=TRUE) i_pr...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{scaffoldWidget} \alias{scaffoldWidget} \title{Create implementation scaffolding for an HTML widget} \usage{ scaffoldWidget(name, bowerPkg = NULL, edit = interactive()) } \arguments{ \item{name}{Name of widget} \item{bowerPkg}{Optional name of \href{http://bowe...
/man/scaffoldWidget.Rd
no_license
hafen/htmlwidgets
R
false
false
842
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{scaffoldWidget} \alias{scaffoldWidget} \title{Create implementation scaffolding for an HTML widget} \usage{ scaffoldWidget(name, bowerPkg = NULL, edit = interactive()) } \arguments{ \item{name}{Name of widget} \item{bowerPkg}{Optional name of \href{http://bowe...
#' Place nodes in circles according to centrality measure #' #' This layout places nodes in circles with the radii relative to a given #' centrality measure. Under the hood it use stress majorisation to place nodes #' optimally given the radius constraint. #' #' @param graph A tbl_graph object #' @param centrality An e...
/ggraph/R/layout_centrality.R
permissive
akhikolla/InformationHouse
R
false
false
1,865
r
#' Place nodes in circles according to centrality measure #' #' This layout places nodes in circles with the radii relative to a given #' centrality measure. Under the hood it use stress majorisation to place nodes #' optimally given the radius constraint. #' #' @param graph A tbl_graph object #' @param centrality An e...
\name{cplfunction} \alias{cplfunction} \alias{Suml} \alias{cplfunction} \alias{Rcpp_cplfunction-class} \alias{plot-methods} \alias{plot,ANY-method} \alias{plot,Rcpp_cplfunction-method} \alias{InfConvl} %\alias{show-methods} %\alias{show,ANY-method} \alias{show,Rcpp_cplfunction-method} %- Also NEED an '\alias' for EACH...
/man/cplfunction.Rd
no_license
robingirard/ConConPiWiFun
R
false
false
2,473
rd
\name{cplfunction} \alias{cplfunction} \alias{Suml} \alias{cplfunction} \alias{Rcpp_cplfunction-class} \alias{plot-methods} \alias{plot,ANY-method} \alias{plot,Rcpp_cplfunction-method} \alias{InfConvl} %\alias{show-methods} %\alias{show,ANY-method} \alias{show,Rcpp_cplfunction-method} %- Also NEED an '\alias' for EACH...
# # commit-sea-arima.R, 1 Oct 16 # # Data from: # Do time of day and developer experience affect commit bugginess? # Jon Eyolfson and Lin Tan and Patrick Lam # # Example from: # Empirical Software Engineering using R # Derek M. Jones source("ESEUR_config.r") library("forecast") # id repository_id raw_author_id sha...
/time-series/commits/commit-sea-arima.R
no_license
alanponce/ESEUR-code-data
R
false
false
1,349
r
# # commit-sea-arima.R, 1 Oct 16 # # Data from: # Do time of day and developer experience affect commit bugginess? # Jon Eyolfson and Lin Tan and Patrick Lam # # Example from: # Empirical Software Engineering using R # Derek M. Jones source("ESEUR_config.r") library("forecast") # id repository_id raw_author_id sha...
\name{NISThenryToESUOfInductance} \alias{NISThenryToESUOfInductance} \title{Convert henry to ESU of inductance } \usage{NISThenryToESUOfInductance(henry)} \description{\code{NISThenryToESUOfInductance} converts from henry (H) to ESU of inductance (stathenry) } \arguments{ \item{henry}{henry (H) } } \value{ESU of ind...
/man/NISThenryToESUOfInductance.Rd
no_license
cran/NISTunits
R
false
false
814
rd
\name{NISThenryToESUOfInductance} \alias{NISThenryToESUOfInductance} \title{Convert henry to ESU of inductance } \usage{NISThenryToESUOfInductance(henry)} \description{\code{NISThenryToESUOfInductance} converts from henry (H) to ESU of inductance (stathenry) } \arguments{ \item{henry}{henry (H) } } \value{ESU of ind...
#' get_img_url #' #' @param name #' Grabs img url from sitename #' @return - image url #' get_img_url = function(name){ url = paste("https://phenocam.sr.unh.edu/data/latest/", name, ".jpg",sep = '') return (url) } #' get_roi_url #' #' @param name #' @param pft_abr #' grab url for roi from phenocam using name o...
/functions/image.R
no_license
ntag1618/phenoSynth
R
false
false
1,016
r
#' get_img_url #' #' @param name #' Grabs img url from sitename #' @return - image url #' get_img_url = function(name){ url = paste("https://phenocam.sr.unh.edu/data/latest/", name, ".jpg",sep = '') return (url) } #' get_roi_url #' #' @param name #' @param pft_abr #' grab url for roi from phenocam using name o...
# ------------------------------------------------------------------ # The Computer Language Shootout # http://shootout.alioth.debian.org/ # # Contributed by Leo Osvald # ------------------------------------------------------------------ pi <- 3.141592653589793 solar_mass <- 4 * pi * pi days_per_year <- 365.2...
/Benchmarks/shootout/nbody/nbody_3.r
no_license
reactorlabs/RBenchmarking
R
false
false
2,974
r
# ------------------------------------------------------------------ # The Computer Language Shootout # http://shootout.alioth.debian.org/ # # Contributed by Leo Osvald # ------------------------------------------------------------------ pi <- 3.141592653589793 solar_mass <- 4 * pi * pi days_per_year <- 365.2...
source('code/setup.R') ##### CONNECT TO DATA ##### # read ensembles and prior ncdf4 objects nc.post = nc_open('/Users/trevh/Research/assimilation-cfr/data/tas_ens_da_hydro_r.1000-2000_d.16-Feb-2018.nc') nc.prior = nc_open('/Users/trevh/Research/assimilation-cfr/data/tas_prior_da_hydro_r.1000-2000_d.16-Feb-2018.nc') ...
/Archive/code/working/edepths_over_time.R
no_license
trevor-harris/assimilation-cfr
R
false
false
2,290
r
source('code/setup.R') ##### CONNECT TO DATA ##### # read ensembles and prior ncdf4 objects nc.post = nc_open('/Users/trevh/Research/assimilation-cfr/data/tas_ens_da_hydro_r.1000-2000_d.16-Feb-2018.nc') nc.prior = nc_open('/Users/trevh/Research/assimilation-cfr/data/tas_prior_da_hydro_r.1000-2000_d.16-Feb-2018.nc') ...
stopifnot(require("testthat"), require("glmmTMB")) context("Testing dispersion") sim1=function(nfac=24, nt=100, facsd=.1, tsd=.15, mu=0, residsd=1) { dat=expand.grid(fac=factor(1:nfac, levels=1:nfac), t= 1:nt) n=nrow(dat) dat$REfac=rnorm(nfac, sd= facsd)[dat$fac] dat$REt=rnorm(nt, sd= tsd)[dat$t] dat$...
/glmmTMB/tests/testthat/test-disp.R
no_license
dyxstat/glmmTMB
R
false
false
1,513
r
stopifnot(require("testthat"), require("glmmTMB")) context("Testing dispersion") sim1=function(nfac=24, nt=100, facsd=.1, tsd=.15, mu=0, residsd=1) { dat=expand.grid(fac=factor(1:nfac, levels=1:nfac), t= 1:nt) n=nrow(dat) dat$REfac=rnorm(nfac, sd= facsd)[dat$fac] dat$REt=rnorm(nt, sd= tsd)[dat$t] dat$...