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 |
|---|---|---|---|---|---|---|---|---|---|
library(dplyr)
#Reading in the information from stop_times.txt
setwd("/home/ewahmed/Desktop/SubwayData/")
stop_times <- read.table("stop_times.txt",header=TRUE,
sep=",",fill=TRUE,quote = "",row.names = NULL,
stringsAsFactors = FALSE)
#Reading in the information from ... | /TrainTravel.R | no_license | eimanahmed/Subway-Flow | R | false | false | 8,475 | r | library(dplyr)
#Reading in the information from stop_times.txt
setwd("/home/ewahmed/Desktop/SubwayData/")
stop_times <- read.table("stop_times.txt",header=TRUE,
sep=",",fill=TRUE,quote = "",row.names = NULL,
stringsAsFactors = FALSE)
#Reading in the information from ... |
library(edgeR)
source('io/rnaseq.R')
#' Prepare a table of DE genes with the given FDR cutoff.
#' lrt: must be compatible with topTags, for example the output of glmLRT
prepare_de_table <- function(lrt, fdr = 0.05, log2FC.min = NULL) {
de <- as.data.frame(topTags(lrt, p.value = fdr, n = Inf))
if (!is.null(log2FC.... | /R/differential_expression/edger_de.R | no_license | gaberosser/qmul-bioinf | R | false | false | 7,044 | r | library(edgeR)
source('io/rnaseq.R')
#' Prepare a table of DE genes with the given FDR cutoff.
#' lrt: must be compatible with topTags, for example the output of glmLRT
prepare_de_table <- function(lrt, fdr = 0.05, log2FC.min = NULL) {
de <- as.data.frame(topTags(lrt, p.value = fdr, n = Inf))
if (!is.null(log2FC.... |
#' Frobenius norm
#'
#' \code{Fro} returns the Frobenius norm between a Bayesian network and its update after parameter variation.
#'
#' The details depend on the class the method \code{Fro} is applied to.
#'
#' @seealso \code{\link{KL.GBN}}, \code{\link{KL.CI}}, \code{\link{Fro.CI}}, \code{\link{Fro.GBN}}, \code{\link... | /R/frobenius.R | no_license | manueleleonelli/bnmonitor | R | false | false | 9,970 | r | #' Frobenius norm
#'
#' \code{Fro} returns the Frobenius norm between a Bayesian network and its update after parameter variation.
#'
#' The details depend on the class the method \code{Fro} is applied to.
#'
#' @seealso \code{\link{KL.GBN}}, \code{\link{KL.CI}}, \code{\link{Fro.CI}}, \code{\link{Fro.GBN}}, \code{\link... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/substoptimes.R
\name{substoptimes}
\alias{substoptimes}
\title{Subset the stop_times table}
\usage{
substoptimes(SIRIdf, GTFSstop_times., GTFSroutes., GTFStrips., GTFScalendar.)
}
\arguments{
\item{SIRIdf}{A SIRI data.frame to use as... | /man/substoptimes.Rd | no_license | cran/SIRItoGTFS | R | false | true | 1,482 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/substoptimes.R
\name{substoptimes}
\alias{substoptimes}
\title{Subset the stop_times table}
\usage{
substoptimes(SIRIdf, GTFSstop_times., GTFSroutes., GTFStrips., GTFScalendar.)
}
\arguments{
\item{SIRIdf}{A SIRI data.frame to use as... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/rm_abbreviation.R
\docType{data}
\name{rm_abbreviation}
\alias{rm_abbreviation}
\title{Abbreviations}
\format{\preformatted{Classes 'regexr', 'character' atomic [1:1] ([A-Za-z][\\.]\\s*)\{1,\}([A-Za-z][\\.])
..- attr(*, "subs")=Lis... | /inst/sample/man/rm_abbreviation.Rd | no_license | trinker/regextools | R | false | false | 1,466 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/rm_abbreviation.R
\docType{data}
\name{rm_abbreviation}
\alias{rm_abbreviation}
\title{Abbreviations}
\format{\preformatted{Classes 'regexr', 'character' atomic [1:1] ([A-Za-z][\\.]\\s*)\{1,\}([A-Za-z][\\.])
..- attr(*, "subs")=Lis... |
## R function to cache inverse of a Matrix
## This function accepts a matrix and creates inverse of it.
## Part of assignment for programming week 3 by Johns Hopkins
makeCacheMatrix <- function(x = matrix()) {
makeCacheMatrix <- function(x= matrix()){
inv <- NULL ## hold value of inv matrix
... | /cachematrix.R | no_license | Scikit-Man/ProgrammingAssignment2 | R | false | false | 1,405 | r | ## R function to cache inverse of a Matrix
## This function accepts a matrix and creates inverse of it.
## Part of assignment for programming week 3 by Johns Hopkins
makeCacheMatrix <- function(x = matrix()) {
makeCacheMatrix <- function(x= matrix()){
inv <- NULL ## hold value of inv matrix
... |
# --------------------------------------------------------------- #
# This script prepare the data for the modelling in Stan
#
# Latency split analysis
#
# --------------------------------------------------------------- #
rm(list=ls())
setwd("~/git_local/serial-integration-analysis/")
rm(list=ls())
# ----------------... | /prepare_data_latency_split.R | no_license | mattelisi/serial-int | R | false | false | 6,394 | r | # --------------------------------------------------------------- #
# This script prepare the data for the modelling in Stan
#
# Latency split analysis
#
# --------------------------------------------------------------- #
rm(list=ls())
setwd("~/git_local/serial-integration-analysis/")
rm(list=ls())
# ----------------... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 1.53892691178843e-220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615770083-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 1.53892691178843e-220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_... |
library(mstR)
### Name: testListMST
### Title: Testing the format of the MST input lists
### Aliases: testListMST
### ** Examples
# Creation and test of a 'start' list
start <- list(theta = 0)
testListMST(start, type = "start")
# Creation and test of a 'test' list
test <- list(method = "WL", moduleSelect = "... | /data/genthat_extracted_code/mstR/examples/testListMST.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 883 | r | library(mstR)
### Name: testListMST
### Title: Testing the format of the MST input lists
### Aliases: testListMST
### ** Examples
# Creation and test of a 'start' list
start <- list(theta = 0)
testListMST(start, type = "start")
# Creation and test of a 'test' list
test <- list(method = "WL", moduleSelect = "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/repl_control.R
\name{echoExpressionCallback}
\alias{echoExpressionCallback}
\title{This just echos the input expression. It is here for testing out the
taskCallback code}
\usage{
echoExpressionCallback(expr, value, status, visible, data)
}
\... | /man/echoExpressionCallback.Rd | no_license | djacobs7/remembr | R | false | true | 768 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/repl_control.R
\name{echoExpressionCallback}
\alias{echoExpressionCallback}
\title{This just echos the input expression. It is here for testing out the
taskCallback code}
\usage{
echoExpressionCallback(expr, value, status, visible, data)
}
\... |
# Paul GOUJON & Stephane LOUIS
# UTC - SY09 - TP4
# logistic regression validation
# The aim of that function is to test the logistic model we learned from
# training on a test ensemble. It takes as input a test individuals matrix, a
# beta vector (corresponding to the beta we learned before) and returns a prob
# mat... | /spam/log.R | permissive | goujonpa/sy09TP4 | R | false | false | 931 | r | # Paul GOUJON & Stephane LOUIS
# UTC - SY09 - TP4
# logistic regression validation
# The aim of that function is to test the logistic model we learned from
# training on a test ensemble. It takes as input a test individuals matrix, a
# beta vector (corresponding to the beta we learned before) and returns a prob
# mat... |
##' .. content for \description{} (no empty lines) ..
##'
##' .. content for \details{} ..
##'
##' @title
##' @return
##' @author whtns
##' @export
tabulate_liu_scnas <- function() {
liu_scnas <-
tibble::tribble(
~id, ~seqnames, ~gene_id, ~copy_number, ~study,
"RB13", "2", "4613", ... | /R/tabulate_liu_scnas.R | no_license | cobriniklab/rb_exome | R | false | false | 1,070 | r | ##' .. content for \description{} (no empty lines) ..
##'
##' .. content for \details{} ..
##'
##' @title
##' @return
##' @author whtns
##' @export
tabulate_liu_scnas <- function() {
liu_scnas <-
tibble::tribble(
~id, ~seqnames, ~gene_id, ~copy_number, ~study,
"RB13", "2", "4613", ... |
test_that("ifelse_censor_linter skips allowed usages", {
expect_lint("ifelse(x > 2, x, y)", NULL, ifelse_censor_linter())
expect_lint("ifelse(x > 2, x, y)", NULL, ifelse_censor_linter())
})
test_that("ifelse_censor_linter blocks simple disallowed usages", {
expect_lint(
"ifelse(x < 0, 0, x)",
rex::rex("p... | /tests/testthat/test-ifelse_censor_linter.R | permissive | russHyde/lintr | R | false | false | 1,922 | r | test_that("ifelse_censor_linter skips allowed usages", {
expect_lint("ifelse(x > 2, x, y)", NULL, ifelse_censor_linter())
expect_lint("ifelse(x > 2, x, y)", NULL, ifelse_censor_linter())
})
test_that("ifelse_censor_linter blocks simple disallowed usages", {
expect_lint(
"ifelse(x < 0, 0, x)",
rex::rex("p... |
library(LMest)
### Name: est_lm_basic
### Title: Estimate basic LM model
### Aliases: est_lm_basic
### ** Examples
# Example of drug consumption data
# load data
data(data_drug)
data_drug = as.matrix(data_drug)
S = data_drug[,1:5]-1
yv = data_drug[,6]
# fit of the Basic LM model
k = 3
out = est_lm_basic(S,yv,k,mod=... | /data/genthat_extracted_code/LMest/examples/est_lm_basic.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 925 | r | library(LMest)
### Name: est_lm_basic
### Title: Estimate basic LM model
### Aliases: est_lm_basic
### ** Examples
# Example of drug consumption data
# load data
data(data_drug)
data_drug = as.matrix(data_drug)
S = data_drug[,1:5]-1
yv = data_drug[,6]
# fit of the Basic LM model
k = 3
out = est_lm_basic(S,yv,k,mod=... |
# Calculate the historical payoff for a portfolio of FTR's.
#
#
# Written by Adrian Dragulescu on 1-Sep-2005
historical.path.Payoff <- function(hdata, data, Position, options){
probFun <- function(xHist, x){
# Calculate the probability of the bid using prior realized payoffs
y <- array(0, dim=length(x))
... | /R Extension/RMG/Energy/CEAR/historical.path.Payoff.R | no_license | uhasan1/QLExtension-backup | R | false | false | 4,819 | r | # Calculate the historical payoff for a portfolio of FTR's.
#
#
# Written by Adrian Dragulescu on 1-Sep-2005
historical.path.Payoff <- function(hdata, data, Position, options){
probFun <- function(xHist, x){
# Calculate the probability of the bid using prior realized payoffs
y <- array(0, dim=length(x))
... |
# clean workspace
rm(nl201505)
rm(nl201506)
rm(nl201506sf)
rm(nl201507)
rm(nl201508)
rm(nl201509)
rm(nl201610)
rm(nl201611)
rm(nl201612)
rm(nl201701)
rm(nl201702)
rm(nl201703)
rm(nl201704)
rm(nl201705)
# Left with claims, portfolios, vcsn
### Reduce datasets to only information needed for histograms:
# Claims:
cla... | /Archive/EQC-03-analysis-histograms.R | no_license | SallyFreanOwen/insurance-and-climate | R | false | false | 6,702 | r | # clean workspace
rm(nl201505)
rm(nl201506)
rm(nl201506sf)
rm(nl201507)
rm(nl201508)
rm(nl201509)
rm(nl201610)
rm(nl201611)
rm(nl201612)
rm(nl201701)
rm(nl201702)
rm(nl201703)
rm(nl201704)
rm(nl201705)
# Left with claims, portfolios, vcsn
### Reduce datasets to only information needed for histograms:
# Claims:
cla... |
#' Tourist arrivals to Sri Lanka by purpose of visit
#'
#' @description Tourist arrivals to Sri Lanka by purpose of visit.
#' There was a civil war in the country from July 1983 to May 2009.
#' Sri Lanka Easter bombings happened on 21 April 2019. From 2011 to 2019, data cover
#' the entire island.
#' On 26 December 200... | /R/touristsl_purpose.R | no_license | pridiltal/datahut | R | false | false | 863 | r | #' Tourist arrivals to Sri Lanka by purpose of visit
#'
#' @description Tourist arrivals to Sri Lanka by purpose of visit.
#' There was a civil war in the country from July 1983 to May 2009.
#' Sri Lanka Easter bombings happened on 21 April 2019. From 2011 to 2019, data cover
#' the entire island.
#' On 26 December 200... |
\name{PH.Louis.ICsurv}
\alias{PH.Louis.ICsurv}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Calculating the Hessian matrix using Louis's Method (1982)
}
\description{
Calculates the negative of the Hessian of the log of the observed data likelihood, obtained via Louis's method, evaluate... | /man/PH.Louis.ICsurv.Rd | no_license | cran/ICsurv | R | false | false | 1,997 | rd | \name{PH.Louis.ICsurv}
\alias{PH.Louis.ICsurv}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Calculating the Hessian matrix using Louis's Method (1982)
}
\description{
Calculates the negative of the Hessian of the log of the observed data likelihood, obtained via Louis's method, evaluate... |
/Quize/Quiz1.R | no_license | TrentLin/Getting-and-Cleaning-Data | R | false | false | 1,182 | r | ||
df <-read.table("C:/Users/Vahidu/Desktop/Vahid/household_power_consumption.txt", header = TRUE,sep=";")
GlobalAP <- df[,3]
hist(GlobalAP, col="red", xlab="Global Active Power (kilowatts)")
title(main = "Gobal Active Power) | /Project1.R | no_license | vahiduz/test_2 | R | false | false | 224 | r | df <-read.table("C:/Users/Vahidu/Desktop/Vahid/household_power_consumption.txt", header = TRUE,sep=";")
GlobalAP <- df[,3]
hist(GlobalAP, col="red", xlab="Global Active Power (kilowatts)")
title(main = "Gobal Active Power) |
seed <- 169
log.wt <- 0.0
penalty <- 2.8115950178536287e-8
intervals.send <- c()
intervals.recv <- c(56, 112, 225, 450, 900, 1800, 3600, 7200, 14400, 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600, 29491200, 58982400)
dev.null <- 358759.0022669336
df.null <- 35567
dev.resid <- 225263.... | /analysis/boot/boot169.R | no_license | patperry/interaction-proc | R | false | false | 3,764 | r | seed <- 169
log.wt <- 0.0
penalty <- 2.8115950178536287e-8
intervals.send <- c()
intervals.recv <- c(56, 112, 225, 450, 900, 1800, 3600, 7200, 14400, 28800, 57600, 115200, 230400, 460800, 921600, 1843200, 3686400, 7372800, 14745600, 29491200, 58982400)
dev.null <- 358759.0022669336
df.null <- 35567
dev.resid <- 225263.... |
p <-
ggplot(diamonds, aes(carat, price)) +
geom_boxplot(aes(group = cut_width(carat, 0.25)))
| /ggplot2/Layers/Geoms/geom_boxplot/example10.R | no_license | plotly/ssim_baselines | R | false | false | 100 | r | p <-
ggplot(diamonds, aes(carat, price)) +
geom_boxplot(aes(group = cut_width(carat, 0.25)))
|
modelInfo <- list(label = "Bayesian Additive Regression Trees",
library = "bartMachine",
loop = NULL,
type = c("Classification", "Regression"),
parameters = data.frame(parameter = c("num_trees", "k", "alpha", "beta", "nu"),
... | /models/files/bartMachine.R | no_license | terrytangyuan/caret | R | false | false | 4,453 | r | modelInfo <- list(label = "Bayesian Additive Regression Trees",
library = "bartMachine",
loop = NULL,
type = c("Classification", "Regression"),
parameters = data.frame(parameter = c("num_trees", "k", "alpha", "beta", "nu"),
... |
############################################################################
# Chapter : 7
# Description : Classifying Flickr Data using Random Forests and SVM
############################################################################
library(httr)
library(plyr)
library(dplyr)
library(rlist)
library(pipeR... | /Chapter 7 - Analyzing Flickr/Code/B06056_07_04.R | permissive | survivor114jg/learning-social-media-analytics-with-r | R | false | false | 10,943 | r | ############################################################################
# Chapter : 7
# Description : Classifying Flickr Data using Random Forests and SVM
############################################################################
library(httr)
library(plyr)
library(dplyr)
library(rlist)
library(pipeR... |
### 関数perspによる2変数関数の俯瞰図
f <- function(x,y) x^2 - y^2
x <- seq(-3, 3, length=51) # x座標の定義域の分割
y <- seq(-3, 3, length=51) # y座標の定義域の分割
z <- outer(x, y, f) # z座標の計算
### 基本的な俯瞰図
persp(x, y, z, col="lightblue")
### 俯瞰する向きを指定
persp(x, y, z, theta=30, phi=30, expand=0.5, col="royalblue",
main = expression(z==x^2-y^2))
#... | /docs/autumn/example/graph-plot3d.r | no_license | noboru-murata/sda | R | false | false | 765 | r | ### 関数perspによる2変数関数の俯瞰図
f <- function(x,y) x^2 - y^2
x <- seq(-3, 3, length=51) # x座標の定義域の分割
y <- seq(-3, 3, length=51) # y座標の定義域の分割
z <- outer(x, y, f) # z座標の計算
### 基本的な俯瞰図
persp(x, y, z, col="lightblue")
### 俯瞰する向きを指定
persp(x, y, z, theta=30, phi=30, expand=0.5, col="royalblue",
main = expression(z==x^2-y^2))
#... |
#[export]
colsums <- function(x,indices = NULL,parallel = FALSE,na.rm = FALSE) {
if(parallel){
.Call(Rfast_col_sums_p,x)
}else{
.Call(Rfast_col_sums,x,indices,na.rm)
}
}
#[export]
rowsums <- function(x,indices = NULL,parallel = FALSE,na.rm = FALSE) {
if(parallel){
.Call(Rfast_row_sums_p,x)
... | /R/sum.R | no_license | cran/Rfast | R | false | false | 380 | r | #[export]
colsums <- function(x,indices = NULL,parallel = FALSE,na.rm = FALSE) {
if(parallel){
.Call(Rfast_col_sums_p,x)
}else{
.Call(Rfast_col_sums,x,indices,na.rm)
}
}
#[export]
rowsums <- function(x,indices = NULL,parallel = FALSE,na.rm = FALSE) {
if(parallel){
.Call(Rfast_row_sums_p,x)
... |
# Lista 1 - Exercicio 3 - item b
# Zt = 0,3Z*t−1 − 0,585*Zt−2 + at ==> AR(p), p=2 ==> AR(2)
set.seed(666)
Z_t <- arima.sim(model = list(ar = c(.3, -.585)), n = 1000)
par(mfrow=c(3,1))
ts.plot(Z_t)
ar.acf <- acf(Z_t, type = "correlation", plot = T)
ar.pacf <- acf(Z_t, type = "partial", plot = T)
| /MAE5870/lista1/3b_sim.R | no_license | kayaman/tsa | R | false | false | 304 | r | # Lista 1 - Exercicio 3 - item b
# Zt = 0,3Z*t−1 − 0,585*Zt−2 + at ==> AR(p), p=2 ==> AR(2)
set.seed(666)
Z_t <- arima.sim(model = list(ar = c(.3, -.585)), n = 1000)
par(mfrow=c(3,1))
ts.plot(Z_t)
ar.acf <- acf(Z_t, type = "correlation", plot = T)
ar.pacf <- acf(Z_t, type = "partial", plot = T)
|
# Exercise 2: using built-in string functions
# Create a variable `lyric` that contains the text "I like to eat apples and
# bananas"
lyric <- "I like to eat apples and bananas"
# Use the `substr()` function to extract the 1st through 13th letters from the
# `lyric`, and store the result in a variable called `intro... | /exercise-2/exercise.R | permissive | yinchuqian/ch6-functions | R | false | false | 1,364 | r | # Exercise 2: using built-in string functions
# Create a variable `lyric` that contains the text "I like to eat apples and
# bananas"
lyric <- "I like to eat apples and bananas"
# Use the `substr()` function to extract the 1st through 13th letters from the
# `lyric`, and store the result in a variable called `intro... |
#plot 2:
##step 2.1: allocating data into mData vector, setting header to True, sep to ';', setting colClasses (1st and 2nd Col is character and next 7 col are "numeric")
##"?" to be converted into n.a and set the number of rows we need to stay as numeric while the rest is char
mData <- read.table("household_power_con... | /plot2.R | no_license | ThaddyTeo/ExData_Plotting1 | R | false | false | 1,520 | r | #plot 2:
##step 2.1: allocating data into mData vector, setting header to True, sep to ';', setting colClasses (1st and 2nd Col is character and next 7 col are "numeric")
##"?" to be converted into n.a and set the number of rows we need to stay as numeric while the rest is char
mData <- read.table("household_power_con... |
source("https://bioconductor.org/biocLite.R")
biocLite("GRENITS")
library(GRENITS)
TF <- data.matrix(Pilot_TF)[,-1]
rownames(TF) <- Pilot_TF[,1]
# plot.ts( t(TF), plot.type = "single", col = 1:5, xlim = c(0,65),
# main = "Circadian Clock Network \n ODE simulated data",
# xlab = "Time (h)", ylab ... | /GRENITS.R | no_license | gg0027/Network | R | false | false | 1,971 | r |
source("https://bioconductor.org/biocLite.R")
biocLite("GRENITS")
library(GRENITS)
TF <- data.matrix(Pilot_TF)[,-1]
rownames(TF) <- Pilot_TF[,1]
# plot.ts( t(TF), plot.type = "single", col = 1:5, xlim = c(0,65),
# main = "Circadian Clock Network \n ODE simulated data",
# xlab = "Time (h)", ylab ... |
####################################################################
## test subject-level breaks from panel residuals
##
## written by Jong Hee Park 03/2009
## modified and integrated with other codes by JHP 07/2011
## fixed a starting.id and ending.id
#################################################################... | /MCMCpack/R/testpanelSubjectBreak.R | no_license | ingted/R-Examples | R | false | false | 3,219 | r | ####################################################################
## test subject-level breaks from panel residuals
##
## written by Jong Hee Park 03/2009
## modified and integrated with other codes by JHP 07/2011
## fixed a starting.id and ending.id
#################################################################... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.99939506918721e-241, 1.97274569258757e-154, 5.49464572566663e+109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta... | /CNull/inst/testfiles/communities_individual_based_sampling_beta_interleaved_matrices/AFL_communities_individual_based_sampling_beta_interleaved_matrices/communities_individual_based_sampling_beta_interleaved_matrices_valgrind_files/1615839802-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 363 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.99939506918721e-241, 1.97274569258757e-154, 5.49464572566663e+109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta... |
/R/Segunda Clase de st.R | no_license | sebas-prog/Series-de-tiempo-1 | R | false | false | 601 | r | ||
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{eval_pipe}
\alias{eval_pipe}
\title{Runs expressions from a list in an independently scoped environment.}
\usage{
eval_pipe(data = NULL, pipeline = list())
}
\arguments{
\item{data}{A list of environments (or data frames, or a data frame
which is promoted to an... | /package_dir/man/eval_pipe.Rd | no_license | sakrejda/data-integrator | R | false | false | 830 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{eval_pipe}
\alias{eval_pipe}
\title{Runs expressions from a list in an independently scoped environment.}
\usage{
eval_pipe(data = NULL, pipeline = list())
}
\arguments{
\item{data}{A list of environments (or data frames, or a data frame
which is promoted to an... |
whately <- get_whately()
orchard <- get_orchard()
save(whately, file = "data/whately.rda", compress = "xz")
save(orchard, file = "data/orchard.rda", compress = "xz")
| /data-raw/macleish.R | no_license | nicholasjhorton/macleish | R | false | false | 167 | r | whately <- get_whately()
orchard <- get_orchard()
save(whately, file = "data/whately.rda", compress = "xz")
save(orchard, file = "data/orchard.rda", compress = "xz")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EMM_functions_cpp.R
\name{score.linker.cpp}
\alias{score.linker.cpp}
\title{Calculte -log10(p) by score test (fast, for limited cases)}
\usage{
score.linker.cpp(y, Ws, Gammas, gammas.diag = TRUE, Gu, Ge, P0,
chi0.mixture = 0.5)
}
\arguments... | /man/score.linker.cpp.Rd | permissive | quanrd/RAINBOWR | R | false | true | 1,843 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EMM_functions_cpp.R
\name{score.linker.cpp}
\alias{score.linker.cpp}
\title{Calculte -log10(p) by score test (fast, for limited cases)}
\usage{
score.linker.cpp(y, Ws, Gammas, gammas.diag = TRUE, Gu, Ge, P0,
chi0.mixture = 0.5)
}
\arguments... |
envelope.selectedmodgof<- function(Y, fun=NULL, nrank=1,nsim=99,dimyx=c(128,128),...){
x<- Y # the argument should be named Y in order to regeister as an envelope S3 method
simu.model <- x$best.model
cual <- class(simu.model)
bw <- x$best.sigma
# envueltas para un HPC
if("ecespa.minconfit"%in%c... | /selectspm/R/envelope.selectedmodgof.R | no_license | albrizre/spatstat.revdep | R | false | false | 1,395 | r | envelope.selectedmodgof<- function(Y, fun=NULL, nrank=1,nsim=99,dimyx=c(128,128),...){
x<- Y # the argument should be named Y in order to regeister as an envelope S3 method
simu.model <- x$best.model
cual <- class(simu.model)
bw <- x$best.sigma
# envueltas para un HPC
if("ecespa.minconfit"%in%c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/atlantisfmsy_check.R
\name{atlantis_checkmodule}
\alias{atlantis_checkmodule}
\title{Test if Atlantis modules are on.}
\usage{
atlantis_checkmodule(model_path, exe_name, batch_file = NULL)
}
\arguments{
\item{model_path}{The directory of the ... | /man/atlantis_checkmodule.Rd | no_license | rgirardi/atlantisfmsy | R | false | true | 1,822 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/atlantisfmsy_check.R
\name{atlantis_checkmodule}
\alias{atlantis_checkmodule}
\title{Test if Atlantis modules are on.}
\usage{
atlantis_checkmodule(model_path, exe_name, batch_file = NULL)
}
\arguments{
\item{model_path}{The directory of the ... |
x <- c(0.593, 0.142, 0.329, 0.691, 0.231, 0.793, 0.519, 0.392, 0.418)
t.test(x, alternative="greater", mu=0.3)
| /HypothesisTesting.R | no_license | JanviDattani/Data-Science-with-R | R | false | false | 112 | r | x <- c(0.593, 0.142, 0.329, 0.691, 0.231, 0.793, 0.519, 0.392, 0.418)
t.test(x, alternative="greater", mu=0.3)
|
data = read.table("household_power_consumption.txt", sep=";", header = TRUE)##Reading all the data
data$Date = as.Date(data[,1], format = "%d/%m/%Y")##Setting the first column as a data
datas = data[data$Date >= "2007-02-01" & data$Date <= "2007-02-02", ]##extracted the two dates of importance
times = strptime(paste(da... | /plot3.R | no_license | davijeo89/ExData_Plotting1 | R | false | false | 956 | r | data = read.table("household_power_consumption.txt", sep=";", header = TRUE)##Reading all the data
data$Date = as.Date(data[,1], format = "%d/%m/%Y")##Setting the first column as a data
datas = data[data$Date >= "2007-02-01" & data$Date <= "2007-02-02", ]##extracted the two dates of importance
times = strptime(paste(da... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.R
\name{predict.model_list}
\alias{predict.model_list}
\title{Make predictions using the best-performing model from tuning}
\usage{
\method{predict}{model_list}(object, newdata, prepdata, ...)
}
\arguments{
\item{object}{model_list ob... | /man/predict.model_list.Rd | permissive | hughvnguyen/healthcareai-r | R | false | true | 2,664 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict.R
\name{predict.model_list}
\alias{predict.model_list}
\title{Make predictions using the best-performing model from tuning}
\usage{
\method{predict}{model_list}(object, newdata, prepdata, ...)
}
\arguments{
\item{object}{model_list ob... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coxed.R
\name{coxed}
\alias{coxed}
\title{Expected durations and marginal changes in expected duration from the
Cox proportional hazards model}
\usage{
coxed(cox.model, newdata = NULL, newdata2 = NULL, bootstrap = FALSE,
method = "npsf", k ... | /man/coxed.Rd | no_license | alexa-woodward/coxed | R | false | true | 9,334 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coxed.R
\name{coxed}
\alias{coxed}
\title{Expected durations and marginal changes in expected duration from the
Cox proportional hazards model}
\usage{
coxed(cox.model, newdata = NULL, newdata2 = NULL, bootstrap = FALSE,
method = "npsf", k ... |
######################
# #
# More on rtweet #
# #
######################
# Load packages
library(rtweet)
## Resolving User Profile Information ----
# You have a collection of ids and need to resolve basic profile information (such as screen names) for these users.
recent_... | /data-analysis/more_on_twitter_api.R | no_license | papaemman/Social-Network-Analysis-AUTh | R | false | false | 802 | r | ######################
# #
# More on rtweet #
# #
######################
# Load packages
library(rtweet)
## Resolving User Profile Information ----
# You have a collection of ids and need to resolve basic profile information (such as screen names) for these users.
recent_... |
##' @title plotLmCor
##' @description This function would generate a list including a countData and colData as input data for testing
##' @param data Default dataset to use for plot.
##' @param mapping Default list of aesthetic mappings to use for plot
##' @return a ggplot2 object
##' @examples
##' require(ggplot2)
##'... | /R/plotLmCor.R | no_license | Feng-Zhang/bioPlots | R | false | false | 1,314 | r | ##' @title plotLmCor
##' @description This function would generate a list including a countData and colData as input data for testing
##' @param data Default dataset to use for plot.
##' @param mapping Default list of aesthetic mappings to use for plot
##' @return a ggplot2 object
##' @examples
##' require(ggplot2)
##'... |
# Total emissions from PM2.5 decreased in the United States from 1999 to 2008
#Using the base plotting system
#Loading Data#
setwd("C:/Users/User/Desktop/Rdirectory/Data/zips/unzip")
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Observe the variables#
head(NEI)
head(SCC)
#Pl... | /Codes/plot1.R | no_license | ktkt2009/ExData_Plotting2 | R | false | false | 1,021 | r | # Total emissions from PM2.5 decreased in the United States from 1999 to 2008
#Using the base plotting system
#Loading Data#
setwd("C:/Users/User/Desktop/Rdirectory/Data/zips/unzip")
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Observe the variables#
head(NEI)
head(SCC)
#Pl... |
rm(list=ls()) #clear out environment
library(GEOquery) #require package
gset <- getGEO("GSE42414", GSEMatrix=TRUE) #load the NCBI database data using internet
| /Refine_FullLaurenti.R | no_license | bwcont/Bioinform | R | false | false | 162 | r | rm(list=ls()) #clear out environment
library(GEOquery) #require package
gset <- getGEO("GSE42414", GSEMatrix=TRUE) #load the NCBI database data using internet
|
library(tidyverse)
library(caret)
library(e1071) # for skewness
library(zoo) # for na.aggregate which replaces N/A with the mean for the respective group
library(randomForest)
library(rpart)
library(elasticnet) # for lasso and ridge and elasticnet regression
library(pls) # for principle component analysis
library(fastI... | /NYCProperty.R | no_license | nordicbychris/NYCPropertyMLEdxProject20190613 | R | false | false | 12,675 | r | library(tidyverse)
library(caret)
library(e1071) # for skewness
library(zoo) # for na.aggregate which replaces N/A with the mean for the respective group
library(randomForest)
library(rpart)
library(elasticnet) # for lasso and ridge and elasticnet regression
library(pls) # for principle component analysis
library(fastI... |
shade_before <- function(x, y, boundary, ...){
# Shades area under the curve from boundary to values of x that are lower.
# TODO: BUG: Only printing graph with dots, specifying lines not working
lower <- x[1]
shade_between(x, y, lower, boundary)
}
| /plot.convenience/R/shade_before.R | no_license | gpawlik/con-functions-R | R | false | false | 264 | r | shade_before <- function(x, y, boundary, ...){
# Shades area under the curve from boundary to values of x that are lower.
# TODO: BUG: Only printing graph with dots, specifying lines not working
lower <- x[1]
shade_between(x, y, lower, boundary)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dic.fit.R
\name{pgammaOff1}
\alias{pgammaOff1}
\title{Function that calculates pgamma with a offset of 1 (i.e., 1 is equivalent to 0)}
\usage{
pgammaOff1(x, replace0 = FALSE, ...)
}
\arguments{
\item{x}{value to calculate pgamma at}
\item{re... | /man/pgammaOff1.Rd | no_license | nickreich/coarseDataTools | R | false | true | 524 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dic.fit.R
\name{pgammaOff1}
\alias{pgammaOff1}
\title{Function that calculates pgamma with a offset of 1 (i.e., 1 is equivalent to 0)}
\usage{
pgammaOff1(x, replace0 = FALSE, ...)
}
\arguments{
\item{x}{value to calculate pgamma at}
\item{re... |
require(lubridate)
require(dplyr)
require(magrittr)
require(ggplot2)
require(reshape2)
require(stargazer)
require(readr)
require(tidyr)
require(broom)
require(lme4)
require(arm)
require(rms)
require(mfx)
#win
#setwd("C:/Users/fh/Documents/GitHub/parlbias/data")
#mac
setwd("~/GitHub/parlbias/data")
### READ IN DATA
f... | /analysis/parlbias_analysis.R | no_license | fghjorth/parlbias | R | false | false | 21,049 | r | require(lubridate)
require(dplyr)
require(magrittr)
require(ggplot2)
require(reshape2)
require(stargazer)
require(readr)
require(tidyr)
require(broom)
require(lme4)
require(arm)
require(rms)
require(mfx)
#win
#setwd("C:/Users/fh/Documents/GitHub/parlbias/data")
#mac
setwd("~/GitHub/parlbias/data")
### READ IN DATA
f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chk-environment.R
\name{chk_environment}
\alias{chk_environment}
\alias{vld_environment}
\title{Check Environment}
\usage{
chk_environment(x, x_name = NULL)
vld_environment(x)
}
\arguments{
\item{x}{The object to check.}
\item{x_name}{A str... | /man/chk_environment.Rd | permissive | krlmlr/chk | R | false | true | 1,216 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chk-environment.R
\name{chk_environment}
\alias{chk_environment}
\alias{vld_environment}
\title{Check Environment}
\usage{
chk_environment(x, x_name = NULL)
vld_environment(x)
}
\arguments{
\item{x}{The object to check.}
\item{x_name}{A str... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check.R
\name{check}
\alias{check}
\alias{check_built}
\title{Build and check a package, cleaning up automatically on success.}
\usage{
check(
pkg = ".",
document = NULL,
build_args = NULL,
...,
manual = FALSE,
cran = TRUE,
remo... | /man/check.Rd | permissive | rmsharp/devtools | R | false | true | 5,629 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check.R
\name{check}
\alias{check}
\alias{check_built}
\title{Build and check a package, cleaning up automatically on success.}
\usage{
check(
pkg = ".",
document = NULL,
build_args = NULL,
...,
manual = FALSE,
cran = TRUE,
remo... |
#' Delivers some default Parameters of Q-Predictions
#'
#' @export
Get.Def.Par.QPredictions <- function(){
#How to choose Actions & Learning
action.policy <- "epsilon.greedy" #"epsilon.greedy"
weighting.policy <- "SARSA"
weighting.factor <- 0.1 #a from Q learning
end.start <- 0.5 #all after this percentage ... | /R/QPredictions.R | no_license | NiklasPaluszkiewicz/RLR | R | false | false | 28,515 | r | #' Delivers some default Parameters of Q-Predictions
#'
#' @export
Get.Def.Par.QPredictions <- function(){
#How to choose Actions & Learning
action.policy <- "epsilon.greedy" #"epsilon.greedy"
weighting.policy <- "SARSA"
weighting.factor <- 0.1 #a from Q learning
end.start <- 0.5 #all after this percentage ... |
\name{ExCluster}
\alias{ExCluster}
\title{
ExCluster is the main function in this package, which clusters exon bins within each gene to determine signficiantly differentially expressed exon clusters.
}
\description{
The ExCluster function takes an input of normalized exon bin read counts per sample, and only accepts da... | /man/ExCluster.Rd | no_license | RMTbioinfo/ExCluster | R | false | false | 6,747 | rd | \name{ExCluster}
\alias{ExCluster}
\title{
ExCluster is the main function in this package, which clusters exon bins within each gene to determine signficiantly differentially expressed exon clusters.
}
\description{
The ExCluster function takes an input of normalized exon bin read counts per sample, and only accepts da... |
# Getting and Cleaning Data Project John Hopkins Coursera
# Author: tfvip2008
setwd("C:/Users/user/Desktop/Coursera/03.DataScienceFoundationsusingRSpecialization/3.GettingandCleaningData/CourseProject")
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the... | /run_analysis.R | no_license | ritayuehu/Coursera-JHU-Getting-and-Cleaning-Data-Course-Project | R | false | false | 3,298 | r | # Getting and Cleaning Data Project John Hopkins Coursera
# Author: tfvip2008
setwd("C:/Users/user/Desktop/Coursera/03.DataScienceFoundationsusingRSpecialization/3.GettingandCleaningData/CourseProject")
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the... |
ps <- readRDS("ps_c.rds")
test_that("plot_standard_error() - Tests for argument errors", {
expect_error(plot_standard_error(ps = NULL, ci = c(0.05, 0.95)))
expect_error(plot_standard_error(ps = ps, ci = NULL))
expect_error(plot_standard_error(ps = ps, ci = c(0.05, 0.94)))
expect_error(plot_standard_error(ps =... | /tests/testthat/test-plot-standard-error.R | no_license | aaronmberger-nwfsc/pacifichakemse-1 | R | false | false | 775 | r |
ps <- readRDS("ps_c.rds")
test_that("plot_standard_error() - Tests for argument errors", {
expect_error(plot_standard_error(ps = NULL, ci = c(0.05, 0.95)))
expect_error(plot_standard_error(ps = ps, ci = NULL))
expect_error(plot_standard_error(ps = ps, ci = c(0.05, 0.94)))
expect_error(plot_standard_error(ps =... |
\name{V3.TMAX.RAW.URL}
\alias{V3.TMAX.RAW.URL}
\docType{data}
\title{ A url for the GHCN V3 Tmax data, unadjusted
}
\description{This url points to the unadjusted Tmax (maximum)
dataset for GHCN V3
}
\usage{V3.TMAX.RAW.URL}
\format{
The format is:
chr "ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v3/ghcn... | /man/V3.TMAX.RAW.URL.Rd | no_license | cran/RghcnV3 | R | false | false | 573 | rd | \name{V3.TMAX.RAW.URL}
\alias{V3.TMAX.RAW.URL}
\docType{data}
\title{ A url for the GHCN V3 Tmax data, unadjusted
}
\description{This url points to the unadjusted Tmax (maximum)
dataset for GHCN V3
}
\usage{V3.TMAX.RAW.URL}
\format{
The format is:
chr "ftp://ftp.ncdc.noaa.gov/pub/data/ghcn/v3/ghcn... |
'daily.angler.effort'<-function(count,LOD.info,num.time.periods="",num.lake.sections="",
timeprob="", sectionprob=""){
require(stringr)
require(reshape2)
if(num.time.periods==""){
num.time.periods<-2
}
if(num.lake.sections==""){
num.lake.sections<-1
}
if(timeprob==""){
time.period<-c(1,... | /R/daily.angler.effort.R | no_license | Ilfenominot/creelr | R | false | false | 4,550 | r |
'daily.angler.effort'<-function(count,LOD.info,num.time.periods="",num.lake.sections="",
timeprob="", sectionprob=""){
require(stringr)
require(reshape2)
if(num.time.periods==""){
num.time.periods<-2
}
if(num.lake.sections==""){
num.lake.sections<-1
}
if(timeprob==""){
time.period<-c(1,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/positionIncrement.R
\name{resolvePositions}
\alias{resolvePositions}
\title{This function computes the position differences and optionally reconciles in the system.}
\usage{
resolvePositions(
accWisePos,
instName,
resources,
date,
c... | /man/resolvePositions.Rd | no_license | beatnaut/remaputils | R | false | true | 836 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/positionIncrement.R
\name{resolvePositions}
\alias{resolvePositions}
\title{This function computes the position differences and optionally reconciles in the system.}
\usage{
resolvePositions(
accWisePos,
instName,
resources,
date,
c... |
library(bigstatsr)
### Name: big_transpose
### Title: Transposition
### Aliases: big_transpose
### ** Examples
X <- FBM(10, 5, init = rnorm(50))
X[]
Xt <- big_transpose(X)
identical(t(X[]), Xt[])
X <- big_attachExtdata()
Xt <- big_transpose(X)
identical(t(X[]), Xt[])
| /data/genthat_extracted_code/bigstatsr/examples/big_transpose.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 277 | r | library(bigstatsr)
### Name: big_transpose
### Title: Transposition
### Aliases: big_transpose
### ** Examples
X <- FBM(10, 5, init = rnorm(50))
X[]
Xt <- big_transpose(X)
identical(t(X[]), Xt[])
X <- big_attachExtdata()
Xt <- big_transpose(X)
identical(t(X[]), Xt[])
|
#* Wait 5 seconds and then return the current time
#* @serializer json
#* @param wait_time
#* @get /wait
function(req, res, wait_time = 10) {
time_diff(wait_time)
}
| /plumber/plumber.R | permissive | fdrennan/rk8s | R | false | false | 171 | r |
#* Wait 5 seconds and then return the current time
#* @serializer json
#* @param wait_time
#* @get /wait
function(req, res, wait_time = 10) {
time_diff(wait_time)
}
|
#Package Dependancies##########################################################################################
library(readxl)
library(dplyr)
library(stringr)
library(openxlsx)
library(getPass)
library(odbc)
library(DBI)
library(RODBC)
library(lubridate)
library(tidyr)
options(scipen=999) #gets rid of scientific not... | /umpqua_r_code_samples/ReferAFriendMonth2-5_PIISafe.R | no_license | zgod89/Portfolio | R | false | false | 8,689 | r | #Package Dependancies##########################################################################################
library(readxl)
library(dplyr)
library(stringr)
library(openxlsx)
library(getPass)
library(odbc)
library(DBI)
library(RODBC)
library(lubridate)
library(tidyr)
options(scipen=999) #gets rid of scientific not... |
curve_fitting <- data.frame(
x=c(0.000000,0.111111,0.222222,0.333333,0.444444,0.555556,0.666667,0.777778,0.888889,1.000000),
t=c(0.349486,0.830839,1.007332,0.971507,0.133066,0.166823,-0.848307,-0.445686,-0.563567,0.261502))
gp <- function(beta, sigma) {
kernel <- function(x1, x2) exp(-(x1-x2)^2/(2*sigma^2));
... | /misc/r/gp.R | no_license | amumu/nokuno | R | false | false | 706 | r | curve_fitting <- data.frame(
x=c(0.000000,0.111111,0.222222,0.333333,0.444444,0.555556,0.666667,0.777778,0.888889,1.000000),
t=c(0.349486,0.830839,1.007332,0.971507,0.133066,0.166823,-0.848307,-0.445686,-0.563567,0.261502))
gp <- function(beta, sigma) {
kernel <- function(x1, x2) exp(-(x1-x2)^2/(2*sigma^2));
... |
# lectures données genevieve
Sigma_gen <- read.table("~/simulations/Data_genevieve/Data/erdos/Sigma_small.txt", quote="\"", comment.char="")
adjmat_gen<- read.table("~/simulations/Data_genevieve/Data/erdos/adjmat_small.txt", quote="\"", comment.char="")
adjmat_cond <- read.table("~/simulations/Data_genevieve/Data/e... | /R/codes/missingActor/use_genData.R | no_license | Rmomal/these | R | false | false | 1,029 | r | # lectures données genevieve
Sigma_gen <- read.table("~/simulations/Data_genevieve/Data/erdos/Sigma_small.txt", quote="\"", comment.char="")
adjmat_gen<- read.table("~/simulations/Data_genevieve/Data/erdos/adjmat_small.txt", quote="\"", comment.char="")
adjmat_cond <- read.table("~/simulations/Data_genevieve/Data/e... |
#' Formatuje jak PLN
#'
#' @param suffix co ma byc po kwocie np. znak 'dolara' domyslnie ' zł'
#'
#' @return zwraca character vector dla kwot
#'
#' @export
#'
#'
PLN <- function(x, suffix = " z\U0142",
accuracy = 2,
scale = 1,
prefix = "",
big.mark = " ",... | /R/PLN.R | no_license | kiwimic/kiwiR | R | false | false | 998 | r | #' Formatuje jak PLN
#'
#' @param suffix co ma byc po kwocie np. znak 'dolara' domyslnie ' zł'
#'
#' @return zwraca character vector dla kwot
#'
#' @export
#'
#'
PLN <- function(x, suffix = " z\U0142",
accuracy = 2,
scale = 1,
prefix = "",
big.mark = " ",... |
load("digits.RData")
num.class = dim(training.data)[1] # Number of classes
num.training = dim(training.data)[2] # Number of training data per class
d = prod(dim(training.data)[3:4]) # Dimension of each training image (rowsxcolumns)
num.test = dim(test.data)[2] # Number of test data
dim(training.data) = c(num.class * nu... | /Rcode.R | no_license | destinationyyf/Digits-Recognition | R | false | false | 5,549 | r | load("digits.RData")
num.class = dim(training.data)[1] # Number of classes
num.training = dim(training.data)[2] # Number of training data per class
d = prod(dim(training.data)[3:4]) # Dimension of each training image (rowsxcolumns)
num.test = dim(test.data)[2] # Number of test data
dim(training.data) = c(num.class * nu... |
# Graph 1
library(ggplot2)
salesg = sales
ggplot(data = salesg, aes(x=sdate,y=pies)) +
geom_point() +
labs( title ='Sales data of Pies', x='Date', y='Sales')
#Stepwise
g1= ggplot(data = salesg, aes(x=sdate,y=pies))
g2= g1+ geom_point()
g3= g2 + labs( title ='Sales data of Pies', x='Date', y='Sales')
g3 #run
g1=... | /GRAPH/GG/ggp2.R | no_license | bidyan24/analytics | R | false | false | 725 | r | # Graph 1
library(ggplot2)
salesg = sales
ggplot(data = salesg, aes(x=sdate,y=pies)) +
geom_point() +
labs( title ='Sales data of Pies', x='Date', y='Sales')
#Stepwise
g1= ggplot(data = salesg, aes(x=sdate,y=pies))
g2= g1+ geom_point()
g3= g2 + labs( title ='Sales data of Pies', x='Date', y='Sales')
g3 #run
g1=... |
##############
# Laura B. Balzer
# Wrapper R code for simulation studies -
#"Two-Stage TMLE to Reduce Bias and Improve Efficiency in Cluster Randomized Trials"
rm(list=ls())
library('nbpMatching')
library('MASS')
library('SuperLearner')
library('ltmle')
# load functions to generate the data
source('MainFunction.R'... | /StartHere.R | permissive | LauraBalzer/TwoStageTMLE | R | false | false | 4,126 | r | ##############
# Laura B. Balzer
# Wrapper R code for simulation studies -
#"Two-Stage TMLE to Reduce Bias and Improve Efficiency in Cluster Randomized Trials"
rm(list=ls())
library('nbpMatching')
library('MASS')
library('SuperLearner')
library('ltmle')
# load functions to generate the data
source('MainFunction.R'... |
# Decision Tree - Classification
#we want predict for combination of input variables, is a person likely to servive or not
#import data from online site
path = 'https://raw.githubusercontent.com/thomaspernet/data_csv_r/master/data/titanic_csv.csv'
titanic <-read.csv(path)
head(titanic)
names(titanic)
data = titanic[,c... | /titanicDecisionTree.R | no_license | aiyyomacha/analytics1 | R | false | false | 1,226 | r | # Decision Tree - Classification
#we want predict for combination of input variables, is a person likely to servive or not
#import data from online site
path = 'https://raw.githubusercontent.com/thomaspernet/data_csv_r/master/data/titanic_csv.csv'
titanic <-read.csv(path)
head(titanic)
names(titanic)
data = titanic[,c... |
library(data.table)
library(dplyr)
#Read data
#Training
trainSubject <- read.table("UCI HAR Dataset/train/subject_train.txt", header = FALSE)
trainLabel <- read.table("UCI HAR Dataset/train/y_train.txt", header = FALSE)
trainSet <- read.table("UCI HAR Dataset/train/X_train.txt", header = FALSE)
#Testing
testSubject <- ... | /run_analysis.R | no_license | Edison9489/Getting-and-Cleaning-Data-Course-Project | R | false | false | 2,177 | r | library(data.table)
library(dplyr)
#Read data
#Training
trainSubject <- read.table("UCI HAR Dataset/train/subject_train.txt", header = FALSE)
trainLabel <- read.table("UCI HAR Dataset/train/y_train.txt", header = FALSE)
trainSet <- read.table("UCI HAR Dataset/train/X_train.txt", header = FALSE)
#Testing
testSubject <- ... |
#' @param cparsk copula parameter vector, third component in [0,1]
#' @param eps tolerance for convergence
#' @param mxiter maximum number of Newton-Raphson iterations
#' @rdname bb1sk
#' @export
qcondbb1sk21=function(p,u,cparsk, eps=1.e-8,mxiter=30,iprint=F)
{
iter=0; diff=1.;
v=qcondbb1(p,u,cparsk[1:2]) # starti... | /R/bb1sk-qcond.r | permissive | vincenzocoia/copsupp | R | false | false | 1,241 | r | #' @param cparsk copula parameter vector, third component in [0,1]
#' @param eps tolerance for convergence
#' @param mxiter maximum number of Newton-Raphson iterations
#' @rdname bb1sk
#' @export
qcondbb1sk21=function(p,u,cparsk, eps=1.e-8,mxiter=30,iprint=F)
{
iter=0; diff=1.;
v=qcondbb1(p,u,cparsk[1:2]) # starti... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "fri_c1_250_10")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = mak... | /models/openml_fri_c1_250_10/classification_binaryClass/617f67a5f65dec5116ed2b1f02b2b4b4/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 690 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "fri_c1_250_10")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = mak... |
library(dplyr)
filename <- "getdata_projectfiles_UCI HAR Dataset.zip"
# Checking if archieve already exists.
if (!file.exists(filename)){
fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileURL, filename, method="curl")
}
# Checking if folder exis... | /run_analysis.R | no_license | vishal2600/data-cleaning | R | false | false | 2,819 | r | library(dplyr)
filename <- "getdata_projectfiles_UCI HAR Dataset.zip"
# Checking if archieve already exists.
if (!file.exists(filename)){
fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileURL, filename, method="curl")
}
# Checking if folder exis... |
# installing/loading the package:
if(!require(installr)) {
install.packages("installr");
require(installr)
} #load / install+load installr
updateR()
## get packages installed
packs = as.data.frame(installed.packages(.libPaths()[1]), stringsAsFactors = F)
## and now re-install install packages using instal... | /resources/analytics/R_resources/updating_R.r | no_license | aceri/portfolio | R | false | false | 366 | r | # installing/loading the package:
if(!require(installr)) {
install.packages("installr");
require(installr)
} #load / install+load installr
updateR()
## get packages installed
packs = as.data.frame(installed.packages(.libPaths()[1]), stringsAsFactors = F)
## and now re-install install packages using instal... |
p <- sample(5:50, 1)
n <- sample(4:p, 1)
datamat <- matrix(rnorm(p * n), p, n)
test_that("checking output with uncentered data", {
sample_covariance_matrix <- cov(t(datamat))
trace_sigma_hat <- sum(diag(sample_covariance_matrix))
data_centered <- datamat - rowMeans(datamat)
q <- sum(colSums(data_centered^2)^2)... | /tests/testthat/test_shrinkage_identity.R | no_license | AnestisTouloumis/ShrinkCovMat | R | false | false | 3,056 | r | p <- sample(5:50, 1)
n <- sample(4:p, 1)
datamat <- matrix(rnorm(p * n), p, n)
test_that("checking output with uncentered data", {
sample_covariance_matrix <- cov(t(datamat))
trace_sigma_hat <- sum(diag(sample_covariance_matrix))
data_centered <- datamat - rowMeans(datamat)
q <- sum(colSums(data_centered^2)^2)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_263}
\alias{movie_263}
\title{Final Destination}
\format{
igraph object
}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0195714
}... | /man/movie_263.Rd | permissive | schochastics/networkdata | R | false | true | 1,017 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_263}
\alias{movie_263}
\title{Final Destination}
\format{
igraph object
}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0195714
}... |
#!/applications/R/R-3.4.0/bin/Rscript
# Profile mean coverage around peaks and random loci
# Usage via Condor submission system on node7:
# csmit -m 20G -c 1 "./peak_Profiles_DNAmeth_commandArgs.R 2000 2kb 20 /home/ajt200/BS_Seq/Stroud_2013/WT_rep2/wig/bed/GSM980986_WT_rep2_CG.wig.bed.gr.tab.bed CGmeth"
# Source fun... | /peaks/PeakRanger1.18/ranger/MYC_Rep1_input_p0.001_q0.01/REC8_HA_Rep2/control_filtered/peri/heatmap_analysis_01/peak_Profiles_DNAmeth_commandArgs.R | no_license | ajtock/REC8_pooled | R | false | false | 3,880 | r | #!/applications/R/R-3.4.0/bin/Rscript
# Profile mean coverage around peaks and random loci
# Usage via Condor submission system on node7:
# csmit -m 20G -c 1 "./peak_Profiles_DNAmeth_commandArgs.R 2000 2kb 20 /home/ajt200/BS_Seq/Stroud_2013/WT_rep2/wig/bed/GSM980986_WT_rep2_CG.wig.bed.gr.tab.bed CGmeth"
# Source fun... |
library(dplyr)
library(e1071)
##read the data
model_data = read.csv("10foldCrossValidated_Lasso_Features.csv")[,2:24]
set.seed(26)
sample <- sample.int(n = nrow(model_data), size = floor(.70*nrow(model_data)), replace = F)
training <- model_data[sample, ]
test <- model_data[-sample, ]
# training$fraud=as... | /SVM.R | no_license | nikhilscg/Application-Fraud | R | false | false | 441 | r | library(dplyr)
library(e1071)
##read the data
model_data = read.csv("10foldCrossValidated_Lasso_Features.csv")[,2:24]
set.seed(26)
sample <- sample.int(n = nrow(model_data), size = floor(.70*nrow(model_data)), replace = F)
training <- model_data[sample, ]
test <- model_data[-sample, ]
# training$fraud=as... |
library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/haematopoietic.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.9,family="gaussian",standardize=FALSE)
sink('./Model/EN/Lasso/haematopoietic/haematopoie... | /Model/EN/Lasso/haematopoietic/haematopoietic_090.R | no_license | leon1003/QSMART | R | false | false | 375 | r | library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/haematopoietic.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.9,family="gaussian",standardize=FALSE)
sink('./Model/EN/Lasso/haematopoietic/haematopoie... |
### Jinliang Yang
### Updates: June 24th, 2016
library("farmeR")
fq1 <- list.files(path="/group/jrigrp4/BS_teo20/WGBS/", pattern="sra_1.fastq$", full.names = TRUE)
fq2 <- list.files(path="/group/jrigrp4/BS_teo20/WGBS/", pattern="sra_2.fastq$", full.names = TRUE)
bamfiles <- list.files(path="/group/jrigrp4/BS_teo20/W... | /profiling/0.SRA_align/0.B.2_alignment.R | no_license | RILAB/methylation | R | false | false | 802 | r | ### Jinliang Yang
### Updates: June 24th, 2016
library("farmeR")
fq1 <- list.files(path="/group/jrigrp4/BS_teo20/WGBS/", pattern="sra_1.fastq$", full.names = TRUE)
fq2 <- list.files(path="/group/jrigrp4/BS_teo20/WGBS/", pattern="sra_2.fastq$", full.names = TRUE)
bamfiles <- list.files(path="/group/jrigrp4/BS_teo20/W... |
library(tuber)
### Name: list_videocats
### Title: List of Categories That Can be Associated with Videos
### Aliases: list_videocats
### ** Examples
## Not run:
##D
##D # Set API token via yt_oauth() first
##D
##D list_videocats(c(region_code = "JP"))
##D list_videocats() # Will throw an error asking for a valid... | /data/genthat_extracted_code/tuber/examples/list_videocats.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 370 | r | library(tuber)
### Name: list_videocats
### Title: List of Categories That Can be Associated with Videos
### Aliases: list_videocats
### ** Examples
## Not run:
##D
##D # Set API token via yt_oauth() first
##D
##D list_videocats(c(region_code = "JP"))
##D list_videocats() # Will throw an error asking for a valid... |
library(DMMF)
### Name: MapChecker
### Title: Map checker for raster layers
### Aliases: MapChecker
### ** Examples
## Not run:
##D ## Load example data for test running B_Checker function
##D data(Potato.Convex)
##D attach(Potato.Convex)
##D ## Run B_Checker function with original DEM which has internal sinks.
##... | /data/genthat_extracted_code/DMMF/examples/MapChecker.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 532 | r | library(DMMF)
### Name: MapChecker
### Title: Map checker for raster layers
### Aliases: MapChecker
### ** Examples
## Not run:
##D ## Load example data for test running B_Checker function
##D data(Potato.Convex)
##D attach(Potato.Convex)
##D ## Run B_Checker function with original DEM which has internal sinks.
##... |
context("Factories of 'compboost'")
test_that("polynomial factory works", {
# Data X and response y:
X.linear = 1:10
X.cubic = X.linear^3
y = 3 * X.linear + rnorm(10, 0, 2)
expect_silent({ data.source = InMemoryData$new(as.matrix(X.linear), "my_variable") })
expect_silent({ data.target.lin = InMemory... | /fuzzedpackages/compboost/tests/testthat/test_factory.R | no_license | akhikolla/testpackages | R | false | false | 2,698 | r | context("Factories of 'compboost'")
test_that("polynomial factory works", {
# Data X and response y:
X.linear = 1:10
X.cubic = X.linear^3
y = 3 * X.linear + rnorm(10, 0, 2)
expect_silent({ data.source = InMemoryData$new(as.matrix(X.linear), "my_variable") })
expect_silent({ data.target.lin = InMemory... |
#script with function to make phylo object
make_phytree_array = function(tree_string,tr){
load(paste("true_tree_rands_gil",tree_string[tr],".RData",sep=""))
utri = tree
utri[lower.tri(utri,diag=TRUE)] = 0
Nleaves = sum(rowSums(utri)==0)
Nnodes = ncol(tree)
#create orig_node_names, element i is origin... | /make_phytree_array_cluster.R | no_license | anne-marie-lyne/Compare_tree_reconstruction_microsatellites | R | false | false | 2,770 | r | #script with function to make phylo object
make_phytree_array = function(tree_string,tr){
load(paste("true_tree_rands_gil",tree_string[tr],".RData",sep=""))
utri = tree
utri[lower.tri(utri,diag=TRUE)] = 0
Nleaves = sum(rowSums(utri)==0)
Nnodes = ncol(tree)
#create orig_node_names, element i is origin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_bins.R
\name{create_bins}
\alias{create_bins}
\title{Create Bins from a vector of numbers.}
\usage{
create_bins(x, nbins, bins = NULL)
}
\arguments{
\item{x}{Vector of number.}
\item{nbins}{Number of bins to be generated. If 'bins' pa... | /man/create_bins.Rd | no_license | mohtad/mapR | R | false | true | 1,052 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_bins.R
\name{create_bins}
\alias{create_bins}
\title{Create Bins from a vector of numbers.}
\usage{
create_bins(x, nbins, bins = NULL)
}
\arguments{
\item{x}{Vector of number.}
\item{nbins}{Number of bins to be generated. If 'bins' pa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{augmented_diag}
\alias{augmented_diag}
\title{Returns an offset diagonal matrix.}
\usage{
augmented_diag(d, offset)
}
\arguments{
\item{d}{Matrix dimensional (square matrix)}
\item{offset}{Offset from the diagonal}
}
\value{
A ... | /man/augmented_diag.Rd | no_license | cran/ntwk | R | false | true | 517 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{augmented_diag}
\alias{augmented_diag}
\title{Returns an offset diagonal matrix.}
\usage{
augmented_diag(d, offset)
}
\arguments{
\item{d}{Matrix dimensional (square matrix)}
\item{offset}{Offset from the diagonal}
}
\value{
A ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_nba_season_team_rosters.R
\name{get_nba_season_team_rosters}
\alias{get_nba_season_team_rosters}
\title{Query the commonteamroster endpoint from nba stats}
\usage{
get_nba_season_team_rosters(seasons = NULL, teamids = NULL,
sleep = TRUE... | /man/get_nba_season_team_rosters.Rd | permissive | jimtheflash/nbastatstools | R | false | true | 731 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_nba_season_team_rosters.R
\name{get_nba_season_team_rosters}
\alias{get_nba_season_team_rosters}
\title{Query the commonteamroster endpoint from nba stats}
\usage{
get_nba_season_team_rosters(seasons = NULL, teamids = NULL,
sleep = TRUE... |
#!/usr/bin/Rscript --vanilla
installed_packages <- rownames(installed.packages())
# machines at FVAFR need to set the proxy correctly.
if (grepl("FVAFR-", Sys.info()["nodename"])) {
if (! "httr" %in% installed_packages) install.packages("httr")
httr::set_config(httr::use_proxy(url="10.127.255.17", port=8080... | /listings/install_documentation.r | permissive | outheis/programmierleitfaden | R | false | false | 516 | r | #!/usr/bin/Rscript --vanilla
installed_packages <- rownames(installed.packages())
# machines at FVAFR need to set the proxy correctly.
if (grepl("FVAFR-", Sys.info()["nodename"])) {
if (! "httr" %in% installed_packages) install.packages("httr")
httr::set_config(httr::use_proxy(url="10.127.255.17", port=8080... |
\name{ggally_cor}
\alias{ggally_cor}
\title{Correlation from the Scatter Plot}
\usage{
ggally_cor(data, mapping, corAlignPercent = 0.6,
corSize = 3, ...)
}
\arguments{
\item{data}{data set using}
\item{mapping}{aesthetics being used}
\item{corAlignPercent}{right align position of numbers.
Default is 60 ... | /man/ggally_cor.Rd | no_license | lselzer/ggally | R | false | false | 911 | rd | \name{ggally_cor}
\alias{ggally_cor}
\title{Correlation from the Scatter Plot}
\usage{
ggally_cor(data, mapping, corAlignPercent = 0.6,
corSize = 3, ...)
}
\arguments{
\item{data}{data set using}
\item{mapping}{aesthetics being used}
\item{corAlignPercent}{right align position of numbers.
Default is 60 ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_qcew_data.R
\name{export_named_df}
\alias{export_named_df}
\title{Export the downloaded table into a csv file.}
\usage{
export_named_df(path_data = "./", year, named_df)
}
\arguments{
\item{year:}{filename for .csv file. Note that you nee... | /man/export_named_df.Rd | no_license | mp3201/entrydatar | R | false | true | 971 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_qcew_data.R
\name{export_named_df}
\alias{export_named_df}
\title{Export the downloaded table into a csv file.}
\usage{
export_named_df(path_data = "./", year, named_df)
}
\arguments{
\item{year:}{filename for .csv file. Note that you nee... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 1792163
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 1792163
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/fpu/fpu-10Xh-error01-uniform-depth-25... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Miller-Marin/fpu/fpu-10Xh-error01-uniform-depth-25/fpu-10Xh-error01-uniform-depth-25.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 687 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 1792163
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 1792163
c
c Input Parameter (command line, file):
c input filename QBFLIB/Miller-Marin/fpu/fpu-10Xh-error01-uniform-depth-25... |
getPortefeuille<-function(){
#action<-c("AC.PA","ACA.PA","AI.PA","AIR.PA","BN.PA","BNP.PA","CA.PA","CAP.PA","CS.PA","DG.PA","EI.PA","EN.PA","ENGI.PA","FP.PA","FR.PA","GLE.PA","KER.PA","LHN.PA","LI.PA","LR.PA","MC.PA","ML.PA");
#nombre<-c(1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22);
#portefeuille... | /R/getPortefeuille.R | no_license | fcluzeau/stockfr | R | false | false | 456 | r | getPortefeuille<-function(){
#action<-c("AC.PA","ACA.PA","AI.PA","AIR.PA","BN.PA","BNP.PA","CA.PA","CAP.PA","CS.PA","DG.PA","EI.PA","EN.PA","ENGI.PA","FP.PA","FR.PA","GLE.PA","KER.PA","LHN.PA","LI.PA","LR.PA","MC.PA","ML.PA");
#nombre<-c(1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22);
#portefeuille... |
#' Returns the shardkey (not implemented yet)
#' @importFrom jsonlite fromJSON
#' @param df a disk.frame
#' @export
# TODO make this work
shardkey <- function(df) {
meta_file = file.path(attr(df,"path"),".metadata", "meta.json")
if(!file.exists(meta_file)) {
add_meta(df)
}
meta = jsonlite::fromJSON(meta_fil... | /R/shardkey.r | permissive | jingmouren/disk.frame | R | false | false | 390 | r | #' Returns the shardkey (not implemented yet)
#' @importFrom jsonlite fromJSON
#' @param df a disk.frame
#' @export
# TODO make this work
shardkey <- function(df) {
meta_file = file.path(attr(df,"path"),".metadata", "meta.json")
if(!file.exists(meta_file)) {
add_meta(df)
}
meta = jsonlite::fromJSON(meta_fil... |
context("cumulative distribution function")
test_models <- list(
jqpd(c(0.32, 0.4, 0.6), lower = 0, upper = 1, alpha = .1),
jqpd(c(0.32, 0.4, 0.6), lower = 0, upper = 1, alpha = .3),
jqpd(c(2, 4, 6), lower = 0, upper = Inf, alpha = .1),
jqpd(c(2, 4, 6), lower = 0, upper = Inf, alpha = .3)
)
test_that("lower b... | /tests/testthat/test-pjqpd.R | permissive | bobbyingram/rjqpd | R | false | false | 790 | r | context("cumulative distribution function")
test_models <- list(
jqpd(c(0.32, 0.4, 0.6), lower = 0, upper = 1, alpha = .1),
jqpd(c(0.32, 0.4, 0.6), lower = 0, upper = 1, alpha = .3),
jqpd(c(2, 4, 6), lower = 0, upper = Inf, alpha = .1),
jqpd(c(2, 4, 6), lower = 0, upper = Inf, alpha = .3)
)
test_that("lower b... |
library(billboarder)
### Name: bb_data
### Title: Add data to Billboard chart
### Aliases: bb_data
### ** Examples
billboarder() %>%
bb_barchart(data = table(mtcars$cyl)) %>%
bb_data(names = list(Freq = "Number of cylinders"), labels = TRUE)
| /data/genthat_extracted_code/billboarder/examples/bb_data.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 253 | r | library(billboarder)
### Name: bb_data
### Title: Add data to Billboard chart
### Aliases: bb_data
### ** Examples
billboarder() %>%
bb_barchart(data = table(mtcars$cyl)) %>%
bb_data(names = list(Freq = "Number of cylinders"), labels = TRUE)
|
testlist <- list(phi = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = c(1.36656528938164e-311, -1.657912... | /dcurver/inst/testfiles/ddc/AFL_ddc/ddc_valgrind_files/1609868309-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 833 | r | testlist <- list(phi = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), x = c(1.36656528938164e-311, -1.657912... |
if(Sys.info()['login']=='jeremyb'){
setwd("C:\\Users\\jeremyb\\Documents\\A_Master\\Code")
}else if(Sys.info()['login']=='jeremy') {
setwd("C:/Users/JumpCo Vostro3700/infection-dating-tool/manuscripts/figures")
}else{
setwd(".") #what does this do?
}
source("part_Onefunctions.R")
file.create("C:\\Users\\j... | /part_Onescripts.R | no_license | JemLukeBingham/poster_code | R | false | false | 12,316 | r | if(Sys.info()['login']=='jeremyb'){
setwd("C:\\Users\\jeremyb\\Documents\\A_Master\\Code")
}else if(Sys.info()['login']=='jeremy') {
setwd("C:/Users/JumpCo Vostro3700/infection-dating-tool/manuscripts/figures")
}else{
setwd(".") #what does this do?
}
source("part_Onefunctions.R")
file.create("C:\\Users\\j... |
\name{ex07.26}
\alias{ex07.26}
\docType{data}
\title{data from exercise 7.26}
\description{
The \code{ex07.26} data frame has 11 rows and 2 columns.
}
\format{
This data frame contains the following columns:
\describe{
\item{Number.of.absences}{
a numeric vector
}
\item{Frequency}{
a numer... | /man/ex07.26.Rd | no_license | dmbates/Devore6 | R | false | false | 506 | rd | \name{ex07.26}
\alias{ex07.26}
\docType{data}
\title{data from exercise 7.26}
\description{
The \code{ex07.26} data frame has 11 rows and 2 columns.
}
\format{
This data frame contains the following columns:
\describe{
\item{Number.of.absences}{
a numeric vector
}
\item{Frequency}{
a numer... |
nonlinear.student.data <- read.csv("~/Desktop/回归分析/第4讲 非线性回归/student_data.csv", row.names=1)
nonlinear.student.data<- na.omit(nonlinear.student.data)
head(nonlinear.student.data)
#散点图可视化身高体重线性关系
attach(nonlinear.student.data)
plot(height,weight ,main="scatter plot")
#1)多项式回归模型建模
plot(height,weight ,main="scatter ... | /第4讲 非线性回归.R | no_license | Chuyue0724/Regression-model | R | false | false | 2,492 | r | nonlinear.student.data <- read.csv("~/Desktop/回归分析/第4讲 非线性回归/student_data.csv", row.names=1)
nonlinear.student.data<- na.omit(nonlinear.student.data)
head(nonlinear.student.data)
#散点图可视化身高体重线性关系
attach(nonlinear.student.data)
plot(height,weight ,main="scatter plot")
#1)多项式回归模型建模
plot(height,weight ,main="scatter ... |
# From edefs[["wxStretch"]] where edefs are the enumerations for the TU
# for wxWidgets.
library(RAutoGenRunTime)
setClass("wxStretch", contains = "BitwiseValue")
wxStretchValues = BitwiseValue(structure(c(0L, 4096L, 8192L, 8192L, 16384L, 32768L, 49152L,
1048576L), .Names = c("wxSTRETCH_NOT", "wxSHRINK", "wxGROW",
... | /tests/bits.R | no_license | omegahat/RAutoGenRunTime | R | false | false | 2,781 | r | # From edefs[["wxStretch"]] where edefs are the enumerations for the TU
# for wxWidgets.
library(RAutoGenRunTime)
setClass("wxStretch", contains = "BitwiseValue")
wxStretchValues = BitwiseValue(structure(c(0L, 4096L, 8192L, 8192L, 16384L, 32768L, 49152L,
1048576L), .Names = c("wxSTRETCH_NOT", "wxSHRINK", "wxGROW",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.