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
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
WeichenXu123/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
witgo/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
shaneknapp/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
nchammas/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
holdenk/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
7cc53014d22ffea86c931da54f5d6325829c7708
jeffreyhorner/R-Judy-Arrays
tests/internet2.R
## These are tests that require socket and internet functionality, and ## a working Internet connection. ## We attempt to test for those. if(!capabilities()["http/ftp"]) { warning("no internet capabilities") q() } if(.Platform$OS.type == "unix" && is.null(nsl("cran.r-project.org"))) q() ## check graceful...
2,066
gpl-2.0
7cc53014d22ffea86c931da54f5d6325829c7708
o-/Rexperiments
tests/internet2.R
## These are tests that require socket and internet functionality, and ## a working Internet connection. ## We attempt to test for those. if(!capabilities()["http/ftp"]) { warning("no internet capabilities") q() } if(.Platform$OS.type == "unix" && is.null(nsl("cran.r-project.org"))) q() ## check graceful...
2,066
gpl-2.0
7cc53014d22ffea86c931da54f5d6325829c7708
hadley/r-source
tests/internet2.R
## These are tests that require socket and internet functionality, and ## a working Internet connection. ## We attempt to test for those. if(!capabilities()["http/ftp"]) { warning("no internet capabilities") q() } if(.Platform$OS.type == "unix" && is.null(nsl("cran.r-project.org"))) q() ## check graceful...
2,066
gpl-2.0
7cc53014d22ffea86c931da54f5d6325829c7708
cmosetick/RRO
R-src/tests/internet2.R
## These are tests that require socket and internet functionality, and ## a working Internet connection. ## We attempt to test for those. if(!capabilities()["http/ftp"]) { warning("no internet capabilities") q() } if(.Platform$OS.type == "unix" && is.null(nsl("cran.r-project.org"))) q() ## check graceful...
2,066
gpl-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
HyukjinKwon/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
hvanhovell/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
7cc53014d22ffea86c931da54f5d6325829c7708
ChiWang/r-source
tests/internet2.R
## These are tests that require socket and internet functionality, and ## a working Internet connection. ## We attempt to test for those. if(!capabilities()["http/ftp"]) { warning("no internet capabilities") q() } if(.Platform$OS.type == "unix" && is.null(nsl("cran.r-project.org"))) q() ## check graceful...
2,066
gpl-2.0
d75c382d49854a7aee2c1fece6129c19a464c426
SimonYansenZhao/wskm
package/R/fgkm.R
fgkm <- function(x, centers, groups, lambda, eta, maxiter=100, delta=0.000001, maxrestart=10,seed=-1) { if (missing(centers)) stop("the number or initial clusters 'centers' must be provided") if(seed<=0){ seed <-runif(1,0,10000000)[1] } vars <- colnames(x) nr <-nrow(x) # nrow() return a integer ...
3,194
gpl-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
rednaxelafx/apache-spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
7cc53014d22ffea86c931da54f5d6325829c7708
RevolutionAnalytics/RRO
R-src/tests/internet2.R
## These are tests that require socket and internet functionality, and ## a working Internet connection. ## We attempt to test for those. if(!capabilities()["http/ftp"]) { warning("no internet capabilities") q() } if(.Platform$OS.type == "unix" && is.null(nsl("cran.r-project.org"))) q() ## check graceful...
2,066
gpl-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
gengliangwang/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
7cc53014d22ffea86c931da54f5d6325829c7708
jagdeesh109/RRO
R-src/tests/internet2.R
## These are tests that require socket and internet functionality, and ## a working Internet connection. ## We attempt to test for those. if(!capabilities()["http/ftp"]) { warning("no internet capabilities") q() } if(.Platform$OS.type == "unix" && is.null(nsl("cran.r-project.org"))) q() ## check graceful...
2,066
gpl-2.0
7cc53014d22ffea86c931da54f5d6325829c7708
jeffreyhorner/R-Array-Hash
tests/internet2.R
## These are tests that require socket and internet functionality, and ## a working Internet connection. ## We attempt to test for those. if(!capabilities()["http/ftp"]) { warning("no internet capabilities") q() } if(.Platform$OS.type == "unix" && is.null(nsl("cran.r-project.org"))) q() ## check graceful...
2,066
gpl-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
ueshin/apache-spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
zzcclp/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba
apache/spark
R/pkg/R/WindowSpec.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...
9,482
apache-2.0
64aa0e7d903369ba4cad6b5be10205964e7c2491
EvansSchoolPolicyAnalysisAndResearch/eparTextTools
demo.docs.R
#' This is data to be included in my package #' #' @name demo.docs #' @docType data #' @author Ryan Scott \email{ryscott@uw.edu} #' @keywords data NULL demo.docs<-read.csv("demodoc_links.csv",stringsAsFactors=FALSE) demo.docs<-demo.docs$links if(file.exists("demo.docs.folder")==FALSE){dir.create("demo.docs.folder")} d...
622
bsd-3-clause
ba004ba7b47443134c34ec94692367df223a3540
robertzk/rum
R/rum-package.R
#' Stubbing and mocking for R. #' #' The rum packages aims to provide extra testing capabilities. #' Specifically, functions like \code{expect_receives} and #' \code{expect_called} are introduced that ensure a given #' function is called, possibly with specific parameters. #' #' This is very useful if you wish to, for ...
586
mit
5ede15db50ad665b37ffa7b34b6961e9db938907
englianhu/binary.com-interview-question
实验室/sarima_wk_dy.R
rm(list = ls()) setwd('C:/Users/User/Documents/GitHub/binary.com-interview-question') if(!suppressPackageStartupMessages(require('BBmisc'))) { install.packages('BBmisc', dependencies = TRUE, INSTALL_opts = '--no-lock') } suppressPackageStartupMessages(require('BBmisc')) # suppressPackageStartupMessages(require('rms...
4,969
gpl-3.0
559daa1b95cfc40c9945127a3e597d79be79e279
johnlees/R_plots
pairs_p_value.R
# 429 mutations observed total # 2000kb genome => 429/2000 mutations per kb # 2000 genes to correct for multiple testing df <- as.data.frame(matrix(0,ncol=3,nrow=11*3)) i <- 0 for (gene_len in c(1,4,10)) { for (mutations in seq(0,10)) { df[i*11 + mutations+1,3] = paste(gene_len,"kb",sep='') df[i*11 + mutatio...
909
gpl-2.0
a602c037bd296711d549773e9c49fd1f226fbcc8
klashgari/courses
data-science/complete.R
Global.BasePath <- "~/edu/courses/data-science" # # usage: complete("specdata", 1:10) # complete <- function(directory, id = 1:332) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'id' is an integer vector indicating the monitor ID numbers ## to be used ...
1,231
apache-2.0
52da48ee71271225d6fa2d470cbfbb447b5bb877
francescojm/OT_15_libraries_and_pipelines
Pipelines/previous pipelines/OT15.PL_01.DataImport_and_processing.R
print('PipeLine-01: Data Import and processing') ### Creating Manifest Data Object and raw counts dataset for low level qc assessment source('Pipelines/OT15._0_Preamble.R') source('Libraries/OT15.Packages_and_preamble.R') source('Libraries/OT15.DataImport_and_processing.R') PS_inventory<-OT15.Check_countFiles_and_b...
1,937
mit
5c190f27be5db3addf64500664b15fcd524940a8
droglenc/FSA
tests/plottests/lwCompPredsPlot.R
# add log length and weight data to ChinookArg data ChinookArg$logtl <- log(ChinookArg$tl) ChinookArg$logwt <- log(ChinookArg$w) # fit model to assess equality of slopes lm1 <- lm(logwt~logtl*loc,data=ChinookArg) anova(lm1) # set graphing parameters so that the plots will look decent op <- par(mar=c(3.5,3.5,1,1),mgp=c...
2,187
gpl-2.0
559daa1b95cfc40c9945127a3e597d79be79e279
johnlees/paired-samples
R_plots/pairs_p_value.R
# 429 mutations observed total # 2000kb genome => 429/2000 mutations per kb # 2000 genes to correct for multiple testing df <- as.data.frame(matrix(0,ncol=3,nrow=11*3)) i <- 0 for (gene_len in c(1,4,10)) { for (mutations in seq(0,10)) { df[i*11 + mutations+1,3] = paste(gene_len,"kb",sep='') df[i*11 + mutatio...
909
gpl-2.0
49ce724d9863b072f7b2856d5b7905838d99001e
boydorr/RDiversity
R/relativeentropy.R
#' Calculate relative entropy #' #' Functions to coerce an object into a \code{relativeentropy} #' (\code{raw_beta()} and/or \code{norm_beta()}). #' #' @param results \code{data.frame} containing rdiversity outputs associated #' with \code{raw_beta()} and/or \code{norm_beta()} #' @param meta object of class \code{metac...
3,887
bsd-2-clause
aa7a71560bfe48039ff25d418e92c6764a7e26f9
gabonNRI/gabontreedata
R/plotSpecificHeights.R
computePlotSpecificHeights <- function(dat) { # {data: [ { "Tag": "3407", "D": 40.8, "MH": 15.4, EH: <result> }], function: <string function>} # dat <- read.csv("nri-p005-trees.csv", header = T, na.string = "null" ) library(BIOMASS) ## Step 1 - Calculate best height model for each stand # Compute models fo...
3,101
apache-2.0
381f39ef6cb5461aba672b4928c281ed28b2e377
ivanhigueram/deforestation_app
models_and_data/regress_web.R
# Create dataframes for regressions ############################ rm(list=ls()) library(data.table) library(rgdal) library(rgeos) library(stringr) library(plyr) library(dplyr) library(magrittr) library(foreign) # Leonardo # setwd("C:/Users/lbonilme/Dropbox/CEER v2/Papers/Deforestacion/") # Ivan setwd("~/Dropbox/BAN...
2,523
mit
194486874a0546517ec3670d9e208021377773d3
SMRUCC/GCModeller
GCModeller/R/Pairwise-WeirCockerhams-FST/Geneclust/R/tablecst.R
tablecst <- function (pathtable, npopmax, coordinates, matngh, stepval = 0.02, nit.table = 20000, stepw.table = 10, burnin.table = 10000, plot = TRUE, write = FALSE) { psimax <- 1 nindiv <- nrow(coordinates) tabpsi <- seq(0, psimax, 0.1) tabval <- seq(0, psimax, stepval) n <- length(tabps...
1,810
gpl-3.0
ee9b4e051810de9944beb6b7b0a990dafd410dfa
rmaso/spanish-PM-text-mining
3. Graficos.R
# File-Name: 3. Graficos.R # Date: 2015-09-04 # Author: Rubén Masó # Email: ruben@maso.es # Purpose: Create the diferent graphics for the analysis # * # Data Used: Data frame # Packages Used: # Output File: #...
4,924
gpl-3.0
194486874a0546517ec3670d9e208021377773d3
amethyst-asuka/GCModeller
GCModeller/R/Pairwise-WeirCockerhams-FST/Geneclust/R/tablecst.R
tablecst <- function (pathtable, npopmax, coordinates, matngh, stepval = 0.02, nit.table = 20000, stepw.table = 10, burnin.table = 10000, plot = TRUE, write = FALSE) { psimax <- 1 nindiv <- nrow(coordinates) tabpsi <- seq(0, psimax, 0.1) tabval <- seq(0, psimax, stepval) n <- length(tabps...
1,810
gpl-3.0
b169aff45c1ad05c5afd38828c218b6f3cf7e761
dbk138/ImageRegionRecognition-FrontEnd
app/python/MinMax.R
args <- commandArgs(trailingOnly = TRUE) d <- read.table(args[1],header=TRUE, sep=",") x <- tapply ( d$val, d$key, args[2]) format ( x, nsmall=5,scientific=FALSE ) write.csv(x, file = args[3])
192
mit
d672c73f6c251d5e256d02021ecf754e135558ed
mooreaw/blogdown_source
static/data/idaho-inflow/analyze-acs-county-inflow.R
library(tidyverse) library(readxl) library(tidycensus) library(gt) library(ggtext) library(scales) # get idaho ACS pop data -------------------------------------------------- # id_pop <- 2009:2019 %>% # map_df(~get_acs("county", variables = "B01001_001", year = ., state = "Idaho"), .id = "year") %>% # mutate(year...
5,732
gpl-3.0
194486874a0546517ec3670d9e208021377773d3
xieguigang/GCModeller
GCModeller/R/Pairwise-WeirCockerhams-FST/Geneclust/R/tablecst.R
tablecst <- function (pathtable, npopmax, coordinates, matngh, stepval = 0.02, nit.table = 20000, stepw.table = 10, burnin.table = 10000, plot = TRUE, write = FALSE) { psimax <- 1 nindiv <- nrow(coordinates) tabpsi <- seq(0, psimax, 0.1) tabval <- seq(0, psimax, stepval) n <- length(tabps...
1,810
gpl-3.0
ecd5795cd6be293b8d51b6f07399f76c7e3d69fb
aaronsw/torperf
plot_results.R
### Copyright 2007 Steven J. Murdoch ### See LICENSE for licensing information UFACTOR = 1e6 ## Subtract to timevals, maintaining precision todelta <- function(startsec, startusec, tsec, tusec) { tsec[tsec == 0] <- NA dsec <- tsec - startsec dusec <- tusec - startusec return(dsec*UFACTOR + dusec) } parsedat...
4,355
bsd-3-clause
e8f1325c25e7943fbbb9705c7803ede62e5e58e4
brockk/poisson
PackageConstruction.R
############################Package Construction################################################ package.skeleton(name="poisson",code_files="poisson.R") #create initial folder containing package requirements
215
gpl-2.0
d5d4c5b2ebe236908f88458efa61a6d62944cd83
jgabry/QMSS_in_R
Code/Quantitative Analytic Techniques/22_MonteCarlo_polya_balancing.R
#=================================================================# #====== MONTE CARLO SIMULATION: POLYA & BALANCING PROCESSES ======# #=================================================================# # Author: Jonah Gabry (jsg2201@columbia.edu) # Written using R version 3.1.1 on Mac OS X 10.9.3 # Suppose we have...
2,668
mit
4ec689098e1d3a087bcdffe241dd54add014dff3
DannyArends/CTLmapping
examples/BXD/cheatGN207.R
### Setup setwd("D:/Github/CTLmapping/examples/BXD/data") # Where is the data ? source("../whichGroup.R") library(ctl) ### Selected genes highImpact <- read.table("genes.txt", sep="\t") ### Genotypes genotypes <- read.table("BXD.geno",sep="\t", skip = 6, header =TRUE, row.names = 2, na.strings = c("U", "H"),...
2,252
gpl-3.0
2d47fcbbfb64b2514ce9ef09805bdf27fb879db9
krupanss/Interactive-Exploratory-Data-Analysis
R/server_4BiVariateBox.R
# ************************************Bi Variate Box Plot************************************ # **************************Select Inputs************************** output$BoxMeasure = renderUI({ selectInput("BoxMeasure", "Select Measure", c(selectdata()$FeatureValue[which(selectdata()$FeatureName == ...
1,412
gpl-3.0
55b925e96147b9f921c5b708d458b893ab51134b
tijoseymathew/mlr
tests/testthat/test_base_impute.R
context("impute") test_that("Impute data frame", { data = data.frame(f = letters[c(1, 1, 1, 1, 2)], x = rep(1., 5), y = c(1, 2, 3, 3, 4), z = NA) target = "z" data[6, ] = NA # median imputed = impute(data, target = target, cols = list(x = imputeMedian(), y = imputeMedian()))$data expect_equal(imputed$x[6]...
9,398
bsd-2-clause
925d2fba3748a9688d193003290158d9a374b954
SMRUCC/GCModeller
src/workbench/R#/demo/regprecise/save_promoter2gbk.R
imports "TRN.builder" from "phenotype_kit"; imports ["annotation.genbank_kit", "annotation.genomics_context", "annotation.workflow"] from "seqtoolkit"; let regions = "K:\20200226\20200516_gbk\X101SC19112292-Z01-J001_result\res.txt" :> readText :> as.promoter.models :> lapply(a => a, names = a => as.object(a)$locus_tag...
2,126
gpl-3.0
925d2fba3748a9688d193003290158d9a374b954
xieguigang/GCModeller
src/workbench/R#/demo/regprecise/save_promoter2gbk.R
imports "TRN.builder" from "phenotype_kit"; imports ["annotation.genbank_kit", "annotation.genomics_context", "annotation.workflow"] from "seqtoolkit"; let regions = "K:\20200226\20200516_gbk\X101SC19112292-Z01-J001_result\res.txt" :> readText :> as.promoter.models :> lapply(a => a, names = a => as.object(a)$locus_tag...
2,126
gpl-3.0
55b925e96147b9f921c5b708d458b893ab51134b
vinaywv/mlr
tests/testthat/test_base_impute.R
context("impute") test_that("Impute data frame", { data = data.frame(f = letters[c(1, 1, 1, 1, 2)], x = rep(1., 5), y = c(1, 2, 3, 3, 4), z = NA) target = "z" data[6, ] = NA # median imputed = impute(data, target = target, cols = list(x = imputeMedian(), y = imputeMedian()))$data expect_equal(imputed$x[6]...
9,398
bsd-2-clause
925d2fba3748a9688d193003290158d9a374b954
SMRUCC/GCModeller.Workbench
R#/demo/regprecise/save_promoter2gbk.R
imports "TRN.builder" from "phenotype_kit"; imports ["annotation.genbank_kit", "annotation.genomics_context", "annotation.workflow"] from "seqtoolkit"; let regions = "K:\20200226\20200516_gbk\X101SC19112292-Z01-J001_result\res.txt" :> readText :> as.promoter.models :> lapply(a => a, names = a => as.object(a)$locus_tag...
2,126
gpl-3.0
3dfbe4a0a867cdfdc5a5974af0bf87b2f3922d88
JuKa87/OpenMx
R/MxExpectationNormal.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 ...
25,777
apache-2.0
fd5684b23bebe8b81d5afe231a82d8ebbf7b1f5d
tylermorganwall/skpr
R/contr.simplex.R
#'@title Orthonormal Contrast Generator #' #'@description Generates orthonormal (orthogonal and normalized) contrasts. Each row is the vertex of an N-dimensional simplex. The only exception are contrasts for the 2-level case, which return 1 and -1. #' #'@param n The number of levels in the catagorical variable. If this...
1,169
gpl-3.0
bd887b5971a7a9eb00c18a0c9af7af01c8735187
LiyangQin/Biostat-578
checkallpkgs.R
# ---------------------------------------------------------------------- # checkallpkgs.R # ---------------------------------------------------------------------- # # This script attempts to find all of the R packages used in all # of the R presentation files in the current working folder and then # attempts to instal...
3,667
cc0-1.0
61a7a7f8157a7e7a63b333b0a6b12c566852cee6
derek-damron/transform
tests/testthat/test_rescale_3_minmax.R
context('Rescale - type="minmax"') x <- c(NA, 1:5, NA, 6:10, NA) # Min/max input minmax_min <- -5 minmax_max <- 7 # Function outputs out_minmax <- rescale(x, 'minmax', min=minmax_min, max=minmax_max) # Round to two decimal places for identical checks out_minmax <- round(out_minmax, 2) # Expected outputs exact_minm...
519
gpl-3.0
629ad5d929818241e0b51600566a725753b2251c
cheerzzh/R_for_Quantitative_Finance
rate-analysis/INR266/stochastic-volatility-model-fit.R
# test stochastic volatility model
38
mit
4de0936af240f5d75229b69412fbd96dd16d9c10
OHDSI/JCdmBuilder
man/SampleDatabase.R
library(DatabaseConnector) library(SqlRender) dbms <- "pdw" user <- NULL pw <- NULL server <- "JRDUSAPSCTL01" port <- 17001 schema <- "CDM_Truven_MDCD_V521" outputFolder <- "s:/data/MdcdSample" connectionDetails <- DatabaseConnector::createConnectionDetails(dbms = dbms, ...
1,603
apache-2.0
e5f3e66810876239f5b53e80a851e6b879a578d0
jacliu3/stat159-proj2
code/scripts/olsregression-script.R
# Set seed to project default set.seed(123) # Load scaled credit data scaled <- read.csv('data/scaled-credit.csv', header = T) scaled$X <- NULL # Applying regression model ols.fit <- lm(formula = Balance ~ ., data = scaled) ols.sum <- summary(ols.fit) # Saving fitted models save(ols.fit, ols.sum, file = ...
614
apache-2.0
629ad5d929818241e0b51600566a725753b2251c
WealthCity/R_for_Quantitative_Finance
rate-analysis/INR266/stochastic-volatility-model-fit.R
# test stochastic volatility model
38
mit
d215a39d9cffc3eb33204eeaac3f2038c0273305
marburg-open-courseware/msc-c2015
src/tnauss/modis_lsp/getExtension.R
getExtension <- function(dataFormat,...) { if(toupper(dataFormat) %in% c("HDF-EOS","HDF4IMAGE")) # MRT + GDAL { return(".hdf") } else if (toupper(dataFormat) %in% c("GTIFF","GEOTIFF")) # MRT + GDAL { return(".tif") } else if (tolower(dataFormat) =="raw binary") # MRT + GDAL { return(".hdr") ...
1,175
gpl-3.0
60d1a13fe46480c84fcf33de149d7d06252b71fc
pedrocostaferreira/BETS
R/draw.misery_index.R
#' @title Create a chart of the Base Interest Rate (SELIC) time series #' #' @description Creates a plot of series 4189 #' #' @return An image file is saved in the 'graphs' folder, under the BETS installation directory. #' @importFrom zoo as.Date #' @importFrom grDevices rgb #' @import plotly #' @author Talitha Sp...
2,718
gpl-3.0
84ad427dfaff68026a5a67b73df28148e86344e0
aranryan/arlodr
R/days_in.R
#' return days in month #' #' I modified so you can set leap_impact equal 0 to help with str data #' #' @param d #' @param leap_impact #' #' @return #' @export #' #' @examples #' days_in_month("2014-11-25") days_in_month <- function(d = Sys.Date(), leap_impact=1){ m = substr((as.character(d)),6,7) ...
932
mit
bd887b5971a7a9eb00c18a0c9af7af01c8735187
Temerson0/Biostat-578
checkallpkgs.R
# ---------------------------------------------------------------------- # checkallpkgs.R # ---------------------------------------------------------------------- # # This script attempts to find all of the R packages used in all # of the R presentation files in the current working folder and then # attempts to instal...
3,667
cc0-1.0
168b327e7f213fff7a6d764276ab423f2d7e83b8
torebre/abcProject
tests/testthat/testToySampleGeneration.R
context("Toy sample generation") test_that("Correct number of samples are generated", { toy.example.setup <- smcToyExample() SampleFunction <- toy.example.setup[["SampleFunction"]] sample.generated <- SampleFunction(c(0.2, 0.3), 2) expect_equal(length(sample.generated), 2) expect_equal(length(sample.generat...
385
mit
bd887b5971a7a9eb00c18a0c9af7af01c8735187
c5sire/Biostat-578
checkallpkgs.R
# ---------------------------------------------------------------------- # checkallpkgs.R # ---------------------------------------------------------------------- # # This script attempts to find all of the R packages used in all # of the R presentation files in the current working folder and then # attempts to instal...
3,667
cc0-1.0
629ad5d929818241e0b51600566a725753b2251c
jond3k/R_for_Quantitative_Finance
rate-analysis/INR266/stochastic-volatility-model-fit.R
# test stochastic volatility model
38
mit
a1a7b4bb8782673c83c0939fd3b1f5b82e3f68fb
ousuga/reldist
R/IW.R
#' @name IW #' #' @title #' The Inverse Weibull Distribution #' #' @description #' Density, distribution function, quantile function, #' random generation and hazard function for the inverse weibull distribution with #' parameters \code{alpha} and \code{theta}. #' #' @param x,q vector of quantiles. #' @param p ve...
4,443
gpl-2.0
d8176a6736a1bd5bc475a1219027a3a094cc9577
Jean-Romain/lidR
R/las_tools.R
#' LAS utilities #' #' Tools to manipulate LAS objects maintaining compliance with #' \href{https://www.asprs.org/wp-content/uploads/2019/07/LAS_1_4_r15.pdf}{ASPRS specification} #' #' In the specification of the LAS format the coordinates are expected to be given #' with a certain precision e.g. 0.01 for a millimeter ...
8,511
gpl-3.0
86e61b9693860ccd0e3f83f150c41a93338cc8b2
krlmlr/cxxr
src/extra/testr/filtered-test-suite/isexpression/tc_isexpression_1.R
expected <- eval(parse(text="FALSE")); test(id=0, code={ argv <- eval(parse(text="list(c(20L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 19L, 19L, 19L, 20L, 20L, 20L, 19L, 20L, 19L, 19L, 19L, 20L))")); do.call(`is.expression`, argv); }, o=expected);
303
gpl-2.0
86e61b9693860ccd0e3f83f150c41a93338cc8b2
rho-devel/rho
src/extra/testr/filtered-test-suite/isexpression/tc_isexpression_1.R
expected <- eval(parse(text="FALSE")); test(id=0, code={ argv <- eval(parse(text="list(c(20L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 19L, 19L, 19L, 20L, 20L, 20L, 19L, 20L, 19L, 19L, 19L, 20L))")); do.call(`is.expression`, argv); }, o=expected);
303
gpl-2.0
50335d10098648eb709954a9a8970eb23acaf76a
NLMichaud/nimble
packages/nimble/R/MCMC_run.R
#' Run one or more chains of an MCMC algorithm and extract samples #' #' Takes as input an MCMC algorithm (ideally a compiled one for speed) #' and runs the MCMC with one or more chains, automatically extracting #' the samples. #' #' @param mcmc A NIMBLE MCMC algorithm. See details. #' #' @param niter Number of iterat...
5,923
bsd-3-clause
3374153e7fa4e600b6d2a02d78dda62dd22b6292
FESOM/spheRlab
R/sl.circle.R
sl.circle <- function (lon, lat, radius, resolution = 1, repeat.first = TRUE) { if (sl.dim(lon) != 1 || sl.dim(lat) != 1 || sl.dim(radius) != 1) {stop("all arguments must be single scalars")} lats = 90-radius lons = seq(0,360,resolution) N = length(lons) if (lons[N] == 360) {lons = lons[1:N]} abg =...
639
gpl-3.0
86e61b9693860ccd0e3f83f150c41a93338cc8b2
kmillar/cxxr
src/extra/testr/filtered-test-suite/isexpression/tc_isexpression_1.R
expected <- eval(parse(text="FALSE")); test(id=0, code={ argv <- eval(parse(text="list(c(20L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 19L, 19L, 19L, 20L, 20L, 20L, 19L, 20L, 19L, 19L, 19L, 20L))")); do.call(`is.expression`, argv); }, o=expected);
303
gpl-2.0
86e61b9693860ccd0e3f83f150c41a93338cc8b2
kmillar/rho
src/extra/testr/filtered-test-suite/isexpression/tc_isexpression_1.R
expected <- eval(parse(text="FALSE")); test(id=0, code={ argv <- eval(parse(text="list(c(20L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 19L, 19L, 19L, 20L, 20L, 20L, 19L, 20L, 19L, 19L, 19L, 20L))")); do.call(`is.expression`, argv); }, o=expected);
303
gpl-2.0
86e61b9693860ccd0e3f83f150c41a93338cc8b2
ArunChauhan/cxxr
src/extra/testr/filtered-test-suite/isexpression/tc_isexpression_1.R
expected <- eval(parse(text="FALSE")); test(id=0, code={ argv <- eval(parse(text="list(c(20L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 19L, 19L, 19L, 20L, 20L, 20L, 19L, 20L, 19L, 19L, 19L, 20L))")); do.call(`is.expression`, argv); }, o=expected);
303
gpl-2.0
365ca3431e19662e100daf5c98573f988cb35d41
NGSchool2016/ngschool2016-materials
chip_seq/.R_library/3.3/BiocGenerics/unitTests/test_updateObject.R
### test_updateObject_list <- function() { setClass("A", representation(x="numeric"), prototype(x=1:10), where=.GlobalEnv) a <- new("A") l <- list(a,a) checkTrue(identical(l, updateObject(l))) setMethod("updateObject", "A", function(object, ..., verbose=FALS...
3,480
gpl-3.0
86e61b9693860ccd0e3f83f150c41a93338cc8b2
cxxr-devel/cxxr
src/extra/testr/filtered-test-suite/isexpression/tc_isexpression_1.R
expected <- eval(parse(text="FALSE")); test(id=0, code={ argv <- eval(parse(text="list(c(20L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 19L, 20L, 20L, 20L, 20L, 19L, 19L, 19L, 20L, 20L, 20L, 19L, 20L, 19L, 19L, 19L, 20L))")); do.call(`is.expression`, argv); }, o=expected);
303
gpl-2.0
5204dd2c406523fdfecc0923c305bff6ddfe5fe8
mabotech/mabo.task
py/jobs0527/jobs/tasks/graphs/report_worktime_monthly.R
null
2,117
mit
2300f2de3a954671d0bfc88eb3de6d6662ff09f6
vinaywv/mlr
tests/testthat/test_stack.R
context("stack") checkStack = function(task, method, base, super, bms.pt, sm.pt, use.feat) { base = lapply(base, makeLearner, predict.type = bms.pt) if (method %in% c("average", "hill.climb")) { super = NULL } else { super = makeLearner(super, predict.type = sm.pt) # sm.pt = NULL } if (method == ...
3,746
bsd-2-clause
5a13df6af13a1c8b654d97e221d4a4f83af6ee10
kgoldfeld/simstudy
R/RcppExports.R
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 matMultinom <- function(probmatrix) { .Call(`_simstudy_matMultinom`, probmatrix) } markovChains <- function(nchains, P, chainLen, state0) { .Call(`_simstudy_markovChains`, nchains, P, ...
798
gpl-3.0
cb974aa7a94154a17ea0c13449fcd4f92defea66
galder-max/GSEAlite
R/computeES.lists.R
computeES.lists<-function(m, o, lG, metric) { lS<-get(paste("snr.",metric,sep=""))(m,o) res<-lapply(lG,function(x) { lleading.edge(rownames(m)%in%x,lS) }) return(res) }
259
gpl-3.0
2300f2de3a954671d0bfc88eb3de6d6662ff09f6
tijoseymathew/mlr
tests/testthat/test_stack.R
context("stack") checkStack = function(task, method, base, super, bms.pt, sm.pt, use.feat) { base = lapply(base, makeLearner, predict.type = bms.pt) if (method %in% c("average", "hill.climb")) { super = NULL } else { super = makeLearner(super, predict.type = sm.pt) # sm.pt = NULL } if (method == ...
3,746
bsd-2-clause
e76605be36565d2fa067d66468a384c5a3888cb6
ProjectTw/TwitteR2Mongo
R/dateOperation.R
#' Top Hashtags in intervall #' #' Retrives the most used hashtags in a given time interval #' #' @param mongo a mongoDB connection to use (default: hometimeline) #' @param interval a time interval which can be generated by \link{getInterval} needs to be in unix timestamp format #' @param amount limits the number of ha...
5,442
gpl-3.0
7d020d877a3393590e6d6d95b821a446a3dc94af
richarddmorey/responseToHoijtink
utility.R
## Richard D. Morey ## January 2015 ## Functions added April 2015 for paper v2 ## Included for some functions related to ## arithmetic with logarithms library(BayesFactor) ## Find d1 such that alpha=beta for given N d1_from_error = Vectorize(function(error, N){ critt = qt(1-error/2, N-1) optimize(function(delta)...
5,463
mit
dd9d3c384f9e03f4d58b8a791502933651217653
bedatadriven/renjin
tests/src/test/R/test.norm.R
# # Renjin : JVM-based interpreter for the R language for the statistical analysis # Copyright © 2010-2019 BeDataDriven Groep B.V. and contributors # # 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 Foundati...
1,085
gpl-2.0
7b0cb73933391a9c9a6256f2f42479502307b752
hbc/CHBUtils
R/rleoutliers.R
#' Cel file IDs of intensity RLE outlier arrays (in characters). #' #' @param eset AffyBatch #' @param logtransform Boolean, log transform data before processing? #' @return character vector of arrays (CEL file IDs) that are outliers for intensity boxplots. #' @seealso \code{\link{arrayQualityMetrics}} which this funct...
897
mit
ea29fddfc3f40ea9dc4f5a935da5f5916a3f293a
StatsWithR/statsr
R/ci_two_mean_theo.R
ci_two_mean_theo <- function(y, x, conf_level, y_name, x_name, show_var_types, show_summ_stats, show_res, show_eda_plot, show_inf_plot){ # calculate n1 and n2 ns <- by(y, x, length) n1 <- as.numeric(ns[1]) n2 <- as.numeric(ns[2]) # calculate y-ba...
2,484
mit
7b0cb73933391a9c9a6256f2f42479502307b752
hjanime/CHBUtils
R/rleoutliers.R
#' Cel file IDs of intensity RLE outlier arrays (in characters). #' #' @param eset AffyBatch #' @param logtransform Boolean, log transform data before processing? #' @return character vector of arrays (CEL file IDs) that are outliers for intensity boxplots. #' @seealso \code{\link{arrayQualityMetrics}} which this funct...
897
mit
9808ebbd1ae77021ec30c7ce3cba26a5c424497a
PirateGrunt/raw_las
scripts/12_AdvancedModeling.R
## ------------------------------------------------------------------------ library(ggplot2) set.seed(1234) numGroups <- 5 numClaims <- 10 N <- numClaims * numGroups x <- rnorm(N, 1000, 300) link <- 1.5 groupVals <- rnorm(numGroups, mean = link, sd = .05 * link) names(groupVals) <- head(letters, numGroups) links <- sa...
5,618
gpl-3.0
0b9244ea5db712d11ab8ed940a12714bc4d778bd
NCIP/stats-analysis-server
R_source/HC_samples.R
########################################################################################### # File: HC_samples.R # Description: R module for higher order analysis tools - hierarchical clustering # Author: Huaitian Liu # Date: August 2005 ##################################################################################...
1,184
bsd-3-clause
e75c8bf7c13cc2d6bf5f45e69895a7571c7e2e1e
mjsmith037/mjsmith037.github.io
talks/ESA_08.2018/Code/simmat_figures.R
source("plotting_functions.R") library(vegan) library(tidyverse) library(stringr) library(mnormt) normalize <- function(mat) apply(mat, 2, function(col) (col - mean(col)) / sd(col)) equal_spacing <- function(n, first, last) seq(first, last, length.out=n+1) %>% head(-1) constant <- function(n, value, filler_variable)...
21,666
mit
50f9683250350fb53d14adacde76c07bd5470bfe
bioShaun/OMrnaseq
rnaseq/modules/enrichment/download_kegg.R
library(KEGGREST) library(png) args<-commandArgs(T) spe <- args[1] all_data_dir <- args[2] database_dir <- paste(all_data_dir,spe,sep = '/') if (! dir.exists(database_dir)) { dir.create(database_dir) } spe_pathinfo<-keggList("pathway", spe) spe_pathid_info <- names(spe_pathinfo) spe_pathid <- strsplit(spe_...
646
gpl-3.0
2864350cb06bda37facce2dfca31d50ec7b7d495
nuest/containerit
R/LabelSchemaFactory.R
# Copyright 2018 Opening Reproducible Research (https://o2r.info) #' Create Build-time labels according to Label Schema Convention #' #' This is a convenience function that generates method for conveniently creating metadata-labels with arguments according to schema version 1.0.0-rc.1 #' #' For details about the Label...
3,052
gpl-3.0
a49836dc0460e103e23d99f2a7664995fae601a8
gaoyuanjun/SHINYstan
inst/SHINYstan/server_files/utilities/extract_shiny_stan_object.R
# Extract the content of the shiny_stan_object slots object <- shiny_stan_object samps_all <- object@samps_all sampler_params <- object@sampler_params nIter <- object@nIter nChains <- object@nChains warmup_val <- object@nWarmup samps_post_warmup <- samps_all[(warmup_val + 1):nIter,,] fit_summary <- object@summary param...
349
mit
5f7cf6133df6cee25081244d934bcb1ec32d0006
terrytangyuan/reticulate
R/pickle.R
#' Save and load Python objects with pickle #' #' @param object Object to save #' @param filename File name #' @param pickle The implementation of pickle to use (defaults to "pickle" but #' could e.g. also be "cPickle") #' @param ... Optional arguments to be passed to the `load()` function defined #' by the assoc...
910
apache-2.0
67399743b190dfaaab988d02e7e15a23eccacd72
environmentalinformatics-marburg/Rsenal
R/createTimeSeries.R
#' create a regular time series #' #' @description #' This function will create a (empty) character time series. #' This can be used for creating regular time series of real-world observations #' that have missing data via merging. #' #' @param start character string of starting date and time. Needs to be of #' for...
1,610
gpl-3.0
14b2a8baf803b68bfac648b408b10ce12705fd0d
abhin4v/combinatorrent
tools/visualize_stats.R
#R sparklines sparkline<-function(ydata=rnorm(100,500,50),width=1.5,height=0.5,sigfigs=4) { # ydata = vector of data to be plotted # width = width of sparlkline in inches, including text # height = height of sparkline in inches # sigfigs = number of significant figures to round min, max, and last values to te...
2,931
bsd-2-clause
d248c8cbf38e345613adf7e8994d74b494704278
dankelley/oce-issues
11xx/1149/1149a.R
rm(list=ls()) library(oce) d <- read.odf('CTD_98911_10P_11_DN.ODF')
69
gpl-2.0
0b7e957e4aaf81a569cd9ed0a437d56b39a91ed9
alberto-p/kpax2
kpax2/R/logpp.R
############################################################################### # # K-Pax2 - Bayesian Cluster Analysis of Categorical Data # # Copyright (c) 2014 Alberto Pessia <alberto.pessia@gmail.com> # # K-Pax2 is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public Li...
6,193
gpl-3.0
14b2a8baf803b68bfac648b408b10ce12705fd0d
beni55/combinatorrent
tools/visualize_stats.R
#R sparklines sparkline<-function(ydata=rnorm(100,500,50),width=1.5,height=0.5,sigfigs=4) { # ydata = vector of data to be plotted # width = width of sparlkline in inches, including text # height = height of sparkline in inches # sigfigs = number of significant figures to round min, max, and last values to te...
2,931
bsd-2-clause
1b3a8fc7c8e2430451f937ee1a5cb80cd5940d40
ilarischeinin/plows-from-hel
server.R
library(dplyr) library(jsonlite) library(leaflet) library(leaflet.extras) library(lubridate) library(shiny) library(stringr) init_routes <- function() { url <- "http://dev.hel.fi/aura/v1/snowplow/" download_routes <- function(since="1days+ago") { plows <- fromJSON(paste0(url, "?since=", since)) lapply(plow...
4,741
mit
cc97711eb5db4410d5f57bcb6d4ec1d9c04bfafd
nielsrhansen/ppstat
pkg/R/registerParBackend.R
registerParBackend <- function(backend = 'mc', cores = NULL) { if(!(class(cores) %in% c("NULL", "numeric"))) stop("Argument 'cores' must be numeric or NULL") ## This checks if the paralle package is installed and if the GUI is ## appropriate for using this backend for parallel computations. if(backend ==...
1,217
gpl-2.0
14b2a8baf803b68bfac648b408b10ce12705fd0d
jlouis/combinatorrent
tools/visualize_stats.R
#R sparklines sparkline<-function(ydata=rnorm(100,500,50),width=1.5,height=0.5,sigfigs=4) { # ydata = vector of data to be plotted # width = width of sparlkline in inches, including text # height = height of sparkline in inches # sigfigs = number of significant figures to round min, max, and last values to te...
2,931
bsd-2-clause