content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
soft_thr <- function(a, lam, pos) {
.Call('_Sparse-and-Functional-PCA_soft_thr', PACKAGE = 'Sparse-and-Functional-PCA', a, lam, pos)
}
sfpca_fixed <- function(x, lamu, lamv, alphau, alphav... | /R/RcppExports.R | no_license | ChamanAgrawal/Sparse-and-Functional-PCA | R | false | false | 547 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
soft_thr <- function(a, lam, pos) {
.Call('_Sparse-and-Functional-PCA_soft_thr', PACKAGE = 'Sparse-and-Functional-PCA', a, lam, pos)
}
sfpca_fixed <- function(x, lamu, lamv, alphau, alphav... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/overlap2heatmap.R
\name{overlap2hm}
\alias{overlap2hm}
\title{overlap2hm}
\usage{
overlap2hm(data, regions = c("fregion1", "region2", ...), states = c("E1", "E2", ...), title = "Main title", subtitle = "Subtitle", color = "cornflowerblue", sc... | /man/overlap2hm.Rd | permissive | amitjavilaventura/chromHMMviewR | R | false | true | 2,103 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/overlap2heatmap.R
\name{overlap2hm}
\alias{overlap2hm}
\title{overlap2hm}
\usage{
overlap2hm(data, regions = c("fregion1", "region2", ...), states = c("E1", "E2", ...), title = "Main title", subtitle = "Subtitle", color = "cornflowerblue", sc... |
library(dplyr)
data <- read.table(text ="group; year1; year2; value
a; 1927; 1934; -140
a; 1953; 1955; -480
b; 1957; 1958; -280
b; 1961; 1965; -1420 ", sep=";", header=T,stringsAsFactors = FALSE)
data_temp <- cbind( seq(min(data$year1), max(data$year2)), lead(seq(min(data$year1)... | /R/SplitRDataframe1.R | permissive | ati-ozgur/stackoverflowQuestions | R | false | false | 430 | r | library(dplyr)
data <- read.table(text ="group; year1; year2; value
a; 1927; 1934; -140
a; 1953; 1955; -480
b; 1957; 1958; -280
b; 1961; 1965; -1420 ", sep=";", header=T,stringsAsFactors = FALSE)
data_temp <- cbind( seq(min(data$year1), max(data$year2)), lead(seq(min(data$year1)... |
data <- read.table('./household_power_consumption.txt', sep = ';',
header = TRUE)
#transform the date to class Date
data$date <- as.Date(strptime(data$Date, '%d/%m/%Y'))
data$Global_active_power <- as.numeric(data$Global_active_power) / 500
#extract the useful data
use_data <- subset(data, (data$Da... | /homework1/plot4.R | no_license | CSUN1997/Exploratory_Data_Analysis | R | false | false | 1,842 | r | data <- read.table('./household_power_consumption.txt', sep = ';',
header = TRUE)
#transform the date to class Date
data$date <- as.Date(strptime(data$Date, '%d/%m/%Y'))
data$Global_active_power <- as.numeric(data$Global_active_power) / 500
#extract the useful data
use_data <- subset(data, (data$Da... |
library(tidyverse)
load("rda/murders.rda")
murders%>%mutate(abb=reorder(abb,rate))%>%ggplot(aes(abb,rate))+geom_bar(width=0.5,stat="identity",color ="black")+coord_flip()
ggsave("figs/barplot.png")
| /analysis.R | no_license | mssharabi/murders | R | false | false | 198 | r | library(tidyverse)
load("rda/murders.rda")
murders%>%mutate(abb=reorder(abb,rate))%>%ggplot(aes(abb,rate))+geom_bar(width=0.5,stat="identity",color ="black")+coord_flip()
ggsave("figs/barplot.png")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tq_mutate.R, R/tq_transmute.R
\name{tq_mutate}
\alias{tq_mutate}
\alias{tq_mutate_}
\alias{tq_mutate_xy}
\alias{tq_mutate_xy_}
\alias{tq_mutate_fun_options}
\alias{tq_transmute}
\alias{tq_transmute_}
\alias{tq_transmute_xy}
\alias{tq_transmut... | /man/tq_mutate.Rd | no_license | sstoeckl/tidyquant | R | false | true | 6,302 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tq_mutate.R, R/tq_transmute.R
\name{tq_mutate}
\alias{tq_mutate}
\alias{tq_mutate_}
\alias{tq_mutate_xy}
\alias{tq_mutate_xy_}
\alias{tq_mutate_fun_options}
\alias{tq_transmute}
\alias{tq_transmute_}
\alias{tq_transmute_xy}
\alias{tq_transmut... |
library(tools)
source(file_path_as_absolute("functions.R"))
DATABASE <- "icwsm-2016"
load("teste.Rda")
DATABASE <- "icwsm-2016"
clearConsole();
dados <- query("SELECT id, idInterno, q1 as resposta, textParser, textoParserEmoticom as textoCompleto, hashtags FROM tweets WHERE situacao = 'N'")
library(doMC)
library(ro... | /processadores/nlp.R | no_license | MarcosGrzeca/drunk | R | false | false | 2,526 | r | library(tools)
source(file_path_as_absolute("functions.R"))
DATABASE <- "icwsm-2016"
load("teste.Rda")
DATABASE <- "icwsm-2016"
clearConsole();
dados <- query("SELECT id, idInterno, q1 as resposta, textParser, textoParserEmoticom as textoCompleto, hashtags FROM tweets WHERE situacao = 'N'")
library(doMC)
library(ro... |
###################################################
##Lecture 3: Codealong -- Collaborative Filtering##
###################################################
####################
##PART 1 -- Set up##
####################
#Set your WD
setwd("/Users/jeff/Google Drive/Text Book/Chapters/base_data/lastfm/ready")
#... | /lecture-03/codealong/lec03-codealong.R | no_license | yuqiliao/data-science | R | false | false | 4,143 | r | ###################################################
##Lecture 3: Codealong -- Collaborative Filtering##
###################################################
####################
##PART 1 -- Set up##
####################
#Set your WD
setwd("/Users/jeff/Google Drive/Text Book/Chapters/base_data/lastfm/ready")
#... |
#' Light's G
#'
#' Calculate Light's G based on Light's 1971 paper. Used to compare multiple raters with standard.
#'
#' @param subject A vector identifying subjects.
#' @param rater A vector identifying raters.
#' @param rating A vector identifying ratings.
#' @param rater.standard A scalar identifying the name o... | /R/cor.light.g.onesample.1971.R | permissive | burrm/lolcat | R | false | false | 6,510 | r | #' Light's G
#'
#' Calculate Light's G based on Light's 1971 paper. Used to compare multiple raters with standard.
#'
#' @param subject A vector identifying subjects.
#' @param rater A vector identifying raters.
#' @param rating A vector identifying ratings.
#' @param rater.standard A scalar identifying the name o... |
context("workflow")
test_that("steps of a workflow excute", {
# Test read_raw
raw_data <- read_raw(path=system.file("extdata", package = "IrisSpatialFeatures"),
format='Mantra')
expect_equal(length(raw_data@markers),3)
# Test threshold_dataset
dataset <- threshold_dataset(raw... | /tests/testthat/test-workflow.R | permissive | gusef/IrisSpatialFeatures | R | false | false | 755 | r | context("workflow")
test_that("steps of a workflow excute", {
# Test read_raw
raw_data <- read_raw(path=system.file("extdata", package = "IrisSpatialFeatures"),
format='Mantra')
expect_equal(length(raw_data@markers),3)
# Test threshold_dataset
dataset <- threshold_dataset(raw... |
library(shiny)
library(crypto)
library(remotes)
library(crypto)
library(ggplot2)
library(lubridate)
library(plotly)
library(zoo)
makeGraph <- function(coinList, startDate, endDate, df){
df <- df %>% dplyr::filter(., symbol %in% coinList )
graph <- ggplotly(ggplot(df, aes(x = date, y = open, col=slug))+
... | /app.R | no_license | KyleBenzle/ShinyCoin | R | false | false | 14,442 | r | library(shiny)
library(crypto)
library(remotes)
library(crypto)
library(ggplot2)
library(lubridate)
library(plotly)
library(zoo)
makeGraph <- function(coinList, startDate, endDate, df){
df <- df %>% dplyr::filter(., symbol %in% coinList )
graph <- ggplotly(ggplot(df, aes(x = date, y = open, col=slug))+
... |
message("===========")
message("state.brewer")
### Test first case without replicates ###
message("First test case")
strains <- c('BN','SHR','BN','SHR')
marks <- c('H3K4me3','H3K4me3','H3K27me3','H3K27me3')
replicates <- paste0(marks,':',strains)
states2use <- state.brewer(replicates=replicates)
states2use <- states2... | /tests/testthat/test_stateBrewer.R | no_license | ustcahwry/chromstaR | R | false | false | 22,823 | r | message("===========")
message("state.brewer")
### Test first case without replicates ###
message("First test case")
strains <- c('BN','SHR','BN','SHR')
marks <- c('H3K4me3','H3K4me3','H3K27me3','H3K27me3')
replicates <- paste0(marks,':',strains)
states2use <- state.brewer(replicates=replicates)
states2use <- states2... |
#R CMD BATCH --no-timing --no-restore --no-save 3comp_test.R 3comp_test.Rout
library(httk)
calc_analytic_css(chem.name="bisphenol a",model="3compartment")
calc_analytic_css(chem.cas="80-05-7",model="3compartment")
calc_analytic_css(parameters=parameterize_3comp(chem.cas="80-05-7"),model="3compartment")
calc_analytic_c... | /httk/tests/3comp_test.R | no_license | jrsfeir/CompTox-ExpoCast-httk | R | false | false | 4,015 | r | #R CMD BATCH --no-timing --no-restore --no-save 3comp_test.R 3comp_test.Rout
library(httk)
calc_analytic_css(chem.name="bisphenol a",model="3compartment")
calc_analytic_css(chem.cas="80-05-7",model="3compartment")
calc_analytic_css(parameters=parameterize_3comp(chem.cas="80-05-7"),model="3compartment")
calc_analytic_c... |
#! This file was automatically produced by the testextra package.
#! Changes will be overwritten.
context('tests extracted from file `pd_call.R`')
#line 65 "R/pd_call.R"
test_that('is_call', {#!@testing
pd <- get_parse_data(parse(text={"
x <- rnorm(10, 0, 1)
y <- runif(10)
plot(x, ... | /tests/testthat/test-pd_call.R | no_license | cran/parsetools | R | false | false | 2,710 | r | #! This file was automatically produced by the testextra package.
#! Changes will be overwritten.
context('tests extracted from file `pd_call.R`')
#line 65 "R/pd_call.R"
test_that('is_call', {#!@testing
pd <- get_parse_data(parse(text={"
x <- rnorm(10, 0, 1)
y <- runif(10)
plot(x, ... |
# This R script is for project assignment 1 forthe class, Getting and Cleaning Data.
#
# The data is based on the information from following website,
# https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
#
# Following is the description for the assignment (from course web page)
#
# ... | /run_analysis.R | no_license | cszeto2001/CleaningData | R | false | false | 5,861 | r | # This R script is for project assignment 1 forthe class, Getting and Cleaning Data.
#
# The data is based on the information from following website,
# https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip
#
# Following is the description for the assignment (from course web page)
#
# ... |
if(!require("devtools")){
install.packages("devtools")
}
if(!require("testthat")){
install.packages("testthat")
}
if(!require(knitr)){
install.packages("knitr")
}
if(!require(rmarkdown)){
install.packages("rmarkdown")
}
if(!require(roxygen2)){
install.packages("roxygen2")
}
if(!(require(pkgdo... | /.scripts/install_all_dependencies.R | permissive | NelleV/timecoursedata | R | false | false | 500 | r | if(!require("devtools")){
install.packages("devtools")
}
if(!require("testthat")){
install.packages("testthat")
}
if(!require(knitr)){
install.packages("knitr")
}
if(!require(rmarkdown)){
install.packages("rmarkdown")
}
if(!require(roxygen2)){
install.packages("roxygen2")
}
if(!(require(pkgdo... |
.libPaths("/data/hydro/R_libs35")
.libPaths()
library(data.table)
library(dplyr)
source_1 = "/home/hnoorazar/bloom_codes/bloom_core.R"
source(source_1)
options(digit=9)
options(digits=9)
start_time <- Sys.time()
###############################################################
print(paste0("getwd(): ", getwd()))
main_o... | /Bloom/sensitivity_4_chill_paper/02_merge_01_Step/00_d_merge_blooms_per_dir.R | permissive | HNoorazar/Ag | R | false | false | 1,190 | r | .libPaths("/data/hydro/R_libs35")
.libPaths()
library(data.table)
library(dplyr)
source_1 = "/home/hnoorazar/bloom_codes/bloom_core.R"
source(source_1)
options(digit=9)
options(digits=9)
start_time <- Sys.time()
###############################################################
print(paste0("getwd(): ", getwd()))
main_o... |
# Loading required libraries
library("annotate")
library("hgu133plus2.db")
probe <- names(as.list(hgu133plus2SYMBOL))
symbol <- as.character(as.list(hgu133plus2SYMBOL))
# Define number of desired genes, arrays and output file name
ngene <- 20
narray <- 10
filename <- "E:/testdata/test/testdata.txt"
# Create the data
... | /R/arraytools.R | no_license | arraytools/arraytools | R | false | false | 2,427 | r | # Loading required libraries
library("annotate")
library("hgu133plus2.db")
probe <- names(as.list(hgu133plus2SYMBOL))
symbol <- as.character(as.list(hgu133plus2SYMBOL))
# Define number of desired genes, arrays and output file name
ngene <- 20
narray <- 10
filename <- "E:/testdata/test/testdata.txt"
# Create the data
... |
## Matrix inversion is usually a costly computation.
## Two new functions will be created to reduce this costly computation
## by helping to cache the inverse of a matrix
## To run this program, please perform the following steps:
## set the working directory to where your cacheMatrix.R file is
## and then load the so... | /cachematrix.R | no_license | dplower/ProgrammingAssignment2 | R | false | false | 3,027 | r | ## Matrix inversion is usually a costly computation.
## Two new functions will be created to reduce this costly computation
## by helping to cache the inverse of a matrix
## To run this program, please perform the following steps:
## set the working directory to where your cacheMatrix.R file is
## and then load the so... |
library(cpk)
### Name: di.fn
### Title: *di* function
### Aliases: di.fn
### ** Examples
msc <- 50; mec <- 20; ke <- 0.2078;
di <- di.fn(msc, mec, ke)
| /data/genthat_extracted_code/cpk/examples/di.fn.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 161 | r | library(cpk)
### Name: di.fn
### Title: *di* function
### Aliases: di.fn
### ** Examples
msc <- 50; mec <- 20; ke <- 0.2078;
di <- di.fn(msc, mec, ke)
|
analysis_settings <- function(analysis='standard') {
# settings <- analysis_settings('quick')
# i.e., always assign to variable called settings
if (analysis == "ultraquick")
settings <- list(n.chains= 2, n.adapt= 50, burnin = 5, n.iter= 10, thin=1)
if (analysis == "quick")
settings <- ... | /lib/jags-functions.r | no_license | jeromyanglim/dynamic-pwi | R | false | false | 6,596 | r | analysis_settings <- function(analysis='standard') {
# settings <- analysis_settings('quick')
# i.e., always assign to variable called settings
if (analysis == "ultraquick")
settings <- list(n.chains= 2, n.adapt= 50, burnin = 5, n.iter= 10, thin=1)
if (analysis == "quick")
settings <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extractMs2Spectra.R
\name{extractMs2Spectra}
\alias{extractMs2Spectra}
\title{extractMs2Spectra}
\usage{
extractMs2Spectra(parentMatches, sampleData)
}
\arguments{
\item{parentMatches}{- A numeric vector representing the indicies within
sampl... | /man/extractMs2Spectra.Rd | permissive | crmclean/ms2sweeper | R | false | true | 848 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extractMs2Spectra.R
\name{extractMs2Spectra}
\alias{extractMs2Spectra}
\title{extractMs2Spectra}
\usage{
extractMs2Spectra(parentMatches, sampleData)
}
\arguments{
\item{parentMatches}{- A numeric vector representing the indicies within
sampl... |
Atlas_i6_SpeciesMap <- function(df,
geomIdAttributeName="geom_id",
yearAttributeName="year",
speciesAttributeName="species",
valueAttributeName="value... | /R/TunaAtlas_i6_SpeciesMap.R | no_license | juldebar/IRDTunaAtlas | R | false | false | 5,156 | r | Atlas_i6_SpeciesMap <- function(df,
geomIdAttributeName="geom_id",
yearAttributeName="year",
speciesAttributeName="species",
valueAttributeName="value... |
#############################
# Name: Inverse Gamma Landslide Fit
# Author: Faith Taylor
# Last updated : 02/02/2014
# Purpose: Fit inverse gamma pdf to landslide data and test gooness of fit
# Copyright: (c) 2014 Faith Taylor
# This program is free software under the GNU General Public Licence (>=v2).
#######... | /LWR_fitting_R.r | permissive | faithatron/Landslide_shape_tools | R | false | false | 34,030 | r | #############################
# Name: Inverse Gamma Landslide Fit
# Author: Faith Taylor
# Last updated : 02/02/2014
# Purpose: Fit inverse gamma pdf to landslide data and test gooness of fit
# Copyright: (c) 2014 Faith Taylor
# This program is free software under the GNU General Public Licence (>=v2).
#######... |
#' @title Initialize the SMAC model.
#'
#' @description Initialize the SMAC model with the classifier default parameter configuration.
#'
#' @param classifierName String of the classifier algorithm name.
#' @param trainingSet Dataframe of the training set.
#' @param validationSet Dataframe of the validation Set.
#' @pa... | /R/initialize.R | no_license | RadwaElShawi/Auto-Machine-Learning | R | false | false | 1,600 | r | #' @title Initialize the SMAC model.
#'
#' @description Initialize the SMAC model with the classifier default parameter configuration.
#'
#' @param classifierName String of the classifier algorithm name.
#' @param trainingSet Dataframe of the training set.
#' @param validationSet Dataframe of the validation Set.
#' @pa... |
library(tidyverse)
library(lubridate)
library(rvest)
library(stringr)
dates <- as.Date(NA)
holidays <- as.character(NA)
holiday_info <- tibble(dates, holidays)
# Uses the rvest package to extract the federal holidays from the website for each year passed to it. Reads in the html from the website passed into it
# and ... | /DateTable/GetHolidays.R | no_license | aaa121/PowerBI_R | R | false | false | 1,502 | r | library(tidyverse)
library(lubridate)
library(rvest)
library(stringr)
dates <- as.Date(NA)
holidays <- as.character(NA)
holiday_info <- tibble(dates, holidays)
# Uses the rvest package to extract the federal holidays from the website for each year passed to it. Reads in the html from the website passed into it
# and ... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <- NULL
}
get <- function() x
setinv <- function(solve) inv <<- solve
getinv... | /cachematrix.R | no_license | zhangx8/ProgrammingAssignment2 | R | false | false | 782 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <- NULL
}
get <- function() x
setinv <- function(solve) inv <<- solve
getinv... |
library(tstools)
### Name: resolve_ts_overlap
### Title: Concatenate Time Series and Resolve Overlap Automatically
### Aliases: resolve_ts_overlap
### ** Examples
ts1 <- ts(rnorm(100),start = c(1990,1),frequency = 4)
ts2 <- ts(1:18,start = c(2000,1),frequency = 4)
resolve_ts_overlap(ts1,ts2)
# automatical det... | /data/genthat_extracted_code/tstools/examples/resolve_ts_overlap.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,010 | r | library(tstools)
### Name: resolve_ts_overlap
### Title: Concatenate Time Series and Resolve Overlap Automatically
### Aliases: resolve_ts_overlap
### ** Examples
ts1 <- ts(rnorm(100),start = c(1990,1),frequency = 4)
ts2 <- ts(1:18,start = c(2000,1),frequency = 4)
resolve_ts_overlap(ts1,ts2)
# automatical det... |
#' @title Parse html
#'
#' @description \code{parse_html} Parse a downloaded html file saved on local
#' disk, or downloaded directly from a website.
#'
#' @param x \code{x} Source directory in which downloaded html
#' files are stored.
#'
#' @return Nothing is returned from the fucntion, but for each inpu... | /R/parse_html.R | no_license | ivyleavedtoadflax/scrapeML | R | false | false | 836 | r | #' @title Parse html
#'
#' @description \code{parse_html} Parse a downloaded html file saved on local
#' disk, or downloaded directly from a website.
#'
#' @param x \code{x} Source directory in which downloaded html
#' files are stored.
#'
#' @return Nothing is returned from the fucntion, but for each inpu... |
library(ROCR)
library(dplyr)
# r=lapply(1:7, function(t) {
#
# g=readfile(sprintf("edgepred.tlen=%s.greedy",t))
# g_rec=mean(g$V3[g$V2==1])
# g_prec=mean(g$V2[g$V3==1])
# m=readfile(sprintf("edgepred.tlen=%s.mcmap",t))
# m_rec=mean(m$V3[m$V2==1])
# m_prec=mean(m$V2[m$V3==1])
#
# d=ds[... | /ud_parses/scores.r | no_license | slanglab/transition_sampler | R | false | false | 1,593 | r | library(ROCR)
library(dplyr)
# r=lapply(1:7, function(t) {
#
# g=readfile(sprintf("edgepred.tlen=%s.greedy",t))
# g_rec=mean(g$V3[g$V2==1])
# g_prec=mean(g$V2[g$V3==1])
# m=readfile(sprintf("edgepred.tlen=%s.mcmap",t))
# m_rec=mean(m$V3[m$V2==1])
# m_prec=mean(m$V2[m$V3==1])
#
# d=ds[... |
#' @title Create folders in which to save environmental arrays
#' @description This function creates a set of folders in the specified directory in which environmental arrays (one file for each day) can be stored.
#'
#' @param dir A string specifying the directory in which to create a folder for each environmental vari... | /R/create_wcdirs.R | no_license | han-tun/fvcom.tbx | R | false | false | 1,815 | r | #' @title Create folders in which to save environmental arrays
#' @description This function creates a set of folders in the specified directory in which environmental arrays (one file for each day) can be stored.
#'
#' @param dir A string specifying the directory in which to create a folder for each environmental vari... |
library(shiny)
library(DT)
ui <- fluidPage(
titlePanel(
title = div(img(src = "logo.png", height = 50, width = 50), "OHDSI Studies"),
windowTitle = "OHDSI Studies"
),
style = "width:1500px;",
p("OHDSI is a global, open-science community that is committed to generating real-world evidence to both suppor... | /OhdsiStudies/ui.R | no_license | OHDSI/ShinyDeploy | R | false | false | 782 | r | library(shiny)
library(DT)
ui <- fluidPage(
titlePanel(
title = div(img(src = "logo.png", height = 50, width = 50), "OHDSI Studies"),
windowTitle = "OHDSI Studies"
),
style = "width:1500px;",
p("OHDSI is a global, open-science community that is committed to generating real-world evidence to both suppor... |
\name{realRatingMatrix}
\Rdversion{1.1}
\docType{class}
\alias{realRatingMatrix-class}
\alias{realRatingMatrix}
\alias{coerce,matrix,realRatingMatrix-method}
\alias{coerce,realRatingMatrix,matrix-method}
\alias{coerce,realRatingMatrix,dgTMatrix-method}
\alias{coerce,dgTMatrix,realRatingMatrix-method}
\alias{coerce,real... | /man/realRatingMatrix-class.Rd | no_license | mhahsler/recommenderlab | R | false | false | 5,846 | rd | \name{realRatingMatrix}
\Rdversion{1.1}
\docType{class}
\alias{realRatingMatrix-class}
\alias{realRatingMatrix}
\alias{coerce,matrix,realRatingMatrix-method}
\alias{coerce,realRatingMatrix,matrix-method}
\alias{coerce,realRatingMatrix,dgTMatrix-method}
\alias{coerce,dgTMatrix,realRatingMatrix-method}
\alias{coerce,real... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addPopupVideos.R
\name{addPopupVideos}
\alias{addPopupVideos}
\title{Add video popups to leaflet layers.}
\usage{
addPopupVideos(map, video, group, width = NULL, height = NULL)
}
\arguments{
\item{map}{the \code{leaflet} map to add the popups... | /man/addPopupVideos.Rd | no_license | Leaflet-Forks/leafpop | R | false | true | 1,081 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addPopupVideos.R
\name{addPopupVideos}
\alias{addPopupVideos}
\title{Add video popups to leaflet layers.}
\usage{
addPopupVideos(map, video, group, width = NULL, height = NULL)
}
\arguments{
\item{map}{the \code{leaflet} map to add the popups... |
#' WriteAction
#'
#' The act of authoring written creative content.
#'
#'
#' @param id identifier for the object (URI)
#' @param target (EntryPoint type.) Indicates a target EntryPoint for an Action.
#' @param startTime (DateTime or DateTime type.) The startTime of something. For a reserved event or service (e.g. Foo... | /R/WriteAction.R | no_license | cboettig/schemar | R | false | false | 6,006 | r | #' WriteAction
#'
#' The act of authoring written creative content.
#'
#'
#' @param id identifier for the object (URI)
#' @param target (EntryPoint type.) Indicates a target EntryPoint for an Action.
#' @param startTime (DateTime or DateTime type.) The startTime of something. For a reserved event or service (e.g. Foo... |
library(ape)
### Name: zoom
### Title: Zoom on a Portion of a Phylogeny
### Aliases: zoom
### Keywords: hplot
### ** Examples
## Not run:
##D data(chiroptera)
##D zoom(chiroptera, 1:20, subtree = TRUE)
##D zoom(chiroptera, grep("Plecotus", chiroptera$tip.label))
##D zoom(chiroptera, list(grep("Plecotus", chiropter... | /data/genthat_extracted_code/ape/examples/zoom.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 420 | r | library(ape)
### Name: zoom
### Title: Zoom on a Portion of a Phylogeny
### Aliases: zoom
### Keywords: hplot
### ** Examples
## Not run:
##D data(chiroptera)
##D zoom(chiroptera, 1:20, subtree = TRUE)
##D zoom(chiroptera, grep("Plecotus", chiroptera$tip.label))
##D zoom(chiroptera, list(grep("Plecotus", chiropter... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/marginal-lhd.R
\name{stepping.stones}
\alias{stepping.stones}
\title{Estimate marginal likelihood by stepping stones}
\usage{
stepping.stones(mcmcf = "mcmc.txt", betaf = "beta.txt")
}
\arguments{
\item{mcmcf}{character, mcmc output file name}... | /man/stepping.stones.Rd | permissive | dosreislab/bppr | R | false | true | 1,498 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/marginal-lhd.R
\name{stepping.stones}
\alias{stepping.stones}
\title{Estimate marginal likelihood by stepping stones}
\usage{
stepping.stones(mcmcf = "mcmc.txt", betaf = "beta.txt")
}
\arguments{
\item{mcmcf}{character, mcmc output file name}... |
isSetMethodExpression <- function(lang){
chars <- as.character(lang)
expr.type <- chars[1]
return(expr.type == "setMethod" )
}
| /pkg/R/deprecated/isSetMethodExpression.R | no_license | mamueller/linkeddocs | R | false | false | 140 | r |
isSetMethodExpression <- function(lang){
chars <- as.character(lang)
expr.type <- chars[1]
return(expr.type == "setMethod" )
}
|
#' Produces performance metrics for the stellargraph embeddings
#'
#' Takes a dataframe of stellargraph embeddings and returns a cross validated dataframe of
#' performance metrics from GAM across all dimensions with y being the point of loss of the giant component
#'
#' @param stellar_all a dataframe.
#'
#' @expo... | /RobustnessInternal/R/cross_validated_stellar_embeddings.R | permissive | JonnoB/setse_and_network_robustness | R | false | false | 2,039 | r | #' Produces performance metrics for the stellargraph embeddings
#'
#' Takes a dataframe of stellargraph embeddings and returns a cross validated dataframe of
#' performance metrics from GAM across all dimensions with y being the point of loss of the giant component
#'
#' @param stellar_all a dataframe.
#'
#' @expo... |
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870045206L, -1182814578L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10... | /dexterMST/inst/testfiles/is_person_booklet_sorted/AFL_is_person_booklet_sorted/is_person_booklet_sorted_valgrind_files/1615939508-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 826 | r | testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870045206L, -1182814578L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10... |
#GMG solver
require(MASS)
require(Matrix)
require(plyr)
build2DIndexGrids <- function(fineDims) {
levels = ceiling(log(min(fineDims)) / (log(2)) - 2)
lDims = fineDims
GeoList = list()
VecList = list()
DimList = list()
if (levels > 0 ) {
for (level in 1:levels) {
DimList[[level]]=lDims
mapGe... | /GeometricMultiGrid_Testing.R | no_license | wesleymsmith/R_Graph_Theory_Testing | R | false | false | 13,698 | r | #GMG solver
require(MASS)
require(Matrix)
require(plyr)
build2DIndexGrids <- function(fineDims) {
levels = ceiling(log(min(fineDims)) / (log(2)) - 2)
lDims = fineDims
GeoList = list()
VecList = list()
DimList = list()
if (levels > 0 ) {
for (level in 1:levels) {
DimList[[level]]=lDims
mapGe... |
#!/usr/bin/env Rscript
input <- file('stdin', 'r')
cat("What is the first number? ")
n1 <- readLines(input, n=1)
n1 <- as.numeric(n1)
cat("What is the second number? ")
n2 <- readLines(input, n=1)
n2 <- as.numeric(n2)
cat(c(n1, "+", n2, "=", n1 + n2, "\n"), sep=" ")
cat(c(n1, "-", n2, "=", n1 - n2, "\n"), sep=" ")
c... | /ex05-SimpleMath/main.R | no_license | cwchentw/exercises-for-programmers-in-R | R | false | false | 416 | r | #!/usr/bin/env Rscript
input <- file('stdin', 'r')
cat("What is the first number? ")
n1 <- readLines(input, n=1)
n1 <- as.numeric(n1)
cat("What is the second number? ")
n2 <- readLines(input, n=1)
n2 <- as.numeric(n2)
cat(c(n1, "+", n2, "=", n1 + n2, "\n"), sep=" ")
cat(c(n1, "-", n2, "=", n1 - n2, "\n"), sep=" ")
c... |
library(shiny)
library(shinydashboard)
library(DT)
addInfo <- function(item, infoId) {
infoTag <- tags$small(class = "badge pull-right action-button",
style = "padding: 1px 6px 2px 6px; background-color: steelblue;",
type = "button",
id = infoI... | /inst/shiny/DiagnosticsExplorer/ui.R | permissive | rfherrerac/CohortDiagnostics | R | false | false | 6,522 | r | library(shiny)
library(shinydashboard)
library(DT)
addInfo <- function(item, infoId) {
infoTag <- tags$small(class = "badge pull-right action-button",
style = "padding: 1px 6px 2px 6px; background-color: steelblue;",
type = "button",
id = infoI... |
### rsquared.R ---
#----------------------------------------------------------------------
## Author: Thomas Alexander Gerds
## Created: Aug 9 2017 (10:36)
## Version:
## Last-Updated: Feb 24 2018 (13:45)
## By: Thomas Alexander Gerds
## Update #: 141
#------------------------------------------------... | /R/rsquared.R | no_license | csetraynor/riskRegression | R | false | false | 11,103 | r | ### rsquared.R ---
#----------------------------------------------------------------------
## Author: Thomas Alexander Gerds
## Created: Aug 9 2017 (10:36)
## Version:
## Last-Updated: Feb 24 2018 (13:45)
## By: Thomas Alexander Gerds
## Update #: 141
#------------------------------------------------... |
set.seed( 43 )
library(mvtnorm)
library(fields)
library(Rcpp)
simu=function(s){
prob_glcm<-function(c,s=s,mc=30000){
mu<-c(2+c,14-c)
sigma<-matrix(s*c(1,-0.7,-0.7,1),nrow=2)
elip<-rmvnorm(mc,mu,sigma)
cell_count<-rep(0,16*16)
for (i in 1:mc)
{
for (m in 1:16) {
fo... | /s=16/simu_43.R | no_license | mguindanigroup/Radiomics-Hierarchical-Rounded-Gaussian-Spatial-Dirichlet-Process | R | false | false | 8,262 | r | set.seed( 43 )
library(mvtnorm)
library(fields)
library(Rcpp)
simu=function(s){
prob_glcm<-function(c,s=s,mc=30000){
mu<-c(2+c,14-c)
sigma<-matrix(s*c(1,-0.7,-0.7,1),nrow=2)
elip<-rmvnorm(mc,mu,sigma)
cell_count<-rep(0,16*16)
for (i in 1:mc)
{
for (m in 1:16) {
fo... |
library(HTDoseResponseCurve)
context("Normalize synergy data")
test_that("synergy works", {
pkg = "HTDoseResponseCurve"
fn_data = system.file("extdata", "sample_synergy_ray.txt", package = pkg)
syn=read.table( fn_data, header=TRUE, sep='\t', stringsAsFactors=FALSE)
head(syn)
ds=create_synergy_d... | /tests/testthat/testSynergy.R | no_license | DavidQuigley/HTDoseResponseCurve | R | false | false | 2,918 | r | library(HTDoseResponseCurve)
context("Normalize synergy data")
test_that("synergy works", {
pkg = "HTDoseResponseCurve"
fn_data = system.file("extdata", "sample_synergy_ray.txt", package = pkg)
syn=read.table( fn_data, header=TRUE, sep='\t', stringsAsFactors=FALSE)
head(syn)
ds=create_synergy_d... |
StringListToDfRow <-
function (the.string)
{
hold.options <- options(warn = -1)
on.exit(options(hold.options))
string.vector <- ClistToVec(the.string, sep = ";")
try.numeric <- as.numeric(string.vector)
the.return <- data.frame(matrix("a", length(try.numeric),
nrow = 1))
not.numeric <-... | /R/StringListToDfRow.R | no_license | anhnguyendepocen/SMRD | R | false | false | 533 | r | StringListToDfRow <-
function (the.string)
{
hold.options <- options(warn = -1)
on.exit(options(hold.options))
string.vector <- ClistToVec(the.string, sep = ";")
try.numeric <- as.numeric(string.vector)
the.return <- data.frame(matrix("a", length(try.numeric),
nrow = 1))
not.numeric <-... |
#' Vector Error Correction Model Input
#'
#' \code{gen_vec} produces the input for the estimation of a vector error correction (VEC) model.
#'
#' @param data a time-series object of endogenous variables.
#' @param p an integer vector of the lag order of the series in the (levels) VAR.
#' @param r an integer vector of... | /bvartools/R/gen_vec.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 12,616 | r | #' Vector Error Correction Model Input
#'
#' \code{gen_vec} produces the input for the estimation of a vector error correction (VEC) model.
#'
#' @param data a time-series object of endogenous variables.
#' @param p an integer vector of the lag order of the series in the (levels) VAR.
#' @param r an integer vector of... |
library(PolyPatEx)
### Name: preprocessData
### Title: Check and preprocess an allele dataset
### Aliases: preprocessData
### ** Examples
## If using inputData to input the allele dataset from CSV file,
## preprocessData() is applied automatically before the dataset is
## returned by inputData().
## Otherwise, if ... | /data/genthat_extracted_code/PolyPatEx/examples/preprocessData.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,069 | r | library(PolyPatEx)
### Name: preprocessData
### Title: Check and preprocess an allele dataset
### Aliases: preprocessData
### ** Examples
## If using inputData to input the allele dataset from CSV file,
## preprocessData() is applied automatically before the dataset is
## returned by inputData().
## Otherwise, if ... |
#####################################################################################
########## Simple 3-state Markov model in R #####################
#####################################################################################
# Developed by the Decision Analysis in R for Technologies i... | /script/markov_ICU.R | permissive | aperaltasantos/covid_pt | R | false | false | 6,504 | r | #####################################################################################
########## Simple 3-state Markov model in R #####################
#####################################################################################
# Developed by the Decision Analysis in R for Technologies i... |
unique_sets <-
function(sampledlist, nelements, stratsize) {
nL <- 0
sample_all <- NULL
start <- Sys.time()
while (nL < nelements * stratsize) {
sample_all <- lapply(sampledlist, sample, size = stratsize)
nL <- length(unique(Reduce('append', sample_all)))
}
sample_all
}... | /R/unique_sets.R | no_license | JARS3N/gener8 | R | false | false | 322 | r | unique_sets <-
function(sampledlist, nelements, stratsize) {
nL <- 0
sample_all <- NULL
start <- Sys.time()
while (nL < nelements * stratsize) {
sample_all <- lapply(sampledlist, sample, size = stratsize)
nL <- length(unique(Reduce('append', sample_all)))
}
sample_all
}... |
Coursera - Data Science Specialization-Developing Data Products-Week 2-Assignment
FEB 2018
Developing Data Products-Week 2-Assignment
My First Map!
Let's create a map that shows the current location of the infamous Titanic.
First we need to load the library Leaflet.
install.packages("leaflet")
library(... | /Titanic Map.R | no_license | jamescooksley/Titanic-Map | R | false | false | 816 | r | Coursera - Data Science Specialization-Developing Data Products-Week 2-Assignment
FEB 2018
Developing Data Products-Week 2-Assignment
My First Map!
Let's create a map that shows the current location of the infamous Titanic.
First we need to load the library Leaflet.
install.packages("leaflet")
library(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/download_tar.R
\name{URLs_CARS}
\alias{URLs_CARS}
\title{CARS dataset}
\usage{
URLs_CARS(filename = "CARS", untar = TRUE)
}
\arguments{
\item{filename}{the name of the file}
\item{untar}{logical, whether to untar the '.tgz' file}
}
\value{
N... | /man/URLs_CARS.Rd | permissive | Cdk29/fastai | R | false | true | 364 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/download_tar.R
\name{URLs_CARS}
\alias{URLs_CARS}
\title{CARS dataset}
\usage{
URLs_CARS(filename = "CARS", untar = TRUE)
}
\arguments{
\item{filename}{the name of the file}
\item{untar}{logical, whether to untar the '.tgz' file}
}
\value{
N... |
require(ggplot2)
#args = commandArgs(trailingOnly = T)
#heights = read.table(args[1],h=T)
plt = ggplot(data = heights,aes(x=prior_mean,y=posterior_mean,colour=type))
plt = plt+geom_point()+
xlim(0,50) +
ylim(0,50)
plt = plt+geom_smooth(method='lm')
plt = plt + geom_errorbarh(aes(xmin = prior_lower,xmax = pri... | /plot_prior_post.R | no_license | tomopfuku/mammalian_morphological_clocks | R | false | false | 568 | r | require(ggplot2)
#args = commandArgs(trailingOnly = T)
#heights = read.table(args[1],h=T)
plt = ggplot(data = heights,aes(x=prior_mean,y=posterior_mean,colour=type))
plt = plt+geom_point()+
xlim(0,50) +
ylim(0,50)
plt = plt+geom_smooth(method='lm')
plt = plt + geom_errorbarh(aes(xmin = prior_lower,xmax = pri... |
library(dplyr)
# read training data
X_train <- read.table("/Users/carlosabadi/OneDrive - Abadi & Co/UCI HAR Dataset 2/train/X_train.txt")
Y_train <- read.table("/Users/carlosabadi/OneDrive - Abadi & Co/UCI HAR Dataset 2/train/y_train.txt")
subject_train <- read.table("/Users/carlosabadi/OneDrive - Abadi & Co/UCI HAR ... | /run_analysis.R | no_license | Carlos-Abadi/datasciencecourseragettingandcleaningdata | R | false | false | 2,092 | r |
library(dplyr)
# read training data
X_train <- read.table("/Users/carlosabadi/OneDrive - Abadi & Co/UCI HAR Dataset 2/train/X_train.txt")
Y_train <- read.table("/Users/carlosabadi/OneDrive - Abadi & Co/UCI HAR Dataset 2/train/y_train.txt")
subject_train <- read.table("/Users/carlosabadi/OneDrive - Abadi & Co/UCI HAR ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{pol_to_sph}
\alias{pol_to_sph}
\title{Convert polar to spherical coordinates}
\usage{
pol_to_sph(theta, phi)
}
\arguments{
\item{theta}{Azimuth from polar co-ordinates (theta in supplied electrode
locations)}
\item{phi}{Elevati... | /man/pol_to_sph.Rd | permissive | bnicenboim/eegUtils | R | false | true | 508 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{pol_to_sph}
\alias{pol_to_sph}
\title{Convert polar to spherical coordinates}
\usage{
pol_to_sph(theta, phi)
}
\arguments{
\item{theta}{Azimuth from polar co-ordinates (theta in supplied electrode
locations)}
\item{phi}{Elevati... |
## Data set up for models on ADA - 5 fold cross validation
## Run on ADA
## Sets up multiple Cross validation on ADA.
## 0. Contents #####
## 1. Gets data from github with criteria below
## 2. Creates k folds and best tuning parameters for final model
## 3. Creates scaled data sets per k, runs, saves, evaluates mod... | /Hmsc_CD/oregon_ada/code_sjSDM/r20210426a/b2_best_model.r | permissive | dougwyu/HJA_analyses_Kelpie | R | false | false | 12,039 | r | ## Data set up for models on ADA - 5 fold cross validation
## Run on ADA
## Sets up multiple Cross validation on ADA.
## 0. Contents #####
## 1. Gets data from github with criteria below
## 2. Creates k folds and best tuning parameters for final model
## 3. Creates scaled data sets per k, runs, saves, evaluates mod... |
# Submitted to OSEHRA 05/25/2017 by Jihwan Park.
# Original routine authored by Jihwan Park 2017.
# install_libraries.R
chooseCRANmirror(graphics=FALSE, ind=1)
install.packages(c("ggpubr","openxlsx","shiny","DT","ggplot2","nlme","stringr","shinyjs","formattable","shinythemes","ggthemes","survival","GGally","scales","k... | /install_libraries.R | permissive | AIC-VT/PCO | R | false | false | 1,150 | r | # Submitted to OSEHRA 05/25/2017 by Jihwan Park.
# Original routine authored by Jihwan Park 2017.
# install_libraries.R
chooseCRANmirror(graphics=FALSE, ind=1)
install.packages(c("ggpubr","openxlsx","shiny","DT","ggplot2","nlme","stringr","shinyjs","formattable","shinythemes","ggthemes","survival","GGally","scales","k... |
\name{nig.parameter}
\alias{nig.parameter}
\title{Generating parameters for the normal inverse Gaussian (NIG) distribution}
\description{
The function produces four parameters, alpha (tail heavyness), beta (asymmetry),
delta (scale), and mu (location) from the four variables, mean, variance,
kurtosis, and skew... | /pkgs/lawstat/man/nig.parameter.Rd | no_license | vaguiar/EDAV_Project_2017 | R | false | false | 2,270 | rd | \name{nig.parameter}
\alias{nig.parameter}
\title{Generating parameters for the normal inverse Gaussian (NIG) distribution}
\description{
The function produces four parameters, alpha (tail heavyness), beta (asymmetry),
delta (scale), and mu (location) from the four variables, mean, variance,
kurtosis, and skew... |
getwd()
setwd("./GettingAndCleaningData")
## check and create a directory
if(!file.exists("data")){
dir.create("data")
}
fileUrl <- "https://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD"
download.file(fileUrl, destfile = "./data/cameras.csv")
list.files("./data")
dateDownloaded <- d... | /coursera-data-sci/02_GettingAndCleaningData/01_04_downloading_file.R | no_license | dsk1/coursera-data-sci | R | false | false | 342 | r | getwd()
setwd("./GettingAndCleaningData")
## check and create a directory
if(!file.exists("data")){
dir.create("data")
}
fileUrl <- "https://data.baltimorecity.gov/api/views/dz54-2aru/rows.csv?accessType=DOWNLOAD"
download.file(fileUrl, destfile = "./data/cameras.csv")
list.files("./data")
dateDownloaded <- d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/codecommit_operations.R
\name{codecommit_get_merge_conflicts}
\alias{codecommit_get_merge_conflicts}
\title{Returns information about merge conflicts between the before and after
commit IDs for a pull request in a repository}
\usage{
codecomm... | /paws/man/codecommit_get_merge_conflicts.Rd | permissive | johnnytommy/paws | R | false | true | 2,473 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/codecommit_operations.R
\name{codecommit_get_merge_conflicts}
\alias{codecommit_get_merge_conflicts}
\title{Returns information about merge conflicts between the before and after
commit IDs for a pull request in a repository}
\usage{
codecomm... |
#PCA requires normalized and centered data - i.e. all series should share common dimension
#centered means "without mean", normalized - divided by sd()
dataset$CH <- (dataset$CH - mean(dataset$CH))/sd(dataset$CH)
dataset$HK <- (dataset$HK - mean(dataset$HK))/sd(dataset$HK)
dataset$SI <- (dataset$SI - mean(dataset$SI))... | /lab on pca.R | no_license | LYYLM2019/ifccomovement | R | false | false | 1,772 | r | #PCA requires normalized and centered data - i.e. all series should share common dimension
#centered means "without mean", normalized - divided by sd()
dataset$CH <- (dataset$CH - mean(dataset$CH))/sd(dataset$CH)
dataset$HK <- (dataset$HK - mean(dataset$HK))/sd(dataset$HK)
dataset$SI <- (dataset$SI - mean(dataset$SI))... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sbw.R
\name{sbw}
\alias{sbw}
\title{Stable balancing weights for causal contrasts and population means.}
\source{
{\url{https://www.ibm.com/products/ilog-cplex-optimization-studio}}
{\url{https://www.gurobi.com/products/gurobi-optimizer/}}
... | /man/sbw.Rd | no_license | cran/sbw | R | false | true | 12,028 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sbw.R
\name{sbw}
\alias{sbw}
\title{Stable balancing weights for causal contrasts and population means.}
\source{
{\url{https://www.ibm.com/products/ilog-cplex-optimization-studio}}
{\url{https://www.gurobi.com/products/gurobi-optimizer/}}
... |
#'
#' The GUROBI class.
#'
#' This class is an interface for the commercial GUROBI solver.
#'
#' @references \emph{Gurobi optimizer reference manual version 5.0,} Gurobi Optimization, Inc., Houston, Texas, July 2012.
#' @seealso the \href{http://www.gurobi.com/documentation/7.5/refman/r_api_overview.html}{GUROBI Offici... | /R/gurobi-solver.R | permissive | mp3201/CVXR | R | false | false | 5,425 | r | #'
#' The GUROBI class.
#'
#' This class is an interface for the commercial GUROBI solver.
#'
#' @references \emph{Gurobi optimizer reference manual version 5.0,} Gurobi Optimization, Inc., Houston, Texas, July 2012.
#' @seealso the \href{http://www.gurobi.com/documentation/7.5/refman/r_api_overview.html}{GUROBI Offici... |
library(tidyverse)
library(data.table)
library(maditr)
library(entropy)
library(ggridges)
args <- commandArgs(trailingOnly=TRUE)
## Input args
# args[1] Refined clusters
# args[2] Cluster ids categ
# args[3] Cluster taxonomy results
# args[4] Cluster darkness results
# args[5] DPD info
## Output args
# args[6] Output... | /scripts/Cluster_category_stats/cluster_categ_stats.r | permissive | functional-dark-side/functional-dark-side.github.io | R | false | false | 11,709 | r | library(tidyverse)
library(data.table)
library(maditr)
library(entropy)
library(ggridges)
args <- commandArgs(trailingOnly=TRUE)
## Input args
# args[1] Refined clusters
# args[2] Cluster ids categ
# args[3] Cluster taxonomy results
# args[4] Cluster darkness results
# args[5] DPD info
## Output args
# args[6] Output... |
#Empirical Method HW4
setwd("~/Acads/MFE 2016/2nd Quarter/Empirical Methods in Finance/HW4")
install.packages("vrtest")
install.packages("fGarch")
library(lubridate)
library(xts)
library(ggplot2)
library(dplyr)
library(vrtest)
library(fUnitRoots)
library(zoo)
library(fGarch)
library(xlsx)
# question 1 part b
# get m... | /EmpiricalMethods/Assignment 4/Assignment4_Sol.R | no_license | ashwinkumar/MFE2016 | R | false | false | 6,180 | r | #Empirical Method HW4
setwd("~/Acads/MFE 2016/2nd Quarter/Empirical Methods in Finance/HW4")
install.packages("vrtest")
install.packages("fGarch")
library(lubridate)
library(xts)
library(ggplot2)
library(dplyr)
library(vrtest)
library(fUnitRoots)
library(zoo)
library(fGarch)
library(xlsx)
# question 1 part b
# get m... |
MAaic <- function(MA.process,max.order=10){
BEST_I <- 0
LOWEST_AIC <- 10^10
for(i in 0:max.order){
temp.arima <- arima(MA.process,order=c(0,0,i))
if(AIC(temp.arima) < LOWEST_AIC){
LOWEST_AIC <- AIC(temp.arima)
BEST_I <- i
}
}
return(BEST_I)
}
x <- arima.sim(list(ma=c(0.... | /R-learning/Time.SeriesClass/data sets/Time Series/class code/maAIC (3).R | no_license | mookie321/R | R | false | false | 494 | r | MAaic <- function(MA.process,max.order=10){
BEST_I <- 0
LOWEST_AIC <- 10^10
for(i in 0:max.order){
temp.arima <- arima(MA.process,order=c(0,0,i))
if(AIC(temp.arima) < LOWEST_AIC){
LOWEST_AIC <- AIC(temp.arima)
BEST_I <- i
}
}
return(BEST_I)
}
x <- arima.sim(list(ma=c(0.... |
context("internals")
expect_error(get_formula_terms("string"), "formula must be of class 'formula'")
expect_error(get_formula_response("string"), "formula must be of class 'formula'")
set.seed(10)
formula = z ~ x + y + t + u - 1
protected = z ~ y + u + v
data = data.frame(z = rnorm(10),
x... | /tests/testthat/test_internals.R | no_license | cran/subformula | R | false | false | 949 | r | context("internals")
expect_error(get_formula_terms("string"), "formula must be of class 'formula'")
expect_error(get_formula_response("string"), "formula must be of class 'formula'")
set.seed(10)
formula = z ~ x + y + t + u - 1
protected = z ~ y + u + v
data = data.frame(z = rnorm(10),
x... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/register_cpu_cores.R
\name{register_cpu_cores}
\alias{register_cpu_cores}
\title{Check for parallel support and register CPU cores}
\usage{
register_cpu_cores()
}
\value{
TRUE if CPU cores were registered
}
\description{
Check for parallel su... | /man/register_cpu_cores.Rd | no_license | SWS-Methodology/faoswsTrade | R | false | true | 351 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/register_cpu_cores.R
\name{register_cpu_cores}
\alias{register_cpu_cores}
\title{Check for parallel support and register CPU cores}
\usage{
register_cpu_cores()
}
\value{
TRUE if CPU cores were registered
}
\description{
Check for parallel su... |
x=seq(-2,2,length.out = 100)
v_max=(1+sqrt(5))/2
v_min=(1-sqrt(5))/2
m=c(v_max,v_min)
plot (x,x*exp(-((x-1)**2)/2), col='red')
abline(v=m)
| /R_intro/plottutorial.R | no_license | a-parida12/StatModelnMachineLearn | R | false | false | 151 | r | x=seq(-2,2,length.out = 100)
v_max=(1+sqrt(5))/2
v_min=(1-sqrt(5))/2
m=c(v_max,v_min)
plot (x,x*exp(-((x-1)**2)/2), col='red')
abline(v=m)
|
##########################################################
###### LOS frequency tables ##############################
##########################################################
## Functions ##
aggregate_weekly <- function(count_csv){
## Function to convert daily counts of LoS into
## 3.5, 10.5, 17.5 ... to 73... | /R/los_freq_tables.R | no_license | HFAnalyticsLab/overflow_analysis | R | false | false | 3,081 | r | ##########################################################
###### LOS frequency tables ##############################
##########################################################
## Functions ##
aggregate_weekly <- function(count_csv){
## Function to convert daily counts of LoS into
## 3.5, 10.5, 17.5 ... to 73... |
setwd("G:\\math\\514")
require(keras)
require(beepr)
amdir <- "G:\\math\\514\\cloud\\reviews.csv"
# amazon <- read.csv( amdir , stringsAsFactors= F )
# amazon$Text <- as.character(amazon$Text )
library(tensorflow)
sess = tf$Session()
hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello)
max_features <- 50... | /amazonv2.R | no_license | mleibert/514 | R | false | false | 1,827 | r |
setwd("G:\\math\\514")
require(keras)
require(beepr)
amdir <- "G:\\math\\514\\cloud\\reviews.csv"
# amazon <- read.csv( amdir , stringsAsFactors= F )
# amazon$Text <- as.character(amazon$Text )
library(tensorflow)
sess = tf$Session()
hello <- tf$constant('Hello, TensorFlow!')
sess$run(hello)
max_features <- 50... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/UniprocessFuture-class.R
\name{UniprocessFuture-class}
\alias{EagerFuture}
\alias{LazyFuture}
\alias{UniprocessFuture}
\alias{UniprocessFuture-class}
\title{An uniprocess future is a future whose value will be resolved synchroneously in the c... | /man/UniprocessFuture-class.Rd | no_license | dy-kim/future | R | false | true | 1,733 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/UniprocessFuture-class.R
\name{UniprocessFuture-class}
\alias{EagerFuture}
\alias{LazyFuture}
\alias{UniprocessFuture}
\alias{UniprocessFuture-class}
\title{An uniprocess future is a future whose value will be resolved synchroneously in the c... |
#
# Copyright 2007-2017 The OpenMx Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | /R/MxInterval.R | no_license | ktargows/OpenMx | R | false | false | 14,615 | r | #
# Copyright 2007-2017 The OpenMx Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
test_that("embodied energy calculations works as expected", {
# Get a vector of primary industries for the example data set.
# The vector of primary industries comes from the resource matrix (R).
primary_machine_names <- UKEnergy2000mats %>%
tidyr::spread(key = matrix.name, value = matrix) %>%
magrittr::... | /tests/testthat/test-embodied.R | no_license | MatthewHeun/Recca | R | false | false | 10,889 | r |
test_that("embodied energy calculations works as expected", {
# Get a vector of primary industries for the example data set.
# The vector of primary industries comes from the resource matrix (R).
primary_machine_names <- UKEnergy2000mats %>%
tidyr::spread(key = matrix.name, value = matrix) %>%
magrittr::... |
#' Create Arrow Files
#'
#' This function will create ArrowFiles from input files. These ArrowFiles are the main constituent for downstream analysis in ArchR.
#'
#' @param inputFiles A character vector containing the paths to the input files to use to generate the ArrowFiles.
#' These files can be in one of the follo... | /R/CreateArrow.R | permissive | kerwin12580/ArchR | R | false | false | 85,932 | r | #' Create Arrow Files
#'
#' This function will create ArrowFiles from input files. These ArrowFiles are the main constituent for downstream analysis in ArchR.
#'
#' @param inputFiles A character vector containing the paths to the input files to use to generate the ArrowFiles.
#' These files can be in one of the follo... |
context("Periods")
test_that("is.period works as expected",{
expect_that(is.period(234), is_false())
expect_that(is.period(as.POSIXct("2008-08-03 13:01:59", tz = "UTC")),
is_false())
expect_that(is.period(as.POSIXlt("2008-08-03 13:01:59", tz = "UTC")),
is_false())
expect_that(is.period(Sys.Date()), is... | /lubridate/tests/testthat/test-periods.R | no_license | ingted/R-Examples | R | false | false | 13,353 | r | context("Periods")
test_that("is.period works as expected",{
expect_that(is.period(234), is_false())
expect_that(is.period(as.POSIXct("2008-08-03 13:01:59", tz = "UTC")),
is_false())
expect_that(is.period(as.POSIXlt("2008-08-03 13:01:59", tz = "UTC")),
is_false())
expect_that(is.period(Sys.Date()), is... |
#
# Exploratory Data Analysis - Course Project 2
#
# Script: plot3.R
# Author: Lars Hermes
#
# As the subject of the course is exploratory data analysis, I have decided not
# to encapsulate the code in functions, but to write it as an exploratory
# analysis will take place.
library(plyr)
# read data from file
NEI <... | /ExplAnalysis/ExData_Plotting2/plot3.R | permissive | FatLorenzo/datasciencecoursera | R | false | false | 1,047 | r | #
# Exploratory Data Analysis - Course Project 2
#
# Script: plot3.R
# Author: Lars Hermes
#
# As the subject of the course is exploratory data analysis, I have decided not
# to encapsulate the code in functions, but to write it as an exploratory
# analysis will take place.
library(plyr)
# read data from file
NEI <... |
#load up libraries and raw csv of cell counts
library(httr)
library(RCurl)
CELLSfileUrl <- "https://raw.githubusercontent.com/derele/Eimeria_Lab/master/data/3_recordingTables/E7_112018_Eim_FACS_cell_counts_raw.csv"
CELLS <- read.csv(text=getURL(CELLSfileUrl))
# include percentage counts in the df
ANTfileUrl <- "https... | /E7/FACS/E7_112018_Eim_FACS_cell_populations_conversion.R | no_license | LubomirBednar/PhD | R | false | false | 4,081 | r | #load up libraries and raw csv of cell counts
library(httr)
library(RCurl)
CELLSfileUrl <- "https://raw.githubusercontent.com/derele/Eimeria_Lab/master/data/3_recordingTables/E7_112018_Eim_FACS_cell_counts_raw.csv"
CELLS <- read.csv(text=getURL(CELLSfileUrl))
# include percentage counts in the df
ANTfileUrl <- "https... |
library(NISTunits)
### Name: NISTinchOfWater60FtOpascal
### Title: Convert inch of water 12 to pascal
### Aliases: NISTinchOfWater60FtOpascal
### Keywords: programming
### ** Examples
NISTinchOfWater60FtOpascal(10)
| /data/genthat_extracted_code/NISTunits/examples/NISTinchOfWater60FtOpascal.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 222 | r | library(NISTunits)
### Name: NISTinchOfWater60FtOpascal
### Title: Convert inch of water 12 to pascal
### Aliases: NISTinchOfWater60FtOpascal
### Keywords: programming
### ** Examples
NISTinchOfWater60FtOpascal(10)
|
#' Separate a collapsed column into multiple rows.
#'
#' If a variable contains observations with multiple delimited values, this
#' separates the values and places each one in its own row.
#'
#' @inheritSection gather Rules for selection
#' @inheritParams fill
#' @inheritParams gather
#' @param sep Separator delimitin... | /R/separate-rows.R | permissive | mtoto/tidyr | R | false | false | 1,214 | r | #' Separate a collapsed column into multiple rows.
#'
#' If a variable contains observations with multiple delimited values, this
#' separates the values and places each one in its own row.
#'
#' @inheritSection gather Rules for selection
#' @inheritParams fill
#' @inheritParams gather
#' @param sep Separator delimitin... |
#
# vis-key_order-pref.R, 24 May 20
#
# Data from:
# The Order of Things: {How} Developers Sort Fields and Methods
# Benjamin Biegel and Fabian Beck and Willi Hornig and Stephan Diehl
#
# Example from:
# Evidence-based Software Engineering: based on the publicly available data
# Derek M. Jones
#
# TAG Java_declaration ... | /sourcecode/member-order/vis-key_order-pref.R | no_license | Derek-Jones/ESEUR-code-data | R | false | false | 7,633 | r | #
# vis-key_order-pref.R, 24 May 20
#
# Data from:
# The Order of Things: {How} Developers Sort Fields and Methods
# Benjamin Biegel and Fabian Beck and Willi Hornig and Stephan Diehl
#
# Example from:
# Evidence-based Software Engineering: based on the publicly available data
# Derek M. Jones
#
# TAG Java_declaration ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_exposure.R
\name{calculate_exposure}
\alias{calculate_exposure}
\title{create a set of directories to run disperseR}
\usage{
calculate_exposure(year.E, year.D, link.to = "zips",
pollutant = "SO2..tons.", units.mo, rda_file = "load... | /man/calculate_exposure.Rd | no_license | lhenneman/disperseR | R | false | true | 1,690 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_exposure.R
\name{calculate_exposure}
\alias{calculate_exposure}
\title{create a set of directories to run disperseR}
\usage{
calculate_exposure(year.E, year.D, link.to = "zips",
pollutant = "SO2..tons.", units.mo, rda_file = "load... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper_functions.R
\name{.methylcc_mstep}
\alias{.methylcc_mstep}
\title{Maximization step}
\usage{
.methylcc_mstep(Ys, Zs, current_pi_mle, current_theta, estep0, estep1)
}
\arguments{
\item{Ys}{observed methylation levels in samples provided... | /man/dot-methylcc_mstep.Rd | no_license | stephaniehicks/methylCC | R | false | true | 859 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper_functions.R
\name{.methylcc_mstep}
\alias{.methylcc_mstep}
\title{Maximization step}
\usage{
.methylcc_mstep(Ys, Zs, current_pi_mle, current_theta, estep0, estep1)
}
\arguments{
\item{Ys}{observed methylation levels in samples provided... |
\name{simulate.rate}
\alias{simulate.rate}
\title{
simulate.rate is the generic function to simulate rates along phylogenetic trees with any of the models.
}
\description{
simulate.rate simulates the rate with any of the models implemented in NELSI
}
\usage{
simulate.rate(tree, FUN, ...)
}
\arguments{
\item{tree}{
A ... | /man/simulate.rate.Rd | no_license | sebastianduchene/NELSI | R | false | false | 2,320 | rd | \name{simulate.rate}
\alias{simulate.rate}
\title{
simulate.rate is the generic function to simulate rates along phylogenetic trees with any of the models.
}
\description{
simulate.rate simulates the rate with any of the models implemented in NELSI
}
\usage{
simulate.rate(tree, FUN, ...)
}
\arguments{
\item{tree}{
A ... |
knitr::purl(input,output,documentation=2,quiet=T)
knitr::opts_chunk$set(echo = TRUE)#,fig.width=5,fig.height=5,dpi=125)
# knitr::knit_hooks$set(plot = function(x, options) {
# paste('<figure><img src="',
# opts_knit$get('base.url'), paste(x, collapse = '.'),
# '"><figcaption>', options$fig.cap, '</... | /cm_knitr_settings.r | no_license | YaleBGCC/Course | R | false | false | 4,552 | r |
knitr::purl(input,output,documentation=2,quiet=T)
knitr::opts_chunk$set(echo = TRUE)#,fig.width=5,fig.height=5,dpi=125)
# knitr::knit_hooks$set(plot = function(x, options) {
# paste('<figure><img src="',
# opts_knit$get('base.url'), paste(x, collapse = '.'),
# '"><figcaption>', options$fig.cap, '</... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/disagreement.r
\name{vote_entropy}
\alias{vote_entropy}
\title{Computes entropy of committee's classifications}
\usage{
vote_entropy(x, type = "class", entropy_method = "ML")
}
\description{
Computes the disagreement measure for each of the u... | /man/vote_entropy.Rd | no_license | francoisjaulin/activelearning | R | false | true | 444 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/disagreement.r
\name{vote_entropy}
\alias{vote_entropy}
\title{Computes entropy of committee's classifications}
\usage{
vote_entropy(x, type = "class", entropy_method = "ML")
}
\description{
Computes the disagreement measure for each of the u... |
\name{reannualize}
\alias{reannualize}
\alias{reannualize.sr}
\alias{reannualize.sropt}
\title{Change the annualization of a Sharpe ratio.}
\usage{
reannualize(object, new.ope = NULL, new.epoch = NULL)
\method{reannualize}{sr} (object, new.ope = NULL,
new.epoch = NULL)
\method{reannualize}{sropt} (object, n... | /man/reannualize.Rd | no_license | maxbrown/SharpeR | R | false | false | 2,368 | rd | \name{reannualize}
\alias{reannualize}
\alias{reannualize.sr}
\alias{reannualize.sropt}
\title{Change the annualization of a Sharpe ratio.}
\usage{
reannualize(object, new.ope = NULL, new.epoch = NULL)
\method{reannualize}{sr} (object, new.ope = NULL,
new.epoch = NULL)
\method{reannualize}{sropt} (object, n... |
#' Univariate sampler function for continuous variables for prediction-based
#' imputation, assuming normality for prediction errors of random forest
#'
#' @description
#' Please note that functions with names starting with "mice.impute" are
#' exported to be visible for the mice sampler functions. Please do not call
#... | /R/mice.impute.rfpred.norm.R | no_license | shangzhi-hong/RfEmpImp | R | false | false | 5,594 | r | #' Univariate sampler function for continuous variables for prediction-based
#' imputation, assuming normality for prediction errors of random forest
#'
#' @description
#' Please note that functions with names starting with "mice.impute" are
#' exported to be visible for the mice sampler functions. Please do not call
#... |
### ------------------------------------------------------------------------ ###
### MSE for ICES WKLIFE VII, VIII, ...
### testing data limited catch rules from ICES WKMSYCat34 2017
### ------------------------------------------------------------------------ ###
### author: Simon Fischer (Cefas), simon.fischer@cefas.c... | /R/MP.R | no_license | MartaCousido/wklifeVII | R | false | false | 13,220 | r | ### ------------------------------------------------------------------------ ###
### MSE for ICES WKLIFE VII, VIII, ...
### testing data limited catch rules from ICES WKMSYCat34 2017
### ------------------------------------------------------------------------ ###
### author: Simon Fischer (Cefas), simon.fischer@cefas.c... |
install.packages("utf8")
install.packages("wbstats")
help("plot")
?na.omit()
#cosas por hacer
x <- na.omit(Gasto_educ_2000$SE.XPD.TOTL.GD.ZS)
y <- na.omit(Desigualdad$SI.POV.GINI)
cor(x, y) | /script.R | no_license | Daniel-Urango/Desigualdad | R | false | false | 192 | r | install.packages("utf8")
install.packages("wbstats")
help("plot")
?na.omit()
#cosas por hacer
x <- na.omit(Gasto_educ_2000$SE.XPD.TOTL.GD.ZS)
y <- na.omit(Desigualdad$SI.POV.GINI)
cor(x, y) |
## This function creates a list to set and get the value of the matrix and
#the inverse of the matrix
makeCacheMatrix <- function(x=matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse
getinverse <- funct... | /cachematrix.R | no_license | mailtrupti/hello-world | R | false | false | 666 | r | ## This function creates a list to set and get the value of the matrix and
#the inverse of the matrix
makeCacheMatrix <- function(x=matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinverse <- function(inverse) inv <<- inverse
getinverse <- funct... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{font_addpackage}
\alias{font_addpackage}
\title{Add font from an installed package to fonts database}
\usage{
font_addpackage(pkg = NULL)
}
\arguments{
\item{pkg}{The name of the font package, e.g., \code{"fontcm"}.}
}
\description{
This is usually not called d... | /man/font_addpackage.Rd | no_license | noamross/extrafont | R | false | false | 407 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{font_addpackage}
\alias{font_addpackage}
\title{Add font from an installed package to fonts database}
\usage{
font_addpackage(pkg = NULL)
}
\arguments{
\item{pkg}{The name of the font package, e.g., \code{"fontcm"}.}
}
\description{
This is usually not called d... |
# Trivariate model ####
library(MCMCglmm)
NARows <-function(df, vars){
apply(df[,vars], 1, function(a){
any(is.na(a)|a=="Inf"|a=="-Inf")
})
}
Viruscovar <- c("vDNAoRNA","vEnvelope","vVectorYNna","vPubMedCites","HostRangeMean")[1]
Viruscovar <- c("HostRangeMean")[1]
TestViruses <- Viruses[-which(NARows(Viru... | /R Code/HP3 Code/ZZ_Probably won't use or Old Code/5b_Trivariate Model.R | no_license | gfalbery/Helmneth | R | false | false | 2,365 | r |
# Trivariate model ####
library(MCMCglmm)
NARows <-function(df, vars){
apply(df[,vars], 1, function(a){
any(is.na(a)|a=="Inf"|a=="-Inf")
})
}
Viruscovar <- c("vDNAoRNA","vEnvelope","vVectorYNna","vPubMedCites","HostRangeMean")[1]
Viruscovar <- c("HostRangeMean")[1]
TestViruses <- Viruses[-which(NARows(Viru... |
#' Run BioCro at a point
#'
#' @param lat latitude in decimal degrees
#' @param lon longitude in decimal degrees
#' @param metfile full path and name of a netCDF file in either a PEcAn-CF format with meteorological driver data
#' or a csv file with hourly data in BioCro format
#' @param soil.nc full path and name of a ... | /models/biocro/R/run.biocro.R | permissive | harshagrawal28/pecan | R | false | false | 8,917 | r | #' Run BioCro at a point
#'
#' @param lat latitude in decimal degrees
#' @param lon longitude in decimal degrees
#' @param metfile full path and name of a netCDF file in either a PEcAn-CF format with meteorological driver data
#' or a csv file with hourly data in BioCro format
#' @param soil.nc full path and name of a ... |
library(ggplot2); library(scales); library(RColorBrewer);
# fte_theme taken from http://minimaxir.com/2015/02/ggplot-tutorial/
fte_theme <- function() {
# Generate the colors for the chart procedurally with RColorBrewer
palette <- brewer.pal("Greys", n=9)
color.background = palette[2]
color.grid.major... | /burndown.R | no_license | spicy-memes17/r-burndown-chart | R | false | false | 2,416 | r | library(ggplot2); library(scales); library(RColorBrewer);
# fte_theme taken from http://minimaxir.com/2015/02/ggplot-tutorial/
fte_theme <- function() {
# Generate the colors for the chart procedurally with RColorBrewer
palette <- brewer.pal("Greys", n=9)
color.background = palette[2]
color.grid.major... |
\name{tests.wfccm}
\alias{tests.wfccm}
\title{WFCCM Statistical Tests}
\description{
Runs and collates statistical tests for use in WFCCM.
}
\usage{
tests.wfccm(x, grp, tests = c("t", "ks", "sam", "wga", "huwright", "info"), ...)
}
\arguments{
\item{x}{numeric matrix with rows as samples and columns as variables.}
... | /man/tests.wfccm.Rd | no_license | vubiostat/wfccmr | R | false | false | 662 | rd | \name{tests.wfccm}
\alias{tests.wfccm}
\title{WFCCM Statistical Tests}
\description{
Runs and collates statistical tests for use in WFCCM.
}
\usage{
tests.wfccm(x, grp, tests = c("t", "ks", "sam", "wga", "huwright", "info"), ...)
}
\arguments{
\item{x}{numeric matrix with rows as samples and columns as variables.}
... |
select_features=function(X,K=10,T=100,X1=50,X2=100,X3=150,X4=200,X5=250, Express=Express){
library(SNFtool)
library(apcluster)
alpha=0.5
.discretisation <- function(eigenVectors) {
normalize <- function(x) x / sqrt(sum(x^2))
eigenVectors = t(apply(eigenVectors,1,normalize))
n = nrow(eigen... | /R/parallelclust.R | permissive | leslielin7/SCENA | R | false | false | 7,433 | r | select_features=function(X,K=10,T=100,X1=50,X2=100,X3=150,X4=200,X5=250, Express=Express){
library(SNFtool)
library(apcluster)
alpha=0.5
.discretisation <- function(eigenVectors) {
normalize <- function(x) x / sqrt(sum(x^2))
eigenVectors = t(apply(eigenVectors,1,normalize))
n = nrow(eigen... |
shinyUI(
pageWithSidebar(
# Application title
headerPanel(
list(HTML('<img src="icon.jpg" style="width: 90%; height: 20%" />'),
"Delitos en Zapopan - PETRUS"
),
windowTitle="PETRUS" ),
sidebarPanel(
h3("Selecciona los datos"),
selectI... | /app/ui.r | no_license | carpetri/dataton-zapopan | R | false | false | 17,408 | r |
shinyUI(
pageWithSidebar(
# Application title
headerPanel(
list(HTML('<img src="icon.jpg" style="width: 90%; height: 20%" />'),
"Delitos en Zapopan - PETRUS"
),
windowTitle="PETRUS" ),
sidebarPanel(
h3("Selecciona los datos"),
selectI... |
# 必要なライブラリをロードします
library(shiny)
library(plotly)
# `sidebarPanel()`を用いてサイドバーパネルを定義し、`map_sidebar_content`に代入して下さい
# この時、ラベル(label)を"Variable to Map"、選択肢(choices)を以下のリストにして下さい
# list(
# "Population" = "population",
# "Electoral Votes" = "votes",
# "Votes / Population" = "ratio"
# )
# `mainPanel()`を... | /book-exercises/chapter-19-exercises/exercise-7/app_ui.R | permissive | HOXOMInc/programming-skills-for-data-science | R | false | false | 2,030 | r | # 必要なライブラリをロードします
library(shiny)
library(plotly)
# `sidebarPanel()`を用いてサイドバーパネルを定義し、`map_sidebar_content`に代入して下さい
# この時、ラベル(label)を"Variable to Map"、選択肢(choices)を以下のリストにして下さい
# list(
# "Population" = "population",
# "Electoral Votes" = "votes",
# "Votes / Population" = "ratio"
# )
# `mainPanel()`を... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.