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
5ca2f288ba2ae5ba7d7f59bb12791c9b79deb399
inbo/multimput
R/missing_at_random.R
#' Generate missing data at random #' #' The observed values will be either equal to the counts or missing. #' The probability of missing is the inverse of the counts + 1. #' #' @param dataset A dataset to a the observation with missing data. #' @param proportion The proportion of observations that will be missing. #' ...
862
gpl-3.0
b13f23d16bc6cde5bfd081bb75aee9d965bfe199
elahi/cupCorals
bael_IPM_fecundityTest.R
################################################# # Author: Robin Elahi # Date: 160315 # Testing the sensitivity of IPM results to variation in # Ea on x-intercept of fecundity function (which has # downstream effects on size at maturity, establishment probability) ################################################# #r...
4,361
mit
674c7a992a5c6c9042b7befb3ab68da1dc13ea69
C2SM/plotmap-2.3.7
R/contour.map.R
`contour.map` <- function(x,y,z,grid.type="lonlat",grid.pars=list(), lonlim,latlim, projection="",parameters=NULL,orientation=NULL, mapdat="world",xmaplim,ymaplim,thin.map=0, nlevels = 10, levels=pretty.contours(range(z,finite=TRUE), n=nlevels), col=par("fg"),lty=p...
5,366
gpl-2.0
2b71f2c006e2346724fa85f16297f983dfa26778
famuvie/breedR
tests/testthat/test-splines.R
context("Splines infrastructure") ######################## test_that("determine.n.knots works for atomic vectors", { test.length <- 100 sample.sizes <- seq(from = 7, by = 19, length = test.length) expect_that(length(breedR:::determine.n.knots(sample.sizes)), equals(test.length)) }) test_that("de...
1,269
gpl-3.0
2c9e913da436c53cf7cc9a0a8f4b0605ac153ab2
lehoangha/GSOE9712_S115_RA
packrat/lib/x86_64-pc-linux-gnu/3.2.1/XLConnect/unitTests/runit.workbook.isSheetVisible.R
############################################################################# # # XLConnect # Copyright (C) 2010-2013 Mirai Solutions GmbH # # 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...
2,167
apache-2.0
0734ee3cfc02a3c8ebc2d79a323263c5e642848b
florianm/shreadthatsheet
global.R
library(ckanr) library(lubridate) # source("setup_ckan_connection.R") #' Load a CSV from a URL, title case colnames and parse dates #' #' @param url The URL of a CSV file #' @param date_colnames The column names of date columns, default: #' 'LastUpdated', 'date', 'Date', date.start', 'date.end', 'year', 'Year' #' ...
1,482
mit
2d13108829f74b4f73fa23aabd6053ebb5a855b5
bedatadriven/renjin
packages/stats/tests/test.stats.fft.0fc2f51f7a42b2d9df25fb0d9dac9cdb.R
library(hamcrest) expected <- c(0x1.a4ecc1f250468p+5 + 0x1.740d87b57be44p-1i, -0x1.6f3df07aa3b26p+5 + -0x1.690cf13a2dc6cp-1i, 0x1.694b0247373d7p+5 + 0x1.5db1236588c38p-1i, -0x1.43f70a8d7a08ep+4 + -0x1.51fcfcd9080d7p-1i, 0x1.81d1dd2879887p+5 + 0x1.45f372881075ap-1i, -0x1.270e6161ac312p+5 + -0x1.39978ef8b3c37p-1i, 0...
17,223
gpl-2.0
2d13108829f74b4f73fa23aabd6053ebb5a855b5
jukiewiczm/renjin
packages/stats/src/test/R/test.stats.fft.0fc2f51f7a42b2d9df25fb0d9dac9cdb.R
library(hamcrest) expected <- c(0x1.a4ecc1f250468p+5 + 0x1.740d87b57be44p-1i, -0x1.6f3df07aa3b26p+5 + -0x1.690cf13a2dc6cp-1i, 0x1.694b0247373d7p+5 + 0x1.5db1236588c38p-1i, -0x1.43f70a8d7a08ep+4 + -0x1.51fcfcd9080d7p-1i, 0x1.81d1dd2879887p+5 + 0x1.45f372881075ap-1i, -0x1.270e6161ac312p+5 + -0x1.39978ef8b3c37p-1i, 0...
17,223
gpl-3.0
ca7e18a99ba95fa07342221024cfe0416246af6d
gaoyuanjun/SHINYstan
inst/SHINYstan/server_files/outputs/density_plot_reactive.R
# density_plot density_plot <- reactive({ if (input$param == "") { return() } customize <- input$dens_customize if (customize & is.null(input$dens_x_breaks)) { # delay until the customization inputs are ready return() } do.call(".param_dens", args = list( param = input$param, da...
803
mit
04431de0afe1ed8a0799270b3fd8f20ce284e195
jimmyy11/my_project
number_sum.R
number_sum <- function(number_vec, ratio = 2){ number_vec <- number_vec*ratio sum_vec <- sum(number_vec) return(sum_vec) }
128
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
sanuj/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
Ialong/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
122ac8c02961b5dea4635d01ca9219bb4f7dc6f8
jdyen/FREE
R/fitted.FREEfit.R
##' @method fitted FREEfit ##' @export fitted.FREEfit <- function(object, ...){ object$fitted }
98
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
curiousguy13/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
Saurabh7/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
mit
3c1565a5ca9ee8d22046fd497862cd518048954b
emoron/Data_Science_Riot
Bill_James_Estimators/James_Pythag.R
###The first section of code is used to gather the data from the Lahman database using a RMySQL connection. ###I left the code so anyone who doen't have R connected directly to the dbase can still see the ###required SQL code to gather the requried information. library(RMySQL) ##Connect to database. Username and pas...
2,353
gpl-2.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
ratschlab/ASP
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-2.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
youssef-emad/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
AzamYahya/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
jondo/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
elkingtonmcb/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
youprofit/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
cdawei/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
lukw00/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
pavel-odintsov/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
sperka/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
shangwuhencc/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
rcurtin/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
chenmoshushi/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
JingheZ/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
kostajaitachi/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
752f2ae459b50736a337d198107e065756a46d1f
jpritikin/OpenMx
R/MxRowObjective.R
# # Copyright 2007-2019 by the individuals mentioned in the source code history # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
1,958
apache-2.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
abhiatgithub/shogun-toolbox
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
5c7735809278dc90a2f92f6cfd4f647e8f368e00
arasuarun/shogun
examples/undocumented/r_static/distribution_hmm.R
library("sg") order <- 3 gap <- 0 reverse <- 'n' fm_train_dna <- as.matrix(read.table('../data/fm_train_dna.dat')) fm_train_cube <- as.matrix(read.table('../data/fm_train_cube.dat', colClasses=c('character'))) # HMM print('HMM') N <- 3 M <- 6 order <- 1 hmms <- c() liks <- c() dump <- sg('set_features', 'TRAIN', f...
609
gpl-3.0
dd0443fb0abd944fbe92635b5d09af89b2bb65c9
laurieKell/lh
R/lh-generics.R
#### SRR setGeneric('sv', function(model,params, ...) standardGeneric('sv')) setGeneric('ab', function(model,params, ...) standardGeneric('ab'))
150
gpl-2.0
e8ff3348199649308bf3b2b7fb60057ec5a5cb04
aol-statsols/rm-char-create
R/change_Skills_To_Increase_Each_Level.R
#' A HEIGHT AND WEIGHT FUNCTION #' #' FUNCTION TO CHOOSE WHICH SKILLS TO INCREASE EACH LEVEL UNTIL YOU HAVE <10 DP REMAINING (TO GIVE A BUFFER) #' @param skills.Increase.Record.DF A DATAFRAME CONTAINING WHICH SKILLS HAVE BEEN INCREASED AND HOW OFTEN. #' @param dev_Points.Total AN INTEGER WHICH IS HOW MANY DEV POINT...
8,042
gpl-2.0
568f892af3d60dc410aa880b0561847cfaaa74aa
USGS-R/WQ-Review
inst/shiny/WQReviewGUI/server_excelLink.R
# #Populate excel sheets xl.workbook.add() xl.sheet.add("DQI needs review") xlc$a1 = reports$unapprovedData xl.sheet.add("Ready for DQI change") xlc$a1 = data.frame(RECORD_NO = NA, SITE_NO = NA, STATION_NM = NA, SAMPLE_START_DT = NA, MEDI...
1,776
unlicense
ffb52708cefd9dc816a75f74c40d8ad2a07270ee
Miscanthus-Germination/Model_with_Interface
Model/ElipsWeb.R
########################################################################### euler <- function(alpha=0, beta=0, gamma=0){ Ra <- matrix(c(cos(alpha), sin(alpha), 0, -sin(alpha), cos(alpha), 0, 0, 0, 1), ncol=3, byrow=T) Rb <- matrix(c(1, 0, 0, 0, cos(beta), sin(beta), 0, -sin(b...
2,745
mit
f7c8e15a304fce50e1c90dcf7383c93f0e6e39a9
vervacity/ggr-project
R/plot.profile_heatmaps.not_stranded.R
#!/usr/bin/env Rscript # description: take in deeptools matrix and plot library(gplots) library(RColorBrewer) library(reshape2) library(grid) library(gridGraphics) library(gridExtra) # load GGR style guide load_style_guide <- system("which ggr_style_guide.R", intern=TRUE) source(load_style_guide) # args args <- com...
5,081
mit
977c109846fd4b65bf61559b6ec5ee0d0231e879
sammorris81/rare-binary
code/analysis/simstudy/sim-3.R
rm(list=ls()) source("./package_load.R", chdir = TRUE) # get the datasets load("./simdata.RData") # data setting and sets to include - written by bash script setting <- 3 # extract the relevant setting from simdata y <- simdata[[setting]]$y s <- simdata[[setting]]$s x <- simdata[[setting]]$x # extract info about si...
13,341
gpl-2.0
b86c8702bb0c067547364fd6bada7116f54f95d8
KellyChan/python-examples
python/data_science_de/Q4_1-plotting.R
setwd('path') library(ggplot2) library(scales) #-----------------------------------------------------------------------------# # Daily Visits data <- read.csv('outputs/stat/tables/holecount-Date.csv', header=TRUE) data$value <- as.Date(data$value) p <- ggplot(data=data, aes(x=value, y=freq, group=1)) + geom_line(...
1,752
mit
b86c8702bb0c067547364fd6bada7116f54f95d8
kwailamchan/programming-languages
python/data_science_de/Q4_1-plotting.R
setwd('path') library(ggplot2) library(scales) #-----------------------------------------------------------------------------# # Daily Visits data <- read.csv('outputs/stat/tables/holecount-Date.csv', header=TRUE) data$value <- as.Date(data$value) p <- ggplot(data=data, aes(x=value, y=freq, group=1)) + geom_line(...
1,752
mit
b86c8702bb0c067547364fd6bada7116f54f95d8
KellyChan/Python
python/data_science_de/Q4_1-plotting.R
setwd('path') library(ggplot2) library(scales) #-----------------------------------------------------------------------------# # Daily Visits data <- read.csv('outputs/stat/tables/holecount-Date.csv', header=TRUE) data$value <- as.Date(data$value) p <- ggplot(data=data, aes(x=value, y=freq, group=1)) + geom_line(...
1,752
mit
e6cb91ce42d8a09dc94ab57d69ee7d1ac001dbfd
cxxr-devel/cxxr-svn-mirror
src/library/base/R/attach.R
# File src/library/base/R/attach.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 ve...
9,643
gpl-2.0
e6cb91ce42d8a09dc94ab57d69ee7d1ac001dbfd
glycerine/bigbird
r-3.0.2/src/library/base/R/attach.R
# File src/library/base/R/attach.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 ve...
9,643
bsd-2-clause
528a0685744d47c826fcf4822b2dfb7583e109bf
PFgimenez/thesis
R-files/script_learn_BN.R
#!/usr/bin/Rscript { # Parameters : outfile header dataset1 dataset2 … args = commandArgs(trailingOnly=TRUE) if(length(args) < 4) { stop("Pas assez de paramètres ! Paramètres : outfile algo header dataset1 dataset2 ...") } fichier = args[1] algo = args[2] header = eval(parse(text=args[3])) # on ...
4,300
gpl-3.0
528a0685744d47c826fcf4822b2dfb7583e109bf
PFgimenez/PhD
R-files/script_learn_BN.R
#!/usr/bin/Rscript { # Parameters : outfile header dataset1 dataset2 … args = commandArgs(trailingOnly=TRUE) if(length(args) < 4) { stop("Pas assez de paramètres ! Paramètres : outfile algo header dataset1 dataset2 ...") } fichier = args[1] algo = args[2] header = eval(parse(text=args[3])) # on ...
4,300
gpl-3.0
a0d91784e07e0dbc122ed0fc1acb654a5e5f780a
adrHuerta/PISCO_Temp
examples/trends/stefan_case.R
library(xts) library(dplyr) library(data.table) rm(list = ls()) ### source codes source('./functions/tools_get_os.R') ############## if( get_os() == "windows" ) { load(file.path("G:","DATABASES","DATA","TEMPERATURE_OBSDATASET","databases","step06_QCDATA_05.RData")) ls() } else if ( get_...
1,725
gpl-3.0
a6ec996ad45421f9c5ec929cc2b924f58999bc92
kakaba2009/MachineLearning
r/R/zzz.R
loadModule("lnlp_module", TRUE) loadModule("block_lnlp_module", TRUE) loadModule("xmap_module", TRUE) .onAttach <- function(...) { if (!interactive()) return() intro_message <- paste("If you're new to the rEDM package, please check out the tutorial:", "> vignette(\"rEDM_tutorial...
380
apache-2.0
62e3d94b4484bb1a832c6c907468a23fb88ae348
jread-usgs/necsc-lake-modeling
scripts/datarelease_shapefile.R
library(rgdal) library(dplyr) m2ft <- 3.28084 gh_layer <- readOGR('hansen_et_al_lakes','hansen_et_al_lakes') categories <- read.csv('../climate-fish-habitat/cache/fetch/fish_dominance_categories_by_lake_medians.csv', stringsAsFactors = FALSE, header=TRUE) %>% rename(WBDY_WBIC=WBIC, early=X1989.2014, mid=X2040.2064, ...
2,313
cc0-1.0
8555899703e4cdedac2bc57e94991dd137e1a189
bomeara/sleq
R/GetCodonPhase.R
#' @title Determine the best codon phase and return amino acid sequence #' #' @name GetCodonPhase #' #' @description \code{GetCodonPhase} determines the best translated amino acid sequence from a consensus DNA alignment by identifying the codon phase that produces the fewest number of stop codons. \code{translate} fr...
3,710
gpl-2.0
1a7c4fcc98c229af3d4231291d8d96c168716fe3
droglenc/FSAmisc
R/TroutDietSL.R
#' @title Size and diet data for lake and bull trout from Swan Lake, Montana. #' #' @description Size (standard length, total length, and weight) and diet data (volume of three main prey categories) for Bull Trout (\emph{Salvelinus confluentus}) and Lake Trout (\emph{Salvelinus namaycush}) from Swan Lake, Montana, a la...
2,297
gpl-2.0
62e3d94b4484bb1a832c6c907468a23fb88ae348
lawinslow/necsc-lake-modeling
scripts/datarelease_shapefile.R
library(rgdal) library(dplyr) m2ft <- 3.28084 gh_layer <- readOGR('hansen_et_al_lakes','hansen_et_al_lakes') categories <- read.csv('../climate-fish-habitat/cache/fetch/fish_dominance_categories_by_lake_medians.csv', stringsAsFactors = FALSE, header=TRUE) %>% rename(WBDY_WBIC=WBIC, early=X1989.2014, mid=X2040.2064, ...
2,313
cc0-1.0
62e3d94b4484bb1a832c6c907468a23fb88ae348
USGS-R/necsc-lake-modeling
scripts/datarelease_shapefile.R
library(rgdal) library(dplyr) m2ft <- 3.28084 gh_layer <- readOGR('hansen_et_al_lakes','hansen_et_al_lakes') categories <- read.csv('../climate-fish-habitat/cache/fetch/fish_dominance_categories_by_lake_medians.csv', stringsAsFactors = FALSE, header=TRUE) %>% rename(WBDY_WBIC=WBIC, early=X1989.2014, mid=X2040.2064, ...
2,313
cc0-1.0
9cb7d94d67171aef9255c8ab12cc33f4565a692a
joshgabriel/dft-crossfilter
benchmark-view/ShinyApps/Numerical_Precs_Methods_Scripts/hennig_nls.R
#x11(width=1, height=1) # X11 Plot dimensions library(minpack.lm) # Load the minpack.lm package mydata = read.csv("Rdata.csv") # Read CSV data file x<-mydata$Kpts_atom # Select the kpoints atom density y<-mydata$P dy<-mydata$P_err # Select the ground state energy E0 l = len...
4,803
mit
118533d62a60d9fb26c540e9865fee75b8f3a675
gavinsimpson/analogue
R/dissimilarities.R
########################################################################### ## ## ## dissimilarities - Extracts dissimilarities from fitted models ## ## ## ## Created ...
1,675
gpl-2.0
d589d052af1fdf78023f4900409060bab57247ce
omarbenites/shinyApps
R/progressbar2/progressbar2.R
runApp(list( ui = pageWithSidebar( headerPanel("Test"), sidebarPanel( tags$head(tags$style(type="text/css", " #loadmessage { position: fixed; top: 0px; left: 0px; width:...
1,063
gpl-2.0
118533d62a60d9fb26c540e9865fee75b8f3a675
jarioksa/analogue
R/dissimilarities.R
########################################################################### ## ## ## dissimilarities - Extracts dissimilarities from fitted models ## ## ## ## Created ...
1,675
gpl-2.0
7f9f75873992f2a270ee4c7862b40d82b26c4b43
Tenenhaus/RGCCA
R/print_comp.R
#' Print the variance of a component #' #' Prints the percent of explained variance for a component of a block #' (by default, the superblock or the last one) analysed by R/SGCCA #' #' @inheritParams plot_ind #' @param n An integer giving the index of the analysis component #' @param i An integer giving the index of a...
1,253
gpl-2.0
750f12ebb74fe729b941403dcc5967922482dba6
wuletawu/Rsenal
R/rasterizeGimms.R
#' Rasterize GIMMS 3G binary data #' #' @description #' Convert GIMMS 3G binary data to an object of class \code{raster} by the use #' of an ENVI header file. #' #' @param file Character. GIMMS binary file to rasterize. #' @param headerfile Character. Companion header file passed on to #' \code{\link{read.ENVI}}. ...
2,762
gpl-3.0
41bf50393a1ad08067c5ea435076ac5b53d723c2
rorynolan/filesstrings
R/str-locate.R
#' Locate the braces in a string. #' #' See [strex::str_locate_braces()]. #' #' @inheritParams strex::str_locate_braces #' #' @export locate_braces <- strex::str_locate_braces #' @rdname locate_braces #' @export str_locate_braces <- locate_braces #' Get the indices of the \eqn{n}th instance of a pattern. #' #' See [s...
811
gpl-3.0
8233b266e00d84e88b9da31078864b43f51a848a
richelbilderbeek/Rcpp
R/RcppLdpath.R
# Copyright (C) 2010 - 2013 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 Free Software Foundation, either version 2 of the License, or # (at your option) ...
2,844
gpl-3.0
8233b266e00d84e88b9da31078864b43f51a848a
experimentalDataAesthetics/smallOFmodules
rcpp/Rcpp/R/RcppLdpath.R
# Copyright (C) 2010 - 2013 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 Free Software Foundation, either version 2 of the License, or # (at your option) ...
2,844
gpl-2.0
5a41b1728047a8c5e9ac7b3b4666809de9533702
armgong/DistributedR
algorithms/HPdutility/R/hpdsample.R
##################################################################################### # Copyright [2013] Hewlett-Packard Development Company, L.P. # # # # This program is free software; you can redistribute it and/...
14,191
gpl-2.0
77587c5f29f4cc8f3f3b1aa6137c5c4395020a51
arnejohannesholmin/TSD
R/setrange.R
#********************************************* #********************************************* #' Sets the range of the input object 'x' to [a,b] (stretching or shrinking and displacing 'x'). #' The calculation is done by the following procedure: #' (x - min(x)) * (b-a) / (max(x) - min(x)) + a = x * s - min(x) * s...
2,261
lgpl-3.0
c03f6ea7e4e3d2d7064d73b2d2a1ad1878be291a
Rgui/REndo_1.0
R/hmlewbel.R
#'@title Fitting Linear Models with Endogenous Regressors using Lewbel's Higher Moments Approach #'@aliases hmlewbel # Description #'@description Fits linear models with one endogenous regressor using internal instruments built using the approach described in #' Lewbel A. (1997). This is a statistical technique to a...
7,334
gpl-3.0
7c008b7bea3c0e1f05cfcd0a8d67a28153c63eac
amyecampbell/hgsc_subtypes
4.Survival/Scripts/B.Summarize_Survival.R
############################################ # Cross-population analysis of high-grade serous ovarian cancer does not support four subtypes # # Way, G.P., Rudd, J., Wang, C., Hamidi, H., Fridley, L.B, # Konecny, G., Goode, E., Greene, C.S., Doherty, J.A. # ~~~~~~~~~~~~~~~~~~~~~ # This script will summarize all of th...
11,017
bsd-3-clause
59a7b8afcf0176526f483e1ef3d7f68c2174f14b
markvanderloo/supral
examples/sparse_project.R
# the system # x + y = 10 # -x <= 0 # ==> x > 0 # -y <= 0 # ==> y > 0 # Defined in the row-column-coefficient form: A <- data.frame( row = c(1,1,2,3) , col = c(1,2,1,2) , coef= c(1,1,-1,-1) ) b <- c(10,0,0) sparse_project(x=c(4,5),A=A,b=b)
257
gpl-3.0
9ca1d1f69fbb8e04149bc86807b1524072f9f89a
rfarouni/rfarouni.github.io
assets/projects/BayesianIRT/shinyStan_for_shinyapps/server_files/outputs/convergence_test_reactive.R
convergence_test <- reactive({ if (is.null(input$convergence_R) | is.null(input$convergence_thin)) { return() } validate(need((nIter %% input$convergence_thin) == 0, message = "Error: this value for 'Thin' leaves a remainder.")) do.call(".convergence_test", args = list( session = sess...
456
mit
c40a6649c7b7a19eef8f33fcf71c58b0660588c4
burakbayramli/dersblog
stat/stat_170_pca/shalizi.R
load("pca-examples.Rdata") nyt.pca = prcomp(nyt.frame[,-1]) nyt.latent.sem = nyt.pca$rotation plot(nyt.pca$x[,1:2],type="n") points(nyt.pca$x[nyt.frame[,"class.labels"]=="art",1:2], pch="A",col="red") points(nyt.pca$x[nyt.frame[,"class.labels"]=="music",1:2], pch="M",col="blue")
294
gpl-3.0
a975ff64fa812e9ec8c5a8feb85dd51ea631ff8e
annat22/publicationsDataRcode
intEvo_Artio_EvoBio42_2015/functions-EvoOfInt_EvoBio.R
### FUNCTIONS needed for prtcl-EvoOfInt_EvoBio.R #### kmN2Nkm # Converts an array of k x m x N to a matrix of N x k*m. # Input (XX) is an array of k x m x N (e.g., N=number of specimens, k=number of landmarks, m=number of dimensions). # Output is a matrix of N specimens, where each specimen is a row vector arranged a...
25,076
gpl-2.0
c40a6649c7b7a19eef8f33fcf71c58b0660588c4
burakbayramli/classnotes
stat/stat_170_pca/shalizi.R
load("pca-examples.Rdata") nyt.pca = prcomp(nyt.frame[,-1]) nyt.latent.sem = nyt.pca$rotation plot(nyt.pca$x[,1:2],type="n") points(nyt.pca$x[nyt.frame[,"class.labels"]=="art",1:2], pch="A",col="red") points(nyt.pca$x[nyt.frame[,"class.labels"]=="music",1:2], pch="M",col="blue")
294
gpl-3.0
4a489050ad7700ee5be6d45ebe272761933bbbe1
wxchan/LightGBM
R-package/R/lightgbm.R
#' Simple interface for training an lightgbm model. #' Its documentation is combined with lgb.train. #' #' @rdname lgb.train #' @export lightgbm <- function(data, label = NULL, weight = NULL, params = list(), nrounds = 10, ...
3,671
mit
4a489050ad7700ee5be6d45ebe272761933bbbe1
olofer/LightGBM
R-package/R/lightgbm.R
#' Simple interface for training an lightgbm model. #' Its documentation is combined with lgb.train. #' #' @rdname lgb.train #' @export lightgbm <- function(data, label = NULL, weight = NULL, params = list(), nrounds = 10, ...
3,671
mit
4a489050ad7700ee5be6d45ebe272761933bbbe1
Allardvm/LightGBM
R-package/R/lightgbm.R
#' Simple interface for training an lightgbm model. #' Its documentation is combined with lgb.train. #' #' @rdname lgb.train #' @export lightgbm <- function(data, label = NULL, weight = NULL, params = list(), nrounds = 10, ...
3,671
mit
73ff692be9cdb604f43d63b8fda94e0c296441ae
davetgerrard/GenomicLayers
scripts/predictFromSequence.loadResults.R
scores <- read.delim("data/HYDRA_runs/auto10k/auto10k.out.tab") head(scores) plot(scores); abline(v=3100) subset(scores, iter > 3000 & iter < 3100) load("data/HYDRA_runs/auto10k/auto10k.final.Rdata") length(result) tail(result$optimScores) load("data/HYDRA_runs/layer5_10k/currentFactorSet.300.Rdata") leng...
819
gpl-3.0
2a4ff37b1240a76be09ecb4e37224a5f0b3a685b
GregVial/WordGenerator
WordGenerator.R
## Word generator ## Gregory Vial - 2016, June 24th ## R version of the generator designed by David Louapre sciencetonnante@gmail.com ## See https://goo.gl/g0ULlN for more info on original idea ## Run this program as many times as you want to generate new words! ## Initialize environment # Set working directory (set ...
1,584
gpl-3.0
fe464e3e2f193c30fc7233bd7cbe00ff78abb967
pschulam-attic/plibr
R/math.R
log_sum <- function(x) { m <- max(x) r <- sum(exp(x - m)) m + log(r) } log_normalize <- function(x) { s <- log_sum(x) x - s }
147
mit
d6bb23f986cb51a7f0fea3b36b7988911338868b
orting/emphysema-estimation
Experiments/Experiment-1/StabilityPlots.R
stability.1 <- read.csv("Stability-1.out"); postscript(file="Stability-1-boxplot.ps", bg="white" ); boxplot(stability.1[stability.1[,1] == 2, 3], stability.1[stability.1[,1] == 4, 3], stability.1[stability.1[,1] == 6, 3], stability.1[stability.1[,1] == 8, 3], stabil...
1,495
gpl-3.0
ef9c31c029562e432b9f7121aa1e469f1dff6131
erikjsolsen/AtlantisNEUS_R
NOBA/seabird forcing files.R
#' @title Creating NCDF forcing file for Increasing sea-bird mortality to replicate potential effects of wind farms in coastal areas of Norway #' @details creates a .ncdf file with mortality forcing data pr. time step, box, species age group #' @author Erik Olsen mort_force <- function(rscale, boxes, ncfile){ #' LI...
3,349
mit
5cdcf1552e4f4c88956d249295c5336987649e7e
neuromancer/ocean-results
Rscripts/mut_class.R
library("e1071") #library("caret") library("tm") options(mc.cores=1) dir = "../25-05-2014" options(stringsAsFactors=F) if (! ("mycon" %in% ls())) { mycon = gzcon(gzfile(paste(dir, "sized_buggy_traces.csv.gz", sep="/"), open="r")) buggy_program_events = read.csv(textConnection(readLines(mycon)), sep="\t", head...
5,085
gpl-3.0
533f2f4505066bedbb187eb8f04b5a5043080916
harsh3375/Bank-Marketing
Harsh_Kumar_yadav_project_Phase_II.R
#Question 1 setwd("/Users/Harsh/Desktop/project_resubmit") library(dplyr) d <- read.csv("bank-full.csv",sep = ";",stringsAsFactors = FALSE) glimpse(d) str(d) ## grouping and dummy creation ## create Dummy Veriable Dummies1=function(df,dvar){ t=table(df[,dvar]) t=sort(t) ...
17,860
apache-2.0
9814314d1ea4748fca40f5c935e8403ca01129ee
cran/circular
R/wallraff.test.R
# # Wallraff procedure for comparing angular distances # # Allows to compare the deviation from an angle of interest # between several data sets. If the angle of interest is # the mean direction, then it becomes a comparison of # angular dispersion around the mean. # # In essence, it is a rank-based test (Wilcoxon-Man...
4,242
gpl-2.0
1a7582ee18121efb5d29ce12901c719bc8367cf7
maddin79/darch
R/RcppExports.R
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 applyDropoutMaskCpp <- function(data, mask) { .Call('_darch_applyDropoutMaskCpp', PACKAGE = 'darch', data, mask) } ditherCpp <- function(data, columnMask) { .Call('_darch_ditherCpp', P...
2,306
gpl-3.0
a950e56dbae4cefb6e7d934621f3dad617d7aac5
randall-romero/CompEconR
R/qnwsimp.R
#============================================================================== # QNWSIMP # #' Simpson's rule quadrature nodes and weights #' #' Generates Simpson's rule quadrature nodes and weights for computing the #' definite integral of a real-valued function defined on a hypercube [a,b] in R^d. ...
2,046
mit
18948983fdcb151247531bf136a74ea04a6e119a
MuhammadShuaib/mwmetrics
R/new_editor/historical.R
source("loader/monthly_new_wikipedians.R") source("loader/all_monthly_users.R") month.new_wikipedians = with( load_monthly_new_wikipedians(reload=T), rbind( data.table( month, wiki = "ptwiki", metric = "new wikipedians", n = pt ), data.table( month, wiki = "enwiki", metric = "new wikipedia...
4,799
mit
ae5a5d21c2db677860ba67a3e46c0f70cde9e870
robertzk/objectdiff
tests/testthat/test-squish.R
test_that('it can squish a trivial example', { expect_identical(squish_patches(NULL, list()), identity_patch(), info = 'squishing no patches should just give the identity patch') }) test_that('it can squish one patch into itself', { iris2 <- iris iris2[1, 1] <- NA patch <- objectdiff(iris, iris2) expect_...
814
mit
18948983fdcb151247531bf136a74ea04a6e119a
mediawiki-utilities/python-mwmetrics
R/new_editor/historical.R
source("loader/monthly_new_wikipedians.R") source("loader/all_monthly_users.R") month.new_wikipedians = with( load_monthly_new_wikipedians(reload=T), rbind( data.table( month, wiki = "ptwiki", metric = "new wikipedians", n = pt ), data.table( month, wiki = "enwiki", metric = "new wikipedia...
4,799
mit
18948983fdcb151247531bf136a74ea04a6e119a
halfak/mwmetrics
R/new_editor/historical.R
source("loader/monthly_new_wikipedians.R") source("loader/all_monthly_users.R") month.new_wikipedians = with( load_monthly_new_wikipedians(reload=T), rbind( data.table( month, wiki = "ptwiki", metric = "new wikipedians", n = pt ), data.table( month, wiki = "enwiki", metric = "new wikipedia...
4,799
mit
2ca2ae323816470c5034ecac89708ef0b6920da8
harvestchoice/hc-shiny
cell5mMap/ui.R
##################################################################################### # Title: HarvestChoice Data API with leaflet # Date: July 2015 # Project: HarvestChoice/IFPRI # Authors: Bacou, Melanie <mel@mbacou.com> ##################################################################################### head...
3,654
mit
e84dfa5b14040f55e138fa1bef304a8157ecd6d5
arc12/EdMOOC-SNA-X
Tie Type Comparison/Tie Type Correlation - All Courses.R
# iterate over a number of courses, executing "FAP Forums.Rmd" for each one. # creates an HTML report for each course library(knitr) library(markdown) # NB including an explicit "~/R Projects/Edinburgh MOOC/EdMOOC-SNA" as argument to markdownToHTML # causes it to fail to find file. Also get figures directory in wrong...
1,143
mit
3022a78da78219849df1d0e932399b9350a810b9
JohnGavin/myFirstProject
tests/1.R
# Example Unit Testing Script require(testthat) expect_that(1, equals(1))
74
apache-2.0
1b4e13dbc697c3aab14833d898f3187e6571e94c
duttashi/LearningR
scripts/statistical concepts/L5.0-Logistic-Regression-exercise.R
# Logistic Regression Exercise # install the ISLR package and load the stock market data from it library(ISLR) attach(Smarket) # This dataset consists of percentage returns for the S&P 500 stock index over 1,250 days from the begining of year 2001 to the end of year 2005. # For each date, the percentage of returns for ...
5,357
mit
454d821c1fe52d6c83ecba70477db4333fec73b2
wStockhausen/rTCSAM2015
R/plotFisheriesResults.R
#' #'@title Plot model results for fisheries. #' #'@description Function to plot model results for fisheries. #' #'@param repObj - report list from a TCSAM2015 model run #'@param showPlot - flag (T/F) to show plots #' #'@return nested list of ggplot objects #' #'@export #' plotFisheriesResults<-function(repObj, ...
1,033
mit
280600a54c6f536c4fe82fe290b419f9c1c59077
JoshuaZe/restopicer
restopicer-SCaaS/restopicerRESTful/R/allotHybridRecommender.R
allotHybridRecommend <- function(result_relevent,rated_papers, topics_filepath, preference_w,quality_w,summary_w,fresh_w,explore_w, composite_N){ result_relevent }
265
mit
280600a54c6f536c4fe82fe290b419f9c1c59077
RUCYuLiTeam/restopicer
restopicer-SCaaS/restopicerRESTful/R/allotHybridRecommender.R
allotHybridRecommend <- function(result_relevent,rated_papers, topics_filepath, preference_w,quality_w,summary_w,fresh_w,explore_w, composite_N){ result_relevent }
265
mit
487659c7cd21b61fd28f2f9b7a0874e662f14ca3
tsherma4/CellBasedModel
R/class-OffLatticeModel.R
#' @include class-CellModel.R NULL library(methods) ################ Class Definition ################ #' @title OffLatticeModel #' @description General description of an off-lattice cell-based model. #' not quite a full implementation, but contains much of the neccesary #' structure for models of this type #' #' @s...
12,312
gpl-3.0
6ff6870f9fa2e607548adf12ffe8203d6046e260
JovingeLabSoftware/QFlow
server.R
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://www.rstudio.com/shiny/ # library(shiny) library(flowCore) library(flowViz) library(hexbin) shinyServer(function(input, output, session) { data <- NULL historical <- reactiveF...
6,262
mit
487659c7cd21b61fd28f2f9b7a0874e662f14ca3
FertigLab/CancerInSilico
R/class-OffLatticeModel.R
#' @include class-CellModel.R NULL library(methods) ################ Class Definition ################ #' @title OffLatticeModel #' @description General description of an off-lattice cell-based model. #' not quite a full implementation, but contains much of the neccesary #' structure for models of this type #' #' @s...
12,312
gpl-3.0
e42df1e75b807d5e51c093ae0e58ea71583a275f
feralindia/CEPF_monitoring
LANDSAT7/fillnodata.R
## routine to call gdal_fillnodata.py on targeted folders. ## Use after toar has been done using GRASS ## Pixel width is set to 9 - see the cmd statement. ### see if this function can be made to work. Will probably speed up the gap fill ## fun.gapfill <- function(w,x,y,z,gf){ ## gunzip(z, destname=x, skip=TRUE, re...
3,524
gpl-3.0