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 |
|---|---|---|---|---|---|---|---|---|---|
# Set the working directory
setwd("~/Coursera/Data Science Specialization/4. Exploratory Data Analysis/ExData_Plotting1")
# Load the entire data from the text file into R
data_file <- "./data/household_power_consumption.txt"
# Declare the variable types to speed up the data load Do not convert the date
# strings to on... | /plot3.R | no_license | isdsc/ExData_Plotting1 | R | false | false | 1,864 | r | # Set the working directory
setwd("~/Coursera/Data Science Specialization/4. Exploratory Data Analysis/ExData_Plotting1")
# Load the entire data from the text file into R
data_file <- "./data/household_power_consumption.txt"
# Declare the variable types to speed up the data load Do not convert the date
# strings to on... |
rm(list = ls())
library(Daniel)
library(dplyr)
library(nnet)
CalcCImultinom <- function(fit)
{
s <- summary(fit)
coef <- s$coefficients
ses <- s$standard.errors
ci.1 <- coef[1,2] + c(-1, 1)*1.96*ses[1, 2]
ci.2 <- coef[2,2] + c(-1, 1)*1.96*ses[2, 2]
return(rbind(ci.1,ci.2))
}
#key
# A, B,C,D,E,F - betaE[2] =... | /Simulations/Scripts/R/Rare/Scenario 13/CMPEn50KrareScen13FB.R | no_license | yadevi/CausalMPE | R | false | false | 4,220 | r | rm(list = ls())
library(Daniel)
library(dplyr)
library(nnet)
CalcCImultinom <- function(fit)
{
s <- summary(fit)
coef <- s$coefficients
ses <- s$standard.errors
ci.1 <- coef[1,2] + c(-1, 1)*1.96*ses[1, 2]
ci.2 <- coef[2,2] + c(-1, 1)*1.96*ses[2, 2]
return(rbind(ci.1,ci.2))
}
#key
# A, B,C,D,E,F - betaE[2] =... |
library('tidyverse')
x = list(a = 1, b = 2)
x[1]
x$c = 1
x$d = 2
x$a = NULL
x$b == 2
z = x$b
z = 9
x
names(x)[1] #keys
x$a #keys
x[['a']] #values
x[[1]] #values
#this is like a list of tuples
z = unlist(x)
z[1]
names(z)[1] #keys
z[[1]] #values
| /dictionaries.r | permissive | CNuge/UGRU | R | false | false | 264 | r | library('tidyverse')
x = list(a = 1, b = 2)
x[1]
x$c = 1
x$d = 2
x$a = NULL
x$b == 2
z = x$b
z = 9
x
names(x)[1] #keys
x$a #keys
x[['a']] #values
x[[1]] #values
#this is like a list of tuples
z = unlist(x)
z[1]
names(z)[1] #keys
z[[1]] #values
|
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
cleanAngles <- function(as) {
.Call('mta2_cleanAngles', PACKAGE = 'mta2', as)
}
distMat <- function(x, y, power = 2L) {
.Call('mta2_distMat', PACKAGE = 'mta2', x, y, power)
}
distMatV <- function(x, y... | /R/RcppExports.R | no_license | jmbh/mta2 | R | false | false | 3,201 | r | # This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
cleanAngles <- function(as) {
.Call('mta2_cleanAngles', PACKAGE = 'mta2', as)
}
distMat <- function(x, y, power = 2L) {
.Call('mta2_distMat', PACKAGE = 'mta2', x, y, power)
}
distMatV <- function(x, y... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pumpcurve.R
\name{pumpcurve}
\alias{pumpcurve}
\title{Fits a polynomial curve to three or more points from a pump characteristic
curve. This allows solving for an operating point of the pump in a
piping system.}
\usage{
pumpcurve(Q = NULL, h... | /man/pumpcurve.Rd | no_license | ratral/hydraulics | R | false | true | 2,273 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pumpcurve.R
\name{pumpcurve}
\alias{pumpcurve}
\title{Fits a polynomial curve to three or more points from a pump characteristic
curve. This allows solving for an operating point of the pump in a
piping system.}
\usage{
pumpcurve(Q = NULL, h... |
## Introduction Page to your Dashboard
intro.box <- fluidPage(
includeMarkdown("intro/intro.md")
) | /shinyDash/BeginningDashBoardExample/intro/intro.R | permissive | davidmeza1/NASADatanauts | R | false | false | 103 | r | ## Introduction Page to your Dashboard
intro.box <- fluidPage(
includeMarkdown("intro/intro.md")
) |
#generate 2-dim norm distribution
#set sigma,u,mean
sigma1 = matrix(c(1,0.3,0.3,2),2,2);
sigma2 = matrix(c(3,0.4,0.4,1),2,2);
sigma = list(sigma1,sigma2);
u1 = matrix(c(1,4),2,1);
u2 = matrix(c(-2,-1),2,1);
u = list(u1,u2);
x1 = matrix(c(1,4),2,1);
x2 = matrix(c(-2,-1),2,1);
x = list(x1,x2);
N = 5000;
X = matrix(... | /Statistical Computation/HW4/LaTex/H4_5.R | no_license | haley-hqyu/Fudan-Univ | R | false | false | 1,364 | r | #generate 2-dim norm distribution
#set sigma,u,mean
sigma1 = matrix(c(1,0.3,0.3,2),2,2);
sigma2 = matrix(c(3,0.4,0.4,1),2,2);
sigma = list(sigma1,sigma2);
u1 = matrix(c(1,4),2,1);
u2 = matrix(c(-2,-1),2,1);
u = list(u1,u2);
x1 = matrix(c(1,4),2,1);
x2 = matrix(c(-2,-1),2,1);
x = list(x1,x2);
N = 5000;
X = matrix(... |
library(tidyverse)
data <- read.csv("incarceration_trends.csv")
#######################################
# P1: 5 pieces of summary information
#######################################
# 1. number of features and elements
num_features <- length(data)
num_elements <- (length(data) * length(data$year))
# 2. range of yea... | /analysis.R | permissive | burnhc/incarceration-trends | R | false | false | 6,944 | r | library(tidyverse)
data <- read.csv("incarceration_trends.csv")
#######################################
# P1: 5 pieces of summary information
#######################################
# 1. number of features and elements
num_features <- length(data)
num_elements <- (length(data) * length(data$year))
# 2. range of yea... |
## Semi-discrete storage effect AND relative nonlinearity
## model of two species coexisting on one essential resource
####
#### 3/19/2014
#### atredenn@gmail.com
####
## MODEL DESCRIPTION
# species "split" themselves between a dormant, low-mortaility stage (D) and
# a higher mortality, high growth stage... | /modelCode/oldVersions/continuousStorageEffect_RelNonlin_CR.R | permissive | atredennick/Coexistence-Stability | R | false | false | 3,007 | r | ## Semi-discrete storage effect AND relative nonlinearity
## model of two species coexisting on one essential resource
####
#### 3/19/2014
#### atredenn@gmail.com
####
## MODEL DESCRIPTION
# species "split" themselves between a dormant, low-mortaility stage (D) and
# a higher mortality, high growth stage... |
#run in command line as follows:
#Rscript b:/HestiaSpatialAllocation.R "B:/baltimore/shared.csv" "B:/baltimore/output.csv"
library("foreign")
rm(list=ls())
sourceFile = ""
destFile = ""
args = commandArgs(trailingOnly=TRUE)
if (length(args) > 1) {
sourceFile = args[1]
destFile = args[2]
}
src_tb <-... | /copydbf.R | no_license | ljm355/EmissionsDataProcessing | R | false | false | 716 | r | #run in command line as follows:
#Rscript b:/HestiaSpatialAllocation.R "B:/baltimore/shared.csv" "B:/baltimore/output.csv"
library("foreign")
rm(list=ls())
sourceFile = ""
destFile = ""
args = commandArgs(trailingOnly=TRUE)
if (length(args) > 1) {
sourceFile = args[1]
destFile = args[2]
}
src_tb <-... |
#' MScPack
#' Description: Testing SampleDfmLoads function
#' Author: Rafael Barcellos
#' Last updated: 18th June, 2014
#' R 3.1.0
library(MScPack)
# sourcing DFM(2, 3) ------------------------------------------------------
source("tests/RandGenDfm2Var3.R")
# calling functions --------------------------------------... | /tests/SampleDfmLoadsTest.R | no_license | rbarcellos/MScPack | R | false | false | 3,367 | r | #' MScPack
#' Description: Testing SampleDfmLoads function
#' Author: Rafael Barcellos
#' Last updated: 18th June, 2014
#' R 3.1.0
library(MScPack)
# sourcing DFM(2, 3) ------------------------------------------------------
source("tests/RandGenDfm2Var3.R")
# calling functions --------------------------------------... |
context("GoogleNewsSource")
test_that("GoogleNewsSource",{
lengthcorp <- 20
query <- "Microsoft"
testcorp <- WebCorpus(GoogleNewsSource(query,
params = list(hl = "en", q = query, ie = "utf-8",
num = lengthcorp, output = "rss")))
# Check Corpus object
expect_that(length(testcorp), equals(lengthc... | /tm.plugin.webmining/tests/testthat/test-source-googlenews.R | no_license | ingted/R-Examples | R | false | false | 1,771 | r | context("GoogleNewsSource")
test_that("GoogleNewsSource",{
lengthcorp <- 20
query <- "Microsoft"
testcorp <- WebCorpus(GoogleNewsSource(query,
params = list(hl = "en", q = query, ie = "utf-8",
num = lengthcorp, output = "rss")))
# Check Corpus object
expect_that(length(testcorp), equals(lengthc... |
#' Dichromat (colour-blind) palette (discrete)
#'
#' @param name Name of colour palette.
#' @importFrom dichromat colorschemes
#' @export
#' @examples
#' show_col(dichromat_pal("BluetoOrange.10")(10))
#' show_col(dichromat_pal("BluetoOrange.10")(5))
#'
#' # Can use with gradient_n to create a continous gradient
#' cols... | /R/pal-dichromat.r | no_license | strongh/scales | R | false | false | 666 | r | #' Dichromat (colour-blind) palette (discrete)
#'
#' @param name Name of colour palette.
#' @importFrom dichromat colorschemes
#' @export
#' @examples
#' show_col(dichromat_pal("BluetoOrange.10")(10))
#' show_col(dichromat_pal("BluetoOrange.10")(5))
#'
#' # Can use with gradient_n to create a continous gradient
#' cols... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lib_plot_jackknife.R
\name{revolver_plt_jackknife_coclust}
\alias{revolver_plt_jackknife_coclust}
\title{Plot jackknife statistics for co-clustering (heatmap).}
\usage{
revolver_plt_jackknife_coclust(x, cutoff.annotate.numbers = 0.6,
palett... | /man/revolver_plt_jackknife_coclust.Rd | no_license | jh2663/revolver | R | false | true | 939 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lib_plot_jackknife.R
\name{revolver_plt_jackknife_coclust}
\alias{revolver_plt_jackknife_coclust}
\title{Plot jackknife statistics for co-clustering (heatmap).}
\usage{
revolver_plt_jackknife_coclust(x, cutoff.annotate.numbers = 0.6,
palett... |
#!/usr/bin/env Rscript
# From https://github.com/berkeley-dsep-infra/datahub/issues/1103 && https://github.com/berkeley-dsep-infra/datahub/issues/4203
# eep 1118, Spring 2023
print("Installing packages for EEP 1118")
source("/tmp/class-libs.R")
class_name="EEP 1118"
class_libs = c(
"car", "3.0-10",
"psych", ... | /deployments/datahub/images/default/r-packages/eep-1118.r | permissive | berkeley-dsep-infra/datahub | R | false | false | 452 | r | #!/usr/bin/env Rscript
# From https://github.com/berkeley-dsep-infra/datahub/issues/1103 && https://github.com/berkeley-dsep-infra/datahub/issues/4203
# eep 1118, Spring 2023
print("Installing packages for EEP 1118")
source("/tmp/class-libs.R")
class_name="EEP 1118"
class_libs = c(
"car", "3.0-10",
"psych", ... |
#
library(party)
###############################################
## Conditional inference Classification Tree ##
###############################################
for(i in 1:10){
#generate model
model <- ctree(formulaClass, balancedData[trainPartitions[[i]], ])
#predict over test fold
predictions <- predict(mod... | /cicTree.R | no_license | valeman/Imbalanced-Data-analysis-in-R---KAGGLE-competition | R | false | false | 666 | r | #
library(party)
###############################################
## Conditional inference Classification Tree ##
###############################################
for(i in 1:10){
#generate model
model <- ctree(formulaClass, balancedData[trainPartitions[[i]], ])
#predict over test fold
predictions <- predict(mod... |
CC <- data_testing$avg_cc;
data_testing$target <- predictions/CC;
orderedData <- data_testing[order(-data_testing$target),];
orderedData$target <- NULL;
write.csv(orderedData,"E:\\STUDY\\THESIS\\STEP-WISE REGRESSION\\testDataOrderedByPredictions.csv",row.names=F);
cumulativeLOC <- cumsum(orderedData$loc);
cumulat... | /predictedPerCC.r | permissive | sriramdhanvi/step-wise-linear-regression | R | false | false | 629 | r | CC <- data_testing$avg_cc;
data_testing$target <- predictions/CC;
orderedData <- data_testing[order(-data_testing$target),];
orderedData$target <- NULL;
write.csv(orderedData,"E:\\STUDY\\THESIS\\STEP-WISE REGRESSION\\testDataOrderedByPredictions.csv",row.names=F);
cumulativeLOC <- cumsum(orderedData$loc);
cumulat... |
lcy.stat.multivariateScatter <- function(data, byrow=TRUE, output=NULL,...){
require(car)
if(byrow){
data <- data
}
if(!is.null(output)){
pdf(output);
}
scatterplotMatrix(data, ...)
if(!is.null(output)){
dev.off();
}
}
| /lcyR/R/lcy.stat.multivariateScatter.R | no_license | farscape2012/rpkg | R | false | false | 275 | r | lcy.stat.multivariateScatter <- function(data, byrow=TRUE, output=NULL,...){
require(car)
if(byrow){
data <- data
}
if(!is.null(output)){
pdf(output);
}
scatterplotMatrix(data, ...)
if(!is.null(output)){
dev.off();
}
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/demo_data.R
\name{annoDemoMat}
\alias{annoDemoMat}
\title{annoDemoMat}
\usage{
annoDemoMat(sample.ord, demo.mat)
}
\arguments{
\item{sample.ord}{Sample order}
\item{demo.mat}{Matrix of BAF/Geno}
}
\description{
Annotate the demo SNP x Sample... | /man/annoDemoMat.Rd | permissive | quevedor2/CCLid | R | false | true | 625 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/demo_data.R
\name{annoDemoMat}
\alias{annoDemoMat}
\title{annoDemoMat}
\usage{
annoDemoMat(sample.ord, demo.mat)
}
\arguments{
\item{sample.ord}{Sample order}
\item{demo.mat}{Matrix of BAF/Geno}
}
\description{
Annotate the demo SNP x Sample... |
library(shiny)
shinyServer(
function(input, output) {
output$histplot <- renderPlot({
nsamples <- input$nsamples # obtain number of samples from ui.R
obs <- input$obs # obtain number of obs from ui.R
p <- input$p # obtain p from ui.R
set.seed(1... | /server.R | no_license | kenneth-lim/DataProducts | R | false | false | 502 | r | library(shiny)
shinyServer(
function(input, output) {
output$histplot <- renderPlot({
nsamples <- input$nsamples # obtain number of samples from ui.R
obs <- input$obs # obtain number of obs from ui.R
p <- input$p # obtain p from ui.R
set.seed(1... |
#' Get all Solr fields
#'
#' Simple helper function for [query_all_versions()] to retrieve all Solr fields.
#'
#' @return (character) A set of Solr fields.
#'
#' @importFrom stringr str_extract_all str_replace_all
#'
#' @noRd
get_solr_fields <- function() {
adc_solr <- httr::GET("https://arcticdata.io/metacat/d1/mn... | /R/query_all_versions.R | permissive | NCEAS/datamgmt | R | false | false | 4,954 | r | #' Get all Solr fields
#'
#' Simple helper function for [query_all_versions()] to retrieve all Solr fields.
#'
#' @return (character) A set of Solr fields.
#'
#' @importFrom stringr str_extract_all str_replace_all
#'
#' @noRd
get_solr_fields <- function() {
adc_solr <- httr::GET("https://arcticdata.io/metacat/d1/mn... |
#' An randomized.block.layout function
#'
#' This function allows you draw a layout of randomized block experiment design.
#' @quadrat.side The side of typical quadrates
#' @space The distance between adjacent quadrates
#' @block The number of blocks
#' @treatment The number of treatments or treatment combinations
#'... | /R/randomized.block.layout.R | no_license | liuguofang/figsci | R | false | false | 2,482 | r | #' An randomized.block.layout function
#'
#' This function allows you draw a layout of randomized block experiment design.
#' @quadrat.side The side of typical quadrates
#' @space The distance between adjacent quadrates
#' @block The number of blocks
#' @treatment The number of treatments or treatment combinations
#'... |
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
if (length(args) != 2)
{
print("Usage: $ ./processing-raw-csvs_merging-sets.R input_filename output_filename")
stop("Wrong arguments.")
}
input_filename = args[1]
output_filename = args[2]
library('plyr', lib="/afs/cern.ch/user/o/otoldaie/wor... | /jobing/processing-counters_merging-sets.R | no_license | xealits/ttbar-leptons-80X | R | false | false | 802 | r | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)
if (length(args) != 2)
{
print("Usage: $ ./processing-raw-csvs_merging-sets.R input_filename output_filename")
stop("Wrong arguments.")
}
input_filename = args[1]
output_filename = args[2]
library('plyr', lib="/afs/cern.ch/user/o/otoldaie/wor... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rTensor_Decomp.R
\name{cp}
\alias{cp}
\title{Canonical Polyadic Decomposition}
\usage{
cp(tnsr, num_components = NULL, max_iter = 25, tol = 1e-05)
}
\arguments{
\item{tnsr}{Tensor with K modes}
\item{num_components}{the number of rank-1 K-Te... | /man/cp.Rd | no_license | dosorio/rTensor | R | false | true | 2,242 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rTensor_Decomp.R
\name{cp}
\alias{cp}
\title{Canonical Polyadic Decomposition}
\usage{
cp(tnsr, num_components = NULL, max_iter = 25, tol = 1e-05)
}
\arguments{
\item{tnsr}{Tensor with K modes}
\item{num_components}{the number of rank-1 K-Te... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HK_decomposition.R
\name{predict.HK_decomposition}
\alias{predict.HK_decomposition}
\title{\code{predict} method for class \code{\link{HK_decomposition}}}
\usage{
\method{predict}{HK_decomposition}(object, param = "Delta")
}
\arguments{
\item... | /man/predict.HK_decomposition.Rd | no_license | anhnguyendepocen/causalDML | R | false | true | 662 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/HK_decomposition.R
\name{predict.HK_decomposition}
\alias{predict.HK_decomposition}
\title{\code{predict} method for class \code{\link{HK_decomposition}}}
\usage{
\method{predict}{HK_decomposition}(object, param = "Delta")
}
\arguments{
\item... |
\name{lynx}
\alias{lynx}
\title{Annual Canadian Lynx trappings 1821--1934}
\description{Annual number of lynx trapped in McKenzie river district of northwest Canada: 1821--1934.}
\usage{lynx}
\format{Time series data}
\source{Makridakis, Wheelwright and Hyndman (1998) \emph{Forecasting: methods and applications},... | /Documents/Big Data Analytics/DA and E/jupyter/fma/man/lynx.Rd | no_license | JohannesKokozela/Research_Project | R | false | false | 705 | rd | \name{lynx}
\alias{lynx}
\title{Annual Canadian Lynx trappings 1821--1934}
\description{Annual number of lynx trapped in McKenzie river district of northwest Canada: 1821--1934.}
\usage{lynx}
\format{Time series data}
\source{Makridakis, Wheelwright and Hyndman (1998) \emph{Forecasting: methods and applications},... |
library(data.table)
library(dplyr)
library(tidyr)
library(stringr)
library(caret)
library(makedummies)
# Load Data ---------------------------------------------------------------
aisles <- fread("aisles.csv")
departments <- fread("departments.csv")
orderp <- fread("order_products__prior.csv")
ordert <- fread("orde... | /notgood/marge10xgboostdart_square0.3_2.R | no_license | siero5335/Instacart-Market-Basket-Analysis_196 | R | false | false | 13,208 | r | library(data.table)
library(dplyr)
library(tidyr)
library(stringr)
library(caret)
library(makedummies)
# Load Data ---------------------------------------------------------------
aisles <- fread("aisles.csv")
departments <- fread("departments.csv")
orderp <- fread("order_products__prior.csv")
ordert <- fread("orde... |
# Compute number of observations per year
# packages: lubridate, tidyverse
tally_site_obs <- function(site_data) {
message(sprintf(' Tallying data for %s-%s', site_data$State[1], site_data$Site[1]))
site_data %>%
mutate(Year = year(Date)) %>%
# group by Site and State just to retain those columns, since we... | /2_process/src/tally_site_obs.R | no_license | amsnyder/ds-pipelines-targets-3 | R | false | false | 491 | r | # Compute number of observations per year
# packages: lubridate, tidyverse
tally_site_obs <- function(site_data) {
message(sprintf(' Tallying data for %s-%s', site_data$State[1], site_data$Site[1]))
site_data %>%
mutate(Year = year(Date)) %>%
# group by Site and State just to retain those columns, since we... |
#' @title inverse kimesurface transform on a function in different periodic ranges
#' @description This function applies the inverse kimesurface transform to convert a kimesurface-transformed function back
#' to get the original 1D function in [0, 2*pi] or other similar periodic time range.
#'
#' @param time_points a ... | /TCIU/R/inv_kimesurface_transform.R | no_license | albrizre/spatstat.revdep | R | false | false | 4,765 | r | #' @title inverse kimesurface transform on a function in different periodic ranges
#' @description This function applies the inverse kimesurface transform to convert a kimesurface-transformed function back
#' to get the original 1D function in [0, 2*pi] or other similar periodic time range.
#'
#' @param time_points a ... |
## File Name: with.NestedImputationList.R
## File Version: 0.07
##################################################################
# with function for a nested imputation list
with.NestedImputationList <- function(data, expr,fun,...){
pf<-parent.frame()
NB <- data$Nimp["Between"]
results0 <- as.list( seq... | /R/with.NestedImputationList.R | no_license | shahabjolani/miceadds | R | false | false | 1,392 | r | ## File Name: with.NestedImputationList.R
## File Version: 0.07
##################################################################
# with function for a nested imputation list
with.NestedImputationList <- function(data, expr,fun,...){
pf<-parent.frame()
NB <- data$Nimp["Between"]
results0 <- as.list( seq... |
library(data.table)
library(ggplot2)
#####################
# Config
#####################
input <- 'D:/Proyectos/ML/kaggle/Rossmann/input_original/'
output <- 'D:/Proyectos/ML/kaggle/Rossmann/output/'
#####################
# Importamos
#####################
tr <- fread(paste0(input,'train.csv'))
ts <- fread(paste... | /Rossmann JTA v0.R | no_license | amezet/SevillaR_04Dic18 | R | false | false | 4,902 | r | library(data.table)
library(ggplot2)
#####################
# Config
#####################
input <- 'D:/Proyectos/ML/kaggle/Rossmann/input_original/'
output <- 'D:/Proyectos/ML/kaggle/Rossmann/output/'
#####################
# Importamos
#####################
tr <- fread(paste0(input,'train.csv'))
ts <- fread(paste... |
library(shiny)
library(tidyverse)
library(knitr)
library(openssl)
library(DT)
library(stringr)
library(glue)
Server <- function(input, output) {
bcl_data <- read_csv("bcl-data.csv")
Filtered_bcl <- reactive({
bcl_data %>%
filter(Price >= input$priceIn[1],
Price <= input$priceIn[2],
Typ... | /hw08_Shiny_app/server.R | no_license | KateJohnson/STAT545-hw-Johnson-Kate | R | false | false | 1,023 | r | library(shiny)
library(tidyverse)
library(knitr)
library(openssl)
library(DT)
library(stringr)
library(glue)
Server <- function(input, output) {
bcl_data <- read_csv("bcl-data.csv")
Filtered_bcl <- reactive({
bcl_data %>%
filter(Price >= input$priceIn[1],
Price <= input$priceIn[2],
Typ... |
vertex.layout.correction <- function(id='(all networks)',basenetwork='(empty)',x='x',y='y',save_as='(empty)',save_to='None',debug='false'){
l <- as.list(match.call())
l2 <- list()
for (i in names(l[-1])) {
l2 <- c(l2, eval(dplyr::sym(i)))
}
names(l2) <- names(l[-1])
l3 <- c(l[1], l2)
FNA::exec_c... | /R/vertex.layout.correction.R | no_license | lubospernis/FNA_package | R | false | false | 346 | r | vertex.layout.correction <- function(id='(all networks)',basenetwork='(empty)',x='x',y='y',save_as='(empty)',save_to='None',debug='false'){
l <- as.list(match.call())
l2 <- list()
for (i in names(l[-1])) {
l2 <- c(l2, eval(dplyr::sym(i)))
}
names(l2) <- names(l[-1])
l3 <- c(l[1], l2)
FNA::exec_c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{draw_rarefaction}
\alias{draw_rarefaction}
\title{Subsample species to draw a rarefaction curve}
\usage{
draw_rarefaction(population, pts = NA, replicates = 5, ecosystem = NA)
}
\arguments{
\item{population}{The population to... | /man/draw_rarefaction.Rd | no_license | adw96/antirarefaction | R | false | true | 706 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting.R
\name{draw_rarefaction}
\alias{draw_rarefaction}
\title{Subsample species to draw a rarefaction curve}
\usage{
draw_rarefaction(population, pts = NA, replicates = 5, ecosystem = NA)
}
\arguments{
\item{population}{The population to... |
# Neural Network - Classification Multiple Variables Example
############################################################################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Set a Working Directory
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | /Neural Network/R Example/Neural Network - Classification Notes.R | no_license | MatejP1995/YouTube-Tutorials | R | false | false | 4,114 | r | # Neural Network - Classification Multiple Variables Example
############################################################################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Set a Working Directory
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
#' Collection of custom tidiers
#'
#' \lifecycle{maturing}
#' Collection of tidiers that can be passed to `tbl_regression()`
#' and `tbl_uvregression()` to obtain modified results. See examples below.
#'
#' @section Details:
#'
#' - `tidy_standardize()` tidier to report standardized coefficients. The
#' [effectsize](ht... | /R/custom_tidiers.R | permissive | emilyvertosick/gtsummary | R | false | false | 11,138 | r | #' Collection of custom tidiers
#'
#' \lifecycle{maturing}
#' Collection of tidiers that can be passed to `tbl_regression()`
#' and `tbl_uvregression()` to obtain modified results. See examples below.
#'
#' @section Details:
#'
#' - `tidy_standardize()` tidier to report standardized coefficients. The
#' [effectsize](ht... |
context("update_station_locations")
# If input is no, don't proceed ------------------------------------------------
test_that("update_station_locations() stops if 'no'", {
skip_on_cran()
f <- file()
options(bomrang_connection = f)
ans <- "no"
write(ans, f)
expect_error(update_station_locations())
op... | /tests/testthat/test-update_station_locations.R | permissive | kevstark/bomrang | R | false | false | 2,244 | r |
context("update_station_locations")
# If input is no, don't proceed ------------------------------------------------
test_that("update_station_locations() stops if 'no'", {
skip_on_cran()
f <- file()
options(bomrang_connection = f)
ans <- "no"
write(ans, f)
expect_error(update_station_locations())
op... |
\name{yhat.deploy.to.file}
\alias{yhat.deploy.to.file}
\title{Deploy a model to a file that you can then upload via the browser.}
\usage{
yhat.deploy.to.file(model_name)
}
\arguments{
\item{model_name}{name of your model}
}
\description{
This function creates a .yhat file which can be deployed
via the browser. ... | /man/yhat.deploy.to.file.Rd | no_license | 99701a0554/yhatr | R | false | false | 866 | rd | \name{yhat.deploy.to.file}
\alias{yhat.deploy.to.file}
\title{Deploy a model to a file that you can then upload via the browser.}
\usage{
yhat.deploy.to.file(model_name)
}
\arguments{
\item{model_name}{name of your model}
}
\description{
This function creates a .yhat file which can be deployed
via the browser. ... |
countPerm <- function(left, tp, fn, tn, fp, c0, c1, pi0) {
rnd <- 5
n1 <- tp + fn
n0 <- tn + fp
n <- n0 + n1
sum.fp <- gmp::as.bigz(0)
sum.fn <- gmp::as.bigz(0)
# number of permutations of false positives
# starting values
level.init <- fp
mnpsr <- ifelse(left, min( which( round((c(1:n)*c1... | /R/countPerm.R | no_license | SchroederFabian/CVOC | R | false | false | 2,614 | r |
countPerm <- function(left, tp, fn, tn, fp, c0, c1, pi0) {
rnd <- 5
n1 <- tp + fn
n0 <- tn + fp
n <- n0 + n1
sum.fp <- gmp::as.bigz(0)
sum.fn <- gmp::as.bigz(0)
# number of permutations of false positives
# starting values
level.init <- fp
mnpsr <- ifelse(left, min( which( round((c(1:n)*c1... |
219cbcf0ab34350cf153c5bf066acd89 ctrl.e#1.a#3.E#132.A#48.c#.w#7.s#63.asp.qdimacs 7571 22174 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/A1/Database/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#3.E#132.A#48.c#.w#7.s#63.asp/ctrl.e#1.a#3.E#132.A#48.c#.w#7.s#63.asp.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 91 | r | 219cbcf0ab34350cf153c5bf066acd89 ctrl.e#1.a#3.E#132.A#48.c#.w#7.s#63.asp.qdimacs 7571 22174 |
\name{fnn}
\alias{fnoisegenerator-n}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Coloured noise generating routine
}
\description{
Generates n 1/f noises with a given correlation.
}
\usage{
fn1(time, gamma, correlation)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
... | /man/fnn.Rd | no_license | janivaltteri/fnoiser | R | false | false | 1,440 | rd | \name{fnn}
\alias{fnoisegenerator-n}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Coloured noise generating routine
}
\description{
Generates n 1/f noises with a given correlation.
}
\usage{
fn1(time, gamma, correlation)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conf.R
\docType{data}
\name{flowopts}
\alias{flowopts}
\alias{opts_flow}
\alias{set_opts}
\alias{get_opts}
\alias{load_opts}
\alias{opts_flow$set}
\alias{opts_flow$get}
\alias{opts_flow$load}
\title{Default options/params used in flowr and ng... | /man/flowopts.Rd | permissive | flow-r/flowr | R | false | true | 2,770 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/conf.R
\docType{data}
\name{flowopts}
\alias{flowopts}
\alias{opts_flow}
\alias{set_opts}
\alias{get_opts}
\alias{load_opts}
\alias{opts_flow$set}
\alias{opts_flow$get}
\alias{opts_flow$load}
\title{Default options/params used in flowr and ng... |
# Load libraries ----
library(tidyverse)
## Rename models ----
RenameModels <- function(scenario_name) {
# Rename models files names
scenario_dir <- here::here("data", scenario_name)
models_dir <- here::here("data", scenario_name, "models")
files_names <- list.files(path = models_dir)
files_from <- file.path... | /src/04_rename_select_models.R | permissive | 93degree/AHMoSe-simulation-study | R | false | false | 1,736 | r | # Load libraries ----
library(tidyverse)
## Rename models ----
RenameModels <- function(scenario_name) {
# Rename models files names
scenario_dir <- here::here("data", scenario_name)
models_dir <- here::here("data", scenario_name, "models")
files_names <- list.files(path = models_dir)
files_from <- file.path... |
\name{DistMat3D-class}
\docType{class}
\alias{DistMat3D-class}
\title{
* DistMat3D class
}
\description{
Class to store effectively (large) distance matrices (up to 3D), which can be interpreted as a stack of traditional 2-D distance matrices. Therefore, the first two dimensions are of equal length and usually describ... | /man/DistMat3D-class.Rd | no_license | cran/hsdar | R | false | false | 1,864 | rd | \name{DistMat3D-class}
\docType{class}
\alias{DistMat3D-class}
\title{
* DistMat3D class
}
\description{
Class to store effectively (large) distance matrices (up to 3D), which can be interpreted as a stack of traditional 2-D distance matrices. Therefore, the first two dimensions are of equal length and usually describ... |
/DatenVorverarbeitung.R | no_license | objectiveinteraction/DeepLearningFinance | R | false | false | 9,119 | r | ||
#' Flow cytometry data
#'
#' The Raf network is implied in the regulation of cellular proliferation.
#' The data were collected by (Sachs et al., 2005).
#' Flow cytometry measurements consist in sending unique cells suspended in a fluid through a laser beam, and measuring
#' parameters of interest by collecting the lig... | /R/codes/missingActor/LiTree/data-cyto.R | no_license | Rmomal/these | R | false | false | 1,357 | r | #' Flow cytometry data
#'
#' The Raf network is implied in the regulation of cellular proliferation.
#' The data were collected by (Sachs et al., 2005).
#' Flow cytometry measurements consist in sending unique cells suspended in a fluid through a laser beam, and measuring
#' parameters of interest by collecting the lig... |
##' gompertzHaz function
##'
##' A function to define a parametric proportional hazards model where the baseline hazard is taken from a Gompertz model.
##' This function returns an object inheriting class 'basehazardspec', list of functions 'distinfo', 'basehazard', 'gradbasehazard', 'hessbasehazard',
##' 'cumbasehaza... | /spatsurv/R/gompertz.R | no_license | ingted/R-Examples | R | false | false | 5,980 | r | ##' gompertzHaz function
##'
##' A function to define a parametric proportional hazards model where the baseline hazard is taken from a Gompertz model.
##' This function returns an object inheriting class 'basehazardspec', list of functions 'distinfo', 'basehazard', 'gradbasehazard', 'hessbasehazard',
##' 'cumbasehaza... |
#' Activate
#'
#' Set the context for subsequent manipulations.
#'
#' `activate` puts the named variable first
#' `active` gets and sets the active variable
#' @param .data NetCDF object
#' @param what name of a variable
#' @param ... reserved, currently ignored
#' @param select_var optional argument to set selected... | /R/activate.R | no_license | dlebauer/tidync | R | false | false | 3,599 | r |
#' Activate
#'
#' Set the context for subsequent manipulations.
#'
#' `activate` puts the named variable first
#' `active` gets and sets the active variable
#' @param .data NetCDF object
#' @param what name of a variable
#' @param ... reserved, currently ignored
#' @param select_var optional argument to set selected... |
#load library
library(caret)
library(tidyverse)
library(mlbench)
install.packages('e1071', dependencies=TRUE)
# load dataset
data("Sonar")
# preview dataset
View(Sonar)
glimpse(Sonar)
# check completeness?
mean(complete.cases(Sonar))
# review column Class
table(Sonar$Class)
# -----------------------------------
# ... | /Machine Learning in R/M3.R | no_license | nbudagosa/R_Practice | R | false | false | 1,498 | r | #load library
library(caret)
library(tidyverse)
library(mlbench)
install.packages('e1071', dependencies=TRUE)
# load dataset
data("Sonar")
# preview dataset
View(Sonar)
glimpse(Sonar)
# check completeness?
mean(complete.cases(Sonar))
# review column Class
table(Sonar$Class)
# -----------------------------------
# ... |
# Functions to extract historical prices and vols from CPSPROD, foitsox.
# With RODBC it takes about two min to get all prices for one day.
#
# Written by Adrian Dragulescu on 23-Nov-2006
get.one.day.prices <- function(day, options){ # about 2 min
cat(paste("Get all prices for", day, "... "))
query <- paste("S... | /R Extension/RMG/Energy/VaR/Overnight/get.historical.prices.R | no_license | uhasan1/QLExtension-backup | R | false | false | 2,870 | r | # Functions to extract historical prices and vols from CPSPROD, foitsox.
# With RODBC it takes about two min to get all prices for one day.
#
# Written by Adrian Dragulescu on 23-Nov-2006
get.one.day.prices <- function(day, options){ # about 2 min
cat(paste("Get all prices for", day, "... "))
query <- paste("S... |
# combine lcs back
library(data.table)
library(tidyverse)
library(stringr)
library(halpme)
library(GenomicRanges)
library(stringdist)
library(Biostrings)
options(stringsAsFactors = F)
for(org in c('arabidopsis','yeast', 'zebrafish','human')){
load(paste0("data/",org,"/ALLDATA_upto_lcs.rdata"))
# fi... | /scripts/recombine_lcs_data.R | no_license | signalbash/borf_analysis | R | false | false | 6,844 | r | # combine lcs back
library(data.table)
library(tidyverse)
library(stringr)
library(halpme)
library(GenomicRanges)
library(stringdist)
library(Biostrings)
options(stringsAsFactors = F)
for(org in c('arabidopsis','yeast', 'zebrafish','human')){
load(paste0("data/",org,"/ALLDATA_upto_lcs.rdata"))
# fi... |
library(foreach)
library(doParallel)
library(iterators)
library(MASS)
library(kernlab)
library(REBayes)
library(ggplot2)
library(gridExtra)
library(truncdist)
suppressMessages(suppressWarnings(library(CVXR)))
source('ksd_lib_dev.R')
#------------------- Parameters ----------------------------
n.... | /Binomial/binom_k0_scenario3.R | no_license | trambakbanerjee/DLE_paper | R | false | false | 7,224 | r |
library(foreach)
library(doParallel)
library(iterators)
library(MASS)
library(kernlab)
library(REBayes)
library(ggplot2)
library(gridExtra)
library(truncdist)
suppressMessages(suppressWarnings(library(CVXR)))
source('ksd_lib_dev.R')
#------------------- Parameters ----------------------------
n.... |
#' emoji version of time
#'
#' @param time a `POSIXct` object
#'
#' @return an emoji clock that is the closest to the given time
#'
#' @examples
#' \dontrun{
#' clock( Sys.time() )
#' }
#'
#' @importFrom dplyr filter
#' @importFrom stringr str_detect
#' @export
clock <- function(time){
hour <- as.numeric( format(ti... | /R/clock.R | no_license | economistgame/emo | R | false | false | 818 | r | #' emoji version of time
#'
#' @param time a `POSIXct` object
#'
#' @return an emoji clock that is the closest to the given time
#'
#' @examples
#' \dontrun{
#' clock( Sys.time() )
#' }
#'
#' @importFrom dplyr filter
#' @importFrom stringr str_detect
#' @export
clock <- function(time){
hour <- as.numeric( format(ti... |
rm(list=ls())
setwd("~/Documents/Research/m6A/Drosophila/dm6/")
library(Biostrings)
library(stringi)
library(foreach)
library(doMC)
registerDoMC()
rev.comp<-function(x,rev=TRUE)
{
x<-toupper(x)
y<-rep("N",nchar(x))
xx<-unlist(strsplit(x,NULL))
for (bbb in 1:nchar(x))
{
if(xx[bbb]=="A") y[bbb]<-"T"
... | /Data/2_dm6_neighbour.R | permissive | heroalone/DeepM6A | R | false | false | 4,745 | r | rm(list=ls())
setwd("~/Documents/Research/m6A/Drosophila/dm6/")
library(Biostrings)
library(stringi)
library(foreach)
library(doMC)
registerDoMC()
rev.comp<-function(x,rev=TRUE)
{
x<-toupper(x)
y<-rep("N",nchar(x))
xx<-unlist(strsplit(x,NULL))
for (bbb in 1:nchar(x))
{
if(xx[bbb]=="A") y[bbb]<-"T"
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tgme.R
\name{tgme}
\alias{tgme}
\title{Send a message to telegram bot.}
\usage{
tgme(text, bot_name = "rstudio_server", user_name = "me")
}
\arguments{
\item{text}{A message to send.}
\item{bot_name}{A name of the Telegram Bot}
\item{user_n... | /man/tgme.Rd | permissive | atsyplenkov/tgme | R | false | true | 523 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tgme.R
\name{tgme}
\alias{tgme}
\title{Send a message to telegram bot.}
\usage{
tgme(text, bot_name = "rstudio_server", user_name = "me")
}
\arguments{
\item{text}{A message to send.}
\item{bot_name}{A name of the Telegram Bot}
\item{user_n... |
# Store your API key from a web service in a variable
# It should be in a separate file (e.g., `api_keys.R`)
api_key <- "epLVyByRHnm72ZptNPdXS1C5CDlNTH0SMd7nlwDg"
| /propublica_key.R | no_license | uw-ischool-info-201a-2019-autumn/a7--anie0521 | R | false | false | 165 | r |
# Store your API key from a web service in a variable
# It should be in a separate file (e.g., `api_keys.R`)
api_key <- "epLVyByRHnm72ZptNPdXS1C5CDlNTH0SMd7nlwDg"
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oasisui-package.R
\docType{package}
\name{oasisui-package}
\alias{oasisui}
\alias{oasisui-package}
\title{oasisui: Oasis User Interface}
\description{
This package provides an extensible implementation of a user
interface for modelling work... | /BFE_RShiny/oasisui/man/oasisui-package.Rd | permissive | OasisLMF/OasisUI | R | false | true | 806 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oasisui-package.R
\docType{package}
\name{oasisui-package}
\alias{oasisui}
\alias{oasisui-package}
\title{oasisui: Oasis User Interface}
\description{
This package provides an extensible implementation of a user
interface for modelling work... |
##################
# INITIALIZATION.
##################
# Clear workspace.
rm(list=ls(all=TRUE))
# Break line in log.
context("\n>> module_package_function")
###################
# END-TO-END TESTS
###################
context("End-to-End Testing")
test_that("Testing PackageFunctionModule has properly implemented inhe... | /tests/testthat/test_module_package_function.R | no_license | mfrasco/updraft | R | false | false | 5,364 | r | ##################
# INITIALIZATION.
##################
# Clear workspace.
rm(list=ls(all=TRUE))
# Break line in log.
context("\n>> module_package_function")
###################
# END-TO-END TESTS
###################
context("End-to-End Testing")
test_that("Testing PackageFunctionModule has properly implemented inhe... |
metabolism.db = function( DS="", p=NULL, yr=NULL ) {
if (DS %in% c( "metabolism", "metabolism.redo" ) ) {
ddir = file.path( project.datadirectory("metabolism"), "data" )
dir.create( ddir, showWarnings=FALSE, recursive=TRUE )
fn = file.path( ddir, paste( "set.metabolism", p$spatial.... | /metabolism/src/_Rfunctions/metabolism.db.r | no_license | kdhakal/ecomod | R | false | false | 1,429 | r |
metabolism.db = function( DS="", p=NULL, yr=NULL ) {
if (DS %in% c( "metabolism", "metabolism.redo" ) ) {
ddir = file.path( project.datadirectory("metabolism"), "data" )
dir.create( ddir, showWarnings=FALSE, recursive=TRUE )
fn = file.path( ddir, paste( "set.metabolism", p$spatial.... |
# k-Nearest Neighbor
# load the package
library(caret)
# load data
data(longley)
# fit model
fit <- knnreg(longley[,1:6], longley[,7], k=3)
# summarize the fit
print(fit)
# make predictions
predictions <- predict(fit, longley[,1:6])
# summarize accuracy
mse <- mean((longley$Employed - predictions)^2)
print(mse)
| /08_Machine_Learning_Mastery_with_R/03_Algorithms/01_Algorithms/3-NonLinearRegression/k-nearest_neighbor.R | no_license | jggrimesdc-zz/MachineLearningExercises | R | false | false | 314 | r | # k-Nearest Neighbor
# load the package
library(caret)
# load data
data(longley)
# fit model
fit <- knnreg(longley[,1:6], longley[,7], k=3)
# summarize the fit
print(fit)
# make predictions
predictions <- predict(fit, longley[,1:6])
# summarize accuracy
mse <- mean((longley$Employed - predictions)^2)
print(mse)
|
require("MASS")
require("e1071")
n <- 2
A <- matrix(runif(n^2)*2-1, ncol=n)
sigma <- t(A) %*% A
B <- matrix(runif(n^2)*2-1, ncol=n)
points1<-mvrnorm(n = 100, c(-1, -1), sigma)
points2<-mvrnorm(n = 100, c(2, 1), sigma)
points1b<-cbind(rep(1, 100), points1)
points2b<-cbind(rep(-1, 100), points2)
allPoints<-rbind(points1b... | /svm.r | no_license | lstrzalk/otu | R | false | false | 1,835 | r | require("MASS")
require("e1071")
n <- 2
A <- matrix(runif(n^2)*2-1, ncol=n)
sigma <- t(A) %*% A
B <- matrix(runif(n^2)*2-1, ncol=n)
points1<-mvrnorm(n = 100, c(-1, -1), sigma)
points2<-mvrnorm(n = 100, c(2, 1), sigma)
points1b<-cbind(rep(1, 100), points1)
points2b<-cbind(rep(-1, 100), points2)
allPoints<-rbind(points1b... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nortonbass.R
\name{Nortonbass_startvalgen}
\alias{Nortonbass_startvalgen}
\title{Fits Norton Bass curve and estimated RMSE}
\usage{
Nortonbass_startvalgen(x, gstart, flexpq, startval.met)
}
\arguments{
\item{x}{matrix with generations}
\item... | /man/Nortonbass_startvalgen.Rd | no_license | yangkedc1984/diffusion | R | false | true | 732 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nortonbass.R
\name{Nortonbass_startvalgen}
\alias{Nortonbass_startvalgen}
\title{Fits Norton Bass curve and estimated RMSE}
\usage{
Nortonbass_startvalgen(x, gstart, flexpq, startval.met)
}
\arguments{
\item{x}{matrix with generations}
\item... |
# # # # # # Place datalogger .csv and data_inputs file within a file called CO2_front_data within your working directory # # # # # # #
# # # load packages # # #
library(data.table)
library(stringr)
# # # Preamble: CHANGE SETTINGS HERE # # #
data_inputs<-scan(file=paste(data_file,"data_inputs.txt",sep='/'),what="list"... | /DL_integration.R | no_license | Ometochtli/DR_rawproc | R | false | false | 3,998 | r | # # # # # # Place datalogger .csv and data_inputs file within a file called CO2_front_data within your working directory # # # # # # #
# # # load packages # # #
library(data.table)
library(stringr)
# # # Preamble: CHANGE SETTINGS HERE # # #
data_inputs<-scan(file=paste(data_file,"data_inputs.txt",sep='/'),what="list"... |
#user-interface definition of a Shiny web application.
library(shiny)
library(shinydashboard)
####control time-out
tags$head(
HTML(
"
<script>
var socket_timeout_interval
var n = 0
$(document).on('shiny:connected', function(event) {
socket_timeout_i... | /ui.R | permissive | agbleze/USElections_Shiny | R | false | false | 5,098 | r | #user-interface definition of a Shiny web application.
library(shiny)
library(shinydashboard)
####control time-out
tags$head(
HTML(
"
<script>
var socket_timeout_interval
var n = 0
$(document).on('shiny:connected', function(event) {
socket_timeout_i... |
\name{easyFMRI-package}
\alias{easyFMRI-package}
\alias{easyFMRI}
\docType{package}
\title{
Functions for FMRI Analysis
}
\description{
Functions for ROI segmentation in EPI sequences
}
\details{
\tabular{ll}{
Package: \tab easyFMRI\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \tab 2010-09-17\cr
License: \tab GP... | /man/easyFMRI-package.Rd | no_license | wonsang/easyFMRI | R | false | false | 663 | rd | \name{easyFMRI-package}
\alias{easyFMRI-package}
\alias{easyFMRI}
\docType{package}
\title{
Functions for FMRI Analysis
}
\description{
Functions for ROI segmentation in EPI sequences
}
\details{
\tabular{ll}{
Package: \tab easyFMRI\cr
Type: \tab Package\cr
Version: \tab 1.0\cr
Date: \tab 2010-09-17\cr
License: \tab GP... |
cat("\014")
# ********************************************************************
# Erick Gordón B.
# erick.gordon@rowsums.com
# Panama City, Panama
# ********************************************************************
library(dplyr)
library(tidymodels)
library(tidyr)
library(h2o)
#library(dlookr)
library(ggcharts)... | /02_data_understanding/blog_diference_gov_salary.R | no_license | ErickGB/rowsums_icfj_data_platform | R | false | false | 3,065 | r | cat("\014")
# ********************************************************************
# Erick Gordón B.
# erick.gordon@rowsums.com
# Panama City, Panama
# ********************************************************************
library(dplyr)
library(tidymodels)
library(tidyr)
library(h2o)
#library(dlookr)
library(ggcharts)... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
CMP_normalizing_constant <- function(lambda, upsilon, error = 0.01) {
.Call(`_goalmodel_CMP_normalizing_constant`, lambda, upsilon, error)
}
#' @rdname CMP
#' @export
dCMP <- function(x, l... | /R/RcppExports.R | no_license | opisthokonta/goalmodel | R | false | false | 1,140 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
CMP_normalizing_constant <- function(lambda, upsilon, error = 0.01) {
.Call(`_goalmodel_CMP_normalizing_constant`, lambda, upsilon, error)
}
#' @rdname CMP
#' @export
dCMP <- function(x, l... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CheckLifeHist.R
\name{CheckLH}
\alias{CheckLH}
\title{Check LifeHistData}
\usage{
CheckLH(LifeHistData, gID = NA, sorted = TRUE, returnDups = FALSE)
}
\arguments{
\item{LifeHistData}{the dataframe with ID - Sex - Birth year, and opti... | /man/CheckLH.Rd | no_license | cran/sequoia | R | false | true | 1,169 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CheckLifeHist.R
\name{CheckLH}
\alias{CheckLH}
\title{Check LifeHistData}
\usage{
CheckLH(LifeHistData, gID = NA, sorted = TRUE, returnDups = FALSE)
}
\arguments{
\item{LifeHistData}{the dataframe with ID - Sex - Birth year, and opti... |
library(skynet)
context("Test Download T100")
test_that("Download T100", {
skip_on_cran()
download_t100(2011, "seg")
#expect_output(str(nrow(T100_2011_seg)), "250828")
#expect_length(T100_2011_seg, 17)
})
test_that("Download T100", {
skip_on_cran()
download_t100(2011, "mkt")
#expect_output(str(nrow(T10... | /tests/testthat/test_download_t100.R | no_license | ropensci/skynet | R | false | false | 383 | r | library(skynet)
context("Test Download T100")
test_that("Download T100", {
skip_on_cran()
download_t100(2011, "seg")
#expect_output(str(nrow(T100_2011_seg)), "250828")
#expect_length(T100_2011_seg, 17)
})
test_that("Download T100", {
skip_on_cran()
download_t100(2011, "mkt")
#expect_output(str(nrow(T10... |
data <- read.table("household_power_consumption.txt", header = T,
sep = ";", na.strings = "?")
# convert the date variable to Date class
data$Date <- as.Date(data$Date, format = "%d/%m/%Y")
# Subset the data
data <- subset(data, subset = (Date >= "2007-02-01" & Date <= "2007-02-02"))
# Con... | /plot1.R | no_license | tatitanja/ExploratoryDataAnalyses_-Project1 | R | false | false | 664 | r | data <- read.table("household_power_consumption.txt", header = T,
sep = ";", na.strings = "?")
# convert the date variable to Date class
data$Date <- as.Date(data$Date, format = "%d/%m/%Y")
# Subset the data
data <- subset(data, subset = (Date >= "2007-02-01" & Date <= "2007-02-02"))
# Con... |
####define a function to map the FFT to the Fourier Series of an original image(final version)
###FFT TO FS at the w=0 plane
FFT2FS_3D <- function(A){
##calculate the dimension of the array
n1 <- dim(A)[1]
n2 <- dim(A)[2]
n3 <- dim(A)[3]
##calculate the FFT of the 3-D array
FFT_A <- fft(A)/(n1*n2*n3)
... | /3DFPCA.R | no_license | wenrurumon/image_classification | R | false | false | 8,224 | r | ####define a function to map the FFT to the Fourier Series of an original image(final version)
###FFT TO FS at the w=0 plane
FFT2FS_3D <- function(A){
##calculate the dimension of the array
n1 <- dim(A)[1]
n2 <- dim(A)[2]
n3 <- dim(A)[3]
##calculate the FFT of the 3-D array
FFT_A <- fft(A)/(n1*n2*n3)
... |
## 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
#
# The following two functions will be used in order to calculate the inverse of
# a matrix and cache the result for a subsequent retrieval:
# 1. makeCacheMatr... | /cachematrix.R | no_license | phmckaig/ProgrammingAssignment2 | R | false | false | 3,019 | r | ## 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
#
# The following two functions will be used in order to calculate the inverse of
# a matrix and cache the result for a subsequent retrieval:
# 1. makeCacheMatr... |
library(cqrReg)
### Name: cqr.mm
### Title: Composite Quantile Regression (cqr) use Majorize and Minimize
### (mm) Algorithm
### Aliases: cqr.mm
### Keywords: MM
### ** Examples
set.seed(1)
n=100
p=2
a=rnorm(n*p, mean = 1, sd =1)
x=matrix(a,n,p)
beta=rnorm(p,1,1)
beta=matrix(beta,p,1)
y=x%*%beta-matrix(rnorm(n,0.... | /data/genthat_extracted_code/cqrReg/examples/cqr.mm.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 422 | r | library(cqrReg)
### Name: cqr.mm
### Title: Composite Quantile Regression (cqr) use Majorize and Minimize
### (mm) Algorithm
### Aliases: cqr.mm
### Keywords: MM
### ** Examples
set.seed(1)
n=100
p=2
a=rnorm(n*p, mean = 1, sd =1)
x=matrix(a,n,p)
beta=rnorm(p,1,1)
beta=matrix(beta,p,1)
y=x%*%beta-matrix(rnorm(n,0.... |
`X` <-
structure(c(4.13487, -1.874668, -1.146471, -0.810836, 5.654585,
-0.186709, 3.823367, 4.727208, -0.933232, -2.095648, 5.588822,
-1.285675, -2.691776, 7.508003, 2.118071, -0.399886, 6.631245,
-0.70975, 7.381676, -2.01979, 1.791829, -1.056473, 3.389819,
-1.780679, 0.658651, 2.978733, 6.015482, 6.182565, 5.76067... | /Data/Test-collection/baudry-ex441.R | no_license | wstuetzle/Cluster-libs | R | false | false | 19,162 | r | `X` <-
structure(c(4.13487, -1.874668, -1.146471, -0.810836, 5.654585,
-0.186709, 3.823367, 4.727208, -0.933232, -2.095648, 5.588822,
-1.285675, -2.691776, 7.508003, 2.118071, -0.399886, 6.631245,
-0.70975, 7.381676, -2.01979, 1.791829, -1.056473, 3.389819,
-1.780679, 0.658651, 2.978733, 6.015482, 6.182565, 5.76067... |
#The requirement is to plot submeter data for two days Feb 01 2007 and Feb 02 2007(Tursday and Friday)
#Read minimal amount of data that is required for the plot. Date, Time Sub_metering_1,Sub_metering_2,Sub_metering_3 for two days Feb 01 2007 and Feb 02 2007 is required to plot data
#sqldf is used to filter data sel... | /plot3.R | no_license | Divakar-J/ExData_Plotting1 | R | false | false | 1,359 | r | #The requirement is to plot submeter data for two days Feb 01 2007 and Feb 02 2007(Tursday and Friday)
#Read minimal amount of data that is required for the plot. Date, Time Sub_metering_1,Sub_metering_2,Sub_metering_3 for two days Feb 01 2007 and Feb 02 2007 is required to plot data
#sqldf is used to filter data sel... |
library('affy')
data_top_dir = './latin_data/'
affy_batch = ReadAffy(celfile.path=data_top_dir)
## probe-level data
pips = indexProbes(affy_batch,"pm")
mips = indexProbes(affy_batch,"mm")
d = t(intensity(affy_batch))
# order according to experiment number
ord = order(sapply(rownames(d),function(x){as.integer(substr(... | /Method/latin_R/latin_data_read.R | no_license | gjhunt/prelim | R | false | false | 1,003 | r | library('affy')
data_top_dir = './latin_data/'
affy_batch = ReadAffy(celfile.path=data_top_dir)
## probe-level data
pips = indexProbes(affy_batch,"pm")
mips = indexProbes(affy_batch,"mm")
d = t(intensity(affy_batch))
# order according to experiment number
ord = order(sapply(rownames(d),function(x){as.integer(substr(... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{length.plant}
\alias{length.plant}
\title{Compute the length of the root based on the coordinates of its nodes}
\usage{
\method{length}{plant}(x)
}
\arguments{
\item{x}{object of class plant}
}
\value{
the total length of the plant roots
}
\description{
Compute... | /r/RSML/man/length.plant.Rd | no_license | VirtualPlants/RSML-conversion-tools | R | false | false | 439 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{length.plant}
\alias{length.plant}
\title{Compute the length of the root based on the coordinates of its nodes}
\usage{
\method{length}{plant}(x)
}
\arguments{
\item{x}{object of class plant}
}
\value{
the total length of the plant roots
}
\description{
Compute... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/fastdigest.R
\name{fastdigest}
\alias{fastdigest}
\title{Fast, memory constant hashing of R objects}
\usage{
fastdigest(obj, ref_serializer = NULL)
}
\arguments{
\item{obj}{The object to generate a hash digest for}
\item{ref_serializ... | /man/fastdigest.Rd | no_license | cran/fastdigest | R | false | false | 1,246 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/fastdigest.R
\name{fastdigest}
\alias{fastdigest}
\title{Fast, memory constant hashing of R objects}
\usage{
fastdigest(obj, ref_serializer = NULL)
}
\arguments{
\item{obj}{The object to generate a hash digest for}
\item{ref_serializ... |
library(genomic.autocorr)
### Name: acf.summary
### Title: acf.summary
### Aliases: acf.summary
### ** Examples
## simulate data with 10 repeated observations in a row - ie there
## should be autocorrelation only within windows <= 10
library(data.table)
data <- genomic.autocorr:::.sim.data()
summ <- acf.summary(da... | /data/genthat_extracted_code/genomic.autocorr/examples/acf.summary.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 868 | r | library(genomic.autocorr)
### Name: acf.summary
### Title: acf.summary
### Aliases: acf.summary
### ** Examples
## simulate data with 10 repeated observations in a row - ie there
## should be autocorrelation only within windows <= 10
library(data.table)
data <- genomic.autocorr:::.sim.data()
summ <- acf.summary(da... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_game.R, R/montyhall.R
\name{create_game}
\alias{create_game}
\title{Create a new Monty Hall Problem game.}
\usage{
create_game()
create_game()
}
\arguments{
\item{...}{no arguments are used by the function.}
}
\value{
The function ret... | /man/create_game.Rd | no_license | AhmedRashwanASU/montyhall | R | false | true | 1,928 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_game.R, R/montyhall.R
\name{create_game}
\alias{create_game}
\title{Create a new Monty Hall Problem game.}
\usage{
create_game()
create_game()
}
\arguments{
\item{...}{no arguments are used by the function.}
}
\value{
The function ret... |
# ------------------------------------------------------------------------------
# Libraries
library(dplyr)
library(readr)
library(stringr)
library(caret)
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
#... | /Caret/Script/Script_rpartCost.R | no_license | bemayer/DigitRecognizer | R | false | false | 2,724 | r | # ------------------------------------------------------------------------------
# Libraries
library(dplyr)
library(readr)
library(stringr)
library(caret)
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
#... |
#=========================
# A new function that defines and allows application of arbitrary
# censor functions that define how selection works
# pubProb is the probability that a given result (p,d) is published
# function simply needs to transale a result to a probability
publicationProb = function(censorFunctio... | /sim-studies/sim-studies-censorFunc.R | permissive | Joe-Hilgard/meta-mod-bias | R | false | false | 22,416 | r |
#=========================
# A new function that defines and allows application of arbitrary
# censor functions that define how selection works
# pubProb is the probability that a given result (p,d) is published
# function simply needs to transale a result to a probability
publicationProb = function(censorFunctio... |
Update <- function(df){
source("getLikes.R")
source("getRTs.R")
library(tidyr)
date<-today()
cat("[Update] Acquiring User/ID pairs...\n")
newdata <- data.frame(ID=df$ID, User=df$User)
newdata <- unique(newdata)
newdata <- cbind(newdata, Date=rep(date,times=(dim(newdata)[1])))
cat(... | /Update.R | no_license | ssmolenski/CriticalRoleProject | R | false | false | 1,321 | r | Update <- function(df){
source("getLikes.R")
source("getRTs.R")
library(tidyr)
date<-today()
cat("[Update] Acquiring User/ID pairs...\n")
newdata <- data.frame(ID=df$ID, User=df$User)
newdata <- unique(newdata)
newdata <- cbind(newdata, Date=rep(date,times=(dim(newdata)[1])))
cat(... |
#! Rank based Mahalanobis distance, from Paul Rosenbaum's Design of Observational Studies, p. 251
.smahal = function(z, X) {
X = as.matrix(X)
n = dim(X)[1]
rownames(X) = 1:n
k = dim(X)[2]
m = sum(z)
for (j in 1:k) X[,j] = rank(X[,j])
cv = cov(X)
vuntied = var(1:n)
#! ***PENDING: correct this
diag(cv)[... | /R/smahal.r | no_license | cran/designmatch | R | false | false | 659 | r | #! Rank based Mahalanobis distance, from Paul Rosenbaum's Design of Observational Studies, p. 251
.smahal = function(z, X) {
X = as.matrix(X)
n = dim(X)[1]
rownames(X) = 1:n
k = dim(X)[2]
m = sum(z)
for (j in 1:k) X[,j] = rank(X[,j])
cv = cov(X)
vuntied = var(1:n)
#! ***PENDING: correct this
diag(cv)[... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/czelections.r
\docType{data}
\name{prez2013_turnout}
\alias{prez2013_turnout}
\title{Presidential Election Turnout in the Czech Republic}
\format{A data frame with 7 columns:
\describe{
\item{districts}{number of polling places with... | /man/prez2013_turnout.Rd | permissive | strepon/czelections | R | false | false | 841 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/czelections.r
\docType{data}
\name{prez2013_turnout}
\alias{prez2013_turnout}
\title{Presidential Election Turnout in the Czech Republic}
\format{A data frame with 7 columns:
\describe{
\item{districts}{number of polling places with... |
#' Individual-based model to simulate mean length at annulus for the ith fish of age a
#'
#' Simulates data to estimate back-calculated lengths of age a for the ith fish
#' @param ages = ages simulated from simageData function
#' @param Linf.mu = Linf mean
#' @param Linf.cv = CV of Linf
#' @param k.mu = k mean
#' @para... | /R/simElapsed.R | no_license | drstewart11/AgeGrowthSimModels | R | false | false | 2,641 | r | #' Individual-based model to simulate mean length at annulus for the ith fish of age a
#'
#' Simulates data to estimate back-calculated lengths of age a for the ith fish
#' @param ages = ages simulated from simageData function
#' @param Linf.mu = Linf mean
#' @param Linf.cv = CV of Linf
#' @param k.mu = k mean
#' @para... |
`GAPIT.Bus`<-
function(Y=NULL,CV=NULL,Z=NULL,GT=NULL,KI=NULL,GK=NULL,GD=NULL,GM=NULL,
WS=c(1e0,1e3,1e4,1e5,1e6,1e7),alpha=c(.01,.05,.1,.2,.3,.4,.5,.6,.7,.8,.9,1),
method=NULL,delta=NULL,vg=NULL,ve=NULL,LD=0.01,GTindex=NULL,
cutOff=0.01,Multi_iter=FASLE,num_regwas=10,Random.model=FALSE,
... | /R/GAPIT.Bus.R | no_license | Doaa-Mokhallalati/GAPIT3 | R | false | false | 17,556 | r | `GAPIT.Bus`<-
function(Y=NULL,CV=NULL,Z=NULL,GT=NULL,KI=NULL,GK=NULL,GD=NULL,GM=NULL,
WS=c(1e0,1e3,1e4,1e5,1e6,1e7),alpha=c(.01,.05,.1,.2,.3,.4,.5,.6,.7,.8,.9,1),
method=NULL,delta=NULL,vg=NULL,ve=NULL,LD=0.01,GTindex=NULL,
cutOff=0.01,Multi_iter=FASLE,num_regwas=10,Random.model=FALSE,
... |
library("ape")
library("pegas")
library("seqinr")
library("ggplot2")
library("adegenet")
library("devtools")
library("hierfstat")
library("stats")
library("ade4")
library("phangorn")
library("hierfstat")
library("seqinr")
################ FUNCTION MAKING THE PCA ANALYSIS - OUTPUT ONE PDF WITH FIGURES ###############... | /SMG_PCA_Phylo.R | no_license | ingek-1/FRIGG_pipeline | R | false | false | 7,263 | r | library("ape")
library("pegas")
library("seqinr")
library("ggplot2")
library("adegenet")
library("devtools")
library("hierfstat")
library("stats")
library("ade4")
library("phangorn")
library("hierfstat")
library("seqinr")
################ FUNCTION MAKING THE PCA ANALYSIS - OUTPUT ONE PDF WITH FIGURES ###############... |
\name{FuncMap-package}
\alias{FuncMap-package}
\docType{package}
\title{
Hive Plots of R Package Function Calls
}
\description{
FuncMap analyzes the function calls in an R package and creates a hive plot of the calls, dividing them among functions that only make outgoing calls (sources), functions that have only incomi... | /man/FuncMap-package.Rd | no_license | strategist922/FuncMap | R | false | false | 1,240 | rd | \name{FuncMap-package}
\alias{FuncMap-package}
\docType{package}
\title{
Hive Plots of R Package Function Calls
}
\description{
FuncMap analyzes the function calls in an R package and creates a hive plot of the calls, dividing them among functions that only make outgoing calls (sources), functions that have only incomi... |
\name{getReadDepth}
\alias{getReadDepth}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
getReadDepth
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Counts the number of sequence reads that fall into identically
sized bins across the entire genome. ... | /man/getReadDepth.Rd | permissive | chrisamiller/copyCat | R | false | false | 1,118 | rd | \name{getReadDepth}
\alias{getReadDepth}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
getReadDepth
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Counts the number of sequence reads that fall into identically
sized bins across the entire genome. ... |
library(landscapemetrics)
### Name: lsm_l_ai
### Title: AI (landscape level)
### Aliases: lsm_l_ai lsm_l_ai.RasterLayer lsm_l_ai.RasterStack
### lsm_l_ai.RasterBrick lsm_l_ai.stars lsm_l_ai.list
### ** Examples
lsm_l_ai(landscape)
| /data/genthat_extracted_code/landscapemetrics/examples/lsm_l_ai.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 241 | r | library(landscapemetrics)
### Name: lsm_l_ai
### Title: AI (landscape level)
### Aliases: lsm_l_ai lsm_l_ai.RasterLayer lsm_l_ai.RasterStack
### lsm_l_ai.RasterBrick lsm_l_ai.stars lsm_l_ai.list
### ** Examples
lsm_l_ai(landscape)
|
sq=729
sqrt(sq) | /Lab1_1.R | no_license | jshah1411/hello-world | R | false | false | 16 | r | sq=729
sqrt(sq) |
# Author : Vineet Ahluwalia
#' Launch an interactive user interface
#'
#' @description This function launches a shiny based application for viewing
#' draft history or plotting a shot chart for a player.
#' @param appName, The name of the application that you want to launch.
#' Valid options are: "shotcharts", "dra... | /R/shinyApps.R | no_license | llefebure/nba-stats | R | false | false | 441 | r | # Author : Vineet Ahluwalia
#' Launch an interactive user interface
#'
#' @description This function launches a shiny based application for viewing
#' draft history or plotting a shot chart for a player.
#' @param appName, The name of the application that you want to launch.
#' Valid options are: "shotcharts", "dra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mixed_model.R
\name{mixed_model}
\alias{mixed_model}
\title{Model from a linear mixed effects model}
\usage{
mixed_model(data, Y_value, Fixed_Factor, Random_Factor, ...)
}
\arguments{
\item{data}{a data table object, e.g. data.frame or tibble... | /man/mixed_model.Rd | no_license | ashenoy-cmbi/grafify | R | false | true | 3,093 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mixed_model.R
\name{mixed_model}
\alias{mixed_model}
\title{Model from a linear mixed effects model}
\usage{
mixed_model(data, Y_value, Fixed_Factor, Random_Factor, ...)
}
\arguments{
\item{data}{a data table object, e.g. data.frame or tibble... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22813870495398e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), 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/1613110047-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 257 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22813870495398e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
### Function to calculate rho from prior or fix non-variable part of rho, and check that w correct fromat in regfile ###
'get_rho' <-
function(param,nregion,Z,W, theta=1)
{
rok=list();
rok$ok=1
rok$rho=param[1]*(Z-1)*W
if((param[1]>0 && param[1]<1 || param[1]==-1 || param[1]==-2) && W>0 && (W<.1||W>2)) # rh... | /2010_R_C_EstL/Rpackage_EstL/Rmspack/R/get_rho.R | no_license | celinesf/personal | R | false | false | 2,640 | r | ### Function to calculate rho from prior or fix non-variable part of rho, and check that w correct fromat in regfile ###
'get_rho' <-
function(param,nregion,Z,W, theta=1)
{
rok=list();
rok$ok=1
rok$rho=param[1]*(Z-1)*W
if((param[1]>0 && param[1]<1 || param[1]==-1 || param[1]==-2) && W>0 && (W<.1||W>2)) # rh... |
# Purpose: Package documentation
# Updated: 19/06/19
#' @useDynLib BNR, .registration = TRUE
#' @importFrom Rcpp sourceCpp
NULL
#' BNR: Bivariate Normal Regression
#'
#' This package performs estimation and inference for the parameters of a
#' bivariate normal regression model. Estimation is performed using \code{\li... | /R/BNR-package.R | no_license | zrmacc/BNR | R | false | false | 510 | r | # Purpose: Package documentation
# Updated: 19/06/19
#' @useDynLib BNR, .registration = TRUE
#' @importFrom Rcpp sourceCpp
NULL
#' BNR: Bivariate Normal Regression
#'
#' This package performs estimation and inference for the parameters of a
#' bivariate normal regression model. Estimation is performed using \code{\li... |
library(lambda.tools)
### Name: ntry
### Title: Call a function until it succeeds
### Aliases: ntry
### ** Examples
## Not run:
##D fn <- function(i) {
##D x <- sample(1:4, 1)
##D flog.info("x = %s",x)
##D if (x < 4) stop('stop') else x
##D }
##D ntry(fn, 6)
## End(Not run)
| /data/genthat_extracted_code/lambda.tools/examples/ntry.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 289 | r | library(lambda.tools)
### Name: ntry
### Title: Call a function until it succeeds
### Aliases: ntry
### ** Examples
## Not run:
##D fn <- function(i) {
##D x <- sample(1:4, 1)
##D flog.info("x = %s",x)
##D if (x < 4) stop('stop') else x
##D }
##D ntry(fn, 6)
## End(Not run)
|
#' ---
#' title: "Making the Most of Regression (or: Regression is Story-telling and Here's How to Tell Your Story Well)"
#' author: Steven V. Miller, [svmiller.com](http://svmiller.com)
#' date: 8 April 2021
#' abstract: "This is a lab script for [POST 8000](http://post8000.svmiller.com), a graduate-level quantitative... | /lab-scripts/mmr-lab.R | permissive | depocen/post8000 | R | false | false | 26,051 | r | #' ---
#' title: "Making the Most of Regression (or: Regression is Story-telling and Here's How to Tell Your Story Well)"
#' author: Steven V. Miller, [svmiller.com](http://svmiller.com)
#' date: 8 April 2021
#' abstract: "This is a lab script for [POST 8000](http://post8000.svmiller.com), a graduate-level quantitative... |
workpath = '/Users/ouyangshuxin/Documents/Youku_Popularity/Youku_Popularity/'
data = read.table(paste(workpath, 'characterization/video_lifetime/video_lifetime_level1', sep = ''))
lifetime_l1 = data$V2
data = read.table(paste(workpath, 'characterization/video_lifetime/video_lifetime_level2', sep = ''))
lifetime_l2 = d... | /characterization/others/video_lifetime/video_lifetime_bylevel.R | no_license | lichenyu/Youku_Popularity | R | false | false | 4,343 | r | workpath = '/Users/ouyangshuxin/Documents/Youku_Popularity/Youku_Popularity/'
data = read.table(paste(workpath, 'characterization/video_lifetime/video_lifetime_level1', sep = ''))
lifetime_l1 = data$V2
data = read.table(paste(workpath, 'characterization/video_lifetime/video_lifetime_level2', sep = ''))
lifetime_l2 = d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.