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
3a0c2a90fecde6c58d7d4070161c8659b95d28ac
YoJimboDurant/R-MET-R-MOD
compAermin.R
# compAermin reads the comparison files from aerminute and produces diagnostic plots # using the package openair' model comparison functions compAermin <- function(startYear, stopYear, makePDF=FALSE, outfile="compAermin.pdf", sumFilePattern="_comp_.*\\.dat"){ require(openair) require(lubridate) years <- seq(s...
1,574
unlicense
88177a689ec3f27a013bec4c84304f6d4189c401
taranu/ProFit
inst/example/SAMIDataPrep.R
# A quick function to fit a planar sky (should be able to use hyper.fit instead if needed, # but SVD gives the least-squares solution right away and we don't need uncertainties) .svdfitplane <- function(x, fitintercept=TRUE) { ndim = dim(x)[[2]] stopifnot(!is.null(ndim) && ndim > 1) medians = vector(mode="numeric...
7,758
gpl-3.0
acd2cf64aeaa54995d7f288b8ff11bd4e05cafc7
dterror/minutiaer
R/minutiaer.R
#' Creates a String with interpolated values #' #' @param text A string #' @return The text string with the substituted interpolated variabled #' @examples #' name <- "Kristorffeson" #' greetin <- s("Hi there, ${name}") #' # => "Hi there, Kristorffeson" s <- function(text, envir=parent.frame()) { # We grab the paren...
1,010
mit
743c873cbfb3f88279cccb51d6f40a801839b19b
lawshannah/lawshannah.github.io
Other/19Sept2017.R
library(dplyr) c(25, 10, 15, 12) %>% rank #TRS: #1. Rmarkdown #2. blogdown #these two PROJECT #groups of 2-3. start with reading and making graphs of biking data ##################26SEPT2017 library(ggplot2) library(dplyr) DF %>% group_by(Gender)%>% summarize(MP = mean(Pay))%>% ggplot(aes(x = Gender, y =...
449
mit
8a205aa32fbea834e976f91003d6d41caf609fe9
FESOM/spheRlab
R/sl.tracer.calculate.trajectories.R
sl.tracer.calculate.trajectories <- function(U, x.ini, t.ini = 0, grid, i.neighs=NULL, tri.cont.ini = NULL, abort.if = NULL, tgr = NULL, dt.def = 1, T.end = 10, maxiter = 4, qfrac = 2, cart_geo= "geo", geo.gc_rad = "gc", patch.level = 10, method = "Petterssen", Rsphere = 6371){ requ...
13,942
gpl-3.0
2438bec118f466267b1b7bf91887acadd4201a28
scrim-network/BRICK
fortran/R/daisF.R
# ======================================================================================= # DAIS-fortran90 (# estimation by calling fortran routine) # DAIS: Simple model for Antarctic ice-sheet volume [m sle] (Schaffer 2014) # ======================================================================================= # # ...
6,235
gpl-3.0
a9c341c3a4877c37adc5c6ecdd01aed2e844e67f
karawoo/icetest
R/check_doc.R
##' Check DOC values ##' ##' We originally asked for DOC data in units of ug/l, however mg/l was provided ##' by most researchers and is a more standard unit. If DOC is in the hundreds ##' or thousands, it is likely in ug/l and we should follow up with researchers ##' and likely convert their data. ##' ##' @param dat ...
705
mit
2982f681be791c9e9b4706af210dcf7a2568a519
andrewdefries/andrewdefries.github.io
FDA_Pesticide_Glossary/karvon.R
library("knitr") library("rgl") #knit("karvon.Rmd") #markdownToHTML('karvon.md', 'karvon.html', options=c("use_xhml")) #system("pandoc -s karvon.html -o karvon.pdf") knit2html('karvon.Rmd')
192
mit
de513c011b9b3a3ad52dac3f905d77259e37855c
cgvarela/jasp-desktop
JASP-Engine/JASP/R/ttestpairedsamples.R
TTestPairedSamples <- function(dataset=NULL, options, perform="run", callback=function(...) 0, ...) { all.variables <- unique(unlist(options$pairs)) all.variables <- all.variables[all.variables != ""] if (is.null(dataset)) { if (perform == "run") { if (options$missingValues == "excludeListwise") { ...
14,151
agpl-3.0
de513c011b9b3a3ad52dac3f905d77259e37855c
tlevine/jasp-desktop
JASP-Engine/JASP/R/ttestpairedsamples.R
TTestPairedSamples <- function(dataset=NULL, options, perform="run", callback=function(...) 0, ...) { all.variables <- unique(unlist(options$pairs)) all.variables <- all.variables[all.variables != ""] if (is.null(dataset)) { if (perform == "run") { if (options$missingValues == "excludeListwise") { ...
14,151
agpl-3.0
de513c011b9b3a3ad52dac3f905d77259e37855c
Tahiraj/jasp-desktop
JASP-Engine/JASP/R/ttestpairedsamples.R
TTestPairedSamples <- function(dataset=NULL, options, perform="run", callback=function(...) 0, ...) { all.variables <- unique(unlist(options$pairs)) all.variables <- all.variables[all.variables != ""] if (is.null(dataset)) { if (perform == "run") { if (options$missingValues == "excludeListwise") { ...
14,151
agpl-3.0
19af1caaee5ec04b8d5a9e7c70c8a24933b0eacf
huanzhang12/LightGBM
R-package/R/lgb.importance.R
#' Compute feature importance in a model #' #' Creates a \code{data.table} of feature importances in a model. #' #' @param model object of class \code{lgb.Booster}. #' @param percentage whether to show importance in relative percentage. #' #' @return #' #' For a tree model, a \code{data.table} with the following co...
2,234
mit
19af1caaee5ec04b8d5a9e7c70c8a24933b0eacf
huanzhang12/lightgbm-gpu
R-package/R/lgb.importance.R
#' Compute feature importance in a model #' #' Creates a \code{data.table} of feature importances in a model. #' #' @param model object of class \code{lgb.Booster}. #' @param percentage whether to show importance in relative percentage. #' #' @return #' #' For a tree model, a \code{data.table} with the following co...
2,234
mit
19af1caaee5ec04b8d5a9e7c70c8a24933b0eacf
fstonezst/LightGBM
R-package/R/lgb.importance.R
#' Compute feature importance in a model #' #' Creates a \code{data.table} of feature importances in a model. #' #' @param model object of class \code{lgb.Booster}. #' @param percentage whether to show importance in relative percentage. #' #' @return #' #' For a tree model, a \code{data.table} with the following co...
2,234
mit
0db8a4bc98ac615abec53342b8cbe46fad67d070
mhunter1/OpenMx
inst/models/nightly/xxm-lgc.R
# http://xxm.times.uh.edu/learn-xxm/latent-growth-curve-model/ library(OpenMx) options(width=120) got <- suppressWarnings(try(load("models/nightly/data/reisby.wide.xxm.RData"))) if (is(got, "try-error")) load("data/reisby.wide.xxm.RData") reisby1 <- mxModel( "reisby", type="RAM", mxData(reisby.wide, "raw"), ma...
1,726
apache-2.0
360e000d3c3167eda4b56d0775fdfc060f5734c7
hadley/purrr
R/transpose.R
#' Transpose a list. #' #' Transpose turns a list-of-lists "inside-out"; it turns a pair of lists into a #' list of pairs, or a list of pairs into pair of lists. For example, #' if you had a list of length n where each component had values `a` and #' `b`, `transpose()` would make a list with elements `a` and #' `b` tha...
1,940
gpl-3.0
547d9ed9aee51b229d9d3bc46f7fd8aaf26a499a
waddella/loon
R/man-roxygen/descr_layer_labels.R
#' @description Layer labels are useful to identify layer in the layer #' inspector. The layer label can be initially set at layer creation with the #' label argument.
173
gpl-2.0
360e000d3c3167eda4b56d0775fdfc060f5734c7
cran/purrr
R/transpose.R
#' Transpose a list. #' #' Transpose turns a list-of-lists "inside-out"; it turns a pair of lists into a #' list of pairs, or a list of pairs into pair of lists. For example, #' if you had a list of length n where each component had values `a` and #' `b`, `transpose()` would make a list with elements `a` and #' `b` tha...
1,940
gpl-3.0
cab1e6aefa91f10e0c5683d86b9c1c18e312eabf
pik-piam/magclass
R/where.R
#' where #' #' Analysis function for magpie objects #' #' #' @param x A logical statement with a magpie object #' @param plot deprecated. Use the function whereplot in package luplot. #' @return A list of analysis parameters #' @author Benjamin Leon Bodirsky, Jan Philipp Dietrich #' @seealso whereplot in package luplot...
1,535
lgpl-3.0
839b3484a1ab4cfabe203cd647c0b1a70e3bcebc
ChristophH/Inferelator
R_scripts/vis_tfs_and_targets.R
library('Matrix') library('ggplot2') library('reshape2') library('gplots') if ('parallel' %in% installed.packages()[, 'Package']) { library('parallel') } else { library('multicore') } # for heatmaps my.hclust <- function(d) hclust(d, method="ward.D") my.hclust.co <- function(d) hclust(d, method="complete") my.hclu...
11,725
mit
10c14a00af417583b79928eb0ae65beb200b1c80
cpcloud/arrow
r/R/arrow-package.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...
10,883
apache-2.0
cab1e6aefa91f10e0c5683d86b9c1c18e312eabf
cran/magclass
R/where.R
#' where #' #' Analysis function for magpie objects #' #' #' @param x A logical statement with a magpie object #' @param plot deprecated. Use the function whereplot in package luplot. #' @return A list of analysis parameters #' @author Benjamin Leon Bodirsky, Jan Philipp Dietrich #' @seealso whereplot in package luplot...
1,535
lgpl-3.0
afc9e04ff2dae3b3ebd9dd937ace8ee27c6aaa5f
DannyArends/CTLmapping
Rctl/R/ctl.correlation.R
# # ctl.correlation.R # # copyright (c) 2010-2014 - GBIC, Danny Arends, Pjotr Prins, Yang Li, and Ritsert C. Jansen # last modified Mar, 2014 # first written Mar, 2014 # # Wrappers around the correlation and chisquare code # correlation <- function(x, y, nthreads = 1, verbose = FALSE){ if(is.matrix(y)) { ...
4,630
gpl-3.0
ba4bccacedc761a26b42ff89a9e21e7c8d835032
elangovana/ClockLat
sourcecode/utilities.R
source("./globals.R") calcRMS <- function(actualData, predictedData){ predictedData[ is.na(predictedData) ] <- 0 return (sqrt(clocklat.mean((actualData-predictedData)^2))) } compareAcutalVsPredicted <- function(actualTestDataLatLon, predictedResults){ rmsLat <- calcRMS(actualTestDataLatLon[, lat], predictedRes...
1,046
mit
dd64887ffad83c3b3bb25a9b5f0b1707f4113e31
stephlabou/ecology_under_lake_ice_repo
Scripts/Analysis-Figures/seasonal_means.R
################################################################################### # This script calculates seasonal means (e.g. iceon and iceoff means) and # # standard deviations and errors for each variable and unique lake/station # # combination. Output also includes the total number of (non-NA) obs...
6,327
mit
e65abfd4459d9e60dcc73ad0a9174aa13e933b7c
KopfLab/isoreader
R/isodata_structures.R
# Structures ---- # basic data structure make_iso_file_data_structure <- function(file_id = NA_character_) { structure( list( version = packageVersion("isoreader"), read_options = list( # records read options+defaults file_info = FALSE, # whether file info was read method_info = FALSE...
14,658
gpl-2.0
53c301e969642fe85672c26131bf55ecb81e85be
AlexeiSleptcov/aggi
R/commonSeg.R
#' Calculate common CNA statistic #' #' Calculate common CNA statistic #' #' @param data CBS data, found CNA from \code{thrCBS} #' @param data2 DNAcopy data #' @param biomart logical, if TRUE \code{\link{biomaRt}} will be used for description #' #' @export commonSeg <- function(data, data2, biomart=FALSE){ if(!in...
3,973
gpl-2.0
fe7865e852e7aa3b3362f0001437c5bcb284d8c5
ucd-ipo/agroft
examples/crd_one_var.R
# This script runs a one-way ANOVA based on one dependent continuous variable # and one independent factor which come from a completely randomized experiment # design. It is based on the example given on page 27 of the agricolae tutorial # [1]. Everything displayed to the terminal and the two plots will be displayed # ...
5,488
bsd-3-clause
e8445c0ad66b4c18acf185627b5854c3d96b103a
manfredo89/ED2io
R/Bci_histogram.R
#Script to convert the BCI inventory to the array used to plot the size distribution dbh=read.table("/Users/manfredo/Desktop/bci_size.txt") dbh=as.double(dbh[,1]) dbh = dbh / 10.0 this.classdbh = c(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24) h=hist(dbh, breaks = this.classdbh, right=T,freq = T) #2...
521
gpl-3.0
fe7865e852e7aa3b3362f0001437c5bcb284d8c5
ucd-ipo/aip-analysis
examples/crd_one_var.R
# This script runs a one-way ANOVA based on one dependent continuous variable # and one independent factor which come from a completely randomized experiment # design. It is based on the example given on page 27 of the agricolae tutorial # [1]. Everything displayed to the terminal and the two plots will be displayed # ...
5,488
bsd-3-clause
fe7865e852e7aa3b3362f0001437c5bcb284d8c5
iamciera/aip-analysis
examples/crd_one_var.R
# This script runs a one-way ANOVA based on one dependent continuous variable # and one independent factor which come from a completely randomized experiment # design. It is based on the example given on page 27 of the agricolae tutorial # [1]. Everything displayed to the terminal and the two plots will be displayed # ...
5,488
bsd-3-clause
fe7865e852e7aa3b3362f0001437c5bcb284d8c5
msimmond/aip-analysis
examples/crd_one_var.R
# This script runs a one-way ANOVA based on one dependent continuous variable # and one independent factor which come from a completely randomized experiment # design. It is based on the example given on page 27 of the agricolae tutorial # [1]. Everything displayed to the terminal and the two plots will be displayed # ...
5,488
bsd-3-clause
2ad85410f5216927cc8e60ede0441bd52e0b1a0b
sakrejda/parse-stan
R/cmdstan-arg-tree-helpers.R
#' Based on an argument tree ('args' object) find a model #' and return the path. If the model file (.stan file) is not #' found, check for the presence of a partial model file (.model file) #' and splice it with components from args[['model_dir']] #' #' @param args arg-tree object (list). #' @return path to object's...
2,353
gpl-3.0
5e0f69fdaf3c624c257e2ec47db31653e4643d3a
malachig/alexa
Array_analysis/R_bin/c_elegans_testAnalysis.R
#Test of normalization strategies on NimbleGen data #Use data from 7 stages of C. elegans development, provided by Kim Wong #1.) NORMALIZATION #A.) RAW DATA datadir = "/home/malachig/AlternativeSplicing/data_sources/C_elegans_NimbleGenData/RawData"; setwd(datadir) #Read in the raw data files, which have the followin...
7,040
gpl-2.0
1aa9206b7305102a9c629840f59d65e07f241f02
ColumbusCollaboratory/electron-quick-start
R-Portable-Mac/library/recipes/doc/Simple_Example.R
## ----ex_setup, include=FALSE--------------------------------------------- knitr::opts_chunk$set( message = FALSE, digits = 3, collapse = TRUE, comment = "#>" ) options(digits = 3) ## ----data---------------------------------------------------------------- library(recipes) library(caret) data(segmentationDa...
2,298
cc0-1.0
5d59cf0463389e544d132fb7cd6ddfe6ba2c7715
imbforge/NGSpipe2go
tools/reports/shiny_scrnaseq_reporting_tool/server.R
library(rmarkdown) # for the report generator library(knitr) # for the report generator source("sc.shinyrep.helpers.R") # helper functions to generate the plots # things that will run only once per session # always in the global environment to ensure access (could be placed in global.R also) loadGlobalVars() addRes...
3,986
gpl-3.0
557bc03215559b371ede6cf01144fd5ac2ee9a82
kenkellner/tutorials
07_maximum_likelihood.R
#How can we estimate unknown parameter values from a set of data? #Generate a set of random Bernoulli data with known p n = 1 p = 0.3 samples = 1000 Y = rbinom(samples, n, p) mean(Y) / 1 #Maximum likelihood estimator #What does the probability distribution of a Binomial look like? #Take the log; sum for each value o...
2,869
gpl-2.0
9ab44efac3a8e9e4300ec88eba71b1189a464b1d
johngarvin/R-2.1.1rcc
src/library/methods/R/makeBasicFunsList.R
## the executable code to complete the generics corresponding to primitives, ## and to define the group generics for these functions. ## uses the primitive list and the function .addBasicGeneric ## defined (earlier) in BasicFunsList.R .makeBasicFuns<- function(where) { env <- new.env(hash=TRUE, parent=as.environm...
5,104
gpl-2.0
4e07cc3c865c1821769699262bb2b5747ba31c12
radfordneal/pqR
src/library/methods/R/SClasses.R
# File src/library/methods/R/SClasses.R # Part of the R package, http://www.R-project.org # Modifications for pqR Copyright (c) 2014, 2017, 2018 Radford M. Neal. # # 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 Fr...
37,866
gpl-2.0
8fd33128447934a7b7938a6699766eeafc6e2b96
dankelley/oce-issues
18xx/1808/1808c.R
library(oce) d <- read.oce("PLNKG_2019004_1_1_Z.ODF") # Find what's there summary(d) # Count by species table(d[["taxonomicName"]])
133
gpl-2.0
0409a726cfc61ca2f761780b1684c94ef3863a51
ArunChauhan/cxxr
src/extra/testr/filtered-test-suite/array/tc_array_20.R
expected <- eval(parse(text="structure(c(0.92317305817397+0i, 0.160449395256071+0.220125597679977i, 0.40353715410585+2.39063261466203i, -3.64092275386503+3.51619480964107i, -0.30877433127864+1.37503901638266i, -0.5590368753986+2.95994484328048i, 2.07117052177259-1.58552086053907i, 5.12796916272868+5.50114308371867i, 0....
7,990
gpl-2.0
498ebd54f7230576cb8695d4b48db1b6f8a714db
etsakl/DasyMapR
packrat/lib/x86_64-pc-linux-gnu/3.2.3/rgeos/tests/test-translate-points.R
library(testthat) library(rgeos) setScale() context("Translate Points") test_that("translate points", { p = readWKT("POINT(1 1)") mp = readWKT("MULTIPOINT(1 1, 2 2, 3 3, 4 4, 5 5)") gcp1 = readWKT("GEOMETRYCOLLECTION( POINT(1 1), POINT(2 2), POINT(3 3), POINT(4 4), POINT(5 5))") gcp2 = readWKT(...
2,361
gpl-3.0
0409a726cfc61ca2f761780b1684c94ef3863a51
kmillar/cxxr
src/extra/testr/filtered-test-suite/array/tc_array_20.R
expected <- eval(parse(text="structure(c(0.92317305817397+0i, 0.160449395256071+0.220125597679977i, 0.40353715410585+2.39063261466203i, -3.64092275386503+3.51619480964107i, -0.30877433127864+1.37503901638266i, -0.5590368753986+2.95994484328048i, 2.07117052177259-1.58552086053907i, 5.12796916272868+5.50114308371867i, 0....
7,990
gpl-2.0
3cf9b953639f4f18755bce4a2e9e0283c84602da
jeroenooms/r-source
tests/eval-fns.R
### Checking parse(* deparse()) "inversion property" ---------------------------- ## EPD := eval-parse-deparse : eval(text = parse(deparse(*))) ## Hopefully typically the identity(): pd0 <- function(expr, backtick = TRUE, ...) parse(text = deparse(expr, backtick=backtick, ...)) id_epd <- function(expr, control = c...
4,250
gpl-2.0
0409a726cfc61ca2f761780b1684c94ef3863a51
kmillar/rho
src/extra/testr/filtered-test-suite/array/tc_array_20.R
expected <- eval(parse(text="structure(c(0.92317305817397+0i, 0.160449395256071+0.220125597679977i, 0.40353715410585+2.39063261466203i, -3.64092275386503+3.51619480964107i, -0.30877433127864+1.37503901638266i, -0.5590368753986+2.95994484328048i, 2.07117052177259-1.58552086053907i, 5.12796916272868+5.50114308371867i, 0....
7,990
gpl-2.0
0409a726cfc61ca2f761780b1684c94ef3863a51
krlmlr/cxxr
src/extra/testr/filtered-test-suite/array/tc_array_20.R
expected <- eval(parse(text="structure(c(0.92317305817397+0i, 0.160449395256071+0.220125597679977i, 0.40353715410585+2.39063261466203i, -3.64092275386503+3.51619480964107i, -0.30877433127864+1.37503901638266i, -0.5590368753986+2.95994484328048i, 2.07117052177259-1.58552086053907i, 5.12796916272868+5.50114308371867i, 0....
7,990
gpl-2.0
0409a726cfc61ca2f761780b1684c94ef3863a51
cxxr-devel/cxxr
src/extra/testr/filtered-test-suite/array/tc_array_20.R
expected <- eval(parse(text="structure(c(0.92317305817397+0i, 0.160449395256071+0.220125597679977i, 0.40353715410585+2.39063261466203i, -3.64092275386503+3.51619480964107i, -0.30877433127864+1.37503901638266i, -0.5590368753986+2.95994484328048i, 2.07117052177259-1.58552086053907i, 5.12796916272868+5.50114308371867i, 0....
7,990
gpl-2.0
fd24a77a3db10dc762e146b4163fe80a191d467c
skyguy94/R
src/library/methods/R/rbind.R
# File src/library/methods/R/rbind.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; either ...
3,998
gpl-2.0
3cf9b953639f4f18755bce4a2e9e0283c84602da
reactorlabs/gnur
tests/eval-fns.R
### Checking parse(* deparse()) "inversion property" ---------------------------- ## EPD := eval-parse-deparse : eval(text = parse(deparse(*))) ## Hopefully typically the identity(): pd0 <- function(expr, backtick = TRUE, ...) parse(text = deparse(expr, backtick=backtick, ...)) id_epd <- function(expr, control = c...
4,250
gpl-2.0
fd24a77a3db10dc762e146b4163fe80a191d467c
mirror/r
src/library/methods/R/rbind.R
# File src/library/methods/R/rbind.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; either ...
3,998
gpl-2.0
0409a726cfc61ca2f761780b1684c94ef3863a51
rho-devel/rho
src/extra/testr/filtered-test-suite/array/tc_array_20.R
expected <- eval(parse(text="structure(c(0.92317305817397+0i, 0.160449395256071+0.220125597679977i, 0.40353715410585+2.39063261466203i, -3.64092275386503+3.51619480964107i, -0.30877433127864+1.37503901638266i, -0.5590368753986+2.95994484328048i, 2.07117052177259-1.58552086053907i, 5.12796916272868+5.50114308371867i, 0....
7,990
gpl-2.0
4a40977488147b819fbd01496d5a85b7203f1248
iliastsergoulas/shinyapps
country/agri_econ_active_population_wb_country/app.R
# Data: Economically active population in agriculture (number) # This R script is created as a Shiny application processing raw data downloaded from World Bank through WDI package, # and creating plots and maps as WDI(country = "all", indicator = "EN.AGR.EMPL", extra = FALSE, cache = NULL) # The code is available unde...
11,162
mit
59a00b63a466b9288d50d5f1abd14bddd061d551
bnaras/cvxr
R/variable.R
#' #' The Variable class. #' #' This class represents an optimization variable. #' #' @slot id (Internal) A unique identification number used internally. #' @slot rows The number of rows in the variable. #' @slot cols The number of columns in the variable. #' @slot name (Optional) A character string representing the na...
16,425
gpl-2.0
c396b3a5ea71871604046ea7714817900825ce42
cxxr-devel/cxxr
src/extra/testr/filtered-test-suite/operators/tc_operators_150.R
expected <- eval(parse(text="structure(c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
3,935
gpl-2.0
1fcacea67008f38a044e55174f681d3f46665ea6
jangorecki/h2o-3
h2o-r/tests/testdir_algos/glrm/runit_glrm_grid_iris.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.glrm.iris <- function() { Log.info("Importing iris_wheader.csv data...") irisH2O <- h2o.uploadFile(locate("smalldata/iris/iris_wheader.csv"), destination_frame = "irisH2O") print(summary(iris...
1,613
apache-2.0
1fcacea67008f38a044e55174f681d3f46665ea6
mathemage/h2o-3
h2o-r/tests/testdir_algos/glrm/runit_glrm_grid_iris.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.glrm.iris <- function() { Log.info("Importing iris_wheader.csv data...") irisH2O <- h2o.uploadFile(locate("smalldata/iris/iris_wheader.csv"), destination_frame = "irisH2O") print(summary(iris...
1,613
apache-2.0
1fcacea67008f38a044e55174f681d3f46665ea6
nilbody/h2o-3
h2o-r/tests/testdir_algos/glrm/runit_glrm_grid_iris.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.glrm.iris <- function() { Log.info("Importing iris_wheader.csv data...") irisH2O <- h2o.uploadFile(locate("smalldata/iris/iris_wheader.csv"), destination_frame = "irisH2O") print(summary(iris...
1,613
apache-2.0
c396b3a5ea71871604046ea7714817900825ce42
rho-devel/rho
src/extra/testr/filtered-test-suite/operators/tc_operators_150.R
expected <- eval(parse(text="structure(c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
3,935
gpl-2.0
8844bd1fb8d9339aa027588796b421b1e71ddbea
lucymli/EpiGenR
R/outbreak.R
#' Line list of a simulated outbreak #' #' A dataset containing details of each individual infected during an outbreak #' of an acute infectious disease. #' #' @format A data frame with 4,000 rows and 4 variables: #' \describe{ #' \item{id}{Index of each infected individual} #' \item{date}{Date that the disease was r...
480
mit
c396b3a5ea71871604046ea7714817900825ce42
ArunChauhan/cxxr
src/extra/testr/filtered-test-suite/operators/tc_operators_150.R
expected <- eval(parse(text="structure(c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
3,935
gpl-2.0
1fcacea67008f38a044e55174f681d3f46665ea6
YzPaul3/h2o-3
h2o-r/tests/testdir_algos/glrm/runit_glrm_grid_iris.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.glrm.iris <- function() { Log.info("Importing iris_wheader.csv data...") irisH2O <- h2o.uploadFile(locate("smalldata/iris/iris_wheader.csv"), destination_frame = "irisH2O") print(summary(iris...
1,613
apache-2.0
1fcacea67008f38a044e55174f681d3f46665ea6
h2oai/h2o-dev
h2o-r/tests/testdir_algos/glrm/runit_glrm_grid_iris.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.glrm.iris <- function() { Log.info("Importing iris_wheader.csv data...") irisH2O <- h2o.uploadFile(locate("smalldata/iris/iris_wheader.csv"), destination_frame = "irisH2O") print(summary(iris...
1,613
apache-2.0
1fcacea67008f38a044e55174f681d3f46665ea6
spennihana/h2o-3
h2o-r/tests/testdir_algos/glrm/runit_glrm_grid_iris.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.glrm.iris <- function() { Log.info("Importing iris_wheader.csv data...") irisH2O <- h2o.uploadFile(locate("smalldata/iris/iris_wheader.csv"), destination_frame = "irisH2O") print(summary(iris...
1,613
apache-2.0
b9d833c097dfba9cd55866ecc157dd3d500c466b
debarros/RScantron
StoreItemResponses.R
#Store Item Responses #' @title Store Item Responses #' @description Store item response files downloaded from the TMS #' @param responses output from GetItemResponses_1section #' @param testpath file folder path corresponding to the desired test #' @param classname character of length 1 holding the name of the sectio...
1,622
gpl-2.0
59a00b63a466b9288d50d5f1abd14bddd061d551
anqif/cvxr
R/variable.R
#' #' The Variable class. #' #' This class represents an optimization variable. #' #' @slot id (Internal) A unique identification number used internally. #' @slot rows The number of rows in the variable. #' @slot cols The number of columns in the variable. #' @slot name (Optional) A character string representing the na...
16,425
apache-2.0
c396b3a5ea71871604046ea7714817900825ce42
krlmlr/cxxr
src/extra/testr/filtered-test-suite/operators/tc_operators_150.R
expected <- eval(parse(text="structure(c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
3,935
gpl-2.0
c396b3a5ea71871604046ea7714817900825ce42
kmillar/cxxr
src/extra/testr/filtered-test-suite/operators/tc_operators_150.R
expected <- eval(parse(text="structure(c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
3,935
gpl-2.0
1fcacea67008f38a044e55174f681d3f46665ea6
h2oai/h2o-3
h2o-r/tests/testdir_algos/glrm/runit_glrm_grid_iris.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.glrm.iris <- function() { Log.info("Importing iris_wheader.csv data...") irisH2O <- h2o.uploadFile(locate("smalldata/iris/iris_wheader.csv"), destination_frame = "irisH2O") print(summary(iris...
1,613
apache-2.0
1fcacea67008f38a044e55174f681d3f46665ea6
michalkurka/h2o-3
h2o-r/tests/testdir_algos/glrm/runit_glrm_grid_iris.R
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.glrm.iris <- function() { Log.info("Importing iris_wheader.csv data...") irisH2O <- h2o.uploadFile(locate("smalldata/iris/iris_wheader.csv"), destination_frame = "irisH2O") print(summary(iris...
1,613
apache-2.0
c396b3a5ea71871604046ea7714817900825ce42
kmillar/rho
src/extra/testr/filtered-test-suite/operators/tc_operators_150.R
expected <- eval(parse(text="structure(c(FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, FALSE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE...
3,935
gpl-2.0
55b739d9d262fe970329b3860aa060dcf12742de
joshgabriel/dft-crossfilter
CompleteApp/crossfilter_prec_app/birch_nls.R
library(minpack.lm) #library(plot3D) #library(plotly) # Load the minpack.lm package #library(webshot) #library(rsm) mydata = read.csv("Rdata.csv") # Read CSV data file x<-mydata$kpoints # Select the kpoints atom density V<-mydata$volume E<-mydata$energy init_data = read.csv("Rdata_init.csv") v0<...
1,664
mit
55b739d9d262fe970329b3860aa060dcf12742de
joshgabriel/dft-crossfilter
CompleteApp/prec_analysis/birch_nls.R
library(minpack.lm) #library(plot3D) #library(plotly) # Load the minpack.lm package #library(webshot) #library(rsm) mydata = read.csv("Rdata.csv") # Read CSV data file x<-mydata$kpoints # Select the kpoints atom density V<-mydata$volume E<-mydata$energy init_data = read.csv("Rdata_init.csv") v0<...
1,664
mit
f97ba6db3029b7def5ed7b7c1e471a9c175bb865
ding-lab/hotspot3d
lib/TGI/Mutpro/Main/HorizClustersLines.R
#!/usr/bin/env Rscript args = commandArgs(trailingOnly=TRUE) y = read.table(args[1], sep = "\t") z = read.table(args[2], sep = "\t") RD<-y[[2]] ID<-y[[1]] z[z$V1==z$V2,"V3"] = 0.1 # show singletons at RD=0.1 y0<-z[[1]] x0<-z[[3]] y1<-z[[2]]+1 x1<-z[[3]] Cluster<-z[[5]] # adjust plot height according to the num...
884
gpl-3.0
55b739d9d262fe970329b3860aa060dcf12742de
joshgabriel/dft-crossfilter
CompleteApp/birch_nls.R
library(minpack.lm) #library(plot3D) #library(plotly) # Load the minpack.lm package #library(webshot) #library(rsm) mydata = read.csv("Rdata.csv") # Read CSV data file x<-mydata$kpoints # Select the kpoints atom density V<-mydata$volume E<-mydata$energy init_data = read.csv("Rdata_init.csv") v0<...
1,664
mit
505bc10feb07c32e6d40fc173eed7236d88e1e52
wibeasley/readr
tests/testthat/test-read-builtin.R
test_that("read_builtin works", { skip_if(interactive()) # fails with unquoted symbol (like data(storms, package = "dplyr")) expect_error(read_builtin(storms, "dplyr")) # fails with error if the dataset namespace is not attached unloadNamespace("dplyr") expect_error( read_builtin("storms") ) # fail...
642
gpl-2.0
0ebe28400ebf8f253c6ad9a5c8b6b026875ab073
psathyrella/partis
packages/RPANDA/R/fit_bd.R
fit_bd <- function (phylo, tot_time, f.lamb, f.mu, lamb_par, mu_par, f=1, meth = "Nelder-Mead", cst.lamb=FALSE, cst.mu=FALSE, expo.lamb=FALSE, expo.mu=FALSE, fix.mu=FALSE, dt=0, cond="crown") { if (!inherits(phylo, "phylo")) stop("object \"phylo\" is not of class \"phylo...
2,173
gpl-3.0
66798dab48387ba9878c9e67a3c66586beeb5ae1
graalvm/fastr
com.oracle.truffle.r.pkgs/rJava/R/converter.R
# in: Java -> R .conv.in <- new.env(parent=emptyenv()) .conv.in$. <- FALSE # out: R -> Java .conv.out <- new.env(parent=emptyenv()) .conv.out$. <- FALSE # --- internal fns .convert.in <- function(jobj, verify.class=TRUE) { jcl <- if (verify.class) .jclass(jobj) else gsub("/",".",jobj@jclass) cv <- .conv.in[[jcl]...
1,003
gpl-2.0
5049bae298a609a0e6bb12436214476cffc23932
vinhqdang/my_mooc
MOOC-work/coursera/FINISHED/compdata-004 Computing for Data Analysis/Coursera-Computing-for-Data-Analysis-master/Week3/rankhospital.R
helper <- function(data, outcome, num){ rank <- data[, 2][order(outcome, data[, 2])[num]] rank } rankhospital <- function(state, outcome, num = "best") { ## Read outcome data ## Check that state and outcome are valid ## Return hospital name in that state with the given rank ## 30-day death rate data <- rea...
2,193
mit
50e826397d9e3f5e699fb9ec61887fe232cb9130
LeonardCohen/coding
r/plot_distribution.R
require(ggplot2) require(grid) # binomial distribution x1 <- 1:20 df1 <- data.frame(x = x1, y = dbinom(x1, 20, 0.5)) x2 <- 1:20 df2 <- data.frame(x = x2, y = dbinom(x2, 20, 0.7)) x3 <- 1:40 df3 <- data.frame(x = x3, y = dbinom(x3, 40, 0.5)) plot1 <- ggplot() + geom_point(data=df1,aes(x=x,y=y),stat = "identity", ...
771
gpl-2.0
40218c532f80bc1e95fa1c492e1de4d757c95d43
neerajsubhedar/R-scripts
Kaggle - Sberbank Russian Housing Market/Russian housing market/Russian Housing Market - xgboost - Project 16.R
## 5/14/2017 ## implementing xgboost ## using gblinear # Clear workspace and environment cat("\014") rm(list = ls()) #modify memory size options(java.parameters = "-Xmx10g" ) # Functions Missing <- function(input.data.frame){ col.name <- colnames(input.data.frame) list.input.nas <- lapply(lapply(input.data.fr...
6,398
gpl-3.0
67c47b31e6b318563833ed2533a86fa9974b942d
mharrod/Security
Security Intelligence/Sec EDA.R
setwd("~/Documents/Core /TELUS/security intelligence") pkg <- c("bitops", "ggplot2", "maps", "maptools", "sp", "maps", "grid", "car") new.pkg <- pkg[!(pkg %in% installed.packages())] if(length(new.pkg)){ install.packages(new.pkg) } library(bitops) ip2long <-function(ip){ ips<-unlist(strsplit(ip,'.', fix...
3,247
mit
a6bcc867eedf03dbddac3b303cdcb63bc2048c73
tarasane/h2o-3
h2o-r/tests/Utils/shared_javapredict_RF.R
heading("BEGIN TEST") check.rf <- function(conn) { heading("Uploading train data to H2O") iris_train.hex <- h2o.importFile(conn, train) heading("Creating DRF model in H2O") balance_classes <- if (exists("balance_classes")) balance_classes else FALSE iris.rf.h2o <- h2o.randomForest(x = x, y = y, training_fra...
4,228
apache-2.0
f16ba67d4dc6fcb4a0d8004bb6312d02a2ce08b6
mhahsler/rBLAST
R/AAA.R
####################################################################### # rBLAST - Interfaces to BLAST # Copyright (C) 2015 Michael Hahsler and Anurag Nagar # # 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...
1,210
gpl-3.0
a6bcc867eedf03dbddac3b303cdcb63bc2048c73
bospetersen/h2o-3
h2o-r/tests/Utils/shared_javapredict_RF.R
heading("BEGIN TEST") check.rf <- function(conn) { heading("Uploading train data to H2O") iris_train.hex <- h2o.importFile(conn, train) heading("Creating DRF model in H2O") balance_classes <- if (exists("balance_classes")) balance_classes else FALSE iris.rf.h2o <- h2o.randomForest(x = x, y = y, training_fra...
4,228
apache-2.0
068c40abc1618d2c4745e2543bd5f638cdbc1114
rlzijdeman/nlgis2
scripts/etl/R/cedar_meets_nlgis01.R
# File: cedar_meets_nlgis01.R # Author: richard.zijdeman@iisg.nl # Date: October 10, 2014 # Purpose: see whether you can retrieve data from CEDAR's SPARQLE endpoint and # plot them on map retrieved from NLGIS-2 API. # Note: DATA SHOULD NOT BE INTERPRETED SUBSTANTIVELY (for debugging purposes only) # Laste chan...
3,374
gpl-3.0
068c40abc1618d2c4745e2543bd5f638cdbc1114
rlzijdeman/nlgis2-1
scripts/etl/R/cedar_meets_nlgis01.R
# File: cedar_meets_nlgis01.R # Author: richard.zijdeman@iisg.nl # Date: October 10, 2014 # Purpose: see whether you can retrieve data from CEDAR's SPARQLE endpoint and # plot them on map retrieved from NLGIS-2 API. # Note: DATA SHOULD NOT BE INTERPRETED SUBSTANTIVELY (for debugging purposes only) # Laste chan...
3,374
gpl-3.0
068c40abc1618d2c4745e2543bd5f638cdbc1114
IISH/nlgis2
scripts/etl/R/cedar_meets_nlgis01.R
# File: cedar_meets_nlgis01.R # Author: richard.zijdeman@iisg.nl # Date: October 10, 2014 # Purpose: see whether you can retrieve data from CEDAR's SPARQLE endpoint and # plot them on map retrieved from NLGIS-2 API. # Note: DATA SHOULD NOT BE INTERPRETED SUBSTANTIVELY (for debugging purposes only) # Laste chan...
3,374
gpl-3.0
2f6e380e9c0775864e43da920b73e85aab67a538
jkarl/SamplingTools
Shiny/OptimalErrorRate/optimal_alpha.R
#Optimal alpha t-test R code version 1.1, updated for compatibility with R version 3.x. #Authored by Joe Mudge (questions or comments? contact: joe.mudge83@gmail.com). library(ggplot2) beta.t.test<-function (n1 = NULL, n2 = NULL, d = NULL, sig.level = 0.05, type = c("two.sample", "one.sample", "paired"),tails = c("tw...
6,836
mit
58058177ae44c09633215f19a4dba4bc661d3aac
wStockhausen/tcsamSurveyData
R/resampledSizeComps.calcEffN.R
#' #' @title Calculate and plot effective N from resampled size compositions #' #' @description Function to calculate and plot effective N from resampled size compositions. #' #' @param dfr - dataframe with resampled size compositions #' @param byFacs - vector of column names for factors other than YEAR and STRATUM #' ...
5,197
mit
2f6e380e9c0775864e43da920b73e85aab67a538
jkarl/LandscapeToolbox
Shiny_Tools/OptimalErrorRate/optimal_alpha.R
#Optimal alpha t-test R code version 1.1, updated for compatibility with R version 3.x. #Authored by Joe Mudge (questions or comments? contact: joe.mudge83@gmail.com). library(ggplot2) beta.t.test<-function (n1 = NULL, n2 = NULL, d = NULL, sig.level = 0.05, type = c("two.sample", "one.sample", "paired"),tails = c("tw...
6,836
cc0-1.0
c0778052c2d046536b2bf5f9ad54a82e09209d68
CompNet/MultiplexCentrality
data/HepatitusCVirus_Multiplex_Genetic/Dataset/conversion.R
library("igraph") folder <- "data/HepatitusCVirus_Multiplex_Genetic/" edge.file <- paste(folder,"Dataset/hepatitusC_genetic_multiplex.edges",sep="") edge.list <- as.matrix(read.table(edge.file)) node.file <- paste(folder,"Dataset/hepatitusC_genetic_nodes.txt",sep="") node.list <- as.matrix(read.table(node.file...
1,787
gpl-3.0
2f6e380e9c0775864e43da920b73e85aab67a538
jkarl/LandscapeToolbox
OptimalErrorRate/optimal_alpha.R
#Optimal alpha t-test R code version 1.1, updated for compatibility with R version 3.x. #Authored by Joe Mudge (questions or comments? contact: joe.mudge83@gmail.com). library(ggplot2) beta.t.test<-function (n1 = NULL, n2 = NULL, d = NULL, sig.level = 0.05, type = c("two.sample", "one.sample", "paired"),tails = c("tw...
6,836
cc0-1.0
de9b1977a166103dabd293e7fcad79b15b3595a6
IQSS/gentb-site
R/buffer_chart.R
# devtools::install_github('ramnathv/rCharts') library(rCharts) library(jsonlite) n1 <- rPlot(mpg ~ wt, data = mtcars, color = "gear", type = "point") data(iris) names(iris) = gsub('\\.', '', names(iris)) rPlot(SepalLength ~ SepalWidth | Species, data = iris, type = 'point', color = 'Species') n1 n1$addControls("x"...
2,733
agpl-3.0
d11ddce46c70cbb5e25b679c12516a00bb2ce3bf
vladovidiulupu/labs
course1/week4_ex4.R
data(ChickWeight) plot(ChickWeight$Time, ChickWeight$weight, col=ChickWeight$Diet) chick = reshape(ChickWeight,idvar=c("Chick","Diet"),timevar="Time",direction="wide") head(chick) chick = na.omit(chick) # We will focus on the chick weights on day 4 (check the column names of 'chick' and note the numbers). # How muc...
3,169
mit
16b4a7a58528ebb6ca3f35f95019a9de5cbcbb30
ktoddbrown/decomPower
synthetic_data/Server_runs/simulate_and_fit_uniform.R
.libPaths('/vega/stats/users/mk3971/rpackages/') library(rstan) set.seed(12345) num_rep <- 3 t_meas_all <- seq(1/360, 1, length.out = 200) t_cap_all <- head(t_meas_all, -1) + 0.85 * (tail(t_meas_all, -1) - head(t_meas_all, -1)) t_cap_all <- c(t_meas_all[1] - (t_meas_all[2] - t_cap_all[1]), t_cap_all) sm <- stan_model(...
1,096
mit
ed2aff3aac46002ab572bcc080cae6ba2a6fe8ea
gabriel-slima/nkmodel
R/calculateFitness.R
#' calculateFitness #' #' Given N, K and the statesDF, it calculates the average fitness of the organism #' #' @param N Number of traits #' @param K Number of other traits which have a fitness contribution of each gene or trait #' @param sp Species id #' @param organism Sequence of N 1s and 0s representing presence or ...
1,116
gpl-3.0
63ad5336f8c04465742251cf2f61665a2cae7513
Guus-H/thesis
Backwards_diversity_measures.R
#===== Backwards Divesity Measures ===== #sourcing dependencies source('functions/load packages.R') #Packages source('functions/backwards_diversity.R') source('functions/techdiv-techrel2.R') require(devtools) source_gist(4676064) #=====Acquiring data===== backCitOccur <- readRDS('data/RPbackCitOccur.Rds') # obtained ...
1,015
gpl-2.0
c1dfb952f12839f82f1eb21e8d0379dee8139aa6
mengqinxue/DBNorm
DBNorm_test.R
library(DBNorm) # load example data arrays loadData(0) DBdata1 <- genDistData(DArray1, 500) DBdata2 <- genDistData(DArray2, 500) DBdata3 <- genDistData(DArray3, 500) DBdata4 <- genDistData(DArray4, 500) # define distribution DBdata5 <- defineDist(Norm(mean=0, sd=1)) # visualising distribution datasets visDistData(D...
2,467
gpl-3.0
852a9b258bbdadb58a5e9a41cecb766bcd70eac6
selective-inference/R
tests/test_QP.R
library(selectiveInference) ### Test n = 80; p = 50 X = matrix(rnorm(n * p), n, p) Y = rnorm(n) lam = 2 soln1 = selectiveInference:::fit_randomized_lasso(X, Y, lam, 0, 0)$soln G = glmnet(X, Y, intercept=FALSE, standardize=FALSE) soln2 = coef(G, s=lam/n, exact=TRUE, x=X, y=Y)[-1] print(soln1) print(soln2) plot(soln1...
364
gpl-2.0
852a9b258bbdadb58a5e9a41cecb766bcd70eac6
jonathan-taylor/R-selective
tests/test_QP.R
library(selectiveInference) ### Test n = 80; p = 50 X = matrix(rnorm(n * p), n, p) Y = rnorm(n) lam = 2 soln1 = selectiveInference:::fit_randomized_lasso(X, Y, lam, 0, 0)$soln G = glmnet(X, Y, intercept=FALSE, standardize=FALSE) soln2 = coef(G, s=lam/n, exact=TRUE, x=X, y=Y)[-1] print(soln1) print(soln2) plot(soln1...
364
gpl-2.0