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 |
|---|---|---|---|---|---|---|---|---|---|
# ***
# Functions to extract variance components from supported classes
# of statistical models
#
# *** lmer method
.getVC.lmer <- function(model){
if(!requireNamespace("lme4", quietly=TRUE)) stop("The 'lme4' package must be installed in order to use this function.")
m <- length(model)
vlist <- addp <- NULL
... | /R/internal-getVC.R | no_license | stefvanbuuren/mitml | R | false | false | 5,067 | r | # ***
# Functions to extract variance components from supported classes
# of statistical models
#
# *** lmer method
.getVC.lmer <- function(model){
if(!requireNamespace("lme4", quietly=TRUE)) stop("The 'lme4' package must be installed in order to use this function.")
m <- length(model)
vlist <- addp <- NULL
... |
library(sspse)
### Name: posteriorsize
### Title: Estimating hidden population size using RDS data
### Aliases: posteriorsize
### Keywords: models
### ** Examples
N0 <- 200
n <- 100
K <- 10
# Create probabilities for a Waring distribution
# with scaling parameter 3 and mean 5, but truncated at K=10.
probs <- c(0... | /data/genthat_extracted_code/sspse/examples/posteriorsize.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 885 | r | library(sspse)
### Name: posteriorsize
### Title: Estimating hidden population size using RDS data
### Aliases: posteriorsize
### Keywords: models
### ** Examples
N0 <- 200
n <- 100
K <- 10
# Create probabilities for a Waring distribution
# with scaling parameter 3 and mean 5, but truncated at K=10.
probs <- c(0... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_prism.R
\name{add_prism}
\alias{add_prism}
\title{Add a prism of nodes to the graph}
\usage{
add_prism(graph, n, type = NULL, label = TRUE, rel = NULL, nodes = NULL)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph} that... | /man/add_prism.Rd | no_license | timelyportfolio/DiagrammeR | R | false | true | 1,853 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_prism.R
\name{add_prism}
\alias{add_prism}
\title{Add a prism of nodes to the graph}
\usage{
add_prism(graph, n, type = NULL, label = TRUE, rel = NULL, nodes = NULL)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph} that... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.iam_operations.R
\name{list_user_tags}
\alias{list_user_tags}
\title{Lists the tags that are attached to the specified user}
\usage{
list_user_tags(UserName, Marker = NULL, MaxItems = NULL)
}
\arguments{
\item{UserName}{[required] The na... | /service/paws.iam/man/list_user_tags.Rd | permissive | CR-Mercado/paws | R | false | true | 2,010 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.iam_operations.R
\name{list_user_tags}
\alias{list_user_tags}
\title{Lists the tags that are attached to the specified user}
\usage{
list_user_tags(UserName, Marker = NULL, MaxItems = NULL)
}
\arguments{
\item{UserName}{[required] The na... |
# Loading the required libraries
library(dplyr)
# Reading the data after setting the directory to working directory
x <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?")
# The data required for analysis was selected.
data <- x[x$Date %in% "2/2/2007" | x$Date %in% "1/2/2007",]
... | /plot2.R | no_license | priyank1574q/Exploratory_project_1 | R | false | false | 1,089 | r | # Loading the required libraries
library(dplyr)
# Reading the data after setting the directory to working directory
x <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", na.strings = "?")
# The data required for analysis was selected.
data <- x[x$Date %in% "2/2/2007" | x$Date %in% "1/2/2007",]
... |
## Caching the Inverse of a Matrix:
## Matrix inversion is usually a costly computation and there may be some
## benefit to caching the inverse of a matrix rather than compute it repeatedly.
## Below are a pair of functions that are used to create a special object that
## stores a matrix and caches its inverse.
## T... | /cachematrix.R | no_license | Ahmad-Noor/ProgrammingAssignment2 | R | false | false | 2,275 | r | ## Caching the Inverse of a Matrix:
## Matrix inversion is usually a costly computation and there may be some
## benefit to caching the inverse of a matrix rather than compute it repeatedly.
## Below are a pair of functions that are used to create a special object that
## stores a matrix and caches its inverse.
## T... |
wrap360 = function(lon) {
lon360<-ifelse(lon<0,lon+360,lon)
return(lon360)
}
| /R/wrap360.R | no_license | raorben/seabird_tracking_atlas | R | false | false | 81 | r | wrap360 = function(lon) {
lon360<-ifelse(lon<0,lon+360,lon)
return(lon360)
}
|
#1.
#Answer the below questions:
# a. What are the assumptions of ANOVA, test it out?
#Ans.
1.The categories are independent of each other.
2.The response variable is normally distributed.
3.The variances of the response data are identical.
#b. Why ANOVA test? Is there any other way to answer the above ques... | /Assignment_12.2.R | no_license | Hemant-424/Data_Analytics_Assignment_11.2 | R | false | false | 609 | r | #1.
#Answer the below questions:
# a. What are the assumptions of ANOVA, test it out?
#Ans.
1.The categories are independent of each other.
2.The response variable is normally distributed.
3.The variances of the response data are identical.
#b. Why ANOVA test? Is there any other way to answer the above ques... |
library(ILS)
### Name: plot.lab.qcdata
### Title: Plot method for 'lab.qcdata' objects
### Aliases: plot.lab.qcdata
### ** Examples
library(ILS)
data(Glucose)
Glucose.qcdata <- lab.qcdata(Glucose)
str(Glucose.qcdata)
plot(Glucose.qcdata)
| /data/genthat_extracted_code/ILS/examples/plot.lab.qcdata.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 245 | r | library(ILS)
### Name: plot.lab.qcdata
### Title: Plot method for 'lab.qcdata' objects
### Aliases: plot.lab.qcdata
### ** Examples
library(ILS)
data(Glucose)
Glucose.qcdata <- lab.qcdata(Glucose)
str(Glucose.qcdata)
plot(Glucose.qcdata)
|
library(cmsaf)
### Name: read_ncvar
### Title: Read NetCDF variable.
### Aliases: read_ncvar
### ** Examples
## Create an example NetCDF file with a similar structure
## as used by CM SAF. The file is created with the ncdf4 package.
## Alternatively example data can be freely downloaded here:
## <https://wui.cmsaf... | /data/genthat_extracted_code/cmsaf/examples/read_ncvar.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,375 | r | library(cmsaf)
### Name: read_ncvar
### Title: Read NetCDF variable.
### Aliases: read_ncvar
### ** Examples
## Create an example NetCDF file with a similar structure
## as used by CM SAF. The file is created with the ncdf4 package.
## Alternatively example data can be freely downloaded here:
## <https://wui.cmsaf... |
##############################
### Load required packages ###
##############################
rm(list=ls())
options(warn=-1)
installIfAbsentAndLoad <- function(neededVector) {
if(length(neededVector) > 0) {
for(thispackage in neededVector) {
if(! require(thispackage, character.only = T)) {
... | /ML/seminar/mycode/RegressionTree.R | no_license | myytchYY/TYmyytch.github.io | R | false | false | 2,542 | r | ##############################
### Load required packages ###
##############################
rm(list=ls())
options(warn=-1)
installIfAbsentAndLoad <- function(neededVector) {
if(length(neededVector) > 0) {
for(thispackage in neededVector) {
if(! require(thispackage, character.only = T)) {
... |
fa22d2ea28c349ace929ac0596034c8f biu.mv.xl_ao.bb-b003-p020-IPF01-c05.blif-biu.inv.prop.bb-bmc.conf07.01X-QBF.BB1-Zi.BB2-Zi.BB3-Zi.with-IOC.unfold-002.qdimacs 2866 3728 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Herbstritt/blackbox-01X-QBF/biu.mv.xl_ao.bb-b003-p020-IPF01-c05.blif-biu.inv.prop.bb-bmc.conf07.01X-QBF.BB1-Zi.BB2-Zi.BB3-Zi.with-IOC.unfold-002/biu.mv.xl_ao.bb-b003-p020-IPF01-c05.blif-biu.inv.prop.bb-bmc.conf07.01X-QBF.BB1-Zi.BB2-Zi.BB3-Zi.with-IOC.unfold-... | no_license | arey0pushpa/dcnf-autarky | R | false | false | 167 | r | fa22d2ea28c349ace929ac0596034c8f biu.mv.xl_ao.bb-b003-p020-IPF01-c05.blif-biu.inv.prop.bb-bmc.conf07.01X-QBF.BB1-Zi.BB2-Zi.BB3-Zi.with-IOC.unfold-002.qdimacs 2866 3728 |
###### 1. FP & PE script combined for even more speed
FP_PE<- function (clade.matrix,edge.length,tip.label) {
# FP part
cset=rowSums(clade.matrix)*clade.matrix
lambda=edge.length*clade.matrix
tmp=lambda/cset
rm(lambda)
rm(cset)
tmp[is.na(tmp)]=0
FPP=as.matrix(colSums(tmp))
rownames(FPP)=tip.label
... | /Code/R/ed_arne_functions.R | no_license | gvdr/2013_Priebe_Strain | R | false | false | 3,185 | r | ###### 1. FP & PE script combined for even more speed
FP_PE<- function (clade.matrix,edge.length,tip.label) {
# FP part
cset=rowSums(clade.matrix)*clade.matrix
lambda=edge.length*clade.matrix
tmp=lambda/cset
rm(lambda)
rm(cset)
tmp[is.na(tmp)]=0
FPP=as.matrix(colSums(tmp))
rownames(FPP)=tip.label
... |
## module load conda_R/3.6.x # devel
## ----Libraries ------------------
library(tidyverse)
library(ggplot2)
library(Matrix)
library(Rmisc)
library(ggforce)
library(rjson)
library(cowplot)
library(RColorBrewer)
library(grid)
library(readbitmap)
library(Seurat)
library(SummarizedExperiment)
library(rtracklayer)
## Fu... | /Analysis/Layer_Notebook.R | no_license | LieberInstitute/HumanPilot | R | false | false | 14,067 | r | ## module load conda_R/3.6.x # devel
## ----Libraries ------------------
library(tidyverse)
library(ggplot2)
library(Matrix)
library(Rmisc)
library(ggforce)
library(rjson)
library(cowplot)
library(RColorBrewer)
library(grid)
library(readbitmap)
library(Seurat)
library(SummarizedExperiment)
library(rtracklayer)
## Fu... |
## Getting full dataset
data_full <- read.csv("./exdata-data-household_power_consumption/household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y")... | /plot3.R | no_license | anshultiwari1/Exploratory-Data-Analysis | R | false | false | 978 | r | ## Getting full dataset
data_full <- read.csv("./exdata-data-household_power_consumption/household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_full$Date <- as.Date(data_full$Date, format="%d/%m/%Y")... |
library(brms)
### Name: stanplot.brmsfit
### Title: MCMC Plots Implemented in 'bayesplot'
### Aliases: stanplot.brmsfit stanplot
### ** Examples
## Not run:
##D model <- brm(count ~ log_Age_c + log_Base4_c * Trt
##D + (1|patient) + (1|visit),
##D data = epilepsy, family = "poisson")
##D ... | /data/genthat_extracted_code/brms/examples/stanplot.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 863 | r | library(brms)
### Name: stanplot.brmsfit
### Title: MCMC Plots Implemented in 'bayesplot'
### Aliases: stanplot.brmsfit stanplot
### ** Examples
## Not run:
##D model <- brm(count ~ log_Age_c + log_Base4_c * Trt
##D + (1|patient) + (1|visit),
##D data = epilepsy, family = "poisson")
##D ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getEsts.R
\name{getEsts}
\alias{getEsts}
\title{Estimate the complexity of a library or sample based on unique fragments
using Daley & Smith's implementation of Good & Toulmin's rational function
approximation to solve the missing species pro... | /man/getEsts.Rd | no_license | danielhgu/ATACseeker | R | false | true | 810 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getEsts.R
\name{getEsts}
\alias{getEsts}
\title{Estimate the complexity of a library or sample based on unique fragments
using Daley & Smith's implementation of Good & Toulmin's rational function
approximation to solve the missing species pro... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-helpers.R
\name{adj_ranges}
\alias{adj_ranges}
\title{adjust ranges if necessary}
\usage{
adj_ranges(gr_e, gr_j, tx_plot, ex_use, gr_base = NULL)
}
\arguments{
\item{gr_e}{\code{GenomicRanges} for exons}
\item{gr_j}{\code{GenomicRanges}... | /man/adj_ranges.Rd | permissive | pkimes/spliceclust | R | false | true | 667 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-helpers.R
\name{adj_ranges}
\alias{adj_ranges}
\title{adjust ranges if necessary}
\usage{
adj_ranges(gr_e, gr_j, tx_plot, ex_use, gr_base = NULL)
}
\arguments{
\item{gr_e}{\code{GenomicRanges} for exons}
\item{gr_j}{\code{GenomicRanges}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CellDMC.R
\name{CellDMC}
\alias{CellDMC}
\title{A method that allows the identification of differentially methylated
cell-types and the estimated change of each cell-type}
\usage{
CellDMC(beta.m, pheno.v, frac.m, adjPMethod = "fdr", adjPThre... | /man/CellDMC.Rd | no_license | RogerZou0108/EpiDISH | R | false | true | 3,740 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CellDMC.R
\name{CellDMC}
\alias{CellDMC}
\title{A method that allows the identification of differentially methylated
cell-types and the estimated change of each cell-type}
\usage{
CellDMC(beta.m, pheno.v, frac.m, adjPMethod = "fdr", adjPThre... |
\docType{methods}
\name{head}
\alias{head}
\alias{head,DXGTable-method}
\title{Get the First Part of a GTable}
\arguments{
\item{x}{A GTable handler}
\item{n}{An integer: if positive, the max number of rows
starting from the beginning; if negative, all but the
last "|n|" rows.}
}
\value{
data frame of rows f... | /src/R/dxR/man/head-methods.Rd | permissive | dnanexus/dx-toolkit | R | false | false | 446 | rd | \docType{methods}
\name{head}
\alias{head}
\alias{head,DXGTable-method}
\title{Get the First Part of a GTable}
\arguments{
\item{x}{A GTable handler}
\item{n}{An integer: if positive, the max number of rows
starting from the beginning; if negative, all but the
last "|n|" rows.}
}
\value{
data frame of rows f... |
\name{select}
\alias{select}
\alias{select.dataset}
\alias{select.default}
\title{Selecting Variables}
\description{
Select one or more expressions evaluated in the context of a data object.
}
\usage{
select(`_data`, ...)
\method{select}{dataset}(`_data`, ...)
\method{select}{default}(`_data`, ...)
}
\arguments{
\item{... | /man/select.Rd | permissive | patperry/r-frame | R | false | false | 1,519 | rd | \name{select}
\alias{select}
\alias{select.dataset}
\alias{select.default}
\title{Selecting Variables}
\description{
Select one or more expressions evaluated in the context of a data object.
}
\usage{
select(`_data`, ...)
\method{select}{dataset}(`_data`, ...)
\method{select}{default}(`_data`, ...)
}
\arguments{
\item{... |
#' @name growthModels
#'
#' @title Creates a function for a specific parameterization of the von Bertalanffy, Gompertz, Richards, and logistic growth functions.
#'
#' @description Creates a function for a specific parameterizations of the von Bertalanffy, Gompertz, Richards, and logistic growth functions. Use \co... | /FSA/R/growthModels.R | no_license | ingted/R-Examples | R | false | false | 60,150 | r | #' @name growthModels
#'
#' @title Creates a function for a specific parameterization of the von Bertalanffy, Gompertz, Richards, and logistic growth functions.
#'
#' @description Creates a function for a specific parameterizations of the von Bertalanffy, Gompertz, Richards, and logistic growth functions. Use \co... |
# Hack to get around Exec.json always dumping to same Result.hex key
# TODO: Need better way to manage temporary/intermediate values in calculations! Right now, overwriting occurs silently
.pkg.env = new.env()
.pkg.env$result_count = 0
.pkg.env$temp_count = 0
.pkg.env$IS_LOGGING = FALSE
.TEMP_KEY = "Last.value"
.RESUL... | /R/h2o-package/R/Internal.R | permissive | SantiagoPOPO/h2o | R | false | false | 25,887 | r | # Hack to get around Exec.json always dumping to same Result.hex key
# TODO: Need better way to manage temporary/intermediate values in calculations! Right now, overwriting occurs silently
.pkg.env = new.env()
.pkg.env$result_count = 0
.pkg.env$temp_count = 0
.pkg.env$IS_LOGGING = FALSE
.TEMP_KEY = "Last.value"
.RESUL... |
##########################Project 2-ML Code###################################
## Setting WD ####
setwd("~/Desktop/Intoduction to ML and DM (02450)/Project 2/Project 2-ML")
## Loading packages ####
library(keras)
library(formattable)
library(markdown)
library(tidyverse)
library(caret)
library(dplyr)
library(doFuture)
l... | /V2.R | no_license | AlexLarsen1/Project-2-ML | R | false | false | 9,286 | r | ##########################Project 2-ML Code###################################
## Setting WD ####
setwd("~/Desktop/Intoduction to ML and DM (02450)/Project 2/Project 2-ML")
## Loading packages ####
library(keras)
library(formattable)
library(markdown)
library(tidyverse)
library(caret)
library(dplyr)
library(doFuture)
l... |
#' @title Add polygon glyphs on scatter plot
#' @description Each point glyph can be a polygon object.
#' We provide some common polygon coords in \code{\link{polygon_glyph}}. Also, users can
#' customize their own polygons.
#' @inheritParams geom_serialaxes_glyph
#' @param polygon_x nested list of x-coordinates of pol... | /R/geom-polygon-glyph.R | no_license | LucyNjoki/ggmulti | R | false | false | 9,787 | r | #' @title Add polygon glyphs on scatter plot
#' @description Each point glyph can be a polygon object.
#' We provide some common polygon coords in \code{\link{polygon_glyph}}. Also, users can
#' customize their own polygons.
#' @inheritParams geom_serialaxes_glyph
#' @param polygon_x nested list of x-coordinates of pol... |
#Function is_integer()
#' @title Is Integer
#' @description Determines whether a number is an integer or not
#' @param x number
#' @return TRUE if x is an intenger
#' @return FALSE if x is not an integer
is_integer <- function(x) {
if (x %% 1 == 0) {
return(TRUE)
}
else {
return(FALSE)
}
}
is_integer(-1... | /hw03/code/binomial-functions.R | no_license | JustinRiverNg/Computing-Data | R | false | false | 5,225 | r | #Function is_integer()
#' @title Is Integer
#' @description Determines whether a number is an integer or not
#' @param x number
#' @return TRUE if x is an intenger
#' @return FALSE if x is not an integer
is_integer <- function(x) {
if (x %% 1 == 0) {
return(TRUE)
}
else {
return(FALSE)
}
}
is_integer(-1... |
library(unmarked)
library(MuMIn)
library(rgdal)
library(rgeos)
library(foreign)
library(foreach)
source("f.AIC_cut.occu.sig.used.15.10.23.R")
source("getDesign.R")
ObsCovarSet <- c("DAY", "TIME", "COUNT_TYPE", "EFFORT_HRS", "EFFORT_DISTANCE_KM", "NUMBER_OBSERVERS")
covar <- read.csv("./input/eBird_occu_covar_site_... | /occu_models/BARS_eBird.R | no_license | ricschuster/Tradeoffs-biodiversity-cost | R | false | false | 4,337 | r | library(unmarked)
library(MuMIn)
library(rgdal)
library(rgeos)
library(foreign)
library(foreach)
source("f.AIC_cut.occu.sig.used.15.10.23.R")
source("getDesign.R")
ObsCovarSet <- c("DAY", "TIME", "COUNT_TYPE", "EFFORT_HRS", "EFFORT_DISTANCE_KM", "NUMBER_OBSERVERS")
covar <- read.csv("./input/eBird_occu_covar_site_... |
testlist <- list(latLongs = structure(c(2.28704985607018e-269, 0, 0, 0, 0 ), .Dim = c(1L, 5L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) | /MGDrivE/inst/testfiles/calcCos/libFuzzer_calcCos/calcCos_valgrind_files/1612727581-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 159 | r | testlist <- list(latLongs = structure(c(2.28704985607018e-269, 0, 0, 0, 0 ), .Dim = c(1L, 5L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) |
pacman::p_load(data.table, dplyr)
path = "c:/models/freightFlows/output/assignmentFull/truckFlows.csv"
aux = fread(path)
aux = aux %>% filter(trucks >0)
fwrite(aux, "c:/models/freightFlows/output/assignmentFull/truckFlows_v2.csv", row.names= F )
aux = aux %>% rowwise() %>%
mutate(tt_h = max(round(tt/3600, digits... | /data_process/removeZerosInFlowListFromJava.R | no_license | cllorca1/freightFlowsAnalyses | R | false | false | 769 | r | pacman::p_load(data.table, dplyr)
path = "c:/models/freightFlows/output/assignmentFull/truckFlows.csv"
aux = fread(path)
aux = aux %>% filter(trucks >0)
fwrite(aux, "c:/models/freightFlows/output/assignmentFull/truckFlows_v2.csv", row.names= F )
aux = aux %>% rowwise() %>%
mutate(tt_h = max(round(tt/3600, digits... |
#' set_TextType
#'
#' For any EML element of class TextType, this function can be used to generate the appropriate EML from a markdown-formatted file.
#' @param text a plain text character string which will be used directly as the content of the node if no file is given
#' @param file path to a file providing formatted... | /R/set_TextType.R | no_license | nicolasfstgelais/EML | R | false | false | 3,277 | r | #' set_TextType
#'
#' For any EML element of class TextType, this function can be used to generate the appropriate EML from a markdown-formatted file.
#' @param text a plain text character string which will be used directly as the content of the node if no file is given
#' @param file path to a file providing formatted... |
# Me conecto a la vista de la db mongo y traigo los datos que necesito
# db.createView("mas_escuchados_2020", "charts", [
# {$match: {week_start: {$regex: "^2020.*"}}},
# {$sort: { Streams: -1 }}
# ])
library(mo... | /2021/laboratorios/LAB08/scripts/adicionales/script-topK-AZlyrics.R | no_license | dm-uba/dm-uba.github.io | R | false | false | 1,899 | r | # Me conecto a la vista de la db mongo y traigo los datos que necesito
# db.createView("mas_escuchados_2020", "charts", [
# {$match: {week_start: {$regex: "^2020.*"}}},
# {$sort: { Streams: -1 }}
# ])
library(mo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fishSim_dev.R
\name{archive_dead}
\alias{archive_dead}
\title{take dead individuals and copy them to an archive}
\usage{
archive_dead(indiv = mort(), archive = make_archive())
}
\arguments{
\item{indiv}{A matrix of individuals, as from makeFo... | /man/archive_dead.Rd | permissive | SMBaylis/fishSim | R | false | true | 1,687 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fishSim_dev.R
\name{archive_dead}
\alias{archive_dead}
\title{take dead individuals and copy them to an archive}
\usage{
archive_dead(indiv = mort(), archive = make_archive())
}
\arguments{
\item{indiv}{A matrix of individuals, as from makeFo... |
testlist <- list(a = 33816326L, b = -134217984L, x = integer(0))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610131637-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 125 | r | testlist <- list(a = 33816326L, b = -134217984L, x = integer(0))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
# install.packages('formatR') library(formatR)
# install.packages('gWidgetsRGtk2') tidy_app()
# formatR::tidy_app()
#' Title get_xy_from_DATA_C2
#'
#' @param DATA Full data matrix, includes all observations for all the variables
#' @param META_DATA Need to have at least 2 columns, one with all variables name, ano... | /R/functions.R | no_license | HBPMedical/CCC | R | false | false | 33,130 | r |
# install.packages('formatR') library(formatR)
# install.packages('gWidgetsRGtk2') tidy_app()
# formatR::tidy_app()
#' Title get_xy_from_DATA_C2
#'
#' @param DATA Full data matrix, includes all observations for all the variables
#' @param META_DATA Need to have at least 2 columns, one with all variables name, ano... |
\name{Qfn}
\alias{Qfn}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Function to compute the criteria values Q.
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
Qfn(X, S, N)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
... | /man/Qfn.Rd | no_license | jaroyle/scrDesign | R | false | false | 2,654 | rd | \name{Qfn}
\alias{Qfn}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Function to compute the criteria values Q.
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
Qfn(X, S, N)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
... |
"fourthcorner" <- function(tabR, tabL, tabQ, modeltype = 6,nrepet = 999, tr01 = FALSE, p.adjust.method.G = p.adjust.methods, p.adjust.method.D = p.adjust.methods, p.adjust.D = c("global","levels"), ...) {
## tabR ,tabL, tabQ are 3 data frames containing the data
## permut.model is the permutational model a... | /R/fourthcorner.R | no_license | cran/ade4 | R | false | false | 10,483 | r | "fourthcorner" <- function(tabR, tabL, tabQ, modeltype = 6,nrepet = 999, tr01 = FALSE, p.adjust.method.G = p.adjust.methods, p.adjust.method.D = p.adjust.methods, p.adjust.D = c("global","levels"), ...) {
## tabR ,tabL, tabQ are 3 data frames containing the data
## permut.model is the permutational model a... |
library(glmnet)
mydata = read.table("./TrainingSet/Correlation/central_nervous_system.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/central_nerv... | /Model/EN/Correlation/central_nervous_system/central_nervous_system_003.R | no_license | leon1003/QSMART | R | false | false | 405 | r | library(glmnet)
mydata = read.table("./TrainingSet/Correlation/central_nervous_system.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/central_nerv... |
## ----echo=FALSE----------------------------------------------------------
knitr::opts_chunk$set(fig.width=8, fig.height=8)
## ----eval = FALSE--------------------------------------------------------
# install.packages("FateID")
## ------------------------------------------------------------------------
library(Fa... | /inst/doc/FateID.R | no_license | lyc-1995/FateID | R | false | false | 6,118 | r | ## ----echo=FALSE----------------------------------------------------------
knitr::opts_chunk$set(fig.width=8, fig.height=8)
## ----eval = FALSE--------------------------------------------------------
# install.packages("FateID")
## ------------------------------------------------------------------------
library(Fa... |
\name{showShinyApp}
\alias{showShinyApp}
\title{
Display a 'shiny' application
}
\description{
Displays one of the built-in interactive 'shiny' applications in the browser. See Details for the apps available.
}
\usage{
showShinyApp(topic)
}
\arguments{
\item{topic}{
The name of the shiny app to display.
}
}
\detail... | /man/showShinyApp.Rd | no_license | BlueMaple/wiqid | R | false | false | 1,022 | rd | \name{showShinyApp}
\alias{showShinyApp}
\title{
Display a 'shiny' application
}
\description{
Displays one of the built-in interactive 'shiny' applications in the browser. See Details for the apps available.
}
\usage{
showShinyApp(topic)
}
\arguments{
\item{topic}{
The name of the shiny app to display.
}
}
\detail... |
# Assignment: ASSIGNMENT 4
# Name: Gunasekaran, Ragunath
# Date: 2020-09-21
## Load the ggplot2 package
library(ggplot2)
theme_set(theme_minimal())
## Set the working directory to the root of your DSC 520 directory
setwd("C:/Users/ragun/Documents/GitHub/dsc520-master/DSC520-new")
## Load the `data/r4ds/heights.csv` ... | /assignments/assignment04/assignment_04_RagunathGunasekaran.R | permissive | RGunasekaran21249030/DSC520-new | R | false | false | 3,532 | r | # Assignment: ASSIGNMENT 4
# Name: Gunasekaran, Ragunath
# Date: 2020-09-21
## Load the ggplot2 package
library(ggplot2)
theme_set(theme_minimal())
## Set the working directory to the root of your DSC 520 directory
setwd("C:/Users/ragun/Documents/GitHub/dsc520-master/DSC520-new")
## Load the `data/r4ds/heights.csv` ... |
#
# Template for hold-out-subjects cross-validation. You need to change 6 things here.
#
# 1) SPECIFIFY PACKAGES TO USE DURING LEARNING HERE
# this is needed because we need to pass them to each parallel cluster separately
packages=c('pROC', 'caret')
library('foreach')
library('doParallel')
library('parallel')
source... | /Code/sandbox/run_one_gbm_meta.r | no_license | KnightofDawn/Kaggle-BCI-Challenge | R | false | false | 4,986 | r | #
# Template for hold-out-subjects cross-validation. You need to change 6 things here.
#
# 1) SPECIFIFY PACKAGES TO USE DURING LEARNING HERE
# this is needed because we need to pass them to each parallel cluster separately
packages=c('pROC', 'caret')
library('foreach')
library('doParallel')
library('parallel')
source... |
#Example 18, section 3.1, page 191
#Verify that det(AB) = det(A)*det(B) ,if A and B are two matrices.
A<-matrix(c(1,3,2,4),c(2,2))
print(A)
B<-matrix(c(2,1,-1,2),c(2,2))
print(B)
mulAB<- A%*%B
print(mulAB)
det_AB= det(mulAB)
print(det_AB)
det_A= det(A)
det_B= det(B)
det_product = det_A * det_B
print(det_product)
x... | /ashiq/R codes/chapter 3/example18_sec3_1.R | no_license | sahridhaya/BitPlease | R | false | false | 400 | r | #Example 18, section 3.1, page 191
#Verify that det(AB) = det(A)*det(B) ,if A and B are two matrices.
A<-matrix(c(1,3,2,4),c(2,2))
print(A)
B<-matrix(c(2,1,-1,2),c(2,2))
print(B)
mulAB<- A%*%B
print(mulAB)
det_AB= det(mulAB)
print(det_AB)
det_A= det(A)
det_B= det(B)
det_product = det_A * det_B
print(det_product)
x... |
fig08x011<-function(){
#
require(lattice)
#
haireye<-matrix(data=c(7,10,16,94,26,14,14,17,119,54,29,84,68,15,5,20),
nrow=4,ncol=4,byrow=TRUE,dimnames=list(c("Blond","Red","Brunette","Black"),
c("Brown","Hazel","Green","Blue")))
#
trellis.device(color=FALSE)
graphics.off()
windows(width=4.5,height=3.5,pointsiz... | /graphicsforstatistics_2e_figures_scripts_r/Chapter 8/fig08x011.R | no_license | saqibarfeen/coding_time | R | false | false | 661 | r | fig08x011<-function(){
#
require(lattice)
#
haireye<-matrix(data=c(7,10,16,94,26,14,14,17,119,54,29,84,68,15,5,20),
nrow=4,ncol=4,byrow=TRUE,dimnames=list(c("Blond","Red","Brunette","Black"),
c("Brown","Hazel","Green","Blue")))
#
trellis.device(color=FALSE)
graphics.off()
windows(width=4.5,height=3.5,pointsiz... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGetters.R
\name{RSS,MCR-method}
\alias{RSS,MCR-method}
\title{MCR accessor RSS,}
\usage{
\S4method{RSS}{MCR}(object)
}
\arguments{
\item{object}{object of type MCR}
}
\value{
RSS from object
}
\description{
MCR accessor RSS,
}
| /man/RSS-MCR-method.Rd | no_license | lorenzgerber/tofsims | R | false | true | 308 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGetters.R
\name{RSS,MCR-method}
\alias{RSS,MCR-method}
\title{MCR accessor RSS,}
\usage{
\S4method{RSS}{MCR}(object)
}
\arguments{
\item{object}{object of type MCR}
}
\value{
RSS from object
}
\description{
MCR accessor RSS,
}
|
#' Calculate the fetch length around a point
#'
#' Given a point, a shoreline layer and a vector of wind directions (bearings),
#' \code{fetch_len} calculates the distance from point to shore for each bearing.
#'
#' The fetch length (or fetch) is the distance of open water over which the wind
#' can blow in a specific... | /R/fetch_len.R | no_license | pmarchand1/waver | R | false | false | 13,711 | r |
#' Calculate the fetch length around a point
#'
#' Given a point, a shoreline layer and a vector of wind directions (bearings),
#' \code{fetch_len} calculates the distance from point to shore for each bearing.
#'
#' The fetch length (or fetch) is the distance of open water over which the wind
#' can blow in a specific... |
Portugal <-
read.csv("portugal_data.csv", header = TRUE, sep = ";")
regpred <- read.csv("Reg_p_whole.csv", header = TRUE, sep = ";")
plot(Portugal[1:59,2], Portugal[1:59,3], type = "l", col = "blue", xlim = c(0, 100), ylim = c(800,2700),
xlab = "Days", ylab = "Number of orders", main = "Forecasting by Reg... | /Forecast_Graphs_Umut_Yilmaz.R | no_license | uyilmaz16/Time_Series_Forecast_Food_Delivery_App | R | false | false | 1,392 | r | Portugal <-
read.csv("portugal_data.csv", header = TRUE, sep = ";")
regpred <- read.csv("Reg_p_whole.csv", header = TRUE, sep = ";")
plot(Portugal[1:59,2], Portugal[1:59,3], type = "l", col = "blue", xlim = c(0, 100), ylim = c(800,2700),
xlab = "Days", ylab = "Number of orders", main = "Forecasting by Reg... |
library(VLF)
### Name: overall.matched
### Title: Final Matching
### Aliases: overall.matched
### ** Examples
## Not run:
##D #Nucleotide VLF analysis
##D data(birds)
##D species.names <- birds[,2]
##D specimen.Number <- nrow(birds)
##D rownames(birds) <- species.names
##D Nuc.count <- count.function(birds, specim... | /data/genthat_extracted_code/VLF/examples/overall.matched.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,239 | r | library(VLF)
### Name: overall.matched
### Title: Final Matching
### Aliases: overall.matched
### ** Examples
## Not run:
##D #Nucleotide VLF analysis
##D data(birds)
##D species.names <- birds[,2]
##D specimen.Number <- nrow(birds)
##D rownames(birds) <- species.names
##D Nuc.count <- count.function(birds, specim... |
################################################################################
context("test-nlines.R")
################################################################################
test_that("'nlines' works", {
SEQ <- seq_len(nrow(iris))
strings <- c("", "", " ", sapply(10^(seq(0, 4, by = 0.2)), function(i... | /tests/testthat/test-nlines.R | no_license | Kat-Jump/bigreadr | R | false | false | 611 | r | ################################################################################
context("test-nlines.R")
################################################################################
test_that("'nlines' works", {
SEQ <- seq_len(nrow(iris))
strings <- c("", "", " ", sapply(10^(seq(0, 4, by = 0.2)), function(i... |
path <- getwd()
nrows <- -1
getdata <- function(set) {
# subject
subject <- read.table(file = file.path(path, set, paste0("subject_", set, ".txt")), nrows = nrows)
# activity
y <- read.table(file = file.path(path, set, paste0("y_",set,".txt")), nrows = nrows)
act <- read.table(file = file.path(path, "activ... | /run_analysis.R | no_license | vladi81/Data-Science-Specialization | R | false | false | 1,268 | r | path <- getwd()
nrows <- -1
getdata <- function(set) {
# subject
subject <- read.table(file = file.path(path, set, paste0("subject_", set, ".txt")), nrows = nrows)
# activity
y <- read.table(file = file.path(path, set, paste0("y_",set,".txt")), nrows = nrows)
act <- read.table(file = file.path(path, "activ... |
## Tune number of particles to get Var(log likelihood) roughly equal to 1.5
library(pomp)
# Data (as in Lorenz_data.npy)
yobs = c(-13.55, -16.19, 30.77,
1.51, -3.54, 14.27,
-18.93, -21.09, 32.1,
10.09, 9.88, 31.29,
5.31, 6.76, 19.93)
yobs = matrix(yobs, ncol=3, byrow=TRU... | /pmcmc/loglike_tuning.R | permissive | WN1695173791/DistillingImportanceSampling | R | false | false | 3,208 | r | ## Tune number of particles to get Var(log likelihood) roughly equal to 1.5
library(pomp)
# Data (as in Lorenz_data.npy)
yobs = c(-13.55, -16.19, 30.77,
1.51, -3.54, 14.27,
-18.93, -21.09, 32.1,
10.09, 9.88, 31.29,
5.31, 6.76, 19.93)
yobs = matrix(yobs, ncol=3, byrow=TRU... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ArMag.R
\name{read.Pal.info}
\alias{read.Pal.info}
\title{Lecture des infos sur mesures d'un fichier AM}
\usage{
read.Pal.info(file.Pal, encoding = "macroman")
}
\value{
une data.frame avec les infos sur les spécimens
}
\description{
Lecture ... | /man/read.Pal.info.Rd | no_license | chrono35/ArMag | R | false | true | 361 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ArMag.R
\name{read.Pal.info}
\alias{read.Pal.info}
\title{Lecture des infos sur mesures d'un fichier AM}
\usage{
read.Pal.info(file.Pal, encoding = "macroman")
}
\value{
une data.frame avec les infos sur les spécimens
}
\description{
Lecture ... |
library(shiny)
library(corrplot)
shinyServer(function(input, output,session) {
selectedData <- reactive({
project[, c(input$xcol, input$ycol)]
})
output$plot1 <- renderPlot({
plot(selectedData(),col=brewer.pal(n='8',name = "Paired"))
})
output$correlation<-renderPrint({
cor(project[input$xcol],pro... | /code for server.R | no_license | pavanthota123/correlation-plot- | R | false | false | 615 | r | library(shiny)
library(corrplot)
shinyServer(function(input, output,session) {
selectedData <- reactive({
project[, c(input$xcol, input$ycol)]
})
output$plot1 <- renderPlot({
plot(selectedData(),col=brewer.pal(n='8',name = "Paired"))
})
output$correlation<-renderPrint({
cor(project[input$xcol],pro... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/gmql_extend.R
\docType{methods}
\name{extend}
\alias{extend}
\alias{extend,GMQLDataset-method}
\alias{extend-method}
\title{Method extend}
\usage{
extend(.data, ...)
\S4method{extend}{GMQLDataset}(.data, ...)
}
\arguments{
\... | /man/extend.Rd | no_license | Pall8aSim1/RGMQL | R | false | true | 2,529 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/gmql_extend.R
\docType{methods}
\name{extend}
\alias{extend}
\alias{extend,GMQLDataset-method}
\alias{extend-method}
\title{Method extend}
\usage{
extend(.data, ...)
\S4method{extend}{GMQLDataset}(.data, ...)
}
\arguments{
\... |
context("callback")
test_that("Callback inputs must be well-defined", {
app <- Dash$new()
app$layout_set(
coreSlider(id = "x"),
htmlDiv(id = "y")
)
expect_warning(
app$callback(
function(x = input("x")) x,
output("y", "nonsense")
),
"'nonsense' is not a valid property for the... | /tests/testthat/test-callback.R | permissive | Akayeshmantha/dashR | R | false | false | 941 | r | context("callback")
test_that("Callback inputs must be well-defined", {
app <- Dash$new()
app$layout_set(
coreSlider(id = "x"),
htmlDiv(id = "y")
)
expect_warning(
app$callback(
function(x = input("x")) x,
output("y", "nonsense")
),
"'nonsense' is not a valid property for the... |
library(RJSONIO)
data<-read.csv('student.csv')
## clean data
data$low<-ifelse(data$GPA<2.5,2,1)
data$med<-ifelse(data$GPA<3.5&data[,1]>=2.5,2,1)
data$high<-ifelse(data$GPA>=3.5,2,1)
data<-data[,-1]
data$FakeID<-as.numeric(data$FakeID)
data$ChtdSO<-as.numeric(data$ChtdSO)
data$SmokeCig<-as.numeric(data$SmokeCig)
data$S... | /directed_graph/force.R | no_license | ilanman/d3_projects | R | false | false | 2,721 | r | library(RJSONIO)
data<-read.csv('student.csv')
## clean data
data$low<-ifelse(data$GPA<2.5,2,1)
data$med<-ifelse(data$GPA<3.5&data[,1]>=2.5,2,1)
data$high<-ifelse(data$GPA>=3.5,2,1)
data<-data[,-1]
data$FakeID<-as.numeric(data$FakeID)
data$ChtdSO<-as.numeric(data$ChtdSO)
data$SmokeCig<-as.numeric(data$SmokeCig)
data$S... |
#' This function estimates a multiplicative mixed-frequency GARCH model. For the sake of numerical stability, it is best to multiply log returns by 100.
#' @param data data frame containing a column named date of type 'Date'.
#' @param y name of high frequency dependent variable in df.
#' @param x covariate employed in... | /mfGARCH/R/fit_mfgarch.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 40,402 | r | #' This function estimates a multiplicative mixed-frequency GARCH model. For the sake of numerical stability, it is best to multiply log returns by 100.
#' @param data data frame containing a column named date of type 'Date'.
#' @param y name of high frequency dependent variable in df.
#' @param x covariate employed in... |
library(testthat)
library(parsnip)
# ------------------------------------------------------------------------------
context("boosted tree execution with xgboost")
source(test_path("helper-objects.R"))
hpc <- hpc_data[1:150, c(2:5, 8)]
num_pred <- names(hpc)[1:4]
hpc_xgboost <-
boost_tree(trees = 2, mode = "classi... | /tests/testthat/test_boost_tree_xgboost.R | no_license | jas0nwhite/parsnip | R | false | false | 9,789 | r | library(testthat)
library(parsnip)
# ------------------------------------------------------------------------------
context("boosted tree execution with xgboost")
source(test_path("helper-objects.R"))
hpc <- hpc_data[1:150, c(2:5, 8)]
num_pred <- names(hpc)[1:4]
hpc_xgboost <-
boost_tree(trees = 2, mode = "classi... |
Problem7.15 <- data.frame(
"Block" = c(
'Block 2',
'Block 1',
'Block 1',
'Block 2',
'Block 1',
'Block 2',
'Block 2',
'Block 1',
'Block 1',
'Block 2',
'Block 2',
'Block 1',
'Block 2',
'Block 1',
'Block 1',
'Block 2'
),
"AcidStrength" = c(
87,
93,
87,
93,
87,
93,
87,
93,... | /data/Problem7.15.R | no_license | ehassler/MontgomeryDAE | R | false | false | 884 | r | Problem7.15 <- data.frame(
"Block" = c(
'Block 2',
'Block 1',
'Block 1',
'Block 2',
'Block 1',
'Block 2',
'Block 2',
'Block 1',
'Block 1',
'Block 2',
'Block 2',
'Block 1',
'Block 2',
'Block 1',
'Block 1',
'Block 2'
),
"AcidStrength" = c(
87,
93,
87,
93,
87,
93,
87,
93,... |
library(readr)
gtex=read_tsv("/proj/milovelab/mccabe/proj/GTEx/data/gtex.txt")
cn=colnames(gtex)
write.table(cn,"/proj/milovelab/mccabe/proj/GTEx/data/colNames.txt",quote=F,row.names=F)
| /code/referencePanel/getColNames.R | no_license | mccabes292/actorPaper | R | false | false | 186 | r | library(readr)
gtex=read_tsv("/proj/milovelab/mccabe/proj/GTEx/data/gtex.txt")
cn=colnames(gtex)
write.table(cn,"/proj/milovelab/mccabe/proj/GTEx/data/colNames.txt",quote=F,row.names=F)
|
############################################################
# Combine individual human and autrmated sentiment codings
# of 1,500 random sentences from plenary Bundestag speeches
#
# Project: Validation of sentiment dictionaries
#
# Author: christian.rauh@wzb.eu / christian-rauh.eu
# Date: 06.08.2015
############... | /Dictionary/Rauh/JITP-Replication-Final/2_Bundestag/4_MergeHumanCodes.R | no_license | msaeltzer/scrape | R | false | false | 1,053 | r | ############################################################
# Combine individual human and autrmated sentiment codings
# of 1,500 random sentences from plenary Bundestag speeches
#
# Project: Validation of sentiment dictionaries
#
# Author: christian.rauh@wzb.eu / christian-rauh.eu
# Date: 06.08.2015
############... |
## builds strongly off of 'mapplots' package, but now incorporates more general worldwide mapping abilities by combining with existing mapdata
library(maps)
library(mapdata)
library(maptools)
library(mapplots)
library(scales)
#dummy data
#my field data, smaller geographic area
dat1 <- read.csv("~/Documents/My_Docu... | /WorkingCode.R | no_license | kjgilbert/geostRuct | R | false | false | 4,765 | r | ## builds strongly off of 'mapplots' package, but now incorporates more general worldwide mapping abilities by combining with existing mapdata
library(maps)
library(mapdata)
library(maptools)
library(mapplots)
library(scales)
#dummy data
#my field data, smaller geographic area
dat1 <- read.csv("~/Documents/My_Docu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cnSignature.R
\name{summarizeSignatures}
\alias{summarizeSignatures}
\title{cnSignature: Summarizes the CN signature list}
\usage{
summarizeSignatures(sig, ids = NULL, decompose = TRUE,
sig.metric.values = c("mean", "sd", "skew", "kurtosis"... | /PLTK/man/summarizeSignatures.Rd | no_license | pughlab/PLTK | R | false | true | 715 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cnSignature.R
\name{summarizeSignatures}
\alias{summarizeSignatures}
\title{cnSignature: Summarizes the CN signature list}
\usage{
summarizeSignatures(sig, ids = NULL, decompose = TRUE,
sig.metric.values = c("mean", "sd", "skew", "kurtosis"... |
library('dplyr')
library('tidyr')
library('ggplot2')
plot_out_dir = "C:/Users/Cob/index/educational/usask/research/masters/graphics/thesis_graphics/validation/ray_sampling_validation/"
p_width = 8 # inches
p_height = 5.7 # inches
dpi = 100
photos_lai_in = "C:/Users/Cob/index/educational/usask/research/masters/dat... | /r/optimization/lrs_hemi_optimization.r | no_license | jstaines/upper-clearing-lidar | R | false | false | 21,327 | r |
library('dplyr')
library('tidyr')
library('ggplot2')
plot_out_dir = "C:/Users/Cob/index/educational/usask/research/masters/graphics/thesis_graphics/validation/ray_sampling_validation/"
p_width = 8 # inches
p_height = 5.7 # inches
dpi = 100
photos_lai_in = "C:/Users/Cob/index/educational/usask/research/masters/dat... |
data <- read.table("new_zeta_nodupes.csv", sep=",", header=TRUE)
data$X <- NULL
data$log_income <- log10(data$meanhouseholdincome)
library(plotly)
plot_ly(data, x = ~age, y = ~education, z = ~employment, color=~education, colors = c('#4AC6B7', '#1972A4', '#965F8A', '#FF7070', '#C61951'))
y <- data$log_income
#Creat... | /Lab06.R | no_license | cptAngo/Big_Data_SBT | R | false | false | 1,396 | r | data <- read.table("new_zeta_nodupes.csv", sep=",", header=TRUE)
data$X <- NULL
data$log_income <- log10(data$meanhouseholdincome)
library(plotly)
plot_ly(data, x = ~age, y = ~education, z = ~employment, color=~education, colors = c('#4AC6B7', '#1972A4', '#965F8A', '#FF7070', '#C61951'))
y <- data$log_income
#Creat... |
################################################
# Interactive network viz from bibtex file
# Author: Damien Jacques
# Last update: November 29, 2018
################################################
library(bib2df)
library(igraph)
library(networkD3)
# Load bibliography
bib <- bib2df("/path/Biblio")
# Correct author ... | /ResearchNetworkViz.R | permissive | damienjacques/ResearchNetwork | R | false | false | 1,742 | r | ################################################
# Interactive network viz from bibtex file
# Author: Damien Jacques
# Last update: November 29, 2018
################################################
library(bib2df)
library(igraph)
library(networkD3)
# Load bibliography
bib <- bib2df("/path/Biblio")
# Correct author ... |
########################################################################################################################"
# #
# Tables and figures of the posterior distributions in the Supp... | /scripts_DRYAD/13_CreateTablesFiguresPosteriorDistributions.R | no_license | JulietteArchambeau/HeightPinpinClonapin | R | false | false | 93,717 | r | ########################################################################################################################"
# #
# Tables and figures of the posterior distributions in the Supp... |
#
# name: Erin Mowers
# assignment: Chapter 6
# date: 12/4/09
# filename: Mowers_Ch6_Exercise
#############################################################################
#/--#########################################################################
# name: Erin Mowers
# assignment: Chapter 6
# date: 12/04/09
#... | /homework/emowers/mowers.ch6.exercise.ver3.R | no_license | rosenbergdm/dynamicsystemslabs | R | false | false | 10,844 | r | #
# name: Erin Mowers
# assignment: Chapter 6
# date: 12/4/09
# filename: Mowers_Ch6_Exercise
#############################################################################
#/--#########################################################################
# name: Erin Mowers
# assignment: Chapter 6
# date: 12/04/09
#... |
# Author: Robert J. Hijmans
# Date : December 2011
# Version 1.0
# Licence GPL v3
setMethod('cover', signature(x='SpatialPolygons', y='SpatialPolygons'),
function(x, y, ..., identity=FALSE){
# warning("this method will be removed. You can use 'terra::cover<SpatVector,SpatVector>' instead")
# valgeos... | /R/coverPolygons.R | no_license | cran/raster | R | false | false | 3,142 | r | # Author: Robert J. Hijmans
# Date : December 2011
# Version 1.0
# Licence GPL v3
setMethod('cover', signature(x='SpatialPolygons', y='SpatialPolygons'),
function(x, y, ..., identity=FALSE){
# warning("this method will be removed. You can use 'terra::cover<SpatVector,SpatVector>' instead")
# valgeos... |
## "INFOF422 Statistical foundations of machine learning" course
## R package gbcode
## Author: G. Bontempi
#### plotStu ####
#' Plot Student distribution
#' @author Gianluca Bontempi \email{gbonte@@ulb.ac.be}
#' @references \url{mlg.ulb.ac.be}
#' @title Plot the Student density and cumulative distribution
#'
plotS... | /inst/scripts/Probability/plotStu.R | no_license | gbonte/gbcode | R | false | false | 533 | r | ## "INFOF422 Statistical foundations of machine learning" course
## R package gbcode
## Author: G. Bontempi
#### plotStu ####
#' Plot Student distribution
#' @author Gianluca Bontempi \email{gbonte@@ulb.ac.be}
#' @references \url{mlg.ulb.ac.be}
#' @title Plot the Student density and cumulative distribution
#'
plotS... |
#' Sort Inequalities by Acceptance Rate
#'
#' Uses samples from the prior/posterior to order the inequalities by the acceptance rate.
#'
#' @inheritParams inside
#' @param k optional: number of observed frequencies (only for posterior sampling).
#' @param options optional: number of options per item type/category... | /multinomineq/R/sort_inequalities.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 3,767 | r | #' Sort Inequalities by Acceptance Rate
#'
#' Uses samples from the prior/posterior to order the inequalities by the acceptance rate.
#'
#' @inheritParams inside
#' @param k optional: number of observed frequencies (only for posterior sampling).
#' @param options optional: number of options per item type/category... |
multistepARIMA <- function(order, coefficients, external_regressor){
exit <- function() {
.Internal(.invokeRestart(list(NULL, NULL), NULL))
}
step1 <- function(ts, step1res){
######## If mean is not zero
if (mean(ts, na.rm = T) > tol){
ts <- ts - mean(ts, na.rm = TRUE)
}
X <-... | /Code/Coefficient_optimization/neldermead_optimization/Multi_step_predictions/Test/test.R | no_license | arijoh/DataDrivenForecastModels | R | false | false | 8,973 | r |
multistepARIMA <- function(order, coefficients, external_regressor){
exit <- function() {
.Internal(.invokeRestart(list(NULL, NULL), NULL))
}
step1 <- function(ts, step1res){
######## If mean is not zero
if (mean(ts, na.rm = T) > tol){
ts <- ts - mean(ts, na.rm = TRUE)
}
X <-... |
#!/usr/bin/env Rscript
#setwd('~/Documents/REU /Github Repo/General Solver')
names = c("VanDerPol","Flame","Pendulum")
length(names)
for(i in 1:length(names)){
fileName = paste(names[i],"AllTests.dat",sep = "")
outputName = paste("4_",names[i],"Plots.png",sep = "")
DataFlame <- read.csv(fileName, header = ... | /General Solver/Plots.R | permissive | KevinRojas1499-zz/jmu-reu-ode | R | false | false | 1,459 | r | #!/usr/bin/env Rscript
#setwd('~/Documents/REU /Github Repo/General Solver')
names = c("VanDerPol","Flame","Pendulum")
length(names)
for(i in 1:length(names)){
fileName = paste(names[i],"AllTests.dat",sep = "")
outputName = paste("4_",names[i],"Plots.png",sep = "")
DataFlame <- read.csv(fileName, header = ... |
#data <- as.matrix(read.table("redirectsData",header=TRUE, sep=","))
data <- read.table("textwords",header=FALSE,sep=",")
barplot(as.matrix(data), main="Text Words", beside=TRUE,col="blue",ylab="Word Frequency",xlab="Word Rank")
| /a3/documentation/text.R | permissive | jmcco018/cs851-s15 | R | false | false | 229 | r | #data <- as.matrix(read.table("redirectsData",header=TRUE, sep=","))
data <- read.table("textwords",header=FALSE,sep=",")
barplot(as.matrix(data), main="Text Words", beside=TRUE,col="blue",ylab="Word Frequency",xlab="Word Rank")
|
\name{inventdummy}
\alias{invent.mxn}
\title{Functions to dummy datasets}
\description{
Functions to dummy data.
}
\usage{
invent.mxn(m,n=5,d=1,p,f2="random")
}
\arguments{
\item{m}{number of groups or samples}
\item{n}{number of observations in each sample}
\item{d}{digits for rounding the result}
\item{p}{me... | /man/invent.functions.Rd | no_license | cran/seeg | R | false | false | 1,738 | rd | \name{inventdummy}
\alias{invent.mxn}
\title{Functions to dummy datasets}
\description{
Functions to dummy data.
}
\usage{
invent.mxn(m,n=5,d=1,p,f2="random")
}
\arguments{
\item{m}{number of groups or samples}
\item{n}{number of observations in each sample}
\item{d}{digits for rounding the result}
\item{p}{me... |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /mepstrends/hc_use/json/code/r/pctEXP__agegrps__race__.r | permissive | RandomCriticalAnalysis/MEPS-summary-tables | R | false | false | 2,893 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
### grab TROPOMI SIF downscaled by Alex Turner,
# written by DW, 10/24/2019
# based on Alex's latest SIF file, need to convert SIF from vectors to grids
# return a data.frame
# 02/04/2020, DW, calculate the mean SIF of multiple TSIF files if nhrs != NULL
grab.tsif <- function(tsif.path, timestr, minlon, maxlon, m... | /r/src/extract_load_data/grab.tsif.r | no_license | sabrinamadsen/SMUrF-1 | R | false | false | 4,051 | r | ### grab TROPOMI SIF downscaled by Alex Turner,
# written by DW, 10/24/2019
# based on Alex's latest SIF file, need to convert SIF from vectors to grids
# return a data.frame
# 02/04/2020, DW, calculate the mean SIF of multiple TSIF files if nhrs != NULL
grab.tsif <- function(tsif.path, timestr, minlon, maxlon, m... |
library(glmnet)
library(doParallel)
#=========================================================================================
# 1. https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html#lin (Official)
#=========================================================================================
###1. Linear Regression
... | /R_machine_learning/glmnet_demo.R | permissive | HouyuZhang/Learn_R | R | false | false | 4,054 | r | library(glmnet)
library(doParallel)
#=========================================================================================
# 1. https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html#lin (Official)
#=========================================================================================
###1. Linear Regression
... |
library(SpatialVx)
### Name: upscale2d
### Title: Upscaling Neighborhood Verification on a 2-d Verification Set
### Aliases: upscale2d plot.upscale2d print.upscale2d
### Keywords: math
### ** Examples
x <- matrix( 0, 50, 50)
x[ sample(1:50,10), sample(1:50,10)] <- rexp( 100, 0.25)
y <- kernel2dsmooth( x, kernel.typ... | /data/genthat_extracted_code/SpatialVx/examples/upscale2d.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,258 | r | library(SpatialVx)
### Name: upscale2d
### Title: Upscaling Neighborhood Verification on a 2-d Verification Set
### Aliases: upscale2d plot.upscale2d print.upscale2d
### Keywords: math
### ** Examples
x <- matrix( 0, 50, 50)
x[ sample(1:50,10), sample(1:50,10)] <- rexp( 100, 0.25)
y <- kernel2dsmooth( x, kernel.typ... |
# Prepare MEE data for the example_LG1 algo
#
#
#
require(FinDataWeb)
require(RQuantLib)
require(xts)
load("H:/Temporary/Data/IB/MEE.RData")
load("H:/Temporary/Data/IB/MEEGD.RData")
hdata <- xts(cbind(MEE, MEEGD))
# get the implied vol, so I can calculate delta
din <- data.frame(type="CALL", price=as.... | /R/finance/algotrader/tests/prepare_LG1_data.R | no_license | thumbert/rascal | R | false | false | 1,204 | r | # Prepare MEE data for the example_LG1 algo
#
#
#
require(FinDataWeb)
require(RQuantLib)
require(xts)
load("H:/Temporary/Data/IB/MEE.RData")
load("H:/Temporary/Data/IB/MEEGD.RData")
hdata <- xts(cbind(MEE, MEEGD))
# get the implied vol, so I can calculate delta
din <- data.frame(type="CALL", price=as.... |
#NOTE remember to use stable ordering everywhere
CHURNRATE.PERIOD <- 28
FILTERING.SCRIPT <- "churnrate_filter.pl"
FILTERED.FILENAME <- "attempts_filtered.txt"
FILTERED.TEMP.FILENAME <- "attempts_filtered_temp.txt"
attempts <- read.csv("attempts.txt")
users <- unique(sort(attempts$user))
##users.total <- length(users)... | /churnrate_test.R | no_license | bioinf/edm | R | false | false | 2,911 | r | #NOTE remember to use stable ordering everywhere
CHURNRATE.PERIOD <- 28
FILTERING.SCRIPT <- "churnrate_filter.pl"
FILTERED.FILENAME <- "attempts_filtered.txt"
FILTERED.TEMP.FILENAME <- "attempts_filtered_temp.txt"
attempts <- read.csv("attempts.txt")
users <- unique(sort(attempts$user))
##users.total <- length(users)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/biummisc.R
\docType{package}
\name{BIUMmisc}
\alias{BIUMmisc}
\alias{BIUMmisc-package}
\title{BIUMmisc}
\description{
This is a collection of functions and scripts commonly used by the
BIUM-MZ Core Facility
}
\author{
Federico Marini
}
| /man/BIUMmisc.Rd | permissive | imbeimainz/BIUMmisc | R | false | true | 314 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/biummisc.R
\docType{package}
\name{BIUMmisc}
\alias{BIUMmisc}
\alias{BIUMmisc-package}
\title{BIUMmisc}
\description{
This is a collection of functions and scripts commonly used by the
BIUM-MZ Core Facility
}
\author{
Federico Marini
}
|
test_that("prelims_finals works", {
file <-
system.file("extdata", "BigTen_WSWIM_2018.pdf", package = "SwimmeR")
BigTenRaw <- read_results(file)
BigTen <- swim_parse(
BigTenRaw,
typo = c(
# "^\\s{1,}\\*",
# "^\\s{1,}(\\d{1,2})\\s{2,}",
# not sure if needed
",\\s{1,}University\... | /tests/testthat/test-results_score.R | no_license | hareshsuppiah/SwimmeR-1 | R | false | false | 2,340 | r | test_that("prelims_finals works", {
file <-
system.file("extdata", "BigTen_WSWIM_2018.pdf", package = "SwimmeR")
BigTenRaw <- read_results(file)
BigTen <- swim_parse(
BigTenRaw,
typo = c(
# "^\\s{1,}\\*",
# "^\\s{1,}(\\d{1,2})\\s{2,}",
# not sure if needed
",\\s{1,}University\... |
#' Applies rrollup function
#'
#' This function applies the rrollup method to a pepData object for each unique protein and returns a proData object.
#'
#' @param pepData an omicsData object of class 'pepData'
#' @param combine_fn logical indicating what combine_fn to use, defaults to median, other option is mean
#'... | /R/rrollup.R | permissive | rarichardson92/pmartR | R | false | false | 10,112 | r | #' Applies rrollup function
#'
#' This function applies the rrollup method to a pepData object for each unique protein and returns a proData object.
#'
#' @param pepData an omicsData object of class 'pepData'
#' @param combine_fn logical indicating what combine_fn to use, defaults to median, other option is mean
#'... |
testlist <- list(Beta = 0, CAL = numeric(0), CVLinf = 0, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), nage = 0L, nlen = 0L, pars = c(3.97874210805989e-313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... | /DLMtool/inst/testfiles/LBSPRopt/AFL_LBSPRopt/LBSPRopt_valgrind_files/1615837966-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 406 | r | testlist <- list(Beta = 0, CAL = numeric(0), CVLinf = 0, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), nage = 0L, nlen = 0L, pars = c(3.97874210805989e-313, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... |
`stepacross` <-
function (dis, path = "shortest", toolong = 1, trace = TRUE, ...)
{
path <- match.arg(path, c("shortest", "extended"))
if (!inherits(dis, "dist"))
dis <- as.dist(dis)
oldatt <- attributes(dis)
n <- attr(dis, "Size")
if (path == "shortest")
dis <- .C(dykstrapath, d... | /R/stepacross.R | no_license | psolymos/vegan | R | false | false | 725 | r | `stepacross` <-
function (dis, path = "shortest", toolong = 1, trace = TRUE, ...)
{
path <- match.arg(path, c("shortest", "extended"))
if (!inherits(dis, "dist"))
dis <- as.dist(dis)
oldatt <- attributes(dis)
n <- attr(dis, "Size")
if (path == "shortest")
dis <- .C(dykstrapath, d... |
# Calculo de Promedio de Grupos para salida de RNA
# retorna una vector con los promedio de los grupos de 100 iteraciones
prom_clases<-function(y,target)
{
yc<-y-matrix(rep(colMeans(y),nrow(y)),ncol=ncol(y),byrow=TRUE)
salida<-as.matrix(yc)%*%carga
return(salida)
} | /src/AppBundle/R/calculo promedio grupos kmeans.r | permissive | armandojg12/sistemaPrediccion | R | false | false | 265 | r | # Calculo de Promedio de Grupos para salida de RNA
# retorna una vector con los promedio de los grupos de 100 iteraciones
prom_clases<-function(y,target)
{
yc<-y-matrix(rep(colMeans(y),nrow(y)),ncol=ncol(y),byrow=TRUE)
salida<-as.matrix(yc)%*%carga
return(salida)
} |
rm(list = ls())
# install.packages("readxl", dependencies = T)
library(readxl)
## Set working directory
# getwd() set to the project file
setwd(paste(getwd(), "/Inference/EmployeeRetention", sep = ""))
## Import data and create binary classes for target variables
data <- read_excel("../DataRepo.xlsx", "EmployeeReten... | /Inference/EmployeeRetention/genderYearsPLE.R | no_license | yalotfi/Inference-and-Regression | R | false | false | 1,197 | r | rm(list = ls())
# install.packages("readxl", dependencies = T)
library(readxl)
## Set working directory
# getwd() set to the project file
setwd(paste(getwd(), "/Inference/EmployeeRetention", sep = ""))
## Import data and create binary classes for target variables
data <- read_excel("../DataRepo.xlsx", "EmployeeReten... |
library(shiny)
library(shiny)
library(dplyr)
library(ggplot2)
library(ROCR)
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
utility <- reactive ({
# loop across thresholds and create utility curve
out.list <- list()
for(i in 1:length(dummy$temp)){
x <- c()
y... | /thresholdUtilityApp/server.R | no_license | zmwm37/dataVizPractice | R | false | false | 1,475 | r | library(shiny)
library(shiny)
library(dplyr)
library(ggplot2)
library(ROCR)
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
utility <- reactive ({
# loop across thresholds and create utility curve
out.list <- list()
for(i in 1:length(dummy$temp)){
x <- c()
y... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/SSMethod.Cond.TA1.8.R
\name{SSMethod.Cond.TA1.8}
\alias{SSMethod.Cond.TA1.8}
\title{Apply Francis composition weighting method TA1.8 for conditional age-at-length fits}
\usage{
SSMethod.Cond.TA1.8(fit, fleet, part = 0:2, seas = NULL, ... | /man/SSMethod.Cond.TA1.8.Rd | no_license | tennma/r4ss | R | false | false | 3,317 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/SSMethod.Cond.TA1.8.R
\name{SSMethod.Cond.TA1.8}
\alias{SSMethod.Cond.TA1.8}
\title{Apply Francis composition weighting method TA1.8 for conditional age-at-length fits}
\usage{
SSMethod.Cond.TA1.8(fit, fleet, part = 0:2, seas = NULL, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/file_managment.R
\name{activeteam2dcf}
\alias{activeteam2dcf}
\title{Create slackr dcf file}
\usage{
activeteam2dcf(file = "~/.slackr", verbose = TRUE)
}
\arguments{
\item{file}{character, path to write the dcf file to, Default: '~/.slackr'}
... | /man/activeteam2dcf.Rd | permissive | kabhatia7/slackteams | R | false | true | 574 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/file_managment.R
\name{activeteam2dcf}
\alias{activeteam2dcf}
\title{Create slackr dcf file}
\usage{
activeteam2dcf(file = "~/.slackr", verbose = TRUE)
}
\arguments{
\item{file}{character, path to write the dcf file to, Default: '~/.slackr'}
... |
## load data
trainData <- read.csv('../data/eBayiPadTrain.csv', stringsAsFactors=FALSE)
testData <- read.csv('../data/eBayiPadTest.csv', stringsAsFactors=FALSE)
trainData$sold <- as.factor(trainData$sold)
data <- rbind(c(trainData$description, testData$description))
###
library(tm)
library(SnowballC)
# Create corpu... | /src/language-model.R | permissive | poletaev/kaggle-15-071x-the-analytics-edge-summer-2015 | R | false | false | 5,080 | r | ## load data
trainData <- read.csv('../data/eBayiPadTrain.csv', stringsAsFactors=FALSE)
testData <- read.csv('../data/eBayiPadTest.csv', stringsAsFactors=FALSE)
trainData$sold <- as.factor(trainData$sold)
data <- rbind(c(trainData$description, testData$description))
###
library(tm)
library(SnowballC)
# Create corpu... |
\name{wd.macat}
\alias{wd.macat}
\title{Internal anRpackage objects}
\description{Internal anRpackage objects.}
\details{These are not to be called by the user.}
\keyword{internal} | /man/wd.macat.rd | no_license | acdelre/MAd | R | false | false | 180 | rd | \name{wd.macat}
\alias{wd.macat}
\title{Internal anRpackage objects}
\description{Internal anRpackage objects.}
\details{These are not to be called by the user.}
\keyword{internal} |
#
setClass("student", slots=list(name="character", age="numeric", GPA="numeric"))
#
s <- new("student",name="John", age=21, GPA=3.5)
s
#
isS4(s)
#
s@name
s@GPA
s@age
# modify GPA
s@GPA <- 3.7
s
#
slot(s,"name")
#
slot(s,"name") <- "Paul"
s | /S4-Class-Creation-Modification.R | no_license | ankit-mishra/R-Step-by-Step | R | false | false | 273 | r | #
setClass("student", slots=list(name="character", age="numeric", GPA="numeric"))
#
s <- new("student",name="John", age=21, GPA=3.5)
s
#
isS4(s)
#
s@name
s@GPA
s@age
# modify GPA
s@GPA <- 3.7
s
#
slot(s,"name")
#
slot(s,"name") <- "Paul"
s |
as_group_map_function <- function(.f) {
.f <- rlang::as_function(.f)
if (length(form <- formals(.f)) < 2 && ! "..." %in% names(form)){
stop("The function must accept at least two arguments. You can use ... to absorb unused components")
}
.f
}
#' Apply a function to each group
#'
#' \Sexpr[results=rd, stag... | /R/group_map.R | permissive | davan690/dplyr | R | false | false | 5,437 | r |
as_group_map_function <- function(.f) {
.f <- rlang::as_function(.f)
if (length(form <- formals(.f)) < 2 && ! "..." %in% names(form)){
stop("The function must accept at least two arguments. You can use ... to absorb unused components")
}
.f
}
#' Apply a function to each group
#'
#' \Sexpr[results=rd, stag... |
# Linear model for row by col effect only using controls in row B
interaction_data$arow <- as.factor(c(rep(1,6),rep(2,6),rep(3,6),rep(4,6),rep(5,6),rep(6,6),rep(7,6)))
#with interaction
lin_mod1 <- lm(tinv ~ trt + arow + acol+arow:acol, data = interaction_data)
results1 <- anova(lin_mod1)
results1
#without interact... | /Code/Linear model row b controls.R | no_license | MichaelEBurton/ST542_Consulting | R | false | false | 427 | r | # Linear model for row by col effect only using controls in row B
interaction_data$arow <- as.factor(c(rep(1,6),rep(2,6),rep(3,6),rep(4,6),rep(5,6),rep(6,6),rep(7,6)))
#with interaction
lin_mod1 <- lm(tinv ~ trt + arow + acol+arow:acol, data = interaction_data)
results1 <- anova(lin_mod1)
results1
#without interact... |
# language.R
# Execute REDCap calculations in R.
#
# Copyright (c) 2021, Michael Pascale.
TOKENS <- c('NAME', 'FUNCTION', 'NUMBER', 'STRING', 'LTEQ', 'GTEQ', 'NEQ')
LITERALS <- c('=','+','-','*','/','^','%',',','<','>','(',')','[',']')
IGNORE <- '\t '
RECORDS <- list(
'studyid'='POTS_123',
'age'=32
)
source(... | /language.R | permissive | MichaelPascale/redcap-equation-r | R | false | false | 471 | r | # language.R
# Execute REDCap calculations in R.
#
# Copyright (c) 2021, Michael Pascale.
TOKENS <- c('NAME', 'FUNCTION', 'NUMBER', 'STRING', 'LTEQ', 'GTEQ', 'NEQ')
LITERALS <- c('=','+','-','*','/','^','%',',','<','>','(',')','[',']')
IGNORE <- '\t '
RECORDS <- list(
'studyid'='POTS_123',
'age'=32
)
source(... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53817576101076e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613115207-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 251 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53817576101076e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
## Generate GUIDE .dsc for each partition
generate_guide_description_file <- function(num_partition, num_of_folds, rand_seed) {
j <- 1:num_of_folds
i <- 1:num_partition
iandj <- expand.grid(i = i, j = j)
mclapply(1:nrow(iandj), function(iter) {
i <- iandj[iter, ]$i
j <- iandj[iter, ]$j
## Generate ... | /20_GUIDE_generate_GUIDE_files.R | no_license | mythicalprogrammer/thesis_prostate_cancer_CERP_GUIDE_no_prune_CERP_ensemble_of_forests | R | false | false | 1,621 | r | ## Generate GUIDE .dsc for each partition
generate_guide_description_file <- function(num_partition, num_of_folds, rand_seed) {
j <- 1:num_of_folds
i <- 1:num_partition
iandj <- expand.grid(i = i, j = j)
mclapply(1:nrow(iandj), function(iter) {
i <- iandj[iter, ]$i
j <- iandj[iter, ]$j
## Generate ... |
#' Manage score-keeping
#'
#' Creates a storage object which can then be accessed by $update() and $report()
#' functions to hold permanently info on attempts and the score of the most
#' recent answer.
#'
#' @export
createScorekeeper <- function() {
# Generate a random session ID
session_id <- paste(sample(c(0:9, ... | /R/Scorekeeper.R | no_license | dtkaplan/MultipleChoice | R | false | false | 2,265 | r | #' Manage score-keeping
#'
#' Creates a storage object which can then be accessed by $update() and $report()
#' functions to hold permanently info on attempts and the score of the most
#' recent answer.
#'
#' @export
createScorekeeper <- function() {
# Generate a random session ID
session_id <- paste(sample(c(0:9, ... |
#Type de Fracture en fonction du type de Traumatisme
#prerequisite: importer le fichier Excel (.xslx) dans R, sous le nom de test1.xlsx
# install.packages("data.table")
# install.packages("stringr")
# install.packages("ggplot2")
# install.packages("dplyr")
# install.packages("gridExtra")
#on charge les données
libra... | /graphs/corr_autotes_compared_to_others.R | no_license | Zolano974/Rzob | R | false | false | 1,317 | r | #Type de Fracture en fonction du type de Traumatisme
#prerequisite: importer le fichier Excel (.xslx) dans R, sous le nom de test1.xlsx
# install.packages("data.table")
# install.packages("stringr")
# install.packages("ggplot2")
# install.packages("dplyr")
# install.packages("gridExtra")
#on charge les données
libra... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.