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 |
|---|---|---|---|---|---|---|---|---|---|
setwd("~/sync/cw-race/figures")
### For forest plot of results
### ent and inst models
### Depends on model output from FCmodels.r in working environment (objects ent.results, inst.results)
library(ggplot2)
library(dplyr)
#source("~/Dropbox/cw-race/sim.R")
###merged results from Rubin combination - alt using posterior... | /cw-forest.r | no_license | f-edwards/cw-race | R | false | false | 3,298 | r | setwd("~/sync/cw-race/figures")
### For forest plot of results
### ent and inst models
### Depends on model output from FCmodels.r in working environment (objects ent.results, inst.results)
library(ggplot2)
library(dplyr)
#source("~/Dropbox/cw-race/sim.R")
###merged results from Rubin combination - alt using posterior... |
#' @useDynLib crestree
NULL
##' Sample pptree objects using different seeds
##' @param n.samples a number of seed samplings.
##' @param seeds a vector of seeds to use. Overwrites n.samples.
##' @return a list of pptree objects
##' @export
mppt.tree <- function( ... , n.cores=parallel::detectCores()/2,n.samples=n.core... | /R/crestree.functions.R | no_license | hms-dbmi/crestree | R | false | false | 61,222 | r | #' @useDynLib crestree
NULL
##' Sample pptree objects using different seeds
##' @param n.samples a number of seed samplings.
##' @param seeds a vector of seeds to use. Overwrites n.samples.
##' @return a list of pptree objects
##' @export
mppt.tree <- function( ... , n.cores=parallel::detectCores()/2,n.samples=n.core... |
rm(list = ls())
library(plyr)
library(tidyverse)
library(data.table)
library(lpa.mi.src)
library(mice)
library(dplyr)
library(doParallel)
library(foreach)
library(doRNG)
require(snow)
require(doSNOW)
require(foreach)
require(pbapply)
computer_name = "MC1"
Processors = 10
z_vec = 1:40
# Directories
dropbox_wd = "D:/... | /stage6-classification-accuracy/archieve/ver1/MC1-stage6-classification-accuracy.R | no_license | marcus-waldman/lpa-mi-impute | R | false | false | 7,757 | r | rm(list = ls())
library(plyr)
library(tidyverse)
library(data.table)
library(lpa.mi.src)
library(mice)
library(dplyr)
library(doParallel)
library(foreach)
library(doRNG)
require(snow)
require(doSNOW)
require(foreach)
require(pbapply)
computer_name = "MC1"
Processors = 10
z_vec = 1:40
# Directories
dropbox_wd = "D:/... |
#' Quality control samples (QCs) checking
#'
#' Quality control samples (QCs) are checked to data irregularities. It is used for data from untargeted metabolomic analysis.
#' @param data Data table with variables (metabolites) in columns. Samples in rows are sorted according to specific groups.
#' @param name A charact... | /R/bigQC.R | no_license | AlzbetaG/Metabol | R | false | false | 5,909 | r | #' Quality control samples (QCs) checking
#'
#' Quality control samples (QCs) are checked to data irregularities. It is used for data from untargeted metabolomic analysis.
#' @param data Data table with variables (metabolites) in columns. Samples in rows are sorted according to specific groups.
#' @param name A charact... |
# CONSTANTS DEFINITIONS
date_col <- 'datetime'
data_url <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip'
downloaded_file <- 'data.zip'
date_format <- "%d/%m/%Y %H:%M:%S"
file_name <- 'household_power_consumption.txt'
begin <- "1/2/2007 00:00:00"
end <- "3/2/2007 00:00:00"
par... | /plot2.R | no_license | JorgeMonforte/ExData_Plotting1 | R | false | false | 2,988 | r |
# CONSTANTS DEFINITIONS
date_col <- 'datetime'
data_url <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip'
downloaded_file <- 'data.zip'
date_format <- "%d/%m/%Y %H:%M:%S"
file_name <- 'household_power_consumption.txt'
begin <- "1/2/2007 00:00:00"
end <- "3/2/2007 00:00:00"
par... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/requests.R
\name{functional_annotation}
\alias{functional_annotation}
\title{Retrieving functional annotation}
\source{
https://string-db.org/cgi/help.pl?subpage=api%23retrieving-functional-annotation
}
\usage{
functional_annotation(identifie... | /man/functional_annotation.Rd | no_license | abifromr/stringapi | R | false | true | 1,870 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/requests.R
\name{functional_annotation}
\alias{functional_annotation}
\title{Retrieving functional annotation}
\source{
https://string-db.org/cgi/help.pl?subpage=api%23retrieving-functional-annotation
}
\usage{
functional_annotation(identifie... |
# context = NULL means no context
get_features_for_continuations <- function(funs,
context,
continuations,
force_vectorise = TRUE) {
purrr::map(funs,
get_feature_for_continuati... | /R/analyse-continuations.R | permissive | pmcharrison/voicer | R | false | false | 2,040 | r | # context = NULL means no context
get_features_for_continuations <- function(funs,
context,
continuations,
force_vectorise = TRUE) {
purrr::map(funs,
get_feature_for_continuati... |
### formula helper
.parseformula <- function(formula, data) {
formula <- as.formula(formula)
vars <- all.vars(formula)
### class
# for transactions, class can match multiple items!
class <- vars[1]
if(is(data, "itemMatrix")) {
class_ids <- which(grepl(paste0("^", class), colnames(data)))
} else {
... | /R/formula.R | no_license | tylergiallanza/arulesCWAR | R | false | false | 1,325 | r |
### formula helper
.parseformula <- function(formula, data) {
formula <- as.formula(formula)
vars <- all.vars(formula)
### class
# for transactions, class can match multiple items!
class <- vars[1]
if(is(data, "itemMatrix")) {
class_ids <- which(grepl(paste0("^", class), colnames(data)))
} else {
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_function.R
\name{fars_map_state}
\alias{fars_map_state}
\title{Map the FARS data for a state in a given year}
\usage{
fars_map_state(state.num, year)
}
\arguments{
\item{state.num}{An integer representing the state ID}
\item{year}{A yea... | /man/fars_map_state.Rd | permissive | xxxw567/CourseraRpackagesFinal | R | false | true | 823 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_function.R
\name{fars_map_state}
\alias{fars_map_state}
\title{Map the FARS data for a state in a given year}
\usage{
fars_map_state(state.num, year)
}
\arguments{
\item{state.num}{An integer representing the state ID}
\item{year}{A yea... |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shinydashboard)
library(mvtnorm)
library(scatterplot3d)
library(ellipse)
library(rgl)
BOUND1<-1.5
BOUND2<-1.5
ui <- dashboardPage(
dashboard... | /inst/shiny/classif.R | no_license | niuneo/gbcode | R | false | false | 7,139 | r |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shinydashboard)
library(mvtnorm)
library(scatterplot3d)
library(ellipse)
library(rgl)
BOUND1<-1.5
BOUND2<-1.5
ui <- dashboardPage(
dashboard... |
if(!require('sqldf')){
install.packages('sqldf')
}
library(sqldf)
colclasses = c("character", "character", rep("numeric",7))
sql <- "SELECT * FROM file WHERE Date='1/2/2007' OR Date='2/2/2007'"
data <- read.csv.sql("household_power_consumption.txt", sql, sep=';',
colClasses=colclasses, hea... | /plot4.R | no_license | sven700c/ExData_Plotting1 | R | false | false | 1,399 | r | if(!require('sqldf')){
install.packages('sqldf')
}
library(sqldf)
colclasses = c("character", "character", rep("numeric",7))
sql <- "SELECT * FROM file WHERE Date='1/2/2007' OR Date='2/2/2007'"
data <- read.csv.sql("household_power_consumption.txt", sql, sep=';',
colClasses=colclasses, hea... |
################ plotting distributions to compare GO and cluster #################
setwd("~/ferdig_rotation/regulon_validation/original_nets/consensus_network/clustering_output/")
library(igraph)
###################### GO distribution ##########################
###lets first load in the GO file and get the... | /network_validation_codes/GO_cluster_distributions.R | no_license | katiemeis/code_gradlab | R | false | false | 2,390 | r |
################ plotting distributions to compare GO and cluster #################
setwd("~/ferdig_rotation/regulon_validation/original_nets/consensus_network/clustering_output/")
library(igraph)
###################### GO distribution ##########################
###lets first load in the GO file and get the... |
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
# Application title
titlePanel("Developing Data Producs Course Project"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
#Slope of the linear model calc... | /ui.R | no_license | EdgardoDiBello/Developing-Data-Products-Course-Project | R | false | false | 1,831 | r |
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
# Application title
titlePanel("Developing Data Producs Course Project"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
#Slope of the linear model calc... |
library(drake)
### Name: file_in
### Title: Declare the file inputs of a workflow plan command.
### Aliases: file_in
### ** Examples
## Not run:
##D test_with_dir("Contain side effects", {
##D # The `file_out()` and `file_in()` functions
##D # just takes in strings and returns them.
##D file_out("summaries.txt")
#... | /data/genthat_extracted_code/drake/examples/file_in.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,141 | r | library(drake)
### Name: file_in
### Title: Declare the file inputs of a workflow plan command.
### Aliases: file_in
### ** Examples
## Not run:
##D test_with_dir("Contain side effects", {
##D # The `file_out()` and `file_in()` functions
##D # just takes in strings and returns them.
##D file_out("summaries.txt")
#... |
### load libraries
library(dplyr)
#load datasets
url <- 'https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip'
#set local directory
dest <- '~/Documents/5th Year/Getting and Cleaning Data/UCI.zip'
#download
download.file(url,dest,method='curl')
#assign tables
features <- read.tab... | /run_analysis.R | no_license | klydon1/cleaningdata | R | false | false | 2,307 | r | ### load libraries
library(dplyr)
#load datasets
url <- 'https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip'
#set local directory
dest <- '~/Documents/5th Year/Getting and Cleaning Data/UCI.zip'
#download
download.file(url,dest,method='curl')
#assign tables
features <- read.tab... |
#' @importFrom rlang error_cnd
stop <- function(
message = "",
exit_code = 1) {
base::stop(error_cnd(.subclass = exit_code, message = message))
}
| /R/stop.R | no_license | slkarkar/RGCCA | R | false | false | 169 | r |
#' @importFrom rlang error_cnd
stop <- function(
message = "",
exit_code = 1) {
base::stop(error_cnd(.subclass = exit_code, message = message))
}
|
testlist <- list(Beta = 0, CVLinf = -2.36101987400524e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615827869-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 487 | r | testlist <- list(Beta = 0, CVLinf = -2.36101987400524e-268, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/isNumberOrNanVectorOrNull.R
\name{isNumberOrNanVectorOrNull}
\alias{isNumberOrNanVectorOrNull}
\title{Wrapper for the checkarg function, using specific parameter settings.}
\usage{
isNumberOrNanVectorOrNull(argument, default = NULL, sto... | /man/isNumberOrNanVectorOrNull.Rd | no_license | cran/checkarg | R | false | true | 2,438 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/isNumberOrNanVectorOrNull.R
\name{isNumberOrNanVectorOrNull}
\alias{isNumberOrNanVectorOrNull}
\title{Wrapper for the checkarg function, using specific parameter settings.}
\usage{
isNumberOrNanVectorOrNull(argument, default = NULL, sto... |
#'@title createSavedPlot
#'@description Save a plot to BG.library/data/plotList. These plots can be executed with
#'either `executeSavePlot()` or `shinyPlot()`
#'@param libraryPath character string path to BG.library code
#'@param plotName character string to assign as name of saved plot
#'@param plotType character ... | /BG.library/R/createSavedPlot.R | no_license | rscmbc3/BG.library | R | false | false | 2,109 | r | #'@title createSavedPlot
#'@description Save a plot to BG.library/data/plotList. These plots can be executed with
#'either `executeSavePlot()` or `shinyPlot()`
#'@param libraryPath character string path to BG.library code
#'@param plotName character string to assign as name of saved plot
#'@param plotType character ... |
#' Generic function for extracting the right-hand side from a model
#'
#' @keywords internal
#'
#' @param model A fitted model
#' @param \dots additional arguments passed to the specific extractor
#' @noRd
extract_rhs <- function(model, ...) {
UseMethod("extract_rhs", model)
}
#' Extract right-hand side
#'
#' Extra... | /R/extract_rhs.R | permissive | shaoyoucheng/equatiomatic | R | false | false | 19,684 | r | #' Generic function for extracting the right-hand side from a model
#'
#' @keywords internal
#'
#' @param model A fitted model
#' @param \dots additional arguments passed to the specific extractor
#' @noRd
extract_rhs <- function(model, ...) {
UseMethod("extract_rhs", model)
}
#' Extract right-hand side
#'
#' Extra... |
#' Function to generate tools path object
#' @param config.file Path of tools configuration file (json, ini, yaml and toml be supported)
#' @param config.list List object of tools that all of tools path (exclude those without names).
#' @param config.vec Vector object of tools that all of tools path (exclude those with... | /R/utils.R | permissive | JhuangLab/ngstk | R | false | false | 8,881 | r | #' Function to generate tools path object
#' @param config.file Path of tools configuration file (json, ini, yaml and toml be supported)
#' @param config.list List object of tools that all of tools path (exclude those without names).
#' @param config.vec Vector object of tools that all of tools path (exclude those with... |
#load in necessary packages
library(geiger)
#read in insect phylogeny
trees <- read.nexus("../data/post.nex")
#read in the microsatellite data
dat.mic <- read.csv("../results/micRocounter_results_TII.csv",
as.is = T, row.names = 4)
#loop through to drop any unmatching data or tree tips
trees.pru... | /analyses/order.content.R | no_license | coleoguy/microsat | R | false | false | 6,864 | r | #load in necessary packages
library(geiger)
#read in insect phylogeny
trees <- read.nexus("../data/post.nex")
#read in the microsatellite data
dat.mic <- read.csv("../results/micRocounter_results_TII.csv",
as.is = T, row.names = 4)
#loop through to drop any unmatching data or tree tips
trees.pru... |
#BL BARNHART 2018-04-04
#This is for running SWAT and optimizing fertilizer reductions at the
#subbasin scale. In particular, below consists of two functions.
#1. getSwatInputandProfit(): this calculates the fertilizer inputs
#into swat given certain tax and q levels.
#2. runSWAT() calculates no3 outputs fr... | /Raccoon/rcode_taxonly/taxonly_sub_optim.R | no_license | fqx9904/bilevel_targeting_swat | R | false | false | 7,909 | r |
#BL BARNHART 2018-04-04
#This is for running SWAT and optimizing fertilizer reductions at the
#subbasin scale. In particular, below consists of two functions.
#1. getSwatInputandProfit(): this calculates the fertilizer inputs
#into swat given certain tax and q levels.
#2. runSWAT() calculates no3 outputs fr... |
# package globals
.globals <- new.env(parent = emptyenv())
.globals$overlay <- list()
.globals$job_registry <- new.env(parent = emptyenv())
| /R/cloudml-package.R | no_license | MitchellAkeba/cloudml | R | false | false | 142 | r |
# package globals
.globals <- new.env(parent = emptyenv())
.globals$overlay <- list()
.globals$job_registry <- new.env(parent = emptyenv())
|
library(dnar)
library(xlsx)
library(lubridate)
convertUKMM<-function(xx,mmLookup,errorOnNA=TRUE){
splits<-strsplit(xx,'\\.')
splits<-lapply(splits,function(xx){
orig<-xx
if(length(xx)==0)return('')
xx[1]<-sub('UK','EJ',gsub(' ','',xx[1]))
if(grepl('EJ',xx[1]))xx[1]<-mmLookup[xx[1]]
if(is.na(xx[... | /readMeta.R | no_license | sherrillmix/IFNDynamics | R | false | false | 18,573 | r | library(dnar)
library(xlsx)
library(lubridate)
convertUKMM<-function(xx,mmLookup,errorOnNA=TRUE){
splits<-strsplit(xx,'\\.')
splits<-lapply(splits,function(xx){
orig<-xx
if(length(xx)==0)return('')
xx[1]<-sub('UK','EJ',gsub(' ','',xx[1]))
if(grepl('EJ',xx[1]))xx[1]<-mmLookup[xx[1]]
if(is.na(xx[... |
#' Human annotation GRCh37
#'
#' Human annotation GRCh37 from Ensembl release 75.
#'
#' @examples
#' head(grch37)
#'
#' @source \url{http://grch37.ensembl.org/}
"grch37"
| /R/grch37.R | no_license | timknut/annotables | R | false | false | 170 | r | #' Human annotation GRCh37
#'
#' Human annotation GRCh37 from Ensembl release 75.
#'
#' @examples
#' head(grch37)
#'
#' @source \url{http://grch37.ensembl.org/}
"grch37"
|
s3 = import('s3')
test = s3$test
| /tests/testthat/modules/s3_b.r | permissive | flying-sheep/modules | R | false | false | 33 | r | s3 = import('s3')
test = s3$test
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dim_plot.R
\name{pivot_Plot1d}
\alias{pivot_Plot1d}
\title{a wrapper module for plot in 1D}
\usage{
pivot_Plot1d(input, output, session, type = NULL, obj = NULL, proj = NULL,
minfo = NULL)
}
\description{
This is the server part of the modu... | /man/pivot_Plot1d.Rd | no_license | jeevanyue/PIVOT | R | false | true | 327 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dim_plot.R
\name{pivot_Plot1d}
\alias{pivot_Plot1d}
\title{a wrapper module for plot in 1D}
\usage{
pivot_Plot1d(input, output, session, type = NULL, obj = NULL, proj = NULL,
minfo = NULL)
}
\description{
This is the server part of the modu... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615830698-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,191 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
library(UCSCXenaTools)
### Name: downloadTCGA
### Title: Easily Download TCGA Data by Several Options
### Aliases: downloadTCGA
### ** Examples
## No test:
# download RNASeq data (use UVM as example)
downloadTCGA(project = "UVM",
data_type = "Gene Expression RNASeq",
file_type = "... | /data/genthat_extracted_code/UCSCXenaTools/examples/downloadTCGA.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 364 | r | library(UCSCXenaTools)
### Name: downloadTCGA
### Title: Easily Download TCGA Data by Several Options
### Aliases: downloadTCGA
### ** Examples
## No test:
# download RNASeq data (use UVM as example)
downloadTCGA(project = "UVM",
data_type = "Gene Expression RNASeq",
file_type = "... |
# load library's needed
library(dplyr)
library(ggplot2)
library(stringr)
# read data
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# subset Baltimore city and Los Angelos county data
NEI_BAL_LA <- subset(NEI, fips == "24510"| fips == "06037")
# subset motor vehicl... | /plot6.R | no_license | BobdeTheije/ExpData-Project-2 | R | false | false | 1,062 | r | # load library's needed
library(dplyr)
library(ggplot2)
library(stringr)
# read data
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# subset Baltimore city and Los Angelos county data
NEI_BAL_LA <- subset(NEI, fips == "24510"| fips == "06037")
# subset motor vehicl... |
library(readxl)
library(dplyr)
library(magrittr)
library(tidyr)
library(stringr)
library(readr)
library(purrr)
# dit is een test file
excel_to_longDF <- function(path, tab){
# get basic info about this experiment, based on the path
filename <- str_split(path,"/") %>% unlist()
filename <- filename[length(filen... | /readdata.R | no_license | aart1/wezel | R | false | false | 2,441 | r |
library(readxl)
library(dplyr)
library(magrittr)
library(tidyr)
library(stringr)
library(readr)
library(purrr)
# dit is een test file
excel_to_longDF <- function(path, tab){
# get basic info about this experiment, based on the path
filename <- str_split(path,"/") %>% unlist()
filename <- filename[length(filen... |
#
#
#
# x = snapShots[[i]]
tMax = 1
# hcols=hyCols
plot_hyphae = function(x, tMax=100, hcols=rev(brewer.pal(11, "Spectral")), ...) {
segCol = data.frame(colorRamp(hcols, alpha=0.5)(x[,"t"]/max(tMax,1)))
colnames(segCol) = c("red", "green", "blue", "alpha")
segCols = rgb(red=segCol$red, green=segCol$gre... | /functions_v1.R | no_license | BioBuilders2018/mycelium-simulations | R | false | false | 6,958 | r | #
#
#
# x = snapShots[[i]]
tMax = 1
# hcols=hyCols
plot_hyphae = function(x, tMax=100, hcols=rev(brewer.pal(11, "Spectral")), ...) {
segCol = data.frame(colorRamp(hcols, alpha=0.5)(x[,"t"]/max(tMax,1)))
colnames(segCol) = c("red", "green", "blue", "alpha")
segCols = rgb(red=segCol$red, green=segCol$gre... |
test_that("multiplication works", {
ex_data <- tibble(group = rep(c("a", "b"), times = c(5, 10)),
x = 1:15,
y = 16:30)
res <- bed_group(data = ex_data, vars = c("x", "y"),
funs = list(length, nrow, mean),
group = group)
expect_equal(... | /tests/testthat/test-bed_group.R | permissive | USCbiostats/bedslider | R | false | false | 542 | r | test_that("multiplication works", {
ex_data <- tibble(group = rep(c("a", "b"), times = c(5, 10)),
x = 1:15,
y = 16:30)
res <- bed_group(data = ex_data, vars = c("x", "y"),
funs = list(length, nrow, mean),
group = group)
expect_equal(... |
#!/usr/bin/Rscript
# Bhishan Poudel
# Jan 18, 2016
library(plotly)
p <- plot_ly(midwest, x = percollege, color = state, type = "box")
# plotly_POST publishes the figure to your plotly account on the web
plotly_POST(p, filename = "r-docs/midwest-boxplots", world_readable=TRUE)
| /R/rprograms/plotting/plotlyExamples/plotly3.r | permissive | bhishanpdl/Programming | R | false | false | 280 | r | #!/usr/bin/Rscript
# Bhishan Poudel
# Jan 18, 2016
library(plotly)
p <- plot_ly(midwest, x = percollege, color = state, type = "box")
# plotly_POST publishes the figure to your plotly account on the web
plotly_POST(p, filename = "r-docs/midwest-boxplots", world_readable=TRUE)
|
t <- sample(1, 72)
two <- log(10) + t
fit1 <- glm(count ~ spray + offset(t), family="poisson", InsectSprays)
fit2 <- glm(count ~ spray + offset(two * t), family="poisson", InsectSprays)
summary(fit1)
summary(fit2) | /quizzes/quiz4qu5.R | no_license | BananuhBeatDown/Regression_Models | R | false | false | 218 | r | t <- sample(1, 72)
two <- log(10) + t
fit1 <- glm(count ~ spray + offset(t), family="poisson", InsectSprays)
fit2 <- glm(count ~ spray + offset(two * t), family="poisson", InsectSprays)
summary(fit1)
summary(fit2) |
library(usmap)
library(ggplot2)
library(readr)
library(lubridate)
library(maps)
library(dplyr)
library(dslabs)
library(stringr)
library(rstudioapi)
library(tidyverse) # ggplot2, dplyr, tidyr, readr, purrr, tibble
library(magrittr) # pipes
install.packages("lintr")
library(lintr) # code linting
install.packages("sf")
l... | /all_variables_bivariate_maps.R | no_license | kbhangdia/BST260GroupProject_COVID | R | false | false | 25,453 | r | library(usmap)
library(ggplot2)
library(readr)
library(lubridate)
library(maps)
library(dplyr)
library(dslabs)
library(stringr)
library(rstudioapi)
library(tidyverse) # ggplot2, dplyr, tidyr, readr, purrr, tibble
library(magrittr) # pipes
install.packages("lintr")
library(lintr) # code linting
install.packages("sf")
l... |
library(argparser)
library(TopmedPipeline)
library(GWASTools)
library(dplyr)
library(tidyr)
sessionInfo()
argp <- arg_parser("Pedigree check")
argp <- add_argument(argp, "config", help="path to config file")
argv <- parse_args(argp)
config <- readConfig(argv$config)
required <- c("pedigree_file")
optional <- c("conca... | /R/pedigree_format.R | no_license | UW-GAC/analysis_pipeline | R | false | false | 5,086 | r | library(argparser)
library(TopmedPipeline)
library(GWASTools)
library(dplyr)
library(tidyr)
sessionInfo()
argp <- arg_parser("Pedigree check")
argp <- add_argument(argp, "config", help="path to config file")
argv <- parse_args(argp)
config <- readConfig(argv$config)
required <- c("pedigree_file")
optional <- c("conca... |
library(tsibble)
### Name: fill_gaps
### Title: Turn implicit missing values into explicit missing values
### Aliases: fill_gaps
### ** Examples
harvest <- tsibble(
year = c(2010, 2011, 2013, 2011, 2012, 2014),
fruit = rep(c("kiwi", "cherry"), each = 3),
kilo = sample(1:10, size = 6),
key = id(fruit), index... | /data/genthat_extracted_code/tsibble/examples/fill_gaps.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,111 | r | library(tsibble)
### Name: fill_gaps
### Title: Turn implicit missing values into explicit missing values
### Aliases: fill_gaps
### ** Examples
harvest <- tsibble(
year = c(2010, 2011, 2013, 2011, 2012, 2014),
fruit = rep(c("kiwi", "cherry"), each = 3),
kilo = sample(1:10, size = 6),
key = id(fruit), index... |
# BEMTOOL - Bio-Economic Model TOOLs - version 2.5
# Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018
# COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy
# In case of use of the model, the Authors should be cited.
# If you have any comments or suggestions please contact the following e... | /BEMTOOL-ver2.5-2018_0901/bmtgui/economic_params/price/price_importweight/price_importweight.add_columns.r | no_license | gresci/BEMTOOL2.5 | R | false | false | 1,798 | r | # BEMTOOL - Bio-Economic Model TOOLs - version 2.5
# Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018
# COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy
# In case of use of the model, the Authors should be cited.
# If you have any comments or suggestions please contact the following e... |
##### Santiago Lacouture & Lancelot Henry de Frahan
#' Sales Taxes
#' Replication File. Updated on 04/18/2023
#' Step 5b: Reduced form evidence of non-linearities.
#' Export IV estimates by quantiles of lagged price distribution,
#' and distribution of current prices, using relevant estimation weights.
#'
library(dat... | /Replication/Replication_v4/DiD_nonlinearities_DLL_v4.R | no_license | lancelothdf/sales.taxes | R | false | false | 9,777 | r | ##### Santiago Lacouture & Lancelot Henry de Frahan
#' Sales Taxes
#' Replication File. Updated on 04/18/2023
#' Step 5b: Reduced form evidence of non-linearities.
#' Export IV estimates by quantiles of lagged price distribution,
#' and distribution of current prices, using relevant estimation weights.
#'
library(dat... |
#' Adds an uiOutput and renders an enhanced rhandsontable html widget
#'
#' @description dq_handsontable_output adds a fluidRow containing a column with
#' the given width, ready to support a dq_handsontable.
#'
#' @param id id of the element
#' @param width width of the table in bootstrap columns
#' @param offs... | /old_dependencies/dqshiny/R/dq_handsontable.R | no_license | bigliolimatteo/time_series_modeling_app | R | false | false | 12,756 | r | #' Adds an uiOutput and renders an enhanced rhandsontable html widget
#'
#' @description dq_handsontable_output adds a fluidRow containing a column with
#' the given width, ready to support a dq_handsontable.
#'
#' @param id id of the element
#' @param width width of the table in bootstrap columns
#' @param offs... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projectKNNs.R
\name{projectKNNs}
\alias{projectKNNs}
\title{Project a distance matrix into a lower-dimensional space.}
\usage{
projectKNNs(wij, dim = 2, sgd_batches = NULL, M = 5, gamma = 7,
alpha = 1, rho = 1, coords = NULL, useDegree = FA... | /man/projectKNNs.Rd | no_license | idroz/largeVis-R | R | false | true | 4,865 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projectKNNs.R
\name{projectKNNs}
\alias{projectKNNs}
\title{Project a distance matrix into a lower-dimensional space.}
\usage{
projectKNNs(wij, dim = 2, sgd_batches = NULL, M = 5, gamma = 7,
alpha = 1, rho = 1, coords = NULL, useDegree = FA... |
###############################################
### Resultat Generale #######
###############################################
###############################################
### 1- HN_GARCH_ESS_Returns #######
###############################################
##a0=para_h[1]; a1=p... | /Simulation_juin2018/Resultat_all.R | no_license | Fanirisoa/dynamic_pricing | R | false | false | 11,831 | r | ###############################################
### Resultat Generale #######
###############################################
###############################################
### 1- HN_GARCH_ESS_Returns #######
###############################################
##a0=para_h[1]; a1=p... |
#########
#Coursera project 2 in Reproducible research
setwd("C:/Users/gissurj/R/Coursera/Reproducible research/RepData_PeerAssessment2")
############
#Download data and get it ready
download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2", "Storm.bz2")
Storm <- read.csv("Storm.bz2"... | /CP2.R | no_license | Gissi/RepData_PeerAssessment2 | R | false | false | 1,965 | r | #########
#Coursera project 2 in Reproducible research
setwd("C:/Users/gissurj/R/Coursera/Reproducible research/RepData_PeerAssessment2")
############
#Download data and get it ready
download.file("https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2FStormData.csv.bz2", "Storm.bz2")
Storm <- read.csv("Storm.bz2"... |
start.val.tpm <-
function (start.val, data, type, constraint) {
n <- nrow(data)
p <- ncol(data)
cmptStrVal <- is.null(start.val) || (start.val == "random" || (is.matrix(start.val) && length(start.val) != 3*p))
randStrVal <- length(start.val) == 1 && start.val == "random"
if (cmptStrVal) {
... | /R/start.val.tpm.R | no_license | state-o-flux/ltm | R | false | false | 1,809 | r | start.val.tpm <-
function (start.val, data, type, constraint) {
n <- nrow(data)
p <- ncol(data)
cmptStrVal <- is.null(start.val) || (start.val == "random" || (is.matrix(start.val) && length(start.val) != 3*p))
randStrVal <- length(start.val) == 1 && start.val == "random"
if (cmptStrVal) {
... |
# 1. Carga de datos
parameters = read_yaml('02_parameter/parameters.yml', fileEncoding = 'UTF-8')
# 0.1. Leer data
data_original = read.csv('01_input/data_original_concejales_2016.csv', sep=';', fileEncoding = 'UTF-8-BOM')
# 0.4. Cupos por unidad (comuna/distrito)
if(parameters['modo'][[1]] == 'concejales'){
... | /00_code/01_data_science/simulador.R | no_license | goyanedelv/general-election-simulator-chile | R | false | false | 8,172 | r | # 1. Carga de datos
parameters = read_yaml('02_parameter/parameters.yml', fileEncoding = 'UTF-8')
# 0.1. Leer data
data_original = read.csv('01_input/data_original_concejales_2016.csv', sep=';', fileEncoding = 'UTF-8-BOM')
# 0.4. Cupos por unidad (comuna/distrito)
if(parameters['modo'][[1]] == 'concejales'){
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chadPlot.R
\name{chadPlot}
\alias{chadPlot}
\title{Print a data url'd image to console}
\usage{
chadPlot()
}
\description{
This functions switches off the current graphics device, then prints out an image
tag with a data url of the file. Thi... | /man/chadPlot.Rd | no_license | nfultz/chad | R | false | true | 364 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chadPlot.R
\name{chadPlot}
\alias{chadPlot}
\title{Print a data url'd image to console}
\usage{
chadPlot()
}
\description{
This functions switches off the current graphics device, then prints out an image
tag with a data url of the file. Thi... |
rankhospital <- function(state, outcome, num = "best") {
outcomeDf <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
stateVect <- unique(outcomeDf$State)
outcomeVect = c("heart attack","heart failure","pneumonia")
if(!(state %in% stateVect)) {
stop("invalid state")
... | /rankhospital.R | no_license | abhinavg6/DataScience-RProg-Project | R | false | false | 2,366 | r | rankhospital <- function(state, outcome, num = "best") {
outcomeDf <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
stateVect <- unique(outcomeDf$State)
outcomeVect = c("heart attack","heart failure","pneumonia")
if(!(state %in% stateVect)) {
stop("invalid state")
... |
args = commandArgs(trailingOnly=TRUE)
setwd("c:/scripts/")
setwd(args[1])
source("run.R",encoding = "UTF-8")
| /scripts/sql_wrapper.R | no_license | danielfm123/sqlsaturday2018_conecting_sql_and_r | R | false | false | 115 | r | args = commandArgs(trailingOnly=TRUE)
setwd("c:/scripts/")
setwd(args[1])
source("run.R",encoding = "UTF-8")
|
###### 樂透推薦自動化流程
#setwd("E:/LBH/Dropbox/GitHub/Lottery/")
source("lotteryAnalysis.R",encoding="UTF-8")
######################################################
#autoAnalysisProcess(crawler = T)
######################################################
temp1_1 <- sample(1:49,6)
temp1_2 <- historyRecordFN49(examineResult ... | /AutoLotteryAnalysis.R | no_license | BingHongLi/LotteryRecomm | R | false | false | 2,432 | r | ###### 樂透推薦自動化流程
#setwd("E:/LBH/Dropbox/GitHub/Lottery/")
source("lotteryAnalysis.R",encoding="UTF-8")
######################################################
#autoAnalysisProcess(crawler = T)
######################################################
temp1_1 <- sample(1:49,6)
temp1_2 <- historyRecordFN49(examineResult ... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/flashmatrix.R
\name{fm.set.conf}
\alias{fm.set.conf}
\title{Reconfigure FlashMatrix}
\usage{
fm.set.conf(conf.file)
}
\arguments{
\item{conf.file}{The configuration file.}
}
\description{
This reconfigures FlashMatrix with the setting... | /Rpkg/man/fm.set.conf.Rd | permissive | zheng-da/FlashX | R | false | false | 524 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/flashmatrix.R
\name{fm.set.conf}
\alias{fm.set.conf}
\title{Reconfigure FlashMatrix}
\usage{
fm.set.conf(conf.file)
}
\arguments{
\item{conf.file}{The configuration file.}
}
\description{
This reconfigures FlashMatrix with the setting... |
#' Do PCA for a single geneSet based on bootstraps by genes
#'
#' It'll random choose the same number of gene with the size of this geneSet to extract the expression matrix and then do PCA for this small expression matrix .
#'
#'
#'
#' @param prefix The prefix for all of the output files.( we don't need it now actu... | /R/PCA_gene_multiple.R | no_license | y461650833y/geneSet | R | false | false | 1,666 | r | #' Do PCA for a single geneSet based on bootstraps by genes
#'
#' It'll random choose the same number of gene with the size of this geneSet to extract the expression matrix and then do PCA for this small expression matrix .
#'
#'
#'
#' @param prefix The prefix for all of the output files.( we don't need it now actu... |
scc <- readRDS("Source_Classification_Code.rds")
mydata <- readRDS("summarySCC_PM25.rds")
str(mydata)
str(scc)
head(scc)
head(mydata)
mtcars
plot(mtcars$cyl, mtcars$mpg, type = "l")
?plot
NEI <- readRDS("summarySCC_PM25.rds")
names(NEI)
aggdata <- aggregate(NEI$Emissions, list(year = NEI$year), sum)
data <- ChickWe... | /exploratory_analysis/project2scratchpad.R | no_license | sdevine188/coursera_code | R | false | false | 1,921 | r |
scc <- readRDS("Source_Classification_Code.rds")
mydata <- readRDS("summarySCC_PM25.rds")
str(mydata)
str(scc)
head(scc)
head(mydata)
mtcars
plot(mtcars$cyl, mtcars$mpg, type = "l")
?plot
NEI <- readRDS("summarySCC_PM25.rds")
names(NEI)
aggdata <- aggregate(NEI$Emissions, list(year = NEI$year), sum)
data <- ChickWe... |
#' gscraper - Basic web scraping to generate local cache of remote website
#'
#' @name gscraper
#' @docType package
NULL
| /R/gscraper-package.r | no_license | jefferis/gscraper | R | false | false | 121 | r | #' gscraper - Basic web scraping to generate local cache of remote website
#'
#' @name gscraper
#' @docType package
NULL
|
#######################################################################
## 연습문제: 변수리코딩
# 데이터 불러오기
library('tidyverse')
library('haven')
library('readxl')
setwd("D:/TidyData/data")
gss_panel = read_dta("data_gss_panel06.dta")
# 변수변환_문제_1: 아이가 있는지 아니면 아무도 없는지?
gss_panel %>%
mutate(
child_atleast2=ifel... | /data/tidyverse_practice_2_2_2_variable_recoding.R | no_license | harryyang1982/ds_with_tidyverse | R | false | false | 3,239 | r | #######################################################################
## 연습문제: 변수리코딩
# 데이터 불러오기
library('tidyverse')
library('haven')
library('readxl')
setwd("D:/TidyData/data")
gss_panel = read_dta("data_gss_panel06.dta")
# 변수변환_문제_1: 아이가 있는지 아니면 아무도 없는지?
gss_panel %>%
mutate(
child_atleast2=ifel... |
testlist <- list(end = NULL, start = NULL, x = structure(c(4.65661649758392e-10, 1.37982776272053e-309, 2.32903286132618e+96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0,... | /dynutils/inst/testfiles/project_to_segments/AFL_project_to_segments/project_to_segments_valgrind_files/1609871305-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 409 | r | testlist <- list(end = NULL, start = NULL, x = structure(c(4.65661649758392e-10, 1.37982776272053e-309, 2.32903286132618e+96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0,... |
#library(tidyverse)
#library(showtext) # 글꼴, install.packages("showtext")
#library(extrafont) # install.packages("extrafont")
#font_import(prompt = F, pattern = "D2")
#loadfonts(quiet = F)
par(family = "AppleGothic")
# report 1
kings = read.table("datavis/chosun\ kings.txt", header=T)
P <- cumsum(kings$Life)
plot(1:2... | /R/datavis.r.R | permissive | tolkien/misc | R | false | false | 3,271 | r | #library(tidyverse)
#library(showtext) # 글꼴, install.packages("showtext")
#library(extrafont) # install.packages("extrafont")
#font_import(prompt = F, pattern = "D2")
#loadfonts(quiet = F)
par(family = "AppleGothic")
# report 1
kings = read.table("datavis/chosun\ kings.txt", header=T)
P <- cumsum(kings$Life)
plot(1:2... |
## Take the sampled data from the No Prof data, and further divide it into a training set (train_data20minus) and a .5% HeldOff data (test_data20)
con.FileNames <- list.files(path = "/Users/saurabh/Desktop/Data Science/Capstone/final/en_US_NoProf") # list of files in the clean corpus
r <- length(con.FileNames) # num... | /SampleHeldOff.R | no_license | soniasharma/Laguage-Model---Word-Prediction | R | false | false | 1,451 | r | ## Take the sampled data from the No Prof data, and further divide it into a training set (train_data20minus) and a .5% HeldOff data (test_data20)
con.FileNames <- list.files(path = "/Users/saurabh/Desktop/Data Science/Capstone/final/en_US_NoProf") # list of files in the clean corpus
r <- length(con.FileNames) # num... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Meshfns.R
\name{convert_INLA_mesh_MVST}
\alias{convert_INLA_mesh_MVST}
\title{Convert INLA mesh object MVST FEM class}
\usage{
convert_INLA_mesh_MVST(mesh)
}
\arguments{
\item{mesh}{The INLA mesh to convert (inla.mesh))}
}
\value{
MVST finite... | /man/convert_INLA_mesh_MVST.Rd | permissive | andrewzm/MVST | R | false | true | 584 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Meshfns.R
\name{convert_INLA_mesh_MVST}
\alias{convert_INLA_mesh_MVST}
\title{Convert INLA mesh object MVST FEM class}
\usage{
convert_INLA_mesh_MVST(mesh)
}
\arguments{
\item{mesh}{The INLA mesh to convert (inla.mesh))}
}
\value{
MVST finite... |
##################################################################################
# Create data for Nashville OD Data Visulization using ActivityViz
# Author: Aditya Gore
##################################################################################
#### Sections
# 1. Load/Install required packages
# 2. Define Co... | /data/nashville/scripts/activity_viz_passive_data.R | no_license | steventrev/ActivityViz_Data | R | false | false | 14,190 | r | ##################################################################################
# Create data for Nashville OD Data Visulization using ActivityViz
# Author: Aditya Gore
##################################################################################
#### Sections
# 1. Load/Install required packages
# 2. Define Co... |
#!/bin/R
### Map plots from N reduce2grid
library(ggmap)
library(maptools)
library(gpclib)
library(sp)
library(raster)
library(rgdal)
library(dplyr)
library(Cairo)
library(scales)
library(rgeos)
gpclibPermit()
mat <- read.table("symbols_colors.txt", row.names = 1, stringsAsFactors = FALSE)
sites <- rbind(BI = c(41.... | /FIG/map.NR.R | no_license | jthmiller/QTL_remap | R | false | false | 2,269 | r | #!/bin/R
### Map plots from N reduce2grid
library(ggmap)
library(maptools)
library(gpclib)
library(sp)
library(raster)
library(rgdal)
library(dplyr)
library(Cairo)
library(scales)
library(rgeos)
gpclibPermit()
mat <- read.table("symbols_colors.txt", row.names = 1, stringsAsFactors = FALSE)
sites <- rbind(BI = c(41.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fsutils.r
\name{split_path}
\alias{split_path}
\title{Split file path into individual components (optionally including separators)}
\usage{
split_path(path, include.fseps = FALSE, omit.duplicate.fseps = FALSE,
fsep = .Platform$file.sep)
}
\... | /man/split_path.Rd | no_license | javieralexa/nat.utils | R | false | true | 1,331 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fsutils.r
\name{split_path}
\alias{split_path}
\title{Split file path into individual components (optionally including separators)}
\usage{
split_path(path, include.fseps = FALSE, omit.duplicate.fseps = FALSE,
fsep = .Platform$file.sep)
}
\... |
step.2 %>%
filter(ensembl.gene %in% picks) %>%
select(hgnc, gross.mean.abundance) %>%
arrange(gross.mean.abundance) %>%
mutate(hgnc = factor(hgnc, levels = unique(hgnc))) %>%
unique %>%
filter(!is.na(gross.mean.abundance)) %>%
mutate(tissue = 'gross mean') %>%
rename(gene = hgnc, level = gross.mean.abundance) %>%
Plo... | /notebook/_fabiana_presentation.R | permissive | SadelainLab/ptolomy | R | false | false | 8,097 | r |
step.2 %>%
filter(ensembl.gene %in% picks) %>%
select(hgnc, gross.mean.abundance) %>%
arrange(gross.mean.abundance) %>%
mutate(hgnc = factor(hgnc, levels = unique(hgnc))) %>%
unique %>%
filter(!is.na(gross.mean.abundance)) %>%
mutate(tissue = 'gross mean') %>%
rename(gene = hgnc, level = gross.mean.abundance) %>%
Plo... |
#' Scrape footywire player statitstics.
#'
#' \code{get_footywire_stats} returns a dataframe containing player match stats from footywire from 2010 onwards.
#'
#' The dataframe contains both basic and advanced player statistics from each match specified in the match_id input.
#' To find match ID, find the relevent matc... | /R/footywire-calcs.R | no_license | schmoopies/fitzRoy | R | false | false | 6,584 | r | #' Scrape footywire player statitstics.
#'
#' \code{get_footywire_stats} returns a dataframe containing player match stats from footywire from 2010 onwards.
#'
#' The dataframe contains both basic and advanced player statistics from each match specified in the match_id input.
#' To find match ID, find the relevent matc... |
b <- c(1,3,7,5,3,2)
f <- sqrt(b)
plot(b,f)
| /Code_examples/r/plot.r | permissive | bodacea/datasciencecodingfordevelopment | R | false | false | 43 | r | b <- c(1,3,7,5,3,2)
f <- sqrt(b)
plot(b,f)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/species_list.R
\name{species_list}
\alias{species_list}
\title{species_list}
\usage{
species_list(Class = NULL, Order = NULL, Family = NULL,
SubFamily = NULL, Genus = NULL, Species = NULL, SpecCode = NULL,
SpeciesRefNo = NULL, all_taxa = ... | /man/species_list.Rd | no_license | GapData/rfishbase | R | false | true | 1,376 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/species_list.R
\name{species_list}
\alias{species_list}
\title{species_list}
\usage{
species_list(Class = NULL, Order = NULL, Family = NULL,
SubFamily = NULL, Genus = NULL, Species = NULL, SpecCode = NULL,
SpeciesRefNo = NULL, all_taxa = ... |
# Script for running rstanarm models on server.
# This script: test run of a model with aspe and aspn
library(rstanarm)
library(dplyr)
library(tidyr)
# Set working directory
setwd('~/poorcast/bayesian')
##### Read in data, remove NAs, add slope and aspect
all.sp = read.csv('input/veg_all_predictors.csv') %>%
sele... | /02_fit_species_models/bayes_on_server/all_aspens.R | no_license | EBIO6100Spring2020/saddle-plants | R | false | false | 4,823 | r | # Script for running rstanarm models on server.
# This script: test run of a model with aspe and aspn
library(rstanarm)
library(dplyr)
library(tidyr)
# Set working directory
setwd('~/poorcast/bayesian')
##### Read in data, remove NAs, add slope and aspect
all.sp = read.csv('input/veg_all_predictors.csv') %>%
sele... |
load('CE_project.RData')
## Mixed effects
library(dplyr)
# Set up data -------------------------------------------------------------
# library(lme4)
library(hglm)
library(readxl) # install.packages("readxl") or install.packages("tidyverse")
library(plyr)
library(tibble)
library(data.table)
library(dplyr)
state_name_... | /RCode/ce_ranking.R | no_license | klepikhina/klepikhina-masters-ce | R | false | false | 57,534 | r | load('CE_project.RData')
## Mixed effects
library(dplyr)
# Set up data -------------------------------------------------------------
# library(lme4)
library(hglm)
library(readxl) # install.packages("readxl") or install.packages("tidyverse")
library(plyr)
library(tibble)
library(data.table)
library(dplyr)
state_name_... |
Delhi <- read_excel("C:/Users/User/Downloads/Delhi.xlsx")
library(padr)
library(dplyr)
library(tidyr)
library(readxl)
library(magrittr)
library(forecast)
library(imputeTS)
library(DMwR)
Delhi<-delhi
summary(Delhi)
str(Delhi)
plot(Delhi)
##################Find Null Value###################33
Delh... | /Model_Holts.R | no_license | itsme020/Project-on-Delhi-Air-Pollution | R | false | false | 2,571 | r | Delhi <- read_excel("C:/Users/User/Downloads/Delhi.xlsx")
library(padr)
library(dplyr)
library(tidyr)
library(readxl)
library(magrittr)
library(forecast)
library(imputeTS)
library(DMwR)
Delhi<-delhi
summary(Delhi)
str(Delhi)
plot(Delhi)
##################Find Null Value###################33
Delh... |
## The set of functions will cache the inverse of a matrix so that repeated
## inverse operations on the same matrix will return a cached result.
## Usage:
## makeCacheMatrix(x): returns the matrix with inverse caching property
## x$set(y): where y is a matrix initializes x with the values in y
## cacheSolve(x): return... | /cachematrix.R | no_license | someshg/ProgrammingAssignment2 | R | false | false | 1,653 | r | ## The set of functions will cache the inverse of a matrix so that repeated
## inverse operations on the same matrix will return a cached result.
## Usage:
## makeCacheMatrix(x): returns the matrix with inverse caching property
## x$set(y): where y is a matrix initializes x with the values in y
## cacheSolve(x): return... |
source("incl/start.R")
objectSize <- future:::objectSize
message("objectSize() ...")
env <- new.env()
env$a <- 3.14
env$b <- 1:100
env2 <- new.env()
env2$env <- env
## Namespaces will be skipped
env3 <- getNamespace("utils")
fcn <- function(...) TRUE
objs <- list(
NULL,
TRUE,
1L,
3.14,
"hello",
1:100... | /tests/objectSize.R | no_license | rjcc/future | R | false | false | 1,312 | r | source("incl/start.R")
objectSize <- future:::objectSize
message("objectSize() ...")
env <- new.env()
env$a <- 3.14
env$b <- 1:100
env2 <- new.env()
env2$env <- env
## Namespaces will be skipped
env3 <- getNamespace("utils")
fcn <- function(...) TRUE
objs <- list(
NULL,
TRUE,
1L,
3.14,
"hello",
1:100... |
#' Recursive Directory Creation
#'
#' Allows the user to input pieces of directory names to quickly generate
#' multiple sub-directories with similar names nested in the same directory.
#'
#' @param \ldots The pieces of the names to put together. \code{rdirs} will use
#' R's recylcing rule with different length vec... | /R/rdirs.R | no_license | 2ndFloorStuff/reports | R | false | false | 2,239 | r | #' Recursive Directory Creation
#'
#' Allows the user to input pieces of directory names to quickly generate
#' multiple sub-directories with similar names nested in the same directory.
#'
#' @param \ldots The pieces of the names to put together. \code{rdirs} will use
#' R's recylcing rule with different length vec... |
library(tidyverse)
final_proj <- read_csv("Final-Projections.csv")
final_proj$X1 <- factor(final_proj$X1,levels = unique(final_proj$X1))
#colnames(final_proj) <- final_proj[1,]
#final_proj <- final_proj[-1,]
final_proj <- as.data.frame(final_proj)
melt_plot_dat <- reshape2::melt(final_proj,id="X1")
ggplot(melt_plot... | /Commish/final_proj_plots.R | no_license | meysubb/Fantasy_Football_League | R | false | false | 650 | r | library(tidyverse)
final_proj <- read_csv("Final-Projections.csv")
final_proj$X1 <- factor(final_proj$X1,levels = unique(final_proj$X1))
#colnames(final_proj) <- final_proj[1,]
#final_proj <- final_proj[-1,]
final_proj <- as.data.frame(final_proj)
melt_plot_dat <- reshape2::melt(final_proj,id="X1")
ggplot(melt_plot... |
\name{Column and row-wise medians}
\alias{colMedians}
\alias{rowMedians}
\title{
Column and row-wise medians
}
\description{
Column and row-wise medians of a matrix.
}
\usage{
colMedians(x,na.rm = FALSE, parallel = FALSE)
rowMedians(x,na.rm = FALSE, parallel = FALSE)
}
\arguments{
\item{x}{
A matri... | /man/colMedians.Rd | no_license | cran/Rfast | R | false | false | 1,249 | rd | \name{Column and row-wise medians}
\alias{colMedians}
\alias{rowMedians}
\title{
Column and row-wise medians
}
\description{
Column and row-wise medians of a matrix.
}
\usage{
colMedians(x,na.rm = FALSE, parallel = FALSE)
rowMedians(x,na.rm = FALSE, parallel = FALSE)
}
\arguments{
\item{x}{
A matri... |
\name{usquakeLR}
\alias{usquakeLR}
\title{California earthquake loss ratios}
\docType{data}
\description{
Loss ratios for earthquake insurance in California
between 1971 and 1994.
}
\usage{
data(usquakeLR)
}
\format{
\code{usquakeLR} is a data frame of 2 columns and 24 rows:
\describe{
\item{\code{Year}}{Year o... | /pkg/man/usearthquake.Rd | no_license | TonyWU-git/CASdatasets | R | false | false | 962 | rd | \name{usquakeLR}
\alias{usquakeLR}
\title{California earthquake loss ratios}
\docType{data}
\description{
Loss ratios for earthquake insurance in California
between 1971 and 1994.
}
\usage{
data(usquakeLR)
}
\format{
\code{usquakeLR} is a data frame of 2 columns and 24 rows:
\describe{
\item{\code{Year}}{Year o... |
# Load Claddis library:
library(Claddis)
# Set working directory:
#setwd("~/Documents/Homepage/www.graemetlloyd.com")
setwd("~/Desktop/Desktop_Spencers_MacBook_Pro_2/Grossnickle Tree/")
# Get file list:
file.list <- list.files()
# Get just the group matrix pages:
file.list <- file.list[grep("~/Desktop/Desktop_Spence... | /RScripts/maketntandnexusandxml.R | no_license | shellert/MammalJawTree | R | false | false | 17,713 | r | # Load Claddis library:
library(Claddis)
# Set working directory:
#setwd("~/Documents/Homepage/www.graemetlloyd.com")
setwd("~/Desktop/Desktop_Spencers_MacBook_Pro_2/Grossnickle Tree/")
# Get file list:
file.list <- list.files()
# Get just the group matrix pages:
file.list <- file.list[grep("~/Desktop/Desktop_Spence... |
### soil texture TERN
## spatial prediction: step 3: untangle compositional data
## modified: 26/3/20
## Finished:
### variables
vart<- "clay"
depth<- "d1"
batch<- 1
srt<- 1
fin<- 500
## libraries
library(parallel);library(sp);library(rgdal);library(doParallel);library(raster);library(compositions)
# root directo... | /Production/DSM/SoilTexture/digitalsoilmapping/spatialprediction/clay/step3/d1/spatialise_clay_d1_1.R | permissive | AusSoilsDSM/SLGA | R | false | false | 3,325 | r | ### soil texture TERN
## spatial prediction: step 3: untangle compositional data
## modified: 26/3/20
## Finished:
### variables
vart<- "clay"
depth<- "d1"
batch<- 1
srt<- 1
fin<- 500
## libraries
library(parallel);library(sp);library(rgdal);library(doParallel);library(raster);library(compositions)
# root directo... |
# Compute the isotonic regression of numeric vector 'x', with
# weights 'wt', with respect to simple order. The pool-adjacent-
# violators algorithm is used. Returns a vector of the same length
# as 'x' containing the regression.
# 02 Sep 1994 / R.F. Raubertas
pava <- function (x, wt=rep(1,length(x)))
{
n <- l... | /scripts/second_version.R | no_license | YixiaoD/A_New_Dose-Finding_Design | R | false | false | 4,655 | r | # Compute the isotonic regression of numeric vector 'x', with
# weights 'wt', with respect to simple order. The pool-adjacent-
# violators algorithm is used. Returns a vector of the same length
# as 'x' containing the regression.
# 02 Sep 1994 / R.F. Raubertas
pava <- function (x, wt=rep(1,length(x)))
{
n <- l... |
###########################################################################/**
# @RdocClass Discretize
#
# @title "Discretize class"
#
# \description{
# Containing all methods related to discritizing an uni/bi-variate normal distribution. Both uniform and nonuniform discretization possible.
# @classhierarchy
# }
#
# ... | /discretizeGaussian/R/discretize.R | permissive | relund/discretizeNormal | R | false | false | 35,703 | r | ###########################################################################/**
# @RdocClass Discretize
#
# @title "Discretize class"
#
# \description{
# Containing all methods related to discritizing an uni/bi-variate normal distribution. Both uniform and nonuniform discretization possible.
# @classhierarchy
# }
#
# ... |
library(tidyverse)
library(readxl)
library(zoo)
##### Mapping to original file headers - ICS Report A
# NHSRegionSortOrder "region_index,",
# NHSRegion "region_name,",
# STPNameEngland "ics_name,",
# FiscalYearQtrLabel "fiscal_year,",
# Category "category,",
# SocialPrescribingreferralSTD_Weeks "ref_st... | /ics-data-v2.R | permissive | orchid-database/ics-reports | R | false | false | 25,795 | r | library(tidyverse)
library(readxl)
library(zoo)
##### Mapping to original file headers - ICS Report A
# NHSRegionSortOrder "region_index,",
# NHSRegion "region_name,",
# STPNameEngland "ics_name,",
# FiscalYearQtrLabel "fiscal_year,",
# Category "category,",
# SocialPrescribingreferralSTD_Weeks "ref_st... |
require(msm)
estVQ <- function(asremlmodel, dataframe, animalid, snpid){
#~~ estimate allele frequencies
freqs <- table(unique(dataframe[,c(animalid, snpid)])[,2])
if(length(freqs) == 3){
p <- (freqs[1] + 0.5*freqs[2])/sum(freqs)
q <- 1-p
}
if(length(freqs) != 3) stop("not enough genotypes")
... | /MCMCglmm.QTLvariance.R | no_license | susjoh/r-functions | R | false | false | 1,281 | r | require(msm)
estVQ <- function(asremlmodel, dataframe, animalid, snpid){
#~~ estimate allele frequencies
freqs <- table(unique(dataframe[,c(animalid, snpid)])[,2])
if(length(freqs) == 3){
p <- (freqs[1] + 0.5*freqs[2])/sum(freqs)
q <- 1-p
}
if(length(freqs) != 3) stop("not enough genotypes")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/energybalance_functions.R
\name{Reynolds_number}
\alias{Reynolds_number}
\title{Calculate Reynolds Number}
\usage{
Reynolds_number(u, D, nu)
}
\arguments{
\item{u}{is wind speed in m/s}
\item{D}{is characteristic dimension (e.g., body diamet... | /man/Reynolds_number.Rd | permissive | ArchiYujie/TrenchR | R | false | true | 2,314 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/energybalance_functions.R
\name{Reynolds_number}
\alias{Reynolds_number}
\title{Calculate Reynolds Number}
\usage{
Reynolds_number(u, D, nu)
}
\arguments{
\item{u}{is wind speed in m/s}
\item{D}{is characteristic dimension (e.g., body diamet... |
## function to prepare predicted fits for plot_fitted_bayes
# modelfit <- surv_dfa[[2]]; names <- surv_tbl$names[[2]];
# years <- surv_tbl$years[[2]]
# descend_order = FALSE
fitted_preds <- function(modelfit, names = NULL, years = NULL,
descend_order = FALSE, subset = NULL,
... | /R/functions/plotting_functions.R | no_license | CamFreshwater/chinDyn | R | false | false | 20,307 | r | ## function to prepare predicted fits for plot_fitted_bayes
# modelfit <- surv_dfa[[2]]; names <- surv_tbl$names[[2]];
# years <- surv_tbl$years[[2]]
# descend_order = FALSE
fitted_preds <- function(modelfit, names = NULL, years = NULL,
descend_order = FALSE, subset = NULL,
... |
logisticModel <- function(n0, rd, K, timesteps) {
# iterate logistic model for desired number of timesteps
N <- rep(0,timesteps+1) # preallocate vector N (faster)
N[1] <- n0 # initialize first time point
# use for loop to iterate
for (t in 1:timesteps) {
N[t+1] <- N[t]*(1 + rd*(1 - N[t]/K))
}
# retu... | /Lecture03/Lecture03_Ex02.R | no_license | luisfreitas07/introduction_to_R_ecology | R | false | false | 344 | r | logisticModel <- function(n0, rd, K, timesteps) {
# iterate logistic model for desired number of timesteps
N <- rep(0,timesteps+1) # preallocate vector N (faster)
N[1] <- n0 # initialize first time point
# use for loop to iterate
for (t in 1:timesteps) {
N[t+1] <- N[t]*(1 + rd*(1 - N[t]/K))
}
# retu... |
ggplot(data, aes(y=Cain, x=BibScore))+geom_smooth()+geom_point()
ggplot(data, aes(y=Cain, x=BOMScore))+geom_smooth()+geom_point()
ggplot(data, aes(y=Cain, x=BibScore*BOMScore))+geom_smooth()+geom_point()
ggplot(data, aes(y=Cain, x=BibScore*Age))+geom_smooth()+geom_point()
ggplot(data, aes(y=Cain, x=Age*BOMScore))+geo... | /MormonsData/EDA.R | no_license | jntrcs/GLMClass | R | false | false | 1,820 | r |
ggplot(data, aes(y=Cain, x=BibScore))+geom_smooth()+geom_point()
ggplot(data, aes(y=Cain, x=BOMScore))+geom_smooth()+geom_point()
ggplot(data, aes(y=Cain, x=BibScore*BOMScore))+geom_smooth()+geom_point()
ggplot(data, aes(y=Cain, x=BibScore*Age))+geom_smooth()+geom_point()
ggplot(data, aes(y=Cain, x=Age*BOMScore))+geo... |
#
# Copyright 2007-2018 The OpenMx Project
#
# 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/licenses/LICENSE-2.0
#
# Unless required by applicable ... | /SilveR/R-3.5.1/library/OpenMx/models/passing/AugmentedGREMLfitfunction.R | permissive | kevinmiles/SilveR | R | false | false | 5,347 | r | #
# Copyright 2007-2018 The OpenMx Project
#
# 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/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
#' Import time series from river flow API.
#'
#' Using the river flow/rainfall API, time series can be extracted, either
#' selecting single dates, periods of record, or entire records for single or
#' multiple sites. Metadata can also be returned for stations in the dataset.
#' All data must be of the same type from t... | /rfInterface/R/import_ts.R | no_license | griffada/flowAPIpackage | R | false | false | 9,156 | r | #' Import time series from river flow API.
#'
#' Using the river flow/rainfall API, time series can be extracted, either
#' selecting single dates, periods of record, or entire records for single or
#' multiple sites. Metadata can also be returned for stations in the dataset.
#' All data must be of the same type from t... |
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
shinyServer(function(input, output){
output$plot1 <- renderPlot({
distype <- ... | /My_DDP_Shiny/server.R | no_license | yogizhere10/my-DDP-Week-4-Project | R | false | false | 668 | r | #
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
shinyServer(function(input, output){
output$plot1 <- renderPlot({
distype <- ... |
rm(list = ls())
setwd("C:/Users/user/Documents/Github/Bike-Rental")
libraries = c("data.table", "plyr","dplyr", "ggplot2","gridExtra","rpart","dplyr","gbm","DMwR","randomForest","usdm","corrgram","DataCombine")
lapply(libraries, require, character.only = TRUE)
daily_data = read.csv('day.csv', header = T, as.is = T)
h... | /Bike_Rental.R | no_license | sauravjoshi/Bike-Rental | R | false | false | 5,100 | r | rm(list = ls())
setwd("C:/Users/user/Documents/Github/Bike-Rental")
libraries = c("data.table", "plyr","dplyr", "ggplot2","gridExtra","rpart","dplyr","gbm","DMwR","randomForest","usdm","corrgram","DataCombine")
lapply(libraries, require, character.only = TRUE)
daily_data = read.csv('day.csv', header = T, as.is = T)
h... |
#' Funções auxiliares
#'
#' Funções auxiliares para manipulação de textos e números.
#'
#' A função \code{wrap.it} é usada para gerar os nomes em eixos de gráficos, quebrando a linha em
#' blocos de no máximo \code{len} caracteres.
#' A função \code{capitalize} transforma um vetor de texto para Iniciais Maiúsculas.
#... | /R/auxiliar.R | no_license | pesquisaR/pesquisaR | R | false | false | 2,331 | r | #' Funções auxiliares
#'
#' Funções auxiliares para manipulação de textos e números.
#'
#' A função \code{wrap.it} é usada para gerar os nomes em eixos de gráficos, quebrando a linha em
#' blocos de no máximo \code{len} caracteres.
#' A função \code{capitalize} transforma um vetor de texto para Iniciais Maiúsculas.
#... |
library(shiny)
shinyServer(function(input, output) {
tabla_1 <- reactive({
#Positivos=Estado_V() %>% mutate(contar=1) %>%
# group_by(Estado=PCR1) %>% summarise(PCR=sum(contar))
})
#Infracciones----
output$pie_plot <- renderAmCharts({
cons_pie=infracciones %>% filter(Responsable==inp... | /Visualización/server.R | no_license | Michaelmacm94/prueba | R | false | false | 2,940 | r | library(shiny)
shinyServer(function(input, output) {
tabla_1 <- reactive({
#Positivos=Estado_V() %>% mutate(contar=1) %>%
# group_by(Estado=PCR1) %>% summarise(PCR=sum(contar))
})
#Infracciones----
output$pie_plot <- renderAmCharts({
cons_pie=infracciones %>% filter(Responsable==inp... |
#' @export
run_em <- function(em_names=NULL, input_list=NULL, em_input_filenames=NULL){
if (!file.exists(file.path(maindir, "em_input"))) stop ("Missing estimation model input file!")
if (is.null(em_names)) stop ("Missing EM information!")
maindir <- input_list$maindir
om_sim_num <- input_list$om_sim_num
ca... | /R/run_em.R | no_license | JonBrodziak/Age_Structured_Stock_Assessment_Model_Comparison | R | false | false | 1,356 | r | #' @export
run_em <- function(em_names=NULL, input_list=NULL, em_input_filenames=NULL){
if (!file.exists(file.path(maindir, "em_input"))) stop ("Missing estimation model input file!")
if (is.null(em_names)) stop ("Missing EM information!")
maindir <- input_list$maindir
om_sim_num <- input_list$om_sim_num
ca... |
library(dplyr)
library(ggplot2)
library(cowplot)
library(corrplot)
library("MASS")
library(car)
library(caret)
library(Information)
library(ROCR)
# read all data into R
emp_survey <- read.csv("C:\\IIITB\\HR Analytics Case Study\\PA-I_Case_Study_HR_Analytics\\employee_survey_data.csv")
gen_data <- read.csv("C:\\IIITB... | /HR Analytics Case Study/PA-I_Case_Study_HR_Analytics/hr_Analytics_missingRemoved_WOE.R | no_license | nitinsriv/R | R | false | false | 79,144 | r |
library(dplyr)
library(ggplot2)
library(cowplot)
library(corrplot)
library("MASS")
library(car)
library(caret)
library(Information)
library(ROCR)
# read all data into R
emp_survey <- read.csv("C:\\IIITB\\HR Analytics Case Study\\PA-I_Case_Study_HR_Analytics\\employee_survey_data.csv")
gen_data <- read.csv("C:\\IIITB... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-1.72131968218895e+83, -7.88781071482504e+93, 1.0823131123826e-105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.796206164336... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615854584-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 757 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-1.72131968218895e+83, -7.88781071482504e+93, 1.0823131123826e-105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.796206164336... |
program <- readLines("day23.txt")
program <- gsub(",", "", program)
program <- strsplit(program, " ")
N <- length(program)
reg <- c(a=0, b=0)
address <- 1
hlf <- function(r){
reg[r] <<- max(0, round(reg[r] / 2))
address + 1
}
tpl <- function(r){
reg[r] <<- reg[r] * 3
address + 1
}
inc <-... | /day23.R | no_license | sethmcg/advent-2015 | R | false | false | 1,061 | r | program <- readLines("day23.txt")
program <- gsub(",", "", program)
program <- strsplit(program, " ")
N <- length(program)
reg <- c(a=0, b=0)
address <- 1
hlf <- function(r){
reg[r] <<- max(0, round(reg[r] / 2))
address + 1
}
tpl <- function(r){
reg[r] <<- reg[r] * 3
address + 1
}
inc <-... |
search_WD=function(string, language="en", what="itemLabel", partial=FALSE,limit=10){
query <- rselect("item","itemLabel", "itemDescription") %>%
rspecify("?item rdfs:label ?itemLabel") %>%
rspecify("?item schema:description ?itemDescription")
if(partial){
query <- query %>%
rfilter(condition=st... | /R/search_WD.R | no_license | lvaudor/wikiquery | R | false | false | 835 | r | search_WD=function(string, language="en", what="itemLabel", partial=FALSE,limit=10){
query <- rselect("item","itemLabel", "itemDescription") %>%
rspecify("?item rdfs:label ?itemLabel") %>%
rspecify("?item schema:description ?itemDescription")
if(partial){
query <- query %>%
rfilter(condition=st... |
\name{do.small.world}
\alias{do.small.world}
\title{ Performs the small world test of the given network. }
\description{
This function provides the ratio of the average path length and the clustering coefficient to verify the small world behavior of the network
}
\usage{
do.small.world(graph, filename = NULL)
}
\argume... | /man/do.small.world.Rd | no_license | cran/netmodels | R | false | false | 821 | rd | \name{do.small.world}
\alias{do.small.world}
\title{ Performs the small world test of the given network. }
\description{
This function provides the ratio of the average path length and the clustering coefficient to verify the small world behavior of the network
}
\usage{
do.small.world(graph, filename = NULL)
}
\argume... |
#' Loughran-McDonald Polarity Table
#'
#' A \pkg{data.table} dataset containing an filtered version of Loughran &
#' McDonald's (2016) positive/negative financial word list as sentiment lookup
#' values.
#'
#' @details
#' \itemize{
#' \item x. Words
#' \item y. Sentiment values
#' }
#'
#' @section Licen... | /R/hash_sentiment_loughran_mcdonald.R | no_license | cran/lexicon | R | false | false | 1,147 | r | #' Loughran-McDonald Polarity Table
#'
#' A \pkg{data.table} dataset containing an filtered version of Loughran &
#' McDonald's (2016) positive/negative financial word list as sentiment lookup
#' values.
#'
#' @details
#' \itemize{
#' \item x. Words
#' \item y. Sentiment values
#' }
#'
#' @section Licen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s.H2ODL.R
\name{s.H2ODL}
\alias{s.H2ODL}
\title{Deep Learning on H2O [C, R]}
\usage{
s.H2ODL(
x,
y = NULL,
x.test = NULL,
y.test = NULL,
x.valid = NULL,
y.valid = NULL,
x.name = NULL,
y.name = NULL,
ip = "localhost",
port ... | /man/s.H2ODL.Rd | no_license | tlarzg/rtemis | R | false | true | 6,586 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s.H2ODL.R
\name{s.H2ODL}
\alias{s.H2ODL}
\title{Deep Learning on H2O [C, R]}
\usage{
s.H2ODL(
x,
y = NULL,
x.test = NULL,
y.test = NULL,
x.valid = NULL,
y.valid = NULL,
x.name = NULL,
y.name = NULL,
ip = "localhost",
port ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.