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 |
|---|---|---|---|---|---|---|---|---|---|
#runApp('C:\\Users\\pbuttigi\\Documents\\Revolution\\EATME\\ClusterAnalysis', launch.browser = FALSE)
library(shiny)
## ui.R
shinyUI(
pageWithSidebar(
# Header defintion
headerPanel("Perform a hierarchical cluster analysis..."),
# Sidebar defintion
sidebarPanel(
tabsetPanel(
tabP... | /ClusterAnalysis/ui.R | no_license | dawsonfairbanks/masame | R | false | false | 5,313 | r | #runApp('C:\\Users\\pbuttigi\\Documents\\Revolution\\EATME\\ClusterAnalysis', launch.browser = FALSE)
library(shiny)
## ui.R
shinyUI(
pageWithSidebar(
# Header defintion
headerPanel("Perform a hierarchical cluster analysis..."),
# Sidebar defintion
sidebarPanel(
tabsetPanel(
tabP... |
## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
library(obfuscatoR)
## -----------------------------------------------------------------------------
design_opt_input <- list(rules = 4,
action... | /inst/doc/vignette-obfuscatoR.R | no_license | cran/obfuscatoR | R | false | false | 4,020 | r | ## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
library(obfuscatoR)
## -----------------------------------------------------------------------------
design_opt_input <- list(rules = 4,
action... |
server = function(input, output, session) {
ln.t = reactive({ signif(seq(min(input$range.ln), max(input$range.ln), length = 500), digits = 4)})
ln.p <- signif(seq(0, 1, length = 500), digits = 4)
ln.C <- reactive({ plnorm(ln.t(), log(input$mu.ln), input$sig.ln)})
ln.P <- reactive({ dlnorm(ln.t(), log(input$mu.... | /teachingApps/inst/apps/distribution_lognormal_functions/server.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 2,287 | r | server = function(input, output, session) {
ln.t = reactive({ signif(seq(min(input$range.ln), max(input$range.ln), length = 500), digits = 4)})
ln.p <- signif(seq(0, 1, length = 500), digits = 4)
ln.C <- reactive({ plnorm(ln.t(), log(input$mu.ln), input$sig.ln)})
ln.P <- reactive({ dlnorm(ln.t(), log(input$mu.... |
# a constant list of models associated with emissions scenarios stored as a constant
# so I don't mistype the names
# to generate this list I used
# temp <- getDataIDs(rGDP)
# cat(temp,sep="','")
#Model List is only used for specifying which CMIP5 are desired and constructing the NEX call
ModelList<-list(rcp45 ... | /InputConstants.r | no_license | johngfc/ClimatePrimers | R | false | false | 6,384 | r | # a constant list of models associated with emissions scenarios stored as a constant
# so I don't mistype the names
# to generate this list I used
# temp <- getDataIDs(rGDP)
# cat(temp,sep="','")
#Model List is only used for specifying which CMIP5 are desired and constructing the NEX call
ModelList<-list(rcp45 ... |
### R CODE - Creating charts for region and trust level for RMOCs
## Last updated: 19/02/2020
## Anna Rowan
# This just clears the global environment
rm(list = ls())
#----------------------------------------------
# Set up, installing packages and setting working directory
#Only need to run this code if pack... | /Adalimumab_CreatingRMOCCharts_2020Feb19.R | no_license | Anna-M-R/CV | R | false | false | 6,926 | r | ### R CODE - Creating charts for region and trust level for RMOCs
## Last updated: 19/02/2020
## Anna Rowan
# This just clears the global environment
rm(list = ls())
#----------------------------------------------
# Set up, installing packages and setting working directory
#Only need to run this code if pack... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary_equivpairedt.R
\name{summary.equivpairedt}
\alias{summary.equivpairedt}
\title{Equivalence Paired t-Test Summary Function}
\usage{
\method{summary}{equivpairedt}(res)
}
\description{
\code{summary.equivpairedt} is a summary function f... | /man/summary.equivpairedt.Rd | permissive | jwbowers/equivtest | R | false | true | 623 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary_equivpairedt.R
\name{summary.equivpairedt}
\alias{summary.equivpairedt}
\title{Equivalence Paired t-Test Summary Function}
\usage{
\method{summary}{equivpairedt}(res)
}
\description{
\code{summary.equivpairedt} is a summary function f... |
#' Initialize and Connect to H2O
#'
#' Attempts to start and/or connect to and H2O instance.
#'
#' By defualt, this method first checks if an H2O instance is connectible. If it cannot connect and \code{start = TRUE} with \code{ip = "localhost"}, it will attempt to start and instance of H2O at localhost:54321. Otherwise... | /h2o-r/h2o-package/R/connection.R | permissive | junwucs/h2o-3 | R | false | false | 27,912 | r | #' Initialize and Connect to H2O
#'
#' Attempts to start and/or connect to and H2O instance.
#'
#' By defualt, this method first checks if an H2O instance is connectible. If it cannot connect and \code{start = TRUE} with \code{ip = "localhost"}, it will attempt to start and instance of H2O at localhost:54321. Otherwise... |
testlist <- list(x = -14090282L, y = c(-1L, -1L, -16777216L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962451-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 416 | r | testlist <- list(x = -14090282L, y = c(-1L, -1L, -16777216L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
test_that("works", {
fit <- blblm::blblm_parallel(disp~mpg, mtcars, m = 3, B = 100, cluster = 4)
expect_s3_class(fit, "blblm_parallel")
beta <- coef(fit)
expect_equal(length(beta), 2)
})
| /tests/testthat/test-blblm.R | permissive | ual33/blblm | R | false | false | 195 | r | test_that("works", {
fit <- blblm::blblm_parallel(disp~mpg, mtcars, m = 3, B = 100, cluster = 4)
expect_s3_class(fit, "blblm_parallel")
beta <- coef(fit)
expect_equal(length(beta), 2)
})
|
library(dash)
library(dashCoreComponents)
library(dashHtmlComponents)
library(dashTable)
library(tidyverse)
library(plotly)
library(anytime)
library(lubridate)
library(dplyr)
library(wesanderson)
##### initialize the app #####
app <- Dash$new()
# load in the crime data
df <- read_csv('data/Police_Department_Incidents... | /app.R | permissive | PolinaRomanchenko/vs-sf_crime-statistic-dashboard | R | false | false | 7,183 | r | library(dash)
library(dashCoreComponents)
library(dashHtmlComponents)
library(dashTable)
library(tidyverse)
library(plotly)
library(anytime)
library(lubridate)
library(dplyr)
library(wesanderson)
##### initialize the app #####
app <- Dash$new()
# load in the crime data
df <- read_csv('data/Police_Department_Incidents... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/get_functions.R
\name{get_functions}
\alias{get_functions}
\title{Predefined functions}
\usage{
get_functions()
}
\description{
\code{getfunctions} lists the predefined functions in \code{quickpsy}.
}
\seealso{
\code{\link{cum_normal_... | /man/get_functions.Rd | no_license | lugtigheid/quickpsy | R | false | false | 384 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/get_functions.R
\name{get_functions}
\alias{get_functions}
\title{Predefined functions}
\usage{
get_functions()
}
\description{
\code{getfunctions} lists the predefined functions in \code{quickpsy}.
}
\seealso{
\code{\link{cum_normal_... |
#testing github
a=read.csv("BBSG_2009-2010_habitat_and_trawl-tow_data.csv")
colnames(a)
#removing unecessary collumns
b=a[,-c(7:8,14:25,34)]
colnames(b)
#finding distribution of data
hist(b$perTotSG)
#exponential distribution
#removing rows with NAs from cover data
c=b[-c(40,55,60,68,77,149,162),]
#finding ... | /final project.R | no_license | emeliefoster/final_project | R | false | false | 659 | r | #testing github
a=read.csv("BBSG_2009-2010_habitat_and_trawl-tow_data.csv")
colnames(a)
#removing unecessary collumns
b=a[,-c(7:8,14:25,34)]
colnames(b)
#finding distribution of data
hist(b$perTotSG)
#exponential distribution
#removing rows with NAs from cover data
c=b[-c(40,55,60,68,77,149,162),]
#finding ... |
## Put comments here that give an overall description of what your
## functions do
## This function will cache the inverse of a matrix
## Write a short comment describing this function
## This function creates a special matrix like object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) { ... | /cachematrix.R | no_license | Smajic19/ProgrammingAssignment2 | R | false | false | 1,228 | r | ## Put comments here that give an overall description of what your
## functions do
## This function will cache the inverse of a matrix
## Write a short comment describing this function
## This function creates a special matrix like object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) { ... |
library(rpart)
library(rpart.plot)
gender = sample(c('M','f'),size=1000, prob=c(.6,.4), replace=T)
age = ceiling(rnorm(1000,35,5))
buy = sample(c('Yes','No'), size=1000, prob=c(.5,.5),replace=T)
df = data.frame(buy,age,gender)
head(df)
#cp= complex parameter
dtree1 = rpart(buy~gender + age, data=df, minsplit=10, minb... | /dtreeage.R | no_license | navyanayak08/analytics1 | R | false | false | 405 | r |
library(rpart)
library(rpart.plot)
gender = sample(c('M','f'),size=1000, prob=c(.6,.4), replace=T)
age = ceiling(rnorm(1000,35,5))
buy = sample(c('Yes','No'), size=1000, prob=c(.5,.5),replace=T)
df = data.frame(buy,age,gender)
head(df)
#cp= complex parameter
dtree1 = rpart(buy~gender + age, data=df, minsplit=10, minb... |
myRaster<-RUNIMC:::retrieve.RsCollection(
"C:/Users/luigi/Documents/BH_TEST/HEADANDNECK/RUN_001/rasterStacks"
)
geo_list_BO<-sf::st_read(
"C:/Users/luigi/Documents/BH_TEST/HEADANDNECK/RUN_001/analysis/BODEN/BP_SOM.sqlite"
)
geo_list_RU<-sf::st_read(
"C:/Users/luigi/Documents/BH_TEST/HEADANDNECK/RUN_001... | /HEADANDNECK/concordance.R | no_license | luigidolcetti/RUNIMC_paper_scripts | R | false | false | 1,872 | r | myRaster<-RUNIMC:::retrieve.RsCollection(
"C:/Users/luigi/Documents/BH_TEST/HEADANDNECK/RUN_001/rasterStacks"
)
geo_list_BO<-sf::st_read(
"C:/Users/luigi/Documents/BH_TEST/HEADANDNECK/RUN_001/analysis/BODEN/BP_SOM.sqlite"
)
geo_list_RU<-sf::st_read(
"C:/Users/luigi/Documents/BH_TEST/HEADANDNECK/RUN_001... |
## FFN (1, 4)
## RNN (7)
## LSTM (9, 8, 2)
## GRU (8, 9)
rm(list = ls())
source("add/libraries.R")
source("add/Functions_RNN.R")
load("data/ETH_2021-05-05.rda")
head(ETH)
tail(ETH)
# Define log returns based on closing prices
logret <- diff(log(ETH$`ETH-USD.Close`))
logret <- na.omit(logret)
colnames(logret) <- "... | /code/pascal_code.R | no_license | majimaken/econometrics-3-project | R | false | false | 5,955 | r | ## FFN (1, 4)
## RNN (7)
## LSTM (9, 8, 2)
## GRU (8, 9)
rm(list = ls())
source("add/libraries.R")
source("add/Functions_RNN.R")
load("data/ETH_2021-05-05.rda")
head(ETH)
tail(ETH)
# Define log returns based on closing prices
logret <- diff(log(ETH$`ETH-USD.Close`))
logret <- na.omit(logret)
colnames(logret) <- "... |
test_that("output", {
expect_snapshot(error = TRUE, {
abort_key_set_force_false("pk_table")
abort_not_unique_key("Christmas", "Rudolph")
abort_not_unique_key("Christmas", c("elves", "Rudolph", "mulled_wine"))
abort_table_not_in_dm("laziness", "hard_work")
abort_not_subset_of("playing", "game", "hu... | /tests/testthat/test-error-helpers.R | permissive | cran/dm | R | false | false | 3,181 | r | test_that("output", {
expect_snapshot(error = TRUE, {
abort_key_set_force_false("pk_table")
abort_not_unique_key("Christmas", "Rudolph")
abort_not_unique_key("Christmas", c("elves", "Rudolph", "mulled_wine"))
abort_table_not_in_dm("laziness", "hard_work")
abort_not_subset_of("playing", "game", "hu... |
\name{TenBerge2004
}
\alias{TenBerge2004}
\docType{data}
\title{
De Leeuw (1983) Political Survey Items
}
\description{Six political survey items, N = 119, and unidensional.}
\usage{data(TenBerge2004)}
\details{This is a covariance matrix that comes De Leeuw (1983) and represents six political survey items. These item... | /man/TenBerge2004.Rd | no_license | JackStat/Lambda4 | R | false | false | 795 | rd | \name{TenBerge2004
}
\alias{TenBerge2004}
\docType{data}
\title{
De Leeuw (1983) Political Survey Items
}
\description{Six political survey items, N = 119, and unidensional.}
\usage{data(TenBerge2004)}
\details{This is a covariance matrix that comes De Leeuw (1983) and represents six political survey items. These item... |
jobsa1=as.data.frame(read.csv("PatientSitterData.csv",header=TRUE,sep=","))
jobsa=jobsa1[jobsa1$my_first_instrument_complete==2,]
######################################
######## Table 1 descriptive #########
######################################
options(digits=4)
for (i in c(4,5,6,7)){
re1=table(jobsa[,i])
... | /1-Patient observer project/Job satisfaction code.R | no_license | heli0001/ghs_projects | R | false | false | 4,436 | r | jobsa1=as.data.frame(read.csv("PatientSitterData.csv",header=TRUE,sep=","))
jobsa=jobsa1[jobsa1$my_first_instrument_complete==2,]
######################################
######## Table 1 descriptive #########
######################################
options(digits=4)
for (i in c(4,5,6,7)){
re1=table(jobsa[,i])
... |
###################################
#### KLASIFIKACIJA #####
###################################
### setwd("C:/Users/sabina/Desktop/Faks/UI/seminarska")
###
source("funkcije.R")
podatki = read.table("regular.txt" , sep="," , header = T)
domaci_rezultat = vector()
domaci_rezultat[(podatki$HPTS-podatki... | /Klasifikacija/klasifikacija.R | no_license | gapus97/UI-pravi | R | false | false | 4,704 | r | ###################################
#### KLASIFIKACIJA #####
###################################
### setwd("C:/Users/sabina/Desktop/Faks/UI/seminarska")
###
source("funkcije.R")
podatki = read.table("regular.txt" , sep="," , header = T)
domaci_rezultat = vector()
domaci_rezultat[(podatki$HPTS-podatki... |
## Data Visualization (GOVT16-QSS17) Fall 2017
## Project 3
##
## Name: Soomin Kim
# Initial Settings --------------------------------------------------------
rm(list = ls())
options(stringsAsFactors = FALSE)
library(tidyverse)
library(ggmap)
library(gridExtra)
library(ggrepel)
library(ggthemes)
# Figure 3 ---------... | /Project 3/Project3_SKim.R | permissive | soominkim231/Data-Visualization | R | false | false | 5,238 | r | ## Data Visualization (GOVT16-QSS17) Fall 2017
## Project 3
##
## Name: Soomin Kim
# Initial Settings --------------------------------------------------------
rm(list = ls())
options(stringsAsFactors = FALSE)
library(tidyverse)
library(ggmap)
library(gridExtra)
library(ggrepel)
library(ggthemes)
# Figure 3 ---------... |
####################################
# Simulation1.
####################################
library(FCQR);
library(xtable); library(survival); library(fda);
library(quantreg); library(ggplot2); library(MASS);
n <- 200; v <- 1; sdx <- 0.2; sdz <- 1; lam0 <- 5;
t <- seq(0, 1, 0.01); m <- length(t); deltat <- (di... | /vignettes/FCQR.R | no_license | QingCheng0218/FCQR | R | false | false | 7,641 | r | ####################################
# Simulation1.
####################################
library(FCQR);
library(xtable); library(survival); library(fda);
library(quantreg); library(ggplot2); library(MASS);
n <- 200; v <- 1; sdx <- 0.2; sdz <- 1; lam0 <- 5;
t <- seq(0, 1, 0.01); m <- length(t); deltat <- (di... |
library(flatxml)
### Name: fxml_getAttributesAll
### Title: Attributes of an XML element
### Aliases: fxml_getAttributesAll
### ** Examples
# Load example file with population data from United Nations Statistics Division
# and create flat dataframe
example <- system.file("worldpopulation.xml", package="flatxml")
xm... | /data/genthat_extracted_code/flatxml/examples/fxml_getAttributesAll.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 486 | r | library(flatxml)
### Name: fxml_getAttributesAll
### Title: Attributes of an XML element
### Aliases: fxml_getAttributesAll
### ** Examples
# Load example file with population data from United Nations Statistics Division
# and create flat dataframe
example <- system.file("worldpopulation.xml", package="flatxml")
xm... |
refTrans = function(samples, marker = "d2H", ref_scale = "VSMOW_H",
niter = 5000){
#load data in funtion environ
data("stds", envir = environment())
stds = stds
ham = stds$ham
oam = stds$oam
hstds = stds$hstds
ostds = stds$ostds
#For data sent from subOrigData
if(inherits(samp... | /R/refTrans.R | no_license | SPATIAL-Lab/assignR | R | false | false | 9,993 | r | refTrans = function(samples, marker = "d2H", ref_scale = "VSMOW_H",
niter = 5000){
#load data in funtion environ
data("stds", envir = environment())
stds = stds
ham = stds$ham
oam = stds$oam
hstds = stds$hstds
ostds = stds$ostds
#For data sent from subOrigData
if(inherits(samp... |
#Codigo Realizado por: Gabriel Gomez Corredor
# Simon Davila
# Juan Pablo Mendez
# PUNTO 2 DOCUMENTO 2
#Informacion: La funcion tiene 2 parametros, numero: el numero ya sea en
# decimal o binario y opcion: toma el valor 1/0. 1: para convertir
# ... | /Taller 1/Binario.R | permissive | simondavilas/analisis-numerico | R | false | false | 2,549 | r | #Codigo Realizado por: Gabriel Gomez Corredor
# Simon Davila
# Juan Pablo Mendez
# PUNTO 2 DOCUMENTO 2
#Informacion: La funcion tiene 2 parametros, numero: el numero ya sea en
# decimal o binario y opcion: toma el valor 1/0. 1: para convertir
# ... |
library(pwrRasch)
### Name: aov.rasch
### Title: Three-Way Analysis of Variance with Mixed Classification for
### Testing the Rasch Model
### Aliases: aov.rasch
### ** Examples
## Not run:
##D
##D # simulate Rasch model based data
##D # 100 persons, 20 items,
##D dat <- simul.rasch(100, items = seq(-3, 3, lengt... | /data/genthat_extracted_code/pwrRasch/examples/aov.rasch.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,036 | r | library(pwrRasch)
### Name: aov.rasch
### Title: Three-Way Analysis of Variance with Mixed Classification for
### Testing the Rasch Model
### Aliases: aov.rasch
### ** Examples
## Not run:
##D
##D # simulate Rasch model based data
##D # 100 persons, 20 items,
##D dat <- simul.rasch(100, items = seq(-3, 3, lengt... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/locustdata.R
\docType{data}
\name{locustdata}
\alias{locustdata}
\title{Dataset with TMAB labelled locust peptides.}
\format{\preformatted{List of 2
$ frame :'data.frame': 1425 obs. of 26 variables:
..$ id : num [1:1425] 36... | /man/locustdata.Rd | no_license | goat-anti-rabbit/labelpepmatch.R | R | false | false | 3,134 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/locustdata.R
\docType{data}
\name{locustdata}
\alias{locustdata}
\title{Dataset with TMAB labelled locust peptides.}
\format{\preformatted{List of 2
$ frame :'data.frame': 1425 obs. of 26 variables:
..$ id : num [1:1425] 36... |
# 1) checks if the file exists (for portability); If not, downloads it. Then make changes to the date and build graph
url<- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
file<- "exdata%2Fdata%2Fhousehold_power_consumption.zip"
if(!file.exists(file)) { download(url, file, mode... | /plot2.R | no_license | TanguyLLL/Exploratory-Data-Analysis | R | false | false | 759 | r | # 1) checks if the file exists (for portability); If not, downloads it. Then make changes to the date and build graph
url<- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
file<- "exdata%2Fdata%2Fhousehold_power_consumption.zip"
if(!file.exists(file)) { download(url, file, mode... |
##############################################
# Exercise 2.3: Pitchers in the 350 Wins Club
#
# Needs the table of 9 pitchers who have achieved 350 wins that is given in exercise.
# Table includes the Wins, Losses, Strikeouts, and Walks for:
# Pete Alexander, Roger Clemens, Pud Galvin, Walter Johnson, Greg Maddu... | /Analyzing_Baseball_R_Exercises/Exercise Scripts/Exercise 2-3.R | no_license | etsafe11/baseball | R | false | false | 1,082 | r | ##############################################
# Exercise 2.3: Pitchers in the 350 Wins Club
#
# Needs the table of 9 pitchers who have achieved 350 wins that is given in exercise.
# Table includes the Wins, Losses, Strikeouts, and Walks for:
# Pete Alexander, Roger Clemens, Pud Galvin, Walter Johnson, Greg Maddu... |
require("RZigZag")
generate.logistic.data <- function(beta, nobs) {
ncomp <- length(beta)
dataX <- matrix(rnorm((ncomp -1) * nobs), nrow = ncomp -1);
vals <- beta[1] + colSums(dataX * as.vector(beta[2:ncomp]))
generateY <- function(p) { rbinom(1, 1, p)}
dataY <- sapply(1/(1 + exp(-vals)), generateY)
return... | /test_ess_with_observations_2d.R | permissive | jbierkens/zigzag-experiments | R | false | false | 10,550 | r | require("RZigZag")
generate.logistic.data <- function(beta, nobs) {
ncomp <- length(beta)
dataX <- matrix(rnorm((ncomp -1) * nobs), nrow = ncomp -1);
vals <- beta[1] + colSums(dataX * as.vector(beta[2:ncomp]))
generateY <- function(p) { rbinom(1, 1, p)}
dataY <- sapply(1/(1 + exp(-vals)), generateY)
return... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table_basicstats.R
\name{table_basicstats}
\alias{table_basicstats}
\title{Compute basic statistics of the number of member per group per household}
\usage{
table_basicstats(df, hh_id, group_by_var)
}
\arguments{
\item{df}{a data frame of hou... | /man/table_basicstats.Rd | no_license | CarolinaFellinghauer/whomds | R | false | true | 1,173 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/table_basicstats.R
\name{table_basicstats}
\alias{table_basicstats}
\title{Compute basic statistics of the number of member per group per household}
\usage{
table_basicstats(df, hh_id, group_by_var)
}
\arguments{
\item{df}{a data frame of hou... |
test_that("returns the correct linting", {
linter <- todo_comment_linter(todo = c("todo", "fixme"))
msg <- "TODO comments should be removed."
expect_lint("a <- \"you#need#to#fixme\"", NULL, linter)
expect_lint("# something todo", NULL, linter)
expect_lint("cat(x) ### fixme",
list(message = msg,... | /tests/testthat/test-todo_comment_linter.R | permissive | russHyde/lintr | R | false | false | 830 | r | test_that("returns the correct linting", {
linter <- todo_comment_linter(todo = c("todo", "fixme"))
msg <- "TODO comments should be removed."
expect_lint("a <- \"you#need#to#fixme\"", NULL, linter)
expect_lint("# something todo", NULL, linter)
expect_lint("cat(x) ### fixme",
list(message = msg,... |
setwd("Heron")
library(rjags)
library(coda)
set.seed(1345221)
# ada=10000
# iter=500000
# th=1000
# cha=1
save_on = TRUE
ada=100
iter=1000
th=1
cha=1
cat(sprintf("adapt = %i",ada),"\n")
cat(sprintf("iter = %i",iter),"\n")
cat(sprintf("thinning = %i",th),"\n")
cat(sprintf("chains = %i",cha),"\n")
source("heron_dat... | /Heron/Scaled/heron_run_HMM.R | no_license | TANG16/SCDA | R | false | false | 12,636 | r | setwd("Heron")
library(rjags)
library(coda)
set.seed(1345221)
# ada=10000
# iter=500000
# th=1000
# cha=1
save_on = TRUE
ada=100
iter=1000
th=1
cha=1
cat(sprintf("adapt = %i",ada),"\n")
cat(sprintf("iter = %i",iter),"\n")
cat(sprintf("thinning = %i",th),"\n")
cat(sprintf("chains = %i",cha),"\n")
source("heron_dat... |
library(GWmodel)
### Name: ggwr.basic
### Title: Generalised GWR models with Poisson and Binomial options
### Aliases: ggwr.basic gwr.generalised gwr.binomial gwr.binomial.wt
### gwr.poisson gwr.poisson.wt gwr.fitted print.ggwrm
### Keywords: generalised, GWR
### ** Examples
data(LondonHP)
## Not run:
##D DM<-gw... | /data/genthat_extracted_code/GWmodel/examples/ggwr.basic.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 705 | r | library(GWmodel)
### Name: ggwr.basic
### Title: Generalised GWR models with Poisson and Binomial options
### Aliases: ggwr.basic gwr.generalised gwr.binomial gwr.binomial.wt
### gwr.poisson gwr.poisson.wt gwr.fitted print.ggwrm
### Keywords: generalised, GWR
### ** Examples
data(LondonHP)
## Not run:
##D DM<-gw... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distcomp.R
\name{saveNewComputation}
\alias{saveNewComputation}
\title{Save a computation instance, given the computation definition, associated data and
possibly a data file name to use}
\usage{
saveNewComputation(defn, data, dataFileName = ... | /man/saveNewComputation.Rd | no_license | cran/distcomp | R | false | true | 1,412 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distcomp.R
\name{saveNewComputation}
\alias{saveNewComputation}
\title{Save a computation instance, given the computation definition, associated data and
possibly a data file name to use}
\usage{
saveNewComputation(defn, data, dataFileName = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sims.R
\name{badmf.sims.rtrunk}
\alias{badmf.sims.rtrunk}
\title{Random Trunk}
\usage{
badmf.sims.rtrunk(n, d, rotate = FALSE, priors = NULL, b = 4,
K = 2, maxvar = 100)
}
\arguments{
\item{n}{the number of samples of the simulated data.}
... | /man/badmf.sims.rtrunk.Rd | permissive | ebridge2/badmf | R | false | true | 2,271 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sims.R
\name{badmf.sims.rtrunk}
\alias{badmf.sims.rtrunk}
\title{Random Trunk}
\usage{
badmf.sims.rtrunk(n, d, rotate = FALSE, priors = NULL, b = 4,
K = 2, maxvar = 100)
}
\arguments{
\item{n}{the number of samples of the simulated data.}
... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Sampling step for alpha (item-intercepts)
#'
#' @keywords internal
#'
#' @param x A multivariate Gaussian copula matrix of dimenion N x P.
#' @param lambda A standard multivariate normal mat... | /R/RcppExports.R | permissive | EandrewJones/mmBPFA | R | false | false | 5,149 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Sampling step for alpha (item-intercepts)
#'
#' @keywords internal
#'
#' @param x A multivariate Gaussian copula matrix of dimenion N x P.
#' @param lambda A standard multivariate normal mat... |
library(ClusterR)
### Name: AP_preferenceRange
### Title: Affinity propagation preference range
### Aliases: AP_preferenceRange
### ** Examples
set.seed(1)
dat = matrix(sample(1:255, 2500, replace = TRUE), 100, 25)
smt = 1.0 - distance_matrix(dat, method = 'euclidean', upper = TRUE, diagonal = TRUE)
diag(smt) = 0... | /data/genthat_extracted_code/ClusterR/examples/AP_preferenceRange.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 382 | r | library(ClusterR)
### Name: AP_preferenceRange
### Title: Affinity propagation preference range
### Aliases: AP_preferenceRange
### ** Examples
set.seed(1)
dat = matrix(sample(1:255, 2500, replace = TRUE), 100, 25)
smt = 1.0 - distance_matrix(dat, method = 'euclidean', upper = TRUE, diagonal = TRUE)
diag(smt) = 0... |
#R code for generating plots for your BFF/labmate/brother's GF/'beaker to your bunsen'
#Initial start 06-25-2017
#Last updated 07-08-2017
setwd("/Users/SarahHu 1/Desktop/Projects/")
library(reshape2)
library(ggplot2)
# library(ggthemes)
# library("wesanderson")
# names(wes_palettes)
# Import data that has been meticul... | /Paige_dissertation.R | no_license | shu251/Paiges_dissertation_poster | R | false | false | 4,934 | r | #R code for generating plots for your BFF/labmate/brother's GF/'beaker to your bunsen'
#Initial start 06-25-2017
#Last updated 07-08-2017
setwd("/Users/SarahHu 1/Desktop/Projects/")
library(reshape2)
library(ggplot2)
# library(ggthemes)
# library("wesanderson")
# names(wes_palettes)
# Import data that has been meticul... |
### Extending app3.R and filling in the blanks
### Adding full interactivity
library(dash)
library(dashCoreComponents)
library(dashHtmlComponents)
library(dashTable)
library(tidyverse)
library(plotly)
library(gapminder)
app <- Dash$new(external_stylesheets = "https://codepen.io/chriddyp/pen/bWLwgP.css")
# Selection ... | /R/Class App/app4.R | no_license | firasm/dash_demo | R | false | false | 6,030 | r | ### Extending app3.R and filling in the blanks
### Adding full interactivity
library(dash)
library(dashCoreComponents)
library(dashHtmlComponents)
library(dashTable)
library(tidyverse)
library(plotly)
library(gapminder)
app <- Dash$new(external_stylesheets = "https://codepen.io/chriddyp/pen/bWLwgP.css")
# Selection ... |
#adriana | /trying it out.R | no_license | ambanchs/test | R | false | false | 8 | r | #adriana |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genomics_objects.R
\name{ListBasesResponse}
\alias{ListBasesResponse}
\title{ListBasesResponse Object}
\usage{
ListBasesResponse(nextPageToken = NULL, offset = NULL, sequence = NULL)
}
\arguments{
\item{nextPageToken}{The continuation token, ... | /googlegenomicsv1beta2.auto/man/ListBasesResponse.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 715 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genomics_objects.R
\name{ListBasesResponse}
\alias{ListBasesResponse}
\title{ListBasesResponse Object}
\usage{
ListBasesResponse(nextPageToken = NULL, offset = NULL, sequence = NULL)
}
\arguments{
\item{nextPageToken}{The continuation token, ... |
# LIBRERIAS A UTILIZAR
library(tidyverse)
library("cluster")
library("NbClust")
library("factoextra")
library("data.table")
library("stats")
glimpse(clts)
glimpse(clientes_limpio)
set.seed(2001) # para la reproduccion exacta de este codigo
# ALGORITMO A EJECUTAR -------
kmedias_3 <- kmeans(clts[-1], centers=3, n... | /scripts/para algoritmo k-means/k-3.R | no_license | ileosebastian/tarea-6-DM | R | false | false | 966 | r | # LIBRERIAS A UTILIZAR
library(tidyverse)
library("cluster")
library("NbClust")
library("factoextra")
library("data.table")
library("stats")
glimpse(clts)
glimpse(clientes_limpio)
set.seed(2001) # para la reproduccion exacta de este codigo
# ALGORITMO A EJECUTAR -------
kmedias_3 <- kmeans(clts[-1], centers=3, n... |
#' Get count of all unconnected nodes in the graph
#' @description From a graph object of class
#' \code{dgr_graph}, get a count of nodes in the
#' graph that are not connected to any other node.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @return a numeric vector of single length.
#' @examples
#' #... | /R/count_unconnected_nodes.R | permissive | wk1984/DiagrammeR | R | false | false | 1,890 | r | #' Get count of all unconnected nodes in the graph
#' @description From a graph object of class
#' \code{dgr_graph}, get a count of nodes in the
#' graph that are not connected to any other node.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @return a numeric vector of single length.
#' @examples
#' #... |
## This file consists of two functions dedicated to find
## the inverse of a square matrix, and to cache the result of
## this potentially time consuming operation so that it can
## be used readily in the future
## makeCacheMatrix takes in one argument (square matrix)
## and creates a list of four functions involving... | /cachematrix.R | no_license | kmei4291/ProgrammingAssignment2 | R | false | false | 2,325 | r | ## This file consists of two functions dedicated to find
## the inverse of a square matrix, and to cache the result of
## this potentially time consuming operation so that it can
## be used readily in the future
## makeCacheMatrix takes in one argument (square matrix)
## and creates a list of four functions involving... |
#' Simulate outbreak data
#'
#' @return A data.frame
#' @export
simulate_outbreak <- function(
n_obs = 60,
date_range = as.Date(x = c("2016-12-01", "2017-01-30"))
){
id <- seq_len(n_obs)
dates_int_range <- date_range[1]:date_range[2]
dates <- as.Date(sample(dates_int_range, size = n_obs, replace = TRUE), ori... | /R/simulate_data.R | no_license | haganje/ggepicurve | R | false | false | 564 | r | #' Simulate outbreak data
#'
#' @return A data.frame
#' @export
simulate_outbreak <- function(
n_obs = 60,
date_range = as.Date(x = c("2016-12-01", "2017-01-30"))
){
id <- seq_len(n_obs)
dates_int_range <- date_range[1]:date_range[2]
dates <- as.Date(sample(dates_int_range, size = n_obs, replace = TRUE), ori... |
## Christian Andersen ProgrammingAssignment2
##Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setsol... | /cachematrix.R | no_license | ca-signorelli/ProgrammingAssignment2-1 | R | false | false | 849 | r | ## Christian Andersen ProgrammingAssignment2
##Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setsol... |
testlist <- list(A = structure(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 ), .Dim = c(7L, 5L)), 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/1613120958-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 262 | r | testlist <- list(A = structure(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 ), .Dim = c(7L, 5L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
#####################################################################
#
# scanone.full.R
#
# copyright (c) 2007-2010, Ani Manichaikul
# last modified Feb, 2010
# first written 2007
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# ... | /R/full.func.R | no_license | amanicha/qtl | R | false | false | 9,288 | r | #####################################################################
#
# scanone.full.R
#
# copyright (c) 2007-2010, Ani Manichaikul
# last modified Feb, 2010
# first written 2007
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# ... |
predict.nphasefitallinone <- function(fit, newdata, time_variable="t", group_variable="treatment_day")
{
groups <- unique(newdata[, group_variable])
num_phases <- length(fit$estimates$k)
l <- lapply(groups, function(g) {
whichgroup <- which(g == groups)
if (num_phases == 1)
y <- exp(fit$estimates$k... | /R/npe-predictions.R | permissive | MikeLydeamore/npe | R | false | false | 1,148 | r | predict.nphasefitallinone <- function(fit, newdata, time_variable="t", group_variable="treatment_day")
{
groups <- unique(newdata[, group_variable])
num_phases <- length(fit$estimates$k)
l <- lapply(groups, function(g) {
whichgroup <- which(g == groups)
if (num_phases == 1)
y <- exp(fit$estimates$k... |
## Dependencies
require(quanteda)
require(data.table)
## Constants
badwordsFileName <- "badwords.txt"
badwords <- readLines(badwordsFileName)[-369]
nextwordstable <- function(n_search, vect_search, results_temp, p_left) {
root_search <- paste0(vect_search, collapse = "_")
if (root_search %in% model[[n_search... | /utils.R | no_license | SimoneDut/Data-Science-Capstone-Final-Project | R | false | false | 2,526 | r | ## Dependencies
require(quanteda)
require(data.table)
## Constants
badwordsFileName <- "badwords.txt"
badwords <- readLines(badwordsFileName)[-369]
nextwordstable <- function(n_search, vect_search, results_temp, p_left) {
root_search <- paste0(vect_search, collapse = "_")
if (root_search %in% model[[n_search... |
/Regression/Regression.R | no_license | wjddyd66/R | R | false | false | 2,585 | r | ||
## Data from http://groupware.les.inf.puc-rio.br/har
setwd("~/Documents/dataScience/Coursera/Data_Science_Johns_Hopkins/Course 8 - Machine Learning")
url1 <- "https://d396qusza40orc.cloudfront.net/predmachlearn/pml-training.csv"
url2 <- "https://d396qusza40orc.cloudfront.net/predmachlearn/pml-testing.csv"
if (!file.exi... | /JHCourse8Week4/raw_analysis.R | no_license | kairstenfay/dataScienceCoursera | R | false | false | 5,794 | r | ## Data from http://groupware.les.inf.puc-rio.br/har
setwd("~/Documents/dataScience/Coursera/Data_Science_Johns_Hopkins/Course 8 - Machine Learning")
url1 <- "https://d396qusza40orc.cloudfront.net/predmachlearn/pml-training.csv"
url2 <- "https://d396qusza40orc.cloudfront.net/predmachlearn/pml-testing.csv"
if (!file.exi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wilcox_test.R
\name{wilcox_test}
\alias{wilcox_test}
\alias{pairwise_wilcox_test}
\title{Wilcoxon Tests}
\usage{
wilcox_test(data, formula, comparisons = NULL, ref.group = NULL,
p.adjust.method = "holm", paired = FALSE, exact = NULL,
alte... | /man/wilcox_test.Rd | no_license | karthy257/rstatix | R | false | true | 5,108 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wilcox_test.R
\name{wilcox_test}
\alias{wilcox_test}
\alias{pairwise_wilcox_test}
\title{Wilcoxon Tests}
\usage{
wilcox_test(data, formula, comparisons = NULL, ref.group = NULL,
p.adjust.method = "holm", paired = FALSE, exact = NULL,
alte... |
library(tidyverse)
library(htmltools)
states <- readRDS("states.rds")
future::plan(future::multiprocess, workers = 4)
.render <- furrr::future_imap(states, ~{
.st <- state.abb[state.name %in% .y]
if (.rerender) {
.fns <- purrr::imap(.x$g, ~{
.fn <- paste0("images/",.st, "_",.y,".png")
.g <- gridExtr... | /content/post/CoVis/render.R | no_license | yogat3ch/themindful.life-r | R | false | false | 1,769 | r | library(tidyverse)
library(htmltools)
states <- readRDS("states.rds")
future::plan(future::multiprocess, workers = 4)
.render <- furrr::future_imap(states, ~{
.st <- state.abb[state.name %in% .y]
if (.rerender) {
.fns <- purrr::imap(.x$g, ~{
.fn <- paste0("images/",.st, "_",.y,".png")
.g <- gridExtr... |
library(oce)
### Name: tidemVuf
### Title: Nodal Modulation Calculations for Tidem
### Aliases: tidemVuf
### ** Examples
tidemVuf(as.POSIXct("2008-01-22 18:50:24"), 43, 45.0)
| /data/genthat_extracted_code/oce/examples/tidemVuf.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 182 | r | library(oce)
### Name: tidemVuf
### Title: Nodal Modulation Calculations for Tidem
### Aliases: tidemVuf
### ** Examples
tidemVuf(as.POSIXct("2008-01-22 18:50:24"), 43, 45.0)
|
#' ISRaD.extra.Cstocks
#'
#' @description Calculates soil organic carbon stock
#' @param database ISRaD dataset object.
#' @details Function first fills lyr_bd_samp, lyr_c_org, lyr_c_org, lyr_coarse_tot. Notes: 1) SOC stocks can only be calculated if organic carbon concentration and bulk density data are available, 2) ... | /Rpkg/R/ISRaD.extra.Cstocks.R | no_license | chiricojen/ISRaD | R | false | false | 3,688 | r | #' ISRaD.extra.Cstocks
#'
#' @description Calculates soil organic carbon stock
#' @param database ISRaD dataset object.
#' @details Function first fills lyr_bd_samp, lyr_c_org, lyr_c_org, lyr_coarse_tot. Notes: 1) SOC stocks can only be calculated if organic carbon concentration and bulk density data are available, 2) ... |
#' @title FUNCTION_TITLE
#' @description FUNCTION_DESCRIPTION
#' @param start.rast PARAM_DESCRIPTION
#' @param aroc.rast PARAM_DESCRIPTION
#' @param n.yrs PARAM_DESCRIPTION, Default: 15
#' @param uselogit PARAM_DESCRIPTION, Default: FALSE
#' @return OUTPUT_DESCRIPTION
#' @details DETAILS
#' @examples
#' \dontrun{
#' if... | /mbg/mbg_core_code/mbg_central/LBDCore/R/make_forecast.R | no_license | The-Oxford-GBD-group/typhi_paratyphi_modelling_code | R | false | false | 1,166 | r | #' @title FUNCTION_TITLE
#' @description FUNCTION_DESCRIPTION
#' @param start.rast PARAM_DESCRIPTION
#' @param aroc.rast PARAM_DESCRIPTION
#' @param n.yrs PARAM_DESCRIPTION, Default: 15
#' @param uselogit PARAM_DESCRIPTION, Default: FALSE
#' @return OUTPUT_DESCRIPTION
#' @details DETAILS
#' @examples
#' \dontrun{
#' if... |
split_data <- function(data, col_source, u0_source){
# splits data of col_source below and above u0_source
# taking the minimum of the two
k <- dim(data)[1]
n <- dim(data)[3]
stopifnot(k >= 2)
above_idx <- data[1,col_source,] > u0_source
stopifnot(any(above_idx))
stopifnot(any(!above_idx)) # check som... | /R/postprocessing.R | permissive | valcourgeau/xvine | R | false | false | 6,730 | r |
split_data <- function(data, col_source, u0_source){
# splits data of col_source below and above u0_source
# taking the minimum of the two
k <- dim(data)[1]
n <- dim(data)[3]
stopifnot(k >= 2)
above_idx <- data[1,col_source,] > u0_source
stopifnot(any(above_idx))
stopifnot(any(!above_idx)) # check som... |
TRACE <-
function (...){
all.dat<<-AFLP$all.dat
all.dat$Peak_area[all.dat$Peak_area==0]=1
all.dat$Peak_width[all.dat$Peak_width==0]=0.05
if (is.null(polyy)) {
quit.fun... | /RawGeno/R/TRACE.R | no_license | arrigon/RawGeno | R | false | false | 4,254 | r | TRACE <-
function (...){
all.dat<<-AFLP$all.dat
all.dat$Peak_area[all.dat$Peak_area==0]=1
all.dat$Peak_width[all.dat$Peak_width==0]=0.05
if (is.null(polyy)) {
quit.fun... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/D1Object.R
\docType{methods}
\name{getFormatId,D1Object-method}
\alias{getFormatId,D1Object-method}
\title{Get the FormatId of the D1Object}
\usage{
\S4method{getFormatId}{D1Object}(x)
}
\arguments{
\item{x}{D1Object}
\item{...}{(not yet use... | /dataone/man/getFormatId.Rd | permissive | couture322/rdataone | R | false | true | 399 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/D1Object.R
\docType{methods}
\name{getFormatId,D1Object-method}
\alias{getFormatId,D1Object-method}
\title{Get the FormatId of the D1Object}
\usage{
\S4method{getFormatId}{D1Object}(x)
}
\arguments{
\item{x}{D1Object}
\item{...}{(not yet use... |
library(caret)
library(mlbench)
library(caretEnsemble)
# load the dataset
data(PimaIndiansDiabetes)
#### Spot-Check Algorithms ####
# prepare 10-fold cross validation
trainControl <- trainControl(method="cv", number=10)
# estimate accuracy of logistic regression
set.seed(7)
fit.lr <- train(diabetes~., dat... | /Pima_Iris_Example/Pima-Example.R | no_license | Archieus/MachineLearning | R | false | false | 1,292 | r | library(caret)
library(mlbench)
library(caretEnsemble)
# load the dataset
data(PimaIndiansDiabetes)
#### Spot-Check Algorithms ####
# prepare 10-fold cross validation
trainControl <- trainControl(method="cv", number=10)
# estimate accuracy of logistic regression
set.seed(7)
fit.lr <- train(diabetes~., dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Movement.R
\docType{class}
\name{Movement-class}
\alias{Movement-class}
\alias{Movement}
\title{An abstract Reference Class for fitting a Movement model.}
\description{
Reference class implementing common functions for movement models.
}
\sec... | /man/Movement-class.Rd | no_license | fjaine/argosTrack | R | false | true | 2,668 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Movement.R
\docType{class}
\name{Movement-class}
\alias{Movement-class}
\alias{Movement}
\title{An abstract Reference Class for fitting a Movement model.}
\description{
Reference class implementing common functions for movement models.
}
\sec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fetch-runs.R
\name{fetch_runs}
\alias{fetch_runs}
\title{Fetch runs data from GDQ for a given event}
\usage{
fetch_runs(event = c("cgdq", "agdq2011", "jrdq", "agdq2016", "sgdq2016"))
}
\arguments{
\item{event}{name of the event}
}
\value{
dat... | /man/fetch_runs.Rd | no_license | bkkkk/gdqr | R | false | true | 516 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fetch-runs.R
\name{fetch_runs}
\alias{fetch_runs}
\title{Fetch runs data from GDQ for a given event}
\usage{
fetch_runs(event = c("cgdq", "agdq2011", "jrdq", "agdq2016", "sgdq2016"))
}
\arguments{
\item{event}{name of the event}
}
\value{
dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datapackr.R
\docType{package}
\name{datapackr}
\alias{datapackr}
\alias{datapackr-package}
\title{Data Pack on R
datapackr: a grammar of Data Pack manipulation
datapackr is the engine behind PEPFAR Data Packs, a tool used annually to
aid P... | /man/datapackr.Rd | no_license | Awnage/datapackr | R | false | true | 1,173 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datapackr.R
\docType{package}
\name{datapackr}
\alias{datapackr}
\alias{datapackr-package}
\title{Data Pack on R
datapackr: a grammar of Data Pack manipulation
datapackr is the engine behind PEPFAR Data Packs, a tool used annually to
aid P... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/usage.R
\name{usage}
\alias{usage}
\title{Show the usage of a function}
\usage{
usage(FUN, width = getOption("width"), tidy = TRUE, output = TRUE,
indent.by.FUN = FALSE, fail = c("warn", "stop", "none"))
}
\arguments{
\item{FUN}{the func... | /man/usage.Rd | no_license | krivit/formatR | R | false | true | 1,913 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/usage.R
\name{usage}
\alias{usage}
\title{Show the usage of a function}
\usage{
usage(FUN, width = getOption("width"), tidy = TRUE, output = TRUE,
indent.by.FUN = FALSE, fail = c("warn", "stop", "none"))
}
\arguments{
\item{FUN}{the func... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayesbr_app.R
\name{bayesbr_app}
\alias{bayesbr_app}
\alias{bayesbr_app,}
\alias{bayesbr_shiny}
\title{The bayesbr Application}
\usage{
bayesbr_app()
}
\description{
A function that runs the shiny application designed for using bayesbr packag... | /man/bayesbr_app.Rd | no_license | pjoao266/bayesbr | R | false | true | 498 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayesbr_app.R
\name{bayesbr_app}
\alias{bayesbr_app}
\alias{bayesbr_app,}
\alias{bayesbr_shiny}
\title{The bayesbr Application}
\usage{
bayesbr_app()
}
\description{
A function that runs the shiny application designed for using bayesbr packag... |
# repeat
x <- 1
repeat {
print(x)
x <- x + 1
if(x>5)
break
}
# while
x <- 1
while (x<5){
print(x)
x <- x + 1
}
# for
for (x in 1:5)
print(x)
for (y in c(1,2,3)){
cat(y)
cat("\n")
}
# switch, x as the index of list('a','b','c')
for (x in 1:3)
print(switch(x, 'a','b','c'))
# R可以用apply()、lappl... | /grammar/loop.R | no_license | juniuszhou/R_language | R | false | false | 765 | r | # repeat
x <- 1
repeat {
print(x)
x <- x + 1
if(x>5)
break
}
# while
x <- 1
while (x<5){
print(x)
x <- x + 1
}
# for
for (x in 1:5)
print(x)
for (y in c(1,2,3)){
cat(y)
cat("\n")
}
# switch, x as the index of list('a','b','c')
for (x in 1:3)
print(switch(x, 'a','b','c'))
# R可以用apply()、lappl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Moran_I_ByRaster.R
\name{ESS_by_Moran_I}
\alias{ESS_by_Moran_I}
\title{Estimate Effective Sample Size}
\usage{
ESS_by_Moran_I(n, rho)
}
\arguments{
\item{n}{sample size}
\item{rho}{Global Moran's I}
}
\value{
numeric; estimated... | /man/ESS_by_Moran_I.Rd | no_license | cran/sharpshootR | R | false | true | 659 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Moran_I_ByRaster.R
\name{ESS_by_Moran_I}
\alias{ESS_by_Moran_I}
\title{Estimate Effective Sample Size}
\usage{
ESS_by_Moran_I(n, rho)
}
\arguments{
\item{n}{sample size}
\item{rho}{Global Moran's I}
}
\value{
numeric; estimated... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sumNum.R
\name{sumNum}
\alias{sumNum}
\title{sumNum}
\usage{
sumNum(data, grp = NULL, rd = 2)
}
\arguments{
\item{data}{a data frame or matrix.}
\item{grp}{possible factor to group by, defaults to NULL. Maximum are two groups.}
\item{rd}{ro... | /man/sumNum.Rd | no_license | juttaGa/jmisc | R | false | true | 709 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sumNum.R
\name{sumNum}
\alias{sumNum}
\title{sumNum}
\usage{
sumNum(data, grp = NULL, rd = 2)
}
\arguments{
\item{data}{a data frame or matrix.}
\item{grp}{possible factor to group by, defaults to NULL. Maximum are two groups.}
\item{rd}{ro... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{gbr_pcs}
\alias{gbr_pcs}
\title{Simulated Principal Components for 'GBR' population in the 1000 Genomes Project.}
\format{A matrix with 91 rows (one for each subject) and 5 columns (one for each PC)}
\usage{
data(g... | /GBJ/man/gbr_pcs.Rd | no_license | akhikolla/InformationHouse | R | false | true | 613 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{gbr_pcs}
\alias{gbr_pcs}
\title{Simulated Principal Components for 'GBR' population in the 1000 Genomes Project.}
\format{A matrix with 91 rows (one for each subject) and 5 columns (one for each PC)}
\usage{
data(g... |
ddbcbb407670c3f2fddd21f32044d38c arbiter-07-comp-error01-qbf-hardness-depth-2.qdimacs 449 948 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/A1/Database/Miller-Scholl-Becker/QBF-Hardness/arbiter-07-comp-error01-qbf-hardness-depth-2/arbiter-07-comp-error01-qbf-hardness-depth-2.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 93 | r | ddbcbb407670c3f2fddd21f32044d38c arbiter-07-comp-error01-qbf-hardness-depth-2.qdimacs 449 948 |
#' Write CIFTI component files from a \code{"xifti"} object.
#'
#' Write metric GIFTIs for the cortical surface data and NIFTIs for the
#' subcortical labels and mask in a \code{"xifti"} object. Each present
#' brainstructure will be written; if a brainstructure is absent the
#' corresponding file is not written.
#... | /R/write_cifti.R | no_license | yoaman/ciftiTools-0.2.1 | R | false | false | 7,749 | r | #' Write CIFTI component files from a \code{"xifti"} object.
#'
#' Write metric GIFTIs for the cortical surface data and NIFTIs for the
#' subcortical labels and mask in a \code{"xifti"} object. Each present
#' brainstructure will be written; if a brainstructure is absent the
#' corresponding file is not written.
#... |
source('Articles_NetWork_Plots.R')
#Below runs through every paper in the input data and plots network diagrams of word usage patterns by
#sentence, paragraph, and article
data.list <- read_json_data()
dir.create('plots')
for (name in names(data.list)){
print(name)
word.frame<-unnest_by_title(data.... | /Generate_Plots.R | no_license | RyanWendt/Newspaper-Article-Text-Analysis | R | false | false | 1,038 | r | source('Articles_NetWork_Plots.R')
#Below runs through every paper in the input data and plots network diagrams of word usage patterns by
#sentence, paragraph, and article
data.list <- read_json_data()
dir.create('plots')
for (name in names(data.list)){
print(name)
word.frame<-unnest_by_title(data.... |
library(ape)
library(geiger)
library(dplyr)
library(sf)
library(ggplot2)
library(picante)
library(rnaturalearth)
library(rgdal)
library(biscale)
library(cowplot)
Tree <- read.nexus("4000phylogeny.tre") ##load in tree
Occ <- read.csv("madagascar_ferns.csv") ##load in occurrences
Occ <- st_as_sf(Occ, coords=c("decima... | /Phylogenetic_Diversity.R | no_license | Phylobiology/Phylogenetic-Diversity | R | false | false | 5,392 | r | library(ape)
library(geiger)
library(dplyr)
library(sf)
library(ggplot2)
library(picante)
library(rnaturalearth)
library(rgdal)
library(biscale)
library(cowplot)
Tree <- read.nexus("4000phylogeny.tre") ##load in tree
Occ <- read.csv("madagascar_ferns.csv") ##load in occurrences
Occ <- st_as_sf(Occ, coords=c("decima... |
# Coursera JHPH Data Science
# 08 - Pratical Machine Learning
# Week 4 | Lecture 2 - Combining Predictors
# Joe Nguyen | 18 Nov, 2015
# Change working directory
dirBase <- "/home/joe/Documents/01-coursera/01-data-science"
dirWorking <- "/08-practical-ml"
setwd(file.path(dirBase, dirWorking))
rm(list = ls())
# par(mfro... | /w4_lec02_comb_predictors.R | no_license | jlnguyen/08-practical-ml | R | false | false | 2,185 | r | # Coursera JHPH Data Science
# 08 - Pratical Machine Learning
# Week 4 | Lecture 2 - Combining Predictors
# Joe Nguyen | 18 Nov, 2015
# Change working directory
dirBase <- "/home/joe/Documents/01-coursera/01-data-science"
dirWorking <- "/08-practical-ml"
setwd(file.path(dirBase, dirWorking))
rm(list = ls())
# par(mfro... |
# Package for data manipulation tasks
library(dplyr)
# Package for estimating Generalized Linear Mixed Models (GLMMs)
library(lme4)
# Specify location of input data files
path_pns_input_data <- Sys.getenv("path_pns_input_data")
# Specify location of output data files
path_pns_output_data <- Sys.getenv("path_pns_output... | /pns-code/module-01.R | permissive | jamieyap/working-with-data-workshops | R | false | false | 6,149 | r | # Package for data manipulation tasks
library(dplyr)
# Package for estimating Generalized Linear Mixed Models (GLMMs)
library(lme4)
# Specify location of input data files
path_pns_input_data <- Sys.getenv("path_pns_input_data")
# Specify location of output data files
path_pns_output_data <- Sys.getenv("path_pns_output... |
#' nodeSub
#'
#' Simulation of sequence evolution under different models
#'
#' @docType package
#' @author Thijs Janzen
#' @import Rcpp phangorn testit stringr
#' @importFrom Rcpp evalCpp
#' @useDynLib nodeSub
#' @name nodeSub
| /R/nodeSub.R | no_license | thijsjanzen/nodeSub | R | false | false | 227 | r | #' nodeSub
#'
#' Simulation of sequence evolution under different models
#'
#' @docType package
#' @author Thijs Janzen
#' @import Rcpp phangorn testit stringr
#' @importFrom Rcpp evalCpp
#' @useDynLib nodeSub
#' @name nodeSub
|
RawFrame = read.csv('/ML-based-prediction-of-CR-related-genes/Data/Ageing and CR genes/ensemblid_conversion.csv') #GET COEXPRESSION FRAME
AgeingGenes = readRDS("/ML-based-prediction-of-CR-related-genes/Data/Ageing and CR genes/AgeingGenes.rds")
CrGenes = readRDS("/ML-based-prediction-of-CR-related-genes/Data/Age... | /Code/Datasets Construction/CoExpression.R | no_license | GusDany3691/ML-based-prediction-of-CR-related-genes | R | false | false | 2,051 | r | RawFrame = read.csv('/ML-based-prediction-of-CR-related-genes/Data/Ageing and CR genes/ensemblid_conversion.csv') #GET COEXPRESSION FRAME
AgeingGenes = readRDS("/ML-based-prediction-of-CR-related-genes/Data/Ageing and CR genes/AgeingGenes.rds")
CrGenes = readRDS("/ML-based-prediction-of-CR-related-genes/Data/Age... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/result.R
\name{createResultFile}
\alias{createResultFile}
\title{Create a result file}
\usage{
createResultFile(
instanceName,
contributionName,
objectives,
points,
card,
suppCard = NULL,
extCard = NULL,
objectiveType = rep("i... | /misc/R/MOrepoTools/man/createResultFile.Rd | no_license | zhhwss/MOrepo | R | false | true | 3,021 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/result.R
\name{createResultFile}
\alias{createResultFile}
\title{Create a result file}
\usage{
createResultFile(
instanceName,
contributionName,
objectives,
points,
card,
suppCard = NULL,
extCard = NULL,
objectiveType = rep("i... |
#' Create Folds
#'
#' This function provides a list of row indices used for k-fold cross-validation
#' (basic, stratified, grouped, or blocked). Repeated fold creation is supported as well.
#' By default, in-sample indices are returned.
#'
#' By default, the function uses stratified splitting. This will balance t... | /R/create_folds.R | no_license | cran/splitTools | R | false | false | 3,262 | r | #' Create Folds
#'
#' This function provides a list of row indices used for k-fold cross-validation
#' (basic, stratified, grouped, or blocked). Repeated fold creation is supported as well.
#' By default, in-sample indices are returned.
#'
#' By default, the function uses stratified splitting. This will balance t... |
setwd("D:/BMSCE/sem7/DSR/DSR-1BM17CS042/")
data <- read.csv("Churn_Modelling.csv")
data$EstimatedSalary
nrow(data)
salary_group <- vector(mode="character", length = nrow(data))
salary_group
salary_group[data$EstimatedSalary < 10000] <- "Low"
salary_group[data$EstimatedSalary >= 10000 & data$EstimatedSalary < 100000... | /Lab-4/lab4_2.R | no_license | krishnatcs17/DSR-1BM17CS042 | R | false | false | 568 | r | setwd("D:/BMSCE/sem7/DSR/DSR-1BM17CS042/")
data <- read.csv("Churn_Modelling.csv")
data$EstimatedSalary
nrow(data)
salary_group <- vector(mode="character", length = nrow(data))
salary_group
salary_group[data$EstimatedSalary < 10000] <- "Low"
salary_group[data$EstimatedSalary >= 10000 & data$EstimatedSalary < 100000... |
library(dplyr)
library(Seurat)
library(ggplot2)
library(data.table)
library(scran)
library(scRNAseq)
library(scater)
library(BBmisc)
library(ggrepel)
library(ggpubr)
library(patchwork)
library(viridis)
library(DoubletFinder)
# Dataset Prep
gonadE11 <- Read10X(data.dir = "Niu2020/E11.5/", gene.column = 2, unique.featur... | /Figure Code/Main Figure 2 Niu.R | no_license | yunkyokim/AbsoluteScaling | R | false | false | 10,801 | r | library(dplyr)
library(Seurat)
library(ggplot2)
library(data.table)
library(scran)
library(scRNAseq)
library(scater)
library(BBmisc)
library(ggrepel)
library(ggpubr)
library(patchwork)
library(viridis)
library(DoubletFinder)
# Dataset Prep
gonadE11 <- Read10X(data.dir = "Niu2020/E11.5/", gene.column = 2, unique.featur... |
# -------------------------------------------------------------------------------
# `extract_lp_nl()` extracts the impulse response vector, along with the upper
# and lower confidence interval vectors, created by the `lp_nl()` and `lp_nl_iv()`
# function in the `lpirfs` and puts them into a tidy dataframe that allows... | /R/extract_lp_nl.R | no_license | anguyen1210/var-tools | R | false | false | 5,307 | r | # -------------------------------------------------------------------------------
# `extract_lp_nl()` extracts the impulse response vector, along with the upper
# and lower confidence interval vectors, created by the `lp_nl()` and `lp_nl_iv()`
# function in the `lpirfs` and puts them into a tidy dataframe that allows... |
.Random.seed <-
c(403L, 313L, -1685835015L, -907972469L, 204142778L, 972688316L,
-1080921857L, -1582427051L, -532906132L, 1182699458L, 1519552541L,
-243779433L, -1176181250L, -424544840L, 482859419L, -754786311L,
-612432056L, -1443208586L, -552764495L, -451623453L, -1521255758L,
635238148L, 960891975L, -704533731L,... | /R/anRpackage-internal.R | no_license | rafamonge/RealEstate | R | false | false | 8,267 | r | .Random.seed <-
c(403L, 313L, -1685835015L, -907972469L, 204142778L, 972688316L,
-1080921857L, -1582427051L, -532906132L, 1182699458L, 1519552541L,
-243779433L, -1176181250L, -424544840L, 482859419L, -754786311L,
-612432056L, -1443208586L, -552764495L, -451623453L, -1521255758L,
635238148L, 960891975L, -704533731L,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NMF-class.R
\docType{methods}
\name{entropy,factor,ANY-method}
\alias{entropy,factor,ANY-method}
\title{Computes the purity on the contingency table of \code{x} and \code{y}, that is
coerced into a factor if necessary.}
\usage{
\S4method{entr... | /man/entropy-factor-ANY-method.Rd | no_license | pooranis/NMF | R | false | true | 481 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NMF-class.R
\docType{methods}
\name{entropy,factor,ANY-method}
\alias{entropy,factor,ANY-method}
\title{Computes the purity on the contingency table of \code{x} and \code{y}, that is
coerced into a factor if necessary.}
\usage{
\S4method{entr... |
# run with:
# qsub -v script=pQTL_ERK1RatioInt Rsubmit_args.sh
library(qtl2)
library(qtl2geno)
library(qtl2scan)
library(qtl2convert)
setwd("/projects/korstanje-lab/ytakemon/JAC_DO_Kidney")
load("./shiny_annotation.RData")
load("./RNAseq_data/DO188b_kidney.RData")
erk1 <- read.delim("./Phenotype/phenotypes/JAC_WB_kidn... | /QTLmapping/scan_addtrans/pQTL_ERK1RatioInt.R | permissive | ytakemon/JAC_DO_Kidney | R | false | false | 2,199 | r | # run with:
# qsub -v script=pQTL_ERK1RatioInt Rsubmit_args.sh
library(qtl2)
library(qtl2geno)
library(qtl2scan)
library(qtl2convert)
setwd("/projects/korstanje-lab/ytakemon/JAC_DO_Kidney")
load("./shiny_annotation.RData")
load("./RNAseq_data/DO188b_kidney.RData")
erk1 <- read.delim("./Phenotype/phenotypes/JAC_WB_kidn... |
\name{sampleLabel}
\alias{sampleLabel}
\title{
Generate data structure of sample labels
}
\description{
Generate data structure of sample labels
}
\usage{
sampleLabel(label, treatment, control)
}
\arguments{
\item{label}{sample label vector}
\item{treatment}{treatment label}
\item{control}{control label}
}
\det... | /R/CePa_v0.6/man/sampleLabel.Rd | permissive | NCBI-Hackathons/Metabolomics-Data-Portal | R | false | false | 654 | rd | \name{sampleLabel}
\alias{sampleLabel}
\title{
Generate data structure of sample labels
}
\description{
Generate data structure of sample labels
}
\usage{
sampleLabel(label, treatment, control)
}
\arguments{
\item{label}{sample label vector}
\item{treatment}{treatment label}
\item{control}{control label}
}
\det... |
### Not to be called by the users, so all functions start with a prefix of dot
### and thus are not exported.
### Database related utilities, using RPostgreSQL to connect
## ------------------------------------------------------------------------
.db.connect.rpostgresql <- function(host, user, dbname, password,
... | /R/db_conn-rpostgresql.R | no_license | abresler/PivotalR | R | false | false | 12,861 | r | ### Not to be called by the users, so all functions start with a prefix of dot
### and thus are not exported.
### Database related utilities, using RPostgreSQL to connect
## ------------------------------------------------------------------------
.db.connect.rpostgresql <- function(host, user, dbname, password,
... |
\alias{gtkSpinButtonSetValue}
\name{gtkSpinButtonSetValue}
\title{gtkSpinButtonSetValue}
\description{Set the value of \code{spin.button}.}
\usage{gtkSpinButtonSetValue(object, value)}
\arguments{
\item{\verb{object}}{a \code{\link{GtkSpinButton}}}
\item{\verb{value}}{the new value}
}
\author{Derived by RGtkGen from GT... | /RGtk2/man/gtkSpinButtonSetValue.Rd | no_license | lawremi/RGtk2 | R | false | false | 357 | rd | \alias{gtkSpinButtonSetValue}
\name{gtkSpinButtonSetValue}
\title{gtkSpinButtonSetValue}
\description{Set the value of \code{spin.button}.}
\usage{gtkSpinButtonSetValue(object, value)}
\arguments{
\item{\verb{object}}{a \code{\link{GtkSpinButton}}}
\item{\verb{value}}{the new value}
}
\author{Derived by RGtkGen from GT... |
\name{kinplot}
\alias{kinplot}
\title{Plot the fit results}
\usage{
kinplot(fit, name = NULL, xlab = "Time",
ylab = "Observed",
xlim = c(1, 1.1) * range(fit$data$time),
ylim = c(1, 1.1) * range(fit$data$observed, na.rm = TRUE),
legend = TRUE, pdf = FALSE, ...)
}
\arguments{
\item{fit}{An object of c... | /DevSF/dev/doc/kinGUI2/man/kinplot.Rd | no_license | zhenglei-gao/StudyKin | R | false | false | 932 | rd | \name{kinplot}
\alias{kinplot}
\title{Plot the fit results}
\usage{
kinplot(fit, name = NULL, xlab = "Time",
ylab = "Observed",
xlim = c(1, 1.1) * range(fit$data$time),
ylim = c(1, 1.1) * range(fit$data$observed, na.rm = TRUE),
legend = TRUE, pdf = FALSE, ...)
}
\arguments{
\item{fit}{An object of c... |
#' Formula interface to geom_barh()
#'
#' @inherit ggstance::geom_barh description references
#' @inherit gf_point
#' @inheritParams gf_line
#' @inheritParams ggstance::geom_barh
#'
#' @param gformula A formula, typically with shape `~ x`. (`y ~ x` is also possible,
#' but typically using one of [gf_col()], [gf_pro... | /R/ggstance.R | no_license | iMarcello/ggformula | R | false | false | 9,982 | r |
#' Formula interface to geom_barh()
#'
#' @inherit ggstance::geom_barh description references
#' @inherit gf_point
#' @inheritParams gf_line
#' @inheritParams ggstance::geom_barh
#'
#' @param gformula A formula, typically with shape `~ x`. (`y ~ x` is also possible,
#' but typically using one of [gf_col()], [gf_pro... |
library(datasets)
library(dplyr)
data("DNase")
dplyr::select(DNase, conc, density)
shinyServer(function(input, output) {
selectedData <- reactive({
DNase [, c(input$xcol, input$ycol)]
})
clusters <- reactive({
kmeans(selectedData(), input$clusters)
})
output$plot1 <- renderPlot({
par(mar ... | /server.R | no_license | Niru4/Data-Products | R | false | false | 495 | r | library(datasets)
library(dplyr)
data("DNase")
dplyr::select(DNase, conc, density)
shinyServer(function(input, output) {
selectedData <- reactive({
DNase [, c(input$xcol, input$ycol)]
})
clusters <- reactive({
kmeans(selectedData(), input$clusters)
})
output$plot1 <- renderPlot({
par(mar ... |
###################################################################
# Data processing for Activity and Covariance Data ##
## 04/05/2018 ##
###################################################################
# 1.create half hourly level activity data... | /data processing.R | no_license | junruidi/HOTSscripts | R | false | false | 1,949 | r | ###################################################################
# Data processing for Activity and Covariance Data ##
## 04/05/2018 ##
###################################################################
# 1.create half hourly level activity data... |
library(ape)
testtree <- read.tree("2428_6.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="2428_6_unrooted.txt") | /codeml_files/newick_trees_processed/2428_6/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("2428_6.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="2428_6_unrooted.txt") |
# Shiny Global File
# Packages
library(shiny)
library(DT)
library(ggplot2)
library(readxl)
library(reshape2)
library(dplyr)
library(utils)
library(BioMonTools)
library(knitr)
library(maps)
library(rmarkdown)
library(markdown)
library(tidyr)
library(leaflet)
library(shinyjs) # used for download button enable
library(ma... | /inst/shiny-examples/MassIBItools/global.R | permissive | Blocktt/MassIBItools | R | false | false | 1,660 | r | # Shiny Global File
# Packages
library(shiny)
library(DT)
library(ggplot2)
library(readxl)
library(reshape2)
library(dplyr)
library(utils)
library(BioMonTools)
library(knitr)
library(maps)
library(rmarkdown)
library(markdown)
library(tidyr)
library(leaflet)
library(shinyjs) # used for download button enable
library(ma... |
# This is a test example for an object-oriented approach for a investor - company management system. The base consists of three classes, Investor, AcquiredCompany and Company.
# Company: This is the first building block, it consists of historical stock prises and some basic information about the company. This class h... | /script.R | no_license | dr-funkenstein/stock-management- | R | false | false | 3,284 | r | # This is a test example for an object-oriented approach for a investor - company management system. The base consists of three classes, Investor, AcquiredCompany and Company.
# Company: This is the first building block, it consists of historical stock prises and some basic information about the company. This class h... |
#' Create mask object
#'
#' Creates a mask object to use with the function
#' \code{\link{fit.ascr}}.
#'
#' @param buffer The minimum distance between trap locations and the
#' edge of the generated mask.
#' @param ... Arguments to be passed to \link{make.mask}.
#' @inheritParams fit.ascr
#'
#' @return An object of... | /R/convert.r | no_license | Jialing-Liu/ascr | R | false | false | 10,249 | r | #' Create mask object
#'
#' Creates a mask object to use with the function
#' \code{\link{fit.ascr}}.
#'
#' @param buffer The minimum distance between trap locations and the
#' edge of the generated mask.
#' @param ... Arguments to be passed to \link{make.mask}.
#' @inheritParams fit.ascr
#'
#' @return An object of... |
<html>
<head>
<meta name="TextLength" content="SENT_NUM:3, WORD_NUM:77">
</head>
<body bgcolor="white">
<a href="#0" id="0">In more detail, the creation of the dataset was done in the following way: First, all verb entries with more than one definition in the Oxford Junior Dictionary [] were collected into a list.</a>
... | /ACL-Dataset/Summary_rnd/P14-2035.xhtml.A.R | no_license | Angela7126/SLNSumEval | R | false | false | 633 | r | <html>
<head>
<meta name="TextLength" content="SENT_NUM:3, WORD_NUM:77">
</head>
<body bgcolor="white">
<a href="#0" id="0">In more detail, the creation of the dataset was done in the following way: First, all verb entries with more than one definition in the Oxford Junior Dictionary [] were collected into a list.</a>
... |
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Use the Carlina IBM with individual variation in flowering intercept to test the "Stochastic
## Iwasa" approximation.
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
r... | /ipmbook-code/c9/Carlina IPM Stoch Iwasa.R | no_license | aekendig/population-modeling-techniques | R | false | false | 10,446 | r | ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## Use the Carlina IBM with individual variation in flowering intercept to test the "Stochastic
## Iwasa" approximation.
## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.