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 |
|---|---|---|---|---|---|---|---|---|---|
simulate.clock <-
function(tree, params = list(rate = 0.02, noise = 0.0001)){
rate <- params$rate
noise <- params$noise
data.matrix <- get.tree.data.matrix(tree)
branch.rates <- rep(rate, times = length(tree$edge.length))
branch.rates <- abs(branch.rates + rnorm(length(tree$edge.length), mean = 0, s... | /R/simulate.clock.R | no_license | simon-ho/NELSI | R | false | false | 604 | r | simulate.clock <-
function(tree, params = list(rate = 0.02, noise = 0.0001)){
rate <- params$rate
noise <- params$noise
data.matrix <- get.tree.data.matrix(tree)
branch.rates <- rep(rate, times = length(tree$edge.length))
branch.rates <- abs(branch.rates + rnorm(length(tree$edge.length), mean = 0, s... |
#' @name biogrid
#' @title BIOGRID v3.4.126
#'
#' @description
#' A data frame containing protein-protein interactions
#'
#' @docType data
#'
#' @format A data frame with 211506 rows and 2 variables:
#' \describe{
#' \item{entrezID_A}{List of Entrez identifiers, interactor A}
#' \item{entrezID_B}{List o... | /R/biogrid.R | no_license | sarbal/EGAD | R | false | false | 447 | r | #' @name biogrid
#' @title BIOGRID v3.4.126
#'
#' @description
#' A data frame containing protein-protein interactions
#'
#' @docType data
#'
#' @format A data frame with 211506 rows and 2 variables:
#' \describe{
#' \item{entrezID_A}{List of Entrez identifiers, interactor A}
#' \item{entrezID_B}{List o... |
#' extract various components from model comparison
#'
#' @description
#'NULL
#'
#'
#' @param object object of class \code{modelcomp} for various S3 methods
#' @param what argument for S3 method \code{extract} indicating what to extract;
#' It can be \code{"wald"} for wald statistics, \code{"wald.p"} for associ... | /R/extract.R | no_license | Wenchao-Ma/GDINA | R | false | false | 19,655 | r | #' extract various components from model comparison
#'
#' @description
#'NULL
#'
#'
#' @param object object of class \code{modelcomp} for various S3 methods
#' @param what argument for S3 method \code{extract} indicating what to extract;
#' It can be \code{"wald"} for wald statistics, \code{"wald.p"} for associ... |
.libPaths(c("C:/Users/Hayden/Documents/R/win-library/3.4", "C:/Program Files/R/R-3.4.1/library"))
suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(data.table))
suppressPackageStartupMessages(library(stringr))
# Read the data file to memory
ratios_Group_age <- readRDS("./DataFil... | /hw07_Data_Analysis_Pipeline/Plot_candy_data.r | no_license | QinxinLin/STAT545-hw-Scheiber-Hayden | R | false | false | 3,484 | r | .libPaths(c("C:/Users/Hayden/Documents/R/win-library/3.4", "C:/Program Files/R/R-3.4.1/library"))
suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(data.table))
suppressPackageStartupMessages(library(stringr))
# Read the data file to memory
ratios_Group_age <- readRDS("./DataFil... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/assign.locations.R
\name{funUpdate.locs}
\alias{funUpdate.locs}
\title{funUpdate.locs}
\usage{
funUpdate.locs(address, match.threshold, pkg.data.root)
}
\arguments{
\item{address}{data.table with all exploded address fields}
\item{match.thre... | /man/funUpdate.locs.Rd | no_license | erikbjohn/assign.locations | R | false | true | 532 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/assign.locations.R
\name{funUpdate.locs}
\alias{funUpdate.locs}
\title{funUpdate.locs}
\usage{
funUpdate.locs(address, match.threshold, pkg.data.root)
}
\arguments{
\item{address}{data.table with all exploded address fields}
\item{match.thre... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/list_transform.R
\name{list_transform}
\alias{list_transform}
\title{Transform list of lists into data frame}
\usage{
list_transform(x)
}
\arguments{
\item{x}{a list of lists, with all sub-lists having the same length}
}
\value{
a data frame ... | /man/list_transform.Rd | permissive | gpilgrim2670/SwimmeR | R | false | true | 728 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/list_transform.R
\name{list_transform}
\alias{list_transform}
\title{Transform list of lists into data frame}
\usage{
list_transform(x)
}
\arguments{
\item{x}{a list of lists, with all sub-lists having the same length}
}
\value{
a data frame ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CreateArgFunctions.R
\name{createCreatePsArgs}
\alias{createCreatePsArgs}
\title{Create a parameter object for the function createPs}
\usage{
createCreatePsArgs(excludeCovariateIds = c(), includeCovariateIds = c(),
errorOnHighCorrelation = ... | /man/createCreatePsArgs.Rd | permissive | azzashoaibi/CohortMethod | R | false | true | 1,476 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CreateArgFunctions.R
\name{createCreatePsArgs}
\alias{createCreatePsArgs}
\title{Create a parameter object for the function createPs}
\usage{
createCreatePsArgs(excludeCovariateIds = c(), includeCovariateIds = c(),
errorOnHighCorrelation = ... |
# Regression splines
library(ISLR)
library(splines)
# Data configure
attach(Wage)
agelims=range(age)
age.grid=seq(from=agelims[1],to=agelims[2])
# basis functions for splines
fit=lm(wage~bs(age,knots=c(25,40,60)),data=Wage) # 6 basis functions 1 intercept 7df
pred=predict(fit,newdata=list(age=age.grid),se=T)
# Plot... | /non_linear_modeling/splines.R | no_license | kayfay/R_programming | R | false | false | 1,215 | r | # Regression splines
library(ISLR)
library(splines)
# Data configure
attach(Wage)
agelims=range(age)
age.grid=seq(from=agelims[1],to=agelims[2])
# basis functions for splines
fit=lm(wage~bs(age,knots=c(25,40,60)),data=Wage) # 6 basis functions 1 intercept 7df
pred=predict(fit,newdata=list(age=age.grid),se=T)
# Plot... |
.rasterFromNSIDCFile <- function(x) {
## check name structure
## "nt_19781119_f07_v01_s.bin"
bx <- basename(x)
## test that we can get a date from this
## (as POSIXct so that Z-comparisons are more natural)
dts <- as.POSIXct(basename(x), format = "nt_%Y%m%d", tz = "GMT")
## test tha... | /raster/R/nsidcICE.R | no_license | radfordneal/R-package-mods | R | false | false | 2,128 | r | .rasterFromNSIDCFile <- function(x) {
## check name structure
## "nt_19781119_f07_v01_s.bin"
bx <- basename(x)
## test that we can get a date from this
## (as POSIXct so that Z-comparisons are more natural)
dts <- as.POSIXct(basename(x), format = "nt_%Y%m%d", tz = "GMT")
## test tha... |
# Initialize Boilerplate ----
source("boilerplate.R")
source("data/comment.R")
InitGlobals()
## Test: Continuous-valued Metrics ====
metrics <- COMMENT.CV.METRICS
test.outcomes <- data.frame()
for (i in 1:length(metrics)) {
metric <- metrics[i]
metric.label <- COMMENT.METRIC.LABELS[[metric]]
cat("[", i, "/", l... | /app/lib/analysis/tests/association/comment.R | no_license | andymeneely/sira-nlp | R | false | false | 5,584 | r | # Initialize Boilerplate ----
source("boilerplate.R")
source("data/comment.R")
InitGlobals()
## Test: Continuous-valued Metrics ====
metrics <- COMMENT.CV.METRICS
test.outcomes <- data.frame()
for (i in 1:length(metrics)) {
metric <- metrics[i]
metric.label <- COMMENT.METRIC.LABELS[[metric]]
cat("[", i, "/", l... |
#Graphique ligne 171
res <- PCA(datatemp, quanti.sup=13:16, quali.sup=17,graph=F)
par(mfrow=c(1,1),mar=c(4,4,2,2))
barplot(res$eig[,2],ylab="Inertie %",names.arg = paste("Axe",1: nrow(res$eig)),las=2,cex.axis=0.3,cex.lab=1, main = "Graphique indiquant l'inertie des individus")
legend(x="topleft",legend=c("Ind... | /Groupe-3-OPEN/graphiqueregions.R | no_license | vnzPayet/OPEN-exo | R | false | false | 348 | r | #Graphique ligne 171
res <- PCA(datatemp, quanti.sup=13:16, quali.sup=17,graph=F)
par(mfrow=c(1,1),mar=c(4,4,2,2))
barplot(res$eig[,2],ylab="Inertie %",names.arg = paste("Axe",1: nrow(res$eig)),las=2,cex.axis=0.3,cex.lab=1, main = "Graphique indiquant l'inertie des individus")
legend(x="topleft",legend=c("Ind... |
library(readr)
library(magrittr)
library(lubridate)
library(stringr)
GAdata <- read_csv("data/2019_NAAEE_GoogleAnalytics.csv")
GAdata$X1 <- NULL
#GAdata$date <- as.Date(GAdata$date)
GAdata$date <- as.Date(GAdata$date, format = '%m/%d/%Y')
# dates
# GAdata$date <- gsub('^(.{4})(.*)$', '\\1-\\2', GAdata$date)
# GAdat... | /DataPrep.R | no_license | rforoperations2019/Project1-mkennady | R | false | false | 1,125 | r | library(readr)
library(magrittr)
library(lubridate)
library(stringr)
GAdata <- read_csv("data/2019_NAAEE_GoogleAnalytics.csv")
GAdata$X1 <- NULL
#GAdata$date <- as.Date(GAdata$date)
GAdata$date <- as.Date(GAdata$date, format = '%m/%d/%Y')
# dates
# GAdata$date <- gsub('^(.{4})(.*)$', '\\1-\\2', GAdata$date)
# GAdat... |
## ----set-up------------------------------------------------------------------------------------------
library(ggplot2)
data("diamonds")
## ----head-of-diamonds-tibble, echo=FALSE-------------------------------------------------------------
head(diamonds)
## ----head-of-diamonds-dataframe, echo=FALSE--------------... | /day1/slides.R | no_license | AbigailHorn/rbootcamp | R | false | false | 2,821 | r | ## ----set-up------------------------------------------------------------------------------------------
library(ggplot2)
data("diamonds")
## ----head-of-diamonds-tibble, echo=FALSE-------------------------------------------------------------
head(diamonds)
## ----head-of-diamonds-dataframe, echo=FALSE--------------... |
## RedundancyRandomForest_Validation.R
# This script will produce a figure showing the validation for the random forest
# model (scatterplot of sim vs obs) and a table with computed fit statistics.
# This model is for predicting annual values after removing potentially redundant
# gages, which is how it differs from th... | /figures_manuscript/RedundancyRandomForest_Validation.R | no_license | dry-rivers-rcn/IntermittencyTrends | R | false | false | 13,735 | r | ## RedundancyRandomForest_Validation.R
# This script will produce a figure showing the validation for the random forest
# model (scatterplot of sim vs obs) and a table with computed fit statistics.
# This model is for predicting annual values after removing potentially redundant
# gages, which is how it differs from th... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{add}
\alias{add}
\alias{add.default}
\alias{delete}
\alias{delete.GContainer}
\title{Add a child object to parent container}
\usage{
add(obj, child, expand = FALSE, fill = NULL, anchor = NULL, ...)
\method{add}{defaul... | /man/add.Rd | no_license | slomanl1/gWidgets2 | R | false | false | 1,647 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{add}
\alias{add}
\alias{add.default}
\alias{delete}
\alias{delete.GContainer}
\title{Add a child object to parent container}
\usage{
add(obj, child, expand = FALSE, fill = NULL, anchor = NULL, ...)
\method{add}{defaul... |
library(tidyverse)
library(ggbeeswarm)
library(viridis)
mungeTables=function(tables.RDS,lw=F,Stotal_filt=2000,input=96){
countTables=readRDS(tables.RDS) #paste0(rundir, 'countTable.RDS'))
df=do.call('rbind', countTables)
df$virus_copy=as.factor(df$virus_copy)
df$Col=as.factor(gsub('^.', '', df$Sample... | /code/helper_functions.R | permissive | lailamargaret/swabseq | R | false | false | 4,355 | r | library(tidyverse)
library(ggbeeswarm)
library(viridis)
mungeTables=function(tables.RDS,lw=F,Stotal_filt=2000,input=96){
countTables=readRDS(tables.RDS) #paste0(rundir, 'countTable.RDS'))
df=do.call('rbind', countTables)
df$virus_copy=as.factor(df$virus_copy)
df$Col=as.factor(gsub('^.', '', df$Sample... |
#' Reproduce Example 1.2
#'
#' Reproduces Example 1.2 from the book.
#'
#' @param seed Random number seed for reproducibility
#' @param lambda Regularization parameter for ridge regression
#'
#' @examples
#' Ex1.2()
#' Ex1.2(lam=0.01)
Ex1.2 <- function(seed=11, lambda=0.1) {
set.seed(seed)
x1 <- rnorm(20)
... | /R/multicol-ridge.R | no_license | wangsanshui/hdrm | R | false | false | 484 | r | #' Reproduce Example 1.2
#'
#' Reproduces Example 1.2 from the book.
#'
#' @param seed Random number seed for reproducibility
#' @param lambda Regularization parameter for ridge regression
#'
#' @examples
#' Ex1.2()
#' Ex1.2(lam=0.01)
Ex1.2 <- function(seed=11, lambda=0.1) {
set.seed(seed)
x1 <- rnorm(20)
... |
#' Check the GDAL version in use
#'
#' @return \code{numeric_version}
#'
#' @author Alex Chubaty and Eliot McIntire
#' @export
#' @importFrom magrittr %>%
#' @importFrom rgdal getGDALVersionInfo
#'
getGDALVersion <- function() {
vers <- tryCatch(getGDALVersionInfo(), error = function(e) NA_real_)
if (!is.na(vers))... | /R/gis.R | no_license | jeffreypullin/reproducible | R | false | false | 5,497 | r | #' Check the GDAL version in use
#'
#' @return \code{numeric_version}
#'
#' @author Alex Chubaty and Eliot McIntire
#' @export
#' @importFrom magrittr %>%
#' @importFrom rgdal getGDALVersionInfo
#'
getGDALVersion <- function() {
vers <- tryCatch(getGDALVersionInfo(), error = function(e) NA_real_)
if (!is.na(vers))... |
## File Name: print.din.R
## File Version: 2.10
################################################################################
# print method for objects of class "din" #
################################################################################
print.din <-
function(x, ... ... | /R/print.din.R | no_license | alexanderrobitzsch/CDM | R | false | false | 1,337 | r | ## File Name: print.din.R
## File Version: 2.10
################################################################################
# print method for objects of class "din" #
################################################################################
print.din <-
function(x, ... ... |
######################### Zoltan Kekecs - assignment 3 #########################
### author: Lisa Holzer
### date: 2nd December 2019
##load packages
library(gsheet)
library(psych)
library(lm.beta)
library(rgl)
library(gridExtra)
library(tidyverse)
library(olsrr)
library(car)
library(lmtest)
l... | /Kekesc_Assignment 3_Holzer.R | no_license | LisaH1/Home-assignments-2019 | R | false | false | 11,732 | r |
######################### Zoltan Kekecs - assignment 3 #########################
### author: Lisa Holzer
### date: 2nd December 2019
##load packages
library(gsheet)
library(psych)
library(lm.beta)
library(rgl)
library(gridExtra)
library(tidyverse)
library(olsrr)
library(car)
library(lmtest)
l... |
install.packages("ZOO")
library(zoo)
# VAR
install.packages("VARselect")
library(VARselect)
install.packages("vars")
library(vars)
############ oil price plot (dollars per barrel)(not seasonally adjusted)
auto <- read.csv("C:/Users/eric/Desktop/my essay/data/CrudeOilPrices.csv", header=T)
oilprice<-ts(au... | /essay code.R | no_license | yipeichan/Oil_Price_and_Consumption_Expenditure | R | false | false | 26,892 | r | install.packages("ZOO")
library(zoo)
# VAR
install.packages("VARselect")
library(VARselect)
install.packages("vars")
library(vars)
############ oil price plot (dollars per barrel)(not seasonally adjusted)
auto <- read.csv("C:/Users/eric/Desktop/my essay/data/CrudeOilPrices.csv", header=T)
oilprice<-ts(au... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readXVG.R
\name{readXVG}
\alias{readXVG}
\title{Read output data from a XVG format file.}
\usage{
readXVG(file)
}
\arguments{
\item{file}{A .XVG output file of the GROMACS molecular dynamics package}
}
\description{
XVG is the default format ... | /man/readXVG.Rd | no_license | BioCreator/Peptides | R | false | true | 1,906 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/readXVG.R
\name{readXVG}
\alias{readXVG}
\title{Read output data from a XVG format file.}
\usage{
readXVG(file)
}
\arguments{
\item{file}{A .XVG output file of the GROMACS molecular dynamics package}
}
\description{
XVG is the default format ... |
###### This is an R script to produce the figures that are attached to the qcML format
###TIC
######
#options
options(digits=10)
file1<-commandArgs(TRUE)[1]
file2<-commandArgs(TRUE)[2]
post<-commandArgs(TRUE)[3]
png(post)
#file1<-"exampledata/Freiburg_old1/QCTIC.tsv"
#file2<-"exampledata/Freiburg_old1/QCRIC.tsv"
QCT... | /ProduceQCFigures_ticric.R | no_license | mwalzer/qc-plotter | R | false | false | 1,279 | r | ###### This is an R script to produce the figures that are attached to the qcML format
###TIC
######
#options
options(digits=10)
file1<-commandArgs(TRUE)[1]
file2<-commandArgs(TRUE)[2]
post<-commandArgs(TRUE)[3]
png(post)
#file1<-"exampledata/Freiburg_old1/QCTIC.tsv"
#file2<-"exampledata/Freiburg_old1/QCRIC.tsv"
QCT... |
getHPCData <- function(){
##file Download
if (!file.exists("dataset.zip")){
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip","dataset.zip")
## Unzip data
zipF<- "dataset.zip"
unzip(zipF,exdir=getwd())
}
hpc<-read.csv("h... | /loadData.R | no_license | peconick/ExData_Plotting1 | R | false | false | 1,267 | r | getHPCData <- function(){
##file Download
if (!file.exists("dataset.zip")){
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip","dataset.zip")
## Unzip data
zipF<- "dataset.zip"
unzip(zipF,exdir=getwd())
}
hpc<-read.csv("h... |
library('reticulate')
use_python("/usr/local/bin/python")
source_python("transitive_closure.py",convert = F)
source_python("convert.py",convert = F)
# read in network, it have 10000 nodes and around 30000 edges
NW=read.table("theoretical_network.csv",header = F)
dims=c(10000,10000)
#adjacent matrix
adj=hash_matrix_tc... | /Transitive_closure_sample_code.R | no_license | will-zehr/615_Hashtable_Project | R | false | false | 407 | r | library('reticulate')
use_python("/usr/local/bin/python")
source_python("transitive_closure.py",convert = F)
source_python("convert.py",convert = F)
# read in network, it have 10000 nodes and around 30000 edges
NW=read.table("theoretical_network.csv",header = F)
dims=c(10000,10000)
#adjacent matrix
adj=hash_matrix_tc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCorrelationMatrix.R
\name{getCorrelationMatrix}
\alias{getCorrelationMatrix}
\title{getCorrelationMatrix}
\usage{
getCorrelationMatrix(year)
}
\arguments{
\item{year}{}
}
\description{
prints correlation matrix
}
| /man/getCorrelationMatrix.Rd | no_license | rpcvjet/ModernDSHW | R | false | true | 294 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCorrelationMatrix.R
\name{getCorrelationMatrix}
\alias{getCorrelationMatrix}
\title{getCorrelationMatrix}
\usage{
getCorrelationMatrix(year)
}
\arguments{
\item{year}{}
}
\description{
prints correlation matrix
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rcorpus.r
\name{rcorpus}
\alias{rcorpus}
\title{Random Corpus}
\usage{
rcorpus(nwords = 50, alphabet = letters, minwordlen = 1, maxwordlen = 6)
}
\arguments{
\item{nwords}{Number of words to generate.}
\item{alphabet}{The pool of "letters" t... | /man/rcorpus.Rd | permissive | wrathematics/ngram | R | false | true | 605 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rcorpus.r
\name{rcorpus}
\alias{rcorpus}
\title{Random Corpus}
\usage{
rcorpus(nwords = 50, alphabet = letters, minwordlen = 1, maxwordlen = 6)
}
\arguments{
\item{nwords}{Number of words to generate.}
\item{alphabet}{The pool of "letters" t... |
# Copyright (C) 2017 Johannes Helmuth & Ho-Ryun Chung
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.
#
# This program is distributed i... | /R/NormRCountConfig.R | no_license | your-highness/normR | R | false | false | 7,755 | r | # Copyright (C) 2017 Johannes Helmuth & Ho-Ryun Chung
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# any later version.
#
# This program is distributed i... |
## stackListItems.R
## Paul Johnson <pauljohn at ku.edu>
## 2010-09-07
## I asked about this in r-help last week and promised
## a summary of answers.
## We face this problem all the time. A procedure
## generates a list of data frames. How to stack them
## together?
## The short answer is that the plyr package's rb... | /rockchalk/inst/examples/stackListItems-01.R | no_license | pauljohn32/rockchalk | R | false | false | 6,068 | r | ## stackListItems.R
## Paul Johnson <pauljohn at ku.edu>
## 2010-09-07
## I asked about this in r-help last week and promised
## a summary of answers.
## We face this problem all the time. A procedure
## generates a list of data frames. How to stack them
## together?
## The short answer is that the plyr package's rb... |
MAXEXTENT <- 20037508
A <- 6378137
proj4 <- sprintf("+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +R=A +units=m +no_defs")
llproj4 <- .ll()
globalVariables(c("MAXETENT", "A", "proj4", "llproj4"), "ceramic", add = TRUE)
virtual_tiles <- function(zoom = 0, extent = NULL) {
if (is.null(extent)) {
ex <- c(xmin =... | /R/virtual_tiles.R | no_license | kauebraga/ceramic | R | false | false | 826 | r | MAXEXTENT <- 20037508
A <- 6378137
proj4 <- sprintf("+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +R=A +units=m +no_defs")
llproj4 <- .ll()
globalVariables(c("MAXETENT", "A", "proj4", "llproj4"), "ceramic", add = TRUE)
virtual_tiles <- function(zoom = 0, extent = NULL) {
if (is.null(extent)) {
ex <- c(xmin =... |
/refm/doc/glossary.rd | permissive | mrkn/rubydoc | R | false | false | 27,850 | rd | ||
# Title : Traffic Accident Analysis #
# Project Name: Toyota City carsh data #
# Starting Data: 2019/Sep.l/00 #
# File Name: [1] Multivariate Truncated Poisson [First Trail] #
# Versi... | /3_Toyota_Data_Modeling/R/1_Estimation2019/R02_MultivariatePoissonLogNormwithCorr.R | permissive | Ghasak/Toyota_project_Data_Wrangling | R | false | false | 20,135 | r | # Title : Traffic Accident Analysis #
# Project Name: Toyota City carsh data #
# Starting Data: 2019/Sep.l/00 #
# File Name: [1] Multivariate Truncated Poisson [First Trail] #
# Versi... |
ypr_shinyApp <-function(age=NULL,wgt=NULL,partial=NULL,M=NULL,plus=FALSE,oldest=NULL,maxF=2,incrF=0.001,graph=TRUE) {
res <- tryCatch({
ypr(age,wgt,partial,M,plus,oldest,maxF,incrF,graph)
},
error=function(cond) {
errorResult = list()
errorResult[['error']] <- gettext(cond)
return(errorResult)... | /assets/fishmethods/methods.R | no_license | kleisner/StockMonitoringTool | R | false | false | 742 | r | ypr_shinyApp <-function(age=NULL,wgt=NULL,partial=NULL,M=NULL,plus=FALSE,oldest=NULL,maxF=2,incrF=0.001,graph=TRUE) {
res <- tryCatch({
ypr(age,wgt,partial,M,plus,oldest,maxF,incrF,graph)
},
error=function(cond) {
errorResult = list()
errorResult[['error']] <- gettext(cond)
return(errorResult)... |
library(testthat)
library(awsr)
test_check("awsr")
| /tests/testthat.R | no_license | sd2k/awsr | R | false | false | 52 | r | library(testthat)
library(awsr)
test_check("awsr")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/which_max2.R
\name{which.max2}
\alias{which.max2}
\title{Return Index of (First) Maximum of a Vector}
\usage{
which.max2(x, arr.ind = FALSE, integer = FALSE)
}
\arguments{
\item{x}{Integer or numeric vector/matrix.}
\item{arr.ind}{Logical va... | /man/which.max2.Rd | no_license | vandomed/dvmisc | R | false | true | 1,246 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/which_max2.R
\name{which.max2}
\alias{which.max2}
\title{Return Index of (First) Maximum of a Vector}
\usage{
which.max2(x, arr.ind = FALSE, integer = FALSE)
}
\arguments{
\item{x}{Integer or numeric vector/matrix.}
\item{arr.ind}{Logical va... |
#first download the data and unzip, then set the working directory
setwd("D:/datasciencecoursera/UCI HAR Dataset/")
#read in training data and combine
trainData<-read.table("train/X_train.txt")
trainSubject<-read.table("train/subject_train.txt")
trainActivity<-read.table("train/Y_train.txt")
combinedtrainData<-cbind(t... | /run_analysis.R | no_license | GenuinePro/datasciencecoursera | R | false | false | 1,600 | r | #first download the data and unzip, then set the working directory
setwd("D:/datasciencecoursera/UCI HAR Dataset/")
#read in training data and combine
trainData<-read.table("train/X_train.txt")
trainSubject<-read.table("train/subject_train.txt")
trainActivity<-read.table("train/Y_train.txt")
combinedtrainData<-cbind(t... |
\name{FaFile}
\Rdversion{1.1}
\docType{class}
\alias{FaFile-class}
\alias{FaFileList-class}
% con/destructors
\alias{FaFile}
\alias{FaFileList}
\alias{open.FaFile}
\alias{close.FaFile }
% accessors
\alias{isOpen,FaFile-method}
% methods
\alias{indexFa,FaFile-method}
\alias{scanFaIndex,FaFile-method}
\alias{scanFaIndex,... | /man/FaFile-class.Rd | permissive | lh3/Rsamtools | R | false | false | 6,430 | rd | \name{FaFile}
\Rdversion{1.1}
\docType{class}
\alias{FaFile-class}
\alias{FaFileList-class}
% con/destructors
\alias{FaFile}
\alias{FaFileList}
\alias{open.FaFile}
\alias{close.FaFile }
% accessors
\alias{isOpen,FaFile-method}
% methods
\alias{indexFa,FaFile-method}
\alias{scanFaIndex,FaFile-method}
\alias{scanFaIndex,... |
#####################
# load libraries
# set wd
# clear global .envir
#####################
# remove objects
rm(list=ls())
# detach all libraries
detachAllPackages <- function() {
basic.packages <- c("package:stats", "package:graphics", "package:grDevices", "package:utils", "package:datasets", "package:methods", "pa... | /problemSets/PS01/template/PS01.R | no_license | FAlkhatib/StatsI_Fall2021 | R | false | false | 1,405 | r | #####################
# load libraries
# set wd
# clear global .envir
#####################
# remove objects
rm(list=ls())
# detach all libraries
detachAllPackages <- function() {
basic.packages <- c("package:stats", "package:graphics", "package:grDevices", "package:utils", "package:datasets", "package:methods", "pa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_summary.R
\name{plot_summary}
\alias{plot_summary}
\title{Function to annotate fusion calls}
\usage{
plot_summary(
standardFusionCalls = standardFusionCalls,
outputpdffile = outputpdffile,
groupby = groupby
)
}
\arguments{
\item{st... | /man/plot_summary.Rd | permissive | federicomarini/annoFuse | R | false | true | 624 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_summary.R
\name{plot_summary}
\alias{plot_summary}
\title{Function to annotate fusion calls}
\usage{
plot_summary(
standardFusionCalls = standardFusionCalls,
outputpdffile = outputpdffile,
groupby = groupby
)
}
\arguments{
\item{st... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_heatmap}
\alias{plot_heatmap}
\alias{plot_heatmap.matrix}
\title{plot_heatmap}
\usage{
plot_heatmap(x, ...)
\method{plot_heatmap}{matrix}(
x,
row.cluster = TRUE,
col.cluster = FALSE,
scale = TRUE,
row.name = "row"... | /man/plot_heatmap.Rd | no_license | ddiez/d10misc | R | false | true | 790 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_heatmap}
\alias{plot_heatmap}
\alias{plot_heatmap.matrix}
\title{plot_heatmap}
\usage{
plot_heatmap(x, ...)
\method{plot_heatmap}{matrix}(
x,
row.cluster = TRUE,
col.cluster = FALSE,
scale = TRUE,
row.name = "row"... |
#Function that generates fake data
create_fake_data <- function(data){
#length of data
data_length <- nrow(data)
#Vector of fake names
fake_names <- c("Lincoln", "Abigail", "Zion", "Wilmer", "Dolly", "Strike", "Kale", "Amor",
"Gertrude", "Jaws", "Autumn", "Pluto", "Remington", "Cherry", "P... | /fake_data.R | no_license | qishuyi/ZooMonitor | R | false | false | 3,321 | r | #Function that generates fake data
create_fake_data <- function(data){
#length of data
data_length <- nrow(data)
#Vector of fake names
fake_names <- c("Lincoln", "Abigail", "Zion", "Wilmer", "Dolly", "Strike", "Kale", "Amor",
"Gertrude", "Jaws", "Autumn", "Pluto", "Remington", "Cherry", "P... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.storagegateway_operations.R
\name{retrieve_tape_recovery_point}
\alias{retrieve_tape_recovery_point}
\title{Retrieves the recovery point for the specified virtual tape}
\usage{
retrieve_tape_recovery_point(TapeARN, GatewayARN)
}
\argumen... | /service/paws.storagegateway/man/retrieve_tape_recovery_point.Rd | permissive | CR-Mercado/paws | R | false | true | 1,449 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.storagegateway_operations.R
\name{retrieve_tape_recovery_point}
\alias{retrieve_tape_recovery_point}
\title{Retrieves the recovery point for the specified virtual tape}
\usage{
retrieve_tape_recovery_point(TapeARN, GatewayARN)
}
\argumen... |
library(qfasar)
context("Test dimac algorithm")
# Distance measure equals 1
test_obj <- dimac(sigs = matrix(c(0.05, 0.10, 0.30, 0.55,
0.04, 0.11, 0.29, 0.56,
0.10, 0.05, 0.35, 0.50,
0.12, 0.03, 0.37, 0.48,
... | /tests/testthat/test_dimac.R | no_license | cran/qfasar | R | false | false | 3,215 | r | library(qfasar)
context("Test dimac algorithm")
# Distance measure equals 1
test_obj <- dimac(sigs = matrix(c(0.05, 0.10, 0.30, 0.55,
0.04, 0.11, 0.29, 0.56,
0.10, 0.05, 0.35, 0.50,
0.12, 0.03, 0.37, 0.48,
... |
# # # # # # # # # # # # # # # #
# First Name : Avirat #
# Last Name : Belekar #
# CWID : 10454332 #
# Course : CS513- B #
# Purpose : HW_Midterm_Exam #
# Email:abelekar@stevens.edu #
# # # # # # # # # # # # # # # #
# Question 6
rm(list= ls())
# Import all libraries after insta... | /Midterm/6.R | no_license | avirat8497/CS513-KDD | R | false | false | 2,273 | r | # # # # # # # # # # # # # # # #
# First Name : Avirat #
# Last Name : Belekar #
# CWID : 10454332 #
# Course : CS513- B #
# Purpose : HW_Midterm_Exam #
# Email:abelekar@stevens.edu #
# # # # # # # # # # # # # # # #
# Question 6
rm(list= ls())
# Import all libraries after insta... |
#
# Title:
# R Script Template
#
# Description:
# A R script template.
#
# Authors:
# Sergio García Prado - garciparedes.me
#
# Date:
# 2018 March
#
rm(list = ls())
| /template.R | permissive | garciparedes/r-examples | R | false | false | 175 | r | #
# Title:
# R Script Template
#
# Description:
# A R script template.
#
# Authors:
# Sergio García Prado - garciparedes.me
#
# Date:
# 2018 March
#
rm(list = ls())
|
testlist <- list(rates = c(NA, NA, 6.64033905201048e-07, 0), thresholds = c(Inf, NaN), x = numeric(0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) | /grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610383135-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 162 | r | testlist <- list(rates = c(NA, NA, 6.64033905201048e-07, 0), thresholds = c(Inf, NaN), x = numeric(0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) |
library(polySegratioMM)
### Name: writeJagsFile
### Title: Writes BUGS file for processing by JAGS
### Aliases: writeJagsFile
### Keywords: manip data
### ** Examples
## simulate small autooctaploid data set
a1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)
## compute segregation ratios
sr <- ... | /data/genthat_extracted_code/polySegratioMM/examples/writeJagsFile.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 573 | r | library(polySegratioMM)
### Name: writeJagsFile
### Title: Writes BUGS file for processing by JAGS
### Aliases: writeJagsFile
### Keywords: manip data
### ** Examples
## simulate small autooctaploid data set
a1 <- sim.autoMarkers(8,c(0.7,0.2,0.1),n.markers=100,n.individuals=50)
## compute segregation ratios
sr <- ... |
set.seed(2015)
n <- 10000
sigma <- 1
K <- 1
## the true value
VP <- K * pnorm(-(log(1/K) - sigma^2/2)/sigma) - pnorm(-(log(1/K) + sigma^2/2)/sigma)
x <- rexp(n, rate = 0.5)
tildeg <- function(x) (max(0, K - exp(-sigma^2/2 + sigma * sqrt(x))) + max(0, K -
exp(-sigma^2/2 - sigma * sqrt(x))))/sqrt(2 * pi * x)
y <-... | /importancesampling.R | no_license | sdunbarne/Math-Modeling-Econ-Finance-R | R | false | false | 2,091 | r | set.seed(2015)
n <- 10000
sigma <- 1
K <- 1
## the true value
VP <- K * pnorm(-(log(1/K) - sigma^2/2)/sigma) - pnorm(-(log(1/K) + sigma^2/2)/sigma)
x <- rexp(n, rate = 0.5)
tildeg <- function(x) (max(0, K - exp(-sigma^2/2 + sigma * sqrt(x))) + max(0, K -
exp(-sigma^2/2 - sigma * sqrt(x))))/sqrt(2 * pi * x)
y <-... |
################################################################################
# With Bootstrap
#' boostrap method described in 8.3 of http://www.stat.ncsu.edu/people/lu/courses/ST505/Ch8.pdf
#'
#' @export
PairedBoostrap <- function(dat, m) {
n <- nrow(dat$G)
sample.index <- sample.int(n, replace = TRUE)
dat$G... | /ThesisRpackage/R/HypothesisTesting/HypothesisTesting_bootstrap.R | permissive | cayek/Thesis | R | false | false | 2,691 | r | ################################################################################
# With Bootstrap
#' boostrap method described in 8.3 of http://www.stat.ncsu.edu/people/lu/courses/ST505/Ch8.pdf
#'
#' @export
PairedBoostrap <- function(dat, m) {
n <- nrow(dat$G)
sample.index <- sample.int(n, replace = TRUE)
dat$G... |
TiThTe <- function(Dat)
{
## Generate a new object of class ctsm
model <- ctsm$new()
## Add a system equation and thereby also a state
model$addSystem(dTi ~ ( 1/(Ci*Rih)*(Th-Ti) + 1/(Ci*Rie)*(Te-Ti) + Aw/Ci*Ps )*dt + exp(p11)*dw1 )
model$addSystem(dTh ~ ( 1/(Ch*Rih)*(Ti-Th) + 1/Ch*Ph)*dt + exp(p2... | /Ex_2/functions/TiThTe.R | no_license | marcohv/exercises_ts_dtu | R | false | false | 1,919 | r | TiThTe <- function(Dat)
{
## Generate a new object of class ctsm
model <- ctsm$new()
## Add a system equation and thereby also a state
model$addSystem(dTi ~ ( 1/(Ci*Rih)*(Th-Ti) + 1/(Ci*Rie)*(Te-Ti) + Aw/Ci*Ps )*dt + exp(p11)*dw1 )
model$addSystem(dTh ~ ( 1/(Ch*Rih)*(Ti-Th) + 1/Ch*Ph)*dt + exp(p2... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quo.R
\name{quosure}
\alias{quosure}
\alias{quo}
\alias{new_quosure}
\alias{enquo}
\title{Create quosures}
\usage{
quo(expr)
new_quosure(expr, env = caller_env())
enquo(arg)
}
\arguments{
\item{expr}{An expression.}
\item{env}{An environme... | /man/quosure.Rd | no_license | darshankhade/rlang | R | false | true | 6,621 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/quo.R
\name{quosure}
\alias{quosure}
\alias{quo}
\alias{new_quosure}
\alias{enquo}
\title{Create quosures}
\usage{
quo(expr)
new_quosure(expr, env = caller_env())
enquo(arg)
}
\arguments{
\item{expr}{An expression.}
\item{env}{An environme... |
#==============================================================================#
# #
# Nimble models with environmental covariates #
# ... | /05_script/models/several_predictors/2_Nimble_environmental_&_individual_covariates.R | no_license | oliviergimenez/polar_bears_litter_size_environment | R | false | false | 16,836 | r | #==============================================================================#
# #
# Nimble models with environmental covariates #
# ... |
require('corrplot')
require('igraph')
require('R.matlab')
require('ggplot2')
setwd('~/Google Drive/GraduateSchool/Courses/BE566/Project1/')
load('./whole_brain.RData')
null<-readMat('./wb_null.mat')
brain_stats <- readMat('./wb_stats.mat')
coex_pwr <- abs(gene_coex_wb)^7
coex_graph<-graph_from_adjacency_matrix(coex_pw... | /netstats_project2_matlab.R | no_license | cedricx/geneCoX | R | false | false | 5,516 | r | require('corrplot')
require('igraph')
require('R.matlab')
require('ggplot2')
setwd('~/Google Drive/GraduateSchool/Courses/BE566/Project1/')
load('./whole_brain.RData')
null<-readMat('./wb_null.mat')
brain_stats <- readMat('./wb_stats.mat')
coex_pwr <- abs(gene_coex_wb)^7
coex_graph<-graph_from_adjacency_matrix(coex_pw... |
## ------------------------------------------------------------------------
## Load the package
library( ratematrix )
## Load the data
data( "centrarchidae" )
## A list with data, phy.map, and pred
names( centrarchidae )
## ------------------------------------------------------------------------
resp.data <- centrarch... | /data/genthat_extracted_code/ratematrix/vignettes/Intro_on_the_package.R | no_license | surayaaramli/typeRrh | R | false | false | 3,456 | r | ## ------------------------------------------------------------------------
## Load the package
library( ratematrix )
## Load the data
data( "centrarchidae" )
## A list with data, phy.map, and pred
names( centrarchidae )
## ------------------------------------------------------------------------
resp.data <- centrarch... |
#' @importFrom stats pt qnorm pchisq
#' @importFrom survey svydesign svyranktest
#' @importFrom stats kruskal.test
pvalsByGroup <- function(x, group, weights, is.binary = FALSE, non.parametric = FALSE)
{
if (!is.factor(group))
group <- factor(group)
n.levels <- nlevels(group)
levs <- levels(group)
... | /R/calcpvalue.R | no_license | neraunzaran/flipAnalysisOfVariance | R | false | false | 10,009 | r | #' @importFrom stats pt qnorm pchisq
#' @importFrom survey svydesign svyranktest
#' @importFrom stats kruskal.test
pvalsByGroup <- function(x, group, weights, is.binary = FALSE, non.parametric = FALSE)
{
if (!is.factor(group))
group <- factor(group)
n.levels <- nlevels(group)
levs <- levels(group)
... |
## ====================================================
##
## COMPARISON: LOCAL AND FORKED DB
## For comparison of whether the logic was correctly
## implemented by the engineer in the DB.
##
## ====================================================
## Clearing memory
rm(list=ls())
## source functions
source("src/bandw... | /Ecto-MG/bandwidth_district_ranking/src/compare_check_2_sat_vs_eng.R | no_license | mtejas88/esh | R | false | false | 1,905 | r | ## ====================================================
##
## COMPARISON: LOCAL AND FORKED DB
## For comparison of whether the logic was correctly
## implemented by the engineer in the DB.
##
## ====================================================
## Clearing memory
rm(list=ls())
## source functions
source("src/bandw... |
#'
#' Header for all (concatenated) test files
#'
#' Require spatstat.
#' Obtain environment variable controlling tests.
#'
#' $Revision: 1.5 $ $Date: 2020/04/30 05:31:37 $
require(spatstat)
FULLTEST <- (nchar(Sys.getenv("SPATSTAT_TEST", unset="")) > 0)
ALWAYS <- TRUE
cat(paste("--------- Executing",
... | /tests/testsGtoJ.R | no_license | retaoliveira/spatstat | R | false | false | 12,660 | r | #'
#' Header for all (concatenated) test files
#'
#' Require spatstat.
#' Obtain environment variable controlling tests.
#'
#' $Revision: 1.5 $ $Date: 2020/04/30 05:31:37 $
require(spatstat)
FULLTEST <- (nchar(Sys.getenv("SPATSTAT_TEST", unset="")) > 0)
ALWAYS <- TRUE
cat(paste("--------- Executing",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{bionet_example}
\alias{bionet_example}
\title{Example MWCS instance obtained from BioNet package tutorial}
\format{
An object of class \code{igraph} of length 10.
}
\usage{
bionet_example
}
\description{
Example MW... | /man/bionet_example.Rd | no_license | AlgoSkyNet/mwcsr | R | false | true | 391 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{bionet_example}
\alias{bionet_example}
\title{Example MWCS instance obtained from BioNet package tutorial}
\format{
An object of class \code{igraph} of length 10.
}
\usage{
bionet_example
}
\description{
Example MW... |
#' Choose best lambda via cross-validation.
#'
#' A very crude method to find the optimal lambda for a krr (kernel ridge
#' regression) model.
#'
#' @param x Quantitative explanatory variables (vector, matrix, or data.frame).
#' @param y Quantitative response variable.
#' @param lambda_index Vector of lambdas to... | /R/modelSelection.R | no_license | xqzh/Perovskite | R | false | false | 1,474 | r | #' Choose best lambda via cross-validation.
#'
#' A very crude method to find the optimal lambda for a krr (kernel ridge
#' regression) model.
#'
#' @param x Quantitative explanatory variables (vector, matrix, or data.frame).
#' @param y Quantitative response variable.
#' @param lambda_index Vector of lambdas to... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/callDB-functions.R
\name{callCreationGeneDB7}
\alias{callCreationGeneDB7}
\title{callCreationGeneDB7}
\usage{
callCreationGeneDB7(x, IdsList, locusList)
}
\arguments{
\item{x}{number}
\item{IdsList}{list}
\item{locusList}{list}
}
\value{
It... | /man/callCreationGeneDB7-function.Rd | permissive | lamdv/rRice | R | false | true | 412 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/callDB-functions.R
\name{callCreationGeneDB7}
\alias{callCreationGeneDB7}
\title{callCreationGeneDB7}
\usage{
callCreationGeneDB7(x, IdsList, locusList)
}
\arguments{
\item{x}{number}
\item{IdsList}{list}
\item{locusList}{list}
}
\value{
It... |
#
#
rm(list = ls())
setwd("/Users/KevQuant/Downloads/Project")
mpg.data <- read.table('auto-mpg.data')
colnames(mpg.data) <- c("mpg","cylinders","displacement","horsepower",
"weight","acceleration","model_year","origin",
"car_name")
View(mpg.data)
summary(mpg.data)
nrow(... | /510Project_q1_kai_2var.R | no_license | AMcDowald/DataSciProj | R | false | false | 10,999 | r | #
#
rm(list = ls())
setwd("/Users/KevQuant/Downloads/Project")
mpg.data <- read.table('auto-mpg.data')
colnames(mpg.data) <- c("mpg","cylinders","displacement","horsepower",
"weight","acceleration","model_year","origin",
"car_name")
View(mpg.data)
summary(mpg.data)
nrow(... |
\name{single.network}
\alias{single.network}
\title{ Plot a network given a threshold
}
\description{This function plots a network connecting nodes showing distances equal or lower than the defined threshold value.
}
\usage{
single.network(dis, threshold = NA, ptPDF = TRUE, ptPDFname = "Network.pdf",
bgcol = "white", l... | /man/single.network.Rd | no_license | cran/sidier | R | false | false | 4,653 | rd | \name{single.network}
\alias{single.network}
\title{ Plot a network given a threshold
}
\description{This function plots a network connecting nodes showing distances equal or lower than the defined threshold value.
}
\usage{
single.network(dis, threshold = NA, ptPDF = TRUE, ptPDFname = "Network.pdf",
bgcol = "white", l... |
# Case Study - Denco
sales1 = read.csv("./data/denco.csv")
str(sales1)
sales2 = read.csv(file.choose())
str(sales2)
install.packages('gsheet')
library(gsheet)
url = "http://docs.google.com/spreadsheets/d/1h7HU0X_Q4T5h5D1Q36qoK40Tplz94x_HZYHOJJC_edU/edit#gid=216113907"
sales3 = as.data.frame(gsheet2tbl(url))
str(s... | /aa.R | no_license | amit2625/FA_5_2018 | R | false | false | 3,447 | r | # Case Study - Denco
sales1 = read.csv("./data/denco.csv")
str(sales1)
sales2 = read.csv(file.choose())
str(sales2)
install.packages('gsheet')
library(gsheet)
url = "http://docs.google.com/spreadsheets/d/1h7HU0X_Q4T5h5D1Q36qoK40Tplz94x_HZYHOJJC_edU/edit#gid=216113907"
sales3 = as.data.frame(gsheet2tbl(url))
str(s... |
# Test program for cachematrix
# Source in the cachematrix R code
source("cachematrix.R")
# Create a random matrix of sufficient size to cause measurable compute
m <- replicate(1000, rnorm(1000))
# From the random matrix, create a cached matrix
cm <- makeCacheMatrix(m)
# Compute the inverse of the random matrix and... | /tcachematrix.R | no_license | dbourgoyne/ProgrammingAssignment2 | R | false | false | 1,167 | r | # Test program for cachematrix
# Source in the cachematrix R code
source("cachematrix.R")
# Create a random matrix of sufficient size to cause measurable compute
m <- replicate(1000, rnorm(1000))
# From the random matrix, create a cached matrix
cm <- makeCacheMatrix(m)
# Compute the inverse of the random matrix and... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Swrappers.R
\name{alter.DTSg}
\alias{alter.DTSg}
\alias{alter}
\title{Alter time series}
\usage{
\method{alter}{DTSg}(
x,
from = first(self$values(reference = TRUE)[[".dateTime"]]),
to = last(self$values(reference = TRUE)[[".dateTime"]]... | /man/alter.DTSg.Rd | permissive | gisler/DTSg | R | false | true | 2,376 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Swrappers.R
\name{alter.DTSg}
\alias{alter.DTSg}
\alias{alter}
\title{Alter time series}
\usage{
\method{alter}{DTSg}(
x,
from = first(self$values(reference = TRUE)[[".dateTime"]]),
to = last(self$values(reference = TRUE)[[".dateTime"]]... |
library(igraph)
linkso <- read.csv("kjb_cleanedpairs.csv", header=T, as.is=T)
linkso$Book..Chapter..Verse.Number <- NULL
colnames(linkso)[1] <- "from"
colnames(linkso)[2] <- "to"
linkso$from[linkso$from == "Christ"] = "Jesus"
linkso$to[linkso$to == "Christ"] = "Jesus"
linkso$to[linkso$to == "GOD"] = "God"
linkso$from[l... | /Circle20Bible.R | no_license | sbcogan/CS216 | R | false | false | 3,976 | r | library(igraph)
linkso <- read.csv("kjb_cleanedpairs.csv", header=T, as.is=T)
linkso$Book..Chapter..Verse.Number <- NULL
colnames(linkso)[1] <- "from"
colnames(linkso)[2] <- "to"
linkso$from[linkso$from == "Christ"] = "Jesus"
linkso$to[linkso$to == "Christ"] = "Jesus"
linkso$to[linkso$to == "GOD"] = "God"
linkso$from[l... |
library(XLConnect)
### Name: removeSheet-methods
### Title: Removing worksheets from workbooks
### Aliases: removeSheet removeSheet-methods
### removeSheet,workbook,character-method
### removeSheet,workbook,numeric-method
### Keywords: methods utilities
### ** Examples
# mtcars xlsx file from demoFiles subfolde... | /data/genthat_extracted_code/XLConnect/examples/removeSheet-methods.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 562 | r | library(XLConnect)
### Name: removeSheet-methods
### Title: Removing worksheets from workbooks
### Aliases: removeSheet removeSheet-methods
### removeSheet,workbook,character-method
### removeSheet,workbook,numeric-method
### Keywords: methods utilities
### ** Examples
# mtcars xlsx file from demoFiles subfolde... |
#Data Structures in R
| /1dsinR.R | no_license | srustic/analytics | R | false | false | 22 | r | #Data Structures in R
|
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = c(1.58456325028524e+29, 1.44646274743028e+171, 2.12063440048914e-314, NaN, NaN, NaN, NaN, 2, NaN, -8.81695768700495e-229, 9.00810410288128e-313, 2.21890513259475e+176, 5.94225664011335e-310, 3.10575374927001e+... | /meteor/inst/testfiles/E_Penman/libFuzzer_E_Penman/E_Penman_valgrind_files/1612738739-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,052 | r | testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = c(1.58456325028524e+29, 1.44646274743028e+171, 2.12063440048914e-314, NaN, NaN, NaN, NaN, 2, NaN, -8.81695768700495e-229, 9.00810410288128e-313, 2.21890513259475e+176, 5.94225664011335e-310, 3.10575374927001e+... |
y0 = scan("http://www.math.mcgill.ca/yyang/regression/data/US-GDP.txt")
y = 100*log(y0[-1]/y0[-278])
x1 = c(1:277)
x1_begin = c(1:(132))
x1_end = c(133:277)
y_begin = y[1:132]
y_end = y[133:277]
fit.Begin = lm(y_begin~x1_begin)
fit.End = lm(y_end~x1_end)
plot(x1, y, xlab="Time (Quarter Years)", ylab="GDP Growth (%)", ... | /Assignment-2/ass2q2.R | no_license | kabsri/Regression | R | false | false | 821 | r | y0 = scan("http://www.math.mcgill.ca/yyang/regression/data/US-GDP.txt")
y = 100*log(y0[-1]/y0[-278])
x1 = c(1:277)
x1_begin = c(1:(132))
x1_end = c(133:277)
y_begin = y[1:132]
y_end = y[133:277]
fit.Begin = lm(y_begin~x1_begin)
fit.End = lm(y_end~x1_end)
plot(x1, y, xlab="Time (Quarter Years)", ylab="GDP Growth (%)", ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/working_file.R
\name{design_biomass}
\alias{design_biomass}
\title{Survey design-based biomass index}
\usage{
design_biomass(dat)
}
\arguments{
\item{dat}{List containing survey set data by species (alread filtered for desired survey series i... | /man/design_biomass.Rd | no_license | pbs-assess/gfclosed | R | false | true | 379 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/working_file.R
\name{design_biomass}
\alias{design_biomass}
\title{Survey design-based biomass index}
\usage{
design_biomass(dat)
}
\arguments{
\item{dat}{List containing survey set data by species (alread filtered for desired survey series i... |
print(.libPaths())
.libPaths("/mnt/home/rjparker/Rlib")
print(.libPaths())
setwd("/mnt/home/rjparker/git/block_int")
which_exp <- 5
which_part <- 12
source("R/sim_nblocks.R")
| /beo/sim5/sim5_12.R | no_license | ryanjparker/block_int | R | false | false | 176 | r | print(.libPaths())
.libPaths("/mnt/home/rjparker/Rlib")
print(.libPaths())
setwd("/mnt/home/rjparker/git/block_int")
which_exp <- 5
which_part <- 12
source("R/sim_nblocks.R")
|
# Copyright(c) Microsoft Corporation.
# Licensed under the MIT license.
#' Get a deployed web service
#' @description
#' Return the corresponding Webservice object of a deployed web service from
#' a given workspace.
#' @param workspace The `Workspace` object.
#' @param name A string of the name of the web service to ... | /R/webservice.R | permissive | Azure/azureml-sdk-for-r | R | false | false | 7,399 | r | # Copyright(c) Microsoft Corporation.
# Licensed under the MIT license.
#' Get a deployed web service
#' @description
#' Return the corresponding Webservice object of a deployed web service from
#' a given workspace.
#' @param workspace The `Workspace` object.
#' @param name A string of the name of the web service to ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/zchunk_batch_land_input_3_xml.R
\name{module_aglu_batch_land_input_3_xml_DISABLED}
\alias{module_aglu_batch_land_input_3_xml_DISABLED}
\title{module_aglu_batch_land_input_3_xml}
\usage{
module_aglu_batch_land_input_3_xml_DISABLED(command, ...... | /man/module_aglu_batch_land_input_3_xml_DISABLED.Rd | no_license | shaohuizhang/gcamdata | R | false | true | 795 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/zchunk_batch_land_input_3_xml.R
\name{module_aglu_batch_land_input_3_xml_DISABLED}
\alias{module_aglu_batch_land_input_3_xml_DISABLED}
\title{module_aglu_batch_land_input_3_xml}
\usage{
module_aglu_batch_land_input_3_xml_DISABLED(command, ...... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/schools.R
\name{haversine}
\alias{haversine}
\title{Get the haversine distance between two points (x1, y1) and (x2, y2) scaled between 0 and 1.}
\usage{
haversine(x1, y1, x2, y2)
}
\arguments{
\item{x1}{longitude of object 1 (vector)}
\item{... | /man/haversine.Rd | no_license | maxsibilla/spew | R | false | true | 633 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/schools.R
\name{haversine}
\alias{haversine}
\title{Get the haversine distance between two points (x1, y1) and (x2, y2) scaled between 0 and 1.}
\usage{
haversine(x1, y1, x2, y2)
}
\arguments{
\item{x1}{longitude of object 1 (vector)}
\item{... |
#-------------------------------------------------------------------
# Update Date: 01/22/2020
# Create Date: 01/22/2020
# Goal: Three of the 313 SNPs are low frequency list. Find them and add them into the whole_genome_result
# Author: Haoyu Zhang
#-------------------------------------------------------------------
se... | /risk_prediction/LD_clumping/code/find_information_for_three_low_SNPs.R | no_license | andrewhaoyu/breast_cancer_data_analysis | R | false | false | 7,693 | r | #-------------------------------------------------------------------
# Update Date: 01/22/2020
# Create Date: 01/22/2020
# Goal: Three of the 313 SNPs are low frequency list. Find them and add them into the whole_genome_result
# Author: Haoyu Zhang
#-------------------------------------------------------------------
se... |
library(XBRL)
setwd("F:/R/EDINET")
# 2013年版EDINETタクソノミ:サンプルインスタンス
xbrl.dir <- "F:/R/EDINET/sample/サンプルインスタンス/X99001-000(1計算書方式)/"
xbrl.path <- paste0(xbrl.dir,"jpfr-asr-X99001-000-2013-03-31-01-2013-06-27.xbrl")
# XBRLパッケージにより報告書インスタンスを処理
xbrl.parsed <- xbrlDoAll(xbrl.path)
# 金額の定義および、文書情報の定義を抽出
dat.fac... | /main_XBRL_parser_XBRL_package.R | no_license | RBookForFE/EDINET | R | false | false | 2,936 | r | library(XBRL)
setwd("F:/R/EDINET")
# 2013年版EDINETタクソノミ:サンプルインスタンス
xbrl.dir <- "F:/R/EDINET/sample/サンプルインスタンス/X99001-000(1計算書方式)/"
xbrl.path <- paste0(xbrl.dir,"jpfr-asr-X99001-000-2013-03-31-01-2013-06-27.xbrl")
# XBRLパッケージにより報告書インスタンスを処理
xbrl.parsed <- xbrlDoAll(xbrl.path)
# 金額の定義および、文書情報の定義を抽出
dat.fac... |
#' Text translation: getText
#'
#' Each element of the text vector \code{msg} is translated in the current target language.
#' If the translation of a text element is not possible then the original text is delivered.
#'
#' @param msg character: text vector to translate
#' @param env widget: language widget
#'
#' @de... | /R/widgetLanguage.R | no_license | sigbertklinke/mmstat | R | false | false | 6,409 | r | #' Text translation: getText
#'
#' Each element of the text vector \code{msg} is translated in the current target language.
#' If the translation of a text element is not possible then the original text is delivered.
#'
#' @param msg character: text vector to translate
#' @param env widget: language widget
#'
#' @de... |
## The plot1.R does the following.
## 1. Download the data from the URL
## 2. Extract the ZIP file
## 3. Read the data while filtering it to sepcific dates
## 4. Create date time field and change data type to numeric for global active power
## 5. Open graphics device png and write the hist... | /Documents/courseradatascience/plot1.R | no_license | VarunBhandary/Coursera_ExploratoryDataAnalysis | R | false | false | 2,075 | r | ## The plot1.R does the following.
## 1. Download the data from the URL
## 2. Extract the ZIP file
## 3. Read the data while filtering it to sepcific dates
## 4. Create date time field and change data type to numeric for global active power
## 5. Open graphics device png and write the hist... |
# Exercise 4: DPLYR and flights data
# Install the nycflights13 package and read it in. Require the dplyr package
# install.packages("nycflights13")
library(nycflights13)
library(dplyr)
# The data.frame flights should now be accessible to you. View it,
# and get some basic information about the number of rows/colu... | /exercise-4/exercise.R | permissive | lelogem/ch10-dplyr | R | false | false | 1,332 | r | # Exercise 4: DPLYR and flights data
# Install the nycflights13 package and read it in. Require the dplyr package
# install.packages("nycflights13")
library(nycflights13)
library(dplyr)
# The data.frame flights should now be accessible to you. View it,
# and get some basic information about the number of rows/colu... |
#' @title Check if point is element of given convex set
#' @description isElementOfConvexSet checks if a point is included
#' in a given convex set (using the package rcdd in order to do so)
#' @name isElementOfConvexSet
#' @noRd
#' @template author/FM
#' @template author/JA
#' @template author/NC
#' @template... | /R/CheckAllocationInConvexSet.R | no_license | cran/CoopGame | R | false | false | 1,962 | r | #' @title Check if point is element of given convex set
#' @description isElementOfConvexSet checks if a point is included
#' in a given convex set (using the package rcdd in order to do so)
#' @name isElementOfConvexSet
#' @noRd
#' @template author/FM
#' @template author/JA
#' @template author/NC
#' @template... |
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setinverse <- function(inverse) i <<- inverse
getinverse <- function() i
list(set = set,
get = get,
setinverse = setinverse,
getinverse = getinvers... | /cachematrix.R | no_license | sdaksh220/r-code | R | false | false | 735 | r |
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setinverse <- function(inverse) i <<- inverse
getinverse <- function() i
list(set = set,
get = get,
setinverse = setinverse,
getinverse = getinvers... |
library("data.table")
library("ggplot2")
#download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
# , destfile = paste(path, "dataFiles.zip", sep = "/"))
#unzip(zipfile = "dataFiles.zip")
# Load the NEI & SCC data frames.
NEI <- data.table::as.data.table(x = readR... | /plot5.R | no_license | ruparamesh/Course-Project-2 | R | false | false | 1,083 | r | library("data.table")
library("ggplot2")
#download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
# , destfile = paste(path, "dataFiles.zip", sep = "/"))
#unzip(zipfile = "dataFiles.zip")
# Load the NEI & SCC data frames.
NEI <- data.table::as.data.table(x = readR... |
#Process seqtab to simplify
seqtab <- readRDS("seqscope/data/dros_data/dros_seqtab.rds")
library(tidyverse)
seqtab_filt <- seqtab %>%
as.data.frame() %>%
mutate(SampleID = rownames(.)) %>%
filter(str_detect(SampleID, "_Rep1"))%>%
mutate(SampleID = str_replace(SampleID, pattern="_Rep1", replacement = "")) %>%... | /seqscope/data/dros_data/dros_data_processing.R | no_license | alexpiper/seqscope | R | false | false | 1,330 | r |
#Process seqtab to simplify
seqtab <- readRDS("seqscope/data/dros_data/dros_seqtab.rds")
library(tidyverse)
seqtab_filt <- seqtab %>%
as.data.frame() %>%
mutate(SampleID = rownames(.)) %>%
filter(str_detect(SampleID, "_Rep1"))%>%
mutate(SampleID = str_replace(SampleID, pattern="_Rep1", replacement = "")) %>%... |
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this d... | /models/basgra/R/write.config.BASGRA.R | permissive | dlebauer/pecan | R | false | false | 25,864 | r | #-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this d... |
# 1. Faça um script que seja capaz de baixar a base de dados utilizada pelo
# pesqEle. Ela pode ser acessada pelo botão "Download" na direita superior do
# app.
library(webdriver)
library(magrittr)
pjs <- run_phantomjs()
ses <- Session$new(port = pjs$port)
u_pesqele <- "https://rseis.shinyapps.io/pesqEle/"
ses$go(u... | /exercicios/13-pesqele.R | no_license | rgcardos/202106-web-scraping | R | false | false | 678 | r | # 1. Faça um script que seja capaz de baixar a base de dados utilizada pelo
# pesqEle. Ela pode ser acessada pelo botão "Download" na direita superior do
# app.
library(webdriver)
library(magrittr)
pjs <- run_phantomjs()
ses <- Session$new(port = pjs$port)
u_pesqele <- "https://rseis.shinyapps.io/pesqEle/"
ses$go(u... |
#Nicholson's Blow Flies (Gurney et al 1983)
#Reproducing the first example in 'The systematic formulation of tractable single-species population models incorporating age structure'
#by WSC Gurney, RM Nisbet and J Lawton, Journal of Animal Ecology, 52, p479-495, 1983
#library(stagePop)
#All the vectors are specified i... | /stagePop/inst/DemoFiles/BlowFlies.R | permissive | HelenKettle/StagePop | R | false | false | 2,318 | r | #Nicholson's Blow Flies (Gurney et al 1983)
#Reproducing the first example in 'The systematic formulation of tractable single-species population models incorporating age structure'
#by WSC Gurney, RM Nisbet and J Lawton, Journal of Animal Ecology, 52, p479-495, 1983
#library(stagePop)
#All the vectors are specified i... |
rm(list = ls())
data=read.csv("Cereals.csv", sep=",", header = TRUE)
data=data[,-c(1)]
data1=scale(data)
sum(is.na(data1))
data1=knnImputation(data1,k=10)
data_kmeans=kmeans(data1,6)
data_kmeans$cluster
data_kmeans$withinss # within the cluster
data_kmeans$tot.withinss
sum(data_kmeans$tot.withinss)... | /Kmeans_practice.R | no_license | beetoogoswami/Kmeans-with-R | R | false | false | 1,923 | r | rm(list = ls())
data=read.csv("Cereals.csv", sep=",", header = TRUE)
data=data[,-c(1)]
data1=scale(data)
sum(is.na(data1))
data1=knnImputation(data1,k=10)
data_kmeans=kmeans(data1,6)
data_kmeans$cluster
data_kmeans$withinss # within the cluster
data_kmeans$tot.withinss
sum(data_kmeans$tot.withinss)... |
# Box's M-test for testing homogeneity of covariance matrices
#
# Written by Andy Liaw (2004) converted from Matlab
# Andy's note indicates that he has left the original Matlab comments intact
#
#
# Slight clean-up and fix with corrected documentation provided by Ranjan Maitra (2012)
#
BoxMTest <- function(X, cl, alp... | /BoxMTest.R | no_license | ebratt/csc424_project | R | false | false | 7,485 | r | # Box's M-test for testing homogeneity of covariance matrices
#
# Written by Andy Liaw (2004) converted from Matlab
# Andy's note indicates that he has left the original Matlab comments intact
#
#
# Slight clean-up and fix with corrected documentation provided by Ranjan Maitra (2012)
#
BoxMTest <- function(X, cl, alp... |
BeNM <-
function(times, delta) {
K <- max(times)
tao <- seq(0, K)
t.unc <- sort(times[delta == 1])
n <- cut(t.unc,tao) %>% table %>% as.character %>% readr::parse_integer()
m <- tao[-1] %>% purrr::map_int(~length(times[times > .x]))
out <- list(n = n, m = m, tao = tao, K = K, t.unc = t.unc)
... | /R/BeNM.R | no_license | cran/BGPhazard | R | false | false | 331 | r | BeNM <-
function(times, delta) {
K <- max(times)
tao <- seq(0, K)
t.unc <- sort(times[delta == 1])
n <- cut(t.unc,tao) %>% table %>% as.character %>% readr::parse_integer()
m <- tao[-1] %>% purrr::map_int(~length(times[times > .x]))
out <- list(n = n, m = m, tao = tao, K = K, t.unc = t.unc)
... |
# Exploratory Data Analysis
# Ranew Mohydin
# Assignment 1 - Plot 2
# Set working Directory
setwd("/Users/mac/Google Drive/University/Online Courses/Exploratory Data Analysis/Assignment 1")
install.packages("lubridate")
library(lubridate)
# Load the data and tidy that shit up
data <- read.csv("household_power_consum... | /plot2.R | no_license | Ranew/ExData_Plotting1 | R | false | false | 902 | r | # Exploratory Data Analysis
# Ranew Mohydin
# Assignment 1 - Plot 2
# Set working Directory
setwd("/Users/mac/Google Drive/University/Online Courses/Exploratory Data Analysis/Assignment 1")
install.packages("lubridate")
library(lubridate)
# Load the data and tidy that shit up
data <- read.csv("household_power_consum... |
library(spdep)
### Name: knearneigh
### Title: K nearest neighbours for spatial weights
### Aliases: knearneigh
### Keywords: spatial
### ** Examples
if (require(rgdal, quietly=TRUE)) {
example(columbus, package="spData")
coords <- coordinates(columbus)
col.knn <- knearneigh(coords, k=4)
plot(columbus, border="grey... | /data/genthat_extracted_code/spdep/examples/knearneigh.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,258 | r | library(spdep)
### Name: knearneigh
### Title: K nearest neighbours for spatial weights
### Aliases: knearneigh
### Keywords: spatial
### ** Examples
if (require(rgdal, quietly=TRUE)) {
example(columbus, package="spData")
coords <- coordinates(columbus)
col.knn <- knearneigh(coords, k=4)
plot(columbus, border="grey... |
## Functions to provide a chaching facility for matrix inverse
## Wraps a square matrix into a list structure capable of caching its inverse
makeCacheMatrix <- function(x = matrix()) {
## 'x' should be a square (invertible) matrix
inverse <- NULL
# accessor methods for the original matrix
# (this is ... | /cachematrix.R | no_license | danielerapati/ProgrammingAssignment2 | R | false | false | 1,262 | r | ## Functions to provide a chaching facility for matrix inverse
## Wraps a square matrix into a list structure capable of caching its inverse
makeCacheMatrix <- function(x = matrix()) {
## 'x' should be a square (invertible) matrix
inverse <- NULL
# accessor methods for the original matrix
# (this is ... |
# The cdc data frame is already loaded into the workspace.
# Create the frequency table here:
table(cdc$genhlth)
# Create the relative frequency table here:
table(cdc$genhlth)/dim(cdc)[1]
| /data-analysis-and-statistical-inference/lab-1-introduction-to-data-2/Turning info into knowledge - Categorical data.R | no_license | oliverwreath/R_Practise | R | false | false | 190 | r | # The cdc data frame is already loaded into the workspace.
# Create the frequency table here:
table(cdc$genhlth)
# Create the relative frequency table here:
table(cdc$genhlth)/dim(cdc)[1]
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tables.R
\name{fdStat}
\alias{fdStat}
\title{Display a statistic}
\usage{
fdStat(name, value, color = "green", note = name, pct = value * 100,
showBar = TRUE, digits = 4)
}
\arguments{
\item{name}{name to indicate for the progress bar.}
\i... | /man/fdStat.Rd | permissive | c-schellenger/flightdeck | R | false | true | 625 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tables.R
\name{fdStat}
\alias{fdStat}
\title{Display a statistic}
\usage{
fdStat(name, value, color = "green", note = name, pct = value * 100,
showBar = TRUE, digits = 4)
}
\arguments{
\item{name}{name to indicate for the progress bar.}
\i... |
desens_decay_extract <- function(genotype, #mandatory genotype, should be text
pulse_length = 60, # time of pulse in seconds
n_pulses = 5) {
library(tidyverse)
library(magrittr)
pulse_length <- 60
n_pulses <- 5
filename <- file.choose()
data <- read_... | /R/desens_decay_extract.R | no_license | SenguptaLab/Calcium_imaging_scripts | R | false | false | 4,092 | r | desens_decay_extract <- function(genotype, #mandatory genotype, should be text
pulse_length = 60, # time of pulse in seconds
n_pulses = 5) {
library(tidyverse)
library(magrittr)
pulse_length <- 60
n_pulses <- 5
filename <- file.choose()
data <- read_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cor.cont.R
\name{cor.cont}
\alias{cor.cont}
\title{Pearson's Contingency Coefficient}
\usage{
cor.cont(x, adjust = FALSE, tri = c("both", "lower", "upper"), digits = 2,
as.na = NULL, check = TRUE, output = TRUE)
}
\arguments... | /man/cor.cont.Rd | no_license | cran/misty | R | false | true | 3,089 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cor.cont.R
\name{cor.cont}
\alias{cor.cont}
\title{Pearson's Contingency Coefficient}
\usage{
cor.cont(x, adjust = FALSE, tri = c("both", "lower", "upper"), digits = 2,
as.na = NULL, check = TRUE, output = TRUE)
}
\arguments... |
# This strategy uses a dual donchian channels (breakout and close), to either a) go long if the close
# is above the breakout channel or b) short if the closee is below the breakout channel
# There is a rebalancing rule that enables us to compare being 100% invested in this strategy to
# buy and hold. An ATR based sto... | /turtle_1eqOpt.R | no_license | ssh352/Turtle | R | false | false | 9,801 | r | # This strategy uses a dual donchian channels (breakout and close), to either a) go long if the close
# is above the breakout channel or b) short if the closee is below the breakout channel
# There is a rebalancing rule that enables us to compare being 100% invested in this strategy to
# buy and hold. An ATR based sto... |
context("teste da funcao primeirasMedicoes")
test_that("firstsMeasurements", {
dtf = data.frame(
grupo = c(1,2,3,4,1,2,3,4),
medicoes= c(10,20,30,40,5,30,1,52))
primeiraMedicao = c(5, 5, 20, 20, 1, 1, 40, 40)
expect_equal(primeiraMedicao, firstsMeasurements(dtf, group = "grupo", age = "medicoes")$primeir... | /tests/testthat/testPrimeirasMedicoes.R | no_license | cran/ITGM | R | false | false | 333 | r | context("teste da funcao primeirasMedicoes")
test_that("firstsMeasurements", {
dtf = data.frame(
grupo = c(1,2,3,4,1,2,3,4),
medicoes= c(10,20,30,40,5,30,1,52))
primeiraMedicao = c(5, 5, 20, 20, 1, 1, 40, 40)
expect_equal(primeiraMedicao, firstsMeasurements(dtf, group = "grupo", age = "medicoes")$primeir... |
#' Upsert redshift table
#'
#' Upload a table to S3 and then load it with redshift, replacing rows with the same
#' keys, and inserting rows with new keys.
#' The table on redshift has to have the same structure and column ordering to work correctly.
#'
#' @param data a data frame
#' @param dbcon an RPostgres connectio... | /R/redshift-upsert.R | permissive | zapier/redshiftTools | R | false | false | 5,101 | r | #' Upsert redshift table
#'
#' Upload a table to S3 and then load it with redshift, replacing rows with the same
#' keys, and inserting rows with new keys.
#' The table on redshift has to have the same structure and column ordering to work correctly.
#'
#' @param data a data frame
#' @param dbcon an RPostgres connectio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.