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 |
|---|---|---|---|---|---|---|---|---|---|
# First Install packages
install.packages("rvest") #used for Webscraping
install.packages("xlsx") #used for converting into xlsv format
library(rvest)#load packages
library(xlsx)# load packages
#choose your url
data.url<-read_html("http://www.imdb.com/chart/toptv/?ref_=nv_tp_tv250_2")
#choose what y... | /Webscraping.R | no_license | Rameshkumar789/Web-Scraping-using-r | R | false | false | 656 | r | # First Install packages
install.packages("rvest") #used for Webscraping
install.packages("xlsx") #used for converting into xlsv format
library(rvest)#load packages
library(xlsx)# load packages
#choose your url
data.url<-read_html("http://www.imdb.com/chart/toptv/?ref_=nv_tp_tv250_2")
#choose what y... |
SCRgof <-
function(out,nx=6,ny=6,traplocs=NULL,buffer=2,Xl=NULL,Xu=NULL,Yl=NULL,Yu=NULL){
### need to have a "Discard" or shrink option, or provide trap locs?
## works with SCRf.fn output
## NEEDS "S" and state-space grid G --
## OR OR OR -- Just S if continuous space.
### needs "z" too
S<-out$s
Sxout<-S[,,1]
Syout<-S... | /Rpackage/scrbook/R/SCRgof.R | no_license | jaroyle/scrbook | R | false | false | 1,810 | r | SCRgof <-
function(out,nx=6,ny=6,traplocs=NULL,buffer=2,Xl=NULL,Xu=NULL,Yl=NULL,Yu=NULL){
### need to have a "Discard" or shrink option, or provide trap locs?
## works with SCRf.fn output
## NEEDS "S" and state-space grid G --
## OR OR OR -- Just S if continuous space.
### needs "z" too
S<-out$s
Sxout<-S[,,1]
Syout<-S... |
#-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this d... | /utils/R/run.write.configs.R | permissive | zhangwenx/pecan | R | false | false | 7,905 | r | #-------------------------------------------------------------------------------
# Copyright (c) 2012 University of Illinois, NCSA.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the
# University of Illinois/NCSA Open Source License
# which accompanies this d... |
## Open the webpage of an entity
##
## Author: Matthew D. Furia <matt.furia@sagebase.org>
##############################################################################
setMethod(
f = "onWeb",
signature = "numeric",
definition = function(entity){
onWeb(as.character(entity))
}
)
setMethod(
f = "onWeb",... | /R/onWeb.R | no_license | brian-bot/rSynapseClient | R | false | false | 866 | r | ## Open the webpage of an entity
##
## Author: Matthew D. Furia <matt.furia@sagebase.org>
##############################################################################
setMethod(
f = "onWeb",
signature = "numeric",
definition = function(entity){
onWeb(as.character(entity))
}
)
setMethod(
f = "onWeb",... |
#' addIntroJS
#'
#' Adds introJS to the shiny app. This function should be called in ui.r
#' This function performs all includes necessary for introJS and puts a green help button on the top right of the screen to start the help.
#' In server a call should be made to startIntroJS when the button is clicked.
#'
#' @para... | /tutorials/materials4/FrissIntroJSBasic/R/FrissIntroJS.R | permissive | Tixierae/shinyJsTutorials | R | false | false | 3,563 | r | #' addIntroJS
#'
#' Adds introJS to the shiny app. This function should be called in ui.r
#' This function performs all includes necessary for introJS and puts a green help button on the top right of the screen to start the help.
#' In server a call should be made to startIntroJS when the button is clicked.
#'
#' @para... |
## ---- message = FALSE----------------------------------------------------
# LIBRARIES -------------------------------------------------------------------#
library(tidyverse)
library(tidytext)
library(lubridate)
## ------------------------------------------------------------------------
# IMPORT DATA ---------------... | /cache/katiesaund|tidy_tuesday|2018-12-03_week_36__2018-12-03_medium_data_science_article_metadata.R | permissive | a-rosenberg/github-content-scraper | R | false | false | 4,473 | r | ## ---- message = FALSE----------------------------------------------------
# LIBRARIES -------------------------------------------------------------------#
library(tidyverse)
library(tidytext)
library(lubridate)
## ------------------------------------------------------------------------
# IMPORT DATA ---------------... |
library(shiny)
library(shinyjs)
NUM_PAGES <- 5
ui <- fluidPage(
useShinyjs(),
hidden(
lapply(seq(NUM_PAGES), function(i) {
div(
class = "page",
id = paste0("step", i),
"Step", i
)
})
),
br(),
actionButton("prevBtn", "< Previous"),
actionButton("nextBtn", "Next >... | /Shiny/different apps for shiny/previous_next.r | no_license | anjana3/R-Programming- | R | false | false | 798 | r | library(shiny)
library(shinyjs)
NUM_PAGES <- 5
ui <- fluidPage(
useShinyjs(),
hidden(
lapply(seq(NUM_PAGES), function(i) {
div(
class = "page",
id = paste0("step", i),
"Step", i
)
})
),
br(),
actionButton("prevBtn", "< Previous"),
actionButton("nextBtn", "Next >... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClasses.R
\name{GmtList}
\alias{GmtList}
\title{Convert a list to a GmtList object}
\usage{
GmtList(list)
}
\arguments{
\item{list}{A list of genesets; each geneset is a list of at least three fields: 'name', 'desc', and 'genes'. ... | /man/GmtList.Rd | no_license | planetMDX/BioQC | R | false | true | 1,191 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllClasses.R
\name{GmtList}
\alias{GmtList}
\title{Convert a list to a GmtList object}
\usage{
GmtList(list)
}
\arguments{
\item{list}{A list of genesets; each geneset is a list of at least three fields: 'name', 'desc', and 'genes'. ... |
### data cleaning, agreement and adjudication ###
### import Y15 reads from George and Yuka ###
gy_reads_pre = read_excel("data/raw_data/CARDIA Year 15 adjudication.xlsx")
gy_reads = gy_reads_pre %>% distinct(SID, .keep_all = TRUE)
### calculate kappa between george and yuka ###
gy_CLE = gy_reads %>% select(CLE1,CLE2... | /R/02_clean_agree_adjudicate.R | permissive | yoffeash/visual_reads_cardia_y15 | R | false | false | 2,329 | r | ### data cleaning, agreement and adjudication ###
### import Y15 reads from George and Yuka ###
gy_reads_pre = read_excel("data/raw_data/CARDIA Year 15 adjudication.xlsx")
gy_reads = gy_reads_pre %>% distinct(SID, .keep_all = TRUE)
### calculate kappa between george and yuka ###
gy_CLE = gy_reads %>% select(CLE1,CLE2... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Genotype.R
\name{Genotype}
\alias{Genotype}
\title{Genotype each cell for each region and plot the genotypes.}
\usage{
Genotype(
Obj_filtered = NULL,
xmax = NULL,
plot_path = NULL,
rds_path = NULL,
ref_gt = NULL,
cell_type = NULL,... | /man/Genotype.Rd | no_license | marcjwilliams1/Alleloscope | R | false | true | 1,224 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Genotype.R
\name{Genotype}
\alias{Genotype}
\title{Genotype each cell for each region and plot the genotypes.}
\usage{
Genotype(
Obj_filtered = NULL,
xmax = NULL,
plot_path = NULL,
rds_path = NULL,
ref_gt = NULL,
cell_type = NULL,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pep8.R
\name{summary.pepfit}
\alias{summary.pepfit}
\title{Summarize and print results from a pepfit}
\usage{
\method{summary}{pepfit}(object, digits = 3, ...)
}
\arguments{
\item{object}{A pepfit object}
\item{digits}{How many digits to pri... | /man/summary.pepfit.Rd | no_license | HegemanLab/ProteinTurnover | R | false | true | 821 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pep8.R
\name{summary.pepfit}
\alias{summary.pepfit}
\title{Summarize and print results from a pepfit}
\usage{
\method{summary}{pepfit}(object, digits = 3, ...)
}
\arguments{
\item{object}{A pepfit object}
\item{digits}{How many digits to pri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot2_helpers.R
\name{stat_bin_2d_integer}
\alias{stat_bin_2d_integer}
\title{stat_bin_2d_integer}
\usage{
stat_bin_2d_integer(
mapping = NULL,
data = NULL,
geom = "rect",
position = "identity",
na.rm = FALSE,
show.legend = NA,
... | /man/stat_bin_2d_integer.Rd | permissive | jan-glx/schelpr | R | false | true | 1,302 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot2_helpers.R
\name{stat_bin_2d_integer}
\alias{stat_bin_2d_integer}
\title{stat_bin_2d_integer}
\usage{
stat_bin_2d_integer(
mapping = NULL,
data = NULL,
geom = "rect",
position = "identity",
na.rm = FALSE,
show.legend = NA,
... |
#' @example
#' ## DGP
#' set.seed(2)
#' n <- 250
#' p <- 100
#' px <- 10
#' X <- matrix(rnorm(n*p), ncol=p)
#' beta <- c(rep(2,px), rep(0,p-px))
#' intercept <- 1
#' P <- exp(intercept + X %*% beta)/(1+exp(intercept + X %*% beta))
#' y <- numeric(length=250)
#' for(i in 1:n){
#' y[i] <- sample(x=c(1,0), s... | /tests/testthat/examples.R | no_license | cran/hdm | R | false | false | 2,275 | r | #' @example
#' ## DGP
#' set.seed(2)
#' n <- 250
#' p <- 100
#' px <- 10
#' X <- matrix(rnorm(n*p), ncol=p)
#' beta <- c(rep(2,px), rep(0,p-px))
#' intercept <- 1
#' P <- exp(intercept + X %*% beta)/(1+exp(intercept + X %*% beta))
#' y <- numeric(length=250)
#' for(i in 1:n){
#' y[i] <- sample(x=c(1,0), s... |
#' Solubility predictions from MARS model
#'
#' @details For the solubility data in Kuhn and Johnson (2013),
#' these data are the test set results for the MARS model. The
#' observed solubility (in column `solubility`) and the model
#' results (`prediction`) are contained in the data.
#'
#' @name solubility_test
#'... | /R/solubility.R | permissive | tidymodels/modeldata | R | false | false | 590 | r | #' Solubility predictions from MARS model
#'
#' @details For the solubility data in Kuhn and Johnson (2013),
#' these data are the test set results for the MARS model. The
#' observed solubility (in column `solubility`) and the model
#' results (`prediction`) are contained in the data.
#'
#' @name solubility_test
#'... |
\name{gapfillerInstallation}
\alias{gapfillerInstallation}
\title{A function to download a compiled version of GapFiller}
\description{A function allowing the download and installation of a compiled version of GapFiller in chimera package folder.
The source code of GapFiller can be retrieved at http://sourceforge.net/p... | /man/gapfillerInstallation.Rd | no_license | inambioinfo/chimera | R | false | false | 797 | rd | \name{gapfillerInstallation}
\alias{gapfillerInstallation}
\title{A function to download a compiled version of GapFiller}
\description{A function allowing the download and installation of a compiled version of GapFiller in chimera package folder.
The source code of GapFiller can be retrieved at http://sourceforge.net/p... |
#Load the data
source("load_household_power_consumption.R")
# Plot a line graph of Sub metering over time
png( 'plot3.png', width = 480, height = 480, bg='white' )
plot( Sub_metering_1 ~ DateTime, data=household,
col="black",
type="l",
ylab="Energy sub metering",
xlab=""
)
points( Sub_metering_2 ~ DateTime, d... | /plot3.R | no_license | ghtest964/ExData_Plotting1 | R | false | false | 617 | r |
#Load the data
source("load_household_power_consumption.R")
# Plot a line graph of Sub metering over time
png( 'plot3.png', width = 480, height = 480, bg='white' )
plot( Sub_metering_1 ~ DateTime, data=household,
col="black",
type="l",
ylab="Energy sub metering",
xlab=""
)
points( Sub_metering_2 ~ DateTime, d... |
# Week 6 R Assignment:
# I really couldn't find any interesting data that wasn't in a dynamic table of some sort so I just used the test one in the textbook:
# URL: http://jaredlander.com/2012/02/another-kind-of-super-bowl-pool/
require(XML)
theURL <- "http://jaredlander.com/2012/02/another-kind-of-super-bowl-pool/"
... | /Week 6/Week 6 R Assignment.R | no_license | spenglerss/MSDABridgeCourse | R | false | false | 1,672 | r | # Week 6 R Assignment:
# I really couldn't find any interesting data that wasn't in a dynamic table of some sort so I just used the test one in the textbook:
# URL: http://jaredlander.com/2012/02/another-kind-of-super-bowl-pool/
require(XML)
theURL <- "http://jaredlander.com/2012/02/another-kind-of-super-bowl-pool/"
... |
#Plot 3 in Exploratory Data Analysis, week 1 Project 1
#plot3.R
# Household power consumption data URL
furl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
flocal <- "./data/hpconsumption.zip"
download.file(furl,flocal)
#unzip downloaded file
unzip(flocal,exdir="./data")
... | /plot3.R | no_license | johnwshc/ExData_Plotting1 | R | false | false | 1,441 | r | #Plot 3 in Exploratory Data Analysis, week 1 Project 1
#plot3.R
# Household power consumption data URL
furl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
flocal <- "./data/hpconsumption.zip"
download.file(furl,flocal)
#unzip downloaded file
unzip(flocal,exdir="./data")
... |
#install.packages("jsonlite")
library(jsonlite)
#install.packages("httpuv")
library(httpuv)
#install.packages("httr")
library(httr)
# Can be github, linkedin etc depending on application
oauth_endpoints("github")
# Change based on what your github is
myapp <- oauth_app(appname = "Interrogate API",
... | /API Social Graphs.R | no_license | newmanci/Github-API | R | false | false | 5,508 | r |
#install.packages("jsonlite")
library(jsonlite)
#install.packages("httpuv")
library(httpuv)
#install.packages("httr")
library(httr)
# Can be github, linkedin etc depending on application
oauth_endpoints("github")
# Change based on what your github is
myapp <- oauth_app(appname = "Interrogate API",
... |
# R.code_no2.r
# Fase 0: importiamo le librerie di cui abbiamo bisogno
# i pacchetti li mettiamo sempre all'inizio
require(raster)
require(RStoolbox)
# Fase 1: set della working directory sulla cartella EN (dove sono stati messi i dati)
setwd("C:/lab/EN")
# Fase 2: importiamo i dati
# vogliamo selezionare il primo s... | /R_code_no2.r | no_license | chiarasalv23/telerilevamento_2021 | R | false | false | 2,340 | r | # R.code_no2.r
# Fase 0: importiamo le librerie di cui abbiamo bisogno
# i pacchetti li mettiamo sempre all'inizio
require(raster)
require(RStoolbox)
# Fase 1: set della working directory sulla cartella EN (dove sono stati messi i dati)
setwd("C:/lab/EN")
# Fase 2: importiamo i dati
# vogliamo selezionare il primo s... |
library(tidyverse)
library(glmnet)
library(survival)
# create a function to calculate COV for all CpGs and store the CpG ids for the thresholds specified in the n_ftr argument
ftr_sel <- function(x,n_ftr) {
sd=apply(x,2,sd)
mean=apply(x,2,mean)
cov = abs(sd/mean)
sorted_cov <- sort(cov,index.return=TR... | /IHD incidence/3.1DNAm(coxpredictor)_coxanlysis.R | no_license | s1914807/MSc-dissertation | R | false | false | 1,925 | r | library(tidyverse)
library(glmnet)
library(survival)
# create a function to calculate COV for all CpGs and store the CpG ids for the thresholds specified in the n_ftr argument
ftr_sel <- function(x,n_ftr) {
sd=apply(x,2,sd)
mean=apply(x,2,mean)
cov = abs(sd/mean)
sorted_cov <- sort(cov,index.return=TR... |
#' @title Bayesian Discount Prior: Binomial counts
#' @description \code{bdpbinomial} is used for estimating posterior samples from a
#' Binomial outcome where an informative prior is used. The prior weight
#' is determined using a discount function. This code is modeled after
#' the methodologies developed in Ha... | /R/bdpbinomial.R | no_license | gitter-badger/bayesDP | R | false | false | 21,459 | r | #' @title Bayesian Discount Prior: Binomial counts
#' @description \code{bdpbinomial} is used for estimating posterior samples from a
#' Binomial outcome where an informative prior is used. The prior weight
#' is determined using a discount function. This code is modeled after
#' the methodologies developed in Ha... |
fedFunds <- read.csv("federalFundsRate.csv", stringsAsFactors=FALSE)
table(fedFunds$RaisedFedFunds)
## 0 1
## 291 294
294 / (291+294)
fedFunds$Chairman <- as.factor(fedFunds$Chairman)
fedFunds$DemocraticPres <- as.factor(fedFunds$DemocraticPres)
fedFunds$RaisedFedFunds <- as.factor(fedFunds$RaisedFedFunds)
##... | /final.exam/federalFundsRate.R | no_license | diegoo/analytics.edge.mit | R | false | false | 3,865 | r | fedFunds <- read.csv("federalFundsRate.csv", stringsAsFactors=FALSE)
table(fedFunds$RaisedFedFunds)
## 0 1
## 291 294
294 / (291+294)
fedFunds$Chairman <- as.factor(fedFunds$Chairman)
fedFunds$DemocraticPres <- as.factor(fedFunds$DemocraticPres)
fedFunds$RaisedFedFunds <- as.factor(fedFunds$RaisedFedFunds)
##... |
library(BNPdensity)
### Name: fcondYZXA
### Title: Conditional posterior distribution of the bivariate latents
### (Y,Z)
### Aliases: fcondYZXA
### Keywords: internal
### ** Examples
## The function is currently defined as
function (x, distr = 1, Tauy, Tauz, J)
{
K <- matrix(NA, nrow = length(Tauy), ncol = l... | /data/genthat_extracted_code/BNPdensity/examples/fcondYZXA.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 722 | r | library(BNPdensity)
### Name: fcondYZXA
### Title: Conditional posterior distribution of the bivariate latents
### (Y,Z)
### Aliases: fcondYZXA
### Keywords: internal
### ** Examples
## The function is currently defined as
function (x, distr = 1, Tauy, Tauz, J)
{
K <- matrix(NA, nrow = length(Tauy), ncol = l... |
#
# use the plumber library
#
library(plumber)
#
# get the command line argumnets
#
args <-commandArgs(TRUE)
if (length(args) < 2) {
stop("Please supply the script and the Rdata file")
}
#
# script to run
#
script <- args[1]
#
# Rdata to load
#
rdatafile <- args[2]
print(paste0("Loading ", rdatafile))
load(r... | /docker_qtl/run_plumber.R | no_license | churchill-lab/qtl_api_docker | R | false | false | 405 | r | #
# use the plumber library
#
library(plumber)
#
# get the command line argumnets
#
args <-commandArgs(TRUE)
if (length(args) < 2) {
stop("Please supply the script and the Rdata file")
}
#
# script to run
#
script <- args[1]
#
# Rdata to load
#
rdatafile <- args[2]
print(paste0("Loading ", rdatafile))
load(r... |
context('geom_balance')
test_that('geom_balance gives proper errors if called on non-binary node', {
tr <- ape::read.tree(text="(t2:0.1280947195,(t4:0.2642134866,(t3:0.9758362926,(t1:0.3494729637,t5:0.189841171,t6:0.189841171):0.7222939907):0.3401968146):0.5143072554);")
# Note: For some reason while ggplot wil... | /B_analysts_sources_github/GuangchuangYu/bioc-release/test-geom_balance.R | no_license | Irbis3/crantasticScrapper | R | false | false | 752 | r | context('geom_balance')
test_that('geom_balance gives proper errors if called on non-binary node', {
tr <- ape::read.tree(text="(t2:0.1280947195,(t4:0.2642134866,(t3:0.9758362926,(t1:0.3494729637,t5:0.189841171,t6:0.189841171):0.7222939907):0.3401968146):0.5143072554);")
# Note: For some reason while ggplot wil... |
library(tidyLPA)
### Name: mplusAvailable
### Title: Check whether Mplus can be found
### Aliases: mplusAvailable
### Keywords: interface
### ** Examples
mplusAvailable(silent = TRUE)
mplusAvailable(silent = FALSE)
| /data/genthat_extracted_code/tidyLPA/examples/mplusAvailable.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 223 | r | library(tidyLPA)
### Name: mplusAvailable
### Title: Check whether Mplus can be found
### Aliases: mplusAvailable
### Keywords: interface
### ** Examples
mplusAvailable(silent = TRUE)
mplusAvailable(silent = FALSE)
|
## Put comments here that give an overall description of what your
## functions do
## makeCacheMatrix: creates a special 'matrix' object that caches its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(solve) m ... | /cachematrix.R | no_license | gsera/ProgrammingAssignment2 | R | false | false | 912 | r | ## Put comments here that give an overall description of what your
## functions do
## makeCacheMatrix: creates a special 'matrix' object that caches its inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(solve) m ... |
## Programming assignment #2
## Matrix inversion is usually a costly computation and there may be some benefit to caching
## the inverse of a matrix rather than computing it repeatedly
## This assignment is to write a pair of functions that cache the inverse of a matrix.
##The first function, makeCacheMatrix create... | /cachematrix.R | no_license | databond007/ProgrammingAssignment2 | R | false | false | 1,226 | r | ## Programming assignment #2
## Matrix inversion is usually a costly computation and there may be some benefit to caching
## the inverse of a matrix rather than computing it repeatedly
## This assignment is to write a pair of functions that cache the inverse of a matrix.
##The first function, makeCacheMatrix create... |
################################################################################
## Dependencies ##
################################################################################
#create uniq list of arabidopsis genes in metabolic and microarray sim-matrix... | /c_elegans/GO_similarity_mf/code/GO_similarity_mf.R | no_license | andquintero/ZYFCON | R | false | false | 4,053 | r | ################################################################################
## Dependencies ##
################################################################################
#create uniq list of arabidopsis genes in metabolic and microarray sim-matrix... |
rm(list = ls())
library("DICE")
mod_name = c(NAME_2="LR")
data = get.DICE.data(data_source=NULL, mod_level=2, mod_name=mod_name, fit_level=3, year=2014, db_opts=list(DICE_db="predsci", CDC_server=FALSE), disease="ebola")
mydata = data$mydata
dates = mydata$dates
cases = mydata$model$raw
data.to.save = data.frame... | /examples/prepare_lr_ebola_data.R | no_license | predsci/DRAFT-BSEIR | R | false | false | 443 | r | rm(list = ls())
library("DICE")
mod_name = c(NAME_2="LR")
data = get.DICE.data(data_source=NULL, mod_level=2, mod_name=mod_name, fit_level=3, year=2014, db_opts=list(DICE_db="predsci", CDC_server=FALSE), disease="ebola")
mydata = data$mydata
dates = mydata$dates
cases = mydata$model$raw
data.to.save = data.frame... |
testlist <- list(a = 404232216L, b = 404232216L, x = integer(0))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610129107-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 125 | r | testlist <- list(a = 404232216L, b = 404232216L, x = integer(0))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
#' @importFrom methods is
#' @importFrom R6 R6Class
Predictor <- R6::R6Class(
classname = "lgb.Predictor",
cloneable = FALSE,
public = list(
# Finalize will free up the handles
finalize = function() {
# Check the need for freeing handle
if (private$need_free_handle && !lgb.is.null.handle(pr... | /R-package/R/lgb.Predictor.R | permissive | skyjiao/LightGBM | R | false | false | 5,919 | r | #' @importFrom methods is
#' @importFrom R6 R6Class
Predictor <- R6::R6Class(
classname = "lgb.Predictor",
cloneable = FALSE,
public = list(
# Finalize will free up the handles
finalize = function() {
# Check the need for freeing handle
if (private$need_free_handle && !lgb.is.null.handle(pr... |
# Databricks notebook source
# MAGIC %md
# MAGIC # Horizontal scaling of R workloads using `sparklyr`
# MAGIC 
# COMMAND ----------
library('sparklyr')
l... | /notebooks/Users/debajyoti.roy@databricks.com/forecast/Scaling ts-forecast in R.r | no_license | royatdb/scalingr | R | false | false | 3,184 | r | # Databricks notebook source
# MAGIC %md
# MAGIC # Horizontal scaling of R workloads using `sparklyr`
# MAGIC 
# COMMAND ----------
library('sparklyr')
l... |
##################################################################
# A Meta-Analysis of Research in Random Forests for Classification
##################################################################
# required packages from bioconductor for scmamp package
source("https://bioconductor.org/biocLite.R")
biocLite("graph... | /src/h_testing.R | no_license | arnupretorius/betterInitAtLimitedDepth_2019 | R | false | false | 3,987 | r | ##################################################################
# A Meta-Analysis of Research in Random Forests for Classification
##################################################################
# required packages from bioconductor for scmamp package
source("https://bioconductor.org/biocLite.R")
biocLite("graph... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run.R
\name{k_by}
\alias{k_by}
\title{Converts k and lag from time-unit-interval to int}
\usage{
k_by(k, idx, param)
}
\arguments{
\item{k}{(\code{integer} vector or single value)\cr
Denoting size of the running window. If \code{k} is a singl... | /man/k_by.Rd | no_license | salva/runner | R | false | true | 1,331 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run.R
\name{k_by}
\alias{k_by}
\title{Converts k and lag from time-unit-interval to int}
\usage{
k_by(k, idx, param)
}
\arguments{
\item{k}{(\code{integer} vector or single value)\cr
Denoting size of the running window. If \code{k} is a singl... |
## Homework 4, Problem 1
library(dplyr)
## Read the data
houseWork <- read.csv('https://s3.eu-central-1.amazonaws.com/econometrics2018/data/houseWork.csv')
str(houseWork)
## a)
summary(houseWork$sex)
## b)
muf <- mean(houseWork$hours[houseWork$sex == 'f'])
mum <- mean(houseWork$hours[houseWork$sex == 'm'])
## c)
... | /Problem_1.R | no_license | feb-uni-sofia/econometrics2018-homework-4-aaan | R | false | false | 2,187 | r | ## Homework 4, Problem 1
library(dplyr)
## Read the data
houseWork <- read.csv('https://s3.eu-central-1.amazonaws.com/econometrics2018/data/houseWork.csv')
str(houseWork)
## a)
summary(houseWork$sex)
## b)
muf <- mean(houseWork$hours[houseWork$sex == 'f'])
mum <- mean(houseWork$hours[houseWork$sex == 'm'])
## c)
... |
library(data.table)
library(kernlab)
library(np)
adf = read.csv("~/Dropbox/css_models/adf.csv")
fdf = read.csv("~/Dropbox/css_models/fdf.csv")
# Zeroing out people observing their own relationships
adf0 = adf
fdf0 = fdf
for(i in 1:nrow(adf)){
sender = paste("X", adf[i, "sender"] +1, sep="")
receiver = pa... | /svm_em.r | permissive | amloewi/css-blockmodels | R | false | false | 2,356 | r | library(data.table)
library(kernlab)
library(np)
adf = read.csv("~/Dropbox/css_models/adf.csv")
fdf = read.csv("~/Dropbox/css_models/fdf.csv")
# Zeroing out people observing their own relationships
adf0 = adf
fdf0 = fdf
for(i in 1:nrow(adf)){
sender = paste("X", adf[i, "sender"] +1, sep="")
receiver = pa... |
#This is the code for extracting and plotting macro data for an intro to macro course
setwd("p://test-repo/Macroclass/")
#FRED has a very convenient interface with Excel. The data were first downloaded into excel where they were
#manipulated into a usable form. Thus, I will be importing from this excel file.
#Constr... | /R-MacroCode.R | no_license | greegreg/Macroclass | R | false | false | 3,263 | r | #This is the code for extracting and plotting macro data for an intro to macro course
setwd("p://test-repo/Macroclass/")
#FRED has a very convenient interface with Excel. The data were first downloaded into excel where they were
#manipulated into a usable form. Thus, I will be importing from this excel file.
#Constr... |
#################################
###########################################################
# BACKWARDS-BLOCKING NEURAL-NETWORK SCRIPT #
###########################################################
#################################
# This script can be used to generate a pretrainin... | /neural_network_scipts/neural_network_script.R | no_license | dtbenton/backwards_block_submission | R | false | false | 11,397 | r | #################################
###########################################################
# BACKWARDS-BLOCKING NEURAL-NETWORK SCRIPT #
###########################################################
#################################
# This script can be used to generate a pretrainin... |
setwd("~/Documents/R Source and Data Files")
hpcfile <- "./data/household_power_consumption.txt"
plotfn <- "./plot2.png"
#Read 1 record to get column names
cols <- read.table(hpcfile, header=T, sep = ";", nrows=1, check.names=T)
#Read just the data for Feb. 1&2, 2007
#analysis was run on file to determine position of d... | /plot2.R | no_license | mojohammer/ExData_Plotting1 | R | false | false | 824 | r | setwd("~/Documents/R Source and Data Files")
hpcfile <- "./data/household_power_consumption.txt"
plotfn <- "./plot2.png"
#Read 1 record to get column names
cols <- read.table(hpcfile, header=T, sep = ";", nrows=1, check.names=T)
#Read just the data for Feb. 1&2, 2007
#analysis was run on file to determine position of d... |
#!/usr/bin/env Rscript
args = commandArgs(trailingOnly = TRUE)
# Import libraries
library(tidyverse)
# Collect variables from bash script
mikk_all = args[1]
mikk_1 = args[2]
mikk_2 = args[3]
out_file = args[4]
# Read in data
mikk_all = readr::read_tsv(mikk_all,
col_types = "iiccdiiiii"... | /code/scripts/introgression/20210315_combine_all_mikk_freq_tables.R | permissive | birneylab/MIKK_genome_main_paper | R | false | false | 914 | r | #!/usr/bin/env Rscript
args = commandArgs(trailingOnly = TRUE)
# Import libraries
library(tidyverse)
# Collect variables from bash script
mikk_all = args[1]
mikk_1 = args[2]
mikk_2 = args[3]
out_file = args[4]
# Read in data
mikk_all = readr::read_tsv(mikk_all,
col_types = "iiccdiiiii"... |
#' ---
#' title: "Class 5 live demo: Survival estimation"
#' author: "The team"
#' date: "last updated: `r Sys.Date()`"
#' output: html_document
#' ---
#'
#'
## ----setup, include=FALSE, echo=FALSE, message=FALSE, warning=FALSE---------------------------------------
options(htmltools.dir.version = FALSE)
knitr::opts_... | /docs/worksheets/4_demo.R | permissive | depocen/bayesian-cr-workshop | R | false | false | 41,245 | r | #' ---
#' title: "Class 5 live demo: Survival estimation"
#' author: "The team"
#' date: "last updated: `r Sys.Date()`"
#' output: html_document
#' ---
#'
#'
## ----setup, include=FALSE, echo=FALSE, message=FALSE, warning=FALSE---------------------------------------
options(htmltools.dir.version = FALSE)
knitr::opts_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_library.R
\name{addPackage}
\alias{addPackage}
\title{Add R package to a project}
\usage{
addPackage(
project.id = getProject(),
library.name,
library.install = NA,
library.specific = FALSE
)
}
\arguments{
\item{project.id}{projec... | /man/addPackage.Rd | no_license | gelfondjal/adapr | R | false | true | 799 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_library.R
\name{addPackage}
\alias{addPackage}
\title{Add R package to a project}
\usage{
addPackage(
project.id = getProject(),
library.name,
library.install = NA,
library.specific = FALSE
)
}
\arguments{
\item{project.id}{projec... |
A <- matrix(c(1, 18, 13, 8,
23, 4, 13, 0,
6, 32, 1, 1,
20, 5, 11, 4,
15, 17, 7, 1),
nrow=4, ncol=5)
pdf("exp10.pdf", width=16/2.54, height=10/2.54,
pointsize=10)
par(mgp=c(2.2,0.45,0), tcl=-0.4, mar=c(3.3,3.6,1.1,1.1))
barplot(A,
names.ar... | /PAPER/PLOT/EXP/script/exp10.R | no_license | syamgullipalli/collective-decision-making | R | false | false | 688 | r | A <- matrix(c(1, 18, 13, 8,
23, 4, 13, 0,
6, 32, 1, 1,
20, 5, 11, 4,
15, 17, 7, 1),
nrow=4, ncol=5)
pdf("exp10.pdf", width=16/2.54, height=10/2.54,
pointsize=10)
par(mgp=c(2.2,0.45,0), tcl=-0.4, mar=c(3.3,3.6,1.1,1.1))
barplot(A,
names.ar... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kinship.emp.R
\name{kinship.emp}
\alias{kinship.emp}
\title{Empirical kinship}
\usage{
kinship.emp(
animals = NULL,
population = NULL,
gen = NULL,
database = NULL,
cohorts = NULL,
sym = FALSE
)
}
\arguments{
\item{... | /man/kinship.emp.Rd | no_license | cran/MoBPS | R | false | true | 959 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kinship.emp.R
\name{kinship.emp}
\alias{kinship.emp}
\title{Empirical kinship}
\usage{
kinship.emp(
animals = NULL,
population = NULL,
gen = NULL,
database = NULL,
cohorts = NULL,
sym = FALSE
)
}
\arguments{
\item{... |
### Build a new version of the package
#remove.packages("BayesSUR")
#Rcpp::compileAttributes(pkgdir="BayesSUR/")
#tools::resaveRdaFiles("BayesSUR/data/example_GDSC.rda", compress="xz")
#devtools::document("BayesSUR")
#devtools::build("BayesSUR", vignettes=TRUE, args="--compact-vignettes=both")
# $ R CMD check ./BayesS... | /test.R | permissive | ocbe-uio/BayesSUR | R | false | false | 1,786 | r | ### Build a new version of the package
#remove.packages("BayesSUR")
#Rcpp::compileAttributes(pkgdir="BayesSUR/")
#tools::resaveRdaFiles("BayesSUR/data/example_GDSC.rda", compress="xz")
#devtools::document("BayesSUR")
#devtools::build("BayesSUR", vignettes=TRUE, args="--compact-vignettes=both")
# $ R CMD check ./BayesS... |
#This R Script contain only server Code
# calling required libraries
library(shiny)
library(RPostgreSQL)
library(DT)
# making connection with postgresSQL to a defined database
con <- DBI::dbConnect(
drv = dbDriver("PostgreSQL", max.con = 100),
dbname = "mydb",
host = "localhost",
user = "V-Arora",
passwor... | /server.R | no_license | nishaverma21/R-ShinyPracticeAPP | R | false | false | 8,426 | r | #This R Script contain only server Code
# calling required libraries
library(shiny)
library(RPostgreSQL)
library(DT)
# making connection with postgresSQL to a defined database
con <- DBI::dbConnect(
drv = dbDriver("PostgreSQL", max.con = 100),
dbname = "mydb",
host = "localhost",
user = "V-Arora",
passwor... |
#' Model Response Styles in Partial Credit Models
#'
#' Performs PCMRS, a method to model response styles in Partial Credit Models
#'
#'
#' @name PCMRS-package
#' @docType package
#' @author Gunther Schauberger\cr \email{gunther.schauberger@@tum.de}\cr
#' \url{https://www.sg.tum.de/epidemiologie/team/sch... | /fuzzedpackages/PCMRS/R/PCMRS-package.R | no_license | akhikolla/testpackages | R | false | false | 5,912 | r |
#' Model Response Styles in Partial Credit Models
#'
#' Performs PCMRS, a method to model response styles in Partial Credit Models
#'
#'
#' @name PCMRS-package
#' @docType package
#' @author Gunther Schauberger\cr \email{gunther.schauberger@@tum.de}\cr
#' \url{https://www.sg.tum.de/epidemiologie/team/sch... |
Which_data <-
function (RANDOM, data, init, GS)
{
if (GS == FALSE) {
if (RANDOM == TRUE) {
sv = numeric()
sv2 = numeric()
svrs = numeric()
result = list(sv, sv2, svrs)
return(result)
}
else {
sv = init[[1]]
... | /src/R/HSROC/R/Which_data.R | no_license | bwallace/OpenMeta-analyst- | R | false | false | 868 | r | Which_data <-
function (RANDOM, data, init, GS)
{
if (GS == FALSE) {
if (RANDOM == TRUE) {
sv = numeric()
sv2 = numeric()
svrs = numeric()
result = list(sv, sv2, svrs)
return(result)
}
else {
sv = init[[1]]
... |
#' @title Add Funding Element
#' @description Creates the award information of a project based off of EML standards.
#' This award element is then nested within a project node to complete a funding section.
#' @param funder_name Organization or individual providing the funding. If applicable,
#' use one of the follo... | /R/funding-element.R | permissive | ErinCain/EDIutils | R | false | false | 3,820 | r | #' @title Add Funding Element
#' @description Creates the award information of a project based off of EML standards.
#' This award element is then nested within a project node to complete a funding section.
#' @param funder_name Organization or individual providing the funding. If applicable,
#' use one of the follo... |
# version 1 (2017/02/05): first version
# version 2 (2017/02/06): randomly sample a class if there is a tie
library(DECIPHER)
value <- "Baseline" # name of the run
K <- 8 # k-mer size
S <- function(N) ceiling(32/(1 + exp(-1.445*(log(N) - log(44.33)))))
B <- 1000 # bootstrap replicates
LOOS <- TRUE # perform ... | /Classifier_v2.R | no_license | TurbulentCupcake/tfidfPredictorScripts | R | false | false | 5,948 | r | # version 1 (2017/02/05): first version
# version 2 (2017/02/06): randomly sample a class if there is a tie
library(DECIPHER)
value <- "Baseline" # name of the run
K <- 8 # k-mer size
S <- function(N) ceiling(32/(1 + exp(-1.445*(log(N) - log(44.33)))))
B <- 1000 # bootstrap replicates
LOOS <- TRUE # perform ... |
# Create a line graph of mean of friendships_initiated per day (of tenure)
# vs. tenure colored by year_joined.bucket.
# You need to make use of the variables tenure,
# friendships_initiated, and year_joined.bucket.
# You also need to subset the data to only consider user with at least
# one day of tenure.
# This as... | /Data Analysis with R/L5 Explore Many Variables/FriendshipsInitiated.R | no_license | DataUnicorn/Udacity | R | false | false | 904 | r | # Create a line graph of mean of friendships_initiated per day (of tenure)
# vs. tenure colored by year_joined.bucket.
# You need to make use of the variables tenure,
# friendships_initiated, and year_joined.bucket.
# You also need to subset the data to only consider user with at least
# one day of tenure.
# This as... |
diffexplmonewayanovarepeat <-
function(dataA,subject_inf,analysismode="classification",modeltype="RIRS",covar.matrix=NA){
dataA<-as.data.frame(dataA)
if(analysismode=="classification"){
dataA$Factor1<-as.factor(dataA$Factor1)
}
Subject<-subject_inf
dataA<-cbind(dataA,subject_inf)
##savedataA,fi... | /R/diffexplmonewayanovarepeat.R | no_license | kuppal2/xmsPANDA | R | false | false | 2,520 | r | diffexplmonewayanovarepeat <-
function(dataA,subject_inf,analysismode="classification",modeltype="RIRS",covar.matrix=NA){
dataA<-as.data.frame(dataA)
if(analysismode=="classification"){
dataA$Factor1<-as.factor(dataA$Factor1)
}
Subject<-subject_inf
dataA<-cbind(dataA,subject_inf)
##savedataA,fi... |
###############
## Functions ##
###############
## Utility functions that can be optionally used later for producing
## graphs and performing reshaping operations
## With some edits for a higher trymax and change to heatmap code
# Call variables from parent scope
`..` <- function (..., .env = sys.parent(2)) {
get(de... | /scripts/meg_utility_functions.R | permissive | TheNoyesLab/Rumen_project | R | false | false | 69,968 | r | ###############
## Functions ##
###############
## Utility functions that can be optionally used later for producing
## graphs and performing reshaping operations
## With some edits for a higher trymax and change to heatmap code
# Call variables from parent scope
`..` <- function (..., .env = sys.parent(2)) {
get(de... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CNOT3_01.R
\name{CNOT3_01}
\alias{CNOT3_01}
\title{3 qubit CNOT gate (control-0,target-1)}
\usage{
CNOT3_01(a)
}
\arguments{
\item{a}{The input}
}
\value{
result
The result of applying the CNOT3_01 gate
}
\description{
This fu... | /man/CNOT3_01.Rd | no_license | cran/QCSimulator | R | false | true | 1,006 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CNOT3_01.R
\name{CNOT3_01}
\alias{CNOT3_01}
\title{3 qubit CNOT gate (control-0,target-1)}
\usage{
CNOT3_01(a)
}
\arguments{
\item{a}{The input}
}
\value{
result
The result of applying the CNOT3_01 gate
}
\description{
This fu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sagemaker_operations.R
\name{sagemaker_list_workforces}
\alias{sagemaker_list_workforces}
\title{Use this operation to list all private and vendor workforces in an
Amazon Web Services Region}
\usage{
sagemaker_list_workforces(
SortBy = NULL... | /cran/paws.machine.learning/man/sagemaker_list_workforces.Rd | permissive | paws-r/paws | R | false | true | 1,102 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sagemaker_operations.R
\name{sagemaker_list_workforces}
\alias{sagemaker_list_workforces}
\title{Use this operation to list all private and vendor workforces in an
Amazon Web Services Region}
\usage{
sagemaker_list_workforces(
SortBy = NULL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/profit_max.R
\name{profit_max}
\alias{profit_max}
\title{profit_max}
\usage{
profit_max(cost, salesP1, salesP2, priceP1, priceP2, na.rm = TRUE)
}
\arguments{
\item{cost, }{numeric, cost of the SKU.}
\item{salesP1, }{integer, unit sales in pe... | /man/profit_max.Rd | no_license | cran/inventorize | R | false | true | 1,597 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/profit_max.R
\name{profit_max}
\alias{profit_max}
\title{profit_max}
\usage{
profit_max(cost, salesP1, salesP2, priceP1, priceP2, na.rm = TRUE)
}
\arguments{
\item{cost, }{numeric, cost of the SKU.}
\item{salesP1, }{integer, unit sales in pe... |
test_that("pden", {
m <- matrix(c(1, 2, 3, 4,
2, 2, 3, 4,
3, 3, 3, 4,
4, 4, 4, NA), nrow=4, ncol=4)
p1 <- 0.05
p2 <- (0.1 - 0.05) / 3
p3 <- (0.2 - 0.1) / 5
p4 <- (0.4 - 0.2) / 6
res <- pden(m, values=1:4, probs=c(0.05, 0.1, 0.2, 0.4))
expect_equal(res,
... | /tests/testthat/test-pden.R | no_license | beerda/hexmatrix | R | false | false | 497 | r | test_that("pden", {
m <- matrix(c(1, 2, 3, 4,
2, 2, 3, 4,
3, 3, 3, 4,
4, 4, 4, NA), nrow=4, ncol=4)
p1 <- 0.05
p2 <- (0.1 - 0.05) / 3
p3 <- (0.2 - 0.1) / 5
p4 <- (0.4 - 0.2) / 6
res <- pden(m, values=1:4, probs=c(0.05, 0.1, 0.2, 0.4))
expect_equal(res,
... |
# Script to scrape geo-references images from Google maps and save as geotiffs
library(ggmap) # install.packages('ggmap') must be run first - same for 'raster'
library(raster)
gc <- as.numeric(geocode("LS2 9JT")) # centre point of the raster images to grab
ggmap(get_map(location = gc))
gm <- get_map(location = gc, zoom... | /vignettes/download-raster.R | no_license | npp97-field/Creating-maps-in-R | R | false | false | 2,072 | r | # Script to scrape geo-references images from Google maps and save as geotiffs
library(ggmap) # install.packages('ggmap') must be run first - same for 'raster'
library(raster)
gc <- as.numeric(geocode("LS2 9JT")) # centre point of the raster images to grab
ggmap(get_map(location = gc))
gm <- get_map(location = gc, zoom... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/variables.R
\name{code_hh_size}
\alias{code_hh_size}
\title{Household total size}
\usage{
code_hh_size(input_data, wave)
}
\arguments{
\item{input_data}{input data frame of raw survey data}
\item{wave}{integer indicating survey version}
}
\v... | /facebook/delphiFacebook/man/code_hh_size.Rd | permissive | alexcoda/covidcast-indicators | R | false | true | 409 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/variables.R
\name{code_hh_size}
\alias{code_hh_size}
\title{Household total size}
\usage{
code_hh_size(input_data, wave)
}
\arguments{
\item{input_data}{input data frame of raw survey data}
\item{wave}{integer indicating survey version}
}
\v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internal.R
\name{.croparray}
\alias{.croparray}
\title{Crop array of extent e to extent ecrop}
\usage{
.croparray(a, e, ecrop)
}
\description{
Crop array of extent e to extent ecrop
}
| /man/dot-croparray.Rd | no_license | ilyamaclean/UKCP18adjust | R | false | true | 262 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internal.R
\name{.croparray}
\alias{.croparray}
\title{Crop array of extent e to extent ecrop}
\usage{
.croparray(a, e, ecrop)
}
\description{
Crop array of extent e to extent ecrop
}
|
## Put comments here that give an overall description of what your
## functions do
## Caching the Inverse of a Matrix:
## 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.
## Below are a pair of functions that are us... | /cachematrix.R | no_license | kakraba6/ProgrammingAssignment2 | R | false | false | 2,205 | r |
## Put comments here that give an overall description of what your
## functions do
## Caching the Inverse of a Matrix:
## 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.
## Below are a pair of functions that are us... |
CSquare2LonLat <- function(csqr,degrees){
ra <- 1e-6 #Artificial number to add for rounding of 5'ves (round(0.5) = 0, but in Excel (where conversion comes from, it is 1)
chars <- an(nchar(csqr))
tensqd <- an(substr(csqr,1,1))+ra; gqlat <- (round(abs(tensqd-4)*2/10)*10/5)-1
tenslatd ... | /vmstools/R/CSquare2LonLat.r | no_license | mcruf/vmstools | R | false | false | 2,493 | r | CSquare2LonLat <- function(csqr,degrees){
ra <- 1e-6 #Artificial number to add for rounding of 5'ves (round(0.5) = 0, but in Excel (where conversion comes from, it is 1)
chars <- an(nchar(csqr))
tensqd <- an(substr(csqr,1,1))+ra; gqlat <- (round(abs(tensqd-4)*2/10)*10/5)-1
tenslatd ... |
####################################################
#' Find the global arguments not given by the argument list
#' @param fn: a function to be checked
#' @return a vector of string
#' @export
#' @keywords coding
#' @examples
#' find_global_arg(fn)
find_global_arg = function(fn){
require(codetools, quietly=TRUE)
r... | /R/findglobalarg.r | no_license | jesscyzhao/cyrutil | R | false | false | 356 | r | ####################################################
#' Find the global arguments not given by the argument list
#' @param fn: a function to be checked
#' @return a vector of string
#' @export
#' @keywords coding
#' @examples
#' find_global_arg(fn)
find_global_arg = function(fn){
require(codetools, quietly=TRUE)
r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/findCorrelation.R
\name{findCorrelation}
\alias{findCorrelation}
\title{Determine highly correlated variables}
\usage{
findCorrelation(
x,
cutoff = 0.9,
verbose = FALSE,
names = FALSE,
exact = ncol(x) < 100
)
}
\arguments{
\item{x}{... | /pkg/caret/man/findCorrelation.Rd | no_license | topepo/caret | R | false | true | 2,948 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/findCorrelation.R
\name{findCorrelation}
\alias{findCorrelation}
\title{Determine highly correlated variables}
\usage{
findCorrelation(
x,
cutoff = 0.9,
verbose = FALSE,
names = FALSE,
exact = ncol(x) < 100
)
}
\arguments{
\item{x}{... |
setwd("C:/Users/ramachga/Desktop/UpGrad/Uber Case study/GaneshSridar_Uber_casestudy")
dataset<- Uber.request.data <- read.csv("Uber request data.csv")
install.packages("stringr")
install.packages("ggplot2")
library(stringr)
library(ggplot2)
#Check for duplicate values
#sum(duplicated(Uber.request.data$Request.id))... | /Uber_GaneshSridar_solution.R | no_license | rgsridar/PGDDS-IIIT-B | R | false | false | 4,416 | r |
setwd("C:/Users/ramachga/Desktop/UpGrad/Uber Case study/GaneshSridar_Uber_casestudy")
dataset<- Uber.request.data <- read.csv("Uber request data.csv")
install.packages("stringr")
install.packages("ggplot2")
library(stringr)
library(ggplot2)
#Check for duplicate values
#sum(duplicated(Uber.request.data$Request.id))... |
\name{knit2pdf}
\alias{knit2pdf}
\title{Convert Rnw to PDF using knit and texi2pdf}
\usage{
knit2pdf(input)
}
\arguments{
\item{input}{path of the input file}
}
\description{
Knit the input Rnw document to a tex document, and
compile it using \code{texi2pdf}.
}
\author{
Ramnath Vaidyanathan and Yihui Xie
}
\see... | /man/knit2pdf.Rd | no_license | kohske/knitr | R | false | false | 380 | rd | \name{knit2pdf}
\alias{knit2pdf}
\title{Convert Rnw to PDF using knit and texi2pdf}
\usage{
knit2pdf(input)
}
\arguments{
\item{input}{path of the input file}
}
\description{
Knit the input Rnw document to a tex document, and
compile it using \code{texi2pdf}.
}
\author{
Ramnath Vaidyanathan and Yihui Xie
}
\see... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PharmacoSetClass.R
\name{featureInfo<-}
\alias{featureInfo<-}
\title{featureInfo<- Generic}
\usage{
featureInfo(object, mDataType) <- value
}
\arguments{
\item{object}{The \code{PharmacoSet} to replace gene annotations in}
\item{mDataType}{T... | /man/featureInfo-set.Rd | no_license | Deepstatsanalysis/PharmacoGx | R | false | true | 616 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PharmacoSetClass.R
\name{featureInfo<-}
\alias{featureInfo<-}
\title{featureInfo<- Generic}
\usage{
featureInfo(object, mDataType) <- value
}
\arguments{
\item{object}{The \code{PharmacoSet} to replace gene annotations in}
\item{mDataType}{T... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tfbs.R
\name{output.sites}
\alias{output.sites}
\title{Threshold possible binding sites by Score or FDR}
\usage{
output.sites(seqsScores, scoreThreshold = NULL, fdrScoreMap = NULL,
fdrThreshold = NULL)
}
\arguments{
\item{seqsScores}{score.... | /man/output.sites.Rd | no_license | cran/rtfbs | R | false | true | 3,422 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tfbs.R
\name{output.sites}
\alias{output.sites}
\title{Threshold possible binding sites by Score or FDR}
\usage{
output.sites(seqsScores, scoreThreshold = NULL, fdrScoreMap = NULL,
fdrThreshold = NULL)
}
\arguments{
\item{seqsScores}{score.... |
### csv style
library(readr)
library(xts)
library(csv)
data = read.csv("Documents/JMU Fall 19/ECON 483/Data Assignments/DJI.csv", header = T)
data = na.omit(data)
data$time =strptime(data$time, format = "%m/%d/%Y")
yl = xts(data$Adj.Close, order.by = data[, "time"])
View(yl)
plot.xts(yl)
library(urca)
yl=diff(yl)
y... | /DA3 code.R | no_license | quant-jaime/ARIMA- | R | false | false | 2,119 | r | ### csv style
library(readr)
library(xts)
library(csv)
data = read.csv("Documents/JMU Fall 19/ECON 483/Data Assignments/DJI.csv", header = T)
data = na.omit(data)
data$time =strptime(data$time, format = "%m/%d/%Y")
yl = xts(data$Adj.Close, order.by = data[, "time"])
View(yl)
plot.xts(yl)
library(urca)
yl=diff(yl)
y... |
\name{smooth.pos}
\alias{smooth.pos}
\title{
Smooth Data with a Positive Function
}
\description{
A set of data is smoothed with a functional data object that only
takes positive values. For example, this function can be used to
estimate a smooth variance function from a set of squared residuals.
A function ... | /man/smooth.pos.Rd | no_license | jfontestad/fda | R | false | false | 3,495 | rd | \name{smooth.pos}
\alias{smooth.pos}
\title{
Smooth Data with a Positive Function
}
\description{
A set of data is smoothed with a functional data object that only
takes positive values. For example, this function can be used to
estimate a smooth variance function from a set of squared residuals.
A function ... |
library(nloptr)
library(tidyverse)
#problem set 8
set.seed(100)
N <- 100000
K <- 10
sigma <- 0.5
x <- matrix(rnorm(N*K,mean=0,sd=sigma),N,K)
x[,1] <- 1 #first column of x should all be one #regression model always use constant
eps <- rnorm(N,mean=0,sd=sigma)
B <- c(1.5, -1, -0.25, 0.75, 3.... | /ProblemSets/PS8/PS8_Hoffman.R | permissive | abbyhhoffman/DScourseS21 | R | false | false | 4,334 | r | library(nloptr)
library(tidyverse)
#problem set 8
set.seed(100)
N <- 100000
K <- 10
sigma <- 0.5
x <- matrix(rnorm(N*K,mean=0,sd=sigma),N,K)
x[,1] <- 1 #first column of x should all be one #regression model always use constant
eps <- rnorm(N,mean=0,sd=sigma)
B <- c(1.5, -1, -0.25, 0.75, 3.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prcomp.R
\name{prcomp_irlba}
\alias{prcomp_irlba}
\title{Principal Components Analysis}
\usage{
prcomp_irlba(x, n = 3, retx = TRUE, center = TRUE, scale. = FALSE, ...)
}
\arguments{
\item{x}{a numeric or complex matrix (or data frame) which p... | /man/prcomp_irlba.Rd | no_license | Lei-D/irlba | R | false | true | 3,602 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prcomp.R
\name{prcomp_irlba}
\alias{prcomp_irlba}
\title{Principal Components Analysis}
\usage{
prcomp_irlba(x, n = 3, retx = TRUE, center = TRUE, scale. = FALSE, ...)
}
\arguments{
\item{x}{a numeric or complex matrix (or data frame) which p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/liger.R
\name{calcAlignment}
\alias{calcAlignment}
\title{Calculate alignment metric}
\usage{
calcAlignment(
object,
k = NULL,
rand.seed = 1,
cells.use = NULL,
cells.comp = NULL,
clusters.use = NULL,
by.cell = F,
by.dataset = ... | /man/calcAlignment.Rd | no_license | li-jinyan/scCancer | R | false | true | 1,832 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/liger.R
\name{calcAlignment}
\alias{calcAlignment}
\title{Calculate alignment metric}
\usage{
calcAlignment(
object,
k = NULL,
rand.seed = 1,
cells.use = NULL,
cells.comp = NULL,
clusters.use = NULL,
by.cell = F,
by.dataset = ... |
testlist <- list(g = 0, z = 2.47032822920623e-323)
result <- do.call(hmlasso:::softThresholdC,testlist)
str(result) | /hmlasso/inst/testfiles/softThresholdC/libFuzzer_softThresholdC/softThresholdC_valgrind_files/1609897397-test.R | no_license | akhikolla/newtestfiles-2 | R | false | false | 115 | r | testlist <- list(g = 0, z = 2.47032822920623e-323)
result <- do.call(hmlasso:::softThresholdC,testlist)
str(result) |
context("Checking if tables endpoint related functions are working correctly")
test_that("Base url is defined properly", {
base_url <- .tables_base_url()
expect_equal(base_url, "https://api.nbp.pl/api/exchangerates/tables/")
})
with_mock_api({
with_mock(`curl::has_internet` = function() TRUE, {
test_that(... | /tests/testthat/test-endpoint_tables.R | no_license | cran/rnbp | R | false | false | 5,189 | r | context("Checking if tables endpoint related functions are working correctly")
test_that("Base url is defined properly", {
base_url <- .tables_base_url()
expect_equal(base_url, "https://api.nbp.pl/api/exchangerates/tables/")
})
with_mock_api({
with_mock(`curl::has_internet` = function() TRUE, {
test_that(... |
# TODO: Add comment
#
# Author: benderc
###############################################################################
runmcmc <- function(x,dat,phiorig,phi,stimuli,th,multicores,outfile,maxiterations,
usebics,cores,lambda,B,Z,samplelambda,hmmiterations,fanin,gam,it,K,burnin,
priortype,plotresults=TRUE,always_sam... | /R/mcmc_ddepn.R | no_license | cran/ddepn | R | false | false | 13,713 | r | # TODO: Add comment
#
# Author: benderc
###############################################################################
runmcmc <- function(x,dat,phiorig,phi,stimuli,th,multicores,outfile,maxiterations,
usebics,cores,lambda,B,Z,samplelambda,hmmiterations,fanin,gam,it,K,burnin,
priortype,plotresults=TRUE,always_sam... |
\name{plotProfile}
\alias{plotProfile}
\title{Plot a CTD profile of various quantities}
\description{Plot a CTD profile, in any of several common formats.}
\usage{plotProfile(x,
xtype="salinity+temperature",
ytype=c("pressure", "z", "depth", "sigmaTheta"),
eos=getOption("eos", default='unesco'),
xl... | /man/plotProfile.Rd | no_license | richardsc/oce | R | false | false | 6,985 | rd | \name{plotProfile}
\alias{plotProfile}
\title{Plot a CTD profile of various quantities}
\description{Plot a CTD profile, in any of several common formats.}
\usage{plotProfile(x,
xtype="salinity+temperature",
ytype=c("pressure", "z", "depth", "sigmaTheta"),
eos=getOption("eos", default='unesco'),
xl... |
data.regionalplot.snps <- function(snps, p.all) {
# require SNPs to occur in pval file(s)
if( !all(snps$SNP %in% p.all$SNP) )
stop(paste(
"The following SNPs do not occur in the supplied p-value lists:",
paste(snps[!snps$SNP %in% p.all$SNP, "SNP"], collapse = ",")
))
# add position from pval f... | /R/data.regionalplot.snps.R | no_license | Katospiegel/postgwas | R | false | false | 555 | r | data.regionalplot.snps <- function(snps, p.all) {
# require SNPs to occur in pval file(s)
if( !all(snps$SNP %in% p.all$SNP) )
stop(paste(
"The following SNPs do not occur in the supplied p-value lists:",
paste(snps[!snps$SNP %in% p.all$SNP, "SNP"], collapse = ",")
))
# add position from pval f... |
#loading required libraries
library(plyr)
#library(glmnet)
library(bsts)
library(BoomSpikeSlab)
library(ggplot2)
library(reshape2)
#loading fludata
flu_data_untouched = read.csv("/Users/f/projects/masters-thesis/src/flu trends/InSample/correlate-ILI-FullSample_lags.csv")
flu_data_raw = read.csv("/Users/f/projects/mas... | /src/flu trends/insample/bsts_insample.R | no_license | fionasloof/masters-thesis | R | false | false | 2,102 | r | #loading required libraries
library(plyr)
#library(glmnet)
library(bsts)
library(BoomSpikeSlab)
library(ggplot2)
library(reshape2)
#loading fludata
flu_data_untouched = read.csv("/Users/f/projects/masters-thesis/src/flu trends/InSample/correlate-ILI-FullSample_lags.csv")
flu_data_raw = read.csv("/Users/f/projects/mas... |
## COURSERA - EXPLORATORY DATA - ASSIGNMENT 1 ##
## PLOT 1 ##
plot1 <- function(){
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
## DO NOT DOWNLOAD FILE IF IT EXISTS ALREADY ##
if (!file.exists("tempfile.zip")) {
file ... | /plot1.R | no_license | AcutusMens/ExData_Plotting1 | R | false | false | 1,524 | r | ## COURSERA - EXPLORATORY DATA - ASSIGNMENT 1 ##
## PLOT 1 ##
plot1 <- function(){
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
## DO NOT DOWNLOAD FILE IF IT EXISTS ALREADY ##
if (!file.exists("tempfile.zip")) {
file ... |
########################################################################################################################
## parameter.is.flag
##
## Checks if the provided parameter value is a flag.
##
## @param value Value to be tested.
## @return \code{TRUE} if \code{values} is \code{TRUE} or \code{FALSE}, \code{FAL... | /R/utils.R | no_license | demuellae/muReportR | R | false | false | 6,411 | r | ########################################################################################################################
## parameter.is.flag
##
## Checks if the provided parameter value is a flag.
##
## @param value Value to be tested.
## @return \code{TRUE} if \code{values} is \code{TRUE} or \code{FALSE}, \code{FAL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/20pattern.05ode.R
\name{generate.func.firstorder.linear.ode}
\alias{generate.func.firstorder.linear.ode}
\title{generate deSolve usable derivatives function}
\usage{
generate.func.firstorder.linear.ode(ode)
}
\description{
generate deSolve us... | /symbolicR/man/generate.func.firstorder.linear.ode.Rd | no_license | isabella232/symbolicR | R | false | true | 348 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/20pattern.05ode.R
\name{generate.func.firstorder.linear.ode}
\alias{generate.func.firstorder.linear.ode}
\title{generate deSolve usable derivatives function}
\usage{
generate.func.firstorder.linear.ode(ode)
}
\description{
generate deSolve us... |
library(tidyverse)
library(data.table)
#Used ACS Census data from two sources.
#https://www.census.gov/developers/ <- for city and county data.
#Use https://www.youtube.com/watch?v=0DVdHquaRiU and https://towardsdatascience.com/getting-census-data-in-5-easy-steps-a08eeb63995d for instructions.
#www.data.census.gov <... | /census_data.R | no_license | nicholasbroussard/useful_files | R | false | false | 8,246 | r | library(tidyverse)
library(data.table)
#Used ACS Census data from two sources.
#https://www.census.gov/developers/ <- for city and county data.
#Use https://www.youtube.com/watch?v=0DVdHquaRiU and https://towardsdatascience.com/getting-census-data-in-5-easy-steps-a08eeb63995d for instructions.
#www.data.census.gov <... |
# This was used in version submitted (rejected) to Technometrics
# Comparisons for adapt paper
# source('C:/Users/cbe117/Documents/GitHub/DOE-code/compare_adaptconceptR6.R')
source('.//compare_adaptconceptR6.R')
# In order, these are
# 1. sFFLHD (nonadapt)
# 2. Sobol (nonadapt)
# 3. ALC (no weighting)
# 4. grad mean
... | /adapt_paper_runs3.R | no_license | CollinErickson/DOE-code | R | false | false | 7,659 | r | # This was used in version submitted (rejected) to Technometrics
# Comparisons for adapt paper
# source('C:/Users/cbe117/Documents/GitHub/DOE-code/compare_adaptconceptR6.R')
source('.//compare_adaptconceptR6.R')
# In order, these are
# 1. sFFLHD (nonadapt)
# 2. Sobol (nonadapt)
# 3. ALC (no weighting)
# 4. grad mean
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wBTCode.R
\docType{package}
\name{EGRETci-package}
\alias{EGRETci-package}
\title{EGRETci package for confidence interval analysis}
\description{
\tabular{ll}{
Package: \tab EGRETci\cr
Type: \tab Package\cr
License: \tab Unlimited for this pa... | /man/EGRETci-package.Rd | permissive | lindsayplatt/EGRETci | R | false | true | 1,644 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wBTCode.R
\docType{package}
\name{EGRETci-package}
\alias{EGRETci-package}
\title{EGRETci package for confidence interval analysis}
\description{
\tabular{ll}{
Package: \tab EGRETci\cr
Type: \tab Package\cr
License: \tab Unlimited for this pa... |
## This script tested and ready for production mode on Carbonate
library(PopGenome)
library(bigmemory)
library(tools)
##########################################################################
vcfDir <- "/N/dc2/projects/PromoterPopGen/human_complete_data/human-split-data/gene_chr9"
fileList <- "/N/dc2/projects/Prom... | /scripts/PopGenome_batch_chr9.R | no_license | rtraborn/Promoter_PopGen | R | false | false | 2,785 | r | ## This script tested and ready for production mode on Carbonate
library(PopGenome)
library(bigmemory)
library(tools)
##########################################################################
vcfDir <- "/N/dc2/projects/PromoterPopGen/human_complete_data/human-split-data/gene_chr9"
fileList <- "/N/dc2/projects/Prom... |
# Regression Template
# Importing the dataset
dataset = read.csv('Position_Salaries.csv')
dataset = dataset[2:3]
# Splitting the dataset into the Training set and Test set
# # install.packages('caTools')
# library(caTools)
# set.seed(123)
# split = sample.split(dataset$Salary, SplitRatio = 2/3)
# training_... | /randomforest_regression.R | no_license | MittaDhanunjaya/DataScience | R | false | false | 1,396 | r | # Regression Template
# Importing the dataset
dataset = read.csv('Position_Salaries.csv')
dataset = dataset[2:3]
# Splitting the dataset into the Training set and Test set
# # install.packages('caTools')
# library(caTools)
# set.seed(123)
# split = sample.split(dataset$Salary, SplitRatio = 2/3)
# training_... |
source(here::here("lib", "common.R"))
load_raw <- function(raw_data_dir, n_max) {
d <- load_all_csvs(
raw_data_dir,
n_max = n_max,
col_names = c(
"employee_last",
"employee_first",
"officer_race_raw",
"officer_gender",
"contact_date",
"contact_hour",
"highway_ty... | /lib/states/wa/statewide.R | no_license | anni3ly/ripa-analysis | R | false | false | 6,513 | r | source(here::here("lib", "common.R"))
load_raw <- function(raw_data_dir, n_max) {
d <- load_all_csvs(
raw_data_dir,
n_max = n_max,
col_names = c(
"employee_last",
"employee_first",
"officer_race_raw",
"officer_gender",
"contact_date",
"contact_hour",
"highway_ty... |
# pint.R: plotmo functions for confidence and prediction intervals
# Handle plotmo's "level" argument. Return a prediction interval dataframe
# with either or both of the following sets of columns. What columns get
# returned depends on the capabilities of the object's predict method.
# For example, predict.lm ... | /R/pint.R | no_license | cran/plotmo | R | false | false | 5,389 | r | # pint.R: plotmo functions for confidence and prediction intervals
# Handle plotmo's "level" argument. Return a prediction interval dataframe
# with either or both of the following sets of columns. What columns get
# returned depends on the capabilities of the object's predict method.
# For example, predict.lm ... |
# clear console by CTR + L
# assigning value to variable
# by operator =
a = 3
a+20
# assigning value to variable
# by operator <-
b <- 8
sum <- b + 10
# multiple variables can be assigned to
# the same value
svetlyo <- krasen <- 23
svetlyo
krasen
# assigning value to variable
# via assign() function
assign("... | /1. Intro - Assign Operators.R | no_license | svetlyobg/R-Language-lessons | R | false | false | 462 | r | # clear console by CTR + L
# assigning value to variable
# by operator =
a = 3
a+20
# assigning value to variable
# by operator <-
b <- 8
sum <- b + 10
# multiple variables can be assigned to
# the same value
svetlyo <- krasen <- 23
svetlyo
krasen
# assigning value to variable
# via assign() function
assign("... |
##############################################################
# FOX Transcripts
# Michele Claibourn
# Acquire data: September 2018 through October 2018
# Using Selenium (instead of rvest)
# The Five, Hannity, The Story/MacCallum
# Beginning in October, the webpages changed
# Updated: November 27, 2018 to adapt to web ... | /codeR/cablenews/acquire_fox_selenium_v2.R | no_license | datafordemocracy/publicpresidency | R | false | false | 7,673 | r | ##############################################################
# FOX Transcripts
# Michele Claibourn
# Acquire data: September 2018 through October 2018
# Using Selenium (instead of rvest)
# The Five, Hannity, The Story/MacCallum
# Beginning in October, the webpages changed
# Updated: November 27, 2018 to adapt to web ... |
#' Generate a sample basic table.
#'
#' The \code{basictablerSample} function generates a sample basic table.
#'
#' @import dplyr
#' @export
#' @return Example basic table describing the performance of trains run by
#' different train operating companies in Birmingham (UK).
#' @examples
#' # Generate sample table.
#... | /R/sample.R | no_license | cbailiss/basictabler | R | false | false | 1,956 | r |
#' Generate a sample basic table.
#'
#' The \code{basictablerSample} function generates a sample basic table.
#'
#' @import dplyr
#' @export
#' @return Example basic table describing the performance of trains run by
#' different train operating companies in Birmingham (UK).
#' @examples
#' # Generate sample table.
#... |
/25 02 suite - chi et proportion.R | no_license | pierrebedu/STATISTICS | R | false | false | 2,940 | r | ||
## File Name: Rhat_sirt.R
## File Version: 1.12
####################################
# auxiliary functions for Rhat statistic
############################################################################
# Code from rube package
# Source: http://www.stat.cmu.edu/~hseltman/rube/rube0.2-16/R/Rhat.R
... | /R/Rhat_sirt.R | no_license | cran/sirt | R | false | false | 1,512 | r | ## File Name: Rhat_sirt.R
## File Version: 1.12
####################################
# auxiliary functions for Rhat statistic
############################################################################
# Code from rube package
# Source: http://www.stat.cmu.edu/~hseltman/rube/rube0.2-16/R/Rhat.R
... |
#Q3a-b
p<-floor(runif(1,0,6))+10
mu1<-rep(0,p)
mu2<-runif(p)
cov1<-diag(p)
cov2<-0.5*diag(p)
cov2[1,3]<--0.3
cov2[3,1]<--0.3
cov2[2,3]<-0.2
cov2[3,2]<-0.2
cov2[4,8]<-0.1
cov2[8,4]<-0.1
cov2
#Q1c
emperror.lda<-rep(0,10)
emperror.qda<-rep(0,10)
for (i in 1:10){
trainC1<-mvrnorm(0.25*i*100,mu1,cov1)
trainC2<-mvr... | /M3S7-CW1/CW1-Q3.R | no_license | aelkrief/imperialcoursework | R | false | false | 2,240 | r | #Q3a-b
p<-floor(runif(1,0,6))+10
mu1<-rep(0,p)
mu2<-runif(p)
cov1<-diag(p)
cov2<-0.5*diag(p)
cov2[1,3]<--0.3
cov2[3,1]<--0.3
cov2[2,3]<-0.2
cov2[3,2]<-0.2
cov2[4,8]<-0.1
cov2[8,4]<-0.1
cov2
#Q1c
emperror.lda<-rep(0,10)
emperror.qda<-rep(0,10)
for (i in 1:10){
trainC1<-mvrnorm(0.25*i*100,mu1,cov1)
trainC2<-mvr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stdgGrowthRates.R
\name{stdgGrowthRateSL_NonEggStages}
\alias{stdgGrowthRateSL_NonEggStages}
\title{Calculate STDG growth rates (mm/day SL) for non-egg stages}
\usage{
stdgGrowthRateSL_NonEggStages(T, L)
}
\arguments{
\item{T}{- vector of tem... | /man/stdgGrowthRateSL_NonEggStages.Rd | permissive | wStockhausen/rPacificCod | R | false | true | 633 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stdgGrowthRates.R
\name{stdgGrowthRateSL_NonEggStages}
\alias{stdgGrowthRateSL_NonEggStages}
\title{Calculate STDG growth rates (mm/day SL) for non-egg stages}
\usage{
stdgGrowthRateSL_NonEggStages(T, L)
}
\arguments{
\item{T}{- vector of tem... |
## makeCacheMatrix: This function creates a special matrix object that can cache its inverse.
## cacheSolve: This function computes the inverse of the special matrix returned by makeCacheMatrix above.
## If the inverse has already been calculated (and the matrix has not changed), then the cacheSolve should retrieve th... | /cachematrix.R | no_license | kanshen/ProgrammingAssignment2 | R | false | false | 1,605 | r | ## makeCacheMatrix: This function creates a special matrix object that can cache its inverse.
## cacheSolve: This function computes the inverse of the special matrix returned by makeCacheMatrix above.
## If the inverse has already been calculated (and the matrix has not changed), then the cacheSolve should retrieve th... |
\name{data.m}
\alias{data.m}
\docType{data}
\title{
Example dataset for obtaining prunned network using DART package
}
\description{
A breast cancer data set over 12000 features and 67 samples, data is normalised across the sample(z score normalisation).Row names are NCBI Entrez ID identifiers,
colnames of the... | /man/data.m.Rd | no_license | cran/DARTData | R | false | false | 1,152 | rd | \name{data.m}
\alias{data.m}
\docType{data}
\title{
Example dataset for obtaining prunned network using DART package
}
\description{
A breast cancer data set over 12000 features and 67 samples, data is normalised across the sample(z score normalisation).Row names are NCBI Entrez ID identifiers,
colnames of the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.