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
05cafc71f920690b5fd74d297307bd953d6fdd8f
ColumbusCollaboratory/electron-quick-start
R-Portable-Win/library/survival/doc/survival.R
### R code from vignette source 'survival.Rnw' ################################################### ### code chunk number 1: survival.Rnw:24-29 ################################################### options(continue=" ", width=60) options(SweaveHooks=list(fig=function() par(mar=c(4.1, 4.1, .3, 1.1)))) pdf.options(pointsi...
465
cc0-1.0
e07924bc0b0178727ccc8ff338a114ccd3fa24d0
robbyjo/assoctool
resources/data/assoctool/rlm.R
# Association analysis tool # Version: 0.1 # By: Roby Joehanes # # Copyright 2016-2017 Roby Joehanes # This file is distributed under the GNU General Public License version 3.0. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
2,190
gpl-3.0
3753249177cde5d6fa4f4360176d48cb4ec8a58a
burrm/lolcat
R/unitconversion.grain.to.milligram.R
#' Unit Conversion - Mass/Weight - Grain to Milligram #' #' Performs a conversion of weights from grains to milligrams. #' #' @param x Vector - Values in units of grains #' #' @return x, but converted to milligrams #' #' @references #' NIST. Handbook 133 - Checking the Net Contents of Packaged Goods - Appendix E -...
640
mit
fb6ea9c0f0941e9fd5e75486a78d23bc89bc7875
RafaelSdeSouza/JAGS_UNC
old_script_tests/R_script/Tdn/fixed_Fortran_vs_C.R
# He3dp analysis # # purpose: ARTIFICIAL DATA # # - 3 parameters are assumed: Er, gamma_d^2, gamma_n^2 [e1, gin, gout] # # - uses the function sfactorTdn_fast(obsx1[i], e1, gin, gout), which # is a C++ version of a Fortran code that includes Coulomb wave # function calculations; JAGS has been recompiled with this C...
3,350
gpl-3.0
fb6ea9c0f0941e9fd5e75486a78d23bc89bc7875
RafaelSdeSouza/JAGS_UNC
old_script_tests/Tdn copy/fixed_Fortran_vs_C.R
# He3dp analysis # # purpose: ARTIFICIAL DATA # # - 3 parameters are assumed: Er, gamma_d^2, gamma_n^2 [e1, gin, gout] # # - uses the function sfactorTdn_fast(obsx1[i], e1, gin, gout), which # is a C++ version of a Fortran code that includes Coulomb wave # function calculations; JAGS has been recompiled with this C...
3,350
gpl-3.0
a6c17458bb7f6714739b4730087c2f66a22e0f5b
jarad/stat330
homework/hw11/problem4.R
set.seed(20141210) n = 20 x = rnorm(n) y = rnorm(n, x) write.csv(data.frame(x=x,y=y), file="problem4.csv", row.names=FALSE) d = read.csv("problem4.csv") (m = lm(y~x, d)) summary(m)
182
gpl-2.0
b0254e1239af53044feb3b676c3496c7f810af37
cran/GeneNT
R/tdclust.R
tdclust <- function(p) { C <- cor(t(dat)) diag(C) <- 0 D <- (1-abs(C))^p diag(D) <- 0 write.table(D, sep = "\t", file = "D.tsv") d <- as.dist(D) obj <- hclust(d) plot(obj, label = FALSE, hang = 0, main = "Traditional clustering", sub = "", xlab = "" ) }
291
gpl-2.0
a186f6897170cf221917fc0c87a3768be25790af
Vongo/anna
src/neoServer/disconnect.R
function() { CONNECT_DIR = "../../neoServer" PYTHON_CONNECT_PATH = paste(CONNECT_DIR,"/connect.py",sep="") require(rPython) python.load(PYTHON_CONNECT_PATH) ans <- python.call("disconnect") }
197
gpl-2.0
25d1258b1fa259457cd5c7e6c70c6f91233618ec
adimil/PASIFIC
RFprediction.R
require(randomForest) || install.packages("randomForest", repos="http://cran.r-project.org") # load the random forest load("rf13-3.RData") # get out filename file <- commandArgs(trailingOnly = TRUE)[1] # load user's data userdata = read.delim(file, header = FALSE, sep="\t", col.names = c("ID", "seq", ...
2,110
mit
a5a1ae9071dc609243ad42243ff0cdb2dea76f5c
bedatadriven/renjin
test-packages/s4test/tests/test.s4.local3.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,868
gpl-2.0
c8820d52602db544673050a41f1085fd38def148
fukatani/rgf_python
R-package/tests/testthat/helper-init.R
# prefer Python 3 if available [ see: https://github.com/rstudio/reticulate/blob/master/tests/testthat/helper-init.R ] if (!reticulate::py_available(initialize = FALSE) && is.na(Sys.getenv("RETICULATE_PYTHON", unset = NA))) { python <- Sys.which("python3") if (nzchar(python)) reticulate::use_python(python...
341
gpl-3.0
69d66a74b94ee4cce93ac063483d6c439992cd30
pnnl/uq
fea-uq/Multi_Chain/BSSANOVA_calibration_Multi.R
#################################################################################### ######################### Sorbent Emulation MCMC ################################### #################################################################################### ############################### ##### Utility Functions ###...
108,480
apache-2.0
fdb0b0e5828a033a0b6bd8513017492215c340e2
ColumbusCollaboratory/electron-quick-start
R-Portable-Mac/library/Rcpp/unitTests/runit.Vector.R
#!/usr/bin/env r # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois # # This file is part of Rcpp. # # Rcpp is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
24,913
cc0-1.0
31564654c15a74571b02cc4c63bfd3be90cd86c8
ISRICWorldSoil/GSIF_tutorials
SoilGrids1km/SoilGrids_examples.R
## Example of how to aggregate values from SoilGrids to 0--20 cm depths ## prepared by: T. Hengl (tom.hengl@wur.nl) ## requested by: Badza, Taruvinga <taruvinga.badza@wur.nl> and Schut, Tom <tom.schut@wur.nl> library(rgdal) library(XML) library(sp) ## We focus on Rwanda wg.url <- url("http://gsif.isric.org/lib/exe/f...
3,461
gpl-2.0
fdb0b0e5828a033a0b6bd8513017492215c340e2
mycpp/mycpp.github.io
packrat/lib/x86_64-w64-mingw32/3.3.2/Rcpp/unitTests/runit.Vector.R
#!/usr/bin/env r # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois # # This file is part of Rcpp. # # Rcpp is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
24,913
cc0-1.0
31564654c15a74571b02cc4c63bfd3be90cd86c8
thengl/GSIF_tutorials
SoilGrids1km/SoilGrids_examples.R
## Example of how to aggregate values from SoilGrids to 0--20 cm depths ## prepared by: T. Hengl (tom.hengl@wur.nl) ## requested by: Badza, Taruvinga <taruvinga.badza@wur.nl> and Schut, Tom <tom.schut@wur.nl> library(rgdal) library(XML) library(sp) ## We focus on Rwanda wg.url <- url("http://gsif.isric.org/lib/exe/f...
3,461
gpl-2.0
fdb0b0e5828a033a0b6bd8513017492215c340e2
UCL-BLIC/legion-buildscripts
cytofpipe/v1.2/Rlibs/Rcpp/unitTests/runit.Vector.R
#!/usr/bin/env r # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois # # This file is part of Rcpp. # # Rcpp is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
24,913
mit
171db1f59b51fd500ca51b26bceea4a438d36fba
McIntyre-Lab/papers
dalton_2013/r_programs/wiggleplot_functions.R
#=============================================================================== # # FILE: wiggleplot_functions.R # # USAGE: Called from another R script # # DESCRIPTION: A set of functions used to create R based wiggle plots. # # AUTHOR: Justin Fear (JMF), jfear@ufl.edu # INSTITUTION...
9,003
lgpl-3.0
fdb0b0e5828a033a0b6bd8513017492215c340e2
nathan-russell/Rcpp
inst/unitTests/runit.Vector.R
#!/usr/bin/env r # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois # # This file is part of Rcpp. # # Rcpp is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
24,913
gpl-2.0
7c5f1bf743c5bb7bb716dbdcf58c5452c760da05
JoeyBernhardt/OA-meta
R/00_data_prep_growth.R
library(dplyr) library(tidyr) library(readr) library(janitor) growth <- read_csv("data-raw/growth.csv") ## now onto interactive effects gro1 <- growth %>% clean_names() gro <- gro1 %>% # # filter(author == "Pansch") %>% # filter(unit != "dry weight - Tjarno (mg)") %>% # filter(unit != "size- Kiel (mm...
3,764
mit
fdb0b0e5828a033a0b6bd8513017492215c340e2
bccpp/bccpp.github.io
packrat/lib/x86_64-w64-mingw32/3.3.2/Rcpp/unitTests/runit.Vector.R
#!/usr/bin/env r # hey emacs, please make this use -*- tab-width: 4 -*- # # Copyright (C) 2010 - 2015 Dirk Eddelbuettel and Romain Francois # # This file is part of Rcpp. # # Rcpp is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
24,913
apache-2.0
7730a1f0666988b792ea3722147ac90e6b384e7d
ColumbusCollaboratory/electron-quick-start
R-Portable-Win/library/parallel/doc/parallel.R
### R code from vignette source 'parallel.Rnw' ################################################### ### code chunk number 1: Ecuyer-ex (eval = FALSE) ################################################### ## RNGkind("L'Ecuyer-CMRG") ## set.seed(2002) # something ## M <- 16 ## start M workers ## s <- .Random.seed ...
11,838
cc0-1.0
ab2d0bcfff02963cd2231b2fedfd9675e8ca0738
pedlefsen/hiv-founder-id
ReportTimingsAndMultiplicityResults_CreateOtherOutputs.R
source( "ReportTimingsAndMultiplicityResults_safetosource.R" ); ############# # CONFIGURATION ############ timings.include.methods <- c( "glm" ); # c( "glm", "step", "lasso" ) timings.include.training.codes <- c( "RT", "Rt", "rT", "rt" ); ismultiple.show.heatmap = FALSE; if( ismultiple.show.heatmap ) { ismultip...
1,398
mit
85dae908a4102ddd393b2d9f5791ed1b19ffcc1e
jrounds/rbokeh
R/bokeh_render_json.R
#' Plot a Bokeh JSON specification #' #' Take a path to a Bokeh JSON plot specification file and render it in the browser. #' #' @note This is mainly useful for development / debugging purposes for reading in json created from another platform like Python, or to be used with tweaking json output from \code{\link{print_...
1,276
mit
63ff31bda725d0fe815c4900ff8e2c15d086c02a
krlmlr/cxxr
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
jimhester/r-source
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
kmillar/rho
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
85dae908a4102ddd393b2d9f5791ed1b19ffcc1e
sinhrks/rbokeh
R/bokeh_render_json.R
#' Plot a Bokeh JSON specification #' #' Take a path to a Bokeh JSON plot specification file and render it in the browser. #' #' @note This is mainly useful for development / debugging purposes for reading in json created from another platform like Python, or to be used with tweaking json output from \code{\link{print_...
1,276
mit
63ff31bda725d0fe815c4900ff8e2c15d086c02a
cxxr-devel/cxxr
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
Mouseomics/R
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
rho-devel/rho
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
MouseGenomics/R
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
872fc72663d15aff6f4a9b84ce5359e6603780a9
USGS-R/mda.streams
R/modernize_metab_model.R
#' Update a metabolism model from SB to meet current formatting requirements #' #' Known changes since first models include: #' #' (1) config was the entire info slot, now is an element named config in a list #' that is the info slot. #' #' (2) config df has more columns now; old columns have not changed names or #...
5,309
cc0-1.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
SurajGupta/r-source
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
LeifAndersen/R
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
WelkinGuan/r-source
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
mathematicalcoffee/r-source
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
678e612982d7125d4a27e085a4718bf5c97d9678
JoshuaZe/restopicer
restopicer-SCaaS/restopicerRESTful/R/SummaryValueEvaluator.R
topicEntropySummaryEval <- function(z){ -sum(z*log(z)) }
58
mit
872fc72663d15aff6f4a9b84ce5359e6603780a9
aappling-usgs/mda.streams
R/modernize_metab_model.R
#' Update a metabolism model from SB to meet current formatting requirements #' #' Known changes since first models include: #' #' (1) config was the entire info slot, now is an element named config in a list #' that is the info slot. #' #' (2) config df has more columns now; old columns have not changed names or #...
5,309
cc0-1.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
andy-thomason/r-source
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
abiyug/r-source
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
ArunChauhan/cxxr
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
RevolutionAnalytics/RRO
R-src/src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
kmillar/cxxr
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
6820eed730728c6b550a2d7df95e20c1620020cf
annat22/publicationsDataRcode
intMorphDiv_Artio_AmNat/protocol-MdivII.R
### R Protocol reproducing analyses from ### Haber (2015) "The role of intrinsic constraints in the diversification of ruminants" ############################################################################################ ####### PART 1: GENERATING ILMD VCV MATRICES AND SPECIES MEANS from the A_NkmSym dataset requi...
29,709
gpl-2.0
63ff31bda725d0fe815c4900ff8e2c15d086c02a
nathan-russell/r-source
src/library/stats/R/reshape.R
# File src/library/stats/R/reshape.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2013 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...
10,735
gpl-2.0
85dae908a4102ddd393b2d9f5791ed1b19ffcc1e
paultcochrane/rbokeh
R/bokeh_render_json.R
#' Plot a Bokeh JSON specification #' #' Take a path to a Bokeh JSON plot specification file and render it in the browser. #' #' @note This is mainly useful for development / debugging purposes for reading in json created from another platform like Python, or to be used with tweaking json output from \code{\link{print_...
1,276
mit
382384924f7b1b67a963a8c849fa6e9cdd958a08
MLDGR/Kaggle_HomesiteQuoteConversion
R/H2O/H2O_RF_V2.1.R
library(readr) library(h2o) MinNumber=148 source("ReduccionVariables_Ismael.R") h2o.shutdown( promp = F) localH2O = h2o.init(nthreads = -1) cat("reading the train and test data\n") train <- read_csv("train.csv") test <- read_csv("test.csv") # There are some NAs in the integer columns so conversion to zero train[is....
2,658
gpl-3.0
85dae908a4102ddd393b2d9f5791ed1b19ffcc1e
timelyportfolio/rBokeh
R/bokeh_render_json.R
#' Plot a Bokeh JSON specification #' #' Take a path to a Bokeh JSON plot specification file and render it in the browser. #' #' @note This is mainly useful for development / debugging purposes for reading in json created from another platform like Python, or to be used with tweaking json output from \code{\link{print_...
1,276
mit
de744c90fbfb042d4ab6f2b00417f409ae43844b
andrewdefries/andrewdefries.github.io
FDA_Pesticide_Glossary/6-methoxy-2-pyridyl(.R
library("knitr") library("rgl") #knit("6-methoxy-2-pyridyl(.Rmd") #markdownToHTML('6-methoxy-2-pyridyl(.md', '6-methoxy-2-pyridyl(.html', options=c("use_xhml")) #system("pandoc -s 6-methoxy-2-pyridyl(.html -o 6-methoxy-2-pyridyl(.pdf") knit2html('6-methoxy-2-pyridyl(.Rmd')
276
mit
810c56cd194122557cd77dec3e55b58ecf50f39a
fredfeng/MorpheusData
R15.R
# making table data sets library(dplyr) library(tidyr) library(MorpheusData) #############benchmark 1 #dat <- data.frame(Timepoint=c(0L, 7L, 14L), Group1=c(50L, 60L, 66L), # Error1_Group1=c(3, 4, 6), Group2=c(30L, 60L, 90L), # Error2_Group1=c(10L, 14L, 16L)) dat <- data.frame(Timepo...
1,482
cc0-1.0
de9f1d8192b4f635bc4e2ff2acb498b00a9abcb1
burrm/lolcat
R/unitconversion.degree.fahrenheit.to.degree.celsius.R
#' Unit Conversion - Temperature - Fahrenheit to Celsius #' #' Performs a conversion of temperature from Fahrenheit to Celsius. #' #' @param x Vector - Values in units of degrees Fahrenheit. #' #' @return x, but converted to degrees Celsius #' #' @references #' NIST. Handbook 133 - Checking the Net Contents of Pack...
722
mit
859d1663b7cc30399d45aa9f69dd92a9379c163f
nevillejackson/dmm
dmm/R/unfactor.R
unfactor <- function(x){ # unfactor() - convert vector x from factor to numeric # non numeric values will coerce to NA if(!is.factor(x)){ stop("unfactor: argument x must be a factor:\n") } y <- as.numeric(as.character(x)) return(y) }
259
gpl-3.0
aea568351a22ea37fef02b824b64f0fe665300ca
richarddmorey/jpower
jpower/R/ttestps.b.R
ttestPSClass <- if (requireNamespace('jmvcore')) R6::R6Class( "ttestPSClass", inherit = ttestPSBase, private = list( #### Member variables ---- probs_es = NULL, type = "paired", #### Init + run functions ---- .init = function() { private$.initPowerTab()...
28,127
gpl-3.0
3776d85c30e21f3526fbb62906b3364d4f163fb3
aalbrechtsen/relate
R/ld.snp3.R
ld.snp3 <- function(snpdata, back=100){ nams <- colnames(snpdata) snp<-dim(snpdata)[2] d<-as.integer(snpdata) d[is.na(d)]<-0 d<-as.integer(d) snpdata<-matrix(d,ncol=snp) if(is.null(nams)) colnames(snpdata)<-paste("snp",1:dim(snpdata)[2],sep="") else colnames(snpdata) <- nams ans <- .Call("s...
377
gpl-3.0
9c076e405cc99513140bbb7db98d6828c35d9174
chavli/Coursera-ML-DataScience
RProgramming/Week3/Assignment2/cachematrix.R
## ## 2014-08-22 ## Two matrix functions that demonstrate the value caching functionality of R. The first ## function creates "cachedMatrix" and the second function returns the inverse of the ## cached matrix. ## ## Creates a cached matrix given a standard R matrix. the cached matrix keeps track ## of its inverse val...
1,518
gpl-2.0
b7f1549ec1d6d97392eeae46cedad585a7845dbc
geo047/WMAM
MyPackage/ShinyApp/thisworks.R
## Shiny GUI for Eagle ## Developer: Andrew W. George ## Version: 1.2.0 rootdir <- c('Home' = Sys.getenv("HOME")) if(.Platform$OS.type == "windows") { rootdir <- c('Home' = paste0(rootdir, "\\..\\")) } ##--------------------------- ## Analyse Page Functions ##~~~~~~~~~~~~~~~~~~~~~~~~~~ bannerAnal <- func...
85,756
gpl-2.0
e304697dbee9d89720175d934ebf904b065cceb2
landmarkacoustics/SoundPoints-R
R/collect.absolute.energy.R
collect.absolute.energy <- function(spk, desired.sum){ total <- max(spk); N <- length(spk); lo <- hi <- match(total, spk)[1]; while(total < desired.sum){ action.case <- switch(1 + 2 * (is.na(lo) || lo < 2 || spk[lo - 1] < 0) + (is.na(hi) || is.na(spk[hi+1]) || ...
891
gpl-2.0
728190f4e25cac350b60af4f039173377b9fcb1b
hpssjellis/forth-tensorflow
r-examples/r04.R
demo(scoping)
15
mit
728190f4e25cac350b60af4f039173377b9fcb1b
hpssjellis/tensorflow-udacity-deep-learning
r-examples/r04.R
demo(scoping)
15
mit
f9979042e322b71f6cc9c85d718d2c82063dad57
johngarvin/R-2.1.1rcc
src/library/graphics/R/polygon.R
### polyhatch - a pure R implementation of polygon hatching ### Copyright (C) 2001 by Kevin Buhr <buhr@stat.wisc.edu> ### Provided to the R project for release under GPL. ### Original nice clean structure destroyed by Ross Ihaka polygon <- function(x, y = NULL, density = NULL, angle = 45, border = NULL, ...
9,142
gpl-2.0
af0464f003c78934b81022cc6f40a3f12e12bf25
streampulse/model
ancillary/pipeline/pipeline_gapfill.R
library(StreamPULSE) library(dplyr) #prepare for debug gapfill site_code = 'AZ_OC'; start_date = '2018-06-01'; end_date = '2018-07-01' sp_data = request_data(sitecode=site_code, startdate=start_date, enddate=end_date) sp_data_prepped = prep_metabolism(d=sp_data, type='bayes', model='streamMetabolizer') sp_data...
3,381
mit
ff6f1ca8fe603fb4b8938e9547a0159e52d0cbbc
yanyachen/MLmetrics
R/Count.R
#' @title Poisson Log loss #' #' @description #' Compute the log loss/cross-entropy loss. #' #' @param y_pred Predicted labels vector, as returned by a model #' @param y_true Ground truth (correct) labels vector #' @return Log loss/Cross-Entropy Loss #' @examples #' d_AD <- data.frame(treatment = gl(3,3), outcome = gl(...
1,893
gpl-2.0
66f36ff6987b6ca2a2faa6512deff6cf776712b1
johngarvin/R-2.1.1rcc
src/library/utils/R/data.R
data <- function(..., list = character(0), package = NULL, lib.loc = NULL, verbose = getOption("verbose"), envir = .GlobalEnv) { fileExt <- function(x) sub(".*\\.", "", x) names <- c(as.character(substitute(list(...))[-1]), list) ## Find the directories of the given packages and maybe the working...
6,976
gpl-2.0
f98ffa8181429137da40fa0858cc29b1e2b0b0be
jhmigueles/GGIR
R/chartime2iso8601.R
chartime2iso8601 = function(x,tz){ POStime = as.POSIXlt(as.numeric(as.POSIXlt(x,tz)),origin="1970-1-1",tz) POStimeISO = strftime(POStime,format="%Y-%m-%dT%H:%M:%S%z") return(POStimeISO) }
195
lgpl-3.0
f98ffa8181429137da40fa0858cc29b1e2b0b0be
fjbaron/GGIR
R/chartime2iso8601.R
chartime2iso8601 = function(x,tz){ POStime = as.POSIXlt(as.numeric(as.POSIXlt(x,tz)),origin="1970-1-1",tz) POStimeISO = strftime(POStime,format="%Y-%m-%dT%H:%M:%S%z") return(POStimeISO) }
195
lgpl-3.0
f98ffa8181429137da40fa0858cc29b1e2b0b0be
ucl-cls/mcs-acc
R/chartime2iso8601.R
chartime2iso8601 = function(x,tz){ POStime = as.POSIXlt(as.numeric(as.POSIXlt(x,tz)),origin="1970-1-1",tz) POStimeISO = strftime(POStime,format="%Y-%m-%dT%H:%M:%S%z") return(POStimeISO) }
195
lgpl-3.0
000e47ba00863fa12cec27e8aa1fdaecb1e6c58c
philliplab/hdsResistanceModel
R/scenario_treatment_ui.R
#' Constructs the treatment part of the ui from a scenario #' #' @param scenario The scenario to produce the ui from #' @export treatment_ui_from_scenario <- function(scenario){ treatment_ui <- NULL i <- 0 for (treatment in scenario$treatments){ i <- i + 1 treatment_ui <- c(treatment_ui, numericIn...
782
gpl-2.0
71d4b98a9d1dd371a1cd132377e420ea9200a1a4
thuehn/RegMon
analysis_scripts/plot_traces/RegMon-validation.R
#notwendige Bibliotheken laden require(ggplot2) require(plyr) library(reshape2) #Arbeitspfad setzen setwd("/Users/bluse/Desktop/trace_rigaer11.07.12/RegMon_validation/test-RegMon-sampling-accuracy-ath5k-Asus/datamining") ...
5,704
gpl-2.0
d65fdefad5dab7cb02f6f76325877fec74f28ae5
kbrannan/ODEQ-Bacteria-Model-R
R_scripts/sub-models/Wildlife-Elk/Wildlife_Elk_Sub_Model_calculation_check-subwtsd-10.R
## step bt step calculation check for wildlife_elk_sub_model using input from ## wildlifeelk10.txt file chr.wildlife.elk.dir <- "M:/Models/Bacteria/HSPF/ODEQ-Bacteria-Model-R/R_scripts/sub-models/wildlife-elk" chr.input <- "wildlifeelk10.txt" source(paste0(chr.wildlife.elk.dir,"/Wildlife_Elk_Sub_Model.R")) df.output <-...
41,641
gpl-2.0
f774c5bdd279eecc3589da04fe7efd2ae589042e
aappling-usgs/mda.streams
R/post_styx_site.R
#' Create a styx site and post a list of timeseries files to it #' #' This function is easiest to use when applied to the output of #' \code{\link{stage_styx_site}}. #' #' @param file_list a list of files as given by stage_styx_site. The site name #' will be determined from the first item (a metadata vector) in t...
1,621
cc0-1.0
74e34c198b56dc812f02c32319ca8c62383df4e6
gatoravi/GenVisR
R/comparemysamples.R
#' Compare the identities of multiple samples #' #' Given the bam file path, count the number of reads at the 24 SNP locations #' @name comparemysamples #' @param x data frame with column names sample_name, bamfile #' @param genome Object of class BSgenome specifying the genome #' @return grid object #' @export comp...
730
cc0-1.0
f774c5bdd279eecc3589da04fe7efd2ae589042e
jread-usgs/mda.streams
R/post_styx_site.R
#' Create a styx site and post a list of timeseries files to it #' #' This function is easiest to use when applied to the output of #' \code{\link{stage_styx_site}}. #' #' @param file_list a list of files as given by stage_styx_site. The site name #' will be determined from the first item (a metadata vector) in t...
1,621
cc0-1.0
ef46634b10c63d109221e47ada8ee3b249142d4f
joseflaviojr/transcriptograma
Qualidade.R
# # Copyright (C) 2016 José Flávio de Souza Dias Júnior # # This file is part of Transcriptograma - <http://www.joseflavio.com/transcriptograma/>. # # Transcriptograma is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Fr...
13,935
lgpl-3.0
f774c5bdd279eecc3589da04fe7efd2ae589042e
USGS-R/mda.streams
R/post_styx_site.R
#' Create a styx site and post a list of timeseries files to it #' #' This function is easiest to use when applied to the output of #' \code{\link{stage_styx_site}}. #' #' @param file_list a list of files as given by stage_styx_site. The site name #' will be determined from the first item (a metadata vector) in t...
1,621
cc0-1.0
74e34c198b56dc812f02c32319ca8c62383df4e6
hjanime/GenVisR
R/comparemysamples.R
#' Compare the identities of multiple samples #' #' Given the bam file path, count the number of reads at the 24 SNP locations #' @name comparemysamples #' @param x data frame with column names sample_name, bamfile #' @param genome Object of class BSgenome specifying the genome #' @return grid object #' @export comp...
730
cc0-1.0
e8d040ee5e86c1a5797220ccca1f405ca4bfb9f4
maddieka/schev
pulaski/complete_sch_boundaries.R
# school boundary shapefile is missing several school districts... # 1/17/2018 setwd("~/Google Drive/SCHEV (Peter Blake - Wendy Kang)") library(tmaptools) library(stringr) library(sp) library(ggplot2) library(plyr) library(dplyr) library(rgeos) library("rgdal") boundaries <- read_shape("Data/School Attendance Bounda...
16,514
mit
765fd242e1b44af9f93cccc0023fd635d77e617f
mcnis003/image-analysis
old_versions/seed_color_r_v06.R
#begin redme #this r script is intended to collect, manage,and analyze the data produced by the imagej script #seed_color_imagej_v9, it produces an output file that provides a description of each seed analyzed #in a single table #the sections of this script are: #1. set working directory and load libraries #2. create...
4,342
mit
1d4e5e01620ea51d77d1c7b7a94f6788e1024675
ecomets/saemix
keepsaemix/R/zzz.R
.onAttach <-function (lib, pkg) { packageStartupMessage(" Loading library saemix, version 2.0, September 2015\n please direct bugs, questions and feedback to emmanuelle.comets@inserm.fr\n") }
206
gpl-2.0
3a1a130981e9cdbab8cc8c239628d064e22aaa47
martinnj/CompanyProject2015
src/Report-FormulaComparison.R
#install.packages('randomForest'); install.packages('party'); install.packages('rattle'); install.packages('rpart.plot'); install.packages('RColorBrewer'); install.packages('curl'); library(devtools); install_github('krlmlr/kimisc'); install.packages('foreach'); library(rattle) library(rpart.plot) library(RColorBr...
1,677
mit
289b82f5e674dd197e7aa8e40366c4ee6eecc160
nhejazi/biotmle
tests/testthat.R
library(testthat) library(biotmle) test_check("biotmle")
58
mit
ead2b48ce7bc02d7a8dfd07385b5f8aa5d23c41e
ipmbook/first-edition
Rcode/c9/old_code/Monocarp Variance Dynamics new.R
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## Use the Monocarp IBM with individual variation in flowering intercept to illustrate evolutionary dynamics ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rm...
8,666
gpl-2.0
2828648292b778a6ec9bc6364925f59974fb75a6
gisma/perfectPeak
R/makePeak.R
#'@name makePeak #'@title Wrapper function that perform some morphometric Digital Elevation Model #'(DEM) analysis to generate a set of morphometric and in realreliable peaks #' #'@description #' Currently two different approaches are available. First a simple approach using a filtered #' DEM that is then analysed ...
14,894
apache-2.0
fd360d350bf4783f0c7e6d6f830471baf577db70
zhmz90/Daily
learn/R/Unit2/Unit2_Moneyball.R
# VIDEO 2 # Read in data baseball = read.csv("baseball.csv") str(baseball) # Subset to only include moneyball years moneyball = subset(baseball, Year < 2002) str(moneyball) # Compute Run Difference moneyball$RD = moneyball$RS - moneyball$RA str(moneyball) # Scatterplot to check for linear relationship plot(moneybal...
889
mit
305cb3b1cad1448a2e76462f963c380ccb4b327f
sammorris81/spatial-skew-t
code/analysis/ozone/US-all/us-all-33.R
source("./package_load.R", chdir = TRUE) setting <- 33 method <- "t" nknots <- 6 keep.knots <- FALSE threshold <- 0 tau.init <- 0.05 thresh.quant <- FALSE skew <- TRUE outputfile <- paste("results/us-all-", setting, ".RData", sep="") start <- proc.time() fit <- vector(mode="list", length=2) for(val in 1:2){ set.s...
1,378
gpl-2.0
84ef3ef0132597b8a13fd80f324e195e570b733a
wangxj03/dynsurv
R/misc.R
## ## R package dynsurv by Wenjie Wang, Ming-Hui Chen, Xiaojing Wang, and Jun Yan ## Copyright (C) 2011-2020 ## ## This file is part of the R package dynsurv. ## ## The R package dynsurv is free software: You can redistribute it and/or ## modify it under the terms of the GNU General Public License as published by ## th...
934
gpl-3.0
16a53c706c895a354a242ff2eaee997742551607
tjmahr/EdPsych964
lectures/HLM09_proximity_LDA_nlme.R
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: #:::::::::::::::: HLM longitudinal data analysis using nlme :::::::::::::::: #::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: library(nlme) # instead of lme4 to use correlation= & weights= in lme() and to fit "uns...
15,765
gpl-2.0
16e5e60f785137ada4be0c5f10185c909819bc68
privefl/mySO
field-RC-callSuper.R
parent <- setRefClass("parent", fields = list( test = function() 2 )) child <- setRefClass("child", contains = "parent", fields = list( test = function() .self$export("parent")$test + 1 ...
603
gpl-3.0
84ef3ef0132597b8a13fd80f324e195e570b733a
cran/dynsurv
R/misc.R
## ## R package dynsurv by Wenjie Wang, Ming-Hui Chen, Xiaojing Wang, and Jun Yan ## Copyright (C) 2011-2020 ## ## This file is part of the R package dynsurv. ## ## The R package dynsurv is free software: You can redistribute it and/or ## modify it under the terms of the GNU General Public License as published by ## th...
934
gpl-3.0
344be84720e9428393d365b3c56f7e783050559b
goujonpa/SY19TP7
display.R
# Paul GOUJON & Jo COLINA # UTC - SY19 - TP7 # Display functions disp = function(m, r, c, t="Image display") { I = matrix(m, r, c) I1 = apply(I,1,rev) image(t(I1), col=gray(0:255/255), main=t) }
208
mit
9e8997b5a4e4f8962d8635a8ff91cf96849b2b12
cxxr-devel/cxxr-svn-mirror
src/library/Recommended/MASS/R/lm.ridge.R
# file MASS/R/lm.ridge.R # copyright (C) 1994-2006 W. N. Venables and B. D. Ripley # # 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 version 2 or 3 of the License # (at your option). ...
3,009
gpl-2.0
c8995a43cabca4cc7e14e2872bd44cc47ccb81d8
reactorlabs/gnur
src/library/base/R/library.R
# File src/library/base/R/library.R # Part of the R package, https://www.R-project.org # # Copyright (C) 1995-2018 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 ...
41,129
gpl-2.0
d98041908eb4fc344865d3dd5837141e82528f4b
dmlc/xgboost
R-package/R/xgb.load.R
#' Load xgboost model from binary file #' #' Load xgboost model from the binary model file. #' #' @param modelfile the name of the binary input file. #' #' @details #' The input file is expected to contain a model saved in an xgboost model format #' using either \code{\link{xgb.save}} or \code{\link{cb.save.model}} in ...
1,871
apache-2.0
4636f842ce3c27bed2fcdb791ebafb844d76fe65
chartgerink/statcheckTEMP
R/PDFimport.R
# Inner function to read pdf: getPDF <- function(x) { txtfiles <- character(length(x)) for (i in 1:length(x)) { system(paste('pdftotext -q -enc "ASCII7" "',x[i],'"',sep="")) if (file.exists(gsub("\\.pdf","\\.txt",x[i]))) { #txtfiles[i] <- paste(scan(gsub(".pdf",".txt",x[i]),what="character",sep=...
6,666
gpl-2.0
b39649ad9b6d06ab0a774b257dfda8fd7f594c89
sauloal/cnidaria
scripts/R/jaccard.R
calc_dist <- function(x,y,cx,cy,v,dist_method) { j <- NA if ( dist_method == "jaccard" ) { j <- jaccard( x,y,cx,cy,v ) } else if ( dist_method == "cosine" ) { j <- cosine( x,y,cx,cy,v ) } else if ( dist_method == "tanimoto" ) { j <- tanimoto( x,y,cx,cy,v ) } else if ( ...
1,552
mit
2eef842184fbf6d45945108cce084559ba05d19a
SpaceVim/SpaceVim
bundle/nvim-treesitter/tests/indent/r/pipe.R
mtcars |> head( n = 6L ) |> subset( cyl > 3 )
62
gpl-3.0
e2a70923e1b302d61da6c9303f716d6cf9169aea
llattes/datasciencecoursera
GettingAndCleaning/Week4/quiz4.R
setwd("~/DataScience/datasciencecoursera/GettingAndCleaning/Week4") ?Sys.timezone # Question 1 - Quiz 4 download.file(url = "https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv", destfile = "q1.csv", method = "curl") read.csv(file = "q1.csv") q1df <- read.csv(file = "q1.csv") View(`q1df`) names(q1df) spl...
2,352
mit
e587aadbb3f2cfa3424b7f813b54971502a86eed
cran/rgl
R/axes.R
# This internal function returns a list with the following components: # xlim, ylim, zlim: the bounding box expanded so no coordinate has zero or negative extent # strut: a boolean indicating whether an expansion was done above # x, y, z: the box above expanded by a factor of expand .getRanges <- function(expand = ...
9,030
gpl-2.0
c5a4e106d9e861bbdcaac1588e56c33d567468e3
steve-the-bayesian/BOOM
Interfaces/R/bsts/R/date.functions.R
# Copyright 2011 Google LLC. All Rights Reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This li...
17,724
lgpl-2.1
607c18b0959b69d66c3177fbadfd1ec669b91911
tpetzoldt/growthrates
inst/doc/examples/example_easylinear.R
## ============================================================================= ## Determine growth rates with a heuristic linear method, similar to ## the method of Hall et al. 2013, doi:10.1093/molbev/mst197 ## ## Author: Thomas Petzoldt, TU Dresden ## License: GPL >= 2, https://www.gnu.org/licenses/ ## Ple...
1,191
gpl-2.0