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 |
|---|---|---|---|---|---|---|---|---|---|
testlist <- list(Beta = 0, CVLinf = 0, FM = NaN, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = -1.22675879366205e+176, SL95 = -1.60283243971156e-180, nage = -232251645L, nlen = -402653184L, rLens = numer... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615830037-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 384 | r | testlist <- list(Beta = 0, CVLinf = 0, FM = NaN, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = -1.22675879366205e+176, SL95 = -1.60283243971156e-180, nage = -232251645L, nlen = -402653184L, rLens = numer... |
# Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... | /_check/test_code/ins/r_codes/totPOP_racesex_insurance_1999.R | permissive | HHS-AHRQ/MEPS-summary-tables | R | false | false | 3,647 | r | # Install and load packages
package_names <- c("survey","dplyr","foreign","devtools")
lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x))
lapply(package_names, require, character.only=T)
install_github("e-mitchell/meps_r_pkg/MEPS")
library(MEPS)
options(survey.lonely.ps... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LastPointAboveQuantile.R
\name{LastPointAboveQuantile}
\alias{LastPointAboveQuantile}
\title{Determine if the Last Point is Above the Sample Quantile}
\usage{
LastPointAboveQuantile(ts, exclude = NULL, probT = 0.9)
}
\arguments{
\ite... | /man/LastPointAboveQuantile.Rd | no_license | jingjin1018/anetimeseries | R | false | true | 1,665 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LastPointAboveQuantile.R
\name{LastPointAboveQuantile}
\alias{LastPointAboveQuantile}
\title{Determine if the Last Point is Above the Sample Quantile}
\usage{
LastPointAboveQuantile(ts, exclude = NULL, probT = 0.9)
}
\arguments{
\ite... |
#'@details getDataIDs is a method for finding dataset variables from a
#' \code{geoknife} object with a valid dataset URI. Use setProcessInputs to set a dataset URI.
#'
#'@param \code{geoknife} object with a valid dataset URI.
#'@param cachedResponse an optional input to allow cached response. Default as FALSE
#'@retur... | /R/getDataIDs.R | permissive | eread-usgs/geoknife | R | false | false | 1,772 | r | #'@details getDataIDs is a method for finding dataset variables from a
#' \code{geoknife} object with a valid dataset URI. Use setProcessInputs to set a dataset URI.
#'
#'@param \code{geoknife} object with a valid dataset URI.
#'@param cachedResponse an optional input to allow cached response. Default as FALSE
#'@retur... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/transactions.R
\docType{methods}
\name{postgres-transactions}
\alias{dbBegin,PqConnection-method}
\alias{dbCommit,PqConnection-method}
\alias{dbRollback,PqConnection-method}
\alias{postgres-transactions}
\title{Transaction management.... | /man/postgres-transactions.Rd | no_license | robertzk/RPostgres | R | false | false | 1,264 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/transactions.R
\docType{methods}
\name{postgres-transactions}
\alias{dbBegin,PqConnection-method}
\alias{dbCommit,PqConnection-method}
\alias{dbRollback,PqConnection-method}
\alias{postgres-transactions}
\title{Transaction management.... |
#"Price of a property is one of the most important decision criterion when people buy homes.
#Real state firms need to be consistent in their pricing in order to attract buyers .
#Having a predictive model for the same will be great tool to have ,
#which in turn can also be used to tweak development of properties ,
#p... | /Housing Price Prediction.R | no_license | merahulshedge95/R-projects | R | false | false | 11,901 | r |
#"Price of a property is one of the most important decision criterion when people buy homes.
#Real state firms need to be consistent in their pricing in order to attract buyers .
#Having a predictive model for the same will be great tool to have ,
#which in turn can also be used to tweak development of properties ,
#p... |
### MSMSOccbanna
library(R2jags)
### 3-demensinal data
####
rm(list=ls(all=TRUE))
list.filenames <- list.files(path = "data/All_widedata", pattern="*.csv")
list.filenames <- paste(c("data/All_widedata/"), list.filenames, sep="")
# create an empty list that will serve as a container to receive the incoming files
spp.te... | /R/MCMCbanna_6_var.R | no_license | ccheng91/Multispp_Occ | R | false | false | 19,065 | r | ### MSMSOccbanna
library(R2jags)
### 3-demensinal data
####
rm(list=ls(all=TRUE))
list.filenames <- list.files(path = "data/All_widedata", pattern="*.csv")
list.filenames <- paste(c("data/All_widedata/"), list.filenames, sep="")
# create an empty list that will serve as a container to receive the incoming files
spp.te... |
##############################################################################
###Manhattan plot function
###from http://gettinggeneticsdone.blogspot.co.at/2011/04/annotated-manhattan-plots-and-qq-plots.html
###Adapted for Dmel chromosomes
##############################################################################
... | /scripts/manhattan_Dmel.R | no_license | BioinformaticsArchive/BBGP | R | false | false | 4,617 | r | ##############################################################################
###Manhattan plot function
###from http://gettinggeneticsdone.blogspot.co.at/2011/04/annotated-manhattan-plots-and-qq-plots.html
###Adapted for Dmel chromosomes
##############################################################################
... |
## Get random initial values for theta
getInitGamma_cal1 = function(nSample){
gammaInit = rnorm(1, mean = 0, sd = 2)
return(gammaInit)
}
getInitGamma_cal2 = function(nSample){
if(runif(1) < 0.1) return(c(1/2, -1/5))
gammaInit = rnorm(2, mean = 0, sd = c(1, 0.5))
return(gammaInit)
}
getInitGamma_c... | /code/core/initGamma.R | no_license | shiyuanhe/calibration | R | false | false | 600 | r | ## Get random initial values for theta
getInitGamma_cal1 = function(nSample){
gammaInit = rnorm(1, mean = 0, sd = 2)
return(gammaInit)
}
getInitGamma_cal2 = function(nSample){
if(runif(1) < 0.1) return(c(1/2, -1/5))
gammaInit = rnorm(2, mean = 0, sd = c(1, 0.5))
return(gammaInit)
}
getInitGamma_c... |
context("lawn_hex_grid")
a <- lawn_hex_grid(c(-96, 31, -84, 40), 50, 'miles')
b <- lawn_hex_grid(c(-96, 31, -84, 40), 30, 'miles')
d <- lawn_hex_grid(c(-96, 31, -84, 40), 10, 'miles')
test_that("lawn_hex_grid returns correct classes", {
expect_is(a, "featurecollection")
expect_is(a$type, "character")
expect_is(... | /tests/testthat/test-hex_grid.R | permissive | carrillo/lawn | R | false | false | 1,512 | r | context("lawn_hex_grid")
a <- lawn_hex_grid(c(-96, 31, -84, 40), 50, 'miles')
b <- lawn_hex_grid(c(-96, 31, -84, 40), 30, 'miles')
d <- lawn_hex_grid(c(-96, 31, -84, 40), 10, 'miles')
test_that("lawn_hex_grid returns correct classes", {
expect_is(a, "featurecollection")
expect_is(a$type, "character")
expect_is(... |
# At-Home Exercises 3, Jan 25, 2017
# If you choose to submit these exercises:
# FIRST Write down your name:
# First name:
# Last name:
# SECOND Change the name of your file to
# firstname_lastname.R
# That is the file you need to submit.
# THIRD Save your answers in this file and submit it
# before 11:40am, Jan 2... | /publicBZAN542/Exercises_home/Midterm1/3_AtHomeExercises_Jan25.R | no_license | jchicchi/Data-mining | R | false | false | 4,849 | r | # At-Home Exercises 3, Jan 25, 2017
# If you choose to submit these exercises:
# FIRST Write down your name:
# First name:
# Last name:
# SECOND Change the name of your file to
# firstname_lastname.R
# That is the file you need to submit.
# THIRD Save your answers in this file and submit it
# before 11:40am, Jan 2... |
# External validation with the bbseq data
funnormDir <- "/amber1/archive/sgseq/workspace/hansen_lab1/funnorm_repro"
externalValDir <- paste0(funnormDir,"/external_validations")
dmpDir <- paste0(funnormDir, "/dmps")
svaDir <- paste0(funnormDir,"/sva_results")
svaFunnormDir <- paste0(funnormDir,"/sva_funnorm_results")
ru... | /external_validations/external.validation.ebv.R | no_license | Jfortin1/funnorm_repro | R | false | false | 2,037 | r | # External validation with the bbseq data
funnormDir <- "/amber1/archive/sgseq/workspace/hansen_lab1/funnorm_repro"
externalValDir <- paste0(funnormDir,"/external_validations")
dmpDir <- paste0(funnormDir, "/dmps")
svaDir <- paste0(funnormDir,"/sva_results")
svaFunnormDir <- paste0(funnormDir,"/sva_funnorm_results")
ru... |
library(sads)
### Name: radpred-methods
### Title: Predicted ranked abundance of species
### Aliases: radpred
### radpred,fitrad,missing,missing,missing,missing,missing,missing,missing-method
### radpred,fitsad,missing,missing,missing,missing,missing,missing,missing-method
### radpred,missing,character,missing,... | /data/genthat_extracted_code/sads/examples/radpred.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,229 | r | library(sads)
### Name: radpred-methods
### Title: Predicted ranked abundance of species
### Aliases: radpred
### radpred,fitrad,missing,missing,missing,missing,missing,missing,missing-method
### radpred,fitsad,missing,missing,missing,missing,missing,missing,missing-method
### radpred,missing,character,missing,... |
library(dslabs)
library(caret)
data("movielens")
head(movielens)
class(movielens)
###############################################################################
## About Tidyverse package
# The Tidyverse empowers:
# - Data manipulation (dplyr, tidyr)
# - Working with data types (stringr for... | /codeR/Case Study-movies _recommendation_systems.R | no_license | tuanlamdao/datascience | R | false | false | 7,021 | r | library(dslabs)
library(caret)
data("movielens")
head(movielens)
class(movielens)
###############################################################################
## About Tidyverse package
# The Tidyverse empowers:
# - Data manipulation (dplyr, tidyr)
# - Working with data types (stringr for... |
install.packages("party")
cor.prob <- function(X, dfr = nrow(X) - 2) {
R <- cor(X)
above <- row(R) < col(R)
r2 <- R[above]^2
Fstat <- r2 * dfr / (1 - r2)
R[above] <- 1 - pf(Fstat, 1, dfr)
cor.mat <- t(R)
cor.mat[upper.tri(cor.mat)] <- NA
cor.mat
}
set.seed(123)
data <- matrix(rnorm(100), 20, 5)
cor... | /test.R | no_license | jayesh291/jpfcst | R | false | false | 3,901 | r | install.packages("party")
cor.prob <- function(X, dfr = nrow(X) - 2) {
R <- cor(X)
above <- row(R) < col(R)
r2 <- R[above]^2
Fstat <- r2 * dfr / (1 - r2)
R[above] <- 1 - pf(Fstat, 1, dfr)
cor.mat <- t(R)
cor.mat[upper.tri(cor.mat)] <- NA
cor.mat
}
set.seed(123)
data <- matrix(rnorm(100), 20, 5)
cor... |
\name{get.means}
\Rdversion{1.1}
\alias{get.means}
\title{get means}
\description{Positioning Function for the mean of each cluster of points.}
\usage{
get.means(d, ...)
}
\arguments{
\item{d}{
}
\item{\dots}{
}
}
\details{
}
\value{
}
\references{
}
\author{Toby Dylan Hocking <toby.hocking@inria.fr>}
\note{
}
\s... | /man/get.means.Rd | no_license | cran/latticedl | R | false | false | 341 | rd | \name{get.means}
\Rdversion{1.1}
\alias{get.means}
\title{get means}
\description{Positioning Function for the mean of each cluster of points.}
\usage{
get.means(d, ...)
}
\arguments{
\item{d}{
}
\item{\dots}{
}
}
\details{
}
\value{
}
\references{
}
\author{Toby Dylan Hocking <toby.hocking@inria.fr>}
\note{
}
\s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smoking.R
\name{pack_years_fun}
\alias{pack_years_fun}
\title{Smoking pack-years}
\usage{
pack_years_fun(
SMKDSTY_A,
DHHGAGE_cont,
time_quit_smoking,
SMKG203_cont,
SMKG207_cont,
SMK_204,
SMK_05B,
SMK_208,
SMK_05C,
SMKG01C_... | /man/pack_years_fun.Rd | permissive | Big-Life-Lab/cchsflow | R | false | true | 3,444 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/smoking.R
\name{pack_years_fun}
\alias{pack_years_fun}
\title{Smoking pack-years}
\usage{
pack_years_fun(
SMKDSTY_A,
DHHGAGE_cont,
time_quit_smoking,
SMKG203_cont,
SMKG207_cont,
SMK_204,
SMK_05B,
SMK_208,
SMK_05C,
SMKG01C_... |
############################################################################################################################################################################
#
# PROJECT: xG Model Measuring Goaltender Performance
#
# PURPOSE: Using Logistic Regression create an xG for each shot a goalie fac... | /xG_Model_Plots.R | no_license | C92Anderson/xG-Model | R | false | false | 107,129 | r | ############################################################################################################################################################################
#
# PROJECT: xG Model Measuring Goaltender Performance
#
# PURPOSE: Using Logistic Regression create an xG for each shot a goalie fac... |
library(psychmeta)
### Name: plot_forest
### Title: Create forest plots
### Aliases: plot_forest
### ** Examples
ma_obj <- ma_r(ma_method = "ic", rxyi = rxyi, n = n, rxx = rxxi, ryy = ryyi,
construct_x = x_name, construct_y = y_name, sample_id = sample_id,
moderators = moderator, data ... | /data/genthat_extracted_code/psychmeta/examples/plot_forest.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 886 | r | library(psychmeta)
### Name: plot_forest
### Title: Create forest plots
### Aliases: plot_forest
### ** Examples
ma_obj <- ma_r(ma_method = "ic", rxyi = rxyi, n = n, rxx = rxxi, ryy = ryyi,
construct_x = x_name, construct_y = y_name, sample_id = sample_id,
moderators = moderator, data ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dfareporting_functions.R
\name{targetableRemarketingLists.list}
\alias{targetableRemarketingLists.list}
\title{Retrieves a list of targetable remarketing lists, possibly filtered.}
\usage{
targetableRemarketingLists.list(profileId, advertiser... | /googledfareportingv25.auto/man/targetableRemarketingLists.list.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 1,519 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dfareporting_functions.R
\name{targetableRemarketingLists.list}
\alias{targetableRemarketingLists.list}
\title{Retrieves a list of targetable remarketing lists, possibly filtered.}
\usage{
targetableRemarketingLists.list(profileId, advertiser... |
##' QGIS Algorithm provided by GRASS i.fft (grass7:i.fft)
##'
##' @title QGIS algorithm i.fft
##'
##' @param input `raster` - Name of input raster map. Path to a raster layer.
##' @param real `rasterDestination` - Real part arrays. Path for new raster layer.
##' @param imaginary `rasterDestination` - Imaginary part arr... | /R/grass7_i_fft.R | permissive | VB6Hobbyst7/r_package_qgis | R | false | false | 2,364 | r | ##' QGIS Algorithm provided by GRASS i.fft (grass7:i.fft)
##'
##' @title QGIS algorithm i.fft
##'
##' @param input `raster` - Name of input raster map. Path to a raster layer.
##' @param real `rasterDestination` - Real part arrays. Path for new raster layer.
##' @param imaginary `rasterDestination` - Imaginary part arr... |
context('Simulated incidence in the absence of screening')
pop.size <- 1000
onset.rate <- 0.001
sojourn.min <- 0
sojourn.max <- 6
followup.years <- 10
dset <- generate_absence(pop.size,
onset.rate,
sojourn.min,
sojourn.max,
... | /tests/testthat/test_generate_absence.R | no_license | roman-gulati/overdiag | R | false | false | 1,354 | r | context('Simulated incidence in the absence of screening')
pop.size <- 1000
onset.rate <- 0.001
sojourn.min <- 0
sojourn.max <- 6
followup.years <- 10
dset <- generate_absence(pop.size,
onset.rate,
sojourn.min,
sojourn.max,
... |
#have to load fonts before ggplot
extrafont::loadfonts(device="win")
library(readxl)
library(tidyverse)
#devtools::install_github("gadenbuie/ggpomological")
library(ggpomological)
#read in data, fix names
data <- read_xlsx("data/support_by_field.xlsx", skip = 3)
#first analyze sex-field-support relationship
data_se... | /support_by_field.R | no_license | will-r-chase/tidy_tuesday | R | false | false | 4,246 | r | #have to load fonts before ggplot
extrafont::loadfonts(device="win")
library(readxl)
library(tidyverse)
#devtools::install_github("gadenbuie/ggpomological")
library(ggpomological)
#read in data, fix names
data <- read_xlsx("data/support_by_field.xlsx", skip = 3)
#first analyze sex-field-support relationship
data_se... |
## returns a list of the functions to set a matrix, get the matrix, set the inverse of a matrix and get the inverse of the matrix)
makeCacheMatrix <- function(x = matrix()) {
invrs <- NULL
set <- function(y) {
x <<- y
invrs <<- NULL
}
get <- function() x... | /cachematrix.R | no_license | ahmeddan/ProgrammingAssignment2 | R | false | false | 1,014 | r | ## returns a list of the functions to set a matrix, get the matrix, set the inverse of a matrix and get the inverse of the matrix)
makeCacheMatrix <- function(x = matrix()) {
invrs <- NULL
set <- function(y) {
x <<- y
invrs <<- NULL
}
get <- function() x... |
data <- read.csv("./Data/TestResultsOverYears_DataToModel_20160926_R.csv", header = T)
all.pos.yr1 <- subset(data, AllPos == 1)
table(all.pos.yr1$AnyPos.1)
allpos1.anypos2 <- prop.test(x = table(all.pos.yr1$AnyPos.1))
1 - allpos1.anypos2$conf.int
no.pos.yr1 <- subset(data, AnyPos == 0)
nopos1.nopos2 <- prop.test(x = ... | /R/TwoPosPredictsNextYearStatusANALYSIS_20160926.R | no_license | kmanlove/LostineLongitudinalAnalysis | R | false | false | 371 | r | data <- read.csv("./Data/TestResultsOverYears_DataToModel_20160926_R.csv", header = T)
all.pos.yr1 <- subset(data, AllPos == 1)
table(all.pos.yr1$AnyPos.1)
allpos1.anypos2 <- prop.test(x = table(all.pos.yr1$AnyPos.1))
1 - allpos1.anypos2$conf.int
no.pos.yr1 <- subset(data, AnyPos == 0)
nopos1.nopos2 <- prop.test(x = ... |
##########################################################################################
# Programmer: Ruben Montes de Oca FDA- CTP
#starting date: may 2018
# Purpose: Analyze the 2009-2010 NHANES demographics and questionnaire components
#######################################################################... | /rm_nhanes.R | no_license | androideruben/SLP | R | false | false | 10,342 | r | ##########################################################################################
# Programmer: Ruben Montes de Oca FDA- CTP
#starting date: may 2018
# Purpose: Analyze the 2009-2010 NHANES demographics and questionnaire components
#######################################################################... |
library("ggplot2")
library("lmerTest") # calculates p-values for fixed effect
library("lattice")
library("cowplot")
### Preferences ###
options(digits.secs=6)
######################### 1. FILE I/O ################################
n = 31
ids <- 1:10
ids2 <- 11:31 # from second collection phase
gend <<- c("M","F","M","... | /allData_july20b.R | no_license | jcrewman/robottouch | R | false | false | 14,338 | r | library("ggplot2")
library("lmerTest") # calculates p-values for fixed effect
library("lattice")
library("cowplot")
### Preferences ###
options(digits.secs=6)
######################### 1. FILE I/O ################################
n = 31
ids <- 1:10
ids2 <- 11:31 # from second collection phase
gend <<- c("M","F","M","... |
#' @title Methods for Calculating marginal and Variable Costs
#' @name Cost-Methods
#' @docType methods
#'
#' @aliases calcMC
#' calcMC,ANY-method
#' calcMC,Bertrand-method
#' calcMC,VertBargBertLogit-method
#' calcMC,Auction2ndLogit-method
#' calcMC,Cournot-method
#' calcMC,Auction2ndCap-method
#' calcdMC
... | /R/CostMethods.R | no_license | luciu5/antitrust | R | false | false | 9,873 | r | #' @title Methods for Calculating marginal and Variable Costs
#' @name Cost-Methods
#' @docType methods
#'
#' @aliases calcMC
#' calcMC,ANY-method
#' calcMC,Bertrand-method
#' calcMC,VertBargBertLogit-method
#' calcMC,Auction2ndLogit-method
#' calcMC,Cournot-method
#' calcMC,Auction2ndCap-method
#' calcdMC
... |
ClassifyByDecisionBoundaries=function(Data,DecisionBoundaries,ClassLabels){
# Cls = ClassifyByDecisionBoundaries(Data,DecisionBoundaries)
# Classify Data according to decision Boundaries
#
# INPUT
# Data(1:n,1) vector of Data
# DecisionBoundaries(1:L) decision boundaries
# OPTIONAL
# ClassLa... | /AdaptGauss/R/ClassifyByDecisionBoundaries.R | no_license | ingted/R-Examples | R | false | false | 1,097 | r | ClassifyByDecisionBoundaries=function(Data,DecisionBoundaries,ClassLabels){
# Cls = ClassifyByDecisionBoundaries(Data,DecisionBoundaries)
# Classify Data according to decision Boundaries
#
# INPUT
# Data(1:n,1) vector of Data
# DecisionBoundaries(1:L) decision boundaries
# OPTIONAL
# ClassLa... |
bar.chart <-
function(data = NULL,
x = NULL,
y = NULL,
z = NULL,
x.main.lab = NULL,
x.text.lab = NULL,
y.main.lab = NULL,
z.main.lab = NULL,
z.text.lab = NULL,
alpha = 0.05,
transformation = fun... | /bar.chart.R | no_license | ahadalizadeh/utility_fun | R | false | false | 22,797 | r |
bar.chart <-
function(data = NULL,
x = NULL,
y = NULL,
z = NULL,
x.main.lab = NULL,
x.text.lab = NULL,
y.main.lab = NULL,
z.main.lab = NULL,
z.text.lab = NULL,
alpha = 0.05,
transformation = fun... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/math_operator_overloads.R
\name{t.spectra}
\alias{t.spectra}
\title{Spectra Transpose}
\usage{
\method{t}{spectra}(x)
}
\arguments{
\item{x}{spectra}
}
\value{
nothing. operation not allowed
}
\description{
spectra are not transposable. Trans... | /man/t.spectra.Rd | no_license | GRSEB9S/spectrolab | R | false | true | 564 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/math_operator_overloads.R
\name{t.spectra}
\alias{t.spectra}
\title{Spectra Transpose}
\usage{
\method{t}{spectra}(x)
}
\arguments{
\item{x}{spectra}
}
\value{
nothing. operation not allowed
}
\description{
spectra are not transposable. Trans... |
# testing if serially orthogonalized design matrix leads to different betas
# than not
library(matlib)
# non orthogonal
cur_dat = data_pdt[data_pdt$subject == unique(data_pdt$subject)[2],]
cur_dat = cur_dat[!is.na(cur_dat$accept_reject),]
mod_n = glm(accept_reject ~ gain+loss+ed_abs+cat,data = cur_dat,family = neede... | /dev/regression_orth.R | no_license | pransito/R | R | false | false | 3,477 | r | # testing if serially orthogonalized design matrix leads to different betas
# than not
library(matlib)
# non orthogonal
cur_dat = data_pdt[data_pdt$subject == unique(data_pdt$subject)[2],]
cur_dat = cur_dat[!is.na(cur_dat$accept_reject),]
mod_n = glm(accept_reject ~ gain+loss+ed_abs+cat,data = cur_dat,family = neede... |
####Chemoinformatics
#goal: extraction of matrix of physiochemical properties from list of PUBCHEMIDs
#packages used:
#if (!requireNamespace("BiocManager", quietly=TRUE))
# install.packages("BiocManager")
#BiocManager::install("ChemmineR")
#install & library require CRAN packages
requiredpackages <- c("rJava", "rcdk... | /Scripts/QUALS_BIOSYNDISTANCE_2.20.19.R | no_license | jordandowell/PhysiochemicalBiosyntheticConstrait | R | false | false | 15,355 | r | ####Chemoinformatics
#goal: extraction of matrix of physiochemical properties from list of PUBCHEMIDs
#packages used:
#if (!requireNamespace("BiocManager", quietly=TRUE))
# install.packages("BiocManager")
#BiocManager::install("ChemmineR")
#install & library require CRAN packages
requiredpackages <- c("rJava", "rcdk... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rcrainfo_rcr_hbasic.R
\name{rcrainfo_rcr_hbasic}
\alias{rcrainfo_rcr_hbasic}
\title{Retrieve rcr hbasic data from rcrainfo database}
\usage{
rcrainfo_rcr_hbasic(HANDLER_ID = NULL, FACILITY_IDENTIFIER = NULL,
HANDLER_NAME = NULL, REGION = NU... | /man/rcrainfo_rcr_hbasic.Rd | no_license | markwh/envirofacts | R | false | true | 687 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rcrainfo_rcr_hbasic.R
\name{rcrainfo_rcr_hbasic}
\alias{rcrainfo_rcr_hbasic}
\title{Retrieve rcr hbasic data from rcrainfo database}
\usage{
rcrainfo_rcr_hbasic(HANDLER_ID = NULL, FACILITY_IDENTIFIER = NULL,
HANDLER_NAME = NULL, REGION = NU... |
timestamp <- Sys.time()
library(caret)
library(plyr)
library(recipes)
library(dplyr)
model <- "mlpKerasDecay"
#########################################################################
set.seed(2)
training <- twoClassSim(50, linearVars = 2)
testing <- twoClassSim(500, linearVars = 2)
trainX <- training[, -ncol(traini... | /RegressionTests/Code/mlpKerasDecay.R | no_license | topepo/caret | R | false | false | 7,330 | r | timestamp <- Sys.time()
library(caret)
library(plyr)
library(recipes)
library(dplyr)
model <- "mlpKerasDecay"
#########################################################################
set.seed(2)
training <- twoClassSim(50, linearVars = 2)
testing <- twoClassSim(500, linearVars = 2)
trainX <- training[, -ncol(traini... |
##-------------------------------Question 1-------------------------------------
##Consider the data set given below
x <- c(0.18, -1.54, 0.42, 0.95)
##And weights given by
w <- c(2, 1, 3, 1)
##Give the value of ?? that minimizes the least squares equation ???ni=1wi(xi?????)2
weighted.mean(x, w)
0.1471
##----------... | /Regression Models Quiz 1.R | no_license | joseantonio11/RegressionModels | R | false | false | 4,329 | r | ##-------------------------------Question 1-------------------------------------
##Consider the data set given below
x <- c(0.18, -1.54, 0.42, 0.95)
##And weights given by
w <- c(2, 1, 3, 1)
##Give the value of ?? that minimizes the least squares equation ???ni=1wi(xi?????)2
weighted.mean(x, w)
0.1471
##----------... |
E4F40.R GISS Model E Lat-Lon Atmosphere Model 2017/01/04
E4F40 is continuously updated with most recent physics, parameters, and input files
E4F = Lat-lon Fine resolution = 2.5 x 2 degree horizontal resolution
40 = 40 vertical layers with standard hybrid coordinate, top at .1 mb
Atmospheric composition ... | /templates/E4F40.R | no_license | Racha711/GCAP2 | R | false | false | 4,683 | r | E4F40.R GISS Model E Lat-Lon Atmosphere Model 2017/01/04
E4F40 is continuously updated with most recent physics, parameters, and input files
E4F = Lat-lon Fine resolution = 2.5 x 2 degree horizontal resolution
40 = 40 vertical layers with standard hybrid coordinate, top at .1 mb
Atmospheric composition ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mat_model.R
\name{limiting.rate}
\alias{limiting.rate}
\title{Limiting Rate}
\usage{
limiting.rate(mat)
}
\arguments{
\item{mat}{a square matrix}
}
\description{
This function returns the real dominant eigenvalue of a Matrix Population Model ... | /fuzzedpackages/facilitation/man/limiting.rate.Rd | no_license | akhikolla/testpackages | R | false | true | 1,000 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mat_model.R
\name{limiting.rate}
\alias{limiting.rate}
\title{Limiting Rate}
\usage{
limiting.rate(mat)
}
\arguments{
\item{mat}{a square matrix}
}
\description{
This function returns the real dominant eigenvalue of a Matrix Population Model ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/source.r
\name{get.month}
\alias{get.month}
\title{Get Month}
\usage{
get.month(x)
}
\arguments{
\item{x}{An object of class POSIX or a vector containing POSIX.}
}
\description{
A helper function used to pull the our information from a POSIX ... | /man/get.month.Rd | no_license | tbrycekelly/TheSource | R | false | true | 330 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/source.r
\name{get.month}
\alias{get.month}
\title{Get Month}
\usage{
get.month(x)
}
\arguments{
\item{x}{An object of class POSIX or a vector containing POSIX.}
}
\description{
A helper function used to pull the our information from a POSIX ... |
testlist <- list(latLongs = structure(c(1.60605955906252e-314, 1.27938298990591e-319, 2.97803880650784e-118, 1.4698527073624e-317, 2.97803880651584e-118, 4.65661287307739e-10, 0, 0), .Dim = c(2L, 4L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) | /MGDrivE/inst/testfiles/calcCos/libFuzzer_calcCos/calcCos_valgrind_files/1612726814-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 267 | r | testlist <- list(latLongs = structure(c(1.60605955906252e-314, 1.27938298990591e-319, 2.97803880650784e-118, 1.4698527073624e-317, 2.97803880651584e-118, 4.65661287307739e-10, 0, 0), .Dim = c(2L, 4L)), r = 0)
result <- do.call(MGDrivE::calcCos,testlist)
str(result) |
# next
# change function addrandomprobes - change distance of random probes so they are close
#### add random probes to a region
# cpgsPheno_df = data frame, row = sample ids, column = cpg ids
# beta_all = beta values, genomewide
# nRandomProbes = number of random probes to be added
AddRandomProbes <- function (... | /functions/AddRandomProbes.R | no_license | lissettegomez/coMethDMRPaper | R | false | false | 652 | r |
# next
# change function addrandomprobes - change distance of random probes so they are close
#### add random probes to a region
# cpgsPheno_df = data frame, row = sample ids, column = cpg ids
# beta_all = beta values, genomewide
# nRandomProbes = number of random probes to be added
AddRandomProbes <- function (... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spec.R
\name{respecify}
\alias{respecify}
\title{Respecify Something}
\usage{
respecify(x, ...)
}
\arguments{
\item{x}{object}
\item{...}{passed arguments}
}
\description{
Respecify something.
}
\seealso{
Other respecify: \c... | /man/respecify.Rd | no_license | cran/spec | R | false | true | 409 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spec.R
\name{respecify}
\alias{respecify}
\title{Respecify Something}
\usage{
respecify(x, ...)
}
\arguments{
\item{x}{object}
\item{...}{passed arguments}
}
\description{
Respecify something.
}
\seealso{
Other respecify: \c... |
# #################################################
# Function for applying a variety of multidimensional
# explanatory analyses to a collection of (literary) texts.
# To use this function, one needs to have a directory
# (it's name is customizable) containing some texts.
# Optional arguments: (1) GUI mode (default: T... | /R/stylo.R | no_license | mikekestemont/stylo | R | false | false | 64,979 | r |
# #################################################
# Function for applying a variety of multidimensional
# explanatory analyses to a collection of (literary) texts.
# To use this function, one needs to have a directory
# (it's name is customizable) containing some texts.
# Optional arguments: (1) GUI mode (default: T... |
#166-Step 6- FoodBasicNeeds.R
#
# Copyright © 2018:Majid Einian & Arin Shahbazian
# Licence: GPL-3
rm(list=ls())
starttime <- proc.time()
cat("\n\n================ Prepare Data =====================================\n")
library(yaml)
Settings <- yaml.load_file("Settings.yaml")
library(readxl)
library(data.table)
lib... | /R/Archive/August 2020/FPLine decile.R | no_license | IPRCIRI/IRHEIS | R | false | false | 16,622 | r | #166-Step 6- FoodBasicNeeds.R
#
# Copyright © 2018:Majid Einian & Arin Shahbazian
# Licence: GPL-3
rm(list=ls())
starttime <- proc.time()
cat("\n\n================ Prepare Data =====================================\n")
library(yaml)
Settings <- yaml.load_file("Settings.yaml")
library(readxl)
library(data.table)
lib... |
## Function to compute Fibonocci sequence ##
Fib = function(n){
if(n<1) stop("n must be a positive integer!")
if(n > 1){
out=vector(length=n,mode="integer")
out[1] = out[2] = 1
for(i in 3:n){
out[i] = out[i-1]+out[i-2]
}
return(out)
} else{
return(as.integer(1))
}
} | /Intro_to_Rcpp/examples/Fib.R | no_license | jbhender/jbhender.github.io | R | false | false | 305 | r | ## Function to compute Fibonocci sequence ##
Fib = function(n){
if(n<1) stop("n must be a positive integer!")
if(n > 1){
out=vector(length=n,mode="integer")
out[1] = out[2] = 1
for(i in 3:n){
out[i] = out[i-1]+out[i-2]
}
return(out)
} else{
return(as.integer(1))
}
} |
library(datarobot)
### Name: GenerateDatetimePartition
### Title: Preview the full partitioning determined by a
### DatetimePartitioningSpecification
### Aliases: GenerateDatetimePartition
### ** Examples
## Not run:
##D projectId <- "59a5af20c80891534e3c2bde"
##D partitionSpec <- CreateDatetimePartitionSpec... | /data/genthat_extracted_code/datarobot/examples/GenerateDatetimePartition.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 419 | r | library(datarobot)
### Name: GenerateDatetimePartition
### Title: Preview the full partitioning determined by a
### DatetimePartitioningSpecification
### Aliases: GenerateDatetimePartition
### ** Examples
## Not run:
##D projectId <- "59a5af20c80891534e3c2bde"
##D partitionSpec <- CreateDatetimePartitionSpec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ts_sum.R
\name{ts.sum}
\alias{ts.sum}
\title{Add time series}
\usage{
ts.sum(...)
}
\arguments{
\item{...}{list of ts time series that are added together}
}
\description{
Sequentially add a set of time series
}
\details{
This f... | /man/ts.sum.Rd | no_license | DanielOllech/dsa | R | false | true | 480 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ts_sum.R
\name{ts.sum}
\alias{ts.sum}
\title{Add time series}
\usage{
ts.sum(...)
}
\arguments{
\item{...}{list of ts time series that are added together}
}
\description{
Sequentially add a set of time series
}
\details{
This f... |
#' The MWMOTE algorithm.
#'
#' \code{MWMOTE} over-samples the input data using the Majority Weighted
#' Over-Sampling TEchnique.
#'
#' MWMOTE is a complex over-sampling algorithm and comprises three main
#' phases. First, the hard-to-learn minority examples are identified, then
#' an importance weight is assigned ... | /R/MWMOTE.R | no_license | idealzhang2/bimba | R | false | false | 8,762 | r | #' The MWMOTE algorithm.
#'
#' \code{MWMOTE} over-samples the input data using the Majority Weighted
#' Over-Sampling TEchnique.
#'
#' MWMOTE is a complex over-sampling algorithm and comprises three main
#' phases. First, the hard-to-learn minority examples are identified, then
#' an importance weight is assigned ... |
##IMPORTING FILES AND SETTING UP THE DATA TABLE
#We begin by importing the necessary data files into R
library(data.table)
X_test<-read.table('./test/X_test.txt')
X_train<-read.table('./train/X_train.txt')
Y_train<-read.table('./train/y_train.txt')
Y_test<-read.table('./test/y_test.txt')
subject_test<-read.table('./tes... | /run_analysis.R | no_license | CMC201/CleaningDataProject | R | false | false | 3,154 | r | ##IMPORTING FILES AND SETTING UP THE DATA TABLE
#We begin by importing the necessary data files into R
library(data.table)
X_test<-read.table('./test/X_test.txt')
X_train<-read.table('./train/X_train.txt')
Y_train<-read.table('./train/y_train.txt')
Y_test<-read.table('./test/y_test.txt')
subject_test<-read.table('./tes... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{band}
\alias{band}
\alias{is.prop_band}
\title{A band}
\usage{
band(offset = NULL, mult = NULL)
is.prop_band(x)
}
\arguments{
\item{offset,mult}{Additive and multiplicate offsets used to adjust the
band size. For example, use \code{mult = 0.9} to make a bar ta... | /man/band.Rd | no_license | rlzijdeman/ggvis | R | false | false | 1,053 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{band}
\alias{band}
\alias{is.prop_band}
\title{A band}
\usage{
band(offset = NULL, mult = NULL)
is.prop_band(x)
}
\arguments{
\item{offset,mult}{Additive and multiplicate offsets used to adjust the
band size. For example, use \code{mult = 0.9} to make a bar ta... |
# EMS API Documentation
#
# Enterprise Mobility Services API [Learn about EMS](https://www.embarcadero.com/products/rad-studio/enterprise-mobility-services) EMS (Enterprise Mobility Services) offers a Mobile Enterprise Application Platform (MEAP) TurnKey Middleware for Interconnected Distributed Apps
#
#... | /r-client/R/UserCredentialsObject.r | no_license | mehome/RADServerSwaggerClients | R | false | false | 2,288 | r | # EMS API Documentation
#
# Enterprise Mobility Services API [Learn about EMS](https://www.embarcadero.com/products/rad-studio/enterprise-mobility-services) EMS (Enterprise Mobility Services) offers a Mobile Enterprise Application Platform (MEAP) TurnKey Middleware for Interconnected Distributed Apps
#
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mqmf_utils.r
\name{getseed}
\alias{getseed}
\title{getseed generates a random number seed}
\usage{
getseed()
}
\value{
a 6 digits integer
}
\description{
getseed generates a seed for use within set.seed.
It produces up to a ... | /man/getseed.Rd | no_license | billpine/MQMF | R | false | true | 1,112 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mqmf_utils.r
\name{getseed}
\alias{getseed}
\title{getseed generates a random number seed}
\usage{
getseed()
}
\value{
a 6 digits integer
}
\description{
getseed generates a seed for use within set.seed.
It produces up to a ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/process.R
\name{geno_baf_rratio}
\alias{geno_baf_rratio}
\title{Genotype with kmeans using three clusters}
\usage{
geno_baf_rratio(dat, delthresh = 0.7, drop = FALSE, corr = FALSE)
}
\arguments{
\item{dat}{List object, containing at least two... | /man/geno_baf_rratio.Rd | no_license | grafab/gsrc | R | false | true | 1,049 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/process.R
\name{geno_baf_rratio}
\alias{geno_baf_rratio}
\title{Genotype with kmeans using three clusters}
\usage{
geno_baf_rratio(dat, delthresh = 0.7, drop = FALSE, corr = FALSE)
}
\arguments{
\item{dat}{List object, containing at least two... |
##########################################
#### Run additional models for maxent
##########################################
#### | Project name: Bioclim envelopes
#### | Creator: Mirza Cengic
#### | Contact: mirzaceng@gmail.com
##########################################
# Script setup --------------------------------... | /code/run_maxent_bckg_model.R | no_license | MirzaCengic/bioclim_envelope_modeling | R | false | false | 4,802 | r | ##########################################
#### Run additional models for maxent
##########################################
#### | Project name: Bioclim envelopes
#### | Creator: Mirza Cengic
#### | Contact: mirzaceng@gmail.com
##########################################
# Script setup --------------------------------... |
# -------------------------------------------------------------------
# - NAME: server.R
# - AUTHOR: Reto Stauffer
# - DATE: 2015-05-01
# -------------------------------------------------------------------
# - DESCRIPTION: This is the shiny guitar server script here.
# -------------------------------... | /colorspace/inst/hclwizard/server.R | no_license | docker-oilgains/clauswilke.dataviz.2018 | R | false | false | 19,064 | r | # -------------------------------------------------------------------
# - NAME: server.R
# - AUTHOR: Reto Stauffer
# - DATE: 2015-05-01
# -------------------------------------------------------------------
# - DESCRIPTION: This is the shiny guitar server script here.
# -------------------------------... |
testlist <- list(rates = numeric(0), thresholds = 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), x = numeric(0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) | /grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610382927-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 252 | r | testlist <- list(rates = numeric(0), thresholds = 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), x = numeric(0))
result <- do.call(grattan::IncomeTax,testlist)
str(result) |
#=============================================================================#
# Name : get_distanceCoast_atRecruitmentAge
# Author : Jorge Flores-Valiente
# Date :
# Version:
# Aim : Obtener la distancia a la costa al momento del reclutamiento
# URL :
#=====================================================... | /special_routines/get_distanceCoast_atRecruitmentAge.R | no_license | jfloresvaliente/ichthyop-processing | R | false | false | 1,572 | r | #=============================================================================#
# Name : get_distanceCoast_atRecruitmentAge
# Author : Jorge Flores-Valiente
# Date :
# Version:
# Aim : Obtener la distancia a la costa al momento del reclutamiento
# URL :
#=====================================================... |
a <- c(1:10)
b <- 3*a -0.43*a^2
plot(a,b, type = 'l', col = 'magenta')
data_sf <- sf::st_as_sf(data.frame(xcoord = c(1,1,1), ycoord = c(2,3,4)),coords = c("xcoord", "ycoord"), crs = 4326)
plot(sf::st_difference(sf::st_buffer(data_sf,3)), col = c("red", "orange", "yellow"))
| /test_code.r | permissive | RetoSchmucki/binder_r | R | false | false | 278 | r |
a <- c(1:10)
b <- 3*a -0.43*a^2
plot(a,b, type = 'l', col = 'magenta')
data_sf <- sf::st_as_sf(data.frame(xcoord = c(1,1,1), ycoord = c(2,3,4)),coords = c("xcoord", "ycoord"), crs = 4326)
plot(sf::st_difference(sf::st_buffer(data_sf,3)), col = c("red", "orange", "yellow"))
|
structure_filter <- function(known_structure, desire_layers, dynamic_variables, static_variables,
is_blacklist_internal, is_blacklist_other, is_variable_only,
rho, corr_threshold,
custom_blacklist, custom_whitelist) {
whitelist <... | /R/utils.R | no_license | bayes-modeling/tfdbn | R | false | false | 18,162 | r | structure_filter <- function(known_structure, desire_layers, dynamic_variables, static_variables,
is_blacklist_internal, is_blacklist_other, is_variable_only,
rho, corr_threshold,
custom_blacklist, custom_whitelist) {
whitelist <... |
detach("package:StockPriceSimulator", unload = T)
library(StockPriceSimulator)
library(ggplot2)
library(purrr)
library(dplyr)
library(grid)
library(gridExtra)
library(purrr)
################################################################################
# Denstity
######################################################... | /analysis/kurtosis-heston.R | no_license | AnthonyTedde/thesisDoc | R | false | false | 2,053 | r | detach("package:StockPriceSimulator", unload = T)
library(StockPriceSimulator)
library(ggplot2)
library(purrr)
library(dplyr)
library(grid)
library(gridExtra)
library(purrr)
################################################################################
# Denstity
######################################################... |
if (!require('vecsets')) {
install.packages('vecsets')
}
# e1, p247
juego = function(n) {
cards = seq(2,10,1)
profit = numeric()
for (i in 1:n) {
card = sample(cards, 1)
if(card %% 2 == 0)
profit = c(profit, -1)
else
profit = c(profit, 1)
}
return(profit)
}
juego1 = as.data.fram... | /t10/t10.R | no_license | Saphira3000/MPA | R | false | false | 3,578 | r |
if (!require('vecsets')) {
install.packages('vecsets')
}
# e1, p247
juego = function(n) {
cards = seq(2,10,1)
profit = numeric()
for (i in 1:n) {
card = sample(cards, 1)
if(card %% 2 == 0)
profit = c(profit, -1)
else
profit = c(profit, 1)
}
return(profit)
}
juego1 = as.data.fram... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check.shared.R
\name{check.shared}
\alias{check.shared}
\title{Rboretum Three Common Taxa Checker}
\usage{
check.shared(trees)
}
\arguments{
\item{trees}{multiPhylo object}
}
\value{
TRUE (all trees share >= 3 species) or FALSE
}
\description... | /man/check.shared.Rd | no_license | erenada/Rboretum | R | false | true | 541 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/check.shared.R
\name{check.shared}
\alias{check.shared}
\title{Rboretum Three Common Taxa Checker}
\usage{
check.shared(trees)
}
\arguments{
\item{trees}{multiPhylo object}
}
\value{
TRUE (all trees share >= 3 species) or FALSE
}
\description... |
## my first code in R for remote sensing
# setwd(dir): set the directory of my work
setwd("C:/lab/")
# install.packages: download and install packages from CRAN-like repositories or from local files
## raster data are composed of arrays of pixels (or cells), each containing a value that represents the conditions of t... | /R_code_remote_sensing_first.r | no_license | martaspacca/telerilevamento_2021 | R | false | false | 4,719 | r | ## my first code in R for remote sensing
# setwd(dir): set the directory of my work
setwd("C:/lab/")
# install.packages: download and install packages from CRAN-like repositories or from local files
## raster data are composed of arrays of pixels (or cells), each containing a value that represents the conditions of t... |
shinyUI(
fluidPage(
titlePanel( "Tipping Behavior"),
sidebarLayout(
sidebarPanel(
p( "This dashboard shows tipping behavior in the US."),
br(),
p( "The plot shows tip amount per person as a function of the bill amount per person. It also shows a linear regression... | /ui.r | no_license | martinvans/Tipping | R | false | false | 1,089 | r | shinyUI(
fluidPage(
titlePanel( "Tipping Behavior"),
sidebarLayout(
sidebarPanel(
p( "This dashboard shows tipping behavior in the US."),
br(),
p( "The plot shows tip amount per person as a function of the bill amount per person. It also shows a linear regression... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s2-bounds.R
\name{s2_bounds_cap}
\alias{s2_bounds_cap}
\alias{s2_bounds_rect}
\title{Compute feature-wise and aggregate bounds}
\usage{
s2_bounds_cap(x)
s2_bounds_rect(x)
}
\arguments{
\item{x}{An \code{\link[=s2_geography]{s2_geography()}} ... | /man/s2_bounds_cap.Rd | no_license | cran/s2 | R | false | true | 1,451 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s2-bounds.R
\name{s2_bounds_cap}
\alias{s2_bounds_cap}
\alias{s2_bounds_rect}
\title{Compute feature-wise and aggregate bounds}
\usage{
s2_bounds_cap(x)
s2_bounds_rect(x)
}
\arguments{
\item{x}{An \code{\link[=s2_geography]{s2_geography()}} ... |
# Generate some data for the main report
# See the `source-example` chunk in the main Rmd
# Here we fake up the necessary data
source_results <- data_frame(
author=c("E.M. Hull", "Elinor Glyn", "Ethel Dell"),
awesomeness=c(45.3, 31.9, 25.2)
)
# And here we massage it a little
source_results <- source_result... | /inst/rmarkdown/templates/report/skeleton/source.R | no_license | amitkb3/litdata | R | false | false | 562 | r | # Generate some data for the main report
# See the `source-example` chunk in the main Rmd
# Here we fake up the necessary data
source_results <- data_frame(
author=c("E.M. Hull", "Elinor Glyn", "Ethel Dell"),
awesomeness=c(45.3, 31.9, 25.2)
)
# And here we massage it a little
source_results <- source_result... |
rm(list=ls(all=TRUE))
library(MASS)
library(rgl)
#################################################
# INPUT DATA
#################################################
# CLEAN2 COMBINED DATA
#################################################
fileName = "C:/Users/Piotr/Documents/AKI.data.csv"
###################... | /Chapter-4/None scaling.bmp.r | no_license | Biospec/Application-of-chemometrics-for-the-robust-analysis-of-chemical-and-biochemical-data | R | false | false | 1,617 | r | rm(list=ls(all=TRUE))
library(MASS)
library(rgl)
#################################################
# INPUT DATA
#################################################
# CLEAN2 COMBINED DATA
#################################################
fileName = "C:/Users/Piotr/Documents/AKI.data.csv"
###################... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
}
## Write a short comment describing this function
cacheSolve <- function(x, ...) {
## Return a matrix that is the ... | /cachematrix.R | no_license | safwanmulla123/ProgrammingAssignment2 | R | false | false | 912 | 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()) {
}
## Write a short comment describing this function
cacheSolve <- function(x, ...) {
## Return a matrix that is the ... |
###########################
# Colorize pdb structures #
###########################
new.pymol.colorizer <- function(outfile,chain="A") {
.con <- file(outfile,open="w")
.chain <- chain
val2col <- function(s) {
if (is.na(s)) "gray60"
else if (s <= 0) "lof1"
else if (s <= 0.2) "lof3"
else if (s <= 0.4) "lof4... | /lib/pymolCol.R | no_license | jweile/dmsPipeline | R | false | false | 1,666 | r | ###########################
# Colorize pdb structures #
###########################
new.pymol.colorizer <- function(outfile,chain="A") {
.con <- file(outfile,open="w")
.chain <- chain
val2col <- function(s) {
if (is.na(s)) "gray60"
else if (s <= 0) "lof1"
else if (s <= 0.2) "lof3"
else if (s <= 0.4) "lof4... |
testlist <- list(type = 690563369L, z = 2.0924533037431e-110)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609893149-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 115 | r | testlist <- list(type = 690563369L, z = 2.0924533037431e-110)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/redcap_metadata.R
\name{redcap_metadata}
\alias{redcap_metadata}
\title{Export REDCap metadata (with individual checkbox variables if present) and variable class in R.}
\usage{
redcap_metadata(
redcap_project_uri,
redcap_project_token,
... | /man/redcap_metadata.Rd | no_license | melimore86/collaborator | R | false | true | 1,029 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/redcap_metadata.R
\name{redcap_metadata}
\alias{redcap_metadata}
\title{Export REDCap metadata (with individual checkbox variables if present) and variable class in R.}
\usage{
redcap_metadata(
redcap_project_uri,
redcap_project_token,
... |
library(shiny)
library(tidyverse)
library(wordcloud)
library(tm)
library(ngram)
library(RColorBrewer)
library(DT)
library(mosaic)
library(readxl)
library(here)
library(dplyr)
library(writexl)
library(DescTools)
library(fs)
devtools::install_github("pridiltal/staplr")
ui <- fluidPage(
# Application title
h1(... | /Trial Balance Breakdown Compilation/shinyapp.R | no_license | Elenamaries/SeniorProject | R | false | false | 45,175 | r |
library(shiny)
library(tidyverse)
library(wordcloud)
library(tm)
library(ngram)
library(RColorBrewer)
library(DT)
library(mosaic)
library(readxl)
library(here)
library(dplyr)
library(writexl)
library(DescTools)
library(fs)
devtools::install_github("pridiltal/staplr")
ui <- fluidPage(
# Application title
h1(... |
# compute objective function from given measures of goodness in res
# modifies obj_fun_desc and return_val
# save goodness measures and objective function in "curr_obj_fun_val.txt"
#return_val = measures$rmse_qtotal+2*measures$rmse_peak
#return_val = - measures$cor_total + max(0,(abs(measures$bias_total_rel)-0.3)... | /runs3/templates/ts_discharge/all/compute_obj_fun.R | permissive | ecustwy/MMEMO | R | false | false | 1,574 | r | # compute objective function from given measures of goodness in res
# modifies obj_fun_desc and return_val
# save goodness measures and objective function in "curr_obj_fun_val.txt"
#return_val = measures$rmse_qtotal+2*measures$rmse_peak
#return_val = - measures$cor_total + max(0,(abs(measures$bias_total_rel)-0.3)... |
context("mean_per_year")
library(testthat)
library(teresamelling)
test_that("mean_per_year is mean of an input vector", {
expect_equal(mean_per_year(c(1, 2, 3)), 2)
expect_equal(mean_per_year(c(30, 40, 20)), 30)
expect_equal(mean_per_year(c(1, 5, 3, 3)), 3)
})
test_that("mean_per_year returns class when inpu... | /tests/testthat/testthat.R | no_license | teresamelling/teresamellingpackage | R | false | false | 711 | r |
context("mean_per_year")
library(testthat)
library(teresamelling)
test_that("mean_per_year is mean of an input vector", {
expect_equal(mean_per_year(c(1, 2, 3)), 2)
expect_equal(mean_per_year(c(30, 40, 20)), 30)
expect_equal(mean_per_year(c(1, 5, 3, 3)), 3)
})
test_that("mean_per_year returns class when inpu... |
testlist <- list(score = NULL, id = NULL, item_score = integer(0), person_id = c(1029002581L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L... | /dexterMST/inst/testfiles/im_booklet_score/libFuzzer_im_booklet_score/im_booklet_score_valgrind_files/1612728173-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 480 | r | testlist <- list(score = NULL, id = NULL, item_score = integer(0), person_id = c(1029002581L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get.hospital.probabilities.R
\name{getProbUTI}
\alias{getProbUTI}
\title{getProbUTI}
\usage{
getProbUTI(df)
}
\arguments{
\item{df}{data.frame}
}
\description{
getProbUTI
}
| /man/getProbUTI.Rd | permissive | covid19br/now_fcts | R | false | true | 251 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get.hospital.probabilities.R
\name{getProbUTI}
\alias{getProbUTI}
\title{getProbUTI}
\usage{
getProbUTI(df)
}
\arguments{
\item{df}{data.frame}
}
\description{
getProbUTI
}
|
ultima ora de dirigentie ( 2 )
declaratia baronesei Emma Nicholson de Winterbourne este un semnal extrem de important .
la Bucuresti , ea a prezentat pe scurt recomandarile Uniunii Europene pentru viitorul guvern al Romaniei .
intr - o suta de zile , executivul ar urma sa definitiveze ceea ce n - au reusit toate guv... | /data/Newspapers/2000.11.07.editorial.33404.0483.r | no_license | narcis96/decrypting-alpha | R | false | false | 4,512 | r | ultima ora de dirigentie ( 2 )
declaratia baronesei Emma Nicholson de Winterbourne este un semnal extrem de important .
la Bucuresti , ea a prezentat pe scurt recomandarile Uniunii Europene pentru viitorul guvern al Romaniei .
intr - o suta de zile , executivul ar urma sa definitiveze ceea ce n - au reusit toate guv... |
##############################
### Survey Bee Hive Losses ###
# (c) 2019 Hannes Oberreiter #
##############################
##############################
# Header File, if you use a map in your plot
#### MAP Libraries #####
library(rgeos)
library(stringr)
library(rgdal)
library(maptools)
library(maps)
### Error Work... | /2019_R_Files/Partials_Header_Map.R | permissive | HannesOberreiter/coloss_honey_bee_colony_losses_austria | R | false | false | 1,221 | r | ##############################
### Survey Bee Hive Losses ###
# (c) 2019 Hannes Oberreiter #
##############################
##############################
# Header File, if you use a map in your plot
#### MAP Libraries #####
library(rgeos)
library(stringr)
library(rgdal)
library(maptools)
library(maps)
### Error Work... |
calcmrnafracgeneral<-
function(dat,spikeID="ERCC-",spikemassfraction=.1){
#1) Identify which counts are Spike-In and which are not
#0) Identify which columns are counts and which are 'annotation':
countcolumns<-which(unname(unlist(lapply(dat,class))=="numeric"))
annotcolumn<-which(unname(unlist(lapply... | /calcmrnafraction.R | no_license | jeparson/mixtureprocesscontrol | R | false | false | 1,531 | r | calcmrnafracgeneral<-
function(dat,spikeID="ERCC-",spikemassfraction=.1){
#1) Identify which counts are Spike-In and which are not
#0) Identify which columns are counts and which are 'annotation':
countcolumns<-which(unname(unlist(lapply(dat,class))=="numeric"))
annotcolumn<-which(unname(unlist(lapply... |
# Jake Yeung
# May 17 2013
# GetHubDf.R
GetHubDf <- function(total_neighbhours, start_node_name=1){
node1 <- rep(start_node_name, (total_neighbhours-1))
print(node1)
node2 <- seq(start_node_name+1, (total_neighbhours-1)+start_node_name)
print(node2)
if (length(node1) == length(node2)) {
hu... | /R/utilities/GetHubDf.R | no_license | jaw-bioinf/diffusion-kernel | R | false | false | 476 | r | # Jake Yeung
# May 17 2013
# GetHubDf.R
GetHubDf <- function(total_neighbhours, start_node_name=1){
node1 <- rep(start_node_name, (total_neighbhours-1))
print(node1)
node2 <- seq(start_node_name+1, (total_neighbhours-1)+start_node_name)
print(node2)
if (length(node1) == length(node2)) {
hu... |
#
# Example R code to install packages
# See https://cran.r-project.org/doc/manuals/R-admin.html#Installing-packages for details
#
###########################################################
# Update this line with the R packages to install:
my_packages = c(
"knitr",
"highlight"
)
#################################... | /test/package-tests/init.r | permissive | hmdc/heroku-buildpack-r | R | false | false | 596 | r | #
# Example R code to install packages
# See https://cran.r-project.org/doc/manuals/R-admin.html#Installing-packages for details
#
###########################################################
# Update this line with the R packages to install:
my_packages = c(
"knitr",
"highlight"
)
#################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Analyse_real_data.R
\name{raw_spike_seq}
\alias{raw_spike_seq}
\title{Convert time series to spikes}
\usage{
raw_spike_seq(
data,
time.step,
spike.occur,
val.change = NULL,
reset = spike.occur
)
}
\arguments{
\item{data}{data}
\ite... | /man/raw_spike_seq.Rd | no_license | JPNotts/Package | R | false | true | 499 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Analyse_real_data.R
\name{raw_spike_seq}
\alias{raw_spike_seq}
\title{Convert time series to spikes}
\usage{
raw_spike_seq(
data,
time.step,
spike.occur,
val.change = NULL,
reset = spike.occur
)
}
\arguments{
\item{data}{data}
\ite... |
### LA bar plot
library(data.table)
library(argparse)
library(dplyr)
library(ggplot2)
library(viridis)
"%&%" = function(a,b) paste(a,b,sep="")
parser <- ArgumentParser()
parser$add_argument("--result", help="results file output by adsim", nargs='+')
parser$add_argument("--poslist", help="subset of position... | /01admixture_simulation/scripts/LAI_distributions.R | no_license | WheelerLab/LAI_benchmarking | R | false | false | 4,184 | r | ### LA bar plot
library(data.table)
library(argparse)
library(dplyr)
library(ggplot2)
library(viridis)
"%&%" = function(a,b) paste(a,b,sep="")
parser <- ArgumentParser()
parser$add_argument("--result", help="results file output by adsim", nargs='+')
parser$add_argument("--poslist", help="subset of position... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/anon.R
\name{fct_anon}
\alias{fct_anon}
\title{Anonymise factor levels}
\usage{
fct_anon(f, prefix = "")
}
\arguments{
\item{f}{A factor.}
\item{prefix}{A character prefix to insert in front of the random labels.}
}
\description{
Replaces fa... | /man/fct_anon.Rd | no_license | sindribaldur/poorcats | R | false | true | 578 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/anon.R
\name{fct_anon}
\alias{fct_anon}
\title{Anonymise factor levels}
\usage{
fct_anon(f, prefix = "")
}
\arguments{
\item{f}{A factor.}
\item{prefix}{A character prefix to insert in front of the random labels.}
}
\description{
Replaces fa... |
###########################################################################
# NAME: Chris Bilder #
# DATE: 11-8-10 #
# PURPOSE: C.I.s for pi #
# NOTES: ... | /01.categorical_analysis/00.data/Chapter1/HepCPrev.R | no_license | yerimlim/2018Spring | R | false | false | 1,657 | r | ###########################################################################
# NAME: Chris Bilder #
# DATE: 11-8-10 #
# PURPOSE: C.I.s for pi #
# NOTES: ... |
screen.passengers = function(d, del.d, f, g, sd = 1, sa =1, rd = 1, ra = 1,
phi.d, incubation.d, pathogen, relative=0, split1=0, arrival_screen, departure_screen){
## Arrival Screening Decision Tree Model
# INPUTS:
# d = days since onset
# del.d = days spent in flight (can ... | /Code_screening_model.r | no_license | acrgomez/traveller_screening | R | false | false | 11,060 | r |
screen.passengers = function(d, del.d, f, g, sd = 1, sa =1, rd = 1, ra = 1,
phi.d, incubation.d, pathogen, relative=0, split1=0, arrival_screen, departure_screen){
## Arrival Screening Decision Tree Model
# INPUTS:
# d = days since onset
# del.d = days spent in flight (can ... |
#'
#' @import parallel
#' @import mclust
#' @import ROCR
#' @import GenomicRanges
#' @importFrom data.table rbindlist fread
#' @import Biostrings
NULL
BASE_DIR = system.file("extdata", "", package = "rmimp")
if (F){
setwd('~/Desktop/Github/rmimp/')
BASE_DIR = '~/Desktop/Github/rmimp/inst/extdata'
source('R/disp... | /R/Rmimp.R | no_license | reimandlab/rmimp | R | false | false | 41,057 | r | #'
#' @import parallel
#' @import mclust
#' @import ROCR
#' @import GenomicRanges
#' @importFrom data.table rbindlist fread
#' @import Biostrings
NULL
BASE_DIR = system.file("extdata", "", package = "rmimp")
if (F){
setwd('~/Desktop/Github/rmimp/')
BASE_DIR = '~/Desktop/Github/rmimp/inst/extdata'
source('R/disp... |
# Library
library(shiny)
library(curl)
library(ggplot2)
library(pastecs)
library(doBy)
library(psych)
library(DT)
# Import data using REST API
source('./fetch.R')
data <- fetchData()
# ==============================================================================
# ui
# ==============================================... | /NGS-QR-App/app.R | no_license | dhseong/Statistics-for-NGS-QR-app | R | false | false | 41,398 | r | # Library
library(shiny)
library(curl)
library(ggplot2)
library(pastecs)
library(doBy)
library(psych)
library(DT)
# Import data using REST API
source('./fetch.R')
data <- fetchData()
# ==============================================================================
# ui
# ==============================================... |
분할표 자료분석 : 범주들의 관계
연습문제 11.1
철도청에서는 철도 이용객들의 여행 거리와 구입한 좌석 등급 사이에 관계가 있는지를 알고자 한다.
승객 200명을 대상으로 조사를 실시한 결과는 아래의 표와 같다.
(1) 귀무가설을 서술하시오.
여행거리와 구입한 좌석등급 사이에 관계가 없다.
(2) 이검정은 독립성 검정인가? 동질성 검정인가?
독립성 검정
(3) 자유도를 계산하시오.
=(5-1)*(3-1)=8
(4) 검정통계량을 구하시오.
=15.92
(5) 유의수준 5%에서 어떤 결론을 내릴 수 있는가?
p-value 값이 0.0435... | /CHAPTER 11. 분할표 자료분석 - 범주들의 관계 1.R | no_license | data-githu/R-STATISTICS | R | false | false | 993 | r | 분할표 자료분석 : 범주들의 관계
연습문제 11.1
철도청에서는 철도 이용객들의 여행 거리와 구입한 좌석 등급 사이에 관계가 있는지를 알고자 한다.
승객 200명을 대상으로 조사를 실시한 결과는 아래의 표와 같다.
(1) 귀무가설을 서술하시오.
여행거리와 구입한 좌석등급 사이에 관계가 없다.
(2) 이검정은 독립성 검정인가? 동질성 검정인가?
독립성 검정
(3) 자유도를 계산하시오.
=(5-1)*(3-1)=8
(4) 검정통계량을 구하시오.
=15.92
(5) 유의수준 5%에서 어떤 결론을 내릴 수 있는가?
p-value 값이 0.0435... |
#' PCL1.0 GBM sensitivity triplots
#'
#' Plots PCL1.0 GBM sensitivity analysis results
#'
#' Disclaimer: Use at your own risk. No responsibility is assumed for a user's
#' application of these materials or related materials.
#'
#' @author Dennis Hallema, \email{dwhallem@@ncsu.edu}
#'
#' @return Log files and work... | /03_sensitivity_triplots.R | no_license | dwhallema/gradient-boosting-wildfires-2021 | R | false | false | 3,421 | r | #' PCL1.0 GBM sensitivity triplots
#'
#' Plots PCL1.0 GBM sensitivity analysis results
#'
#' Disclaimer: Use at your own risk. No responsibility is assumed for a user's
#' application of these materials or related materials.
#'
#' @author Dennis Hallema, \email{dwhallem@@ncsu.edu}
#'
#' @return Log files and work... |
### general population dynamics
### teaching tool
### Merrill Rudd
### August 2018
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Selectivity, maturity, and lengths in the catch"),
sidebarLayout(
sidebarPanel(
numericInput("amax", "Age classes:... | /ui.R | no_license | merrillrudd/simple_fishery_demo | R | false | false | 1,409 | r | ### general population dynamics
### teaching tool
### Merrill Rudd
### August 2018
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Selectivity, maturity, and lengths in the catch"),
sidebarLayout(
sidebarPanel(
numericInput("amax", "Age classes:... |
#!/usr/bin/env Rscript --vanilla
# Content: the main executable to run association test using aSPU methods.
# Author: Yang Yang
# Demo arguments:
# filename_genotype <- "genotpe_data_sample.Rdata"
# filename_annotation <- "genotype_annotation.Rdata"
# filename_phenotype <- "phe_cov_longitudinal_longFormat_sampleData.Rd... | /assoc-aSPU.r~ | no_license | xyy2006/LaSPU | R | false | false | 30,975 | #!/usr/bin/env Rscript --vanilla
# Content: the main executable to run association test using aSPU methods.
# Author: Yang Yang
# Demo arguments:
# filename_genotype <- "genotpe_data_sample.Rdata"
# filename_annotation <- "genotype_annotation.Rdata"
# filename_phenotype <- "phe_cov_longitudinal_longFormat_sampleData.Rd... | |
rm(list=ls())
source("./Toman2019-ExpDesignAug14.R")
library(waiter)
shinyServer(function(input, output,session) {
observeEvent(input$enter, {
show_waiter(
spin_circle(),
color = "#87A96B",
"Just a moment ..."
)
######### inputs ... | /DOE/server.R | no_license | bmjpsc/NIST | R | false | false | 5,754 | r | rm(list=ls())
source("./Toman2019-ExpDesignAug14.R")
library(waiter)
shinyServer(function(input, output,session) {
observeEvent(input$enter, {
show_waiter(
spin_circle(),
color = "#87A96B",
"Just a moment ..."
)
######### inputs ... |
# manhattan plot of Fst
# install.packages("qqman")
# install.packages("caret")
install.packages("animation")
library(qqman)
library(dplyr)
library(caret)
library(tidyverse)
library(animation)
library(stringr)
require(data.table)
##### script for chromosome-wide plots
#DT1 <- fread("ch_ref_1kb_fold.fst")
#print(DT1)
... | /scripts/angsd_fst.R | permissive | hzz0024/hzz0024.github.io | R | false | false | 8,005 | r | # manhattan plot of Fst
# install.packages("qqman")
# install.packages("caret")
install.packages("animation")
library(qqman)
library(dplyr)
library(caret)
library(tidyverse)
library(animation)
library(stringr)
require(data.table)
##### script for chromosome-wide plots
#DT1 <- fread("ch_ref_1kb_fold.fst")
#print(DT1)
... |
library(ggplot2)
ggplot(covid_cases, aes(x = day, y = value)) +
geom_line(aes(color = variable, linetype = variable)) +
scale_color_manual(values = c("darkred", "steelblue", "gold", "orange1")) +
scale_linetype_manual (values = c("solid", "solid", "dotdash", "dotdash")) +
theme_minimal() + ylab("") + ggt... | /covid_diagram.R | no_license | sajtkukac12/EuroVisual | R | false | false | 385 | r | library(ggplot2)
ggplot(covid_cases, aes(x = day, y = value)) +
geom_line(aes(color = variable, linetype = variable)) +
scale_color_manual(values = c("darkred", "steelblue", "gold", "orange1")) +
scale_linetype_manual (values = c("solid", "solid", "dotdash", "dotdash")) +
theme_minimal() + ylab("") + ggt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom_timeline_label.R
\docType{data}
\name{GeomTimelineLabel}
\alias{GeomTimelineLabel}
\title{GeomTimelineLabel}
\format{An object of class \code{GeomTimeline} (inherits from \code{Geom}, \code{ggproto}, \code{gg}) of length 5.}
\usage{
Geom... | /man/GeomTimelineLabel.Rd | no_license | MagdyLaban/Mastering_Software_Development_in_R_Capstone_Coursera | R | false | true | 411 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom_timeline_label.R
\docType{data}
\name{GeomTimelineLabel}
\alias{GeomTimelineLabel}
\title{GeomTimelineLabel}
\format{An object of class \code{GeomTimeline} (inherits from \code{Geom}, \code{ggproto}, \code{gg}) of length 5.}
\usage{
Geom... |
setwd("/dmine/data/counties/")
counties <- readShapePoly('UScounties.shp',
proj4string=CRS
("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"))
projection = CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")
statez = c("Oregon")
Idaho_list1 <- c... | /climate_cropcombo_run.R | no_license | erichseamon/dmine-functions | R | false | false | 926 | r | setwd("/dmine/data/counties/")
counties <- readShapePoly('UScounties.shp',
proj4string=CRS
("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0"))
projection = CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")
statez = c("Oregon")
Idaho_list1 <- c... |
## I have created two functions makeCacheMatrix() and cacheSolve().
##
## makeCacheMatrix will be used to assign to parent variables and returns a list.
makeCacheMatrix <- function(myMatrix = matrix()) {
invMat <- NULL # Initializing the inverse matrix
set <- function(y) { ... | /cachematrix.R | no_license | nithin598/ProgrammingAssignment2 | R | false | false | 1,312 | r | ## I have created two functions makeCacheMatrix() and cacheSolve().
##
## makeCacheMatrix will be used to assign to parent variables and returns a list.
makeCacheMatrix <- function(myMatrix = matrix()) {
invMat <- NULL # Initializing the inverse matrix
set <- function(y) { ... |
MaxMinKmeans <- function(x, n, Min=0,Max,pstep=pstep,maxp=maxp,Beta=Beta) {
t=0
p=0
w=rep(1/n,n)
centernumbers = sample(nrow(x), n)
centers = matrix(nrow = n,ncol = ncol(x))
centers = x[centernumbers, ]
empty=FALSE
repeat{
t=t+1
distanc... | /Min_max_K_means/min max kmeans.R | no_license | Ritwik-Bhaduri/Machine-learning | R | false | false | 2,466 | r | MaxMinKmeans <- function(x, n, Min=0,Max,pstep=pstep,maxp=maxp,Beta=Beta) {
t=0
p=0
w=rep(1/n,n)
centernumbers = sample(nrow(x), n)
centers = matrix(nrow = n,ncol = ncol(x))
centers = x[centernumbers, ]
empty=FALSE
repeat{
t=t+1
distanc... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 8.58480268729839e+144, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615835230-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 270 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 8.58480268729839e+144, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist)
str(result) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.