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 |
|---|---|---|---|---|---|---|---|---|---|
##This section downloads, unzips, and reads the data
install.packages("downloader")
library(downloader)
download("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",
dest="dataset.zip", mode="wb")
unzip("dataset.zip", exdir = "./")
dfHPC <- read.table("household_power_con... | /plot1.R | no_license | emlaughlin/ExData_Plotting1 | R | false | false | 1,130 | r | ##This section downloads, unzips, and reads the data
install.packages("downloader")
library(downloader)
download("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",
dest="dataset.zip", mode="wb")
unzip("dataset.zip", exdir = "./")
dfHPC <- read.table("household_power_con... |
# calculate the root mean square error of a model's predictions
rmse_calc = function(true_value, predictions) {
rmse = sqrt(mean((predictions - true_value)^2))
return(rmse)
} | /general_functions/general_utils.R | no_license | marccgrau/dml_estimator_plm | R | false | false | 178 | r | # calculate the root mean square error of a model's predictions
rmse_calc = function(true_value, predictions) {
rmse = sqrt(mean((predictions - true_value)^2))
return(rmse)
} |
library(qmethod)
### Name: make.distribution
### Title: Q methodology: create Q normal distribution
### Aliases: make.distribution
### ** Examples
## Make Q distribution
make.distribution(nstat=76, max.bin=7)
| /data/genthat_extracted_code/qmethod/examples/make.distribution.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 220 | r | library(qmethod)
### Name: make.distribution
### Title: Q methodology: create Q normal distribution
### Aliases: make.distribution
### ** Examples
## Make Q distribution
make.distribution(nstat=76, max.bin=7)
|
testlist <- list(data = structure(0, .Dim = c(1L, 1L)), x = structure(c(0, 1.33091576009481e-309, 5.00368698948671e-304, 1.3545163781073e+248, 2.02822087722601e-110, 7.80639368600506e+115, 2.84878894080431e-306, 5.66569438147973e-217, 4.94433309099852e-312, 2.48588604007856e-265, 1.79809443502751e-309, 0, 2.5063231... | /distr6/inst/testfiles/C_EmpiricalMVPdf/libFuzzer_C_EmpiricalMVPdf/C_EmpiricalMVPdf_valgrind_files/1610035707-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 935 | r | testlist <- list(data = structure(0, .Dim = c(1L, 1L)), x = structure(c(0, 1.33091576009481e-309, 5.00368698948671e-304, 1.3545163781073e+248, 2.02822087722601e-110, 7.80639368600506e+115, 2.84878894080431e-306, 5.66569438147973e-217, 4.94433309099852e-312, 2.48588604007856e-265, 1.79809443502751e-309, 0, 2.5063231... |
######
# Reproducible Research
# This is the raw working file where script was developed to complete Project 1
#
#######
# Loading and preprocessing the data
#
# Show any code that is needed to
#
# 1. Load the data (i.e. read.csv())
if(!exists("activity")){
activity<-read.csv("activity.csv")
}
#
# 2. Process/tra... | /project1.R | no_license | gregrgay/RepData_PeerAssessment1 | R | false | false | 6,021 | r | ######
# Reproducible Research
# This is the raw working file where script was developed to complete Project 1
#
#######
# Loading and preprocessing the data
#
# Show any code that is needed to
#
# 1. Load the data (i.e. read.csv())
if(!exists("activity")){
activity<-read.csv("activity.csv")
}
#
# 2. Process/tra... |
Get2dBIRObj <- function(X, Y, theta, W.est, lambda){
W.est <- as.matrix(W.est)
LS <- (1/(2*nrow(X)))*sum((Y%*%Rot(theta) - as.matrix(X)%*%W.est)^2)
L0 <- (sum(sign(abs(W.est[,1])))+sum(sign(abs(W.est[,2]))))
LS + lambda*L0
} | /Functions/get_2d_BIR_obj.R | permissive | AdrienBibal/BIR | R | false | false | 235 | r | Get2dBIRObj <- function(X, Y, theta, W.est, lambda){
W.est <- as.matrix(W.est)
LS <- (1/(2*nrow(X)))*sum((Y%*%Rot(theta) - as.matrix(X)%*%W.est)^2)
L0 <- (sum(sign(abs(W.est[,1])))+sum(sign(abs(W.est[,2]))))
LS + lambda*L0
} |
# Set working directory
setwd("C:/Users/jess_chen/Dropbox/Jess-LISA/Simulations/Data/")
###################### Read Files ######################
data5 = read.csv("DATA_Local cluster_05_heter.csv")
data10 = read.csv("DATA_Local cluster_10_heter.csv")
data15 = read.csv("DATA_Local cluster_15_heter.csv")
data20 = read.c... | /CODE_Plot_Clusters.R | no_license | jesschen32/LISA | R | false | false | 2,348 | r | # Set working directory
setwd("C:/Users/jess_chen/Dropbox/Jess-LISA/Simulations/Data/")
###################### Read Files ######################
data5 = read.csv("DATA_Local cluster_05_heter.csv")
data10 = read.csv("DATA_Local cluster_10_heter.csv")
data15 = read.csv("DATA_Local cluster_15_heter.csv")
data20 = read.c... |
#### UBER ASSIGNMENT ####
#Loading the required packages
library(lubridate)
library(stringr)
library(ggplot2)
library(dplyr)
#Getting uber request data into R
Uber.Request<-read.csv("Uber Request Data.csv",stringsAsFactors = FALSE)
#Observing the structure of dataframe Uber.Requests ... | /Uber Assignment new.R | no_license | warthineha/DataScienceProjects | R | false | false | 19,083 | r | #### UBER ASSIGNMENT ####
#Loading the required packages
library(lubridate)
library(stringr)
library(ggplot2)
library(dplyr)
#Getting uber request data into R
Uber.Request<-read.csv("Uber Request Data.csv",stringsAsFactors = FALSE)
#Observing the structure of dataframe Uber.Requests ... |
#The file gene_expression.tsv downloaded from the github repository.
download.file("https://raw.githubusercontent.com/markziemann/SLE712_files/master/bioinfo_asst3_part1_files/gene_expression.tsv",
destfile = "try.tsv")
#Read the file with gene accession numbers as row numbers
a <- read.table("try.tsv", ... | /Assignment.R | no_license | nvdesilva/Assignment-Three | R | false | false | 4,914 | r | #The file gene_expression.tsv downloaded from the github repository.
download.file("https://raw.githubusercontent.com/markziemann/SLE712_files/master/bioinfo_asst3_part1_files/gene_expression.tsv",
destfile = "try.tsv")
#Read the file with gene accession numbers as row numbers
a <- read.table("try.tsv", ... |
par(mfrow=c(2,2), mar=c(4,4,2,1))
with(epc, {
plot(Global_active_power~dateTime, type="l",
ylab="Global Active Power (kilowatts)")
plot(Voltage~dateTime, type="l",
ylab="Voltage (volt)", xlab="")
plot(Sub_metering_1~dateTime, type="l",
ylab="Global Active Power (kilowatts)")
lines(Sub_m... | /plot4.R | no_license | anupkumarsahu/ExData_Plotting1 | R | false | false | 700 | r | par(mfrow=c(2,2), mar=c(4,4,2,1))
with(epc, {
plot(Global_active_power~dateTime, type="l",
ylab="Global Active Power (kilowatts)")
plot(Voltage~dateTime, type="l",
ylab="Voltage (volt)", xlab="")
plot(Sub_metering_1~dateTime, type="l",
ylab="Global Active Power (kilowatts)")
lines(Sub_m... |
# Unit tests
test_that("calckl calculates KL correctly", {
temp <- 25
sal <- 35
atemp <- 25
wspd <- 5
bp <- 1013
height <- 10
expected_KL <- 1.177
result <- round(calckl(temp, sal, atemp, wspd, bp, height), 3)
# Check if the result is equal to the expected value
expect_equal(resul... | /tests/testthat/test-calckl.R | no_license | cran/SWMPr | R | false | false | 341 | r | # Unit tests
test_that("calckl calculates KL correctly", {
temp <- 25
sal <- 35
atemp <- 25
wspd <- 5
bp <- 1013
height <- 10
expected_KL <- 1.177
result <- round(calckl(temp, sal, atemp, wspd, bp, height), 3)
# Check if the result is equal to the expected value
expect_equal(resul... |
function(input, output, session) {
# Define a reactive expression for the document term matrix
terms <- reactive({
# Change when the "update" button is pressed...
input$update
# ...but not for anything else
isolate({
withProgress({
setProgress(message = "Processing corpus..."... | /server.R | no_license | JeremyWhittier/MIS510 | R | false | false | 2,721 | r |
function(input, output, session) {
# Define a reactive expression for the document term matrix
terms <- reactive({
# Change when the "update" button is pressed...
input$update
# ...but not for anything else
isolate({
withProgress({
setProgress(message = "Processing corpus..."... |
source("../../../src/config")
library(cowplot)
load("tft-glasso.RData")
## Read files
theme_set(theme_cowplot(font_size=12)) # reduce default font size
plot.thyroid <- ggplot(plot.thyroid, aes(x = recall, y = precision, colour = type)) + geom_point(size = 0.3) +
# theme(text = element_text(size=7))+
xlab("Recall")... | /publication_figures/supp_figs/suppfig9_10/fig_tft_glasso.R | no_license | MMesbahU/networks_correction | R | false | false | 2,134 | r | source("../../../src/config")
library(cowplot)
load("tft-glasso.RData")
## Read files
theme_set(theme_cowplot(font_size=12)) # reduce default font size
plot.thyroid <- ggplot(plot.thyroid, aes(x = recall, y = precision, colour = type)) + geom_point(size = 0.3) +
# theme(text = element_text(size=7))+
xlab("Recall")... |
\name{ESummary}
\alias{ESummary}
\title{New ESummary Object}
\usage{ESummary(NCBIObject)}
\description{This function creates an object of the ESummary class and returns it.}
\value{An object of the ESummary class.}
\seealso{\code{\link[=ESummaryClass-class]{ESummaryClass}}}
\author{Martin Schumann}
\arguments{\item{NCB... | /RNCBI-0.9/R-Source/man/ESummary.Rd | no_license | MartinUndDerWolf/rncbi | R | false | false | 370 | rd | \name{ESummary}
\alias{ESummary}
\title{New ESummary Object}
\usage{ESummary(NCBIObject)}
\description{This function creates an object of the ESummary class and returns it.}
\value{An object of the ESummary class.}
\seealso{\code{\link[=ESummaryClass-class]{ESummaryClass}}}
\author{Martin Schumann}
\arguments{\item{NCB... |
#' Building a null hypothesis data
#'
#' Create a null sampling data (N times) and write them to a file
#'
#'
#' @param X The spectral dataset in the matrix format in which each row contains a single sample
#' @param groupLabel Group label of samples in the dataset
#' @param N The number of iteration for creating null ... | /R/createNullSampling.R | permissive | fenglb/speaq | R | false | false | 2,073 | r | #' Building a null hypothesis data
#'
#' Create a null sampling data (N times) and write them to a file
#'
#'
#' @param X The spectral dataset in the matrix format in which each row contains a single sample
#' @param groupLabel Group label of samples in the dataset
#' @param N The number of iteration for creating null ... |
Read.wRef <- function(ibase, iref, MissingValue) {
# read-in data from base_data_file and ref_data_file, put MissingValue as NA set several global variables as output: Nt -- total numbers of seasonal factors,
# say, monthly=12, daily=365 Icy -- catelog of seasonal factors, say, monthly 1:12 Y0 -- data vector o... | /RHtestsV4/Read.wRef.R | no_license | rijaf/CDT | R | false | false | 9,296 | r |
Read.wRef <- function(ibase, iref, MissingValue) {
# read-in data from base_data_file and ref_data_file, put MissingValue as NA set several global variables as output: Nt -- total numbers of seasonal factors,
# say, monthly=12, daily=365 Icy -- catelog of seasonal factors, say, monthly 1:12 Y0 -- data vector o... |
samp.default <- function(x, summaries=FALSE, ...) {
if (inherits(x, "Mefa")) return(x@xtab)
if (inherits(x, "mefa")) {
if (is.null(x$samp))
return(NULL) else if (summaries)
return(as.data.frame(x, fun=mss, ...)) else return(x$samp)
}
stop("not mefa class")
}
... | /mefa/R/samp.default.R | no_license | ingted/R-Examples | R | false | false | 322 | r | samp.default <- function(x, summaries=FALSE, ...) {
if (inherits(x, "Mefa")) return(x@xtab)
if (inherits(x, "mefa")) {
if (is.null(x$samp))
return(NULL) else if (summaries)
return(as.data.frame(x, fun=mss, ...)) else return(x$samp)
}
stop("not mefa class")
}
... |
#' Drop a node attribute column
#' @description Within a graph's internal NDF, remove
#' an existing node attribute.
#' @param graph a graph object of class
#' @param node_attr the name of the node attribute
#' column to drop.
#' @return a graph object of class
#' \code{dgr_graph}.
#' @examples
#' # Create a random gra... | /R/drop_node_attrs.R | no_license | timelyportfolio/DiagrammeR | R | false | false | 2,566 | r | #' Drop a node attribute column
#' @description Within a graph's internal NDF, remove
#' an existing node attribute.
#' @param graph a graph object of class
#' @param node_attr the name of the node attribute
#' column to drop.
#' @return a graph object of class
#' \code{dgr_graph}.
#' @examples
#' # Create a random gra... |
#' Raw mass spectrum proteomics log abundance for 4 pairs of technical replicates.
#' @format A data frame of 85 rows and 8 columns with missing peaks' abundance as NA.
#'
'replicates' | /R/replicates.R | no_license | cran/GMSimpute | R | false | false | 192 | r | #' Raw mass spectrum proteomics log abundance for 4 pairs of technical replicates.
#' @format A data frame of 85 rows and 8 columns with missing peaks' abundance as NA.
#'
'replicates' |
#
# RUnit tests TTR moving averages
#
# test reclass works and throws error
# test xtsAttributes, both CLASS and USER
# test all.equal(CLASS) and !all.equal(CLASS) cases
# Create input data
data(ttrc)
rownames(ttrc) <- ttrc$Date
ttrc$Date <- NULL
input <- list( all=ttrc[1:250,], top=ttrc[1:250,], mid=ttrc[1:250,] )
... | /TTR/tests/unitTests/runit.TTR.Overlays.R | no_license | codeview2/codeview | R | false | false | 1,937 | r | #
# RUnit tests TTR moving averages
#
# test reclass works and throws error
# test xtsAttributes, both CLASS and USER
# test all.equal(CLASS) and !all.equal(CLASS) cases
# Create input data
data(ttrc)
rownames(ttrc) <- ttrc$Date
ttrc$Date <- NULL
input <- list( all=ttrc[1:250,], top=ttrc[1:250,], mid=ttrc[1:250,] )
... |
# plot number of strokes per character vs year of learning the kanji
# from list on wikipedia
# https://en.wikipedia.org/wiki/Ky%C5%8Diku_kanji
library(ggplot2)
kanjidata_file = "~/git/misc-analyses/language_difficulty/data/kanji_by_school_year_1-6.txt"
kanjidata = read.table(kanjidata_file, header=TRUE, sep="\t", e... | /language_difficulty/kanji_difficulty.R | no_license | wrf/misc-analyses | R | false | false | 2,171 | r | # plot number of strokes per character vs year of learning the kanji
# from list on wikipedia
# https://en.wikipedia.org/wiki/Ky%C5%8Diku_kanji
library(ggplot2)
kanjidata_file = "~/git/misc-analyses/language_difficulty/data/kanji_by_school_year_1-6.txt"
kanjidata = read.table(kanjidata_file, header=TRUE, sep="\t", e... |
library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/stomach.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="mae",alpha=0.25,family="gaussian",standardize=FALSE)
sink('./Model/EN/ReliefF/stomach/stomach_040.txt',append... | /Model/EN/ReliefF/stomach/stomach_040.R | no_license | leon1003/QSMART | R | false | false | 356 | r | library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/stomach.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="mae",alpha=0.25,family="gaussian",standardize=FALSE)
sink('./Model/EN/ReliefF/stomach/stomach_040.txt',append... |
## The functions herein cache the inverse of a matrix.
## Matrix inversion is usually a costly computation.
## Caching matrix inversions stores the data produced by the
## matrix inversion so that we can refer to that data repeatedly without
## having to compute the inversion over and over again.
makeCacheMatrix <- fu... | /cachematrix.R | no_license | ericchoi53/ProgrammingAssignment2 | R | false | false | 2,057 | r | ## The functions herein cache the inverse of a matrix.
## Matrix inversion is usually a costly computation.
## Caching matrix inversions stores the data produced by the
## matrix inversion so that we can refer to that data repeatedly without
## having to compute the inversion over and over again.
makeCacheMatrix <- fu... |
library(fitdistrplus)
# (1) fit of two distributions by maximum likelihood estimation
# to the serving size data
# and comparison of goodness-of-fit statistics
#
data(groundbeef)
serving <- groundbeef$serving
(fitg <- fitdist(serving, "gamma"))
gg <- gofstat(fitg)
(fitln <- fitdist(serving, "lnorm"))
gn <- gofstat(f... | /tests/t-gofstat.R | no_license | frontierkodiak/fitdistrplusExperimental | R | false | false | 1,357 | r | library(fitdistrplus)
# (1) fit of two distributions by maximum likelihood estimation
# to the serving size data
# and comparison of goodness-of-fit statistics
#
data(groundbeef)
serving <- groundbeef$serving
(fitg <- fitdist(serving, "gamma"))
gg <- gofstat(fitg)
(fitln <- fitdist(serving, "lnorm"))
gn <- gofstat(f... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
#this is defineed to set a value to the matrix and c
#inverse from the cache
i <- NULL
set <- function(y) {
x <<- y # setting ... | /cachematrix.R | no_license | kgpavan/ProgrammingAssignment2 | R | false | false | 984 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
#this is defineed to set a value to the matrix and c
#inverse from the cache
i <- NULL
set <- function(y) {
x <<- y # setting ... |
#' @title durumWC
#' @description 200 sites from durum wheat collection and their world clim data.
#' @docType data
#' @usage data(durumWC)
#' @format The data includes the site unique identifier, longitude, latitude and 55 worldclim data \href{https://www.worldclim.org}{worldclim}
#'
#' @examples
#' if(interactive())... | /R/data.R | no_license | khadijaaziz/icardaFIGSr | R | false | false | 1,887 | r | #' @title durumWC
#' @description 200 sites from durum wheat collection and their world clim data.
#' @docType data
#' @usage data(durumWC)
#' @format The data includes the site unique identifier, longitude, latitude and 55 worldclim data \href{https://www.worldclim.org}{worldclim}
#'
#' @examples
#' if(interactive())... |
###########################################################################/**
# @RdocClass Arguments
#
# @title "Static class to validate and process arguments"
#
# \description{
# @classhierarchy
# }
#
# \section{Fields and Methods}{
# @allmethods
# }
#
# @author
#
# @keyword programming
#*/########################... | /R/Arguments.R | no_license | monoguerin/sears-routes | R | false | false | 46,658 | r | ###########################################################################/**
# @RdocClass Arguments
#
# @title "Static class to validate and process arguments"
#
# \description{
# @classhierarchy
# }
#
# \section{Fields and Methods}{
# @allmethods
# }
#
# @author
#
# @keyword programming
#*/########################... |
#' Rboretum Unique Clade Fetcher
#'
#' This function takes a named multiPhylo object and a focal tree, and returns clades that occur in the focal clade but not all other trees in the multiPhylo
#' @param trees Named multiPhylo object
#' @param focal_tree Name of focal tree
#' @return Character vector of clades that occ... | /R/get.uniqueClades.R | no_license | erenada/Rboretum | R | false | false | 1,734 | r | #' Rboretum Unique Clade Fetcher
#'
#' This function takes a named multiPhylo object and a focal tree, and returns clades that occur in the focal clade but not all other trees in the multiPhylo
#' @param trees Named multiPhylo object
#' @param focal_tree Name of focal tree
#' @return Character vector of clades that occ... |
\name{show_news}
\alias{show_news}
\title{Show package news...}
\usage{
show_news(pkg = NULL, latest = TRUE, ...)
}
\arguments{
\item{pkg}{package description, can be path or package
name. See \code{\link{as.package}} for more information}
\item{latest}{if \code{TRUE}, only show the news for the
most recent... | /man/show_news.Rd | no_license | BrianDiggs/devtools | R | false | false | 426 | rd | \name{show_news}
\alias{show_news}
\title{Show package news...}
\usage{
show_news(pkg = NULL, latest = TRUE, ...)
}
\arguments{
\item{pkg}{package description, can be path or package
name. See \code{\link{as.package}} for more information}
\item{latest}{if \code{TRUE}, only show the news for the
most recent... |
#Define colors
phyla.col <- c("Acidimicrobiia"="#AA4488",
"Actinobacteria" = "#DDAA77",
"Alphaproteobacteria"= "#771155",
"Bacilli"="#117744",
"Bacteroidia"= "#77AADD",
"Campylobacteria" = "#FF2222",
#"Chlamydiae"= "#DD1232" ,
... | /scripts/Color_palettes.R | no_license | Orel-N/microbiome | R | false | false | 3,601 | r |
#Define colors
phyla.col <- c("Acidimicrobiia"="#AA4488",
"Actinobacteria" = "#DDAA77",
"Alphaproteobacteria"= "#771155",
"Bacilli"="#117744",
"Bacteroidia"= "#77AADD",
"Campylobacteria" = "#FF2222",
#"Chlamydiae"= "#DD1232" ,
... |
# Downloading the data and loading it into R
if(!file.exists('data')){
dir.create('data')
}
fileUrl <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip'
download.file(fileUrl, destfile = './data/EmissionData.zip')
unzip('./data/EmissionData.zip')
NEI <- readRDS("summarySCC_PM25.rds")
SCC <... | /plot2.R | no_license | ajladz/ExploratoryDataAnalysis---CourseProject2 | R | false | false | 927 | r | # Downloading the data and loading it into R
if(!file.exists('data')){
dir.create('data')
}
fileUrl <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip'
download.file(fileUrl, destfile = './data/EmissionData.zip')
unzip('./data/EmissionData.zip')
NEI <- readRDS("summarySCC_PM25.rds")
SCC <... |
library(sf)
library(sp)
library(mapview)
library(tidyverse)
library(plotrix)
library(spatstat)
library(maptools)
library(raster)
setwd("C:/Users/Rocket/Google Drive/1.Materias/Analisis_espacial/2_Analisis_puntos")
data<-read.csv("input/crime-lat-long.csv")
str(data)
summary(data$lat)
summary(data$long)
data<-data[!i... | /2_Analisis_puntos/Script02.R | no_license | alequech/Curso-analisis-espacial2018 | R | false | false | 3,397 | r |
library(sf)
library(sp)
library(mapview)
library(tidyverse)
library(plotrix)
library(spatstat)
library(maptools)
library(raster)
setwd("C:/Users/Rocket/Google Drive/1.Materias/Analisis_espacial/2_Analisis_puntos")
data<-read.csv("input/crime-lat-long.csv")
str(data)
summary(data$lat)
summary(data$long)
data<-data[!i... |
\name{redisMove}
\alias{redisMove}
\title{
Move the specified key/value pair to another database.
}
\description{
Move the specified key/value pair in the currently selected database to
another database.
}
\usage{
redisMove(key, dbindex)
}
\arguments{
\item{key}{The key to move.}
\item{dbindex}{The destination data... | /man/redisMove.Rd | no_license | bwlewis/rredis | R | false | false | 869 | rd | \name{redisMove}
\alias{redisMove}
\title{
Move the specified key/value pair to another database.
}
\description{
Move the specified key/value pair in the currently selected database to
another database.
}
\usage{
redisMove(key, dbindex)
}
\arguments{
\item{key}{The key to move.}
\item{dbindex}{The destination data... |
library(dplyr)
library(ggplot2)
library(gridExtra)
library(rmarkdown)
library(car)
library(yhat)
library(lme4)
library(grplasso)
library(polycor)
#Columns we care about
cols = c('resident_status', 'detail_age_type', 'detail_age', 'age_recode_27',
'education_reporting_flag', 'education_2003_r... | /moratality.R | no_license | kunaalahuja/Mortality-Model | R | false | false | 13,158 | r | library(dplyr)
library(ggplot2)
library(gridExtra)
library(rmarkdown)
library(car)
library(yhat)
library(lme4)
library(grplasso)
library(polycor)
#Columns we care about
cols = c('resident_status', 'detail_age_type', 'detail_age', 'age_recode_27',
'education_reporting_flag', 'education_2003_r... |
##============ Sink warnings and errors to a file ==============
## use the sink() function to wrap all code within it.
##==============================================================
zz = file(paste0(Sys.getenv('REPORT_FILES_PATH'), '/.r_rendering.log.txt'))
sink(zz)
sink(zz, type = 'message')
#============== prepar... | /old-tools/aurora_skewer/skewer_v2.0.0/skewer_render.R | permissive | statonlab/aurora-galaxy-tools | R | false | false | 2,299 | r | ##============ Sink warnings and errors to a file ==============
## use the sink() function to wrap all code within it.
##==============================================================
zz = file(paste0(Sys.getenv('REPORT_FILES_PATH'), '/.r_rendering.log.txt'))
sink(zz)
sink(zz, type = 'message')
#============== prepar... |
#' Retrieve data from the Roswell Park Data Commons
#'
#' @rdname retrieve
#'
#' @param x An object of class `Rosy`, created and authenticated with
#' `rosy()` with subsets defined via `filter()` and `select()`.
#'
#' @param ... additional arguments; ignored.
#'
#' @return A tibble containing desired data.
#'
#' @i... | /R/retrieve.R | no_license | mtmorgan/rosy | R | false | false | 420 | r | #' Retrieve data from the Roswell Park Data Commons
#'
#' @rdname retrieve
#'
#' @param x An object of class `Rosy`, created and authenticated with
#' `rosy()` with subsets defined via `filter()` and `select()`.
#'
#' @param ... additional arguments; ignored.
#'
#' @return A tibble containing desired data.
#'
#' @i... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_single_uts_vector}
\alias{plot_single_uts_vector}
\title{Plot a uts_vector in a single plot}
\usage{
plot_single_uts_vector(x, ..., max_dt = ddays(Inf), xlab = "", ylab = "",
col = seq_along(x), lty = 1, lwd = 1, pch = 1, ... | /man/plot_single_uts_vector.Rd | no_license | yanliangs/utsMultivariate | R | false | true | 1,446 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_single_uts_vector}
\alias{plot_single_uts_vector}
\title{Plot a uts_vector in a single plot}
\usage{
plot_single_uts_vector(x, ..., max_dt = ddays(Inf), xlab = "", ylab = "",
col = seq_along(x), lty = 1, lwd = 1, pch = 1, ... |
#' DataFiltering
#' @description CountResponseFractions
#' @param data data.frame with colnames \code{response}
#' @param response chartacter, that specify name of the column that represents the output response
#' @param response.min numeric, lower bound of \code{response}, default \code{response.min = 10^(0)}
#' @para... | /R/preprocess_DataFiltering.R | no_license | stork119/SysBioSigHeterogeneity | R | false | false | 721 | r | #' DataFiltering
#' @description CountResponseFractions
#' @param data data.frame with colnames \code{response}
#' @param response chartacter, that specify name of the column that represents the output response
#' @param response.min numeric, lower bound of \code{response}, default \code{response.min = 10^(0)}
#' @para... |
# LOAD, MERGE, AND QC DATA
source("setup.R")
Mcap.ff.all$year <- ifelse(Mcap.ff.all$date < as.Date("2015-05-07"), "y1", "y2")
# # FILTER OUT COLONIES WITH <= 4 OBSERVATIONS -----
nobs <- aggregate(data.frame(obs=Mcap.ff.all$colony), by=list(colony=Mcap.ff.all$colony), FUN=length)
Mcap.ff.all <- droplevels(Mcap.ff.all... | /analysis.R | no_license | jrcunning/kbayrecov2015 | R | false | false | 28,373 | r | # LOAD, MERGE, AND QC DATA
source("setup.R")
Mcap.ff.all$year <- ifelse(Mcap.ff.all$date < as.Date("2015-05-07"), "y1", "y2")
# # FILTER OUT COLONIES WITH <= 4 OBSERVATIONS -----
nobs <- aggregate(data.frame(obs=Mcap.ff.all$colony), by=list(colony=Mcap.ff.all$colony), FUN=length)
Mcap.ff.all <- droplevels(Mcap.ff.all... |
library(Matrix)
library(caret)
library(xgboost)
library(ROCR)
url <- "https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data"
train_df <- read.csv(url, header = FALSE, na.strings = " ?")
url <- "https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.names"
decrp <- readLines(url)
na... | /example_2.R | no_license | lqyliuqingyang/class-presentation | R | false | false | 4,340 | r | library(Matrix)
library(caret)
library(xgboost)
library(ROCR)
url <- "https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data"
train_df <- read.csv(url, header = FALSE, na.strings = " ?")
url <- "https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.names"
decrp <- readLines(url)
na... |
setClass("DMNGroup", contains="SimpleList",
prototype=prototype(elementType="DMN"))
.DMNGroup <-
function(...)
{
new("DMNGroup", listData=list(...))
}
## dmngroup
dmngroup <-
function(count, group, k, ..., simplify=TRUE, .lapply=parallel::mclapply)
{
if (length(group) != nrow(count))
stop... | /R/dmngroup.R | no_license | mtmorgan/DirichletMultinomial | R | false | false | 4,155 | r | setClass("DMNGroup", contains="SimpleList",
prototype=prototype(elementType="DMN"))
.DMNGroup <-
function(...)
{
new("DMNGroup", listData=list(...))
}
## dmngroup
dmngroup <-
function(count, group, k, ..., simplify=TRUE, .lapply=parallel::mclapply)
{
if (length(group) != nrow(count))
stop... |
# Final submission
#
# Set variable for which ensemble (QRA or QA (mean))
ensemble_dir = "qra-state-ensemble" # c("qra-state-ensemble" "qra-ensemble", "quantile-average")
# Get ensemble
submit_ensemble <- suppressMessages(readr::read_csv(here::here("ensembling", ensemble_dir, "submission-files",
... | /final-submissions/update-final-submission.R | permissive | signaturescience/covid-us-forecasts | R | false | false | 5,667 | r | # Final submission
#
# Set variable for which ensemble (QRA or QA (mean))
ensemble_dir = "qra-state-ensemble" # c("qra-state-ensemble" "qra-ensemble", "quantile-average")
# Get ensemble
submit_ensemble <- suppressMessages(readr::read_csv(here::here("ensembling", ensemble_dir, "submission-files",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/focal.events.R
\name{read.genes.info.tsv}
\alias{read.genes.info.tsv}
\title{Read Biomart annotation file.}
\usage{
read.genes.info.tsv(build.file, filter.chr = NULL)
}
\arguments{
\item{build.file}{The TSV file exported from Biomart... | /man/read.genes.info.tsv.Rd | permissive | NKI-CCB/RUBIC | R | false | true | 696 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/focal.events.R
\name{read.genes.info.tsv}
\alias{read.genes.info.tsv}
\title{Read Biomart annotation file.}
\usage{
read.genes.info.tsv(build.file, filter.chr = NULL)
}
\arguments{
\item{build.file}{The TSV file exported from Biomart... |
context("Create a dust object")
fit <- lm(mpg ~ qsec + factor(am) + wt + factor(gear), data = mtcars)
test_that("Create a dust object",
{
x <- dust(fit)
expect_equal(class(x), "dust")
})
test_that("dust object has expected names",
{
x <- dust(fit)
expect_equal(names(x),
... | /pixiedust/tests/testthat/test-dust.R | no_license | ingted/R-Examples | R | false | false | 2,385 | r | context("Create a dust object")
fit <- lm(mpg ~ qsec + factor(am) + wt + factor(gear), data = mtcars)
test_that("Create a dust object",
{
x <- dust(fit)
expect_equal(class(x), "dust")
})
test_that("dust object has expected names",
{
x <- dust(fit)
expect_equal(names(x),
... |
#script to import, analyse and produce plots for prop biomass in secondary forests
#load in necessary libraries
library(RODBC)
library(ggplot2)
library(nlme)
library(lme4)
library(MuMIn)
#connect to database
sec <- odbcConnect("Secondary/Degraded forests")
sqlTables(sec)
#import proportion query
Prop<- sqlFetch(sec... | /Scripts/Shared species for presentations.R | no_license | fdbesanto2/SecFor | R | false | false | 4,351 | r | #script to import, analyse and produce plots for prop biomass in secondary forests
#load in necessary libraries
library(RODBC)
library(ggplot2)
library(nlme)
library(lme4)
library(MuMIn)
#connect to database
sec <- odbcConnect("Secondary/Degraded forests")
sqlTables(sec)
#import proportion query
Prop<- sqlFetch(sec... |
get_issues_by_date <- function(city,after = Sys.time()-86400, before = Sys.time(), status = "open,acknowledged,closed,archived", limit = 100) {
total <- 0
page <- 1
pagelimit <- min(100,limit)
after <- as.character(after,format="%Y-%m-%dT%H:%M:%SZ")
before <- as.character(before,format="%Y-%m-%dT%H:%M:%SZ")
... | /R/get_issues_by_date.R | no_license | cran/seeclickfixr | R | false | false | 5,572 | r | get_issues_by_date <- function(city,after = Sys.time()-86400, before = Sys.time(), status = "open,acknowledged,closed,archived", limit = 100) {
total <- 0
page <- 1
pagelimit <- min(100,limit)
after <- as.character(after,format="%Y-%m-%dT%H:%M:%SZ")
before <- as.character(before,format="%Y-%m-%dT%H:%M:%SZ")
... |
# Project 1, plot 2 code:
#
# Note that this script assumes that this script and the input file are in the same directory.
# Also, the code is written in Windows Operating System through RStudio hence windows()
# graphics device is utilized to plot the figures on screen.
#
# Step: Record date and R version:
(Download... | /plot2.R | no_license | zikribayraktar/ExData_Plotting1 | R | false | false | 1,590 | r |
# Project 1, plot 2 code:
#
# Note that this script assumes that this script and the input file are in the same directory.
# Also, the code is written in Windows Operating System through RStudio hence windows()
# graphics device is utilized to plot the figures on screen.
#
# Step: Record date and R version:
(Download... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_data_one_iso.R
\name{plot_data_one_iso}
\alias{plot_data_one_iso}
\title{Plot biotracer data (1-D)}
\usage{
plot_data_one_iso(mix, source, discr, filename, plot_save_pdf, plot_save_png)
}
\arguments{
\item{mix}{output from \code{\link{lo... | /man/plot_data_one_iso.Rd | no_license | izabelabujak/MixSIAR | R | false | true | 1,459 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_data_one_iso.R
\name{plot_data_one_iso}
\alias{plot_data_one_iso}
\title{Plot biotracer data (1-D)}
\usage{
plot_data_one_iso(mix, source, discr, filename, plot_save_pdf, plot_save_png)
}
\arguments{
\item{mix}{output from \code{\link{lo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/url.R
\name{update_seafile_url}
\alias{update_seafile_url}
\title{Update seafile URL}
\usage{
update_seafile_url()
}
\description{
update the seafile api url
}
| /man/update_seafile_url.Rd | no_license | VincentGuyader/seafile | R | false | true | 249 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/url.R
\name{update_seafile_url}
\alias{update_seafile_url}
\title{Update seafile URL}
\usage{
update_seafile_url()
}
\description{
update the seafile api url
}
|
getFlights <- function(status = c("ankunft", "abflug"),
hour = formatC(c(0, 3:11 * 2), flag = "0", width = 2, format = "d")) {
stopifnot(require("XML"))
status <- match.arg(status)
hour <- match.arg(hour, several.ok = TRUE)
URLs <- switch(status,
"ankunft" = paste("http://www.munich-airport.de/de... | /MUCflights/R/getFlights.R | no_license | ingted/R-Examples | R | false | false | 1,585 | r |
getFlights <- function(status = c("ankunft", "abflug"),
hour = formatC(c(0, 3:11 * 2), flag = "0", width = 2, format = "d")) {
stopifnot(require("XML"))
status <- match.arg(status)
hour <- match.arg(hour, several.ok = TRUE)
URLs <- switch(status,
"ankunft" = paste("http://www.munich-airport.de/de... |
#setwd("~/Desktop/PSM/Spring 2019/Multivariate-Stats/Project")
#Make my n=2 dimenstional data/hypershpere image
library(plotrix)
p1=data.frame(x=double(),y=double()) #Points
names(p1)=c("X", "Y")
while(dim(p1)[1]<200){ #Get 200 points for the first bubble by making circle
x=runif(1, min=-1, max=1)
y=runif(1, min=... | /Project/ALL FILES/Clustering.R | no_license | justinhood/Multivariate-Stats | R | false | false | 5,637 | r | #setwd("~/Desktop/PSM/Spring 2019/Multivariate-Stats/Project")
#Make my n=2 dimenstional data/hypershpere image
library(plotrix)
p1=data.frame(x=double(),y=double()) #Points
names(p1)=c("X", "Y")
while(dim(p1)[1]<200){ #Get 200 points for the first bubble by making circle
x=runif(1, min=-1, max=1)
y=runif(1, min=... |
## Take in data and create a pomp object for each individual # ---------------------------------------------------
make_pomp_panel <- function(i, infection_data = data, times_data = times, covariates = covartable, n_cov = n_covariates, test_params = guess, rprocess = rprocess_homologous_immunity, init = init_homologous... | /Inference/homologous_immunity_model/data_processing/make_one_panel_pomp_unit.R | no_license | jabogaards/HPV-model | R | false | false | 1,794 | r | ## Take in data and create a pomp object for each individual # ---------------------------------------------------
make_pomp_panel <- function(i, infection_data = data, times_data = times, covariates = covartable, n_cov = n_covariates, test_params = guess, rprocess = rprocess_homologous_immunity, init = init_homologous... |
library(MXM)
### Name: Conditional independence test for longitudinal and clustered data using GLMM
### Title: Linear mixed models conditional independence test for
### longitudinal class variables
### Aliases: testIndGLMMReg testIndGLMMLogistic testIndGLMMPois
### testIndGLMMGamma testIndGLMMNormLog testIndGLMMO... | /data/genthat_extracted_code/MXM/examples/testIndGLMMReg.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 652 | r | library(MXM)
### Name: Conditional independence test for longitudinal and clustered data using GLMM
### Title: Linear mixed models conditional independence test for
### longitudinal class variables
### Aliases: testIndGLMMReg testIndGLMMLogistic testIndGLMMPois
### testIndGLMMGamma testIndGLMMNormLog testIndGLMMO... |
#### Utility for TR pattern and flanking MH identification
#### This utility requires the genome utility clousure
# sequence identity below this threshold will be denied
consensus_thresh <- 0.75
consensus_lower <- 0.5
# consensus_thresh <- 0.3
# consensus_lower <- 0.5
# 4 bases
bases <- c("A", "C", "G", "T")
# this f... | /reference_genome_TRs/code/tr_util.R | no_license | SarahChen0401/MicroHomologyMediatedTandemDuplications | R | false | false | 8,943 | r | #### Utility for TR pattern and flanking MH identification
#### This utility requires the genome utility clousure
# sequence identity below this threshold will be denied
consensus_thresh <- 0.75
consensus_lower <- 0.5
# consensus_thresh <- 0.3
# consensus_lower <- 0.5
# 4 bases
bases <- c("A", "C", "G", "T")
# this f... |
Annotationbychemical_IDschild <-
function(adduct_index=NA,dataA,queryadductlist=c("M+H"),adduct_table,max.mz.diff=10,outloc, otherdbs=FALSE,otherinfo=FALSE,keggCompMZ){
#load("~/Documents/Emory/JonesLab/Projects/xMSannotator/keggCompMZ.Rda")
dataA<-as.data.frame(dataA)
adduct_names<-as.character(adduct_table[,1])
... | /R/Annotationbychemical_IDschild.R | no_license | jaspershen/MSannotator | R | false | false | 6,407 | r | Annotationbychemical_IDschild <-
function(adduct_index=NA,dataA,queryadductlist=c("M+H"),adduct_table,max.mz.diff=10,outloc, otherdbs=FALSE,otherinfo=FALSE,keggCompMZ){
#load("~/Documents/Emory/JonesLab/Projects/xMSannotator/keggCompMZ.Rda")
dataA<-as.data.frame(dataA)
adduct_names<-as.character(adduct_table[,1])
... |
library(RInno)
library(dplyr)
library(magrittr)
depends = c("googledrive",
'magrittr',
'dplyr',
'diceSyntax',
'purrr',
'ogbox',
'glue',
'shiny',
'shinythemes',
'shinyjs',
'shinyWidgets',
'... | /appBuilder.R | no_license | chsims1/5eInteractiveSheet | R | false | false | 2,147 | r | library(RInno)
library(dplyr)
library(magrittr)
depends = c("googledrive",
'magrittr',
'dplyr',
'diceSyntax',
'purrr',
'ogbox',
'glue',
'shiny',
'shinythemes',
'shinyjs',
'shinyWidgets',
'... |
#example using mapply for noise function
noise <- function(n,mean_s,std_s){
rnorm(n,mean_s,std_s)
}
different_noises_fixed_std <- function(listn,listmean,std_s){
mapply(noise,listn,listmean,std_s)
} | /Rprogramming.dir/Week3.dir/lesson_3_mapply.r | no_license | hhorus/dataAnalysisCoursera | R | false | false | 204 | r | #example using mapply for noise function
noise <- function(n,mean_s,std_s){
rnorm(n,mean_s,std_s)
}
different_noises_fixed_std <- function(listn,listmean,std_s){
mapply(noise,listn,listmean,std_s)
} |
source('populateNewDirectory2.R')
source('makeNewFolder.R')
source('makeLink.R')
source('crawlSynapseObject.R')
source('makeHeadFolder.R')
#crawl folderA in projectD
synObj <- crawlSynapseObject('syn3157162')
synObj <- makeHeadFolder(synObj,'syn3157162')
populateNewDirectory2('syn3157160',synObj,topId = 'syn3157160')
| /RFunctions/testMigration.R | no_license | alma2moon434/ampAdScripts | R | false | false | 320 | r | source('populateNewDirectory2.R')
source('makeNewFolder.R')
source('makeLink.R')
source('crawlSynapseObject.R')
source('makeHeadFolder.R')
#crawl folderA in projectD
synObj <- crawlSynapseObject('syn3157162')
synObj <- makeHeadFolder(synObj,'syn3157162')
populateNewDirectory2('syn3157160',synObj,topId = 'syn3157160')
|
rm(list = ls())
library(leaflet)
library(leaflet.extras)
library(leaflet.minicharts)
library(sf)
library(dplyr)
library(tidyr)
setwd(setwd('C:/Users/REACH/Dropbox (SSD REACH)/REACH South Sudan upscale/34_WFP/11_WFP_IACWG'))
disputed <- st_read('8. Dashboard/r_dashboard/app_plot/Disputed/SSD_Undetermined.s... | /app_plot/4_Practice/script.R | no_license | JonathanBuckleyREACHSSD/SSD-JMMI-Draft | R | false | false | 2,786 | r | rm(list = ls())
library(leaflet)
library(leaflet.extras)
library(leaflet.minicharts)
library(sf)
library(dplyr)
library(tidyr)
setwd(setwd('C:/Users/REACH/Dropbox (SSD REACH)/REACH South Sudan upscale/34_WFP/11_WFP_IACWG'))
disputed <- st_read('8. Dashboard/r_dashboard/app_plot/Disputed/SSD_Undetermined.s... |
H<-matrix(readBin("histograms.bin", "double", 640000), 40000, 16)
# add small constant to empty bins
eps<-0.01
index<-which(H==0,arr.ind=TRUE)
for (i in 1:dim(index)[1]){
H[index[i,1],index[i,2]]<-eps
}
# parameters
k_1<-3
k_2<-4
k_3<-5
# EM algorithm
MultinomialEM<-function(H,k,t){
n<-dim(H)[1]
d<-dim(H)[2]
H<-... | /em.R | no_license | Shemster/machine-learning | R | false | false | 1,085 | r | H<-matrix(readBin("histograms.bin", "double", 640000), 40000, 16)
# add small constant to empty bins
eps<-0.01
index<-which(H==0,arr.ind=TRUE)
for (i in 1:dim(index)[1]){
H[index[i,1],index[i,2]]<-eps
}
# parameters
k_1<-3
k_2<-4
k_3<-5
# EM algorithm
MultinomialEM<-function(H,k,t){
n<-dim(H)[1]
d<-dim(H)[2]
H<-... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/configure.R
\name{configure_get}
\alias{configure_get}
\title{Get a config setting}
\usage{
configure_get(varname)
}
| /man/configure_get.Rd | permissive | mmuurr/awscli | R | false | true | 195 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/configure.R
\name{configure_get}
\alias{configure_get}
\title{Get a config setting}
\usage{
configure_get(varname)
}
|
# Define ko_pep
ko_pep <- ko / pep
# Make a time series plot of ko_pep
plot.zoo(ko_pep)
# Add as a reference, a horizontal line at 1
abline(h = 1)
# Define the vector values
values <- c(4000, 4000, 2000)
# Define the vector weights
weights <- values / sum(values)
# Print the resulting weights
print(weights)
# De... | /portfolio.analysis_01/01 - building.blocks/01 - intro.R | no_license | aliawaischeema/DataCamp | R | false | false | 1,188 | r | # Define ko_pep
ko_pep <- ko / pep
# Make a time series plot of ko_pep
plot.zoo(ko_pep)
# Add as a reference, a horizontal line at 1
abline(h = 1)
# Define the vector values
values <- c(4000, 4000, 2000)
# Define the vector weights
weights <- values / sum(values)
# Print the resulting weights
print(weights)
# De... |
##############################################################################
# #
# PAYOFF MATRIX FOR THE QUANTUM BATTLE OF THE SEXES GAME #
# #
####... | /R/PayoffMatrix_QBOS.R | permissive | indrag49/QGameTheory | R | false | false | 1,701 | r | ##############################################################################
# #
# PAYOFF MATRIX FOR THE QUANTUM BATTLE OF THE SEXES GAME #
# #
####... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualize.R
\name{TCGAvisualize_SurvivalCoxNET}
\alias{TCGAvisualize_SurvivalCoxNET}
\title{Survival analysis with univariate Cox regression package (dnet)}
\usage{
TCGAvisualize_SurvivalCoxNET(
clinical_patient,
dataGE,
Genelist,
org... | /man/TCGAvisualize_SurvivalCoxNET.Rd | no_license | BioinformaticsFMRP/TCGAbiolinks | R | false | true | 3,290 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualize.R
\name{TCGAvisualize_SurvivalCoxNET}
\alias{TCGAvisualize_SurvivalCoxNET}
\title{Survival analysis with univariate Cox regression package (dnet)}
\usage{
TCGAvisualize_SurvivalCoxNET(
clinical_patient,
dataGE,
Genelist,
org... |
#' @title Spatial Variance Inflation Factor
#'
#' @description Calculate the VIF
#'
#' @param base_model model to use as comparison.
#' @param model model to compare.
#'
#' @return res data.frame with VIF for fixed parameters
#'
#' @export
SVIF <- function(base_model, model) {
fixed_names <- rownames(base_model$summ... | /R/utils.R | no_license | bandyopd/RASCO | R | false | false | 9,442 | r | #' @title Spatial Variance Inflation Factor
#'
#' @description Calculate the VIF
#'
#' @param base_model model to use as comparison.
#' @param model model to compare.
#'
#' @return res data.frame with VIF for fixed parameters
#'
#' @export
SVIF <- function(base_model, model) {
fixed_names <- rownames(base_model$summ... |
data_proc_africa <- function(outputdir){
# LOAD REQUIRED PACKAGES AND FUNCTIONS -----------------------------------------
if (!require("pacman")) install.packages("pacman")
pkgs = c("dplyr", "sf","sp") # package names
pacman::p_load(pkgs, character.only = T)
# LOAD DATA ----------------------------------------... | /01_data-processing.R | no_license | Jacob-Snyder/chicas-stsmodel | R | false | false | 5,088 | r | data_proc_africa <- function(outputdir){
# LOAD REQUIRED PACKAGES AND FUNCTIONS -----------------------------------------
if (!require("pacman")) install.packages("pacman")
pkgs = c("dplyr", "sf","sp") # package names
pacman::p_load(pkgs, character.only = T)
# LOAD DATA ----------------------------------------... |
library(data.table); library(dplyr)
# load required dataset
nv <- readRDS("9 net value.rds")
# Net value before standardisation
mean(nv$nv_50k)
mean(nv$nv_100k)
mean(nv$nv_200k)
# classify participants by age groups and gender
df <- mutate(nv, group = cut(age, breaks=c(seq(from = 14, to = 84, by = 5), Inf... | /10 Age and sex standardisation.R | no_license | janetltk/dm-net-value | R | false | false | 2,214 | r | library(data.table); library(dplyr)
# load required dataset
nv <- readRDS("9 net value.rds")
# Net value before standardisation
mean(nv$nv_50k)
mean(nv$nv_100k)
mean(nv$nv_200k)
# classify participants by age groups and gender
df <- mutate(nv, group = cut(age, breaks=c(seq(from = 14, to = 84, by = 5), Inf... |
#' Continuum removal by removing the convex hull
#'
#' This function applies a linearly interpolated convex hull to the spectra and returns the ratio of the deviation to the hull value
#'
#' @param spectra a matrix or data.frame with wavelengths as columns and spectra as rows
#' @export
chBLC <- function(spectra){
... | /R/chBLC.R | no_license | mmbaye/spectroscopy | R | false | false | 1,287 | r | #' Continuum removal by removing the convex hull
#'
#' This function applies a linearly interpolated convex hull to the spectra and returns the ratio of the deviation to the hull value
#'
#' @param spectra a matrix or data.frame with wavelengths as columns and spectra as rows
#' @export
chBLC <- function(spectra){
... |
# Global ------------------------------------------------------------------
library(shiny)
library(shinymanager)
# data.frame with credentials info
credentials <- data.frame(
user = c("fanny", "victor", "benoit"),
password = c("azerty", "12345", "azerty"),
comment = c("alsace", "auvergne", "bretagne"),
app... | /dev/shiny-sqlite/global.R | no_license | abhik1368/shinymanager | R | false | false | 672 | r |
# Global ------------------------------------------------------------------
library(shiny)
library(shinymanager)
# data.frame with credentials info
credentials <- data.frame(
user = c("fanny", "victor", "benoit"),
password = c("azerty", "12345", "azerty"),
comment = c("alsace", "auvergne", "bretagne"),
app... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elementApi.r
\name{element$createElement}
\alias{element$createElement}
\title{Create a child element.}
\arguments{
\item{webId}{The ID of the parent element on which to create the element.}
\item{piElement}{The new element definition.}
}
\v... | /man/element-cash-createElement.Rd | permissive | aj9253/PI-Web-API-Client-R | R | false | true | 450 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/elementApi.r
\name{element$createElement}
\alias{element$createElement}
\title{Create a child element.}
\arguments{
\item{webId}{The ID of the parent element on which to create the element.}
\item{piElement}{The new element definition.}
}
\v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check4Gaps.R
\name{check4Gaps}
\alias{check4Gaps}
\title{Check for Discontinuities (Gaps) in a Vector & Optionally Make a Plot}
\usage{
check4Gaps(x, y = NULL, silent = FALSE, tol = NULL, ...)
}
\arguments{
\item{x}{A numeric vector to be che... | /man/check4Gaps.Rd | no_license | Tejasvigupta/ChemoSpecUtils | R | false | true | 2,619 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check4Gaps.R
\name{check4Gaps}
\alias{check4Gaps}
\title{Check for Discontinuities (Gaps) in a Vector & Optionally Make a Plot}
\usage{
check4Gaps(x, y = NULL, silent = FALSE, tol = NULL, ...)
}
\arguments{
\item{x}{A numeric vector to be che... |
# Correlation
# Prepare the Data
mydata <- mtcars[, c(1,3,4,5,6,7)]
head(mydata)
# Compute the correlation matrix - cor()
cormat <- round(cor(mydata),2)
head(cormat)
# Create the correlation heatmap with ggplot2
# The package reshape is required to melt the correlation matrix.
library(reshape2)
melted_c... | /5.2 DSA - R - EDA -Correlation Heatmap - 6 Dec 2020.R | no_license | sridhar-v/R-Codes | R | false | false | 4,125 | r | # Correlation
# Prepare the Data
mydata <- mtcars[, c(1,3,4,5,6,7)]
head(mydata)
# Compute the correlation matrix - cor()
cormat <- round(cor(mydata),2)
head(cormat)
# Create the correlation heatmap with ggplot2
# The package reshape is required to melt the correlation matrix.
library(reshape2)
melted_c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SwarnTopTags.R
\name{SwarnTopTags}
\alias{SwarnTopTags}
\title{This function selects the top genes in scRNA-seq data.}
\usage{
SwarnTopTags(results, m)
}
\arguments{
\item{results}{A output data frame from \code{SwarnSeqLRT} or \code{SwarnUna... | /man/SwarnTopTags.Rd | no_license | sam-uofl/SwarnSeq | R | false | true | 1,810 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SwarnTopTags.R
\name{SwarnTopTags}
\alias{SwarnTopTags}
\title{This function selects the top genes in scRNA-seq data.}
\usage{
SwarnTopTags(results, m)
}
\arguments{
\item{results}{A output data frame from \code{SwarnSeqLRT} or \code{SwarnUna... |
## Matrix inversion is usually a costly computation and there may be some
## benefit to caching the inverse of a matrix rather than compute it repeatedly.
## stores a matrix and caches its inverse.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()... | /cachematrix.R | no_license | rtodoc/ProgrammingAssignment2 | R | false | false | 1,105 | r | ## Matrix inversion is usually a costly computation and there may be some
## benefit to caching the inverse of a matrix rather than compute it repeatedly.
## stores a matrix and caches its inverse.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()... |
#' @keywords internal
.pkgSnapshot <- function(instPkgs, instVers, packageVersionFile = "._packageVersionsAuto.txt") {
browser(expr = exists("aaaa"))
inst <- data.frame(instPkgs, instVers = unlist(instVers), stringsAsFactors = FALSE)
write.table(inst, file = packageVersionFile, row.names = FALSE)
inst
}
#' @im... | /R/helpers.R | no_license | mdsumner/reproducible | R | false | false | 8,067 | r | #' @keywords internal
.pkgSnapshot <- function(instPkgs, instVers, packageVersionFile = "._packageVersionsAuto.txt") {
browser(expr = exists("aaaa"))
inst <- data.frame(instPkgs, instVers = unlist(instVers), stringsAsFactors = FALSE)
write.table(inst, file = packageVersionFile, row.names = FALSE)
inst
}
#' @im... |
testlist <- list(a = 1684825385L, b = 676545880L, x = NA_integer_)
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610388256-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 127 | r | testlist <- list(a = 1684825385L, b = 676545880L, x = NA_integer_)
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
#
# test-subset_dfdates.R
# ----------------------
#
# Test suite for testing function subset_dfdates
#
#
context("Testing function: subset_dfdates()")
library(testthat)
test_that("Testing basic functionality", {
library(testthat)
library(mlStocks)
df = Earnings[, c(1,2,13)]
timeframe = "2011-01-03/201... | /tests/testthat/test-subset_dfdates.R | no_license | jeanmarcgp/mlStocks | R | false | false | 2,347 | r | #
# test-subset_dfdates.R
# ----------------------
#
# Test suite for testing function subset_dfdates
#
#
context("Testing function: subset_dfdates()")
library(testthat)
test_that("Testing basic functionality", {
library(testthat)
library(mlStocks)
df = Earnings[, c(1,2,13)]
timeframe = "2011-01-03/201... |
library("neuRosim")
# Valeurs constantes
dim <- c(53,63,46)
nscan <- 421
TR <- 2
total.time <- nscan * TR
onsets.F <- c((10:30),(100:120),(160:180),(190:210),(250:270),(280:300),(400:420))*TR #
onsets.H <- c((40:60),(70:90),(130:150),(220:240),(310:330),(340:360),(370:390))*TR #
lis<-(1:nscan)
event<-lis
event[lis]<-'... | /SimulationR/neuRosim_loop_haxby.R | no_license | brain-bzh/gsp-learn | R | false | false | 4,268 | r | library("neuRosim")
# Valeurs constantes
dim <- c(53,63,46)
nscan <- 421
TR <- 2
total.time <- nscan * TR
onsets.F <- c((10:30),(100:120),(160:180),(190:210),(250:270),(280:300),(400:420))*TR #
onsets.H <- c((40:60),(70:90),(130:150),(220:240),(310:330),(340:360),(370:390))*TR #
lis<-(1:nscan)
event<-lis
event[lis]<-'... |
#' @title Print \code{'gainstable'} Object
#'
#' @description S3 print method to print \code{"gainstable"} object.
#'
#'
#' @param x An object of class \code{"gainstable"}, created with either
#' \code{\link{gainstable.default}} or \code{\link{gainstable.rocit}}.
#'
#' @param maxdigit How many digits after deci... | /R/printGainsTable.R | no_license | cran/ROCit | R | false | false | 1,479 | r | #' @title Print \code{'gainstable'} Object
#'
#' @description S3 print method to print \code{"gainstable"} object.
#'
#'
#' @param x An object of class \code{"gainstable"}, created with either
#' \code{\link{gainstable.default}} or \code{\link{gainstable.rocit}}.
#'
#' @param maxdigit How many digits after deci... |
%%
%% WARNING! DO NOT EDIT!
%% This file is automatically generated from pc-gammacount.R
%%
\name{pc.gammacount}
\alias{inla.pc.gammacount}
\alias{pc.gammacount}
\alias{pc.rgammacount}
\alias{inla.pc.rgammacount}
\alias{pc.dgammacount}
\alias{inla.pc.dgammacount}
\alias{pc.pgammacount}
\alias{inla.pc.pgammacou... | /man/pc-gammacount.Rd | no_license | jdsimkin04/shinyinla | R | false | false | 1,727 | rd | %%
%% WARNING! DO NOT EDIT!
%% This file is automatically generated from pc-gammacount.R
%%
\name{pc.gammacount}
\alias{inla.pc.gammacount}
\alias{pc.gammacount}
\alias{pc.rgammacount}
\alias{inla.pc.rgammacount}
\alias{pc.dgammacount}
\alias{inla.pc.dgammacount}
\alias{pc.pgammacount}
\alias{inla.pc.pgammacou... |
conc.fun <-function(sample_data, standard_coeffs, chamber_volumes, directory, gas, print=FALSE){
#Note: edited on 8/28/15 to include a fixed standard coefficient slope and intercept
collar_surface_area <- 0.064 #meters
std_curve_nums <- unique(standard_coeffs$Std_Curve_Num)
for(j in 1:nrow(sample_data)) {
sam... | /conc.fun.R | no_license | SoilWaterLab/Septic-GHGs | R | false | false | 755 | r | conc.fun <-function(sample_data, standard_coeffs, chamber_volumes, directory, gas, print=FALSE){
#Note: edited on 8/28/15 to include a fixed standard coefficient slope and intercept
collar_surface_area <- 0.064 #meters
std_curve_nums <- unique(standard_coeffs$Std_Curve_Num)
for(j in 1:nrow(sample_data)) {
sam... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visNetworkEditor.R
\name{visNetworkEditor-module}
\alias{visNetworkEditor-module}
\alias{visNetworkEditorServer}
\alias{visNetworkEditorUI}
\title{Module shiny for visualize and customize and get back a \code{visNetwork} object.
Using ... | /man/visNetworkEditor-module.Rd | no_license | 42-Discworld/visNetwork | R | false | true | 1,901 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visNetworkEditor.R
\name{visNetworkEditor-module}
\alias{visNetworkEditor-module}
\alias{visNetworkEditorServer}
\alias{visNetworkEditorUI}
\title{Module shiny for visualize and customize and get back a \code{visNetwork} object.
Using ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/breakpoint.density.r
\docType{class}
\name{breaks-class}
\alias{breaks-class}
\alias{breaks}
\title{Class to store breakpoint annotations in association with genomic features (e.g. gene loci)}
\arguments{
\item{breaks}{(data.table): the break... | /man/breaks-class.Rd | no_license | gonzolgarcia/svpluscnv | R | false | true | 895 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/breakpoint.density.r
\docType{class}
\name{breaks-class}
\alias{breaks-class}
\alias{breaks}
\title{Class to store breakpoint annotations in association with genomic features (e.g. gene loci)}
\arguments{
\item{breaks}{(data.table): the break... |
RDA2
A
2
133632
131840
1026
1
9
5
times
13
500
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
... | /Outputs/Modelrun_20110413_134157.R | no_license | Sandy4321/Tree-Death-Physiological-Models | R | false | false | 2,896 | r | RDA2
A
2
133632
131840
1026
1
9
5
times
13
500
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{binMin}
\alias{binMin}
\title{Function that computes a minimum value for each bin}
\usage{
binMin(x, n)
}
\arguments{
\item{x}{NumericVector - vector of values of a bin}
\item{n}{intiger - number of bins}
}
\description{
... | /man/binMin.Rd | no_license | alexg9010/genomation | R | false | true | 393 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{binMin}
\alias{binMin}
\title{Function that computes a minimum value for each bin}
\usage{
binMin(x, n)
}
\arguments{
\item{x}{NumericVector - vector of values of a bin}
\item{n}{intiger - number of bins}
}
\description{
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/num-rpd.R
\name{rpd}
\alias{rpd}
\alias{rpd.data.frame}
\alias{rpd_vec}
\title{Ratio of performance to deviation}
\usage{
rpd(data, ...)
\method{rpd}{data.frame}(data, truth, estimate, na_rm = TRUE, ...)
rpd_vec(truth, estimate, na_rm = TRU... | /man/rpd.Rd | no_license | jyuu/yardstick | R | false | true | 4,176 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/num-rpd.R
\name{rpd}
\alias{rpd}
\alias{rpd.data.frame}
\alias{rpd_vec}
\title{Ratio of performance to deviation}
\usage{
rpd(data, ...)
\method{rpd}{data.frame}(data, truth, estimate, na_rm = TRUE, ...)
rpd_vec(truth, estimate, na_rm = TRU... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_umap.R
\name{pal_ggplot}
\alias{pal_ggplot}
\title{UMAP Palette using ggplot2 colors}
\usage{
pal_ggplot(object, group_col, jitter = TRUE, comp = 3, alpha = 0.7)
}
\arguments{
\item{comp}{integer setting the color complementarity to be u... | /man/pal_ggplot.Rd | no_license | dbrookeUAB/dbsinglecell | R | false | true | 377 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_umap.R
\name{pal_ggplot}
\alias{pal_ggplot}
\title{UMAP Palette using ggplot2 colors}
\usage{
pal_ggplot(object, group_col, jitter = TRUE, comp = 3, alpha = 0.7)
}
\arguments{
\item{comp}{integer setting the color complementarity to be u... |
cols = 40
rows = 36
ncls.grid = 20
ncls.hour = 6
ncls.ia.h.g=-1
ncls.ia.h.l=-1
ncls.ia.h.w=-1
ncls.ia.g.l=-1
ncls.ia.g.w=-1
ncls.ia.l.w=-1
ncls.ia.h.g.l=-1
ncls.ia.h.g.w=-1
ncls.ia.h.l.w=-1
ncls.ia.g.l.w=-1
ncls.ia.h.g.l.w = -1
job.id = 3
job.group.id = 11
regression.formula = paste("cate... | /Proj-Experiment/201411-predictability(CEUS)/experiments-3/JOB3/configs.R | no_license | almatrix/work-RProject | R | false | false | 785 | r | cols = 40
rows = 36
ncls.grid = 20
ncls.hour = 6
ncls.ia.h.g=-1
ncls.ia.h.l=-1
ncls.ia.h.w=-1
ncls.ia.g.l=-1
ncls.ia.g.w=-1
ncls.ia.l.w=-1
ncls.ia.h.g.l=-1
ncls.ia.h.g.w=-1
ncls.ia.h.l.w=-1
ncls.ia.g.l.w=-1
ncls.ia.h.g.l.w = -1
job.id = 3
job.group.id = 11
regression.formula = paste("cate... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/move.R
\name{adjacted_move}
\alias{adjacted_move}
\title{Create adjacent movement matrix}
\usage{
adjacted_move(n_rows, n_cols, prob)
}
\arguments{
\item{n_rows}{number of rows in population matrix}
\item{n_cols}{number of columns in populat... | /man/adjacted_move.Rd | no_license | AustralianAntarcticDivision/tagsim | R | false | true | 445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/move.R
\name{adjacted_move}
\alias{adjacted_move}
\title{Create adjacent movement matrix}
\usage{
adjacted_move(n_rows, n_cols, prob)
}
\arguments{
\item{n_rows}{number of rows in population matrix}
\item{n_cols}{number of columns in populat... |
# get current directory to script folder
script.directory <- dirname(sys.frame(1)$ofile)
download_dataset <- function() {
# download file
assignment_file <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
assignment_dest_file <- "assignment.zip"
# downloading file
... | /run_analysis.R | no_license | rfribeiro/GettingAndCleaningDataCourseProject | R | false | false | 5,008 | r | # get current directory to script folder
script.directory <- dirname(sys.frame(1)$ofile)
download_dataset <- function() {
# download file
assignment_file <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
assignment_dest_file <- "assignment.zip"
# downloading file
... |
## this file allows for a cached retrieval of an inverted matrix.
## creates an object representing a matrix with an precomputed inverted matrix.
makeCacheMatrix <- function(m = matrix()) {
mi <- NULL
set <- function(y) {
m <<- y
mi <<- NULL
}
get <- function() m
setinverse <- function(inverse) mi <... | /cachematrix.R | no_license | netchkin/ProgrammingAssignment2 | R | false | false | 789 | r | ## this file allows for a cached retrieval of an inverted matrix.
## creates an object representing a matrix with an precomputed inverted matrix.
makeCacheMatrix <- function(m = matrix()) {
mi <- NULL
set <- function(y) {
m <<- y
mi <<- NULL
}
get <- function() m
setinverse <- function(inverse) mi <... |
# Script para agrupar as curvas de carga com observações a cada 10 minutos, dentro de 1 dia (144 observações).
source("data_houses_10minutes.R") # Dados já normalizados
# Gráficos das 20 casas
gg1 <- ggplot() +
geom_line(data = dayHouse1, aes(x = Time, y = Aggregate, group = 1)) +
xlab('Date') + ylab('Power') +... | /Consumption_Profile_REFIT/Scripts/results_1_day_10_min.R | no_license | HarllanAndrye/EnergyEfficiency-clustering- | R | false | false | 17,388 | r | # Script para agrupar as curvas de carga com observações a cada 10 minutos, dentro de 1 dia (144 observações).
source("data_houses_10minutes.R") # Dados já normalizados
# Gráficos das 20 casas
gg1 <- ggplot() +
geom_line(data = dayHouse1, aes(x = Time, y = Aggregate, group = 1)) +
xlab('Date') + ylab('Power') +... |
install_learners("classif.liblinearl1l2svc")
test_that("autotest", {
learner = LearnerClassifLiblineaRL1L2SVC$new()
expect_learner(learner)
result = run_autotest(learner)
expect_true(result, info = result$error)
})
| /tests/testthat/test_LiblineaR_classif_liblinearl1l2svc.R | no_license | 0livier1O1/mlr3extralearners | R | false | false | 224 | r | install_learners("classif.liblinearl1l2svc")
test_that("autotest", {
learner = LearnerClassifLiblineaRL1L2SVC$new()
expect_learner(learner)
result = run_autotest(learner)
expect_true(result, info = result$error)
})
|
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252179844e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615784318-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 329 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252179844e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... |
##investment
data_csv <- read.csv("C:/Users/Huhu/Downloads/data_csv.csv", stringsAsFactors = FALSE)
head(data_csv)
# Doing stuff with dates:
# Reformatting the dates to make it readable by the system.
data_csv$ID <- seq.int(nrow(data_csv))
data_csv$Date[1513]
# S&P 500 was started in 1923; prior history is f... | /src/investment.R | permissive | tamarakatic/financial-prediction | R | false | false | 3,032 | r | ##investment
data_csv <- read.csv("C:/Users/Huhu/Downloads/data_csv.csv", stringsAsFactors = FALSE)
head(data_csv)
# Doing stuff with dates:
# Reformatting the dates to make it readable by the system.
data_csv$ID <- seq.int(nrow(data_csv))
data_csv$Date[1513]
# S&P 500 was started in 1923; prior history is f... |
meshRatio <- function(design){
#----------------------------------
# Compute the meshratio criterion
# For a regular mesh, ratio=1
# input : design of n experiments
# Example : Meshratio(matrix(runif(40),20,2))
#----------------------------------
X <- as.matrix(design)
n <- dim(X)[1]
dimension <- dim(X)[2]
... | /A_github/sources/authors/2765/DiceDesign/meshRatio.R | no_license | Irbis3/crantasticScrapper | R | false | false | 1,329 | r | meshRatio <- function(design){
#----------------------------------
# Compute the meshratio criterion
# For a regular mesh, ratio=1
# input : design of n experiments
# Example : Meshratio(matrix(runif(40),20,2))
#----------------------------------
X <- as.matrix(design)
n <- dim(X)[1]
dimension <- dim(X)[2]
... |
#postscript("indicators_NSGAII_SPEA2.eps", horizontal=FALSE, onefile=FALSE, height=8, width=12, pointsize=10)
pdf("indicators_NSGAII_NSGAII_DKM.pdf", onefile=FALSE, width=10)
NSGAIIresultDirectory<-"."
NSGAIIqIndicator <- function(indicator)
{
fileNSGAII<-paste(NSGAIIresultDirectory, "NSGAII", sep="/")
#filePolynomi... | /mutationResults/AalborgProblem/compare.indicators.NSGAII.NSGAII_DKM.R | no_license | shaikatcse/EnergyPLANDomainKnowledgeEAStep1 | R | false | false | 2,169 | r | #postscript("indicators_NSGAII_SPEA2.eps", horizontal=FALSE, onefile=FALSE, height=8, width=12, pointsize=10)
pdf("indicators_NSGAII_NSGAII_DKM.pdf", onefile=FALSE, width=10)
NSGAIIresultDirectory<-"."
NSGAIIqIndicator <- function(indicator)
{
fileNSGAII<-paste(NSGAIIresultDirectory, "NSGAII", sep="/")
#filePolynomi... |
trades <- read.table("data/trades.csv",
header = T,
sep = ",",
skip = 3,
#stringsAsFactors = T,
colClasses = c("NULL",
"NULL",
"factor",
... | /import.R | no_license | olk/examples_R | R | false | false | 895 | r | trades <- read.table("data/trades.csv",
header = T,
sep = ",",
skip = 3,
#stringsAsFactors = T,
colClasses = c("NULL",
"NULL",
"factor",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ram_service.R
\name{ram}
\alias{ram}
\title{AWS Resource Access Manager}
\usage{
ram()
}
\description{
Use AWS Resource Access Manager to share AWS resources between AWS
accounts. To share a resource, you create a resource share, associate
th... | /paws/man/ram.Rd | permissive | peoplecure/paws | R | false | true | 3,221 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ram_service.R
\name{ram}
\alias{ram}
\title{AWS Resource Access Manager}
\usage{
ram()
}
\description{
Use AWS Resource Access Manager to share AWS resources between AWS
accounts. To share a resource, you create a resource share, associate
th... |
#--PLOT MSE OF FILTERED VS SMOOTH--
# M monte carlo runs
# Test 2 cases sigma.meas=3 and sigma.meas=1
#load library
source("filter_mod.R")
#set model variables
x0<-0
tau<-100
sigma<-3
sigma.meas<-3 #sigma.meas=1
N<-500
M<-100
#generate states and simulated data y
set.seed(123)
x<-rand.walk.1D(tau=tau,x0=x0,sigma=sig... | /R/old_scripts/smooth_vs_filter_plot.R | no_license | tintinthong/pfilter | R | false | false | 1,270 | r | #--PLOT MSE OF FILTERED VS SMOOTH--
# M monte carlo runs
# Test 2 cases sigma.meas=3 and sigma.meas=1
#load library
source("filter_mod.R")
#set model variables
x0<-0
tau<-100
sigma<-3
sigma.meas<-3 #sigma.meas=1
N<-500
M<-100
#generate states and simulated data y
set.seed(123)
x<-rand.walk.1D(tau=tau,x0=x0,sigma=sig... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.