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 |
|---|---|---|---|---|---|---|---|---|---|
#### kl divergence ####
## cov2 has to be invertible
klDivergence <- function(cov1, cov2){
## natural log
wantT <- solve(cov2) %*% cov1
log(det(cov2)/det(cov1))/2 - nrow(cov1)/2 + sum(diag(wantT))/2
}
## this isn't going to work for low rank matrices, not invertible
helperCreateMatrixNice <- function(spars... | /R/simulation_setup/metrics.R | no_license | karinorman/communityDimensions | R | false | false | 2,444 | r |
#### kl divergence ####
## cov2 has to be invertible
klDivergence <- function(cov1, cov2){
## natural log
wantT <- solve(cov2) %*% cov1
log(det(cov2)/det(cov1))/2 - nrow(cov1)/2 + sum(diag(wantT))/2
}
## this isn't going to work for low rank matrices, not invertible
helperCreateMatrixNice <- function(spars... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modify_columns.R
\name{cols_hide}
\alias{cols_hide}
\title{Hide one or more columns}
\usage{
cols_hide(data, columns)
}
\arguments{
\item{data}{\emph{The gt table data object}
\verb{obj:<gt_tbl>} // \strong{required}
This is the \strong{gt}... | /man/cols_hide.Rd | permissive | rstudio/gt | R | false | true | 4,724 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modify_columns.R
\name{cols_hide}
\alias{cols_hide}
\title{Hide one or more columns}
\usage{
cols_hide(data, columns)
}
\arguments{
\item{data}{\emph{The gt table data object}
\verb{obj:<gt_tbl>} // \strong{required}
This is the \strong{gt}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/icendata.R
\name{icendata}
\alias{icendata}
\alias{is.icendata}
\alias{icendata.object}
\title{Class of Interval-censored Data}
\usage{
icendata(x, w=1)
is.icendata(x)
}
\arguments{
\item{x}{vector or matrix.}
\item{w}{weights or multiplicit... | /man/icendata.Rd | no_license | cran/npsurv | R | false | true | 3,264 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/icendata.R
\name{icendata}
\alias{icendata}
\alias{is.icendata}
\alias{icendata.object}
\title{Class of Interval-censored Data}
\usage{
icendata(x, w=1)
is.icendata(x)
}
\arguments{
\item{x}{vector or matrix.}
\item{w}{weights or multiplicit... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/mcmcIterator.R
\name{mcmcLoop}
\alias{mcmcLoop}
\title{iterator for MCMC loops}
\usage{
mcmcLoop(N, burnin, thin, trim = TRUE, progressor = mcmcProgressPrint)
}
\arguments{
\item{N}{number of iterations}
\item{burnin}{length of burn-... | /man/mcmcLoop.Rd | no_license | bentaylor1/lgcp | R | false | false | 559 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/mcmcIterator.R
\name{mcmcLoop}
\alias{mcmcLoop}
\title{iterator for MCMC loops}
\usage{
mcmcLoop(N, burnin, thin, trim = TRUE, progressor = mcmcProgressPrint)
}
\arguments{
\item{N}{number of iterations}
\item{burnin}{length of burn-... |
\name{getTestEntry.asrtests}
\alias{getTestEntry.asrtests}
\alias{getTestEntry}
\title{Gets the entry for a test recorded in the test.summary data.frame of an \code{\link{asrtests.object}}}
\description{Matches the \code{label} in the \code{term} column of the \code{test.summary} \code{data.frame}
in the suppli... | /man/getTestEntry.asrtests.Rd | no_license | cran/asremlPlus | R | false | false | 2,335 | rd | \name{getTestEntry.asrtests}
\alias{getTestEntry.asrtests}
\alias{getTestEntry}
\title{Gets the entry for a test recorded in the test.summary data.frame of an \code{\link{asrtests.object}}}
\description{Matches the \code{label} in the \code{term} column of the \code{test.summary} \code{data.frame}
in the suppli... |
#' @title Select/rename variables by name
#' @description Mimics dplyr::select using base R and rlang
#' @param .data data.frame
#' @param ... unquoted variable names or character names
#' @return data.frame
#' @examples
#'
#' airquality%>%
#' b_select(c(Day,Temp))%>%
#' head()
#'
#' airquality%>%
#' b_select(c('Day','... | /R/select.R | no_license | Akayeshmantha/bplyr | R | false | false | 968 | r | #' @title Select/rename variables by name
#' @description Mimics dplyr::select using base R and rlang
#' @param .data data.frame
#' @param ... unquoted variable names or character names
#' @return data.frame
#' @examples
#'
#' airquality%>%
#' b_select(c(Day,Temp))%>%
#' head()
#'
#' airquality%>%
#' b_select(c('Day','... |
## -----------------------------------------------------------------------------
library(BeviMed)
source(paste0(system.file(package="BeviMed", "/scripts/vcf.R")))
## ----eval=FALSE---------------------------------------------------------------
# ac_matrix <- vcf2matrix("my-vcf.vcf.gz", chr="2", from=1, to=1e4)
... | /inst/doc/vcf.R | no_license | cran/BeviMed | R | false | false | 443 | r | ## -----------------------------------------------------------------------------
library(BeviMed)
source(paste0(system.file(package="BeviMed", "/scripts/vcf.R")))
## ----eval=FALSE---------------------------------------------------------------
# ac_matrix <- vcf2matrix("my-vcf.vcf.gz", chr="2", from=1, to=1e4)
... |
## Cache inverse matrix assignment
## The makeCacheMatrix function creates a matrix object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setInv <- fu... | /cachematrix.R | no_license | shalinikrpt/ProgrammingAssignment2 | R | false | false | 1,035 | r | ## Cache inverse matrix assignment
## The makeCacheMatrix function creates a matrix object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setInv <- fu... |
#importing the dataset
dataset_structure = read.delim('essays-structure.tsv', quote = '', stringsAsFactors = FALSE)
#importing processed dataset
dataset_structure_processed = read.csv(file = 'essays-structure-processed.csv')
#cleaning the texts
library(tm)
library(SnowballC)
corpus_structure = VCorpus(VectorSource(d... | /structure_predictions.R | no_license | blaz-rupnik/natural-language-processing | R | false | false | 3,536 | r | #importing the dataset
dataset_structure = read.delim('essays-structure.tsv', quote = '', stringsAsFactors = FALSE)
#importing processed dataset
dataset_structure_processed = read.csv(file = 'essays-structure-processed.csv')
#cleaning the texts
library(tm)
library(SnowballC)
corpus_structure = VCorpus(VectorSource(d... |
/MacOSX10.2.8.sdk/System/Library/Frameworks/JavaEmbedding.framework/Versions/A/Headers/JavaEmbedding.r | no_license | alexey-lysiuk/macos-sdk | R | false | false | 526 | r | ||
defaults.freplace_na <- list(
numeric = "error",
categorical = "NA.")
#' Replaces NA's with specified values.
#'
#' Some the downstream uses of a FacileDataStore can throw problems when NA's
#' are found in data or covariates, so we often want to fill in NA's with
#' non-NA markers of missing values. Note that unl... | /R/replace_na.R | permissive | jonocarroll/FacileData | R | false | false | 3,253 | r | defaults.freplace_na <- list(
numeric = "error",
categorical = "NA.")
#' Replaces NA's with specified values.
#'
#' Some the downstream uses of a FacileDataStore can throw problems when NA's
#' are found in data or covariates, so we often want to fill in NA's with
#' non-NA markers of missing values. Note that unl... |
#' Sun's annotation measure of disease similarity calculating
#'
#' given two vectors of diseases and a list of disease-gene associations,
#' this function will calculate disease similarity by method Sun_annotation
#' @param D1 a vector consists disease ids
#' @param D2 another vector consists disease ids
#' @param d2... | /R/Sun.R | no_license | PengNi/dSimer | R | false | false | 6,107 | r | #' Sun's annotation measure of disease similarity calculating
#'
#' given two vectors of diseases and a list of disease-gene associations,
#' this function will calculate disease similarity by method Sun_annotation
#' @param D1 a vector consists disease ids
#' @param D2 another vector consists disease ids
#' @param d2... |
#----------#----------#----------#----------#----------#----------#----------#
#----------#----------#----------#----------#----------#----------#----------#
#Plots
#----------#----------#----------#----------#----------#----------#----------#
#----------#----------#----------#----------#----------#----------#---------... | /src/eval.R | no_license | raquelaoki/ParKCa | R | false | false | 24,619 | r | #----------#----------#----------#----------#----------#----------#----------#
#----------#----------#----------#----------#----------#----------#----------#
#Plots
#----------#----------#----------#----------#----------#----------#----------#
#----------#----------#----------#----------#----------#----------#---------... |
% Check from R:
% news(db = tools:::.build_news_db_from_package_NEWS_Rd("~/R/Pkgs/cluster/inst/NEWS.Rd"))!
\name{NEWS}
\title{News for \R Package \pkg{cluster}}% MM: look into ../svn-log-from.all
\encoding{UTF-8}
\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
%% NB: The date (yyyy-mm-dd) ... | /cluster/NEWS.Rd | permissive | solgenomics/R_libs | R | false | false | 15,393 | rd | % Check from R:
% news(db = tools:::.build_news_db_from_package_NEWS_Rd("~/R/Pkgs/cluster/inst/NEWS.Rd"))!
\name{NEWS}
\title{News for \R Package \pkg{cluster}}% MM: look into ../svn-log-from.all
\encoding{UTF-8}
\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
%% NB: The date (yyyy-mm-dd) ... |
#Andrew Roup
#4/12/2019
#EBIO 4420
#Lab 12
#Before starting
setwd("~/EBIO_4420/CompBioLabsAndHomework/Labs/Lab12")
#Then read in the data we will be using
cusack_data <- read.csv("Cusack.csv")
#Call in ggplot and plyr
library(ggplot2)
library(plyr)
#PROBLEM ONE & TWO
#----------------------------------------------... | /Labs/Lab12/ROUP_Lab12.R | no_license | anro7653/CompBioLabsAndHomework | R | false | false | 1,251 | r | #Andrew Roup
#4/12/2019
#EBIO 4420
#Lab 12
#Before starting
setwd("~/EBIO_4420/CompBioLabsAndHomework/Labs/Lab12")
#Then read in the data we will be using
cusack_data <- read.csv("Cusack.csv")
#Call in ggplot and plyr
library(ggplot2)
library(plyr)
#PROBLEM ONE & TWO
#----------------------------------------------... |
#' Generate a sparse vector whose non-zero elements following
#' U(0,1) distribution.
#'
#'
#' @param K number of non-zero elements
#' @param P length of the vector
#'
#' @return A sparse vector
#'
#' @examples
#' beta.coef(K = 1, P = 10)
#'
#' @export
#'
beta.coef = function(K, P){
coef = rep(0,P)
coef[sampl... | /R/Betacoef.R | no_license | JianqiaoWang/pslassoR | R | false | false | 361 | r | #' Generate a sparse vector whose non-zero elements following
#' U(0,1) distribution.
#'
#'
#' @param K number of non-zero elements
#' @param P length of the vector
#'
#' @return A sparse vector
#'
#' @examples
#' beta.coef(K = 1, P = 10)
#'
#' @export
#'
beta.coef = function(K, P){
coef = rep(0,P)
coef[sampl... |
\name{getformula}
\docType{methods}
\alias{getformula}
\alias{getformula-methods}
\alias{getformula,ergm-method}
\alias{getformula,btergm-method}
\alias{getformula,mtergm-method}
\title{Extract the formula from a model.}
\description{Extract the model formula from ergm or btergm objects.}
\usage{
\S4method{getformula}{... | /man/getformula.Rd | no_license | sduxbury/btergm | R | false | false | 593 | rd | \name{getformula}
\docType{methods}
\alias{getformula}
\alias{getformula-methods}
\alias{getformula,ergm-method}
\alias{getformula,btergm-method}
\alias{getformula,mtergm-method}
\title{Extract the formula from a model.}
\description{Extract the model formula from ergm or btergm objects.}
\usage{
\S4method{getformula}{... |
library(readr)
library("magrittr", lib.loc="/usr/local/lib/R/3.3/site-library") # To pipe with %>%
library(ggplot2)
library(dplyr)
library(reshape2)
rq2_counts_per_type_history <- read_csv("counts-per-type-history.csv")
data <- melt(rq2_counts_per_type_history, id.vars = "row")
totals <- data %>%
group_by(variable... | /extraction/R/counts-per-type-history.R | no_license | elhoyos/toggles_package | R | false | false | 1,306 | r | library(readr)
library("magrittr", lib.loc="/usr/local/lib/R/3.3/site-library") # To pipe with %>%
library(ggplot2)
library(dplyr)
library(reshape2)
rq2_counts_per_type_history <- read_csv("counts-per-type-history.csv")
data <- melt(rq2_counts_per_type_history, id.vars = "row")
totals <- data %>%
group_by(variable... |
#!/usr/bin/env Rscript
# logging
log = file(snakemake@log[[1]], open="wt")
sink(log)
sink(log, type = "message")
# Imports
library(ggplot2, quiet=T)
library(dada2, quiet=T)
# Get parameters from snakemake
# Inputs
fnFs <- snakemake@input[["r1"]]
fnRs <- snakemake@input[["r2"]]
# Outputs
filtFs <- snakemake@outp... | /workflow/scripts/dada.R | permissive | CVUA-RRW/FooDMe | R | false | false | 8,425 | r | #!/usr/bin/env Rscript
# logging
log = file(snakemake@log[[1]], open="wt")
sink(log)
sink(log, type = "message")
# Imports
library(ggplot2, quiet=T)
library(dada2, quiet=T)
# Get parameters from snakemake
# Inputs
fnFs <- snakemake@input[["r1"]]
fnRs <- snakemake@input[["r2"]]
# Outputs
filtFs <- snakemake@outp... |
## Simulating multivariate Gaussian with blockwise correlation
## and piecewise constant vector of parameters
beta <- rep(c(0,1,0,-1,0), c(25,10,25,10,25))
Soo <- matrix(0.75,25,25) ## bloc correlation between zero variables
Sww <- matrix(0.75,10,10) ## bloc correlation between active variables
Sigma <- bdiag(Soo,Sww... | /inst/examples/plot.stability.R | no_license | cran/quadrupen | R | false | false | 1,054 | r | ## Simulating multivariate Gaussian with blockwise correlation
## and piecewise constant vector of parameters
beta <- rep(c(0,1,0,-1,0), c(25,10,25,10,25))
Soo <- matrix(0.75,25,25) ## bloc correlation between zero variables
Sww <- matrix(0.75,10,10) ## bloc correlation between active variables
Sigma <- bdiag(Soo,Sww... |
#' Spring barley aphid biocontrol model parameter values
#'
#' Parameter values as used in the model. There are three stages: colonizing, growing ground-living and growing flying.
#' PRED_PAR contains the predation rate during aphid colonization (1st column),
#' predator units (columns 2-4), predator initial population... | /R/parameters.bcsb.R | no_license | l5d1l5/ecodeal | R | false | false | 3,647 | r | #' Spring barley aphid biocontrol model parameter values
#'
#' Parameter values as used in the model. There are three stages: colonizing, growing ground-living and growing flying.
#' PRED_PAR contains the predation rate during aphid colonization (1st column),
#' predator units (columns 2-4), predator initial population... |
########
rm(list=ls())
library(openxlsx)
library(data.table)
library(msm)
source("FILEPATH.R")
rlogit <- function(x){exp(x)/(1+exp(x))}
locations <- get_location_metadata(location_set_id=35)
## Load dataset
dataset_filepath <- "FILEPATH.xlsm"
data <- data.table(read.xlsx(dataset_filepath))
#cv_ population type
d... | /gbd_2019/nonfatal_code/mental_bipolar/severity_splits/decomp3_bipolar_healthstates_cleaned.R | no_license | Nermin-Ghith/ihme-modeling | R | false | false | 6,592 | r | ########
rm(list=ls())
library(openxlsx)
library(data.table)
library(msm)
source("FILEPATH.R")
rlogit <- function(x){exp(x)/(1+exp(x))}
locations <- get_location_metadata(location_set_id=35)
## Load dataset
dataset_filepath <- "FILEPATH.xlsm"
data <- data.table(read.xlsx(dataset_filepath))
#cv_ population type
d... |
#!/usr/bin/R
library(rvest)
library(polite)
library(dplyr)
library(magrittr)
library(purrr)
library(kableExtra)
library(hrbrthemes)
url <- "https://en.wikipedia.org/wiki/Manchester_United_F.C."
session = bow(user_agent = "Manchester United Squad list | 2021/2022 Season", url)
ManchesterSquadlist <- scrape(session) ... | /manusquadlist2021.R | no_license | nugowe/ManchesterUnitedSquadlist2020-2021 | R | false | false | 3,705 | r | #!/usr/bin/R
library(rvest)
library(polite)
library(dplyr)
library(magrittr)
library(purrr)
library(kableExtra)
library(hrbrthemes)
url <- "https://en.wikipedia.org/wiki/Manchester_United_F.C."
session = bow(user_agent = "Manchester United Squad list | 2021/2022 Season", url)
ManchesterSquadlist <- scrape(session) ... |
library(Matrix)
### Name: CHMfactor-class
### Title: CHOLMOD-based Cholesky Factorizations
### Aliases: CHMfactor-class CHMsimpl-class CHMsuper-class dCHMsimpl-class
### nCHMsimpl-class dCHMsuper-class nCHMsuper-class isLDL
### coerce,CHMfactor,Matrix-method coerce,CHMfactor,sparseMatrix-method
### coerce,CHMfa... | /data/genthat_extracted_code/Matrix/examples/CHMfactor-class.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,494 | r | library(Matrix)
### Name: CHMfactor-class
### Title: CHOLMOD-based Cholesky Factorizations
### Aliases: CHMfactor-class CHMsimpl-class CHMsuper-class dCHMsimpl-class
### nCHMsimpl-class dCHMsuper-class nCHMsuper-class isLDL
### coerce,CHMfactor,Matrix-method coerce,CHMfactor,sparseMatrix-method
### coerce,CHMfa... |
#' @title Create a template yaml file for supplying attribute metadata for a
#' tabular data object
#'
#' @description write_attributes creates a template as a yaml file for
#' supplying attribute metadata for a tabular data object that resides in the R
#' environment.
#'
#' @details The yaml template generated by writ... | /R/write_attributes.R | no_license | CAPLTER/capeml | R | false | false | 6,312 | r | #' @title Create a template yaml file for supplying attribute metadata for a
#' tabular data object
#'
#' @description write_attributes creates a template as a yaml file for
#' supplying attribute metadata for a tabular data object that resides in the R
#' environment.
#'
#' @details The yaml template generated by writ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/omu_anova.R
\name{omu_anova}
\alias{omu_anova}
\title{Perform anova
Performs an anova across all response variables. The function can take a maximum of 2
independent variables and perform an interaction term between them.}
\usage{
omu_anova(c... | /omu/man/omu_anova.Rd | no_license | ramayurnish/Omu | R | false | true | 1,646 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/omu_anova.R
\name{omu_anova}
\alias{omu_anova}
\title{Perform anova
Performs an anova across all response variables. The function can take a maximum of 2
independent variables and perform an interaction term between them.}
\usage{
omu_anova(c... |
#' HGZIPS - HZINB with two gamma components (assuming independence)
#'
#' This \code{HZINB_ind_two_gamma} function finds hyperparameter estimates by implementing the Expectation-Maximization (EM) algorithm and hierarchical zero-inflated negative binomial model with two gamma components.
#'
#' @name HZINB_ind_two_gamma
... | /R/HZINB_ind_two_gamma.R | no_license | sidiwang/hgzips | R | false | false | 18,178 | r | #' HGZIPS - HZINB with two gamma components (assuming independence)
#'
#' This \code{HZINB_ind_two_gamma} function finds hyperparameter estimates by implementing the Expectation-Maximization (EM) algorithm and hierarchical zero-inflated negative binomial model with two gamma components.
#'
#' @name HZINB_ind_two_gamma
... |
\name{residuals.regimix}
\alias{residuals.regimix}
\title{Residuals for a regimix object.}
\description{ Returns the (absolute) deviance residuals or the randomised quantile residuals from a regimix object.
}
\section{Method}{ residuals( object, ..., type="RQR", quiet=FALSE)
}
\arguments{
\item{ object}{an object obtai... | /man/residuals.regimix.Rd | no_license | cran/RCPmod | R | false | false | 2,625 | rd | \name{residuals.regimix}
\alias{residuals.regimix}
\title{Residuals for a regimix object.}
\description{ Returns the (absolute) deviance residuals or the randomised quantile residuals from a regimix object.
}
\section{Method}{ residuals( object, ..., type="RQR", quiet=FALSE)
}
\arguments{
\item{ object}{an object obtai... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_objects.R
\name{InstanceGroupManagersDeleteInstancesRequest}
\alias{InstanceGroupManagersDeleteInstancesRequest}
\title{InstanceGroupManagersDeleteInstancesRequest Object}
\usage{
InstanceGroupManagersDeleteInstancesRequest(instances ... | /googlecomputev1.auto/man/InstanceGroupManagersDeleteInstancesRequest.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 776 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_objects.R
\name{InstanceGroupManagersDeleteInstancesRequest}
\alias{InstanceGroupManagersDeleteInstancesRequest}
\title{InstanceGroupManagersDeleteInstancesRequest Object}
\usage{
InstanceGroupManagersDeleteInstancesRequest(instances ... |
#--------------------------------------------------------------#
# Daryl Albano
# NEX - NASA Ames
# Summer 2018
# Atmospheric Aerosol Dynamics
# EPA-pm2.5-plot_functions.R
# Desc -
#--------------------------------------------------------------#
#--------------------------------------------------------------#
# @desc... | /code/EPA-pm2.5-plot_functions.R | no_license | dalbano96/NEX-AtmosphericAerosolDynamics | R | false | false | 13,553 | r | #--------------------------------------------------------------#
# Daryl Albano
# NEX - NASA Ames
# Summer 2018
# Atmospheric Aerosol Dynamics
# EPA-pm2.5-plot_functions.R
# Desc -
#--------------------------------------------------------------#
#--------------------------------------------------------------#
# @desc... |
library(leaflet); library(htmlwidgets); library(sf)
library(tidyverse)
setwd("~/gens/Lucie/ping")
table_tennis_pts <- st_read("data/in/table_paris.gpkg")
vert <- st_read("data/in/espaces_verts/espaces_verts.shp") %>%
filter(!(type_ev %in% c('Décorations sur la voie publique')))
#https://icon-icons.com/fr/icone/T... | /1_map.R | no_license | edarin/ping | R | false | false | 677 | r | library(leaflet); library(htmlwidgets); library(sf)
library(tidyverse)
setwd("~/gens/Lucie/ping")
table_tennis_pts <- st_read("data/in/table_paris.gpkg")
vert <- st_read("data/in/espaces_verts/espaces_verts.shp") %>%
filter(!(type_ev %in% c('Décorations sur la voie publique')))
#https://icon-icons.com/fr/icone/T... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_entropy.R
\name{get_entropy}
\alias{get_entropy}
\title{Calculate the single entropy}
\usage{
get_entropy(features, class)
}
\arguments{
\item{features}{Attribute data}
\item{class}{class data}
}
\value{
A numeric entropy value
}
\descri... | /SoySauce/man/get_entropy.Rd | no_license | cherishwsx/SoySaucePackage | R | false | true | 800 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_entropy.R
\name{get_entropy}
\alias{get_entropy}
\title{Calculate the single entropy}
\usage{
get_entropy(features, class)
}
\arguments{
\item{features}{Attribute data}
\item{class}{class data}
}
\value{
A numeric entropy value
}
\descri... |
# Subset coal combustion related NEI data
combustionRelated <- grepl("comb", SCC$SCC.Level.One, ignore.case=TRUE)
coalRelated <- grepl("coal", SCC$SCC.Level.Four, ignore.case=TRUE)
coalCombustion <- (combustionRelated & coalRelated)
combustionSCC <- SCC[coalCombustion,]$SCC
combustionNEI <- NEI[NEI$SCC %in% combu... | /Plot4.R | no_license | shiulee/Exploratory-Data-Analysis | R | false | false | 695 | r | # Subset coal combustion related NEI data
combustionRelated <- grepl("comb", SCC$SCC.Level.One, ignore.case=TRUE)
coalRelated <- grepl("coal", SCC$SCC.Level.Four, ignore.case=TRUE)
coalCombustion <- (combustionRelated & coalRelated)
combustionSCC <- SCC[coalCombustion,]$SCC
combustionNEI <- NEI[NEI$SCC %in% combu... |
parallel_make_TREE <- function(Individual_Data){
set.seed(Individual_Data[["Seed"]])
Params <- Individual_Data[["Params"]]
TREE <- make_TREE(Params)
TREE <- lapply(TREE,set_coordinate)
TREE <- lapply(TREE,set_synapse)
lapply(TREE,data_check)
if(canSimulation(TREE)){
Can_Sim <... | /parallel_make_TREE.R | no_license | M-Atsuhiko/Gausian | R | false | false | 478 | r | parallel_make_TREE <- function(Individual_Data){
set.seed(Individual_Data[["Seed"]])
Params <- Individual_Data[["Params"]]
TREE <- make_TREE(Params)
TREE <- lapply(TREE,set_coordinate)
TREE <- lapply(TREE,set_synapse)
lapply(TREE,data_check)
if(canSimulation(TREE)){
Can_Sim <... |
library(pscl)
### Name: constrain.legis
### Title: constrain legislators' ideal points in analysis of roll call
### data
### Aliases: constrain.legis
### Keywords: datagen
### ** Examples
data(s109)
cl <- constrain.legis(s109,
x=list("KENNEDY"=-1,
"ENZI"=1),
... | /data/genthat_extracted_code/pscl/examples/constrain.legis.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,367 | r | library(pscl)
### Name: constrain.legis
### Title: constrain legislators' ideal points in analysis of roll call
### data
### Aliases: constrain.legis
### Keywords: datagen
### ** Examples
data(s109)
cl <- constrain.legis(s109,
x=list("KENNEDY"=-1,
"ENZI"=1),
... |
# load packages
library(dplyr)
# assign .zip file to variable 'filename'
filename <- "getdata_projectfiles_UCI HAR Dataset.zip"
# download file if file is not found
if (!file.exists(filename)){
fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.fi... | /run_analysis.R | no_license | hurryupharibo/getting-cleaningdata | R | false | false | 2,789 | r | # load packages
library(dplyr)
# assign .zip file to variable 'filename'
filename <- "getdata_projectfiles_UCI HAR Dataset.zip"
# download file if file is not found
if (!file.exists(filename)){
fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.fi... |
weight_mutation <- function(nn, scale = 0.1, p = 0.8){
connect_df <- nn$connect_df
n <- nrow(connect_df)
connect_df$perturb_flag <- runif(n) <= p
connect_df$perturb_value <- runif(n, min= -scale, max=scale)
connect_df$Weight[connect_df$perturb_flag] <- connect_df$Weight[connect_df$perturb_flag] + connect_df... | /weight_mutation.R | no_license | seuxiaop/my_NEAT | R | false | false | 626 | r | weight_mutation <- function(nn, scale = 0.1, p = 0.8){
connect_df <- nn$connect_df
n <- nrow(connect_df)
connect_df$perturb_flag <- runif(n) <= p
connect_df$perturb_value <- runif(n, min= -scale, max=scale)
connect_df$Weight[connect_df$perturb_flag] <- connect_df$Weight[connect_df$perturb_flag] + connect_df... |
# generate alpha data
n0.alpha <- c(1, 1)
n1.alpha <- c(1, 1)
n2.alpha <- structure(c(1, 1, 1, 1, 1, 1, 1, 1), .Dim = as.integer(c(2,2,2)))
n3.alpha <- structure(c(1, 1, 1, 1, 1, 1, 1, 1), .Dim = as.integer(c(2,2,2)))
n4.alpha <- c(1, 1)
n5.alpha <- structure(c(1, 1, 1, 1), .Dim = as.integer(c(2,2)))
n6.alpha <- struct... | /data_and_scripts/MoocSparsity/m1_5/data.r | no_license | DanielTakeshi/iclr2016_gibbs | R | false | false | 4,328,192 | r | # generate alpha data
n0.alpha <- c(1, 1)
n1.alpha <- c(1, 1)
n2.alpha <- structure(c(1, 1, 1, 1, 1, 1, 1, 1), .Dim = as.integer(c(2,2,2)))
n3.alpha <- structure(c(1, 1, 1, 1, 1, 1, 1, 1), .Dim = as.integer(c(2,2,2)))
n4.alpha <- c(1, 1)
n5.alpha <- structure(c(1, 1, 1, 1), .Dim = as.integer(c(2,2)))
n6.alpha <- struct... |
#-----------------------------
#
# Weather Scraper Function
#
# Purpose: Get and store data from wunderground
#
# Created by: Nikola Tesla (ntesla@uw.edu)
#
# Created on: 2015-05-07
#
#-----------------------------
options(run.main=FALSE)
##----Import Libraries-----
require(RSQLite)
require(logging)
##----Define... | /Week2/weather_retrieval.R | no_license | alfords/UW_Data_Science_350 | R | false | false | 3,310 | r | #-----------------------------
#
# Weather Scraper Function
#
# Purpose: Get and store data from wunderground
#
# Created by: Nikola Tesla (ntesla@uw.edu)
#
# Created on: 2015-05-07
#
#-----------------------------
options(run.main=FALSE)
##----Import Libraries-----
require(RSQLite)
require(logging)
##----Define... |
library(shiny)
library(shiny.semantic)
ui <- semanticPage(
segment(
class = "basic",
progress("value_ex", value = 20, total = 100, label = "Label showing {value} of {total}"),
tags$br(),
button("button", "Change value to 40"),
button("button4", "Change text to 'Updated Label'"),
textOutput("v... | /examples/progress/app.R | permissive | Appsilon/shiny.semantic | R | false | false | 1,211 | r | library(shiny)
library(shiny.semantic)
ui <- semanticPage(
segment(
class = "basic",
progress("value_ex", value = 20, total = 100, label = "Label showing {value} of {total}"),
tags$br(),
button("button", "Change value to 40"),
button("button4", "Change text to 'Updated Label'"),
textOutput("v... |
chao_bunge <- function(data, cutoff=10, print=TRUE, answers=FALSE) {
if( !(is.matrix(data) || is.data.frame(data))) {
filename <- data
ext <- substr(filename, nchar(filename)-2, nchar(filename))
if (ext == "csv") {
data <- read.table(file=filename, header=0,sep=",")
if( data[1,1] !=1) data <-... | /breakaway/R/chao_bunge.R | no_license | ingted/R-Examples | R | false | false | 1,722 | r | chao_bunge <- function(data, cutoff=10, print=TRUE, answers=FALSE) {
if( !(is.matrix(data) || is.data.frame(data))) {
filename <- data
ext <- substr(filename, nchar(filename)-2, nchar(filename))
if (ext == "csv") {
data <- read.table(file=filename, header=0,sep=",")
if( data[1,1] !=1) data <-... |
#' Compute bootstrap distributions for scaling functions
#'
#' Bootstrapping of distributions of scaling functions as described by
#' Benoit, Mikhaylov, and Laver (2009). Given a dataset with percentages of CMP
#' categories, for each case the distribution of categories is resampled from
#' a multinomial distribution ... | /R/scaling_bootstrap.R | no_license | mohamednasr1/manifestoR | R | false | false | 3,185 | r | #' Compute bootstrap distributions for scaling functions
#'
#' Bootstrapping of distributions of scaling functions as described by
#' Benoit, Mikhaylov, and Laver (2009). Given a dataset with percentages of CMP
#' categories, for each case the distribution of categories is resampled from
#' a multinomial distribution ... |
library(syt)
### Name: syt2matrix
### Title: Standard Young tableau as sparse matrix
### Aliases: syt2matrix
### ** Examples
syt <- list(c(1,2,6), c(3,5), 4)
syt2matrix(syt)
| /data/genthat_extracted_code/syt/examples/syt2matrix.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 181 | r | library(syt)
### Name: syt2matrix
### Title: Standard Young tableau as sparse matrix
### Aliases: syt2matrix
### ** Examples
syt <- list(c(1,2,6), c(3,5), 4)
syt2matrix(syt)
|
args <- commandArgs(TRUE)
parseArgs <- function(x) {
res = strsplit(sub("^--", "", x), "=")
if(length(unlist(res))==1) res[[1]][2]=""
return(res)
}
argsL <- as.list(do.call("cbind", parseArgs(args))[c(F,T)])
names(argsL) <- as.list(do.call("cbind", parseArgs(args))[c(T,F)])
args <- argsL;rm(argsL)
if(! is.null(... | /code/extract_snps.R | no_license | tdelhomme/VCF-tips-tricks | R | false | false | 2,131 | r | args <- commandArgs(TRUE)
parseArgs <- function(x) {
res = strsplit(sub("^--", "", x), "=")
if(length(unlist(res))==1) res[[1]][2]=""
return(res)
}
argsL <- as.list(do.call("cbind", parseArgs(args))[c(F,T)])
names(argsL) <- as.list(do.call("cbind", parseArgs(args))[c(T,F)])
args <- argsL;rm(argsL)
if(! is.null(... |
fileUrl<-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(url=fileUrl,destfile = "exdata-data-household_power_consumption.zip")
unzip("exdata-data-household_power_consumption.zip")
df<-read.table("household_power_consumption.txt", sep=";", header=TRUE,stringsAsFact... | /R code and plots/plot3.r | no_license | roybeagle/Getting-Cleaning-Project-1 | R | false | false | 1,447 | r | fileUrl<-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(url=fileUrl,destfile = "exdata-data-household_power_consumption.zip")
unzip("exdata-data-household_power_consumption.zip")
df<-read.table("household_power_consumption.txt", sep=";", header=TRUE,stringsAsFact... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{checkClass}
\alias{checkClass}
\title{Check an objects class}
\usage{
checkClass(x, type)
}
\arguments{
\item{x}{an object}
\item{type}{a \code{character} class to check against}
}
\value{
logical
}
\description{
A function... | /man/checkClass.Rd | permissive | mikejohnson51/nwmRetro | R | false | true | 503 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{checkClass}
\alias{checkClass}
\title{Check an objects class}
\usage{
checkClass(x, type)
}
\arguments{
\item{x}{an object}
\item{type}{a \code{character} class to check against}
}
\value{
logical
}
\description{
A function... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function( m = matrix() ) {
## Initialize the inverse property
i <- NULL
## Method to set the matrix
set <- function( matrix ) {
m <<- matri... | /cachematrix.R | no_license | TulasiPrasad-Sariki/ProgrammingAssignment2 | R | false | false | 1,380 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function( m = matrix() ) {
## Initialize the inverse property
i <- NULL
## Method to set the matrix
set <- function( matrix ) {
m <<- matri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ColorPalettes.R
\name{pal}
\alias{pal}
\title{Plotting palettes}
\usage{
pal(palette, name = "")
}
\arguments{
\item{palette}{a palette}
\item{name}{x axis label}
}
\description{
List of palettes
}
\examples{
pal(DMPalette("greenmono"))
Pale... | /man/pal.Rd | no_license | katenambiar/dmisc2 | R | false | true | 469 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ColorPalettes.R
\name{pal}
\alias{pal}
\title{Plotting palettes}
\usage{
pal(palette, name = "")
}
\arguments{
\item{palette}{a palette}
\item{name}{x axis label}
}
\description{
List of palettes
}
\examples{
pal(DMPalette("greenmono"))
Pale... |
# x: attribute values (data matrix)
# y: class labels (vector)
# nmin: number of observations that a node must contain at least, for it to be allowed to be split (integer)
# minleaf: minimum number of observations required for a leaf node (integer)
# nfeat: features from which the bestsplit is to be selected (integer)
... | /code/decision_tree.R | no_license | asunalsina/data-mining | R | false | false | 10,593 | r | # x: attribute values (data matrix)
# y: class labels (vector)
# nmin: number of observations that a node must contain at least, for it to be allowed to be split (integer)
# minleaf: minimum number of observations required for a leaf node (integer)
# nfeat: features from which the bestsplit is to be selected (integer)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PipeOpCrankCompositor.R
\name{mlr_pipeops_compose_crank}
\alias{mlr_pipeops_compose_crank}
\alias{PipeOpCrankCompositor}
\title{PipeOpCrankCompositor}
\description{
Uses a predicted \code{distr} in a \link{PredictionSurv} to estimate (or 'com... | /man/mlr_pipeops_compose_crank.Rd | no_license | cran/mlr3proba | R | false | true | 5,704 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PipeOpCrankCompositor.R
\name{mlr_pipeops_compose_crank}
\alias{mlr_pipeops_compose_crank}
\alias{PipeOpCrankCompositor}
\title{PipeOpCrankCompositor}
\description{
Uses a predicted \code{distr} in a \link{PredictionSurv} to estimate (or 'com... |
# mail --- send mail from one user to another
# Usage:
# mail
# Checks for mail, prints it if it's there and asks if it
# is to be saved. Saves in =varsdir=/.mail if desired.
# mail { <user> }
# Validates given user names; appends standard input to the
# mail files of the named users.
include ... | /swt/src/std.r/mail.r | no_license | arnoldrobbins/gt-swt | R | false | false | 2,858 | r | # mail --- send mail from one user to another
# Usage:
# mail
# Checks for mail, prints it if it's there and asks if it
# is to be saved. Saves in =varsdir=/.mail if desired.
# mail { <user> }
# Validates given user names; appends standard input to the
# mail files of the named users.
include ... |
# The original code is from @Henryjean <https://github.com/Henryjean/Rogers-Cardigans/blob/master/MrRogers.R>
# Some slight modifcations by @jhollist to create the cardigan_colors
# data frame
# Load packages
library(rvest)
library(dplyr)
#Point to the blog post that hosted the data
url <- "https://web.archive.org/w... | /data-raw/mr_rogers.R | no_license | jhollist/cardigans | R | false | false | 4,730 | r | # The original code is from @Henryjean <https://github.com/Henryjean/Rogers-Cardigans/blob/master/MrRogers.R>
# Some slight modifcations by @jhollist to create the cardigan_colors
# data frame
# Load packages
library(rvest)
library(dplyr)
#Point to the blog post that hosted the data
url <- "https://web.archive.org/w... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importGeneSets.R
\name{importGeneSetsFromList}
\alias{importGeneSetsFromList}
\title{Imports gene sets from a list}
\usage{
importGeneSetsFromList(
inSCE,
geneSetList,
collectionName = "GeneSetCollection",
by = "rownames"
)
}
\argumen... | /man/importGeneSetsFromList.Rd | permissive | ykoga07/singleCellTK | R | false | true | 3,335 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/importGeneSets.R
\name{importGeneSetsFromList}
\alias{importGeneSetsFromList}
\title{Imports gene sets from a list}
\usage{
importGeneSetsFromList(
inSCE,
geneSetList,
collectionName = "GeneSetCollection",
by = "rownames"
)
}
\argumen... |
## R code for validation to reproduce results of "DNN-LRT" in the first column of
## Table 2 in Section 4.2 with pre-trained DNNs
## Change working directory to yours
setwd("~/R_code_DNN_hypothesis_testing_JCGS/")
## Source functions with "DNN_stats_functions.r" saved in the same working directory
source("DNN_stats_... | /sim_2_df_LRT/DNN_stats_sim_2_df_LRT_validation.r | no_license | kangjian2016/DNN_Hypothesis_Testing | R | false | false | 6,175 | r |
## R code for validation to reproduce results of "DNN-LRT" in the first column of
## Table 2 in Section 4.2 with pre-trained DNNs
## Change working directory to yours
setwd("~/R_code_DNN_hypothesis_testing_JCGS/")
## Source functions with "DNN_stats_functions.r" saved in the same working directory
source("DNN_stats_... |
#######################################################################################################################################################################################
#######################################################################################################################################... | /ProximaNova_Team_code_Final_test.R | no_license | amyipliu/Project-test | R | false | false | 48,022 | r | #######################################################################################################################################################################################
#######################################################################################################################################... |
library(TDA)
## The training subjects
trainSub = c(1,3,5,6,7,8,11,14,15,16,17,19,21,22,23,25,26,27,28,29,30)
## the full data frame (of the cleaned and sampled data is named 'train' here)
## Make the results data frame
testSamp = as.data.frame(matrix(ncol=11))
for(i in 1:10){
class(testSamp[,1]) = "numeric"
}
act... | /Sampled1DClassification.R | no_license | DJC37/compTDA2014F | R | false | false | 1,640 | r | library(TDA)
## The training subjects
trainSub = c(1,3,5,6,7,8,11,14,15,16,17,19,21,22,23,25,26,27,28,29,30)
## the full data frame (of the cleaned and sampled data is named 'train' here)
## Make the results data frame
testSamp = as.data.frame(matrix(ncol=11))
for(i in 1:10){
class(testSamp[,1]) = "numeric"
}
act... |
testthat::context("utility functions")
testthat::test_that("subsetting in ltable works and ltable has no side effects", {
popEpi:::skip_normally()
sr <- popEpi::sire[1:100, ]
set.seed(1L)
sr[, sex := rbinom(.N, 1, prob = 0.5)]
sr[c(1, 50), sex := NA]
setkeyv(sr, "bi_date")
old_sr <- copy... | /tests/testthat/test_utils.R | no_license | cran/popEpi | R | false | false | 15,959 | r | testthat::context("utility functions")
testthat::test_that("subsetting in ltable works and ltable has no side effects", {
popEpi:::skip_normally()
sr <- popEpi::sire[1:100, ]
set.seed(1L)
sr[, sex := rbinom(.N, 1, prob = 0.5)]
sr[c(1, 50), sex := NA]
setkeyv(sr, "bi_date")
old_sr <- copy... |
##library packages
library(dplyr)
##read all datasets
xtrain<-read.table("./train/X_train.txt")
ytrain<-read.table("./train/Y_train.txt")
xtest<-read.table("./test/X_test.txt")
ytest<-read.table("./test/Y_test.txt")
testsubj<-read.table("./test/subject_test.txt")
trainsubj<-read.table("./train/subject_train.txt")
actl... | /run_analysis.R | no_license | SytzedeR/Getting-and-Cleaning-Data-Course-Project | R | false | false | 1,113 | r | ##library packages
library(dplyr)
##read all datasets
xtrain<-read.table("./train/X_train.txt")
ytrain<-read.table("./train/Y_train.txt")
xtest<-read.table("./test/X_test.txt")
ytest<-read.table("./test/Y_test.txt")
testsubj<-read.table("./test/subject_test.txt")
trainsubj<-read.table("./train/subject_train.txt")
actl... |
#' Tree-ring width (TRW) data from 2012 - 1961
#'
#' A dataset of tree-ring widths (TRW) from a site in Krakovo forest (Slovenia).
#' The first row represents a value of a year in 1961.
#'
#' @format A data frame with 52 rows and 1 variable:
#' \describe{
#' \item{TRW}{Standardized tree-ring width indices from... | /R/data_TRW_1.R | no_license | cran/dendroTools | R | false | false | 461 | r | #' Tree-ring width (TRW) data from 2012 - 1961
#'
#' A dataset of tree-ring widths (TRW) from a site in Krakovo forest (Slovenia).
#' The first row represents a value of a year in 1961.
#'
#' @format A data frame with 52 rows and 1 variable:
#' \describe{
#' \item{TRW}{Standardized tree-ring width indices from... |
###############################################################################
################# Leitura dos arquivos do excel e verificacao #################
# Dados dos autores e coautores #
# compara com a lista de e-mails que contactamos ... | /aba_coauthor.R | permissive | bnrodrigues/AFInvInt-data-paper | R | false | false | 6,156 | r | ###############################################################################
################# Leitura dos arquivos do excel e verificacao #################
# Dados dos autores e coautores #
# compara com a lista de e-mails que contactamos ... |
library("tidyverse")
library("kableExtra")
bechdel_ratings_2010s <- read_csv("data/bechdel-ratings-2010s.csv")
function(input, output, session) {
output$bechdel_ratings_table <- function(){
bechdel_ratings_2010s %>%
kable(col.names = c("Movie Title",
"Year",
... | /07_01/server.R | no_license | dmancilla85/r-shiny-essential-training | R | false | false | 455 | r | library("tidyverse")
library("kableExtra")
bechdel_ratings_2010s <- read_csv("data/bechdel-ratings-2010s.csv")
function(input, output, session) {
output$bechdel_ratings_table <- function(){
bechdel_ratings_2010s %>%
kable(col.names = c("Movie Title",
"Year",
... |
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
data <- read.csv2("../../data/analysis-years.csv", header = TRUE, quote = "\"", dec = ".", fill = TRUE, comment.char = "", na.strings = "N/A")
data<-data[1:54,]
data <- data[as.numeric(data$Year) < 2021, ]
data<-data[,c(1,5)]
data[,2] <- as.numeric(data[,2])
y... | /analysis/significance/significance.R | permissive | S2-group/models-2021-replication-package | R | false | false | 1,367 | r | setwd(dirname(rstudioapi::getSourceEditorContext()$path))
data <- read.csv2("../../data/analysis-years.csv", header = TRUE, quote = "\"", dec = ".", fill = TRUE, comment.char = "", na.strings = "N/A")
data<-data[1:54,]
data <- data[as.numeric(data$Year) < 2021, ]
data<-data[,c(1,5)]
data[,2] <- as.numeric(data[,2])
y... |
#Thematic script for hospitals; regional and top 5 (by total cases)
# GRAPH 1: ICU, top 5
png("plot/thematic/Top5_ICU.png", width = 2500, height = 1250, pointsize = 50)
plot(top_1$terapia_intensiva,type = "l", col = "red", xlab = "", ylab = "Cases", main = "Hospitalized, ICU (top 5 regions)", xaxt='n', lwd = 3)
lines(... | /R_thematic.r | permissive | ThomasPepperz/COVID19_ITA_graphs | R | false | false | 5,328 | r | #Thematic script for hospitals; regional and top 5 (by total cases)
# GRAPH 1: ICU, top 5
png("plot/thematic/Top5_ICU.png", width = 2500, height = 1250, pointsize = 50)
plot(top_1$terapia_intensiva,type = "l", col = "red", xlab = "", ylab = "Cases", main = "Hospitalized, ICU (top 5 regions)", xaxt='n', lwd = 3)
lines(... |
shinyApp(
ui = tagList(
navbarPage(
theme = "united", # <--- To use a theme, uncomment this
"Probabilistic Knowledge Structures",
tabPanel("Estimation",
sidebarPanel(
tags$h4("Model specification"), br(),
tags$h5("Change initial values:")... | /tquantUpload-master/predictPKS/app.R | no_license | ASarafoglou/tquantUpload | R | false | false | 10,368 | r | shinyApp(
ui = tagList(
navbarPage(
theme = "united", # <--- To use a theme, uncomment this
"Probabilistic Knowledge Structures",
tabPanel("Estimation",
sidebarPanel(
tags$h4("Model specification"), br(),
tags$h5("Change initial values:")... |
rm(list=ls())
library(dplyr)
library(tidyr)
library(ggplot2)
load("data/all_data.RData")
#############
## Costs
costs <- all_data %>%
filter(
!is.na(value) ,
is.finite(value),
variable=="cost",
costsinclude==T
) %>%
group_by(technology) %>%
summarise(
costs_q25 = quantile(value, .25,... | /part2-synthesis/draw_rects.R | no_license | MariaDelMarZamora/NETs-review | R | false | false | 3,574 | r | rm(list=ls())
library(dplyr)
library(tidyr)
library(ggplot2)
load("data/all_data.RData")
#############
## Costs
costs <- all_data %>%
filter(
!is.na(value) ,
is.finite(value),
variable=="cost",
costsinclude==T
) %>%
group_by(technology) %>%
summarise(
costs_q25 = quantile(value, .25,... |
################################################################
##### Code to produce Table 1 in "Bayesian variable selection
##### in hierarchical difference-in-differences models"
##### Submitted to Biometrics, October 2019
################################################################
rm(list = ls())
##########... | /Variable by Variable Simulation (Table 1).R | no_license | JamesNormington/VS_in_HDiD | R | false | false | 20,847 | r | ################################################################
##### Code to produce Table 1 in "Bayesian variable selection
##### in hierarchical difference-in-differences models"
##### Submitted to Biometrics, October 2019
################################################################
rm(list = ls())
##########... |
# open database connection
PMScxn = odbcConnect("PMS_PROD")
# run the queries to get control failures in pouch qc
query.charVec = readLines("SQL/Q_PQC_FilmArray1ControlFailures.sql")
query = paste(query.charVec,collapse="\n")
fa1.cf.df = sqlQuery(PMScxn,query)
query.charVec = readLines("SQL/Q_PQC_FilmArray2ControlF... | /Portfolios/Q_PQC_load.R | no_license | BioAimie/AnalyticsWebHub | R | false | false | 1,693 | r | # open database connection
PMScxn = odbcConnect("PMS_PROD")
# run the queries to get control failures in pouch qc
query.charVec = readLines("SQL/Q_PQC_FilmArray1ControlFailures.sql")
query = paste(query.charVec,collapse="\n")
fa1.cf.df = sqlQuery(PMScxn,query)
query.charVec = readLines("SQL/Q_PQC_FilmArray2ControlF... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FacebookGenericCollection-methods.R
\docType{methods}
\name{as.character,FacebookGenericCollection-method}
\alias{as.character,FacebookGenericCollection-method}
\title{Return a comma-separated string of all the IDs of the given Facebook ... | /man/generic-character.Rd | no_license | cran/facebook.S4 | R | false | true | 692 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FacebookGenericCollection-methods.R
\docType{methods}
\name{as.character,FacebookGenericCollection-method}
\alias{as.character,FacebookGenericCollection-method}
\title{Return a comma-separated string of all the IDs of the given Facebook ... |
# Primary Script for Class 2019 Paper
library(stargazer)
library(broom)
library(nnet)
library(purrr)
#Install these packages
#### First Graph historical NDP vote ####
library(ggeffects)
#Get ROC Models to 2019
#Note we have to use the variable that does not carve out self-employed be
ces %>%
filter(election!=200... | /R_Scripts/8_analysis_script.R | no_license | sjkiss/class_voting_canada_2019 | R | false | false | 79,835 | r | # Primary Script for Class 2019 Paper
library(stargazer)
library(broom)
library(nnet)
library(purrr)
#Install these packages
#### First Graph historical NDP vote ####
library(ggeffects)
#Get ROC Models to 2019
#Note we have to use the variable that does not carve out self-employed be
ces %>%
filter(election!=200... |
# ##########################################################
# # Create edx set, validation set (final hold-out test set)
# ##########################################################
#
# Note: this process could take a couple of minutes
if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.... | /Movielen_Project_Rscript.R | no_license | victorwancf/Movielen_Project | R | false | false | 10,621 | r | # ##########################################################
# # Create edx set, validation set (final hold-out test set)
# ##########################################################
#
# Note: this process could take a couple of minutes
if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sst.R
\name{sstfiles}
\alias{sstfiles}
\title{OISST sea surface temperature files}
\usage{
sstfiles(time.resolution = c("daily", "monthly"), ...)
}
\arguments{
\item{time.resolution}{time resolution read}
\item{...}{reserved for future use, ... | /man/sstfiles.Rd | no_license | AustralianAntarcticDivision/raadtools | R | false | true | 516 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sst.R
\name{sstfiles}
\alias{sstfiles}
\title{OISST sea surface temperature files}
\usage{
sstfiles(time.resolution = c("daily", "monthly"), ...)
}
\arguments{
\item{time.resolution}{time resolution read}
\item{...}{reserved for future use, ... |
df <- read.table("hw2.txt",header = T,sep=',')
df$target <- ifelse(df$label =="BLACK",1,0)
df$Y_num <- as.numeric(df$Y)
df$X_fact <- as.factor(df$X)
library(caret)
library(gbm)
library(e1071)
library(dplyr)
library(MASS)
library(ISLR)
set.seed(998)
inTraining <- createDataPartition(df$target, p = .7,... | /HW-2.R | no_license | crarnouts/DATA_622_Machine_Learning | R | false | false | 5,694 | r |
df <- read.table("hw2.txt",header = T,sep=',')
df$target <- ifelse(df$label =="BLACK",1,0)
df$Y_num <- as.numeric(df$Y)
df$X_fact <- as.factor(df$X)
library(caret)
library(gbm)
library(e1071)
library(dplyr)
library(MASS)
library(ISLR)
set.seed(998)
inTraining <- createDataPartition(df$target, p = .7,... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "irish")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Sex")
lrn = makeLearner("classi... | /models/openml_irish/classification_Sex/4dae8ffb738e69fc067d16c12164b5ae/code.R | no_license | lukaszbrzozowski/CaseStudies2019S | R | false | false | 714 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "irish")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "Sex")
lrn = makeLearner("classi... |
#=====================================================================#
# File name: gtrendsR.R
# This is code to create: Google trends for BioMarin App
# Authored by and feedback to: mjfrigaard
# Last updated: 2020-12-13
# MIT License
# Version: 1.0
#====================================================================... | /docs/code/gtrendsR.R | no_license | mjfrigaard/intro-to-shiny | R | false | false | 2,541 | r | #=====================================================================#
# File name: gtrendsR.R
# This is code to create: Google trends for BioMarin App
# Authored by and feedback to: mjfrigaard
# Last updated: 2020-12-13
# MIT License
# Version: 1.0
#====================================================================... |
# Plot 6 - Compare Emissions between Baltimore and Los Angeles
require(ggplot2)
# Read in the Particulate and Classification data.
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# Prepare the data - find the vehicle classifications, the emissions for the cities, and the subse... | /plot6.R | no_license | pcappa/ExData-Project2 | R | false | false | 1,074 | r | # Plot 6 - Compare Emissions between Baltimore and Los Angeles
require(ggplot2)
# Read in the Particulate and Classification data.
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# Prepare the data - find the vehicle classifications, the emissions for the cities, and the subse... |
\name{plotMetageneFrames}
\alias{plotMetageneFrames}
\title{
Plot Frames of Metagene Regions
}
\description{
Make bar plot showing frame distribution at positions relative
to CDS start and stop positions.
}
\usage{
plotMetageneFrames(metagene_atStart=NULL, metagene_atStop=NULL,
min_5p=-20, max_5p=20... | /man/plotMetageneFrames.Rd | no_license | hzhanghenry/RiboProR | R | false | false | 1,584 | rd | \name{plotMetageneFrames}
\alias{plotMetageneFrames}
\title{
Plot Frames of Metagene Regions
}
\description{
Make bar plot showing frame distribution at positions relative
to CDS start and stop positions.
}
\usage{
plotMetageneFrames(metagene_atStart=NULL, metagene_atStop=NULL,
min_5p=-20, max_5p=20... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{boolean_input_df}
\alias{boolean_input_df}
\title{Sparse Boolean dataframe with rare variant information
and a single outcome variable}
\format{
A data frame with 5000 rows and 1002 variables:
\describe{
\item{Sam... | /man/boolean_input_df.Rd | permissive | Leehyeji789/RareComb | R | false | true | 30,368 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{boolean_input_df}
\alias{boolean_input_df}
\title{Sparse Boolean dataframe with rare variant information
and a single outcome variable}
\format{
A data frame with 5000 rows and 1002 variables:
\describe{
\item{Sam... |
library(tidyverse)
library(readxl)
# Create entity list
directory <- read_excel('data/pubschls.xlsx', skip = 5) %>%
select(cds = CDSCode, County, District, School, StatusType) %>%
filter(StatusType == "Active")
lea_list <- directory %>%
mutate(cds = substr(cds,1,7)) %>%
select(cds, County, District) %>%
uniq... | /prepare_data.R | no_license | RCOE-AACI/CSI-ATSI-Report | R | false | false | 8,302 | r | library(tidyverse)
library(readxl)
# Create entity list
directory <- read_excel('data/pubschls.xlsx', skip = 5) %>%
select(cds = CDSCode, County, District, School, StatusType) %>%
filter(StatusType == "Active")
lea_list <- directory %>%
mutate(cds = substr(cds,1,7)) %>%
select(cds, County, District) %>%
uniq... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/us_counties_gazetteer.R
\name{us_county_geo_details}
\alias{us_county_geo_details}
\title{United States county-level geographic details}
\source{
\url{https://raw.githubusercontent.com/josh-byster/fips_lat_long/master/counties.txt}
}
\usage{
... | /man/us_county_geo_details.Rd | permissive | jwilliamsholt/sars2pack | R | false | true | 1,625 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/us_counties_gazetteer.R
\name{us_county_geo_details}
\alias{us_county_geo_details}
\title{United States county-level geographic details}
\source{
\url{https://raw.githubusercontent.com/josh-byster/fips_lat_long/master/counties.txt}
}
\usage{
... |
\name{R2.betaboost}
\alias{LH.betaboost}
\alias{R2.betaboost}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Computing pseudo R^2 for betaboost models.
}
\description{
Computes different pseudo R^2 for betaboost models
}
\usage{
R2.betaboost(model, data, newdata = NULL)
}
%- maybe also 'usage' ... | /man/R2.betaboost.Rd | no_license | JamesLinus/betaboost | R | false | false | 1,083 | rd | \name{R2.betaboost}
\alias{LH.betaboost}
\alias{R2.betaboost}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Computing pseudo R^2 for betaboost models.
}
\description{
Computes different pseudo R^2 for betaboost models
}
\usage{
R2.betaboost(model, data, newdata = NULL)
}
%- maybe also 'usage' ... |
loadNewDatasets("data/Annotations")
do_bcr <- FALSE
if(do_bcr) {
data_to_compare <- list(
# Compare partis annotations to
# simulations using imgt database
c("pi_f1", "pi_f1_sim"),
c("pi_f2", "pi_f2_sim"... | /Examples/CompareBCRDatasets.R | no_license | Pezhvuk/sumrep | R | false | false | 4,288 | r | loadNewDatasets("data/Annotations")
do_bcr <- FALSE
if(do_bcr) {
data_to_compare <- list(
# Compare partis annotations to
# simulations using imgt database
c("pi_f1", "pi_f1_sim"),
c("pi_f2", "pi_f2_sim"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unite_records.R
\name{unite_records}
\alias{unite_records}
\title{Unite the 20 record columns from MCOD dataframe into a single column}
\usage{
unite_records(icd_df, year = NULL)
}
\arguments{
\item{icd_df}{an ICD dataframe}
\item{year}{the ... | /man/unite_records.Rd | permissive | mkiang/narcan | R | false | true | 589 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unite_records.R
\name{unite_records}
\alias{unite_records}
\title{Unite the 20 record columns from MCOD dataframe into a single column}
\usage{
unite_records(icd_df, year = NULL)
}
\arguments{
\item{icd_df}{an ICD dataframe}
\item{year}{the ... |
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Now, we have all parameters for the simulation
# Let's start
cl <- parallel::makeCluster(ncores)
registerDoSNOW(cl)
# Progress bar
pb <- txtProgressBar(max = nr... | /Simulations/401k/401k_sims_lte.R | permissive | lnsongxf/IPS_replication | R | false | false | 17,286 | r |
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Now, we have all parameters for the simulation
# Let's start
cl <- parallel::makeCluster(ncores)
registerDoSNOW(cl)
# Progress bar
pb <- txtProgressBar(max = nr... |
% Generated by roxygen2: do not edit by hand
\name{analyseUtils_functions}
\alias{analyseUtils_functions}
\title{Utils function for analyse}
| /analyseUtils/man/analyseUtils_functions.Rd | no_license | LaurentFrobert/r_packages | R | false | true | 141 | rd | % Generated by roxygen2: do not edit by hand
\name{analyseUtils_functions}
\alias{analyseUtils_functions}
\title{Utils function for analyse}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-org.R
\name{sf_list_rest_api_versions}
\alias{sf_list_rest_api_versions}
\title{List REST API Versions}
\usage{
sf_list_rest_api_versions()
}
\value{
\code{list}
}
\description{
Lists summary information about each Salesforce version cu... | /man/sf_list_rest_api_versions.Rd | permissive | TonyWhiteSMS/salesforcer | R | false | true | 460 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-org.R
\name{sf_list_rest_api_versions}
\alias{sf_list_rest_api_versions}
\title{List REST API Versions}
\usage{
sf_list_rest_api_versions()
}
\value{
\code{list}
}
\description{
Lists summary information about each Salesforce version cu... |
context("colwise mutate/summarise")
test_that("can use character vectors or bare functions", {
df <- data.frame(x = 1:3)
expect_equal(summarise_all(df, "mean"), data.frame(x = 2))
expect_equal(summarise_all(df, mean), data.frame(x = 2))
expect_equal(mutate_all(df, list(x = "mean")), data.frame(x = rep(2, 3)))... | /tests/testthat/test-colwise-mutate.R | permissive | AdaChornelia/dplyr | R | false | false | 11,520 | r | context("colwise mutate/summarise")
test_that("can use character vectors or bare functions", {
df <- data.frame(x = 1:3)
expect_equal(summarise_all(df, "mean"), data.frame(x = 2))
expect_equal(summarise_all(df, mean), data.frame(x = 2))
expect_equal(mutate_all(df, list(x = "mean")), data.frame(x = rep(2, 3)))... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/flow.R
\name{ensureF}
\alias{ensureF}
\title{Ensures that either file argument or its archived version exist}
\usage{
ensureF(file, archFile = NULL)
}
\arguments{
\item{file}{path/to/some/file.ext}
}
\value{
path/to/some/file.ext or archive/p... | /man/ensureF.Rd | no_license | kongra/koR | R | false | true | 423 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/flow.R
\name{ensureF}
\alias{ensureF}
\title{Ensures that either file argument or its archived version exist}
\usage{
ensureF(file, archFile = NULL)
}
\arguments{
\item{file}{path/to/some/file.ext}
}
\value{
path/to/some/file.ext or archive/p... |
check.overlap <-
function(start,end, start1, end1) {
## start, end -- vector, length(start)==length(end)
## start1, end1 -- scalar value
idx1 <- start>=start1 & start<=end1
idx2 <- end>=start1 & end<=end1
idx3 <- start<=start1 & end>=end1
idx4 <- start>=start1 & end<=end1
return(which(idx1 | idx2 | idx3 | idx... | /R/check.overlap.R | no_license | cran/saasCNV | R | false | false | 330 | r | check.overlap <-
function(start,end, start1, end1) {
## start, end -- vector, length(start)==length(end)
## start1, end1 -- scalar value
idx1 <- start>=start1 & start<=end1
idx2 <- end>=start1 & end<=end1
idx3 <- start<=start1 & end>=end1
idx4 <- start>=start1 & end<=end1
return(which(idx1 | idx2 | idx3 | idx... |
\name{find.missing.gen}
\alias{find.missing.gen}
\title{
Find Missing Genotypes
}
\description{
This function returns a data frame listing the locus and sample names of
all genotypes with missing data.
}
\usage{
find.missing.gen(object, samples = Samples(object),
loci = Loci(object))
}
\ar... | /man/find.missing.gen.Rd | no_license | cran/polysat | R | false | false | 1,740 | rd | \name{find.missing.gen}
\alias{find.missing.gen}
\title{
Find Missing Genotypes
}
\description{
This function returns a data frame listing the locus and sample names of
all genotypes with missing data.
}
\usage{
find.missing.gen(object, samples = Samples(object),
loci = Loci(object))
}
\ar... |
#
# TITLE: Wireshark Packet Header Analysis
#
# DESCRIPTION
#
# I want a way to analyze the timing of Wireshark collected data for a specific network
# command between a device and its driver. In the example here I'm evaluating the
# AWRT response from a device. I collected the data with Wireshark through a te... | /WiresharkTimingAnalysis.R | no_license | bhollenStats/WiresharkTimingAnalysis | R | false | false | 5,576 | r | #
# TITLE: Wireshark Packet Header Analysis
#
# DESCRIPTION
#
# I want a way to analyze the timing of Wireshark collected data for a specific network
# command between a device and its driver. In the example here I'm evaluating the
# AWRT response from a device. I collected the data with Wireshark through a te... |
library(xgboost)
library(Matrix)
options(scipen=999)
# ---------------------------------------------------
# Load
orig.train <- read.csv("../input/train.csv", stringsAsFactors = F)
orig.test <- read.csv("../input/test.csv", stringsAsFactors = F)
sample.submission <- read.csv("../input/sample_submission.csv", stringsA... | /02-santander/scripts/not_my/xg82.R | no_license | nicknazarov/07-competitions | R | false | false | 2,621 | r | library(xgboost)
library(Matrix)
options(scipen=999)
# ---------------------------------------------------
# Load
orig.train <- read.csv("../input/train.csv", stringsAsFactors = F)
orig.test <- read.csv("../input/test.csv", stringsAsFactors = F)
sample.submission <- read.csv("../input/sample_submission.csv", stringsA... |
fact<-c("M","M","M","M","M","A","A","A","A","A")
cols<-c(rep("blue",5),rep("red",5))
dat.v<-c(0.19627,0.76549,0.86939,0.63961,0.29376,2.58203,2.79745,1.50102,2.24673,1.34131,2.31652,1.59583,0.8965,3.95341,4.57293,1.93889,2.074,2.17505,1.26667,0.79056,0.00016,4e-05,0.85864,0.14139,0.00955,0.01774,6e-04,0.01042,2e-04,0.6... | /multivariateData.R | no_license | mattjtuttle/biometry | R | false | false | 482 | r | fact<-c("M","M","M","M","M","A","A","A","A","A")
cols<-c(rep("blue",5),rep("red",5))
dat.v<-c(0.19627,0.76549,0.86939,0.63961,0.29376,2.58203,2.79745,1.50102,2.24673,1.34131,2.31652,1.59583,0.8965,3.95341,4.57293,1.93889,2.074,2.17505,1.26667,0.79056,0.00016,4e-05,0.85864,0.14139,0.00955,0.01774,6e-04,0.01042,2e-04,0.6... |
#Loading Quiz1 Data Set
data <- read.csv(file = "./data/hw1_data.csv")
#Question 11
colnames(data)
#Question 12
data[1:2, ]
#Question 13
nrow(data)
#Question 14
data[152:153, ]
#Question 15
data[47, 1]
#Question 16
sum(is.na(data[, 1]))
#Question 17
badOzone <- is.na(data[, 1])
mean(data[!badOzone, 1])
#Questio... | /2- R Programming/Quizzes/Quiz 1/code/Quiz1.R | no_license | Amandeep236/Data-Science-Specialization-JHU---Coursera- | R | false | false | 511 | r | #Loading Quiz1 Data Set
data <- read.csv(file = "./data/hw1_data.csv")
#Question 11
colnames(data)
#Question 12
data[1:2, ]
#Question 13
nrow(data)
#Question 14
data[152:153, ]
#Question 15
data[47, 1]
#Question 16
sum(is.na(data[, 1]))
#Question 17
badOzone <- is.na(data[, 1])
mean(data[!badOzone, 1])
#Questio... |
# Computing the average value of each variable for each subject and activity
data2 <- lapply( split( data, list( data$id,
data$activity ) ),
FUN = function(x) colMeans(x[, 3:dim( x )[2]] ) )
# Preparing id and activity columns of the new data frame
df <- dat... | /subscripts/run_analysis.step5.R | no_license | embubiz/getdataProject | R | false | false | 1,111 | r | # Computing the average value of each variable for each subject and activity
data2 <- lapply( split( data, list( data$id,
data$activity ) ),
FUN = function(x) colMeans(x[, 3:dim( x )[2]] ) )
# Preparing id and activity columns of the new data frame
df <- dat... |
library(data.table)
library(knitr)
#Read Files
dtSubjectTrain <- fread(file.path(getwd(), "UCI HAR Dataset", "train", "subject_train.txt"))
dtSubjectTest <- fread(file.path(getwd(), "UCI HAR Dataset", "test", "subject_test.txt"))
dtTrainLabel <- fread(file.path(getwd(), "UCI HAR Dataset", "train", "Y_train.txt"))
dtT... | /run_analysis.R | no_license | Evan0605/getting-and-cleaning-data-course-project | R | false | false | 3,584 | r | library(data.table)
library(knitr)
#Read Files
dtSubjectTrain <- fread(file.path(getwd(), "UCI HAR Dataset", "train", "subject_train.txt"))
dtSubjectTest <- fread(file.path(getwd(), "UCI HAR Dataset", "test", "subject_test.txt"))
dtTrainLabel <- fread(file.path(getwd(), "UCI HAR Dataset", "train", "Y_train.txt"))
dtT... |
modelInfo <- list(label = "Cost-Sensitive CART",
library = c("rpart", "plyr"),
type = "Classification",
parameters = data.frame(parameter = c('cp', 'Cost'),
class = c("numeric", "numeric"),
... | /models/files/rpartCost.R | no_license | Weekend-Warrior/caret | R | false | false | 4,948 | r | modelInfo <- list(label = "Cost-Sensitive CART",
library = c("rpart", "plyr"),
type = "Classification",
parameters = data.frame(parameter = c('cp', 'Cost'),
class = c("numeric", "numeric"),
... |
#Write a function that reads a directory full of files and reports the number of completely observed cases in each data file.
#The function should return a data frame where the first column is the name of the file
#and the second column is the number of complete cases.
complete <- function(directory, id = 1:332) {
... | /complete2.R | no_license | JonJagd/datasciencecoursera | R | false | false | 1,026 | r |
#Write a function that reads a directory full of files and reports the number of completely observed cases in each data file.
#The function should return a data frame where the first column is the name of the file
#and the second column is the number of complete cases.
complete <- function(directory, id = 1:332) {
... |
"isfuncCOP" <-
function(cop=NULL, para=NULL, delta=0.002, ...) {
# Therefore properties 2.2.2a-c of Nelsen (2006, p. 8) are investigated on a grid
# where delta denotes the interval length. The code is broken in to five distinct
# units so as the message() output can be used to inform the user. The last unit
#... | /R/isfuncCOP.R | no_license | cran/copBasic | R | false | false | 2,065 | r | "isfuncCOP" <-
function(cop=NULL, para=NULL, delta=0.002, ...) {
# Therefore properties 2.2.2a-c of Nelsen (2006, p. 8) are investigated on a grid
# where delta denotes the interval length. The code is broken in to five distinct
# units so as the message() output can be used to inform the user. The last unit
#... |
library(openair)
library(plyr)
library(dplyr)
library(rmweather)
library(ranger)
library(magrittr)
library(globals)
library(future)
library(foreach)
library(iterators)
library(parallel)
library(doFuture)
library(readxl)
library(doParallel)
plan(multicore)
registerDoParallel(cores = detectCores()- 1)
registerDoFuture()
... | /Data and code/2019/London_Urban/RWshortv3.R | no_license | songnku/COVID-19-AQ | R | false | false | 2,975 | r | library(openair)
library(plyr)
library(dplyr)
library(rmweather)
library(ranger)
library(magrittr)
library(globals)
library(future)
library(foreach)
library(iterators)
library(parallel)
library(doFuture)
library(readxl)
library(doParallel)
plan(multicore)
registerDoParallel(cores = detectCores()- 1)
registerDoFuture()
... |
## first function stores inverse of a square matrix
## second function generates and displays the inverse of a square matrix
## this function stores the values in a list
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- fu... | /cachematrix.R | no_license | tldc01/ProgrammingAssignment2 | R | false | false | 811 | r | ## first function stores inverse of a square matrix
## second function generates and displays the inverse of a square matrix
## this function stores the values in a list
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- fu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.