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 |
|---|---|---|---|---|---|
487effb6fe2490b1d2d798d5f9758cecd294dd6d | PeraltaLab/CSI_Dispersal | Werba_Data_Analyses_Manuscript_Effects of diversity and coalescence of species assemblages/Alpha_diversity_graph.R | source("alpha_family.R")
source("Graphing_Set_Up.R")
# graph results from richness model with no sources
#make dataframe for prediction lines
newdat <- expand.grid(
richness = 0,
Dispersal = unique(no_source_all$Dispersal),
Day = unique(no_source_all$Day),
Salinity_Measured = seq(0,15,0.05)
)
newdat$richne... | 6,734 | gpl-2.0 |
df961dee79ac34d8490c905eaf7f4afcabbb6662 | cugliari/enercast | R/RcppExports.R | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
DistWav <- function(u) {
.Call('_enercast_DistWav', PACKAGE = 'enercast', u)
}
prevkerfon <- function(serie_x, serie_y, serie_x0, h, EPS) {
.Call('_enercast_prevkerfon', PACKAGE = 'ene... | 511 | gpl-3.0 |
c6dea88f6c7661d312ae536b4a2836b6b1131e04 | jrsykes/msc_project_sex_antag | scripts/ASReml.R |
library(asreml)
data<-read.table("/scratch/jsykes/combined_abundance_unique_id.tsv", header=TRUE)
dat<-subset(data, tpm>exp(-7))
dat$SSD<-factor((paste(dat$sex, dat$SexDeterm)))
dat<-dat[order(dat$SSD),]
i<-16
dat[dat$species %in% i,]
mi.asreml<-asreml(log(tpm)~sex, random=~corh(sex):target_id, rcov=~units:at(s... | 7,738 | gpl-3.0 |
8c5a6d46bf17cfebe1b5d1bd2a7d3a63ddc14104 | savrgg/lanalytics | lanalytics_writing/original_codes/parsequizzes.R | ## parsequizzes.R
## parses data from all quizzes in a given directory into three separate tables
## Written by MI Stefan
library(stringr)
library(xlsx)
library(digest)
library(random)
## Variables (to be specified according to project)
# input directory
quizDir = ("/home/melanie/Work/MCM/academy_project/Raw data 201... | 5,120 | gpl-2.0 |
8c5a6d46bf17cfebe1b5d1bd2a7d3a63ddc14104 | MelanieIStefan/lanalytics | lanalytics_writing/original_codes/parsequizzes.R | ## parsequizzes.R
## parses data from all quizzes in a given directory into three separate tables
## Written by MI Stefan
library(stringr)
library(xlsx)
library(digest)
library(random)
## Variables (to be specified according to project)
# input directory
quizDir = ("/home/melanie/Work/MCM/academy_project/Raw data 201... | 5,120 | gpl-2.0 |
3067a2205f6a06698b35e276e68c85445c7013ad | wch/r-source | src/library/utils/R/data.R | # File src/library/utils/R/data.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2022 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... | 10,389 | gpl-2.0 |
90f80f5359b24cbe3d30147f751ec68421d55631 | andrie/AzureStorage | inst/examples/example_experiments.R | \dontrun{
keyfile <- system.file("tests/testthat/config.json", package = "azureml")
jsondata <- jsonlite::fromJSON(keyfile)
list2env(jsondata, envir = globalenv())
library(azureml)
# workspace_id <- ""
# authorization_token <- ""
experiment <- "dd01c7e4a424432c9a9f83142d5cfec4.f-id.d2f351dd4cec4c... | 739 | gpl-2.0 |
c9b2cfe313c8c3696b383589b6563a94918e24b6 | richarddmorey/encrypt_data_example | data/encrypt_it.R | require(sodium)
# See https://cran.r-project.org/web/packages/sodium/vignettes/intro.html
## Create a secret passphrase. You can share this with anyone
## you like, so they can decrypt the data
key_string = "This is a secret passphrase"
key = hash(charToRaw(key_string))
## Read the data and serialize it to prepare it... | 1,617 | mit |
d261a9b6681432f824b1eed31cc57c0ebad79e13 | ColumbusCollaboratory/electron-quick-start | R-Portable-Mac/library/robustbase/xtraR/m-s_fns.R | #### Testing M-S estimator --- self-contained utility functions ---
####
## Exercised from ../../tests/m-s-estimator.R
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Test subsampling algorithm
m_s_subsample <- function(x1, x2, y, control, orthogonalize=TRUE) {
storage.mode(x1) <- "double"
storage.mode(x2) <- "double"
... | 5,894 | cc0-1.0 |
0e406c005f2d0c040e0d44868ba41247a1aefbbb | math4youbyusgroupillinois/ChicagoVacantBuildingData | Vacancy_Density.R | ##------------------------------------------------------------------------------
## INITIALIZATION
##------------------------------------------------------------------------------
rm(list=ls())
gc()
library(geneorama)
detach_nonstandard_packages()
library(geneorama)
loadinstall_libraries(c("geneorama", "data.table", "g... | 3,467 | gpl-2.0 |
d8056fa68aa51f9720a2090e53625c9c9be70902 | AGG2016/Wearable-computing-study-case | run_analysis.R | ################ FIRST PART ################
#Common to both
activities<-read.table("./activity_labels.txt")#This are row labels
activityNames<-activities$V2
variables<-read.table("./features.txt")#Columns' names
#Let's put the train set together, first
######## TRAIN ########
subjects<-read.table("./train/subject_t... | 4,499 | mit |
466942fd4d3440265a6821e2b42ec456d24970d9 | l0s/datasciencecoursera | getting_and_cleaning_data/run_analysis.R | library( plyr )
workingDirectory <- 'work'
outFile <- paste( c( workingDirectory, '/tidy.txt' ), collapse='' )
zipFile <- paste( c( workingDirectory, '/data.zip' ), collapse='' )
dataFileUrl <- 'https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip'
datasetDirectory <-
paste( c( work... | 4,013 | apache-2.0 |
0e406c005f2d0c040e0d44868ba41247a1aefbbb | geneorama/ChicagoVacantBuildingData | Vacancy_Density.R | ##------------------------------------------------------------------------------
## INITIALIZATION
##------------------------------------------------------------------------------
rm(list=ls())
gc()
library(geneorama)
detach_nonstandard_packages()
library(geneorama)
loadinstall_libraries(c("geneorama", "data.table", "g... | 3,467 | gpl-2.0 |
75d2acf2c868531a469032a42eb36e6fb73664d0 | shabbychef/ggallin | tests/testthat.R | # Copyright 2017 Steven E. Pav. All Rights Reserved.
# Author: Steven E. Pav
# This file is part of ggallin.
#
# ggallin 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 3 of the License,... | 1,165 | gpl-3.0 |
41f831fe709cda5e0524ebb7ee41e98f469ddb79 | mihawk2016/rStudyR | PACKAGES/quantstrat/demo.luxor.1.strategy.basic.R | # source(paste0(path.package("quantstrat"),"/demo/luxor.include.R"))
library(magrittr)
library(FinancialInstrument)
library(blotter)
library(quantstrat)
# options(width = 240) # 设置打印宽度,默认=160
Sys.setenv(TZ="UTC")
startDate <- '2002-10-21'
.from <- startDate
.to <- '2002-10-31'
strategy.st <- 'luxor'
portfolio.st <- '... | 5,355 | gpl-3.0 |
5be90e5ef0e30bf65afc5b7a3ecba53b2fe4cfa2 | ColumbusCollaboratory/electron-quick-start | R-Portable-Mac/library/foreach/unitTests/packagesTest.R | # Try loading thye package splines and running a function from it.
test01 <- function() {
# First unload the package if it is already loaded.
# eachWorker(getSleigh(),
# function() {
# pkg <- "package:splines"
# if(pkg %in% search()) detach(pkg)})
d <- foreach(1:10, .packag... | 431 | cc0-1.0 |
ebdb187cdda75f06686b399668f6c32f93a32ead | mseewaters/soildata | stack_average.R | library(e1071)
library(randomForest)
require(medley)
library(ridge)
library(performanceEstimation)
library(DMwR)
library(earth)
train <- read.csv("training.csv")
#test <- read.csv("sorted_test.csv")
soil_properties <- c("Ca", "P", "pH", "SOC", "Sand")
train$Depth <- as.numeric(train$Depth)
# training data
MIR_measu... | 3,418 | mit |
ab282598b596e64223ea54c007e968985c36371e | jeremyrcoyle/sl3 | R/Lrnr_solnp_density.R | #' Nonlinear Optimization via Augmented Lagrange
#'
#' This meta-learner provides fitting procedures for density estimation, finding
#' convex combinations of candidate density estimators by minimizing the
#' cross-validated negative log-likelihood loss of each candidate density. The
#' optimization problem is solved b... | 2,715 | gpl-3.0 |
ab282598b596e64223ea54c007e968985c36371e | tlverse/sl3 | R/Lrnr_solnp_density.R | #' Nonlinear Optimization via Augmented Lagrange
#'
#' This meta-learner provides fitting procedures for density estimation, finding
#' convex combinations of candidate density estimators by minimizing the
#' cross-validated negative log-likelihood loss of each candidate density. The
#' optimization problem is solved b... | 2,715 | gpl-3.0 |
fb41205ebffc0522c11e9c5901cdbcca3fb4d884 | CSB-IG/tcgarnaseqbc | QC.R |
#################################################################################
##QC con BioSeq
#################################################################################
options(width=120)
load(file="RawFull.RData")
###Nos quedamos con todo lo anotado que tiene GC y length
ids<-!is.na(full$Annot$GC) & !is.n... | 18,876 | gpl-3.0 |
208c191e7652cd61e1e89e8bd050bb8b4362d7ab | Ahmadou2015/Climsoft | ClimsoftVer4/ClimsoftVer4/static/ClimateObject/R/ClimateMethods/DataManipulation/extreme_events_method.R | #==================================================================================================
# Climatic Extremes
#' @title Climatic Extremes.
#' @name extreme_events
#' @author Fanuel and Steve 2015 (AMI)
#' @description \code{climatic extremes}
#' Adds a column of extreme events summed or averaged over a numb... | 7,127 | gpl-3.0 |
208c191e7652cd61e1e89e8bd050bb8b4362d7ab | stevekogo/Climsoft | ClimsoftVer4/ClimsoftVer4/static/ClimateObject/R/ClimateMethods/DataManipulation/extreme_events_method.R | #==================================================================================================
# Climatic Extremes
#' @title Climatic Extremes.
#' @name extreme_events
#' @author Fanuel and Steve 2015 (AMI)
#' @description \code{climatic extremes}
#' Adds a column of extreme events summed or averaged over a numb... | 7,127 | gpl-3.0 |
d5e302086c16dc08dc4e086e2791b4fc0ace30ee | jeremymcrae/recessiveStats | data-raw/constants.R |
DATAFREEZE_DIR = "/nfs/ddd0/Data/datafreeze/ddd_data_releases/2015-04-13"
DDD_VCFS_DIR = "/lustre/scratch114/projects/ddd/release/20140912/final"
PHENOTYPES_PATH = file.path(DATAFREEZE_DIR, "phenotypes_and_patient_info.txt")
BCFTOOLS = "/software/hgi/pkglocal/bcftools-1.3/bin/bcftools"
devtools::use_data(DATAFREEZE_... | 401 | gpl-2.0 |
f56ede3460ebec57a4a1bb0f52eb13b479c77069 | xiaosongz/math2640 | homework/HW3/hw3.R | #Home work 3
#3.32 Smoking marijuana and willingness to work
name
name1
## generate a random ordering
set.seed(5) ## make reproducible here, but not if generating many random samples
rand <- sample(ncol(name1))#get a random number seq from 1:20
rand
namer=name1[,rand]#rearrange the name using the random seq
na... | 1,014 | unlicense |
8628cd293f31fe8aa10e68783d781dc649334700 | SensePlatform/R | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | kmillar/rho | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | nathan-russell/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | minux/R | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | krlmlr/cxxr | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
1934fa2d9cf5ddf1a5dd7be71cf6b45a5cebf7e8 | jnephin/Chlor-a | Chl-ContrainedRasters.R | ###############################################################################
#
# Authors: Jessica Nephin
# Affiliation: Fisheries and Oceans Canada (DFO)
# Group: Marine Spatial Ecology and Analysis
# Location: Institute of Ocean Sciences
# Contact: e-mail: jessica.nephin@dfo-mpo.gc.ca | tel: 2... | 1,805 | gpl-3.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | reactorlabs/gnur | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | LeifAndersen/R | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | jeroenooms/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | krlmlr/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | WelkinGuan/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
598716ddb95b5c54d75ca15ca3b95cb803fcb6ee | psych10/psych10-shinyapps | inst/regression/app.R | library(shiny)
library(tidyverse)
library(psych)
ui <- fluidPage(
# Application title
titlePanel("Regression Towards the Mean"),
# Sidebar with text and the customizable inputs
sidebarLayout(
sidebarPanel(
p("Regression towards the mean is the phenomenon that if we have a
mu... | 5,054 | mit |
8628cd293f31fe8aa10e68783d781dc649334700 | RevolutionAnalytics/RRO | R-src/src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | MouseGenomics/R | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | cxxr-devel/cxxr | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | mathematicalcoffee/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | allr/timeR | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | Mouseomics/R | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | SurajGupta/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | kmillar/cxxr | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
29b5447c9204b8580df0c875aabaf9468c9fa297 | cran/GWAtoolbox | inst/doc/GWAtoolbox.R | ### R code from vignette source 'GWAtoolbox.Rnw'
###################################################
### code chunk number 1: GWAtoolbox.Rnw:770-772
###################################################
t <- read.table("gwa_data_example_1.txt", header = T, nrow = 1, sep = " ")
colnames(t)
#############################... | 2,528 | gpl-3.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | abiyug/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | jimhester/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
ac275f9db81ef5c402f2f4071100fbad74f90acb | guido-s/cr-funcs | crtrans.R | crtrans <- function(states, initial.states, cens.name) {
##
## Create transition matrix for competing risks model
## (input for mvna() and etm() of respective R packages)
##
if (any(initial.states %in% states))
stop("Values of arguments 'states' and 'initial.states' must be different.")
##
len.s <- le... | 694 | gpl-3.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | ArunChauhan/cxxr | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | allr/r-instrumented | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | aviralg/R-dyntrace | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | wch/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | rho-devel/rho | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
8628cd293f31fe8aa10e68783d781dc649334700 | andy-thomason/r-source | src/library/tcltk/R/tclarray.R | # File src/library/tcltk/R/tclarray.R
# Part of the R package, https://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; eithe... | 2,187 | gpl-2.0 |
96a5211761fae2ec6da6b311d41adf849a2e83a5 | GeoscienceAustralia/ptha | R/examples/make_hazard_points/country_area_check.R | #
# We want to find the area of the largest land-mass for each country, and
# flag it in a shapefile
#
# Why? So that we don't cut out any countries when simplifying polygons
library(rgdal)
library(geosphere)
wb = readOGR('TM_WORLD_BORDERS-0.3', layer='TM_WORLD_BORDERS-0.3')
# NOTE: geosphere::areaPolygon gives diff... | 1,368 | bsd-3-clause |
cc6dc092297df18da392a96936a21a888fc95307 | AstraZeneca-NGS/VarDict | testsomatic.R | #!/usr/bin/env Rscript
#args <- commandArgs(trailingOnly = TRUE)
myfile = file("stdin")
open(myfile, blocking=TRUE)
myinput = readLines(myfile) # read from stdin
if (length(myinput) > 0 ){
mynumcols = sapply(gregexpr("\\t", myinput[1]), length) + 1 # count num of tabs + 1
}else{
mynumcols = 0
d = matrix(0... | 2,243 | mit |
799c11ef806dcaee22fa0a137139f1c0342d52fb | SoftwareLiteracyFoundation/BAM | etc/CompareRuns.R |
#-------------------------------------------------------------
#
#
#-------------------------------------------------------------
temp = function() {
Compare( basin = 'Rankin Lake', gauge = 'BK' )
Compare( basin = 'Terrapin Bay', gauge = 'BK' )
Compare( basin = 'North Whipray', gauge = 'B... | 7,705 | gpl-3.0 |
5eb47b7b638af26b1cd010fd2840ccac47c4c73d | avantoss/vaultR | R/package.vault.R | #' Simple accessors for Hashicorp's vault in R
#'
#' @name vault
#' @import stringr
#' @docType package
NULL
| 109 | mit |
16b7cc2803af7becf0ba59dc982b84dba4736e61 | cassiopagnoncelli/r-packages | forinf/inference/model-finder.R | library('dplyr')
library('stringr')
library('pso')
options(warn=-1)
load_formulas <- function(keywords = NULL) {
fs <- paste('db', dir('db'), 'formulas', sep='/')
if (!is.null(keywords)) {
grep_res <- unique(unlist(lapply(keywords, grep, fs)))
if (length(grep_res) > 0)
fs <- fs[grep_res]
}
... | 2,576 | gpl-2.0 |
1e6a9246bb517479edc5141525b8227293fd32e4 | timasjov/marathon-data-analysis | descriptive_statistics.R | #Read in data
data <- read.table("data/processedData.txt", header=T)
# Statistical analysis
## t-test
t.test(data$time~data$gender)
### Result: finishing time is significantly different between genders
ggplot(data, aes(x = gender, y = time, fill = gender)) +
geom_boxplot() +
labs(title = "Time by gender", y = "ti... | 6,111 | mit |
a32d83bfdfc25f4e1bb3fb6504aca86cfae09322 | radfordneal/pqR | src/library/tools/R/Rd2HTML.R |
# File src/library/tools/R/Rd2HTML.R
# Part of the R package, http://www.R-project.org
#
# 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 of the License, or
# (at your opt... | 30,648 | gpl-2.0 |
40bed05c8583db986eb06700e7b88e579b4e2b2a | sbabicki/bioin401 | helpers.R | r2cdt2 <- function (hr, hc, data, labels = FALSE, description = FALSE, file = "cluster.cdt", dec = ".")
{
n <- dim(data)[1]
data <- as.data.frame(cbind(1, data))
if (!description) {
if (!labels) {
data <- cbind(row.names(data), data)
}
else {
data <- cbind(as... | 1,701 | gpl-2.0 |
2a7eb281a414ed774b25fcf425876d3ef159d0d9 | personality-project/psych | R/factor.model.R | "factor.model" <-
function(f,Phi=NULL,U2=TRUE) {
if(!is.matrix(f)) f <- as.matrix(f)
if(is.null(Phi)) {Phi <- diag(1,dim(f)[2])}
if(!is.matrix(Phi)) {Phi <- as.matrix(Phi)}
if (!U2) diag(Phi) <- 1
result<- f %*% Phi %*% t(f)
if (!U2) diag(result) <- 1
return (result)}
| 299 | gpl-2.0 |
4f7befab7873a49ca1ee6a80c56115454b2394e0 | fozy81/fozy81.github.io | _source/my-first-blog/my-first-blog.R | # This R file accomanies the .Rmd blog post
# _source/my-first-blog/2016-02-21-my-first-blog.Rmd
| 98 | mit |
6ce9ac710c5f914cbad32cee7f70ec64c5521cda | ayalaallon/prepdat | R/stroopdata.R | #' Reaction-times and accuracy for color naming in a Stroop task (e.g., Stroop,
#' 1935).
#'
#' A dataset containing reaction-times, accuracy, and other attributes of 5400
#' experimental trials.
#'
#' @usage data(stroopdata)
#'
#' @format A data frame with 5401 rows and 10 columns:
#' \describe{
#' \item{subject}{C... | 1,437 | gpl-3.0 |
3693babd63a2986f3c7428aae8c560cb2a9c631f | plynty/Retirement-Expenses | createUCCMap.R | if(!("stringr" %in% rownames(installed.packages()))){
# install it if not yet installed
install.packages(pkg)
}
library(stringr) # load stringr package (manipulates character strings easily)
# Create the root directory if it doesn't exist
try(dir.create(mydir, showWarnings=FALSE))
# find the filepath to the Int... | 5,107 | mit |
28f1f8ffad466db5cf683d3bfea80e2244167b35 | CompNet/NetVotes | src/define-paths.R | #############################################################################################
# These functions build file paths and names based on a series of parameters. They allow a
# uniform access to the resources created by the rest of the scripts.
#
# 01/2016 Vincent Labatut
##############################... | 6,145 | gpl-2.0 |
00f8e8bb85a57ce2801df271b0d095780a289532 | Rebecca1217/RTest | 0.24-jintai_weekly.R |
# Note --------------------------------------------------------------------
# This is only used after 2016.12.31.
# If you need the info before that, go find it in MORM-JinTai_MgtFee.R, which
# contains some adjustments.
## If there is problem ,first check the avc ,if there is money from QuanWeiTuo
# to FeiBiao but ... | 10,925 | gpl-2.0 |
08c4d5ff656876e07c2e26d5019b0bb3f37ad464 | rho-devel/rho | src/extra/testr/filtered-test-suite/drop/tc_drop_4.R | expected <- c(8, 4, 2)
test(id=1, code={
argv <- structure(list(x = structure(c(8, 4, 2), .Dim = c(3L, 1L))), .Names = "x")
do.call('drop', argv);
}, o = expected);
| 197 | gpl-2.0 |
08c4d5ff656876e07c2e26d5019b0bb3f37ad464 | krlmlr/cxxr | src/extra/testr/filtered-test-suite/drop/tc_drop_4.R | expected <- c(8, 4, 2)
test(id=1, code={
argv <- structure(list(x = structure(c(8, 4, 2), .Dim = c(3L, 1L))), .Names = "x")
do.call('drop', argv);
}, o = expected);
| 197 | gpl-2.0 |
08c4d5ff656876e07c2e26d5019b0bb3f37ad464 | kmillar/cxxr | src/extra/testr/filtered-test-suite/drop/tc_drop_4.R | expected <- c(8, 4, 2)
test(id=1, code={
argv <- structure(list(x = structure(c(8, 4, 2), .Dim = c(3L, 1L))), .Names = "x")
do.call('drop', argv);
}, o = expected);
| 197 | gpl-2.0 |
81e04ddf13c5928b7550ca944244dbea306979c3 | planit-group/Rplanit | R/reading-writing-functions.R | # R/W ARRAYS -------------------------------------------------------------------
#' Read 3d array (PlanKIT)
#'
#' Read file with format "3d" (PlanKIT) and return a \code{values} object.
#'
#' @param file.name the file name
#' @param x.min,x.max,y.min,y.max,z.min,z.max load only the volume inside the specified ranges... | 16,147 | gpl-2.0 |
08c4d5ff656876e07c2e26d5019b0bb3f37ad464 | kmillar/rho | src/extra/testr/filtered-test-suite/drop/tc_drop_4.R | expected <- c(8, 4, 2)
test(id=1, code={
argv <- structure(list(x = structure(c(8, 4, 2), .Dim = c(3L, 1L))), .Names = "x")
do.call('drop', argv);
}, o = expected);
| 197 | gpl-2.0 |
08c4d5ff656876e07c2e26d5019b0bb3f37ad464 | ArunChauhan/cxxr | src/extra/testr/filtered-test-suite/drop/tc_drop_4.R | expected <- c(8, 4, 2)
test(id=1, code={
argv <- structure(list(x = structure(c(8, 4, 2), .Dim = c(3L, 1L))), .Names = "x")
do.call('drop', argv);
}, o = expected);
| 197 | gpl-2.0 |
08c4d5ff656876e07c2e26d5019b0bb3f37ad464 | cxxr-devel/cxxr | src/extra/testr/filtered-test-suite/drop/tc_drop_4.R | expected <- c(8, 4, 2)
test(id=1, code={
argv <- structure(list(x = structure(c(8, 4, 2), .Dim = c(3L, 1L))), .Names = "x")
do.call('drop', argv);
}, o = expected);
| 197 | gpl-2.0 |
bbed41db5b865e71b754acad52900b5b2529ad08 | cinnober/EVT | R/priors.R | #' Creates expert prior from ellicitation
#' @param m Median for 1\% value at risk
#' @param q 90\% quantile for median m
#' @param mDiff Median for difference between 1\% and 0.1\% value at risk
#' @param qDiff 90\% quantile for mDiff
#' @param y Transformed data
#' @export
createExpertPrior <- function(m,q,mDiff,qDi... | 2,305 | mit |
73ac4e62b816a4b06d92bf52019e994cba9b60e5 | akunft/fastr | com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/S4/R/refClasses1.R | setRefClass('A5R5', methods = list(foo = function() { print('A5R5$foo') }))
setRefClass('B5R5', methods = list(foo = function() { print('B5R5$foo') }))
C5R5 <- setRefClass('C5R5', contains = c('A5R5', 'B5R5'))
obj <- C5R5$new()
obj$foo() | 237 | gpl-2.0 |
9bb57c5739e9b906ef4237373436c8025329b78a | ucsb-bren/esm296-4f | wk4/get_species.R | library(sp)
library(rgdal)
library(dismo)
# set variables to the scientific name of your speciess
genus = 'Pinus'
species = 'longaeva'
# path to output shapefile constructed from scientific name of your speciess
#shp = sprintf('H:/esm296-4f/project/data/pts_%s_%s', genus, species)
# OR
shp = 'H:/esm296-4f/lab5/raw/... | 996 | mit |
5e12492b2a4c1d8bbdf81a56c4963ce7349a89a5 | JoeyBernhardt/p-temp | Rscripts/02_DaphPop.R | ### DaphPop
library(readr)
library(tidyr)
library(dplyr)
library(ggplot2)
library(broom)
Daph_raw <- read_csv("data-processed/P-TEMP_DaphPop.csv")
UniqueID <- read_csv("data-raw/P-TEMP-UniqueID-key.csv")
Daph_raw <- tbl_df(Daph_raw)
UniqueID_treat <- separate(UniqueID, TREATMENT_ID, c("treament", "temperature", "r... | 6,506 | mit |
9bb57c5739e9b906ef4237373436c8025329b78a | bbest/esm296-4f_2014 | wk4/get_species.R | library(sp)
library(rgdal)
library(dismo)
# set variables to the scientific name of your speciess
genus = 'Pinus'
species = 'longaeva'
# path to output shapefile constructed from scientific name of your speciess
#shp = sprintf('H:/esm296-4f/project/data/pts_%s_%s', genus, species)
# OR
shp = 'H:/esm296-4f/lab5/raw/... | 996 | mit |
ff828a96ceae86770cc10a821aec9b4ab6ffac53 | schmittst/modseq | R/functions/PlotMemProfile.R | PlotMemProfile <- function(memList, memTrace, offsetMem, num.mod, out.file,
out.dir) {
out.file <- file.path(out.dir, paste("MemProf_", out.file, "_V2.pdf", sep=""))
cat("Printing plot of memory consumption in: \"", out.file, "\".\n", sep = "")
pdf(out.file, paper = "a4r", width = 1... | 1,848 | gpl-3.0 |
b08ef8ce8516fa0b4f0388bcaa4cbaef928b036b | LennonLab/p-meso | stats/Anovas.R | ################################################################################
# #
# Phosphorus Mecocosm Project: P-meso Results: Anova #
# ... | 6,440 | gpl-3.0 |
fddc6117cd0b3a3e73953e12549f79d836f8c839 | Russel88/MicEco | R/rcurve.R | #' Rarefaction curve on phyloseq object
#' Theoretical richness with vegan's rarefy function
#'
#' @param physeq phyloseq object
#' @param subsamp Vector of number of reads to subsample
#' @param trim Remove richness estimations from subsamples larger than the library size
#' @param add_sample_data Add sample data to ... | 1,562 | gpl-3.0 |
39acd16246f5d7d54a4d4b45403ea01960063ba3 | kllloyd/Thesis | toSource/RunAllModelsAllCombinations.R | RunAllModelsAllCombinations <- function(cancer,molPlatform,clinicalFlag,nReps){
#--------------------------------------------------------------------------------------------------------------------------------------------#
# K Lloyd 2016_09_16
# Recreating analysis of TCGA data by Yuan et al., 2014
# Cox PH, RSF an... | 6,148 | apache-2.0 |
ff828a96ceae86770cc10a821aec9b4ab6ffac53 | sposadac/modseq | R/functions/PlotMemProfile.R | PlotMemProfile <- function(memList, memTrace, offsetMem, num.mod, out.file,
out.dir) {
out.file <- file.path(out.dir, paste("MemProf_", out.file, "_V2.pdf", sep=""))
cat("Printing plot of memory consumption in: \"", out.file, "\".\n", sep = "")
pdf(out.file, paper = "a4r", width = 1... | 1,848 | gpl-3.0 |
17e0f3997bc7d0f6a621c5f53a40004b00480700 | bertcarnell/rational | R/rational-functions.R | # include the rational-class.R so that it is loaded first
#' @include rational-class.R
#' @title Functions of Rational Numbers
#'
#' @param x rational numbers
#' @param ... rational numbers
#' @param na.rm will NAs be removed from a collection before the computation is performed
#' @importMethodsFrom methods Math Math... | 12,243 | gpl-2.0 |
8186e90d8f6a529d84e0fe5fb092d2350a881c5a | HopkinsIDD/ForecastFramework | R/SimulatedIncidenceMatrix.R | ##------------------------------------------------------------------------------##
##------------------------------------------------------------------------------##
##--------------Spatial Prediction Model Object Oriented Framework--------------##
##------------------------------------------------------------------... | 31,988 | gpl-3.0 |
5adf486a87a631772888b54697146ea0be751165 | aappling-usgs/streamMetabolizer | R/streamMetabolizer.R | #' Functions for calculating ecosystem metabolism in streams
#'
#' This package uses inverse modeling to estimate aquatic photosynthesis and
#' respiration (collectively, metabolism) from time series data on dissolved
#' oxygen, water temperature, depth, and light. The package assists with data
#' preparation, handles ... | 2,178 | cc0-1.0 |
5adf486a87a631772888b54697146ea0be751165 | USGS-R/streamMetabolizer | R/streamMetabolizer.R | #' Functions for calculating ecosystem metabolism in streams
#'
#' This package uses inverse modeling to estimate aquatic photosynthesis and
#' respiration (collectively, metabolism) from time series data on dissolved
#' oxygen, water temperature, depth, and light. The package assists with data
#' preparation, handles ... | 2,178 | cc0-1.0 |
08c1bffe2ed1579ce297bb4530063ad3efaf5331 | ati-ozgur/KDD99 | src/main/R/examples/RDataFrameToLatexExample1.R |
source("LoadDataFromSqlite.R")
library(Hmisc)
latex(df.summary.average.memory)
library(stargazer)
stargazer(df.summary.average.memory, summary=FALSE)
| 153 | bsd-3-clause |
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba | zero323/spark | R/pkg/R/WindowSpec.R | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 9,482 | apache-2.0 |
f1deb45ca95411ecb32313eb9fc361ec3fd12a2b | aronlindberg/hub_turkr | R/execute.R |
# main file consisiting of all the file to execute
# remove all the variable from the environment
# Note that for this to work your working directory has to be stored in `working_directory.R` in the format below.
# Remember to include `working_directory.R` in your .gitignore file
# relative_path <- "~/Users/your_na... | 804 | gpl-2.0 |
2bddbbb985b6c723883f7a9153063000c59a88cc | cardcorp/fbRads | R/fb_image.R | #' Upload image
#' @inheritParams fbad_request
#' @param img file path
#' @return list of file name, hash and URL
#' @export
#' @references \url{https://developers.facebook.com/docs/marketing-api/reference/ad-image#Creating}
fbad_create_image <- function(fbacc, img) {
fbacc <- fbad_check_fbacc()
## we need an... | 771 | agpl-3.0 |
7cc53014d22ffea86c931da54f5d6325829c7708 | patperry/r-source | tests/internet2.R | ## These are tests that require socket and internet functionality, and
## a working Internet connection.
## We attempt to test for those.
if(!capabilities()["http/ftp"]) {
warning("no internet capabilities")
q()
}
if(.Platform$OS.type == "unix" &&
is.null(nsl("cran.r-project.org"))) q()
## check graceful... | 2,066 | gpl-2.0 |
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba | wangyum/spark | R/pkg/R/WindowSpec.R | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 9,482 | apache-2.0 |
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba | mahak/spark | R/pkg/R/WindowSpec.R | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 9,482 | apache-2.0 |
caff47b6788bee2bc91497f7dcc0b316044548e8 | halfak/Newcomer-task-suggestions | R/loader/experimental_user_stats.R | source("util.R")
source("env.R")
load_experimental_user_stats = tsv_loader(
paste(DATA_DIR, "experimental_user_stats.tsv", sep="/"),
"EXPERIMENTAL_USER_STATS"
)
| 170 | mit |
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba | vinodkc/spark | R/pkg/R/WindowSpec.R | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 9,482 | apache-2.0 |
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba | srowen/spark | R/pkg/R/WindowSpec.R | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 9,482 | apache-2.0 |
5c1de0beac3cad397f6e628b4ab7eccc5147a4ba | dongjoon-hyun/spark | R/pkg/R/WindowSpec.R | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 9,482 | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.