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 |
|---|---|---|---|---|---|---|---|---|---|
## Matrix inversion is usually a costly population and there may be some benefits to caching the inverse of a matrix rather than compute it repeatedly.
## The following are a pair of functions that cache the inverse of a matrix.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheM... | /cachematrix.R | no_license | Myat-Noe/ProgrammingAssignment2 | R | false | false | 1,268 | r | ## Matrix inversion is usually a costly population and there may be some benefits to caching the inverse of a matrix rather than compute it repeatedly.
## The following are a pair of functions that cache the inverse of a matrix.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheM... |
## set up working directory
rm(list = ls())
## load libraries
library(plyr)
## load team-city mappers
TeamCityConfDf <- read.csv('../../data/teams_cities_conferences.csv', stringsAsFactors=TRUE)
TEAMS <- as.character(TeamCityConfDf$Team)
CITY_ABBR <- as.character(TeamCityConfDf$CityAbbr)
## getting data for analy... | /code/decommissioned/preprocessing/script0.R | no_license | Basketball4Nerds/nba_basketball_research | R | false | false | 1,499 | r | ## set up working directory
rm(list = ls())
## load libraries
library(plyr)
## load team-city mappers
TeamCityConfDf <- read.csv('../../data/teams_cities_conferences.csv', stringsAsFactors=TRUE)
TEAMS <- as.character(TeamCityConfDf$Team)
CITY_ABBR <- as.character(TeamCityConfDf$CityAbbr)
## getting data for analy... |
#' Calculate Mean High Water spring, neap,
#'
#' This package calculates mean high water spring at a desired location.
#' Since often only short term data is available, this function uses the
#' simltaneous comparison method to compute the datum. Data from the desired location and a
#' control station for the same time... | /R/tider_correct.R | no_license | nstatler/tider | R | false | false | 5,326 | r | #' Calculate Mean High Water spring, neap,
#'
#' This package calculates mean high water spring at a desired location.
#' Since often only short term data is available, this function uses the
#' simltaneous comparison method to compute the datum. Data from the desired location and a
#' control station for the same time... |
### method settings
## First read in the arguments listed at the command line
args = (commandArgs(TRUE))
## args is now a list of character vectors
## First check to see if arguments are passed.
## Then cycle through each element of the list and evaluate the expressions.
if (length(args) == 0) {
cat("No arguments su... | /code/interp_final_varsel.R | no_license | environmentalinformatics-marburg/appelhans-SPASTA-D-14-00065 | R | false | false | 11,473 | r | ### method settings
## First read in the arguments listed at the command line
args = (commandArgs(TRUE))
## args is now a list of character vectors
## First check to see if arguments are passed.
## Then cycle through each element of the list and evaluate the expressions.
if (length(args) == 0) {
cat("No arguments su... |
library(ProjectTemplate)
load.project()
#get wine data
data(wine, package="rattle")
#EDA of wine data
head(wine)
str(wine)
summary(wine)
#scale data so that all numeric variables are normalized with mean of 0
data.train=scale(wine[-1])
summary(data.train)
#method 1 to identify suggested number of clusters
library(N... | /src/k-Means Cluster.R | no_license | granttd/R-Cluster-Analysis | R | false | false | 1,387 | r | library(ProjectTemplate)
load.project()
#get wine data
data(wine, package="rattle")
#EDA of wine data
head(wine)
str(wine)
summary(wine)
#scale data so that all numeric variables are normalized with mean of 0
data.train=scale(wine[-1])
summary(data.train)
#method 1 to identify suggested number of clusters
library(N... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ssm_operations.R
\name{ssm_list_associations}
\alias{ssm_list_associations}
\title{Lists the associations for the specified Systems Manager document or
instance}
\usage{
ssm_list_associations(AssociationFilterList, MaxResults, NextToken)
}
\a... | /paws/man/ssm_list_associations.Rd | permissive | johnnytommy/paws | R | false | true | 1,165 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ssm_operations.R
\name{ssm_list_associations}
\alias{ssm_list_associations}
\title{Lists the associations for the specified Systems Manager document or
instance}
\usage{
ssm_list_associations(AssociationFilterList, MaxResults, NextToken)
}
\a... |
geodrink <-
function(job=1,alpha=.05)
{
dump("geodrink", "c:\\StatBook\\geodrink.r")
dat=read.csv("c:\\StatBook\\kidsdrinkDAT.csv")
print(names(dat))
o=glm(bingedr~frndalc+age+black+senseek+alcmovie+parentmont+cthhsz,family=binomial,data=dat)
a=coef(o)
X=cbind(dat$senseek,dat$alcmovie,dat$parentmont,dat$cthhsz)... | /RcodeData/geodrink.r | no_license | PepSalehi/advancedstatistics | R | false | false | 1,909 | r | geodrink <-
function(job=1,alpha=.05)
{
dump("geodrink", "c:\\StatBook\\geodrink.r")
dat=read.csv("c:\\StatBook\\kidsdrinkDAT.csv")
print(names(dat))
o=glm(bingedr~frndalc+age+black+senseek+alcmovie+parentmont+cthhsz,family=binomial,data=dat)
a=coef(o)
X=cbind(dat$senseek,dat$alcmovie,dat$parentmont,dat$cthhsz)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render.R
\name{decktape}
\alias{decktape}
\title{Convert HTML presentations to PDF via DeckTape}
\usage{
decktape(
file,
output,
args = "--chrome-arg=--allow-file-access-from-files",
docker = Sys.which("decktape") == "",
version = "... | /man/decktape.Rd | permissive | Yue-Jiang/xaringan | R | false | true | 1,885 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/render.R
\name{decktape}
\alias{decktape}
\title{Convert HTML presentations to PDF via DeckTape}
\usage{
decktape(
file,
output,
args = "--chrome-arg=--allow-file-access-from-files",
docker = Sys.which("decktape") == "",
version = "... |
#' Convert data.frame variables to other types with dplyr: mutate_if
#'
#' @param ... the dataframe to convert characters to factors or factors to characters
#' @param .inData Data frame identifier.
#' @param .convert: character
#' Factor2Char: Converts all factor variables to characters
#' ... | /Convert.R | permissive | KyriakosJiannis/R_data_utils | R | false | false | 1,910 | r | #' Convert data.frame variables to other types with dplyr: mutate_if
#'
#' @param ... the dataframe to convert characters to factors or factors to characters
#' @param .inData Data frame identifier.
#' @param .convert: character
#' Factor2Char: Converts all factor variables to characters
#' ... |
library(rgbif)
#' @title Download occurrence points from GBIF
#'
#' @description Downloads occurrence points and useful related information for processing within other occCite functions
#'
#' @param taxon A single species
#'
#' @param GBIFLogin An object of class \code{\link{GBIFLogin}} to log in to GBIF to begin the ... | /R/getGBIFpoints.R | no_license | cmerow/occCite | R | false | false | 3,004 | r | library(rgbif)
#' @title Download occurrence points from GBIF
#'
#' @description Downloads occurrence points and useful related information for processing within other occCite functions
#'
#' @param taxon A single species
#'
#' @param GBIFLogin An object of class \code{\link{GBIFLogin}} to log in to GBIF to begin the ... |
#Levy分布
#ライブラリ読み込み
library(rmutil)
#確率密度
dLevy <- function(x, m, s){
#戻り値のベクトルを作っておく。すべてNAを入れる。
ret <- rep(NA, length(x))
#値が計算できるはずの位置
good.pos <- which(x > m)
#計算できる値のみを入れる
ret[good.pos] <- rmutil::dlevy(y = x[good.pos], m = m, s = s)
#戻り値
return(ret)
}
#累積確率
pLevy <- function(q, m, s)... | /dist/Levy.R | permissive | ToshihiroIguchi/ezdis | R | false | false | 865 | r | #Levy分布
#ライブラリ読み込み
library(rmutil)
#確率密度
dLevy <- function(x, m, s){
#戻り値のベクトルを作っておく。すべてNAを入れる。
ret <- rep(NA, length(x))
#値が計算できるはずの位置
good.pos <- which(x > m)
#計算できる値のみを入れる
ret[good.pos] <- rmutil::dlevy(y = x[good.pos], m = m, s = s)
#戻り値
return(ret)
}
#累積確率
pLevy <- function(q, m, s)... |
#########################
# Convolution Simulator #
# Version 2.0 #
# #
# February 2, 2018 #
# Thomas Kaunzinger #
# XCerra Corp. #
#########################
# Libraries
library(shiny)
# Wave Generation
sample.rate <- 2048
npts <- 512
# Time Axis
dt ... | /R/Convolution Simulator/convolution.R | no_license | McNibbler/public-projects | R | false | false | 5,112 | r | #########################
# Convolution Simulator #
# Version 2.0 #
# #
# February 2, 2018 #
# Thomas Kaunzinger #
# XCerra Corp. #
#########################
# Libraries
library(shiny)
# Wave Generation
sample.rate <- 2048
npts <- 512
# Time Axis
dt ... |
rbind.mids <- function(x, y = NULL, ...) {
call <- match.call()
if (is.mids(y)) return(rbind.mids.mids(x, y, call = call))
# Combine y and dots into data.frame
if (is.null(y)) {
y <- rbind.data.frame(...)
}
else {
y <- rbind.data.frame(y, ...)
}
if (is.data.frame(y)) {
... | /R/rbind.R | no_license | cran/mudfold | R | false | false | 5,368 | r |
rbind.mids <- function(x, y = NULL, ...) {
call <- match.call()
if (is.mids(y)) return(rbind.mids.mids(x, y, call = call))
# Combine y and dots into data.frame
if (is.null(y)) {
y <- rbind.data.frame(...)
}
else {
y <- rbind.data.frame(y, ...)
}
if (is.data.frame(y)) {
... |
station<-read.table('observed_pm/AQS_comparisons/KJER.csv', sep=",",skip=8)
colnames(station)<-c('ID','datetime','temp','speed','direction','gust')
station[,"datetime"] <- as.character(station[,"datetime"])
station[,"datetime"] <- as.POSIXct(strptime(station[,"datetime"], '%M/%d/%Y %H:%M'))
#station<-subset(station, ... | /src/station_data.R | no_license | alejandroxpx/postfire-dust | R | false | false | 1,354 | r | station<-read.table('observed_pm/AQS_comparisons/KJER.csv', sep=",",skip=8)
colnames(station)<-c('ID','datetime','temp','speed','direction','gust')
station[,"datetime"] <- as.character(station[,"datetime"])
station[,"datetime"] <- as.POSIXct(strptime(station[,"datetime"], '%M/%d/%Y %H:%M'))
#station<-subset(station, ... |
#' Compute AUC
#' @description
#' Compute Area Under the Curve (AUC)
#' @keywords internal
#' @param yobs is a vector of observed phenotypes
#' @param ypred is a vector of predicted phenotypes
auc <- function(yobs = NULL, ypred = NULL) {
n0 <- length(yobs[yobs == 0])
n1 <- length(yobs[yobs == 1])
y <- cbind(yobs,... | /R/qgg_utility_functions.R | no_license | psoerensen/qgg | R | false | false | 10,729 | r | #' Compute AUC
#' @description
#' Compute Area Under the Curve (AUC)
#' @keywords internal
#' @param yobs is a vector of observed phenotypes
#' @param ypred is a vector of predicted phenotypes
auc <- function(yobs = NULL, ypred = NULL) {
n0 <- length(yobs[yobs == 0])
n1 <- length(yobs[yobs == 1])
y <- cbind(yobs,... |
\name{get_malaria_incidence_peru}
\alias{get_malaria_incidence_peru}
\title{Get Tutorial Malaria Incidence Data}
\usage{
get_malaria_incidence_peru()
}
\description{
Load the observed monthly malaria incidence in Padre Cocha, Loreto, Peru, from the beginning of the year 1996 to the end of the year 1998.
Derived from P... | /man/get_malaria_incidence_peru.Rd | no_license | lwillem/IBMcourseTutorials | R | false | false | 512 | rd | \name{get_malaria_incidence_peru}
\alias{get_malaria_incidence_peru}
\title{Get Tutorial Malaria Incidence Data}
\usage{
get_malaria_incidence_peru()
}
\description{
Load the observed monthly malaria incidence in Padre Cocha, Loreto, Peru, from the beginning of the year 1996 to the end of the year 1998.
Derived from P... |
library(tidyverse)
colors <- unname(unlist(bayesplot::color_scheme_get()[c(6, 2)]))
# theme_set(bayesplot::theme_default(base_family = "sans"))
theme_set(theme_bw())
# data preparation
mlevels <- c(
"constant", "linear", "quadratic",
"AR2-only", "AR2-linear", "AR2-quadratic"
)
lfo_sims <- read_rds("results/lfo_sim... | /sim_analysis.R | permissive | Categorytyy/LFO-CV-paper | R | false | false | 8,092 | r | library(tidyverse)
colors <- unname(unlist(bayesplot::color_scheme_get()[c(6, 2)]))
# theme_set(bayesplot::theme_default(base_family = "sans"))
theme_set(theme_bw())
# data preparation
mlevels <- c(
"constant", "linear", "quadratic",
"AR2-only", "AR2-linear", "AR2-quadratic"
)
lfo_sims <- read_rds("results/lfo_sim... |
################# 6) Compare emissions from motor vehicle sources in Baltimore City with emissions from motor
# vehicle sources in Los Angeles County, California (fips == "06037"). Which city has seen greater changes
# over time in motor vehicle emissions?
if(!file.exists("exdata%2Fdata%2FNEI_data.zip")) {
t... | /plot6.r | no_license | AFrase10/ExploratoryDataProject2- | R | false | false | 1,197 | r | ################# 6) Compare emissions from motor vehicle sources in Baltimore City with emissions from motor
# vehicle sources in Los Angeles County, California (fips == "06037"). Which city has seen greater changes
# over time in motor vehicle emissions?
if(!file.exists("exdata%2Fdata%2FNEI_data.zip")) {
t... |
m_tables_ae_ui <- function(id) {
ns <- NS(id)
"AEAE"
}
m_tables_ae_srv <- function(id, list_reactive_datasets) {
moduleServer(
id,
function(input, output, session) {
}
)
}
| /programs_final/shiny/m_tables_ae.R | no_license | openpharma/rinpharma_workshop_2021 | R | false | false | 193 | r | m_tables_ae_ui <- function(id) {
ns <- NS(id)
"AEAE"
}
m_tables_ae_srv <- function(id, list_reactive_datasets) {
moduleServer(
id,
function(input, output, session) {
}
)
}
|
ROMI.plot <-
function(Dx=NULL, Nx=NULL, mx=NULL, smooth=TRUE) {
if (all(is.null(Dx), is.null(Nx), is.null(mx)))
stop("You need to specify either 'Dx' and 'Nx' or, alternatively, 'mx'!")
if (!smooth) {
if (is.null(mx)) {
mx <- Dx/Nx
}
mx.2 <- mx[,-1]
mx.1 <- mx... | /ROMIplot/R/ROMI.plot.R | no_license | ingted/R-Examples | R | false | false | 2,741 | r | ROMI.plot <-
function(Dx=NULL, Nx=NULL, mx=NULL, smooth=TRUE) {
if (all(is.null(Dx), is.null(Nx), is.null(mx)))
stop("You need to specify either 'Dx' and 'Nx' or, alternatively, 'mx'!")
if (!smooth) {
if (is.null(mx)) {
mx <- Dx/Nx
}
mx.2 <- mx[,-1]
mx.1 <- mx... |
#----preparing the datasets-------
#load("sim_vsv_1t_10K.rda")
#load("sim_vsv_100t_1K.rda")
#load("sim_log_1t_10K.rda")
#load("sim_log_100t_10K.rda")
#load("sim_mvt_1t_10K.rda")
#sim_mvt_1t_10K <- sim_mvt_1t_10K %>% rename(v_loc = v_mean, sv_loc = sv_mean)
#load("sim_mvt_100t_10k.rda")
#sim_log_100t_10K <- sim_log_100t... | /Plots/results_plots_publish.R | no_license | ruslana-tymchyk/masters-diss | R | false | false | 7,017 | r | #----preparing the datasets-------
#load("sim_vsv_1t_10K.rda")
#load("sim_vsv_100t_1K.rda")
#load("sim_log_1t_10K.rda")
#load("sim_log_100t_10K.rda")
#load("sim_mvt_1t_10K.rda")
#sim_mvt_1t_10K <- sim_mvt_1t_10K %>% rename(v_loc = v_mean, sv_loc = sv_mean)
#load("sim_mvt_100t_10k.rda")
#sim_log_100t_10K <- sim_log_100t... |
##### Implementation Begins ####
#This code replicates the FED's paper
require("BMA")
require("PerformanceAnalytics")
require("ggplot2")
### Load the Data
fedData_raw <- read.csv("~/General Documents/FED Study/FED-master/Fed_Data_R.csv")
##### Preprocesing the data for making the analysis #####
#Coercing the data... | /FEDAdvanced.R | no_license | ilvitorio/FED | R | false | false | 7,591 | r | ##### Implementation Begins ####
#This code replicates the FED's paper
require("BMA")
require("PerformanceAnalytics")
require("ggplot2")
### Load the Data
fedData_raw <- read.csv("~/General Documents/FED Study/FED-master/Fed_Data_R.csv")
##### Preprocesing the data for making the analysis #####
#Coercing the data... |
########################################################################################################################
# HASH PRICING ANALYSIS - PURPOSE
########################################################################################################################
# Purpose: determine what the distribution o... | /hash_pricing_analysis.R | no_license | WrightWillT/example-work | R | false | false | 1,737 | r | ########################################################################################################################
# HASH PRICING ANALYSIS - PURPOSE
########################################################################################################################
# Purpose: determine what the distribution o... |
library(rCharts)
shinyUI(bootstrapPage(
# Add custom CSS & Javascript;
tagList(
tags$head(
tags$style("hr {margin: 5px 0;}"),
tags$script(src="jquery-ui.js"),
tags$script(src="app.js"),
# tags$script(src="PruneCluster.js"),
# tags$script(src="PruneCluster.css"),
tags$link(rel... | /ui.R | no_license | shinysolutions/heatmap | R | false | false | 980 | r | library(rCharts)
shinyUI(bootstrapPage(
# Add custom CSS & Javascript;
tagList(
tags$head(
tags$style("hr {margin: 5px 0;}"),
tags$script(src="jquery-ui.js"),
tags$script(src="app.js"),
# tags$script(src="PruneCluster.js"),
# tags$script(src="PruneCluster.css"),
tags$link(rel... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/performance_metrics.R
\name{performanceMeasure}
\alias{performanceMeasure}
\title{Performance metrics to evaluate classification}
\usage{
performanceMeasure(pred, obs, perf.method = "f.measure", ...)
}
\arguments{
\item{pred}{a logical or num... | /man/performanceMeasure.Rd | no_license | DavisLaboratory/dcanr | R | false | true | 1,299 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/performance_metrics.R
\name{performanceMeasure}
\alias{performanceMeasure}
\title{Performance metrics to evaluate classification}
\usage{
performanceMeasure(pred, obs, perf.method = "f.measure", ...)
}
\arguments{
\item{pred}{a logical or num... |
context("Global Settings")
test_that("settings changes and views", {
skip_if_not(TEST_ALL)
presets <- settings()
expect_identical(settings("control", cut = 0.25, max.print = 5),
presets[c("control", "cutoff", "max.print")])
expect_identical(settings("cutoff"), 0.25)
expect_identical(set... | /tests/testthat/test-settings.R | no_license | Drbuxie/MachineShop | R | false | false | 4,982 | r | context("Global Settings")
test_that("settings changes and views", {
skip_if_not(TEST_ALL)
presets <- settings()
expect_identical(settings("control", cut = 0.25, max.print = 5),
presets[c("control", "cutoff", "max.print")])
expect_identical(settings("cutoff"), 0.25)
expect_identical(set... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_soil_types_bg.R
\name{read_soil_types_bg}
\alias{read_soil_types_bg}
\title{Soil Types}
\usage{
read_soil_types_bg()
}
\description{
Function returns the types of soils present in the municipality of Bage
}
\examples{
\dontrun{
library(... | /man/read_soil_types_bg.Rd | no_license | Prof-Rodrigo-Silva/geobage | R | false | true | 2,384 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_soil_types_bg.R
\name{read_soil_types_bg}
\alias{read_soil_types_bg}
\title{Soil Types}
\usage{
read_soil_types_bg()
}
\description{
Function returns the types of soils present in the municipality of Bage
}
\examples{
\dontrun{
library(... |
#' Validate your data model
#'
#' This function returns a tibble with information about
#' which key constraints are met (`is_key = TRUE`) or violated (`FALSE`).
#' The printing for this object is special, use [as_tibble()]
#' to print as a regular tibble.
#'
#' @inheritParams dm_add_pk
#' @param progress Whether to di... | /R/examine-constraints.R | permissive | brancengregory/dm | R | false | false | 4,737 | r | #' Validate your data model
#'
#' This function returns a tibble with information about
#' which key constraints are met (`is_key = TRUE`) or violated (`FALSE`).
#' The printing for this object is special, use [as_tibble()]
#' to print as a regular tibble.
#'
#' @inheritParams dm_add_pk
#' @param progress Whether to di... |
# Load the libraries
library(arules)
library(arulesViz)
library(datasets)
# Load the data set
data("Groceries")
# See first 10 observations
head(Groceries, n=10)
#summarize whole data set
summary(Groceries)
# Show the top 20 ITEMS
inspect(Groceries[1 : 20])
# Create an item frequency plot for the top ... | /BE/Sem-1/CL 7/43320_Assignment_3.R | no_license | DevashishPrasad/BE-IT-assignments | R | false | false | 1,405 | r | # Load the libraries
library(arules)
library(arulesViz)
library(datasets)
# Load the data set
data("Groceries")
# See first 10 observations
head(Groceries, n=10)
#summarize whole data set
summary(Groceries)
# Show the top 20 ITEMS
inspect(Groceries[1 : 20])
# Create an item frequency plot for the top ... |
# Installing Packages
install.packages('data table')
install.packages('dplyr')
install.packages('ggplot2')
install.packages('corrplot')
install.packages('xgboost')
install.packages('cowplot')
install.packages('Hmisc')
# Loading Data
library(data.table)
library(dplyr)
library(ggplot2)
library(corrplot)... | /Black Friday.R | permissive | cRistiancec/Black-Friday | R | false | false | 5,336 | r | # Installing Packages
install.packages('data table')
install.packages('dplyr')
install.packages('ggplot2')
install.packages('corrplot')
install.packages('xgboost')
install.packages('cowplot')
install.packages('Hmisc')
# Loading Data
library(data.table)
library(dplyr)
library(ggplot2)
library(corrplot)... |
rowIndex <- 18 : 23
colIndex <- 7:15
dat <- read.xlsx("./data/natural_gas.xlsx", sheetIndex = 1, colIndex = colIndex, rowIndex = rowIndex, header = TRUE)
print(sum(dat$Zip*dat$Ext,na.rm=T)) | /Getting and Cleaning Data/Assighnment W1/Read_xlsx.R | no_license | rokbohinc86/2019.3.28.Data_Science-Specialization | R | false | false | 189 | r | rowIndex <- 18 : 23
colIndex <- 7:15
dat <- read.xlsx("./data/natural_gas.xlsx", sheetIndex = 1, colIndex = colIndex, rowIndex = rowIndex, header = TRUE)
print(sum(dat$Zip*dat$Ext,na.rm=T)) |
library(ggKaplanMeyer)
library(survival)
library(gtable)
library(grid)
library(ggplot2)
library(shinyjs)
library(colorspace)
ui <- shinyUI(fluidPage(
titlePanel("Kaplan-Meier with ggplot2"),
tabsetPanel(
tabPanel("Plot",
fluidRow(
column(4,
wellPanel(
... | /app.R | no_license | sor16/KaplanMeier | R | false | false | 6,244 | r | library(ggKaplanMeyer)
library(survival)
library(gtable)
library(grid)
library(ggplot2)
library(shinyjs)
library(colorspace)
ui <- shinyUI(fluidPage(
titlePanel("Kaplan-Meier with ggplot2"),
tabsetPanel(
tabPanel("Plot",
fluidRow(
column(4,
wellPanel(
... |
#' Helper function of cor_tbl
#' @param x a cor_tbl.
#' @return return attribute value.
#' @rdname get_attr
#' @examples
#' df <- fortify_cor(mtcars)
#' ## get rows names
#' get_row_name(df)
#'
#' ## get columns names
#' get_col_name(df)
#'
#' ## get show.diag parameter
#' get_show_diag(df)
#'
#' ## get type parameter
... | /R/cor-tbl-utils.R | no_license | Bmdistef/ggcor | R | false | false | 1,016 | r | #' Helper function of cor_tbl
#' @param x a cor_tbl.
#' @return return attribute value.
#' @rdname get_attr
#' @examples
#' df <- fortify_cor(mtcars)
#' ## get rows names
#' get_row_name(df)
#'
#' ## get columns names
#' get_col_name(df)
#'
#' ## get show.diag parameter
#' get_show_diag(df)
#'
#' ## get type parameter
... |
\name{MLA.freq}
\alias{MLA.freq}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Display a pretty frequency table
}
\description{Display a pretty frequency table. It is only a wrapper to the function \code{table}
but with a richer output, at least for numerical variables.
%% ~~ A concise (1-5 li... | /man/MLA.freq.Rd | no_license | marcellochiodi/packages | R | false | false | 1,167 | rd | \name{MLA.freq}
\alias{MLA.freq}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Display a pretty frequency table
}
\description{Display a pretty frequency table. It is only a wrapper to the function \code{table}
but with a richer output, at least for numerical variables.
%% ~~ A concise (1-5 li... |
vzestsest<-function(a){
delka<-length(a)
pom<-matrix(0,ncol=delka,nrow=1)
pom[1]<-1
pom[delka]<-1
for (i in 2:delka-1){
if ((a[i]+1)==a[i+1]){
pom[i]<-1
pom[i+1]<-1
}
else{}
}
return(pom)
}
| /R/vzestsest.R | no_license | VeronikaPel/Basic_function | R | false | false | 230 | r | vzestsest<-function(a){
delka<-length(a)
pom<-matrix(0,ncol=delka,nrow=1)
pom[1]<-1
pom[delka]<-1
for (i in 2:delka-1){
if ((a[i]+1)==a[i+1]){
pom[i]<-1
pom[i+1]<-1
}
else{}
}
return(pom)
}
|
install.packages("~/GitHub/sigex/", repos = NULL, type = "source")
library(sigex)
# list all functions from loading sigex package
ls("package:sigex")
lsf.str("package:sigex")
# Check which file has an error
for (f in list.files("~/GitHub/sigex/R/", full.names=TRUE)){
print(f)
parse(f)
}
| /tests/load_everything.R | no_license | palatej/sigex | R | false | false | 294 | r | install.packages("~/GitHub/sigex/", repos = NULL, type = "source")
library(sigex)
# list all functions from loading sigex package
ls("package:sigex")
lsf.str("package:sigex")
# Check which file has an error
for (f in list.files("~/GitHub/sigex/R/", full.names=TRUE)){
print(f)
parse(f)
}
|
## MLEw2_optim.r
## This is a direct implemenetation of the function calls made by package surv to calculate
## the MLE for the 2-parameter Weibull distribution. The key call is to stats::optim, which
## implements the Nelder-Mead Simplex algorithm to optimize for the two parameters simultaneously.
##
## (C) Jacob T.... | /pkgs/debias/R/MLEw2p_optim.r | no_license | thomas4912/pkgs | R | false | false | 1,854 | r | ## MLEw2_optim.r
## This is a direct implemenetation of the function calls made by package surv to calculate
## the MLE for the 2-parameter Weibull distribution. The key call is to stats::optim, which
## implements the Nelder-Mead Simplex algorithm to optimize for the two parameters simultaneously.
##
## (C) Jacob T.... |
# This script is for generating stacked barplots showing spread across trophic levels and EMPO for Waimea ASVs
# Sean Swift 10/20
library(ggplot2)
library(data.table)
library(ggpubr)
library(parallel)
# Set up environment -----------------
# get standardized colors for plotting ecological variables
source("../src/get... | /community_analyses/MM_9_stacked_barplot.R | no_license | soswift/waimea_microbe_paper | R | false | false | 5,678 | r | # This script is for generating stacked barplots showing spread across trophic levels and EMPO for Waimea ASVs
# Sean Swift 10/20
library(ggplot2)
library(data.table)
library(ggpubr)
library(parallel)
# Set up environment -----------------
# get standardized colors for plotting ecological variables
source("../src/get... |
require(R2jags)
dat<-dget('/home/evanadams/Desktop/GLC Phase 3 Analysis/GLC Phase 3 Analysis/Data for UBK/data_spp8_5km_up.glc')
#select a single species or species group
sppid <- 2 #set the species
#distclass and needed indices
newdc<-list()
newsegvisi<-list()
newgpsz<-list()
newdcl<-c()
for(i in 1:9){
newdc[[... | /glc_spp2_haz_run.R | no_license | evanmadams/GLC-Multiprotocol | R | false | false | 2,226 | r | require(R2jags)
dat<-dget('/home/evanadams/Desktop/GLC Phase 3 Analysis/GLC Phase 3 Analysis/Data for UBK/data_spp8_5km_up.glc')
#select a single species or species group
sppid <- 2 #set the species
#distclass and needed indices
newdc<-list()
newsegvisi<-list()
newgpsz<-list()
newdcl<-c()
for(i in 1:9){
newdc[[... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/stat-bindot.r
\name{stat_bindot}
\alias{stat_bindot}
\title{Bin data for dot plot.}
\usage{
stat_bindot(mapping = NULL, data = NULL, geom = "dotplot",
position = "identity", binwidth = NULL, origin = NULL, width = 0.9,
binaxis = "... | /man/stat_bindot.Rd | no_license | larkery/ggplot2 | R | false | false | 2,979 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/stat-bindot.r
\name{stat_bindot}
\alias{stat_bindot}
\title{Bin data for dot plot.}
\usage{
stat_bindot(mapping = NULL, data = NULL, geom = "dotplot",
position = "identity", binwidth = NULL, origin = NULL, width = 0.9,
binaxis = "... |
library(dplyr)
library(tidyr)
library(glue)
library(lubridate)
library(stringr)
library(data.table)
library(MatchIt)
library(cem)
load("vf_dataformatching.RData")
load("compet.Rdata")
## Repeating CEM with different specifications
## The one I used last - as was + majmatch
df_cutpoints <- list(
white = qu... | /R_working_archive/vf_matching_spectest.R | no_license | csjohns/pb-voter-turnout | R | false | false | 22,300 | r | library(dplyr)
library(tidyr)
library(glue)
library(lubridate)
library(stringr)
library(data.table)
library(MatchIt)
library(cem)
load("vf_dataformatching.RData")
load("compet.Rdata")
## Repeating CEM with different specifications
## The one I used last - as was + majmatch
df_cutpoints <- list(
white = qu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_params_init_values.R
\name{get_params_init_values}
\alias{get_params_init_values}
\title{Extract parameter initial values from prior information}
\usage{
get_params_init_values(prior_information)
}
\arguments{
\item{prior_information}{}
}... | /man/get_params_init_values.Rd | no_license | Chabrier/SticsOptimizR | R | false | true | 2,043 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_params_init_values.R
\name{get_params_init_values}
\alias{get_params_init_values}
\title{Extract parameter initial values from prior information}
\usage{
get_params_init_values(prior_information)
}
\arguments{
\item{prior_information}{}
}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fpemreporting.R
\name{get_estimated_counts}
\alias{get_estimated_counts}
\title{Get estimated population counts}
\usage{
get_estimated_counts(proportions, annual_country_population_counts)
}
\arguments{
\item{proportions}{`data.frame` Proport... | /man/get_estimated_counts.Rd | permissive | AlkemaLab/fpemlocal | R | false | true | 677 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fpemreporting.R
\name{get_estimated_counts}
\alias{get_estimated_counts}
\title{Get estimated population counts}
\usage{
get_estimated_counts(proportions, annual_country_population_counts)
}
\arguments{
\item{proportions}{`data.frame` Proport... |
rm(list=ls())
options(width=100)
library(ReplicationSuccess)
library(testthat)
library(dplyr)
## sapply(list.files("../R", pattern='\\.R$', full.names = TRUE), source)
## from new-formulas.R
sampleSizeSignificance2 <- function(zo,
power = NA,
d =... | /scratch/sampleSizeSignificance2_vs_sampleSizeSignificance.R | no_license | florafauna/RStest | R | false | false | 5,385 | r | rm(list=ls())
options(width=100)
library(ReplicationSuccess)
library(testthat)
library(dplyr)
## sapply(list.files("../R", pattern='\\.R$', full.names = TRUE), source)
## from new-formulas.R
sampleSizeSignificance2 <- function(zo,
power = NA,
d =... |
training.data.raw <-read.csv("C:/Users/Sujit pc/Desktop/R/LogisticRegression/Titanic_Train.csv",header = TRUE,na.strings = c(""))
sapply(training.data.raw, function(x) sum(is.na(x)))
sapply(training.data.raw, function(x) length(unique(x)))
library(Amelia)
missmap(training.data.raw,main="Missing Values Vs Observed")
dat... | /Code_titanic.R | no_license | sujitnv/R-codes | R | false | false | 2,200 | r | training.data.raw <-read.csv("C:/Users/Sujit pc/Desktop/R/LogisticRegression/Titanic_Train.csv",header = TRUE,na.strings = c(""))
sapply(training.data.raw, function(x) sum(is.na(x)))
sapply(training.data.raw, function(x) length(unique(x)))
library(Amelia)
missmap(training.data.raw,main="Missing Values Vs Observed")
dat... |
## Exploratory Data Analysis
## Course Project 2
## plot5.R
library(dplyr)
library(RColorBrewer)
library(ggplot2)
## Step 1 : Import data from RDS files
NEI <- readRDS("data/summarySCC_PM25.rds")
SCC <- readRDS("data/Source_Classification_Code.rds")
## Step 2 : Prepare the data in a summary dataframe that could be ... | /plot5.R | no_license | danbricedatascience/courseraexploratoryproject2 | R | false | false | 1,524 | r | ## Exploratory Data Analysis
## Course Project 2
## plot5.R
library(dplyr)
library(RColorBrewer)
library(ggplot2)
## Step 1 : Import data from RDS files
NEI <- readRDS("data/summarySCC_PM25.rds")
SCC <- readRDS("data/Source_Classification_Code.rds")
## Step 2 : Prepare the data in a summary dataframe that could be ... |
x<-read.csv("household_power_consumption.txt", header = T, sep = ";")
y <- subset(x, x$Date == "1/2/2007" | x$Date == "2/2/2007")
y$dt <- strptime(paste(y$Date, y$Time), "%d/%m/%Y %H:%M:%S")
Sys.setlocale(locale = "C")
png("plot3.png")
plot(x=(y$dt),y=y$Sub_metering_1,type="l",ylab="Energy sub metering",xlab="")
lin... | /plot3.r | no_license | mperusic/ExData_Plotting1 | R | false | false | 554 | r | x<-read.csv("household_power_consumption.txt", header = T, sep = ";")
y <- subset(x, x$Date == "1/2/2007" | x$Date == "2/2/2007")
y$dt <- strptime(paste(y$Date, y$Time), "%d/%m/%Y %H:%M:%S")
Sys.setlocale(locale = "C")
png("plot3.png")
plot(x=(y$dt),y=y$Sub_metering_1,type="l",ylab="Energy sub metering",xlab="")
lin... |
#Multiple Linear Regression - mtcars
mtcars # mtcars data set
dim(mtcars); names(mtcars)
#predict mpg for following data wt=c(2.5,3.5),cyl=c(4,6)
lmfit1 = lm(mpg ~ wt + cyl, data=mtcars)
summary(lmfit1)
#both are significant variables
attributes(summary(lmfit1))
summary(lmfit1)$adj.r.squared
#adjs R2 = .819
#head(m... | /19c-mtcars/13b-mtcars-lm1.R | no_license | sandy149/analytics | R | false | false | 507 | r | #Multiple Linear Regression - mtcars
mtcars # mtcars data set
dim(mtcars); names(mtcars)
#predict mpg for following data wt=c(2.5,3.5),cyl=c(4,6)
lmfit1 = lm(mpg ~ wt + cyl, data=mtcars)
summary(lmfit1)
#both are significant variables
attributes(summary(lmfit1))
summary(lmfit1)$adj.r.squared
#adjs R2 = .819
#head(m... |
prepare_ids <-
function(Ids, Data_dir){
if (is.null(Ids)){
if (substring(Data_dir, 1, 4)=="http"){
stop("Error. When loading data from a URL, Ids must be provided")
}else{ # Get list of files if Data_dir is not URL (i.e., local dir)
if (file.exists(Data_dir) ){
Ids = list.fil... | /R/prepare_ids.R | no_license | NBStephens/auto3dgm-fork | R | false | false | 776 | r | prepare_ids <-
function(Ids, Data_dir){
if (is.null(Ids)){
if (substring(Data_dir, 1, 4)=="http"){
stop("Error. When loading data from a URL, Ids must be provided")
}else{ # Get list of files if Data_dir is not URL (i.e., local dir)
if (file.exists(Data_dir) ){
Ids = list.fil... |
#######################################################################
##
## Demo : anchors.freedom3
## Author : Jonathan Wand <wand(at)stanford.edu>
## Created : 2007-02-07
##
## DESCRIPTION: Replication of Wand et al (2007)
## Figure 2 (4 variations on C using 3 vignettes)
##
## MODIFIED:
## 200... | /demo/anchors.freedom3.R | no_license | iqss-research/anchors | R | false | false | 1,339 | r | #######################################################################
##
## Demo : anchors.freedom3
## Author : Jonathan Wand <wand(at)stanford.edu>
## Created : 2007-02-07
##
## DESCRIPTION: Replication of Wand et al (2007)
## Figure 2 (4 variations on C using 3 vignettes)
##
## MODIFIED:
## 200... |
\name{sincfilter}
\alias{sincfilter}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
A function for sinc-interpolation
}
\description{
Performs sinc interpolation for a equidistant time series \code{x}
to times \code{t}.
}
\usage{
sincfilter(t, x, wr=8)
}
%- maybe also 'usage' for other objects d... | /man/sincfilter.Rd | no_license | cran/fmri | R | false | false | 1,124 | rd | \name{sincfilter}
\alias{sincfilter}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
A function for sinc-interpolation
}
\description{
Performs sinc interpolation for a equidistant time series \code{x}
to times \code{t}.
}
\usage{
sincfilter(t, x, wr=8)
}
%- maybe also 'usage' for other objects d... |
# ***************************************************************************************
# Library : timetk
# Function : slidify_vec
# Created on: 2021/8/14
# URL : https://business-science.github.io/timetk/reference/slidify_vec.html
# **************************************************************************... | /library/timetk/function/transform/slidify_vec.R | no_license | jimyanau/r-timeseries | R | false | false | 3,644 | r | # ***************************************************************************************
# Library : timetk
# Function : slidify_vec
# Created on: 2021/8/14
# URL : https://business-science.github.io/timetk/reference/slidify_vec.html
# **************************************************************************... |
## usethis namespace: start
#' @useDynLib hsbm, .registration = TRUE
#' @importFrom Rcpp sourceCpp
#' @importFrom foreach %dopar%
#' @importClassesFrom Matrix dgCMatrix
## usethis namespace: end
NULL
| /hsbm_package/R/hsbm-package.R | no_license | shizelong1985/hsbm | R | false | false | 200 | r | ## usethis namespace: start
#' @useDynLib hsbm, .registration = TRUE
#' @importFrom Rcpp sourceCpp
#' @importFrom foreach %dopar%
#' @importClassesFrom Matrix dgCMatrix
## usethis namespace: end
NULL
|
## Read some data from an AWS MySQL Instance ##
library(RMySQL)
mysql_host <- "gwu-workshop-mysql.cegeieiv8hqw.us-west-2.rds.amazonaws.com"
mysql_user <- "derrick"
mysql_pass <- ""
mysql_dbname <- "mydb"
mysql_port <- 3306
mydb = dbConnect(MySQL(),
user=mysql_user,
password=mysql_... | /r_scripts/mysql_read.R | no_license | DerrickStuckey/gwu-cloud-workshop | R | false | false | 862 | r | ## Read some data from an AWS MySQL Instance ##
library(RMySQL)
mysql_host <- "gwu-workshop-mysql.cegeieiv8hqw.us-west-2.rds.amazonaws.com"
mysql_user <- "derrick"
mysql_pass <- ""
mysql_dbname <- "mydb"
mysql_port <- 3306
mydb = dbConnect(MySQL(),
user=mysql_user,
password=mysql_... |
#===============================================================================================
###HELPER FUNCTIONS for SMOTE/undersampler analysis
#===============================================================================================
#modification of SMOTER.R function from Torgo et al. to: 1) utomaticall... | /Resampling/smoter_helper.R | no_license | oghenejokpeme/EFERUC | R | false | false | 7,270 | r | #===============================================================================================
###HELPER FUNCTIONS for SMOTE/undersampler analysis
#===============================================================================================
#modification of SMOTER.R function from Torgo et al. to: 1) utomaticall... |
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
addBacCpp <- function(occmat, orgdat, amount, growth, type, ptype) {
.Call('BacArena_addBacCpp', PACKAGE = 'BacArena', occmat, orgdat, amount, growth, type, ptype)
}
diffuseGrajdeanuCpp <- function(y, mu, ... | /BacArena/R/RcppExports.R | no_license | ingted/R-Examples | R | false | false | 681 | r | # This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
addBacCpp <- function(occmat, orgdat, amount, growth, type, ptype) {
.Call('BacArena_addBacCpp', PACKAGE = 'BacArena', occmat, orgdat, amount, growth, type, ptype)
}
diffuseGrajdeanuCpp <- function(y, mu, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rds_operations.R
\name{rds_describe_db_snapshot_attributes}
\alias{rds_describe_db_snapshot_attributes}
\title{Returns a list of DB snapshot attribute names and values for a manual DB
snapshot}
\usage{
rds_describe_db_snapshot_attributes(DBSn... | /cran/paws.database/man/rds_describe_db_snapshot_attributes.Rd | permissive | johnnytommy/paws | R | false | true | 1,294 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rds_operations.R
\name{rds_describe_db_snapshot_attributes}
\alias{rds_describe_db_snapshot_attributes}
\title{Returns a list of DB snapshot attribute names and values for a manual DB
snapshot}
\usage{
rds_describe_db_snapshot_attributes(DBSn... |
#' Resave a session
#'
#' @param ... symbols of objects
#' @param list a character vector of object names; unfortunately named
#' @param file the file to update
#'
#' @author Neal Fultz and
#' \href{http://stackoverflow.com/users/1201032/flodel}{flodel},
#' @references \url{http://stackoverflow.com/a/11813377/9867... | /R/resave.R | no_license | cran/stackoverflow | R | false | false | 643 | r | #' Resave a session
#'
#' @param ... symbols of objects
#' @param list a character vector of object names; unfortunately named
#' @param file the file to update
#'
#' @author Neal Fultz and
#' \href{http://stackoverflow.com/users/1201032/flodel}{flodel},
#' @references \url{http://stackoverflow.com/a/11813377/9867... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ctx-ops.R
\name{is_root}
\alias{is_root}
\title{Check, if the current node is root}
\usage{
is_root(ops_ptr)
}
\description{
Check, if the current node is root
}
| /man/is_root.Rd | permissive | krzjoa/aria | R | false | true | 240 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ctx-ops.R
\name{is_root}
\alias{is_root}
\title{Check, if the current node is root}
\usage{
is_root(ops_ptr)
}
\description{
Check, if the current node is root
}
|
#' Colorado State Demography Office ggplot2 Theme
#'
#' Custom \code{ggplot2} theme that borrows heavily from the
#'\code{theme_fivethirtyeight()} in ggthemes.
#'
#' @param base_size Base font size.
#' @param base_family Plot text font family.
theme_codemog <- function(base_size = 12, base_family = "sans"){
codem... | /R/graphs.R | no_license | robkemp/codemog | R | false | false | 5,135 | r | #' Colorado State Demography Office ggplot2 Theme
#'
#' Custom \code{ggplot2} theme that borrows heavily from the
#'\code{theme_fivethirtyeight()} in ggthemes.
#'
#' @param base_size Base font size.
#' @param base_family Plot text font family.
theme_codemog <- function(base_size = 12, base_family = "sans"){
codem... |
#' Rearranging list of simulated TCs
#'
#' @description
#' This function takes as an input the list of the simulated TCs, with a path
#' being a dataframe of (k x 2), where k is the number of points of the path.
#' The function selects the "center" TC in order to get the length of this path
#' k_0. This functions c... | /TCpredictionbands/R/bubble_functions.R | permissive | Mr8ND/TC-prediction-bands | R | false | false | 19,082 | r | #' Rearranging list of simulated TCs
#'
#' @description
#' This function takes as an input the list of the simulated TCs, with a path
#' being a dataframe of (k x 2), where k is the number of points of the path.
#' The function selects the "center" TC in order to get the length of this path
#' k_0. This functions c... |
library(shiny)
library(ggplot2)
library(dplyr)
library(shinythemes)
library(DT)
library(rsconnect)
bcl <- read.csv("bcl-data.csv", stringsAsFactors = FALSE)
ui <- fluidPage(
#add a theme selector so the user can decide what theme to view the app in
themeSelector(),
titlePanel("BC Liquor Store prices"... | /bcl/app.R | no_license | STAT545-UBC-hw-2018-19/hw08-ecool50 | R | false | false | 2,172 | r | library(shiny)
library(ggplot2)
library(dplyr)
library(shinythemes)
library(DT)
library(rsconnect)
bcl <- read.csv("bcl-data.csv", stringsAsFactors = FALSE)
ui <- fluidPage(
#add a theme selector so the user can decide what theme to view the app in
themeSelector(),
titlePanel("BC Liquor Store prices"... |
#----Generate matrix----
a = matrix(c(2,1,3,3),2,2,byrow = T)
#----Get eigenvals and eigenvectors----
vals = eigen(a)
#----Product----
vals$values[1]*vals$vectors[,1]
#----You would get the same thing if you multiplied with the matrix-----
a%*%vals$vectors[,1] # So these are the same!!
#----Actual proj matrix----
a... | /EigenValsIntro.R | no_license | GatesDupont/NTRES4100-AdvancedConservationBiology | R | false | false | 416 | r | #----Generate matrix----
a = matrix(c(2,1,3,3),2,2,byrow = T)
#----Get eigenvals and eigenvectors----
vals = eigen(a)
#----Product----
vals$values[1]*vals$vectors[,1]
#----You would get the same thing if you multiplied with the matrix-----
a%*%vals$vectors[,1] # So these are the same!!
#----Actual proj matrix----
a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_plots.R
\name{plot_distribution}
\alias{plot_distribution}
\title{plot_distribution()}
\usage{
plot_distribution(df)
}
\arguments{
\item{df}{data.frame: Name of the data frame containing NWEA data}
}
\value{
ggplot
}
\description{
plot ... | /man/plot_distribution.Rd | no_license | thelayc/laycca | R | false | true | 358 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_plots.R
\name{plot_distribution}
\alias{plot_distribution}
\title{plot_distribution()}
\usage{
plot_distribution(df)
}
\arguments{
\item{df}{data.frame: Name of the data frame containing NWEA data}
}
\value{
ggplot
}
\description{
plot ... |
# TODO: fix mvar_cycle so that it picks up sales more quickly! (I think)
# - scale av in year1 to pct of mv in year1
# - acqval portable
# -
#****************************************************************************************************
# setup ####
#********************************************... | /proptax_sim(14).r | no_license | donboyd5/LILP_PropertyTaxInstitutions | R | false | false | 16,175 | r |
# TODO: fix mvar_cycle so that it picks up sales more quickly! (I think)
# - scale av in year1 to pct of mv in year1
# - acqval portable
# -
#****************************************************************************************************
# setup ####
#********************************************... |
# auth: christian bitter
# desc: risk of two assets, manual approach
rm(list = ls());
library(dplyr);
library(ggplot2);
library(lubridate);
library(tidyquant);
source("inst/examples/AFDaIFMUR/common.R");
# In the case of a two-asset portfolio
# the risk - here variance can be calculated as
# sigma2_p = w1^2 * sigma... | /inst/examples/AFDaIFMUR/ADaIFMUR_0403_-_two_assets.R | no_license | christianbitter/cbFinance | R | false | false | 2,043 | r | # auth: christian bitter
# desc: risk of two assets, manual approach
rm(list = ls());
library(dplyr);
library(ggplot2);
library(lubridate);
library(tidyquant);
source("inst/examples/AFDaIFMUR/common.R");
# In the case of a two-asset portfolio
# the risk - here variance can be calculated as
# sigma2_p = w1^2 * sigma... |
rm(list=ls())
library(forecast)
library(wpp2015)
library(tidyverse)
## Pull data sources from wpp2015
data(mxF)
## Only look at Mexico
DF <- subset(as_tibble(mxF), country == "Mexico",
select=c("age", "2005-2010"))
# get the age group names
DF$age <- as.numeric(as.character(DF$age))
# pull the mxt data f... | /week6/LCrecode.R | no_license | nmmarquez/statdemog | R | false | false | 6,114 | r | rm(list=ls())
library(forecast)
library(wpp2015)
library(tidyverse)
## Pull data sources from wpp2015
data(mxF)
## Only look at Mexico
DF <- subset(as_tibble(mxF), country == "Mexico",
select=c("age", "2005-2010"))
# get the age group names
DF$age <- as.numeric(as.character(DF$age))
# pull the mxt data f... |
# Functionn to create plot 1
createPlot1<-function(){
# Load Data
hpc <- read.table("ExData_Plotting1/household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?")
# Format date
hpc$Date <- as.Date(hpc$Date, "%d/%m/%Y")
# Filter date
hpc <- subset(hpc,Date >= as.Date("2007-2-1") & Date <= ... | /plot1.R | no_license | azamah/ExData_Plotting1 | R | false | false | 636 | r | # Functionn to create plot 1
createPlot1<-function(){
# Load Data
hpc <- read.table("ExData_Plotting1/household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?")
# Format date
hpc$Date <- as.Date(hpc$Date, "%d/%m/%Y")
# Filter date
hpc <- subset(hpc,Date >= as.Date("2007-2-1") & Date <= ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitted.BayesSUR.R
\name{fitted.BayesSUR}
\alias{fitted.BayesSUR}
\title{fitted response values corresponds to the posterior mean estimates}
\usage{
\method{fitted}{BayesSUR}(object, Pmax = 0, ...)
}
\arguments{
\item{object}{an object of clas... | /man/fitted.BayesSUR.Rd | no_license | LfeiXie/BayesSUR | R | false | true | 1,282 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fitted.BayesSUR.R
\name{fitted.BayesSUR}
\alias{fitted.BayesSUR}
\title{fitted response values corresponds to the posterior mean estimates}
\usage{
\method{fitted}{BayesSUR}(object, Pmax = 0, ...)
}
\arguments{
\item{object}{an object of clas... |
################
#Bayesian analysis
#Fitting my data to the class examples
################
library(dplyr)
library(readr)
library(R2jags)
library(coda)
library(broom.mixed)
water <- read_csv("September2018 MeHgFieldresults.csv")
## BMB: NOT reproducible. you seem to have log-transformed variables?
##I ... | /assignment7/Bayesian.R | no_license | negrazi/QMEE | R | false | false | 3,568 | r | ################
#Bayesian analysis
#Fitting my data to the class examples
################
library(dplyr)
library(readr)
library(R2jags)
library(coda)
library(broom.mixed)
water <- read_csv("September2018 MeHgFieldresults.csv")
## BMB: NOT reproducible. you seem to have log-transformed variables?
##I ... |
library(ggplot2)
library(scales)
library(stringr)
library(gridExtra)
library(gtable)
library(grid)
# Composition of clusters/tissues
clus_tis <- read.csv("clus_tis_df.csv")
tissue_cols <- c('#d62728', # blood
'#279e68', # brain
'#964B00', # colon
'#ff00ef', # decidu... | /plots.R | no_license | Sarah145/MSc_Project | R | false | false | 10,886 | r | library(ggplot2)
library(scales)
library(stringr)
library(gridExtra)
library(gtable)
library(grid)
# Composition of clusters/tissues
clus_tis <- read.csv("clus_tis_df.csv")
tissue_cols <- c('#d62728', # blood
'#279e68', # brain
'#964B00', # colon
'#ff00ef', # decidu... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <- NULL
}
get <- function() x
set_inverse <- function(inverse) m <<- inverse
ge... | /cachematrix.R | no_license | karankishore007/ProgrammingAssignment2 | R | false | false | 751 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <- NULL
}
get <- function() x
set_inverse <- function(inverse) m <<- inverse
ge... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility_Functions.R
\name{get_parOffInfo}
\alias{get_parOffInfo}
\title{Get parent and offspring information from a pedigree}
\usage{
get_parOffInfo(ped_file)
}
\arguments{
\item{ped_file}{Data.frame. The pedigree file, must have same format ... | /man/get_parOffInfo.Rd | no_license | simrvprojects/SimRVSequences | R | false | true | 557 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utility_Functions.R
\name{get_parOffInfo}
\alias{get_parOffInfo}
\title{Get parent and offspring information from a pedigree}
\usage{
get_parOffInfo(ped_file)
}
\arguments{
\item{ped_file}{Data.frame. The pedigree file, must have same format ... |
make_table_2 <- function(model, model_moderator, width) {
model_table_1 <- make_table_2_part(model = model, width = width)
model_table_2 <- make_table_2_part(model = model_moderator, width = width)
full_table <- model_table_1 %>%
dplyr::full_join(
model_table_2,
by = c("gender", "variable"... | /R/make_table_2.R | no_license | antonkalen/basketball-selection-strategy | R | false | false | 1,993 | r | make_table_2 <- function(model, model_moderator, width) {
model_table_1 <- make_table_2_part(model = model, width = width)
model_table_2 <- make_table_2_part(model = model_moderator, width = width)
full_table <- model_table_1 %>%
dplyr::full_join(
model_table_2,
by = c("gender", "variable"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EnvironmentSnapshot.R
\name{createRenvLockFile}
\alias{createRenvLockFile}
\title{Create a renv lock file}
\usage{
createRenvLockFile(
rootPackage,
ohdsiGitHubPackages = getOhdsiGitHubPackages(),
ohdsiStudiesGitHubPackages = rootPackage... | /man/createRenvLockFile.Rd | permissive | robertn01/OhdsiRTools | R | false | true | 1,148 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EnvironmentSnapshot.R
\name{createRenvLockFile}
\alias{createRenvLockFile}
\title{Create a renv lock file}
\usage{
createRenvLockFile(
rootPackage,
ohdsiGitHubPackages = getOhdsiGitHubPackages(),
ohdsiStudiesGitHubPackages = rootPackage... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/math_stat_analysis.R
\name{wbt_to_radians}
\alias{wbt_to_radians}
\title{To radians}
\usage{
wbt_to_radians(
input,
output,
wd = NULL,
verbose_mode = FALSE,
compress_rasters = FALSE
)
}
\arguments{
\item{input}{Input raster file.}
... | /man/wbt_to_radians.Rd | permissive | dondealban/whiteboxR | R | false | true | 727 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/math_stat_analysis.R
\name{wbt_to_radians}
\alias{wbt_to_radians}
\title{To radians}
\usage{
wbt_to_radians(
input,
output,
wd = NULL,
verbose_mode = FALSE,
compress_rasters = FALSE
)
}
\arguments{
\item{input}{Input raster file.}
... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/lda.r
\name{prepare.plot.values}
\alias{prepare.plot.values}
\title{Prepares the topic values per document for plotting}
\usage{
prepare.plot.values(m, break_var, topic_nr, pct = F, value = "relative",
filter = NULL)
}
\arguments{
\... | /man/prepare.plot.values.Rd | permissive | kasperwelbers/corpus-tools | R | false | false | 738 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/lda.r
\name{prepare.plot.values}
\alias{prepare.plot.values}
\title{Prepares the topic values per document for plotting}
\usage{
prepare.plot.values(m, break_var, topic_nr, pct = F, value = "relative",
filter = NULL)
}
\arguments{
\... |
.libPaths(new="~/R")
rm(list=ls())
setwd("~/hdi_simu")
require(mvnfast)
source("path_related.R")
source("path_power.R")
source("path_resample.R")
source("NetTS.R")
source("NetResampleTS.R")
source("NetResampleLogisticTS.R")
require(LOCOpath)
# source("~/hdi_path/bin/pathwise_power.R")
###########################... | /slurm_cluster_code/pc_power_simu_multi_log.R | no_license | devcao/LOCOpath_repo | R | false | false | 3,031 | r | .libPaths(new="~/R")
rm(list=ls())
setwd("~/hdi_simu")
require(mvnfast)
source("path_related.R")
source("path_power.R")
source("path_resample.R")
source("NetTS.R")
source("NetResampleTS.R")
source("NetResampleLogisticTS.R")
require(LOCOpath)
# source("~/hdi_path/bin/pathwise_power.R")
###########################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataSets.R
\docType{data}
\name{eusilcS}
\alias{eusilcS}
\title{Synthetic EU-SILC survey data}
\format{A data frame with 11725 observations on the following 18 variables.
\describe{ \item{db030}{integer; the household ID.}
\item{hsize}{intege... | /man/eusilcS.Rd | no_license | thijsbenschop/simPop | R | false | true | 3,218 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataSets.R
\docType{data}
\name{eusilcS}
\alias{eusilcS}
\title{Synthetic EU-SILC survey data}
\format{A data frame with 11725 observations on the following 18 variables.
\describe{ \item{db030}{integer; the household ID.}
\item{hsize}{intege... |
#MATRIZ COMPRA MUCHO RECOMENDADOR
# Establecer mecanismo de evaluacion compra mucho --------------------------------------
set.seed(456)
matriz_recomendacion <- as.matrix(matriz_recomendacion_mucho)
matriz_recomendacion <- as(matriz_recomendacion,"realRatingMatrix")
matriz_recomendacion #1435 x 57 rating matrix of cl... | /Scripts/compra_mucho_3.R | no_license | nereabarrueta/RETO4 | R | false | false | 9,924 | r | #MATRIZ COMPRA MUCHO RECOMENDADOR
# Establecer mecanismo de evaluacion compra mucho --------------------------------------
set.seed(456)
matriz_recomendacion <- as.matrix(matriz_recomendacion_mucho)
matriz_recomendacion <- as(matriz_recomendacion,"realRatingMatrix")
matriz_recomendacion #1435 x 57 rating matrix of cl... |
# Script to process pulse gating data from HANDS experiment
# By Sandra Tamm
# Modified by Gustav Nilsonne 2015-12-19
# Adapted for the FACES experiment 2018-08-06
setwd("~/Box Sync/Sleepy Brain/Datafiles")
# Import pulse gating data
PgDataFACES <- read.csv("HR/PgDataFACESSessionInfo.csv", sep=";")
#Generate a colum... | /FACES/Heart_rate_Faces/PgDataFACESTime.R | no_license | AnJK13/SleepyBrain-Analyses | R | false | false | 3,507 | r | # Script to process pulse gating data from HANDS experiment
# By Sandra Tamm
# Modified by Gustav Nilsonne 2015-12-19
# Adapted for the FACES experiment 2018-08-06
setwd("~/Box Sync/Sleepy Brain/Datafiles")
# Import pulse gating data
PgDataFACES <- read.csv("HR/PgDataFACESSessionInfo.csv", sep=";")
#Generate a colum... |
# instalando os pacotes ####
install.packages('funModeling')
install.packages('tidyverse')
# script do professor ####
library(funModeling)
library(tidyverse)
glimpse(iris) # olhada nos dados
status(iris) # estrutura dos dados (missing etc)
freq(iris) # frequência das variáveis fator
plot_num(iris) # exploração das ... | /scripts/descoberta.R | no_license | ullerafaga/EletivaAnaliseDeDados | R | false | false | 644 | r | # instalando os pacotes ####
install.packages('funModeling')
install.packages('tidyverse')
# script do professor ####
library(funModeling)
library(tidyverse)
glimpse(iris) # olhada nos dados
status(iris) # estrutura dos dados (missing etc)
freq(iris) # frequência das variáveis fator
plot_num(iris) # exploração das ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/traffic_history.R
\name{traffic_history}
\alias{traffic_history}
\title{Get Traffic History of a URL}
\usage{
traffic_history(url = NULL, range = 31, start = NULL, ...)
}
\arguments{
\item{url}{String; Required; valid url}
\item{r... | /man/traffic_history.Rd | permissive | cran/aws.alexa | R | false | true | 991 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/traffic_history.R
\name{traffic_history}
\alias{traffic_history}
\title{Get Traffic History of a URL}
\usage{
traffic_history(url = NULL, range = 31, start = NULL, ...)
}
\arguments{
\item{url}{String; Required; valid url}
\item{r... |
#
# ggdendro/R/dendro_rpart.R by Andrie de Vries and Brian Ripley Copyright (C) 2011-2013
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or 3 of the License
# (at your o... | /R/rpart.R | no_license | chr1swallace/ggdendro | R | false | false | 16,505 | r | #
# ggdendro/R/dendro_rpart.R by Andrie de Vries and Brian Ripley Copyright (C) 2011-2013
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 or 3 of the License
# (at your o... |
#' Plot Kaplan-Meier Curve for Existing Tidy Survival Object
#'
#' TODO: Define and describe the purpose of this function.
#'
#' @param broom_object An object via broom
#' @param title = ""
#' @param abbreviations = NULL
#' @param variable_definitions = NULL
#' @param N = NULL
#' @param N_unit = "patients"
#' @param ti... | /R/vr_plt_kaplan_meier.R | permissive | Dhitebayu/visR | R | false | false | 2,871 | r | #' Plot Kaplan-Meier Curve for Existing Tidy Survival Object
#'
#' TODO: Define and describe the purpose of this function.
#'
#' @param broom_object An object via broom
#' @param title = ""
#' @param abbreviations = NULL
#' @param variable_definitions = NULL
#' @param N = NULL
#' @param N_unit = "patients"
#' @param ti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sow.R
\name{sow}
\alias{sow}
\title{Ascend Innovations Statement of Work}
\source{
Literally copied the format of the Ascend Innovations SOW
}
\usage{
sow(
...,
keep_tex = FALSE,
md_extensions = c("-autolink_bare_uris"),
fig_caption =... | /man/sow.Rd | no_license | Auburngrads/Ascend | R | false | true | 1,394 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sow.R
\name{sow}
\alias{sow}
\title{Ascend Innovations Statement of Work}
\source{
Literally copied the format of the Ascend Innovations SOW
}
\usage{
sow(
...,
keep_tex = FALSE,
md_extensions = c("-autolink_bare_uris"),
fig_caption =... |
# Coin flipping demo (discrete probability distribution example)
par(mfrow=c(3,2), mar = c(2.1, 2.1, 2.1, 1.1))
plot(0:1, dbinom(0:1, 1, 0.5), type='h', ylim = c(0, 1), lwd = 2)
plot(0:2, dbinom(0:2, 2, 0.5), type='h', ylim = c(0, 1), lwd = 2)
plot(0:3, dbinom(0:3, 3, 0.5), type='h', ylim = c(0, 1), lwd = 2)
plot(0:4, ... | /sandbox/ams5_16_17.R | no_license | mickwar/r-sandbox | R | false | false | 3,442 | r | # Coin flipping demo (discrete probability distribution example)
par(mfrow=c(3,2), mar = c(2.1, 2.1, 2.1, 1.1))
plot(0:1, dbinom(0:1, 1, 0.5), type='h', ylim = c(0, 1), lwd = 2)
plot(0:2, dbinom(0:2, 2, 0.5), type='h', ylim = c(0, 1), lwd = 2)
plot(0:3, dbinom(0:3, 3, 0.5), type='h', ylim = c(0, 1), lwd = 2)
plot(0:4, ... |
library(tidyverse)
library(caret)
library(skimr)
library(RANN)
library(rpart)
library(rpart.plot)
library(randomForest)
library(party)
app_store_df <- read.csv("../Data/AppleStore.csv")
app_store_df <- mutate(app_store_df, size_mb = size_bytes/1000000)
app_store_df <- mutate(app_store_df, is_free = price == 0)
app_sto... | /Rcode/CreateOtherModels.R | no_license | active-classes/ds-201-project-HarshdeepKahlon | R | false | false | 1,375 | r | library(tidyverse)
library(caret)
library(skimr)
library(RANN)
library(rpart)
library(rpart.plot)
library(randomForest)
library(party)
app_store_df <- read.csv("../Data/AppleStore.csv")
app_store_df <- mutate(app_store_df, size_mb = size_bytes/1000000)
app_store_df <- mutate(app_store_df, is_free = price == 0)
app_sto... |
##
## Constructing cov(R_i,R_j)/pi^*_ij, or \check{\check{\Delta}}_ij in Sarndal's notation
## We use this form because it can be sparse and because it is easy to combine
## multistage and multiphase sampling.
##
Dcheck_strat<-function(strata, prob){
strata<-as.numeric(strata) ## for ave()
n<-length(strata)
... | /R/twophase2.R | no_license | capucciov/survey | R | false | false | 21,919 | r | ##
## Constructing cov(R_i,R_j)/pi^*_ij, or \check{\check{\Delta}}_ij in Sarndal's notation
## We use this form because it can be sparse and because it is easy to combine
## multistage and multiphase sampling.
##
Dcheck_strat<-function(strata, prob){
strata<-as.numeric(strata) ## for ave()
n<-length(strata)
... |
#' Prints a nordpred estimate object
#'
#' \code{print.nordpred.estimate} prints the estimation information from a
#' \code{nordpred.estimate} object (see \code{\link{nordpred.estimate.object}}).
#'
#' @param x An object of class \code{nordpred.estimate}
#' (see \code{\link{nordpred.estimate.object}}).
#' @param ... | /R/print.nordpred.estimate.R | no_license | ondiekhann/nordpred | R | false | false | 2,655 | r |
#' Prints a nordpred estimate object
#'
#' \code{print.nordpred.estimate} prints the estimation information from a
#' \code{nordpred.estimate} object (see \code{\link{nordpred.estimate.object}}).
#'
#' @param x An object of class \code{nordpred.estimate}
#' (see \code{\link{nordpred.estimate.object}}).
#' @param ... |
## Plot 01
alldata<-file("./data/household_power_consumption.txt","r");
plotdata<-read.table(text = grep("^[1,2]/2/2007",readLines(alldata),value=TRUE),sep=";",
col.names=c("Date", "Time","Global_active_power","Global_reactive_power",
"Voltage","Global_intensity",... | /plot1.R | no_license | BenMur01/ExData_Plotting1 | R | false | false | 648 | r | ## Plot 01
alldata<-file("./data/household_power_consumption.txt","r");
plotdata<-read.table(text = grep("^[1,2]/2/2007",readLines(alldata),value=TRUE),sep=";",
col.names=c("Date", "Time","Global_active_power","Global_reactive_power",
"Voltage","Global_intensity",... |
#' Summarize Arrays
#'
#' The function calculates summary statistics from arbitrary arrays.
#'
#' @param x Object to summarize which can be a numerical vector, matrix or a multi-dimensional array
#' @param min.max Enables to include minimum and maximum in the output.
#' @param n.sim Enables to include the number of obs... | /fuzzedpackages/RBesT/R/SimSum.R | no_license | akhikolla/testpackages | R | false | false | 1,681 | r | #' Summarize Arrays
#'
#' The function calculates summary statistics from arbitrary arrays.
#'
#' @param x Object to summarize which can be a numerical vector, matrix or a multi-dimensional array
#' @param min.max Enables to include minimum and maximum in the output.
#' @param n.sim Enables to include the number of obs... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/allBAF_FDR.R
\name{allBAF_FDR}
\alias{allBAF_FDR}
\title{Function to calculate the FDR and p-value from the BAF data}
\usage{
allBAF_FDR(data, epsilon_cut = 0.52, ...)
}
\arguments{
\item{data}{Data must be a GRanges object with several meta-... | /TCN/man/allBAF_FDR.Rd | no_license | constantAmateur/TargetedCN | R | false | true | 1,597 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/allBAF_FDR.R
\name{allBAF_FDR}
\alias{allBAF_FDR}
\title{Function to calculate the FDR and p-value from the BAF data}
\usage{
allBAF_FDR(data, epsilon_cut = 0.52, ...)
}
\arguments{
\item{data}{Data must be a GRanges object with several meta-... |
########## 00-master.R ##########
# This is the master program which executes all the others
cat("\014")
rm(list = ls())
source(file.path("set-up.R"), echo = TRUE)
source(file.path("R", "01-download-data.R"), echo = TRUE)
source(file.path("R", "02-import-xml.R"), echo = TRUE)
source(file.path("R", "03-set-column... | /R/00-master.R | no_license | cavrilionis/vehicle-registration-lux | R | false | false | 506 | r |
########## 00-master.R ##########
# This is the master program which executes all the others
cat("\014")
rm(list = ls())
source(file.path("set-up.R"), echo = TRUE)
source(file.path("R", "01-download-data.R"), echo = TRUE)
source(file.path("R", "02-import-xml.R"), echo = TRUE)
source(file.path("R", "03-set-column... |
#' @rdname ft_string_indexer
#' @param labels Vector of labels, corresponding to indices to be assigned.
#' @export
ft_string_indexer_model <- function(x, input_col = NULL, output_col = NULL, labels,
handle_invalid = "error",
uid = random_string("s... | /R/ml_feature_string_indexer_model.R | permissive | awblocker/sparklyr | R | false | false | 2,543 | r | #' @rdname ft_string_indexer
#' @param labels Vector of labels, corresponding to indices to be assigned.
#' @export
ft_string_indexer_model <- function(x, input_col = NULL, output_col = NULL, labels,
handle_invalid = "error",
uid = random_string("s... |
#################################################################
# Statistics 133, Lecture 2, Spring 2015
# Final Exam, Monday May 11th, 11:30 am - 14:30 pm
# Please read all instructions carefully.
#################################################################
# IMPORTANT
# Enter your personal information here, b... | /final-feiw50hj/final.R | no_license | johnasir/stat133 | R | false | false | 14,654 | r | #################################################################
# Statistics 133, Lecture 2, Spring 2015
# Final Exam, Monday May 11th, 11:30 am - 14:30 pm
# Please read all instructions carefully.
#################################################################
# IMPORTANT
# Enter your personal information here, b... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ppi_tools.R
\name{plot_mwcs}
\alias{plot_mwcs}
\title{plots heat-mapped module}
\usage{
plot_mwcs(g, pps, log_space = TRUE, colors = 16)
}
\arguments{
\item{g}{igraph network}
\item{pps}{named vector of some posterior probabilies}
\item{log... | /man/plot_mwcs.Rd | no_license | alexloboda/PPItools | R | false | true | 461 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ppi_tools.R
\name{plot_mwcs}
\alias{plot_mwcs}
\title{plots heat-mapped module}
\usage{
plot_mwcs(g, pps, log_space = TRUE, colors = 16)
}
\arguments{
\item{g}{igraph network}
\item{pps}{named vector of some posterior probabilies}
\item{log... |
\name{curlOptions}
\alias{curlOptions}
\alias{getCurlOptionsConstants}
\alias{getCurlOptionTypes}
\alias{listCurlOptions}
\alias{mapCurlOptNames}
\alias{[<-.CURLOptions}
\alias{[[<-.CURLOptions}
\title{Constructor and accessors for CURLOptions objects}
\description{
These functions provide a constructor
and accesso... | /man/curlOptions.Rd | no_license | cran/RCurl | R | false | false | 3,813 | rd | \name{curlOptions}
\alias{curlOptions}
\alias{getCurlOptionsConstants}
\alias{getCurlOptionTypes}
\alias{listCurlOptions}
\alias{mapCurlOptNames}
\alias{[<-.CURLOptions}
\alias{[[<-.CURLOptions}
\title{Constructor and accessors for CURLOptions objects}
\description{
These functions provide a constructor
and accesso... |
library("magrittr")
# function that works with pipelines
# left side of `%>%` becomes first parameter of function
subsamp_rows <- function(d, n) {
rows <- sample(nrow(d), n)
d[rows,]
}
d <- data.frame(x=rnorm(100), y=rnorm(100))
d %>% subsamp_rows(n=3)
d <- data.frame(x=rnorm(100), y=rnorm(100))
d %>% lm(y ~... | /pipeline.R | no_license | olk/examples_R | R | false | false | 1,834 | r | library("magrittr")
# function that works with pipelines
# left side of `%>%` becomes first parameter of function
subsamp_rows <- function(d, n) {
rows <- sample(nrow(d), n)
d[rows,]
}
d <- data.frame(x=rnorm(100), y=rnorm(100))
d %>% subsamp_rows(n=3)
d <- data.frame(x=rnorm(100), y=rnorm(100))
d %>% lm(y ~... |
# Set up data. Severity will provide the labels, pre is the pre-drought mean (i.e., point estimate), post is the post-drought mean. lowerCIpre and upperCIpre are the lower and upper bounds of the 95% confidence intervals for the pre-drought data, lowerCIpost and upperCIpost are the same for the post-drought data. If I ... | /climateBinYoY-errorbars.r | no_license | jscarlton/dotplotComparisons | R | false | false | 4,709 | r | # Set up data. Severity will provide the labels, pre is the pre-drought mean (i.e., point estimate), post is the post-drought mean. lowerCIpre and upperCIpre are the lower and upper bounds of the 95% confidence intervals for the pre-drought data, lowerCIpost and upperCIpost are the same for the post-drought data. If I ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.