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
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/seurat_wrapper.R \name{seurat_ref} \alias{seurat_ref} \alias{seurat_ref.seurat} \alias{seurat_ref.Seurat} \title{Function to convert labelled seurat object to avg expression matrix} \usage{ seurat_ref(seurat_object, ...) \method{seurat_ref}{...
/man/seurat_ref.Rd
permissive
standardgalactic/clustifyr
R
false
true
1,685
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/seurat_wrapper.R \name{seurat_ref} \alias{seurat_ref} \alias{seurat_ref.seurat} \alias{seurat_ref.Seurat} \title{Function to convert labelled seurat object to avg expression matrix} \usage{ seurat_ref(seurat_object, ...) \method{seurat_ref}{...
rm(list = ls()) library(magrittr) devtools::load_all() # load("data-raw/example_data.RData") # Automated --------------------------------------------------------------- # legacy <- read_gt3x( # file = "data-raw/119AGBPFLW (2016-03-08).gt3x", # tz = "UTC", # verbose = TRUE, parser = "legacy" # ) # # dev <- read_...
/data-raw/2_Test_read_3x.R
permissive
Thulasi-vk/AGread
R
false
false
1,505
r
rm(list = ls()) library(magrittr) devtools::load_all() # load("data-raw/example_data.RData") # Automated --------------------------------------------------------------- # legacy <- read_gt3x( # file = "data-raw/119AGBPFLW (2016-03-08).gt3x", # tz = "UTC", # verbose = TRUE, parser = "legacy" # ) # # dev <- read_...
\name{sim.chain} \alias{sim.chain} \alias{sim.chain} \title{Simulate Markov chain data from a Markov model.} \description{Simulate chained data from a simple reversible Markov model (see Foster et al 2009 for details). Simulates stationary and non-stationary data, the later is formed by defining the transition matrix a...
/man/sim.chain.Rd
no_license
cran/RMC
R
false
false
3,935
rd
\name{sim.chain} \alias{sim.chain} \alias{sim.chain} \title{Simulate Markov chain data from a Markov model.} \description{Simulate chained data from a simple reversible Markov model (see Foster et al 2009 for details). Simulates stationary and non-stationary data, the later is formed by defining the transition matrix a...
install.packages("SnowballC") library(SnowballC) install.packages("tseries") library(tseries) install.packages("stm") library(stm) install.packages("reshape") library(reshape) install.packages("tm") library(tm) install.packages("qtl") library(qtl) install.packages("igraph") library(igraph) ...
/TopicModelling.R
no_license
Jacekjt/Topic-Modeling-and-Analysis-of-Building-Related-Injuries
R
false
false
10,868
r
install.packages("SnowballC") library(SnowballC) install.packages("tseries") library(tseries) install.packages("stm") library(stm) install.packages("reshape") library(reshape) install.packages("tm") library(tm) install.packages("qtl") library(qtl) install.packages("igraph") library(igraph) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scdb.r \docType{class} \name{tgScDbMngr-class} \alias{tgScDbMngr-class} \alias{tgScDbMngr} \title{Loading and saving scrdb objects} \description{ Loading and saving scrdb objects } \section{Slots}{ \describe{ \item{\code{basedir}}{character....
/metacell/scrdb/man/tgScDbMngr-class.Rd
no_license
tanaylab/hematopoiesis2018
R
false
true
598
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scdb.r \docType{class} \name{tgScDbMngr-class} \alias{tgScDbMngr-class} \alias{tgScDbMngr} \title{Loading and saving scrdb objects} \description{ Loading and saving scrdb objects } \section{Slots}{ \describe{ \item{\code{basedir}}{character....
chiTail <- function(U=NULL, df = 10, curveColor=1, border=1, col="#569BBD", xlim=NULL, ylim=NULL, xlab='', ylab='', detail=999){ #if(U <= 30){xlim <- c(0,30)} #if(U > 30){xlim <- c(0,U+0.01*U)} temp <- diff(range(xlim)) x <- seq(xlim[1] - temp/4, xlim[2] + temp/4, length.out=detail) y <- dchisq(x, df) ylim ...
/inst/shiny/dist_calc/helper/chiTail.R
no_license
jbryer/DATA606
R
false
false
625
r
chiTail <- function(U=NULL, df = 10, curveColor=1, border=1, col="#569BBD", xlim=NULL, ylim=NULL, xlab='', ylab='', detail=999){ #if(U <= 30){xlim <- c(0,30)} #if(U > 30){xlim <- c(0,U+0.01*U)} temp <- diff(range(xlim)) x <- seq(xlim[1] - temp/4, xlim[2] + temp/4, length.out=detail) y <- dchisq(x, df) ylim ...
# --------------------------------------------------- # David Phillips # # 11/29/2017 # Various graphs showing the distribution of # VL suppression and malaria indicators over poverty # The working directory should be the root of this repo # --------------------------------------------------- # to do # make district...
/vfm/graph_equity.r
no_license
ihmeuw/gf
R
false
false
8,315
r
# --------------------------------------------------- # David Phillips # # 11/29/2017 # Various graphs showing the distribution of # VL suppression and malaria indicators over poverty # The working directory should be the root of this repo # --------------------------------------------------- # to do # make district...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regression.R \name{setb0} \alias{setb0} \title{Class \code{RegFitObj} (regression approach)} \usage{ setb0(rfo, b0) } \arguments{ \item{rfo}{[\code{RegFitObj}(1)]\cr object taken in the argument.} \item{b0}{[\code{numeric(1)}]\cr new value.}...
/man/setb0.Rd
no_license
cran/survivalsvm
R
false
true
435
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regression.R \name{setb0} \alias{setb0} \title{Class \code{RegFitObj} (regression approach)} \usage{ setb0(rfo, b0) } \arguments{ \item{rfo}{[\code{RegFitObj}(1)]\cr object taken in the argument.} \item{b0}{[\code{numeric(1)}]\cr new value.}...
# code for making objects to buffer for each modelling experiment out_dir <- commandArgs()[4] in_dir <- commandArgs()[5] expmt_idx <- as.numeric(commandArgs()[6]) area_max <- as.numeric(commandArgs()[7]) # in km^2, 1 pixel = 25 km^2 cov_pctg <- commandArgs()[8] f_name <- commandArgs()[9] source('helper_functions.R') ...
/make_bg_buffers.R
no_license
jshosborne/pandemic_preparedness
R
false
false
3,342
r
# code for making objects to buffer for each modelling experiment out_dir <- commandArgs()[4] in_dir <- commandArgs()[5] expmt_idx <- as.numeric(commandArgs()[6]) area_max <- as.numeric(commandArgs()[7]) # in km^2, 1 pixel = 25 km^2 cov_pctg <- commandArgs()[8] f_name <- commandArgs()[9] source('helper_functions.R') ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_cat_data.R \name{CSW_GetData} \alias{CSW_GetData} \title{Retrieve data from CSW server} \usage{ CSW_GetData(request = c("GetCapabilities", "GetRecords", "DescribeRecord", "GetDomain", "GetRecordById", "Transaction", "Harvest"), versio...
/man/CSW_GetData.Rd
permissive
HanOostdijk/CSW
R
false
true
2,767
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_cat_data.R \name{CSW_GetData} \alias{CSW_GetData} \title{Retrieve data from CSW server} \usage{ CSW_GetData(request = c("GetCapabilities", "GetRecords", "DescribeRecord", "GetDomain", "GetRecordById", "Transaction", "Harvest"), versio...
\name{summary.svmpath} \alias{summary.svmpath} \title{produce a summary of an svmpath object} \description{ printing an svmpath object can produce a lot of lines. The summary methods gives a more concise description by picking out a subset of the steps } \usage{ \method{summary}{svmpath}(object, nsteps = 5, digits = 6,...
/man/summary.svmpath.Rd
no_license
cran/svmpath
R
false
false
1,266
rd
\name{summary.svmpath} \alias{summary.svmpath} \title{produce a summary of an svmpath object} \description{ printing an svmpath object can produce a lot of lines. The summary methods gives a more concise description by picking out a subset of the steps } \usage{ \method{summary}{svmpath}(object, nsteps = 5, digits = 6,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{allscenarios} \alias{allscenarios} \title{Make a tibble of all scenarios} \usage{ allscenarios() } \description{ a Scenario is defined by three entries: \enumerate{ \item the climate model \item the RCP definition \item the time...
/man/allscenarios.Rd
permissive
floswald/GAEZr
R
false
true
418
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{allscenarios} \alias{allscenarios} \title{Make a tibble of all scenarios} \usage{ allscenarios() } \description{ a Scenario is defined by three entries: \enumerate{ \item the climate model \item the RCP definition \item the time...
library(PracTools) ### Name: nhis ### Title: National Health Interview Survey: Demographic variables ### Aliases: nhis ### Keywords: datasets ### ** Examples data(nhis) str(nhis) table(nhis$sex,nhis$age_r)
/data/genthat_extracted_code/PracTools/examples/nhis.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
213
r
library(PracTools) ### Name: nhis ### Title: National Health Interview Survey: Demographic variables ### Aliases: nhis ### Keywords: datasets ### ** Examples data(nhis) str(nhis) table(nhis$sex,nhis$age_r)
# simple script x = 9 x - 7
/test script.R
no_license
jyoung22/IntroToGit
R
false
false
29
r
# simple script x = 9 x - 7
# conduct simulation using human data Sal.Heidelberg tested by AMC and CEP #----- Set known parameters ----- n <- 500 Beta1 <- c(-0.5273, 3.8115) Beta2 <- c(0.5793, 4.1723) centerDf <- data.frame( x = c(Beta1[1], Beta1[2], Beta1[1], Beta1[2]), y = c(Beta2[1], Beta2[1], Beta2[2], Beta2[2]) ) Sigma <- c(0.5012, 0....
/multidrug resistance/obsSim.R
no_license
MinZhang95/AMR-MDR
R
false
false
4,347
r
# conduct simulation using human data Sal.Heidelberg tested by AMC and CEP #----- Set known parameters ----- n <- 500 Beta1 <- c(-0.5273, 3.8115) Beta2 <- c(0.5793, 4.1723) centerDf <- data.frame( x = c(Beta1[1], Beta1[2], Beta1[1], Beta1[2]), y = c(Beta2[1], Beta2[1], Beta2[2], Beta2[2]) ) Sigma <- c(0.5012, 0....
testlist <- list(testX = c(191493125665849920, 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, 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, 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), trainX ...
/dann/inst/testfiles/calc_distance_C/AFL_calc_distance_C/calc_distance_C_valgrind_files/1609867708-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
1,199
r
testlist <- list(testX = c(191493125665849920, 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, 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, 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), trainX ...
# The law of large numbers says that the sample mean of # iid samples is consistent for the population mean. # n = 1000 which is a large number so # mean = sample mean = 0.5 q <- 0.5 sd <- 1/12 n <- 1000 se <- (1/12)/sqrt(n) mean <- 0.5 qnorm(q, mean = mean, sd = se)
/quizzes/quiz2qu7.R
no_license
BananuhBeatDown/Statistical_Inference
R
false
false
284
r
# The law of large numbers says that the sample mean of # iid samples is consistent for the population mean. # n = 1000 which is a large number so # mean = sample mean = 0.5 q <- 0.5 sd <- 1/12 n <- 1000 se <- (1/12)/sqrt(n) mean <- 0.5 qnorm(q, mean = mean, sd = se)
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/FuGePSD.R \name{writeTestQMFile} \alias{writeTestQMFile} \title{Writes rules into a human-readable format into a file.} \usage{ writeTestQMFile(pop, fileName, numExamples) } \arguments{ \item{pop}{A list of 'Rule' objects with the pop...
/man/writeTestQMFile.Rd
permissive
dejavu2010/SDEFSR
R
false
false
655
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/FuGePSD.R \name{writeTestQMFile} \alias{writeTestQMFile} \title{Writes rules into a human-readable format into a file.} \usage{ writeTestQMFile(pop, fileName, numExamples) } \arguments{ \item{pop}{A list of 'Rule' objects with the pop...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ReadConQuestState_createDF.R \name{getCqDataDf} \alias{getCqDataDf} \title{getCqDataDf} \usage{ getCqDataDf(cqData) } \arguments{ \item{cqData}{An R object of class list, returned by the function conquestr::getCqData} } \value{ A data frame c...
/man/getCqDataDf.Rd
no_license
cran/conquestr
R
false
true
1,173
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ReadConQuestState_createDF.R \name{getCqDataDf} \alias{getCqDataDf} \title{getCqDataDf} \usage{ getCqDataDf(cqData) } \arguments{ \item{cqData}{An R object of class list, returned by the function conquestr::getCqData} } \value{ A data frame c...
# author: Anton Kratz # created: Sun Dec 20 17:43:02 JST 2015 # last change: Mon Jun 6 22:10:42 JST 2016 library(shiny) library(DT) library(ggplot2) library(tools) options(shiny.maxRequestSize=30*1024^2) shinyServer(function(input, output) { foo <- reactive(inputdata()) up <- reactive(nrow(subset(fo...
/server.R
permissive
antonkratz/deiva_github
R
false
false
3,252
r
# author: Anton Kratz # created: Sun Dec 20 17:43:02 JST 2015 # last change: Mon Jun 6 22:10:42 JST 2016 library(shiny) library(DT) library(ggplot2) library(tools) options(shiny.maxRequestSize=30*1024^2) shinyServer(function(input, output) { foo <- reactive(inputdata()) up <- reactive(nrow(subset(fo...
#' dround #' #' Trim to a certain number of digits (equivalent to #' `format(...,digits=digits)`, except that the output is numeric). #' #' @param x A vector of numeric values #' @param digits The number of digits to keep #' @param roundGreaterThan1 Whether to trim also numbers greater than 1 #' (default FALS...
/Functions/dround.R
permissive
GiuseppeTestaLab/EDCMixRisk
R
false
false
977
r
#' dround #' #' Trim to a certain number of digits (equivalent to #' `format(...,digits=digits)`, except that the output is numeric). #' #' @param x A vector of numeric values #' @param digits The number of digits to keep #' @param roundGreaterThan1 Whether to trim also numbers greater than 1 #' (default FALS...
# Tables and figures about employee participation # by solicitation treatment source("scripts/lib/config.R") #### FUNCTIONS ############### # stats for proportions compute_stats <- function(x, y) { tab <- table(x, y) ptab <- prop.table(tab, 1) p <- 100*ptab[, 2] n <- apply(tab, 1, sum) se <- sqrt(p*(100-p)/n) l...
/scripts/04_participation.R
no_license
mrblasco/pgood
R
false
false
6,171
r
# Tables and figures about employee participation # by solicitation treatment source("scripts/lib/config.R") #### FUNCTIONS ############### # stats for proportions compute_stats <- function(x, y) { tab <- table(x, y) ptab <- prop.table(tab, 1) p <- 100*ptab[, 2] n <- apply(tab, 1, sum) se <- sqrt(p*(100-p)/n) l...
#this script is to read in the data I need at the campaign sites for the AQ paper #for each campaign, I will need the AQ data: # Westmead is easy, it is part of oeh_obs - just select the site dir_obs <- "C:/Documents and Settings/eag873/My Documents/R_Model_Intercomparison/Campaign data/" load(paste0(dir_obs,"OEH_ob...
/prep_campaign_rdata.R
no_license
ea-guerette/Model_evaluation_code
R
false
false
4,115
r
#this script is to read in the data I need at the campaign sites for the AQ paper #for each campaign, I will need the AQ data: # Westmead is easy, it is part of oeh_obs - just select the site dir_obs <- "C:/Documents and Settings/eag873/My Documents/R_Model_Intercomparison/Campaign data/" load(paste0(dir_obs,"OEH_ob...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ch11-fn.R \name{ftest.plot} \alias{ftest.plot} \title{Plot the PDF of the F-test Statistic} \usage{ ftest.plot(fstat, deg, pmax = 0.995, side = "two") } \arguments{ \item{fstat}{F-test statistic for the ratio of two population variances} \it...
/man/ftest.plot.Rd
no_license
zlfn/Rstat-1
R
false
true
710
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ch11-fn.R \name{ftest.plot} \alias{ftest.plot} \title{Plot the PDF of the F-test Statistic} \usage{ ftest.plot(fstat, deg, pmax = 0.995, side = "two") } \arguments{ \item{fstat}{F-test statistic for the ratio of two population variances} \it...
#' Delete Records #' #' Deletes one or more records from your organization’s data. #' #' @importFrom httr content #' @importFrom readr type_convert cols #' @importFrom dplyr bind_rows as_tibble #' @importFrom xml2 xml_ns_strip xml_find_all #' @importFrom purrr map_df #' @param ids \code{vector}, \code{matrix}, \code{...
/R/delete.R
permissive
TonyWhiteSMS/salesforcer
R
false
false
8,786
r
#' Delete Records #' #' Deletes one or more records from your organization’s data. #' #' @importFrom httr content #' @importFrom readr type_convert cols #' @importFrom dplyr bind_rows as_tibble #' @importFrom xml2 xml_ns_strip xml_find_all #' @importFrom purrr map_df #' @param ids \code{vector}, \code{matrix}, \code{...
plot.PCMRS <- function(x, col.PCMRS = "red", col.PCM = "black", columns = NULL, ...){ delta <- x$delta delta.PCM <- x$delta.PCM p <- nrow(delta) q <- ncol(delta) if(is.null(columns)){ cols <- floor(sqrt(p)) }else{ cols <- columns } rows <- ceiling((p)/cols) limits <- ran...
/fuzzedpackages/PCMRS/R/plot.PCMRS.R
no_license
akhikolla/testpackages
R
false
false
691
r
plot.PCMRS <- function(x, col.PCMRS = "red", col.PCM = "black", columns = NULL, ...){ delta <- x$delta delta.PCM <- x$delta.PCM p <- nrow(delta) q <- ncol(delta) if(is.null(columns)){ cols <- floor(sqrt(p)) }else{ cols <- columns } rows <- ceiling((p)/cols) limits <- ran...
ShowThresholdDep <- function(pic, thresh = c(0, 1, 4), pic.col = c("black", "white"), out.size = c(row = 2, col = 3, width = 1000, height = 700), file = "threshold.png", ...
/ShowThresholdDep.R
no_license
MartinEls/LogicMaps
R
false
false
1,166
r
ShowThresholdDep <- function(pic, thresh = c(0, 1, 4), pic.col = c("black", "white"), out.size = c(row = 2, col = 3, width = 1000, height = 700), file = "threshold.png", ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{toptable} \alias{toptable} \title{Accessor for Results of Moderated Influence Function Hypothesis Testing} \usage{ toptable(object) } \arguments{ \item{object}{S4 object of class \code{bioTMLE}.} } \value{ contents of \code{topT...
/man/toptable.Rd
permissive
nhejazi/biotmle
R
false
true
456
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{toptable} \alias{toptable} \title{Accessor for Results of Moderated Influence Function Hypothesis Testing} \usage{ toptable(object) } \arguments{ \item{object}{S4 object of class \code{bioTMLE}.} } \value{ contents of \code{topT...
##Plot 2 dataFile <- "./data/household_power_consumption.txt" data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #str(subSetData) datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S") ...
/Plot2.R
no_license
iracemavmm/ExData_Plotting1
R
false
false
529
r
##Plot 2 dataFile <- "./data/household_power_consumption.txt" data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #str(subSetData) datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep=" "), "%d/%m/%Y %H:%M:%S") ...
#' rnamethdeg function #' #' Uses limma to find differentially methylated islands between the high and low groups #' #' @param pat2 data frame generated by rnasubset function #' @param meth data frame of CpG Island methylation values #' #' @import data.table #' @import edgeR #' @import limma #' #' @return data frame of...
/R/rnamethdeg.R
no_license
pcheng84/TCGAbrowser
R
false
false
1,122
r
#' rnamethdeg function #' #' Uses limma to find differentially methylated islands between the high and low groups #' #' @param pat2 data frame generated by rnasubset function #' @param meth data frame of CpG Island methylation values #' #' @import data.table #' @import edgeR #' @import limma #' #' @return data frame of...
################################################################################# ## R PROGRAM: helperFunctions.R ## ## PROJECT: R fuctions for HIV screening tool development ## ## WRITTEN BY: Steve Gutreuter, CDC/CGH/DGHT/Statistics, Estimation and ## Modeling Tea...
/R/helperFunctions.R
no_license
larajiuk/screenr
R
false
false
9,073
r
################################################################################# ## R PROGRAM: helperFunctions.R ## ## PROJECT: R fuctions for HIV screening tool development ## ## WRITTEN BY: Steve Gutreuter, CDC/CGH/DGHT/Statistics, Estimation and ## Modeling Tea...
tFOBIRotate <- function(x){ r <- length(dim(x)) - 1 rotateStack <- list() for(m in 1:r){ rotateStack[[m]] <- t(eigenVectors(mModeTFOBIMatrix(x, m))) } for(m in 1:r){ x <- tensorTransform(x, rotateStack[[m]], m) } return(list(x = x, U = rotateStack)) }
/tensorBSS/R/tFOBIRotate.R
no_license
ingted/R-Examples
R
false
false
302
r
tFOBIRotate <- function(x){ r <- length(dim(x)) - 1 rotateStack <- list() for(m in 1:r){ rotateStack[[m]] <- t(eigenVectors(mModeTFOBIMatrix(x, m))) } for(m in 1:r){ x <- tensorTransform(x, rotateStack[[m]], m) } return(list(x = x, U = rotateStack)) }
setwd ("C:/Users/Aly/Desktop/GIT/Data_Course/assignments/Assignment_6/") list.files() #1. Convert these fastq files to fasta format and save them as separate files. GIT Term: $ alias fqtofa='sed -n '\''1~4s/^@/>/p;2~4p'\''' ' GIT Term: $ for fn in *.fastq; do fqtofa $fn > $fn.fasta;done #2. Count the number of sequ...
/Assignments/Assignment6_code.R
no_license
A-DeNittis/Data_Course_DeNittis
R
false
false
2,289
r
setwd ("C:/Users/Aly/Desktop/GIT/Data_Course/assignments/Assignment_6/") list.files() #1. Convert these fastq files to fasta format and save them as separate files. GIT Term: $ alias fqtofa='sed -n '\''1~4s/^@/>/p;2~4p'\''' ' GIT Term: $ for fn in *.fastq; do fqtofa $fn > $fn.fasta;done #2. Count the number of sequ...
# context("Get genes") # # library(minfiData) # set <- prepareMethylationSet(getBeta(MsetEx)[1:10,], pheno = data.frame(pData(MsetEx))) # methyOneVar <- DAPipeline(set, variable_names = "sex", probe_method = "ls") # methyTwoVar <- DAPipeline(set, variable_names = "person", probe_method = "ls") # # test_that("One cat...
/tests/testthat/test_14getGenes.R
permissive
isglobal-brge/MEAL
R
false
false
1,015
r
# context("Get genes") # # library(minfiData) # set <- prepareMethylationSet(getBeta(MsetEx)[1:10,], pheno = data.frame(pData(MsetEx))) # methyOneVar <- DAPipeline(set, variable_names = "sex", probe_method = "ls") # methyTwoVar <- DAPipeline(set, variable_names = "person", probe_method = "ls") # # test_that("One cat...
library(tidyverse) library(ngramr) # Get some interesting characteristics of words longwords = reformat$longWord[1:40] shortwords = reformat$shortWord[1:40] all_words = c(longwords, shortwords) cat(all_words, sep='\", \"') for (item in all_words){ print(item + ", ") } # SYLLABLES syllables = c(3, 3, 2, 4, 3, ...
/results/rscripts/add_metadata.R
no_license
lucy3/predictive_info
R
false
false
4,162
r
library(tidyverse) library(ngramr) # Get some interesting characteristics of words longwords = reformat$longWord[1:40] shortwords = reformat$shortWord[1:40] all_words = c(longwords, shortwords) cat(all_words, sep='\", \"') for (item in all_words){ print(item + ", ") } # SYLLABLES syllables = c(3, 3, 2, 4, 3, ...
# questionnaire questions <- read.csv("input/kobo_questions.csv", stringsAsFactors=F, check.names=F) choices <- read.csv("input/kobo_choices.csv", stringsAsFactors=F, check.names=F) # sampling cluster_lookup_table <- read.csv("input/combined_sample_ids.csv", ...
/load_inputs.R
no_license
james-henderson93/washanalyis
R
false
false
1,242
r
# questionnaire questions <- read.csv("input/kobo_questions.csv", stringsAsFactors=F, check.names=F) choices <- read.csv("input/kobo_choices.csv", stringsAsFactors=F, check.names=F) # sampling cluster_lookup_table <- read.csv("input/combined_sample_ids.csv", ...
#Kelso & Crawford with a Cobb-Douglas install.packages(rje) require('rje') require('Matrix') require('gurobi') M<-3 #workers N<-2 #firms MaxT<-2^(M+N) I<-(1:M) J<-(1:N) Y<-matrix(0,2^M,N) P<-matrix(0,N,M) p = rep(1,N) q = rep(1,M) A1 = kronecker(matrix(1,1,2^M),sparseMatrix(1:N,1:N)) A2 = kronecker(sparseMatrix(1:M,1...
/_coding_assignments/Assignment 5 Q1(a).R
no_license
anhnguyendepocen/mec_equil
R
false
false
1,114
r
#Kelso & Crawford with a Cobb-Douglas install.packages(rje) require('rje') require('Matrix') require('gurobi') M<-3 #workers N<-2 #firms MaxT<-2^(M+N) I<-(1:M) J<-(1:N) Y<-matrix(0,2^M,N) P<-matrix(0,N,M) p = rep(1,N) q = rep(1,M) A1 = kronecker(matrix(1,1,2^M),sparseMatrix(1:N,1:N)) A2 = kronecker(sparseMatrix(1:M,1...
#' STAR Genome Generation #' #' @param zent_obj Zent object. #' @param outdir Output directory for STAR genome index. #' @param genome_assembly Path to genome fasta file. #' @param genome_annotation Path to genome gtf file. #' @param sa_bases Number of suffix array bases (--genomeSAindexNbases) #' #' @export star_inde...
/R/star_alignment.R
no_license
zentnerlab/ZentTools
R
false
false
3,228
r
#' STAR Genome Generation #' #' @param zent_obj Zent object. #' @param outdir Output directory for STAR genome index. #' @param genome_assembly Path to genome fasta file. #' @param genome_annotation Path to genome gtf file. #' @param sa_bases Number of suffix array bases (--genomeSAindexNbases) #' #' @export star_inde...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/eutil.R, R/epost.R, R/esearch.R \docType{methods} \name{webenv} \alias{webenv} \alias{webenv,entrez_uid-method} \alias{webenv,epost-method} \alias{webenv,esearch-method} \title{webenv} \usage{ webenv(x, ...) \S4method{webenv}{epost}(x, ...) ...
/man/webenv.Rd
no_license
cran/reutils
R
false
true
1,303
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/eutil.R, R/epost.R, R/esearch.R \docType{methods} \name{webenv} \alias{webenv} \alias{webenv,entrez_uid-method} \alias{webenv,epost-method} \alias{webenv,esearch-method} \title{webenv} \usage{ webenv(x, ...) \S4method{webenv}{epost}(x, ...) ...
library(targets) tar_script({ sleep_run <- function(...) Sys.sleep(10) list( tar_target(data1, sleep_run()), tar_target(data2, sleep_run()), tar_target(model1, sleep_run(data1)), tar_target(model2, sleep_run(data2)), tar_target(conclusions, sleep_run(c(model1, model2))) ) }) # Should just laun...
/tests/interactive/test-tar_watch.R
permissive
billdenney/targets
R
false
false
3,622
r
library(targets) tar_script({ sleep_run <- function(...) Sys.sleep(10) list( tar_target(data1, sleep_run()), tar_target(data2, sleep_run()), tar_target(model1, sleep_run(data1)), tar_target(model2, sleep_run(data2)), tar_target(conclusions, sleep_run(c(model1, model2))) ) }) # Should just laun...
setwd("Y:\\Respondi\\RESPONDI_w3\\") library(haven) wave_1 <- read_dta("./survey_daten/survey_data_w1.dta") wave_2 <- read_dta("./survey_daten/survey_data_w2.dta") wave_3 <- read_dta("./survey_daten/survey_data_w3.dta") ##get all objects with class "labelled" to correctly assign labels and levels subset_colclasses ...
/src/01_preparation/3_1_2_prep_survey_data.R
no_license
chkern/web-tracking
R
false
false
1,383
r
setwd("Y:\\Respondi\\RESPONDI_w3\\") library(haven) wave_1 <- read_dta("./survey_daten/survey_data_w1.dta") wave_2 <- read_dta("./survey_daten/survey_data_w2.dta") wave_3 <- read_dta("./survey_daten/survey_data_w3.dta") ##get all objects with class "labelled" to correctly assign labels and levels subset_colclasses ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clustering.R \name{silhouette_plot} \alias{silhouette_plot} \title{Clustering - generate silhouette plot} \usage{ silhouette_plot(data, kmax = 10) } \arguments{ \item{data}{dataframe} \item{kmax}{number of clusters to check} } \description{ ...
/man/silhouette_plot.Rd
no_license
suzanbaert/analysistools
R
false
true
449
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clustering.R \name{silhouette_plot} \alias{silhouette_plot} \title{Clustering - generate silhouette plot} \usage{ silhouette_plot(data, kmax = 10) } \arguments{ \item{data}{dataframe} \item{kmax}{number of clusters to check} } \description{ ...
## The functions below calculates and cache the inverse of an invertible matrix. #MakeCacheMatrix: 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 set...
/cachematrix.R
no_license
Nicolamunozi/ProgrammingAssignment2
R
false
false
1,000
r
## The functions below calculates and cache the inverse of an invertible matrix. #MakeCacheMatrix: 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 set...
#' Get.Cluster.Distance #' #' This function calculates the distances between two clusterings #' #' @param Clust1 First clustering #' @param Clust2 Second clustering #' #' GetClusterDistance <- function(Clust1, Clust2){ C1 <- Cluster2Adj(Clust1) C2 <- Cluster2Adj(Clust2) d <- sum(C1!=C2) retu...
/R/GetClusterDistance.R
no_license
mukhes3/AggregationMethods
R
false
false
332
r
#' Get.Cluster.Distance #' #' This function calculates the distances between two clusterings #' #' @param Clust1 First clustering #' @param Clust2 Second clustering #' #' GetClusterDistance <- function(Clust1, Clust2){ C1 <- Cluster2Adj(Clust1) C2 <- Cluster2Adj(Clust2) d <- sum(C1!=C2) retu...
# Try out the algorithm on a toy example---- p <- 2; q <- 100; n <- 500 Y <- matrix(rnorm(p * n), nrow = n) X <- matrix(rnorm(q * n), nrow = n) X_test <- matrix(rnorm(q * n), nrow = n) Z <- matrix(1, nrow = n, ncol = 1) Y <- Y + (sin(X)/X) %*% matrix(1.5, nrow=q, ncol=p) + 2 Y_test <- matrix(rnorm(p * n), nrow = n) + ...
/test.R
no_license
turgeonmaxime/multiKernel
R
false
false
3,701
r
# Try out the algorithm on a toy example---- p <- 2; q <- 100; n <- 500 Y <- matrix(rnorm(p * n), nrow = n) X <- matrix(rnorm(q * n), nrow = n) X_test <- matrix(rnorm(q * n), nrow = n) Z <- matrix(1, nrow = n, ncol = 1) Y <- Y + (sin(X)/X) %*% matrix(1.5, nrow=q, ncol=p) + 2 Y_test <- matrix(rnorm(p * n), nrow = n) + ...
library(lubridate) library(chron) #Download the data url<-'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip' download.file(url,destfile='./power_consumption.zip') unzip("./power_consumption.zip",overwrite=TRUE) #Load the data data <- read.table("./household_power_consumpt...
/Plot4.R
no_license
Adam1348/ExploratoryDataAnalysis-CourseProject1
R
false
false
1,422
r
library(lubridate) library(chron) #Download the data url<-'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip' download.file(url,destfile='./power_consumption.zip') unzip("./power_consumption.zip",overwrite=TRUE) #Load the data data <- read.table("./household_power_consumpt...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simdata.R \name{build_covariate} \alias{build_covariate} \title{Build covariance matrix of the covariates} \usage{ build_covariate( sig = rep(1L, 10), confounder_exposure = c(0.2, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, 0), confounder_outcome =...
/man/build_covariate.Rd
permissive
ygeunkim/propensityml
R
false
true
1,655
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simdata.R \name{build_covariate} \alias{build_covariate} \title{Build covariance matrix of the covariates} \usage{ build_covariate( sig = rep(1L, 10), confounder_exposure = c(0.2, 0, 0, 0, 0.9, 0, 0, 0, 0, 0, 0, 0), confounder_outcome =...
\docType{data} \name{parrotfish} \alias{parrotfish} \title{parrotfish data} \description{ parrotfish data } \keyword{data} \keyword{datasets}
/man/parrotfish.Rd
permissive
cboettig/wrightscape
R
false
false
145
rd
\docType{data} \name{parrotfish} \alias{parrotfish} \title{parrotfish data} \description{ parrotfish data } \keyword{data} \keyword{datasets}
## EM-like algorithm for a location-scale mixture model with ## independent repeated measures -- some ID, some not -- ## where each block has its own location and scale but otherwise ## all blocks (within a component or globally, depending) have the same ## shape. ## Correction: For now, this algorithm only implement...
/mixtools/R/spEM.R
no_license
ingted/R-Examples
R
false
false
5,034
r
## EM-like algorithm for a location-scale mixture model with ## independent repeated measures -- some ID, some not -- ## where each block has its own location and scale but otherwise ## all blocks (within a component or globally, depending) have the same ## shape. ## Correction: For now, this algorithm only implement...
\name{fit_bb_model} \alias{fit_bb_model} \title{ Fits a beta-binomial exchangeable model } \description{ Fits a beta-binomial exchangeable model } \usage{ fit_bb_model(d) } \arguments{ \item{d}{ list with components y and n } } \value{ \item{eta}{estimate of mean of proportion} \item{K}{estimate of ...
/man/fit_bb_model.Rd
no_license
karthy257/BApredict
R
false
false
508
rd
\name{fit_bb_model} \alias{fit_bb_model} \title{ Fits a beta-binomial exchangeable model } \description{ Fits a beta-binomial exchangeable model } \usage{ fit_bb_model(d) } \arguments{ \item{d}{ list with components y and n } } \value{ \item{eta}{estimate of mean of proportion} \item{K}{estimate of ...
#x <- seq(-200,400, by=1) #y <- dnorm(x, mean=100, sd=50) #plot(x,y) norm_d_func <- function(z) { a <- c(0.31938153, -0.35656378, 1.7814779, -1.821256, 1.3302744) b <- c(0.2316419) degrees <- 1:5 lambda <- (1 + b*z)^-1 1 - (sqrt(2*pi)*exp((z^2)/2))^-1 * sum(a*lambda^degrees) } plot_d <- function(f) { x.pl...
/ml/distr.R
no_license
alexeyche/alexeyche-junk
R
false
false
1,346
r
#x <- seq(-200,400, by=1) #y <- dnorm(x, mean=100, sd=50) #plot(x,y) norm_d_func <- function(z) { a <- c(0.31938153, -0.35656378, 1.7814779, -1.821256, 1.3302744) b <- c(0.2316419) degrees <- 1:5 lambda <- (1 + b*z)^-1 1 - (sqrt(2*pi)*exp((z^2)/2))^-1 * sum(a*lambda^degrees) } plot_d <- function(f) { x.pl...
rcv_results <- readRDS(test_path("data", "rcv_results.rds")) opt <- getOption("dplyr.summarise.inform", default = "FALSE") options(dplyr.summarise.inform = FALSE) compl <- unnest(rcv_results, .metrics) %>% group_by(deg_free, degree, `wt df`, `wt degree`, .config, .metric, .estimator) %>% summarize( mean = m...
/tests/testthat/test-estimate.R
permissive
tidymodels/tune
R
false
false
653
r
rcv_results <- readRDS(test_path("data", "rcv_results.rds")) opt <- getOption("dplyr.summarise.inform", default = "FALSE") options(dplyr.summarise.inform = FALSE) compl <- unnest(rcv_results, .metrics) %>% group_by(deg_free, degree, `wt df`, `wt degree`, .config, .metric, .estimator) %>% summarize( mean = m...
require(raster) require(landsim) orig.infile <- "../../layers/Mojavset/Spatial/targets/biodiversity/binary/Yucca_brevifolia_broad_extent_avg.tif" orig.outfile <- file.path("../../layers/cleaned",gsub("[.]tif$","_cleaned.tif",basename(orig.infile))) if (FALSE) { # to *prepare* the raster x <- y <- raster(orig....
/analyses/habitats/Yucca_brevifolia.R
no_license
petrelharp/landscape_geometry
R
false
false
1,248
r
require(raster) require(landsim) orig.infile <- "../../layers/Mojavset/Spatial/targets/biodiversity/binary/Yucca_brevifolia_broad_extent_avg.tif" orig.outfile <- file.path("../../layers/cleaned",gsub("[.]tif$","_cleaned.tif",basename(orig.infile))) if (FALSE) { # to *prepare* the raster x <- y <- raster(orig....
check_suggests <- function(package) { if (!requireNamespace(package, quietly = TRUE)) { msg <- sprintf("Suggested package '%s' not present.", package) stop(msg, call. = FALSE) } } make_catcher <- function(fun) { function(...) { # create variables in environment to store output warn <- err <- NUL...
/R/utils.R
permissive
reconhub/trendbreaker
R
false
false
1,885
r
check_suggests <- function(package) { if (!requireNamespace(package, quietly = TRUE)) { msg <- sprintf("Suggested package '%s' not present.", package) stop(msg, call. = FALSE) } } make_catcher <- function(fun) { function(...) { # create variables in environment to store output warn <- err <- NUL...
#' A series of learnr tutorials and Shiny applications for BioDataScience2 #' #' Run the tutorials using[run()]. #' #' @docType package #' @name BioDataScience2-package #' #' @importFrom learnitdown run learnitdownLearnrBanner learnitdownLearnrServer #' @importFrom BioDataScience config sign_in sign_out #' @importFrom ...
/R/BioDataScience2-package.R
permissive
BioDataScience-Course/BioDataScience2
R
false
false
570
r
#' A series of learnr tutorials and Shiny applications for BioDataScience2 #' #' Run the tutorials using[run()]. #' #' @docType package #' @name BioDataScience2-package #' #' @importFrom learnitdown run learnitdownLearnrBanner learnitdownLearnrServer #' @importFrom BioDataScience config sign_in sign_out #' @importFrom ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_eval_by.R \name{plot_eval_by} \alias{plot_eval_by} \title{Plot a metric across multiple values of a model parameter} \usage{ plot_eval_by(sim, metric_name, varying, type = c("aggregated", "raw"), center_aggregator = NULL, spread_aggreg...
/man/plot_eval_by.Rd
no_license
zdk123/simulator
R
false
true
4,618
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot_eval_by.R \name{plot_eval_by} \alias{plot_eval_by} \title{Plot a metric across multiple values of a model parameter} \usage{ plot_eval_by(sim, metric_name, varying, type = c("aggregated", "raw"), center_aggregator = NULL, spread_aggreg...
\name{hpar} \alias{hpar} \title{Deep Neural Net parameters and hyperparameters} \description{ List of Neural Network parameters and hyperparameters to train with gradient descent or particle swarm optimization\cr Not mandatory (the list is preset and all arguments are initialized with default value) but it is advisable...
/man/hpar.Rd
no_license
aboulaboul/automl
R
false
false
5,295
rd
\name{hpar} \alias{hpar} \title{Deep Neural Net parameters and hyperparameters} \description{ List of Neural Network parameters and hyperparameters to train with gradient descent or particle swarm optimization\cr Not mandatory (the list is preset and all arguments are initialized with default value) but it is advisable...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datanode.R \name{data.frame.to.list} \alias{data.frame.to.list} \title{data.frame.to.json} \usage{ data.frame.to.list(df) } \arguments{ \item{df}{data.frame to represent as a list} } \value{ list } \description{ Create a list representation o...
/man/data.frame.to.list.Rd
no_license
apomatix/AnalysisPageServer
R
false
true
894
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datanode.R \name{data.frame.to.list} \alias{data.frame.to.list} \title{data.frame.to.json} \usage{ data.frame.to.list(df) } \arguments{ \item{df}{data.frame to represent as a list} } \value{ list } \description{ Create a list representation o...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.plant3d.R, R/summary.plant3dlist.R \name{summary.plant3d} \alias{summary.plant3d} \alias{summary.plant3dlist} \title{Summarize 3D plants} \usage{ \method{summary}{plant3d}(object, nKErepeat = 10, nsignif = 3, calcSTARbar = F...
/man/summary.plant3d.Rd
no_license
cran/YplantQMC
R
false
true
4,283
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary.plant3d.R, R/summary.plant3dlist.R \name{summary.plant3d} \alias{summary.plant3d} \alias{summary.plant3dlist} \title{Summarize 3D plants} \usage{ \method{summary}{plant3d}(object, nKErepeat = 10, nsignif = 3, calcSTARbar = F...
# setwd('Desktop/CSHL_Ware/chip_seq/Sorghum_bicolor_encode/codes/fq_align_markDup/genomeCov/') # G3_P_K27Ac_rep2_geoCov <- read.table('G3_P_K27Ac_rep2_markDup_geoCov.txt', sep='\t', header=FALSE) G3_P_H3_rep2_geoCov <- read.table('G3_P_H3_rep2_markDup_geoCov.txt', sep='\t', header=FALSE) G3_P_inp_rep2_geoCov <- read.t...
/code/fq_align_markDup/genomeCov/plot_genoCov_Sorg.R
no_license
warelab/Sorghum_phosphorus-1
R
false
false
3,904
r
# setwd('Desktop/CSHL_Ware/chip_seq/Sorghum_bicolor_encode/codes/fq_align_markDup/genomeCov/') # G3_P_K27Ac_rep2_geoCov <- read.table('G3_P_K27Ac_rep2_markDup_geoCov.txt', sep='\t', header=FALSE) G3_P_H3_rep2_geoCov <- read.table('G3_P_H3_rep2_markDup_geoCov.txt', sep='\t', header=FALSE) G3_P_inp_rep2_geoCov <- read.t...
#2357 trekcolors::lcars_2357() #here library(here) here("res", "beep.js") library(jsonlite) library(dplyr) library(lubridate) weather_URL <- 'http://api.met.no/weatherapi/locationforecast/2.0/complete?lat=51.484940&lon=-0.301890&altitude=28' weather <- jsonlite::fromJSON(weather_URL) weather <- jsonlite::flat...
/experiments.r
no_license
DavidRickmann/ShipInterface
R
false
false
1,865
r
#2357 trekcolors::lcars_2357() #here library(here) here("res", "beep.js") library(jsonlite) library(dplyr) library(lubridate) weather_URL <- 'http://api.met.no/weatherapi/locationforecast/2.0/complete?lat=51.484940&lon=-0.301890&altitude=28' weather <- jsonlite::fromJSON(weather_URL) weather <- jsonlite::flat...
# getting lat lon for a bunch of addresses # the object locDOME2013 created in look1.r ## separate out DOME CFS calls for 2013 (our trial year) c1 %>% filter(Original_Call=='DOME',year(Received_Date_Time)==2013) -> cfsDOME2013 locDOME2013 <- cfsDOME2013$Location[1:3] locDOME2013 <- paste(locDOME2013,'Arlington, VA')...
/src/Police/getLatLon.r
no_license
bi-sdal/mitre
R
false
false
3,453
r
# getting lat lon for a bunch of addresses # the object locDOME2013 created in look1.r ## separate out DOME CFS calls for 2013 (our trial year) c1 %>% filter(Original_Call=='DOME',year(Received_Date_Time)==2013) -> cfsDOME2013 locDOME2013 <- cfsDOME2013$Location[1:3] locDOME2013 <- paste(locDOME2013,'Arlington, VA')...
# Function to convert the Date and Time variables to Date/Time classes date_time <- function(date, time) { return (strptime(paste(date, time), "%d/%m/%Y %H:%M:%S")) } # Set working directory and read downloaded file setwd("~/Documents/ExploratoryDataAnalysis") filename <- "household_power_consumption.txt" df <- rea...
/plot4.R
no_license
JACRStf/EXPDTAANALYSIS_PROJ1
R
false
false
1,612
r
# Function to convert the Date and Time variables to Date/Time classes date_time <- function(date, time) { return (strptime(paste(date, time), "%d/%m/%Y %H:%M:%S")) } # Set working directory and read downloaded file setwd("~/Documents/ExploratoryDataAnalysis") filename <- "household_power_consumption.txt" df <- rea...
\name{fregre.ppc.cv} \Rdversion{1.1} \alias{fregre.ppc.cv} \alias{fregre.ppls.cv} \title{ Functional penalized PC (or PLS) regression with scalar response using selection of number of PC (or PLS) components} \description{ Functional Regression with scalar response using selection of numbe...
/man/fregre.ppls.cv.Rd
no_license
desanou/fda.usc
R
false
false
5,508
rd
\name{fregre.ppc.cv} \Rdversion{1.1} \alias{fregre.ppc.cv} \alias{fregre.ppls.cv} \title{ Functional penalized PC (or PLS) regression with scalar response using selection of number of PC (or PLS) components} \description{ Functional Regression with scalar response using selection of numbe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/string.R \name{extractSubstring} \alias{extractSubstring} \title{Extract Substrings Defined by Regular Expressions} \usage{ extractSubstring(pattern, x, index, stringsAsFactors = FALSE) } \arguments{ \item{pattern}{regular expression containi...
/man/extractSubstring.Rd
permissive
KWB-R/kwb.utils
R
false
true
2,135
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/string.R \name{extractSubstring} \alias{extractSubstring} \title{Extract Substrings Defined by Regular Expressions} \usage{ extractSubstring(pattern, x, index, stringsAsFactors = FALSE) } \arguments{ \item{pattern}{regular expression containi...
library(shiny) ui<- fluidPage( h3("Single checkbox"), checkboxGroupInput("checkGroup", h3("Checkbox Group"), choices = list("Choice 1"=1, "Choice 1"=2, "Choice 1"=3), selected = 1) ) serv...
/multiple_checkbox.R
no_license
vganamukhi/R-projects
R
false
false
392
r
library(shiny) ui<- fluidPage( h3("Single checkbox"), checkboxGroupInput("checkGroup", h3("Checkbox Group"), choices = list("Choice 1"=1, "Choice 1"=2, "Choice 1"=3), selected = 1) ) serv...
with(a98927b60655846b9b7c75044faa85332, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';FRAME878836$ENVIRONMENT = gsub("Others","Other", FRAME878836$ENVIRONMENT);});
/80bb2a25-ac5d-47d0-abfc-b3f3811f0936/R/Temp/aINppO1gEGcGG.R
no_license
ayanmanna8/test
R
false
false
273
r
with(a98927b60655846b9b7c75044faa85332, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';FRAME878836$ENVIRONMENT = gsub("Others","Other", FRAME878836$ENVIRONMENT);});
# 4-Prediction.R # Script: Spatial prediction of Rattiness # Software authors: Max T. Eyre, Emanuele Giorgi, Peter Diggle (CHICAS, Lancaster University Medical School) # Article title: A multivariate geostatistical framework for combining multiple indices of abundance for disease # vectors and reservoirs: A case stu...
/Scripts/4-Prediction.R
permissive
maxeyre/Rattiness-1
R
false
false
9,818
r
# 4-Prediction.R # Script: Spatial prediction of Rattiness # Software authors: Max T. Eyre, Emanuele Giorgi, Peter Diggle (CHICAS, Lancaster University Medical School) # Article title: A multivariate geostatistical framework for combining multiple indices of abundance for disease # vectors and reservoirs: A case stu...
#!/usr/bin/Rscript library('rmarkdown') rmarkdown::render('detailed_cv.md', "pdf_document", output_dir="docs") rmarkdown::render("detailed_cv.md", "html_document", output_file="index.html", output_dir = "docs") rmarkdown::render("short_cv.md", "pdf_document", output_dir = "docs")
/generate_githubio.r
no_license
luke-lewandowski/cv
R
false
false
282
r
#!/usr/bin/Rscript library('rmarkdown') rmarkdown::render('detailed_cv.md', "pdf_document", output_dir="docs") rmarkdown::render("detailed_cv.md", "html_document", output_file="index.html", output_dir = "docs") rmarkdown::render("short_cv.md", "pdf_document", output_dir = "docs")
# Initialize the gnuplot handle h1 <- Gpinit() # set gnuplot's additional search directories, to the extdata directory from Rgnuplot (default) Gpsetloadpath(h1) # change gnuplot's working directory to be the same as R's working directory (default) Gpsetwd(h1) # filename for a temporary path+file tmpfile <- tempfile(...
/demo/fenceplot.R
no_license
cran/Rgnuplot
R
false
false
860
r
# Initialize the gnuplot handle h1 <- Gpinit() # set gnuplot's additional search directories, to the extdata directory from Rgnuplot (default) Gpsetloadpath(h1) # change gnuplot's working directory to be the same as R's working directory (default) Gpsetwd(h1) # filename for a temporary path+file tmpfile <- tempfile(...
args = commandArgs() basename = sub(".R$", "", sub("^--file=(.*/)?", "", args[grep("^--file=", args)])) if (length(basename) != 0) quartz(type="pdf", file=paste0(basename, ".pdf"), width=7, height=3) par(family="Palatino") par(mgp=c(1.5,0.5,0)) # title and axis margins. default: c(3,1,0) par(mar=c(1,3,1,1)+0.1) # b...
/fig/poiex.R
no_license
okumuralab/RforFun
R
false
false
554
r
args = commandArgs() basename = sub(".R$", "", sub("^--file=(.*/)?", "", args[grep("^--file=", args)])) if (length(basename) != 0) quartz(type="pdf", file=paste0(basename, ".pdf"), width=7, height=3) par(family="Palatino") par(mgp=c(1.5,0.5,0)) # title and axis margins. default: c(3,1,0) par(mar=c(1,3,1,1)+0.1) # b...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotConcTimeSmooth.R \name{plotConcTimeSmooth} \alias{plotConcTimeSmooth} \title{Plot up to three curves representing the concentration versus time relationship, each curve representing a different flow.} \usage{ plotConcTimeSmooth(eList, q1,...
/man/plotConcTimeSmooth.Rd
permissive
rmhirsch49/EGRET
R
false
true
6,408
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotConcTimeSmooth.R \name{plotConcTimeSmooth} \alias{plotConcTimeSmooth} \title{Plot up to three curves representing the concentration versus time relationship, each curve representing a different flow.} \usage{ plotConcTimeSmooth(eList, q1,...
# K-means recomendaciones por sector de codigo_scian denue region norte setwd("D:/BDAvanzadas") getwd() all.data.raw <- read.csv("datos_resultados.csv", stringsAsFactors = F) str(all.data.raw) nrow(all.data.raw) summary(all.data.raw) all.data.selected <- all.data.raw colnames(all.data.selected) rownames(al...
/KMeansRecomendacionesNorte.R
no_license
TsawadaTsuna/BDAvanzadas
R
false
false
4,018
r
# K-means recomendaciones por sector de codigo_scian denue region norte setwd("D:/BDAvanzadas") getwd() all.data.raw <- read.csv("datos_resultados.csv", stringsAsFactors = F) str(all.data.raw) nrow(all.data.raw) summary(all.data.raw) all.data.selected <- all.data.raw colnames(all.data.selected) rownames(al...
################################################################################ #' Read PLINK files into a "bigSNP" #' #' Function to read bed/bim/fam files into a [bigSNP][bigSNP-class]. #' #' For more information on these formats, please visit #' \href{http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#bed}{PLIN...
/R/readplink.R
no_license
MoisesExpositoAlonso/bigsnpr
R
false
false
3,843
r
################################################################################ #' Read PLINK files into a "bigSNP" #' #' Function to read bed/bim/fam files into a [bigSNP][bigSNP-class]. #' #' For more information on these formats, please visit #' \href{http://pngu.mgh.harvard.edu/~purcell/plink/data.shtml#bed}{PLIN...
setwd(dir = '/media/chrishah/STORAGE/RAD/stacks/ALL/mapping/excl_PCR_dupl/BWA-8MM/M_zebra/3-populations/Diplotaxodon_4pop/m5_mpop5_kernel_iterate_ONE_SNP_PER_TAG_EXCL_SINGLETONS_BOOTSTRAP/r_0.8-p_4/ADEGENET/') install.packages("adegenet") #only required once library(adegenet) #load data from PLINK format data <- read...
/ANALYSES/ADEGENET/Diplotaxodon_4_pop_r_0.8_p4_adegenet.R
no_license
HullUni-bioinformatics/Diplotaxodon_twilight_RAD
R
false
false
6,359
r
setwd(dir = '/media/chrishah/STORAGE/RAD/stacks/ALL/mapping/excl_PCR_dupl/BWA-8MM/M_zebra/3-populations/Diplotaxodon_4pop/m5_mpop5_kernel_iterate_ONE_SNP_PER_TAG_EXCL_SINGLETONS_BOOTSTRAP/r_0.8-p_4/ADEGENET/') install.packages("adegenet") #only required once library(adegenet) #load data from PLINK format data <- read...
library(dplyr) library(randomForest) library(rpart) setwd("C:/Data/MLB/2018/Pitcher/") file_list <- list.files() for (file in file_list){ # if the merged dataset does exist, append to it if (exists("pitchers")){ temp_dataset <-read.table(file, header=TRUE, sep=",",stringsAsFactors = FALSE) pitchers<-r...
/MLBModel.R
no_license
zwag20/GetMLBData
R
false
false
7,792
r
library(dplyr) library(randomForest) library(rpart) setwd("C:/Data/MLB/2018/Pitcher/") file_list <- list.files() for (file in file_list){ # if the merged dataset does exist, append to it if (exists("pitchers")){ temp_dataset <-read.table(file, header=TRUE, sep=",",stringsAsFactors = FALSE) pitchers<-r...
library(stringr) library(ggplot2) library(RColorBrewer) library(knitr) colclean <- function(col, checkouts = 0){ # The colclean function takes a list as exported from Sierra ILS and returns to the # global environment dataframes of # # Arg: # col: An exported list from Sierra including the following value...
/code/colclean.R
no_license
ciakovx/CurriculumLibraryCollectionAnalysis
R
false
false
3,096
r
library(stringr) library(ggplot2) library(RColorBrewer) library(knitr) colclean <- function(col, checkouts = 0){ # The colclean function takes a list as exported from Sierra ILS and returns to the # global environment dataframes of # # Arg: # col: An exported list from Sierra including the following value...
#========================normlized crime in TRIPURA ===================== library(ggplot2) theme_set(theme_bw()) library(dplyr) library(ggplot2) table=read.csv("E:/project/crimes.csv") data2=table %>% group_by(DISTRICT) %>% filter(STATE.UT == "TRIPURA") %>% summarise(all_crimes=sum(Rape,Kidnapping.and.Abduction,Dowry...
/extra/district_33.r
no_license
PurvishaThakkar/datascience-project-in-R-studio
R
false
false
1,019
r
#========================normlized crime in TRIPURA ===================== library(ggplot2) theme_set(theme_bw()) library(dplyr) library(ggplot2) table=read.csv("E:/project/crimes.csv") data2=table %>% group_by(DISTRICT) %>% filter(STATE.UT == "TRIPURA") %>% summarise(all_crimes=sum(Rape,Kidnapping.and.Abduction,Dowry...
## cachematrix.R contains functions that will return the inverse of a matrix ## from cache if the inverse is already calculated. If not already calculated, ## it calculates the inverse of the matrix and returns the inverse. ## makeCacheMatrix first initializes "x" as an empty matrix and "a" to NULL to ## clear things...
/cachematrix.R
no_license
jcstillings/ProgrammingAssignment2
R
false
false
1,808
r
## cachematrix.R contains functions that will return the inverse of a matrix ## from cache if the inverse is already calculated. If not already calculated, ## it calculates the inverse of the matrix and returns the inverse. ## makeCacheMatrix first initializes "x" as an empty matrix and "a" to NULL to ## clear things...
# Description ------------------------------------------------------------------ # Scheduler for trading at the end of each candle and not intra-candle library(cronR) # Path of live trading Rscript path <- "/media/chris/DATA/Documents/Bot_Trading/Coinmaker/Parameter optimization/01 Get Data and Optimize.R" # Command ...
/Parameter optimization/00 Scheduler.R
no_license
jfontestad/ChristosPol-Coinmaker_v0.1
R
false
false
570
r
# Description ------------------------------------------------------------------ # Scheduler for trading at the end of each candle and not intra-candle library(cronR) # Path of live trading Rscript path <- "/media/chris/DATA/Documents/Bot_Trading/Coinmaker/Parameter optimization/01 Get Data and Optimize.R" # Command ...
install.packages('bit64', repos='http://cran.us.r-project.org') install.packages('plyr', repos='http://cran.us.r-project.org') install.packages('ggplot2', repos='http://cran.us.r-project.org') install.packages('data.table', repos='http://cran.us.r-project.org') install.packages('knitr', repos='http://cran.us.r-project....
/requirements.R
no_license
moralesn/smoke-signals-model
R
false
false
584
r
install.packages('bit64', repos='http://cran.us.r-project.org') install.packages('plyr', repos='http://cran.us.r-project.org') install.packages('ggplot2', repos='http://cran.us.r-project.org') install.packages('data.table', repos='http://cran.us.r-project.org') install.packages('knitr', repos='http://cran.us.r-project....
testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322773837191e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.64525441665141e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532...
/meteor/inst/testfiles/Photoperiod/AFL_Photoperiod/Photoperiod_valgrind_files/1615768556-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
683
r
testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322773837191e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.64525441665141e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modify_dataframes.R \name{add_num_result} \alias{add_num_result} \title{Create a Numeric Results Variable} \usage{ add_num_result(df) } \arguments{ \item{df}{The dataframe to add the \code{Conc} variable to. Dataframe must have variables name...
/man/add_num_result.Rd
permissive
mountaindboz/openwaterhg
R
false
true
928
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modify_dataframes.R \name{add_num_result} \alias{add_num_result} \title{Create a Numeric Results Variable} \usage{ add_num_result(df) } \arguments{ \item{df}{The dataframe to add the \code{Conc} variable to. Dataframe must have variables name...
# Works up storage NH3 emission data for MTC work rm(list = ls()) source('rounddf.R') source('packages.R') source('load.R') source('clean.R') source('spec.R') source('mtc.R') source('summ.R') source('export.R') source('plot.R')
/scripts/main.R
no_license
sashahafner/NH3MTC
R
false
false
232
r
# Works up storage NH3 emission data for MTC work rm(list = ls()) source('rounddf.R') source('packages.R') source('load.R') source('clean.R') source('spec.R') source('mtc.R') source('summ.R') source('export.R') source('plot.R')
################################################################################ # Course: R Programming # Title: Week 3 Programming Assignment 2 # Author: Patrick O'Malley # Date: 6/20/17 ################################################################################ # Create a set of functions that can calculate...
/cachematrix.R
no_license
pomalley08/ProgrammingAssignment2
R
false
false
1,230
r
################################################################################ # Course: R Programming # Title: Week 3 Programming Assignment 2 # Author: Patrick O'Malley # Date: 6/20/17 ################################################################################ # Create a set of functions that can calculate...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git_status.R \name{git_status} \alias{git_status} \title{Get status of a Git repo} \usage{ git_status(repo = ".", ls = FALSE) } \arguments{ \item{repo}{Path to a Git repo. If unspecified, current working directory is checked to see if it is o...
/man/git_status.Rd
no_license
jrnold/githug
R
false
true
1,434
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git_status.R \name{git_status} \alias{git_status} \title{Get status of a Git repo} \usage{ git_status(repo = ".", ls = FALSE) } \arguments{ \item{repo}{Path to a Git repo. If unspecified, current working directory is checked to see if it is o...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AutoGeneratedDefinitions.R \name{existsIncidenceRateName} \alias{existsIncidenceRateName} \title{Check if IncidenceRate definition name exists.} \usage{ existsIncidenceRateName(incidenceRateName, baseUrl) } \arguments{ \item{incidenceRateName...
/man/existsIncidenceRateName.Rd
permissive
OHDSI/ROhdsiWebApi
R
false
true
939
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AutoGeneratedDefinitions.R \name{existsIncidenceRateName} \alias{existsIncidenceRateName} \title{Check if IncidenceRate definition name exists.} \usage{ existsIncidenceRateName(incidenceRateName, baseUrl) } \arguments{ \item{incidenceRateName...
testlist <- list(latLongs = structure(c(-1.78727476291308e+308, 1.41117821684533e+277, 1.41108272273379e+277, 0, 0, 0, 0, 0, 0), .Dim = c(9L, 1L)), r = 0) result <- do.call(MGDrivE::calcCos,testlist) str(result)
/MGDrivE/inst/testfiles/calcCos/libFuzzer_calcCos/calcCos_valgrind_files/1612732972-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
217
r
testlist <- list(latLongs = structure(c(-1.78727476291308e+308, 1.41117821684533e+277, 1.41108272273379e+277, 0, 0, 0, 0, 0, 0), .Dim = c(9L, 1L)), r = 0) result <- do.call(MGDrivE::calcCos,testlist) str(result)
#' @title Summary of correlations as HTML table #' @name sjt.corr #' #' @seealso \itemize{ #' \item \href{http://www.strengejacke.de/sjPlot/sjt.corr}{sjPlot manual: sjt.corr} #' \item \code{\link{sjp.corr}} #' } #' #' @description Shows the results of a computed correlation as HTML table....
/R/sjTabCorr.R
no_license
swapnaboy/devel
R
false
false
24,308
r
#' @title Summary of correlations as HTML table #' @name sjt.corr #' #' @seealso \itemize{ #' \item \href{http://www.strengejacke.de/sjPlot/sjt.corr}{sjPlot manual: sjt.corr} #' \item \code{\link{sjp.corr}} #' } #' #' @description Shows the results of a computed correlation as HTML table....
library(waitup) context("Gamma (1, naive) cdf has cdf properties") n_eps <- 5 n_points <- 10^2 test_that("Gamma cumulative density is cdf.", { expect_is_cdf(gamma_cdf_1, domain=c(0, 200), arg_bounds=list(alpha=c(1,5), beta=c(1,5)), n_arg_points=20) }) test_that("Gamma exp(log cumulative) density is cdf.",...
/code/waitup/waitup/tests/testthat/test-gamma-is-cdf.R
no_license
sakrejda/tooling
R
false
false
958
r
library(waitup) context("Gamma (1, naive) cdf has cdf properties") n_eps <- 5 n_points <- 10^2 test_that("Gamma cumulative density is cdf.", { expect_is_cdf(gamma_cdf_1, domain=c(0, 200), arg_bounds=list(alpha=c(1,5), beta=c(1,5)), n_arg_points=20) }) test_that("Gamma exp(log cumulative) density is cdf.",...
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 2.12396434367202e-311, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613112431-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
257
r
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 2.12396434367202e-311, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
roi_volume_matrix <- function(mat, refspace, indices, coords) { structure(mat, refspace=refspace, indices=indices, coords=coords, class=c("roi_volume_matrix", "matrix")) } roi_surface_matrix <- function(mat, refspace, indices, coords) { structure(mat, ...
/R/dataset.R
no_license
robchavez/rMVPA
R
false
false
6,709
r
roi_volume_matrix <- function(mat, refspace, indices, coords) { structure(mat, refspace=refspace, indices=indices, coords=coords, class=c("roi_volume_matrix", "matrix")) } roi_surface_matrix <- function(mat, refspace, indices, coords) { structure(mat, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/landscape_functions.R \name{sum_surface} \alias{sum_surface} \title{Sum any number of adaptive landscapes} \usage{ sum_surface(landscapes) } \arguments{ \item{landscapes}{a list of adaptive lanscapes} } \value{ Returns a combined adpative lan...
/man/sum_surface.Rd
no_license
acnishimura/Morphoscape
R
false
true
398
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/landscape_functions.R \name{sum_surface} \alias{sum_surface} \title{Sum any number of adaptive landscapes} \usage{ sum_surface(landscapes) } \arguments{ \item{landscapes}{a list of adaptive lanscapes} } \value{ Returns a combined adpative lan...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scale-brain.R \name{scale_brain} \alias{scale_brain} \alias{scale_colour_brain} \alias{scale_color_brain} \alias{scale_fill_brain} \title{Colour and fill scales from the ggseg atlases} \usage{ scale_brain( name = "dk", na.value = "grey", ...
/man/scale_brain.Rd
permissive
Kaziaa/ggseg
R
false
true
1,263
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/scale-brain.R \name{scale_brain} \alias{scale_brain} \alias{scale_colour_brain} \alias{scale_color_brain} \alias{scale_fill_brain} \title{Colour and fill scales from the ggseg atlases} \usage{ scale_brain( name = "dk", na.value = "grey", ...
library(data.table) library(snow) load("/data/zhangh20/match.Rdata") load("/data/zhangh20/breast_cancer/standard_gwas/case_control/icog/icog_result_odds_sd.Rdata") load("/data/zhangh20/breast_cancer/standard_gwas/case_control/onco/onco_result_odds_sd.Rdata") idx = which(is.na(data$SNP.ICOGS)|is.na(data$SNP.ONCO)|is...
/genetic_correlation/standard_analysis/code/ER-_control/meta/generate_CHR.R
no_license
andrewhaoyu/breast_cancer_data_analysis
R
false
false
1,296
r
library(data.table) library(snow) load("/data/zhangh20/match.Rdata") load("/data/zhangh20/breast_cancer/standard_gwas/case_control/icog/icog_result_odds_sd.Rdata") load("/data/zhangh20/breast_cancer/standard_gwas/case_control/onco/onco_result_odds_sd.Rdata") idx = which(is.na(data$SNP.ICOGS)|is.na(data$SNP.ONCO)|is...
setwd('/Users/ivanliu/Google Drive/ANZ/Multivariate Time Series/NZ_Dairy_v1.2/R') rm(list=ls());gc();source('pairs.r') require(data.table);require(forecast);require(caret);require(bit64) dt <- fread('../data/WorldBankData-NZ-AU-v1.csv', data.table=F, na.strings = '') timeLine <- dt[,'Indicators'] dt <- dt[,-which(names...
/old/NZ_Dairy_v1.1/R/NZ_Diary_Cascade.R
no_license
ivanliu1989/Time_Series_Forecasting_STL
R
false
false
914
r
setwd('/Users/ivanliu/Google Drive/ANZ/Multivariate Time Series/NZ_Dairy_v1.2/R') rm(list=ls());gc();source('pairs.r') require(data.table);require(forecast);require(caret);require(bit64) dt <- fread('../data/WorldBankData-NZ-AU-v1.csv', data.table=F, na.strings = '') timeLine <- dt[,'Indicators'] dt <- dt[,-which(names...
==IMPY tests const PP : int := 1; const KK : int := 3+PP; w : int := 5; r : int := 2; u : Array<int> := [w*(KK+1-r),-w]; a : int := u[r]; mat : Array<Array<int>> :=[[1,2+KK],[3,4]]; pi : °int := §w; x : real := 5+f(r); proc main() is func f (k : ref int) -> (c : int ) is k++; c := c + ++k; return; ...
/tests/demo06.r
permissive
IdrissRio/RNB-Compiler
R
false
false
697
r
==IMPY tests const PP : int := 1; const KK : int := 3+PP; w : int := 5; r : int := 2; u : Array<int> := [w*(KK+1-r),-w]; a : int := u[r]; mat : Array<Array<int>> :=[[1,2+KK],[3,4]]; pi : °int := §w; x : real := 5+f(r); proc main() is func f (k : ref int) -> (c : int ) is k++; c := c + ++k; return; ...
## Get the data datafile<-unzip("exdata-data-household_power_consumption.zip") mydata<-read.table(datafile,header=TRUE,sep=";", as.is=FALSE, na.strings=c("",NA,"?"), stringsAsFactors=FALSE) ## Subset the data frame mydata to get the data for 1ts and 2nd February 2007 feb12data <- subset(mydata, grepl("^[1-2]/2/2007...
/plot2.R
no_license
senile-serpent/Data_Cleaning
R
false
false
1,000
r
## Get the data datafile<-unzip("exdata-data-household_power_consumption.zip") mydata<-read.table(datafile,header=TRUE,sep=";", as.is=FALSE, na.strings=c("",NA,"?"), stringsAsFactors=FALSE) ## Subset the data frame mydata to get the data for 1ts and 2nd February 2007 feb12data <- subset(mydata, grepl("^[1-2]/2/2007...
test_that("bbox functions work", { load_longlake_data(which = "longlake_waterdf") box <- sf::st_bbox(longlake_waterdf) expect_s3_class(sf_bbox_to_sf(box), "sf") expect_s3_class(sf_bbox_to_sf(box)$geometry, "sfc_POLYGON") expect_identical(sf::st_crs(sf_bbox_to_sf(box)), sf::st_crs(longlake_waterdf)) expect_...
/tests/testthat/test-layer-spatial-bbox.R
no_license
paleolimbot/ggspatial
R
false
false
1,519
r
test_that("bbox functions work", { load_longlake_data(which = "longlake_waterdf") box <- sf::st_bbox(longlake_waterdf) expect_s3_class(sf_bbox_to_sf(box), "sf") expect_s3_class(sf_bbox_to_sf(box)$geometry, "sfc_POLYGON") expect_identical(sf::st_crs(sf_bbox_to_sf(box)), sf::st_crs(longlake_waterdf)) expect_...
#' Title #' #' @param domain #' @param gr #' @param dist #' @param priority #' @param prioritize #' @param excluded #' @param tol #' @param i #' #' @return #' @export #' #' @examples selectmpa <- function(domain,gr,dist,priority,prioritize,excluded,name,tol,i){ if(tol<1/length(domain)){ candidates <- 1:leng...
/R/selectmpa.R
no_license
remi-daigle/BESTMPA
R
false
false
903
r
#' Title #' #' @param domain #' @param gr #' @param dist #' @param priority #' @param prioritize #' @param excluded #' @param tol #' @param i #' #' @return #' @export #' #' @examples selectmpa <- function(domain,gr,dist,priority,prioritize,excluded,name,tol,i){ if(tol<1/length(domain)){ candidates <- 1:leng...