content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
### Sparse matrix that drops NAs
# coercion from and to dgCMatrix is implicit
# setAs("matrix", "sparseNAMatrix", function(from) dropNA(from))
# setAs("sparseNAMatrix", "matrix", function(from) dropNA2matrix(from))
#
# .sub <- function(x, i, j, ..., drop) {
# if(!missing(drop) && drop) warning("drop not available fo... | /R/sparseNAMatrix.R | no_license | tedconf/recommenderlab | R | false | false | 2,806 | r | ### Sparse matrix that drops NAs
# coercion from and to dgCMatrix is implicit
# setAs("matrix", "sparseNAMatrix", function(from) dropNA(from))
# setAs("sparseNAMatrix", "matrix", function(from) dropNA2matrix(from))
#
# .sub <- function(x, i, j, ..., drop) {
# if(!missing(drop) && drop) warning("drop not available fo... |
library(magrittr)
rabbits <- readr::read_csv("bp_rabbits.csv", col_types = readr::cols())
y <- rabbits$BPchange
X_reduced <- model.matrix(BPchange ~ Dose + Animal + Treatment, data = rabbits)
X_complete <- model.matrix(BPchange ~ Dose + Animal + Treatment + Animal:Treatment, data = rabbits)
#########################... | /Q4_d_working.R | no_license | rsarten/stat432ass3 | R | false | false | 775 | r | library(magrittr)
rabbits <- readr::read_csv("bp_rabbits.csv", col_types = readr::cols())
y <- rabbits$BPchange
X_reduced <- model.matrix(BPchange ~ Dose + Animal + Treatment, data = rabbits)
X_complete <- model.matrix(BPchange ~ Dose + Animal + Treatment + Animal:Treatment, data = rabbits)
#########################... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/lymphoid.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.05,family="gaussian",standardize=FALSE)
sink('./lymphoid_024.txt',append=TRUE... | /Model/EN/AvgRank/lymphoid/lymphoid_024.R | no_license | esbgkannan/QSMART | R | false | false | 351 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/lymphoid.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.05,family="gaussian",standardize=FALSE)
sink('./lymphoid_024.txt',append=TRUE... |
testlist <- list(mu = 1.37300842979282e-320, var = 0)
result <- do.call(metafolio:::est_beta_params,testlist)
str(result) | /metafolio/inst/testfiles/est_beta_params/libFuzzer_est_beta_params/est_beta_params_valgrind_files/1612989097-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 121 | r | testlist <- list(mu = 1.37300842979282e-320, var = 0)
result <- do.call(metafolio:::est_beta_params,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sigma7Benp7mod.R
\name{sigma7Benp7mod}
\alias{sigma7Benp7mod}
\title{Estimate Astrophysical S-factor}
\format{\describe{
\item{x}{
The function has 57 arguments: ecm, e0_1, ga_1, gb_1, ra_1, rb_1, jr_1, la_1, lb_1,
... | /man/sigma7Benp7mod.Rd | no_license | RafaelSdeSouza/nuclear | R | false | true | 1,298 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sigma7Benp7mod.R
\name{sigma7Benp7mod}
\alias{sigma7Benp7mod}
\title{Estimate Astrophysical S-factor}
\format{\describe{
\item{x}{
The function has 57 arguments: ecm, e0_1, ga_1, gb_1, ra_1, rb_1, jr_1, la_1, lb_1,
... |
rm(list=ls())
library(plyr)
library(dplyr)
#load group testing data with LOD
setwd("/Users/caraebrook/Documents/R/R_repositories/Berkeley-Reopening/Dec-2020/all-runs/FigS2-50percent-Asym/out/")
load("symptom-iso-1-50asym.Rdata")
dat1 <- out[[1]]
dat1$iso_lag = 1
load("symptom-iso-2-50asym.Rdata")
dat2 <- out[[1]]
d... | /all-model-runs/Fig3-S1-50percent-Asym/out/combine-symptomatic-asymptomatic.R | no_license | carabrook/Berkeley-COVID-testing | R | false | false | 7,598 | r | rm(list=ls())
library(plyr)
library(dplyr)
#load group testing data with LOD
setwd("/Users/caraebrook/Documents/R/R_repositories/Berkeley-Reopening/Dec-2020/all-runs/FigS2-50percent-Asym/out/")
load("symptom-iso-1-50asym.Rdata")
dat1 <- out[[1]]
dat1$iso_lag = 1
load("symptom-iso-2-50asym.Rdata")
dat2 <- out[[1]]
d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tsf.R
\name{write_tsf}
\alias{write_tsf}
\title{Write xts-objects to .tsf file format}
\usage{
write_tsf(xts, file, ID, parameter, unit)
}
\arguments{
\item{xts}{The xts-object object to be written.}
\item{file}{A character string naming the... | /man/write_tsf.Rd | no_license | dleutnant/tsconvert | R | false | true | 598 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tsf.R
\name{write_tsf}
\alias{write_tsf}
\title{Write xts-objects to .tsf file format}
\usage{
write_tsf(xts, file, ID, parameter, unit)
}
\arguments{
\item{xts}{The xts-object object to be written.}
\item{file}{A character string naming the... |
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test DataProvenance")
model.instance <- DataProvenance$new()
test_that("id", {
# tests for the property `id` (integer)
# uncomment below to test the property
#expect_equal(model.ins... | /tests/testthat/test_data_provenance.R | no_license | NFDI4Chem/rfuji | R | false | false | 1,922 | r | # Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test DataProvenance")
model.instance <- DataProvenance$new()
test_that("id", {
# tests for the property `id` (integer)
# uncomment below to test the property
#expect_equal(model.ins... |
###########################
# File: Simulation.R
# Description: Determines Optimum Roster to Maximize Projected Points and Minimize Risk Based on Simulation
# Date: 5/15/2013
# Author: Isaac Petersen (isaac@fantasyfootballanalytics.net)
# Notes:
# -These calculations are from last year (they have not yet been updated f... | /R Scripts/Simulation.R | no_license | spowers777/FantasyFootballAnalyticsR | R | false | false | 8,526 | r | ###########################
# File: Simulation.R
# Description: Determines Optimum Roster to Maximize Projected Points and Minimize Risk Based on Simulation
# Date: 5/15/2013
# Author: Isaac Petersen (isaac@fantasyfootballanalytics.net)
# Notes:
# -These calculations are from last year (they have not yet been updated f... |
dataset <- repeat.experiment
dataset
RMSE = function(obs, true) sqrt(mean((obs-true)^2))
data.all = data.frame(matrix(NA,15,6))
data.glmm = data.frame(matrix(NA,15,11)) #27 davor
data.gls = data.frame(matrix(NA,15,6))
data.optim = data.frame(matrix(NA,15,6))
data.cpu = data.frame(matrix(NA,15,6))
data.cpu.xo ... | /glmmTMB Issue-auswertung.R | no_license | EttnerAndreas/Andreas-Ettner-Max-Internship | R | false | false | 35,540 | r | dataset <- repeat.experiment
dataset
RMSE = function(obs, true) sqrt(mean((obs-true)^2))
data.all = data.frame(matrix(NA,15,6))
data.glmm = data.frame(matrix(NA,15,11)) #27 davor
data.gls = data.frame(matrix(NA,15,6))
data.optim = data.frame(matrix(NA,15,6))
data.cpu = data.frame(matrix(NA,15,6))
data.cpu.xo ... |
testlist <- list(x = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 6:7))
result <- do.call(multivariance::fastdist,testlist)
str(result) | /multivariance/inst/testfiles/fastdist/AFL_fastdist/fastdist_valgrind_files/1613097429-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 318 | r | testlist <- list(x = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = 6:7))
result <- do.call(multivariance::fastdist,testlist)
str(result) |
#How to: MDS
#By: Kristen Brown
#Required packages
library(vegan)
library(dplyr)
library(car)
library(ggplot2)
library(ggrepel)
#Load in your data
yourdata <- read.csv("/Users/imkri/Desktop/PhD/Seasonal Monitoring Experiment/Analysis/Benthic Community Composition/All benthic transects R2.csv", strip.white... | /How to MDS.R | no_license | imkristenbrown/myrepo | R | false | false | 5,889 | r | #How to: MDS
#By: Kristen Brown
#Required packages
library(vegan)
library(dplyr)
library(car)
library(ggplot2)
library(ggrepel)
#Load in your data
yourdata <- read.csv("/Users/imkri/Desktop/PhD/Seasonal Monitoring Experiment/Analysis/Benthic Community Composition/All benthic transects R2.csv", strip.white... |
library(data.table)
getDataSetIris <- function() {
mUrl = "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data"
realNames=c(
'sepal length in cm',
'sepal width in cm',
'petal length in cm',
'petal width in cm',
'Class'
)
useNames <- c(
'f1',
'f2',
... | /lab2/R_tutorial/intro/dataLoader.R | no_license | lOdwrot/Metody-Indukcyjne | R | false | false | 1,823 | r | library(data.table)
getDataSetIris <- function() {
mUrl = "https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data"
realNames=c(
'sepal length in cm',
'sepal width in cm',
'petal length in cm',
'petal width in cm',
'Class'
)
useNames <- c(
'f1',
'f2',
... |
#### CHURN PREDICTION MODEL
# Decidiamo la data di riferimento nel passato
# Il primo scontrino è stato emesso il 2018-05-01 e l'ultimo scontrino è stato emesso il 2019-04-30
df_7_persone$TIC_DATE <- as.Date(df_7_persone$TIC_DATE)
max(df_7_persone$TIC_DATE)
min(df_7_persone$TIC_DATE)
df <- df_7_persone
df1 <- d... | /DMrkt_DSLab_project_872562_849463_853528/F01_Churn_persone.R | no_license | AleMaggipinto1996/Progetto_DigitalM | R | false | false | 13,452 | r |
#### CHURN PREDICTION MODEL
# Decidiamo la data di riferimento nel passato
# Il primo scontrino è stato emesso il 2018-05-01 e l'ultimo scontrino è stato emesso il 2019-04-30
df_7_persone$TIC_DATE <- as.Date(df_7_persone$TIC_DATE)
max(df_7_persone$TIC_DATE)
min(df_7_persone$TIC_DATE)
df <- df_7_persone
df1 <- d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ImageFusion.R
\docType{package}
\name{ImageFusion}
\alias{ImageFusion}
\title{Imagefusion: A package for fusion of images}
\description{
Implementation of Time-Series fusion.
}
\section{Outline}{
\code{ImageFusion} provides implementations o... | /man/ImageFusion.Rd | permissive | cran/ImageFusion | R | false | true | 1,026 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ImageFusion.R
\docType{package}
\name{ImageFusion}
\alias{ImageFusion}
\title{Imagefusion: A package for fusion of images}
\description{
Implementation of Time-Series fusion.
}
\section{Outline}{
\code{ImageFusion} provides implementations o... |
# Matthew Falcona
# IST-719
# Final Poster Code
# Aggregating Total Change in Value by Neighborhood
tot_chg_val <- aggregate(pgh_sales_2010$ChgPerYear, by = list(pgh_sales_2010$Neighborhood), FUN = sum)
# Aggregating Total Value by Neighborhood
tot_val <- aggregate(pgh_sales_2010$CurValue, by = list(pgh_sales_2010$... | /Pgh Real Estate Prices/PosterCode.R | no_license | mfalcona/Portfolio | R | false | false | 4,301 | r | # Matthew Falcona
# IST-719
# Final Poster Code
# Aggregating Total Change in Value by Neighborhood
tot_chg_val <- aggregate(pgh_sales_2010$ChgPerYear, by = list(pgh_sales_2010$Neighborhood), FUN = sum)
# Aggregating Total Value by Neighborhood
tot_val <- aggregate(pgh_sales_2010$CurValue, by = list(pgh_sales_2010$... |
## These function return an inverse matrix for an input matrix.
## makeCacheMatrix: Returns a list of functions to set and get the value of
## a matrix as well set and get the value of its inverse
makeCacheMatrix <- function(x = matrix()) {
inverse = NULL
setOriginal <- function(newMat) {
x <<- newMat
... | /cachematrix.R | no_license | mg37274/ProgrammingAssignment2 | R | false | false | 966 | r | ## These function return an inverse matrix for an input matrix.
## makeCacheMatrix: Returns a list of functions to set and get the value of
## a matrix as well set and get the value of its inverse
makeCacheMatrix <- function(x = matrix()) {
inverse = NULL
setOriginal <- function(newMat) {
x <<- newMat
... |
setwd("~/Downloads/")
inputFile <- "./samples_FacData1.tab"
ti <- read.table(inputFile, stringsAsFactors = F, nrows = 1, row.names = 1)
ti_expr <- grep("EXPR", ti)
ti_p <- grep("CpG_P", ti)
ti_gb <- grep("CpG_GB", ti)
tt <- read.table(inputFile, stringsAsFactors = F, skip = 1, row.names = 1)
str2tabs <- function(str,... | /read_FacData.R | no_license | XinyuTian/EB_pinc | R | false | false | 768 | r | setwd("~/Downloads/")
inputFile <- "./samples_FacData1.tab"
ti <- read.table(inputFile, stringsAsFactors = F, nrows = 1, row.names = 1)
ti_expr <- grep("EXPR", ti)
ti_p <- grep("CpG_P", ti)
ti_gb <- grep("CpG_GB", ti)
tt <- read.table(inputFile, stringsAsFactors = F, skip = 1, row.names = 1)
str2tabs <- function(str,... |
library(caret)
#give the complete location of the csv file
data <- read.csv('~/Google Drive/Lectures - IITB/Semester 5/CE 310 Transport I/Project/daydata.csv', header=T, na.strings=c(""))
#data <- read.csv('~/Google Drive/Lectures - IITB/Semester 5/CE 310 Transport I/Project/nightdata.csv', header=T, na.strings=c(""))
... | /svmmodel.R | no_license | sumanvid97/gap_classification_for_road_intersections | R | false | false | 2,560 | r | library(caret)
#give the complete location of the csv file
data <- read.csv('~/Google Drive/Lectures - IITB/Semester 5/CE 310 Transport I/Project/daydata.csv', header=T, na.strings=c(""))
#data <- read.csv('~/Google Drive/Lectures - IITB/Semester 5/CE 310 Transport I/Project/nightdata.csv', header=T, na.strings=c(""))
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{data.journals}
\alias{data.journals}
\title{Data on 3879 papers published in American Nautralist, Ecology, and Ecography
in years 1995, 1999, 2003, 2007, 2011, and 2019}
\format{
An object of class \code{data.frame... | /man/data.journals.Rd | no_license | petrkeil/spasm | R | false | true | 649 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{data.journals}
\alias{data.journals}
\title{Data on 3879 papers published in American Nautralist, Ecology, and Ecography
in years 1995, 1999, 2003, 2007, 2011, and 2019}
\format{
An object of class \code{data.frame... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/database.DBconfig.R
\name{remove_legalLabels}
\alias{remove_legalLabels}
\title{Remove legal labels of attributeDefinition of emuDB}
\usage{
remove_legalLabels(dbName, levelName, attributeDefinitionName, dbUUID = NULL)
}
\arguments{
\item{dbN... | /man/remove_legalLabels.Rd | no_license | anindo78/emuR | R | false | true | 654 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/database.DBconfig.R
\name{remove_legalLabels}
\alias{remove_legalLabels}
\title{Remove legal labels of attributeDefinition of emuDB}
\usage{
remove_legalLabels(dbName, levelName, attributeDefinitionName, dbUUID = NULL)
}
\arguments{
\item{dbN... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BUCKET.r
\name{get_uploads}
\alias{get_uploads}
\title{Multipart uploads}
\usage{
get_uploads(bucket, ...)
}
\arguments{
\item{bucket}{Character string with the name of the bucket, or an object of class \dQuote{s3_bucket}.}
\item{\dots}{Addi... | /man/get_uploads.Rd | no_license | instacart/aws.s3 | R | false | true | 611 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BUCKET.r
\name{get_uploads}
\alias{get_uploads}
\title{Multipart uploads}
\usage{
get_uploads(bucket, ...)
}
\arguments{
\item{bucket}{Character string with the name of the bucket, or an object of class \dQuote{s3_bucket}.}
\item{\dots}{Addi... |
source("common_functions.R")
source("set_config.R")
# Load the data frame if it is not loaded already
if (! any(ls() == "powerConsumptionData")) {
if (file.exists(datafile)) {
powerConsumptionData <- LoadPowerConsumptionData(datafile, analDates)
}
}
# If the power consumption data is ... | /plot2.R | no_license | rupendrab/ExData_Plotting1 | R | false | false | 545 | r | source("common_functions.R")
source("set_config.R")
# Load the data frame if it is not loaded already
if (! any(ls() == "powerConsumptionData")) {
if (file.exists(datafile)) {
powerConsumptionData <- LoadPowerConsumptionData(datafile, analDates)
}
}
# If the power consumption data is ... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinyjs)
library(shinysky)
library(shinythemes)
library(TropFishR)
source("run_elefan_ga.R... | /TropFishR_ELEFAN_ShinyApp/app.R | no_license | pink-sh/TropFishR_ShinyApp_DockerImage | R | false | false | 33,557 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinyjs)
library(shinysky)
library(shinythemes)
library(TropFishR)
source("run_elefan_ga.R... |
testlist <- list(rates = numeric(0), thresholds = numeric(0), x = c(1.61339628408773e-307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) | /grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610052064-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 251 | r | testlist <- list(rates = numeric(0), thresholds = numeric(0), x = c(1.61339628408773e-307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) |
#This code demonstrate BayesA model
rm(list=ls())
library(BATools)
data("Pig")
#Standardize genotype matrix
geno=std_geno(PigM,method="s",freq=PigAlleleFreq)
init=set.init(~driploss,data=PigPheno,geno=geno,~id,df=5,pi_snp=1,h2=0.5,c=NULL,model="BayesA",centered=TRUE)
#or set your own starting values using
#init=list... | /demo/BA.R | no_license | lijinlong1991/BATools | R | false | false | 1,020 | r | #This code demonstrate BayesA model
rm(list=ls())
library(BATools)
data("Pig")
#Standardize genotype matrix
geno=std_geno(PigM,method="s",freq=PigAlleleFreq)
init=set.init(~driploss,data=PigPheno,geno=geno,~id,df=5,pi_snp=1,h2=0.5,c=NULL,model="BayesA",centered=TRUE)
#or set your own starting values using
#init=list... |
# library(stringr)
# library(plyr)
# library(XML)
# fips.state=read.csv("./data/FIPS_state_file.txt", sep="|", stringsAsFactors=F)
# fips.county=read.csv("./data/FIPS_county_file.txt", sep=",", stringsAsFactors=F)
## this file needs extra help, due to commas in some of the subdiv
## names, which goofs up the read.cs... | /R/acs.R | no_license | josiahjohnston/acs | R | false | false | 99,070 | r |
# library(stringr)
# library(plyr)
# library(XML)
# fips.state=read.csv("./data/FIPS_state_file.txt", sep="|", stringsAsFactors=F)
# fips.county=read.csv("./data/FIPS_county_file.txt", sep=",", stringsAsFactors=F)
## this file needs extra help, due to commas in some of the subdiv
## names, which goofs up the read.cs... |
\name{biomass}
\alias{biomass}
\title{Biomass data from the Jena experiment between 2003 and 2008}
\usage{data(biomass)}
\arguments{}
\value{A site x species community matrix with plot code as rownames and species abbreviations as column names, format is: Gen.spe}
\description{Biomass data collected twice per year on t... | /Rpkg/JenaExp/man/biomass.Rd | no_license | Helonbio/Jena_Exp | R | false | false | 614 | rd | \name{biomass}
\alias{biomass}
\title{Biomass data from the Jena experiment between 2003 and 2008}
\usage{data(biomass)}
\arguments{}
\value{A site x species community matrix with plot code as rownames and species abbreviations as column names, format is: Gen.spe}
\description{Biomass data collected twice per year on t... |
#' Save xgboost model to text file
#'
#' Save a xgboost model to text file. Could be parsed later.
#'
#' @param model the model object.
#' @param fname the name of the text file where to save the model text dump. If not provided or set to \code{NULL} the function will return the model as a \code{character} vector.
#'... | /R-package/R/xgb.dump.R | permissive | geoHeil/xgboost | R | false | false | 2,989 | r | #' Save xgboost model to text file
#'
#' Save a xgboost model to text file. Could be parsed later.
#'
#' @param model the model object.
#' @param fname the name of the text file where to save the model text dump. If not provided or set to \code{NULL} the function will return the model as a \code{character} vector.
#'... |
#install.packages("bikedata")
library(bikedata)
library(RSQLite)
library(dplyr)
bike_data <- store_bikedata (city = 'nyc', bikedb = 'bikedb', dates = 201901:201905)
bikedb <- file.path ("bikedata/Data", "bikedb.sqlite")
la_2017 <- dl_bikedata (city = 'divvy', dates = 2015, quiet = TRUE)
store_bikedata (bikedb = 'bike... | /extract.R | no_license | Sayani07/gsoc2019 | R | false | false | 1,089 | r | #install.packages("bikedata")
library(bikedata)
library(RSQLite)
library(dplyr)
bike_data <- store_bikedata (city = 'nyc', bikedb = 'bikedb', dates = 201901:201905)
bikedb <- file.path ("bikedata/Data", "bikedb.sqlite")
la_2017 <- dl_bikedata (city = 'divvy', dates = 2015, quiet = TRUE)
store_bikedata (bikedb = 'bike... |
server <- function(input,output){
#############################
# PREMIER ONGLET - SOMMAIRE #
#############################
#---------------------------#
# FIRST FLUID ROW : SALAIRE #
#---------------------------#
#Total des salaires
output$tot_ <- renderInfoBox({
infoBox(... | /server.R | no_license | TBaill/AWS-ShinyTest | R | false | false | 5,480 | r | server <- function(input,output){
#############################
# PREMIER ONGLET - SOMMAIRE #
#############################
#---------------------------#
# FIRST FLUID ROW : SALAIRE #
#---------------------------#
#Total des salaires
output$tot_ <- renderInfoBox({
infoBox(... |
library(dsm)
### Name: plot_pred_by_term
### Title: Spatially plot predictions per model term
### Aliases: plot_pred_by_term
### ** Examples
## Not run:
##D library(Distance)
##D library(dsm)
##D
##D # load the Gulf of Mexico dolphin data and fit a model
##D data(mexdolphins)
##D hr.model <- ds(distdata, max(dist... | /data/genthat_extracted_code/dsm/examples/plot_pred_by_term.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 745 | r | library(dsm)
### Name: plot_pred_by_term
### Title: Spatially plot predictions per model term
### Aliases: plot_pred_by_term
### ** Examples
## Not run:
##D library(Distance)
##D library(dsm)
##D
##D # load the Gulf of Mexico dolphin data and fit a model
##D data(mexdolphins)
##D hr.model <- ds(distdata, max(dist... |
###############################
### 2010, David Ellinghaus ###
###############################
rm(list=ls())
file.lmiss = commandArgs()[4]
fraction_miss.thresh = as.numeric(commandArgs()[5])
lmiss = read.table(file.lmiss, as.is=T, header=T)
lmiss.log10F_MISS = log10(lmiss$F_MISS)
png(file=paste(file.lmiss, ".logsc... | /bin/loglmiss.r | permissive | jkaessens/gwas-assoc | R | false | false | 724 | r | ###############################
### 2010, David Ellinghaus ###
###############################
rm(list=ls())
file.lmiss = commandArgs()[4]
fraction_miss.thresh = as.numeric(commandArgs()[5])
lmiss = read.table(file.lmiss, as.is=T, header=T)
lmiss.log10F_MISS = log10(lmiss$F_MISS)
png(file=paste(file.lmiss, ".logsc... |
###Creat binary response
datraw <- read.csv("C:/Users/chloe/OneDrive - University of Calgary/641project/StudentMath.txt", sep=";")
View(datraw)
dat <- within(datraw, {ylatent= (G1+G2+G3)/3
y=ifelse(ylatent>median(ylatent),1,0)})
dat <- subset(dat,select = -c(G1,G2,G3,ylatent)) #remove columns
###Partition i... | /Random Forest Project Rcode.R | no_license | blankawan7/Random-forest-Project | R | false | false | 2,800 | r | ###Creat binary response
datraw <- read.csv("C:/Users/chloe/OneDrive - University of Calgary/641project/StudentMath.txt", sep=";")
View(datraw)
dat <- within(datraw, {ylatent= (G1+G2+G3)/3
y=ifelse(ylatent>median(ylatent),1,0)})
dat <- subset(dat,select = -c(G1,G2,G3,ylatent)) #remove columns
###Partition i... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 8.80121549150578e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615779081-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 348 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 8.80121549150578e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling... |
# Problem 1
#Create a vector V with 8 elements (7,2,1,0,3,-1,-3,4).
v <- c(7, 2, 1, 0, 3, -1, -3, 4);
#Transform that vector into a rectangular matrix A of dimensions 4X2 (4- rows, 2-columns).
A <- matrix(v, nrow = 4, ncol = 2)
A;
# Create a matrix transpose to the above matrix A. Call that matrix AT.
AT = t(A)
AT... | /Data-Problems.R | no_license | bytekoder/Data-Preprocessing-R | R | false | false | 4,853 | r | # Problem 1
#Create a vector V with 8 elements (7,2,1,0,3,-1,-3,4).
v <- c(7, 2, 1, 0, 3, -1, -3, 4);
#Transform that vector into a rectangular matrix A of dimensions 4X2 (4- rows, 2-columns).
A <- matrix(v, nrow = 4, ncol = 2)
A;
# Create a matrix transpose to the above matrix A. Call that matrix AT.
AT = t(A)
AT... |
##################################################################
#Global Warming Revisited(A) UVA-QA-0808
#This file uses the dataset published by NASA for monthly GLOBAL
#temperate from January 1880 through March 2019
##################################################################
#Loading the packages
... | /R_Projects/R_Time_Series_Global_Warming_Temperatures.R | no_license | andrewcowannagora/Queens-MMA-Data-Science | R | false | false | 54,197 | r | ##################################################################
#Global Warming Revisited(A) UVA-QA-0808
#This file uses the dataset published by NASA for monthly GLOBAL
#temperate from January 1880 through March 2019
##################################################################
#Loading the packages
... |
test.graphTest <- function() {
G1 <- rbind(c(0,0.5,0.5,0,0), c(0,0,1,0,0),
c(0, 0, 0, 1-0.01, 0.01), c(0, 1, 0, 0, 0),
c(0, 0, 0, 0, 0))
G2 <- rbind(c(0,0,1,0,0), c(0.5,0,0.5,0,0),
c(0, 0, 0, 0.01, 1-0.01), c(0, 0, 0, 0, 0),
c(1, 0, 0, 0, 0))
weights <- rbind(c(1, 0, 0, 0, 0), c(0, 1, 0, 0, 0))
pvals <... | /pkg/gMCP/inst/unitTests/runit.entangled.R | no_license | kornl/gMCP | R | false | false | 1,400 | r |
test.graphTest <- function() {
G1 <- rbind(c(0,0.5,0.5,0,0), c(0,0,1,0,0),
c(0, 0, 0, 1-0.01, 0.01), c(0, 1, 0, 0, 0),
c(0, 0, 0, 0, 0))
G2 <- rbind(c(0,0,1,0,0), c(0.5,0,0.5,0,0),
c(0, 0, 0, 0.01, 1-0.01), c(0, 0, 0, 0, 0),
c(1, 0, 0, 0, 0))
weights <- rbind(c(1, 0, 0, 0, 0), c(0, 1, 0, 0, 0))
pvals <... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/revokeCert.R
\name{revokeCert}
\alias{revokeCert}
\title{Revoke a certification for workers}
\usage{
revokeCert(email, password, cert, workers)
}
\arguments{
\item{email}{The researcher's email used for SentimentIt registration}
\item{passwo... | /classwork/day5MLE/packageStructure/sentimentIt/man/revokeCert.Rd | no_license | carlson9/QPMR | R | false | true | 1,893 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/revokeCert.R
\name{revokeCert}
\alias{revokeCert}
\title{Revoke a certification for workers}
\usage{
revokeCert(email, password, cert, workers)
}
\arguments{
\item{email}{The researcher's email used for SentimentIt registration}
\item{passwo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conta_ethnicity.R
\name{plot_ranked_predictions_per_chromosome}
\alias{plot_ranked_predictions_per_chromosome}
\title{Make tile plot of ranked predictions per chromosome}
\usage{
plot_ranked_predictions_per_chromosome(ranked_predictions)
}
\a... | /man/plot_ranked_predictions_per_chromosome.Rd | permissive | Dxiaomai/conta | R | false | true | 546 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conta_ethnicity.R
\name{plot_ranked_predictions_per_chromosome}
\alias{plot_ranked_predictions_per_chromosome}
\title{Make tile plot of ranked predictions per chromosome}
\usage{
plot_ranked_predictions_per_chromosome(ranked_predictions)
}
\a... |
# Pareto
dpareto = function(x, shape, scale = 1, log = FALSE) {
if (shape <= 0) {
stop("shape should be strictly positive.")
}
if (scale <= 0) {
stop("scale should be strictly positive.")
}
d = ifelse(x >= scale, shape/scale*(scale/x)^(shape+1), 0)
if (log) d = log(d)
return(d)
}
ppareto = funct... | /MATH 32/Lab 09/lab9pareto.R | no_license | gr8monk3ys/coursework | R | false | false | 1,269 | r | # Pareto
dpareto = function(x, shape, scale = 1, log = FALSE) {
if (shape <= 0) {
stop("shape should be strictly positive.")
}
if (scale <= 0) {
stop("scale should be strictly positive.")
}
d = ifelse(x >= scale, shape/scale*(scale/x)^(shape+1), 0)
if (log) d = log(d)
return(d)
}
ppareto = funct... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/common.R
\name{get_number_of_adv_pages}
\alias{get_number_of_adv_pages}
\title{Get the number of pages advs}
\usage{
get_number_of_adv_pages(marktplaats_url)
}
\arguments{
\item{marktplaats_url}{String containing the marktplaats url, which
co... | /man/get_number_of_adv_pages.Rd | permissive | DannyBannink/mpscraper | R | false | true | 630 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/common.R
\name{get_number_of_adv_pages}
\alias{get_number_of_adv_pages}
\title{Get the number of pages advs}
\usage{
get_number_of_adv_pages(marktplaats_url)
}
\arguments{
\item{marktplaats_url}{String containing the marktplaats url, which
co... |
library(medfate)
### Name: examplemeteo
### Title: Example daily meteorology data
### Aliases: examplemeteo
### Keywords: datasets
### ** Examples
data(examplemeteo)
| /data/genthat_extracted_code/medfate/examples/examplemeteo.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 173 | r | library(medfate)
### Name: examplemeteo
### Title: Example daily meteorology data
### Aliases: examplemeteo
### Keywords: datasets
### ** Examples
data(examplemeteo)
|
#' cli situation report
#'
#' Contains currenty:
#' * `cli_unicode_option`: whether the `cli.unicode` option is set and its
#' value. See [is_utf8_output()].
#' * `symbol_charset`: the selected character set for [symbol], UTF-8,
#' Windows, or ASCII.
#' * `console_utf8`: whether the console supports UTF-8. See
#' ... | /R/sitrep.R | permissive | DavisVaughan/cli | R | false | false | 1,618 | r |
#' cli situation report
#'
#' Contains currenty:
#' * `cli_unicode_option`: whether the `cli.unicode` option is set and its
#' value. See [is_utf8_output()].
#' * `symbol_charset`: the selected character set for [symbol], UTF-8,
#' Windows, or ASCII.
#' * `console_utf8`: whether the console supports UTF-8. See
#' ... |
\name{Daim}
\alias{Daim}
\title{
Diagnostic accuracy of classification models.
}
\description{
Estimation of misclassification rate, sensitivity, specificity and AUC based on
cross-validation (CV) or various bootstrap techniques.
}
\usage{
Daim(formula, model = NULL, data = NULL, control = Daim.control(),
... | /man/Daim.Rd | no_license | cran/Daim | R | false | false | 5,619 | rd | \name{Daim}
\alias{Daim}
\title{
Diagnostic accuracy of classification models.
}
\description{
Estimation of misclassification rate, sensitivity, specificity and AUC based on
cross-validation (CV) or various bootstrap techniques.
}
\usage{
Daim(formula, model = NULL, data = NULL, control = Daim.control(),
... |
detach("package:StockPriceSimulator", unload = T)
library(StockPriceSimulator)
library(ggplot2)
library(purrr)
h <- heston(initial_stock_price = 50,
initial_volatility = .7,
time_to_maturity = 1,
seed = 1,
scale = 8760,
alpha = 0,
rho = 0,
... | /Tmp/Heston.R | no_license | AnthonyTedde/thesisDoc | R | false | false | 5,013 | r | detach("package:StockPriceSimulator", unload = T)
library(StockPriceSimulator)
library(ggplot2)
library(purrr)
h <- heston(initial_stock_price = 50,
initial_volatility = .7,
time_to_maturity = 1,
seed = 1,
scale = 8760,
alpha = 0,
rho = 0,
... |
# Create combinations
combos <- list()
if(fe_vars!=''){
controls <- c(controls, paste('factor(',fe_vars,')',sep='')) %>% unique(.)
}
for(i in 1:maxregN){
combos[[i]] <- combinations(n=length(controls[!(controls %in% free)]), r=i, v=controls[!(controls %in% free)], repeats.allowed=FALSE)
}
print(paste('2a. finished... | /src/1run_eba/1formulaCreate.R | no_license | MGanslmeier/ExtremeBoundaryAnalysis | R | false | false | 970 | r | # Create combinations
combos <- list()
if(fe_vars!=''){
controls <- c(controls, paste('factor(',fe_vars,')',sep='')) %>% unique(.)
}
for(i in 1:maxregN){
combos[[i]] <- combinations(n=length(controls[!(controls %in% free)]), r=i, v=controls[!(controls %in% free)], repeats.allowed=FALSE)
}
print(paste('2a. finished... |
#######################################
### 2010, David Ellinghaus ###
### 2019, Florian Uellendahl-Werth ###
#######################################
rm(list=ls())
file.genome = commandArgs()[4]
inc<-10000
library("stream")
genome<-DSD_ReadCSV(file.genome,sep="",skip=1,take=c(7,8))
wng<-T
lines_n<-0
png(fil... | /bin/ibd-plot-genomefile.r | permissive | jkaessens/gwas-assoc | R | false | false | 821 | r | #######################################
### 2010, David Ellinghaus ###
### 2019, Florian Uellendahl-Werth ###
#######################################
rm(list=ls())
file.genome = commandArgs()[4]
inc<-10000
library("stream")
genome<-DSD_ReadCSV(file.genome,sep="",skip=1,take=c(7,8))
wng<-T
lines_n<-0
png(fil... |
alg2NScore = c(0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.0214287667479 , 0 , 0 , 0 , 0.15 , 0 , 0 , 0.0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , ... | /src/analysis/rfiles/alg2N.R | no_license | azaman13/senior-project | R | false | false | 8,855 | r | alg2NScore = c(0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.0214287667479 , 0 , 0 , 0 , 0.15 , 0 , 0 , 0.0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0.0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , ... |
files <- raadtools::ocfiles(type = "L3m", product = "MODISA", time.resolution = "monthly", varname = "PAR")
library(raadtools)
library(sf)
library(measoshapes)
measo_regions_ll <- dplyr::inner_join(measoshapes::measo_regions05_ll, measo_names, "name")
ext <- extent(-180, 180,-80,-35)
library(dplyr)
files$month <- form... | /prototypes/MEASO05/PAR_draft.R | no_license | AustralianAntarcticDivision/measo-assess | R | false | false | 2,114 | r | files <- raadtools::ocfiles(type = "L3m", product = "MODISA", time.resolution = "monthly", varname = "PAR")
library(raadtools)
library(sf)
library(measoshapes)
measo_regions_ll <- dplyr::inner_join(measoshapes::measo_regions05_ll, measo_names, "name")
ext <- extent(-180, 180,-80,-35)
library(dplyr)
files$month <- form... |
# Library
library(tidyr)
library(dplyr)
# Read HOP table
data.raw <- read.table("./data/raw/fitness_defect_matrix_hom.txt", header = TRUE, sep="\t", nrows=4811)
# Read transporters names:
transporters <-read.csv("./data/raw/transporters.csv", header = FALSE, sep= ",", nrows=130)
# Save raw
data.quanti <- data.raw
#... | /R/format_data.R | no_license | IriLrnr/ChemicalGenomics | R | false | false | 1,004 | r | # Library
library(tidyr)
library(dplyr)
# Read HOP table
data.raw <- read.table("./data/raw/fitness_defect_matrix_hom.txt", header = TRUE, sep="\t", nrows=4811)
# Read transporters names:
transporters <-read.csv("./data/raw/transporters.csv", header = FALSE, sep= ",", nrows=130)
# Save raw
data.quanti <- data.raw
#... |
# https://www.flickr.com/photos/stringrbelle/49258652296
#' @rdname rosemary
#' @export
heart_sketch <- function(dir = NULL, ...) {
dir <- check_dir(dir)
file <- file.path(dir, "heart_sketch.png")
set.seed(169)
jasmines::entity_heart(1000) %>%
dplyr::mutate(x = x * .5, y = y * .5) %>%
jasmines::unfo... | /R/heart_sketch.R | permissive | enderakay/rosemary | R | false | false | 2,054 | r | # https://www.flickr.com/photos/stringrbelle/49258652296
#' @rdname rosemary
#' @export
heart_sketch <- function(dir = NULL, ...) {
dir <- check_dir(dir)
file <- file.path(dir, "heart_sketch.png")
set.seed(169)
jasmines::entity_heart(1000) %>%
dplyr::mutate(x = x * .5, y = y * .5) %>%
jasmines::unfo... |
# Cargamos la libreria ggplot para graficar, dplyr para modificar dataframes.
library(ggplot2)
library(dplyr)
# Declaramos nuestro directorio de trabajo, y de este, descargamos el archivo "laLiga.csv",
# el cuál se obtuvo escribiendo en un archivo el data frame resultante del postwork anterior.
setwd("C:/Users/v... | /Mod2/Postwork_3.R | no_license | Al-0/Bedu_Santander | R | false | false | 2,879 | r | # Cargamos la libreria ggplot para graficar, dplyr para modificar dataframes.
library(ggplot2)
library(dplyr)
# Declaramos nuestro directorio de trabajo, y de este, descargamos el archivo "laLiga.csv",
# el cuál se obtuvo escribiendo en un archivo el data frame resultante del postwork anterior.
setwd("C:/Users/v... |
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Make Layout for the Heatmap List — make_layout-HeatmapList-method • C... | /docs/reference/make_layout-HeatmapList-method.rd | permissive | jokergoo/ComplexHeatmap | R | false | false | 21,345 | rd | <!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Make Layout for the Heatmap List — make_layout-HeatmapList-method • C... |
\name{email}
\alias{email}
\title{
Send gmail with Attachments in R
}
\description{
Enables a user to send an email or text in R. Useful to alert the user that a simulation is complete.
}
\usage{
email(to, password, subject="R message", message="EOM", from=NULL,
attachment=NULL, server="smtp.gmail.com:587", usern... | /man/email.Rd | no_license | bshor/gmailR | R | false | false | 1,306 | rd | \name{email}
\alias{email}
\title{
Send gmail with Attachments in R
}
\description{
Enables a user to send an email or text in R. Useful to alert the user that a simulation is complete.
}
\usage{
email(to, password, subject="R message", message="EOM", from=NULL,
attachment=NULL, server="smtp.gmail.com:587", usern... |
# TRack individual movements of Z1 to C1
#
#'
#'@title Take disMELS output file dfrs (from readAllResults) and produce a map that tracks movement of sucessfully settled individuals
#'
#'@description Function to map tracks of settled individuals
#'
#'@return map showing tracks of settled individuals
require(RCurl)
sou... | /TrackMap.R | no_license | torrem/scFunctions | R | false | false | 2,230 | r | # TRack individual movements of Z1 to C1
#
#'
#'@title Take disMELS output file dfrs (from readAllResults) and produce a map that tracks movement of sucessfully settled individuals
#'
#'@description Function to map tracks of settled individuals
#'
#'@return map showing tracks of settled individuals
require(RCurl)
sou... |
library(natural)
### Name: olasso
### Title: Error standard deviation estimation using organic lasso
### Aliases: olasso
### ** Examples
set.seed(123)
sim <- make_sparse_model(n = 50, p = 200, alpha = 0.6, rho = 0.6, snr = 2, nsim = 1)
ol <- olasso(x = sim$x, y = sim$y[, 1])
| /data/genthat_extracted_code/natural/examples/olasso.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 283 | r | library(natural)
### Name: olasso
### Title: Error standard deviation estimation using organic lasso
### Aliases: olasso
### ** Examples
set.seed(123)
sim <- make_sparse_model(n = 50, p = 200, alpha = 0.6, rho = 0.6, snr = 2, nsim = 1)
ol <- olasso(x = sim$x, y = sim$y[, 1])
|
#' White noise generator
#'
#' White noise is a random noise with equal intensities at different
#' frequencies. It is most well-known as what appeared on old televisions when
#' no signal was found.
#'
#' @inheritParams noise_simplex
#'
#' @return For `noise_white()` a matrix if `length(dim) == 2` or an array if
#' `l... | /R/noise-white.R | permissive | JiaxiangBU/ambient | R | false | false | 2,563 | r | #' White noise generator
#'
#' White noise is a random noise with equal intensities at different
#' frequencies. It is most well-known as what appeared on old televisions when
#' no signal was found.
#'
#' @inheritParams noise_simplex
#'
#' @return For `noise_white()` a matrix if `length(dim) == 2` or an array if
#' `l... |
library(mmand, quietly=TRUE)
library(nat, quietly=TRUE)
create.average.images.2d <- function( file.folder, n, sigma, feature.file.pattern, barycenter){
res <- list()
files <- list.files(file.folder, pattern="*.nrrd", full.names=T)
for( i in 1:length(files)){
jacobian = read.nrrd(files[i])
image(jacob... | /Scripts/ANTS-TBM/create.images.R | no_license | KitwareMedical/UTM | R | false | false | 1,612 | r | library(mmand, quietly=TRUE)
library(nat, quietly=TRUE)
create.average.images.2d <- function( file.folder, n, sigma, feature.file.pattern, barycenter){
res <- list()
files <- list.files(file.folder, pattern="*.nrrd", full.names=T)
for( i in 1:length(files)){
jacobian = read.nrrd(files[i])
image(jacob... |
#+ setup
options("rgdal_show_exportToProj4_warnings"="none")
library('mapmisc')
if(!exists('mapmiscCachePath'))
mapmiscCachePath = system.file('extdata', package='mapmisc')
if(!exists('mapmiscCacheReadOnly'))
mapmiscCacheReadOnly = TRUE
options(
mapmiscCachePath = mapmiscCachePath,
mapmiscCacheReadOnly = m... | /tests/openmap.R | no_license | cran/mapmisc | R | false | false | 4,308 | r | #+ setup
options("rgdal_show_exportToProj4_warnings"="none")
library('mapmisc')
if(!exists('mapmiscCachePath'))
mapmiscCachePath = system.file('extdata', package='mapmisc')
if(!exists('mapmiscCacheReadOnly'))
mapmiscCacheReadOnly = TRUE
options(
mapmiscCachePath = mapmiscCachePath,
mapmiscCacheReadOnly = m... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | /r/tests/testthat/test-arrow.R | permissive | a2un/arrow | R | false | false | 2,012 | r | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
############################################################
#This is a file for the Model Exploration App
#it contains additional information that helps properly process it
############################################################
appsettings = list()
#Title of app, to be displayed on top of analyze tab
appsettin... | /auxiliary/oldfiles/modelexploration_settings.R | no_license | jligm-hash/DSAIRM | R | false | false | 1,333 | r | ############################################################
#This is a file for the Model Exploration App
#it contains additional information that helps properly process it
############################################################
appsettings = list()
#Title of app, to be displayed on top of analyze tab
appsettin... |
if(!require(pacman))install.packages("pacman")
pacman::p_load(rlang,
data.table,
ggplot2,
knitr,
mvtnorm) # add other packages needed to this list
# Sourcing all R files in the modules subdirectory
sourcefiles <- dir("DA_Functions_new", pattern="[.]R$", recu... | /include/prepare.R | no_license | mingkaijiang/EucFACE_C_Data_Assimilation | R | false | false | 386 | r |
if(!require(pacman))install.packages("pacman")
pacman::p_load(rlang,
data.table,
ggplot2,
knitr,
mvtnorm) # add other packages needed to this list
# Sourcing all R files in the modules subdirectory
sourcefiles <- dir("DA_Functions_new", pattern="[.]R$", recu... |
#Reading in the file
library(readxl)
data <- read_excel("Mexican Bariatric Surgery Database_april_2019.xlsx")
## Classification based on Diagnostic Status
final <- data[,c(2, 3, 4, 19, 20, 21, 13, 15, 62, 74, 42, 43, 37)]#Subsetting the required variables
final <- final[-c(1, 2), ]#Removing first two rows
libr... | /NAFLD_Research.R | no_license | raghavagovil/NAFLD-Research | R | false | false | 7,732 | r | #Reading in the file
library(readxl)
data <- read_excel("Mexican Bariatric Surgery Database_april_2019.xlsx")
## Classification based on Diagnostic Status
final <- data[,c(2, 3, 4, 19, 20, 21, 13, 15, 62, 74, 42, 43, 37)]#Subsetting the required variables
final <- final[-c(1, 2), ]#Removing first two rows
libr... |
#' Today
#' Get today's date
#'
#' @param sep Character. Format separator. Default is "_".
#' @param format Character. Return computer-friendly or human-friendly format. One in c("computer", "human").
#'
#' @return Character.
#' @export
#'
#' @examples today()
today <- function(format = "computer", sep = "_")
{
st... | /R/today.R | no_license | MirzaCengic/Rahat | R | false | false | 612 | r | #' Today
#' Get today's date
#'
#' @param sep Character. Format separator. Default is "_".
#' @param format Character. Return computer-friendly or human-friendly format. One in c("computer", "human").
#'
#' @return Character.
#' @export
#'
#' @examples today()
today <- function(format = "computer", sep = "_")
{
st... |
## A pair of functions that allow caching of matrix
## inversions
## Creates an object which holds a matrix and
## it's inverse, with function for getting and setting them.
makeCacheMatrix <- function(x = matrix()) {
matrixInverse <- NULL
set <- function(matrix) {
x <<- matrix
matrixInver... | /cachematrix.R | no_license | relentless/ProgrammingAssignment2 | R | false | false | 966 | r | ## A pair of functions that allow caching of matrix
## inversions
## Creates an object which holds a matrix and
## it's inverse, with function for getting and setting them.
makeCacheMatrix <- function(x = matrix()) {
matrixInverse <- NULL
set <- function(matrix) {
x <<- matrix
matrixInver... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{sqs}
\alias{sqs}
\title{Amazon Simple Queue Service}
\usage{
sqs(config = list(), credentials = list(), endpoint = NULL, region = NULL)
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.
\... | /cran/paws/man/sqs.Rd | permissive | paws-r/paws | R | false | true | 8,649 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{sqs}
\alias{sqs}
\title{Amazon Simple Queue Service}
\usage{
sqs(config = list(), credentials = list(), endpoint = NULL, region = NULL)
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.
\... |
\name{ecospat.recstrat_prop}
\alias{ecospat.recstrat_prop}
\title{
Random Ecologically Stratified Sampling of propotional numbers
}
\description{
This function randomly collects a user-defined total number of samples from the stratification layer.
}
\usage{
ecospat.recstrat_prop(in_grid, sample_no)
}... | /ecospat/man/ecospat.recstrat_prop.Rd | no_license | lzhangss/ecospat | R | false | false | 1,671 | rd | \name{ecospat.recstrat_prop}
\alias{ecospat.recstrat_prop}
\title{
Random Ecologically Stratified Sampling of propotional numbers
}
\description{
This function randomly collects a user-defined total number of samples from the stratification layer.
}
\usage{
ecospat.recstrat_prop(in_grid, sample_no)
}... |
enmevaluate_modif<-function (occ, env, bg.coords = NULL, occ.grp = NULL, bg.grp = NULL,
RMvalues = seq(0.5, 4, 0.5), fc = c("L", "LQ",
"H", "LQH", "LQHP", "LQHPT"),
categoricals = NULL, n.bg = ... | /enmevaluate_modif.R | no_license | Menjaflors/Gentiana-alpina | R | false | false | 4,433 | r |
enmevaluate_modif<-function (occ, env, bg.coords = NULL, occ.grp = NULL, bg.grp = NULL,
RMvalues = seq(0.5, 4, 0.5), fc = c("L", "LQ",
"H", "LQH", "LQHP", "LQHPT"),
categoricals = NULL, n.bg = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Report-methods.R
\name{addReportList}
\alias{addReportList}
\title{addReportList}
\usage{
addReportList(report, txt, type = "u")
}
\arguments{
\item{report}{Report to write the text to.}
\item{txt}{Non-empty list of items to be written. An a... | /man/addReportList.Rd | no_license | demuellae/muReportR | R | false | true | 2,086 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Report-methods.R
\name{addReportList}
\alias{addReportList}
\title{addReportList}
\usage{
addReportList(report, txt, type = "u")
}
\arguments{
\item{report}{Report to write the text to.}
\item{txt}{Non-empty list of items to be written. An a... |
result <- rnorm(1000, mean=1, sd=0.5)
| /Programming Language Detection/Experiment-2/Dataset/Train/R/random-numbers.r | no_license | dlaststark/machine-learning-projects | R | false | false | 38 | r | result <- rnorm(1000, mean=1, sd=0.5)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_difference_frequencies.R
\name{plot_difference_frequencies}
\alias{plot_difference_frequencies}
\title{Plot the change in frequency between the start and end of a simulation}
\usage{
plot_difference_frequencies(
results,
picked_ances... | /man/plot_difference_frequencies.Rd | no_license | richelbilderbeek/GenomeAdmixR | R | false | true | 1,813 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_difference_frequencies.R
\name{plot_difference_frequencies}
\alias{plot_difference_frequencies}
\title{Plot the change in frequency between the start and end of a simulation}
\usage{
plot_difference_frequencies(
results,
picked_ances... |
library(dplyr)
library(ggplot2)
library(tidyverse)
library(RColorBrewer)
library(grid)
library(extrafont)
library(stringr)
library(cowplot)
font_import()
cpu_type <- "Intel i7-8700K"
#cpu_type <- "AMD Ryzen 5 5600G"
find_maxy <- function( runs ) {
rng <- runs %>% group_by( name ) %>% group_map( ~ median_hilow(... | /graphs/graph_results.R | permissive | ajunlonglive/coroutine-benchmarks | R | false | false | 3,875 | r |
library(dplyr)
library(ggplot2)
library(tidyverse)
library(RColorBrewer)
library(grid)
library(extrafont)
library(stringr)
library(cowplot)
font_import()
cpu_type <- "Intel i7-8700K"
#cpu_type <- "AMD Ryzen 5 5600G"
find_maxy <- function( runs ) {
rng <- runs %>% group_by( name ) %>% group_map( ~ median_hilow(... |
###############################################################################
### ###
### Predictive Analytics 3 - ###
### Dimension Reduction, Clustering and Association Rules - Using R #... | /PA3 R_ (Cereals).R | no_license | pmoise1981/Projects | R | false | false | 3,091 | r | ###############################################################################
### ###
### Predictive Analytics 3 - ###
### Dimension Reduction, Clustering and Association Rules - Using R #... |
## Together these two functions create a matrix function where the inverse can be stored in cache,
## to avoid the costly computation of it inverse multiple times.
## The first function, makeCacheMatrix creates a special "matrix", which is really a list containing a function to
##
## set the value of the matrix
## g... | /cachematrix.R | no_license | Chip57/ProgrammingAssignment2 | R | false | false | 1,379 | r |
## Together these two functions create a matrix function where the inverse can be stored in cache,
## to avoid the costly computation of it inverse multiple times.
## The first function, makeCacheMatrix creates a special "matrix", which is really a list containing a function to
##
## set the value of the matrix
## g... |
##' @title Get a human readable timestamp as string.
##'
##' @description
##' Return a human readable timestamp as a string: 'YYYYMMDD-HHMMSS'.
##'
##' @details
##' Convenience function to get a human readable timestamp string: 'YYYYMMDD-HHMMSS'.
##' This is mostly useful for including in filenames.
##'
##' @return A s... | /R/timestamp.R | permissive | davebraze/FDButils | R | false | false | 554 | r | ##' @title Get a human readable timestamp as string.
##'
##' @description
##' Return a human readable timestamp as a string: 'YYYYMMDD-HHMMSS'.
##'
##' @details
##' Convenience function to get a human readable timestamp string: 'YYYYMMDD-HHMMSS'.
##' This is mostly useful for including in filenames.
##'
##' @return A s... |
#################################################
## Calculating mangrove trend based on new data
## June 8 2015, MRF
## See issue #481 for more details
#################################################
## The original data file downloaded from the website was: 'MASTER TABLE - All Countries.csv'
## I hand changed the ... | /globalprep/hab_mangrove/v2015/MangroveTrend.R | no_license | OHI-Science/ohiprep_v2018 | R | false | false | 6,240 | r | #################################################
## Calculating mangrove trend based on new data
## June 8 2015, MRF
## See issue #481 for more details
#################################################
## The original data file downloaded from the website was: 'MASTER TABLE - All Countries.csv'
## I hand changed the ... |
centroidSimpleWrapper = function(IMAGE, INIT.X, INIT.Y, A, B, NOISE.DIM, ALPHA, LOCALNOISE, DELTA, PIXLIM, PIXPROP, MAXITER, MINITER, SNRLIM, FINEITER, ISPOINT){
DATA = getPixels(INIT.X, INIT.Y, A, B, ALPHA, IMAGE)
# check the content of the rectangle
if((sum(is.null(DATA$PXLS_Z))>0) | (sum(is.na... | /codes/script_threads/wrapper.r | no_license | kyselica12/IPE-SC | R | false | false | 8,329 | r | centroidSimpleWrapper = function(IMAGE, INIT.X, INIT.Y, A, B, NOISE.DIM, ALPHA, LOCALNOISE, DELTA, PIXLIM, PIXPROP, MAXITER, MINITER, SNRLIM, FINEITER, ISPOINT){
DATA = getPixels(INIT.X, INIT.Y, A, B, ALPHA, IMAGE)
# check the content of the rectangle
if((sum(is.null(DATA$PXLS_Z))>0) | (sum(is.na... |
#' Consensus matrix heatmap from A consensus matrix
#'
#' @description This function creates a consensus matrix heatmap from a
#' consensus/ agreement matrix. The values of the consensus/ agreement
#' matrix are transformed in order to plot the heatmap.
#'
#' @param consmat A matrix of consensus/ agreement matrix... | /R/clustheatmap.R | no_license | cran/kmed | R | false | false | 3,011 | r | #' Consensus matrix heatmap from A consensus matrix
#'
#' @description This function creates a consensus matrix heatmap from a
#' consensus/ agreement matrix. The values of the consensus/ agreement
#' matrix are transformed in order to plot the heatmap.
#'
#' @param consmat A matrix of consensus/ agreement matrix... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/listFinishedTasks.R
\name{listFinishedTasks}
\alias{listFinishedTasks}
\title{List Finished Tasks}
\usage{
listFinishedTasks(...)
}
\arguments{
\item{\dots}{Additional arguments passed to \code{\link{abbyy_GET}}.}
}
\value{
A \code{data.frame... | /man/listFinishedTasks.Rd | permissive | KrishAK47/abbyyR | R | false | true | 872 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/listFinishedTasks.R
\name{listFinishedTasks}
\alias{listFinishedTasks}
\title{List Finished Tasks}
\usage{
listFinishedTasks(...)
}
\arguments{
\item{\dots}{Additional arguments passed to \code{\link{abbyy_GET}}.}
}
\value{
A \code{data.frame... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{getTextFiles}
\alias{getTextFiles}
\title{load text files from disk into a vector of character vectors
points to files, reads them into a character vector of the texts
with optional names, default being filenames
returns a named vector of complete, unedited tex... | /man/getTextFiles.Rd | no_license | behrica/quanteda | R | false | false | 1,067 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{getTextFiles}
\alias{getTextFiles}
\title{load text files from disk into a vector of character vectors
points to files, reads them into a character vector of the texts
with optional names, default being filenames
returns a named vector of complete, unedited tex... |
#-------------------------------------------------------------------------------
# Program: collectSensor
# Objective: collect data from the installations
# Creation: 06/06/2019
# Update:
#-------------------------------------------------------------------------------
#' @title collectSensor from the different install... | /R/collectSensor.R | no_license | JeanEudesH/networkvisu | R | false | false | 2,444 | r | #-------------------------------------------------------------------------------
# Program: collectSensor
# Objective: collect data from the installations
# Creation: 06/06/2019
# Update:
#-------------------------------------------------------------------------------
#' @title collectSensor from the different install... |
#' Function to compute a vector of 2 lagged values of a variable from panel data.
#'
#' The panel data have a set of time series for each entity (e.g. country)
#' arranged such that all time series data for one entitiy is together. The
#' data for the second entity should be below the entire data for first entity.
... | /generalCorr/R/Panel2Lag.R | no_license | ingted/R-Examples | R | false | false | 1,114 | r | #' Function to compute a vector of 2 lagged values of a variable from panel data.
#'
#' The panel data have a set of time series for each entity (e.g. country)
#' arranged such that all time series data for one entitiy is together. The
#' data for the second entity should be below the entire data for first entity.
... |
## ---- eval=TRUE----------------------------------------------------------
library(shinystan)
load('output\\my_stan.RData')
launch_shinystan(my_stan)
| /03HierarchicalModeling/shinystan.R | no_license | berkeley3/BDA-IZSTO | R | false | false | 152 | r | ## ---- eval=TRUE----------------------------------------------------------
library(shinystan)
load('output\\my_stan.RData')
launch_shinystan(my_stan)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SpecFunctions.R
\name{summary_mono}
\alias{summary_mono}
\title{summary_mono}
\usage{
summary_mono(
spectra.interest,
minFrequency = 0.5,
align.tolerance = 5e-04,
snr = 3,
halfWindowSize = 20,
top.N = 50
)
}
\arguments{
\item{spec... | /man/summary_mono.Rd | no_license | cran/MGMS2 | R | false | true | 1,334 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SpecFunctions.R
\name{summary_mono}
\alias{summary_mono}
\title{summary_mono}
\usage{
summary_mono(
spectra.interest,
minFrequency = 0.5,
align.tolerance = 5e-04,
snr = 3,
halfWindowSize = 20,
top.N = 50
)
}
\arguments{
\item{spec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_margins.R
\name{get_margins}
\alias{get_margins}
\title{Compute generation margin in a given area on an Antares Study.}
\usage{
get_margins(area = "fr", cluster_name = "gas_pcomp_peak", LOLD = 3,
tolerance = 0.01, unit_size = 100, abaqu... | /man/get_margins.Rd | no_license | baptsegu/antaresXpansion | R | false | true | 2,788 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_margins.R
\name{get_margins}
\alias{get_margins}
\title{Compute generation margin in a given area on an Antares Study.}
\usage{
get_margins(area = "fr", cluster_name = "gas_pcomp_peak", LOLD = 3,
tolerance = 0.01, unit_size = 100, abaqu... |
rASL <- function(n, x0=0, m=0, b=1) {
X <- rexp(n)
Z <- rnorm(n)
Y <- x0 + m*X + sqrt(b*X)*Z
return(Y)
}
| /Harvard/Stats221/pset2/rASL.R | no_license | k-ye/OpenCourses | R | false | false | 123 | r |
rASL <- function(n, x0=0, m=0, b=1) {
X <- rexp(n)
Z <- rnorm(n)
Y <- x0 + m*X + sqrt(b*X)*Z
return(Y)
}
|
fifa<-function(a)
{
d<-1:57
library(httr)
library(XML)
for(i in 1:a)
{
url<-paste('https://fifarenderz.com/20/players?page=',i,'&scope=DESC&filter=rating&bigcards=false',sep='')
urldata<-GET(url)
data<-htmlTreeParse(urldata,useInternalNodes=T)
Rating<-xpathS... | /FIFA/FifaMultiplePageAndPlayer.R | no_license | NamanDhavalDesai/R-Programming | R | false | false | 4,897 | r | fifa<-function(a)
{
d<-1:57
library(httr)
library(XML)
for(i in 1:a)
{
url<-paste('https://fifarenderz.com/20/players?page=',i,'&scope=DESC&filter=rating&bigcards=false',sep='')
urldata<-GET(url)
data<-htmlTreeParse(urldata,useInternalNodes=T)
Rating<-xpathS... |
## Data load
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
## Select data in Baltimore and for motor vehicles
NEIbalt_veh <- subset(NEI,fips == "24510" & type == "ON-ROAD")
## Create a new data-table with the sums of each year
require(plyr)
x3 <- ddply(NEIbalt, .(year), summar... | /PM25_q5.R | no_license | DataScienceSpencer/Fine_Par_Matter | R | false | false | 670 | r | ## Data load
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
## Select data in Baltimore and for motor vehicles
NEIbalt_veh <- subset(NEI,fips == "24510" & type == "ON-ROAD")
## Create a new data-table with the sums of each year
require(plyr)
x3 <- ddply(NEIbalt, .(year), summar... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.rcorex.R
\name{plot.rcorex}
\alias{plot.rcorex}
\title{Plot TC vs number of iterations for an rcorex object}
\usage{
\method{plot}{rcorex}(x, ...)
}
\arguments{
\item{x}{A fit corex model object}
\item{...}{Not used}
}
\value{
A ggplot2... | /man/plot.rcorex.Rd | permissive | jpkrooney/rcorex | R | false | true | 445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.rcorex.R
\name{plot.rcorex}
\alias{plot.rcorex}
\title{Plot TC vs number of iterations for an rcorex object}
\usage{
\method{plot}{rcorex}(x, ...)
}
\arguments{
\item{x}{A fit corex model object}
\item{...}{Not used}
}
\value{
A ggplot2... |
# plot 2. Code to plot total emissions from PM2.5 in the US from 1999 to 2008
# Coursera Exploratory Data Analysis
# Project 2, due week 3
# set working directory
setwd("~/Documents/R/ExData2")
# load library that contains ddply
library(plyr)
# read in data from .rds file
my_data <- readRDS("summarySCC_PM25.rds"... | /plot2.R | no_license | jotaboca/Exploratory-Data-Analysis-2 | R | false | false | 1,228 | r | # plot 2. Code to plot total emissions from PM2.5 in the US from 1999 to 2008
# Coursera Exploratory Data Analysis
# Project 2, due week 3
# set working directory
setwd("~/Documents/R/ExData2")
# load library that contains ddply
library(plyr)
# read in data from .rds file
my_data <- readRDS("summarySCC_PM25.rds"... |
# Getting and Cleaning Data Course Project
library(plyr)
# gather the required data sets
X_test <- read.table("./UCI HAR Dataset/test/X_test.txt")
X_train <- read.table("./UCI HAR Dataset/train/X_train.txt")
combinedX <- rbind(X_test,X_train)
y_test <- read.table("./UCI HAR Dataset/test/y_test.txt")
y_train <- re... | /run_analysis.R | no_license | manidamu/getdata_project | R | false | false | 1,758 | r |
# Getting and Cleaning Data Course Project
library(plyr)
# gather the required data sets
X_test <- read.table("./UCI HAR Dataset/test/X_test.txt")
X_train <- read.table("./UCI HAR Dataset/train/X_train.txt")
combinedX <- rbind(X_test,X_train)
y_test <- read.table("./UCI HAR Dataset/test/y_test.txt")
y_train <- re... |
#' Apply colors based on edge attribute values
#' @description Within a graph's internal edge data
#' frame (edf), use a categorical edge attribute to
#' generate a new edge attribute with color values.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param edge_attr_from the name of the edge attribute
... | /R/colorize_edge_attrs.R | no_license | pcuthbert/DiagrammeR | R | false | false | 7,285 | r | #' Apply colors based on edge attribute values
#' @description Within a graph's internal edge data
#' frame (edf), use a categorical edge attribute to
#' generate a new edge attribute with color values.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param edge_attr_from the name of the edge attribute
... |
#Author: Ruth Keane (ruth.keane19@imperial.ac.uk)
#Script: TestR.R
#Desc: prints text
#Arguments: none
#Input: none
#Output: none
#Date: Nov 2019
print("Hello, this is R!") | /Week7/Code/TestR.R | no_license | rbak54/CMEECourseWork | R | false | false | 173 | r | #Author: Ruth Keane (ruth.keane19@imperial.ac.uk)
#Script: TestR.R
#Desc: prints text
#Arguments: none
#Input: none
#Output: none
#Date: Nov 2019
print("Hello, this is R!") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynamodb_operations.R
\name{dynamodb_put_item}
\alias{dynamodb_put_item}
\title{Creates a new item, or replaces an old item with a new item}
\usage{
dynamodb_put_item(TableName, Item, Expected, ReturnValues,
ReturnConsumedCapacity, ReturnIt... | /cran/paws.database/man/dynamodb_put_item.Rd | permissive | TWarczak/paws | R | false | true | 13,727 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dynamodb_operations.R
\name{dynamodb_put_item}
\alias{dynamodb_put_item}
\title{Creates a new item, or replaces an old item with a new item}
\usage{
dynamodb_put_item(TableName, Item, Expected, ReturnValues,
ReturnConsumedCapacity, ReturnIt... |
library(stringr)
vslog <- getLogger('vis.summarize')
SplitTokenizer <- function(x) {
tokens = unlist(lapply(strsplit(words(x), split=";"), paste), use.names = FALSE)
return(tokens)
}
trim <- function (x) gsub("^\\s+|\\s+$", "", x)
expand_ngrams <- function(text, n) {
text <- trimws(text)
lapply(lapply(text,... | /server/preprocessing/other-scripts/summarize.R | permissive | OpenKnowledgeMaps/Headstart | R | false | false | 11,824 | r | library(stringr)
vslog <- getLogger('vis.summarize')
SplitTokenizer <- function(x) {
tokens = unlist(lapply(strsplit(words(x), split=";"), paste), use.names = FALSE)
return(tokens)
}
trim <- function (x) gsub("^\\s+|\\s+$", "", x)
expand_ngrams <- function(text, n) {
text <- trimws(text)
lapply(lapply(text,... |
##############################
# This is a shiny app for simulating a contrarian strategy
# using the Hampel filter over prices.
# It uses reactive code to avoid unnecessary calculations.
# It flips the position only if the indicator persists over several
# consecutive periods equal to lagg.
# This is the best perfor... | /app_hampel_prices_eventReactive.R | no_license | algoquant/presentations | R | false | false | 9,183 | r | ##############################
# This is a shiny app for simulating a contrarian strategy
# using the Hampel filter over prices.
# It uses reactive code to avoid unnecessary calculations.
# It flips the position only if the indicator persists over several
# consecutive periods equal to lagg.
# This is the best perfor... |
{
library(dataRetrieval); library(nhdplusTools);
library(raster); library(sf); library(fasterize);
library(wrfhydroSubsetter); library(AOI);
library(tidyverse); library(dplyr);
#library(resample);
}
# This script is prone to crash during debugging. In such cases, just restart R session. It solves most (if no... | /inst/GeneralPurpose.R | permissive | mikejohnson51/wrfhydroSubsetter | R | false | false | 2,519 | r | {
library(dataRetrieval); library(nhdplusTools);
library(raster); library(sf); library(fasterize);
library(wrfhydroSubsetter); library(AOI);
library(tidyverse); library(dplyr);
#library(resample);
}
# This script is prone to crash during debugging. In such cases, just restart R session. It solves most (if no... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/sarah's_mixem.R
\name{em.array.generator}
\alias{em.array.generator}
\title{em.array.generator}
\usage{
em.array.generator(max.step, b.j.hat, se.j.hat)
}
\arguments{
\item{b.j.hat}{= 1xR vector of MLEs}
\item{se.j.hat=1xR}{vector of ... | /man/em.array.generator.Rd | no_license | jhsiao999/matrix_ash | R | false | false | 661 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/sarah's_mixem.R
\name{em.array.generator}
\alias{em.array.generator}
\title{em.array.generator}
\usage{
em.array.generator(max.step, b.j.hat, se.j.hat)
}
\arguments{
\item{b.j.hat}{= 1xR vector of MLEs}
\item{se.j.hat=1xR}{vector of ... |
# EXPORTANDO DADOS DOS FUNDOS #
# sourcing Python code
reticulate::source_python("data-raw/fundos.py")
# converting to R
fundos = lapply(fundos, reticulate::py_to_r)
# exporting
usethis::use_data(fundos, overwrite = TRUE)
| /data-raw/fundos.R | permissive | IsabellyPassos/econdashboard | R | false | false | 226 | r | # EXPORTANDO DADOS DOS FUNDOS #
# sourcing Python code
reticulate::source_python("data-raw/fundos.py")
# converting to R
fundos = lapply(fundos, reticulate::py_to_r)
# exporting
usethis::use_data(fundos, overwrite = TRUE)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.