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 |
|---|---|---|---|---|---|---|---|---|---|
install.packages("shiny", dependencies=TRUE)
install.packages("tm", dependencies=TRUE)
install.packages("SnowballC", dependencies=TRUE)
install.packages("pdftools", dependencies=TRUE)
install.packages("ggplot2", dependencies=TRUE)
install.packages("plyr", dependencies=TRUE)
install.packages("class", dependencie... | /init.R | no_license | nullkod/LawRobot | R | false | false | 328 | r | install.packages("shiny", dependencies=TRUE)
install.packages("tm", dependencies=TRUE)
install.packages("SnowballC", dependencies=TRUE)
install.packages("pdftools", dependencies=TRUE)
install.packages("ggplot2", dependencies=TRUE)
install.packages("plyr", dependencies=TRUE)
install.packages("class", dependencie... |
#' Croatian employment data for the year 2013
#'
#' Aggregate Croatian detailed employment statistics into the Croatian (EU standard)
#' Symmetric input-output table format.
#' @format A data frame with 107 observations in 2 variables:
#' \describe{
#' \item{code}{Short labels}
#' \item{iotables_row}{iotable... | /R/data-croatia_employment_2013.R | permissive | cran/iotables | R | false | false | 523 | r | #' Croatian employment data for the year 2013
#'
#' Aggregate Croatian detailed employment statistics into the Croatian (EU standard)
#' Symmetric input-output table format.
#' @format A data frame with 107 observations in 2 variables:
#' \describe{
#' \item{code}{Short labels}
#' \item{iotables_row}{iotable... |
#' @import shiny
#' @import shinydashboard
#' @import R6
NULL
| /www/modules/imports.R | no_license | DavidBarke/shinyQW | R | false | false | 63 | r | #' @import shiny
#' @import shinydashboard
#' @import R6
NULL
|
library(shiny)
shinyServer( function(input, output, session) {
data <- reactiveValues(isset=FALSE,full=FALSE,checker=FALSE,counter=1,mincounter=1,emptymatrix=matrix(0),emptymin=matrix(0), minmatrix=matrix(0))
output$vars <- renderUI({
data$nVars <- as.numeric(input$assets)
data$nCo... | /code/server.r | no_license | misspatriciajune/optimizer | R | false | false | 6,756 | r | library(shiny)
shinyServer( function(input, output, session) {
data <- reactiveValues(isset=FALSE,full=FALSE,checker=FALSE,counter=1,mincounter=1,emptymatrix=matrix(0),emptymin=matrix(0), minmatrix=matrix(0))
output$vars <- renderUI({
data$nVars <- as.numeric(input$assets)
data$nCo... |
### set working directory 301 subjects
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
### install my burden analysis package
# library(devtools)
# install_github("naibank/GSBurden")
### clear existing variables
rm(list=ls())
library(ggplot2)
### read phenotype table
info <- read.delim("../../../../main/... | /GS_NFLD/coding/cnvBurdenAnalysisADMSmaller.R | no_license | naibank/GRVS_ASD | R | false | false | 10,510 | r | ### set working directory 301 subjects
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
### install my burden analysis package
# library(devtools)
# install_github("naibank/GSBurden")
### clear existing variables
rm(list=ls())
library(ggplot2)
### read phenotype table
info <- read.delim("../../../../main/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fp_cell.R
\name{fp_cell}
\alias{fp_cell}
\alias{format.fp_cell}
\alias{print.fp_cell}
\alias{update.fp_cell}
\title{Cell formatting properties}
\usage{
fp_cell(border = fp_border(width = 0), border.bottom, border.left, border.top,
border.ri... | /man/fp_cell.Rd | no_license | plot-and-scatter/officer | R | false | true | 1,779 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fp_cell.R
\name{fp_cell}
\alias{fp_cell}
\alias{format.fp_cell}
\alias{print.fp_cell}
\alias{update.fp_cell}
\title{Cell formatting properties}
\usage{
fp_cell(border = fp_border(width = 0), border.bottom, border.left, border.top,
border.ri... |
library(shiny)
library(data.table)
library(dplyr)
library(ggplot2)
library(lubridate)
#need to switch to feather or heather for data loading per Joe Cheng
setwd("C://Users/The Pritchard family/Documents/R/jh_gh/")
wt.data <- read.csv("data/sales.data.cache2019-03-02.csv", stringsAsFactors = FALSE)
# fix this later by... | /buyer.forecast/server.R | no_license | hamnsannah/jh_gh | R | false | false | 11,420 | r | library(shiny)
library(data.table)
library(dplyr)
library(ggplot2)
library(lubridate)
#need to switch to feather or heather for data loading per Joe Cheng
setwd("C://Users/The Pritchard family/Documents/R/jh_gh/")
wt.data <- read.csv("data/sales.data.cache2019-03-02.csv", stringsAsFactors = FALSE)
# fix this later by... |
/Material R/Análisis_datos_III_gráficos.R | no_license | nuffield-cess/Escuela-de-Metodos-Experimentales | R | false | false | 12,105 | r | ||
# A second shiny example
library(shiny)
library(ggplot2)
library(plotly)
explore = function(data) {
ggplot2::theme_set(ggplot2::theme_minimal())
shiny::shinyApp(
ui = navbarPage(
"Data Explorer",
tabPanel("Raw data",
DT::dataTableOutput("table")),
navbarMenu(
"Summa... | /4_learn_shiny_2.R | permissive | andrewcparnell/Rfternoon | R | false | false | 10,138 | r | # A second shiny example
library(shiny)
library(ggplot2)
library(plotly)
explore = function(data) {
ggplot2::theme_set(ggplot2::theme_minimal())
shiny::shinyApp(
ui = navbarPage(
"Data Explorer",
tabPanel("Raw data",
DT::dataTableOutput("table")),
navbarMenu(
"Summa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/region_decoder.R
\docType{data}
\name{region_decoder}
\alias{region_decoder}
\title{Region decoder for sample files}
\format{A data frame of 35 observations and 2 columns.
\describe{
\item{Region}{An integer corresponding to the Region code i... | /man/region_decoder.Rd | no_license | HughParsonage/taxstats | R | false | true | 546 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/region_decoder.R
\docType{data}
\name{region_decoder}
\alias{region_decoder}
\title{Region decoder for sample files}
\format{A data frame of 35 observations and 2 columns.
\describe{
\item{Region}{An integer corresponding to the Region code i... |
Hmap=function(Fdata){
lawn=readJPEG("field.jpg")
ggplot()+
coord_cartesian(xlim=c(-52.5,52.5),ylim=c(-34,34))+
xlab("")+ylab("")+
annotation_custom(rasterGrob(lawn,width=unit(1,"npc"),height=unit(1,"npc"),interpolate=FALSE), -Inf, Inf, -Inf, Inf)+
stat_density_2d(data=Fdata,aes(x=Fdata[,... | /Match Analysis/Heatmap.R | no_license | eason4best/-Football-Match-Analysis- | R | false | false | 671 | r | Hmap=function(Fdata){
lawn=readJPEG("field.jpg")
ggplot()+
coord_cartesian(xlim=c(-52.5,52.5),ylim=c(-34,34))+
xlab("")+ylab("")+
annotation_custom(rasterGrob(lawn,width=unit(1,"npc"),height=unit(1,"npc"),interpolate=FALSE), -Inf, Inf, -Inf, Inf)+
stat_density_2d(data=Fdata,aes(x=Fdata[,... |
# Indian Stocks
#stocks2
# Get quantmod
install.packages('quantmod')
library(quantmod)
if (!require("quantmod")) {
install.packages("quantmod")
library(quantmod)
}
start <- as.Date("2017-01-01")
end <- as.Date("2018-10-01")
getSymbols("SBIN.NS", src = "yahoo", from = start, to = end)
# What is SBI?
class(SBIN.N... | /quantmod_stocks.R | no_license | KetakiJethani/analytics | R | false | false | 1,026 | r | # Indian Stocks
#stocks2
# Get quantmod
install.packages('quantmod')
library(quantmod)
if (!require("quantmod")) {
install.packages("quantmod")
library(quantmod)
}
start <- as.Date("2017-01-01")
end <- as.Date("2018-10-01")
getSymbols("SBIN.NS", src = "yahoo", from = start, to = end)
# What is SBI?
class(SBIN.N... |
# Load R's "USPersonalExpenditure" dataset using the "data()" function
# This will produce a data frame called `USPersonalExpenditure`
data("USPersonalExpenditure")
# The variable USPersonalExpenditure is now accessible to you. Unfortunately,
# it's not a data frame (it's actually what is called a matrix)
# Test this ... | /exercise-3/exercise.R | permissive | jpettere/module9-dataframes | R | false | false | 1,738 | r | # Load R's "USPersonalExpenditure" dataset using the "data()" function
# This will produce a data frame called `USPersonalExpenditure`
data("USPersonalExpenditure")
# The variable USPersonalExpenditure is now accessible to you. Unfortunately,
# it's not a data frame (it's actually what is called a matrix)
# Test this ... |
required_packages = c('dplyr','fda','ggplot2','Rsolnp','devtools','caret')
(missed_packages = setdiff(required_packages,rownames(installed.packages())))
if(length(missed_packages)){
sapply(missed_packages, install.packages)
}
devtools::install_github("YunlongNie/DeFEC")
library(fda);library(dplyr);library(DeFEC)... | /simulation_study.R | no_license | caojiguo/DeFECA | R | false | false | 3,762 | r | required_packages = c('dplyr','fda','ggplot2','Rsolnp','devtools','caret')
(missed_packages = setdiff(required_packages,rownames(installed.packages())))
if(length(missed_packages)){
sapply(missed_packages, install.packages)
}
devtools::install_github("YunlongNie/DeFEC")
library(fda);library(dplyr);library(DeFEC)... |
test_that("as_fun_list() uses rlang auto-naming", {
nms <- names(as_fun_list(list(min, max), env()))
# Just check they are labellised as literals enclosed in brackets to
# insulate from upstream changes
expect_true(all(grepl("^<", nms)))
})
| /tests/testthat/test-colwise-funs.R | permissive | tidyverse/dplyr | R | false | false | 250 | r | test_that("as_fun_list() uses rlang auto-naming", {
nms <- names(as_fun_list(list(min, max), env()))
# Just check they are labellised as literals enclosed in brackets to
# insulate from upstream changes
expect_true(all(grepl("^<", nms)))
})
|
# 2nd Plot
#Data aquisition
hpc <- read.table('household_power_consumption.txt' , sep = ';' , header = TRUE, na.strings = '?')
head(hpc)
str(hpc)
# Date and Time Formating
hpc <- transform(hpc , Date = as.Date(as.character(hpc$Date), '%d/%m/%Y'))
hpc <- transform(hpc , Time = strptime(paste(hpc$Date,hpc$Tim... | /EDA Course Project 1/plot2.R | no_license | UmeshPentalwar/ExData_Plotting1 | R | false | false | 681 | r | # 2nd Plot
#Data aquisition
hpc <- read.table('household_power_consumption.txt' , sep = ';' , header = TRUE, na.strings = '?')
head(hpc)
str(hpc)
# Date and Time Formating
hpc <- transform(hpc , Date = as.Date(as.character(hpc$Date), '%d/%m/%Y'))
hpc <- transform(hpc , Time = strptime(paste(hpc$Date,hpc$Tim... |
#funcoes uteis
#funcao de x para calcular a i-esimo funcao da base ortonormal (phi) de cossenos
phi <- function(i, x){
sqrt(2) * cos(i * pi * x)
}
#funcao de x para calcular a i-esimo funcao da base ortonornal de senos e cossenos
#PROBLEMA NAO ESTA ESTIMANDO BEM A DENSIDADE
# phi2 <- function(i, x){
# return(ife... | /funcoes-uteis.R | no_license | jcpoloniato/fbst-nparam | R | false | false | 883 | r | #funcoes uteis
#funcao de x para calcular a i-esimo funcao da base ortonormal (phi) de cossenos
phi <- function(i, x){
sqrt(2) * cos(i * pi * x)
}
#funcao de x para calcular a i-esimo funcao da base ortonornal de senos e cossenos
#PROBLEMA NAO ESTA ESTIMANDO BEM A DENSIDADE
# phi2 <- function(i, x){
# return(ife... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Functions.R
\name{daily2annual}
\alias{daily2annual}
\title{Convert daily data to annual (zoo)----}
\usage{
daily2annual(x, FUN, na.rm = TRUE, out.fmt = "\%Y-\%m-\%d")
}
\arguments{
\item{x}{Input zoo variable.}
\item{FUN}{function for aggre... | /man/daily2annual.Rd | no_license | ln1267/dWaSSIC | R | false | true | 445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Functions.R
\name{daily2annual}
\alias{daily2annual}
\title{Convert daily data to annual (zoo)----}
\usage{
daily2annual(x, FUN, na.rm = TRUE, out.fmt = "\%Y-\%m-\%d")
}
\arguments{
\item{x}{Input zoo variable.}
\item{FUN}{function for aggre... |
#manually download and unzip data.
#Read in as follows, assuming data is in working directory...
NEI <- readRDS("summarySCC_PM25.rds") #main pollution data
SCC <- readRDS("Source_Classification_Code.rds") #pollution code decoded
#explore before plotting
head(NEI)
table(NEI$year) #has four years, 1999, 2002, 2005, 20... | /EDA_PR_week4.R | no_license | ajbixler/EDA_peer_week4 | R | false | false | 6,062 | r | #manually download and unzip data.
#Read in as follows, assuming data is in working directory...
NEI <- readRDS("summarySCC_PM25.rds") #main pollution data
SCC <- readRDS("Source_Classification_Code.rds") #pollution code decoded
#explore before plotting
head(NEI)
table(NEI$year) #has four years, 1999, 2002, 2005, 20... |
# teste
install.packages("usethis")
library(usethis)
#vse apresentar para o Git
usethis:: use_git_config(user.name = "Ricardo Iwagoro", user.email = "ricardoumeyama@hotmail.com")
# abrir o arquivo Renviorn
usethis::edit_r_environ()
# * Edit 'C:/Users/beatr/Documents/.Renviron'
# * Restart R for changes to take ... | /Untitled.R | no_license | riwagoro/DEMO_GIT | R | false | false | 673 | r | # teste
install.packages("usethis")
library(usethis)
#vse apresentar para o Git
usethis:: use_git_config(user.name = "Ricardo Iwagoro", user.email = "ricardoumeyama@hotmail.com")
# abrir o arquivo Renviorn
usethis::edit_r_environ()
# * Edit 'C:/Users/beatr/Documents/.Renviron'
# * Restart R for changes to take ... |
#' Creates a block grid of a given data type
#'
#' @param nrow number of rows
#' @param ncol number of columns
#' @param type data type of object
#' @param fill default fill color
#' @export
#' @examples
#' grid1 = block_grid(10, 10)
#' grid1 = block_grid(10, 10, 'matrix')
#' grid1[1] = 'red'
#' grid1
#' grid1 = bloc... | /R/rblocks.R | no_license | sarahsupp/rblocks | R | false | false | 2,611 | r | #' Creates a block grid of a given data type
#'
#' @param nrow number of rows
#' @param ncol number of columns
#' @param type data type of object
#' @param fill default fill color
#' @export
#' @examples
#' grid1 = block_grid(10, 10)
#' grid1 = block_grid(10, 10, 'matrix')
#' grid1[1] = 'red'
#' grid1
#' grid1 = bloc... |
rm(list=ls()) ## Vymazanie vsetkych premennych z pamati
gc() ## chceck pamate
data <- read.table("./household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep="... | /plot2.R | no_license | LukasCsoka/ExData_Plotting1 | R | false | false | 526 | r | rm(list=ls()) ## Vymazanie vsetkych premennych z pamati
gc() ## chceck pamate
data <- read.table("./household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
datetime <- strptime(paste(subSetData$Date, subSetData$Time, sep="... |
tb <- read.table("genbank_data.txt",header=T,as.is=T, fill=T)
tb$Date2 = as.Date(paste("1-",tolower(tb$Date),sep=""),"%d-%b-%y")
pdf("GenBank.data.pdf",width=10,height=5,pointsize=10)
par(mfrow=c(1,2))
plot(x=tb$Date2,y=tb$Genbank.Bases,log="y", type='l', col=c("blue"), yaxt="n",xaxt = "n",ylab="Bases",xlab="Year")
... | /ncbi/figures.R | permissive | zainul1114/ucdavis-bioinformatics-training.presentations | R | false | false | 2,945 | r |
tb <- read.table("genbank_data.txt",header=T,as.is=T, fill=T)
tb$Date2 = as.Date(paste("1-",tolower(tb$Date),sep=""),"%d-%b-%y")
pdf("GenBank.data.pdf",width=10,height=5,pointsize=10)
par(mfrow=c(1,2))
plot(x=tb$Date2,y=tb$Genbank.Bases,log="y", type='l', col=c("blue"), yaxt="n",xaxt = "n",ylab="Bases",xlab="Year")
... |
###############################################################################
#### Purpose: check output from draw-ordered adjusted UIS for pops paper resub
#### EMG 18 Nov 2019
###############################################################################
setwd("~/repos/fhs_2019_population_paper/vetting")
library... | /vetting/check_adjusted_UIs_5scenarios_onefile.R | no_license | ihmeuw/fhs_2019_population_paper | R | false | false | 7,172 | r | ###############################################################################
#### Purpose: check output from draw-ordered adjusted UIS for pops paper resub
#### EMG 18 Nov 2019
###############################################################################
setwd("~/repos/fhs_2019_population_paper/vetting")
library... |
#====================================
# A_AltPendientesTendMensGrf.R
#
# Calcula las tendencias
# en las anomalias mensuales, y
# grafica por variable (mes, pendiente) para cada
# una de las cuencas en cuestion
# --PRESENTACIÓN GRÁFICA ALTERNATIVA--
#====================================
library(dplyr)
#source... | /A_AltPendientesTendMensGrf-POND.R | no_license | juliosergio/BID2012 | R | false | false | 13,525 | r | #====================================
# A_AltPendientesTendMensGrf.R
#
# Calcula las tendencias
# en las anomalias mensuales, y
# grafica por variable (mes, pendiente) para cada
# una de las cuencas en cuestion
# --PRESENTACIÓN GRÁFICA ALTERNATIVA--
#====================================
library(dplyr)
#source... |
## Construction of Matrix for RNN-ARIMA ##
## EV = Emergency Event
library(forecast)
library("TTR")
gt_data = read.csv("C:\\Users\\isys05\\Desktop\\Research\\TAIWAN_2016\\Data\\group_cluster_quantity.csv",head=TRUE,sep=",")
gt_data$date <-as.Date( as.character(gt_data$date),"%m/... | /matrix_input.R | no_license | becster/Emergency_events_recommender | R | false | false | 2,443 | r | ## Construction of Matrix for RNN-ARIMA ##
## EV = Emergency Event
library(forecast)
library("TTR")
gt_data = read.csv("C:\\Users\\isys05\\Desktop\\Research\\TAIWAN_2016\\Data\\group_cluster_quantity.csv",head=TRUE,sep=",")
gt_data$date <-as.Date( as.character(gt_data$date),"%m/... |
context("estimate transdist")
test_that("Data checks performed", {
set.seed(1)
dist.func <- alist(n=1,
a=100,
b=100,
rnorm(n, a, b))
a <- sim.epidemic(R=1.5,
gen.t.mean=7,
gen.t.sd=2,
... | /inst/tests/test-transdist.r | no_license | HopkinsIDD/IDSpatialStats | R | false | false | 2,551 | r | context("estimate transdist")
test_that("Data checks performed", {
set.seed(1)
dist.func <- alist(n=1,
a=100,
b=100,
rnorm(n, a, b))
a <- sim.epidemic(R=1.5,
gen.t.mean=7,
gen.t.sd=2,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/auc.R
\name{AUC}
\alias{AUC}
\title{area under the curve
\code{AUC} Returns area under the curve}
\usage{
AUC(time, volume, time.normalize = TRUE, vol.normal = TRUE)
}
\arguments{
\item{time}{A \code{vector} of time points recorded for the ex... | /man/AUC.Rd | no_license | bhklab/Xeva | R | false | true | 1,015 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/auc.R
\name{AUC}
\alias{AUC}
\title{area under the curve
\code{AUC} Returns area under the curve}
\usage{
AUC(time, volume, time.normalize = TRUE, vol.normal = TRUE)
}
\arguments{
\item{time}{A \code{vector} of time points recorded for the ex... |
##############################
# Cleaning
##############################
cat("\014")
rm(list=ls())
if (!require("pacman")) install.packages("pacman"); library(pacman)
# setwd("/Users/hectorbahamonde/research/Tobalaba")
##############################
# COVID
##############################
# Load Covid Data
p_load... | /Bahamonde_Tobalaba.R | permissive | hbahamonde/Tobalaba | R | false | false | 29,017 | r | ##############################
# Cleaning
##############################
cat("\014")
rm(list=ls())
if (!require("pacman")) install.packages("pacman"); library(pacman)
# setwd("/Users/hectorbahamonde/research/Tobalaba")
##############################
# COVID
##############################
# Load Covid Data
p_load... |
#Merges the training and the test sets to create one data set.
#download the data
Url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(Url, destfile = "./cleandata.zip")
listZip <- unzip("./cleandata.zip")
#load trainging data into R
xtrain <- read.table(".... | /run_analysis.R | no_license | zyan123/GettingandCleaningData | R | false | false | 2,177 | r | #Merges the training and the test sets to create one data set.
#download the data
Url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(Url, destfile = "./cleandata.zip")
listZip <- unzip("./cleandata.zip")
#load trainging data into R
xtrain <- read.table(".... |
#' @title Plot stacked proportional bars
#' @name sjp.stackfrq
#'
#' @seealso \itemize{
#' \item \href{http://www.strengejacke.de/sjPlot/sjp.stackfrq/}{sjPlot manual: sjp.stackfrq}
#' \item \code{\link{sjt.stackfrq}}
#' }
#'
#' @description Plot items (variables) of a scale as s... | /R/sjPlotStackFrequencies.R | no_license | parinfuture/devel | R | false | false | 23,383 | r | #' @title Plot stacked proportional bars
#' @name sjp.stackfrq
#'
#' @seealso \itemize{
#' \item \href{http://www.strengejacke.de/sjPlot/sjp.stackfrq/}{sjPlot manual: sjp.stackfrq}
#' \item \code{\link{sjt.stackfrq}}
#' }
#'
#' @description Plot items (variables) of a scale as s... |
\name{lysopepdb}
\alias{lysopepdb}
\docType{data}
\title{
P-LPE database
}
\description{
In silico generated database for common P-LPE.
}
\usage{data("lysopepdb")}
\format{
Data frame with 30 observations and the following 3 variables.
\describe{
\item{\code{formula}}{character vector containing mo... | /man/lysopepdb.Rd | no_license | cran/LipidMS | R | false | false | 553 | rd | \name{lysopepdb}
\alias{lysopepdb}
\docType{data}
\title{
P-LPE database
}
\description{
In silico generated database for common P-LPE.
}
\usage{data("lysopepdb")}
\format{
Data frame with 30 observations and the following 3 variables.
\describe{
\item{\code{formula}}{character vector containing mo... |
setwd("Y:/AML")
exp.data <- read.table("target_AML_uniq_probes_177.exp", header=T)
setwd("C:/Documents and Settings/jh3283/Desktop/AML/")
save.image("target_uniq_177_exp.Rdata")
require("ggplot2")
data <- na.omit(exp.data)
rownames(data) <- data[,2]
names(data)
data<- data[,-c(1:2)]
##### cluster on sa... | /projAML/old/unspervised_AML_clean.R | no_license | cwt1/scripts-1 | R | false | false | 1,284 | r | setwd("Y:/AML")
exp.data <- read.table("target_AML_uniq_probes_177.exp", header=T)
setwd("C:/Documents and Settings/jh3283/Desktop/AML/")
save.image("target_uniq_177_exp.Rdata")
require("ggplot2")
data <- na.omit(exp.data)
rownames(data) <- data[,2]
names(data)
data<- data[,-c(1:2)]
##### cluster on sa... |
#plot1.R
#Reading File and Subset
data <- read.table("household_power_consumption.txt", header=TRUE, stringsAsFactors=FALSE, dec=".", sep = ";")
sub <- data[data$Date %in% c("1/2/2007", "2/2/2007"),]
#Plotting
sub$Global_active_power <- as.numeric(sub$Global_active_power)
png("plot1.png")
hist(sub$Global_active_power,... | /plot1.R | no_license | amo3tasem/ExData_Plotting1 | R | false | false | 414 | r | #plot1.R
#Reading File and Subset
data <- read.table("household_power_consumption.txt", header=TRUE, stringsAsFactors=FALSE, dec=".", sep = ";")
sub <- data[data$Date %in% c("1/2/2007", "2/2/2007"),]
#Plotting
sub$Global_active_power <- as.numeric(sub$Global_active_power)
png("plot1.png")
hist(sub$Global_active_power,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcda.R
\name{lpvf}
\alias{lpvf}
\title{Linear partial value function}
\usage{
lpvf(x, x_min, x_max, score_min = 0, score_max = 100)
}
\arguments{
\item{x}{Performance of the criterion on the original scale.}
\item{x_min}{Minimum value of cri... | /man/lpvf.Rd | no_license | DustinBrett/IVI-NSCLC | R | false | true | 950 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mcda.R
\name{lpvf}
\alias{lpvf}
\title{Linear partial value function}
\usage{
lpvf(x, x_min, x_max, score_min = 0, score_max = 100)
}
\arguments{
\item{x}{Performance of the criterion on the original scale.}
\item{x_min}{Minimum value of cri... |
logFSL1 <-
function(dat, xwFSL=gauher(13), bsigma, maxiter = 20, eps = 0.001, silent = 1)
{
#Fixed GH likelihood method with lambda=1 for logistic regression with random intercept
nSim <- nrow(xwFSL)
u <- xwFSL[, 1] * sqrt(2)
wFSL <- xwFSL[, 2]/sqrt(atan(1) * 4)
y <- dat[, 2]
es <- rep(1, nSim)
X <- mat... | /Data/MixedModels/Chapter07/logFSL1.r | no_license | anhnguyendepocen/mixedmodels | R | false | false | 1,880 | r | logFSL1 <-
function(dat, xwFSL=gauher(13), bsigma, maxiter = 20, eps = 0.001, silent = 1)
{
#Fixed GH likelihood method with lambda=1 for logistic regression with random intercept
nSim <- nrow(xwFSL)
u <- xwFSL[, 1] * sqrt(2)
wFSL <- xwFSL[, 2]/sqrt(atan(1) * 4)
y <- dat[, 2]
es <- rep(1, nSim)
X <- mat... |
#' Construct a path to a location within an installed or development package
#'
#' `path_package` differs from [system.file()] in that it always returns an
#' error if the package does not exist. It also returns a different error if
#' the file within the package does not exist.
#'
#'`path_package()` also automatically... | /R/path_package.R | permissive | r-lib/fs | R | false | false | 1,910 | r | #' Construct a path to a location within an installed or development package
#'
#' `path_package` differs from [system.file()] in that it always returns an
#' error if the package does not exist. It also returns a different error if
#' the file within the package does not exist.
#'
#'`path_package()` also automatically... |
\name{selectTask}
\alias{selectTask}
\title{
Select modeling task
}
\description{
Select modeling task text (name, description, notes) and input workset id's
}
\usage{
selectTask(dbCon, taskId)
}
\arguments{
\item{dbCon}{
database connection
}
\item{taskId}{
id of modeling task
}
}
\details{
This call r... | /openMpp/man/selectTask.Rd | permissive | openmpp/R | R | false | false | 1,943 | rd | \name{selectTask}
\alias{selectTask}
\title{
Select modeling task
}
\description{
Select modeling task text (name, description, notes) and input workset id's
}
\usage{
selectTask(dbCon, taskId)
}
\arguments{
\item{dbCon}{
database connection
}
\item{taskId}{
id of modeling task
}
}
\details{
This call r... |
# Libraries
library(mice)
library(VIM)
########## Reading Data ###########
# tacking into considration transforming empty cells to NA
Fireball_And_Bolide_Reports <- read.csv(file.choose(), header = T, na.strings = c("","NA"))
View(Fireball_And_Bolide_Reports)
### Structrure of this Data per col (whi... | /WebApp/DataImputation/newFireballDataRF.R | no_license | bassantNabeh/Imputation-Data | R | false | false | 2,487 | r | # Libraries
library(mice)
library(VIM)
########## Reading Data ###########
# tacking into considration transforming empty cells to NA
Fireball_And_Bolide_Reports <- read.csv(file.choose(), header = T, na.strings = c("","NA"))
View(Fireball_And_Bolide_Reports)
### Structrure of this Data per col (whi... |
testlist <- list(latLongs = structure(c(5.77662200276745e-275, 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(5L, 5L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) | /MGDrivE/inst/testfiles/calcCos/libFuzzer_calcCos/calcCos_valgrind_files/1612733108-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 220 | r | testlist <- list(latLongs = structure(c(5.77662200276745e-275, 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(5L, 5L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) |
png(filename= "plot3.png", width= 480, height = 480)
with(data, plot(date.time,
Sub_metering_1,
type = "l",
ylab ="Energy sub metering")
)
with(data, points(date.time,
Sub_metering_2,
type = "l",
col = "red")
)
with(da... | /plot3.r | no_license | jethard/ExData_Plotting1 | R | false | false | 603 | r | png(filename= "plot3.png", width= 480, height = 480)
with(data, plot(date.time,
Sub_metering_1,
type = "l",
ylab ="Energy sub metering")
)
with(data, points(date.time,
Sub_metering_2,
type = "l",
col = "red")
)
with(da... |
#####################################################################################################################
### udv_example1.R plot a simple bar chart to show length is easier to perceive than area
###
### Apr 2020
### EAJ
#######################################################################################... | /udv_example1.R | no_license | ej3nk1ns/R | R | false | false | 1,236 | r | #####################################################################################################################
### udv_example1.R plot a simple bar chart to show length is easier to perceive than area
###
### Apr 2020
### EAJ
#######################################################################################... |
simulatePop <-
function (gmap, N = 100, sigmaE = 1, type = "F2", freqmat = NULL)
{
nloc <- log(length(gmap))/log(3)
ans <- NULL
n <- genNames(nloc)
if (length(n) != length(gmap)) {
stop("Genotype-phenotype map: not the expected size.")
}
if (is.null(names(gmap)) || !all((sort(n) == sort... | /noia/R/simulatePop.R | no_license | ingted/R-Examples | R | false | false | 857 | r | simulatePop <-
function (gmap, N = 100, sigmaE = 1, type = "F2", freqmat = NULL)
{
nloc <- log(length(gmap))/log(3)
ans <- NULL
n <- genNames(nloc)
if (length(n) != length(gmap)) {
stop("Genotype-phenotype map: not the expected size.")
}
if (is.null(names(gmap)) || !all((sort(n) == sort... |
library(testthat)
library(Matrix)
test_that("Errors",{
set.seed(12345)
n <- 1e7
nnz <- 1e-5*n
ix <- sample(1:n, size = nnz, replace = FALSE)
S <- Matrix(0, nrow=n, ncol=n, sparse=TRUE)
S[ix] <- rnorm(nnz)
S[1,1] <- 10
u <- matrix(rnorm(n), ncol=1)
v <- matrix(rnorm(n), ncol=2)
x<-rnorm(n)
k<-1000
... | /RStudio2020/tests/testthat/test-pwr.R | no_license | davelsh/RStudio2020 | R | false | false | 413 | r | library(testthat)
library(Matrix)
test_that("Errors",{
set.seed(12345)
n <- 1e7
nnz <- 1e-5*n
ix <- sample(1:n, size = nnz, replace = FALSE)
S <- Matrix(0, nrow=n, ncol=n, sparse=TRUE)
S[ix] <- rnorm(nnz)
S[1,1] <- 10
u <- matrix(rnorm(n), ncol=1)
v <- matrix(rnorm(n), ncol=2)
x<-rnorm(n)
k<-1000
... |
app <- setRefClass(
'HelloWorld',
methods = list(
call = function(env){
list(
status=200,
headers = list(
'Content-Type' = 'text/html'
),
body = paste('<h1>Hello World!</h1>')
)
}
)
)$new()
| /R-Portable-Mac/library/Rook/exampleApps/helloworldref.R | permissive | sdownin/sequencer | R | false | false | 232 | r | app <- setRefClass(
'HelloWorld',
methods = list(
call = function(env){
list(
status=200,
headers = list(
'Content-Type' = 'text/html'
),
body = paste('<h1>Hello World!</h1>')
)
}
)
)$new()
|
\name{dg.envelope}
\alias{dg.envelope}
\title{
Global Envelopes for Dao-Genton Test
}
\description{
Computes the global envelopes
corresponding to the Dao-Genton test of goodness-of-fit.
}
\usage{
dg.envelope(X, \dots,
nsim = 19, nsimsub=nsim-1, nrank = 1,
alternative=c("two.sided", "less"... | /man/dg.envelope.Rd | no_license | cuulee/spatstat | R | false | false | 3,967 | rd | \name{dg.envelope}
\alias{dg.envelope}
\title{
Global Envelopes for Dao-Genton Test
}
\description{
Computes the global envelopes
corresponding to the Dao-Genton test of goodness-of-fit.
}
\usage{
dg.envelope(X, \dots,
nsim = 19, nsimsub=nsim-1, nrank = 1,
alternative=c("two.sided", "less"... |
test_that("estimable() throws errors when it should", {
conc <- c(0.0625, 0.125, 0.25, 0.5, 1)
pfx <- c(1, 4, 4, 7, 8)/8
mydat <- data.frame(dose=conc, pfx=pfx)
mymat <- as.matrix(mydat)
mydat1 <- mydat
names(mydat1)[1] <- "bob"
mydat2 <- mydat
names(mydat2)[2] <- "dorothy"
conc.d... | /data/genthat_extracted_code/LW1949/tests/test-estimable.R | no_license | surayaaramli/typeRrh | R | false | false | 605 | r |
test_that("estimable() throws errors when it should", {
conc <- c(0.0625, 0.125, 0.25, 0.5, 1)
pfx <- c(1, 4, 4, 7, 8)/8
mydat <- data.frame(dose=conc, pfx=pfx)
mymat <- as.matrix(mydat)
mydat1 <- mydat
names(mydat1)[1] <- "bob"
mydat2 <- mydat
names(mydat2)[2] <- "dorothy"
conc.d... |
library(ChinookServer)
library(RUnit)
SERVER_PORT=8084
datasets <- "SouthSeattleHealthImpacts"
analysisPackages <- NA_character_
browserFile <- "index.html"
userCredentials <- "test@nowhere.net"
chinook <- ChinookServer(port=SERVER_PORT, analysisPackages, datasets, browserFile, userCredentials)
if(Sys.info()[["nodenam... | /webapplets/dataTable/runTest.R | no_license | paul-shannon/clevelandHighSchool | R | false | false | 428 | r | library(ChinookServer)
library(RUnit)
SERVER_PORT=8084
datasets <- "SouthSeattleHealthImpacts"
analysisPackages <- NA_character_
browserFile <- "index.html"
userCredentials <- "test@nowhere.net"
chinook <- ChinookServer(port=SERVER_PORT, analysisPackages, datasets, browserFile, userCredentials)
if(Sys.info()[["nodenam... |
#####################################
############AFRICA###################
#####################################
#read variable contributions
setwd("E:/collaborations/tara/outputs/RFResults/Africa/noLivingSp")
AfricaSpatMor7Contrib=read.table("FullAfrNoLCvLC40.csv", header=T, row.names = NULL,
... | /ResultsTreatment/SummarizeContributions.R | no_license | AnahiEspindola/PelletierEtAlPNAS | R | false | false | 25,279 | r |
#####################################
############AFRICA###################
#####################################
#read variable contributions
setwd("E:/collaborations/tara/outputs/RFResults/Africa/noLivingSp")
AfricaSpatMor7Contrib=read.table("FullAfrNoLCvLC40.csv", header=T, row.names = NULL,
... |
# Some internal auxiliary functions
cleanzero <- function(x){
# Internal function: remove leadig zeros
# x, vector of values
idx <- which(x == 0)
n <- length(x)
l <- length(idx)
if (l>0 & idx[1]==1){
d.idx <- diff(idx)
loc <- which(d.idx > 1)[1]
if (is.na(loc)){
loc <-... | /R/auxiliary.R | no_license | cran/diffusion | R | false | false | 428 | r | # Some internal auxiliary functions
cleanzero <- function(x){
# Internal function: remove leadig zeros
# x, vector of values
idx <- which(x == 0)
n <- length(x)
l <- length(idx)
if (l>0 & idx[1]==1){
d.idx <- diff(idx)
loc <- which(d.idx > 1)[1]
if (is.na(loc)){
loc <-... |
\name{bnlearn-package}
\alias{bnlearn-package}
\alias{bnlearn}
\docType{package}
\title{
Bayesian network structure learning, parameter learning and inference.
}
\description{
Bayesian network structure learning (via constraint-based,
score-based and hybrid algorithms), parameter learning (via ML and
Bayesia... | /man/bnlearn-package.Rd | no_license | gasse/bnlearn-clone-3.1 | R | false | false | 19,461 | rd | \name{bnlearn-package}
\alias{bnlearn-package}
\alias{bnlearn}
\docType{package}
\title{
Bayesian network structure learning, parameter learning and inference.
}
\description{
Bayesian network structure learning (via constraint-based,
score-based and hybrid algorithms), parameter learning (via ML and
Bayesia... |
coverage.bigWig.vec <- Sys.glob("~/PeakSegFPOP/labels/H3K36me3_TDH_immune/samples/*/*/coverage.bigWig")
library(data.table)
contigs <- fread("~/PeakSegFPOP/hg19_problems_usual.bed")
setnames(contigs, c("chrom", "contigStart", "contigEnd"))
total.bases <- contigs[, sum(as.numeric(contigEnd-contigStart))]
coverage.dt.l... | /compute_coverage.R | no_license | pra1981/PeakSegFPOP | R | false | false | 964 | r | coverage.bigWig.vec <- Sys.glob("~/PeakSegFPOP/labels/H3K36me3_TDH_immune/samples/*/*/coverage.bigWig")
library(data.table)
contigs <- fread("~/PeakSegFPOP/hg19_problems_usual.bed")
setnames(contigs, c("chrom", "contigStart", "contigEnd"))
total.bases <- contigs[, sum(as.numeric(contigEnd-contigStart))]
coverage.dt.l... |
print("This is my first github repository")
cat("Seems to work quite nicely!") | /myFirstFile.R | no_license | sebgerdes/selfstudy | R | false | false | 79 | r | print("This is my first github repository")
cat("Seems to work quite nicely!") |
#Install the twitteR Package
install.packages("twitteR")
#Load the twitteR package using the library command
library("twitteR")
#Install the bitops Package
install.packages("bitops")
#Load the bitops package using the library command
library("bitops")
#Install the RCurl Package
install.packages("RCurl")
#Load the ... | /tweets.R | no_license | Keenal/Sentiment-Analysis | R | false | false | 1,641 | r | #Install the twitteR Package
install.packages("twitteR")
#Load the twitteR package using the library command
library("twitteR")
#Install the bitops Package
install.packages("bitops")
#Load the bitops package using the library command
library("bitops")
#Install the RCurl Package
install.packages("RCurl")
#Load the ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enums.R
\docType{data}
\name{Coordinates}
\alias{Coordinates}
\title{Enum for Snaptron Coordinate modifiers}
\format{
An object of class \code{environment} of length 4.
}
\usage{
Coordinates
}
\description{
Enum for Snaptron Coordinate modifi... | /man/Coordinates.Rd | permissive | langmead-lab/snapcount | R | false | true | 1,022 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enums.R
\docType{data}
\name{Coordinates}
\alias{Coordinates}
\title{Enum for Snaptron Coordinate modifiers}
\format{
An object of class \code{environment} of length 4.
}
\usage{
Coordinates
}
\description{
Enum for Snaptron Coordinate modifi... |
library(ggplot2)
NEI <-readRDS("summarySCC_PM25.rds")
View(NEI)
SCC <- readRDS("Source_Classification_Code.rds")
View(SCC)
subsetNEI <- NEI[(NEI$fips=="24510"|NEI$fips=="06037") & NEI$type=="ON-ROAD", ]
aggregatedTotalByYearAndFips <- aggregate(Emissions ~ year + fips, subsetNEI, sum)
aggregatedTotalByYearAndFips$fip... | /plot6.R | no_license | sumadasu/Exploratory-Data-Analysis-Proj2 | R | false | false | 901 | r | library(ggplot2)
NEI <-readRDS("summarySCC_PM25.rds")
View(NEI)
SCC <- readRDS("Source_Classification_Code.rds")
View(SCC)
subsetNEI <- NEI[(NEI$fips=="24510"|NEI$fips=="06037") & NEI$type=="ON-ROAD", ]
aggregatedTotalByYearAndFips <- aggregate(Emissions ~ year + fips, subsetNEI, sum)
aggregatedTotalByYearAndFips$fip... |
#' Build a multi-stage group-sequential multi-arm clinical trial for a normally
#' distributed primary outcome
#'
#' \code{build_gs_norm()} builds a multi-stage group-sequential multi-arm
#' clinical trial design object assuming the primary outcome variable is
#' normally distributed, like those returned by \code{\link... | /R/build_gs_norm.R | permissive | mjg211/multiarm | R | false | false | 8,826 | r | #' Build a multi-stage group-sequential multi-arm clinical trial for a normally
#' distributed primary outcome
#'
#' \code{build_gs_norm()} builds a multi-stage group-sequential multi-arm
#' clinical trial design object assuming the primary outcome variable is
#' normally distributed, like those returned by \code{\link... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pivotThemes.R
\name{getCompactTheme}
\alias{getCompactTheme}
\title{Get the compact theme for styling a pivot table.}
\usage{
getCompactTheme(parentPivot, themeName = "compact")
}
\arguments{
\item{parentPivot}{Owning pivot table.}
\item{the... | /man/getCompactTheme.Rd | no_license | cbailiss/pivottabler | R | false | true | 467 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pivotThemes.R
\name{getCompactTheme}
\alias{getCompactTheme}
\title{Get the compact theme for styling a pivot table.}
\usage{
getCompactTheme(parentPivot, themeName = "compact")
}
\arguments{
\item{parentPivot}{Owning pivot table.}
\item{the... |
context("utils")
test_that("set_ems_tz works with all classes", {
datestring <- "2019-11-18"
expected <- as.POSIXct(datestring, tz = "Etc/GMT+8")
expect_equal(set_ems_tz(datestring), expected)
expect_equal(set_ems_tz(as.Date(datestring)), expected)
expect_equal(set_ems_tz(expected), expected)
expect_equal(... | /tests/testthat/test-utils.R | permissive | bcgov/rems | R | false | false | 823 | r | context("utils")
test_that("set_ems_tz works with all classes", {
datestring <- "2019-11-18"
expected <- as.POSIXct(datestring, tz = "Etc/GMT+8")
expect_equal(set_ems_tz(datestring), expected)
expect_equal(set_ems_tz(as.Date(datestring)), expected)
expect_equal(set_ems_tz(expected), expected)
expect_equal(... |
install.packages("tidyverse") ##przetwarzanie
install.packages("readxl") ##
| /install.R | no_license | Jakub-Ch/wrids-2021-binder | R | false | false | 77 | r | install.packages("tidyverse") ##przetwarzanie
install.packages("readxl") ##
|
# Inversing a matrix is usually a costly computation and there may be some benefit
# to caching the inverse of a matrix rather than compute it repeatedly.
#The following function(s) are used to cache the inverse of a matrix.
# makeCacheMatrix creates a list containing a function to
# 1. set the value of the matrix
# ... | /cachematrix.R | no_license | rahultrips/ProgrammingAssignment2 | R | false | false | 1,258 | r | # Inversing a matrix is usually a costly computation and there may be some benefit
# to caching the inverse of a matrix rather than compute it repeatedly.
#The following function(s) are used to cache the inverse of a matrix.
# makeCacheMatrix creates a list containing a function to
# 1. set the value of the matrix
# ... |
my_plan <- drake_plan(
trace = TRUE,
max_expand = 2,
data = plan_prep(),
map = plot_sites(data),
parameters = list(eventYrs = eventYrs, event_window = event_window,
ref_window = ref_window, resCriteria = resCriteria,
sigNum = sigNum, plotOpt = plotOpt... | /plan.R | no_license | sarcusa/4ka_steph | R | false | false | 1,707 | r | my_plan <- drake_plan(
trace = TRUE,
max_expand = 2,
data = plan_prep(),
map = plot_sites(data),
parameters = list(eventYrs = eventYrs, event_window = event_window,
ref_window = ref_window, resCriteria = resCriteria,
sigNum = sigNum, plotOpt = plotOpt... |
# This function assumes that the matrix is always invertible.
cacheSolve <- function(x, ...) {
inv <- x$getinverse()
if(!is.null(inv)) {
message("getting cached data.")
return(inv)
}
data <- x$get()
inv <- solve(data)
x$setinverse(inv)
inv
}
| /cacheSolve.R | no_license | dineshsingh1976/ProgrammingAssignment2 | R | false | false | 289 | r | # This function assumes that the matrix is always invertible.
cacheSolve <- function(x, ...) {
inv <- x$getinverse()
if(!is.null(inv)) {
message("getting cached data.")
return(inv)
}
data <- x$get()
inv <- solve(data)
x$setinverse(inv)
inv
}
|
set.seed(1985)
xdata <- matrix(rnorm(1000000), nrow = 500)
cov.p <- abs(cov(xdata, method = 'pearson'))
diag(cov.p) <- 0
cov.s <- abs(cov(xdata, method = 'spearman'))
diag(cov.s) <- 0
context('Degree - Covariance - Pearson')
# use a temporary directory that can be written
loose.rock::base.dir(tempdir())
test_that('... | /tests/testthat/test-degree.cov.R | no_license | averissimo/network.cox | R | false | false | 2,828 | r | set.seed(1985)
xdata <- matrix(rnorm(1000000), nrow = 500)
cov.p <- abs(cov(xdata, method = 'pearson'))
diag(cov.p) <- 0
cov.s <- abs(cov(xdata, method = 'spearman'))
diag(cov.s) <- 0
context('Degree - Covariance - Pearson')
# use a temporary directory that can be written
loose.rock::base.dir(tempdir())
test_that('... |
## generate multiple correlated SNPs based on the multivariate normal distribution
## MAF.vec: the MAF vector for m SNPs; sig.mat: the covariance matrix for the multinormal distribution
## n.case and n.control are the sample size of the case and control groups;
## bet: the predefined coefficient used to generate... | /tp_nocov/function/gen_MultiSNP.r | no_license | xuey3836/tp_ssu_skat | R | false | false | 2,066 | r |
## generate multiple correlated SNPs based on the multivariate normal distribution
## MAF.vec: the MAF vector for m SNPs; sig.mat: the covariance matrix for the multinormal distribution
## n.case and n.control are the sample size of the case and control groups;
## bet: the predefined coefficient used to generate... |
#https://www.eduonix.com/dashboard/applied-machine-learning-for-professionals/lecture/16108516
# ---------------------------------------------
# 1. Create a time series forecast
# 2. Select the 'best' time series forecast
# 3. Forecast all stores and find average MAPE
# ---------------------------------------------
... | /Ej1 Forecasting Sales in R with Time Series Models and Stochastic Gradient Boosting/2 - Forecasting.R | permissive | sergioalegre/Machine-learning-based-R | R | false | false | 2,778 | r | #https://www.eduonix.com/dashboard/applied-machine-learning-for-professionals/lecture/16108516
# ---------------------------------------------
# 1. Create a time series forecast
# 2. Select the 'best' time series forecast
# 3. Forecast all stores and find average MAPE
# ---------------------------------------------
... |
#' competitorsAdapt
#' Competitors Adapt According to their type/
#'
#' Takes a voter data frame, a competitor position data frame, the voters utility values for all competitors over the past two time periods and the voteTotals of all competitors from the past 2 time periods and applies the appropriate adaptation rule... | /R/competitorsAdapt.R | no_license | robiRagan/voteR | R | false | false | 4,146 | r | #' competitorsAdapt
#' Competitors Adapt According to their type/
#'
#' Takes a voter data frame, a competitor position data frame, the voters utility values for all competitors over the past two time periods and the voteTotals of all competitors from the past 2 time periods and applies the appropriate adaptation rule... |
setwd("~/Desktop/PSM/Fall 2019/Capstone/Mayo/LatinSquare/3p6t")
rm(list = ls())
zstar <- qnorm(.975)
duration <- 12*60
toc <- 0.25
require(ggplot2)
library(ggplot2)
#### Oral Filled Stats
X <- read.csv("oralFilled.txt", header = FALSE)
oralOut <- X[,1]
(mu=mean(oralOut))
s=sd(oralOut)
delta <- zstar*s/sqrt(length(o... | /Mayo/LatinSquare/3p6t/3p6t.R | no_license | justinhood/Capstone | R | false | false | 8,520 | r | setwd("~/Desktop/PSM/Fall 2019/Capstone/Mayo/LatinSquare/3p6t")
rm(list = ls())
zstar <- qnorm(.975)
duration <- 12*60
toc <- 0.25
require(ggplot2)
library(ggplot2)
#### Oral Filled Stats
X <- read.csv("oralFilled.txt", header = FALSE)
oralOut <- X[,1]
(mu=mean(oralOut))
s=sd(oralOut)
delta <- zstar*s/sqrt(length(o... |
#Getting and cleaning data
#This program attempts to achieve the following goals
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the mean and standard deviation for each measurement.
# 3. Uses descriptive activity names to name the activities in the data set
# 4... | /run_analysis.R | no_license | viv4444/-Getting-and-Cleaning-Data-Course-Project | R | false | false | 3,481 | r | #Getting and cleaning data
#This program attempts to achieve the following goals
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the mean and standard deviation for each measurement.
# 3. Uses descriptive activity names to name the activities in the data set
# 4... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/binary_match_search.R
\name{resultsBinaryMatchSearch}
\alias{resultsBinaryMatchSearch}
\title{Binary Pair Match Search}
\usage{
resultsBinaryMatchSearch(obj, form = "one_zero")
}
\arguments{
\item{obj}{The \code{pairwise_matching_experimental... | /GreedyExperimentalDesign/man/resultsBinaryMatchSearch.Rd | no_license | kapelner/GreedyExperimentalDesign | R | false | true | 629 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/binary_match_search.R
\name{resultsBinaryMatchSearch}
\alias{resultsBinaryMatchSearch}
\title{Binary Pair Match Search}
\usage{
resultsBinaryMatchSearch(obj, form = "one_zero")
}
\arguments{
\item{obj}{The \code{pairwise_matching_experimental... |
# par(family="HiraKakuProN-W3") # Mac専用
par(mgp=c(2,0.8,0))
library(nlme)
X = read.csv("/var/www/html/rad/atommoc.csv", fileEncoding="SJIS", as.is=TRUE)
pos = "大野"
# pos = "浪江"
pp = pos == X[,2]
t = as.POSIXct(X[pp,1])
x = X[pp,3]
ts = as.POSIXct("2011-03-24 00:00:00")
t1 = t[t >= ts]
x1 = x[t >= ts]
xrange = range(t... | /stat/data/atommoc.R | no_license | okumuralab/okumuralab.github.io | R | false | false | 2,084 | r | # par(family="HiraKakuProN-W3") # Mac専用
par(mgp=c(2,0.8,0))
library(nlme)
X = read.csv("/var/www/html/rad/atommoc.csv", fileEncoding="SJIS", as.is=TRUE)
pos = "大野"
# pos = "浪江"
pp = pos == X[,2]
t = as.POSIXct(X[pp,1])
x = X[pp,3]
ts = as.POSIXct("2011-03-24 00:00:00")
t1 = t[t >= ts]
x1 = x[t >= ts]
xrange = range(t... |
dataobjects <- list.files("../Results/NoStruct/")
reps <- lapply(1:100,function(j)rep(j,500))
reps <- rep(reps,36)
burnin <- 501
seriesl <- 1000
tick <- c(burnin:seriesl)
headings <- c("experiment",
"rep",
"tick",
"population",
"waste_prob_e_mn",
"waste_rate_e... | /R_scripts/Analysis/ts_summaries.R | permissive | wccarleton/abm_waste_space | R | false | false | 3,960 | r | dataobjects <- list.files("../Results/NoStruct/")
reps <- lapply(1:100,function(j)rep(j,500))
reps <- rep(reps,36)
burnin <- 501
seriesl <- 1000
tick <- c(burnin:seriesl)
headings <- c("experiment",
"rep",
"tick",
"population",
"waste_prob_e_mn",
"waste_rate_e... |
library(evobiR)
### Name: AncCond
### Title: Calculate the mean of a continuous character at the origin of
### derived state of a binary charachter
### Aliases: AncCond
### Keywords: comparative method discrete trait continuous trait
### ** Examples
## Not run:
##D data(mite.trait)
##D data(trees.mite)
##D AncCo... | /data/genthat_extracted_code/evobiR/examples/AncCond.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 411 | r | library(evobiR)
### Name: AncCond
### Title: Calculate the mean of a continuous character at the origin of
### derived state of a binary charachter
### Aliases: AncCond
### Keywords: comparative method discrete trait continuous trait
### ** Examples
## Not run:
##D data(mite.trait)
##D data(trees.mite)
##D AncCo... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{setM2Path}
\alias{setM2Path}
\title{Set Macaulay2 Path}
\usage{
setM2Path(path)
}
\arguments{
\item{path}{a character string, the path to m2}
}
\value{
invisible m2Path
}
\description{
This function sets the Macaulay2 path either by (1) passing it a character s... | /man/setM2Path.Rd | no_license | cran/algstat | R | false | false | 394 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{setM2Path}
\alias{setM2Path}
\title{Set Macaulay2 Path}
\usage{
setM2Path(path)
}
\arguments{
\item{path}{a character string, the path to m2}
}
\value{
invisible m2Path
}
\description{
This function sets the Macaulay2 path either by (1) passing it a character s... |
# Displaying the distribution of reference and non-reference retrotransposable elements (RTEs) in various recomination regions of the human genome.
# This code displays the frequency distribution of RTEs in various recombination regions defined as cold,
# intermediate, and hot based on the the standardized recombinat... | /MyAnalysis/Recombination_rate_analysis/BarplotForRecombinationDis_22072021.R | no_license | RandaAli1/MyPhDproject | R | false | false | 2,784 | r | # Displaying the distribution of reference and non-reference retrotransposable elements (RTEs) in various recomination regions of the human genome.
# This code displays the frequency distribution of RTEs in various recombination regions defined as cold,
# intermediate, and hot based on the the standardized recombinat... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% intToBin.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{as.character.binmode}
\al... | /man/as.character.binmode.Rd | no_license | pjcrosbie/R.utils | R | false | false | 912 | rd | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% intToBin.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{as.character.binmode}
\al... |
#========================normlized crime in JAMMU & KASHMIR =====================
library(ggplot2)
theme_set(theme_bw())
library(dplyr)
library(ggplot2)
table=read.csv("E:/project/crimes.csv")
data2=table %>% group_by(DISTRICT) %>% filter(STATE.UT == "JAMMU & KASHMIR") %>% summarise(all_crimes=sum(Rape,Kidnapping.and... | /Q4/16/district_16.r | no_license | PurvishaThakkar/datascience-project-in-R-studio | R | false | false | 1,043 | r | #========================normlized crime in JAMMU & KASHMIR =====================
library(ggplot2)
theme_set(theme_bw())
library(dplyr)
library(ggplot2)
table=read.csv("E:/project/crimes.csv")
data2=table %>% group_by(DISTRICT) %>% filter(STATE.UT == "JAMMU & KASHMIR") %>% summarise(all_crimes=sum(Rape,Kidnapping.and... |
require("irlba")
# Dense matrix
set.seed(1)
A <- matrix(rnorm(400),20)
L <- irlba(A,nu=2,nv=2,tol=1e-9)
S <- svd(A,nu=2,nv=2)
if(!isTRUE(all.equal(L$d, S$d[1:2])))
{
stop("Failed simple dense signular value test")
}
# Scaling and centering
s <- sqrt(apply(A,2,crossprod))
m <- colMeans(A)
L <- irlba(A, 3, tol=1e-9, c... | /irlba/tests/test.R | no_license | ingted/R-Examples | R | false | false | 1,436 | r | require("irlba")
# Dense matrix
set.seed(1)
A <- matrix(rnorm(400),20)
L <- irlba(A,nu=2,nv=2,tol=1e-9)
S <- svd(A,nu=2,nv=2)
if(!isTRUE(all.equal(L$d, S$d[1:2])))
{
stop("Failed simple dense signular value test")
}
# Scaling and centering
s <- sqrt(apply(A,2,crossprod))
m <- colMeans(A)
L <- irlba(A, 3, tol=1e-9, c... |
# source: https://github.com/MattPM/scglmmr
# author: Matt Mulè
# email: mattmule@gmail.com
#' FitLmerContrast - for data with pre post treatment and 2 response groups; within each cell type contrast difference
#' in fold change between groups, baseline difference, and fold change across groups of module scores.
#'
... | /R/SCGroupContrast_modulefunctions.r | permissive | MattPM/scglmmr | R | false | false | 16,082 | r | # source: https://github.com/MattPM/scglmmr
# author: Matt Mulè
# email: mattmule@gmail.com
#' FitLmerContrast - for data with pre post treatment and 2 response groups; within each cell type contrast difference
#' in fold change between groups, baseline difference, and fold change across groups of module scores.
#'
... |
library(BigTSP)
### Name: LDCA
### Title: Linear Discriminant Analysis based on Top Scoring Pair
### Aliases: LDCA
### Keywords: ~kwd1 ~kwd2
### ** Examples
library(glmnet)
x=matrix(rnorm(100*20),100,20)
y=rbinom(100,1,0.5)
fit=LDCA(x,y)
print(fit)
predict(fit,newx=x[1:10,]) # make predictions
| /data/genthat_extracted_code/BigTSP/examples/LDCA.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 302 | r | library(BigTSP)
### Name: LDCA
### Title: Linear Discriminant Analysis based on Top Scoring Pair
### Aliases: LDCA
### Keywords: ~kwd1 ~kwd2
### ** Examples
library(glmnet)
x=matrix(rnorm(100*20),100,20)
y=rbinom(100,1,0.5)
fit=LDCA(x,y)
print(fit)
predict(fit,newx=x[1:10,]) # make predictions
|
toc_head <- rtweet::lookup_statuses('1086605198167105537')
toc <- toc_head%>%rtweet::tweet_threading()%>%tweet_threading_fw()
| /data-raw/root_status.R | permissive | yonicd/toddlr | R | false | false | 127 | r | toc_head <- rtweet::lookup_statuses('1086605198167105537')
toc <- toc_head%>%rtweet::tweet_threading()%>%tweet_threading_fw()
|
rm(list = ls())
library(parallel)
`%>%` <- dplyr::`%>%`
# Parameters ------------------------------------------------------------------
verbose <- TRUE
import_years <- as.character(2012:2017)
data_path <- "D:/Downloads/AllPublicXML"
export_path <-
file.path("D:/Dropbox (Personal)/astrolabe/grants",
"mou... | /import_test.R | no_license | yangkangyf/clinical_trials_gov | R | false | false | 4,070 | r | rm(list = ls())
library(parallel)
`%>%` <- dplyr::`%>%`
# Parameters ------------------------------------------------------------------
verbose <- TRUE
import_years <- as.character(2012:2017)
data_path <- "D:/Downloads/AllPublicXML"
export_path <-
file.path("D:/Dropbox (Personal)/astrolabe/grants",
"mou... |
# Author: C Lynam, Cefas
# Contact: chris.lynam@cefas.co.uk
# Version: 6 (exchange inc)
# Date: May 2020 new guilds and spatial smooth inc
# reads shapefiles for subdivisions and includes spatial area of strata in calcs
# can edit to run old ns areas by changing subdiv name in subdiv.r
# link to loess ploting code for... | /Lynam_IND_script_OSPAR_Swept_2021.R | no_license | JoeRibeiro/R_old | R | false | false | 32,424 | r | # Author: C Lynam, Cefas
# Contact: chris.lynam@cefas.co.uk
# Version: 6 (exchange inc)
# Date: May 2020 new guilds and spatial smooth inc
# reads shapefiles for subdivisions and includes spatial area of strata in calcs
# can edit to run old ns areas by changing subdiv name in subdiv.r
# link to loess ploting code for... |
plot.freq <- function(text, title='') {
barplot(table(strsplit(text, ''))/nchar(text), main=title,
xlab='Character', ylab='Relative frequency')
}
char.freq <- function(text) {
return(table(strsplit(text, ''))/nchar(text))
}
d <- char.freq(extract)
for (i in 1:length(d)) {
freqs$ext[freqs$c... | /scripts/freq.R | no_license | reecemears/ciphers | R | false | false | 457 | r | plot.freq <- function(text, title='') {
barplot(table(strsplit(text, ''))/nchar(text), main=title,
xlab='Character', ylab='Relative frequency')
}
char.freq <- function(text) {
return(table(strsplit(text, ''))/nchar(text))
}
d <- char.freq(extract)
for (i in 1:length(d)) {
freqs$ext[freqs$c... |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Setup
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if (interactive()) savehistory();
library("aroma.affymetrix");
# Use a nicer palette of colors
colors <- RColorBrewer::brewer.pal(12, "Paired");
palette(co... | /aroma.affymetrix/inst/vignettes/CRMA,Mapping50K_Hind240,BiasCorrectedChrXY.R | no_license | ingted/R-Examples | R | false | false | 8,352 | r | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Setup
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if (interactive()) savehistory();
library("aroma.affymetrix");
# Use a nicer palette of colors
colors <- RColorBrewer::brewer.pal(12, "Paired");
palette(co... |
#' mutation
#'
#' organism mutation_pop function
#' Input population of organisms to undergo mutation
#'
#' Accepts list of binary matrix
#' and returns a list of `organism`
#'
#' @param file_path
#'
#' @return A list of organism-class object
#'
#' @examples
#'
#'
#'
#'
#' @export
#'
popMutation <- function(org_populat... | /R/popMutation.R | no_license | emily-gong/REvolution | R | false | false | 634 | r | #' mutation
#'
#' organism mutation_pop function
#' Input population of organisms to undergo mutation
#'
#' Accepts list of binary matrix
#' and returns a list of `organism`
#'
#' @param file_path
#'
#' @return A list of organism-class object
#'
#' @examples
#'
#'
#'
#'
#' @export
#'
popMutation <- function(org_populat... |
library(tidyverse)
load("../data/fina.rda")
# Olympic subset of FINA results
oresults <- fina_join() %>%
filter(series == "Olympic Games")
# Olympic subset of FINA splits
osplits <- splits %>%
semi_join(oresults, by = "result_id") %>%
filter(split_distance == 50) %>%
select(-split_distance)
# Olympic subset ... | /shiny/dataprep.R | no_license | josedandrade/swimset | R | false | false | 522 | r | library(tidyverse)
load("../data/fina.rda")
# Olympic subset of FINA results
oresults <- fina_join() %>%
filter(series == "Olympic Games")
# Olympic subset of FINA splits
osplits <- splits %>%
semi_join(oresults, by = "result_id") %>%
filter(split_distance == 50) %>%
select(-split_distance)
# Olympic subset ... |
library(imputeTS)
library(forecast)
# tsAirgap is a example time series with missing data included in imputeTS package
x <- tsAirgap
plot(x)
#Replace missing data using na.kalman method from imputeTS
x <- na.kalman(x)
plot(x)
x <- na.interpolation(x)
plot(x)
#Perform a forecast using ets metho... | /examples/pruebas_simples/basico_imputation.R | no_license | Bastianpizarro1991/SeriesTemporalesEnCastellano | R | false | false | 3,809 | r | library(imputeTS)
library(forecast)
# tsAirgap is a example time series with missing data included in imputeTS package
x <- tsAirgap
plot(x)
#Replace missing data using na.kalman method from imputeTS
x <- na.kalman(x)
plot(x)
x <- na.interpolation(x)
plot(x)
#Perform a forecast using ets metho... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phoenixACS.R
\docType{data}
\name{phoenixACS}
\alias{phoenixACS}
\title{Income and Error in Phoeniox (2005-09)}
\format{
An sf data frame with 985 rows, 17 variables, and a geometry column:
\describe{
\item{ aland10 }{ Tract area of land }
\i... | /man/phoenixACS.Rd | permissive | spatialanalysis/geodaData | R | false | true | 2,031 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phoenixACS.R
\docType{data}
\name{phoenixACS}
\alias{phoenixACS}
\title{Income and Error in Phoeniox (2005-09)}
\format{
An sf data frame with 985 rows, 17 variables, and a geometry column:
\describe{
\item{ aland10 }{ Tract area of land }
\i... |
#This is a bash it until it works fix and may be cause more hassle but once bashed about for a bit it will allow you to
#Use EM reading properly as well as other packages
#You may need to install EM reading twice after this
#You may need to install all other packages individually
#You may then need to install EMreadi... | /preproc/clear4EMreading.R | no_license | claursen1994/SocioSpacial | R | false | false | 1,021 | r | #This is a bash it until it works fix and may be cause more hassle but once bashed about for a bit it will allow you to
#Use EM reading properly as well as other packages
#You may need to install EM reading twice after this
#You may need to install all other packages individually
#You may then need to install EMreadi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Linnorm.R
\name{Linnorm}
\alias{Linnorm}
\title{Linnorm Normalizing Transformation Function}
\usage{
Linnorm(datamatrix, RowSamples = FALSE, spikein = NULL,
spikein_log2FC = NULL, showinfo = FALSE, perturbation = "Auto",
Filter = FALSE, m... | /Linnorm/man/Linnorm.Rd | permissive | stjordanis/Linnorm | R | false | true | 4,531 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Linnorm.R
\name{Linnorm}
\alias{Linnorm}
\title{Linnorm Normalizing Transformation Function}
\usage{
Linnorm(datamatrix, RowSamples = FALSE, spikein = NULL,
spikein_log2FC = NULL, showinfo = FALSE, perturbation = "Auto",
Filter = FALSE, m... |
########################################################貝氏
library(e1071)
x1=read.csv("C:/Users/howard/Desktop/summary_class.csv")
for(i in 1:10)
{
x1=na.exclude(x1)
np=ceiling(0.1*nrow(x1))
test.index=sample(1:nrow(x1),np)
x1.test=x1[test.index,]
x1.train=x1[-test.index,]
x1.tree=naiveBayes(class ~ animal + army +... | /Drama Maker0422/R程式集/17.電影類別預測/電影類別預測.R | no_license | wokeketm1/Dramaker | R | false | false | 2,988 | r | ########################################################貝氏
library(e1071)
x1=read.csv("C:/Users/howard/Desktop/summary_class.csv")
for(i in 1:10)
{
x1=na.exclude(x1)
np=ceiling(0.1*nrow(x1))
test.index=sample(1:nrow(x1),np)
x1.test=x1[test.index,]
x1.train=x1[-test.index,]
x1.tree=naiveBayes(class ~ animal + army +... |
library(knitr)
knit2pdf("voibayes.Rnw")
knit2pdf("voibayes_extraplots.Rnw")
| /manuscript/knitr.r | no_license | jasa-acs/Value-of-Information-Sensitivity-Analysis-and-Research-Design-in-Bayesian-Evidence-Synthesis | R | false | false | 76 | r | library(knitr)
knit2pdf("voibayes.Rnw")
knit2pdf("voibayes_extraplots.Rnw")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_operations.R
\name{connect_disassociate_lambda_function}
\alias{connect_disassociate_lambda_function}
\title{This API is in preview release for Amazon Connect and is subject to
change}
\usage{
connect_disassociate_lambda_function(Inst... | /cran/paws.customer.engagement/man/connect_disassociate_lambda_function.Rd | permissive | paws-r/paws | R | false | true | 923 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_operations.R
\name{connect_disassociate_lambda_function}
\alias{connect_disassociate_lambda_function}
\title{This API is in preview release for Amazon Connect and is subject to
change}
\usage{
connect_disassociate_lambda_function(Inst... |
plot2 <- function(){
# Read data from file.
data <- read.table("household_power_consumption.txt", header = TRUE, sep=";", na.strings = "?")
# Subset to 2007-02-01 and 2007-02-02.
twodays <- data[data$Date %in% c("1/2/2007", "2/2/2007"),]
# Create a new DateTime field.
twodays$DateTime <- strptime(... | /plot2.R | no_license | roster1972/ExData_Plotting1 | R | false | false | 685 | r |
plot2 <- function(){
# Read data from file.
data <- read.table("household_power_consumption.txt", header = TRUE, sep=";", na.strings = "?")
# Subset to 2007-02-01 and 2007-02-02.
twodays <- data[data$Date %in% c("1/2/2007", "2/2/2007"),]
# Create a new DateTime field.
twodays$DateTime <- strptime(... |
library(BCEA)
### Name: plot.mixedAn
### Title: Summary plot of the health economic analysis when the mixed
### analysis is considered
### Aliases: plot.mixedAn
### Keywords: Health economic evaluation Mixed analysis
### ** Examples
# See Baio G., Dawid A.P. (2011) for a detailed description of the
# Bayesian mo... | /data/genthat_extracted_code/BCEA/examples/plot.mixedAn.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,572 | r | library(BCEA)
### Name: plot.mixedAn
### Title: Summary plot of the health economic analysis when the mixed
### analysis is considered
### Aliases: plot.mixedAn
### Keywords: Health economic evaluation Mixed analysis
### ** Examples
# See Baio G., Dawid A.P. (2011) for a detailed description of the
# Bayesian mo... |
# Part 3
# Write a function that takes a directory of data files and a threshold for complete cases and calculates the correlation between sulfate and nitrate for monitor locations where the number of completely observed cases (on all variables) is greater than the threshold. The function should return a vector of corr... | /R-Programming/corr.R | no_license | anabaraldi/data-science | R | false | false | 1,583 | r | # Part 3
# Write a function that takes a directory of data files and a threshold for complete cases and calculates the correlation between sulfate and nitrate for monitor locations where the number of completely observed cases (on all variables) is greater than the threshold. The function should return a vector of corr... |
# spot-model/spot_sim_plots.R
#
# Author: Daniel Clark, 2015
# Import packages
library(ggplot2)
library(plyr)
library(reshape2)
library(grid)
# Init variables
cpac_csv <- '/home/dclark/Documents/data/aws/sim_results_merged/cpac_df.csv'
ants_csv <- '/home/dclark/Documents/data/aws/sim_results_merged/ants_df.csv'
fs_cs... | /spot-model/spot_sim_plots.R | permissive | computational-neuroimaging-lab/Clark2015_AWS | R | false | false | 10,421 | r | # spot-model/spot_sim_plots.R
#
# Author: Daniel Clark, 2015
# Import packages
library(ggplot2)
library(plyr)
library(reshape2)
library(grid)
# Init variables
cpac_csv <- '/home/dclark/Documents/data/aws/sim_results_merged/cpac_df.csv'
ants_csv <- '/home/dclark/Documents/data/aws/sim_results_merged/ants_df.csv'
fs_cs... |
#source: https://keras.rstudio.com/
devtools::install_github("rstudio/tensorflow")
library(tensorflow)
install_tensorflow(method = "conda", version="nightly")
library(keras)
use_condaenv('r-tensorflow')
#(need anaconda in order to download and run code)
View(mnist)
#using the classic MNIST handwriting datas... | /learning_keras.R | no_license | hannahkm/Wildfire-NN-ML | R | false | false | 2,042 | r | #source: https://keras.rstudio.com/
devtools::install_github("rstudio/tensorflow")
library(tensorflow)
install_tensorflow(method = "conda", version="nightly")
library(keras)
use_condaenv('r-tensorflow')
#(need anaconda in order to download and run code)
View(mnist)
#using the classic MNIST handwriting datas... |
lolcat.core.coalesce <- function(...) {
q <- list(...)
unlist(lapply(q, FUN = function(l) {na.omit(l)}))[1]
}
| /R/lolcat.core.coalesce.R | permissive | burrm/lolcat | R | false | false | 114 | r | lolcat.core.coalesce <- function(...) {
q <- list(...)
unlist(lapply(q, FUN = function(l) {na.omit(l)}))[1]
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.