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 |
|---|---|---|---|---|---|---|---|---|---|
#' lineplot for bw file
#' @description Plot line-plot of each percentile for given gene-list.
#' @author pooja sethiya
#' @param feature_txDb A TxDb object of gene feature file, generated by
#' \code{GenomicFeatures::makeTxDbFromGFF()}
#' @param genelist A tibble with two columns \code{1. gene_id and 2.Expression
#'... | /R/lineplot_from_bw.R | no_license | sethiyap/FungalSporeAnalysis | R | false | false | 8,211 | r | #' lineplot for bw file
#' @description Plot line-plot of each percentile for given gene-list.
#' @author pooja sethiya
#' @param feature_txDb A TxDb object of gene feature file, generated by
#' \code{GenomicFeatures::makeTxDbFromGFF()}
#' @param genelist A tibble with two columns \code{1. gene_id and 2.Expression
#'... |
\name{operfar-package}
\alias{operfar-package}
\alias{operfar}
\docType{package}
\title{
What the package does (short line)
~~ package title ~~
}
\description{
More about what it does (maybe more than one line)
~~ A concise (1-5 lines) description of the package ~~
}
\details{
\tabular{ll}{
Package: \tab operfar\cr
Typ... | /man/operfar-package.Rd | permissive | rqkoelle/operfar | R | false | false | 1,039 | rd | \name{operfar-package}
\alias{operfar-package}
\alias{operfar}
\docType{package}
\title{
What the package does (short line)
~~ package title ~~
}
\description{
More about what it does (maybe more than one line)
~~ A concise (1-5 lines) description of the package ~~
}
\details{
\tabular{ll}{
Package: \tab operfar\cr
Typ... |
testlist <- list(latLongs = structure(c(7.51874629132484e-308, 0, 0, 0), .Dim = c(1L, 4L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) | /MGDrivE/inst/testfiles/calcCos/libFuzzer_calcCos/calcCos_valgrind_files/1612727315-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 156 | r | testlist <- list(latLongs = structure(c(7.51874629132484e-308, 0, 0, 0), .Dim = c(1L, 4L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) |
##############################################################################################
# Script written by: Luis Figueroa
#
# This script was produced for the first assignment of the reproducible research course of the
# Johns Hopkins University's Data Science specialization track in Coursera
#
##############... | /Plot2.R | no_license | luisefigueroa/ExData_Plotting1 | R | false | false | 1,303 | r | ##############################################################################################
# Script written by: Luis Figueroa
#
# This script was produced for the first assignment of the reproducible research course of the
# Johns Hopkins University's Data Science specialization track in Coursera
#
##############... |
#!/home/biology/opt/R-3.4.1/bin/Rscript
#PBS -q fat
#PBS -N featureCounts
#PBS -l nodes=1:ppn=12
#PBS -j oe
#PBS -l walltime=10:00:00
#PBS -V
library(Rsubread)
args<-commandArgs(T)
#args = c('/data1/lyk/clean_data/rmsk/tead1.repeatMasker.gtf','/data1/lyk/clean_data/rmsk/table_fc_tead1_prost.tsv','/data1/lyk/clean_d... | /workspace/rmsk/feature_count.r.2018050611 | no_license | ijayden-lung/hpc | R | false | false | 2,219 | 2018050611 | #!/home/biology/opt/R-3.4.1/bin/Rscript
#PBS -q fat
#PBS -N featureCounts
#PBS -l nodes=1:ppn=12
#PBS -j oe
#PBS -l walltime=10:00:00
#PBS -V
library(Rsubread)
args<-commandArgs(T)
#args = c('/data1/lyk/clean_data/rmsk/tead1.repeatMasker.gtf','/data1/lyk/clean_data/rmsk/table_fc_tead1_prost.tsv','/data1/lyk/clean_d... |
StatsBombFreeEvents <- function(MatchesDF = "ALL", Parallel = T){
print("Whilst we are keen to share data and facilitate research, we also urge you to be responsible with the data. Please register your details on https://www.statsbomb.com/resource-centre and read our User Agreement carefully.")
events.df <- tibble(... | /R/StatsBombFreeEvents.R | no_license | RobWHickman/StatsBombR | R | false | false | 1,793 | r | StatsBombFreeEvents <- function(MatchesDF = "ALL", Parallel = T){
print("Whilst we are keen to share data and facilitate research, we also urge you to be responsible with the data. Please register your details on https://www.statsbomb.com/resource-centre and read our User Agreement carefully.")
events.df <- tibble(... |
predictESN <- function(model,
data,
trainLen = 2000,
testLen = 1){
inSize <- model$inSize
outSize <- model$outSize
leakingRate <- model$leakingRate
x <- model$x
Win <- model$Win
W <- model$W
Wout <- model$Wout
data = data[2:length(d... | /code/predictESN.R | no_license | dylansun/ES2VM | R | false | false | 899 | r | predictESN <- function(model,
data,
trainLen = 2000,
testLen = 1){
inSize <- model$inSize
outSize <- model$outSize
leakingRate <- model$leakingRate
x <- model$x
Win <- model$Win
W <- model$W
Wout <- model$Wout
data = data[2:length(d... |
#' Construct a variable definition
#'
#' Crunch variables are created by posting a `VariableDefinition` to the Crunch server.
#' The `VariableDefinition` contains the information the server requires to
#' calculate the variable. This can information can either be in the form
#' of the actual data which you would like t... | /R/variable-definition.R | no_license | GitBrianLaw/rcrunch | R | false | false | 1,744 | r | #' Construct a variable definition
#'
#' Crunch variables are created by posting a `VariableDefinition` to the Crunch server.
#' The `VariableDefinition` contains the information the server requires to
#' calculate the variable. This can information can either be in the form
#' of the actual data which you would like t... |
context("tidiers")
skip_if_not_installed("broom")
library(broom)
load(test_path("helper_data.Rda"))
test_that("tidy.model_stack behaves appropriately without needed tidiers", {
expect_message(tidy_st_reg_1__ <- tidy(st_reg_1__))
expect_message(tidy_st_class_1__ <- tidy(st_class_1__))
expect_true(nrow(tidy_st... | /tests/testthat/test_tidiers.R | permissive | kwiscion/stacks | R | false | false | 981 | r | context("tidiers")
skip_if_not_installed("broom")
library(broom)
load(test_path("helper_data.Rda"))
test_that("tidy.model_stack behaves appropriately without needed tidiers", {
expect_message(tidy_st_reg_1__ <- tidy(st_reg_1__))
expect_message(tidy_st_class_1__ <- tidy(st_class_1__))
expect_true(nrow(tidy_st... |
#' Import Geva data (Allele Age)
#'
#' @param chrom string, linkage group identifier
#' @param start numeric, start position (bp)
#' @param end numeric, end position (bp)
#' @param ... catch all parameter, for usage with purrr::pmap() and unexpected parameters
#'
#' @export
import_geva_data <- function(chrom, start... | /R/functions_f6.R | permissive | k-hench/GenomicOriginsScripts | R | false | false | 4,240 | r | #' Import Geva data (Allele Age)
#'
#' @param chrom string, linkage group identifier
#' @param start numeric, start position (bp)
#' @param end numeric, end position (bp)
#' @param ... catch all parameter, for usage with purrr::pmap() and unexpected parameters
#'
#' @export
import_geva_data <- function(chrom, start... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{.add_lm}
\alias{.add_lm}
\title{Add regression line to ggplot object}
\usage{
.add_lm(gg_in, lab_pos = NULL, lab_size = 3.5, ...)
}
\arguments{
\item{gg_in}{ggplot object}
\item{lab_pos}{Position of correlation coefficient labe... | /man/dot-add_lm.Rd | permissive | friedue/djvdj | R | false | true | 545 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{.add_lm}
\alias{.add_lm}
\title{Add regression line to ggplot object}
\usage{
.add_lm(gg_in, lab_pos = NULL, lab_size = 3.5, ...)
}
\arguments{
\item{gg_in}{ggplot object}
\item{lab_pos}{Position of correlation coefficient labe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getPoints.R
\name{getPoints}
\alias{getPoints}
\title{getPoints}
\usage{
getPoints(object, times = NA, years = NA, points = NA,
output = "dataframe")
}
\arguments{
\item{object}{An NCRNbirds object or a list of such objects.}
\item{times}{... | /man/getPoints.Rd | no_license | hbrittingham/NCRNbirds | R | false | true | 1,529 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getPoints.R
\name{getPoints}
\alias{getPoints}
\title{getPoints}
\usage{
getPoints(object, times = NA, years = NA, points = NA,
output = "dataframe")
}
\arguments{
\item{object}{An NCRNbirds object or a list of such objects.}
\item{times}{... |
#!/usr/bin/env Rscript
library(dplyr)
library(magrittr)
library(ggplot2)
library(ggplot2bdc)
source('figsummary.R')
source('formatting.R')
dilutiondata <- read.csv(bzfile('../data/dilution.csv.bz2'))
dilutiondata$Replicate <- as.factor(dilutiondata$Replicate)
figXb <- ggplot(data=dilutiondata,
aes(... | /scripts/plot-dilution.R | permissive | briandconnelly/nicheconstruct | R | false | false | 1,402 | r | #!/usr/bin/env Rscript
library(dplyr)
library(magrittr)
library(ggplot2)
library(ggplot2bdc)
source('figsummary.R')
source('formatting.R')
dilutiondata <- read.csv(bzfile('../data/dilution.csv.bz2'))
dilutiondata$Replicate <- as.factor(dilutiondata$Replicate)
figXb <- ggplot(data=dilutiondata,
aes(... |
# Chapter 3.1
# Create a variable called
TEMPERATURE <- c(54.5, 59.5, 63.5, 67.5, 72, 78.5, 83.0)
# Create a variable called COST
CHIRPS <- c(81, 97, 103, 123, 150, 182, 195)
CHIRPDATAFRAME <- data.frame(TEMPERATURE, CHIRPS)
library(ggplot2)
ggplot(CHIRPDATAFRAME,
aes(x = CHIRPS ,
y = TEMPERATU... | /MATH 212/R Files/Chapter 3.1_Student.R | no_license | zackroder/Spring-2021 | R | false | false | 1,210 | r | # Chapter 3.1
# Create a variable called
TEMPERATURE <- c(54.5, 59.5, 63.5, 67.5, 72, 78.5, 83.0)
# Create a variable called COST
CHIRPS <- c(81, 97, 103, 123, 150, 182, 195)
CHIRPDATAFRAME <- data.frame(TEMPERATURE, CHIRPS)
library(ggplot2)
ggplot(CHIRPDATAFRAME,
aes(x = CHIRPS ,
y = TEMPERATU... |
#! /share/ClusterShare/software/contrib/CTP_single_cell/tools/R_developers/config_R-3.5.0/bin/Rscript
args = commandArgs(trailingOnly=TRUE)
subproject_name <- args[1]
sample_name <- args[2]
subset_data <- as.logical(args[3])
numcores=as.numeric(args[4])
draw_bulk_annotations <- as.logical(args[5])
#subproject_name <-... | /identify_normals/2.infercnv.R | no_license | Chenmengpin/identify_epithelial | R | false | false | 42,979 | r | #! /share/ClusterShare/software/contrib/CTP_single_cell/tools/R_developers/config_R-3.5.0/bin/Rscript
args = commandArgs(trailingOnly=TRUE)
subproject_name <- args[1]
sample_name <- args[2]
subset_data <- as.logical(args[3])
numcores=as.numeric(args[4])
draw_bulk_annotations <- as.logical(args[5])
#subproject_name <-... |
############################################################
#
# R script for the software paper:
# RegularizedSCA: Regularized Simultaneous Component Analysis for
# Data Integration in R
#
# Zhengguo Gu, Katrijn Van Deun
# Department of Methodology and Statistics
# Tilburg University
# email: z.gu@uvt.nl (... | /ForReviewers/paperRSCA_minorRevision.R | no_license | ZhengguoGu/paperRegularizedSCA | R | false | false | 9,354 | r | ############################################################
#
# R script for the software paper:
# RegularizedSCA: Regularized Simultaneous Component Analysis for
# Data Integration in R
#
# Zhengguo Gu, Katrijn Van Deun
# Department of Methodology and Statistics
# Tilburg University
# email: z.gu@uvt.nl (... |
# 1) Find the 2nd largest number from any given set of
# random numbers:
numb = sample(1:100, 15)
secLarg = sort(numb, decreasing = T)
secLarg[2]
# 2) Find 2nd and 4th largest numbers from any given set
# of random numbers:
secLarg[c(2,4)]
# 3) Create a function to allow the user to select any
#... | /R Programming/Coding Challenge/Exercise-7.R | no_license | signupwithanand/R-and-Python-Programming | R | false | false | 517 | r | # 1) Find the 2nd largest number from any given set of
# random numbers:
numb = sample(1:100, 15)
secLarg = sort(numb, decreasing = T)
secLarg[2]
# 2) Find 2nd and 4th largest numbers from any given set
# of random numbers:
secLarg[c(2,4)]
# 3) Create a function to allow the user to select any
#... |
library("data.table")
setwd("~")
powerDT <- data.table::fread(input = "household_power_consumption.txt"#Reads in data from file then subsets data for specified dates
, na.strings="?"
)
# Prevents Scientific Notation
powerDT[, Global_active_power := lapply(.SD, as.numeric), .SD... | /plot3.R | no_license | fleuris11/ExData_Plotting1 | R | false | false | 1,101 | r | library("data.table")
setwd("~")
powerDT <- data.table::fread(input = "household_power_consumption.txt"#Reads in data from file then subsets data for specified dates
, na.strings="?"
)
# Prevents Scientific Notation
powerDT[, Global_active_power := lapply(.SD, as.numeric), .SD... |
library(Lahman)
library(dplyr)
library(ggraph)
library(tidygraph)
hof <- Lahman::HallOfFame %>% filter(inducted == 'Y' & category == 'Player' & votedBy == 'BBWAA') %>% select(playerID) %>%
inner_join(Pitching %>% select(playerID, yearID, teamID), by = 'playerID') %>%
full_join(Lahman::HallOfFame %>% filter(inducted ... | /Visualization/HOF_network.r | no_license | czsheets/MCS | R | false | false | 1,999 | r | library(Lahman)
library(dplyr)
library(ggraph)
library(tidygraph)
hof <- Lahman::HallOfFame %>% filter(inducted == 'Y' & category == 'Player' & votedBy == 'BBWAA') %>% select(playerID) %>%
inner_join(Pitching %>% select(playerID, yearID, teamID), by = 'playerID') %>%
full_join(Lahman::HallOfFame %>% filter(inducted ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/surveypal_api.R
\name{sp_get_elements}
\alias{sp_get_elements}
\title{sp_get_elements}
\usage{
sp_get_elements(
survey_id,
api_key,
locale = NULL,
use_question_id = FALSE,
encoding = "UTF-8"
)
}
\arguments{
\item{survey_id}{Survey i... | /man/sp_get_elements.Rd | permissive | JouniVatanen/stools | R | false | true | 643 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/surveypal_api.R
\name{sp_get_elements}
\alias{sp_get_elements}
\title{sp_get_elements}
\usage{
sp_get_elements(
survey_id,
api_key,
locale = NULL,
use_question_id = FALSE,
encoding = "UTF-8"
)
}
\arguments{
\item{survey_id}{Survey i... |
## 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
setinverse <- function(inverse) m <<- inverse
getinverse <- ... | /cachematrix.R | no_license | danielgcc/ProgramAssign2 | R | false | false | 641 | 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
setinverse <- function(inverse) m <<- inverse
getinverse <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NOAACoursera.R
\docType{package}
\name{NOAACoursera-package}
\alias{NOAACoursera}
\alias{NOAACoursera-package}
\title{NOAACoursera - Coursera Capstone Project}
\description{
This is the final project of the Coursera's "Master Software Develop... | /man/NOAACoursera-package.Rd | no_license | rhkaz/noaamsdr | R | false | true | 529 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NOAACoursera.R
\docType{package}
\name{NOAACoursera-package}
\alias{NOAACoursera}
\alias{NOAACoursera-package}
\title{NOAACoursera - Coursera Capstone Project}
\description{
This is the final project of the Coursera's "Master Software Develop... |
#' A diamondplot with confidence intervals for associations
#'
#' This function produces is a diamondplot that plots the confidence intervals
#' for associations between a number of covariates and a criterion. It
#' currently only supports the Pearson's r effect size metric; other effect
#' sizes are converted to Pear... | /R/associationsDiamondPlot.R | no_license | Matherion/userfriendlyscience | R | false | false | 11,195 | r | #' A diamondplot with confidence intervals for associations
#'
#' This function produces is a diamondplot that plots the confidence intervals
#' for associations between a number of covariates and a criterion. It
#' currently only supports the Pearson's r effect size metric; other effect
#' sizes are converted to Pear... |
#################### Random Forests - Prospective Customers ############
# Problem Statement
# # The input data contains surveyed information about potential customers for a bank. The goal is to build a
# model that would predict if the prospect would become a customer of a bank, if contacted by a marketing
# exercis... | /R Scripts/Script-predictProspectiveCustomers.R | no_license | ankurgautam/prospectivecustomers | R | false | false | 3,813 | r | #################### Random Forests - Prospective Customers ############
# Problem Statement
# # The input data contains surveyed information about potential customers for a bank. The goal is to build a
# model that would predict if the prospect would become a customer of a bank, if contacted by a marketing
# exercis... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
dingfeiPG <- function(X, lambda, Omega, index, maxinteration) {
.Call('_dingfeiPG_dingfeiPG', PACKAGE = 'dingfeiPG', X, lambda, Omega, index, maxinteration)
}
| /dingfeiPG/R/RcppExports.R | no_license | darcyfly/dingfeiPG | R | false | false | 291 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
dingfeiPG <- function(X, lambda, Omega, index, maxinteration) {
.Call('_dingfeiPG_dingfeiPG', PACKAGE = 'dingfeiPG', X, lambda, Omega, index, maxinteration)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/expect-frame.R
\name{vis_expect}
\alias{vis_expect}
\title{Visualise whether a value is in a data frame}
\usage{
vis_expect(data, expectation)
}
\arguments{
\item{data}{a data.frame}
\item{expectation}{a formula following the syntax: \code{~... | /man/vis_expect.Rd | no_license | ktaranov/visdat | R | false | true | 899 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/expect-frame.R
\name{vis_expect}
\alias{vis_expect}
\title{Visualise whether a value is in a data frame}
\usage{
vis_expect(data, expectation)
}
\arguments{
\item{data}{a data.frame}
\item{expectation}{a formula following the syntax: \code{~... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot2_geom_ma.R
\name{geom_ma}
\alias{geom_ma}
\alias{geom_ma_}
\title{Plot moving averages}
\usage{
geom_ma(mapping = NULL, data = NULL, position = "identity",
na.rm = TRUE, show.legend = NA, inherit.aes = TRUE, ma_fun = SMA,
n = 20, w... | /man/geom_ma.Rd | no_license | mikebesso/two.laws.quant.charts | R | false | true | 6,306 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot2_geom_ma.R
\name{geom_ma}
\alias{geom_ma}
\alias{geom_ma_}
\title{Plot moving averages}
\usage{
geom_ma(mapping = NULL, data = NULL, position = "identity",
na.rm = TRUE, show.legend = NA, inherit.aes = TRUE, ma_fun = SMA,
n = 20, w... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pvdiv_gwas.R
\name{pvdiv_manhattan}
\alias{pvdiv_manhattan}
\title{Create a Manhattan plot with ggplot2.}
\usage{
pvdiv_manhattan(effects, ind = NULL, snp = NULL, thr = NULL, ncores = 1)
}
\arguments{
\item{effects}{Either a gwas effects RDS ... | /man/pvdiv_manhattan.Rd | no_license | Alice-MacQueen/switchgrassGWAS | R | false | true | 1,112 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pvdiv_gwas.R
\name{pvdiv_manhattan}
\alias{pvdiv_manhattan}
\title{Create a Manhattan plot with ggplot2.}
\usage{
pvdiv_manhattan(effects, ind = NULL, snp = NULL, thr = NULL, ncores = 1)
}
\arguments{
\item{effects}{Either a gwas effects RDS ... |
#' The followin functions are largely copied and modified from seqLogo packages
#' (https://www.bioconductor.org/packages/release/bioc/html/seqLogo.html).
#' Generate a data frame for a polygon of "A" character
#'
#' @param x.pos The x-coordinate of the bottom left of the polygon.
#' @param y.pos The y-coordinate of ... | /R/letter.R | no_license | friend1ws/ggseqlogo | R | false | false | 4,834 | r | #' The followin functions are largely copied and modified from seqLogo packages
#' (https://www.bioconductor.org/packages/release/bioc/html/seqLogo.html).
#' Generate a data frame for a polygon of "A" character
#'
#' @param x.pos The x-coordinate of the bottom left of the polygon.
#' @param y.pos The y-coordinate of ... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/plot.lib.R
\name{plotPed}
\alias{plotPed}
\title{Plot the pedigree}
\usage{
plotPed(data, ped)
}
\arguments{
\item{data}{A data.frame of phenotypes.}
\item{ped}{An integer or a character value, that indicates the pedigree.}
}
\descri... | /man/plotPed.Rd | no_license | cran/solarius | R | false | false | 664 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/plot.lib.R
\name{plotPed}
\alias{plotPed}
\title{Plot the pedigree}
\usage{
plotPed(data, ped)
}
\arguments{
\item{data}{A data.frame of phenotypes.}
\item{ped}{An integer or a character value, that indicates the pedigree.}
}
\descri... |
library(shiny)
library(shinythemes)
shinyUI(fluidPage( theme=shinytheme("readable"),
titlePanel(paste("Get male body fat in 2 seconds!")),
fluidRow(
column(4,
h4("Step1"),
p("Choose unit of measurement")
... | /code/Shiny_V1/ui.R | no_license | yuhanmeng/UW-STAT628-M2 | R | false | false | 1,931 | r | library(shiny)
library(shinythemes)
shinyUI(fluidPage( theme=shinytheme("readable"),
titlePanel(paste("Get male body fat in 2 seconds!")),
fluidRow(
column(4,
h4("Step1"),
p("Choose unit of measurement")
... |
testlist <- list(score = NULL, id = NULL, item_score = c(-741092397L, -746577152L, 229L, -452926208L, NA), person_id = c(256L, -439098060L, 82175443L, -387652123L, -438041371L, NA, -437941532L, 65535L))
result <- do.call(dexterMST:::im_booklet_score,testlist)
str(result) | /dexterMST/inst/testfiles/im_booklet_score/AFL_im_booklet_score/im_booklet_score_valgrind_files/1615944396-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 273 | r | testlist <- list(score = NULL, id = NULL, item_score = c(-741092397L, -746577152L, 229L, -452926208L, NA), person_id = c(256L, -439098060L, 82175443L, -387652123L, -438041371L, NA, -437941532L, 65535L))
result <- do.call(dexterMST:::im_booklet_score,testlist)
str(result) |
library(usethis)
library(here)
library(devtools)
library(tidyverse)
usethis::create_github_token() # Create and copy your Personal Access Token (PAT) from GitHub
gitcreds::gitcreds_set() # Log your PAT with your RStudio installation
gh::gh_whoami() # verify PAT token, optional
usethis::git_si... | /ReproducibleWorkflow_R&Git.R | permissive | justinthomasmann/ReproducibleWorkflowWrkshp | R | false | false | 583 | r | library(usethis)
library(here)
library(devtools)
library(tidyverse)
usethis::create_github_token() # Create and copy your Personal Access Token (PAT) from GitHub
gitcreds::gitcreds_set() # Log your PAT with your RStudio installation
gh::gh_whoami() # verify PAT token, optional
usethis::git_si... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_docs.r
\name{read_docx}
\alias{read_docx}
\title{Read in a Word document for table extraction}
\usage{
read_docx(path)
}
\arguments{
\item{path}{path to the Word document}
}
\description{
Local file path or URL pointing to a \code{.docx}... | /man/read_docx.Rd | no_license | bdilday/docxtractr | R | false | true | 500 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_docs.r
\name{read_docx}
\alias{read_docx}
\title{Read in a Word document for table extraction}
\usage{
read_docx(path)
}
\arguments{
\item{path}{path to the Word document}
}
\description{
Local file path or URL pointing to a \code{.docx}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/refine.R
\name{refine}
\alias{refine}
\title{refine}
\usage{
refine(Multilayer.object, k, m, n)
}
\arguments{
\item{Multilayer.object:}{a MultilayerCommunity object that contains communities extracted from the multilayer.extraction algorithm.... | /man/refine.Rd | no_license | niu9146/MultilayerExtraction | R | false | true | 1,429 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/refine.R
\name{refine}
\alias{refine}
\title{refine}
\usage{
refine(Multilayer.object, k, m, n)
}
\arguments{
\item{Multilayer.object:}{a MultilayerCommunity object that contains communities extracted from the multilayer.extraction algorithm.... |
library(blogdown)
blogdown::new_site(dir = ".",
install_hugo = TRUE,
format = "toml",
sample = TRUE,
theme = "yihui/hugo-lithium",
hostname = "github.com",
theme_example = TRUE,
empty_dir... | /code/code for 2019 cesr.R | permissive | lumucanada/sta304 | R | false | false | 407 | r | library(blogdown)
blogdown::new_site(dir = ".",
install_hugo = TRUE,
format = "toml",
sample = TRUE,
theme = "yihui/hugo-lithium",
hostname = "github.com",
theme_example = TRUE,
empty_dir... |
library(proto)
library(knitr)
library(xml2)
library(rvest)
library(gsubfn)
library(reshape2)
library(shiny)
library(readr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(maptools)
library(rgdal)
library(rgeos)
library(ggvis)
library(GGally)
# Uvozimo funkcije za pobiranje in uvoz zemljevida.
source("lib/uvozi.... | /lib/libraries.r | permissive | evadezelak/APPR-2018-19 | R | false | false | 353 | r | library(proto)
library(knitr)
library(xml2)
library(rvest)
library(gsubfn)
library(reshape2)
library(shiny)
library(readr)
library(dplyr)
library(tidyr)
library(ggplot2)
library(maptools)
library(rgdal)
library(rgeos)
library(ggvis)
library(GGally)
# Uvozimo funkcije za pobiranje in uvoz zemljevida.
source("lib/uvozi.... |
#' Confusion Matrix Generation - Individual Value Function
#'
#' Returns a function for use with confusion.matrix based on actual or predicted being a particular value.
#'
#' @param value Scalar - Value to compare actual and predicted with.
#'
#' @return A function for use with a call to confusion.matrix().
confus... | /R/confusion.matrix.fn.value.R | permissive | burrm/lolcat | R | false | false | 409 | r | #' Confusion Matrix Generation - Individual Value Function
#'
#' Returns a function for use with confusion.matrix based on actual or predicted being a particular value.
#'
#' @param value Scalar - Value to compare actual and predicted with.
#'
#' @return A function for use with a call to confusion.matrix().
confus... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format_pbold.R
\name{format_pbold}
\alias{format_pbold}
\title{Format a column}
\usage{
format_pbold(ft, pval, psig = 0.05, j = NA)
}
\arguments{
\item{ft}{A flextable object}
\item{pval}{(String) Name of pvalue colum}
\item{psig}{A numeric... | /man/format_pbold.Rd | permissive | overdodactyl/mRclwhip | R | false | true | 494 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format_pbold.R
\name{format_pbold}
\alias{format_pbold}
\title{Format a column}
\usage{
format_pbold(ft, pval, psig = 0.05, j = NA)
}
\arguments{
\item{ft}{A flextable object}
\item{pval}{(String) Name of pvalue colum}
\item{psig}{A numeric... |
parse.graphml.standard <- function(file, nodes, use.names) {
doc <- xmlParse(file, useInternalNodes = TRUE)
top <- xmlRoot(doc)
graph <- top[["graph"]]
if (!use.names) {
if (xmlSize(which(xmlSApply(graph, xmlName) == "node")) != length(nodes)) stop("Incorrect number of node names")
}
ns <- c(ns = "http:... | /R/parse.graphml.standard.R | no_license | COVID-19-Causal-Reasoning/causaleffect | R | false | false | 2,550 | r | parse.graphml.standard <- function(file, nodes, use.names) {
doc <- xmlParse(file, useInternalNodes = TRUE)
top <- xmlRoot(doc)
graph <- top[["graph"]]
if (!use.names) {
if (xmlSize(which(xmlSApply(graph, xmlName) == "node")) != length(nodes)) stop("Incorrect number of node names")
}
ns <- c(ns = "http:... |
# Read full dataset
power_data_all <- read.table("household_power_consumption.txt", header=TRUE, stringsAsFactors=FALSE, sep=";", na.strings="?")
# Subset needed data
power_data_sub <- subset(power_data_all, Date %in% c("1/2/2007","2/2/2007"))
rm("power_data_all")
# Plot 1
png("plot1.png", height=480, width=... | /plot1.R | no_license | badede/ExData_Plotting1 | R | false | false | 441 | r | # Read full dataset
power_data_all <- read.table("household_power_consumption.txt", header=TRUE, stringsAsFactors=FALSE, sep=";", na.strings="?")
# Subset needed data
power_data_sub <- subset(power_data_all, Date %in% c("1/2/2007","2/2/2007"))
rm("power_data_all")
# Plot 1
png("plot1.png", height=480, width=... |
library(tidyverse)
# District and School Names ---------------------------------------------------------------------------------------
system_names <- read_csv("N:/ORP_accountability/data/2017_final_accountability_files/system_name_crosswalk.csv")
school_names <- readxl::read_excel("N:/ORP_accountability/data/2017_fi... | /2017-accountability/school/8. school_summary_file.R | no_license | tnedu/accountability | R | false | false | 3,241 | r | library(tidyverse)
# District and School Names ---------------------------------------------------------------------------------------
system_names <- read_csv("N:/ORP_accountability/data/2017_final_accountability_files/system_name_crosswalk.csv")
school_names <- readxl::read_excel("N:/ORP_accountability/data/2017_fi... |
library(quanteda)
### Name: dfm2lsa
### Title: Convert a dfm to an lsa "textmatrix"
### Aliases: dfm2lsa
### Keywords: internal
### ** Examples
## Not run:
##D (mydfm <- dfm(c(d1 = "this is a first matrix",
##D d2 = "this is second matrix as example")))
##D lsa::lsa(convert(mydfm, to = "lsa"))
## ... | /data/genthat_extracted_code/quanteda/examples/dfm2lsa.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 336 | r | library(quanteda)
### Name: dfm2lsa
### Title: Convert a dfm to an lsa "textmatrix"
### Aliases: dfm2lsa
### Keywords: internal
### ** Examples
## Not run:
##D (mydfm <- dfm(c(d1 = "this is a first matrix",
##D d2 = "this is second matrix as example")))
##D lsa::lsa(convert(mydfm, to = "lsa"))
## ... |
/BigData/04DataHandling.R | no_license | KIMJUNHOEHOE/hyuniv_Program-R_Study | R | false | false | 16,797 | r | ||
library(magrittr)
source("R/Tables.R")
source("R/Plots.R")
source("R/Results.R")
# shinySettings <- list(connectionDetails = DatabaseConnector::createConnectionDetails(dbms = "postgresql",
# server = "localhost/ohdsi",
# user = ... | /PhenotypeLibrary/global.R | no_license | han-tun/ShinyDeploy | R | false | false | 16,006 | r | library(magrittr)
source("R/Tables.R")
source("R/Plots.R")
source("R/Results.R")
# shinySettings <- list(connectionDetails = DatabaseConnector::createConnectionDetails(dbms = "postgresql",
# server = "localhost/ohdsi",
# user = ... |
= class Cairo::Color::Base
((*Since 1.5?*)): 簡単に色を扱うためのクラスです。RGBで指定し
ていたものはすべてこのクラスのオブジェクトで指定する事もでき
ます。実際に使うときはCairo::Color::RGBなどこのクラスの
サブクラスを使います。
cairoにはないrcairoでの拡張です。
== Object Hierarchy
* Object
* Cairo::Color::Base
== Class Methods
--- Cairo::Color::Base.new(alpha)
普通は使いません。
== Instance Methods
-... | /ja/cairo-color-base.rd | no_license | rcairo/doc | R | false | false | 867 | rd | = class Cairo::Color::Base
((*Since 1.5?*)): 簡単に色を扱うためのクラスです。RGBで指定し
ていたものはすべてこのクラスのオブジェクトで指定する事もでき
ます。実際に使うときはCairo::Color::RGBなどこのクラスの
サブクラスを使います。
cairoにはないrcairoでの拡張です。
== Object Hierarchy
* Object
* Cairo::Color::Base
== Class Methods
--- Cairo::Color::Base.new(alpha)
普通は使いません。
== Instance Methods
-... |
# Write a function named 'pollutantmean' that calculates the mean of a pollutant (sulfate or nitrate) across a specified
# list of monitors. The function 'pollutantmean' takes three arguments: 'directory', 'pollutant', and 'id'. Given a
# vector monitor ID numbers, 'pollutantmean' reads that monitors' particulate ma... | /rprog-010/prog_assignment_1/pollutantmean.R | no_license | coolbaskin/datasciencecoursera | R | false | false | 2,929 | r | # Write a function named 'pollutantmean' that calculates the mean of a pollutant (sulfate or nitrate) across a specified
# list of monitors. The function 'pollutantmean' takes three arguments: 'directory', 'pollutant', and 'id'. Given a
# vector monitor ID numbers, 'pollutantmean' reads that monitors' particulate ma... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dsdive.tx.params.R
\name{dsdive.tx.params}
\alias{dsdive.tx.params}
\title{Compute transition parameters for a given depth bin}
\usage{
dsdive.tx.params(depth.bins, d0, s0, beta, lambda)
}
\arguments{
\item{depth.bins}{\eqn{n x 2} Matrix that... | /man/dsdive.tx.params.Rd | no_license | jmhewitt/dsdive | R | false | true | 1,174 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dsdive.tx.params.R
\name{dsdive.tx.params}
\alias{dsdive.tx.params}
\title{Compute transition parameters for a given depth bin}
\usage{
dsdive.tx.params(depth.bins, d0, s0, beta, lambda)
}
\arguments{
\item{depth.bins}{\eqn{n x 2} Matrix that... |
# checks if the data source is loaded and loads it if not.
checkDataSourceLoaded <- function(){
if(!exists("householdPowerConsumption"))
{
col_class<-c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric")
ds<-read.csv("household_power_consumption.txt", header=TRU... | /plot3.R | no_license | f-kakaei/ExData_Plotting1 | R | false | false | 1,191 | r |
# checks if the data source is loaded and loads it if not.
checkDataSourceLoaded <- function(){
if(!exists("householdPowerConsumption"))
{
col_class<-c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric")
ds<-read.csv("household_power_consumption.txt", header=TRU... |
###Analyses of Quantified Wings for MALES###
### Data input, check and fix####
setwd("./")
sd.data <- read.csv ("sdE3_males_modifiers.csv", h=T)
head(sd.data)
tail(sd.data)
str(sd.data)
sd.data$Deletion <- as.factor(sd.data$Deletion)
sd.data$Dummy <- ifelse(sd.data$Deletion=="6326", "Control","Deletion" ) # Creates ... | /sdE3_modifierScreen/Hemizygous Males/rscript_sdE3_Males.R | no_license | DworkinLab/ChariDworkin2013 | R | false | false | 4,710 | r | ###Analyses of Quantified Wings for MALES###
### Data input, check and fix####
setwd("./")
sd.data <- read.csv ("sdE3_males_modifiers.csv", h=T)
head(sd.data)
tail(sd.data)
str(sd.data)
sd.data$Deletion <- as.factor(sd.data$Deletion)
sd.data$Dummy <- ifelse(sd.data$Deletion=="6326", "Control","Deletion" ) # Creates ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/piSystemLanding.r
\name{piSystemLanding}
\alias{piSystemLanding}
\title{Generate an instance of the piSystemLanding PI Web API class}
\usage{
piSystemLanding(productTitle = NULL, productVersion = NULL, links = NULL)
}
\arguments{
\item{produc... | /man/piSystemLanding.Rd | permissive | aj9253/PI-Web-API-Client-R | R | false | true | 614 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/piSystemLanding.r
\name{piSystemLanding}
\alias{piSystemLanding}
\title{Generate an instance of the piSystemLanding PI Web API class}
\usage{
piSystemLanding(productTitle = NULL, productVersion = NULL, links = NULL)
}
\arguments{
\item{produc... |
library(spatstat)
### Name: kernel.squint
### Title: Integral of Squared Kernel
### Aliases: kernel.squint
### Keywords: methods nonparametric smooth
### ** Examples
kernel.squint("gaussian", 3)
# integral of squared Epanechnikov kernel with half-width h=1
h <- 1
bw <- h/kernel.factor("epa")
kernel.... | /data/genthat_extracted_code/spatstat/examples/kernel.squint.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 341 | r | library(spatstat)
### Name: kernel.squint
### Title: Integral of Squared Kernel
### Aliases: kernel.squint
### Keywords: methods nonparametric smooth
### ** Examples
kernel.squint("gaussian", 3)
# integral of squared Epanechnikov kernel with half-width h=1
h <- 1
bw <- h/kernel.factor("epa")
kernel.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayesianlm.R
\name{bayesianlm}
\alias{bayesianlm}
\title{Simple bayesian regression function.}
\usage{
bayesianlm(X, y, priorMean, priorPrecision, priorIntercept = 0, regweights,
includeIntercept = F)
}
\arguments{
\item{X}{data matrix}
\i... | /man/bayesianlm.Rd | permissive | jeffduda/ANTsR | R | false | true | 4,111 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayesianlm.R
\name{bayesianlm}
\alias{bayesianlm}
\title{Simple bayesian regression function.}
\usage{
bayesianlm(X, y, priorMean, priorPrecision, priorIntercept = 0, regweights,
includeIntercept = F)
}
\arguments{
\item{X}{data matrix}
\i... |
library(tidycensus)
library(tidyverse)
library(tigris)
library(sf)
options(tigris_class = "sf")
options(tigris_use_cache = TRUE)
library(stringr)
# census_api_key("YOUR KEY HERE")
library(geofacet)
library(extrafont)
rent <- get_acs(geography = "tract", variables = "DP04_0134",
state = c("GA"), county... | /pop_pyr.R | no_license | critgeog/archway-demo | R | false | false | 3,004 | r | library(tidycensus)
library(tidyverse)
library(tigris)
library(sf)
options(tigris_class = "sf")
options(tigris_use_cache = TRUE)
library(stringr)
# census_api_key("YOUR KEY HERE")
library(geofacet)
library(extrafont)
rent <- get_acs(geography = "tract", variables = "DP04_0134",
state = c("GA"), county... |
#' Get all existing alias names from a posterior database
#'
#' @param pdb a \code{pdb} object.
#' @param type type of alias names. Cureently only posteriors.
#'
#' @export
alias_names <- function(type, pdb = pdb_default()){
names(pdb_aliases(type, pdb))
}
#' Extract aliases list from posterior database
#'
#' @inher... | /rpackage/R/aliases.R | no_license | hyunjimoon/posteriordb | R | false | false | 1,153 | r | #' Get all existing alias names from a posterior database
#'
#' @param pdb a \code{pdb} object.
#' @param type type of alias names. Cureently only posteriors.
#'
#' @export
alias_names <- function(type, pdb = pdb_default()){
names(pdb_aliases(type, pdb))
}
#' Extract aliases list from posterior database
#'
#' @inher... |
# Praise messages
.praise <- c(
"Absolutely fabulous!",
"Amazing!",
"Awesome!",
"Beautiful!",
"Bravo!",
"Cool job!",
"Delightful!",
"Excellent!",
"Fantastic!",
"Great work!",
"I couldn't have done it better myself.",
"Impressive work!",
"Lovely job!",
"Magnificent!",
"Nice job!",
"Out of... | /R/praise.R | permissive | chendaniely/grader | R | false | false | 1,885 | r | # Praise messages
.praise <- c(
"Absolutely fabulous!",
"Amazing!",
"Awesome!",
"Beautiful!",
"Bravo!",
"Cool job!",
"Delightful!",
"Excellent!",
"Fantastic!",
"Great work!",
"I couldn't have done it better myself.",
"Impressive work!",
"Lovely job!",
"Magnificent!",
"Nice job!",
"Out of... |
library(dplyr)
library(jsonlite)
library(purrr)
library(janitor)
library(readr)
library(tidyr)
library(stringr)
state_strings <- c("alaska", "texas", "minnesota", "michigan", "west-virginia",
"virginia", "wisconsin", "kentucky", "louisiana", "mississippi",
"missouri", "north-carolina", "california", "iowa", "main... | /script.R | permissive | Yitzchok/USElection2020-NYT-Results | R | false | false | 6,626 | r |
library(dplyr)
library(jsonlite)
library(purrr)
library(janitor)
library(readr)
library(tidyr)
library(stringr)
state_strings <- c("alaska", "texas", "minnesota", "michigan", "west-virginia",
"virginia", "wisconsin", "kentucky", "louisiana", "mississippi",
"missouri", "north-carolina", "california", "iowa", "main... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.data.no.r
\docType{data}
\name{predict.data.no}
\alias{predict.data.no}
\title{Prediction grid data for no post-impact consequence}
\format{A data frame with 37928 rows and 8 variables}
\description{
A simulated dataset containing the... | /man/predict.data.no.Rd | no_license | CMFell/MRSeaCF | R | false | true | 958 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.data.no.r
\docType{data}
\name{predict.data.no}
\alias{predict.data.no}
\title{Prediction grid data for no post-impact consequence}
\format{A data frame with 37928 rows and 8 variables}
\description{
A simulated dataset containing the... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wrap.r
\name{str_wrap}
\alias{str_wrap}
\title{Wrap strings into nicely formatted paragraphs.}
\usage{
str_wrap(string, width = 80, indent = 0, exdent = 0)
}
\arguments{
\item{string}{character vector of strings to reformat.}
\item{w... | /man/str_wrap.Rd | no_license | DarwinAwardWinner/stringr | R | false | false | 1,220 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/wrap.r
\name{str_wrap}
\alias{str_wrap}
\title{Wrap strings into nicely formatted paragraphs.}
\usage{
str_wrap(string, width = 80, indent = 0, exdent = 0)
}
\arguments{
\item{string}{character vector of strings to reformat.}
\item{w... |
# title: pop.make.r
# purpose: datasets of population denominators for CBD project (state, county, tract, mssa)
# notes:
# acs package: acs::read.acs can read downloaded files from AFF, csv/zip/etc. in case Census API down.
# it is not used herein because of CBD project design preference for simple data objects.
... | /myUpstream/tractPopulationProcessor.R | no_license | aculich/CACommunityBurden | R | false | false | 7,494 | r | # title: pop.make.r
# purpose: datasets of population denominators for CBD project (state, county, tract, mssa)
# notes:
# acs package: acs::read.acs can read downloaded files from AFF, csv/zip/etc. in case Census API down.
# it is not used herein because of CBD project design preference for simple data objects.
... |
preclean_explore <- function(traindata,testdata)
{
#sink(file = "preclean-exploration.txt")
cat("=============================\n")
str(traindata)
cat("\n")
str(testdata)
trainfeatures <- names(traindata)
testfeatures <- names(testdata)
cat("\nFeatures in traindata that is not in testdata:... | /helperfuncs.R | no_license | srimugunthan/WeightLiftPredict | R | false | false | 4,295 | r | preclean_explore <- function(traindata,testdata)
{
#sink(file = "preclean-exploration.txt")
cat("=============================\n")
str(traindata)
cat("\n")
str(testdata)
trainfeatures <- names(traindata)
testfeatures <- names(testdata)
cat("\nFeatures in traindata that is not in testdata:... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/derive.R, R/integrate.R, R/polynomial.R
\name{derive.polynomial}
\alias{derive.polynomial}
\alias{derive.spline}
\alias{integrate.polynomial}
\alias{integrate.spline}
\alias{polynomial}
\alias{polynomial.default}
\alias{+.polynomial}
\alias{-... | /man/polynomial.Rd | no_license | TobieSurette/gulf.stats | R | false | true | 2,331 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/derive.R, R/integrate.R, R/polynomial.R
\name{derive.polynomial}
\alias{derive.polynomial}
\alias{derive.spline}
\alias{integrate.polynomial}
\alias{integrate.spline}
\alias{polynomial}
\alias{polynomial.default}
\alias{+.polynomial}
\alias{-... |
testlist <- list(b = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), p1 = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, ... | /metacoder/inst/testfiles/intersect_line_rectangle/AFL_intersect_line_rectangle/intersect_line_rectangle_valgrind_files/1615769297-test.R | permissive | akhikolla/updatedatatype-list3 | R | false | false | 727 | r | testlist <- list(b = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), p1 = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.68298522855314e-211, 1444042902784.06, ... |
TTestIndependentSamples <- function(dataset=NULL, options, perform="run", callback=function(...) 0, ...) {
if (is.null(dataset))
{
if (perform == "run") {
dataset <- read.dataset.to.end()
} else {
dataset <- read.dataset.header()
}
}
results <- list()
ttest <- list()
descriptives <- list()
footnot... | /JASP-Engine/JASP/R/ttestindependentsamples.R | no_license | afwild/jasp-desktop | R | false | false | 6,535 | r |
TTestIndependentSamples <- function(dataset=NULL, options, perform="run", callback=function(...) 0, ...) {
if (is.null(dataset))
{
if (perform == "run") {
dataset <- read.dataset.to.end()
} else {
dataset <- read.dataset.header()
}
}
results <- list()
ttest <- list()
descriptives <- list()
footnot... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7102
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7101
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7101
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Basler/terminator/stmt39_107_197/stmt39_107_197.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 713 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 7102
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7101
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 7101
c
c Input Parameter (command line, fil... |
## Exercice 1
#Clear everything and load the needed libraries;
#if the libraries are not installed then install them at first.
rm(list=ls())
library(stringr)
library(reshape2)
library(plm)
#install.packages("lfe")
install.packages("lfe")
library(lfe)
#Define directories, which will be used later in this analysis:
dir... | /TSE/Applied-Econometrics/TP2-Fixed Effects and Random Effects Estimation.R | no_license | r-repos-org/R-2 | R | false | false | 10,554 | r | ## Exercice 1
#Clear everything and load the needed libraries;
#if the libraries are not installed then install them at first.
rm(list=ls())
library(stringr)
library(reshape2)
library(plm)
#install.packages("lfe")
install.packages("lfe")
library(lfe)
#Define directories, which will be used later in this analysis:
dir... |
rad <- function(degrees) {
return(degrees * (pi / 180))
}
distance <- function(lon1, lat1, lon2, lat2) {
r <- 6371000
dlat <- rad(lat2 - lat1)
dlon <- rad(lon2 - lon1)
a <-
sin(dlat / 2) * sin(dlat / 2) +
cos(rad(lat1)) * cos(rad(lat2)) *
sin(dlon / 2) * sin(dlon / 2)
c <- 2 * atan2(sqrt(a), sq... | /R/geo.R | no_license | pieterprovoost/pieter | R | false | false | 358 | r | rad <- function(degrees) {
return(degrees * (pi / 180))
}
distance <- function(lon1, lat1, lon2, lat2) {
r <- 6371000
dlat <- rad(lat2 - lat1)
dlon <- rad(lon2 - lon1)
a <-
sin(dlat / 2) * sin(dlat / 2) +
cos(rad(lat1)) * cos(rad(lat2)) *
sin(dlon / 2) * sin(dlon / 2)
c <- 2 * atan2(sqrt(a), sq... |
#
# This is the user-interface definition 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)
library(markdown)
shinyUI(navbarPage("Select the best car for your trip"... | /ui.R | no_license | PrabhakarBrahmandam/DDP-Week4-Assignment | R | false | false | 1,955 | r | #
# This is the user-interface definition 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)
library(markdown)
shinyUI(navbarPage("Select the best car for your trip"... |
#' @title Variant filtering
#'
#' @description Filter variants on several criteria.
#'
#' @details This is a function for filtering SNV profiles on several criteria:
#' sequencing depth, variant caller-specific filtering, mitochondrial variants
#' and variants in non-standard chromosomes. Only filters by sequencing dep... | /R/filter_variants.R | permissive | fasterius/seqCAT | R | false | false | 5,263 | r | #' @title Variant filtering
#'
#' @description Filter variants on several criteria.
#'
#' @details This is a function for filtering SNV profiles on several criteria:
#' sequencing depth, variant caller-specific filtering, mitochondrial variants
#' and variants in non-standard chromosomes. Only filters by sequencing dep... |
# Simulation for cooling a laser temperature block connected to an adaptive material, which has as heat cooling pump
# author: William Gillespie
# made with some inspiration from http://oddhypothesis.blogspot.com/2013/02/pid-control-r.html
source('temp_update_functions.R')
#-------- START OF SIMULATION --------#
# ... | /Project2_LaserSim/stochastic_laser_sim.R | no_license | Wubuntu88/Math519StochasticModeling | R | false | false | 5,362 | r | # Simulation for cooling a laser temperature block connected to an adaptive material, which has as heat cooling pump
# author: William Gillespie
# made with some inspiration from http://oddhypothesis.blogspot.com/2013/02/pid-control-r.html
source('temp_update_functions.R')
#-------- START OF SIMULATION --------#
# ... |
# set working directory (see https://stackoverflow.com/a/35842119)
dir = tryCatch({
# script being sourced
getSrcDirectory()[1]
}, error = function(e) {
# script being run in RStudio
dirname(rstudioapi::getActiveDocumentContext()$path)
})
setwd(dir)
source("../read-and-clean-data.R")
# draw samples
kudamm_kan... | /qualitative-analysis/draw_samples.R | permissive | sbaltes/airbnb-analysis-public | R | false | false | 850 | r | # set working directory (see https://stackoverflow.com/a/35842119)
dir = tryCatch({
# script being sourced
getSrcDirectory()[1]
}, error = function(e) {
# script being run in RStudio
dirname(rstudioapi::getActiveDocumentContext()$path)
})
setwd(dir)
source("../read-and-clean-data.R")
# draw samples
kudamm_kan... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adv_functions.R
\name{get_data_sec_adv_manager_sitemap}
\alias{get_data_sec_adv_manager_sitemap}
\title{Returns data frame of SEC ADV sitemap}
\usage{
get_data_sec_adv_manager_sitemap()
}
\description{
Returns data frame of SEC ADV sitemap
}
| /man/get_data_sec_adv_manager_sitemap.Rd | permissive | jngod2011/fundManageR | R | false | true | 320 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adv_functions.R
\name{get_data_sec_adv_manager_sitemap}
\alias{get_data_sec_adv_manager_sitemap}
\title{Returns data frame of SEC ADV sitemap}
\usage{
get_data_sec_adv_manager_sitemap()
}
\description{
Returns data frame of SEC ADV sitemap
}
|
##################################################################
# Titel: On the L1-Acquisition of Amplification in English - Part 4
# R version: 3.5.1 (2018-07-02) -- "Feather Spray"
# Autor: Martin Schweinberger
# Date: 2019-11-28
# Contact: martin.schweinberger.hh@gmail.com
# Disclaimer: If you... | /AmpL1_Part4_20191128.R | no_license | MartinSchweinberger/AmpL1AmericanSpeech | R | false | false | 128,846 | r | ##################################################################
# Titel: On the L1-Acquisition of Amplification in English - Part 4
# R version: 3.5.1 (2018-07-02) -- "Feather Spray"
# Autor: Martin Schweinberger
# Date: 2019-11-28
# Contact: martin.schweinberger.hh@gmail.com
# Disclaimer: If you... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 29763
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 22043
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 22043
c
c Input Parameter (command line, ... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Kronegger-Pfandler-Pichler/dungeon/dungeon_i10-m10-u10-v0.pddl_planlen=51/dungeon_i10-m10-u10-v0.pddl_planlen=51.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 39,242 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 29763
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 22043
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 22043
c
c Input Parameter (command line, ... |
library('shiny')
library('leaflet')
shinyUI(fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file1', 'Choose file to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-se... | /ui.R | no_license | miniroses/second_shiny | R | false | false | 1,340 | r | library('shiny')
library('leaflet')
shinyUI(fluidPage(
titlePanel("Uploading Files"),
sidebarLayout(
sidebarPanel(
fileInput('file1', 'Choose file to upload',
accept = c(
'text/csv',
'text/comma-separated-values',
'text/tab-se... |
# Function to apply historical closures
apply_hist_closures <- function(pop_df, hist_closures, closure_typologies){
# If not applying
if(hist_closures==0){
pop_df_out <- pop_df
}else{
# Subset typology of interest
typo <- closure_typologies %>%
filter(season_id==hist_closures) %>%
... | /models/popdy/v2/functions/apply_hist_closures.R | no_license | cfree14/dungeness | R | false | false | 733 | r |
# Function to apply historical closures
apply_hist_closures <- function(pop_df, hist_closures, closure_typologies){
# If not applying
if(hist_closures==0){
pop_df_out <- pop_df
}else{
# Subset typology of interest
typo <- closure_typologies %>%
filter(season_id==hist_closures) %>%
... |
library(bigmemory);
n=3000;
d=250;
x=filebacked.big.matrix(n,n,backingfile="a.dat")
system.time(for(l in 1:n) {x[l,]=c(1:n);})
system.time(for(l in 1:n) {x[,l]=c(1:n);})
s=c(1:n);
system.time(for(l in 1:n) {s=s+x[,l]})
system.time(for(l in 1:n) {s=s+x[l,]})
| /local/stiv/speedTests/bigmem_test_3000.R | no_license | GenABEL-Project/filevector | R | false | false | 259 | r | library(bigmemory);
n=3000;
d=250;
x=filebacked.big.matrix(n,n,backingfile="a.dat")
system.time(for(l in 1:n) {x[l,]=c(1:n);})
system.time(for(l in 1:n) {x[,l]=c(1:n);})
s=c(1:n);
system.time(for(l in 1:n) {s=s+x[,l]})
system.time(for(l in 1:n) {s=s+x[l,]})
|
/R-benchmark/R-benchmark-25-10.R | no_license | o-/benchR | R | false | false | 2,538 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deprecated.R
\name{constructSchemaTableName}
\alias{constructSchemaTableName}
\title{Construct schemaTableName}
\usage{
constructSchemaTableName(schema, tableName)
}
\description{
(Deprecated) construct schemaTableName from the schema and ta... | /man/constructSchemaTableName.Rd | no_license | jimsforks/pg13 | R | false | true | 330 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deprecated.R
\name{constructSchemaTableName}
\alias{constructSchemaTableName}
\title{Construct schemaTableName}
\usage{
constructSchemaTableName(schema, tableName)
}
\description{
(Deprecated) construct schemaTableName from the schema and ta... |
if (!exists("model.lm")) {
set.seed(1)
model.lm = train(
form = train_formula,
data = TRAIN_CLEAN,
method = "lm",
trControl = tc
)
cache("model.lm")
} | /munge/21_model_lm.R | no_license | rbdixon/rrp | R | false | false | 174 | r | if (!exists("model.lm")) {
set.seed(1)
model.lm = train(
form = train_formula,
data = TRAIN_CLEAN,
method = "lm",
trControl = tc
)
cache("model.lm")
} |
## files
library(Matrix)
library(Hmisc)
library(parallel)
library(texreg)
source("AdjustValue.R")
source("CheckUB.R")
source("ConvParam.R")
source("MakeCovariatesUtilStr.R")
source("MakeCovariatesAll.R")
source("MakePolyLD.R")
source("CalcLikelihoodType.R")
source("CalcLikelihoodYS.R")
source("CalcLikelihoodY.R")
sourc... | /articles/YamaguchiQE2019/Code/estimation/LoadAll.R | no_license | murattasdemir/Archive-of-Empirical-Dynamic-Programming-Research | R | false | false | 983 | r | ## files
library(Matrix)
library(Hmisc)
library(parallel)
library(texreg)
source("AdjustValue.R")
source("CheckUB.R")
source("ConvParam.R")
source("MakeCovariatesUtilStr.R")
source("MakeCovariatesAll.R")
source("MakePolyLD.R")
source("CalcLikelihoodType.R")
source("CalcLikelihoodYS.R")
source("CalcLikelihoodY.R")
sourc... |
# 테이블을 읽어오자
# 정적페이지
library(XML)
library(rvest)
url = "https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population"
read1 <- read_html(url)
read2 <- htmlParse(read1)
first_table <- getNodeSet(read2,"//table")[[1]]
xt <- readHTMLTable(first_table)
xt
# http://www.airkorea.or.kr/ : 한국환경공단 실시간 자료 조회
#... | /day14.R | no_license | grapecw/Open-API-R | R | false | false | 12,099 | r | # 테이블을 읽어오자
# 정적페이지
library(XML)
library(rvest)
url = "https://en.wikipedia.org/wiki/List_of_countries_and_dependencies_by_population"
read1 <- read_html(url)
read2 <- htmlParse(read1)
first_table <- getNodeSet(read2,"//table")[[1]]
xt <- readHTMLTable(first_table)
xt
# http://www.airkorea.or.kr/ : 한국환경공단 실시간 자료 조회
#... |
# see bin/R/RoadMap/get.dt.meth.level.per.region.R for dt.meth.region.RData
my.RData=file.path("~/results/RoadMap/BS-Seq/RData",paste(my.tissue,my.cpg.type,"dt.meth.region.RData",sep="."))
if(file.exists(my.RData)){
cat("loading dt.meth.region.RData...\n")
load(my.RData)
cat("dt.meth.region loaded\n")
}else{... | /bin/R/CSMD1.Paper/WGoxBS.beta.density.chrX.R | no_license | sung/ObsGynaePipes | R | false | false | 3,263 | r |
# see bin/R/RoadMap/get.dt.meth.level.per.region.R for dt.meth.region.RData
my.RData=file.path("~/results/RoadMap/BS-Seq/RData",paste(my.tissue,my.cpg.type,"dt.meth.region.RData",sep="."))
if(file.exists(my.RData)){
cat("loading dt.meth.region.RData...\n")
load(my.RData)
cat("dt.meth.region loaded\n")
}else{... |
Iterator <- R6::R6Class(
classname = 'iterator',
private = list(
collection = NULL,
names = NULL,
cursor = NULL
),
public = list(
initialize = function(collection) {
private$collection <- collection
private$names <- ls(collection$.__enclos_env__$private$elements)
if (is.null(pr... | /R/iterator.R | no_license | nteetor/roasted | R | false | false | 1,125 | r | Iterator <- R6::R6Class(
classname = 'iterator',
private = list(
collection = NULL,
names = NULL,
cursor = NULL
),
public = list(
initialize = function(collection) {
private$collection <- collection
private$names <- ls(collection$.__enclos_env__$private$elements)
if (is.null(pr... |
g=list("M","F","F","I","M","M","F")
typeof(g)
grps <- list()
for (gen in c("M","F","I")) grps[[gen]] <- which(g==gen)
grps
| /2nd_week/exam_2_9_2.R | no_license | kh2-lee/R | R | false | false | 125 | r | g=list("M","F","F","I","M","M","F")
typeof(g)
grps <- list()
for (gen in c("M","F","I")) grps[[gen]] <- which(g==gen)
grps
|
---
title: "Returns Distribution"
runtime: shiny
output:
flexdashboard::flex_dashboard:
orientation: rows
source_code: embed
---
library(rmarkdown)
library(flexdashboard)
library(purrr)
library(dplyr)
library(ggplot2)
library(tidyr)
library(DBI)
library(quantmod)
library(PerformanceAnalytics)
library(tibble) #... | /10 component contribution .R | no_license | Rucer-quant/10-Conponent-Contribution-to-Standard-Deviation | R | false | false | 7,811 | r |
---
title: "Returns Distribution"
runtime: shiny
output:
flexdashboard::flex_dashboard:
orientation: rows
source_code: embed
---
library(rmarkdown)
library(flexdashboard)
library(purrr)
library(dplyr)
library(ggplot2)
library(tidyr)
library(DBI)
library(quantmod)
library(PerformanceAnalytics)
library(tibble) #... |
##############################
##############################
## EMBA FEB-2016 F2 GRUPO C ##
##############################
## Hélène Baus
## Natalia Muñoz
## Tsamajen Serrano
## Hector Sánchez
## Jose María Vilaverde
## Fernando Cañella
##############################
##############################
sourc... | /simulatorMontecarlo.R | no_license | jmvilaverde/Kcookies | R | false | false | 2,656 | r | ##############################
##############################
## EMBA FEB-2016 F2 GRUPO C ##
##############################
## Hélène Baus
## Natalia Muñoz
## Tsamajen Serrano
## Hector Sánchez
## Jose María Vilaverde
## Fernando Cañella
##############################
##############################
sourc... |
# 16-07-2020
#Peer-graded assigment: R Markdown Presentation & Plotly
#Read car and truck values from tab-delimited autos.dat
autos_data <- read.table("C:/R/autos.dat", header=T, sep="\t")
# Compute the largest y value used in the data (or we could
# just use range again)
max_y <- max(autos_data)
# Defi... | /peer-graded assigment r markdown presentation plotly.r | no_license | adithyaavaasen/R-Markdown-Presentation-Plotly | R | false | false | 1,912 | r | # 16-07-2020
#Peer-graded assigment: R Markdown Presentation & Plotly
#Read car and truck values from tab-delimited autos.dat
autos_data <- read.table("C:/R/autos.dat", header=T, sep="\t")
# Compute the largest y value used in the data (or we could
# just use range again)
max_y <- max(autos_data)
# Defi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_surv.R
\name{fit_akritas}
\alias{fit_akritas}
\title{Wrapper of \code{survivalmodels::akritas}}
\usage{
fit_akritas(
formula,
data,
id.var,
time.var,
event.var,
nfold = 1,
option = list(),
lambda = 0.5,
...
)
}
\argument... | /man/fit_akritas.Rd | no_license | QIU-Hongxiang-David/SDRsurv | R | false | true | 1,578 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit_surv.R
\name{fit_akritas}
\alias{fit_akritas}
\title{Wrapper of \code{survivalmodels::akritas}}
\usage{
fit_akritas(
formula,
data,
id.var,
time.var,
event.var,
nfold = 1,
option = list(),
lambda = 0.5,
...
)
}
\argument... |
#Dataset URL
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
#Download the dataset
if(!file.exists("./household_power_consumption.txt.zip")) {
download.file(url, destfile="household_power_consumption.txt.zip", method="curl")
unzip("household_power_consumption.txt.... | /plot4.R | no_license | ldeza/ExData_Plotting1 | R | false | false | 2,212 | r | #Dataset URL
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
#Download the dataset
if(!file.exists("./household_power_consumption.txt.zip")) {
download.file(url, destfile="household_power_consumption.txt.zip", method="curl")
unzip("household_power_consumption.txt.... |
# load data ---------------------------------------------------------------
load(file = "IndeedSample.rda")
# (Vileena) clean first col 1 - col 8 ---------------------------------
library(dplyr)
##Optional: split df into 3 df based on country
# indeedusa<-filter(IndeedSample,country='US')
# indeedca<-filte... | /Felix_explore_and_clean.R | no_license | Felix-Ren/Data-analysis-with-Indeed-Dataset | R | false | false | 12,609 | r | # load data ---------------------------------------------------------------
load(file = "IndeedSample.rda")
# (Vileena) clean first col 1 - col 8 ---------------------------------
library(dplyr)
##Optional: split df into 3 df based on country
# indeedusa<-filter(IndeedSample,country='US')
# indeedca<-filte... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ui-caching.R
\name{caching}
\alias{caching}
\title{Remember the past to be quicker in the future}
\description{
Caching makes styler faster on repeated styling and is shared across all APIs
(e.g. \code{style_text()} and Addin).
That means if ... | /man/caching.Rd | permissive | lorenzwalthert/styler | R | false | true | 2,097 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ui-caching.R
\name{caching}
\alias{caching}
\title{Remember the past to be quicker in the future}
\description{
Caching makes styler faster on repeated styling and is shared across all APIs
(e.g. \code{style_text()} and Addin).
That means if ... |
library(blockForest)
library(survival)
context("blockForest_interface")
## Formula interface
test_that("All variables included if . in formula", {
rf <- blockForest(Species ~ ., iris, num.trees = 5)
expect_equal(sort(rf$forest$independent.variable.names),
sort(colnames(iris)[1:4]))
})
test_that("V... | /tests/testthat/test_interface.R | no_license | bips-hb/blockForest | R | false | false | 2,424 | r | library(blockForest)
library(survival)
context("blockForest_interface")
## Formula interface
test_that("All variables included if . in formula", {
rf <- blockForest(Species ~ ., iris, num.trees = 5)
expect_equal(sort(rf$forest$independent.variable.names),
sort(colnames(iris)[1:4]))
})
test_that("V... |
\name{jomo2com}
\alias{jomo2com}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
JM Imputation of 2-level data assuming a common level-1 covariance matrix across level-2 units.
}
\description{
Impute a 2-level dataset with mixed data types as outcome. A joint multivariate model for partial... | /man/jomo2com.Rd | no_license | ck37/jomo | R | false | false | 6,587 | rd | \name{jomo2com}
\alias{jomo2com}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
JM Imputation of 2-level data assuming a common level-1 covariance matrix across level-2 units.
}
\description{
Impute a 2-level dataset with mixed data types as outcome. A joint multivariate model for partial... |
context("Standardize Covariates")
#
var.names <- c("a", "b", "c")
x <- expand.grid(site = 1:4, rep = 1:4)
a_mean <- 1
b_mean <- 5
c_mean <- -2.2
a_sd <- 0.1
b_sd <- 1
c_sd <- 0.2
df_stds <- data.frame(var.names, c(a_mean, b_mean, c_mean), c(a_sd, b_sd, c_sd))
names(df_stds) <- c("var.names", "means", "stdevs")
x$a <-... | /tests/testthat/test_stdCovs.R | permissive | Conte-Ecology/conteStreamTemperature | R | false | false | 777 | r | context("Standardize Covariates")
#
var.names <- c("a", "b", "c")
x <- expand.grid(site = 1:4, rep = 1:4)
a_mean <- 1
b_mean <- 5
c_mean <- -2.2
a_sd <- 0.1
b_sd <- 1
c_sd <- 0.2
df_stds <- data.frame(var.names, c(a_mean, b_mean, c_mean), c(a_sd, b_sd, c_sd))
names(df_stds) <- c("var.names", "means", "stdevs")
x$a <-... |
context("test-select_helpers")
test_that("test-select helpers", {
expect_equal(
var_input_to_string(mtcars, select_input = vars(hp, mpg)),
dplyr::select(mtcars, hp, mpg) %>% colnames()
)
expect_equal(
var_input_to_string(mtcars, select_input = mpg),
dplyr::select(mtcars, mpg) %>% colnames()
)
... | /tests/testthat/test-select_helpers.R | permissive | matthieu-faron/gtsummary | R | false | false | 2,776 | r | context("test-select_helpers")
test_that("test-select helpers", {
expect_equal(
var_input_to_string(mtcars, select_input = vars(hp, mpg)),
dplyr::select(mtcars, hp, mpg) %>% colnames()
)
expect_equal(
var_input_to_string(mtcars, select_input = mpg),
dplyr::select(mtcars, mpg) %>% colnames()
)
... |
# main
# Grab command line argument. Usage: R --vanilla --args commonPeakIntensities="commonPath" uniquePeakIntensities="uniquePath" firstLegend="legend1" secondLegend="legend2" boxPlotFile="outpath" < rscript path
for (e in commandArgs(trailingOnly=TRUE)) {
ta = strsplit(e,"=",fixed=TRUE)
if(! is.na(ta[[1]][2]... | /peakAnalyzer/ChIPseqPipeline/r/boxPlot.r | no_license | zzz2010/basespace-ui | R | false | false | 1,452 | r | # main
# Grab command line argument. Usage: R --vanilla --args commonPeakIntensities="commonPath" uniquePeakIntensities="uniquePath" firstLegend="legend1" secondLegend="legend2" boxPlotFile="outpath" < rscript path
for (e in commandArgs(trailingOnly=TRUE)) {
ta = strsplit(e,"=",fixed=TRUE)
if(! is.na(ta[[1]][2]... |
timestamp <- Sys.time()
library(caret)
model <- "bagEarth"
#########################################################################
set.seed(2)
training <- twoClassSim(50, linearVars = 2)
testing <- twoClassSim(500, linearVars = 2)
trainX <- training[, -ncol(training)]
trainY <- training$Class
cctrl1 <- trainContr... | /RegressionTests/Code/bagEarth.R | no_license | JackStat/caret | R | false | false | 8,065 | r | timestamp <- Sys.time()
library(caret)
model <- "bagEarth"
#########################################################################
set.seed(2)
training <- twoClassSim(50, linearVars = 2)
testing <- twoClassSim(500, linearVars = 2)
trainX <- training[, -ncol(training)]
trainY <- training$Class
cctrl1 <- trainContr... |
#' scalebar
#' @description Adds a scale bar to maps created with ggplot or ggmap.
#' @param data the same \code{\link{data.frame}} passed to \code{\link{ggplot}} to plot the map.
#' @param location string indicating the scale bar's location in the plot. Possible options: "topright" (default), "bottomright", "bottomlef... | /R/scalebar.R | no_license | cran/ggsn | R | false | false | 11,876 | r | #' scalebar
#' @description Adds a scale bar to maps created with ggplot or ggmap.
#' @param data the same \code{\link{data.frame}} passed to \code{\link{ggplot}} to plot the map.
#' @param location string indicating the scale bar's location in the plot. Possible options: "topright" (default), "bottomright", "bottomlef... |
# library(smbinning)
library(vtreat)
# This code is to deal with One hot encoding
data <- get(load("Data_Independent_20180628.Rda"))
df = data
summary(as.numeric(df$c01_ssn_first_name_count))
table(df$d02_MaximumTradelinePrincipal)
# hello git
data_wd <- "W:/Analytics_Group_Files/US_files/2018_ProjectFiles/US1807_... | /US1808_vtreat.R | no_license | MarxWen/Modeling-Process-Gen5th | R | false | false | 21,833 | r |
# library(smbinning)
library(vtreat)
# This code is to deal with One hot encoding
data <- get(load("Data_Independent_20180628.Rda"))
df = data
summary(as.numeric(df$c01_ssn_first_name_count))
table(df$d02_MaximumTradelinePrincipal)
# hello git
data_wd <- "W:/Analytics_Group_Files/US_files/2018_ProjectFiles/US1807_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.