content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/log_lik.R
\name{log_lik.stanreg}
\alias{log_lik.stanreg}
\alias{log_lik}
\alias{log_lik.stanmvreg}
\alias{log_lik.stanjm}
\title{Pointwise log-likelihood matrix}
\usage{
\method{log_lik}{stanreg}(object, newdata = NULL, offset = NULL, ...)
\... | /man/log_lik.stanreg.Rd | no_license | cran/rstanarm | R | false | true | 3,085 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/log_lik.R
\name{log_lik.stanreg}
\alias{log_lik.stanreg}
\alias{log_lik}
\alias{log_lik.stanmvreg}
\alias{log_lik.stanjm}
\title{Pointwise log-likelihood matrix}
\usage{
\method{log_lik}{stanreg}(object, newdata = NULL, offset = NULL, ...)
\... |
#plots based on previous results
rm(list=ls())
gc()
library(ggplot2)
library(RColorBrewer)
library(gridExtra)
library(reshape2)
#global theme
mytheme <- theme(plot.title = element_text(vjust = 1, hjust = 0.5, size = 40),
axis.text = element_text(vjust = 0.5,hjust = 0.5, size = 25),
... | /code/plot.R | no_license | bRecordT/Traffic-Safety-Prediction | R | false | false | 6,092 | r | #plots based on previous results
rm(list=ls())
gc()
library(ggplot2)
library(RColorBrewer)
library(gridExtra)
library(reshape2)
#global theme
mytheme <- theme(plot.title = element_text(vjust = 1, hjust = 0.5, size = 40),
axis.text = element_text(vjust = 0.5,hjust = 0.5, size = 25),
... |
#-------------------------------------------------------------------------------
# File : QuantileNormalise.R
# Author: Alex Holloway
# Date : 30/09/2014
#-------------------------------------------------------------------------------
QuantileNormalise <- function(x, row.names = FALSE) {
# Perform quantile normalis... | /expnorm/R/QuantileNormalise.R | no_license | josephepowell/cage | R | false | false | 1,025 | r | #-------------------------------------------------------------------------------
# File : QuantileNormalise.R
# Author: Alex Holloway
# Date : 30/09/2014
#-------------------------------------------------------------------------------
QuantileNormalise <- function(x, row.names = FALSE) {
# Perform quantile normalis... |
EnteroPlotlySingleStationUI <- function(id){
ns <- NS(id)
tagList(
wellPanel(
h4(strong('Single Station Data Visualization')),
fluidRow(column(6, uiOutput(ns('Entero_oneStationSelectionUI'))),
column(6,actionButton(ns('reviewData'),"Review Raw Parameter Data",class='btn-block', width ... | /R&S_app_v4/appModules/EnteroccociModule.R | no_license | EmmaVJones/Rivers-StreamsAssessment | R | false | false | 14,627 | r | EnteroPlotlySingleStationUI <- function(id){
ns <- NS(id)
tagList(
wellPanel(
h4(strong('Single Station Data Visualization')),
fluidRow(column(6, uiOutput(ns('Entero_oneStationSelectionUI'))),
column(6,actionButton(ns('reviewData'),"Review Raw Parameter Data",class='btn-block', width ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ighj_hum_df}
\alias{ighj_hum_df}
\title{ighj_hum_df}
\format{A data frame with 6 rows and 2 variables:
\describe{
\item{gene}{The gene name}
\item{seq}{The corresponding sequence}
}}
\source{
IMGT
}
\usage{
igh... | /man/ighj_hum_df.Rd | no_license | fabio-t/AbSim | R | false | true | 703 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ighj_hum_df}
\alias{ighj_hum_df}
\title{ighj_hum_df}
\format{A data frame with 6 rows and 2 variables:
\describe{
\item{gene}{The gene name}
\item{seq}{The corresponding sequence}
}}
\source{
IMGT
}
\usage{
igh... |
import('./operators')
#' Creates a factor where levels are ordered by an external value
#'
#' @param x A vector to be converted in a factor
#' @param level_by A vector of the same length we call `sort()` on
#' @param ... Arguments passed to sort
refactor = function(x, level_by, summarize=NULL, ...) {
... | /base/refactor.r | permissive | mschubert/ebits | R | false | false | 648 | r | import('./operators')
#' Creates a factor where levels are ordered by an external value
#'
#' @param x A vector to be converted in a factor
#' @param level_by A vector of the same length we call `sort()` on
#' @param ... Arguments passed to sort
refactor = function(x, level_by, summarize=NULL, ...) {
... |
library(openxlsx)
library(chron)
library(ggplot2)
library(SDMTools)
library(gridExtra)
library(gtable)
library(grid)
library(ggpubr)
library(RColorBrewer)
library(hrbrthemes)
library(MASS)
library(gtable)
library(grid)
library(ggExtra)
percent <- function(x, digits = 1, format = "f", ...) {
paste0(formatC(100 * x, fo... | /data_analysis/validation_uncertainty.R | no_license | Jin93/COVID19Risk | R | false | false | 14,536 | r | library(openxlsx)
library(chron)
library(ggplot2)
library(SDMTools)
library(gridExtra)
library(gtable)
library(grid)
library(ggpubr)
library(RColorBrewer)
library(hrbrthemes)
library(MASS)
library(gtable)
library(grid)
library(ggExtra)
percent <- function(x, digits = 1, format = "f", ...) {
paste0(formatC(100 * x, fo... |
library(shiny)
library(dplyr)
library(ggplot2)
library(scales)
##Preapare data
df2 <- read.csv("us-states.txt")
gruop1 <- df2 %>% select(state, deaths) %>%
group_by(state) %>%
summarise(mean= mean(deaths)) %>%
arrange(desc(mean) , .by_group = TRUE)%>%
slice(1:10)%>% ungroup
x2 <- df2 %>% filt... | /app.R | no_license | superschadenfreude/Final_project_DDP_Coursera | R | false | false | 1,998 | r | library(shiny)
library(dplyr)
library(ggplot2)
library(scales)
##Preapare data
df2 <- read.csv("us-states.txt")
gruop1 <- df2 %>% select(state, deaths) %>%
group_by(state) %>%
summarise(mean= mean(deaths)) %>%
arrange(desc(mean) , .by_group = TRUE)%>%
slice(1:10)%>% ungroup
x2 <- df2 %>% filt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/remote.R
\name{orderly_bundle_pack_remote}
\alias{orderly_bundle_pack_remote}
\alias{orderly_bundle_import_remote}
\title{Pack and import bundles with remotes}
\usage{
orderly_bundle_pack_remote(
name,
parameters = NULL,
instance = NULL... | /man/orderly_bundle_pack_remote.Rd | permissive | vimc/orderly | R | false | true | 3,293 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/remote.R
\name{orderly_bundle_pack_remote}
\alias{orderly_bundle_pack_remote}
\alias{orderly_bundle_import_remote}
\title{Pack and import bundles with remotes}
\usage{
orderly_bundle_pack_remote(
name,
parameters = NULL,
instance = NULL... |
library(httr)
library(dplyr)
library(ggplot2)
stopifnot(!is.null(athleteBearer)) #athleteBearer ~= "Bearer 1234562ce494d8642ed33789199dc3e085456123"
MAXEVENTLENGTHMINS <- 60
eventName <- "BramleyFall"
getFlybyActivityStream <- function (baseActivityId, compareActivityId) {
activityStreamUrl <- paste0('https://nen... | /StravaOrienteeringControls.R | no_license | MrYeti1/raceRnalysis | R | false | false | 12,122 | r | library(httr)
library(dplyr)
library(ggplot2)
stopifnot(!is.null(athleteBearer)) #athleteBearer ~= "Bearer 1234562ce494d8642ed33789199dc3e085456123"
MAXEVENTLENGTHMINS <- 60
eventName <- "BramleyFall"
getFlybyActivityStream <- function (baseActivityId, compareActivityId) {
activityStreamUrl <- paste0('https://nen... |
library(plyr)
library(dplyr)
library(tidyr)
library(data.table)
# Binding data, activity and Subject on "test" data set
DT.test<-read.table("./data/test/X_test.txt",colClasses = "numeric",nrows=2947)
DT.ytest<-read.table("./data/test/y_test.txt",colClasses = "numeric",nrows=2947)
names(DT.ytest)<-"ActivityID"
DT.stest... | /run_analysis.R | no_license | jmbssc/Course-Project-Getting-and-Cleaning-Data | R | false | false | 1,990 | r | library(plyr)
library(dplyr)
library(tidyr)
library(data.table)
# Binding data, activity and Subject on "test" data set
DT.test<-read.table("./data/test/X_test.txt",colClasses = "numeric",nrows=2947)
DT.ytest<-read.table("./data/test/y_test.txt",colClasses = "numeric",nrows=2947)
names(DT.ytest)<-"ActivityID"
DT.stest... |
\name{VASTPlotUtils-package}
\alias{VASTPlotUtils-package}
\alias{VASTPlotUtils}
\docType{package}
\title{
\packageTitle{VASTPlotUtils}
}
\description{
\packageDescription{VASTPlotUtils}
}
\details{
\packageDESCRIPTION{VASTPlotUtils}
\author{
\packageAuthor{VASTPlotUtils}
Maintainer: \packageMaintainer{VASTPlotUtils... | /man/VASTPlotUtils-package.Rd | permissive | merrillrudd/VASTPlotUtils | R | false | false | 327 | rd | \name{VASTPlotUtils-package}
\alias{VASTPlotUtils-package}
\alias{VASTPlotUtils}
\docType{package}
\title{
\packageTitle{VASTPlotUtils}
}
\description{
\packageDescription{VASTPlotUtils}
}
\details{
\packageDESCRIPTION{VASTPlotUtils}
\author{
\packageAuthor{VASTPlotUtils}
Maintainer: \packageMaintainer{VASTPlotUtils... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dummy.R
\name{dummy}
\alias{dummy}
\title{Generate a data.frame of dummy variables given a vector}
\usage{
dummy(x, prefix = "")
}
\arguments{
\item{x}{a vector}
\item{prefix}{name prefix of returned \code{\link{data.frame}} columns}
}
\valu... | /man/dummy.Rd | no_license | lbraglia/yapomif | R | false | true | 506 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dummy.R
\name{dummy}
\alias{dummy}
\title{Generate a data.frame of dummy variables given a vector}
\usage{
dummy(x, prefix = "")
}
\arguments{
\item{x}{a vector}
\item{prefix}{name prefix of returned \code{\link{data.frame}} columns}
}
\valu... |
###############################################################
####### TRAINING DATA METHODS #################################
#### TRAINING AND HOLDOUT VALIDATION
N <- nrow(data)
target <- round(.75 * N)
set.seed(1)
gp <- runif(N)
train <- data[gp < .75, ]
test <- data[gp >= .75, ]
#### CROSS VALIDATION
# 1) R... | /CODE_R_3_modeling.R | no_license | mitchCarmen/Code_Bucket | R | false | false | 6,977 | r | ###############################################################
####### TRAINING DATA METHODS #################################
#### TRAINING AND HOLDOUT VALIDATION
N <- nrow(data)
target <- round(.75 * N)
set.seed(1)
gp <- runif(N)
train <- data[gp < .75, ]
test <- data[gp >= .75, ]
#### CROSS VALIDATION
# 1) R... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iot_operations.R
\name{iot_list_policy_principals}
\alias{iot_list_policy_principals}
\title{Lists the principals associated with the specified policy}
\usage{
iot_list_policy_principals(policyName, marker, pageSize, ascendingOrder)
}
\argume... | /paws/man/iot_list_policy_principals.Rd | permissive | sanchezvivi/paws | R | false | true | 934 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iot_operations.R
\name{iot_list_policy_principals}
\alias{iot_list_policy_principals}
\title{Lists the principals associated with the specified policy}
\usage{
iot_list_policy_principals(policyName, marker, pageSize, ascendingOrder)
}
\argume... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/recipe.R
\name{bake}
\alias{bake}
\alias{bake.recipe}
\title{Apply a Trained Data Recipe}
\usage{
bake(object, ...)
\method{bake}{recipe}(object, new_data, ..., composition = "tibble")
}
\arguments{
\item{object}{A trained object such as a \... | /man/bake.Rd | permissive | labouz/recipes | R | false | true | 2,938 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/recipe.R
\name{bake}
\alias{bake}
\alias{bake.recipe}
\title{Apply a Trained Data Recipe}
\usage{
bake(object, ...)
\method{bake}{recipe}(object, new_data, ..., composition = "tibble")
}
\arguments{
\item{object}{A trained object such as a \... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PredictAADVMT.R
\docType{data}
\name{PredictAADVMTSpecifications}
\alias{PredictAADVMTSpecifications}
\title{Specifications list for PredictAADVMT module}
\format{A list containing 4 components:
\describe{
\item{RunBy}{the level of geography... | /man/PredictAADVMTSpecifications.Rd | permissive | cities/VETravelDemand | R | false | true | 685 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PredictAADVMT.R
\docType{data}
\name{PredictAADVMTSpecifications}
\alias{PredictAADVMTSpecifications}
\title{Specifications list for PredictAADVMT module}
\format{A list containing 4 components:
\describe{
\item{RunBy}{the level of geography... |
library(glmnet)
mydata = read.table("./TrainingSet/Correlation/autonomic_ganglia.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.9,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/autonomic_gangl... | /Model/EN/Correlation/autonomic_ganglia/autonomic_ganglia_091.R | no_license | leon1003/QSMART | R | false | false | 392 | r | library(glmnet)
mydata = read.table("./TrainingSet/Correlation/autonomic_ganglia.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.9,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/autonomic_gangl... |
#!/usr/bin/env Rscript
require(gWidgets)
options(guiToolkit="tcltk")
##options(guiToolkit="RGtk2")
INPUT <- function(message) {
CHOICE <- NA
w <- gbasicdialog(
title=message,
handler = function(h,...)
CHOICE <<- svalue(input)
)
input <- gedit("", initial.msg="", cont=w, wid... | /gWidgets_input.r | no_license | tiborh/r | R | false | false | 577 | r | #!/usr/bin/env Rscript
require(gWidgets)
options(guiToolkit="tcltk")
##options(guiToolkit="RGtk2")
INPUT <- function(message) {
CHOICE <- NA
w <- gbasicdialog(
title=message,
handler = function(h,...)
CHOICE <<- svalue(input)
)
input <- gedit("", initial.msg="", cont=w, wid... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
library(randomForest)
test.DRF.bigcat <- function(conn) {
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... ar... | /h2o-r/tests/testdir_algos/randomforest/runit_NOPASS_RF_bigcat.R | permissive | madminion/h2o-dev | R | false | false | 1,351 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
library(randomForest)
test.DRF.bigcat <- function(conn) {
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... ar... |
\name{pif}
\alias{pif}
\title{Probability of incorrect fail}
\usage{
pif(a,mu, tau, rhot)
}
\arguments{
\item{a}{cutoff}
\item{mu}{mean}
\item{tau}{true score SD}
\item{rhot}{correlation}
}
\value{Probability of incorrect fail}
\description{
Used in Examples of the paper.
}
\examples{
pif(5.5, 5.8, 1, 0.5)
}
| /man/pif.Rd | no_license | JulesEllis/exdur | R | false | false | 318 | rd | \name{pif}
\alias{pif}
\title{Probability of incorrect fail}
\usage{
pif(a,mu, tau, rhot)
}
\arguments{
\item{a}{cutoff}
\item{mu}{mean}
\item{tau}{true score SD}
\item{rhot}{correlation}
}
\value{Probability of incorrect fail}
\description{
Used in Examples of the paper.
}
\examples{
pif(5.5, 5.8, 1, 0.5)
}
|
\name{RegioAFLQ}
\alias{RegioAFLQ}
\title{Coeficientes técnicos regionales de Flegg aumentados}
\description{ Partiendo de los coeficientes de localización interindustrial de Flegg y Webber (1996), se obtienen los coeficientes técnicos regionales (A.R) a partir de los nacionales (A.N):
A.R(i,j)=A.N(i,j)AFLQ(i,... | /man/RegioAFLQ.Rd | no_license | PacoParra/UtilMio | R | false | false | 1,109 | rd |
\name{RegioAFLQ}
\alias{RegioAFLQ}
\title{Coeficientes técnicos regionales de Flegg aumentados}
\description{ Partiendo de los coeficientes de localización interindustrial de Flegg y Webber (1996), se obtienen los coeficientes técnicos regionales (A.R) a partir de los nacionales (A.N):
A.R(i,j)=A.N(i,j)AFLQ(i,... |
# Source: https://stackoverflow.com/questions/24956546/capitalizing-letters-r-equivalent-of-excel-proper-function
#' Capitalization
#'
#' Capitalize the first letter of a word.
#'
#' @param x The word (string).
#' @return The capitalized word.
#' @export
proper <- function(x) {
paste0(toupper(substr(x, 1, 1)), tolo... | /R/formatting.R | no_license | cilori/oceancolouR | R | false | false | 2,466 | r | # Source: https://stackoverflow.com/questions/24956546/capitalizing-letters-r-equivalent-of-excel-proper-function
#' Capitalization
#'
#' Capitalize the first letter of a word.
#'
#' @param x The word (string).
#' @return The capitalized word.
#' @export
proper <- function(x) {
paste0(toupper(substr(x, 1, 1)), tolo... |
library(rvest)
library(dplyr)
library(svMisc)
rm(list = ls())
for(page in 1:20){
die_wertvollsten_spieler <- read_html(
x = paste("https://www.transfermarkt.de/spieler-statistik/wertvollstespieler/marktwertetop?page=",
page, sep = ""))
# Name, ID und Link zum Profil
spieler_name <- die_wertvoll... | /scraping_script.R | no_license | BerriJ/fussballscrape | R | false | false | 4,646 | r | library(rvest)
library(dplyr)
library(svMisc)
rm(list = ls())
for(page in 1:20){
die_wertvollsten_spieler <- read_html(
x = paste("https://www.transfermarkt.de/spieler-statistik/wertvollstespieler/marktwertetop?page=",
page, sep = ""))
# Name, ID und Link zum Profil
spieler_name <- die_wertvoll... |
##### O banco de dados está disponível nesse link:
#####http://academictorrents.com/details/9b13183dc4d60676b773c9e2cd6de5e5542cee9a
#### pacotes necessários
require(softImpute)
require(data.table)
require(pryr)
require(dplyr)
require(lattice)
require(xtable)
############################# importando dados d... | /código TCC.R | no_license | JulianoCezar/JulianoCezar | R | false | false | 10,865 | r | ##### O banco de dados está disponível nesse link:
#####http://academictorrents.com/details/9b13183dc4d60676b773c9e2cd6de5e5542cee9a
#### pacotes necessários
require(softImpute)
require(data.table)
require(pryr)
require(dplyr)
require(lattice)
require(xtable)
############################# importando dados d... |
# SNgmv~Beh correlation
library(R.matlab)
library(RColorBrewer)
# Generate nice palette:
color <- brewer.pal(n = 8, "Dark2")
gmv <- readMat('/Volumes/REBOOTII/RBTII/ANALYSIS/GMV/FINAL/FullFact_cleaned/STN_vol_F.mat')$Y
group <- c(rep(rep('con',27),2),rep(rep('act',28),2))
visit <- c(rep('V1',27),rep('V2',27),rep('V... | /TMP/tmp_SN_Beh.R | permissive | alex-lebedev/RBTII | R | false | false | 8,600 | r | # SNgmv~Beh correlation
library(R.matlab)
library(RColorBrewer)
# Generate nice palette:
color <- brewer.pal(n = 8, "Dark2")
gmv <- readMat('/Volumes/REBOOTII/RBTII/ANALYSIS/GMV/FINAL/FullFact_cleaned/STN_vol_F.mat')$Y
group <- c(rep(rep('con',27),2),rep(rep('act',28),2))
visit <- c(rep('V1',27),rep('V2',27),rep('V... |
# Across the United States, how have emissions from coal combustion-related
# sources changed from 1999–2008?
# load the ggplot library
library(ggplot2)
# now, access the Work file
source("downloadWorkfile.R")
# Load the NEI & SCC data frames.
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classificati... | /plot4.R | no_license | mstaneluis/ExData_Plotting2 | R | false | false | 1,100 | r | # Across the United States, how have emissions from coal combustion-related
# sources changed from 1999–2008?
# load the ggplot library
library(ggplot2)
# now, access the Work file
source("downloadWorkfile.R")
# Load the NEI & SCC data frames.
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classificati... |
## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
message = FALSE,
warning = FALSE
)
## -----------------------------------------------------------------------------
library(distributions3)
# read in the data
x <- c(3, 7, 1... | /inst/doc/one-sample-t-confidence-interval.R | no_license | cran/distributions3 | R | false | false | 2,655 | r | ## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
message = FALSE,
warning = FALSE
)
## -----------------------------------------------------------------------------
library(distributions3)
# read in the data
x <- c(3, 7, 1... |
setwd("C:/Users/DELL PC/Desktop/Practice Projects R/Predicting Emp Attrition R Project Kindle Book")
library(readr)
library(dplyr)
library(caret)
mydata <- read_csv("Raw_data_Emp_Att.csv")
names(getModelInfo())
mydata <- mydata %>% select(-EmployeeNumber,-EmployeeCount,-Over18, -StandardHours)
# settin... | /Predicting Employee Attrition_randomForest.R | no_license | Ransinghsatyajitray/Knowdege-ka-Pitara | R | false | false | 599 | r | setwd("C:/Users/DELL PC/Desktop/Practice Projects R/Predicting Emp Attrition R Project Kindle Book")
library(readr)
library(dplyr)
library(caret)
mydata <- read_csv("Raw_data_Emp_Att.csv")
names(getModelInfo())
mydata <- mydata %>% select(-EmployeeNumber,-EmployeeCount,-Over18, -StandardHours)
# settin... |
#' Produces a grid of locations inside the region boundary.
#'
#' nodeFilling produces a grid of locations that are the nodes
#' in the diffusion process.
#'
#' @details nodeFilling superimposes a square grid
#' of points over the region, with spacing given
#' by the parameter node_spacing. The points
#' containe... | /R/nodeFilling.R | no_license | cran/latticeDensity | R | false | false | 3,176 | r | #' Produces a grid of locations inside the region boundary.
#'
#' nodeFilling produces a grid of locations that are the nodes
#' in the diffusion process.
#'
#' @details nodeFilling superimposes a square grid
#' of points over the region, with spacing given
#' by the parameter node_spacing. The points
#' containe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cts.R
\name{cts_compinfo}
\alias{cts_compinfo}
\title{Get record details from Chemical Translation Service (CTS)}
\usage{
cts_compinfo(
query,
from = "inchikey",
verbose = getOption("verbose"),
inchikey
)
}
\arguments{
\item{query}{ch... | /man/cts_compinfo.Rd | permissive | jranke/webchem | R | false | true | 1,342 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cts.R
\name{cts_compinfo}
\alias{cts_compinfo}
\title{Get record details from Chemical Translation Service (CTS)}
\usage{
cts_compinfo(
query,
from = "inchikey",
verbose = getOption("verbose"),
inchikey
)
}
\arguments{
\item{query}{ch... |
## Preprocess data, write TAF data tables
## Before: Area37cuyrrentsofia.csv,
## EffortindexRousseaAugNominal.csv (bootstrap/data)
## After: catch_by_stock.png, catch_relative.png, catch_total.png,
## driors_2.png, input.rds (data)
## Test again for R
## Test 2
library(TAF)
library(dplyr) ... | /data.R | no_license | sofia-tsaf/2021Area37Demersal | R | false | false | 3,822 | r | ## Preprocess data, write TAF data tables
## Before: Area37cuyrrentsofia.csv,
## EffortindexRousseaAugNominal.csv (bootstrap/data)
## After: catch_by_stock.png, catch_relative.png, catch_total.png,
## driors_2.png, input.rds (data)
## Test again for R
## Test 2
library(TAF)
library(dplyr) ... |
##' Principal Component Regression
##'
##' @export
pcr <- function(formula, data, ncomp, cor=TRUE, ...) {
mf <- model.frame(formula=formula, data=data)
x <- model.matrix(attr(mf, "terms"), data=mf)
y <- model.response(mf)
mt <- attr(mf, "terms")
fit <- pcr.fit(x[,-1], y, ncomp=ncomp, cor=cor)
... | /R/pcr.R | no_license | regbook/regbook | R | false | false | 1,898 | r | ##' Principal Component Regression
##'
##' @export
pcr <- function(formula, data, ncomp, cor=TRUE, ...) {
mf <- model.frame(formula=formula, data=data)
x <- model.matrix(attr(mf, "terms"), data=mf)
y <- model.response(mf)
mt <- attr(mf, "terms")
fit <- pcr.fit(x[,-1], y, ncomp=ncomp, cor=cor)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/STsimFunctions.R
\name{df2stack}
\alias{df2stack}
\title{Convert list of dataframes with to rasterstack}
\usage{
df2stack(sim_i, DF)
}
\arguments{
\item{sim_i}{which simulation}
\item{DF}{list of dataframe}
}
\value{
rasterstack
}
\descripti... | /STrollR/man/df2stack.Rd | permissive | Jadamso/STrollR | R | false | true | 373 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/STsimFunctions.R
\name{df2stack}
\alias{df2stack}
\title{Convert list of dataframes with to rasterstack}
\usage{
df2stack(sim_i, DF)
}
\arguments{
\item{sim_i}{which simulation}
\item{DF}{list of dataframe}
}
\value{
rasterstack
}
\descripti... |
library(sinib)
### Name: psinib
### Title: Distribution of Sum of Independent Non-Identical Binomial Random
### Variables
### Aliases: psinib dsinib rsinib qsinib
### ** Examples
# Calculating the density and probability:
size <- as.integer(c(12, 14, 4, 2, 20, 17, 11, 1, 8, 11))
prob <- c(0.074, 0.039, 0.095, 0.0... | /data/genthat_extracted_code/sinib/examples/psinib.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 580 | r | library(sinib)
### Name: psinib
### Title: Distribution of Sum of Independent Non-Identical Binomial Random
### Variables
### Aliases: psinib dsinib rsinib qsinib
### ** Examples
# Calculating the density and probability:
size <- as.integer(c(12, 14, 4, 2, 20, 17, 11, 1, 8, 11))
prob <- c(0.074, 0.039, 0.095, 0.0... |
structure(list(url = "https://geo.vliz.be/geoserver/Emodnetbio/wfs?service=WFS&version=2.0.0&typeName=Emodnetbio:mediseh_posidonia_historical_shape&request=DescribeFeatureType",
status_code = 200L, headers = structure(list(`access-control-allow-origin` = "*",
`x-frame-options` = "SAMEORIGIN", `content-dis... | /tests/fixtures/biology-layers/api/wfs-bf83f8.R | permissive | EMODnet/EMODnetWFS | R | false | false | 10,646 | r | structure(list(url = "https://geo.vliz.be/geoserver/Emodnetbio/wfs?service=WFS&version=2.0.0&typeName=Emodnetbio:mediseh_posidonia_historical_shape&request=DescribeFeatureType",
status_code = 200L, headers = structure(list(`access-control-allow-origin` = "*",
`x-frame-options` = "SAMEORIGIN", `content-dis... |
evaluateVAR1fit <- function(Y,
A,
SigmaE,
unbalanced=NULL,
diag=FALSE,
fileType="eps",
dir=getwd()){
########################################################################
#
# DESCRIPTION:
# ridge estimation of the parameters of the VAR(1) model
#
#... | /R/evaluateVAR1fit.r | no_license | cran/ragt2ridges | R | false | false | 4,689 | r | evaluateVAR1fit <- function(Y,
A,
SigmaE,
unbalanced=NULL,
diag=FALSE,
fileType="eps",
dir=getwd()){
########################################################################
#
# DESCRIPTION:
# ridge estimation of the parameters of the VAR(1) model
#
#... |
library(kernlab)
library(caret)
salary_train <- read.csv(file.choose())
View(salary_train)
summary(salary_train)
str(salary_train)
salary_test <- read.csv(file.choose())
View(salary_test)
str(salary_test)
Kernel: vanilladot
salary_vanilla <- ksvm(Salary~.,data=salary_train,kernel="vanilladot")
pred_vanil... | /SVM_Salarydata.R | no_license | karthiknr2/Karthik | R | false | false | 1,345 | r | library(kernlab)
library(caret)
salary_train <- read.csv(file.choose())
View(salary_train)
summary(salary_train)
str(salary_train)
salary_test <- read.csv(file.choose())
View(salary_test)
str(salary_test)
Kernel: vanilladot
salary_vanilla <- ksvm(Salary~.,data=salary_train,kernel="vanilladot")
pred_vanil... |
#!/usr/bin/env Rscript
############################
## Default params...
############################
filename = "stdin"
cmd <- ""
use_header <- F
############################
## Read command-line args
############################
args <- commandArgs(trailingOnly = T)
############################
## Parse command... | /utils/rscripts/rdf | no_license | oneilsh/.dotfiles | R | false | false | 744 | #!/usr/bin/env Rscript
############################
## Default params...
############################
filename = "stdin"
cmd <- ""
use_header <- F
############################
## Read command-line args
############################
args <- commandArgs(trailingOnly = T)
############################
## Parse command... | |
/STATS-509/SP500_analysis.R | no_license | Roxanneyin/master-class | R | false | false | 281 | r | ||
##File name: checkFigs.R
##Creation date: Jun 26, 2015
##Last modified: Wed Jul 22, 2015 11:00PM
##Created by: scott
##Summary: List out figures to check all subfigures refd
#texFiles<-sapply(chaps,list.files,'*.tex',full.names=TRUE)
texFiles<-list.files('.','*.tex$',recursive=TRUE,full.names=TRUE)
tex<-lapply(texFil... | /checkFigs.R | no_license | nnstudy/phdThesis | R | false | false | 1,421 | r | ##File name: checkFigs.R
##Creation date: Jun 26, 2015
##Last modified: Wed Jul 22, 2015 11:00PM
##Created by: scott
##Summary: List out figures to check all subfigures refd
#texFiles<-sapply(chaps,list.files,'*.tex',full.names=TRUE)
texFiles<-list.files('.','*.tex$',recursive=TRUE,full.names=TRUE)
tex<-lapply(texFil... |
#' Function to pull together and zip up lake morphometry data
#'
#' This fucntion takes a list of HUC regions, grabs the appropriate shape files
#' and .csv's and creates a zip file from them
#'
#' @param hucVec this is a vector listing the HUCS you want to pull together into an
#' output zip file
#' @p... | /zipLakeMorpho.R | no_license | jhollist/lakemorphoDB | R | false | false | 1,369 | r | #' Function to pull together and zip up lake morphometry data
#'
#' This fucntion takes a list of HUC regions, grabs the appropriate shape files
#' and .csv's and creates a zip file from them
#'
#' @param hucVec this is a vector listing the HUCS you want to pull together into an
#' output zip file
#' @p... |
library(retrodesign)
### Name: type_m
### Title: type_m
### Aliases: type_m
### ** Examples
type_m(1,3.28)
type_m(list(.2,2,20),8.1)
| /data/genthat_extracted_code/retrodesign/examples/type_m.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 140 | r | library(retrodesign)
### Name: type_m
### Title: type_m
### Aliases: type_m
### ** Examples
type_m(1,3.28)
type_m(list(.2,2,20),8.1)
|
mat<- matrix(1:11,ncol=5)
#----List----
#We use list() function to create a list.
#We will create three different objects: vector, matrix and data frame.
#And will create a list with all these objects combined together.
#Creating a Vector with numeric from 1 up to 5
vect <- 1:5
#Creating a 2x 5 matrix
mat... | /lists.R | no_license | hritiksanotia/hritik-analytics-edge | R | false | false | 853 | r | mat<- matrix(1:11,ncol=5)
#----List----
#We use list() function to create a list.
#We will create three different objects: vector, matrix and data frame.
#And will create a list with all these objects combined together.
#Creating a Vector with numeric from 1 up to 5
vect <- 1:5
#Creating a 2x 5 matrix
mat... |
#
# Exploratory Data Analysis
# Project 1
# 2015.04.10
#
setwd("C://Users//jnewell.BI//Documents//Coursera//Exploratory Data Analysis//Project1")
# Date;Time;Global_active_power;Global_reactive_power;Voltage;Global_intensity;Sub_metering_1;Sub_metering_2;Sub_metering_3
# 1/2/2007;00:00:00;0.326;0.128;243.150;1.400;0.00... | /plot2.R | no_license | gtjnewell/ExData_Plotting1 | R | false | false | 1,590 | r | #
# Exploratory Data Analysis
# Project 1
# 2015.04.10
#
setwd("C://Users//jnewell.BI//Documents//Coursera//Exploratory Data Analysis//Project1")
# Date;Time;Global_active_power;Global_reactive_power;Voltage;Global_intensity;Sub_metering_1;Sub_metering_2;Sub_metering_3
# 1/2/2007;00:00:00;0.326;0.128;243.150;1.400;0.00... |
##############################
## Soetaert and Herman ##
## ecological modelling ##
## Figures from chapter 2 ##
## model formulations ##
##############################
opar <- par()
par(ask=TRUE)
par(mfrow=c(1,1))
figNr <- 1
subtitle <- function()
{
mtext(side=1,outer=TRUE,"Soetaert and... | /demo/chap2.r | no_license | cran/ecolMod | R | false | false | 43,011 | r | ##############################
## Soetaert and Herman ##
## ecological modelling ##
## Figures from chapter 2 ##
## model formulations ##
##############################
opar <- par()
par(ask=TRUE)
par(mfrow=c(1,1))
figNr <- 1
subtitle <- function()
{
mtext(side=1,outer=TRUE,"Soetaert and... |
# Copyright 2017 Observational Health Data Sciences and Informatics
#
# This file is part of DiabetesTxPath
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licen... | /DiabetesTxPath/extras/PackageMaintenance.R | no_license | NEONKID/StudyProtocolSandbox | R | false | false | 1,587 | r | # Copyright 2017 Observational Health Data Sciences and Informatics
#
# This file is part of DiabetesTxPath
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licen... |
#
# firefox.R, 15 Jul 16
#
# Data from:
# Does Hardware Configuration and Processor Load Impact Software Fault Observability?
# Raza Abbas Syed, Brian Robinson and Laurie Williams
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
library("pwr")
ff=read.csv(paste0(... | /faults/firefox.R | no_license | skols/ESEUR-code-data | R | false | false | 3,035 | r | #
# firefox.R, 15 Jul 16
#
# Data from:
# Does Hardware Configuration and Processor Load Impact Software Fault Observability?
# Raza Abbas Syed, Brian Robinson and Laurie Williams
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
library("pwr")
ff=read.csv(paste0(... |
library('ggplot2')
gwas = read.table('data/CRP_st_Whole_Blood.csv', header=T, sep=",")
cgenes = read.table('data/community_genes.txt', header=F)
t = subset(gwas, gwas$gene_name %in% cgenes[,1])
nt = subset(gwas, !gwas$gene_name %in% cgenes[,1])
# https://slowkow.com/notes/ggplot2-qqplot/
ps = t$pvalue
... | /src/qqplot.JUXTAPOSE.r | permissive | gamazonlab/MultilayerModelingTranscriptome | R | false | false | 2,348 | r | library('ggplot2')
gwas = read.table('data/CRP_st_Whole_Blood.csv', header=T, sep=",")
cgenes = read.table('data/community_genes.txt', header=F)
t = subset(gwas, gwas$gene_name %in% cgenes[,1])
nt = subset(gwas, !gwas$gene_name %in% cgenes[,1])
# https://slowkow.com/notes/ggplot2-qqplot/
ps = t$pvalue
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distributions.R
\name{distr_name}
\alias{distr_name}
\alias{sl_distr_name}
\alias{sl_distr_name.random_steps}
\alias{sl_distr_name.fit_clogit}
\alias{ta_distr_name}
\alias{ta_distr_name.random_steps}
\alias{ta_distr_name.fit_clogit}
\title{Na... | /man/distr_name.Rd | no_license | jmsigner/amt | R | false | true | 839 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distributions.R
\name{distr_name}
\alias{distr_name}
\alias{sl_distr_name}
\alias{sl_distr_name.random_steps}
\alias{sl_distr_name.fit_clogit}
\alias{ta_distr_name}
\alias{ta_distr_name.random_steps}
\alias{ta_distr_name.fit_clogit}
\title{Na... |
#' Returns a list of genes, taken from an input list, that have a given KEGG pathway number. Also makes
#' chord data matrix (from chord_dat) for use with GOplot
#' @param gene_list: list of gene symbols
#' @param double_hash: R hash() giving symbol-to-entrez ($stoe) mapping AND entrez-to-symbol ($etos) mapping
#' @p... | /experimental_scripts/03_db-access/KEGG_genes.R | no_license | Tubbz-alt/RNAseqMuscle | R | false | false | 3,245 | r | #' Returns a list of genes, taken from an input list, that have a given KEGG pathway number. Also makes
#' chord data matrix (from chord_dat) for use with GOplot
#' @param gene_list: list of gene symbols
#' @param double_hash: R hash() giving symbol-to-entrez ($stoe) mapping AND entrez-to-symbol ($etos) mapping
#' @p... |
library(shiny)
library(quantreg)
library(ggplot2)
library(dplyr)
wae <- read.table('data/WAE Clean.txt', header=T)
# dataset <- wae
shinyUI(pageWithSidebar(
headerPanel("Walleye weight vs. length"),
sidebarPanel(
sliderInput('sampleSize', 'Sample Size', min=50, max=n... | /shinyWaeDemo/ui.R | no_license | stevenranney/shinyWaeDemo | R | false | false | 876 | r |
library(shiny)
library(quantreg)
library(ggplot2)
library(dplyr)
wae <- read.table('data/WAE Clean.txt', header=T)
# dataset <- wae
shinyUI(pageWithSidebar(
headerPanel("Walleye weight vs. length"),
sidebarPanel(
sliderInput('sampleSize', 'Sample Size', min=50, max=n... |
#' Compute R2 with a specified C matrix
#' @param c Contrast matrix for fixed effects
#' @param x Fixed effects design matrix
#' @param SigHat estimated model covariance (matrix or scalar)
#' @param beta fixed effects estimates
#' @param method the method for computing r2beta
#' @param obsperclust number of observati... | /R/cmpR2_Function.R | no_license | mvlombardo/r2glmm | R | false | false | 2,713 | r |
#' Compute R2 with a specified C matrix
#' @param c Contrast matrix for fixed effects
#' @param x Fixed effects design matrix
#' @param SigHat estimated model covariance (matrix or scalar)
#' @param beta fixed effects estimates
#' @param method the method for computing r2beta
#' @param obsperclust number of observati... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/makeBiocVersions.R
\name{biocReposForVers}
\alias{biocReposForVers}
\title{biocReposForVers}
\usage{
biocReposForVers(version)
}
\arguments{
\item{version}{The Bioconductor release to generate URLs for.}
}
\description{
Generate the U... | /man/biocReposForVers.Rd | permissive | arturochian/switchr | R | false | false | 545 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/makeBiocVersions.R
\name{biocReposForVers}
\alias{biocReposForVers}
\title{biocReposForVers}
\usage{
biocReposForVers(version)
}
\arguments{
\item{version}{The Bioconductor release to generate URLs for.}
}
\description{
Generate the U... |
library(dplyr)
library(assertthat)
sol_properties_data <- tribble(~property,~units,~class_name,~notes,
"lower rostral length","mm","solprop_LRL","",
"lower hood length","mm","solprop_LHL","",
"hood length","mm","solprop_HL",""... | /data-raw/properties.R | permissive | SCAR/solong | R | false | false | 3,582 | r | library(dplyr)
library(assertthat)
sol_properties_data <- tribble(~property,~units,~class_name,~notes,
"lower rostral length","mm","solprop_LRL","",
"lower hood length","mm","solprop_LHL","",
"hood length","mm","solprop_HL",""... |
library(dlookr)
### Name: describe.tbl_dbi
### Title: Compute descriptive statistic
### Aliases: describe.tbl_dbi
### ** Examples
library(dplyr)
library(dbplyr)
# Generate data for the example
carseats <- ISLR::Carseats
carseats[sample(seq(NROW(carseats)), 20), "Income"] <- NA
carseats[sample(seq(NROW(carseats)), ... | /data/genthat_extracted_code/dlookr/examples/describe.tbl_dbi.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,438 | r | library(dlookr)
### Name: describe.tbl_dbi
### Title: Compute descriptive statistic
### Aliases: describe.tbl_dbi
### ** Examples
library(dplyr)
library(dbplyr)
# Generate data for the example
carseats <- ISLR::Carseats
carseats[sample(seq(NROW(carseats)), 20), "Income"] <- NA
carseats[sample(seq(NROW(carseats)), ... |
\name{extractSplicingEnrichment}
\alias{extractSplicingEnrichment}
\title{
Analyze data for enrichment of specific type of alternative splicing
}
\description{
This functions function analyzes (the number of and) enrichment of specific splice events by for each set of opposing event (e.g.. exon skipping gain vs loss), ... | /man/extractSplicingEnrichment.Rd | no_license | lvclark/IsoformSwitchAnalyzeR | R | false | false | 5,670 | rd | \name{extractSplicingEnrichment}
\alias{extractSplicingEnrichment}
\title{
Analyze data for enrichment of specific type of alternative splicing
}
\description{
This functions function analyzes (the number of and) enrichment of specific splice events by for each set of opposing event (e.g.. exon skipping gain vs loss), ... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e-308, -3.526018204... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615854389-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 813 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, 6.68889884134308e+51, -4.05003163986346e-308, -3.526018204... |
########################################################################
#=======================================================================
# ODEAuxiliaryFunctions.R
# Contains the functions that deal with calling functions to compute model out and plotting different scenarios + performing other actions
#
#
#=... | /VCOM_Clean/Advanced/Parsers.R | no_license | IHI-Data-science/VCOM | R | false | false | 6,065 | r | ########################################################################
#=======================================================================
# ODEAuxiliaryFunctions.R
# Contains the functions that deal with calling functions to compute model out and plotting different scenarios + performing other actions
#
#
#=... |
library(copula)
library(zoo)
uniform <- read.zoo("uniforms.csv",header = TRUE, sep = ",")
uniform = as.matrix(uniform)
set.seed(500)
tcop <- tCopula(dim = 4,dispstr = "un")
fit.t <- fitCopula(tcop, uniform, method="ml")
write.csv(coef(fit.t), file = "ParametrosOtimo.csv")
u <- rCopula(200,tCopula(dim=4,dispstr = "un... | /r_files/copula_fit.R | no_license | helderrezende/TCC | R | false | false | 405 | r |
library(copula)
library(zoo)
uniform <- read.zoo("uniforms.csv",header = TRUE, sep = ",")
uniform = as.matrix(uniform)
set.seed(500)
tcop <- tCopula(dim = 4,dispstr = "un")
fit.t <- fitCopula(tcop, uniform, method="ml")
write.csv(coef(fit.t), file = "ParametrosOtimo.csv")
u <- rCopula(200,tCopula(dim=4,dispstr = "un... |
# Direct to the folder where the code is saved
setwd("./simulations")
# The following packages are needed to call the function
library(splines)
library(MASS)
library(survival)
library(Matrix)
library(coda)
# Load in the function
source("Sim_Shell_Exponential.R")
# n = 500, marker prevalence threshold for dichot... | /simulations/one_interim/setting7.R | no_license | YushaLiu/Continuous_marker_adaptive_trial_design | R | false | false | 1,536 | r | # Direct to the folder where the code is saved
setwd("./simulations")
# The following packages are needed to call the function
library(splines)
library(MASS)
library(survival)
library(Matrix)
library(coda)
# Load in the function
source("Sim_Shell_Exponential.R")
# n = 500, marker prevalence threshold for dichot... |
library(pacman)
pacman::p_load(magrittr, tidyverse, tidymodels, broom, drake)
office_plan <- drake_plan(
ratings_raw = target(
readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-17/office_ratings.csv")),
remove_regex = target(
"[:punct:]|[:digit:]|parts |... | /public/drake_slides/extra/cv_example_drake.R | no_license | welch16/welch16.rbind.io | R | false | false | 4,719 | r | library(pacman)
pacman::p_load(magrittr, tidyverse, tidymodels, broom, drake)
office_plan <- drake_plan(
ratings_raw = target(
readr::read_csv("https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-17/office_ratings.csv")),
remove_regex = target(
"[:punct:]|[:digit:]|parts |... |
library(BatchMap)
### Name: find.bins
### Title: Allocate markers into bins
### Aliases: find.bins
### Keywords: bins dimension reduction
### ** Examples
## Not run:
##D load(url("https://github.com/mmollina/data/raw/master/fake_big_data_f2.RData"))
##D fake.big.data.f2
##D (bins<-find.bins(fake.big.data.f2... | /data/genthat_extracted_code/BatchMap/examples/find.bins.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 356 | r | library(BatchMap)
### Name: find.bins
### Title: Allocate markers into bins
### Aliases: find.bins
### Keywords: bins dimension reduction
### ** Examples
## Not run:
##D load(url("https://github.com/mmollina/data/raw/master/fake_big_data_f2.RData"))
##D fake.big.data.f2
##D (bins<-find.bins(fake.big.data.f2... |
#' Add intercept (or constant) column
#'
#' `step_intercept` creates a *specification* of a recipe step that
#' will add an intercept or constant term in the first column of a data
#' matrix. `step_intercept` has defaults to *predictor* role so
#' that it is by default called in the bake step. Be careful to avoid... | /R/intercept.R | no_license | jyuu/recipes | R | false | false | 3,208 | r | #' Add intercept (or constant) column
#'
#' `step_intercept` creates a *specification* of a recipe step that
#' will add an intercept or constant term in the first column of a data
#' matrix. `step_intercept` has defaults to *predictor* role so
#' that it is by default called in the bake step. Be careful to avoid... |
############################# KRR for ALS with Regularization ##############################
ALS_R_KRR <- function(data, train, test, f, maxIters, lambda_als, lambda_p, sigma,beta){
# f = f
# lambda = lambda_als
# beta = beta
# maxIters = maxIters
# data = data
# train = train
# test = test
set.s... | /lib/ALS_R_KRR.R | no_license | TZstatsADS/Spring2020-Project4-group4 | R | false | false | 570 | r | ############################# KRR for ALS with Regularization ##############################
ALS_R_KRR <- function(data, train, test, f, maxIters, lambda_als, lambda_p, sigma,beta){
# f = f
# lambda = lambda_als
# beta = beta
# maxIters = maxIters
# data = data
# train = train
# test = test
set.s... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/figure_add.R
\name{figure_add}
\alias{figure_add}
\title{Manually add/detect points to a scatter plot figure.}
\usage{
figure_add(file = file.choose(), color = "#009900", size = 0.03)
}
\arguments{
\item{file}{The file name a... | /man/figure_add.Rd | no_license | haiyangzhang798/metagear | R | false | false | 1,029 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/figure_add.R
\name{figure_add}
\alias{figure_add}
\title{Manually add/detect points to a scatter plot figure.}
\usage{
figure_add(file = file.choose(), color = "#009900", size = 0.03)
}
\arguments{
\item{file}{The file name a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jprat_function.R
\name{jprat.wrapper}
\alias{jprat.wrapper}
\title{JPRAT algorithm}
\usage{
jprat.wrapper(
study.names,
input.data.list,
nonfunctional.covariate.names,
functional.covariate.names,
othercovariate.names,
event.outcom... | /man/jprat.wrapper.Rd | no_license | Tanya-Garcia-Lab/JPRAT | R | false | true | 9,850 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jprat_function.R
\name{jprat.wrapper}
\alias{jprat.wrapper}
\title{JPRAT algorithm}
\usage{
jprat.wrapper(
study.names,
input.data.list,
nonfunctional.covariate.names,
functional.covariate.names,
othercovariate.names,
event.outcom... |
#-------------------------------------------------------------------------------------------#
# Author : Andrew J Skelton |
# Language : R Statistical Programming Language |
# Study : Interferon Study of a... | /Projects/Hambleton/Interfeon_Study/Hambleton_Interferon_Study_Pipeline.R | no_license | AndrewSkelton/Old-Code | R | false | false | 6,517 | r | #-------------------------------------------------------------------------------------------#
# Author : Andrew J Skelton |
# Language : R Statistical Programming Language |
# Study : Interferon Study of a... |
#install.packages("shiny")
#install.packages("DT")
#install.packages("stringr")
library(shiny)
library(DT)
library(stringr)
db <- read.csv("E:\\USF Database\\db11-9.csv",fill = TRUE)
ui <- fluidPage(
#textInput("Drug_1", label = "Drug 1", value = "Enter text..."),
#textInput("Drug_2",label = "Dr... | /app.R | no_license | ndpendant/usf_dop | R | false | false | 2,943 | r | #install.packages("shiny")
#install.packages("DT")
#install.packages("stringr")
library(shiny)
library(DT)
library(stringr)
db <- read.csv("E:\\USF Database\\db11-9.csv",fill = TRUE)
ui <- fluidPage(
#textInput("Drug_1", label = "Drug 1", value = "Enter text..."),
#textInput("Drug_2",label = "Dr... |
library(kknn)
#---------------------------
# Cross-validation
#---------------------------
# Programm a complicated looking function that does cross-validation and chooses from
# a set of models:
TenFoldCV <- function(X,Y){
MSEEstimateFolds.kknn8 <- numeric(10)
MSEEstimateFolds.kknn6 <- numeric(10)
... | /Solutions/Codes/Series_4_v2.R | no_license | rheasukthanker/Computational_Statistics_ETH | R | false | false | 4,813 | r |
library(kknn)
#---------------------------
# Cross-validation
#---------------------------
# Programm a complicated looking function that does cross-validation and chooses from
# a set of models:
TenFoldCV <- function(X,Y){
MSEEstimateFolds.kknn8 <- numeric(10)
MSEEstimateFolds.kknn6 <- numeric(10)
... |
#x=years of experience y =salary
salary_data<-read.csv("F:/Excelr/Assignments/dataset/assignmentno4/Salary_data.csv")
attach(salary_data)
View(salary_data)
str(salary_data)
sum(is.na(salary_data))
summary(salary_data)
library(lattice)
plot(YearsExperience,Salary)
cor(YearsExperience,Salary)# 0.9782416
plot... | /assignmentno7_4.R | no_license | SaeeshaPednekar/Simple-Linear-rregression | R | false | false | 2,547 | r | #x=years of experience y =salary
salary_data<-read.csv("F:/Excelr/Assignments/dataset/assignmentno4/Salary_data.csv")
attach(salary_data)
View(salary_data)
str(salary_data)
sum(is.na(salary_data))
summary(salary_data)
library(lattice)
plot(YearsExperience,Salary)
cor(YearsExperience,Salary)# 0.9782416
plot... |
% File man/VT.o_MMC.Rd
\name{VT.o_MMC}
\alias{VT.o_MMC}
\title{Returns the variance of the time spend in the M/M/c queueing model}
\description{
Returns the variance of the time spend in the M/M/c queueing model
}
\usage{
\method{VT}{o_MMC}(x, \dots)
}
\arguments{
\item{x}{a object of class o_MMC}
\item{\dots}{... | /man/VT.o_MMC.Rd | no_license | cran/queueing | R | false | false | 847 | rd | % File man/VT.o_MMC.Rd
\name{VT.o_MMC}
\alias{VT.o_MMC}
\title{Returns the variance of the time spend in the M/M/c queueing model}
\description{
Returns the variance of the time spend in the M/M/c queueing model
}
\usage{
\method{VT}{o_MMC}(x, \dots)
}
\arguments{
\item{x}{a object of class o_MMC}
\item{\dots}{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ICTPD.R
\name{calculateStatisticsIc}
\alias{calculateStatisticsIc}
\title{compute the IC statistics}
\usage{
calculateStatisticsIc(ictpdData, multipleControlPeriods = "110",
multipleRiskPeriods = "10000", shrinkage = 0.5, icPercentile = 0.0... | /man/calculateStatisticsIC.Rd | permissive | ASully8018/IcTemporalPatternDiscovery | R | false | true | 2,133 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ICTPD.R
\name{calculateStatisticsIc}
\alias{calculateStatisticsIc}
\title{compute the IC statistics}
\usage{
calculateStatisticsIc(ictpdData, multipleControlPeriods = "110",
multipleRiskPeriods = "10000", shrinkage = 0.5, icPercentile = 0.0... |
# generate random data from a bayesian network.
rbn = function(x, n = 1, ...) {
UseMethod("rbn")
}#RBN
# catch-all, fallback method.
rbn.default = function(x, n = 1, ...) {
check.bn.or.fit(x)
}#RBN.DEFAULT
# generate a random graph.
random.graph = function(nodes, num = 1, method = "ordered", ..., debug = FALS... | /R/bnlearn_frontend-simulation.R | no_license | cran/hmma | R | false | false | 1,204 | r | # generate random data from a bayesian network.
rbn = function(x, n = 1, ...) {
UseMethod("rbn")
}#RBN
# catch-all, fallback method.
rbn.default = function(x, n = 1, ...) {
check.bn.or.fit(x)
}#RBN.DEFAULT
# generate a random graph.
random.graph = function(nodes, num = 1, method = "ordered", ..., debug = FALS... |
"spa.control"<-
function (eps=1e-6,maxiter=20,gcv=c("lGCV","tGCV","fGCV","aGCV"),
lqmax=0.2,lqmin=0.05,ldepth=10,ltmin=0.05,lgrid=NULL,
lval=NULL,dissimilar=TRUE,pce=FALSE,adjust=0,warn=FALSE,...){
if (eps <= 0) {
warning("The value of epsilon supplied is <=0; the value 1e-6 w... | /spa/R/spa.control.R | no_license | ingted/R-Examples | R | false | false | 1,458 | r | "spa.control"<-
function (eps=1e-6,maxiter=20,gcv=c("lGCV","tGCV","fGCV","aGCV"),
lqmax=0.2,lqmin=0.05,ldepth=10,ltmin=0.05,lgrid=NULL,
lval=NULL,dissimilar=TRUE,pce=FALSE,adjust=0,warn=FALSE,...){
if (eps <= 0) {
warning("The value of epsilon supplied is <=0; the value 1e-6 w... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Synthesize_and_gapfill_functions.R
\name{gapfill_with_ERA}
\alias{gapfill_with_ERA}
\title{Gapfills met data}
\usage{
gapfill_with_ERA(datain, era_data, era_vars, tair_units, vpd_units,
out_vars, qc_name, qc_flags, varnames, site_log)
}
\va... | /man/gapfill_with_ERA.Rd | no_license | mdekauwe/FluxnetLSM | R | false | true | 365 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Synthesize_and_gapfill_functions.R
\name{gapfill_with_ERA}
\alias{gapfill_with_ERA}
\title{Gapfills met data}
\usage{
gapfill_with_ERA(datain, era_data, era_vars, tair_units, vpd_units,
out_vars, qc_name, qc_flags, varnames, site_log)
}
\va... |
#' This is the main function which runs all parts of the treatment pathways analysis. The following tasks are performed sequentially:
#' 1) Create target/event cohorts of interest,
#' 2) Optional, only for OMOP-CDM data: Perform baseline characterization of study/target population,
#' 3) Construct treatment pathways,
... | /R/executeTreatmentPatterns.R | no_license | KCHAUDHARIGIT/TreatmentPatterns | R | false | false | 3,826 | r |
#' This is the main function which runs all parts of the treatment pathways analysis. The following tasks are performed sequentially:
#' 1) Create target/event cohorts of interest,
#' 2) Optional, only for OMOP-CDM data: Perform baseline characterization of study/target population,
#' 3) Construct treatment pathways,
... |
library(igraph)
# http://markov.uc3m.es/2012/11/temporal-networks-with-igraph-and-r-with-20-lines-of-code/
# par(mfrow=c(2, 2),
# mar=c(0,0,0,0),
# omo=c(0,0,0,0))
# g <- watts.strogatz.game(1,20,3,0.4)
# # for(i in 1:4) plot(g, layout=layout.fuchterman.reingold, margin=0)
# layout.old <- layout.fruchterman.reingol... | /charts/temporal_networks.R | no_license | vmandrade/r_notes | R | false | false | 2,646 | r | library(igraph)
# http://markov.uc3m.es/2012/11/temporal-networks-with-igraph-and-r-with-20-lines-of-code/
# par(mfrow=c(2, 2),
# mar=c(0,0,0,0),
# omo=c(0,0,0,0))
# g <- watts.strogatz.game(1,20,3,0.4)
# # for(i in 1:4) plot(g, layout=layout.fuchterman.reingold, margin=0)
# layout.old <- layout.fruchterman.reingol... |
#' Function that fills in temporal gaps in box-level satellite phytoplankton biomass
#'
#' @description Takes input as 2D array (box x day) and uses either interpolation or climatology to fill in
#' gaps in data based on duration and location of the gap in the timeseries.
#'
#' @input.mat numeric matrix (box x day)... | /R/Satellite_Phytoplankton/fill_satphyto_gaps.R | no_license | wechuli/large-pr | R | false | false | 6,650 | r | #' Function that fills in temporal gaps in box-level satellite phytoplankton biomass
#'
#' @description Takes input as 2D array (box x day) and uses either interpolation or climatology to fill in
#' gaps in data based on duration and location of the gap in the timeseries.
#'
#' @input.mat numeric matrix (box x day)... |
setwd('/home/yves/tel/Aggregation/')
rm(list=ls())
library(MASS)
library(class)
library(robustbase)
library(neuralnet)
library(gbm)
library(randomForest)
Normal2 <- function(numLearn, numTest){
library("MASS")
l1 <- mvrnorm(numLearn, c(0,0), matrix(c(1,1,1,4), nrow = 2, ncol = 2, byrow=TRUE))
l2 <- m... | /Comparison_of_classifiers_R.R | no_license | tayvesz/ML_Python | R | false | false | 2,518 | r | setwd('/home/yves/tel/Aggregation/')
rm(list=ls())
library(MASS)
library(class)
library(robustbase)
library(neuralnet)
library(gbm)
library(randomForest)
Normal2 <- function(numLearn, numTest){
library("MASS")
l1 <- mvrnorm(numLearn, c(0,0), matrix(c(1,1,1,4), nrow = 2, ncol = 2, byrow=TRUE))
l2 <- m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plantGlycoMSFunctions.R
\name{retentionTimeTable}
\alias{retentionTimeTable}
\title{A function to make a retention time table}
\usage{
retentionTimeTable(dat)
}
\arguments{
\item{dat}{a data.frame with gPSM data}
}
\description{
this function... | /man/retentionTimeTable.Rd | no_license | cpanse/plantGlycoMS | R | false | true | 405 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plantGlycoMSFunctions.R
\name{retentionTimeTable}
\alias{retentionTimeTable}
\title{A function to make a retention time table}
\usage{
retentionTimeTable(dat)
}
\arguments{
\item{dat}{a data.frame with gPSM data}
}
\description{
this function... |
# Part 1 cohort size = 1, Part 2 cohort size = 3.
my_size <- CohortSizeParts(cohort_sizes = c(1, 3))
| /examples/Rules-class-CohortSizeParts.R | no_license | Roche/crmPack | R | false | false | 101 | r | # Part 1 cohort size = 1, Part 2 cohort size = 3.
my_size <- CohortSizeParts(cohort_sizes = c(1, 3))
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ejscreen.rollup.R
\name{ejscreen.rollup}
\alias{ejscreen.rollup}
\title{Aggregate EJSCREEN Dataset at Lower Resolution (e.g., Tracts)}
\usage{
ejscreen.rollup(
bg,
fipsname = "FIPS.TRACT",
scalename = "tracts",
enames,
folder = getw... | /man/ejscreen.rollup.Rd | no_license | ejanalysis/ejscreen | R | false | true | 3,680 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ejscreen.rollup.R
\name{ejscreen.rollup}
\alias{ejscreen.rollup}
\title{Aggregate EJSCREEN Dataset at Lower Resolution (e.g., Tracts)}
\usage{
ejscreen.rollup(
bg,
fipsname = "FIPS.TRACT",
scalename = "tracts",
enames,
folder = getw... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hrvar_trend.R
\name{hrvar_trend}
\alias{hrvar_trend}
\title{Track count of distinct people over time in a specified HR variable}
\usage{
hrvar_trend(data, hrvar = "Organization", return = "plot")
}
\arguments{
\item{data}{A Standard Person Qu... | /man/hrvar_trend.Rd | permissive | standardgalactic/wpa | R | false | true | 4,524 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hrvar_trend.R
\name{hrvar_trend}
\alias{hrvar_trend}
\title{Track count of distinct people over time in a specified HR variable}
\usage{
hrvar_trend(data, hrvar = "Organization", return = "plot")
}
\arguments{
\item{data}{A Standard Person Qu... |
.Chabrier_shape=function(mass, alpha = 2.3, a = 0.08, b = 0.69, masslow = 0.01, massmax = 150, massmult = FALSE){
#for singles a=0.08 and b=0.69
#for binaries a=0.22 and b=0.57
k=(1/(log(10)*1))*exp(-(log10(1)-log10(a))^2/(2*b^2))
out=ifelse(mass<1, (1/(log(10)*mass))*exp(-(log10(mass)-log10(a))^2/(2*b^2)),
... | /R/IMF.R | no_license | asgr/ProSpect | R | false | false | 1,776 | r | .Chabrier_shape=function(mass, alpha = 2.3, a = 0.08, b = 0.69, masslow = 0.01, massmax = 150, massmult = FALSE){
#for singles a=0.08 and b=0.69
#for binaries a=0.22 and b=0.57
k=(1/(log(10)*1))*exp(-(log10(1)-log10(a))^2/(2*b^2))
out=ifelse(mass<1, (1/(log(10)*mass))*exp(-(log10(mass)-log10(a))^2/(2*b^2)),
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/from_igraph.R
\name{from_igraph}
\alias{from_igraph}
\title{Convert an igraph graph to a DiagrammeR one}
\usage{
from_igraph(igraph, graph_name = NULL, write_backups = FALSE,
display_msgs = FALSE)
}
\arguments{
\item{igraph}{An \pkg{igraph}... | /man/from_igraph.Rd | permissive | wush978/DiagrammeR | R | false | true | 1,398 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/from_igraph.R
\name{from_igraph}
\alias{from_igraph}
\title{Convert an igraph graph to a DiagrammeR one}
\usage{
from_igraph(igraph, graph_name = NULL, write_backups = FALSE,
display_msgs = FALSE)
}
\arguments{
\item{igraph}{An \pkg{igraph}... |
find_best_clustering <- function(data)
{
acceptanceProbability <- function(neighbor, newNeighbor, temp, startTemp)
{
result = 0.0
# If the new neighbor is better than the old one, accept it
if(newNeighbor < neighbor)
result = 1.0
# Otherwise we accept the new neighbor with some probabili... | /scripts/Problem7.R | no_license | jcooke92/DataMiningClustering | R | false | false | 1,936 | r | find_best_clustering <- function(data)
{
acceptanceProbability <- function(neighbor, newNeighbor, temp, startTemp)
{
result = 0.0
# If the new neighbor is better than the old one, accept it
if(newNeighbor < neighbor)
result = 1.0
# Otherwise we accept the new neighbor with some probabili... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/draft.R
\name{draft_where_in}
\alias{draft_where_in}
\title{Render x in "WHERE x IN y"}
\usage{
draft_where_in(field, vector)
}
\arguments{
\item{field}{Single field to be filtered for}
\item{vector}{vector of values that the SQL query is fi... | /man/draft_where_in.Rd | no_license | jimsforks/pg13 | R | false | true | 1,060 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/draft.R
\name{draft_where_in}
\alias{draft_where_in}
\title{Render x in "WHERE x IN y"}
\usage{
draft_where_in(field, vector)
}
\arguments{
\item{field}{Single field to be filtered for}
\item{vector}{vector of values that the SQL query is fi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vault.R
\name{create_vault}
\alias{create_vault}
\alias{delete_vault}
\alias{describe_vault}
\title{Vaults}
\usage{
create_vault(vault, ...)
delete_vault(vault, ...)
describe_vault(vault, ...)
}
\arguments{
\item{vault}{A character string s... | /man/vaults.Rd | no_license | isabella232/aws.glacier | R | false | true | 513 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vault.R
\name{create_vault}
\alias{create_vault}
\alias{delete_vault}
\alias{describe_vault}
\title{Vaults}
\usage{
create_vault(vault, ...)
delete_vault(vault, ...)
describe_vault(vault, ...)
}
\arguments{
\item{vault}{A character string s... |
\name{ao.qr}
\alias{ao.qr}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Generic function
}
\description{
Generic function of ao.qr()
}
\usage{
ao.qr(x, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{
For the UseMethod function
}
\item{... | /man/ao.qr.Rd | no_license | cran/AOfamilies | R | false | false | 936 | rd | \name{ao.qr}
\alias{ao.qr}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Generic function
}
\description{
Generic function of ao.qr()
}
\usage{
ao.qr(x, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
\item{x}{
For the UseMethod function
}
\item{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_eurostat_bulk.R
\name{get_eurostat_bulk}
\alias{get_eurostat_bulk}
\title{Get Eurostat data in a standardized format}
\usage{
get_eurostat_bulk(
id,
cache = TRUE,
update_cache = FALSE,
cache_dir = NULL,
compress_file = TRUE,
s... | /man/get_eurostat_bulk.Rd | no_license | minghao2016/restatapi | R | false | true | 6,118 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_eurostat_bulk.R
\name{get_eurostat_bulk}
\alias{get_eurostat_bulk}
\title{Get Eurostat data in a standardized format}
\usage{
get_eurostat_bulk(
id,
cache = TRUE,
update_cache = FALSE,
cache_dir = NULL,
compress_file = TRUE,
s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chk-join.R
\name{chk_join}
\alias{chk_join}
\alias{vld_join}
\title{Check Join}
\usage{
chk_join(x, y, by, x_name = NULL)
vld_join(x, y, by)
}
\arguments{
\item{x}{The object to check.}
\item{y}{A data.frame with columns in by.}
\item{by}{... | /man/chk_join.Rd | permissive | pre-processing-r/chk | R | false | true | 1,581 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chk-join.R
\name{chk_join}
\alias{chk_join}
\alias{vld_join}
\title{Check Join}
\usage{
chk_join(x, y, by, x_name = NULL)
vld_join(x, y, by)
}
\arguments{
\item{x}{The object to check.}
\item{y}{A data.frame with columns in by.}
\item{by}{... |
library(aiRthermo)
### Name: e2w
### Title: Compute Mixing Ratio from partial pressure of water vapour
### Aliases: e2w
### Keywords: Functions
### ** Examples
#Partial pressure of water vapour
data(RadiosondeA)
dPs<-RadiosondeA[,1]*100
dws<-RadiosondeA[,6]/1000
eh2o<-q2e(dPs,w2q(dws))
#Pressure
e2w(eh2o,dPs)
... | /data/genthat_extracted_code/aiRthermo/examples/e2w.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 322 | r | library(aiRthermo)
### Name: e2w
### Title: Compute Mixing Ratio from partial pressure of water vapour
### Aliases: e2w
### Keywords: Functions
### ** Examples
#Partial pressure of water vapour
data(RadiosondeA)
dPs<-RadiosondeA[,1]*100
dws<-RadiosondeA[,6]/1000
eh2o<-q2e(dPs,w2q(dws))
#Pressure
e2w(eh2o,dPs)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bootstrap.R
\name{bootstrap}
\alias{bootstrap}
\title{bootstrap}
\usage{
bootstrap(qteparams, qteest, func)
}
\arguments{
\item{qteparams}{QTEparams object containing the parameters passed to ciqte}
\item{qteest}{an initial estimate of the q... | /man/bootstrap.Rd | no_license | arlionn/qte-1 | R | false | true | 600 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bootstrap.R
\name{bootstrap}
\alias{bootstrap}
\title{bootstrap}
\usage{
bootstrap(qteparams, qteest, func)
}
\arguments{
\item{qteparams}{QTEparams object containing the parameters passed to ciqte}
\item{qteest}{an initial estimate of the q... |
#' Split Justice Web charges into separate rows
#'
#' @param .data An R object containing the Justice Web data
#'
#' @param .user_col Character string naming a column in \code{.data}
#' that contains the unique identifiers for each user
#'
#' @param .charges_col Character string naming a column in \... | /R/split_jweb_charges.R | no_license | Auburngrads/Ascend | R | false | false | 1,936 | r | #' Split Justice Web charges into separate rows
#'
#' @param .data An R object containing the Justice Web data
#'
#' @param .user_col Character string naming a column in \code{.data}
#' that contains the unique identifiers for each user
#'
#' @param .charges_col Character string naming a column in \... |
convertList <- function(x, y = c()){
if ("PUMA" %in% y){
x$PUMA = convertPUMA(x$PUMA)
x$PUMA = factor(x$PUMA)
}
if ("OCCP" %in% y){
x$OCCP = convertOCCP(x$OCCP)
x$OCCP = factor(x$OCCP)
}
if ("FOD1P" %in% y){
x$FOD1P = convertFOD1P(x$FOD1P)
x$FOD1P = factor(x$FOD1P)
}
... | /FunctionsForFinalProject (1).R | no_license | WilliamShih9/ACS-2018-Regression | R | false | false | 43,668 | r |
convertList <- function(x, y = c()){
if ("PUMA" %in% y){
x$PUMA = convertPUMA(x$PUMA)
x$PUMA = factor(x$PUMA)
}
if ("OCCP" %in% y){
x$OCCP = convertOCCP(x$OCCP)
x$OCCP = factor(x$OCCP)
}
if ("FOD1P" %in% y){
x$FOD1P = convertFOD1P(x$FOD1P)
x$FOD1P = factor(x$FOD1P)
}
... |
#######################################
# Build ChemRICH data
#######################################
rm(list=ls())
#setwd("~/Desktop/GItract15S-main")
setwd("C:/Users/jakef/Box/GItract15S-main")
# configure directories, load libraries and base functions
source("0_Configuration.R")
LMMresult_Filt6h <- read_exce... | /1_data/ChemRICH_data/BuildChemRICHdata.R | no_license | jfolzy/GItract_MetabolomeNM | R | false | false | 10,277 | r | #######################################
# Build ChemRICH data
#######################################
rm(list=ls())
#setwd("~/Desktop/GItract15S-main")
setwd("C:/Users/jakef/Box/GItract15S-main")
# configure directories, load libraries and base functions
source("0_Configuration.R")
LMMresult_Filt6h <- read_exce... |
#' Convert tbl_tree to plottable data.frame
#'
#' @details
#' `fortify_cellpop` prepares plottable data.frame.
#' @param ... passed to `layout_rect` or `ggtree::fortify`.
#' @param model output of `scale_branches()`
#' @param data tbl_tree
#' @inheritParams filter_origins
#' @rdname fortify
#' @export
fortify_cellpop =... | /R/fortify.R | permissive | heavywatal/cellpoptime | R | false | false | 3,249 | r | #' Convert tbl_tree to plottable data.frame
#'
#' @details
#' `fortify_cellpop` prepares plottable data.frame.
#' @param ... passed to `layout_rect` or `ggtree::fortify`.
#' @param model output of `scale_branches()`
#' @param data tbl_tree
#' @inheritParams filter_origins
#' @rdname fortify
#' @export
fortify_cellpop =... |
library(ggplot2)
load('output/result-model8-1.RData')
load('output/result-model8-2.RData')
load('output/result-model8-3.RData')
ms1 <- rstan::extract(fit1)
ms2 <- rstan::extract(fit2)
ms3 <- rstan::extract(fit3)
K <- 4
N_mcmc <- length(ms1$lp__)
dx <- data.frame(t(sapply(split(d, d$KID), function(x) range(x$X))))
col... | /chap08/fig8-4-right.R | no_license | winterwang/RStanBook | R | false | false | 1,965 | r | library(ggplot2)
load('output/result-model8-1.RData')
load('output/result-model8-2.RData')
load('output/result-model8-3.RData')
ms1 <- rstan::extract(fit1)
ms2 <- rstan::extract(fit2)
ms3 <- rstan::extract(fit3)
K <- 4
N_mcmc <- length(ms1$lp__)
dx <- data.frame(t(sapply(split(d, d$KID), function(x) range(x$X))))
col... |
# Simulation - Random Sampling
set.seed(1)
sample(1:10, 4)
sample(1:10, 4)
sample(letters, 5)
sample(1:10) ## permutation
## [1] 10 6 9 2 1 5 8 4 3 7
sample(1:10nt, replace = TRUE) ## Sample w/ replaceme
## [1] 5 5 2 10 9 1 4 3 6 10 | /2_RProgramming/week4/Simulation - Randmo Sampling.R | no_license | artickavenger/datasciencecoursera | R | false | false | 249 | r | # Simulation - Random Sampling
set.seed(1)
sample(1:10, 4)
sample(1:10, 4)
sample(letters, 5)
sample(1:10) ## permutation
## [1] 10 6 9 2 1 5 8 4 3 7
sample(1:10nt, replace = TRUE) ## Sample w/ replaceme
## [1] 5 5 2 10 9 1 4 3 6 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.