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
## 1 Import and explore data cod <- read.csv("cod_recruitment.csv") cod par(mfrow=c(2,2)) plot(cod, xlim=c(0,130), ylim=c(0,400)) ## 2 Function to plot Ricker line plot_ricker <- function(data, a, b, ...) { S <- data[[1]] R <- data[[2]] plot(data, xlim=c(0,1.1*max(S)), ylim=c(0,1.1*max(R)), ...) ...
/02_Model_fitting/ricker.R
no_license
ices-eg/tc_tcsai2019
R
false
false
1,335
r
## 1 Import and explore data cod <- read.csv("cod_recruitment.csv") cod par(mfrow=c(2,2)) plot(cod, xlim=c(0,130), ylim=c(0,400)) ## 2 Function to plot Ricker line plot_ricker <- function(data, a, b, ...) { S <- data[[1]] R <- data[[2]] plot(data, xlim=c(0,1.1*max(S)), ylim=c(0,1.1*max(R)), ...) ...
#---------------------------------------------------------------------------------------------------- #' Run the Elastic Net Solvers #' @description Given a TReNA object with either LASSO or Ridge Regression as the solver, use the \code{\link{glmnet}} function to estimate coefficients for each transcription factor as a...
/R/sharedFunctions.R
no_license
noahmclean1/TReNA
R
false
false
5,926
r
#---------------------------------------------------------------------------------------------------- #' Run the Elastic Net Solvers #' @description Given a TReNA object with either LASSO or Ridge Regression as the solver, use the \code{\link{glmnet}} function to estimate coefficients for each transcription factor as a...
rankhospital <- function(state, outcome, num = "best") { hospitalNameColumnNumber <- 2 outcomeData <- read.csv("outcome-of-care-measures.csv", colClasses = "character") states <- unique(outcomeData[, 7]) numberOfRows <- nrow(outcomeData); if (! state %in% states) stop(paste("Error in rankhospital(", state, "...
/rankhospital.R
no_license
RonZamkadny/ProgrammingAssignment2
R
false
false
1,527
r
rankhospital <- function(state, outcome, num = "best") { hospitalNameColumnNumber <- 2 outcomeData <- read.csv("outcome-of-care-measures.csv", colClasses = "character") states <- unique(outcomeData[, 7]) numberOfRows <- nrow(outcomeData); if (! state %in% states) stop(paste("Error in rankhospital(", state, "...
context('descriptives') test_that('descriptive statistics work for continuous variables without split by sunny', { CI_WIDTH <- 0.95 QUANTS <- c(0.25, 0.50, 0.75) set.seed(1337) x <- rnorm(100, 0, 1) df <- data.frame(x=x) desc <- jmv::descriptives( data=df, vars=x, mode=TRUE, sum=TRUE,...
/tests/testthat/testdescriptives.R
no_license
cran/jmv
R
false
false
5,070
r
context('descriptives') test_that('descriptive statistics work for continuous variables without split by sunny', { CI_WIDTH <- 0.95 QUANTS <- c(0.25, 0.50, 0.75) set.seed(1337) x <- rnorm(100, 0, 1) df <- data.frame(x=x) desc <- jmv::descriptives( data=df, vars=x, mode=TRUE, sum=TRUE,...
baixar_paginas_gazetadeiracemapolis <- function(diretorio = ".",caderno = "policia", paginas = 10){ url <- paste0("http://gazetadeiracemapolis.com.br/noticias/",caderno,"/page/") purrr::walk(1:paginas,purrr::possibly(purrrogress::with_progress(~{ arquivo <- paste0(stringr::str_replace_all(Sys.time(),"\...
/gazetadeiracemapolisDATA.R
no_license
Viny369/jornais
R
false
false
2,971
r
baixar_paginas_gazetadeiracemapolis <- function(diretorio = ".",caderno = "policia", paginas = 10){ url <- paste0("http://gazetadeiracemapolis.com.br/noticias/",caderno,"/page/") purrr::walk(1:paginas,purrr::possibly(purrrogress::with_progress(~{ arquivo <- paste0(stringr::str_replace_all(Sys.time(),"\...
setwd("C:/Users/Shalanda/Documents/R Bootcamp") snpsDataframe= read.table('hapmap_CEU_r23a_chr2_ld-2.txt', header=TRUE) dim(snpsDataframe) head(snpsDataframe) names(snpsDataframe) row.names(snpsDataframe) snps=as.matrix(snpsDataframe) testSNP=snps["rs218206_G",] table(testSNP) het=sum(testSNP==1...
/Plotting Exercise 2 Part 1.R
no_license
shagrier/Bootcamp-HW-Assignments-
R
false
false
2,491
r
setwd("C:/Users/Shalanda/Documents/R Bootcamp") snpsDataframe= read.table('hapmap_CEU_r23a_chr2_ld-2.txt', header=TRUE) dim(snpsDataframe) head(snpsDataframe) names(snpsDataframe) row.names(snpsDataframe) snps=as.matrix(snpsDataframe) testSNP=snps["rs218206_G",] table(testSNP) het=sum(testSNP==1...
# September 08, 2019 # HW 2 Time Series # Daily Mean PM2.5 Concentration - Particulate Matter smaller than 2.5 micrometers Forecast library(forecast) library(tsa) library(haven) library(fma) library(expsmooth) library(lmtest) library(zoo) library(seasonal) library(imputeTS) library(xts) library(ggplot2) library(dplyr...
/Time Series HW 2/Cathy_TimeSeries_HW3.R
no_license
gclark422/Orange2-HW
R
false
false
5,540
r
# September 08, 2019 # HW 2 Time Series # Daily Mean PM2.5 Concentration - Particulate Matter smaller than 2.5 micrometers Forecast library(forecast) library(tsa) library(haven) library(fma) library(expsmooth) library(lmtest) library(zoo) library(seasonal) library(imputeTS) library(xts) library(ggplot2) library(dplyr...
library(shiny) # Define UI for application that draws a histogram shinyUI(fluidPage( title = "NLP Word Prediction", tags$style(HTML(" @import url('https://fonts.googleapis.com/css2?family=Yusei+Magic&display=swap'); .container-fluid{ margin-top: 150px; } h1{ w...
/prediction/ui.R
no_license
KennethFajardo/WordPredictionNLP
R
false
false
1,462
r
library(shiny) # Define UI for application that draws a histogram shinyUI(fluidPage( title = "NLP Word Prediction", tags$style(HTML(" @import url('https://fonts.googleapis.com/css2?family=Yusei+Magic&display=swap'); .container-fluid{ margin-top: 150px; } h1{ w...
#!/usr/bin/Rscript new.yogi.plotter <- function() { ### # this function draws a heatmap. # heatmap <- function(data,cex=.5,color.stops=c("white","royalblue3"), row.names=rownames(data),col.names=colnames(data),log=FALSE, col.separator=NULL, row.separator=NULL) { #define the number of colors to use ncolor...
/lib/libyogiplot.R
no_license
Harleymount/Ensminger_BFG
R
false
false
2,548
r
#!/usr/bin/Rscript new.yogi.plotter <- function() { ### # this function draws a heatmap. # heatmap <- function(data,cex=.5,color.stops=c("white","royalblue3"), row.names=rownames(data),col.names=colnames(data),log=FALSE, col.separator=NULL, row.separator=NULL) { #define the number of colors to use ncolor...
# edfReader package # # Purpose : Reading .edf(+)/.bdf(+) files # # Copyright : (C) 2015-2016, Vis Consultancy, the Netherlands # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
/R/edfReader.R
no_license
vagnerfonseca/edf
R
false
false
2,597
r
# edfReader package # # Purpose : Reading .edf(+)/.bdf(+) files # # Copyright : (C) 2015-2016, Vis Consultancy, the Netherlands # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
setMethod(f="initialize", signature="windrose", definition=function(.Object) { .Object@processingLog$time <- as.POSIXct(Sys.time()) .Object@processingLog$value <- "create 'windrose' object" return(.Object) }) setMethod(f="summary", sign...
/R/windrose.R
no_license
landsat/oce
R
false
false
8,546
r
setMethod(f="initialize", signature="windrose", definition=function(.Object) { .Object@processingLog$time <- as.POSIXct(Sys.time()) .Object@processingLog$value <- "create 'windrose' object" return(.Object) }) setMethod(f="summary", sign...
\name{get.MirType} \alias{get.MirType} %- Also NEED an '\alias' for EACH other topic documented here. \title{get.MirType} \description{ Return the mir type string from the object } \usage{ get.MirType(theObject) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{theObject}{object returned fr...
/man/get.MirType.Rd
no_license
yanch86/TCGAGeneReport
R
false
false
911
rd
\name{get.MirType} \alias{get.MirType} %- Also NEED an '\alias' for EACH other topic documented here. \title{get.MirType} \description{ Return the mir type string from the object } \usage{ get.MirType(theObject) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{theObject}{object returned fr...
library(dplyr) library(lubridate) library(ggplot2) library(ir) library(LTRCtrees) library(survival) library(rpart.plot) library(partykit) # Load, format ===== # TK <- read.csv("~/Desktop/ODG/IngersolRand/NA_DTF_wPREDICTORS_3.csv") # names(TK) # devtools::use_data(TK_AG, pkg = "ir") # TK <- TK %>% # mutate(mfg_...
/OpenDataGroup/IR/ThermoKing_LTRCtrees.R
no_license
cwcomiskey/Misc
R
false
false
1,808
r
library(dplyr) library(lubridate) library(ggplot2) library(ir) library(LTRCtrees) library(survival) library(rpart.plot) library(partykit) # Load, format ===== # TK <- read.csv("~/Desktop/ODG/IngersolRand/NA_DTF_wPREDICTORS_3.csv") # names(TK) # devtools::use_data(TK_AG, pkg = "ir") # TK <- TK %>% # mutate(mfg_...
#' Find coefficients for blm #' #' This function returns the fitted parameters of the model. #' #' @param object A blm model #' @param ... Some data #' @return A list of coefficients #’ #' @export coef.blm = function(object, ...) { return(list(Sigma = object$Sigma, mean = object$mean)) }
/R/coef.R
no_license
steinunngroa/blm
R
false
false
294
r
#' Find coefficients for blm #' #' This function returns the fitted parameters of the model. #' #' @param object A blm model #' @param ... Some data #' @return A list of coefficients #’ #' @export coef.blm = function(object, ...) { return(list(Sigma = object$Sigma, mean = object$mean)) }
# Dependencies library(quantmod) library(tidyverse) library(lubridate) amount <- 2400 invstrinp <- data.frame( Symbol = c("VOO", "VTI", "VXUS", "BND", "QQQ"), Ratio = c(0.22, 0.22, 0.16, 0.2, 0.2)) ratio_sum_check = sum(invstrinp$Ratio) invstr <- invstrinp %>% mutate(Amount = amount * Ratio) # Fetch...
/src/r/finance/investment-strategy-1.R
no_license
orri93/analysis
R
false
false
709
r
# Dependencies library(quantmod) library(tidyverse) library(lubridate) amount <- 2400 invstrinp <- data.frame( Symbol = c("VOO", "VTI", "VXUS", "BND", "QQQ"), Ratio = c(0.22, 0.22, 0.16, 0.2, 0.2)) ratio_sum_check = sum(invstrinp$Ratio) invstr <- invstrinp %>% mutate(Amount = amount * Ratio) # Fetch...
sbh_calc <- function(psa,sys="usda",plt_par=T,dat_par=F){ if(sys%in%c("au2","iuss")){ s0 = 0.00002 lim = c(0.002,0.02,2) }else{ s0 = 0.00005 lim = c(0.002,0.05,2) } sizes=c(s0,lim) ###probabilties p_3 = 0.9999 ##probability of upper size limit p_0 = 0.0001 ##probability of lowe...
/R/sbh_calc.R
no_license
edwardjjones/ShiraziBoersma
R
false
false
2,622
r
sbh_calc <- function(psa,sys="usda",plt_par=T,dat_par=F){ if(sys%in%c("au2","iuss")){ s0 = 0.00002 lim = c(0.002,0.02,2) }else{ s0 = 0.00005 lim = c(0.002,0.05,2) } sizes=c(s0,lim) ###probabilties p_3 = 0.9999 ##probability of upper size limit p_0 = 0.0001 ##probability of lowe...
library(RoughSets) data(RoughSetData) decision.table <- RoughSetData$hiring.dt ## evaluate single reduct res.1 <- FS.quickreduct.RST(decision.table) print(res.1) ## generate new decision table according to the reduct new.decTable <- SF.applyDecTable(decision.table, res.1) print(new.decTable)
/fuzzedpackages/RoughSets/demo/FS.QuickReduct.RST.R
no_license
akhikolla/testpackages
R
false
false
305
r
library(RoughSets) data(RoughSetData) decision.table <- RoughSetData$hiring.dt ## evaluate single reduct res.1 <- FS.quickreduct.RST(decision.table) print(res.1) ## generate new decision table according to the reduct new.decTable <- SF.applyDecTable(decision.table, res.1) print(new.decTable)
#vectools: Advanced Vector Toolkit #Copyright (C), Abby Spurdle, 2020 to 2021 #This program is distributed without any warranty. #This program is free software. #You can modify it and/or redistribute it, under the terms of: #The GNU General Public License, version 2, or (at your option) any later version. #...
/R/12_GeomObject_2.r
no_license
cran/vectools
R
false
false
3,321
r
#vectools: Advanced Vector Toolkit #Copyright (C), Abby Spurdle, 2020 to 2021 #This program is distributed without any warranty. #This program is free software. #You can modify it and/or redistribute it, under the terms of: #The GNU General Public License, version 2, or (at your option) any later version. #...
library(readr) ref20 <- read.csv("~/Team_1/data/Ref_Factor_20.csv") ref48 <- read.csv("~/Team_1/data/Ref_Factor_48.csv") ref75 <- read.csv("~/Team_1/data/Ref_Factor_75.csv") ref95 <- read.csv("~/Team_1/data/Ref_Factor_95.csv") ref99 <- read.csv("~/Team_1/data/Ref_Factor_99.csv") #View(ref20) #colnames(ref20) # Deleltin...
/src/R/team1_pi4.r
no_license
dlebauer/team1-predict-swir
R
false
false
5,729
r
library(readr) ref20 <- read.csv("~/Team_1/data/Ref_Factor_20.csv") ref48 <- read.csv("~/Team_1/data/Ref_Factor_48.csv") ref75 <- read.csv("~/Team_1/data/Ref_Factor_75.csv") ref95 <- read.csv("~/Team_1/data/Ref_Factor_95.csv") ref99 <- read.csv("~/Team_1/data/Ref_Factor_99.csv") #View(ref20) #colnames(ref20) # Deleltin...
setwd("C:/Users/IT18194654/Downloads") data<-read.table(file ="C:/Users/IT18194654/Downloads/Forest.txt",header = TRUE,sep = ",") data attach(data) #names("X","Y","month","day","FFMC","DMC","DC","ISI","temp","RH","wind","rain","area") #q2 summary(data) #q3 fix(data) #q4 max(wind) min(wind) #q5 summary(te...
/lab7.R
no_license
PazinduLakpriya/ps-lab-7
R
false
false
581
r
setwd("C:/Users/IT18194654/Downloads") data<-read.table(file ="C:/Users/IT18194654/Downloads/Forest.txt",header = TRUE,sep = ",") data attach(data) #names("X","Y","month","day","FFMC","DMC","DC","ISI","temp","RH","wind","rain","area") #q2 summary(data) #q3 fix(data) #q4 max(wind) min(wind) #q5 summary(te...
/bin/mac/sla.beta.r
permissive
coronalabs/corona
R
false
false
166,996
r
library(shiny) earnings_intro <- fluidPage( h2("Is Potential Earnings of Prestige Colleges Worth the Cost?")) earnings_analysis <- fluidPage( h3("The Importance of this Graph"), p(em("Note: Per College Scorecard, Earnings are defined as the sum of wages and deferred compensation from all non-d...
/final/ui_components/analysis_ui.R
permissive
getachew67/INFO201-7
R
false
false
6,436
r
library(shiny) earnings_intro <- fluidPage( h2("Is Potential Earnings of Prestige Colleges Worth the Cost?")) earnings_analysis <- fluidPage( h3("The Importance of this Graph"), p(em("Note: Per College Scorecard, Earnings are defined as the sum of wages and deferred compensation from all non-d...
## cachematrix.R ## Purpose: ## To cache -store- the value of the inverse of a given matrix. ## How it works: ## we will use two functions, the first one to cache the value of the inverse; the second one to actual calculate the inverse values, if already calculated for a given matrix, it wi...
/cachematrix.R
no_license
cibermania5/ProgrammingAssignment2
R
false
false
2,404
r
## cachematrix.R ## Purpose: ## To cache -store- the value of the inverse of a given matrix. ## How it works: ## we will use two functions, the first one to cache the value of the inverse; the second one to actual calculate the inverse values, if already calculated for a given matrix, it wi...
3554730693379d9ac618f88a6f443cb2 dungeon_i25-m12-u5-v0.pddl_planlen=77.qdimacs 58223 525166
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Kronegger-Pfandler-Pichler/dungeon/dungeon_i25-m12-u5-v0.pddl_planlen=77/dungeon_i25-m12-u5-v0.pddl_planlen=77.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
91
r
3554730693379d9ac618f88a6f443cb2 dungeon_i25-m12-u5-v0.pddl_planlen=77.qdimacs 58223 525166
# 051411 add coat profile # I will partion Bsu, Bce-clade omegas, wilcox.test in coat proteins and between coat and nonCE protein ########################################## rm(list=ls()); ## some test to demonstrate the syntax for alternative hypothesis #x = rnorm(100)+5 #y = x + 2 #summary(x); #summary(y) #wilcox...
/coatpaml/test.nearlyAll.2013Jan16.Gblocks/R2013Jan20/old/compare.omega.051411.R
no_license
hongqin/BacillusSporeCoat
R
false
false
7,867
r
# 051411 add coat profile # I will partion Bsu, Bce-clade omegas, wilcox.test in coat proteins and between coat and nonCE protein ########################################## rm(list=ls()); ## some test to demonstrate the syntax for alternative hypothesis #x = rnorm(100)+5 #y = x + 2 #summary(x); #summary(y) #wilcox...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/upseRt.R \name{append_string} \alias{append_string} \title{Append string to each element of character vector} \usage{ append_string(char_vector, string_to_append) } \arguments{ \item{char_vector}{A character vector} \item{string_to_prepend}{...
/man/append_string.Rd
no_license
ganesh-krishnan/upseRt
R
false
true
472
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/upseRt.R \name{append_string} \alias{append_string} \title{Append string to each element of character vector} \usage{ append_string(char_vector, string_to_append) } \arguments{ \item{char_vector}{A character vector} \item{string_to_prepend}{...
#' Naive method for Cross-validation in Multiply Imputed datasets #' #' \code{MI_cv_naive} Cross-validation by applying multiply imputed pooled models in train #' and test folds. Called by function \code{psfmi_perform}. #' #' @param pobj An object of class \code{pmods} (pooled models), produced by a previous #' call ...
/R/MI_cv_naive.R
no_license
mwheymans/psfmi
R
false
false
7,937
r
#' Naive method for Cross-validation in Multiply Imputed datasets #' #' \code{MI_cv_naive} Cross-validation by applying multiply imputed pooled models in train #' and test folds. Called by function \code{psfmi_perform}. #' #' @param pobj An object of class \code{pmods} (pooled models), produced by a previous #' call ...
cq <- function(...) { paste(...,sep='') }
/R/cq.R
no_license
gideonite/cn_pipeline
R
false
false
47
r
cq <- function(...) { paste(...,sep='') }
library(checkmate) library(testthat) library(sp) context("gc_geom") test_that("transform from sf to geom", { # test POINT input <- gtSF$point output <- gc_geom(input = input) expect_class(output, classes = "geom") expect_true(output@type == "point") expect_data_frame(output@point, any.missing = FALSE, nr...
/tests/testthat/test_gc_geom.R
no_license
cran/geometr
R
false
false
6,132
r
library(checkmate) library(testthat) library(sp) context("gc_geom") test_that("transform from sf to geom", { # test POINT input <- gtSF$point output <- gc_geom(input = input) expect_class(output, classes = "geom") expect_true(output@type == "point") expect_data_frame(output@point, any.missing = FALSE, nr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mlst.R \name{cgmlst_distance} \alias{cgmlst_distance} \title{cgmlst_distance} \usage{ cgmlst_distance(df) } \arguments{ \item{cgmlst_data_frame}{Data Frame from 'get_cgmlst' function} } \value{ Parsed JSON response. } \description{ Using outp...
/staphopia/man/cgmlst_distance.Rd
no_license
staphopia/staphopia-r
R
false
true
452
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mlst.R \name{cgmlst_distance} \alias{cgmlst_distance} \title{cgmlst_distance} \usage{ cgmlst_distance(df) } \arguments{ \item{cgmlst_data_frame}{Data Frame from 'get_cgmlst' function} } \value{ Parsed JSON response. } \description{ Using outp...
library(RPMG) ### Name: butdoc ### Title: Button Documentation for RPMG codes ### Aliases: butdoc ### Keywords: misc ### ** Examples ALLLABS = c( "DONE","REFRESH","EPS","LINE","DECIM","MAP","SURF","TRACE","TTC","CITY","TRcol", "STName","Pick","ZOOM","UNZOOM","IDARR","FILT","UnFILT","P-GEN") N = length(ALLL...
/data/genthat_extracted_code/RPMG/examples/butdoc.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,200
r
library(RPMG) ### Name: butdoc ### Title: Button Documentation for RPMG codes ### Aliases: butdoc ### Keywords: misc ### ** Examples ALLLABS = c( "DONE","REFRESH","EPS","LINE","DECIM","MAP","SURF","TRACE","TTC","CITY","TRcol", "STName","Pick","ZOOM","UNZOOM","IDARR","FILT","UnFILT","P-GEN") N = length(ALLL...
86e0f4591dcc856e81f3f11fc89dfb83 query21_query58_1344.qdimacs 3229 9982
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query21_query58_1344/query21_query58_1344.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
71
r
86e0f4591dcc856e81f3f11fc89dfb83 query21_query58_1344.qdimacs 3229 9982
setwd("~/great lakes/Facebook_metrics") fb <- read.csv("dataset_Facebook.csv", header = TRUE) View(fb) ?read.csv fb <- read.csv("dataset_Facebook.csv", header = TRUE, sep = ";") require(dplyr) Select<- head(select(fb, Category:Paid)) View(Select) View(fb) str(fb) fb$Post.Hour v <- fb[...
/code/day_2,3/3-data manipulation.R
no_license
mahoretushar/r_workshop
R
false
false
2,520
r
setwd("~/great lakes/Facebook_metrics") fb <- read.csv("dataset_Facebook.csv", header = TRUE) View(fb) ?read.csv fb <- read.csv("dataset_Facebook.csv", header = TRUE, sep = ";") require(dplyr) Select<- head(select(fb, Category:Paid)) View(Select) View(fb) str(fb) fb$Post.Hour v <- fb[...
library(crossdes) ### Name: allcombs ### Title: Balanced Row-Column Design with all Possible Treatment Orders ### Aliases: allcombs ### Keywords: design ### ** Examples # Design for 4 treatments assigned in 3 periods. # All possible treatment orders occur. allcombs(4,3)
/data/genthat_extracted_code/crossdes/examples/allcombs.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
279
r
library(crossdes) ### Name: allcombs ### Title: Balanced Row-Column Design with all Possible Treatment Orders ### Aliases: allcombs ### Keywords: design ### ** Examples # Design for 4 treatments assigned in 3 periods. # All possible treatment orders occur. allcombs(4,3)
path.met <- "/Volumes/GoogleDrive/My Drive/East Woods/IMSA_2017_Rollinson/Daymet/MortonArb" files.met <- dir(path.met, ".nc") dat.all <- data.frame() pb <- txtProgressBar(min=0, max=length(files.met), style=3) for(i in 1:length(files.met)){ yr.now <- as.numeric(stringr::str_split(files.met[i], "[.]")[[1]][2]) nc...
/scripts_miscellaneous/Climate_Data_Cleaning.R
no_license
MortonArb-ForestEcology/IMSA_2017-FalseRings
R
false
false
3,028
r
path.met <- "/Volumes/GoogleDrive/My Drive/East Woods/IMSA_2017_Rollinson/Daymet/MortonArb" files.met <- dir(path.met, ".nc") dat.all <- data.frame() pb <- txtProgressBar(min=0, max=length(files.met), style=3) for(i in 1:length(files.met)){ yr.now <- as.numeric(stringr::str_split(files.met[i], "[.]")[[1]][2]) nc...
library(tidyverse) library(randomForest) library(ranger) library(parallel) library(cowplot) source('./scripts/import_data.R') source('../Helpers/rmv_low_variance.R') source('./scripts/Functions.R') # Fit a randomForest model to predict Mutant or WT cell population given the # morphological features. dat <- import_data...
/scripts/Fit_Random_forest.R
no_license
goldenberg-lab/LFS_fibroblasts
R
false
false
2,153
r
library(tidyverse) library(randomForest) library(ranger) library(parallel) library(cowplot) source('./scripts/import_data.R') source('../Helpers/rmv_low_variance.R') source('./scripts/Functions.R') # Fit a randomForest model to predict Mutant or WT cell population given the # morphological features. dat <- import_data...
plotVegetationGrid <- function(data, time=1:data$parameter$nSteps){ require(fields) with(data$parameter, { colsVeg <- c("white", two.colors(n=10, start="yellow", end="green4", middle="green")) for (i in time){ image.plot(1:n, 1:m, data$rasters$vegetation[[i]], asp=n/m, col=colsVeg, nlevel=10...
/evaluation/plotVegetationGrid.r
no_license
n-dim/ecohydraulical-feedback
R
false
false
593
r
plotVegetationGrid <- function(data, time=1:data$parameter$nSteps){ require(fields) with(data$parameter, { colsVeg <- c("white", two.colors(n=10, start="yellow", end="green4", middle="green")) for (i in time){ image.plot(1:n, 1:m, data$rasters$vegetation[[i]], asp=n/m, col=colsVeg, nlevel=10...
#' Query Opencast current organization's properties #' #' Returns the current organization's properties. #' #' This function expects the hostname, username and password to be set as environment variables. #' #' @return A list containing the current organization's properties. #' @importFrom httr modify_url #' @export #'...
/R/oc_info_organization_properties.R
no_license
cran/opencastR
R
false
false
1,616
r
#' Query Opencast current organization's properties #' #' Returns the current organization's properties. #' #' This function expects the hostname, username and password to be set as environment variables. #' #' @return A list containing the current organization's properties. #' @importFrom httr modify_url #' @export #'...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/posteriors.R \name{ggplot.posterior} \alias{ggplot.posterior} \title{Visualize the Posterior Distributions of Model Statistics} \usage{ \method{ggplot}{posterior}(data, mapping = NULL, ..., environment = NULL, reorder = TRUE) } \arguments{ ...
/man/ggplot.posterior.Rd
no_license
gridl/tidyposterior
R
false
true
1,101
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/posteriors.R \name{ggplot.posterior} \alias{ggplot.posterior} \title{Visualize the Posterior Distributions of Model Statistics} \usage{ \method{ggplot}{posterior}(data, mapping = NULL, ..., environment = NULL, reorder = TRUE) } \arguments{ ...
# BoxPlot boxplot(LungCap) quantile(LungCap, probs=c(0,0.25,0.5,0.75,1)) boxplot(LungCap ~ Gender) boxplot(LungCap[Gender=="female"), LungCap[Gender=="male")] AgeGroups = cut(Age, breaks = c(0,13,15,17,25), labels=c("<13", "15", "17", "18")) boxplot(LungCap~Smoke*AgeGroups, las=2) # Histogram hist(LungCap) hist(Lung...
/Plot.R
no_license
lmontigny/R_programming
R
false
false
975
r
# BoxPlot boxplot(LungCap) quantile(LungCap, probs=c(0,0.25,0.5,0.75,1)) boxplot(LungCap ~ Gender) boxplot(LungCap[Gender=="female"), LungCap[Gender=="male")] AgeGroups = cut(Age, breaks = c(0,13,15,17,25), labels=c("<13", "15", "17", "18")) boxplot(LungCap~Smoke*AgeGroups, las=2) # Histogram hist(LungCap) hist(Lung...
\name{popMisfitMACS} \alias{popMisfitMACS} \title{ Find population misfit by sufficient statistics } \description{ Find the value quantifying the amount of population misfit: \eqn{F_0}, RMSEA, and SRMR. See the definition of each index at \code{\link{summaryMisspec}}. } \usage{ popMisfitMACS(paramM, paramCM,...
/simsem/man/popMisfitMACS.Rd
no_license
simsem/simsem
R
false
false
1,652
rd
\name{popMisfitMACS} \alias{popMisfitMACS} \title{ Find population misfit by sufficient statistics } \description{ Find the value quantifying the amount of population misfit: \eqn{F_0}, RMSEA, and SRMR. See the definition of each index at \code{\link{summaryMisspec}}. } \usage{ popMisfitMACS(paramM, paramCM,...
\name{ebayes} \alias{ebayes} \alias{eBayes} \alias{treat} \title{Empirical Bayes Statistics for Differential Expression} \description{Given a microarray linear model fit, compute moderated t-statistics, moderated F-statistic, and log-odds of differential expression by empirical Bayes moderation of the standard errors t...
/man/ebayes.Rd
no_license
SynBioTek/limma2
R
false
false
8,382
rd
\name{ebayes} \alias{ebayes} \alias{eBayes} \alias{treat} \title{Empirical Bayes Statistics for Differential Expression} \description{Given a microarray linear model fit, compute moderated t-statistics, moderated F-statistic, and log-odds of differential expression by empirical Bayes moderation of the standard errors t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.r \docType{data} \name{bad_date} \alias{bad_date} \title{Dates in character form} \format{ A tibble with 10 rows and two columns. } \source{ Chris Delcher. } \usage{ bad_date } \description{ A table of dates and observations with the dat...
/man/bad_date.Rd
permissive
rserran/socviz
R
false
true
380
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.r \docType{data} \name{bad_date} \alias{bad_date} \title{Dates in character form} \format{ A tibble with 10 rows and two columns. } \source{ Chris Delcher. } \usage{ bad_date } \description{ A table of dates and observations with the dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/chart.CumReturns.R \name{chart.CumReturns} \alias{chart.CumReturns} \title{Cumulates and graphs a set of periodic returns} \usage{ chart.CumReturns( R, wealth.index = FALSE, geometric = TRUE, legend.loc = NULL, colorset = (1:12), ...
/man/chart.CumReturns.Rd
no_license
braverock/PerformanceAnalytics
R
false
true
2,095
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/chart.CumReturns.R \name{chart.CumReturns} \alias{chart.CumReturns} \title{Cumulates and graphs a set of periodic returns} \usage{ chart.CumReturns( R, wealth.index = FALSE, geometric = TRUE, legend.loc = NULL, colorset = (1:12), ...
# Creating Cladograms in R ############################################################################################### #Install/Load Packages #ape is a program used in r that has functions for manipulating phylogenetic trees install.packages("ape",dependencies = TRUE) library(ape) #p...
/Cladogram syntax.R
no_license
nfiutek/myrepo
R
false
false
4,633
r
# Creating Cladograms in R ############################################################################################### #Install/Load Packages #ape is a program used in r that has functions for manipulating phylogenetic trees install.packages("ape",dependencies = TRUE) library(ape) #p...
# The existence of this file forces devtools::check() to run all the tests in # the "tests/testthat/" directory. library(testthat) library(ggrecessions) test_check("ggrecessions")
/tests/testthat.R
permissive
matthewstern/ggrecessions
R
false
false
182
r
# The existence of this file forces devtools::check() to run all the tests in # the "tests/testthat/" directory. library(testthat) library(ggrecessions) test_check("ggrecessions")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dvec.R \name{print.dvec} \alias{print.dvec} \title{Print Decorated Vector} \usage{ \method{print}{dvec}(x, ...) } \arguments{ \item{x}{dvec} \item{...}{passed arguments} } \value{ character } \description{ Prints a decorated vector. } \seeal...
/man/print.dvec.Rd
no_license
bergsmat/yamlet
R
false
true
1,058
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dvec.R \name{print.dvec} \alias{print.dvec} \title{Print Decorated Vector} \usage{ \method{print}{dvec}(x, ...) } \arguments{ \item{x}{dvec} \item{...}{passed arguments} } \value{ character } \description{ Prints a decorated vector. } \seeal...
library('reshape2') library('plyr') ##### ##### ##### Get slopes of n seconds after each token ###### getPriorGuise <- function(stimulus, tokenNum, token_guise_dataframe) { if (tokenNum != 1) { priorNum <- tokenNum - 1 priorGuise <- token_guise_dataframe[token_guise_dataframe$stimulus==stimulus & token_guise...
/slope_functions.r
no_license
supermartha/realtime_r
R
false
false
5,886
r
library('reshape2') library('plyr') ##### ##### ##### Get slopes of n seconds after each token ###### getPriorGuise <- function(stimulus, tokenNum, token_guise_dataframe) { if (tokenNum != 1) { priorNum <- tokenNum - 1 priorGuise <- token_guise_dataframe[token_guise_dataframe$stimulus==stimulus & token_guise...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SQLiteConnection.R, R/query.R, R/table.R \docType{class} \name{SQLiteConnection-class} \alias{SQLiteConnection-class} \alias{format.SQLiteConnection} \alias{show,SQLiteConnection-method} \alias{dbIsValid,SQLiteConnection-method} \alias{dbQuot...
/man/SQLiteConnection-class.Rd
permissive
hannes/RSQLite
R
false
true
2,939
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SQLiteConnection.R, R/query.R, R/table.R \docType{class} \name{SQLiteConnection-class} \alias{SQLiteConnection-class} \alias{format.SQLiteConnection} \alias{show,SQLiteConnection-method} \alias{dbIsValid,SQLiteConnection-method} \alias{dbQuot...
library(algstat) ### Name: bump ### Title: Convert Dimensions of Approval Data ### Aliases: bump ### ** Examples ## Not run: ##D ##D V0 <- 100 # V0 = number of voters (not votes) ##D bump(V0, 6, 3, 0, 0) # no bump ##D bump(V0, 6, 3, 0, 1) # 1-up ##D bump(V0, 6, 3, 0, 2) # 2-up ##D bump(V0, 6, 3, 0, 3) # 3-up ##D ...
/data/genthat_extracted_code/algstat/examples/bump.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,771
r
library(algstat) ### Name: bump ### Title: Convert Dimensions of Approval Data ### Aliases: bump ### ** Examples ## Not run: ##D ##D V0 <- 100 # V0 = number of voters (not votes) ##D bump(V0, 6, 3, 0, 0) # no bump ##D bump(V0, 6, 3, 0, 1) # 1-up ##D bump(V0, 6, 3, 0, 2) # 2-up ##D bump(V0, 6, 3, 0, 3) # 3-up ##D ...
library(shiny) # Definir la parte UI del archivo ui <- fluidPage( # Se selecciona el título de la interfaz titlePanel("Hacks para datos agrupados"), # Generacion de un conjunto de pestañas tabsetPanel( # Primera pestaña tabPanel('El magi número', ...
/datos_agrupados_app.R
no_license
Sleiven/Shiny
R
false
false
10,003
r
library(shiny) # Definir la parte UI del archivo ui <- fluidPage( # Se selecciona el título de la interfaz titlePanel("Hacks para datos agrupados"), # Generacion de un conjunto de pestañas tabsetPanel( # Primera pestaña tabPanel('El magi número', ...
ORGANISM <- "Felis catus" ### List of assemblies first by WGS Project, then by date. ASSEMBLIES <- list( ## --- WGS Project: AANG04 --- ## 4805 sequences. list(assembly="Felis_catus_9.0", assembly_level="Chromosome", date="2017/11/20", extra_info=c(breed="Abyssinian", sex="femal...
/inst/registered/NCBI_assemblies/Felis_catus.R
no_license
Bioconductor/GenomeInfoDb
R
false
false
951
r
ORGANISM <- "Felis catus" ### List of assemblies first by WGS Project, then by date. ASSEMBLIES <- list( ## --- WGS Project: AANG04 --- ## 4805 sequences. list(assembly="Felis_catus_9.0", assembly_level="Chromosome", date="2017/11/20", extra_info=c(breed="Abyssinian", sex="femal...
library(jjb) ### Name: char_at ### Title: Character at Position _i_ ### Aliases: char_at ### ** Examples # Example string s = "statistics" # Single character char_at(s, 1) # Vectorized position char_at(s, c(2, 3))
/data/genthat_extracted_code/jjb/examples/char_at.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
223
r
library(jjb) ### Name: char_at ### Title: Character at Position _i_ ### Aliases: char_at ### ** Examples # Example string s = "statistics" # Single character char_at(s, 1) # Vectorized position char_at(s, c(2, 3))
pkgname <- "clc" source(file.path(R.home("share"), "R", "examples-header.R")) options(warn = 1) base::assign(".ExTimings", "clc-Ex.timings", pos = 'CheckExEnv') base::cat("name\tuser\tsystem\telapsed\n", file=base::get(".ExTimings", pos = 'CheckExEnv')) base::assign(".format_ptime", function(x) { if(!is.na(x[4L])) x[...
/clc.Rcheck/clc-Ex.R
no_license
bambooforest/clc
R
false
false
1,396
r
pkgname <- "clc" source(file.path(R.home("share"), "R", "examples-header.R")) options(warn = 1) base::assign(".ExTimings", "clc-Ex.timings", pos = 'CheckExEnv') base::cat("name\tuser\tsystem\telapsed\n", file=base::get(".ExTimings", pos = 'CheckExEnv')) base::assign(".format_ptime", function(x) { if(!is.na(x[4L])) x[...
#' Calculate Upper/Lower Bound Confidence Intervals for Accountability #' #' @param n A count (valid tests, enrolled, etc.). #' @param pct A percentage (Percent On Track/Mastered, Chronic Absenteeism, etc.). #' #' @export #' #' @examples #' #' ci_upper_bound(n = 10, pct = 50) #' ci_lower_bound(n = 10, pct = 50) #' ci_l...
/R/lower_upper_bound_ci.R
no_license
tnedu/acct
R
false
false
760
r
#' Calculate Upper/Lower Bound Confidence Intervals for Accountability #' #' @param n A count (valid tests, enrolled, etc.). #' @param pct A percentage (Percent On Track/Mastered, Chronic Absenteeism, etc.). #' #' @export #' #' @examples #' #' ci_upper_bound(n = 10, pct = 50) #' ci_lower_bound(n = 10, pct = 50) #' ci_l...
library(shiny) library(shinythemes) shinyUI(fluidPage( theme = shinytheme("readable"), titlePanel("Quantitative PCR"), fluidRow( column(width = 3, wellPanel( uiOutput("manual_ct"), file...
/DIA/qPCR/ui.R
permissive
medvir/shiny-server
R
false
false
1,659
r
library(shiny) library(shinythemes) shinyUI(fluidPage( theme = shinytheme("readable"), titlePanel("Quantitative PCR"), fluidRow( column(width = 3, wellPanel( uiOutput("manual_ct"), file...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{splitNetworkData} \alias{splitNetworkData} \title{splitNetworkData} \usage{ splitNetworkData(network_data, group, network_only = FALSE) } \arguments{ \item{network_data}{network_data} \item{group}{group} \item{network_only}{network_only} } \value{ value } \de...
/SESHK2011/man/splitNetworkData.Rd
no_license
ctszkin/SESHK2011
R
false
false
419
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{splitNetworkData} \alias{splitNetworkData} \title{splitNetworkData} \usage{ splitNetworkData(network_data, group, network_only = FALSE) } \arguments{ \item{network_data}{network_data} \item{group}{group} \item{network_only}{network_only} } \value{ value } \de...
library(EDR) ### Name: predict.edr ### Title: Predict values of the link function for a fitted edr-object ### Aliases: predict.edr ### Keywords: smooth regression ### ** Examples require(EDR) ## Not run: demo(edr_ex4)
/data/genthat_extracted_code/EDR/examples/predict.edr.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
225
r
library(EDR) ### Name: predict.edr ### Title: Predict values of the link function for a fitted edr-object ### Aliases: predict.edr ### Keywords: smooth regression ### ** Examples require(EDR) ## Not run: demo(edr_ex4)
# Q1 # look at the 'iris' dataset that comes with R. library(datasets) data(iris) # A description of the dataset can be found by running ?iris str(iris) head(iris) virginica<-subset(iris,Species == 'virginica') sl<-data.frame(virginica$Sepal.Length) sl<-data.frame(iris$Sepal.Length[iris$Species=="virginica"]) sl sum...
/Coursera-R-Programming/Week 3/Quiz 3.r
no_license
LyndonBubb/datasciencecoursera
R
false
false
2,469
r
# Q1 # look at the 'iris' dataset that comes with R. library(datasets) data(iris) # A description of the dataset can be found by running ?iris str(iris) head(iris) virginica<-subset(iris,Species == 'virginica') sl<-data.frame(virginica$Sepal.Length) sl<-data.frame(iris$Sepal.Length[iris$Species=="virginica"]) sl sum...
#Dummy data #set.seed(1) #e1 <- rnorm(10, mean = 0, sd = 1) #set.seed(2) #e2 <- rnorm(10, mean = 0, sd = 1) # FUNCTION 1 ; Do a dm test on bootstrapped sample dm.bootstrap <- function(e1,e2, h, seed){ # WHAT THE FUNCTION DOES # This function takes two error vectors which are time indexed, then ...
/DM Bootstrap Functions.R
no_license
Merveilleuse/Honours_project
R
false
false
6,410
r
#Dummy data #set.seed(1) #e1 <- rnorm(10, mean = 0, sd = 1) #set.seed(2) #e2 <- rnorm(10, mean = 0, sd = 1) # FUNCTION 1 ; Do a dm test on bootstrapped sample dm.bootstrap <- function(e1,e2, h, seed){ # WHAT THE FUNCTION DOES # This function takes two error vectors which are time indexed, then ...
context("nadir/ideal point") test_that("approximate nadir or ideal point if missing", { # setup A = matrix(c(1,2,1,3), byrow = TRUE, ncol = 2L) B = matrix(c(3,2,4,5), byrow = TRUE, ncol = 2L) # passing nonsense (matrizes with different dimensions) expect_error(approximateIdealPoint(matrix(1:10, nrow = 5L), ...
/tests/testthat/test_approximatePoints.R
no_license
jakobbossek/ecr
R
false
false
843
r
context("nadir/ideal point") test_that("approximate nadir or ideal point if missing", { # setup A = matrix(c(1,2,1,3), byrow = TRUE, ncol = 2L) B = matrix(c(3,2,4,5), byrow = TRUE, ncol = 2L) # passing nonsense (matrizes with different dimensions) expect_error(approximateIdealPoint(matrix(1:10, nrow = 5L), ...
mg_per_m2 = TRUE moles = FALSE ## ASSIGN PROTEINS TO FUNCTIONAL CATEGORIES AND CALCULATE PROTEIN AMOUNTS IN EACH CATEGORY ## # called by transformations.R require(readr) require(stringr) require(dplyr) require(tidyr) source('scripts/functions.R') mercator <- read_csv('data/mercator/D14_mercator_20170217.csv') # '...
/sunburst@.R
no_license
jamesrlawson/leaf_proteomics
R
false
false
5,473
r
mg_per_m2 = TRUE moles = FALSE ## ASSIGN PROTEINS TO FUNCTIONAL CATEGORIES AND CALCULATE PROTEIN AMOUNTS IN EACH CATEGORY ## # called by transformations.R require(readr) require(stringr) require(dplyr) require(tidyr) source('scripts/functions.R') mercator <- read_csv('data/mercator/D14_mercator_20170217.csv') # '...
###################################################################### # Deal with Fonts is.Font <- function(x) inherits(x, "Font") ###################################################################### # Create a Font. It needs a workbook object! # - color is an R color string. # Font <- function(wb, colo...
/R/Font.R
no_license
alexkowa/xlsx
R
false
false
1,436
r
###################################################################### # Deal with Fonts is.Font <- function(x) inherits(x, "Font") ###################################################################### # Create a Font. It needs a workbook object! # - color is an R color string. # Font <- function(wb, colo...
require(R.utils) library(openxlsx) library(stringr) #devtools::install_github("ropensci/RSelenium") library(RSelenium) #devtools::install_github("omegahat/Rcompression") ## setting up WAIT = 5 SF = "E:temp" ff64 = "c:/PROGRAMS/Firefox/FirefoxPortable/App/Firefox64/firefox.exe" eCap1 <- list(`moz:firefoxOptions` = li...
/Indices.R
no_license
mgei/investable_indices
R
false
false
4,562
r
require(R.utils) library(openxlsx) library(stringr) #devtools::install_github("ropensci/RSelenium") library(RSelenium) #devtools::install_github("omegahat/Rcompression") ## setting up WAIT = 5 SF = "E:temp" ff64 = "c:/PROGRAMS/Firefox/FirefoxPortable/App/Firefox64/firefox.exe" eCap1 <- list(`moz:firefoxOptions` = li...
\name{hist_scores} \alias{hist_scores} \title{ Plots the distribution of scores following an GOexpress analysis. } \description{ Plots the an histogram representing the frequencies of scores in the output variable of the {GO_analyse()} function. This function can also be used on the output of \code{subset_scores()}...
/man/hist_scores.Rd
no_license
kevinrue/GOexpress
R
false
false
1,600
rd
\name{hist_scores} \alias{hist_scores} \title{ Plots the distribution of scores following an GOexpress analysis. } \description{ Plots the an histogram representing the frequencies of scores in the output variable of the {GO_analyse()} function. This function can also be used on the output of \code{subset_scores()}...
#Zadanie1 ma1 = matrix(0:11, nrow = 3, ncol = 4) ma2 = matrix(2, nrow = 3, ncol = 4) ma3 = matrix(sample(1:3), 1:3, nrow = 3, ncol = 4) #Zadanie2 ma1 + ma2 ma1 - ma2 ma1 * ma2 ma1 / ma2 ma1 + ma3 ma1 - ma3 ma1 * ma3 ma1 / ma3 #Podstaw...
/Mikołaj Kaczuba7.R.r
no_license
Mikkac2/zlozone-obiekty
R
false
false
1,383
r
#Zadanie1 ma1 = matrix(0:11, nrow = 3, ncol = 4) ma2 = matrix(2, nrow = 3, ncol = 4) ma3 = matrix(sample(1:3), 1:3, nrow = 3, ncol = 4) #Zadanie2 ma1 + ma2 ma1 - ma2 ma1 * ma2 ma1 / ma2 ma1 + ma3 ma1 - ma3 ma1 * ma3 ma1 / ma3 #Podstaw...
print('the firs try to connect R to github') print('now this file lives on github') a <- c(1,2,3,3,4,4,5,5,6,6) aMean <- mean(a) print(aMean)
/testing.r
no_license
sulaimanbehzad/testRstudio
R
false
false
141
r
print('the firs try to connect R to github') print('now this file lives on github') a <- c(1,2,3,3,4,4,5,5,6,6) aMean <- mean(a) print(aMean)
thislist <- list("apple", "banana", "cherry", "blueberry") thislist
/Saneeth/lists.R
no_license
tactlabs/r-samples
R
false
false
69
r
thislist <- list("apple", "banana", "cherry", "blueberry") thislist
# exit_cmd --- terminate execution of a command file subroutine exit_cmd include CI_COMMON integer i, nlevels integer ctoi, getarg character arg (5) if (getarg (1, arg, 5) == EOF) nlevels = 1 else { i = 1 nlevels = ctoi (arg, i) } for (i = Ci_file; i > 0 && nlevels >...
/swt/src/lib/sh/src/intcmd.u/exit_cmd.r
no_license
arnoldrobbins/gt-swt
R
false
false
438
r
# exit_cmd --- terminate execution of a command file subroutine exit_cmd include CI_COMMON integer i, nlevels integer ctoi, getarg character arg (5) if (getarg (1, arg, 5) == EOF) nlevels = 1 else { i = 1 nlevels = ctoi (arg, i) } for (i = Ci_file; i > 0 && nlevels >...
context("Check Data Identical") test_that("Data identical (text formats)", { expect_equivalent(import(export(mtcars, "mtcars.txt")), mtcars) expect_equivalent(import(export(mtcars, "mtcars.csv")), mtcars) expect_equivalent(import(export(mtcars, "mtcars.tsv")), mtcars) }) unlink("mtcars.txt") unlink...
/tests/testthat/test_identical.R
no_license
cran/rio
R
false
false
2,284
r
context("Check Data Identical") test_that("Data identical (text formats)", { expect_equivalent(import(export(mtcars, "mtcars.txt")), mtcars) expect_equivalent(import(export(mtcars, "mtcars.csv")), mtcars) expect_equivalent(import(export(mtcars, "mtcars.tsv")), mtcars) }) unlink("mtcars.txt") unlink...
\name{gs6} \alias{gs6} %- Also NEED an '\alias' for EACH other topic documented here. \title{ CDO Pricing with the C_gs6 Model } \description{ 'gs6' compute 5 tranches spreads under the C_gs6 Model } \usage{ gs6(theta1Input, theta2Input, theta3Input, M, dateInput) } %- maybe also 'usage' for other objects documented he...
/man/gs6.Rd
no_license
freephys/cdov
R
false
false
1,407
rd
\name{gs6} \alias{gs6} %- Also NEED an '\alias' for EACH other topic documented here. \title{ CDO Pricing with the C_gs6 Model } \description{ 'gs6' compute 5 tranches spreads under the C_gs6 Model } \usage{ gs6(theta1Input, theta2Input, theta3Input, M, dateInput) } %- maybe also 'usage' for other objects documented he...
#' Compute Alpha Shape Persistence Diagram in 3D #' #' \code{diagAS} computes the persistent diagram of the Alpha Shape filtration #' constructed on a point cloud in \eqn{\mathbf{R}^3}. This function is a #' wrapper to \pkg{TDA}'s implementation. It is noted that AS filtration is \emph{only} #' available in 3-dimen...
/R/diagram_diagAS.R
permissive
kyound/TDAkit
R
false
false
2,221
r
#' Compute Alpha Shape Persistence Diagram in 3D #' #' \code{diagAS} computes the persistent diagram of the Alpha Shape filtration #' constructed on a point cloud in \eqn{\mathbf{R}^3}. This function is a #' wrapper to \pkg{TDA}'s implementation. It is noted that AS filtration is \emph{only} #' available in 3-dimen...
# here is my script test <- function()print("1d af")
/dunno.R
no_license
rebeccahz12/test
R
false
false
54
r
# here is my script test <- function()print("1d af")
create_voronoi <- function(cp, land, bbox) { cp$x2 <- cp$x + ifelse(cp$small | is.na(cp$direction), 0, (SIN(cp$direction) * 100)) cp$y2 <- cp$y + ifelse(cp$small | is.na(cp$direction), 0, (COS(cp$direction) * 100)) cp2 <- st_set_geometry(cp, NULL) cp2 <- st_as_sf(cp2, coords = c("x2", "y2"), crs = s...
/R/create_voronoi.R
no_license
Flowminder/mobloc
R
false
false
628
r
create_voronoi <- function(cp, land, bbox) { cp$x2 <- cp$x + ifelse(cp$small | is.na(cp$direction), 0, (SIN(cp$direction) * 100)) cp$y2 <- cp$y + ifelse(cp$small | is.na(cp$direction), 0, (COS(cp$direction) * 100)) cp2 <- st_set_geometry(cp, NULL) cp2 <- st_as_sf(cp2, coords = c("x2", "y2"), crs = s...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/occ_functions.R \name{print.occ_mod} \alias{print.occ_mod} \title{Print method for \code{occ_mod} class} \usage{ \method{print}{occ_mod}(x, ...) } \arguments{ \item{x}{An object of class \link{occ_mod}} \item{...}{Other arguments passed to o...
/man/print.occ_mod.Rd
permissive
StrattonCh/occupancy
R
false
true
398
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/occ_functions.R \name{print.occ_mod} \alias{print.occ_mod} \title{Print method for \code{occ_mod} class} \usage{ \method{print}{occ_mod}(x, ...) } \arguments{ \item{x}{An object of class \link{occ_mod}} \item{...}{Other arguments passed to o...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/addAxesToRgl.R \name{addAxesToRgl} \alias{addAxesToRgl} \title{Add axis markers at local coordinate space origin} \usage{ addAxesToRgl(len = 1, sca = NULL, rot = NULL, trn = NULL, title = NULL, charexp = 1) } \arguments{ \item{len}{The leng...
/mw3dlib/man/addAxesToRgl.Rd
no_license
MikeWise2718/mw3dlib
R
false
true
721
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/addAxesToRgl.R \name{addAxesToRgl} \alias{addAxesToRgl} \title{Add axis markers at local coordinate space origin} \usage{ addAxesToRgl(len = 1, sca = NULL, rot = NULL, trn = NULL, title = NULL, charexp = 1) } \arguments{ \item{len}{The leng...
library(data.table) data <- fread(file = "household_power_consumption.txt", sep = ";", header = TRUE, na.strings = "?") days <- data[Date == "1/2/2007" | Date == "2/2/2007", ] dt <- days[, paste(Date,Time)] datetime <- as.POSIXct(dt, format = "%d/%m/%Y %H:%M:%S") all <- cbind(datetime, days) png("plot3.png", width ...
/plot3.R
no_license
MonikaeR/ExData_Plotting1
R
false
false
814
r
library(data.table) data <- fread(file = "household_power_consumption.txt", sep = ";", header = TRUE, na.strings = "?") days <- data[Date == "1/2/2007" | Date == "2/2/2007", ] dt <- days[, paste(Date,Time)] datetime <- as.POSIXct(dt, format = "%d/%m/%Y %H:%M:%S") all <- cbind(datetime, days) png("plot3.png", width ...
Data <- read.csv(file = "NYPD_Motor_Vehicle_Collisions.csv", header = TRUE) View(Data) names(Data) Var_data <- Data[c(1,5,6,8)] View(Var_data) Var_data[Var_data==""] <- NA Var_clean <- na.omit(Var_data) View(Var_clean) colnames(Streets) <- c("Street", "Count") Streets <- data.frame(table(Var_clean$ON.STREET.NAME))...
/Function.R
no_license
sumitsameriya/Capstone_progress
R
false
false
417
r
Data <- read.csv(file = "NYPD_Motor_Vehicle_Collisions.csv", header = TRUE) View(Data) names(Data) Var_data <- Data[c(1,5,6,8)] View(Var_data) Var_data[Var_data==""] <- NA Var_clean <- na.omit(Var_data) View(Var_clean) colnames(Streets) <- c("Street", "Count") Streets <- data.frame(table(Var_clean$ON.STREET.NAME))...
p <- 0.2; success <- 1; fail <- 0; x <- runif(1000); y <- ifelse(x > p, success, fail); hist(y);
/lab1/lab1_ex3.r
no_license
pasreis/ddrs-labs
R
false
false
103
r
p <- 0.2; success <- 1; fail <- 0; x <- runif(1000); y <- ifelse(x > p, success, fail); hist(y);
predict.gbt <- function(object, newdata, n.trees,...) { predictions <- numeric(length(newdata[,1])) mf <- model.frame(formula=object$formula, data=newdata) x <- model.matrix(attr(mf, "terms"), data=mf) treevector.size <- 6*(2^object$interaction.depth) .Call("predict", as.numeric(object$treematrix), as.nu...
/R/predict.gbt.R
no_license
harrysouthworth/gbt
R
false
false
544
r
predict.gbt <- function(object, newdata, n.trees,...) { predictions <- numeric(length(newdata[,1])) mf <- model.frame(formula=object$formula, data=newdata) x <- model.matrix(attr(mf, "terms"), data=mf) treevector.size <- 6*(2^object$interaction.depth) .Call("predict", as.numeric(object$treematrix), as.nu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/psychobject.R \name{is.psychobject} \alias{is.psychobject} \title{Creates or tests for objects of mode "psychobject".} \usage{ is.psychobject(x) } \arguments{ \item{x}{an arbitrary R object.} } \description{ Creates or tests for objects of mo...
/man/is.psychobject.Rd
permissive
HugoNjb/psycho.R
R
false
true
340
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/psychobject.R \name{is.psychobject} \alias{is.psychobject} \title{Creates or tests for objects of mode "psychobject".} \usage{ is.psychobject(x) } \arguments{ \item{x}{an arbitrary R object.} } \description{ Creates or tests for objects of mo...
#' Download pollution data by station in IMECAs #' #' Retrieve hourly averages of pollution data, by station, measured in #' \href{https://en.wikipedia.org/wiki/Índice_Metropolitano_de_la_Calidad_del_Aire}{IMECAs} #' #' Note that in 2015 it was determined that the stations with codes ACO, AJU, #' INN, MON and MPA wou...
/R/get_station_imeca.R
no_license
cran/aire.zmvm
R
false
false
4,865
r
#' Download pollution data by station in IMECAs #' #' Retrieve hourly averages of pollution data, by station, measured in #' \href{https://en.wikipedia.org/wiki/Índice_Metropolitano_de_la_Calidad_del_Aire}{IMECAs} #' #' Note that in 2015 it was determined that the stations with codes ACO, AJU, #' INN, MON and MPA wou...
epidemie=function(n){ f=function (x){ coef=runif(1) coef*(1/sqrt(2*pi*0.5))*exp(-(x+2)^2) + (1-coef)*(1/sqrt(2*pi*0.5))*exp(-(x-2)^2)} F=function (x){ coef=runif(1) coef*(1/sqrt(2*pi*0.5))*exp(-(x+2)^2) + (1-coef)*(1/sqrt(2*pi*0.5))*exp(-(x-2)^2)} x=seq(-5,5,by=0.0001) X=c() #vecteur abscisse Y=c() #vec...
/Reduction-de-variance.R
no_license
satacroteam/Propagation-Epidemie
R
false
false
3,791
r
epidemie=function(n){ f=function (x){ coef=runif(1) coef*(1/sqrt(2*pi*0.5))*exp(-(x+2)^2) + (1-coef)*(1/sqrt(2*pi*0.5))*exp(-(x-2)^2)} F=function (x){ coef=runif(1) coef*(1/sqrt(2*pi*0.5))*exp(-(x+2)^2) + (1-coef)*(1/sqrt(2*pi*0.5))*exp(-(x-2)^2)} x=seq(-5,5,by=0.0001) X=c() #vecteur abscisse Y=c() #vec...
plot.cv.ncvreg <- function(x, log.l=TRUE, type=c("cve", "rsq", "scale", "snr", "pred", "all"), selected=TRUE, vertical.line=TRUE, col="red", ...) { type <- match.arg(type) if (type=="all") { plot(x, log.l=log.l, type="cve", selected=selected, ...) plot(x, log.l=log.l, type="rsq", selected=selected, ...) ...
/R/plot.cv.ncvreg.R
no_license
grantbrown/ncvreg
R
false
false
2,428
r
plot.cv.ncvreg <- function(x, log.l=TRUE, type=c("cve", "rsq", "scale", "snr", "pred", "all"), selected=TRUE, vertical.line=TRUE, col="red", ...) { type <- match.arg(type) if (type=="all") { plot(x, log.l=log.l, type="cve", selected=selected, ...) plot(x, log.l=log.l, type="rsq", selected=selected, ...) ...
data.dir <- ("./") ctrl.pattern <- paste(<REGEX>) #INPUT REQUIRED case.pattern <- paste(<REGEX) #INPUT REQUIRED case.files <- dir(data.dir, pattern=case.pattern, full.names = TRUE) print("Case Files") print(case.files) control.files <- dir(data.dir, pattern=ctrl.pattern, full.names = TRUE) print("Control Files")...
/SeqGSEA/2-SeqGSEA/run_seqgsea.R
no_license
Shelby-Simpson/Phenotype-Prediction-Pipeline
R
false
false
3,073
r
data.dir <- ("./") ctrl.pattern <- paste(<REGEX>) #INPUT REQUIRED case.pattern <- paste(<REGEX) #INPUT REQUIRED case.files <- dir(data.dir, pattern=case.pattern, full.names = TRUE) print("Case Files") print(case.files) control.files <- dir(data.dir, pattern=ctrl.pattern, full.names = TRUE) print("Control Files")...
# Generates a randomization distribution for my data, plots the # distribution on a histogram, and performs a two-tailed test for the # p-value setwd("C:/Users/dritc/Documents/R/STA13TermProject") northData = read.csv("STA13ProjectData-North.csv", header=TRUE) southData = read.csv("STA13ProjectData-South.csv", heade...
/usTempHypTest.R
no_license
dritchie1031/STA13TermProject
R
false
false
1,152
r
# Generates a randomization distribution for my data, plots the # distribution on a histogram, and performs a two-tailed test for the # p-value setwd("C:/Users/dritc/Documents/R/STA13TermProject") northData = read.csv("STA13ProjectData-North.csv", header=TRUE) southData = read.csv("STA13ProjectData-South.csv", heade...
.plotLayer <- function (layer, loc, asp = NULL, add = FALSE) { # Extract the data for the appropriate plane axis <- which(!is.na(loc)) indices <- alist(i=, j=, k=, t=1, u=1, v=1, w=1) indices[axis] <- loc[axis] data <- do.call("[", c(layer["image"], indices[seq_len(ndim(layer$image))], list(drop=FAL...
/R/viewer.R
no_license
saso008/RNifti
R
false
false
14,350
r
.plotLayer <- function (layer, loc, asp = NULL, add = FALSE) { # Extract the data for the appropriate plane axis <- which(!is.na(loc)) indices <- alist(i=, j=, k=, t=1, u=1, v=1, w=1) indices[axis] <- loc[axis] data <- do.call("[", c(layer["image"], indices[seq_len(ndim(layer$image))], list(drop=FAL...
## The purpose of the following functions is to support the caching of ## of the inverse of a matrix, which can be a costly calculation. ## ## makeCacheMatrix takes a matrix as its input (assumed to be N x N [invertible]) ## and creates a special list that makes available get and set functions for that matrix ## as w...
/cachematrix.R
no_license
rtsuther/ProgrammingAssignment2
R
false
false
1,385
r
## The purpose of the following functions is to support the caching of ## of the inverse of a matrix, which can be a costly calculation. ## ## makeCacheMatrix takes a matrix as its input (assumed to be N x N [invertible]) ## and creates a special list that makes available get and set functions for that matrix ## as w...
## ll.nb = l.nb;
/R/alias.R
no_license
diystat/NBPSeq
R
false
false
17
r
## ll.nb = l.nb;
\name{MONSTER-package} \alias{MONSTER-package} \alias{MONSTER} \docType{package} \title{ \packageTitle{MONSTER} } \description{ \packageDescription{MONSTER} } \details{ The DESCRIPTION file: \packageDESCRIPTION{MONSTER} \packageIndices{MONSTER} MONSTER takes in sequence motif data linking transcription factors (TFs) ...
/man/MONSTER-package.Rd
no_license
QuackenbushLab/MONSTER
R
false
false
842
rd
\name{MONSTER-package} \alias{MONSTER-package} \alias{MONSTER} \docType{package} \title{ \packageTitle{MONSTER} } \description{ \packageDescription{MONSTER} } \details{ The DESCRIPTION file: \packageDESCRIPTION{MONSTER} \packageIndices{MONSTER} MONSTER takes in sequence motif data linking transcription factors (TFs) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classroom_objects.R \name{Attachment} \alias{Attachment} \title{Attachment Object} \usage{ Attachment(driveFile = NULL, youTubeVideo = NULL, link = NULL, form = NULL) } \arguments{ \item{driveFile}{Google Drive file attachment} \item{youTu...
/googleclassroomv1.auto/man/Attachment.Rd
permissive
GVersteeg/autoGoogleAPI
R
false
true
682
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classroom_objects.R \name{Attachment} \alias{Attachment} \title{Attachment Object} \usage{ Attachment(driveFile = NULL, youTubeVideo = NULL, link = NULL, form = NULL) } \arguments{ \item{driveFile}{Google Drive file attachment} \item{youTu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ch02.R \name{m.svd} \alias{m.svd} \title{Replicate Matlab function svd including the diag(d) which is not included in R svd()} \usage{ m.svd(M) } \arguments{ \item{M}{a matrix} } \description{ Replicate Matlab function svd including the d...
/man/m.svd.Rd
no_license
AlfonsoRReyes/RMatlabEDA
R
false
true
367
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ch02.R \name{m.svd} \alias{m.svd} \title{Replicate Matlab function svd including the diag(d) which is not included in R svd()} \usage{ m.svd(M) } \arguments{ \item{M}{a matrix} } \description{ Replicate Matlab function svd including the d...
data <- read_csv("./Data/Manipulated_Data/listings_prepared_for_regression.csv") # regression for price lm(formula = price ~ demand # + number_of_reviews + reviews_per_month # + distance_from_subway_station + distance_from_bus_stop + n_cult_orgs + shooting_number # + calls_911_number ...
/regression_analysis_by_neighborhoods.R
no_license
alexyushkin/What-affects-the-Price-of-Airbnb-Listings-in-NYC
R
false
false
1,419
r
data <- read_csv("./Data/Manipulated_Data/listings_prepared_for_regression.csv") # regression for price lm(formula = price ~ demand # + number_of_reviews + reviews_per_month # + distance_from_subway_station + distance_from_bus_stop + n_cult_orgs + shooting_number # + calls_911_number ...
\name{aov_all_vars} \alias{aov_all_vars} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Analysis of variance } \description{ Perform analysis of variance of all variables in the dataset. } \usage{ aov_all_vars(dataset, column.class, doTukey = T, write.file = F, file.out = "anova-res.csv") }...
/man/aov_all_vars.Rd
no_license
Neal050617/specmine
R
false
false
1,349
rd
\name{aov_all_vars} \alias{aov_all_vars} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Analysis of variance } \description{ Perform analysis of variance of all variables in the dataset. } \usage{ aov_all_vars(dataset, column.class, doTukey = T, write.file = F, file.out = "anova-res.csv") }...
library(ISLR) library(glmnet) library(ggplot2) library(glmnet) library(faraway) library(MASS) library(GGally) datos<-Pima.tr #a) analisis preliminar: correlacion entre variables ggpairs(datos) #b) ajuste de regresion logistica: reg<-glm(type~.,data=datos,family=binomial) summary(reg) #c intervalo de confianza para l...
/G3/pima.R
no_license
jgonzet/Statistical-Learning-in-R
R
false
false
1,860
r
library(ISLR) library(glmnet) library(ggplot2) library(glmnet) library(faraway) library(MASS) library(GGally) datos<-Pima.tr #a) analisis preliminar: correlacion entre variables ggpairs(datos) #b) ajuste de regresion logistica: reg<-glm(type~.,data=datos,family=binomial) summary(reg) #c intervalo de confianza para l...
##################### Exploratory Data Analysis ############################################## # Data Exploratory # Data Preparation # Spliting Data into Train nd Test data using Random sampling setwd("C:\\Users\\Home\\Desktop\\Dataset\\data sheets") cr<-read.csv("Credit.csv",na.strings = c("",NA)) library(d...
/Explorartory Data Analysis (EDA).R
no_license
Yogi5693/Exploratory-Data-Analysis-EDA-
R
false
false
3,792
r
##################### Exploratory Data Analysis ############################################## # Data Exploratory # Data Preparation # Spliting Data into Train nd Test data using Random sampling setwd("C:\\Users\\Home\\Desktop\\Dataset\\data sheets") cr<-read.csv("Credit.csv",na.strings = c("",NA)) library(d...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/AmStockChart.R \docType{methods} \name{setStockEventsSettings} \alias{setStockEventsSettings} \title{Setter for StockEventsSettings} \usage{ \S4method{setStockEventsSettings}{AmStockChart}(.Object, ...) } \arguments{ \item{\code{.Obje...
/man/setStockEventsSettings.Rd
no_license
myndworkz/rAmCharts
R
false
false
1,850
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/AmStockChart.R \docType{methods} \name{setStockEventsSettings} \alias{setStockEventsSettings} \title{Setter for StockEventsSettings} \usage{ \S4method{setStockEventsSettings}{AmStockChart}(.Object, ...) } \arguments{ \item{\code{.Obje...
####SHRAVYA library(shiny) library(rgdal) library(leaflet) s1 <- readOGR(dsn = '2010_CensusData', "2010_CensusData", stringsAsFactors = FALSE) pal <- colorNumeric(palette = "viridis", domain = s1$SE_T002_01) # Define UI for application that draws a histogram ui <- fluidPage( titlePanel("Ch...
/Shravya/app .R
no_license
sbaylor02/Data_Vis_Project
R
false
false
2,292
r
####SHRAVYA library(shiny) library(rgdal) library(leaflet) s1 <- readOGR(dsn = '2010_CensusData', "2010_CensusData", stringsAsFactors = FALSE) pal <- colorNumeric(palette = "viridis", domain = s1$SE_T002_01) # Define UI for application that draws a histogram ui <- fluidPage( titlePanel("Ch...
# the function: make.est_dfe.input <- function(poly.dat, genome.dat, fixed.dat, generation, num.inds.sampled, genome.size, filename, fold=FALSE, use.manual.sample=FALSE){ # because diploid: sample.size <- 2 * num.inds.sampled # make data frames of all possible neutral and deleterious mutations at all time points...
/DFE_analysisCode/CommandLine_RunSlimToDFEconversion_transMateSys.R
no_license
kjgilbert/SlimSimCode
R
false
false
8,484
r
# the function: make.est_dfe.input <- function(poly.dat, genome.dat, fixed.dat, generation, num.inds.sampled, genome.size, filename, fold=FALSE, use.manual.sample=FALSE){ # because diploid: sample.size <- 2 * num.inds.sampled # make data frames of all possible neutral and deleterious mutations at all time points...
#--- #title: "Prevalence Plot" #author: "Mercè Garí" #date: '2021-02-10' #--- here_r = function (...) here::here("Statistics", ...) here_weights = function (...) here::here("SamplingWeights", ...) here_output = function (...) here::here("Output", ...) # Setup library(dplyr) library(ggplot2) library(tidyr) library(ggt...
/Statistics/Plot-Prevalence-Incidence.R
permissive
koco19/epi2
R
false
false
2,612
r
#--- #title: "Prevalence Plot" #author: "Mercè Garí" #date: '2021-02-10' #--- here_r = function (...) here::here("Statistics", ...) here_weights = function (...) here::here("SamplingWeights", ...) here_output = function (...) here::here("Output", ...) # Setup library(dplyr) library(ggplot2) library(tidyr) library(ggt...