content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ArmadilloConnection.R
\name{dsAssignResource,ArmadilloConnection-method}
\alias{dsAssignResource,ArmadilloConnection-method}
\title{Assign a resource}
\usage{
\S4method{dsAssignResource}{ArmadilloConnection}(conn, symbol, resource, async = TR... | /man/dsAssignResource-ArmadilloConnection-method.Rd | no_license | sidohaakma/molgenis-r-datashield | R | false | true | 742 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ArmadilloConnection.R
\name{dsAssignResource,ArmadilloConnection-method}
\alias{dsAssignResource,ArmadilloConnection-method}
\title{Assign a resource}
\usage{
\S4method{dsAssignResource}{ArmadilloConnection}(conn, symbol, resource, async = TR... |
bandwidth <- function(wave, min_freq=1000, plot = FALSE, method = "quartile") {
if (method == "quartile") {
a <- orthophonia::frequencySpectrumPowerQuartiles(wave, min_freq, plot)
if (is.null(a)) {
return(NULL)
}
return (a[[2]] - a[[1]])
}
} | /R/analysis.R | no_license | orthoptera-aao/orthophonia | R | false | false | 267 | r | bandwidth <- function(wave, min_freq=1000, plot = FALSE, method = "quartile") {
if (method == "quartile") {
a <- orthophonia::frequencySpectrumPowerQuartiles(wave, min_freq, plot)
if (is.null(a)) {
return(NULL)
}
return (a[[2]] - a[[1]])
}
} |
# ALADYM Age length based dynamic model - version 12.3
# 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 follow... | /BEMTOOL-ver2.5-2018_0901/src/biol/bmtALADYM/ALADYM-ver12.3-2017_0501/gui/forecast/vesselsFun_fore/reload_VESSELS_fore_table.r | no_license | gresci/BEMTOOL2.5 | R | false | false | 3,009 | r | # ALADYM Age length based dynamic model - version 12.3
# 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 follow... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/online_gst_detail_similarity.R
\name{similarity_geneset}
\alias{similarity_geneset}
\title{Query similarity gene sets}
\usage{
similarity_geneset(geneSetName)
}
\arguments{
\item{geneSetName}{one gene set name}
}
\value{
similarity gene sets
... | /man/similarity_geneset.Rd | no_license | cran/msig | R | false | true | 469 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/online_gst_detail_similarity.R
\name{similarity_geneset}
\alias{similarity_geneset}
\title{Query similarity gene sets}
\usage{
similarity_geneset(geneSetName)
}
\arguments{
\item{geneSetName}{one gene set name}
}
\value{
similarity gene sets
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interactionGraphs.R
\name{ig}
\alias{ig}
\title{Constructs Interaction Graph (S3 class)}
\usage{
ig(n, e)
}
\arguments{
\item{n}{ig.nodes (\code{a list of igNode objects})}
\item{e}{ig.edges (\code{a list of igEdge objects})}
}
\value{
An in... | /man/ig.Rd | no_license | peleplay/integr | R | false | true | 408 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interactionGraphs.R
\name{ig}
\alias{ig}
\title{Constructs Interaction Graph (S3 class)}
\usage{
ig(n, e)
}
\arguments{
\item{n}{ig.nodes (\code{a list of igNode objects})}
\item{e}{ig.edges (\code{a list of igEdge objects})}
}
\value{
An in... |
\name{bootstrap.effectivemass}
\alias{bootstrap.effectivemass}
\title{Computes effective masses with bootstrapping errors}
\description{
Generates bootstrap samples for effective mass values computed from an
object of class \code{cf} (a correlation function)
}
\usage{
bootstrap.effectivemass(cf, type="solve", weigh... | /man/bootstrap.effectivemass.Rd | no_license | pittlerf/hadron | R | false | false | 3,731 | rd | \name{bootstrap.effectivemass}
\alias{bootstrap.effectivemass}
\title{Computes effective masses with bootstrapping errors}
\description{
Generates bootstrap samples for effective mass values computed from an
object of class \code{cf} (a correlation function)
}
\usage{
bootstrap.effectivemass(cf, type="solve", weigh... |
test_that("countOrSum() works", {
x <- data.frame(
Group = rep(c("A", "B", "C"), 4),
Even = rep(c(FALSE, TRUE), 6),
Value = seq_len(12)
)
y_1 <- countOrSum(x, "Group")
y_2 <- countOrSum(x, c("Group", "Even"))
y_3 <- countOrSum(x, "Group", sum.up = "Value")
y_4 <- countOrSum(x, c("Group", "Even... | /tests/testthat/test-function-countOrSum.R | permissive | KWB-R/kwb.utils | R | false | false | 696 | r | test_that("countOrSum() works", {
x <- data.frame(
Group = rep(c("A", "B", "C"), 4),
Even = rep(c(FALSE, TRUE), 6),
Value = seq_len(12)
)
y_1 <- countOrSum(x, "Group")
y_2 <- countOrSum(x, c("Group", "Even"))
y_3 <- countOrSum(x, "Group", sum.up = "Value")
y_4 <- countOrSum(x, c("Group", "Even... |
#' Get/Set Cluster Names by Marker Gene Expression
#'
#' \code{get.cluster.names} uses predefined marker genes to assign clusters with
#' putative cell type or state labels.
#'
#' @param environment \code{environment} object
#' @param types data frame associating cell type or state with marker genes
#' @param min.fold... | /R/clustering.R | permissive | asmagen/robustSingleCell | R | false | false | 8,176 | r |
#' Get/Set Cluster Names by Marker Gene Expression
#'
#' \code{get.cluster.names} uses predefined marker genes to assign clusters with
#' putative cell type or state labels.
#'
#' @param environment \code{environment} object
#' @param types data frame associating cell type or state with marker genes
#' @param min.fold... |
context("Gene expression normalization")
## Generate gene expression
nb.genes = 100
nb.cells = 10
mat = matrix(rpois(nb.cells*nb.genes, sample.int(3, nb.cells, TRUE)),
nb.genes, nb.cells, byrow=TRUE)
colnames(mat) = paste0('barcode', 1:nb.cells)
tot.raw = colSums(mat)
df = data.frame(symbol=paste0('gene',... | /tests/testthat/test_norm.R | permissive | jmonlong/scCNAutils | R | false | false | 969 | r | context("Gene expression normalization")
## Generate gene expression
nb.genes = 100
nb.cells = 10
mat = matrix(rpois(nb.cells*nb.genes, sample.int(3, nb.cells, TRUE)),
nb.genes, nb.cells, byrow=TRUE)
colnames(mat) = paste0('barcode', 1:nb.cells)
tot.raw = colSums(mat)
df = data.frame(symbol=paste0('gene',... |
setwd("./hw4")
## 1. The American Community Survey distributes downloadable data about
## United States communities. Download the 2006 microdata survey about housing
## for the state of Idaho using download.file() from here:
## https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv
## and load the da... | /03_Data-Cleaning/assignments/hw4/data-cleaning_quiz4.R | no_license | angeliu24601/datasciencecoursera | R | false | false | 3,171 | r | setwd("./hw4")
## 1. The American Community Survey distributes downloadable data about
## United States communities. Download the 2006 microdata survey about housing
## for the state of Idaho using download.file() from here:
## https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2Fss06hid.csv
## and load the da... |
\name{ARFIMAroll-class}
\Rdversion{1.1}
\docType{class}
\alias{ARFIMAroll-class}
\alias{as.data.frame,ARFIMAroll-method}
\alias{report,ARFIMAroll-method}
\alias{fpm,ARFIMAroll-method}
\alias{coef,ARFIMAroll-method}
\alias{resume,ARFIMAroll-method}
\alias{show,ARFIMAroll-method}
\title{class: ARFIMA Rolling Fo... | /man/ARFIMAroll-class.Rd | no_license | Dwj359582058/rugarch | R | false | false | 3,676 | rd | \name{ARFIMAroll-class}
\Rdversion{1.1}
\docType{class}
\alias{ARFIMAroll-class}
\alias{as.data.frame,ARFIMAroll-method}
\alias{report,ARFIMAroll-method}
\alias{fpm,ARFIMAroll-method}
\alias{coef,ARFIMAroll-method}
\alias{resume,ARFIMAroll-method}
\alias{show,ARFIMAroll-method}
\title{class: ARFIMA Rolling Fo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_matrix.R
\name{get_matrix}
\alias{get_matrix}
\title{Create a matrix with extracted data from a bigWig file within a specified region around a peak.}
\usage{
get_matrix(bed = NULL, bw_files = NULL, bw_path = NULL, op_dir = NULL,
up = 25... | /man/get_matrix.Rd | no_license | PoisonAlien/chipAnalyser | R | false | true | 1,515 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_matrix.R
\name{get_matrix}
\alias{get_matrix}
\title{Create a matrix with extracted data from a bigWig file within a specified region around a peak.}
\usage{
get_matrix(bed = NULL, bw_files = NULL, bw_path = NULL, op_dir = NULL,
up = 25... |
simulatedata <-
function(x,y, num.mc){
listvls <- c()
for(i in 1:num.mc){
x_null <- rnorm(length(x),0,1)
y_null <- rnorm(length(y),0,1)
test_stat<-.C("CWrapper1", n1=as.integer(length(x_null)),n2=as.integer(length(y_null)),y1=as.double(x_null),y2=as.double(y_null),test_stat=as.double(1))$test_sta... | /tsc/R/simulatedata.R | no_license | ingted/R-Examples | R | false | false | 388 | r | simulatedata <-
function(x,y, num.mc){
listvls <- c()
for(i in 1:num.mc){
x_null <- rnorm(length(x),0,1)
y_null <- rnorm(length(y),0,1)
test_stat<-.C("CWrapper1", n1=as.integer(length(x_null)),n2=as.integer(length(y_null)),y1=as.double(x_null),y2=as.double(y_null),test_stat=as.double(1))$test_sta... |
NutritionStudy60 = subset(NutritionStudy, Age>59)
xyplot(Alcohol ~ Calories, data=subset(NutritionStudy60, Alcohol<25))
cor(Alcohol ~ Calories, data=subset(NutritionStudy60, Alcohol<25))
| /inst/snippets/Example2.38b.R | no_license | stacyderuiter/Lock5withR | R | false | false | 188 | r | NutritionStudy60 = subset(NutritionStudy, Age>59)
xyplot(Alcohol ~ Calories, data=subset(NutritionStudy60, Alcohol<25))
cor(Alcohol ~ Calories, data=subset(NutritionStudy60, Alcohol<25))
|
# install.packages("shiny")
# install.packages("ggplot2")
# install.packages("maps")
# install.packages("dplyr")
# install.packages("RColorBrewer")
# install.packages("ggpubr")
# install.packages("shinyWidgets")
# install.packages("fmsb")
library(shiny)
library(ggplot2)
library(maps)
library(dplyr)
library(RColorBrewe... | /app.R | no_license | juanluisrto/shiny-app | R | false | false | 8,148 | r | # install.packages("shiny")
# install.packages("ggplot2")
# install.packages("maps")
# install.packages("dplyr")
# install.packages("RColorBrewer")
# install.packages("ggpubr")
# install.packages("shinyWidgets")
# install.packages("fmsb")
library(shiny)
library(ggplot2)
library(maps)
library(dplyr)
library(RColorBrewe... |
#=======================================================================================
# cargamos las LIBRERIAS y las FUNCIONES
#=======================================================================================
library(readxl)
library(RODBC)
library(dplyr)
library(tidyr)
library(cluster)
library(NbClust)
libr... | /R/x1.R | no_license | CristianDataScience/MUM | R | false | false | 10,696 | r | #=======================================================================================
# cargamos las LIBRERIAS y las FUNCIONES
#=======================================================================================
library(readxl)
library(RODBC)
library(dplyr)
library(tidyr)
library(cluster)
library(NbClust)
libr... |
library(openxlsx)
source("ag_bestCombination.R")
# Put the address of the comparison file here
original <- "/home/leandro/R/brooks/data/Metrics.xlsx"
orig_file <- read.xlsx(xlsxFile = original, sheet = "gD2-285")
# Put the directory containing the results of the analyzes here
dir <- "/home/leandro/R/brooks/data/GD2-2... | /NBClust_program/compare.R | no_license | FargCart/Profile-Generator-Gui | R | false | false | 4,403 | r | library(openxlsx)
source("ag_bestCombination.R")
# Put the address of the comparison file here
original <- "/home/leandro/R/brooks/data/Metrics.xlsx"
orig_file <- read.xlsx(xlsxFile = original, sheet = "gD2-285")
# Put the directory containing the results of the analyzes here
dir <- "/home/leandro/R/brooks/data/GD2-2... |
library(devtools)
load_all("FLRcppAdolc")
document("FLRcppAdolc")
#library(FLCore)
#library(FLRcppAdolc)
#***************************************************************************
nzrl <- read.csv("NZRL.csv")
saa <- read.csv("SAA.csv")
nnh <- read.csv("NNH.csv")
#flspCpp(SEXP C_sexp, SEXP I_sexp, SEXP r_sexp, S... | /S2-RunMSE/SPTest/sp.R | no_license | iotcwpm/MSE-Training | R | false | false | 2,862 | r | library(devtools)
load_all("FLRcppAdolc")
document("FLRcppAdolc")
#library(FLCore)
#library(FLRcppAdolc)
#***************************************************************************
nzrl <- read.csv("NZRL.csv")
saa <- read.csv("SAA.csv")
nnh <- read.csv("NNH.csv")
#flspCpp(SEXP C_sexp, SEXP I_sexp, SEXP r_sexp, S... |
library(shiny)
ui <- fluidPage(
sliderInput(inputId = "num",
label = "choose a number",
value = 25, min = 1, max = 100),
plotOutput("hist")
)
server <- function(input, output) {}
shinyApp(ui = ui, server = server) | /shiny template.R | no_license | dynastang/shinyTemplate | R | false | false | 261 | r | library(shiny)
ui <- fluidPage(
sliderInput(inputId = "num",
label = "choose a number",
value = 25, min = 1, max = 100),
plotOutput("hist")
)
server <- function(input, output) {}
shinyApp(ui = ui, server = server) |
dat<- read.table("exdata_data_household_power_consumption\\household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", colClasses = c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric'))
## change format string to date
dat$Date <- as.Date(dat$Date, "%d/%m/%... | /plot3.R | no_license | fredyvel/ExData_Plotting1 | R | false | false | 1,173 | r |
dat<- read.table("exdata_data_household_power_consumption\\household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", colClasses = c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric'))
## change format string to date
dat$Date <- as.Date(dat$Date, "%d/%m/%... |
\name{plot.compgraph}
\alias{plot.compgraph}
\title{plot.compgraph}
\usage{
plot.compgraph(G, hilite.cbtime = FALSE,
suppress.vertex.labels = FALSE, ...)
}
\arguments{
\item{G}{A composite graph object}
\item{hilite.cbtime}{A boolean value}
\item{...}{Parameters to be passed to plot.igraph for g1
and g2... | /man/plot.compgraph.Rd | no_license | beanumber/compgraph | R | false | false | 436 | rd | \name{plot.compgraph}
\alias{plot.compgraph}
\title{plot.compgraph}
\usage{
plot.compgraph(G, hilite.cbtime = FALSE,
suppress.vertex.labels = FALSE, ...)
}
\arguments{
\item{G}{A composite graph object}
\item{hilite.cbtime}{A boolean value}
\item{...}{Parameters to be passed to plot.igraph for g1
and g2... |
## ----check_packages, echo=FALSE, messages=FALSE, warning=FALSE-----------
required <- c("raster", "rgdal", "rgeos", "sp")
if (!all(unlist(lapply(required, function(pkg) requireNamespace(pkg, quietly = TRUE)))))
knitr::opts_chunk$set(eval = FALSE, collapse = TRUE, comment = "#>", fig.align = "center", fig.width =... | /data/genthat_extracted_code/GSODR/vignettes/use_case_1.R | no_license | surayaaramli/typeRrh | R | false | false | 5,788 | r | ## ----check_packages, echo=FALSE, messages=FALSE, warning=FALSE-----------
required <- c("raster", "rgdal", "rgeos", "sp")
if (!all(unlist(lapply(required, function(pkg) requireNamespace(pkg, quietly = TRUE)))))
knitr::opts_chunk$set(eval = FALSE, collapse = TRUE, comment = "#>", fig.align = "center", fig.width =... |
#' Subset columns in a \code{\link{taxmap}} object
#'
#' Subsets \code{taxon_data} columns in a \code{\link{taxmap}} object. Takes and returns a
#' \code{\link{taxmap}} object. Any column name that appears in \code{taxon_data(.data)} can be
#' used as if it was a vector on its own. See \code{\link[dplyr]{select}} for ... | /R/taxmap--select.R | permissive | seninp/metacoder | R | false | false | 2,624 | r | #' Subset columns in a \code{\link{taxmap}} object
#'
#' Subsets \code{taxon_data} columns in a \code{\link{taxmap}} object. Takes and returns a
#' \code{\link{taxmap}} object. Any column name that appears in \code{taxon_data(.data)} can be
#' used as if it was a vector on its own. See \code{\link[dplyr]{select}} for ... |
library(ggplot2)
library(tikzDevice)
library(grid)
#read data from Edmondo
y.prices<-read.csv("e_world_yearly_prices.csv")
years<-seq(1992,1992+nrow(y.prices)-1)
#plot(years+0.5,y.prices$WorldPrice,type="l")
#read data from FAO
data<-read.csv("wheat_prices.csv",sep=";",na.strings="--")
types<-levels(data$info)
type... | /scripts/plot/r_plot_observed_prices.R | no_license | gfgprojects/cms_wheat | R | false | false | 6,192 | r | library(ggplot2)
library(tikzDevice)
library(grid)
#read data from Edmondo
y.prices<-read.csv("e_world_yearly_prices.csv")
years<-seq(1992,1992+nrow(y.prices)-1)
#plot(years+0.5,y.prices$WorldPrice,type="l")
#read data from FAO
data<-read.csv("wheat_prices.csv",sep=";",na.strings="--")
types<-levels(data$info)
type... |
##########################################################################################
# BAYESIAN ORDINATIO AND REGRESSION ANALYSIS PREDICTIONS
##########################################################################################
require(boral)
source(file.path(PD,"boralPredict.r"))
require(abind)
##... | /PREDICT/predict.boral.r | no_license | davan690/SDM-comparison | R | false | false | 2,155 | r | ##########################################################################################
# BAYESIAN ORDINATIO AND REGRESSION ANALYSIS PREDICTIONS
##########################################################################################
require(boral)
source(file.path(PD,"boralPredict.r"))
require(abind)
##... |
library(dplyr)
#Read data from file. From first reading chunks of 10000, data of interest starts
#beyond row 60000
power<-read.table('household_power_consumption.txt',skip=60000, nrows=10000, sep=";",
na.strings=c("?"),colClasses=c("character","character",rep("numeric",7)),
col.name... | /plot2.R | no_license | kgChem/ExData_Plotting1 | R | false | false | 1,177 | r | library(dplyr)
#Read data from file. From first reading chunks of 10000, data of interest starts
#beyond row 60000
power<-read.table('household_power_consumption.txt',skip=60000, nrows=10000, sep=";",
na.strings=c("?"),colClasses=c("character","character",rep("numeric",7)),
col.name... |
golem_sys <- function(
...,
lib.loc = NULL,
mustWork = FALSE
) {
system.file(
...,
package = "golem",
lib.loc = lib.loc,
mustWork = mustWork
)
}
# from usethis https://github.com/r-lib/usethis/
darkgrey <- function(x) {
x <- crayon::make_style("darkgrey")(x)
}
create_if_needed <- function... | /R/utils.R | permissive | Cervangirard/golem | R | false | false | 9,362 | r | golem_sys <- function(
...,
lib.loc = NULL,
mustWork = FALSE
) {
system.file(
...,
package = "golem",
lib.loc = lib.loc,
mustWork = mustWork
)
}
# from usethis https://github.com/r-lib/usethis/
darkgrey <- function(x) {
x <- crayon::make_style("darkgrey")(x)
}
create_if_needed <- function... |
#' Computes completeness values of the dataset
#'
#' Computes completeness values for each cell. Currently returns Chao2 index of
#' species richness.
#'
#' After dividing the extent of the dataset in cells (via the
#' \code{\link{get_cell_id}} function), the function calculates the Chao2 estimator
#' of species richne... | /R/bdcomplete.R | no_license | thiloshon/bdvis | R | false | false | 3,782 | r | #' Computes completeness values of the dataset
#'
#' Computes completeness values for each cell. Currently returns Chao2 index of
#' species richness.
#'
#' After dividing the extent of the dataset in cells (via the
#' \code{\link{get_cell_id}} function), the function calculates the Chao2 estimator
#' of species richne... |
#' @importFrom rlang .data
#' @title Load weightlifting logs
#' @description Loads weightlifting logs in CSV format into a data frame
#'
#' @param datadir A directory containing weightlifting logs in CSV format. The expected format is \code{date, exercise, variant, set1weight, set1reps, ..., setNweight, setNreps}
#' @... | /R/load_csv_data.R | no_license | titaniumtroop/rweightlifting | R | false | false | 4,250 | r | #' @importFrom rlang .data
#' @title Load weightlifting logs
#' @description Loads weightlifting logs in CSV format into a data frame
#'
#' @param datadir A directory containing weightlifting logs in CSV format. The expected format is \code{date, exercise, variant, set1weight, set1reps, ..., setNweight, setNreps}
#' @... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cfa.R
\name{test.lige}
\alias{test.lige}
\title{test.lige}
\usage{
test.lige(cfaobj, allt, se = T, h)
}
\arguments{
\item{cfaobj}{a CFA object}
\item{allt}{all the values of the treatment variable in the dataset}
\item{se}{boolean whether o... | /man/test.lige.Rd | no_license | WeigeHuangEcon/ccfa | R | false | true | 914 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cfa.R
\name{test.lige}
\alias{test.lige}
\title{test.lige}
\usage{
test.lige(cfaobj, allt, se = T, h)
}
\arguments{
\item{cfaobj}{a CFA object}
\item{allt}{all the values of the treatment variable in the dataset}
\item{se}{boolean whether o... |
### R code from vignette source 'TR8_workflow.Rnw'
### Encoding: UTF-8
###################################################
### code chunk number 1: dryad (eval = FALSE)
###################################################
## ## the readxl package is needed
## ## library(readxl)
## ## store the url of the dryad package... | /TR8/inst/doc/TR8_workflow.R | no_license | ingted/R-Examples | R | false | false | 11,138 | r | ### R code from vignette source 'TR8_workflow.Rnw'
### Encoding: UTF-8
###################################################
### code chunk number 1: dryad (eval = FALSE)
###################################################
## ## the readxl package is needed
## ## library(readxl)
## ## store the url of the dryad package... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.cognitoidentityprovider_operations.R
\name{describe_identity_provider}
\alias{describe_identity_provider}
\title{Gets information about a specific identity provider}
\usage{
describe_identity_provider(UserPoolId, ProviderName)
}
\argumen... | /service/paws.cognitoidentityprovider/man/describe_identity_provider.Rd | permissive | CR-Mercado/paws | R | false | true | 635 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.cognitoidentityprovider_operations.R
\name{describe_identity_provider}
\alias{describe_identity_provider}
\title{Gets information about a specific identity provider}
\usage{
describe_identity_provider(UserPoolId, ProviderName)
}
\argumen... |
### Pre-impute data ###
preimputation<-function(data, imp.method='mean'){
if(imp.method=='mean'){
data<-mice(data, method = 'mean',printFlag = F)
datapreimput<-complete(data)
}
if(imp.method=='locf'){
data<-t(db.prov)
data<-na.locf(data)
data<-t(data)
data<-mice(data, method = 'mean', pri... | /R/preimputation.R | permissive | helpstatanalysis/mvls0.1 | R | false | false | 394 | r | ### Pre-impute data ###
preimputation<-function(data, imp.method='mean'){
if(imp.method=='mean'){
data<-mice(data, method = 'mean',printFlag = F)
datapreimput<-complete(data)
}
if(imp.method=='locf'){
data<-t(db.prov)
data<-na.locf(data)
data<-t(data)
data<-mice(data, method = 'mean', pri... |
# Load and process raw SAPIA database
# Import database
#raw_data <- readxl::read_xlsx("./data_raw/tAP_Main.xlsx")
raw_data <- readr::read_csv2("./data_raw/SAPIA_raw_database_march_2020.csv",
col_types = cols(.default = "c",
"Record_number" = "... | /R/process_clean_import_data.R | no_license | guysutton/sapiaR | R | false | false | 5,109 | r | # Load and process raw SAPIA database
# Import database
#raw_data <- readxl::read_xlsx("./data_raw/tAP_Main.xlsx")
raw_data <- readr::read_csv2("./data_raw/SAPIA_raw_database_march_2020.csv",
col_types = cols(.default = "c",
"Record_number" = "... |
MOSS.Hierarchical <-
function (startList = NULL, p = 0.2, alpha = 1, c = 0.1, cPrime = 0.0001, q = 0.1, replicates = 5, data) {
tools <- list()
varNames <- colnames(data)[which(colnames(data)!= "freq")]
n <- length(varNames)
varSets <- decToBin (0:(2**n-1),n)
colnames(varSets) <- varNames
lenVarSets <- ... | /genMOSSplus/R/MOSS.Hierarchical.R | no_license | ingted/R-Examples | R | false | false | 5,065 | r | MOSS.Hierarchical <-
function (startList = NULL, p = 0.2, alpha = 1, c = 0.1, cPrime = 0.0001, q = 0.1, replicates = 5, data) {
tools <- list()
varNames <- colnames(data)[which(colnames(data)!= "freq")]
n <- length(varNames)
varSets <- decToBin (0:(2**n-1),n)
colnames(varSets) <- varNames
lenVarSets <- ... |
#scrape dogtime.com
library(tidyverse)
library(rvest)
#function to scrape alle elements also missing elements
scrape_css<-function(css,group,html_page){
txt<-html_page %>%
html_nodes(group) %>%
lapply(.%>% html_nodes(css) %>% html_text() %>% ifelse(identical(.,character(0)),NA,.)) %>%
unlist()
retu... | /Scrape_dog_breed_profiles.R | no_license | ESeverijns/DOGS-AS-PETS-AND-THEIR-INFLUENCE-ON-OWNERS | R | false | false | 3,373 | r | #scrape dogtime.com
library(tidyverse)
library(rvest)
#function to scrape alle elements also missing elements
scrape_css<-function(css,group,html_page){
txt<-html_page %>%
html_nodes(group) %>%
lapply(.%>% html_nodes(css) %>% html_text() %>% ifelse(identical(.,character(0)),NA,.)) %>%
unlist()
retu... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(5.6941917864458e+81, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615835054-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 269 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(5.6941917864458e+81, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist)
str(result) |
library("data.table")
setwd("/Users/mauramz/JHU/ExploratoryDataAnalysis/CourseProject1/ExData_Plotting1")
#Reads in data from file then subsets data for specified dates
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
# Prevents Scientific Notatio... | /Plot2.R | no_license | mauramz/ExData_Plotting1 | R | false | false | 899 | r | library("data.table")
setwd("/Users/mauramz/JHU/ExploratoryDataAnalysis/CourseProject1/ExData_Plotting1")
#Reads in data from file then subsets data for specified dates
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
# Prevents Scientific Notatio... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gene_score_plot.R
\name{simple.legend}
\alias{simple.legend}
\title{Plot simple legend}
\usage{
simple.legend(labels, colors)
}
\arguments{
\item{labels}{vector of legend labels}
\item{colors}{vector of legend colors}
}
\description{
Plot si... | /source/rCNV2/man/simple.legend.Rd | permissive | talkowski-lab/rCNV2 | R | false | true | 340 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gene_score_plot.R
\name{simple.legend}
\alias{simple.legend}
\title{Plot simple legend}
\usage{
simple.legend(labels, colors)
}
\arguments{
\item{labels}{vector of legend labels}
\item{colors}{vector of legend colors}
}
\description{
Plot si... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enmtools.rf.R
\name{enmtools.rf}
\alias{enmtools.rf}
\title{Takes an emtools.species object with presence and background points, and builds a random forest model}
\usage{
enmtools.rf(species, env, f = NULL, test.prop = 0, eval = TRUE,
nback... | /man/enmtools.rf.Rd | no_license | helixcn/ENMTools | R | false | true | 1,487 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enmtools.rf.R
\name{enmtools.rf}
\alias{enmtools.rf}
\title{Takes an emtools.species object with presence and background points, and builds a random forest model}
\usage{
enmtools.rf(species, env, f = NULL, test.prop = 0, eval = TRUE,
nback... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bw_hpi.R
\name{bw_hpi}
\alias{bw_hpi}
\title{Default Plug-in bandwidth selector using ks::Hpi function.}
\usage{
bw_hpi(x)
}
\arguments{
\item{x}{2d matrix of data values.}
}
\value{
A numeric vector of estimated x and y bandwidth... | /man/bw_hpi.Rd | no_license | cran/rKIN | R | false | true | 760 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bw_hpi.R
\name{bw_hpi}
\alias{bw_hpi}
\title{Default Plug-in bandwidth selector using ks::Hpi function.}
\usage{
bw_hpi(x)
}
\arguments{
\item{x}{2d matrix of data values.}
}
\value{
A numeric vector of estimated x and y bandwidth... |
pdf("/Users/wiliarj/Desktop/temp/polyCrCg_heatmap.pdf")
library(latticeExtra)
breaks1 = 50000
breaks2 = 50
########################
mydata = read.table("/Users/wiliarj/Desktop/temp/4fold.aligned.2.afs",header=T)
attach(mydata)
test = ifelse(Cg == 0 & Cr == 0, F, T)
freqs = Num_Sites/sum(Num_Sites[test])
col.... | /random R/.svn/text-base/polyHeatmap.R.svn-base | no_license | bioCKO/science | R | false | false | 5,771 | pdf("/Users/wiliarj/Desktop/temp/polyCrCg_heatmap.pdf")
library(latticeExtra)
breaks1 = 50000
breaks2 = 50
########################
mydata = read.table("/Users/wiliarj/Desktop/temp/4fold.aligned.2.afs",header=T)
attach(mydata)
test = ifelse(Cg == 0 & Cr == 0, F, T)
freqs = Num_Sites/sum(Num_Sites[test])
col.... | |
# Getting and Cleaning Data Course Project
# run_analysis.R
#
# Purpose:
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the mean and standard deviation for
# each measurement.
# 3. Uses descriptive activity names to name the activities in the data set.
# 4. ... | /run_analysis.R | no_license | celeph/getting-cleaning-data | R | false | false | 5,629 | r | # Getting and Cleaning Data Course Project
# run_analysis.R
#
# Purpose:
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the mean and standard deviation for
# each measurement.
# 3. Uses descriptive activity names to name the activities in the data set.
# 4. ... |
#Load data
NEI <- readRDS("D:\\Documents\\exdata_data_NEI_data\\summarySCC_PM25.rds")
SCC <- readRDS("D:\\Documents\\exdata_data_NEI_data\\Source_Classification_Code.rds")
#Merge data
head(NEI)
head(SCC)
mydata <- NEI
head(mydata)
##there are so many outliers!
summary(mydata$Emissions)
summary(subset(myd... | /plot1.R | no_license | HeJiaolong/Exploratory-Data-Analysis-Course-Project-2 | R | false | false | 930 | r | #Load data
NEI <- readRDS("D:\\Documents\\exdata_data_NEI_data\\summarySCC_PM25.rds")
SCC <- readRDS("D:\\Documents\\exdata_data_NEI_data\\Source_Classification_Code.rds")
#Merge data
head(NEI)
head(SCC)
mydata <- NEI
head(mydata)
##there are so many outliers!
summary(mydata$Emissions)
summary(subset(myd... |
library(tidyr)
library(panelsim)
#setwd("~/Box Sync/Between Effects/Simulation")
#source("tw_sim.R")
# to run code, first install R package from Github
# remotes::install_github("saudiwin/panelsim")
set.seed(22902)
## Changing the mean of the within-time slopes
sim1 <- tw_sim(iter=30, parallel=FALSE, arg="beta.mean"... | /simulation_code.R | no_license | ibrahimalnafrah/panelsim | R | false | false | 2,301 | r | library(tidyr)
library(panelsim)
#setwd("~/Box Sync/Between Effects/Simulation")
#source("tw_sim.R")
# to run code, first install R package from Github
# remotes::install_github("saudiwin/panelsim")
set.seed(22902)
## Changing the mean of the within-time slopes
sim1 <- tw_sim(iter=30, parallel=FALSE, arg="beta.mean"... |
toy_df_no_na <- data.frame(chocolate_brand = (c("Lindt", "Rakhat", "Lindt", "Richart", "Lindt")),
price = c(3, 4, 4, 6, 3))
toy_df_na <- data.frame(chocolate_brand = (c("Lindt", "Rakhat", "Lindt", "Richart", "not available")),
price = c(3, NA, 4, 6, 3))
# Test the type of i... | /tests/testthat/test-autoimpute_na.R | permissive | UBC-MDS/Rmleda | R | false | false | 913 | r | toy_df_no_na <- data.frame(chocolate_brand = (c("Lindt", "Rakhat", "Lindt", "Richart", "Lindt")),
price = c(3, 4, 4, 6, 3))
toy_df_na <- data.frame(chocolate_brand = (c("Lindt", "Rakhat", "Lindt", "Richart", "not available")),
price = c(3, NA, 4, 6, 3))
# Test the type of i... |
# You can test the following two methods using the following tracks IDs
# trackIDs = '1CUVN2kn7mW5FjkqXTR2W1,387r02a1k6RZ4cwFraHkee'
#' Building a function to access to the specific tracks
#'
#' This function is building the access to the specific tracks
#'
#'@param artistID a character of the ID of spotify tracks
#'@... | /spotifyr/R/tracks.R | no_license | ashrafsarhan/adv-r | R | false | false | 1,942 | r | # You can test the following two methods using the following tracks IDs
# trackIDs = '1CUVN2kn7mW5FjkqXTR2W1,387r02a1k6RZ4cwFraHkee'
#' Building a function to access to the specific tracks
#'
#' This function is building the access to the specific tracks
#'
#'@param artistID a character of the ID of spotify tracks
#'@... |
## This function simply cache the inverse matrix object of a given matrix
makeCacheMatrix <- function(b = matrix()) {
cnt <- NULL
set <- function(a){
b <<- a
cnt <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse <- function() inv
lis... | /cachematrix.R | no_license | DurararaKris/ProgrammingAssignment2 | R | false | false | 726 | r | ## This function simply cache the inverse matrix object of a given matrix
makeCacheMatrix <- function(b = matrix()) {
cnt <- NULL
set <- function(a){
b <<- a
cnt <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse <- function() inv
lis... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{showGridLines}
\alias{showGridLines}
\title{Set worksheet gridlines to show or hide.}
\usage{
showGridLines(wb, sheet, showGridLines = FALSE)
}
\arguments{
\item{wb}{A workbook object}
\item{sheet}{A name or index of a works... | /man/showGridLines.Rd | no_license | ecortens/openxlsx | R | false | true | 782 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrappers.R
\name{showGridLines}
\alias{showGridLines}
\title{Set worksheet gridlines to show or hide.}
\usage{
showGridLines(wb, sheet, showGridLines = FALSE)
}
\arguments{
\item{wb}{A workbook object}
\item{sheet}{A name or index of a works... |
pdf(file='S8A_c0_t3.pdf',width=4.5,height=4.5);
gstable=read.table('S8A_c0_t3.gene_summary.txt',header=T)
#
#
# parameters
# Do not modify the variables beginning with "__"
# gstablename='__GENE_SUMMARY_FILE__'
startindex=3
# outputfile='__OUTPUT_FILE__'
targetgenelist=c("SOX9","CCR5","ROSA26","PROM1","AAVS1","LRIG1"... | /Miniscreen05/MaGeCK_stats/S8A_c0_t3.R | no_license | davidchen0420/Miniscreen | R | false | false | 36,771 | r | pdf(file='S8A_c0_t3.pdf',width=4.5,height=4.5);
gstable=read.table('S8A_c0_t3.gene_summary.txt',header=T)
#
#
# parameters
# Do not modify the variables beginning with "__"
# gstablename='__GENE_SUMMARY_FILE__'
startindex=3
# outputfile='__OUTPUT_FILE__'
targetgenelist=c("SOX9","CCR5","ROSA26","PROM1","AAVS1","LRIG1"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oa_readme.R
\name{oa_readme}
\alias{oa_readme}
\title{Print readme from one or more datasets}
\usage{
oa_readme(x)
}
\arguments{
\item{x}{input, either an object of class \code{oa} or a list of such
objects}
}
\value{
character string
}
\desc... | /man/oa_readme.Rd | permissive | cran/openadds | R | false | true | 694 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oa_readme.R
\name{oa_readme}
\alias{oa_readme}
\title{Print readme from one or more datasets}
\usage{
oa_readme(x)
}
\arguments{
\item{x}{input, either an object of class \code{oa} or a list of such
objects}
}
\value{
character string
}
\desc... |
library(testthat)
library(equivtest)
test_check("equivtest")
| /tests/testthat.R | permissive | jwbowers/equivtest | R | false | false | 62 | r | library(testthat)
library(equivtest)
test_check("equivtest")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/appmesh_operations.R
\name{appmesh_update_virtual_node}
\alias{appmesh_update_virtual_node}
\title{Updates an existing virtual node in a specified service mesh}
\usage{
appmesh_update_virtual_node(clientToken, meshName, spec,
virtualNodeNam... | /cran/paws.networking/man/appmesh_update_virtual_node.Rd | permissive | peoplecure/paws | R | false | true | 1,789 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/appmesh_operations.R
\name{appmesh_update_virtual_node}
\alias{appmesh_update_virtual_node}
\title{Updates an existing virtual node in a specified service mesh}
\usage{
appmesh_update_virtual_node(clientToken, meshName, spec,
virtualNodeNam... |
# User options
use_gpu <- FALSE
make_args_from_build_script <- character(0L)
# For Windows, the package will be built with Visual Studio
# unless you set one of these to TRUE
use_mingw <- FALSE
use_msys2 <- FALSE
if (use_mingw && use_msys2) {
stop("Cannot use both MinGW and MSYS2. Please choose only one.")
}
if (.... | /R-package/src/install.libs.R | permissive | NProkoptsev/LightGBM | R | false | false | 7,748 | r | # User options
use_gpu <- FALSE
make_args_from_build_script <- character(0L)
# For Windows, the package will be built with Visual Studio
# unless you set one of these to TRUE
use_mingw <- FALSE
use_msys2 <- FALSE
if (use_mingw && use_msys2) {
stop("Cannot use both MinGW and MSYS2. Please choose only one.")
}
if (.... |
library(shiny)
library(shinycssloaders)
library(dygraphs)
library(DT)
source("app.R")
fluidPage(
sidebarPanel(
h3("Historische Preise"),
htmlOutput("station"),
verbatimTextOutput('openingtimes'),
selectInput("price", "Sorte:",
c("Diesel" = "Diesel"... | /src/shiny-viewer/ui.R | no_license | volzinnovation/wanntanken | R | false | false | 1,359 | r | library(shiny)
library(shinycssloaders)
library(dygraphs)
library(DT)
source("app.R")
fluidPage(
sidebarPanel(
h3("Historische Preise"),
htmlOutput("station"),
verbatimTextOutput('openingtimes'),
selectInput("price", "Sorte:",
c("Diesel" = "Diesel"... |
#
# Copyright 2007-2018 by the individuals mentioned in the source code history
#
# 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
... | /R/SymmMatrix.R | no_license | OpenMx/OpenMx | R | false | false | 4,988 | r | #
# Copyright 2007-2018 by the individuals mentioned in the source code history
#
# 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
... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{evalPerformance}
\alias{evalPerformance}
\title{evalPerformance}
\usage{
evalPerformance(refset.calls, sample.outcomes)
}
\arguments{
\item{refset.calls}{is the data.frame returned by the \link{testUnknowns}
function. It contains column with sampleIDs, z-scores... | /man/evalPerformance.Rd | no_license | biocyberman/RAPIDR | R | false | false | 633 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{evalPerformance}
\alias{evalPerformance}
\title{evalPerformance}
\usage{
evalPerformance(refset.calls, sample.outcomes)
}
\arguments{
\item{refset.calls}{is the data.frame returned by the \link{testUnknowns}
function. It contains column with sampleIDs, z-scores... |
library(rmr)
library(hash)
# sample the data using the "look at the first few
# lines" method
# use the file() function, readChar function, and strsplit
# function to break the words up.
# then use R's tapply function to find the word counts
hist_order=order(unlist(word_count_samples), decreasing=T)
word_histogram =... | /Fill-In/wordcount-zipfian.R | no_license | RodavLasIlad/rhadoop-examples | R | false | false | 2,372 | r | library(rmr)
library(hash)
# sample the data using the "look at the first few
# lines" method
# use the file() function, readChar function, and strsplit
# function to break the words up.
# then use R's tapply function to find the word counts
hist_order=order(unlist(word_count_samples), decreasing=T)
word_histogram =... |
testlist <- list(x = numeric(0), y = c(1.82391396040758e-183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(netrankr:::checkPairs,testlist)
str(result) | /netrankr/inst/testfiles/checkPairs/libFuzzer_checkPairs/checkPairs_valgrind_files/1612798731-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 182 | r | testlist <- list(x = numeric(0), y = c(1.82391396040758e-183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
result <- do.call(netrankr:::checkPairs,testlist)
str(result) |
########################################
# turn any pin heights into mm
# and name the column pin_height
########################################
height_to_mm <- function(data){
if(exists('pin_height_cm', data)) {
data <- data %>%
mutate(pin_height = pin_height_cm * 10) %>%
select(-p... | /R/000_functions.R | no_license | swmpkim/SETr_script_development | R | false | false | 12,130 | r | ########################################
# turn any pin heights into mm
# and name the column pin_height
########################################
height_to_mm <- function(data){
if(exists('pin_height_cm', data)) {
data <- data %>%
mutate(pin_height = pin_height_cm * 10) %>%
select(-p... |
library(BB)
### Name: sane
### Title: Solving Large-Scale Nonlinear System of Equations
### Aliases: sane
### Keywords: multivariate
### ** Examples
trigexp <- function(x) {
# Test function No. 12 in the Appendix of LaCruz and Raydan (2003)
n <- length(x)
F <- rep(NA, n)
F[1] <- 3*x[1]^2 + 2*x[2] - 5 ... | /data/genthat_extracted_code/BB/examples/sane.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,209 | r | library(BB)
### Name: sane
### Title: Solving Large-Scale Nonlinear System of Equations
### Aliases: sane
### Keywords: multivariate
### ** Examples
trigexp <- function(x) {
# Test function No. 12 in the Appendix of LaCruz and Raydan (2003)
n <- length(x)
F <- rep(NA, n)
F[1] <- 3*x[1]^2 + 2*x[2] - 5 ... |
# The makeCacheMatrix function creates a list containing a function to
# 1. set the value of the matrix
# 2. get the value of the matrix
# 3. set the value of the inverse
# 4. get the value of the inverse
makeCacheMatrix <- function(x = matrix()) {
inverse <- NULL
set <- function(y) {
x... | /cachematrix.R | no_license | tmcclure92/ProgrammingAssignment2 | R | false | false | 1,158 | r | # The makeCacheMatrix function creates a list containing a function to
# 1. set the value of the matrix
# 2. get the value of the matrix
# 3. set the value of the inverse
# 4. get the value of the inverse
makeCacheMatrix <- function(x = matrix()) {
inverse <- NULL
set <- function(y) {
x... |
### Function to doawnload data from aclimate geoserver "https://geo.aclimate.org/geoserver/"
# Author: Rodriguez-Espinoza J., Mesa J.,
# https://github.com/jrodriguez88/
# 2022
#library(tidyverse)
#library(raster)
# Function to doawnload data from aclimate geoserver "https://geo.aclimate.org/geoserver/"
## Ar... | /dssat_API/dssat_scripts/03_connect_georserver.R | no_license | CIAT-DAPA/usaid_procesos_interfaz | R | false | false | 6,272 | r | ### Function to doawnload data from aclimate geoserver "https://geo.aclimate.org/geoserver/"
# Author: Rodriguez-Espinoza J., Mesa J.,
# https://github.com/jrodriguez88/
# 2022
#library(tidyverse)
#library(raster)
# Function to doawnload data from aclimate geoserver "https://geo.aclimate.org/geoserver/"
## Ar... |
testlist <- list(phi = 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = c(1.36656528938164e-311, -1.657912... | /dcurver/inst/testfiles/ddc/AFL_ddc/ddc_valgrind_files/1609868226-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 832 | r | testlist <- list(phi = 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = c(1.36656528938164e-311, -1.657912... |
#' @importFrom dplyr filter
#' @importFrom ggplot2 geom_vline
#' @title Studentized Residuals vs Leverage Plot
#' @description Graph for detecting outliers and/or observations with high leverage.
#' @param model an object of class \code{lm}
#' @examples
#' model <- lm(read ~ write + math + science, data = hsb)
#' ols_... | /R/ols-rstud-vs-lev-plot.R | no_license | SvetiStefan/olsrr | R | false | false | 1,767 | r | #' @importFrom dplyr filter
#' @importFrom ggplot2 geom_vline
#' @title Studentized Residuals vs Leverage Plot
#' @description Graph for detecting outliers and/or observations with high leverage.
#' @param model an object of class \code{lm}
#' @examples
#' model <- lm(read ~ write + math + science, data = hsb)
#' ols_... |
setwd("C:/Users/Administrador/Downloads")
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
POINT<-NEI[which(NEI$type=="POINT"),]
NONPOINT<-NEI[which(NEI$type=="NONPOINT"),]
ROAD<-NEI[which(NEI$type=="ON-ROAD"),]
NONROAD<-NEI[which(NEI$type=="NON-ROAD"),]
PTotal1999<-sum(... | /Project 2/Plot3.R | no_license | jhonarredondo/Exploratory-Data-Analysis | R | false | false | 2,125 | r | setwd("C:/Users/Administrador/Downloads")
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
POINT<-NEI[which(NEI$type=="POINT"),]
NONPOINT<-NEI[which(NEI$type=="NONPOINT"),]
ROAD<-NEI[which(NEI$type=="ON-ROAD"),]
NONROAD<-NEI[which(NEI$type=="NON-ROAD"),]
PTotal1999<-sum(... |
care_package <- function(x){
library(stringr)
library(dplyr)
}
clean_who_number_spaces <-
function(x) {
str_replace_all(x, "([0-9]{1,3}) ([0-9]{3})", paste0("\\1", "", "\\2"))
str_replace_all(x," ","")
}
avg_get <-
function(x) {
test <- str_extract_all(x,"^[0-9]+\\.?[0-9]*\\[")
str_repl... | /code/Jeng-functions.R | no_license | KaiJeng/msds597-week08 | R | false | false | 867 | r | care_package <- function(x){
library(stringr)
library(dplyr)
}
clean_who_number_spaces <-
function(x) {
str_replace_all(x, "([0-9]{1,3}) ([0-9]{3})", paste0("\\1", "", "\\2"))
str_replace_all(x," ","")
}
avg_get <-
function(x) {
test <- str_extract_all(x,"^[0-9]+\\.?[0-9]*\\[")
str_repl... |
file_path<-"./household_power_consumption.txt"
myData<-read.table(file_path, sep=";", header = TRUE)
head(myData)
myData$Date= as.Date(myData$Date, "%d/%m/%Y")
#get set
myset<-myData[myData$Date >="2007-02-01"& myData$Date <="2007-02-02", ]
#add weekday to dataset
myset$FullDate<-with (myset,as.POSIXct(pas... | /plot3.r | no_license | yaomisun/datasciencecoursera | R | false | false | 1,085 | r | file_path<-"./household_power_consumption.txt"
myData<-read.table(file_path, sep=";", header = TRUE)
head(myData)
myData$Date= as.Date(myData$Date, "%d/%m/%Y")
#get set
myset<-myData[myData$Date >="2007-02-01"& myData$Date <="2007-02-02", ]
#add weekday to dataset
myset$FullDate<-with (myset,as.POSIXct(pas... |
####
# Generate qq plot for SMG results
#
###
# for example
#R --slave --args < qqplot.R music2_smg_test_detailed out.pdf
#
# Fetch command line arguments
args = commandArgs();
input = as.character(args[4])
output = as.character(args[5])
#input="smgs_detailed"
#output="qqplot.pdf"
read.table(input,he... | /lib/TGI/MuSiC2/Smg.pm.qqplot.correct.R | permissive | ding-lab/MuSiC2 | R | false | false | 1,305 | r | ####
# Generate qq plot for SMG results
#
###
# for example
#R --slave --args < qqplot.R music2_smg_test_detailed out.pdf
#
# Fetch command line arguments
args = commandArgs();
input = as.character(args[4])
output = as.character(args[5])
#input="smgs_detailed"
#output="qqplot.pdf"
read.table(input,he... |
library(tidyverse)
# ggplot2::mpg 패키지를 복사
mpg <- as.data.frame(ggplot2::mpg)
# 1) cty, hwy 변수의 평균을 파생 변수(avg_mpg)로 추가
mpg_added <- mutate(mpg, avg_mpg = (cty + hwy) / 2)
head(mpg_added)
# 2) avg_mpg 값 상위 3개 자동차 모델 정보 출력
mpg_added %>% arrange(desc(avg_mpg)) %>% head(n = 3)
# 3) 1), 2)와 같은 결과를 주는 pipe 연산자... | /lab_r/ex09_preprocessing.r | no_license | jade053/202007_itw_bd18 | R | false | false | 4,215 | r | library(tidyverse)
# ggplot2::mpg 패키지를 복사
mpg <- as.data.frame(ggplot2::mpg)
# 1) cty, hwy 변수의 평균을 파생 변수(avg_mpg)로 추가
mpg_added <- mutate(mpg, avg_mpg = (cty + hwy) / 2)
head(mpg_added)
# 2) avg_mpg 값 상위 3개 자동차 모델 정보 출력
mpg_added %>% arrange(desc(avg_mpg)) %>% head(n = 3)
# 3) 1), 2)와 같은 결과를 주는 pipe 연산자... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ub_wn_ign.R
\name{ub_wn_ign}
\alias{ub_wn_ign}
\title{upper bound wilson, ignorable mi}
\usage{
ub_wn_ign(z, qhat, n_obs, rn)
}
\arguments{
\item{z}{numeric, quantile of t distribution coresponding to the desired
confidence level 1- alpha}
\... | /man/ub_wn_ign.Rd | permissive | yuliasidi/bin2mi | R | false | true | 606 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ub_wn_ign.R
\name{ub_wn_ign}
\alias{ub_wn_ign}
\title{upper bound wilson, ignorable mi}
\usage{
ub_wn_ign(z, qhat, n_obs, rn)
}
\arguments{
\item{z}{numeric, quantile of t distribution coresponding to the desired
confidence level 1- alpha}
\... |
library(mice)
library(parallel)
library(readr)
library(dplyr)
df <- read_csv("NHAMCS_2012-2015_2018-04-09.csv")
df$X1 <- NULL
cl <- makeCluster(7)
clusterSetRNGStream(cl,9956)
clusterExport(cl,"df")
clusterEvalQ(cl,library(mice))
imp_pars <- parLapply(cl=cl, X=1:7, fun=function(no){mice(df, m=1)})
stopCluster(cl)
im... | /imp_triage.R | no_license | cagancayco/ed-triage | R | false | false | 523 | r | library(mice)
library(parallel)
library(readr)
library(dplyr)
df <- read_csv("NHAMCS_2012-2015_2018-04-09.csv")
df$X1 <- NULL
cl <- makeCluster(7)
clusterSetRNGStream(cl,9956)
clusterExport(cl,"df")
clusterEvalQ(cl,library(mice))
imp_pars <- parLapply(cl=cl, X=1:7, fun=function(no){mice(df, m=1)})
stopCluster(cl)
im... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_node_attrs.R
\name{get_node_attrs}
\alias{get_node_attrs}
\title{Get node attribute values}
\usage{
get_node_attrs(x, node_attr, nodes = NULL)
}
\arguments{
\item{x}{either a graph object of class
\code{dgr_graph} that is created using
\c... | /man/get_node_attrs.Rd | no_license | dy-kim/DiagrammeR | R | false | true | 1,389 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_node_attrs.R
\name{get_node_attrs}
\alias{get_node_attrs}
\title{Get node attribute values}
\usage{
get_node_attrs(x, node_attr, nodes = NULL)
}
\arguments{
\item{x}{either a graph object of class
\code{dgr_graph} that is created using
\c... |
# Title : heuristic
# Objective : Interface with stan model
# Created by: adkinsty
# Created on: 6/25/20
library(rstan)
library(tidyverse)
library(shinystan)
library(ggthemes)
library(shotGroups)
library(bayesplot)
options(mc.cores = parallel::detectCores())
parallel:::setDefaultClusterOptions(setup_strategy = "s... | /modeling/exp2/stan/extra/H.R | no_license | adkinsty/reach | R | false | false | 5,093 | r | # Title : heuristic
# Objective : Interface with stan model
# Created by: adkinsty
# Created on: 6/25/20
library(rstan)
library(tidyverse)
library(shinystan)
library(ggthemes)
library(shotGroups)
library(bayesplot)
options(mc.cores = parallel::detectCores())
parallel:::setDefaultClusterOptions(setup_strategy = "s... |
# Script summary
#
# Quantile Mapping
# Loop through WRF output for stations, quantile map to bias correct
# save CSVs of the adjusted WRF output
# Save figures of ECDF plots
# Do this for:
#
# ERA-Interim
#
# CSM3 (historical and future)
#
# CCSM4 (historical and future)
#
# Convert CSV
# save csv files of "... | /WRF_code/wrf_adjustment.R | no_license | kyleredilla/AK_Wind_Climatology | R | false | false | 12,615 | r | # Script summary
#
# Quantile Mapping
# Loop through WRF output for stations, quantile map to bias correct
# save CSVs of the adjusted WRF output
# Save figures of ECDF plots
# Do this for:
#
# ERA-Interim
#
# CSM3 (historical and future)
#
# CCSM4 (historical and future)
#
# Convert CSV
# save csv files of "... |
# set working directory
#setwd("E:/PhD/Teaching/ENG203/Drone")
# define connection
ARDRONE_NAVDATA_PORT = 5554
ARDRONE_VIDEO_PORT = 5555
ARDRONE_COMMAND_PORT = 5556
droneIP <- "192.168.1.1"
# # options to create the connection
# # using socket write.socket(AR_cmd, AT(Cmd))
# AR_cmd <- make.socket(host = droneIP, ARD... | /bin/drone_path_ncat.R | no_license | IdoBar/AR.Drone.R.API | R | false | false | 5,228 | r | # set working directory
#setwd("E:/PhD/Teaching/ENG203/Drone")
# define connection
ARDRONE_NAVDATA_PORT = 5554
ARDRONE_VIDEO_PORT = 5555
ARDRONE_COMMAND_PORT = 5556
droneIP <- "192.168.1.1"
# # options to create the connection
# # using socket write.socket(AR_cmd, AT(Cmd))
# AR_cmd <- make.socket(host = droneIP, ARD... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getExpressionLevel.R
\name{getExpressionLevel}
\alias{getExpressionLevel}
\title{getExpressionLevel function}
\usage{
getExpressionLevel(host, expressionLevelId)
}
\arguments{
\item{host}{URL of GA4GH API data server.}
\item{expressionLevelI... | /man/getExpressionLevel.Rd | no_license | labbcb/GA4GHclient | R | false | true | 1,183 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getExpressionLevel.R
\name{getExpressionLevel}
\alias{getExpressionLevel}
\title{getExpressionLevel function}
\usage{
getExpressionLevel(host, expressionLevelId)
}
\arguments{
\item{host}{URL of GA4GH API data server.}
\item{expressionLevelI... |
###################################################################
# UNIVERSIDADE FEDERAL DE MINAS GERAIS
# BACHARELADO EM ENGENHARIA DE SISTEMAS
# DISCIPLINA: ELE088 Teoria da Decisao
# PROFESSOR: Lucas de Souza Batista ... | /TC2/vizinhanca2.R | no_license | nikolasfantoni/TD | R | false | false | 10,722 | r | ###################################################################
# UNIVERSIDADE FEDERAL DE MINAS GERAIS
# BACHARELADO EM ENGENHARIA DE SISTEMAS
# DISCIPLINA: ELE088 Teoria da Decisao
# PROFESSOR: Lucas de Souza Batista ... |
# This script processes dataset of protein-protein inteacrtions related to brain ageing (PBA)
## Create the folder where current results will be written
resdir <- paste("~/absb/results", "pba", sep = "/")
dir.create(file.path(resdir), showWarnings = FALSE, recursive = TRUE)
# Set created directory as working dir... | /scripts/pba/pba_int.R | no_license | esugis/absb | R | false | false | 2,576 | r | # This script processes dataset of protein-protein inteacrtions related to brain ageing (PBA)
## Create the folder where current results will be written
resdir <- paste("~/absb/results", "pba", sep = "/")
dir.create(file.path(resdir), showWarnings = FALSE, recursive = TRUE)
# Set created directory as working dir... |
library(spdep)
### Name: aple.mc
### Title: Approximate profile-likelihood estimator (APLE) permutation test
### Aliases: aple.mc
### Keywords: spatial
### ** Examples
## No test:
if (require(rgdal, quietly=TRUE)) {
example(aple)
oldRNG <- RNGkind()
RNGkind("L'Ecuyer-CMRG")
set.seed(1L)
boot_out_ser <- aple.mc(as.... | /data/genthat_extracted_code/spdep/examples/aple.mc.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,000 | r | library(spdep)
### Name: aple.mc
### Title: Approximate profile-likelihood estimator (APLE) permutation test
### Aliases: aple.mc
### Keywords: spatial
### ** Examples
## No test:
if (require(rgdal, quietly=TRUE)) {
example(aple)
oldRNG <- RNGkind()
RNGkind("L'Ecuyer-CMRG")
set.seed(1L)
boot_out_ser <- aple.mc(as.... |
#'Estimate animal abundance from actual data set
#'
#'Code as of 2 August 2013 is incomplete and not in a functional state.
#'
#'This function estimates animal abundance within the study area (grid)
#'by calculating density \eqn{\pi (z(x,y))} as a function of covariate for each grid cell.
#'
#'Calls to appropriate dist... | /R/est.abundance.whales.R | no_license | martinjamescox/nupoint | R | false | false | 5,271 | r | #'Estimate animal abundance from actual data set
#'
#'Code as of 2 August 2013 is incomplete and not in a functional state.
#'
#'This function estimates animal abundance within the study area (grid)
#'by calculating density \eqn{\pi (z(x,y))} as a function of covariate for each grid cell.
#'
#'Calls to appropriate dist... |
#' Return each team's worst losses
#'
#' @param df df
#' @param teamname teamname
#' @param type type
#' @param N N
#'
#' @examples
#' df <- engsoccerdata2
#' worstlosses(df,"Everton")
#' worstlosses(df,"Aston Villa", type="H")
#' worstlosses(df,"York City", type="A")
#' worstlosses(df,"Port Vale", N=20)
#' worstlosses... | /R/worstlosses.R | no_license | amunnelly/engsoccerdata | R | false | false | 1,141 | r | #' Return each team's worst losses
#'
#' @param df df
#' @param teamname teamname
#' @param type type
#' @param N N
#'
#' @examples
#' df <- engsoccerdata2
#' worstlosses(df,"Everton")
#' worstlosses(df,"Aston Villa", type="H")
#' worstlosses(df,"York City", type="A")
#' worstlosses(df,"Port Vale", N=20)
#' worstlosses... |
## load helpers ------------------
source("helpers.R")
## load packages -----------------
library(rvest)
library(tidyverse)
library(pdftools)
library(magrittr)
## parse HTML --------------------
iso_codes <- readxl::read_xlsx("../data/iso_codes.xlsx")
# parse with read_html
parsed_doc <- read_html("https://www.unglo... | /report2021/COP_CSR/code/01-table-extraction.R | no_license | sjankin/lancet | R | false | false | 3,717 | r | ## load helpers ------------------
source("helpers.R")
## load packages -----------------
library(rvest)
library(tidyverse)
library(pdftools)
library(magrittr)
## parse HTML --------------------
iso_codes <- readxl::read_xlsx("../data/iso_codes.xlsx")
# parse with read_html
parsed_doc <- read_html("https://www.unglo... |
#funções especiais
#unlist()
#Produz um vetor com os elementos da lista
?unlist
lst1 <-list(6, "b", 15)
lst1
class(lst1)
unlist(lst1)
vec1 <- unlist(lst1) # transforma uma lista em vetor
class(vec1)
lst2 <- list(v1 = 6, v2 = list(381, 2190), v3 = c(30, 217))
lst2
unlist(lst2)
mean(unlist(lst2))
round(mean(unlist(l... | /Parte2/06-Funcoes_Especiais.R | no_license | Kotayz/RFundamentos | R | false | false | 3,425 | r | #funções especiais
#unlist()
#Produz um vetor com os elementos da lista
?unlist
lst1 <-list(6, "b", 15)
lst1
class(lst1)
unlist(lst1)
vec1 <- unlist(lst1) # transforma uma lista em vetor
class(vec1)
lst2 <- list(v1 = 6, v2 = list(381, 2190), v3 = c(30, 217))
lst2
unlist(lst2)
mean(unlist(lst2))
round(mean(unlist(l... |
library(testthat)
library(dynutils)
library(dyntoy)
library(dplyr)
library(tibble)
Sys.setenv("R_TESTS" = "")
test_check("dyntoy")
| /tests/testthat.R | no_license | dynverse/dyntoy | R | false | false | 134 | r | library(testthat)
library(dynutils)
library(dyntoy)
library(dplyr)
library(tibble)
Sys.setenv("R_TESTS" = "")
test_check("dyntoy")
|
library(xtable)
xtable <- function(x, file = "", ..., rownames = FALSE){
table <- xtable::xtable(x, ...)
print(table, floating = F, hline.after = NULL,
add.to.row = list(pos = list(-1,0, nrow(x)),
command = c('\\toprule\n ','\\midrule\n ','\\bottomrule\n')),
include.row... | /xtable.R | no_license | tmh741/FieldCropTests | R | false | false | 427 | r | library(xtable)
xtable <- function(x, file = "", ..., rownames = FALSE){
table <- xtable::xtable(x, ...)
print(table, floating = F, hline.after = NULL,
add.to.row = list(pos = list(-1,0, nrow(x)),
command = c('\\toprule\n ','\\midrule\n ','\\bottomrule\n')),
include.row... |
#' Obtain hierarchical color palettes (Tree Colors)
#'
#' Obtain hierarchical color palettes, either the so-called Tree Colors from the HCL color space model, or by using an existing color palette. The former method, which is recommended, is used by default in \code{\link{treemap}} (type \code{"index"}) and \code{\li... | /treemap/R/treepalette.R | no_license | ingted/R-Examples | R | false | false | 6,241 | r | #' Obtain hierarchical color palettes (Tree Colors)
#'
#' Obtain hierarchical color palettes, either the so-called Tree Colors from the HCL color space model, or by using an existing color palette. The former method, which is recommended, is used by default in \code{\link{treemap}} (type \code{"index"}) and \code{\li... |
library(ape)
testtree <- read.tree("1577_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1577_0_unrooted.txt") | /codeml_files/newick_trees_processed/1577_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("1577_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1577_0_unrooted.txt") |
library(parallel)
StoC.Sample <- function(str, cluster, clusterHierarchy, clusterTaxonomy, distanceMatrix) {
cluster <- clusterTaxonomy[clusterTaxonomy$cluster == as.character(cluster), ]$string
clusterLength <- length(cluster)
if(clusterLength > 30) {
clusterLength = 30
}
cluster <- sample(cluster, c... | /source/distance/StringToCluster/Sample.R | no_license | DasenB/CluString | R | false | false | 827 | r | library(parallel)
StoC.Sample <- function(str, cluster, clusterHierarchy, clusterTaxonomy, distanceMatrix) {
cluster <- clusterTaxonomy[clusterTaxonomy$cluster == as.character(cluster), ]$string
clusterLength <- length(cluster)
if(clusterLength > 30) {
clusterLength = 30
}
cluster <- sample(cluster, c... |
#' A styling Function
#'
#' This function allows you to styling your html output.
#' @param
#' @keywords style html
#' @export
styling <- function(...
, full_width = FALSE
, bootstrap_options = c("striped", "hover", "condensed", "responsive")
, position = "left"
... | /R/styling.R | no_license | ghowoo/Wu | R | false | false | 605 | r | #' A styling Function
#'
#' This function allows you to styling your html output.
#' @param
#' @keywords style html
#' @export
styling <- function(...
, full_width = FALSE
, bootstrap_options = c("striped", "hover", "condensed", "responsive")
, position = "left"
... |
mvt = read.csv("mvt.csv", stringsAsFactors = FALSE)
str(mvt)
mvt$Date = strptime(mvt$Date, format = "%m/%d/%y %H:%M")
mvt$Weekday = weekdays(mvt$Date)
mvt$Hour = mvt$Date$hour
str(mvt)
WeekdayCounts = as.data.frame(table(mvt$Weekday))
str(WeekdayCounts)
library(ggplot2)
ggplot(WeekdayCounts, aes(x = Var1, y = Freq... | /Unit-7/mvt.R | no_license | praveenvvstgy/15.071x-The-Analytics-Edge | R | false | false | 2,132 | r | mvt = read.csv("mvt.csv", stringsAsFactors = FALSE)
str(mvt)
mvt$Date = strptime(mvt$Date, format = "%m/%d/%y %H:%M")
mvt$Weekday = weekdays(mvt$Date)
mvt$Hour = mvt$Date$hour
str(mvt)
WeekdayCounts = as.data.frame(table(mvt$Weekday))
str(WeekdayCounts)
library(ggplot2)
ggplot(WeekdayCounts, aes(x = Var1, y = Freq... |
#' Get all common neighbors between two or more nodes
#' @description With two or more nodes, get the set of
#' common neighboring nodes.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param nodes a vector of node ID values of length
#' at least 2.
#' @return a vector of node ID values.
#' @examples
#... | /R/get_common_nbrs.R | permissive | akkalbist55/DiagrammeR | R | false | false | 1,549 | r | #' Get all common neighbors between two or more nodes
#' @description With two or more nodes, get the set of
#' common neighboring nodes.
#' @param graph a graph object of class
#' \code{dgr_graph}.
#' @param nodes a vector of node ID values of length
#' at least 2.
#' @return a vector of node ID values.
#' @examples
#... |
plot4 <- function()
{
# Read in entire dataset, get rid of NAs
dataset <- read.csv("./household_power_consumption.txt", header=T, sep=';', na.strings="?")
dataset$Date <- as.Date(dataset$Date, format="%d/%m/%Y")
# Subset the data by date between 2007-02-01 and 2007-02-02
data <- subset(dataset, subset=(Date >= "2007-... | /plot4.R | no_license | diyaaang/ExData_Plotting1 | R | false | false | 1,444 | r | plot4 <- function()
{
# Read in entire dataset, get rid of NAs
dataset <- read.csv("./household_power_consumption.txt", header=T, sep=';', na.strings="?")
dataset$Date <- as.Date(dataset$Date, format="%d/%m/%Y")
# Subset the data by date between 2007-02-01 and 2007-02-02
data <- subset(dataset, subset=(Date >= "2007-... |
################################################################################
# Run Multivar decision tree model #
# OUTPUTS USED BY GAVI AND IN PAPER FOR BURDEN ESTIMATES #
# run ICER scenarios (no discount) i.e. improved PEP, RIG & dog vax
# save ou... | /ms7.1.1.multivar_countryLTs_nodiscount_RIG_ICER.R | no_license | katiehampson1978/rabies_PEP_access | R | false | false | 8,035 | r | ################################################################################
# Run Multivar decision tree model #
# OUTPUTS USED BY GAVI AND IN PAPER FOR BURDEN ESTIMATES #
# run ICER scenarios (no discount) i.e. improved PEP, RIG & dog vax
# save ou... |
### Concatenate all runs in a study
library(rtracklayer)
library(GenomicFeatures)
library(GenomicRanges)
library(S4Vectors)
options(echo=TRUE)
args <- commandArgs(TRUE)
studyIDs <- args[1]
positive_experiments <- read.delim("/SAN/Plasmo_compare/SRAdb/Input/positive_experiments.txt", sep = ",", header = F)
allHPexp <- ... | /malariaHPinteractions/R/post_process_countfiles.R | no_license | parnika91/malariaHPinteractions | R | false | false | 9,845 | r | ### Concatenate all runs in a study
library(rtracklayer)
library(GenomicFeatures)
library(GenomicRanges)
library(S4Vectors)
options(echo=TRUE)
args <- commandArgs(TRUE)
studyIDs <- args[1]
positive_experiments <- read.delim("/SAN/Plasmo_compare/SRAdb/Input/positive_experiments.txt", sep = ",", header = F)
allHPexp <- ... |
context("Test hash/hmac functions")
test_that("Hash functions match openssl command line tool", {
# COMPARE: echo -n "foo" | openssl dgst -md4
expect_that(unclass(md4("foo")), equals("0ac6700c491d70fb8650940b1ca1e4b2"))
expect_that(unclass(md5("foo")), equals("acbd18db4cc2f85cedef654fccc4a4d8"))
expect_that(u... | /packrat/lib/x86_64-apple-darwin15.6.0/3.4.2/openssl/tests/testthat/test_hash_output_value.R | permissive | danielg7/FireWeatherExplorer | R | false | false | 2,718 | r | context("Test hash/hmac functions")
test_that("Hash functions match openssl command line tool", {
# COMPARE: echo -n "foo" | openssl dgst -md4
expect_that(unclass(md4("foo")), equals("0ac6700c491d70fb8650940b1ca1e4b2"))
expect_that(unclass(md5("foo")), equals("acbd18db4cc2f85cedef654fccc4a4d8"))
expect_that(u... |
data_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data1 <- subset(data_full, Date %in% c("1/2/2007","2/2/2007"))
data1$Date <- as.Date(data1$Date, format="%d/%m/%Y")
datetime <... | /plot4.R | no_license | Abinav-M/Coursera-Exploratory | R | false | false | 1,167 | r | data_full <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data1 <- subset(data_full, Date %in% c("1/2/2007","2/2/2007"))
data1$Date <- as.Date(data1$Date, format="%d/%m/%Y")
datetime <... |
#' Throw a Condition
#'
#' Throws a condition of class c("error", "{{{ package }}}", "condition").
#'
#' We use this condition as an error dedicated to \pkg{ {{{ package}}}.}
#'
#' @param message_string The message to be thrown.
#' @param system_call The call to be thrown.
#' @param ... Arguments to be passed to
#' \co... | /inst/templates/throw.R | no_license | cran/packager | R | false | false | 801 | r | #' Throw a Condition
#'
#' Throws a condition of class c("error", "{{{ package }}}", "condition").
#'
#' We use this condition as an error dedicated to \pkg{ {{{ package}}}.}
#'
#' @param message_string The message to be thrown.
#' @param system_call The call to be thrown.
#' @param ... Arguments to be passed to
#' \co... |
#modifying System Locale to english
Sys.setlocale("LC_TIME", "English")
#setting up the download & reading the data
temp <- tempfile()
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl, destfile = temp)
data <- read.table(unz(temp, "household_power_... | /plot4.R | no_license | cbouthelier/ExData_Plotting1 | R | false | false | 1,674 | r | #modifying System Locale to english
Sys.setlocale("LC_TIME", "English")
#setting up the download & reading the data
temp <- tempfile()
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl, destfile = temp)
data <- read.table(unz(temp, "household_power_... |
# Speed comparisons and looping examples.
# === preliminaries === #
#clear workspace
rm(list = ls())
#set your working directory
setwd("~/Dropbox/RA_and_Consulting_Work/ICPSR_Summer_14/HPC_Workshop_Materials")
# sum over a vector of length 10,000,000 using a loop in R
system.time({
vect <- c(1:10000000)
tot... | /Scripts/HPC_Programming_Example.R | no_license | duthedd/ISSR_Data_Science_Summer_Summit_15 | R | false | false | 4,286 | r | # Speed comparisons and looping examples.
# === preliminaries === #
#clear workspace
rm(list = ls())
#set your working directory
setwd("~/Dropbox/RA_and_Consulting_Work/ICPSR_Summer_14/HPC_Workshop_Materials")
# sum over a vector of length 10,000,000 using a loop in R
system.time({
vect <- c(1:10000000)
tot... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.