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 |
|---|---|---|---|---|---|
c2cd5485aadbe8cb6f9c223abbfd84727782ffbe | dlroxe/synergyfinder-1 | R/mathews_screening_data.R | #' A high-throughput drug combination screening data
#'
#' A recent drug combination screening for the treatment of diffuse large B-cell
#' lymphoma (DLBCL).
#' @format A data frame with the following columns: BlockID, DrugRow, DrugCol, Row, Col, Response, Replicate,
#' ConcRow, ConcCol, ConcUnit
#' @name mathews_scree... | 616 | mit |
b41800c2154f14a008ddaae99c4807e3bfaf1277 | rBatt/trawlDiversity | R/plot_post_corr.R | #' Plot Posterior Correlation
#'
#' Plots the posterior correlation of hyperparameters from an MSOM output
#'
#' @param prn the p object (processed msom; output from \code{process_msomStatic})
#' @param Figures option list to which the figure and its information should be added
#' @param yr integer indicating the ind... | 2,471 | gpl-3.0 |
8ad54ac0e9c021f14489f2906e2be8b02ff073ba | CenterForAssessment/WIDA | WIDA_SGP_Baseline_2020_C_Growth_Projections.R | ####################################################################################
### ###
### WIDA Learning Loss Analyses -- 2020 Baseline Growth Projections ###
### ... | 1,428 | lgpl-3.0 |
0a1e5d413d0baf8835a96741f86437f30e5551ee | Mark487/R_Code_for_Research | newstart_allowance_365.R | # Newstart Allowance - on income support more than 365 days (%)
# 2010-2013
# Australia vs Launceston.
# Data source: Australian Bureau of Statistics
# http://govhack.abs.gov.au/Index.aspx
library(ggplot2)
library(dplyr)
source("multiplot.R")
region <- factor(c("Launceston","Launceston",
"Launcesto... | 966 | mit |
fc75f807993c0d2e24af79e68bf09643dfa1db45 | clesiemo3/exdata-034-cp2 | plot2.R | ## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Have total emissions from PM2.5 decreased in the Baltimore City, Maryland (fips == "24510") from 1999 to 2008?
#Use the base plotting system to make a plot answering t... | 801 | gpl-2.0 |
6cb6925d041fda9530aa9e06987bedb242210b76 | J-Rios/R_Language | Fibonacci/fibonacci.R |
rm(list = ls()); # Clear all the data in the environment
# Fibonacci function
fibonacci <- function(n=-1)
{
if(n < 2) # First 2 values of the succession: 0 y 1
{
result <- n;
}
else if (n >= 2) # Calculate the following values (> 1) of the succession by recursivity
{
result <- fibonacci(n-1) + fibon... | 828 | gpl-3.0 |
f2c7fa5d7f78839302f9a211d1e9d36903831e99 | shuaimeng/r | nozzles/ratio_54nlmin.R | library(xlsx)
#读取fv~he的数据
#在同三个nozzle内(30g,32g,34g)内,9组不同
#不同流量不同针头下的数据
#针头为30g
na<-read.xlsx("he-30g.xlsx",sheetName="2kv18",header=TRUE)
nb<-read.xlsx("he-30g.xlsx",sheetName="2kv54",header=TRUE)
nc<-read.xlsx("he-30g.xlsx",sheetName="2kv180",header=TRUE)
na16<-read.xlsx("he-30g.xlsx",sheetName="16kv",header=TRUE)... | 3,138 | mit |
65bc69cd401a82035994d6c962052d804391c7c3 | jorgemarsal/DistributedR | algorithms/HPdata/inst/tests/test_files.R | library(HPdata)
data_path <- system.file("data", package="HPdata")
context("splitGraphFile function validations")
test_that("Test splitGraphFile() arguments validation", {
expect_error(ret <- splitGraphFile (inputFile= "wrongPath", outputPath= "/tmp/graphSplits" , npartitions=2 , isNFS=TRUE))
expect_error(re... | 4,632 | gpl-2.0 |
65bc69cd401a82035994d6c962052d804391c7c3 | vertica/DistributedR | algorithms/HPdata/inst/tests/test_files.R | library(HPdata)
data_path <- system.file("data", package="HPdata")
context("splitGraphFile function validations")
test_that("Test splitGraphFile() arguments validation", {
expect_error(ret <- splitGraphFile (inputFile= "wrongPath", outputPath= "/tmp/graphSplits" , npartitions=2 , isNFS=TRUE))
expect_error(re... | 4,632 | gpl-2.0 |
65bc69cd401a82035994d6c962052d804391c7c3 | armgong/DistributedR | algorithms/HPdata/inst/tests/test_files.R | library(HPdata)
data_path <- system.file("data", package="HPdata")
context("splitGraphFile function validations")
test_that("Test splitGraphFile() arguments validation", {
expect_error(ret <- splitGraphFile (inputFile= "wrongPath", outputPath= "/tmp/graphSplits" , npartitions=2 , isNFS=TRUE))
expect_error(re... | 4,632 | gpl-2.0 |
149a26b1b2fc51129ccce9ec77b30851553b7ad0 | felixlindemann/HNUORTools | R/TPP.VOGEL.R | #' @name TPP.VOGEL
#' @rdname TPP.VOGEL
#' @title Transportation-Problem -- VogelAproximation Method
#'
#' @description Calculates the Transportation-Plan.
#' @param object Object of Type \code{\link{GeoSituation}}
#' @param ... \emph{Optional Parameters} See Below.
#'
#' @section Optional Parameters (\code{...}... | 9,305 | mit |
91287833faf615dc8fd98f8ade94fdefef13550b | uhkniazi/BRC_SingleCell_LJames | utilities.R | # File: utilities.R
# Auth: umar.niazi@kcl.ac.uk
# DESC: global functions used in some scripts
# Date: 12/06/2017
### calculate model fits
## first write the log predictive density function
lpd = function(theta, data){
betas = theta # vector of betas i.e. regression coefficients for population
## data
resp = da... | 1,675 | mit |
938a42f48e731e318b967a560a8b6cc7ee08273f | dbetebenner/Literasee | inst/doc/Literasee_Vignette_2.R | ## ----include = FALSE----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... | 1,258 | lgpl-3.0 |
938a42f48e731e318b967a560a8b6cc7ee08273f | CenterForAssessment/Literasee | inst/doc/Literasee.R | ## ----include = FALSE----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... | 1,258 | lgpl-3.0 |
938a42f48e731e318b967a560a8b6cc7ee08273f | CenterForAssessment/Literasee | inst/doc/Literasee_Vignette_1.R | ## ----include = FALSE----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... | 1,258 | lgpl-3.0 |
0b3aabcf12a80628cdc1540119a711623c08df82 | mkoohafkan/flowdurr | dev/demo/workedexample.R | # generate the data contained in data(workedexample)
data(usgstraces) # or use get_waterdata()
usgs.wyear = split_by_wateryear(usgstraces)
usgs.clean = clean_flowdata(usgs.wyear, -1, NA)
usgs.clean = clean_flowdata(usgs.wyear, 0, 1e-5)
usgs.clean = strip_na_cols(usgs.clean)
usgs.3df = get_flowavg(usgs.clean, 3)
... | 719 | mit |
938a42f48e731e318b967a560a8b6cc7ee08273f | CenterForAssessment/Literasee | inst/doc/Literasee_Vignette_2.R | ## ----include = FALSE----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... | 1,258 | lgpl-3.0 |
23ed4c8609a1c5a5793153a5295dc9c137674104 | mauriciovancine/enm_r | scripts/02_variables/02_03_variables_selection/02_script_variables_pca.R | ### script raster PCA ###
###-----------------------------------------------------------------------------------------###
# memory
rm(list = ls())
memory.limit(size = 1.75e13)
# packages
if(!require(install.load)) install.packages("install.load")
install.load::install_load("raster", "rgdal", "RStoolbox", "data.tab... | 2,405 | mit |
938a42f48e731e318b967a560a8b6cc7ee08273f | dbetebenner/Literasee | inst/doc/Literasee.R | ## ----include = FALSE----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... | 1,258 | lgpl-3.0 |
938a42f48e731e318b967a560a8b6cc7ee08273f | dbetebenner/Literasee | inst/doc/Literasee_Vignette_1.R | ## ----include = FALSE----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... | 1,258 | lgpl-3.0 |
20686237fff533522c5c1a303ffd4572fce3952b | phuse-org/phuse-scripts | contributed/scriptathon2014/scripts/target08.R | #**************************************************************************#
# PROGRAM NAME: Demographics Analysis Table #
# #
# DESCRIPTION: Find subject counts and % per treatment #
# ... | 12,423 | mit |
5ef6a4433ff44ab3000100174143dbefd2de4212 | TheoreticalEcosystemEcology/alien | R/getTrait.R | #' @title Compute the trait matrix (or matrices) for a given alienData object
#'
#' @description Computes the trait matrix (or matrices) using \code{node} and \code{trait} of an \link{alienData} object.
#'
#' @param object An object of class \code{alienData}.
#' @param bipartite Logical. Whether the network to consider... | 4,054 | mit |
110f3cad7212dcbcd2714d677e9c3f7ff7e2b8aa | adrHuerta/PISCO_Temp | scripts/step17_anomaly_tn_process.R | rm(list = ls())
library(dplyr)
library(data.table)
library(xts)
library(ggplot2)
library(ggrepel)
library(sp)
library(maptools)
library(raster)
library(gstat)
### source codes
source('./functions/interpolation_functions.R')
###
load(file.path("/media","buntu","D1AB-BCDE","databases","workflow_databases","anom_o... | 1,619 | gpl-3.0 |
47f83c8346690deca9893b013ba7773a2e668cd8 | datachand/h2o-3 | h2o-r/tests/testdir_munging/binop/runit_binop2_divCol.R | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
test.slice.div <- function() {
hex <- as.h2o(iris)
#hex <- as.h2o(iris)
Log.info("Try /ing a scalar to a numeric column: 5 / hex[,col]")
col <- sample(ncol(hex), 1)
sliced <- hex[,col]
print(sliced)
print... | 2,011 | apache-2.0 |
47f83c8346690deca9893b013ba7773a2e668cd8 | printedheart/h2o-3 | h2o-r/tests/testdir_munging/binop/runit_binop2_divCol.R | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
test.slice.div <- function() {
hex <- as.h2o(iris)
#hex <- as.h2o(iris)
Log.info("Try /ing a scalar to a numeric column: 5 / hex[,col]")
col <- sample(ncol(hex), 1)
sliced <- hex[,col]
print(sliced)
print... | 2,011 | apache-2.0 |
47f83c8346690deca9893b013ba7773a2e668cd8 | junwucs/h2o-3 | h2o-r/tests/testdir_munging/binop/runit_binop2_divCol.R | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
test.slice.div <- function() {
hex <- as.h2o(iris)
#hex <- as.h2o(iris)
Log.info("Try /ing a scalar to a numeric column: 5 / hex[,col]")
col <- sample(ncol(hex), 1)
sliced <- hex[,col]
print(sliced)
print... | 2,011 | apache-2.0 |
47f83c8346690deca9893b013ba7773a2e668cd8 | brightchen/h2o-3 | h2o-r/tests/testdir_munging/binop/runit_binop2_divCol.R | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
test.slice.div <- function() {
hex <- as.h2o(iris)
#hex <- as.h2o(iris)
Log.info("Try /ing a scalar to a numeric column: 5 / hex[,col]")
col <- sample(ncol(hex), 1)
sliced <- hex[,col]
print(sliced)
print... | 2,011 | apache-2.0 |
99cd6d1b85d11cfabfc40ccd605019310dd7f4fd | jeffnorville/loadRsandbox | tmp.R | #test git
| 10 | mit |
bc385350eb676e2c45a0e9f54bf699213d228526 | kyoren/https-github.com-h2oai-h2o-3 | h2o-r/tests/testdir_jira/runit_pub_168_dfpredicates.R | #
# test filtering via factors
#
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../h2o-runit.R')
factorfilter <- function(){
Log.info('uploading ddply testing dataset')
df.h <- h2o.importFile(normalizePath(locate('smalldata/jira/pub-180.csv')))
Log.info('printing from h2o')
... | 1,761 | apache-2.0 |
5bf93e87eb2d2a617d25b5bcf8c209425f3624fd | ChristophAy/leverage_cycles | leverageCycles/R/RcppExports.R | # This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
run_leverage_cycles_model <- function(out, double_params, stochastic, seed) {
.Call('leverageCycles_run_leverage_cycles_model', PACKAGE = 'leverageCycles', out, double_params, stochastic, seed)
}
| 311 | mit |
1ba123f1b35b0578751e60c39177311d85c23e68 | PROBIC/diffsplicing | codes/R/preprocessing/getMeanTecVar.R | getMeanTecVar <-
function(mcmc_filenames_in,noLines,noSkip) {
#headerLines=read.table(dataFileName,skip=0,nrows=NoHeaderLines)
#X=as.matrix(as.numeric(headerLines[1,][,-seq(1,NoInfoColumns)]))
library(matrixStats)
R=length(mcmc_filenames_in)
r=1
dat1=as.matrix(read.table(as.character(mcmc_filenames_in[r]),nrows... | 865 | mit |
5df0be3d0755af9d024082d6f2e57feb3611a4fe | hruffieux/locus | R/locus_struct_core.R | # This file is part of the `locus` R package:
# https://github.com/hruffieux/locus
#
# Internal core function to call the variational algorithm for structured
# sparse regression with identity link, no fixed covariates.
# See help of `locus` function for details.
#
locus_struct_core_ <- function(Y, X, list_hyper, g... | 7,491 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | jukiewiczm/renjin | packages/utils/src/main/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-3.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | mirror/r | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | ChiWang/r-source | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | skyguy94/R | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | o-/Rexperiments | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | lajus/customr | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | glycerine/bigbird | r-3.0.2/src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | bsd-2-clause |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | kalibera/rexp | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | cmosetick/RRO | R-src/src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | jeffreyhorner/R-Judy-Arrays | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | cxxr-devel/cxxr-svn-mirror | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | jeffreyhorner/R-Array-Hash | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | jagdeesh109/RRO | R-src/src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | hxfeng/R-3.1.2 | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
f34183aaf6b54f54d86b81b956f08093f4b60f38 | patperry/r-source | src/library/utils/R/progressBar.R | # File src/library/utils/R/progressBar.R
# Part of the R package, http://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; eit... | 4,150 | gpl-2.0 |
edc453e31762ad977243a3b76382783d987774e2 | spadarian/USydneyRainfall | R/get_intersect.R | #' Better Rainfall Forecast for Grain Growers API connection
#'
#' This function gets rainfall records (year sum) from user station and BoM station, of intersecting years.
#'
#' @param station_id ID of the station.
#' @param ref_station_id ID of the BoM station.
#' @param relative used when \code{time_frame != 'All'}. ... | 862 | mit |
674ee3a27cd4449ce1facb81ef6fe53b8ea7f456 | Myasuka/systemml | src/test/scripts/functions/binary/matrix/BinUaggChain_Col.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... | 1,158 | apache-2.0 |
90b1fa5b3a7f5fe5b5cdb6bda1f89fc40a9f8a3a | vinaywv/mlr | man-roxygen/ret_wmodel.R | #' @return [\code{\link{WrappedModel}}].
| 42 | bsd-2-clause |
0b32c53d531d837f39441cc6ff25b1407c320d81 | Danko-Lab/rtfbs_db | test/mm10.export.R | library(rtfbsdb)
file.twoBit_path <- "/local/storage/data/mm10/mm10.2bit";
db <- CisBP.extdata("Mus_musculus");
tfs <- tfbs.createFromCisBP(db);
df <- as.data.frame(table(tfs@tf_info$Motif_Type))
df <- df[df[,2]!=0,]
tf_info <- tfs@tf_info[, c("Motif_ID", "TF_Name")];
tf_info <- do.call("rbind", lapply(unique(tf_inf... | 2,059 | gpl-3.0 |
90b1fa5b3a7f5fe5b5cdb6bda1f89fc40a9f8a3a | tijoseymathew/mlr | man-roxygen/ret_wmodel.R | #' @return [\code{\link{WrappedModel}}].
| 42 | bsd-2-clause |
5de2f2968ac6ec89c89df5ccdcd8b41dfbe6a632 | bbest/bbest.github.io | env-info_hw/test_shiny1/app.R | library(shiny)
ui = fluidPage(
'Hello world',
selectInput(inputId = "n_breaks",
label = "Number of bins in histogram (approximate):",
choices = c(10, 20, 35, 50),
selected = 20),
plotOutput(outputId = "main_plot", height = "300px"))
server = function(input, output... | 584 | mit |
82e85888f840974c8a06cce05fcef0d11a7bf83d | hredestig/pcaMethods | R/xval.R | ##' Internal cross-validation can be used for estimating the level of
##' structure in a data set and to optimise the choice of number of
##' principal components.
##'
##' This method calculates \eqn{Q^2} for a PCA model. This is the
##' cross-validated version of \eqn{R^2} and can be interpreted as the
##' ratio of va... | 12,193 | gpl-2.0 |
3c495988286567c4757d1164e3b225e2f8bd0a39 | lindsaycarr/repgen | R/fiveyeargwsum-styles.R | getFiveyearStyle <- function() {
styles <- list(
stat1_lines = list(type="s", col="blue", pch=20, cex=0.5),
stat2_lines = list(type="s", col="maroon", pch=20, cex=0.5),
stat3_lines = list(type="s", col="orange", pch=20, cex=0.5),
stat4_lines = list(type="s", col="black", pch=20, cex=0.5),
... | 1,009 | cc0-1.0 |
3c495988286567c4757d1164e3b225e2f8bd0a39 | thongsav-usgs/repgen | R/fiveyeargwsum-styles.R | getFiveyearStyle <- function() {
styles <- list(
stat1_lines = list(type="s", col="blue", pch=20, cex=0.5),
stat2_lines = list(type="s", col="maroon", pch=20, cex=0.5),
stat3_lines = list(type="s", col="orange", pch=20, cex=0.5),
stat4_lines = list(type="s", col="black", pch=20, cex=0.5),
... | 1,009 | cc0-1.0 |
3c495988286567c4757d1164e3b225e2f8bd0a39 | dpattermann-usgs/repgen | R/fiveyeargwsum-styles.R | getFiveyearStyle <- function() {
styles <- list(
stat1_lines = list(type="s", col="blue", pch=20, cex=0.5),
stat2_lines = list(type="s", col="maroon", pch=20, cex=0.5),
stat3_lines = list(type="s", col="orange", pch=20, cex=0.5),
stat4_lines = list(type="s", col="black", pch=20, cex=0.5),
... | 1,009 | cc0-1.0 |
c37837e4abd10b016c263140968999121c94ddc9 | alexcritschristoph/PolychartHTMLWidget | R/polychart.R | #' Create polychart-based scatter plot
#'
#' More info here.
#'
#' @importFrom htmlwidgets createWidget
#'
#' @export
polychart <- function(gg_obj, width = 900, height = 500, data_cols=c(), palette=c("#3182bd","#fd8d3c","#74c476")) {
palette = as.factor(palette)
#Get data
gg_data = gg_obj$data
draw_plot = FAL... | 2,229 | gpl-2.0 |
f75d859b7dca208e4d886f6c815f2255bada66ac | uhkniazi/BRC_NeuralTube_Miho | S135/05_bismark_array_job.R | # File: 05_bismark_array_job.R
# Auth: umar.niazi@kcl.as.uk
# DESC: create a parameter file and shell script to run array job on hpc
# Date: 25/10/2017
## set variables and source libraries
source('header.R')
## connect to mysql database to get sample information
library('RMySQL')
##### connect to mysql database to... | 3,867 | mit |
c69c1a2df431155b5125890f92604b5d8cd067fb | dyusuf/RCAS | R/enrichment_analysis.R | #' findEnrichedFunctions
#'
#' Find enriched functional terms among the genes that overlap
#' the regions of interest.
#'
#' This function is basically a call to gprofiler2::gost function.
#' It is here to serve as a replacement for other deprecated functional
#' enrichment functions.
#'
#' @examples
#' data(gff... | 2,094 | mit |
4b1c58e328eea63b1ec3dd6b655e8c453c0142b5 | cbadenes/oaipmh-analyzer | src/main/r/upm.R | ###################################
## UPM Data Provider:
###################################
## [1] sourceASuri publisherAStext rightsASuri
## [4] descriptionAStext descriptionASdate identifierASdate
## [7] coverageASuri publisherASdate formatASdate
##[10] identifierAStext identifierASuri ... | 22,887 | apache-2.0 |
e7c0e42b04bd4044d38f24a8dd2244c861282dd9 | timfolsom/hei | tests/testthat/test_fped.R | context("fped")
test_that("get_fped returns a data frame", {
fped <- get_fped("2005/2006", day = "both")
expect_is(fped, "data.frame")
}) | 149 | gpl-3.0 |
66bd253f934119d2198bcf8a4330404a97376485 | kevinnguyeneng/R | PracticalML/quiz4.R | #################
#### Q1 ########
#################
library(ElemStatLearn)
library(caret)
library(gbm)
library(AppliedPredictiveModeling)
data(vowel.train)
data(vowel.test)
set.seed(33833)
vowel.train$y <- as.factor(vowel.train$y)
vowel.test$y <- as.factor(vowel.test$y)
trainMod <- train(y ~ . , data = vowel.trai... | 3,134 | mit |
66bd253f934119d2198bcf8a4330404a97376485 | avistous/R-1 | PracticalML/quiz4.R | #################
#### Q1 ########
#################
library(ElemStatLearn)
library(caret)
library(gbm)
library(AppliedPredictiveModeling)
data(vowel.train)
data(vowel.test)
set.seed(33833)
vowel.train$y <- as.factor(vowel.train$y)
vowel.test$y <- as.factor(vowel.test$y)
trainMod <- train(y ~ . , data = vowel.trai... | 3,134 | mit |
eb91cda68cf307c4143fe33b5882993b66ef418d | eread-usgs/climate-fish-habitat | scripts/lib/getDataInfo.R | #' @import yaml
#' @import jsonlite
getDataInfo <- function() {
# read viz.yaml
viz.yaml <- yaml.load_file('viz.yaml')
# isolate the data block
data <- viz.yaml[["data"]]
data.list <- list()
for (data.item in data) {
data.list[[data.item$id]] <- data.item
}
return(data.list)
} | 301 | cc0-1.0 |
eb91cda68cf307c4143fe33b5882993b66ef418d | jread-usgs/climate-fish-habitat | scripts/lib/getDataInfo.R | #' @import yaml
#' @import jsonlite
getDataInfo <- function() {
# read viz.yaml
viz.yaml <- yaml.load_file('viz.yaml')
# isolate the data block
data <- viz.yaml[["data"]]
data.list <- list()
for (data.item in data) {
data.list[[data.item$id]] <- data.item
}
return(data.list)
} | 301 | cc0-1.0 |
66bd253f934119d2198bcf8a4330404a97376485 | snajperro/R | PracticalML/quiz4.R | #################
#### Q1 ########
#################
library(ElemStatLearn)
library(caret)
library(gbm)
library(AppliedPredictiveModeling)
data(vowel.train)
data(vowel.test)
set.seed(33833)
vowel.train$y <- as.factor(vowel.train$y)
vowel.test$y <- as.factor(vowel.test$y)
trainMod <- train(y ~ . , data = vowel.trai... | 3,134 | mit |
eb91cda68cf307c4143fe33b5882993b66ef418d | USGS-VIZLAB/climate-fish-habitat | scripts/lib/getDataInfo.R | #' @import yaml
#' @import jsonlite
getDataInfo <- function() {
# read viz.yaml
viz.yaml <- yaml.load_file('viz.yaml')
# isolate the data block
data <- viz.yaml[["data"]]
data.list <- list()
for (data.item in data) {
data.list[[data.item$id]] <- data.item
}
return(data.list)
} | 301 | cc0-1.0 |
66bd253f934119d2198bcf8a4330404a97376485 | dmpe/R | PracticalML/quiz4.R | #################
#### Q1 ########
#################
library(ElemStatLearn)
library(caret)
library(gbm)
library(AppliedPredictiveModeling)
data(vowel.train)
data(vowel.test)
set.seed(33833)
vowel.train$y <- as.factor(vowel.train$y)
vowel.test$y <- as.factor(vowel.test$y)
trainMod <- train(y ~ . , data = vowel.trai... | 3,134 | mit |
ecadf3e00f12de92e48584e1166db24a84631a12 | gjkerns/hawaiiData | data/ajobcount.R | ajobcount <-
structure(c(35600L, 36100L, 34100L, 34500L, 30900L, 27600L, 25000L,
23500L, 22800L, 22600L, 24800L, 24700L, 26000L, 27950L, 29450L,
33400L, 36500L, 39100L, 37850L, 31400L, 28900L, 28800L, 29500L,
20600L, 19900L, 18800L, 17600L, 16800L, 16300L, 16000L, 15800L,
15700L, 15900L, 16400L, 16400L, 15200L... | 4,257 | gpl-3.0 |
a521312f775f12000d1bce301efab669f5d9a4bc | Saftophobia/graph-viz-eye-tracker | Statistics/modules/install.R | ################## Install the packages ###########################
###################################################################
install.packages("car")
install.packages("MBESS")
install.packages(c('devtools', 'curl'))
install.packages('BayesFactor', dependencies = TRUE)
devtools::install_github('ndphillips/ya... | 432 | mit |
654f8c5980c41807167c09cb80130005b47baf69 | SACEMA/ABIE | inctools/tests/testthat/test-inctools.R | test_that("mdri estimation works", {
expect_equal(mdrical(data=excalibdata,
subid_var = "SubjectID",
time_var = "DaysSinceEDDI",
recency_cutoff_time = 730.5,
inclusion_time_threshold = 800,
functional_fo... | 37,048 | gpl-3.0 |
f2ac5f5830efe291c7ca0b189f1007f919c728de | ecjbosu/fSEAL | PerformanceAnalytics/R/InformationRatio.R | #' InformationRatio = ActivePremium/TrackingError
#'
#' The Active Premium divided by the Tracking Error.
#'
#' InformationRatio = ActivePremium/TrackingError
#'
#' This relates the degree to which an investment has beaten the benchmark to
#' the consistency with which the investment has beaten the benchmark.... | 3,092 | gpl-2.0 |
654f8c5980c41807167c09cb80130005b47baf69 | SACEMA/inctools | tests/testthat/test-inctools.R | test_that("mdri estimation works", {
expect_equal(mdrical(data=excalibdata,
subid_var = "SubjectID",
time_var = "DaysSinceEDDI",
recency_cutoff_time = 730.5,
inclusion_time_threshold = 800,
functional_fo... | 37,048 | gpl-3.0 |
a20718f248f26a4724127d1af4d5940c76721aa0 | google/synergyfinderengineered | R/Bliss.R | # Copyright 2018 Google LLC
#
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
#
#' Synergy score based on Bliss model
#'
#' A function to calculate synergy score based on Bliss model
#'
#' @param response.mat a dose-respo... | 2,395 | mit |
e3dc6b3b13297cf1779645ddd30fcdf2630d34c8 | Jean-Romain/lidR | R/fullwaveform.R | #' Convert full waveform data into a regular point cloud
#'
#' Full waveform can be difficult to manipulate and visualize in R. This function converts
#' a LAS object with full waveform data into a regular point cloud. Each waveform record
#' becomes a point with XYZ coordinates and an amplitude (units: volts) and an I... | 1,648 | gpl-3.0 |
66f48e534b2ef4b5fefcc1d6aadf581f2c9e2c62 | janschulz/igraph | interfaces/R/tests/decompose.graph.R |
library(igraph)
g <- erdos.renyi.game(1000, 1/1500)
G <- decompose.graph(g)
clu <- clusters(g)
Gsizes <- sapply(G, vcount)
all(sort(clu$csize) == sort(Gsizes))
| 162 | gpl-2.0 |
96dce28f900fd59b523855105c166978defdce24 | andrejadd/GWSDAT | start_ExcelMode.R |
GWSDAT_Options <- list()
GWSDAT_Options[['Aggby']] <- 'Month' # 'Day', 'Month', 'Quarter', 'Year'
GWSDAT_Options[['AggMethod ']] <- 'Mean'
GWSDAT_Options[['NDMethod']] <- 'Half of ND Value'
GWSDAT_Options[['cross']] <- 10
GWSDAT_Options[['Tune']] <- TRUE
GWSDAT_Options[['gamma']] <- c(0)
GWSDAT_Options[['cost']] ... | 3,814 | gpl-3.0 |
fe469473aa77cdffe08000bfcc53d920aeab40c4 | bakuhatsu/microarrayTools | R/venndia.R | ##############################
## Sven Nelson ##
## 4/23/2012 ##
## Function: venndia ##
##############################
# Also includes a simple function for drawing circles, called: circle
#' circle
#'
#' A function to draw circles.
#' @param x x coordinate
#' @param y y coordinate
... | 7,591 | mit |
1bd1ab21fb7e698a7e8e152f0817f44994014ef3 | isglobal-brge/rexposome | R/ExWAS-tef.R | #' @describeIn ExWAS Method to obtain the Threshold for effective tests (TEF)
setMethod(
f = "tef",
signature = "ExWAS",
definition = function(object) {
return(object@effective)
}
)
| 214 | mit |
69ea68c0768db382fff1af407cd2a01e219bfc72 | xuefliang/PhViD | Bayes.R | n<-500
#通过控制饮食而恢复正常的
diet<-0.1
effect<-c(0,0.95)
names(effect)<-c('FA','FB')
#对病患总体指派因素F
set.seed(1)
f.chance<-runif(n)
f<-ifelse(f.chance<0.9,'FA','FB')
table(f)
#指派控制组和治疗组
set.seed(1)
group<-runif(n)
group<-ifelse(group<0.5,'control','drug')
table(group)
#在关于药物D的临床实验中,将背景相似,病情相似的500名患者分为治疗组(针对病情控制饮食,服用药物D)和控制组(针对病... | 2,615 | gpl-2.0 |
4f66f3808514fc84e5c78127bb68badad5fbadcb | LTLA/dacpet | package/tests/test-linkers.R | ##########################################################
# This script tests the various functions in the linker splitting machinery.
suppressPackageStartupMessages(require(dacpet))
suppressPackageStartupMessages(require(Biostrings))
compfun <- function(alpha, bravo, m=1, mm=-1, go=-3, ge=-1) {
out <- .Call(dacpet... | 7,909 | gpl-3.0 |
c42fb3cf07e4c8eb77ab33066229b94d7a02ff6a | ogencoglu/R_for_VTT | Lectures/Lecture_3/neural_net.R | # R Lecture to VTT - Lecture 3
# Author : Oguzhan Gencoglu
# Latest Version : 04.05.2016
# Contact : oguzhan.gencoglu@tut.fi
# -------------- Neural networks --------------
# generate some data with 2 classes
p <- 2
N <- 200
x <- matrix(rnorm(N*p),ncol=p)
y <- as.numeric((x[,1]^2+x... | 2,300 | mit |
ca6fde7e5d9da0d972b694850e29774e6dc8e66e | lindsaycarr/repgen | R/utils-read.R | #' Get the size of a dataframe.
#'
#' @description Will throw an error if data frame is NULL or NA.
#' @param df the data frame to get the size of
sizeOf <- function(df){
if (is.null(df)) {
stop('data frame is null, cannot determine size')
}
return(nrow(df))
}
#' Read report metadata field
#'
#' @descripti... | 46,955 | cc0-1.0 |
aab71391892a12e8b3d9717f9e2b2ea9dfff83a8 | ivannz/study_notes | year_14_15/fall_2014/robust_methods/assignments/assign01/problem_4.R | rm( list = ls( all.names = TRUE) ) ; invisible( gc( ) )
setwd( "/users/user/Desktop/studies 2014-2015/Robust methods/assign01/tex" )
Sweave( file = "../assign01.Stex" )
## Form the matrix of factors
set.seed( -1234L )
## Generate observation errors (noise)
eta <- rnorm( N <- 12 )
factors <-
expand.grid( x1 = c(-1... | 3,743 | mit |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | bgdavies/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | hjanime/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | bospetersen/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | Jutair/R-programming-Coursera | Swirl/Rsubversion/trunk/Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-2.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | nunolf/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | tillvaxse/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | pavanmg/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | rsshalini/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | gberkwitt/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | shyangdan/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | rajeevkarn/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | PayneZ/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | maskegger/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | Hris2013/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
49361ccfee0095ac83cfe4f3d2d7090c829cd9e7 | martingascon/swirl_courses | Regression_Models/Variance_Inflation_Factors/vifSims.R | makelms <- function(x1, x2, x3){
# Simulate a dependent variable, y, as x1
# plus a normally distributed error of mean 0 and
# standard deviation .3.
y <- x1 + rnorm(length(x1), sd = .3)
# Find the coefficient of x1 in 3 nested linear
# models, the first including only the predictor x1,
# the second x1 a... | 1,304 | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.