id
stringlengths
40
40
repo_name
stringlengths
5
110
path
stringlengths
2
233
content
stringlengths
0
1.03M
size
int32
0
60M
license
stringclasses
15 values
c69f298e51921db1d957cf85f32b3fcd8b0b5087
zyzyis/monetdb
clients/R/MonetDB.R/R/control.R
monetdb.server.start <- function( bat.file ){ if ( .Platform$OS.type == "unix" ) { if( !file.exists( bat.file ) ) stop( paste( bat.file , "does not exist. Run monetdb.server.setup() to create a batch file." ) ) # uugly, find path of pid file again by parsing shell script. sc <- utils...
10,272
mpl-2.0
737e09d9e15a5a01457aa98fffbb8899025108f9
jbrzusto/motus-R-package
R/subjobsInQueue.R
#' return a vector of subjobs of the given topjob which are in the queue #' #' @param tj a Twig object representing the topjob. It must have \code{parent(tj) = NULL} #' #' @return NULL, if no subjobs of \code{tj} are in the queue, otherwise a vector #' with class "Twig" of job IDs. #' #' @export #' #' @author John Brz...
495
gpl-2.0
737e09d9e15a5a01457aa98fffbb8899025108f9
jbrzusto/motusServer
R/subjobsInQueue.R
#' return a vector of subjobs of the given topjob which are in the queue #' #' @param tj a Twig object representing the topjob. It must have \code{parent(tj) = NULL} #' #' @return NULL, if no subjobs of \code{tj} are in the queue, otherwise a vector #' with class "Twig" of job IDs. #' #' @export #' #' @author John Brz...
495
gpl-2.0
5d398ce19bc7438098fdc5db84ef0c1591872b79
computational-neuroimaging-lab/Clark2015_AWS
spot-model/spot_sim_plots_Sw.R
# spot-model/spot_sim_plots.R # # Author: Cameron Craddock, Daniel Clark (2015) # Import packages library(ggplot2) library(gridExtra) library(plyr) library(reshape2) # Create aggregated dataframe aggregate_df <- function(csv, func_name) { # Read in dataframe print('Reading in full dataframe...') full_df <- rea...
14,240
mit
491cda8da64b50ccac4597704d218d058ebea8e5
PortfolioEffect/portfolioeffect-quant-r
PortfolioEffectHFT/demo/efficient_frontier_demo.R
############################################################ # Part 1 - Construct portfolio for optimization ############################################################ require(PortfolioEffectHFT) portfolio=portfolio_create(fromTime="2014-04-13 9:30:01", toTime="2014-04-16 16:00:00") portfolio_settings...
4,830
gpl-3.0
491cda8da64b50ccac4597704d218d058ebea8e5
PortfolioEffect/PortfolioEffectHFT-R
PortfolioEffectHFT/demo/efficient_frontier_demo.R
############################################################ # Part 1 - Construct portfolio for optimization ############################################################ require(PortfolioEffectHFT) portfolio=portfolio_create(fromTime="2014-04-13 9:30:01", toTime="2014-04-16 16:00:00") portfolio_settings...
4,830
gpl-3.0
491cda8da64b50ccac4597704d218d058ebea8e5
PortfolioEffect/PE-HFT-R
PortfolioEffectHFT/demo/efficient_frontier_demo.R
############################################################ # Part 1 - Construct portfolio for optimization ############################################################ require(PortfolioEffectHFT) portfolio=portfolio_create(fromTime="2014-04-13 9:30:01", toTime="2014-04-16 16:00:00") portfolio_settings...
4,830
gpl-3.0
b07ce9761996f5d8d33ff7563cd297017942aed5
JovanSardinha/Project_Adleman
feature_extraction/FFT.R
FFTFunction <- function(fileTyes, progressBlock, FFTWidth){ dataDir <- paste0("./data/", fileTyes, "/") # read in data fileNames <- list.files(dataDir, pattern="*.bytes", full.names=TRUE) noTrain <- length(fileNames) # # variable to break the job into 1000 blocks # progressBlock <- 100 # # # ...
1,894
apache-2.0
a943b4c54a453524c893f04befa747c59b14bf82
distributions-io/invgamma-pdf
test/fixtures/test.number.R
options( digits = 16 ) library( jsonlite ) library( pscl ) alpha = 1 beta = 1 x = c( 0.5, 2.5, 5 ) y = densigamma( x, alpha,beta ) cat( y, sep = ",\n" ) data = list( alpha = alpha, beta = beta, data = x, expected = y ) write( toJSON( data, digits = 16, auto_unbox = TRUE ), "./test/fixtures/number.json" )
313
mit
ebe56b72622d3e824ec4394e6eea12ec038fb183
nathanlazar/BaTFLED3D
not_in_pkg/run_H2O.R
# nathan dot lazar at gmail dot com # Runs a neural net model on cell line/drug response curves using # all predictors for cell lines and drugs # Usage: run_H2O.R <m1.Rdata> <m2.Rdata> <m3.Rdata> <resp.Rdata> # <m1.cv.folds.Rdata> <m2.cv.folds.Rdata> # <out.dir> <options> library(m...
41,326
mit
33a92840b0c488666f1359db4eeb03656db512a8
KWB-R/kwb.wtaq
tests/testthat/test-function-wtConfiguredDistances.R
# # This test file has been generated by kwb.test::create_test_files() # test_that("wtConfiguredDistances() works", { expect_error(kwb.wtaq:::wtConfiguredDistances()) })
175
mit
16c4ee406ceb889f3e7a609f6eed6e872a76f025
cran/hwde
R/snphwe.R
`snphwe` <- function(obs.hom1, obs.hets, obs.hom2) { if(obs.hom1 < 0 || obs.hom2 < 0 || obs.hets < 0) stop('Negative count(s) are not valid') # total number of genotypes N <- obs.hom1 + obs.hom2 + obs.hets # rare homozygotes, common homozygotes obs.homr <- min(obs.hom1, obs.hom2) obs.homc <- max(ob...
1,941
gpl-2.0
f7d9ce506e6af7f3553a35e0b9210ef91d05b43a
h2oai/h2o-dev
h2o-r/tests/testdir_jira/runit_pubdev_1776_leave_one_out_cv.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.pubdev.1776 <- function() { cars <- h2o.importFile(path=locate("smalldata/junit/cars_20mpg.csv")) predictors <- c("displacement","power","weight","acceleration","year") response_col <- "econo...
582
apache-2.0
ed1a8c4eac3bfcb8944f32144c10e74547d5996f
cran/mldr
R/evmetrics_ml.R
# OTHER MULTI-LABEL EVALUATION METRICS ======================================== #' @name Basic metrics #' @rdname evmetrics-ml #' @family evaluation metrics #' @title Multi-label evaluation metrics #' @description Several evaluation metrics designed for multi-label problems. #' @param true_labels Matrix of true labels...
1,527
lgpl-3.0
94a42c4b18e982ab101bc18680aa439e2ddb930e
brennanpincardiff/RforBiochemists
textAnalysis/makeGraphofCitationsCLLPapers.R
# This data file has a list of the PubMed IDs, the year and the citation data data <- read.csv("http://science2therapy.com/data/cllCitation2010to2014_20150722.csv", header=T) str(data) cit <- data$cit # not very useful but good practice to plot the data first... plot(density(cit)) plot(density(cit), log='x') hist(ci...
2,805
mit
f7d9ce506e6af7f3553a35e0b9210ef91d05b43a
nilbody/h2o-3
h2o-r/tests/testdir_jira/runit_pubdev_1776_leave_one_out_cv.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.pubdev.1776 <- function() { cars <- h2o.importFile(path=locate("smalldata/junit/cars_20mpg.csv")) predictors <- c("displacement","power","weight","acceleration","year") response_col <- "econo...
582
apache-2.0
f7d9ce506e6af7f3553a35e0b9210ef91d05b43a
michalkurka/h2o-3
h2o-r/tests/testdir_jira/runit_pubdev_1776_leave_one_out_cv.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.pubdev.1776 <- function() { cars <- h2o.importFile(path=locate("smalldata/junit/cars_20mpg.csv")) predictors <- c("displacement","power","weight","acceleration","year") response_col <- "econo...
582
apache-2.0
f7d9ce506e6af7f3553a35e0b9210ef91d05b43a
YzPaul3/h2o-3
h2o-r/tests/testdir_jira/runit_pubdev_1776_leave_one_out_cv.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.pubdev.1776 <- function() { cars <- h2o.importFile(path=locate("smalldata/junit/cars_20mpg.csv")) predictors <- c("displacement","power","weight","acceleration","year") response_col <- "econo...
582
apache-2.0
ed1a8c4eac3bfcb8944f32144c10e74547d5996f
fcharte/mldr
R/evmetrics_ml.R
# OTHER MULTI-LABEL EVALUATION METRICS ======================================== #' @name Basic metrics #' @rdname evmetrics-ml #' @family evaluation metrics #' @title Multi-label evaluation metrics #' @description Several evaluation metrics designed for multi-label problems. #' @param true_labels Matrix of true labels...
1,527
lgpl-3.0
f7d9ce506e6af7f3553a35e0b9210ef91d05b43a
h2oai/h2o-3
h2o-r/tests/testdir_jira/runit_pubdev_1776_leave_one_out_cv.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.pubdev.1776 <- function() { cars <- h2o.importFile(path=locate("smalldata/junit/cars_20mpg.csv")) predictors <- c("displacement","power","weight","acceleration","year") response_col <- "econo...
582
apache-2.0
f7d9ce506e6af7f3553a35e0b9210ef91d05b43a
mathemage/h2o-3
h2o-r/tests/testdir_jira/runit_pubdev_1776_leave_one_out_cv.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.pubdev.1776 <- function() { cars <- h2o.importFile(path=locate("smalldata/junit/cars_20mpg.csv")) predictors <- c("displacement","power","weight","acceleration","year") response_col <- "econo...
582
apache-2.0
f7d9ce506e6af7f3553a35e0b9210ef91d05b43a
spennihana/h2o-3
h2o-r/tests/testdir_jira/runit_pubdev_1776_leave_one_out_cv.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.pubdev.1776 <- function() { cars <- h2o.importFile(path=locate("smalldata/junit/cars_20mpg.csv")) predictors <- c("displacement","power","weight","acceleration","year") response_col <- "econo...
582
apache-2.0
f7d9ce506e6af7f3553a35e0b9210ef91d05b43a
jangorecki/h2o-3
h2o-r/tests/testdir_jira/runit_pubdev_1776_leave_one_out_cv.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../scripts/h2o-r-test-setup.R") test.pubdev.1776 <- function() { cars <- h2o.importFile(path=locate("smalldata/junit/cars_20mpg.csv")) predictors <- c("displacement","power","weight","acceleration","year") response_col <- "econo...
582
apache-2.0
dce36b959b853dcbbb79fcd95b8d4f69e0733d19
joshuakevinjones/Code_Files
R_Scripts/Development/R__Text Mining Project 2018/old/R Text Mining_2018-05-07.R
library(RODBC) library(data.table) library(readtext) library(tm) library(wordcloud) library(RWeka) setwd("S:/Projects/2018 R Text Mining/texts") # Enter the location of the folder. #server1 <-odbcDriverConnect('driver={SQL Server};server=CQW-DBS001236.stage.twi.com; database=IAACE1; uid=IAACE1User; pwd=9n5B1RIc') ...
2,640
mit
e3788813354f6a23570a1eedeb0892fe65ccfbb3
johngarvin/R-2.1.1rcc
src/library/datasets/data/DNase.R
### $Id: DNase.R,v 1.2 2005/08/15 16:11:26 johnmc Exp $ ### Data on calibration runs for an assay of the enzyme DNase. ### cited in Davidian and Giltinan (1995) section 5.2.4, p.134 "DNase" <- structure(list( Run = structure(ordered(c(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 10, 10, 10, 10, 10, 10, 10,...
4,211
gpl-2.0
3fca3c1e12d649dedf233342cba12b5f9b91fe2e
enbrown/iol-calculations
R/optics.R
#' Point class #' #' Internal class for ray-tracing 2D optics #' #' @param x x coordinate #' @param y y coordinate #' @return Object of Point class #' @family optics #' @keywords internal Point <- function(x, y) { stopifnot(is.numeric(x) & is.finite(x)) stopifnot(is.numeric(y) & is.finite(x)) obj <- list(X = x,...
22,412
agpl-3.0
32b7f302b8cb3c0f16b03a37c57f6689b8becfd1
helmingstay/cellauto
old/sound_noise.R
library(seewave) library(audio) .fn <- 'noise.wav' .rate <-44.1e3 ## freq bounds .bounds <- c(30, 640) ## nsamples at each freq .nn <- 7000 ## weeeeeird #.bounds <- c(10, 1e4) #.nn <- 100 .freq.sample <- seq(from=.bounds[1], to=.bounds[2], length.out = .rate) ## fade in/out ## in n samples .nedge <- 1e4 .edge <- (0:(...
701
lgpl-3.0
32b7f302b8cb3c0f16b03a37c57f6689b8becfd1
helmingstay/rcpp.cgolr
old/sound_noise.R
library(seewave) library(audio) .fn <- 'noise.wav' .rate <-44.1e3 ## freq bounds .bounds <- c(30, 640) ## nsamples at each freq .nn <- 7000 ## weeeeeird #.bounds <- c(10, 1e4) #.nn <- 100 .freq.sample <- seq(from=.bounds[1], to=.bounds[2], length.out = .rate) ## fade in/out ## in n samples .nedge <- 1e4 .edge <- (0:(...
701
lgpl-3.0
223d37af5b49aab1d258a49d784865ae8e522171
agisga/grpSLOPE
R/SLOPE_solver.R
# SLOPE: Sorted L1 Penalized Estimation (SLOPE) # Copyright (C) 2015 Malgorzata Bogdan, Ewout van den Berg, Chiara Sabatti, # Weijie Su, Emmanuel Candes, Evan Patterson # Copyright (C) 2020 Alexej Gossmann (minor modifications to the original code) # # This program is free software: you can redistribute it and/or modif...
5,134
gpl-3.0
1428a8ee60ffe0c982e621187690b5c621302adf
JuKa87/OpenMx
inst/models/passing/SummaryFitStatistics.R
# # Copyright 2007-2015 The OpenMx Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
4,314
apache-2.0
2585b636e272ccb4d696e3d31443091126522e34
leobarone/bRasilLegis
R/obterProposicaoPorID.R
#' Get Proposition Info by Id #' #' @description Returns a data frame containing detailed information on the requested proposal #' at Camara dos Deputados and respective related propositions ("proposicoes #' apensadas"). The only parameter (idPorpo) is required. This function is similar to the #' obterProposicao functi...
1,419
gpl-2.0
78a77071bce27806097190c078c12fdd797db1a6
luisben/dataproductscourseproject
server.R
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://www.rstudio.com/shiny/ # library(shiny) est_monthly_payment <- 0 total_amount_paid <- 0 savings <- 0 cm_ir_rate <- 0 shinyServer(function(input, output) { output$...
1,223
mit
0736683edc2e3b0aed4748a444eb8f7d305e63fc
smutt/RSSAC002
examples/ex6.R
#!/usr/bin/env Rscript --vanilla ## The file is part of the RSSAC002 Graphing API. ## ## The RSSAC002 Graphing API is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation, either version 3 of the License, or ## ...
2,047
gpl-3.0
c24e42e0d169030bb2a3894d97ca064f10c2b839
NZRLIC/RLPlots
R/Merge_psv.R
#' Merge posterior files and thin #' #' Does not work #' #' @author Darcy Webber #' @export #' Merge_psv <- function(source.dir, file.names, target.dir = ".", nThin = 2) { # Do a check if (target.dir %in% source.dir) { stop("Your target directory is the same as one of your source directories!\n") ...
1,109
mit
50856e3d9856c8e858029b51329f885495f1e948
jlopezmalla/spark
R/pkg/R/context.R
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
15,620
apache-2.0
50856e3d9856c8e858029b51329f885495f1e948
MLnick/spark
R/pkg/R/context.R
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
15,620
apache-2.0
50856e3d9856c8e858029b51329f885495f1e948
publicRoman/spark
R/pkg/R/context.R
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
15,620
apache-2.0
50856e3d9856c8e858029b51329f885495f1e948
JerryLead/spark
R/pkg/R/context.R
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
15,620
apache-2.0
50856e3d9856c8e858029b51329f885495f1e948
apache-spark-on-k8s/spark
R/pkg/R/context.R
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
15,620
apache-2.0
50856e3d9856c8e858029b51329f885495f1e948
patrick-nicholson/spark
R/pkg/R/context.R
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
15,620
apache-2.0
1da1e26f6d197025698523bba336eb66a672db67
andrewdefries/andrewdefries.github.io
FDA_Pesticide_Glossary/pentachlorophenate.R
library("knitr") library("rgl") #knit("pentachlorophenate.Rmd") #markdownToHTML('pentachlorophenate.md', 'pentachlorophenate.html', options=c("use_xhml")) #system("pandoc -s pentachlorophenate.html -o pentachlorophenate.pdf") knit2html('pentachlorophenate.Rmd')
264
mit
37d14c8b4ba7fccdebff45b856d23f7baf296043
CuppenResearch/MutationalPatterns
R/strict_refit_best_subset_selection_sample.R
#' Function to perform the strict signature refitting for a single sample with best subset selection #' #' @param mut_mat_sample mutation count matrix for a single sample #' @param signatures signature matrix #' @param max_delta The maximum difference in original vs reconstructed cosine similarity between two iteration...
4,144
mit
f61bd6e637db6393c321e97745a5c1f1493e8aa8
skurscheid/GeneralPurpose
R/plotCoverage.R
plotCoverage <- function(x, chrom, start=1, end=length(x[[chrom]]), col="blue", xlab="Index", ylab="Coverage", main=chrom) { xWindow <- as.vector(window(x[[chrom]], start, end)) x <- start:end xlim <- c(start, end) ylim <- c(0, max(xWindow)) plot(x = start, y = 0, xlim = xlim, ylim = ylim, xlab = xlab, ylab =...
412
gpl-2.0
e985c9d31e8790756f766d471e8657b1b528eba9
flinder/aeep_mcmc
R/RcppExports.R
# This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 dmvnrm_arma <- function(x, mean, sigma) { .Call('aeep_dmvnrm_arma', PACKAGE = 'aeep', x, mean, sigma) } mvrnorm_arma <- function(n, mu, sigma) { .Call('aeep_mvrnorm_arma', PACKAGE = 'aeep', n, mu, sigm...
1,705
mit
8a0e801edd70de0d9e86f5cad1863e39bf3b8143
rlowrance/th
Chart1And2.R
Chart1And2 <- function(my.control) { # class object # methods # $FileDependencies() # $Txt() # these format lines must be edited as a group (15 columns) # line fields: scenario / response / predictorsForm / 12 x ndays case <- '%8s %8s %5s' header.format <- paste0(case, paste0(rep(' %6...
6,405
gpl-3.0
2e1f5ae6576c81817e03b58a8372f5ea436a5404
Dahaniel/DoOR.functions
tests/testthat/test_functions.R
library(DoOR.functions) library(DoOR.data) load_door_data(nointeraction = TRUE) context("correct output") test_that("reset_sfr produces data with SFR value of 0", { door_response_matrix_SFRreset <- reset_sfr(door_response_matrix, "SFR") expect_that(all(door_response_matrix_SFRreset["SFR", ] == 0, na.rm = TRUE)...
627
gpl-3.0
6fa3f54445b2df35fc6e7a44680e0f23c044aeeb
richelbilderbeek/ribir
tests/testthat/test-is_pbd_sim_output.R
context("is_pbd_sim_output") test_that("basic tests", { if (rappdirs::app_dir()$os != "win") { sink(file.path(rappdirs::user_cache_dir(), "ddd")) } else { sink(rappdirs::user_cache_dir()) } result <- is_pbd_sim_output( PBD::pbd_sim(c(0.2, 1, 0.2, 0.1, 0.1), 15), verbose = TRUE ) sink() e...
1,163
gpl-3.0
06a478f5c7e4ed02ff3080f1c28d16bbad96933c
bcgov/bcgroundwater
tests/testthat/test_gwlZypTest.R
context("gwl_zyp_test") test_that("gwl_zyp_test returns data", { g_month <- get_gwl(wells = 309) %>% monthly_values() %>% make_well_ts() g_annual <- g_month %>% dplyr::select(-yearmonth) %>% dplyr::group_by(EMS_ID, Well_Num, Year) %>% dplyr::summarize(nReadings = length(Well_Num), ...
992
apache-2.0
6fef9b7f98850acef70d801adec6d6d757112820
m8rek/Sales_Forecast_UDJ
RunStudy.R
# Project Name: "Sales Forecast Regression Exercise" rm(list = ls()) # clean up the workspace ###################################################################### # THESE ARE THE PROJECT PARAMETERS NEEDED TO GENERATE THE REPORT # When running the case on a local computer, modify this in case you saved the case i...
3,232
mit
6fef9b7f98850acef70d801adec6d6d757112820
tevgeniou/Sales_Forecast_UDJ
RunStudy.R
# Project Name: "Sales Forecast Regression Exercise" rm(list = ls()) # clean up the workspace ###################################################################### # THESE ARE THE PROJECT PARAMETERS NEEDED TO GENERATE THE REPORT # When running the case on a local computer, modify this in case you saved the case i...
3,232
mit
2aa6af34355726c354351a7104a6f522fba80793
fabianekc/DataProducts_Coursera
shiny/storage.R
library(dplyr) library(digest) library(DBI) library(RAmazonS3) # decide which function to use to save based on storage type get_save_fxn <- function(type) { fxn <- sprintf("save_data_%s", type) stopifnot(existsFunction(fxn)) fxn } save_data <- function(data, type) { fxn <- get_save_fxn(...
3,839
mit
a34cb4a8ff960167d13fdbc4cad69c9f970ce255
wStockhausen/rTCSAM2015
R/compareModels.Fits.NatZData.R
#' #'@title Compare fits to size compositions from catch data for TCSAM2015 model runs #' #'@description Function to compare fits to size compositions from catch data for TCSAM2015 model runs. #' #'@param mdfr - dataframe from call to \code{getMDFR.FitsForFleets(...)} for n.at.z data #'@param fleets - fleets to plot [N...
5,932
mit
614044459824d5cecf8bc9a2d31994da4b2564be
jtrecenti/tjspCrim
R/doe.R
#' PDF to text #' #' @export pdf2txt <- function(a) { link <- 'http://www.dje.tjsp.jus.br/cdje/downloadCaderno.do?dtDiario=01/04/2015&cdCaderno=12' download.file(link) } #' @export download_arq <- function(link, a) { passa <- FALSE if(file.exists(a)) { cat('arquivo ', a, ' ja existe!\n') return('suce...
2,851
mit
03312a48590e666515df598876a03676e67d4df8
ellisp/forecastxgb-r-package
pkg/R/misc-doc.R
#' Arctic sea ice #' #' Extent in millions of square kilometres of sea ice in the Arctic from 21 August 1987 to 24 November 2016. #' #' @source National Snow and Ice Data Center, \url{https://nsidc.org/data/docs/noaa/g02135_seaice_index/#daily_data_files"} #' @examples #' plot(seaice_ts) "seaice_ts"
306
gpl-3.0
4c8a487b4a3483179aab8d1945be3955c47cc6f6
h2oai/h2o-3
h2o-r/tests/testdir_munging/unop/runit_cor_spearman.R
setwd(normalizePath(dirname( R.utils::commandArgs(asValues = TRUE)$"f" ))) source("../../../scripts/h2o-r-test-setup.R") test.cor <- function() { data <- as.h2o(iris) cor_R = cor(iris[1], iris[3], method = "spearman") cor_h2o = h2o.cor(x = data[1], y = data[3], method = "Spearman") # R appears to be using...
1,288
apache-2.0
4c8a487b4a3483179aab8d1945be3955c47cc6f6
michalkurka/h2o-3
h2o-r/tests/testdir_munging/unop/runit_cor_spearman.R
setwd(normalizePath(dirname( R.utils::commandArgs(asValues = TRUE)$"f" ))) source("../../../scripts/h2o-r-test-setup.R") test.cor <- function() { data <- as.h2o(iris) cor_R = cor(iris[1], iris[3], method = "spearman") cor_h2o = h2o.cor(x = data[1], y = data[3], method = "Spearman") # R appears to be using...
1,288
apache-2.0
d3a9b2a3f0e358e0a85802214be97f1016dd7987
chipster/chipster-tools
tools/ngs/R/macs2-treatmentOnly.R
# TOOL macs2-treatmentOnly.R: "Find peaks using MACS2, treatment only" (Detects statistically significantly enriched genomic regions in ChIP-seq data. The analysis does not use a control sample. If you have several ChIP samples,you need to merge them first to one file. BAM files can be merged with the Utilities tool \"...
9,078
mit
70e3053257c26c2d13c4faf23b0d62bad589a5f8
Chris1221/coRge
R/old_analyze.R
#' Correction of Genomes in R #' #' Software for the Examination of Multiple Correction Methodologies in Accurate Genomic Environments #' #' @param i Index 1 #' @param j Index 2 #' @param k Index 3 #' #' @return Output file at container. #' analyze_old <- function(i = double(), j = double()){ # just for now to grab...
9,907
apache-2.0
70e3053257c26c2d13c4faf23b0d62bad589a5f8
Chris1221/coR-ge
R/old_analyze.R
#' Correction of Genomes in R #' #' Software for the Examination of Multiple Correction Methodologies in Accurate Genomic Environments #' #' @param i Index 1 #' @param j Index 2 #' @param k Index 3 #' #' @return Output file at container. #' analyze_old <- function(i = double(), j = double()){ # just for now to grab...
9,907
apache-2.0
893358006ea5a71b2738917650cc1faca386ae43
theclue/tableau-showcase
data-raw/rpgplayers.italy/rpg.net.prepare.R
###################### # REQUIREMENTS # ###################### if (!require("pacman")) install.packages("pacman"); invisible(library(pacman)) tryCatch({ p_load("tidyverse", "lubridate", "rvest", "plyr") }, warning=function(w){ stop(conditionMessage(w)) }) cached.files <- list.files(file.path(".", "temp")) r...
4,479
mit
df0de7772582c2f23a647a8c0d5001d0ff88ed31
laurentgo/arrow
r/tests/testthat/helper-skip.R
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
2,543
apache-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
krlmlr/cxxr
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
SurajGupta/r-source
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
abiyug/r-source
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
RevolutionAnalytics/RRO
R-src/src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
bfeb33b1174ad101b65d7697a0cd710320900a3a
andrewdefries/andrewdefries.github.io
FDA_Pesticide_Glossary/1,1-dimethylethyl_4-.R
library("knitr") library("rgl") #knit("1,1-dimethylethyl_4-.Rmd") #markdownToHTML('1,1-dimethylethyl_4-.md', '1,1-dimethylethyl_4-.html', options=c("use_xhml")) #system("pandoc -s 1,1-dimethylethyl_4-.html -o 1,1-dimethylethyl_4-.pdf") knit2html('1,1-dimethylethyl_4-.Rmd')
276
mit
1f3c2f81975300c173f800ebc35f08698410dcc4
ArunChauhan/cxxr
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
WelkinGuan/r-source
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
mathematicalcoffee/r-source
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
kmillar/rho
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
kmillar/cxxr
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
jimhester/r-source
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
LeifAndersen/R
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
cxxr-devel/cxxr
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
rho-devel/rho
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
1f3c2f81975300c173f800ebc35f08698410dcc4
andy-thomason/r-source
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
963758d915765735a31e3bd9140ec0128ea16da3
sirallen/nic-structure
R/getReports.R
#' @import httr #' @import data.table #' @import dplyr #' @import stringr #' @import rvest #' @importFrom xml2 read_html getPdfName <- function(rssd, as_of_date) { paste0(PDF_DIR, rssd, '-', gsub('-', '', as_of_date), '.pdf') } pdf2txt <- function(file_name) { # Install xpdf from http://www.foolabs.com/xpdf/downl...
7,600
mit
1f3c2f81975300c173f800ebc35f08698410dcc4
nathan-russell/r-source
src/library/base/R/sample.R
# File src/library/base/R/sample.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2012 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either v...
1,240
gpl-2.0
fe40ada53722deadb3ba6a7295f7e01f5a360ebd
jackwasey/icd
R/vermont_dx.R
#' Generate \code{vermont_dx} data #' #' Process data from \href{healthvermont.gov}{Health Vermont} #' @template parse-template #' @examples #' \dontrun{ #' generate_vermont_dx(save_pkg_data = TRUE) #' } #' @keywords internal datagen #' @noRd .generate_vermont_dx <- function(save_pkg_data) { # This is indeed in data-...
1,594
gpl-3.0
6880369e857f1d9d98da175904215ebd2f2a9b53
dosorio/masterThesis
Code/minval/R/writeTSVmod.R
#' @export writeTSVmod #' @author Daniel Camilo Osorio <dcosorioh@unal.edu.co> # Bioinformatics and Systems Biology Lab | Universidad Nacional de Colombia # Experimental and Computational Biochemistry | Pontificia Universidad Javeriana #' @title Write a model in a TSV format for the 'sybil' R package. #' @descri...
5,580
gpl-3.0
2574befa98feb75f2ae91747f0778312cd4720ed
dvklopfenstein/biocode
doc/mouse_resources/qtl_mapping/addiction_DOQTL_tutorial.R
## ------------------------------------------------------------------------ library(DOQTL) library(AnnotationHub) library(VariantAnnotation) ## ------------------------------------------------------------------------ load(file = "/data/logan_phenotypes.Rdata") load(file = "/data/logan_haploprobs.Rdata") ls() ## -----...
6,157
mit
211643226ff7e1398595c62a9f88dcbf3e1344a8
Wedge-Oxford/battenberg
R/orderEdges.R
#' Convenience function that orders edges or squares #' @author dw9, kd7 #' @noRd orderEdges = function(levels, l, ntot,x,y) { nMaj1 = NULL nMin1 = NULL nMaj2 = NULL nMin2 = NULL # case 1 or 2a: if(l>levels[3]) { #LogR criterion: ntot < x+y+1 if(ntot < x+y+1) { # take the six options, sorte...
4,175
agpl-3.0
d67c89af26ca3d43099aadbb36e5186c03d16678
christophergandrud/EIUCrisesMeasure
source/pca_kpca/pca_bag_of_words.R
# ---------------------------------------------------------------------------- # # PCA Bag of Words comparision to KPCA # Christopher Gandrud # MIT License # ---------------------------------------------------------------------------- # # Set working directory. Change as needed. possible_dir <- c('/git_repositories/EI...
1,585
mit
0f9df5f37a5bd52a22f50877af2e48dc6d04e492
MaximeRivest/scimeetr
R/find_citers_of_other_com.R
#' Find papers of one community that cite most the papers in an other community #' #' With \code{merge_scopus_and_wos} you can merge bibliometric data from Scopus #' and the Web of Science. Be carefull if you are using this prior to #' bibliographic coupling. Scopus and WOS format the cited reference field #' different...
1,508
mit
653594aa54798c7a42e76763e35e761fe21a33c0
asardaes/dtwclust
R/UTILS-tslist.R
#' Coerce matrices or data frames to a list of time series #' #' Change a matrix or data frame to a list of univariate time series #' #' @export #' #' @param series A matrix or data frame where each row is a time series. #' @param simplify Coerce all series in the resulting list to either matrix (multivariate) or #' ...
1,720
gpl-3.0
ab5c3e60325709790cb28549bbefe41f060e88ec
ChristosChristofidis/h2o-3
h2o-r/h2o-package/R/frame.R
##` ##` A Mix of H2O-specific and Overloaded R methods. ##` ##` Below we have a mix of h2o and overloaded R methods according to the following ToC: ##` ##` H2O Methods: ##` ------------ ##` ##` h2o.ls, h2o.rm, h2o.assign, h2o.createFrame, h2o.splitFrame, h2o.interaction, h2o.ignoreColumns, h2o.insertMissingValue...
112,578
apache-2.0
ec5faf136212a999f98b25202301b8ebddf3c0d5
jread-usgs/mda.streams
R/verify_config.R
#' Verify that a config file row has the requisite info #' #' Checks the config row for valid src-site-logic pairs with respect to a given #' model #' #' @param config a config df to verify #' @param checks a character vector of tests to run #' @param on_fail the function to apply to the error message[s] if a test f...
1,603
cc0-1.0
dde777db24fbe9409cc154947c1d2e95bb2d1e04
tarakc02/preprocessr
tests/testthat/test-misc.R
library(preprocessr) context("miscellaneous text cleaner uppers") test_that("camel_underscore", { expect_equal(camel_underscore("thisIsALongBumpyName"), "this_is_a_long_bumpy_name") expect_equal(camel_underscore("ThisIsALongBumpyName"), "this_is_a_long_bumpy_name") }) test_that("underscore_camel", { expe...
450
mit
fa7c3d834ad6fb8d99694cb629eac87df3518d41
josephscheidt/heightPredictor
ui.R
#This is a UI that plots an aging curve against height and predicts future #height based on current height library(shiny) shinyUI(fluidPage( # Application title titlePanel("Child Height Predictor"), tabsetPanel(type = "tabs", tabPanel("0 to 36 mos.", sidebarLayout( ...
3,756
gpl-3.0
cc15c419d9e59b76ed67bbda27d7397f934c4548
lijian13/Rwordseg
R/utils.R
.detectEncoding <- function(strpaths) { pathverify <- try(file.exists(strpaths), silent = TRUE) if (inherits(pathverify, "try-error")) stop("Please input the path string of the dic file!") if (!any(pathverify)) stop ("Wrong path of the dic file!") strpath <- strpaths[pathverify][1] analyzer = get("Analyzer"...
5,497
gpl-3.0
0883336b9bb9d73488240f6c10f8bf8aef12fa23
coolbutuseless/AuCensus2011.STE
R/B38.R
#' ABS Australian Census 2011: Basic Community Profile [STE] Table B38: Location 1 year ago #' #' ABS Australian Census 2011: Basic Community Profile [STE] Table B38: Location 1 year ago #' #' This data-only package provides data from the 2011 Australian Census on 'Basic Community Profile [STE] Table B38: Location 1 ye...
699
mit
490a1391f37560bde815c39eeb29ff65b39971aa
zildjiean/-Stat-07-06-2014-Pending-
R-Yoye-2015-01-29.R
function (m,n,p,alpha,m2,n2,p2,round1) { #set.seed(5) rlr=rep(0,round1) rll=rep(0,round1) x=rbinom(m,n,p) z=length(x) j=0 k=0 for(i in 1:z){ p[i]=(x[i]/n) } pbar=(sum(p)/m) cat('\n','M =',p,' ','\n') Mbar=pbar cat ('\n','M bar =',Mbar,'\n') ####################### Calculate UCL,CL,LCL #########...
2,000
lgpl-2.1
4e6d60b87ad7d47e741b2d0018efacb052039e35
millerlp/Tide_controller
Generate_new_site_libraries/tide_harmonics_parse.R
# Filename: tide_harmonics_parse.R # # Author: Luke Miller May 1, 2012 # Updated 2015-06-03 to use new harmonics input file from 2014-12-24 ############################################################################### # This is essentially a one-time use script to call the read_harmonicsfile.R # functions and pars...
2,646
gpl-3.0
ce4bbadc4ad09225c7442a34cf85a2dc815babdb
mcneilco/acas
modules/CurveAnalysis/src/server/DoseResponseCurveFit.R
library(racas) library(data.table) myMessenger <- Messenger$new() myMessenger$logger <- createLogger(logName = "com.acas.doseresponse.fit.experiment", logToConsole = FALSE) myMessenger$logger$debug("dose response fit experiment initiated") fitDoseResponse <- function(request){ myMessenger <- Messenger$new() myMess...
1,061
gpl-3.0
2c8598ff2bfcb7cc0d14c35b88f8453aa467dcef
sammorris81/spatial-skew-t
code/analysis/ozone/US-all/us-all-47.R
source("./package_load.R", chdir = TRUE) setting <- 47 method <- "t" nknots <- 6 keep.knots <- F threshold <- 85 tau.init <- 0.05 thresh.quant <- F skew <- T temporalw <- F temporalz <- F temporaltau <- F outputfile <- paste("results/us-all-", setting, ".RData", sep="") start <- proc.time() fit <- vector(mode="list"...
1,328
gpl-2.0
14eeec0e03cbb2764276fda0f336dfe7d65cbcb3
fredfeng/MorpheusData
S8.R
# making table data sets library(dplyr) library(tidyr) library(MorpheusData) #############benchmark 43 student <- read.table(text= "S_key level age S1 JR 18 S2 SR 24 S3 JR 21 S4 SR 22 S5 JR 18 S6 SO 20 S7 SO 22", header=T) # write.csv(student, "sql/student.csv", row.names=FALSE) # student <- read.csv("sql/student.c...
1,619
cc0-1.0
79799cf5a32642bb85a17ca85f8bfabd48eea94c
mihawk2016/rStudyR
_OLD_PROJECTS/Practice/Shiny/TEST/server.R
library(shiny) shinyServer(function(input, output, session) { output$TRADE <- DT::renderDataTable({ DT::datatable(RESULT$TRADE_TABLE[,1:(dim(RESULT$TRADE_TABLE)[2]-4)]) }) output$SYMBOL <- DT::renderDataTable({ DT::datatable(RESULT$SYMBOL_TABLE) }) output$ACCOUNT <- DT::renderDataTable({ DT::...
363
gpl-3.0
dffdfc36f2521707e754d8262df58f0c20ad5328
cran/plsgenomics
R/internal.R
### internal.R (2017-08) ### ### Internal plsgenomics functions ### ### Copyright 2017-08 Ghislain DURIF ### ### ### This file is part of the `plsgenomics' library for R and related languages. ### It is made available under the terms of the GNU General Public ### License, version 2, or at your option, any later ver...
1,890
gpl-2.0
06f668d596a48b038a59ca1c770054b43eeb3ed4
dsnair/Ames_Housing_Data
exploration/train_munging.R
# install.packages("randomForest") # install.packages("DMwR") library(randomForest) library(DMwR) # training data train = read.csv("train.csv", header = TRUE) head(train) summary(train) dim(train) # impute missing values in train data via random forest # ----------------------------------------------------- # find...
1,544
gpl-3.0
26c2e239dc92098c1002130bbf2d019b0793621b
OpenCompare/pcm-stats
r-metrics/revisions.R
#!/usr/bin/env Rscript setwd(".") library(DBI) con <- dbConnect(RSQLite::SQLite(), "../metrics/metrics.db") # Get all users by year res <- dbSendQuery(con, "SELECT strftime('%Y', date) as year, count(author) as author FROM revisions GROUP BY author, year") users <- dbFetch(res) # Get all revisions by year res <- db...
1,962
apache-2.0