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 |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/va_products.R
\docType{class}
\name{GMDB}
\alias{GMDB}
\title{Variable Annuity with GMDB guarantee}
\format{\code{\link{R6Class}} object.}
\usage{
GMDB
}
\value{
Object of \code{\link{R6Class}}
}
\description{
Class for VA with Guaranteed Min... | /fuzzedpackages/valuer/man/GMDB.Rd | no_license | akhikolla/testpackages | R | false | true | 4,877 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/va_products.R
\docType{class}
\name{GMDB}
\alias{GMDB}
\title{Variable Annuity with GMDB guarantee}
\format{\code{\link{R6Class}} object.}
\usage{
GMDB
}
\value{
Object of \code{\link{R6Class}}
}
\description{
Class for VA with Guaranteed Min... |
#' Calculate statistical and physicochemical features for peptides
#'
#' This function is used to calculate several distinct families of features for
#' a vector of peptides.
#'
#' This function is partially based on functions [Peptides::aaComp()]
#' and [Peptides::aaDescriptors()] (check documentation for details).
#'... | /R/calc_features.R | no_license | richelbilderbeek/epitopes | R | false | false | 3,914 | r | #' Calculate statistical and physicochemical features for peptides
#'
#' This function is used to calculate several distinct families of features for
#' a vector of peptides.
#'
#' This function is partially based on functions [Peptides::aaComp()]
#' and [Peptides::aaDescriptors()] (check documentation for details).
#'... |
library("survival")
library("survminer")
library("boot")
data("kidney")
disease = cbind(with(kidney, model.matrix(~ disease + 0)))
df = as.data.frame(disease)
res.cox <- coxph(Surv(kidney$time, kidney$status) ~ kidney$age + kidney$sex + kidney$frail + df$diseasePKD + df$diseaseGN + df$diseaseAN )
summary(res.cox)
g... | /enrichment_projects/cp1-1/PH_Regression.R | no_license | pewilliams/isye-6404-fall18-proj | R | false | false | 407 | r |
library("survival")
library("survminer")
library("boot")
data("kidney")
disease = cbind(with(kidney, model.matrix(~ disease + 0)))
df = as.data.frame(disease)
res.cox <- coxph(Surv(kidney$time, kidney$status) ~ kidney$age + kidney$sex + kidney$frail + df$diseasePKD + df$diseaseGN + df$diseaseAN )
summary(res.cox)
g... |
working_dir <-paste(getwd(),"/",sep="")
data <-read.csv(paste(working_dir,"household_power_consumption.txt",sep=""),header=TRUE, sep=";",colClasses = "character",na.strings="?")
# Get Subset of data for desired days. fix date and time
feb <- subset(data,((as.Date(Date,"%d/%m/%Y")=="2007-02-01") | (as.Date(Date,"%d/%m/... | /Plot1.R | no_license | sadams261/ExData_Plotting1 | R | false | false | 646 | r | working_dir <-paste(getwd(),"/",sep="")
data <-read.csv(paste(working_dir,"household_power_consumption.txt",sep=""),header=TRUE, sep=";",colClasses = "character",na.strings="?")
# Get Subset of data for desired days. fix date and time
feb <- subset(data,((as.Date(Date,"%d/%m/%Y")=="2007-02-01") | (as.Date(Date,"%d/%m/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drugInteractions.R
\name{drugInteractions}
\alias{drugInteractions}
\title{Drug-Gene Interactions}
\usage{
drugInteractions(maf, top = 20, genes = NULL, plotType = "bar",
drugs = FALSE, fontSize = 0.8)
}
\arguments{
\item{maf}{an \code{\lin... | /man/drugInteractions.Rd | permissive | AxelitoMartin/maftools | R | false | true | 1,315 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drugInteractions.R
\name{drugInteractions}
\alias{drugInteractions}
\title{Drug-Gene Interactions}
\usage{
drugInteractions(maf, top = 20, genes = NULL, plotType = "bar",
drugs = FALSE, fontSize = 0.8)
}
\arguments{
\item{maf}{an \code{\lin... |
set.seed(1)
auror = read.table("~/files/data/auror.txt")
auror = auror[-which(auror[,3] == 0),]
n = nrow(auror)
# earnwke (weekly earnings in galleons)
# senior (senior if an auror prior to the second fall of voldemort,
# so a junior if the person became an auror after harry potter
# destroyed voldemor... | /sandbox/harry_potter.R | no_license | mickwar/r-sandbox | R | false | false | 1,271 | r | set.seed(1)
auror = read.table("~/files/data/auror.txt")
auror = auror[-which(auror[,3] == 0),]
n = nrow(auror)
# earnwke (weekly earnings in galleons)
# senior (senior if an auror prior to the second fall of voldemort,
# so a junior if the person became an auror after harry potter
# destroyed voldemor... |
/ModeloIntegradorTipoDeTiempo.R | no_license | jahuerta92/ForecastIntegration | R | false | false | 13,404 | r | ||
#Lotka-Volterra model
#set up parameter values
#create an object for 1000 total generations
totalGenerations <- 1000
#create an object for initial prey abundance at time t = 1
initPrey <- 100
#create an object for initial predator abundance at time t = 1
initPred <- 10
#create an object for the attack rate
a <- 0.01
... | /labs/lab05/Lotka-Volterra_model.R | no_license | catiehen/compbio_git_repo | R | false | false | 2,283 | r | #Lotka-Volterra model
#set up parameter values
#create an object for 1000 total generations
totalGenerations <- 1000
#create an object for initial prey abundance at time t = 1
initPrey <- 100
#create an object for initial predator abundance at time t = 1
initPred <- 10
#create an object for the attack rate
a <- 0.01
... |
# JAGS Code with Adaptive Shrinkage
# Required libraries
library(rjags);library(ggmcmc);library(ggplot2);library(ggthemes);library(pander);library(Cairo);library(MASS);library(parallel)
library(scales);library(plyr);require(gdata);require(runjags);require(gdata);require(caret);require(pROC);require(plyr)
cl <- ... | /script/DRAFT/Jags_logit_original.R | no_license | RafaelSdeSouza/Logit_Mar | R | false | false | 12,163 | r | # JAGS Code with Adaptive Shrinkage
# Required libraries
library(rjags);library(ggmcmc);library(ggplot2);library(ggthemes);library(pander);library(Cairo);library(MASS);library(parallel)
library(scales);library(plyr);require(gdata);require(runjags);require(gdata);require(caret);require(pROC);require(plyr)
cl <- ... |
## load following packages, if not already loaded
require(dplyr)
require(data.table)
require(lubridate)
## read text file into data table, then subset 2 dates for plotting; discard remaining data to declutter working environment
powerdata <- read.table("./household_power_consumption.txt", sep = ";", quote = ""... | /plot2.R | no_license | dlb727/ExData_Plotting1 | R | false | false | 1,082 | r | ## load following packages, if not already loaded
require(dplyr)
require(data.table)
require(lubridate)
## read text file into data table, then subset 2 dates for plotting; discard remaining data to declutter working environment
powerdata <- read.table("./household_power_consumption.txt", sep = ";", quote = ""... |
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615766984-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... |
# Download the chrome extension from the URL below
# in order to select and view CSS code elements on webpages.
# http://SelectorGadget.com
library(rvest)
library(stringr)
year = 2011
page <- html(paste0("http://www.presidency.ucsb.edu/executive_orders.php?year=",
year,
"&Subm... | /scripts/archive/WilCurationScript.R | no_license | christokita/executive-orders | R | false | false | 903 | r | # Download the chrome extension from the URL below
# in order to select and view CSS code elements on webpages.
# http://SelectorGadget.com
library(rvest)
library(stringr)
year = 2011
page <- html(paste0("http://www.presidency.ucsb.edu/executive_orders.php?year=",
year,
"&Subm... |
#! /usr/bin/env Rscript
#install.packages(c("dplyr", "readr"))
library(dplyr)
library(readr)
#parse LINCS files
HPRT1data <- read_tsv("outputHPRT1Data.tsv", col_names = TRUE)
AURKAdata <- read_tsv("outputAURKAData.tsv", col_names = TRUE)
#open output files
HPRT1OutFile <- file("HPRT1_pert_comparison.tsv", "w")
AURK... | /LINCS_Perturbed_Comparison.R | no_license | parkerac/LINCS_heatmaps | R | false | false | 1,442 | r | #! /usr/bin/env Rscript
#install.packages(c("dplyr", "readr"))
library(dplyr)
library(readr)
#parse LINCS files
HPRT1data <- read_tsv("outputHPRT1Data.tsv", col_names = TRUE)
AURKAdata <- read_tsv("outputAURKAData.tsv", col_names = TRUE)
#open output files
HPRT1OutFile <- file("HPRT1_pert_comparison.tsv", "w")
AURK... |
\name{rLSgetConeNamei}
\alias{rLSgetConeNamei}
\title{Get the name of a cone with a specified index.}
\description{
R interface function for LINDO API function \code{LSgetConeNamei}. For more information,
please refer to LINDO API User Manual.
}
\usage{
rLSgetConeNamei(model,iCone)
}
\arguments{
... | /man/rLSgetConeNamei.Rd | no_license | cran/rLindo | R | false | false | 737 | rd | \name{rLSgetConeNamei}
\alias{rLSgetConeNamei}
\title{Get the name of a cone with a specified index.}
\description{
R interface function for LINDO API function \code{LSgetConeNamei}. For more information,
please refer to LINDO API User Manual.
}
\usage{
rLSgetConeNamei(model,iCone)
}
\arguments{
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ricker.R
\name{ricker.pvalue}
\alias{ricker.pvalue}
\title{Ricker p-value}
\usage{
ricker.pvalue(spawners, forecast.age)
}
\arguments{
\item{forecast.age}{A tible with one column}
\item{sibling}{A tible with one column}
}
\description{
Retur... | /man/ricker.pvalue.Rd | no_license | GregBuck/bbay.fcast | R | false | true | 444 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ricker.R
\name{ricker.pvalue}
\alias{ricker.pvalue}
\title{Ricker p-value}
\usage{
ricker.pvalue(spawners, forecast.age)
}
\arguments{
\item{forecast.age}{A tible with one column}
\item{sibling}{A tible with one column}
}
\description{
Retur... |
# Repeat for MI
# CREATE TEST/TRAIN SETS FOR CASES AND DEATHS, DIFFERENCED DATA SETS
casesMI <- tsMI[, "Cases"]
casesMI_train <- casesMI %>% window(end = c(2020, 120))
casesMI_test <- casesMI %>% window(end = c(2020, 130))
diff_casesMI <- diff(casesMI)
deathsMI <- tsMI[, "Deaths"]
deathsMI_train <- deathsMI %>% window(... | /Code/State level/ts_forecasting_MI.R | permissive | Reinalynn/Forecasting-COVID-19-Cases-and-Deaths-Using-Time-Series-in-R | R | false | false | 1,296 | r | # Repeat for MI
# CREATE TEST/TRAIN SETS FOR CASES AND DEATHS, DIFFERENCED DATA SETS
casesMI <- tsMI[, "Cases"]
casesMI_train <- casesMI %>% window(end = c(2020, 120))
casesMI_test <- casesMI %>% window(end = c(2020, 130))
diff_casesMI <- diff(casesMI)
deathsMI <- tsMI[, "Deaths"]
deathsMI_train <- deathsMI %>% window(... |
# Set working directory
setwd("/Users/jenbaltz/Dropbox/GouldLab/Project_Mosquito/Database/WFABC")
# Load libraries
require(MASS)
library(matrixStats)
### Do some stuff ------------------------------------
# Plot the posteriors for s
post_s <- read.table("WFABC_multiple_loci_posterior_s.txt")
post_s_1016 <- read.table... | /plot_selection.R | no_license | mrvella/IQTmosq | R | false | false | 6,125 | r | # Set working directory
setwd("/Users/jenbaltz/Dropbox/GouldLab/Project_Mosquito/Database/WFABC")
# Load libraries
require(MASS)
library(matrixStats)
### Do some stuff ------------------------------------
# Plot the posteriors for s
post_s <- read.table("WFABC_multiple_loci_posterior_s.txt")
post_s_1016 <- read.table... |
setup <- read.csv("setup.csv", comment.char = "#", header = TRUE)
host <- as.character(setup[grep("omero.host", setup$Key, ignore.case=T), ]$Value)
port <- strtoi(setup[grep("omero.port", setup$Key, ignore.case=T), ]$Value)
user <- as.character(setup[grep("omero.user", setup$Key, ignore.case=T), ]$Value)
pass <- as.ch... | /tests/testthat/test-OMEROTables.R | no_license | jburel/rOMERO-gateway | R | false | false | 1,764 | r | setup <- read.csv("setup.csv", comment.char = "#", header = TRUE)
host <- as.character(setup[grep("omero.host", setup$Key, ignore.case=T), ]$Value)
port <- strtoi(setup[grep("omero.port", setup$Key, ignore.case=T), ]$Value)
user <- as.character(setup[grep("omero.user", setup$Key, ignore.case=T), ]$Value)
pass <- as.ch... |
#!/usr/bin/env Rscript
initial.options <- commandArgs(trailingOnly = FALSE)
script_parent_dir <- dirname(sub("--file=", "", initial.options[grep("--file=", initial.options)]))
## begin warning handler
withCallingHandlers({
library(methods) # Because Rscript does not always do this
options('useFancyQuotes' = FALSE)
... | /tools/probam_suite/custom_pro_db/customProDB.R | permissive | ieguinoa/tools-galaxyp | R | false | false | 8,541 | r | #!/usr/bin/env Rscript
initial.options <- commandArgs(trailingOnly = FALSE)
script_parent_dir <- dirname(sub("--file=", "", initial.options[grep("--file=", initial.options)]))
## begin warning handler
withCallingHandlers({
library(methods) # Because Rscript does not always do this
options('useFancyQuotes' = FALSE)
... |
scaffoldObjectNames = scaffoldObjects[[1]]
source("makeTree.R")
reloadScenario = function() {
require(shinysky)
scenarioTree <<- makeTree("full", currentScenario)
myTreeObj <<- jstree.obj(scenarioTree)
myTree <<- jstree("jstree1", myTreeObj)
}
## Start with current Scenario.
currentScenario = defaultScen... | /CTDesignExperimenter/inst/shinyInterface/global.R | no_license | ShiyiShen/CTDesignExperimenter | R | false | false | 345 | r | scaffoldObjectNames = scaffoldObjects[[1]]
source("makeTree.R")
reloadScenario = function() {
require(shinysky)
scenarioTree <<- makeTree("full", currentScenario)
myTreeObj <<- jstree.obj(scenarioTree)
myTree <<- jstree("jstree1", myTreeObj)
}
## Start with current Scenario.
currentScenario = defaultScen... |
context("SES")
library(psychTestR)
app <- AppTester$new("apps/SES_DE")
# Enter id
app$expect_ui_text("Bitte gib Deine ID ein Weiter")
app$set_inputs(p_id = "abcde")
app$click_next()
app$expect_ui_text("Welchen höchsten Bildungsabschluss hat deine Mutter? Keinen Schulabschluss Haupt- oder Realschulabschluss Berufsaus... | /tests/testthat/test-SES_3-3_DE_minimum.R | permissive | NicolasRuth/psyquest | R | false | false | 3,874 | r | context("SES")
library(psychTestR)
app <- AppTester$new("apps/SES_DE")
# Enter id
app$expect_ui_text("Bitte gib Deine ID ein Weiter")
app$set_inputs(p_id = "abcde")
app$click_next()
app$expect_ui_text("Welchen höchsten Bildungsabschluss hat deine Mutter? Keinen Schulabschluss Haupt- oder Realschulabschluss Berufsaus... |
source("./util/features.R")
source("./util/wanted_features.R")
source("./steps/merge_data_sets.R")
source("./steps/extract_measurements.R")
source("./steps/label_variable_names.R")
source("./steps/rename_activities.R")
source("./steps/generate_averages_set.R")
runAnalysis <- function(dataDirectory = "UCI HAR Dataset"... | /run_analysis.R | no_license | javiercejudo/Getting-and-Cleaning-Data-Course-Project | R | false | false | 992 | r | source("./util/features.R")
source("./util/wanted_features.R")
source("./steps/merge_data_sets.R")
source("./steps/extract_measurements.R")
source("./steps/label_variable_names.R")
source("./steps/rename_activities.R")
source("./steps/generate_averages_set.R")
runAnalysis <- function(dataDirectory = "UCI HAR Dataset"... |
load_scripts <- function(...){
src = c(...)
for(s in src){
if(rlang::is_quosure(s)){
cat2('Executing a dynamic script...\n', level = 'INFO', sep = '')
eval(rlang::quo_squash(s), envir = globalenv())
}else{
cat2('Loading source - ', s, '\n', level = 'INFO', sep = '')
source(get_path(... | /inst/template/inst/tools/funcs.R | no_license | dipterix/rave | R | false | false | 5,085 | r | load_scripts <- function(...){
src = c(...)
for(s in src){
if(rlang::is_quosure(s)){
cat2('Executing a dynamic script...\n', level = 'INFO', sep = '')
eval(rlang::quo_squash(s), envir = globalenv())
}else{
cat2('Loading source - ', s, '\n', level = 'INFO', sep = '')
source(get_path(... |
m<-2^13;
a<-113;
b<-91;
x<-70;
p<-c(0.05,0.25,0.45,0.15,0.10);
c<-cumsum(p);
sum<-0;
sqsum<-0;
freq<-array(0,5);
for(i in 1:10)
{
x<-(a*x+b)%%m;
u<-as.double(x)/m;
for(j in 1:5)
if(u<c[j])
{
freq[j]<-freq[j]+1;
sum<-sum+j;
break;
}
}
mean<-as.double(sum)/10;
for(i in 1:5)
sqsum... | /assign 4/s.nimmagaddaMA226lab5/3a.R | no_license | yashvanjani/MA226-Monte-Carlo-Simulation | R | false | false | 479 | r | m<-2^13;
a<-113;
b<-91;
x<-70;
p<-c(0.05,0.25,0.45,0.15,0.10);
c<-cumsum(p);
sum<-0;
sqsum<-0;
freq<-array(0,5);
for(i in 1:10)
{
x<-(a*x+b)%%m;
u<-as.double(x)/m;
for(j in 1:5)
if(u<c[j])
{
freq[j]<-freq[j]+1;
sum<-sum+j;
break;
}
}
mean<-as.double(sum)/10;
for(i in 1:5)
sqsum... |
MHM2 <- function(COD, PASO1, NDP){
MHMSP <- COD %>%
filter(N.DE.PROYECTO == NDP)
MHMSP1 <- MHMSP[!is.na(MHMSP$COSTO.UNITARIO.TOTAL),]
MHMSP11 <- MHMSP1 %>%
select(16, 1, 22,21, 12, 24,25, 26,27,28) %>%
mutate(PLAN = 'APROBADO',
PROGRAMA = 'POTENCIAR',
'TIPO D... | /F MHM2.R | no_license | pachedi/pachedi | R | false | false | 1,287 | r | MHM2 <- function(COD, PASO1, NDP){
MHMSP <- COD %>%
filter(N.DE.PROYECTO == NDP)
MHMSP1 <- MHMSP[!is.na(MHMSP$COSTO.UNITARIO.TOTAL),]
MHMSP11 <- MHMSP1 %>%
select(16, 1, 22,21, 12, 24,25, 26,27,28) %>%
mutate(PLAN = 'APROBADO',
PROGRAMA = 'POTENCIAR',
'TIPO D... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shrtcts-package.R
\docType{package}
\name{shrtcts-package}
\alias{shrtcts}
\alias{shrtcts-package}
\title{shrtcts: Make Anything an RStudio Shortcut}
\description{
An easily customizable method for creating RStudio
addins from arbitrary R... | /man/shrtcts-package.Rd | permissive | jimsforks/shrtcts | R | false | true | 780 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/shrtcts-package.R
\docType{package}
\name{shrtcts-package}
\alias{shrtcts}
\alias{shrtcts-package}
\title{shrtcts: Make Anything an RStudio Shortcut}
\description{
An easily customizable method for creating RStudio
addins from arbitrary R... |
##############
# semi-supervised implementation of elastic net: Mark Culp "On The Semi-Supervised Joint Trained Elastic Net"
bootstrappedJointTrainingElasticNet <- function(Xl, Xu, y, Xv=list(), alphas=.1, gamma=1,lambda.min=TRUE,scale=TRUE,numbootstraps=10,ncores=0){
require(glmnet)
Nu <- nrow(Xu)
if(scal... | /analysis/JGLibrary.R | no_license | jguinney/virtualIC50 | R | false | false | 5,544 | r | ##############
# semi-supervised implementation of elastic net: Mark Culp "On The Semi-Supervised Joint Trained Elastic Net"
bootstrappedJointTrainingElasticNet <- function(Xl, Xu, y, Xv=list(), alphas=.1, gamma=1,lambda.min=TRUE,scale=TRUE,numbootstraps=10,ncores=0){
require(glmnet)
Nu <- nrow(Xu)
if(scal... |
setwd("G:/Coursera/exploratoryDataAnalysis/Assignment1/ExData_Plotting1")
#download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile = "household_power_consumption.zip")
options(stringsAsFactors = F)
hhPower <- read.table("household_power_consumption.txt", sep = ... | /plot3.R | no_license | MikeColinTaylor/ExData_Plotting1 | R | false | false | 1,150 | r |
setwd("G:/Coursera/exploratoryDataAnalysis/Assignment1/ExData_Plotting1")
#download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile = "household_power_consumption.zip")
options(stringsAsFactors = F)
hhPower <- read.table("household_power_consumption.txt", sep = ... |
# If you are running R on Windows you can easily upgrade to the
# latest version of R using the installr package. Simply run the
# following code:
# installing/loading the latest installr package:
install.packages("installr"); library(installr) # install+load installr
updateR() # updating R.
# Running "... | /upgrader.R | no_license | Albertoafonsojunior/R-Programming-Language | R | false | false | 595 | r |
# If you are running R on Windows you can easily upgrade to the
# latest version of R using the installr package. Simply run the
# following code:
# installing/loading the latest installr package:
install.packages("installr"); library(installr) # install+load installr
updateR() # updating R.
# Running "... |
path.split <- function(path) {
v <- strsplit(path, .Platform$path.sep, fixed=TRUE)[[1]]
# handle a trailing path.sep specially because of the way
# that strsplit works
pathc <- strsplit(path, '')[[1]]
if (length(pathc) > 0) {
if (pathc[length(pathc)] == .Platform$path.sep)
v[length(v) + 1] <- ''
... | /R/whichcmd.R | no_license | bigcomputing/R-big | R | false | false | 12,601 | r | path.split <- function(path) {
v <- strsplit(path, .Platform$path.sep, fixed=TRUE)[[1]]
# handle a trailing path.sep specially because of the way
# that strsplit works
pathc <- strsplit(path, '')[[1]]
if (length(pathc) > 0) {
if (pathc[length(pathc)] == .Platform$path.sep)
v[length(v) + 1] <- ''
... |
# library:
library(data.table)
library(dplyr)
# commandargs:
args=commandArgs(T)
in_file=args[1]
out_dir=args[2]
chr=args[3]
# in_file='../processed_data/160816/subsampling/Liver/Liver_52.allpairs.sid_parsed.20.txt'
# out_dir='../processed_data/eCAVIAR/eCAVIAR_input/Liver/'
# chr=20
# read input file list:
messag... | /eCAVIAR/select_eGene.R | no_license | chanibravo/hcasmc_eqtl | R | false | false | 3,074 | r | # library:
library(data.table)
library(dplyr)
# commandargs:
args=commandArgs(T)
in_file=args[1]
out_dir=args[2]
chr=args[3]
# in_file='../processed_data/160816/subsampling/Liver/Liver_52.allpairs.sid_parsed.20.txt'
# out_dir='../processed_data/eCAVIAR/eCAVIAR_input/Liver/'
# chr=20
# read input file list:
messag... |
laws_sabha_gauss <- function(
data, bandwidth, alpha = 0.05, method = c('laws', "sabha"),
initial_filter = 0.9, side = c("two", "right", "left"),
dimension = c("one", "two", "three")){
method <- match.arg(method)
side <- match.arg(side)
dimension <- match.arg(dimension)
x <- sqrt(nrow(data)) * colMeans(... | /R/laws.R | permissive | dipterix/focr | R | false | false | 3,283 | r |
laws_sabha_gauss <- function(
data, bandwidth, alpha = 0.05, method = c('laws', "sabha"),
initial_filter = 0.9, side = c("two", "right", "left"),
dimension = c("one", "two", "three")){
method <- match.arg(method)
side <- match.arg(side)
dimension <- match.arg(dimension)
x <- sqrt(nrow(data)) * colMeans(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/services.R
\name{create_service}
\alias{create_service}
\title{Prepares and publishes a service on the back-end}
\usage{
create_service(
type,
graph,
title = NULL,
description = NULL,
enabled = NULL,
configuration = NU... | /man/create_service.Rd | permissive | jonathom/openeo-r-client | R | false | true | 1,547 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/services.R
\name{create_service}
\alias{create_service}
\title{Prepares and publishes a service on the back-end}
\usage{
create_service(
type,
graph,
title = NULL,
description = NULL,
enabled = NULL,
configuration = NU... |
#'@title Generate Contour Overlay
#'
#'@description Calculates and returns an overlay of contour lines for the current height map.
#'
#'@param heightmap A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All grid points are assumed to be evenly spaced.
#'@param zscale Default `1`. ... | /R/generate_contour_overlay.R | no_license | cran/rayshader | R | false | false | 5,732 | r | #'@title Generate Contour Overlay
#'
#'@description Calculates and returns an overlay of contour lines for the current height map.
#'
#'@param heightmap A two-dimensional matrix, where each entry in the matrix is the elevation at that point. All grid points are assumed to be evenly spaced.
#'@param zscale Default `1`. ... |
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
suppressMessages(library(shiny))
suppressMessages(library(GGally))
suppressMessages(library(plotly))
su... | /server.R | no_license | arv832/wk4assign | R | false | false | 1,932 | r | #
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
suppressMessages(library(shiny))
suppressMessages(library(GGally))
suppressMessages(library(plotly))
su... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{elog2cbs}
\alias{elog2cbs}
\title{Faster implementation of BTYD::dc.ElogToCbsCbt that also returns summary statistic for estimating regularity}
\usage{
elog2cbs(elog, per = "week", T.cal = max(elog$date),
T.tot = max(elog$date))
}
\arguments{
\item{elog}{data... | /man/elog2cbs.Rd | no_license | uday1889/BTYDplus | R | false | false | 1,047 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{elog2cbs}
\alias{elog2cbs}
\title{Faster implementation of BTYD::dc.ElogToCbsCbt that also returns summary statistic for estimating regularity}
\usage{
elog2cbs(elog, per = "week", T.cal = max(elog$date),
T.tot = max(elog$date))
}
\arguments{
\item{elog}{data... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filterDimensions.R
\name{filterDimensionLat}
\alias{filterDimensionLat}
\title{Filter latitude dimension.}
\usage{
filterDimensionLat(x, latRange = NULL, verbose = FALSE)
}
\arguments{
\item{x}{cmip5data A \code{\link{cmip5data}} object.}
\i... | /man/filterDimensionLat.Rd | no_license | cran/RCMIP5 | R | false | true | 604 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filterDimensions.R
\name{filterDimensionLat}
\alias{filterDimensionLat}
\title{Filter latitude dimension.}
\usage{
filterDimensionLat(x, latRange = NULL, verbose = FALSE)
}
\arguments{
\item{x}{cmip5data A \code{\link{cmip5data}} object.}
\i... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/dissimilarity-based.R
\name{plot_ordination}
\alias{plot_ordination}
\title{Generate an Ordination Plot}
\usage{
plot_ordination(input, ordination_axes, color_cat, shape_cat, hulls = FALSE,
...)
}
\arguments{
\item{input}{The input ... | /man/plot_ordination.Rd | no_license | taramclancy/mctoolsr | R | false | false | 1,022 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/dissimilarity-based.R
\name{plot_ordination}
\alias{plot_ordination}
\title{Generate an Ordination Plot}
\usage{
plot_ordination(input, ordination_axes, color_cat, shape_cat, hulls = FALSE,
...)
}
\arguments{
\item{input}{The input ... |
# Shoji-Ozaki for the cusp catastrophy model
r <- 1
alpha <- -1
beta <- 1
lambda <- 2
epsilon <- 1
shoji_cusp_transition_density <- function(x, dt, r, alpha, beta, lambda, epsilon) {
drift <- r*(alpha + beta*(x - lambda) - (x - lambda)^3)
L <- r*(beta - 3*(x - lambda)^2)
M <- r*((epsilon/2)*(- 6*(x - lambda... | /cusp/shoji.R | no_license | velait/OUP | R | false | false | 1,321 | r | # Shoji-Ozaki for the cusp catastrophy model
r <- 1
alpha <- -1
beta <- 1
lambda <- 2
epsilon <- 1
shoji_cusp_transition_density <- function(x, dt, r, alpha, beta, lambda, epsilon) {
drift <- r*(alpha + beta*(x - lambda) - (x - lambda)^3)
L <- r*(beta - 3*(x - lambda)^2)
M <- r*((epsilon/2)*(- 6*(x - lambda... |
#This function to match names is used by two other functions in the package
#It automatically mathces the name from a source name to another
#For example, it will match the names of DOC samples to the CDOM filenames
#name is the .csv filename that will be created to verify if the matches is done correctly
selectMinSt... | /R/selectMinStringDist.R | permissive | RichardLaBrie/paRafac_correction | R | false | false | 603 | r | #This function to match names is used by two other functions in the package
#It automatically mathces the name from a source name to another
#For example, it will match the names of DOC samples to the CDOM filenames
#name is the .csv filename that will be created to verify if the matches is done correctly
selectMinSt... |
# ------------------------------------------------------------------------------
# Graphics of max PCC concentrations
# ------------------------------------------------------------------------------
## EMMA - these PCC plots are displaying:
## Parameters vs. Maximum Daily Average Bifenthrin Concentration in Water... | /probabilistic/PGC010/src/07b_pcc_graphics_max.R | no_license | puruckertom/yuan_urban_pesticides | R | false | false | 10,296 | r | # ------------------------------------------------------------------------------
# Graphics of max PCC concentrations
# ------------------------------------------------------------------------------
## EMMA - these PCC plots are displaying:
## Parameters vs. Maximum Daily Average Bifenthrin Concentration in Water... |
best <- function(state, outcome){
file <- read.table("outcome-of-care-measures.csv", header=T, sep=",")
states <- unique(file[['State']])
diseases <- c('heart failure', 'heart attack', 'pneumonia')
if ((state %in% states) && (outcome %in% diseases)){
if (outcome == "pneumonia") col_name = "Hospital.30.Day.Death.... | /ProgAss3/ProgAssignment3-data/best2.R | no_license | carmad94/2_ProgAss3 | R | false | false | 1,094 | r |
best <- function(state, outcome){
file <- read.table("outcome-of-care-measures.csv", header=T, sep=",")
states <- unique(file[['State']])
diseases <- c('heart failure', 'heart attack', 'pneumonia')
if ((state %in% states) && (outcome %in% diseases)){
if (outcome == "pneumonia") col_name = "Hospital.30.Day.Death.... |
require(nnet)
mdl.nn <- nnet(formula = label ~ ., data = ds.train, size = 36, MaxNWts = 60000)
pred.nn <- predict(mdl.nn, ds.val, "class")
conf.nn <- confusionMatrix(pred.nn, ds.val$label)
ds.train_sign <- ds.train
ds.train_sign[,2:ncol(ds.train_sign)] <- sign(ds.train_sign[,2:ncol(ds.train_sign)])
ds.val_sign <- ds.... | /train_nnet.R | no_license | T-StrawClown/DigitRecognizer | R | false | false | 618 | r | require(nnet)
mdl.nn <- nnet(formula = label ~ ., data = ds.train, size = 36, MaxNWts = 60000)
pred.nn <- predict(mdl.nn, ds.val, "class")
conf.nn <- confusionMatrix(pred.nn, ds.val$label)
ds.train_sign <- ds.train
ds.train_sign[,2:ncol(ds.train_sign)] <- sign(ds.train_sign[,2:ncol(ds.train_sign)])
ds.val_sign <- ds.... |
#=======================================================================
# Aula 01
#
# Tipos básicos de valor, criação e edição de objetos.
#
# Walmes Zeviani
#=======================================================================
#------------------------------... | /scripts/aula01.R | no_license | walmes/paer | R | false | false | 3,379 | r | #=======================================================================
# Aula 01
#
# Tipos básicos de valor, criação e edição de objetos.
#
# Walmes Zeviani
#=======================================================================
#------------------------------... |
biovol= function(tab)
{
res=as.data.frame(matrix(ncol=3,nrow=dim(tab)[1]))
colnames(res)=c("Species","V","A")
res[,1]=tab[,2]
attach(tab)
for(i in 1:dim(tab)[1])
{
if(tab[i,1]=="1-H")
{
#volume
V=(pi/6)*(a[i]^3)
#area
A=pi*(a[i]^2)
res[i,2]=V
res[i,3]=A}
... | /biovol.R | no_license | diogosbr/biovolume | R | false | false | 6,960 | r | biovol= function(tab)
{
res=as.data.frame(matrix(ncol=3,nrow=dim(tab)[1]))
colnames(res)=c("Species","V","A")
res[,1]=tab[,2]
attach(tab)
for(i in 1:dim(tab)[1])
{
if(tab[i,1]=="1-H")
{
#volume
V=(pi/6)*(a[i]^3)
#area
A=pi*(a[i]^2)
res[i,2]=V
res[i,3]=A}
... |
testlist <- list(iK = -436273152L)
result <- do.call(eDMA:::PowerSet,testlist)
str(result) | /eDMA/inst/testfiles/PowerSet/AFL_PowerSet/PowerSet_valgrind_files/1609869973-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 90 | r | testlist <- list(iK = -436273152L)
result <- do.call(eDMA:::PowerSet,testlist)
str(result) |
#############################################################################################
## Title: RBSA Analysis
## Author: Casey Stevens, Cadmus Group
## Created: 06/13/2017
## Updated:
## Billing ... | /Code/Table Code/MH - Lock Down/Item 99.R | no_license | casey-stevens/Cadmus-6000-2017 | R | false | false | 16,144 | r | #############################################################################################
## Title: RBSA Analysis
## Author: Casey Stevens, Cadmus Group
## Created: 06/13/2017
## Updated:
## Billing ... |
source("funs.R")
# ============================================================
# simulations:
f_functions <- list(dayloop2, dayloop2_A, dayloop2_B, dayloop2_C, dayloop2_D)
f_names <- c("dayloop2","dayloop2_A","dayloop2_B","dayloop2_C","dayloop2_D")
params <- unique(rbind(
expand.grid(method_id=1L:2L,i=(1L:10L)*10... | /old/test/sym.R | no_license | sebastienplat/datascienceCapstone | R | false | false | 3,250 | r | source("funs.R")
# ============================================================
# simulations:
f_functions <- list(dayloop2, dayloop2_A, dayloop2_B, dayloop2_C, dayloop2_D)
f_names <- c("dayloop2","dayloop2_A","dayloop2_B","dayloop2_C","dayloop2_D")
params <- unique(rbind(
expand.grid(method_id=1L:2L,i=(1L:10L)*10... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visRemoveEdges.R
\name{visRemoveEdges}
\alias{visRemoveEdges}
\title{Function to remove edges from network, with shiny only.}
\usage{
visRemoveEdges(graph, id)
}
\arguments{
\item{graph}{: a \code{\link{visNetworkProxy}} object}
\item{id}{:... | /man/visRemoveEdges.Rd | no_license | jongokko/visNetwork | R | false | true | 1,019 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visRemoveEdges.R
\name{visRemoveEdges}
\alias{visRemoveEdges}
\title{Function to remove edges from network, with shiny only.}
\usage{
visRemoveEdges(graph, id)
}
\arguments{
\item{graph}{: a \code{\link{visNetworkProxy}} object}
\item{id}{:... |
library(STAR)
### Name: %tt%
### Title: Time Transformation Using a gssanova Objet
### Aliases: %tt%
### Keywords: ts survival htest
### ** Examples
## Not run:
##D ## load e060517spont data set
##D data(e060517spont)
##D ## make a data frame using a 2 ms bin width
##D e060517spontDF <- mkGLMdf(e060517spont,0.002,... | /data/genthat_extracted_code/STAR/examples/tt.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,040 | r | library(STAR)
### Name: %tt%
### Title: Time Transformation Using a gssanova Objet
### Aliases: %tt%
### Keywords: ts survival htest
### ** Examples
## Not run:
##D ## load e060517spont data set
##D data(e060517spont)
##D ## make a data frame using a 2 ms bin width
##D e060517spontDF <- mkGLMdf(e060517spont,0.002,... |
#Loading Libraries
library("dplyr")
library("tidyverse")
library("lubridate")
install.packages("naniar")
library(naniar)
#Loading Data
getwd()
info <- read.table("./household_power_consumption.txt", stringsAsFactors = FALSE, header = TRUE, sep =";" )
head(info)
str(info)
#converting Date and time column type
info ... | /plot1.R | no_license | Chiranthi-Yasora/ExData_Plotting1 | R | false | false | 718 | r | #Loading Libraries
library("dplyr")
library("tidyverse")
library("lubridate")
install.packages("naniar")
library(naniar)
#Loading Data
getwd()
info <- read.table("./household_power_consumption.txt", stringsAsFactors = FALSE, header = TRUE, sep =";" )
head(info)
str(info)
#converting Date and time column type
info ... |
# INVOCATION
library(pdftools)
library(tm)
library(ggplot2)
library(ggdendro)
library(dendextend)
library(circlize)
# IMPORTING CUSTOMIZED STOPWORDS LIST
setwd("wherever")
stopwords <- read.csv("stopwordsConstitutions.csv", header = FALSE)
stopwords <- as.character(stopwords$V1)
flibbertigibbet <- c(stopwords, stopwor... | /Constitutions analysis.r | no_license | mstrickland256/constitutional-text-analysis | R | false | false | 2,042 | r | # INVOCATION
library(pdftools)
library(tm)
library(ggplot2)
library(ggdendro)
library(dendextend)
library(circlize)
# IMPORTING CUSTOMIZED STOPWORDS LIST
setwd("wherever")
stopwords <- read.csv("stopwordsConstitutions.csv", header = FALSE)
stopwords <- as.character(stopwords$V1)
flibbertigibbet <- c(stopwords, stopwor... |
iter <- 1e5
source("functions.R")
for (i in 1:iter) {
update_beta()
} | /main.R | no_license | maxdor/stat230 | R | false | false | 79 | r | iter <- 1e5
source("functions.R")
for (i in 1:iter) {
update_beta()
} |
# author: gina
# created: 7/2/2020
# purpose: fit curve to each eu
# last updated:
library(tidyverse)
library(scales)
library(nlraa)
library(nlme)
library(emmeans)
library(car) #--overwrites recode in dplyr
library(minpack.lm)
# data --------------------------------------------------------------------
dat <-
... | /02_fit-curves/03code_fit-curves-each-eu-AIC.R | no_license | vanichols/ghproj_Ncurve | R | false | false | 3,216 | r | # author: gina
# created: 7/2/2020
# purpose: fit curve to each eu
# last updated:
library(tidyverse)
library(scales)
library(nlraa)
library(nlme)
library(emmeans)
library(car) #--overwrites recode in dplyr
library(minpack.lm)
# data --------------------------------------------------------------------
dat <-
... |
library("dplyr", quietly = T)
# Parameters
weights <- c(1,4)
n_out <- 6
# Processing
dat <- read.table("./Output_Summary/good_output.txt", sep = "\t", header = T)
dat.mean <- dat %>%
group_by(i, j, k) %>%
summarise(Crit_AFInit_Mean = mean(Crit_AFInit),
Crit_HWRatio_Mean= mean(Crit_HWRatio))
ranks <- r... | /Leaf_Model_Iterate/Iterate_branch_anis/good_output_process.R | no_license | jebediah-kerman/Leaf_Model_Iterate_Latest | R | false | false | 489 | r | library("dplyr", quietly = T)
# Parameters
weights <- c(1,4)
n_out <- 6
# Processing
dat <- read.table("./Output_Summary/good_output.txt", sep = "\t", header = T)
dat.mean <- dat %>%
group_by(i, j, k) %>%
summarise(Crit_AFInit_Mean = mean(Crit_AFInit),
Crit_HWRatio_Mean= mean(Crit_HWRatio))
ranks <- r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms.R
\docType{data}
\name{GeomTimelineLabel}
\alias{GeomTimelineLabel}
\title{GeomTimelineLabel}
\format{
An object of class \code{GeomTimelinelabel} (inherits from \code{Geom}, \code{ggproto}, \code{gg}) of length 5.
}
\usage{
GeomTimelin... | /man/GeomTimelineLabel.Rd | permissive | KrainskiL/noaase | R | false | true | 404 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms.R
\docType{data}
\name{GeomTimelineLabel}
\alias{GeomTimelineLabel}
\title{GeomTimelineLabel}
\format{
An object of class \code{GeomTimelinelabel} (inherits from \code{Geom}, \code{ggproto}, \code{gg}) of length 5.
}
\usage{
GeomTimelin... |
library(tigerstats)
### Name: ttestGC
### Title: t-Procedures
### Aliases: ttestGC
### ** Examples
#One-sample t, 95%-confidence interval only:
ttestGC(~fastest,data=m111survey)
#For other confidence levels, set argument conf.level as desired. For 90%-interval:
ttestGC(~fastest,data=m111survey,conf.level=0.90)
#... | /data/genthat_extracted_code/tigerstats/examples/ttestGC.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 966 | r | library(tigerstats)
### Name: ttestGC
### Title: t-Procedures
### Aliases: ttestGC
### ** Examples
#One-sample t, 95%-confidence interval only:
ttestGC(~fastest,data=m111survey)
#For other confidence levels, set argument conf.level as desired. For 90%-interval:
ttestGC(~fastest,data=m111survey,conf.level=0.90)
#... |
## Script input: DATRASraw object d
## Objects to construct
## gr <- NULL
## map.pol <- NULL
## spatialRegions <- NULL
## spatialRegions2 <- NULL
## Optionally override:
gridConstruct <- function(d, km=.5){
## Grid
library(gridConstruct)
library(rgdal)
## gr <- gridConstruct(d,km=km)
## points(d$... | /mussel/R/gridConstruct.R | no_license | DTUAqua/limfjord | R | false | false | 6,044 | r | ## Script input: DATRASraw object d
## Objects to construct
## gr <- NULL
## map.pol <- NULL
## spatialRegions <- NULL
## spatialRegions2 <- NULL
## Optionally override:
gridConstruct <- function(d, km=.5){
## Grid
library(gridConstruct)
library(rgdal)
## gr <- gridConstruct(d,km=km)
## points(d$... |
demGpCov2D <- function(ind=c(1,2), path = getwd(),
filename = paste('demGpCov2D', ind[1],'_', ind[2], sep=''), png=FALSE, gif=FALSE) {
#require(fields)
# for (i in 1:length(.libPaths())) { ## Get gptk library location.
# if ('gptk' %in% .packages(T, lib.loc=.libPaths()[i])) {
# path
# source(past... | /R/demGpCov2D.R | no_license | SheffieldML/gptk | R | false | false | 2,789 | r | demGpCov2D <- function(ind=c(1,2), path = getwd(),
filename = paste('demGpCov2D', ind[1],'_', ind[2], sep=''), png=FALSE, gif=FALSE) {
#require(fields)
# for (i in 1:length(.libPaths())) { ## Get gptk library location.
# if ('gptk' %in% .packages(T, lib.loc=.libPaths()[i])) {
# path
# source(past... |
testlist <- list(b = c(1.80107070497287e-255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(metacoder:::centroid,testlist)
str(result) | /metacoder/inst/testfiles/centroid/AFL_centroid/centroid_valgrind_files/1615766129-test.R | permissive | akhikolla/updatedatatype-list3 | R | false | false | 141 | r | testlist <- list(b = c(1.80107070497287e-255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(metacoder:::centroid,testlist)
str(result) |
## Exploratory data analysis
## Project 1
## Plot 3
Sys.setlocale("LC_ALL","C")
unzip("exdata_data_household_power_consumption.zip")
a <- read.csv("household_power_consumption.txt",header=TRUE , sep=";")
head(a,n=10)
a$Date <- as.Date(a$Date, format="%d/%m/%Y")
data <- subset(a , Date=='2007-02-01'|Date=='2007-02-02')
... | /plot3.R | no_license | ermirshehaj/ExData_Plotting1 | R | false | false | 1,131 | r | ## Exploratory data analysis
## Project 1
## Plot 3
Sys.setlocale("LC_ALL","C")
unzip("exdata_data_household_power_consumption.zip")
a <- read.csv("household_power_consumption.txt",header=TRUE , sep=";")
head(a,n=10)
a$Date <- as.Date(a$Date, format="%d/%m/%Y")
data <- subset(a , Date=='2007-02-01'|Date=='2007-02-02')
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ImportCSV.R
\name{read_oxcal}
\alias{read_oxcal}
\title{Read MCMC output from OxCal}
\usage{
read_oxcal(file, quiet = "no")
}
\arguments{
\item{file}{Either a path to a CSV file, a connection,
or the value \code{clipboard()} to read from the ... | /man/read_oxcal.Rd | no_license | tsdye/ArchaeoPhases | R | false | true | 1,539 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ImportCSV.R
\name{read_oxcal}
\alias{read_oxcal}
\title{Read MCMC output from OxCal}
\usage{
read_oxcal(file, quiet = "no")
}
\arguments{
\item{file}{Either a path to a CSV file, a connection,
or the value \code{clipboard()} to read from the ... |
#************************************
#
# (C) Copyright IBM Corp. 2015
#
# Author: Bradley J Eck
#
#************************************
# File: expandedLinkTable-s3.r
#
# Purpose: define an s3 class for a link table
# with coordinates added
#' Expanded Link Table
#'
#' Create an expandedLinkTable o... | /R/expandedLinkTable-s3.r | no_license | BlomTbl/epanetReader | R | false | false | 3,072 | r | #************************************
#
# (C) Copyright IBM Corp. 2015
#
# Author: Bradley J Eck
#
#************************************
# File: expandedLinkTable-s3.r
#
# Purpose: define an s3 class for a link table
# with coordinates added
#' Expanded Link Table
#'
#' Create an expandedLinkTable o... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/celsius.R
\name{celsius}
\alias{celsius}
\title{Construction function for Celsius temperature}
\usage{
celsius(x)
}
\arguments{
\item{x}{Object with class "data.frame", "matrix", "numeric" or "integer"}
}
\value{
Objects of class "data.frame... | /man/celsius.Rd | no_license | cran/vein | R | false | true | 527 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/celsius.R
\name{celsius}
\alias{celsius}
\title{Construction function for Celsius temperature}
\usage{
celsius(x)
}
\arguments{
\item{x}{Object with class "data.frame", "matrix", "numeric" or "integer"}
}
\value{
Objects of class "data.frame... |
loglike.norm.singly.censored <-
function (x, censored, censoring.side, mean, sd)
{
if (!is.vector(x, mode = "numeric"))
stop("'x' must be a numeric vector")
if (!(is.vector(censored, mode = "numeric") || is.vector(censored,
mode = "logical")))
stop("'censored' must be a logica... | /R/loglike.norm.singly.censored.R | no_license | alexkowa/EnvStats | R | false | false | 3,283 | r | loglike.norm.singly.censored <-
function (x, censored, censoring.side, mean, sd)
{
if (!is.vector(x, mode = "numeric"))
stop("'x' must be a numeric vector")
if (!(is.vector(censored, mode = "numeric") || is.vector(censored,
mode = "logical")))
stop("'censored' must be a logica... |
library(fmdates)
### Name: shift
### Title: Shifting dates to good dates
### Aliases: shift
### ** Examples
library(lubridate)
ausy <- AUSYCalendar()
shift(ymd("20120229"), months(1), "u", ausy, FALSE)
shift(ymd("20120229"), months(1), "u", ausy, TRUE)
| /data/genthat_extracted_code/fmdates/examples/shift.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 260 | r | library(fmdates)
### Name: shift
### Title: Shifting dates to good dates
### Aliases: shift
### ** Examples
library(lubridate)
ausy <- AUSYCalendar()
shift(ymd("20120229"), months(1), "u", ausy, FALSE)
shift(ymd("20120229"), months(1), "u", ausy, TRUE)
|
div(id="InfoAdvancedOptionsBox",
box(width="100%",
fluidRow(width=12,
column(8,
div(
h2 ("Advanced Settings", style="color:#425e8c; font-size:145%; font-weight:500; margin-bottom: 15px"),
"To furthe... | /R/InfoAdvancedOptions.R | permissive | dphansti/CORAL | R | false | false | 12,119 | r | div(id="InfoAdvancedOptionsBox",
box(width="100%",
fluidRow(width=12,
column(8,
div(
h2 ("Advanced Settings", style="color:#425e8c; font-size:145%; font-weight:500; margin-bottom: 15px"),
"To furthe... |
source("helpFuncs/kernel.R")
library(shiny)
shinyUI(fluidPage(
titlePanel("Word Cloud"),
sidebarLayout(
# Sidebar with a slider and selection inputs
sidebarPanel(
selectInput("selection", "Choose a book:",
choices = books),
actionButton("update", "Change"),... | /ui.R | no_license | NIEHS/WorldCloud | R | false | false | 673 | r | source("helpFuncs/kernel.R")
library(shiny)
shinyUI(fluidPage(
titlePanel("Word Cloud"),
sidebarLayout(
# Sidebar with a slider and selection inputs
sidebarPanel(
selectInput("selection", "Choose a book:",
choices = books),
actionButton("update", "Change"),... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = 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, 0, 0, 0, 0, 0, 0, 0, 0), ra = numeric(0), relh = -1.72131968218895e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... | /meteor/inst/testfiles/ET0_PenmanMonteith/AFL_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1615837997-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 826 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = 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, 0, 0, 0, 0, 0, 0, 0, 0), ra = numeric(0), relh = -1.72131968218895e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... |
testlist <- list(A = structure(c(1.38997190089718e-309, 3.81575932257023e-236, 2.06850282841277e-255), .Dim = c(1L, 3L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613125825-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 226 | r | testlist <- list(A = structure(c(1.38997190089718e-309, 3.81575932257023e-236, 2.06850282841277e-255), .Dim = c(1L, 3L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
shinyUI(fluidPage(
titlePanel("R package:randomForest for West Nile Virus Prediction"),
sidebarLayout(
sidebarPanel(
helpText(h3('This shiny app allow user to use random forest to train the data. Tuning Parameters is allowed so that the user can see the influence of parameters. Since the ... | /shiny_project/ui.R | no_license | LinHungShi/DDP_ShinyProject | R | false | false | 2,367 | r |
shinyUI(fluidPage(
titlePanel("R package:randomForest for West Nile Virus Prediction"),
sidebarLayout(
sidebarPanel(
helpText(h3('This shiny app allow user to use random forest to train the data. Tuning Parameters is allowed so that the user can see the influence of parameters. Since the ... |
#===============================================================================
# 2020-07-01 -- covid19
# regional age differences and covid19
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
# Jose Manuel Aburto, jose.aburto@sociology.ox.ac.uk, @jm_aburto
#===================================================... | /R/prepare-data.R | permissive | rashamad/covid19-nuts3 | R | false | false | 7,084 | r | #===============================================================================
# 2020-07-01 -- covid19
# regional age differences and covid19
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com, @ikashnitsky
# Jose Manuel Aburto, jose.aburto@sociology.ox.ac.uk, @jm_aburto
#===================================================... |
# Title: Utility functions for Hawkes processes (Jessica Ji's MSc project)
# Author: Francesco Sanna Passino
# Affiliation: Department of Mathematics, Imperial College London
# Email: f.sannapassino@imperial.ac.uk
# Last updated: 27th August, 2021 - 18.30 (BST)
## Calculate intensity function
inte... | /hawkes_utility.R | permissive | fraspass/bikes_R | R | false | false | 6,061 | r | # Title: Utility functions for Hawkes processes (Jessica Ji's MSc project)
# Author: Francesco Sanna Passino
# Affiliation: Department of Mathematics, Imperial College London
# Email: f.sannapassino@imperial.ac.uk
# Last updated: 27th August, 2021 - 18.30 (BST)
## Calculate intensity function
inte... |
library(tidyverse)
library(tidytext)
library(wordcloud)
#Read data:
nobel_winners <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-05-14/nobel_winners.csv")
#Get list of words and their counts
words_df <- nobel_winners %>%
select(gender, motivation) %>%
filt... | /2019/week20/20190514.R | no_license | AmandaRP/tidytuesday | R | false | false | 725 | r | library(tidyverse)
library(tidytext)
library(wordcloud)
#Read data:
nobel_winners <- readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-05-14/nobel_winners.csv")
#Get list of words and their counts
words_df <- nobel_winners %>%
select(gender, motivation) %>%
filt... |
library(shiny)
shinyApp(
ui = navbarPage(
"Example navbarPage",
tabPanel("Histograms",
fluidPage(sidebarLayout(
sidebarPanel(
sliderInput("no_data", label = "Number of data",
min = 1000,
max = 5000,
value = 1000),
sliderInpu... | /shiny/Ex_Files_Int_Presentations_Shiny_R/Exercise Files/04_01/navbarPage.R | no_license | edimaudo/R-projects | R | false | false | 1,577 | r | library(shiny)
shinyApp(
ui = navbarPage(
"Example navbarPage",
tabPanel("Histograms",
fluidPage(sidebarLayout(
sidebarPanel(
sliderInput("no_data", label = "Number of data",
min = 1000,
max = 5000,
value = 1000),
sliderInpu... |
library(nc)
library(testthat)
library(data.table)
context("variable args syntax")
source(system.file("test_engines.R", package="nc", mustWork=TRUE), local=TRUE)
## In stringi there is a difference between matching an empty
## string, and an optional match that fails.
inames <- c("Species", "Petal.Length", "Sepal.Width... | /tests/testthat/test-CRAN-vec.R | no_license | tdhock/nc | R | false | false | 8,856 | r | library(nc)
library(testthat)
library(data.table)
context("variable args syntax")
source(system.file("test_engines.R", package="nc", mustWork=TRUE), local=TRUE)
## In stringi there is a difference between matching an empty
## string, and an optional match that fails.
inames <- c("Species", "Petal.Length", "Sepal.Width... |
##Author: Yinxiu Zhan
##Date: 2019.05.13
##NSMB Redolfi et al
#run after 01_alignment.R
#file containing the aligned bam file information: for more info https://bioconductor.org/packages/release/bioc/vignettes/QuasR/inst/doc/QuasR.html
samples="sample_bamfiles.txt"
pseudocount=0.2 #this correspond to the number ad... | /damC/02_quantification.R | no_license | zhanyinx/NMSB_2019_redolfi_et_al | R | false | false | 1,335 | r | ##Author: Yinxiu Zhan
##Date: 2019.05.13
##NSMB Redolfi et al
#run after 01_alignment.R
#file containing the aligned bam file information: for more info https://bioconductor.org/packages/release/bioc/vignettes/QuasR/inst/doc/QuasR.html
samples="sample_bamfiles.txt"
pseudocount=0.2 #this correspond to the number ad... |
# ____________________________________________________________________________
# Script information ####
# title: Split count OneK1K data by individual and cell type
# author: Jose Alquicira Hernandez
# date: 2021-09-13
# _____________________________________... | /bin/split_data.R | no_license | powellgenomicslab/onek1k_dea | R | false | false | 4,908 | r | # ____________________________________________________________________________
# Script information ####
# title: Split count OneK1K data by individual and cell type
# author: Jose Alquicira Hernandez
# date: 2021-09-13
# _____________________________________... |
joined = read.csv("data_sets/join_stats.csv", stringsAsFactors=FALSE)
joined$Seed_Diff = joined$Opp_Seed - joined$Seed
pw = joined$PW.Misc/(joined$PW.Misc+joined$PL.Misc)
pw_opp = joined$PW.Misc_._Opponent/
(joined$PW.Misc_._Opponent+joined$PL.Misc_._Opponent)
joined$Pyt_Win_Pct_Diff = pw-pw_opp
joined$Won_Series =... | /nba_scraper/4_factors.R | no_license | capstat/Capstone | R | false | false | 504 | r | joined = read.csv("data_sets/join_stats.csv", stringsAsFactors=FALSE)
joined$Seed_Diff = joined$Opp_Seed - joined$Seed
pw = joined$PW.Misc/(joined$PW.Misc+joined$PL.Misc)
pw_opp = joined$PW.Misc_._Opponent/
(joined$PW.Misc_._Opponent+joined$PL.Misc_._Opponent)
joined$Pyt_Win_Pct_Diff = pw-pw_opp
joined$Won_Series =... |
# prepare github
# library(usethis)
# ?use_github
# edit_r_environ()
# use_github(protocol = 'https', auth_token = Sys.getenv("GITHUB_PAT"))
# ##
library(here)
library(readxl)
library(tidyverse)
library(skimr)
rowdata <- read_excel("input/rohdata.xls") %>% as_tibble() %>%
janitor::clean_names() %>%
rename(ID =... | /import_data.R | no_license | optivent/Pregnants | R | false | false | 4,426 | r | # prepare github
# library(usethis)
# ?use_github
# edit_r_environ()
# use_github(protocol = 'https', auth_token = Sys.getenv("GITHUB_PAT"))
# ##
library(here)
library(readxl)
library(tidyverse)
library(skimr)
rowdata <- read_excel("input/rohdata.xls") %>% as_tibble() %>%
janitor::clean_names() %>%
rename(ID =... |
#' Calculate KS statistic
#'
#' Calculates the KS statistic between a reserve area and a reference area in \code{\link{brocolors}}
#'
#' @param spp species raster
#' @param eco boundary raster; e.g., ecoregion
#' @param net network raster; raster comprising one or more polygons
#'
#' @return A numeric value
#'
#' @auth... | /supp/R/calcKS.R | no_license | prvernier/surrogates | R | false | false | 1,615 | r | #' Calculate KS statistic
#'
#' Calculates the KS statistic between a reserve area and a reference area in \code{\link{brocolors}}
#'
#' @param spp species raster
#' @param eco boundary raster; e.g., ecoregion
#' @param net network raster; raster comprising one or more polygons
#'
#' @return A numeric value
#'
#' @auth... |
#' @export
#' @rdname Task
makeRegrTask = function(id = deparse(substitute(data)), data, target, weights = NULL, blocking = NULL, fixup.data = "warn", check.data = TRUE) {
assertString(id)
assertDataFrame(data)
assertString(target)
assertChoice(fixup.data, choices = c("no", "quiet", "warn"))
assertFlag(check.... | /R/RegrTask.R | no_license | HeidiSeibold/mlr | R | false | false | 930 | r | #' @export
#' @rdname Task
makeRegrTask = function(id = deparse(substitute(data)), data, target, weights = NULL, blocking = NULL, fixup.data = "warn", check.data = TRUE) {
assertString(id)
assertDataFrame(data)
assertString(target)
assertChoice(fixup.data, choices = c("no", "quiet", "warn"))
assertFlag(check.... |
# 12 or less successes, with a sample of size 28 with a 50% success rate ?
pbinom(12,size = 28, prob = 0.5)
#> [1] 0.2857
plot(dbinom(0:28, size=28,prob=0.63))
lines(dbinom(0:28, size=28, prob=0.2))
abline(v=12, col="red", lwd=2)
lines(dbinom(0:28, size=28,prob=0.3),col="blue")
# Power of true hypothesis with diffe... | /AppliedBiostatsI/DemoR/DoneInClass.R | no_license | ThibaultSchowing/unistuff | R | false | false | 646 | r |
# 12 or less successes, with a sample of size 28 with a 50% success rate ?
pbinom(12,size = 28, prob = 0.5)
#> [1] 0.2857
plot(dbinom(0:28, size=28,prob=0.63))
lines(dbinom(0:28, size=28, prob=0.2))
abline(v=12, col="red", lwd=2)
lines(dbinom(0:28, size=28,prob=0.3),col="blue")
# Power of true hypothesis with diffe... |
library(dygraphs)
library(shiny)
indiatourism <- read.csv('indiatourism.csv', stringsAsFactors = FALSE)
choices <- unique(indiatourism$Region)
shinyUI(pageWithSidebar(
headerPanel('International Tourism - Number of Arrivals in India between the Years 2000 to 2014'),
sidebarPanel(
... | /ui.R | no_license | bhuwaneshrajbd/BMR-Course-Project-Shiny-Application-and-Reproducible-Pitch | R | false | false | 756 | r | library(dygraphs)
library(shiny)
indiatourism <- read.csv('indiatourism.csv', stringsAsFactors = FALSE)
choices <- unique(indiatourism$Region)
shinyUI(pageWithSidebar(
headerPanel('International Tourism - Number of Arrivals in India between the Years 2000 to 2014'),
sidebarPanel(
... |
## Read the data
fullData <- read.csv("household_power_consumption.txt", header = TRUE, sep=";", stringsAsFactor = FALSE, na.strings = "?")
#Paste Date and Time into a single column
fullData$Date<- strptime(paste(fullData$Date,fullData$Time), "%d/%m/%Y %H:%M:%S")
smallData <- subset(fullData,as.Date(fullData$Date) =... | /plot3.R | no_license | yadavsandeep/ExData_Plotting1 | R | false | false | 882 | r | ## Read the data
fullData <- read.csv("household_power_consumption.txt", header = TRUE, sep=";", stringsAsFactor = FALSE, na.strings = "?")
#Paste Date and Time into a single column
fullData$Date<- strptime(paste(fullData$Date,fullData$Time), "%d/%m/%Y %H:%M:%S")
smallData <- subset(fullData,as.Date(fullData$Date) =... |
\name{matdistl2dnormpar}
\alias{matdistl2dnormpar}
\title{
Matrix of \eqn{L^2} distances between \eqn{L^2}-normed Gaussian densities given their parameters
}
\description{
Computes the matrix of the \eqn{L^2} distances between several multivariate (\eqn{p > 1}) or univariate (\eqn{p = 1}) \eqn{L^2}-normed Gaus... | /man/matdistl2dnormpar.Rd | no_license | cran/dad | R | false | false | 1,991 | rd | \name{matdistl2dnormpar}
\alias{matdistl2dnormpar}
\title{
Matrix of \eqn{L^2} distances between \eqn{L^2}-normed Gaussian densities given their parameters
}
\description{
Computes the matrix of the \eqn{L^2} distances between several multivariate (\eqn{p > 1}) or univariate (\eqn{p = 1}) \eqn{L^2}-normed Gaus... |
library(ggplot2)
library(dplyr)
library(stats)
library(base)
library(datasets)
# Unzip that given data into your working directory
# and read the .rds files into two veriables.
NEI_data <- readRDS("exdata_data_NEI_data/summarySCC_PM25.rds")
SCC_data <- readRDS("exdata_data_NEI_data/Source_Classification_Cod... | /plot3.R | no_license | SubramanyanKP/Exploratory-Data-Analysis-Week4-Assignment | R | false | false | 1,187 | r | library(ggplot2)
library(dplyr)
library(stats)
library(base)
library(datasets)
# Unzip that given data into your working directory
# and read the .rds files into two veriables.
NEI_data <- readRDS("exdata_data_NEI_data/summarySCC_PM25.rds")
SCC_data <- readRDS("exdata_data_NEI_data/Source_Classification_Cod... |
library(tidyverse)
library(ggplot2)
library(ggthemes)
library(reshape2)
source("2-eda.R")
setwd("~/R/AEC")
jiggle <- function(tpp_df, year, p_jiggle, mu_size, sd_size) {
df <- tpp_df %>% filter(Year == year)
# Select divisions to extract voters from, and how many voters to shuffle
extract_i <- ... | /3-montecarlo.R | no_license | khornlund/aec | R | false | false | 3,292 | r | library(tidyverse)
library(ggplot2)
library(ggthemes)
library(reshape2)
source("2-eda.R")
setwd("~/R/AEC")
jiggle <- function(tpp_df, year, p_jiggle, mu_size, sd_size) {
df <- tpp_df %>% filter(Year == year)
# Select divisions to extract voters from, and how many voters to shuffle
extract_i <- ... |
# ----------------------------------------------------
# LIST OF GRIDS FROM WHICH DATA NEEDS TO BE EXTRACTED
# ----------------------------------------------------
#GRID_Ids = c("GRID_LEARNRATE_NOANNEAL_2", "GRID_LEARNRATE_NOANNEAL_3", "GRID_LEARNRATE_NOANNEAL_4", "GRID_LEARNRATE_NOANNEAL_5", "GRID_LEARNRATE_NOANNEAL_6... | /2016_01_AllState_Claim_Severity_Prediction/Modelling/GRID_EXTRACT_SCRIPT.R | permissive | Kirosds/KAGGLE_2016_AllStateInsurance | R | false | false | 4,838 | r | # ----------------------------------------------------
# LIST OF GRIDS FROM WHICH DATA NEEDS TO BE EXTRACTED
# ----------------------------------------------------
#GRID_Ids = c("GRID_LEARNRATE_NOANNEAL_2", "GRID_LEARNRATE_NOANNEAL_3", "GRID_LEARNRATE_NOANNEAL_4", "GRID_LEARNRATE_NOANNEAL_5", "GRID_LEARNRATE_NOANNEAL_6... |
.onUnload <- function(libpath) {
library.dynam.unload("dlm", libpath)
}
| /R/zzz.R | no_license | cran/dlm | R | false | false | 77 | r |
.onUnload <- function(libpath) {
library.dynam.unload("dlm", libpath)
}
|
#! /usr/bin/env Rscript
'Time how long it takes to run cellchat given some samples
Usage:
04_cellchat_timing.r --number=<int> --group=<bool> --root=<str> --outputs=<str> [--seed=<int>]
Options:
-h --help Show this screen.
--number=<int> number of samples to include
--group=<bool> whether to grou... | /pbmc_samples/timing_src/time_cellchat.r | no_license | LewisLabUCSD/CCC-Benchmark | R | false | false | 9,342 | r | #! /usr/bin/env Rscript
'Time how long it takes to run cellchat given some samples
Usage:
04_cellchat_timing.r --number=<int> --group=<bool> --root=<str> --outputs=<str> [--seed=<int>]
Options:
-h --help Show this screen.
--number=<int> number of samples to include
--group=<bool> whether to grou... |
library(shiny)
library(r2d3)
library(dplyr)
# Define UI for application that draws a histogram
ui <- fluidPage(
tags$head(
tags$style(HTML("
@import url('//fonts.googleapis.com/css?family=Lobster|Cabin:400,700');
h1 {
font-family: 'Lobster', cursive;
font-weight: 500;
... | /PraceDomowe/TYDZIEN10/WiśniewskiJakub/app.R | no_license | Miki-Mal/2020Z-TechnikiWizualizacjiDanych | R | false | false | 3,270 | r |
library(shiny)
library(r2d3)
library(dplyr)
# Define UI for application that draws a histogram
ui <- fluidPage(
tags$head(
tags$style(HTML("
@import url('//fonts.googleapis.com/css?family=Lobster|Cabin:400,700');
h1 {
font-family: 'Lobster', cursive;
font-weight: 500;
... |
\name{relief}
\alias{relief}
\title{ RReliefF filter }
\description{
The algorithm finds weights of continous and discrete attributes basing on a distance between instances.
}
\usage{
relief(formula, data, neighbours.count = 5, sample.size = 10)
}
\arguments{
\item{formula}{ a symbolic description of a model }
\i... | /man/relief.Rd | no_license | larskotthoff/fselector | R | false | false | 1,353 | rd | \name{relief}
\alias{relief}
\title{ RReliefF filter }
\description{
The algorithm finds weights of continous and discrete attributes basing on a distance between instances.
}
\usage{
relief(formula, data, neighbours.count = 5, sample.size = 10)
}
\arguments{
\item{formula}{ a symbolic description of a model }
\i... |
# loads the hdf5 format keras model & applies it to the test data
library(tidyverse)
library(udpipe)
library(keras)
# download current udpipe model for English
last_udpipe <- 'english-ewt-ud-2.3-181115.udpipe' # (so far) latest version
if (!file.exists(last_udpipe)) udpipe_download_model(language = "english") # once ... | /code/4.2-apply-keras.R | permissive | jlacko/celebrity-faceoff | R | false | false | 2,691 | r | # loads the hdf5 format keras model & applies it to the test data
library(tidyverse)
library(udpipe)
library(keras)
# download current udpipe model for English
last_udpipe <- 'english-ewt-ud-2.3-181115.udpipe' # (so far) latest version
if (!file.exists(last_udpipe)) udpipe_download_model(language = "english") # once ... |
context("parallel")
test_that("parallel execution works as expected", {
set.seed(1)
dds0 <- makeExampleDESeqDataSet(n=100)
counts(dds0)[51:60,] <- 0L
nworkers <- 4
idx <- factor(sort(rep(seq_len(nworkers),length=nrow(dds0))))
dds <- estimateSizeFactors(dds0)
dds <- do.call(rbind, lapply(levels(idx), fu... | /tests/testthat/test_parallel.R | no_license | wesleybarriosufv/DESeq2 | R | false | false | 2,302 | r | context("parallel")
test_that("parallel execution works as expected", {
set.seed(1)
dds0 <- makeExampleDESeqDataSet(n=100)
counts(dds0)[51:60,] <- 0L
nworkers <- 4
idx <- factor(sort(rep(seq_len(nworkers),length=nrow(dds0))))
dds <- estimateSizeFactors(dds0)
dds <- do.call(rbind, lapply(levels(idx), fu... |
#Loading Unigram, bigram, trigram and fourgram files
load("unigram.Rda")
load("bigram.Rda")
load("trigram.Rda")
load("fourgram.Rda")
Wordform <- function(sentence){
value = "your word would be..."
sen = unlist(strsplit(sentence,' '))
if(length(sen)>=3){
value = fourgram(sen[(length(sen)-2):length... | /NLP_Programe.R | no_license | rezyananya/Capstone_Project | R | false | false | 2,651 | r | #Loading Unigram, bigram, trigram and fourgram files
load("unigram.Rda")
load("bigram.Rda")
load("trigram.Rda")
load("fourgram.Rda")
Wordform <- function(sentence){
value = "your word would be..."
sen = unlist(strsplit(sentence,' '))
if(length(sen)>=3){
value = fourgram(sen[(length(sen)-2):length... |
library(spaceNet)
### Name: multiNet
### Title: Latent Space Models for Multivariate Networks
### Aliases: multiNet print.multiNet
### ** Examples
data(vickers)
alphaR <- alphaRef(vickers, D = 2) # compute alpha reference value
it <- 10 # small number of iterations just for example
# 2-dimensional latent spa... | /data/genthat_extracted_code/spaceNet/examples/multiNet.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 593 | r | library(spaceNet)
### Name: multiNet
### Title: Latent Space Models for Multivariate Networks
### Aliases: multiNet print.multiNet
### ** Examples
data(vickers)
alphaR <- alphaRef(vickers, D = 2) # compute alpha reference value
it <- 10 # small number of iterations just for example
# 2-dimensional latent spa... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
auxcrpsC <- function(m, s) {
.Call(`_scoringRules_auxcrpsC`, m, s)
}
crpsmixnC <- function(w, m, s, y) {
.Call(`_scoringRules_crpsmixnC`, w, m, s, y)
}
lsmixnC <- function(w, m, s, y)... | /R/RcppExports.R | no_license | lixixibj/scoringRules | R | false | false | 2,359 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
auxcrpsC <- function(m, s) {
.Call(`_scoringRules_auxcrpsC`, m, s)
}
crpsmixnC <- function(w, m, s, y) {
.Call(`_scoringRules_crpsmixnC`, w, m, s, y)
}
lsmixnC <- function(w, m, s, y)... |
#' Generate a scale patch
#'
#' Generates a \code{patch_scale} object whose \code{scale_factor} parameter has
#' been selected with the aim of minimising the mismatch between the specified
#' columns after application of the patch to \code{df1}.
#'
#' Uses the \code{\link{optimise}} function to optimise the \code{scale... | /R/gen_patch_scale.R | permissive | tpetricek/datadiff | R | false | false | 3,436 | r | #' Generate a scale patch
#'
#' Generates a \code{patch_scale} object whose \code{scale_factor} parameter has
#' been selected with the aim of minimising the mismatch between the specified
#' columns after application of the patch to \code{df1}.
#'
#' Uses the \code{\link{optimise}} function to optimise the \code{scale... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "fri_c3_500_10")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = mak... | /models/openml_fri_c3_500_10/classification_binaryClass/7e03e7e100d18e5ef618d8e414e11f14/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 690 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "fri_c3_500_10")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = mak... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.