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 |
|---|---|---|---|---|---|---|---|---|---|
source("./mean.df.R")
head(mean.df)
seq(1,4455,(4455/5))
plot(mean.df[mean.df[,"sigma"]==6.4,"cn.sym"], ylab = "number of co periods",type = 'l', col = "olivedrab1")
lines(mean.df[mean.df[,"sigma"]==6.4,"cn.ERT"], col = 'royalblue')
lines(mean.df[mean.df[,"sigma"]==6.4,"cn.ELT"], col = 'red')
lines(mean.df[mean.df[... | /coexistence_metrics/co.num,plotting.R | no_license | jasminalbert/Albert_ReumanRepo | R | false | false | 1,894 | r | source("./mean.df.R")
head(mean.df)
seq(1,4455,(4455/5))
plot(mean.df[mean.df[,"sigma"]==6.4,"cn.sym"], ylab = "number of co periods",type = 'l', col = "olivedrab1")
lines(mean.df[mean.df[,"sigma"]==6.4,"cn.ERT"], col = 'royalblue')
lines(mean.df[mean.df[,"sigma"]==6.4,"cn.ELT"], col = 'red')
lines(mean.df[mean.df[... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modSearch.R
\name{modSearch}
\alias{modSearch}
\title{Search MODIS images}
\usage{
modSearch(product, collection = 6, verbose = FALSE, ...)
}
\arguments{
\item{product}{the short name of the MODIS product.}
\item{collection}{MODIS... | /man/modSearch.Rd | no_license | cran/RGISTools | R | false | true | 3,828 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modSearch.R
\name{modSearch}
\alias{modSearch}
\title{Search MODIS images}
\usage{
modSearch(product, collection = 6, verbose = FALSE, ...)
}
\arguments{
\item{product}{the short name of the MODIS product.}
\item{collection}{MODIS... |
library(keras)
cifar10 <- dataset_cifar10()
x_train <- cifar10$train$x
x_test <- cifar10$test$x
#rescale by devide by 255
x_train = x_train/255
x_test = x_test/255
#to categorical
y_train = to_categorical(cifar10$train$y)
y_test = to_categorical(cifar10$test$y)
#MODEL DEFINITION
#watch that 2 lines of dropout laye... | /assignment_1/al_assignment_1_exercise_2.R | no_license | alsugiharto/uni-machine-learning-nlp-cv | R | false | false | 1,581 | r | library(keras)
cifar10 <- dataset_cifar10()
x_train <- cifar10$train$x
x_test <- cifar10$test$x
#rescale by devide by 255
x_train = x_train/255
x_test = x_test/255
#to categorical
y_train = to_categorical(cifar10$train$y)
y_test = to_categorical(cifar10$test$y)
#MODEL DEFINITION
#watch that 2 lines of dropout laye... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Rdrools.R
\name{runRulesDrl}
\alias{runRulesDrl}
\title{Apply a set of rule transformations to a data frame}
\usage{
runRulesDrl(rules.session, input.df)
}
\arguments{
\item{rules.session}{a session of the rules engine created using the \code... | /src/main/resources/Rdrools/man/runRulesDrl.Rd | permissive | Mu-Sigma/Rdrools | R | false | true | 2,782 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Rdrools.R
\name{runRulesDrl}
\alias{runRulesDrl}
\title{Apply a set of rule transformations to a data frame}
\usage{
runRulesDrl(rules.session, input.df)
}
\arguments{
\item{rules.session}{a session of the rules engine created using the \code... |
# Nombre: Delgado Saantos, Kevin Fernando 20150026J
# Parte 1:
# Separamos la matriz de Hankel como una suma matrices A y B
A <- matrix(data = rep(seq(1:5), 5), nrow = 5)
B <- matrix(data = rep(seq(1:5) - 1, 5), nrow = 5, ncol = 5, byrow = TRUE)
A + B # Esta suma nos retorna la matriz de Hankel pedida.
# Parte 2:
# L... | /Practica2/Ejercicio1.R | no_license | FernandoDelgadoSantos/Curso-R | R | false | false | 1,034 | r | # Nombre: Delgado Saantos, Kevin Fernando 20150026J
# Parte 1:
# Separamos la matriz de Hankel como una suma matrices A y B
A <- matrix(data = rep(seq(1:5), 5), nrow = 5)
B <- matrix(data = rep(seq(1:5) - 1, 5), nrow = 5, ncol = 5, byrow = TRUE)
A + B # Esta suma nos retorna la matriz de Hankel pedida.
# Parte 2:
# L... |
library(ggplot2)
library(magrittr)
library(dplyr)
library(scales)
kleiner_proc_short <- read.csv('data/kleiner_data/kleiner_data_processed_short.csv')
kleiner_proc_long <- read.csv('data/kleiner_data/kleiner_data_processed_long.csv')
kleiner_proc_long$lc <- rep('Long Chromatographic Run', nrow(kleiner_proc_long))
kle... | /scripts/plotting_kleiner_data.R | no_license | bertrand-lab/mn-fe-allocation | R | false | false | 1,227 | r | library(ggplot2)
library(magrittr)
library(dplyr)
library(scales)
kleiner_proc_short <- read.csv('data/kleiner_data/kleiner_data_processed_short.csv')
kleiner_proc_long <- read.csv('data/kleiner_data/kleiner_data_processed_long.csv')
kleiner_proc_long$lc <- rep('Long Chromatographic Run', nrow(kleiner_proc_long))
kle... |
setwd("~/STA3126/mathematical-statistics")
lotto = read.csv("Lotto.csv", header = T)
head(lotto)
# cbind = combine column vectors
WN = cbind(lotto$X1, lotto$X2, lotto$X3, lotto$X4, lotto$X5, lotto$X6)
head(WN) # command + Enter
table(WN) # number of rounds to be selected as one of the winning numbers
dim(WN)[1]
nrow(... | /Lotto_analysis2.R | no_license | sophryu99/R-basics | R | false | false | 1,424 | r | setwd("~/STA3126/mathematical-statistics")
lotto = read.csv("Lotto.csv", header = T)
head(lotto)
# cbind = combine column vectors
WN = cbind(lotto$X1, lotto$X2, lotto$X3, lotto$X4, lotto$X5, lotto$X6)
head(WN) # command + Enter
table(WN) # number of rounds to be selected as one of the winning numbers
dim(WN)[1]
nrow(... |
#Having a bad day at work, 'data analyst number two' enters your office and starts complaining that 'data analyst number five' is slowing down the entire project. Since you know that 'data analyst number two' has the reputation of being a smarty-pants, you first decide to check if his statement is true.
#The fact that... | /Factors/comparing_ordered_factors.R | no_license | alexallenspach/Introduction-to-R | R | false | false | 1,259 | r | #Having a bad day at work, 'data analyst number two' enters your office and starts complaining that 'data analyst number five' is slowing down the entire project. Since you know that 'data analyst number two' has the reputation of being a smarty-pants, you first decide to check if his statement is true.
#The fact that... |
#Define n<-1000
n <- 1000
#Then use R to compute the sum of 1 through 1000 using the formula #n(n+1)/2
n*(n+1)/2 | /Chapter 1/Exercice2.r | no_license | Mifaou/Datacamp-HarvardX-PH125.1x | R | false | false | 112 | r | #Define n<-1000
n <- 1000
#Then use R to compute the sum of 1 through 1000 using the formula #n(n+1)/2
n*(n+1)/2 |
context("visual tests of plots")
test_that("plots look the way they should", {
vdiffr::expect_doppelganger("Basic treemap", {
ggplot2::ggplot(G20, ggplot2::aes(area = gdp_mil_usd, fill = hdi, label = country)) +
geom_treemap() +
geom_treemap_text()
})
vdiffr::expect_doppelganger("Fixed layout", ... | /tests/testthat/test_plots.R | no_license | caparks2/treemapify | R | false | false | 2,461 | r | context("visual tests of plots")
test_that("plots look the way they should", {
vdiffr::expect_doppelganger("Basic treemap", {
ggplot2::ggplot(G20, ggplot2::aes(area = gdp_mil_usd, fill = hdi, label = country)) +
geom_treemap() +
geom_treemap_text()
})
vdiffr::expect_doppelganger("Fixed layout", ... |
# Relationships between two variables
#######################################################################################################################
#
# When the response variable is numerical and the explanatory variable is categorical, we can evaluate the
# relationship between the two variables by compar... | /dataCamp/openCourses/dataAnalysisAndStatisticalInference/6_inferenceForNumericalData/15_relationshipsBetweenTwoVariables.R | permissive | odonnmi/learnNPractice | R | false | false | 630 | r | # Relationships between two variables
#######################################################################################################################
#
# When the response variable is numerical and the explanatory variable is categorical, we can evaluate the
# relationship between the two variables by compar... |
# Start Operating Characteristic function for two diseases
# ##############################################################################
# Brianna Hitt - 02.10.2020
# Operating characteristics functions for two diseases
# function to calculate operating characteristics for hierarchical and
# array testing wit... | /R/operatingCharacteristics2.R | no_license | cran/binGroup2 | R | false | false | 38,796 | r | # Start Operating Characteristic function for two diseases
# ##############################################################################
# Brianna Hitt - 02.10.2020
# Operating characteristics functions for two diseases
# function to calculate operating characteristics for hierarchical and
# array testing wit... |
library(ggplot2)
library(tidyverse)
# folder_path = "C:/rdf/my/ms/dvnd-df/figurasDissertacao"
folder_path = "~/git/dvnd-df/doc/results/figurasDissertacao"
setwd(folder_path)
titulos = list()
titulos["imp"] = "Solution improvement"
titulos["time"] = "Time (s)"
titulos["count"] = "Iterations"
tamanhoInstancia = c(52, ... | /doc/results/figurasDissertacao/gerarFiguras.r | permissive | LabCad/dvnd-df | R | false | false | 3,882 | r | library(ggplot2)
library(tidyverse)
# folder_path = "C:/rdf/my/ms/dvnd-df/figurasDissertacao"
folder_path = "~/git/dvnd-df/doc/results/figurasDissertacao"
setwd(folder_path)
titulos = list()
titulos["imp"] = "Solution improvement"
titulos["time"] = "Time (s)"
titulos["count"] = "Iterations"
tamanhoInstancia = c(52, ... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(-1.16084963371651e-226, 5.15454813856261e-88, 0, 0, 0), .Dim = c(5L, 1L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615773662-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 231 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(-1.16084963371651e-226, 5.15454813856261e-88, 0, 0, 0), .Dim = c(5L, 1L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) |
library(readr)
library(tidyverse)
library(readxl)
library(lubridate)
library(ggplot2)
data <- read_excel("~/Dropbox/Lab data/S Willamette GWMA Dropbox/Decagon Data/EM42760 13Jun18-0925-Field 1.xls",
sheet = "Em50 \"EM42760\" Data", skip = 3, col_names = c('date_time','precip','moist_5cm','temp_5cm','cond_5cm','moist_10... | /Code/Environmental Factors/load_logger_data.R | no_license | twilli2/n2oflux | R | false | false | 23,077 | r | library(readr)
library(tidyverse)
library(readxl)
library(lubridate)
library(ggplot2)
data <- read_excel("~/Dropbox/Lab data/S Willamette GWMA Dropbox/Decagon Data/EM42760 13Jun18-0925-Field 1.xls",
sheet = "Em50 \"EM42760\" Data", skip = 3, col_names = c('date_time','precip','moist_5cm','temp_5cm','cond_5cm','moist_10... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BSDA-package.R
\docType{data}
\name{Simpson}
\alias{Simpson}
\title{Grade point averages of men and women participating in various sports-an
illustration of Simpson's paradox}
\format{A data frame/tibble with 100 observations on three variabl... | /man/Simpson.Rd | no_license | nebsnave/BSDA | R | false | true | 950 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BSDA-package.R
\docType{data}
\name{Simpson}
\alias{Simpson}
\title{Grade point averages of men and women participating in various sports-an
illustration of Simpson's paradox}
\format{A data frame/tibble with 100 observations on three variabl... |
#' Unit Conversion - Angles - Degrees to Degrees, Minutes, and Seconds
#'
#' Performs a conversion of angle measures from degrees to degrees, minutes, and seconds.
#' Minutes (also called minutes of arc) are 1/60th of a degree.
#' Seconds (also called seconds of arc) are 1/60th of a minute or 1/3600 of a degree.
#'... | /R/unitconversion.degree.to.degree.minute.second.R | permissive | burrm/lolcat | R | false | false | 1,625 | r | #' Unit Conversion - Angles - Degrees to Degrees, Minutes, and Seconds
#'
#' Performs a conversion of angle measures from degrees to degrees, minutes, and seconds.
#' Minutes (also called minutes of arc) are 1/60th of a degree.
#' Seconds (also called seconds of arc) are 1/60th of a minute or 1/3600 of a degree.
#'... |
setwd("C:\\Users\\sony\\Documents\\linear regression assignment")
carprice <- read.csv(file.choose())
#install_package("MASS")
#install_package("car")
library(MASS)
library(car)
library(dplyr)
library(tidyr)
library(ggplot2)
#view(carprice)
str(carprice)
#Data cleaning
carprice <- separate(carpri... | /CarPriceAssignment (1).R | no_license | JaiBhagat/Chinese-automobile-pricing-problem | R | false | false | 27,660 | r | setwd("C:\\Users\\sony\\Documents\\linear regression assignment")
carprice <- read.csv(file.choose())
#install_package("MASS")
#install_package("car")
library(MASS)
library(car)
library(dplyr)
library(tidyr)
library(ggplot2)
#view(carprice)
str(carprice)
#Data cleaning
carprice <- separate(carpri... |
rmvnorm<-function(n,mu, Sigma ) {
p<-length(mu)
res<-matrix ( 0, nrow=n, ncol=p)
if ( n>0 & p>0 ) {
E<-matrix( rnorm(n*p),n, p)
res<-t ( t (E%*%chol ( Sigma ) ) +c (mu) )
#R <- chol(A)
}
res
}
rinvwish <- function(n, nu0, iS0)
{
sL0 <- chol(iS0)
S <- array(dim = c (dim(iS0), n))
for (i in ... | /code/11.R | no_license | mameli/notebookInferenzaBayesiana | R | false | false | 5,812 | r | rmvnorm<-function(n,mu, Sigma ) {
p<-length(mu)
res<-matrix ( 0, nrow=n, ncol=p)
if ( n>0 & p>0 ) {
E<-matrix( rnorm(n*p),n, p)
res<-t ( t (E%*%chol ( Sigma ) ) +c (mu) )
#R <- chol(A)
}
res
}
rinvwish <- function(n, nu0, iS0)
{
sL0 <- chol(iS0)
S <- array(dim = c (dim(iS0), n))
for (i in ... |
source("loading data.R")
source("demography.R")
source("skills.R")
source("kmeans-rattle.R")
source("tools.R")
source("pay.R")
source("tool correlations.R")
source("tools pay.R")
source("silhouette on cluster.R")
source("inference.R")
source("ordinal regression.R")
source("regression-test.R")
##----... | /main.R | no_license | HamidehIraj/ThesisCode | R | false | false | 864 | r |
source("loading data.R")
source("demography.R")
source("skills.R")
source("kmeans-rattle.R")
source("tools.R")
source("pay.R")
source("tool correlations.R")
source("tools pay.R")
source("silhouette on cluster.R")
source("inference.R")
source("ordinal regression.R")
source("regression-test.R")
##----... |
print("MODIS classification script based on PuSa samples")
#-----------------------------------------------------------------------------------------------------
fModisClass <- function(W.DIR,
IN.DIR,
OUT.DIR,
SAMPLE.SHP,
... | /_functions/fModisClass.R | no_license | terrasys/CAWa_Classification | R | false | false | 6,465 | r | print("MODIS classification script based on PuSa samples")
#-----------------------------------------------------------------------------------------------------
fModisClass <- function(W.DIR,
IN.DIR,
OUT.DIR,
SAMPLE.SHP,
... |
#' create get_median_vs_SD scatter plot
#'
#' This function loads a file as a dataframe, create scatter plot for median vs SD
#' @param infile Path to the input file
#' @return a ggplot scatter plot
#' @export
#'
get_median_vs_SD = function(input_df) {
rownames(input_df) = input_df$plate_well
df_pp = subset(... | /R/get_SD_vs_Median.R | no_license | cautree/qa | R | false | false | 2,890 | r |
#' create get_median_vs_SD scatter plot
#'
#' This function loads a file as a dataframe, create scatter plot for median vs SD
#' @param infile Path to the input file
#' @return a ggplot scatter plot
#' @export
#'
get_median_vs_SD = function(input_df) {
rownames(input_df) = input_df$plate_well
df_pp = subset(... |
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Global Options for Heatmaps — ht_global_opt • ComplexHeatmap</title>
... | /docs/reference/ht_global_opt.rd | permissive | jokergoo/ComplexHeatmap | R | false | false | 7,404 | rd | <!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Global Options for Heatmaps — ht_global_opt • ComplexHeatmap</title>
... |
#######################################################################################################################
# Project - Advanced Econometric Methods
# Erik Senn, Johannes Cordier, Mila Gorkun-Voevoda, Davia Kündig and Jeremia Stalder
#
# Description:
# Functions used for "parametric.R"
# probit
probit <- f... | /code/parametric_functions.R | no_license | JeremiaStalder/advanced-econometrics | R | false | false | 6,901 | r | #######################################################################################################################
# Project - Advanced Econometric Methods
# Erik Senn, Johannes Cordier, Mila Gorkun-Voevoda, Davia Kündig and Jeremia Stalder
#
# Description:
# Functions used for "parametric.R"
# probit
probit <- f... |
\name{plotScores3D}
\Rdversion{1.1}
\alias{plotScores3D}
\title{
3D PCA Score Plot for a Spectra Object
}
\description{
Creates a basic 3D plot of PCA scores from the analysis of a \code{"Spectra"} object, color coded according the to scheme stored in the object.
}
\usage{
plotScores3D(spectra, pca, pcs = c(1:3),
elli... | /man/plotScores3D.Rd | no_license | tforkmann/ChemoSpec | R | false | false | 2,838 | rd | \name{plotScores3D}
\Rdversion{1.1}
\alias{plotScores3D}
\title{
3D PCA Score Plot for a Spectra Object
}
\description{
Creates a basic 3D plot of PCA scores from the analysis of a \code{"Spectra"} object, color coded according the to scheme stored in the object.
}
\usage{
plotScores3D(spectra, pca, pcs = c(1:3),
elli... |
#' Print captcha
#'
#' @param x object
#' @param ... other
#'
#' @export
print.captcha <- function(x, ...) {
print(as.character(x), ...)
}
| /R/print.R | no_license | djrondon/decryptr | R | false | false | 142 | r |
#' Print captcha
#'
#' @param x object
#' @param ... other
#'
#' @export
print.captcha <- function(x, ...) {
print(as.character(x), ...)
}
|
context('test_functions_specific_to_frontiers2017.r')
source("../../R/functions_specific_to_frontiers2017_dataset.r")
test_that("postures_grouped_by_line", {
unique_postures <- data.frame(adept_x = c(-516.314298, -531.478918, -525.80549,
-525, -525, -525, -525, -525, -525, -525, -525), adept_y = c(68, 68, 68,
... | /tests/testthat/test_functions_specific_to_frontiers2017_dataset.r | no_license | bc/frontiers2017 | R | false | false | 790 | r | context('test_functions_specific_to_frontiers2017.r')
source("../../R/functions_specific_to_frontiers2017_dataset.r")
test_that("postures_grouped_by_line", {
unique_postures <- data.frame(adept_x = c(-516.314298, -531.478918, -525.80549,
-525, -525, -525, -525, -525, -525, -525, -525), adept_y = c(68, 68, 68,
... |
#' twophase
#'
#' \code{twophase} is used to calculate estimations based on double sampling under the
#' \emph{model-assisted Monte Carlo approach}. A \emph{first phase} of auxiliary information
#' (e.g. taken from remote sensing data) is used to generate model predictions based on multiple linear
#' regression u... | /R/twophase.R | no_license | cran/forestinventory | R | false | false | 28,546 | r | #' twophase
#'
#' \code{twophase} is used to calculate estimations based on double sampling under the
#' \emph{model-assisted Monte Carlo approach}. A \emph{first phase} of auxiliary information
#' (e.g. taken from remote sensing data) is used to generate model predictions based on multiple linear
#' regression u... |
library(variableStars)
library(data.table)
library(ggplot2)
library(ggsci)
library(plotly)
server <- function(input, output, session) {
globals <-
reactiveValues(mainResult = NULL, processedDatasets = list())
# Read data from input
filedata <- function() {
# Generate synthetic data
dt <- generate_... | /inst/shiny-examples/experiment/server.R | permissive | rmaestre/variableStars | R | false | false | 4,581 | r | library(variableStars)
library(data.table)
library(ggplot2)
library(ggsci)
library(plotly)
server <- function(input, output, session) {
globals <-
reactiveValues(mainResult = NULL, processedDatasets = list())
# Read data from input
filedata <- function() {
# Generate synthetic data
dt <- generate_... |
naive_btFunc<- function(x,y,Qpmat, Gmat_hat)
{
p = ncol(Qpmat)
wmat = Qpmat*Gmat_hat
wmat = t(wmat)
wvec = wmat[ - (1 + ( 0:(p-1) ) *(p+1))] ## w_jj 제거
# fit glmnet
fit <- glmnet(x, y, family = 'binomial',
intercept = FALSE, weights = wvec,
lambda = 0, standardize = F,
... | /result/real_data_0421/lib/real_lib.R | no_license | jenjong/RankConsistency | R | false | false | 9,635 | r | naive_btFunc<- function(x,y,Qpmat, Gmat_hat)
{
p = ncol(Qpmat)
wmat = Qpmat*Gmat_hat
wmat = t(wmat)
wvec = wmat[ - (1 + ( 0:(p-1) ) *(p+1))] ## w_jj 제거
# fit glmnet
fit <- glmnet(x, y, family = 'binomial',
intercept = FALSE, weights = wvec,
lambda = 0, standardize = F,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_nonlinear_b.R
\name{plot_nonlinear_b}
\alias{plot_nonlinear_b}
\title{A plot function for nonlinear relationship}
\usage{
plot_nonlinear_b(y, x, data, k = 10, family = "binomial")
}
\description{
This function allows you to plot a graph ... | /man/plot_nonlinear_b.Rd | no_license | ghowoo/Wu | R | false | true | 441 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_nonlinear_b.R
\name{plot_nonlinear_b}
\alias{plot_nonlinear_b}
\title{A plot function for nonlinear relationship}
\usage{
plot_nonlinear_b(y, x, data, k = 10, family = "binomial")
}
\description{
This function allows you to plot a graph ... |
# Watford Data Analysis Calculations and Visualization
library(tidyverse)
library(ggplot2)
wd(ST597 Final Project)
load('DataSet.RData')
# Watford Home Analysis
Watford_Home <- Watford %>%
filter(HomeTeam == 'Watford')
WatfordHomeGames <- nrow(Watford_Home)
WatfordHomeGames
# Watford Home Wins
Watford_Home_Wins <- ... | /Watford.R | no_license | c-jacob-shrader/ST597-Final-Project | R | false | false | 3,069 | r | # Watford Data Analysis Calculations and Visualization
library(tidyverse)
library(ggplot2)
wd(ST597 Final Project)
load('DataSet.RData')
# Watford Home Analysis
Watford_Home <- Watford %>%
filter(HomeTeam == 'Watford')
WatfordHomeGames <- nrow(Watford_Home)
WatfordHomeGames
# Watford Home Wins
Watford_Home_Wins <- ... |
context("Internal functions")
# bankstown to sydney airports approximately 17628m
test_that("Bankstown airport to Sydney airport approximately 17628m", {
expect_lt(
.haversine_distance(
-33 - 56 / 60 - 46 / 3600,
151 + 10 / 60 + 38 / 3600,
-33 - 55 / 60 - 28 / 3600,
150 + 59 / 60 + 18 / 3... | /tests/testthat/test-internal-functions.R | permissive | vam103/bomrang | R | false | false | 641 | r | context("Internal functions")
# bankstown to sydney airports approximately 17628m
test_that("Bankstown airport to Sydney airport approximately 17628m", {
expect_lt(
.haversine_distance(
-33 - 56 / 60 - 46 / 3600,
151 + 10 / 60 + 38 / 3600,
-33 - 55 / 60 - 28 / 3600,
150 + 59 / 60 + 18 / 3... |
numPerPatch20000 <- c(2545,2455)
| /NatureEE-data-archive/Run203121/JAFSdata/JAFSnumPerPatch20000.R | no_license | flaxmans/NatureEE2017 | R | false | false | 33 | r | numPerPatch20000 <- c(2545,2455)
|
# @file CovidVulnerabilityIndex.R
#
# Copyright 2020 Observational Health Data Sciences and Informatics
#
# This file is part of CovidVulnerabilityIndex
#
# 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 ... | /CovidVulnerabilityIndex/R/CovidVulnerabilityIndex.R | no_license | ohdsi-studies/Covid19PredictionStudies | R | false | false | 819 | r | # @file CovidVulnerabilityIndex.R
#
# Copyright 2020 Observational Health Data Sciences and Informatics
#
# This file is part of CovidVulnerabilityIndex
#
# 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 ... |
## This function creates a special matrix that can cache the inverse of the function
## Here is the cache function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse <- ... | /cachematrix.R | no_license | Jonna50/ProgrammingAssignment2 | R | false | false | 769 | r |
## This function creates a special matrix that can cache the inverse of the function
## Here is the cache function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse <- ... |
# Copyright 2018 Johannes Köster.
# Licensed under the MIT license (http://opensource.org/licenses/MIT)
# This file may not be copied, modified, or distributed
# except according to those terms.
log <- file(snakemake@log[[1]], open="wt")
sink(log)
sink(log, type="message")
library(RColorBrewer)
assignments <- readR... | /scripts/cell-cycle-scores.R | permissive | wuwill/single-cell-rna-seq | R | false | false | 902 | r | # Copyright 2018 Johannes Köster.
# Licensed under the MIT license (http://opensource.org/licenses/MIT)
# This file may not be copied, modified, or distributed
# except according to those terms.
log <- file(snakemake@log[[1]], open="wt")
sink(log)
sink(log, type="message")
library(RColorBrewer)
assignments <- readR... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function: This function creates a matrix that is special like in the example with the special vector
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL ##begin with i... | /cachematrix.R | no_license | hnrkhvgrd/ProgrammingAssignment2 | R | false | false | 1,501 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function: This function creates a matrix that is special like in the example with the special vector
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL ##begin with i... |
/DEVOLUTION.R | no_license | qindan2008/DEVOLUTION | R | false | false | 225,366 | r | ||
#' Most recent changepoints from ind method using censored MA timeseries.
#'
#' @description Detecting most recent changepoints from ind method (analyzes
#' all the series independently in the panel data and in
#' each given series estimate the most recent changepoint) after
#' generating censored data from MA m... | /R/indma(PELT).R | no_license | cran/cpcens | R | false | false | 2,420 | r | #' Most recent changepoints from ind method using censored MA timeseries.
#'
#' @description Detecting most recent changepoints from ind method (analyzes
#' all the series independently in the panel data and in
#' each given series estimate the most recent changepoint) after
#' generating censored data from MA m... |
#' @title Sample a random value from a parameter or a parameter set uniformly.
#'
#' @template desc_dep_pars_na
#'
#' @template arg_par_or_set
#' @template arg_disc_names
#' @template arg_trafo
#' @return The return type is determined by the type of the parameter. For a set a named list
#' of such values in the corre... | /R/sample.R | no_license | bklppr/ParamHelpers | R | false | false | 4,432 | r | #' @title Sample a random value from a parameter or a parameter set uniformly.
#'
#' @template desc_dep_pars_na
#'
#' @template arg_par_or_set
#' @template arg_disc_names
#' @template arg_trafo
#' @return The return type is determined by the type of the parameter. For a set a named list
#' of such values in the corre... |
library(ggplot2)
attach(mtcars)
cyl.f <- as.factor(mtcars$cyl)
# basic histogram with facets
qplot(mpg, fill=as.factor(gear), facets= cyl.f ~ ., main='Frequency of Miles Per Galon')
| /R/ad-hoc/graph-examples/ggplot2/3-qplot-hist.R | no_license | 001ben/code | R | false | false | 184 | r | library(ggplot2)
attach(mtcars)
cyl.f <- as.factor(mtcars$cyl)
# basic histogram with facets
qplot(mpg, fill=as.factor(gear), facets= cyl.f ~ ., main='Frequency of Miles Per Galon')
|
/magisterskie/4_rok/Ekonometria/spr3/3oddzielnie.R | no_license | sommermarta/studia | R | false | false | 7,836 | r | ||
do_par_in_hash_int <- hutilscpp:::do_par_in_hash_int
do_par_in <- hutilscpp:::do_par_in
# test_that("%in% aliases work", {
a <- 0:10
b <- 0:5
expect_identical(do_par_in_hash_int(a, b), a %in% b)
expect_identical(do_par_in_hash_int(b, a), b %in% a)
e <- c(40L, 50L, 43L, 21L, 20L, 27L, 1L, 12L, 48L, ... | /inst/tinytest/test-in.R | no_license | cran/hutilscpp | R | false | false | 2,416 | r |
do_par_in_hash_int <- hutilscpp:::do_par_in_hash_int
do_par_in <- hutilscpp:::do_par_in
# test_that("%in% aliases work", {
a <- 0:10
b <- 0:5
expect_identical(do_par_in_hash_int(a, b), a %in% b)
expect_identical(do_par_in_hash_int(b, a), b %in% a)
e <- c(40L, 50L, 43L, 21L, 20L, 27L, 1L, 12L, 48L, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{utilities_apportion.lr}
\alias{utilities_apportion.lr}
\title{Title}
\usage{
utilities_apportion.lr(vector.length, values, proportions, shuffled = F)
}
\arguments{
\item{x}{A number.}
\item{y}{A number.}
}
\value{
return va... | /man/utilities_apportion.lr.Rd | no_license | EvoNetHIV/RoleSPVL | R | false | true | 436 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{utilities_apportion.lr}
\alias{utilities_apportion.lr}
\title{Title}
\usage{
utilities_apportion.lr(vector.length, values, proportions, shuffled = F)
}
\arguments{
\item{x}{A number.}
\item{y}{A number.}
}
\value{
return va... |
library(tidyverse)
library(forecast)
library(highcharter)
hchart(mpg, "scatter",
hcaes(x = displ, y = hwy, group = class))
forecast(AirPassengers) %>% hchart()
| /excel_r_dplyr/Visualizations/HighcharterExample.R | no_license | giorgioottolina94/Excel-R-Python-Projects | R | false | false | 178 | r | library(tidyverse)
library(forecast)
library(highcharter)
hchart(mpg, "scatter",
hcaes(x = displ, y = hwy, group = class))
forecast(AirPassengers) %>% hchart()
|
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Includes function robyn_run, robyn_mmm, model_refit, model_decomp, calibrate_mmm, ridge_lambda
#############################################... | /R/R/model.R | permissive | jtatineni/Robyn | R | false | false | 76,378 | r | # Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Includes function robyn_run, robyn_mmm, model_refit, model_decomp, calibrate_mmm, ridge_lambda
#############################################... |
#' @include model-zelig.R
#' @include model-glm.R
#' @include model-binchoice.R
zprobit <- setRefClass("Zelig-probit",
contains = "Zelig-binchoice")
zprobit$methods(
initialize = function() {
callSuper()
.self$name <- "probit"
.self$link <- "probit"
.self$description = "Probit ... | /R/model-probit.R | no_license | ghuiber/Zelig | R | false | false | 869 | r | #' @include model-zelig.R
#' @include model-glm.R
#' @include model-binchoice.R
zprobit <- setRefClass("Zelig-probit",
contains = "Zelig-binchoice")
zprobit$methods(
initialize = function() {
callSuper()
.self$name <- "probit"
.self$link <- "probit"
.self$description = "Probit ... |
#!/usr/bin/env Rscript
if (!require('devtools')) install.packages('devtools',repos = "http://cran.us.r-project.org"); library('devtools')
if (!require('XML')) install.packages('XML',repos = "http://cran.us.r-project.org"); library('XML')
if (!require('RPostgreSQL')) install.packages('RPostgreSQL',repos = "http://cran.... | /importer/modules/install_dependencies.R | no_license | clinicaltrial-upr2540/clinicaltrialvis | R | false | false | 1,045 | r | #!/usr/bin/env Rscript
if (!require('devtools')) install.packages('devtools',repos = "http://cran.us.r-project.org"); library('devtools')
if (!require('XML')) install.packages('XML',repos = "http://cran.us.r-project.org"); library('XML')
if (!require('RPostgreSQL')) install.packages('RPostgreSQL',repos = "http://cran.... |
#' create.model.vars
#'
#' Create model variables used in model calibration and application
#'
#' @param filename CSV file with formatted surface reflectance data
#' @param rowIndex True or False, Indicates whether the first column in the formatted data file is a row index
#' @return dataframe with variables used in mo... | /RSAlgaeR/R/create.model.vars.R | no_license | RAJohansen/RSAlgae | R | false | false | 1,522 | r | #' create.model.vars
#'
#' Create model variables used in model calibration and application
#'
#' @param filename CSV file with formatted surface reflectance data
#' @param rowIndex True or False, Indicates whether the first column in the formatted data file is a row index
#' @return dataframe with variables used in mo... |
##Plot2
## Read data
data_all <- read.csv("./exdata_data_household_power_consumption/household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_all$Date <- as.Date(data_all$Date, format="%d/%m/%Y")
... | /plot2.R | no_license | ansak45/ExData_Plotting1 | R | false | false | 769 | r | ##Plot2
## Read data
data_all <- read.csv("./exdata_data_household_power_consumption/household_power_consumption.txt", header=T, sep=';', na.strings="?",
nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"')
data_all$Date <- as.Date(data_all$Date, format="%d/%m/%Y")
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bomWater.R
\name{make_bom_request}
\alias{make_bom_request}
\title{Query the BoM WISKI API}
\usage{
make_bom_request(params)
}
\arguments{
\item{params}{A named list of parameters.}
}
\value{
A tibble is returned with the columns depending on... | /man/make_bom_request.Rd | permissive | kongdd/bomWater | R | false | true | 1,107 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bomWater.R
\name{make_bom_request}
\alias{make_bom_request}
\title{Query the BoM WISKI API}
\usage{
make_bom_request(params)
}
\arguments{
\item{params}{A named list of parameters.}
}
\value{
A tibble is returned with the columns depending on... |
require("ggplot2")
require("reshape2")
n_runs <- 10
n_patients_baseline <- rep(0,n_runs)
n_patients_short_baseline <- rep(0,n_runs)
n_patients_medium_baseline <- rep(0,n_runs)
n_patients_long_baseline <- rep(0,n_runs)
n_bed_days_standard_ward_baseline <-rep(0,n_runs)
n_bed_days_ltac_ward_baseline <- rep(1,n_runs)
n... | /visualisation_all_simulations.R | no_license | mirjamlaager/Ltac_simulations | R | false | false | 7,976 | r | require("ggplot2")
require("reshape2")
n_runs <- 10
n_patients_baseline <- rep(0,n_runs)
n_patients_short_baseline <- rep(0,n_runs)
n_patients_medium_baseline <- rep(0,n_runs)
n_patients_long_baseline <- rep(0,n_runs)
n_bed_days_standard_ward_baseline <-rep(0,n_runs)
n_bed_days_ltac_ward_baseline <- rep(1,n_runs)
n... |
columnmean <- function(x, removeNA=TRUE) {
nc <- ncol(x)
means <- numeric(nc)
for(i in 1:nc) {
temp <- unlist (x[, i], use.names = FALSE)
means[i] <- mean(temp, na.rm = removeNA)
}
means
}
result<-columnmean (hw1_data)
print(result)
#mydata <- matrix (rnorm(100), ncol=5)
#columnmean(mydata)
x <-1:... | /R Programming/HW 1/temp.R | no_license | jessica-dyer/datasciencecoursera | R | false | false | 1,028 | r | columnmean <- function(x, removeNA=TRUE) {
nc <- ncol(x)
means <- numeric(nc)
for(i in 1:nc) {
temp <- unlist (x[, i], use.names = FALSE)
means[i] <- mean(temp, na.rm = removeNA)
}
means
}
result<-columnmean (hw1_data)
print(result)
#mydata <- matrix (rnorm(100), ncol=5)
#columnmean(mydata)
x <-1:... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/robomaker_service.R
\name{robomaker}
\alias{robomaker}
\title{AWS RoboMaker}
\usage{
robomaker(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\description{
This section provides... | /cran/paws.robotics/man/robomaker.Rd | permissive | TWarczak/paws | R | false | true | 6,856 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/robomaker_service.R
\name{robomaker}
\alias{robomaker}
\title{AWS RoboMaker}
\usage{
robomaker(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\description{
This section provides... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pretty_output_functions.R
\name{pretty_pvalues_compareGroups}
\alias{pretty_pvalues_compareGroups}
\title{pretty_pvalues() wrapper for compareGroups table}
\usage{
pretty_pvalues_compareGroups(compareGroups_table_obj, digits = 3,
include_p ... | /man/pretty_pvalues_compareGroups.Rd | no_license | CarvajalRodrigo/MoffittFunctions | R | false | true | 2,540 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pretty_output_functions.R
\name{pretty_pvalues_compareGroups}
\alias{pretty_pvalues_compareGroups}
\title{pretty_pvalues() wrapper for compareGroups table}
\usage{
pretty_pvalues_compareGroups(compareGroups_table_obj, digits = 3,
include_p ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/external-software.R
\name{download_plink}
\alias{download_plink}
\title{Download PLINK 1.9}
\usage{
download_plink(dir = tempdir())
}
\arguments{
\item{dir}{The directory where to put the PLINK executable.
Default is a temporary directory.}
}... | /man/download_plink.Rd | no_license | mblumuga/bigsnpr | R | false | true | 459 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/external-software.R
\name{download_plink}
\alias{download_plink}
\title{Download PLINK 1.9}
\usage{
download_plink(dir = tempdir())
}
\arguments{
\item{dir}{The directory where to put the PLINK executable.
Default is a temporary directory.}
}... |
#! R
library(facets)
argsIn <- commandArgs(trailingOnly = TRUE)
inputCSV <- argsIn[1]
tumour <- strsplit(inputCSV,"\\.")[[1]][1]
set.seed(1234)
snpmat <- readSnpMatrix(inputCSV)
pps <- preProcSample(snpmat)
oo <- procSample(pps)
fit <- emcncf(oo)
ploidpurdf <- data.frame(PLOIDY=round(fit$ploidy,digits=3),
... | /bin/facets_cna.call.R | no_license | cgpu/somatic_exome_n-of-1 | R | false | false | 696 | r | #! R
library(facets)
argsIn <- commandArgs(trailingOnly = TRUE)
inputCSV <- argsIn[1]
tumour <- strsplit(inputCSV,"\\.")[[1]][1]
set.seed(1234)
snpmat <- readSnpMatrix(inputCSV)
pps <- preProcSample(snpmat)
oo <- procSample(pps)
fit <- emcncf(oo)
ploidpurdf <- data.frame(PLOIDY=round(fit$ploidy,digits=3),
... |
#################################################
### ###
### Download raster data from Earth Engine ###
### ###
### This step only needs to be completed ###
### if the raster data are not already ###
### downloaded to t... | /R_scripts/0-Load_Raster_Data.R | no_license | ljnewediuk/stress_hab_sel | R | false | false | 3,264 | r |
#################################################
### ###
### Download raster data from Earth Engine ###
### ###
### This step only needs to be completed ###
### if the raster data are not already ###
### downloaded to t... |
# 2D Random walk with absorption
simulate_walk <- function(x, y, n_max = 100, p = 0.01) {
current_position <- sqrt(x^2 + y^2)
for (i in 1:n_max) {
is_absorbed <- rbinom(1, 1, p)
if (is_absorbed) return(1)
x <- x + rnorm(1)
y <- y + rnorm(1)
current_position <- sqrt(x^2 + y^2)
if (current_pos... | /stepik-R/simulate_walk.R | no_license | marreesha/machine_learning-data_science | R | false | false | 506 | r | # 2D Random walk with absorption
simulate_walk <- function(x, y, n_max = 100, p = 0.01) {
current_position <- sqrt(x^2 + y^2)
for (i in 1:n_max) {
is_absorbed <- rbinom(1, 1, p)
if (is_absorbed) return(1)
x <- x + rnorm(1)
y <- y + rnorm(1)
current_position <- sqrt(x^2 + y^2)
if (current_pos... |
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", nrows = 5)
classes <- sapply(data, class)
classes[1:2] <- "character"
# 66637
# 69516
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";",
col.names = c("Date", "Time", "Global_active_power", "G... | /plot1.R | no_license | titan31415/datasciencecoursera | R | false | false | 916 | r | data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", nrows = 5)
classes <- sapply(data, class)
classes[1:2] <- "character"
# 66637
# 69516
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";",
col.names = c("Date", "Time", "Global_active_power", "G... |
pMME <-
function( mat ){
cs = colSums( rbind(mat))
phat = cs[1]/sum(cs)
return(phat)
}
| /sgRSEA/R/pMME.R | no_license | ingted/R-Examples | R | false | false | 119 | r | pMME <-
function( mat ){
cs = colSums( rbind(mat))
phat = cs[1]/sum(cs)
return(phat)
}
|
#' Get the project catalog
#'
#' @param x a `ShojiObject` that has an associated project catalog. If omitted,
#' the default value for `x` means that you will load the user's primary
#' project catalog. (Currently, there are no other project catalogs to load.)
#' @return An object of class `ProjectCatalog`.
#' @name pr... | /R/projects.R | no_license | GitBrianLaw/rcrunch | R | false | false | 5,672 | r | #' Get the project catalog
#'
#' @param x a `ShojiObject` that has an associated project catalog. If omitted,
#' the default value for `x` means that you will load the user's primary
#' project catalog. (Currently, there are no other project catalogs to load.)
#' @return An object of class `ProjectCatalog`.
#' @name pr... |
# Author - Ha Nguyen
# Course - Explaintory Data Analysis
# Project 1 - Analyze individual household electric power consumption Data Set
## Examine how household energy usage varies over 2 day period in Feb - 2007
# Getting data file
fileurl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_c... | /plot2.R | no_license | ha-nguyen/ExData_Plotting1 | R | false | false | 1,441 | r | # Author - Ha Nguyen
# Course - Explaintory Data Analysis
# Project 1 - Analyze individual household electric power consumption Data Set
## Examine how household energy usage varies over 2 day period in Feb - 2007
# Getting data file
fileurl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_c... |
\name{printenv}
\alias{printenv}
\title{Print DNAnexus Configuration Values}
\usage{
printenv()
}
\description{
Prints the current set of configuration values that are
being used to contact the DNAnexus platform.
}
\examples{
printenv()
}
| /src/R/dxR/man/printenv.Rd | permissive | dnanexus/dx-toolkit | R | false | false | 246 | rd | \name{printenv}
\alias{printenv}
\title{Print DNAnexus Configuration Values}
\usage{
printenv()
}
\description{
Prints the current set of configuration values that are
being used to contact the DNAnexus platform.
}
\examples{
printenv()
}
|
library(ggplot2)
theme_set(theme_bw(base_size = 6))
library(sf)
library(rnaturalearth)
library(rnaturalearthdata)
library(here)
library(ggspatial)
#devtools::install_github('3wen/legendMap')
library(legendMap)
library(tmaptools)
library(shadowtext)
library(tidyverse)
world <- ne_countries(scale = "medium", returnclass... | /analysis/paper/map.R | permissive | LiYingWang/kwl-ornaments | R | false | false | 4,673 | r | library(ggplot2)
theme_set(theme_bw(base_size = 6))
library(sf)
library(rnaturalearth)
library(rnaturalearthdata)
library(here)
library(ggspatial)
#devtools::install_github('3wen/legendMap')
library(legendMap)
library(tmaptools)
library(shadowtext)
library(tidyverse)
world <- ne_countries(scale = "medium", returnclass... |
library(scoringutils)
library(patchwork)
library(ggplot2)
library(data.table)
library(dplyr)
# generate predictions data.table
n_truth = 2000
n_samples = 2000
truth <- rnorm(n_truth, mean = 0, sd = 1)
predictions1 <- rnorm(n_truth * n_samples, mean = 0, sd = 1)
predictions2 <- rnorm(n_truth * n_samples, mean = 0.5, sd... | /inst/manuscript/R/toy-example-calibration.R | permissive | epiforecasts/scoringutils | R | false | false | 3,766 | r | library(scoringutils)
library(patchwork)
library(ggplot2)
library(data.table)
library(dplyr)
# generate predictions data.table
n_truth = 2000
n_samples = 2000
truth <- rnorm(n_truth, mean = 0, sd = 1)
predictions1 <- rnorm(n_truth * n_samples, mean = 0, sd = 1)
predictions2 <- rnorm(n_truth * n_samples, mean = 0.5, sd... |
library(Rcpp)
source("R/EvaluationFunctions.R")
source("R/FindClones.R")
sourceCpp("src/rcpp_hello_world.cpp")
data_path <- "/Users/seonghwanjun/data/simulation/binary4/"
for (case in 1:4) {
sim_path <- paste(data_path, "/case", case, "/sim0", sep="")
GetBSciteResults(sim_path, 10)
}
| /simulated/Binary/Rscripts/ProcessBSCITEResults.R | no_license | junseonghwan/ScRNACloneEvaluation | R | false | false | 295 | r | library(Rcpp)
source("R/EvaluationFunctions.R")
source("R/FindClones.R")
sourceCpp("src/rcpp_hello_world.cpp")
data_path <- "/Users/seonghwanjun/data/simulation/binary4/"
for (case in 1:4) {
sim_path <- paste(data_path, "/case", case, "/sim0", sep="")
GetBSciteResults(sim_path, 10)
}
|
## Frailty simulation
## Generating the families
## Generating from discrete distribution
## Higher risk families
## Last udpated: April 11, 2019
source("Frailty Simulation Functions.R")
library(BayesMendel)
library(dplyr)
library(abind)
library(doParallel)
registerDoParallel(cores = 4)
source(paste(getwd(), "/Simu... | /Simulations/FrailtySimDatGenDis_hr.R | no_license | theohuang/Frailty-Project | R | false | false | 3,164 | r | ## Frailty simulation
## Generating the families
## Generating from discrete distribution
## Higher risk families
## Last udpated: April 11, 2019
source("Frailty Simulation Functions.R")
library(BayesMendel)
library(dplyr)
library(abind)
library(doParallel)
registerDoParallel(cores = 4)
source(paste(getwd(), "/Simu... |
#Copyright 2012 Heewon Jeon(madjakarta@gmail.com)
#
#This file is part of Sejong.
#
#Sejong is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version... | /R/onLoad.R | no_license | muschellij2/Sejong | R | false | false | 694 | r | #Copyright 2012 Heewon Jeon(madjakarta@gmail.com)
#
#This file is part of Sejong.
#
#Sejong is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version... |
#!/usr/bin/env Rscript
##=======================================#
## Author: Guido Espana
## Post-processes the output of FRED jobs
##=======================================#
## Setup---------------
##=======================================#
library(tidyverse)
library(fredtools)
fred_results_dir = file.path(getwd(), "... | /analysis/experiments_colombia/Bogota_simulations/scripts/post_process_fred_postcalibration.R | no_license | confunguido/manuscript_bogota_school_reopening | R | false | false | 15,616 | r | #!/usr/bin/env Rscript
##=======================================#
## Author: Guido Espana
## Post-processes the output of FRED jobs
##=======================================#
## Setup---------------
##=======================================#
library(tidyverse)
library(fredtools)
fred_results_dir = file.path(getwd(), "... |
%
% Copyright (C) 2005 Friedrich Leisch
% $Id: nutrient.Rd 252 2018-09-17 08:40:24Z gruen $
%
\name{nutrient}
\alias{nutrient}
\docType{data}
\title{Nutrients in Meat, Fish and Fowl}
\description{
The data set contains the measurements of nutrients in several types
of meat, fish and fowl.
}
\usage{data(nutrient)}... | /man/nutrient.Rd | no_license | cran/flexclust | R | false | false | 801 | rd | %
% Copyright (C) 2005 Friedrich Leisch
% $Id: nutrient.Rd 252 2018-09-17 08:40:24Z gruen $
%
\name{nutrient}
\alias{nutrient}
\docType{data}
\title{Nutrients in Meat, Fish and Fowl}
\description{
The data set contains the measurements of nutrients in several types
of meat, fish and fowl.
}
\usage{data(nutrient)}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/opal.project.R
\name{opal.project_backup}
\alias{opal.project_backup}
\title{Backup a project}
\usage{
opal.project_backup(
opal,
project,
archive,
viewsAsTables = FALSE,
override = TRUE,
wait = TRUE
)
}
\arguments{
\item{opal}{Op... | /man/opal.project_backup.Rd | no_license | obiba/opalr | R | false | true | 1,507 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/opal.project.R
\name{opal.project_backup}
\alias{opal.project_backup}
\title{Backup a project}
\usage{
opal.project_backup(
opal,
project,
archive,
viewsAsTables = FALSE,
override = TRUE,
wait = TRUE
)
}
\arguments{
\item{opal}{Op... |
# From assertive.base are-identical.R assert-are-identical.R
#' Are the inputs identical?
#'
#' See \code{\link[assertive.base]{are_identical}}.
#' @name are_identical
#' @aliases assert_are_identical are_identical_legacy assert_all_are_identical_legacy assert_any_are_identical_legacy
#' @export are_identical
... | /assertive/R/exports-base.R | no_license | ingted/R-Examples | R | false | false | 4,788 | r | # From assertive.base are-identical.R assert-are-identical.R
#' Are the inputs identical?
#'
#' See \code{\link[assertive.base]{are_identical}}.
#' @name are_identical
#' @aliases assert_are_identical are_identical_legacy assert_all_are_identical_legacy assert_any_are_identical_legacy
#' @export are_identical
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/StatComp20083R_HW7.R
\name{HW7_2}
\alias{HW7_2}
\title{the question 2 of homework}
\usage{
HW7_2()
}
\description{
the question 2 of homework
}
\examples{
\dontrun{
HW7_2()
}
}
| /man/HW7_2.Rd | no_license | Pengyi-Wang/StatComp20083 | R | false | true | 255 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/StatComp20083R_HW7.R
\name{HW7_2}
\alias{HW7_2}
\title{the question 2 of homework}
\usage{
HW7_2()
}
\description{
the question 2 of homework
}
\examples{
\dontrun{
HW7_2()
}
}
|
#' Linear regression for network response
#'
#' This function takes \eqn{X} and \eqn{Y} values and fits the multiple linear regression \eqn{Y = X \beta + \epsilon} and returns standard errors.
#'
#' @export
#' @keywords external
#'
#' @param Y Vector of relations to be regress, of length \eqn{d}. Column-wise vectorizat... | /R/lmnet.R | no_license | cran/netregR | R | false | false | 8,909 | r | #' Linear regression for network response
#'
#' This function takes \eqn{X} and \eqn{Y} values and fits the multiple linear regression \eqn{Y = X \beta + \epsilon} and returns standard errors.
#'
#' @export
#' @keywords external
#'
#' @param Y Vector of relations to be regress, of length \eqn{d}. Column-wise vectorizat... |
/Programmes de base R.R | no_license | fsamvura/Goma_apprend_R | R | false | false | 1,241 | r | ||
#####################################################################################################################
################################################# A S3 Class used to create trading tool ############################
####################################################################################... | /IB_TWS_TradingSession - old.R | no_license | x2007tro/IBTWSTradingSession | R | false | false | 27,501 | r | #####################################################################################################################
################################################# A S3 Class used to create trading tool ############################
####################################################################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/randoms.R
\name{posteriorSummary}
\alias{posteriorSummary}
\title{posteriorSummary function
I still need to document all of these things properly}
\usage{
posteriorSummary(paramSampleVec)
}
\description{
posteriorSummary function
I still need... | /man/posteriorSummary.Rd | no_license | ljcolling/rara | R | false | true | 364 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/randoms.R
\name{posteriorSummary}
\alias{posteriorSummary}
\title{posteriorSummary function
I still need to document all of these things properly}
\usage{
posteriorSummary(paramSampleVec)
}
\description{
posteriorSummary function
I still need... |
#' @title tools for working with ICD-9 codes, and finding comorbidities
#' @description \code{icd9} package allows accurate manipulation, validation and
#' comparison of ICD-9-CM (clinical modification) codes. Although ICD-9 codes
#' appear numeric, this is not the case, since trailing zeroes, and a mixture
#' of... | /R/icd9-package.R | no_license | manisahni/icd9 | R | false | false | 4,225 | r | #' @title tools for working with ICD-9 codes, and finding comorbidities
#' @description \code{icd9} package allows accurate manipulation, validation and
#' comparison of ICD-9-CM (clinical modification) codes. Although ICD-9 codes
#' appear numeric, this is not the case, since trailing zeroes, and a mixture
#' of... |
\name{unif}
\alias{unif}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Uniformization
%% ~~function to do ... ~~
}
\description{
This function converts discrete random variables into continuous
pseudorandom variables or deals with duplicated case in continuous
random variables.
%% ~~ A concise... | /man/uniformization.Rd | no_license | zhicongz/AnomDetct | R | false | false | 2,105 | rd | \name{unif}
\alias{unif}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Uniformization
%% ~~function to do ... ~~
}
\description{
This function converts discrete random variables into continuous
pseudorandom variables or deals with duplicated case in continuous
random variables.
%% ~~ A concise... |
\name{ggvisControlGroup}
\alias{ggvisControlGroup}
\title{Generate Shiny tags for ggvis controls}
\usage{
ggvisControlGroup(plot_id)
}
\arguments{
\item{plot_id}{Plot ID}
}
\description{
Controls for choosing a renderer, downloading an image,
and quitting.
}
| /man/ggvisControlGroup.Rd | no_license | casunlight/ggvis | R | false | false | 268 | rd | \name{ggvisControlGroup}
\alias{ggvisControlGroup}
\title{Generate Shiny tags for ggvis controls}
\usage{
ggvisControlGroup(plot_id)
}
\arguments{
\item{plot_id}{Plot ID}
}
\description{
Controls for choosing a renderer, downloading an image,
and quitting.
}
|
\name{kml_layer.SpatialPhotoOverlay}
\alias{kml_layer.SpatialPhotoOverlay}
\title{Exports objects of type SpatialPhotoOverlay to KML}
\description{Writes object of type SpatialPhotoOverlay to KML together with a COLLADA 3D model file (optional).}
\usage{
kml_layer.SpatialPhotoOverlay(obj, method = c("PhotoOverlay", "mo... | /plotKML/man/layer.SpatialPhotoOverlay.Rd | no_license | albrizre/spatstat.revdep | R | false | false | 4,010 | rd | \name{kml_layer.SpatialPhotoOverlay}
\alias{kml_layer.SpatialPhotoOverlay}
\title{Exports objects of type SpatialPhotoOverlay to KML}
\description{Writes object of type SpatialPhotoOverlay to KML together with a COLLADA 3D model file (optional).}
\usage{
kml_layer.SpatialPhotoOverlay(obj, method = c("PhotoOverlay", "mo... |
library(readr)
library(dplyr)
library(ggplot2)
library(lubridate)
library(stringr)
library(tidyr)
library(readxl)
library(DT)
wasaData18 <- read_excel("wasaData.xlsx", sheet = "2018")
wasaData17 <- read_excel("wasaData.xlsx", sheet = "2017")
wasaData16 <- read_excel("wasaData.xlsx", sheet = "2016")
wasaData15 <- read... | /Developing Data Products/FinalProject/FInalProject.R | no_license | coy17a/Data-science-Specialization | R | false | false | 3,240 | r | library(readr)
library(dplyr)
library(ggplot2)
library(lubridate)
library(stringr)
library(tidyr)
library(readxl)
library(DT)
wasaData18 <- read_excel("wasaData.xlsx", sheet = "2018")
wasaData17 <- read_excel("wasaData.xlsx", sheet = "2017")
wasaData16 <- read_excel("wasaData.xlsx", sheet = "2016")
wasaData15 <- read... |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be use... | /R/utils-density2d.R | no_license | cran/fMultivar | R | false | false | 5,048 | r |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be use... |
fname <- "household_power_consumption.txt"
df <- read.table(fname, header=TRUE, sep=";",
colClasses=c("character", "character", rep("numeric",7)),
na="?")
# convert date-time to YYYY-MM-DD HH:MM:SS format
df$Time <- strptime(paste(df$Date, df$Time), "%d/%m/%Y %H:%M:%S")
df$Date <- as.D... | /plot3.R | no_license | aysesule/ExData_Plotting1 | R | false | false | 875 | r | fname <- "household_power_consumption.txt"
df <- read.table(fname, header=TRUE, sep=";",
colClasses=c("character", "character", rep("numeric",7)),
na="?")
# convert date-time to YYYY-MM-DD HH:MM:SS format
df$Time <- strptime(paste(df$Date, df$Time), "%d/%m/%Y %H:%M:%S")
df$Date <- as.D... |
#' day_length
#'
#' @description Calculate the raw lenght of day in hours related to the date
#'
#' @param dates Date in YMD format
#' @param lon numeric Geographical Longitude of site in decimal degrees (negative == West) . Default is 11.10.
#' @param lat numeric Geographical Latitude of site in decimal degrees.... | /R/day_length.r | permissive | alfcrisci/rAedesSim | R | false | false | 2,162 | r | #' day_length
#'
#' @description Calculate the raw lenght of day in hours related to the date
#'
#' @param dates Date in YMD format
#' @param lon numeric Geographical Longitude of site in decimal degrees (negative == West) . Default is 11.10.
#' @param lat numeric Geographical Latitude of site in decimal degrees.... |
<html>
<head>
<meta name="TextLength" content="SENT_NUM:10, WORD_NUM:190">
</head>
<body bgcolor="white">
<a href="#0" id="0">The models are not really suitable for the description of highly dynamic groups or communities.</a>
<a href="#1" id="1">For {a mathematical formula}d=1, the resulting network is a forest: a netw... | /AI-Dataset/Summary_rnd/S0004370215001186.xml.A.R | no_license | Angela7126/SLNSumEval | R | false | false | 1,613 | r | <html>
<head>
<meta name="TextLength" content="SENT_NUM:10, WORD_NUM:190">
</head>
<body bgcolor="white">
<a href="#0" id="0">The models are not really suitable for the description of highly dynamic groups or communities.</a>
<a href="#1" id="1">For {a mathematical formula}d=1, the resulting network is a forest: a netw... |
extractPopGrowthData <- function(currentTime, # OK
resultsMainFolder = NULL, # Pass this if outside of module # OK
climateModel = NULL, # OK
predictedCaribou = NULL,
reps = paste0(... | /posthocFunctions/extractPopGrowthData.R | no_license | tati-micheletti/NWT | R | false | false | 2,500 | r | extractPopGrowthData <- function(currentTime, # OK
resultsMainFolder = NULL, # Pass this if outside of module # OK
climateModel = NULL, # OK
predictedCaribou = NULL,
reps = paste0(... |
# This function combines all the metrics of different minimal apps into two CSV files:
# One file contains the information of all metrics by run.
# Another file contains the aggregated value (median) of each metric.
combineAndAggregateData <- function (inputFileForMetrics,
inputFil... | /scripts/combineAndAggregateData.R | no_license | rsain/Android-TPLs | R | false | false | 2,481 | r | # This function combines all the metrics of different minimal apps into two CSV files:
# One file contains the information of all metrics by run.
# Another file contains the aggregated value (median) of each metric.
combineAndAggregateData <- function (inputFileForMetrics,
inputFil... |
# Association Rules - Groceries data set ####
library(arules) #install first
library(arulesViz) #install first
library(datasets) # no need to install, just load it reqd for Groceries
data('Groceries')
Groceries
#Structure of Groceries
str(Groceries)
Groceries
inspect(Groceries[1:5]) #view
LIST(Groceries[1:6]) #an... | /Association Rules.R | no_license | MR-MukundRathi/analytics | R | false | false | 3,303 | r | # Association Rules - Groceries data set ####
library(arules) #install first
library(arulesViz) #install first
library(datasets) # no need to install, just load it reqd for Groceries
data('Groceries')
Groceries
#Structure of Groceries
str(Groceries)
Groceries
inspect(Groceries[1:5]) #view
LIST(Groceries[1:6]) #an... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hSet.R, R/hierarchicalSet.R
\name{create_hierarchy}
\alias{HierarchicalSet}
\alias{[.HierarchicalSet}
\alias{[[.HierarchicalSet}
\alias{cluster_members.HierarchicalSet}
\alias{cluster_sizes.HierarchicalSet}
\alias{clusters.HierarchicalSet}
\a... | /hierarchicalSets/man/create_hierarchy.Rd | no_license | akhikolla/InformationHouse | R | false | true | 3,871 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hSet.R, R/hierarchicalSet.R
\name{create_hierarchy}
\alias{HierarchicalSet}
\alias{[.HierarchicalSet}
\alias{[[.HierarchicalSet}
\alias{cluster_members.HierarchicalSet}
\alias{cluster_sizes.HierarchicalSet}
\alias{clusters.HierarchicalSet}
\a... |
options(download.file.method="wget")
install.packages("quadprog",repos="https://cran.uni-muenster.de") | /sclust-smc-het/install_packages.R | no_license | smc-het-challenge/6181088 | R | false | false | 102 | r | options(download.file.method="wget")
install.packages("quadprog",repos="https://cran.uni-muenster.de") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{phone_offers}
\alias{phone_offers}
\title{Purchase offers for phone}
\format{A data frame with 355 rows and 2 variables:
\describe{
\item{message}{character of purchase offer message}
\item{condition}{binary la... | /man/phone_offers.Rd | no_license | MarkProjectRepo/politeness | R | false | true | 735 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{phone_offers}
\alias{phone_offers}
\title{Purchase offers for phone}
\format{A data frame with 355 rows and 2 variables:
\describe{
\item{message}{character of purchase offer message}
\item{condition}{binary la... |
rm(list = ls())
data <- read.csv(paste0("~/Documents/GitHub/AMP-timing/Monolix/Data/DBRout_RV217.csv"), header=TRUE,stringsAsFactors=FALSE)
datacopy = data.frame(data)
IDs = unique(data[,"ID"])
colnames(datacopy)[7]="y"
datacopy = cbind(datacopy,rep(1,dim(datacopy)[1]))
colnames(datacopy)[8]="ytype"
datacopy = cbin... | /Monolix/R/Data_including_Tcells_Monolix.R | no_license | yd124/AMP-timing | R | false | false | 1,549 | r | rm(list = ls())
data <- read.csv(paste0("~/Documents/GitHub/AMP-timing/Monolix/Data/DBRout_RV217.csv"), header=TRUE,stringsAsFactors=FALSE)
datacopy = data.frame(data)
IDs = unique(data[,"ID"])
colnames(datacopy)[7]="y"
datacopy = cbind(datacopy,rep(1,dim(datacopy)[1]))
colnames(datacopy)[8]="ytype"
datacopy = cbin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Quiz1.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{fars_summarize_years}
\usage{
fars_summarize_years(years)
}
\arguments{
\item{years}{The years input for all years for which files are available}
}
\value{
The summarized... | /man/fars_summarize_years.Rd | no_license | sashankhravi/TrafficDataPackage | R | false | true | 580 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Quiz1.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{fars_summarize_years}
\usage{
fars_summarize_years(years)
}
\arguments{
\item{years}{The years input for all years for which files are available}
}
\value{
The summarized... |
closest_point <- function(features, reference) {
# 'features' : block, position
# 'reference': block, position
reference <- reference[complete.cases(reference),]
closest <- data.frame()
for (block in unique(features[,1])) {
x <- features[features[,1] == block,]
y <- reference[reference[,1] == bl... | /R/closest_point.R | no_license | gui11aume/miscR | R | false | false | 665 | r | closest_point <- function(features, reference) {
# 'features' : block, position
# 'reference': block, position
reference <- reference[complete.cases(reference),]
closest <- data.frame()
for (block in unique(features[,1])) {
x <- features[features[,1] == block,]
y <- reference[reference[,1] == bl... |
# Set-up ---------------------------
# Load packages
library(threadr)
library(ggplot2)
library(dplyr)
library(tidyr)
library (devtools)
library(readxl)
# devtools::install_github("skgrange/threadr")
# Set global options
options(stringsAsFactors = FALSE)
# Set working directory
# setwd("C:/Dropbox/ricard... | /university_of_warwick_data_cleaning_FK.R | no_license | karafede/Energy | R | false | false | 13,050 | r | # Set-up ---------------------------
# Load packages
library(threadr)
library(ggplot2)
library(dplyr)
library(tidyr)
library (devtools)
library(readxl)
# devtools::install_github("skgrange/threadr")
# Set global options
options(stringsAsFactors = FALSE)
# Set working directory
# setwd("C:/Dropbox/ricard... |
library(shiny)
library(dplyr)
library(readr)
library(ggplot2)
library(jpeg)
x = read_csv('ipl_data.csv',col_names = T)
players = unique(c(unique(x$batsman),unique(x$bowler)))
ui = fluidPage(selectInput(inputId = 'player',label = 'Choose Player',choices = players,size = 10),
imageOutput(outputId = 'Pla... | /app.R | no_license | sambeettiady/miscellaneous | R | false | false | 566 | r | library(shiny)
library(dplyr)
library(readr)
library(ggplot2)
library(jpeg)
x = read_csv('ipl_data.csv',col_names = T)
players = unique(c(unique(x$batsman),unique(x$bowler)))
ui = fluidPage(selectInput(inputId = 'player',label = 'Choose Player',choices = players,size = 10),
imageOutput(outputId = 'Pla... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 3315
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3315
c
c Input Parameter (command line, file):
c input filename QBFLIB/Letombe/Abduction/aim-200-3_4-yes1-3-00.qdimacs
c output... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Letombe/Abduction/aim-200-3_4-yes1-3-00/aim-200-3_4-yes1-3-00.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 640 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 3315
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 3315
c
c Input Parameter (command line, file):
c input filename QBFLIB/Letombe/Abduction/aim-200-3_4-yes1-3-00.qdimacs
c output... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.