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 |
|---|---|---|---|---|---|---|---|---|---|
modelInfo <- list(label = "Bagged MARS using gCV Pruning",
library = "earth",
type = c("Regression", "Classification"),
parameters = data.frame(parameter = c('degree'),
class = c("numeric"),
... | /models/files/bagEarthGCV.R | no_license | GioLomia/caret | R | false | false | 3,317 | r | modelInfo <- list(label = "Bagged MARS using gCV Pruning",
library = "earth",
type = c("Regression", "Classification"),
parameters = data.frame(parameter = c('degree'),
class = c("numeric"),
... |
best <- function(state, outcome) {
validoutcomes <- c("heart attack","heart failure","pneumonia")
## Read hospital data
## Read outcome data
outcomes <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## Check that state and outcome are valid
hospitals <- read.csv("hospital-data.csv"... | /data_analytics_programming_coursera/assignment_3/best.R | no_license | jeffreylutz/education | R | false | false | 1,561 | r | best <- function(state, outcome) {
validoutcomes <- c("heart attack","heart failure","pneumonia")
## Read hospital data
## Read outcome data
outcomes <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
## Check that state and outcome are valid
hospitals <- read.csv("hospital-data.csv"... |
library(gapminder)
# Define UI for the application
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
textInput("title", "Title", "GDP vs life exp"),
numericInput("size", "Point size", 1, 1),
checkboxInput("fit", "Add line of best fit", FALSE),
# Add radio buttons... | /shiny/radio_buttons.R | no_license | jyeazell/DataCamp_practice | R | false | false | 1,011 | r | library(gapminder)
# Define UI for the application
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
textInput("title", "Title", "GDP vs life exp"),
numericInput("size", "Point size", 1, 1),
checkboxInput("fit", "Add line of best fit", FALSE),
# Add radio buttons... |
/lab7-2.R | no_license | Joaquin26/scripts-R | R | false | false | 3,300 | r | ||
run.baseline <- function(raw.data, max.roll.impute, dataclass, week, quant.top, quant.below, promo.flag.condns) {
print(paste("Running baseline modeling with seasonality: ", week, ", quant top: ",
quant.top, ", quant below: ", quant.below, sep = ""))
if (max.roll.impute) {
max.roll.impute.windo... | /baseline_modeling.R | no_license | Gourab080992/price-modelling | R | false | false | 18,355 | r | run.baseline <- function(raw.data, max.roll.impute, dataclass, week, quant.top, quant.below, promo.flag.condns) {
print(paste("Running baseline modeling with seasonality: ", week, ", quant top: ",
quant.top, ", quant below: ", quant.below, sep = ""))
if (max.roll.impute) {
max.roll.impute.windo... |
#################################################################
# Statistics 133, Lecture 1, Fall 2014
# Final Exam, Friday December 19th, 7 pm - 10 pm
# Please read all instructions carefully.
#################################################################
# IMPORTANT
# Enter your personal information here, betwe... | /final2014/final-sol.R | no_license | ekbell/stat133 | R | false | false | 18,621 | r | #################################################################
# Statistics 133, Lecture 1, Fall 2014
# Final Exam, Friday December 19th, 7 pm - 10 pm
# Please read all instructions carefully.
#################################################################
# IMPORTANT
# Enter your personal information here, betwe... |
power <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
power[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("Global_active_power")]
power[, dateTime := as.POSIXct(paste(Date, Time), format = "%d/%m/%Y %H:%M:%S")]
power <- power[(dat... | /plot3.R | no_license | ash19-cpu/ExData_Plotting1 | R | false | false | 820 | r | power <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
power[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("Global_active_power")]
power[, dateTime := as.POSIXct(paste(Date, Time), format = "%d/%m/%Y %H:%M:%S")]
power <- power[(dat... |
rm(list = ls())
gc()
library(compositions)
library(data.table)
library(reshape2)
library(doParallel)
library(igraph)
library(caret)
library(tidyr)
library(dplyr)
library(stringr)
library(readr)
library(glmnet)
library(vegan)
library(PRROC)
library(diffCompVarRcpp)
library(selEnergyPermR)
library(simplexDataAugmentat... | /Rscript/Case Study Results/caseStudy_birthmode.R | permissive | andrew84830813/SelectionEnergyPerm_Project | R | false | false | 24,100 | r | rm(list = ls())
gc()
library(compositions)
library(data.table)
library(reshape2)
library(doParallel)
library(igraph)
library(caret)
library(tidyr)
library(dplyr)
library(stringr)
library(readr)
library(glmnet)
library(vegan)
library(PRROC)
library(diffCompVarRcpp)
library(selEnergyPermR)
library(simplexDataAugmentat... |
#install.packages("forecast") #-- do this only once
#Check the book: https://www.otexts.org/fpp2 and the blog: http://robjhyndman.com/hyndsight
library(forecast)
covid_data<-read.csv(file.choose(), header=TRUE, sep=",")
FRA <- ts(covid_data$deaths_FRA,start=0, frequency=1)
cFRA <- ts(covid_data$Cdeaths_FRA,s... | /R files/Final_Project_v002_+14d.R | no_license | calvearb/DSB_FinalProject | R | false | false | 6,355 | r | #install.packages("forecast") #-- do this only once
#Check the book: https://www.otexts.org/fpp2 and the blog: http://robjhyndman.com/hyndsight
library(forecast)
covid_data<-read.csv(file.choose(), header=TRUE, sep=",")
FRA <- ts(covid_data$deaths_FRA,start=0, frequency=1)
cFRA <- ts(covid_data$Cdeaths_FRA,s... |
data=read.csv("data1.csv", stringsAsFactors = F, header= TRUE)
head(data)
library(deSolve)
library(ggplot2)
### Problem 1
#create likelihood function
linear<- function(p,x,y){
BO=p[1]
B1=p[2]
sigma=exp(p[3])
pred=BO+B1*x #equation for a linear model
nll=-sum(dnorm(x=y, mean=pred, sd=sigma, log=TRUE))
... | /Exercise10R.R | no_license | efoley5/Biocomp-Fall2018-181109-Exercise10 | R | false | false | 2,279 | r | data=read.csv("data1.csv", stringsAsFactors = F, header= TRUE)
head(data)
library(deSolve)
library(ggplot2)
### Problem 1
#create likelihood function
linear<- function(p,x,y){
BO=p[1]
B1=p[2]
sigma=exp(p[3])
pred=BO+B1*x #equation for a linear model
nll=-sum(dnorm(x=y, mean=pred, sd=sigma, log=TRUE))
... |
# Creation of a vector and looping over it
x <- rnorm(5)
# R-specific progamming loop
for (i in x) {
print(i)
}
# Printing the first, second..., value
print(x[1])
print(x[2])
print(x[3])
# Looping over a vector
# Conventional programming loop
for (j in 1:5) {
print(j)
}
# Looping over a vector
for (y in s... | /2_Fondamental_of _R/4_vectorized_operations.R | no_license | cosimino81/R-biginner-tutorial | R | false | false | 755 | r |
# Creation of a vector and looping over it
x <- rnorm(5)
# R-specific progamming loop
for (i in x) {
print(i)
}
# Printing the first, second..., value
print(x[1])
print(x[2])
print(x[3])
# Looping over a vector
# Conventional programming loop
for (j in 1:5) {
print(j)
}
# Looping over a vector
for (y in s... |
#' Curtis Kephart
#' Winter 2016
#' CurtisKephartAssignment3Creator.R
#'
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 0
print("Curtis Kephart")
print(0142214)
print("curtisk@ucsc.edu")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 1
librar... | /Assignments/CurtisKephartAssignment3Creator.R | no_license | EconomiCurtis/econ294_2015 | R | false | false | 882 | r | #' Curtis Kephart
#' Winter 2016
#' CurtisKephartAssignment3Creator.R
#'
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 0
print("Curtis Kephart")
print(0142214)
print("curtisk@ucsc.edu")
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# 1
librar... |
############################################################################################
####### plots from netwok analyzer batch output #######
###########################################################################################
library(ggplot2)
sanos <- read.csv("/med... | /estadisticas_de_red_vs_numero_de_edges.R | no_license | tadeito/topological-coefficients-evolution-analysis | R | false | false | 4,789 | r | ############################################################################################
####### plots from netwok analyzer batch output #######
###########################################################################################
library(ggplot2)
sanos <- read.csv("/med... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 9214
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 9214
c
c Input Parameter (command line, file):
c input filename QBFLIB/Amendola-Ricca-Truszczynski/wgrowing/ctrl.e#1.a#3.E#128.... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Amendola-Ricca-Truszczynski/wgrowing/ctrl.e#1.a#3.E#128.A#48.c#.w#3.s#1.asp/ctrl.e#1.a#3.E#128.A#48.c#.w#3.s#1.asp.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 712 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 9214
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 9214
c
c Input Parameter (command line, file):
c input filename QBFLIB/Amendola-Ricca-Truszczynski/wgrowing/ctrl.e#1.a#3.E#128.... |
# Valerio Barbarossa 5 Sep 2019
# function that computes the root mean square error
#define function for RMSE
E <- function(obs,sim,ex=2){
if(length(obs) != length(sim)){
stop("Different number of entries among the two sets of data")
}else{
obs_nas <- !is.na(obs) & !is.nan(obs) & !is.infinite(obs)
sim_... | /R/E.R | no_license | vbarbarossa/valerioUtils | R | false | false | 832 | r | # Valerio Barbarossa 5 Sep 2019
# function that computes the root mean square error
#define function for RMSE
E <- function(obs,sim,ex=2){
if(length(obs) != length(sim)){
stop("Different number of entries among the two sets of data")
}else{
obs_nas <- !is.na(obs) & !is.nan(obs) & !is.infinite(obs)
sim_... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/distance-methods.R
\name{distance}
\alias{distance}
\title{General distance / dissimilarity index calculator}
\usage{
distance(physeq, method = "unifrac", type = "samples", ...)
}
\arguments{
\item{physeq}{(Required). A \code{\link{p... | /man/distance.Rd | no_license | fangly/phyloseq | R | false | false | 3,821 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/distance-methods.R
\name{distance}
\alias{distance}
\title{General distance / dissimilarity index calculator}
\usage{
distance(physeq, method = "unifrac", type = "samples", ...)
}
\arguments{
\item{physeq}{(Required). A \code{\link{p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/androidenterprise_objects.R
\name{Product}
\alias{Product}
\title{Product Object}
\usage{
Product(appVersion = NULL, authorName = NULL, detailsUrl = NULL,
distributionChannel = NULL, iconUrl = NULL, productId = NULL,
productPricing = NULL... | /googleandroidenterprisev1.auto/man/Product.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 1,918 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/androidenterprise_objects.R
\name{Product}
\alias{Product}
\title{Product Object}
\usage{
Product(appVersion = NULL, authorName = NULL, detailsUrl = NULL,
distributionChannel = NULL, iconUrl = NULL, productId = NULL,
productPricing = NULL... |
a = 1:19
b = matrix(a,3,3,byrow = TRUE)
c = matrix(b)
c
| /Sample.R | no_license | yushany2/STAT420 | R | false | false | 56 | r | a = 1:19
b = matrix(a,3,3,byrow = TRUE)
c = matrix(b)
c
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tweak.R
\name{tweak}
\alias{tweak}
\title{Calcurate suggention for each inputs based on prediction}
\usage{
tweak(esrules, forest, newdata, label.from, label.to, .dopar = TRUE)
}
\arguments{
\item{esrules}{an object returned by set.eSatisfact... | /man/tweak.Rd | no_license | lkampoli/featureTweakR | R | false | true | 1,609 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tweak.R
\name{tweak}
\alias{tweak}
\title{Calcurate suggention for each inputs based on prediction}
\usage{
tweak(esrules, forest, newdata, label.from, label.to, .dopar = TRUE)
}
\arguments{
\item{esrules}{an object returned by set.eSatisfact... |
library(Rgb)
library(biomaRt)
library(rentrez)
setwd("C:/Users/tyson/OneDrive/Desktop/Alzheimers")
#You can download HERV annotation at:
#https://github.com/mlbendall/telescope_annotation_db/raw/master/builds/HERV_rmsk.hg38.v2/transcripts.gtf
HERVtranscripts=read.gtf("transcripts.gtf") #Matthew's HERV annotation... | /InvestigateHervs.R | no_license | tyden46/HERV_Search_Tool | R | false | false | 5,759 | r | library(Rgb)
library(biomaRt)
library(rentrez)
setwd("C:/Users/tyson/OneDrive/Desktop/Alzheimers")
#You can download HERV annotation at:
#https://github.com/mlbendall/telescope_annotation_db/raw/master/builds/HERV_rmsk.hg38.v2/transcripts.gtf
HERVtranscripts=read.gtf("transcripts.gtf") #Matthew's HERV annotation... |
url<-"http://archive.ics.uci.edu/ml/machine-learning-databases/heart-disease/processed.cleveland.data"
heartdata<-read.csv(url,header=FALSE)
head(heartdata)
colnames(heartdata)<-c("age","sex","cp","trestbps","chol","fbs","restecg","thalach","exang","oldpeak","slope","ca","thal","hd")
head(heartdata)
str(heartd... | /LAB12.R | no_license | xingyuYE97/DataAnalytics2020_Xingyu_YE | R | false | false | 3,291 | r | url<-"http://archive.ics.uci.edu/ml/machine-learning-databases/heart-disease/processed.cleveland.data"
heartdata<-read.csv(url,header=FALSE)
head(heartdata)
colnames(heartdata)<-c("age","sex","cp","trestbps","chol","fbs","restecg","thalach","exang","oldpeak","slope","ca","thal","hd")
head(heartdata)
str(heartd... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PsModels.R
\name{createIPW}
\alias{createIPW}
\title{Creates Inverse Probability Weights}
\usage{
createIPW(
ps,
weightsType = "ATE",
useStabilizedWeights = TRUE,
truncationLevels = c(0.01, 0.99)
)
}
\arguments{
\item{ps... | /man/createIPW.Rd | permissive | OHDSI/RiskStratifiedEstimation | R | false | true | 920 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PsModels.R
\name{createIPW}
\alias{createIPW}
\title{Creates Inverse Probability Weights}
\usage{
createIPW(
ps,
weightsType = "ATE",
useStabilizedWeights = TRUE,
truncationLevels = c(0.01, 0.99)
)
}
\arguments{
\item{ps... |
# Script to pull individual figures together for different vaccine coverage thresholds
#
#
# David J Price
# 22 October, 2021
## FIGURE 1 ----
the.state <- "NSW"
baseline <- TRUE
the.coverage <- c(70, 80, 90)
arrival.volume <- "40"
scenarios <- paste0("Arrivals",arrival.volume,"_Home7_",the.state,the.coverage)
sc... | /population_abm_package3/plotting/vacc_comparison.R | permissive | aus-covid-modelling/NationalCabinetModelling-OctNov21 | R | false | false | 4,080 | r | # Script to pull individual figures together for different vaccine coverage thresholds
#
#
# David J Price
# 22 October, 2021
## FIGURE 1 ----
the.state <- "NSW"
baseline <- TRUE
the.coverage <- c(70, 80, 90)
arrival.volume <- "40"
scenarios <- paste0("Arrivals",arrival.volume,"_Home7_",the.state,the.coverage)
sc... |
#### Chapter 1. First peek under the hood ####
# On the right you can see the complete code to reproduce the app we demoed in the previous video. Don't be intimidated by how much code there is! Soon you'll be able to make this app yourself. Now you get to interact with the app on your own, and make small adjustments to... | /DataCamp/step_7. Building Web Applications in R with Shiny/source/chapter 1/shinyAppBasic.R | no_license | mrobergl/e_learning | R | false | false | 8,395 | r | #### Chapter 1. First peek under the hood ####
# On the right you can see the complete code to reproduce the app we demoed in the previous video. Don't be intimidated by how much code there is! Soon you'll be able to make this app yourself. Now you get to interact with the app on your own, and make small adjustments to... |
library(testthat)
library(synthACS)
library(parallel)
#------------------------------------------------------------------------------
context("combine smsm_set objects")
#------------------------------------------------------------------------------
test_that("expected errors and warnings are generated", {
# crea... | /data/genthat_extracted_code/synthACS/tests/test-combine_smsm.R | no_license | surayaaramli/typeRrh | R | false | false | 4,668 | r |
library(testthat)
library(synthACS)
library(parallel)
#------------------------------------------------------------------------------
context("combine smsm_set objects")
#------------------------------------------------------------------------------
test_that("expected errors and warnings are generated", {
# crea... |
library(PracTools)
### Name: BW3stagePPS
### Title: Relvariance components for 3-stage sample
### Aliases: BW3stagePPS
### Keywords: methods survey
### ** Examples
data(MDarea.pop)
MDsub <- MDarea.pop[1:100000,]
M <- length(unique(MDsub$PSU))
# srs/srs/srs design
pp.PSU <- rep(1/M,M)
BW3stagePPS(X=MDsub$y1, pp=... | /data/genthat_extracted_code/PracTools/examples/BW3stagePPS.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 502 | r | library(PracTools)
### Name: BW3stagePPS
### Title: Relvariance components for 3-stage sample
### Aliases: BW3stagePPS
### Keywords: methods survey
### ** Examples
data(MDarea.pop)
MDsub <- MDarea.pop[1:100000,]
M <- length(unique(MDsub$PSU))
# srs/srs/srs design
pp.PSU <- rep(1/M,M)
BW3stagePPS(X=MDsub$y1, pp=... |
source("getMetaFromFile.R")
fls <- dir("../delivery1", full.names = TRUE)
f <- fls[25]
mt <- getMetaDataList(f)
| /log.R | no_license | joeheywood-CLS/metaget | R | false | false | 112 | r | source("getMetaFromFile.R")
fls <- dir("../delivery1", full.names = TRUE)
f <- fls[25]
mt <- getMetaDataList(f)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/streamstats.R
\name{latlon2state}
\alias{latlon2state}
\title{Copied from http://stackoverflow.com/a/8751965}
\usage{
latlon2state(lat, lon)
}
\description{
library(sp)
library(maps)
library(maptools)
The single argument to this function, poi... | /man/latlon2state.Rd | no_license | ryan-hill/streamstats | R | false | true | 466 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/streamstats.R
\name{latlon2state}
\alias{latlon2state}
\title{Copied from http://stackoverflow.com/a/8751965}
\usage{
latlon2state(lat, lon)
}
\description{
library(sp)
library(maps)
library(maptools)
The single argument to this function, poi... |
#model
bike <- read.csv('bikeshare.csv')
head(bike)
#data analysis
library(ggplot2)
library(dplyr)
ggplot(bike, aes(temp, count)) + geom_point(alpha=0.4)
ggplot(bike, aes(temp, count)) + geom_point(alpha=0.4, aes(color=temp)) + theme_bw()
#convert to timestamp
bike$datetime <- as.POSIXct(bike$datetime)
pl <-... | /model.R | no_license | mohodyash/Bike-sharing-Demand-kaggle-challenge | R | false | false | 2,039 | r | #model
bike <- read.csv('bikeshare.csv')
head(bike)
#data analysis
library(ggplot2)
library(dplyr)
ggplot(bike, aes(temp, count)) + geom_point(alpha=0.4)
ggplot(bike, aes(temp, count)) + geom_point(alpha=0.4, aes(color=temp)) + theme_bw()
#convert to timestamp
bike$datetime <- as.POSIXct(bike$datetime)
pl <-... |
\name{downStreamGenes}
\alias{downStreamGenes}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{something
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
downStreamGenes(netpairs, seednodes, N = 100, directed = T)
}
%- may... | /Code/RPackages/keyDriver/man/downStreamGenes.Rd | no_license | kippjohnson/RASNetwork | R | false | false | 2,053 | rd | \name{downStreamGenes}
\alias{downStreamGenes}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{something
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
downStreamGenes(netpairs, seednodes, N = 100, directed = T)
}
%- may... |
library(survey)
library(tidyverse)
library(reshape2)
# (i) Define a data-frame including variables with names (that are non-empty but can be meaningless like V1-V50) consisting of linearly independent columns, the first of which is a column of all 1's, whose weighted totals will be raked to totals supplied in a vector... | /tests/survey/20210209-first.R | no_license | jlivsey/Dvar | R | false | false | 6,022 | r | library(survey)
library(tidyverse)
library(reshape2)
# (i) Define a data-frame including variables with names (that are non-empty but can be meaningless like V1-V50) consisting of linearly independent columns, the first of which is a column of all 1's, whose weighted totals will be raked to totals supplied in a vector... |
#########################################################
#####
##### project: ArcticSEBSynthesis
##### title: aggSetup
##### description: setup script for aggregation of data
##### publication: Oehri, J. et al. (2022). Vegetation Type is an Important Predictor of the Arctic Summer Land Surface Energy... | /DataAggregation/functions/aggSetup.R | no_license | oehrij/ArcticSEBSynthesis | R | false | false | 3,045 | r | #########################################################
#####
##### project: ArcticSEBSynthesis
##### title: aggSetup
##### description: setup script for aggregation of data
##### publication: Oehri, J. et al. (2022). Vegetation Type is an Important Predictor of the Arctic Summer Land Surface Energy... |
library(e1071)
library(readxl)
#### SETUP ################################################################
data<-read_excel("data.xlsx")
data<-data.frame(data)
#### HANDLING MISSING DATA ####
# fill in zeroes
data[,18:46][is.na(data[,18:46])]<-0
#### CONVERTING TO FACTORS/NUMERIC ####
data$Year<-as.factor(data$Yea... | /svm_4.R | no_license | Una95Singo/statsprojecthq | R | false | false | 20,016 | r | library(e1071)
library(readxl)
#### SETUP ################################################################
data<-read_excel("data.xlsx")
data<-data.frame(data)
#### HANDLING MISSING DATA ####
# fill in zeroes
data[,18:46][is.na(data[,18:46])]<-0
#### CONVERTING TO FACTORS/NUMERIC ####
data$Year<-as.factor(data$Yea... |
#########################################
## Adding hyperlinks and share buttons ##
#########################################
########################
### Using fluid page ###
########################
# in the navigation bar
shinyApp(
ui <- shinyUI(
navbarPage("Test title",
tabPanel(tags$a(href... | /Shiny_sharebutton_hyperlinks.R | no_license | AlysY/Shiny_setup | R | false | false | 4,901 | r | #########################################
## Adding hyperlinks and share buttons ##
#########################################
########################
### Using fluid page ###
########################
# in the navigation bar
shinyApp(
ui <- shinyUI(
navbarPage("Test title",
tabPanel(tags$a(href... |
#Step 5
#Functions to interpolate locations and animate paths
#Conductance Raster----
#' Create a conductance raster
#'
#' Creates a conductance raster for the study area for use in calculating
#' least cost paths between two locations.
#'
#' @usage raster_conduct(sa_rast, impassable, impassable_value = 100)
#'
#' @p... | /R/s5_interpolate_animate.R | no_license | bsmity13/ADePTR | R | false | false | 17,108 | r | #Step 5
#Functions to interpolate locations and animate paths
#Conductance Raster----
#' Create a conductance raster
#'
#' Creates a conductance raster for the study area for use in calculating
#' least cost paths between two locations.
#'
#' @usage raster_conduct(sa_rast, impassable, impassable_value = 100)
#'
#' @p... |
% --- Source file: sampleSize_binary.Rd ---
\name{sampleSize_binary}
\alias{sampleSize_binary}
\title{Sample size for a binary exposure}
\description{
Calculates the required sample size of as case-control study with a binary exposure variable
}
\usage{
sampleSize_binary(prev, logOR, probXeq1=NULL, distF=NULL, data=NUL... | /man/sampleSize_binary.Rd | no_license | cran/samplesizelogisticcasecontrol | R | false | false | 4,299 | rd | % --- Source file: sampleSize_binary.Rd ---
\name{sampleSize_binary}
\alias{sampleSize_binary}
\title{Sample size for a binary exposure}
\description{
Calculates the required sample size of as case-control study with a binary exposure variable
}
\usage{
sampleSize_binary(prev, logOR, probXeq1=NULL, distF=NULL, data=NUL... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methodsMeanExpression-bulk.R
\name{methodWrapper.limmaVoom}
\alias{methodWrapper.limmaVoom}
\title{limma + voom}
\usage{
methodWrapper.limmaVoom(counts, condition, pseudocount = 0.5,
control = list(save_modelFit = FALSE))
}
\arguments{
\ite... | /man/methodWrapper.limmaVoom.Rd | no_license | jhsiao999/ashbun | R | false | true | 1,221 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methodsMeanExpression-bulk.R
\name{methodWrapper.limmaVoom}
\alias{methodWrapper.limmaVoom}
\title{limma + voom}
\usage{
methodWrapper.limmaVoom(counts, condition, pseudocount = 0.5,
control = list(save_modelFit = FALSE))
}
\arguments{
\ite... |
# Damon Polioudakis
# 2017-04-11
# Format RNA STAR stats into table from Compile_RNAstar_Stats_HsMm.sh
################################################################################
rm(list=ls())
# Input directory paths
inSeqDir <- c("DS-002-011", "DS-003", "DS-004", "DS-005-006-007-008"
, "DS-008-011", "DS-009"... | /code/QC_RNAstar_Stats_HsMm.R | no_license | zehualilab/RNAseq_singlecellfetal | R | false | false | 1,732 | r | # Damon Polioudakis
# 2017-04-11
# Format RNA STAR stats into table from Compile_RNAstar_Stats_HsMm.sh
################################################################################
rm(list=ls())
# Input directory paths
inSeqDir <- c("DS-002-011", "DS-003", "DS-004", "DS-005-006-007-008"
, "DS-008-011", "DS-009"... |
trainadeline <- function(xin, yd, eta, tol, maxepocas, par)
{
dimxin <- dim(xin)
N <- dimxin[1]
n <- dimxin[2]
if(par == 1){
wt <- as.matrix(runif(n+1)-0.5)
xin <- cbind(1,xin)
}
else{
wt <-as.matrix(runif(n)-0.5)
}
nepocas <- 0
eepoca <- tol + 1
evec <- matrix(nrow = 1, ncol = ... | /ufmg.rna/11.atividade05/trainadeline.R | permissive | matheusaraujo/ufmg | R | false | false | 772 | r | trainadeline <- function(xin, yd, eta, tol, maxepocas, par)
{
dimxin <- dim(xin)
N <- dimxin[1]
n <- dimxin[2]
if(par == 1){
wt <- as.matrix(runif(n+1)-0.5)
xin <- cbind(1,xin)
}
else{
wt <-as.matrix(runif(n)-0.5)
}
nepocas <- 0
eepoca <- tol + 1
evec <- matrix(nrow = 1, ncol = ... |
## Student Name: Chanpreet Singh , Roll number : 101128629 , MIT-DIGITAL MEDIA (DATA SCIENCE)
#############Author: Chanpreet Singh, School of IT ##################################################
#############Special Thanks to Prof Dr. Omair Shafiq for helping in almost everypart of the project#####
#PREDICTION OF INC... | /predict_income_level (Adult Data set).R | no_license | rajachanpreetsingh/Income-Prediction-Analysis | R | false | false | 30,450 | r |
## Student Name: Chanpreet Singh , Roll number : 101128629 , MIT-DIGITAL MEDIA (DATA SCIENCE)
#############Author: Chanpreet Singh, School of IT ##################################################
#############Special Thanks to Prof Dr. Omair Shafiq for helping in almost everypart of the project#####
#PREDICTION OF INC... |
#This file added variables for the ratio of spectral power of different frequency bands
# all possible combinations were added
# These features were then added to the feature space including mean spectral power, variance, min-max and extreme values
library(data.table)
freqRatio <- function(delta,theta,alpha,beta,l... | /UPenn_Seizure/add_freqRatios.r | no_license | djacheson/Kaggle | R | false | false | 5,156 | r | #This file added variables for the ratio of spectral power of different frequency bands
# all possible combinations were added
# These features were then added to the feature space including mean spectral power, variance, min-max and extreme values
library(data.table)
freqRatio <- function(delta,theta,alpha,beta,l... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoflow_provenance.R
\docType{data}
\name{geoflow_provenance}
\alias{geoflow_provenance}
\title{geoflow_provenance}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
geoflow_provenance
}
\description{
geoflow_provenanc... | /man/geoflow_provenance.Rd | no_license | gitter-badger/geoflow | R | false | true | 343 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoflow_provenance.R
\docType{data}
\name{geoflow_provenance}
\alias{geoflow_provenance}
\title{geoflow_provenance}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
geoflow_provenance
}
\description{
geoflow_provenanc... |
## Drift and mutation formulas and trajectories
# Functions: ----------------------------------------------------------------- #
# H_eq computes the equilibrium heterozygosity
H_eq <- function(N, u) {
theta <- 4 * N * u
H <- theta / (theta + 1)
return(H)
}
# f_change computes the change in f under drif... | /drift_mutation.R | no_license | diogomeyer/popgen_teaching | R | false | false | 1,085 | r | ## Drift and mutation formulas and trajectories
# Functions: ----------------------------------------------------------------- #
# H_eq computes the equilibrium heterozygosity
H_eq <- function(N, u) {
theta <- 4 * N * u
H <- theta / (theta + 1)
return(H)
}
# f_change computes the change in f under drif... |
# Written by Joseph N. Brown
# for the Department of Energy (PNNL, Richland, WA)
# Battelle Memorial Institute
# E-mail: joseph.brown@pnnl.gov
# Website: http://omics.pnl.gov/software
# -----------------------------------------------------
#
# Notice: This computer software was prepared by Battelle Memorial In... | /TestHarness/Docs/R_Scripts/Aggregate.R | permissive | PNNL-Comp-Mass-Spec/Cyclops | R | false | false | 2,665 | r |
# Written by Joseph N. Brown
# for the Department of Energy (PNNL, Richland, WA)
# Battelle Memorial Institute
# E-mail: joseph.brown@pnnl.gov
# Website: http://omics.pnl.gov/software
# -----------------------------------------------------
#
# Notice: This computer software was prepared by Battelle Memorial In... |
\name{qat_save_lim_rule_sigma_2d}
\alias{qat_save_lim_rule_sigma_2d}
\title{Produce a savelist from a resultlist for a LIM Rule Sigma Test}
\description{
This function takes the results, produced by qat\_analyse\_lim\_rule\_sigma\_2d and construct a savelist, which may be used to produce a netCDF output.}
\usage{
qat_s... | /man/qat_save_lim_rule_sigma_2d.Rd | no_license | cran/qat | R | false | false | 1,215 | rd | \name{qat_save_lim_rule_sigma_2d}
\alias{qat_save_lim_rule_sigma_2d}
\title{Produce a savelist from a resultlist for a LIM Rule Sigma Test}
\description{
This function takes the results, produced by qat\_analyse\_lim\_rule\_sigma\_2d and construct a savelist, which may be used to produce a netCDF output.}
\usage{
qat_s... |
# Reconstruction stage (including Hankelization) of multivariate functional singular spectrum analysis.
mfreconstruct <-function(U, group = as.list(1L:10L)){
N <- U$N
Y <- U$Y
p <- U$Y$p
L <- U$L
K <- N-L+1
basis <- list()
m <- length(group)
for(j in 1: p){
basis[[j]] <- U$Y[[j]]$basis
... | /Rfssa/R/mfreconstruct.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 1,252 | r | # Reconstruction stage (including Hankelization) of multivariate functional singular spectrum analysis.
mfreconstruct <-function(U, group = as.list(1L:10L)){
N <- U$N
Y <- U$Y
p <- U$Y$p
L <- U$L
K <- N-L+1
basis <- list()
m <- length(group)
for(j in 1: p){
basis[[j]] <- U$Y[[j]]$basis
... |
# Analysis of Independent Journal Review
library(devtools)
library(data.table)
library(Rfacebook)
library(urltools)
############# Compile Data from Scratch #############
getDomainAndTime <- function (dt)
{
dt$domain <- domain(dt$link)
dt$domain <- sub('www.','',dt$domain)
dt$domain <- as.factor(dt$domain)
dt$... | /IJR_Facebook.R | no_license | pyropenguin/Carson_IJR | R | false | false | 2,041 | r | # Analysis of Independent Journal Review
library(devtools)
library(data.table)
library(Rfacebook)
library(urltools)
############# Compile Data from Scratch #############
getDomainAndTime <- function (dt)
{
dt$domain <- domain(dt$link)
dt$domain <- sub('www.','',dt$domain)
dt$domain <- as.factor(dt$domain)
dt$... |
#install.packages("gplots", dependencies = TRUE)
library(gplots)
#install.packages("RColorBrewer", dependencies = TRUE)
library(RColorBrewer)
setwd("C:/Users/yluo/Desktop") #Choose Directory
x <- read.csv("Kim1cor3.csv") #Enter file name of data table
#read in the data:
row.names(x) <- x[,1]
x <- x[,-1]
#transpose ... | /Figure 7 correlation plot.R | no_license | yusyuanluo/Correlation | R | false | false | 1,437 | r | #install.packages("gplots", dependencies = TRUE)
library(gplots)
#install.packages("RColorBrewer", dependencies = TRUE)
library(RColorBrewer)
setwd("C:/Users/yluo/Desktop") #Choose Directory
x <- read.csv("Kim1cor3.csv") #Enter file name of data table
#read in the data:
row.names(x) <- x[,1]
x <- x[,-1]
#transpose ... |
tournament <- function(input) {
# structure using data.frame
df <- function(team, win = 0, loss = 0, draw = 0) {
data.frame(Team = team, W = win, L = loss, D = draw)
}
# initialize the data.frame with a dummy team
standings <- df("__scratch__", 0, 0, 0)
# and then remove the scratch team from the ... | /tournament/tournament.R | no_license | andsus/r | R | false | false | 1,437 | r | tournament <- function(input) {
# structure using data.frame
df <- function(team, win = 0, loss = 0, draw = 0) {
data.frame(Team = team, W = win, L = loss, D = draw)
}
# initialize the data.frame with a dummy team
standings <- df("__scratch__", 0, 0, 0)
# and then remove the scratch team from the ... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 234944
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 228554
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 228554
c
c Input Parameter (command lin... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Gent-Rowley/Connect4/connect_9x8_4_W/connect_9x8_4_W.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 46,854 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 234944
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 228554
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 228554
c
c Input Parameter (command lin... |
## ... your simualtion codek
source("/net/frodo/home/khlin/p3/function.r")
#need to take in parameter
## passed in from the command prompt.
parseCommandArgs()
## Will disply the default values on the first run,
print(seed)
print(n_rep)
print(r)
print(n_family) #number of family
print(p_dis) #prevelance
# print(risk.va... | /2016-02-09 between only using infomative famlit and within.r | no_license | gtlntw/p3_TRAP | R | false | false | 10,435 | r | ## ... your simualtion codek
source("/net/frodo/home/khlin/p3/function.r")
#need to take in parameter
## passed in from the command prompt.
parseCommandArgs()
## Will disply the default values on the first run,
print(seed)
print(n_rep)
print(r)
print(n_family) #number of family
print(p_dis) #prevelance
# print(risk.va... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distributions.R
\name{drpoisAPA}
\alias{drpoisAPA}
\title{Reduced poisson probability distribution function \eqn{rPoisson(x;\lambda,r)}, takes reduced quantiles (use drpois2 for full quantiles).}
\usage{
drpoisAPA(x, lambda, red, precBits = 1... | /man/drpoisAPA.Rd | no_license | mrparker909/redNMix | R | false | true | 968 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distributions.R
\name{drpoisAPA}
\alias{drpoisAPA}
\title{Reduced poisson probability distribution function \eqn{rPoisson(x;\lambda,r)}, takes reduced quantiles (use drpois2 for full quantiles).}
\usage{
drpoisAPA(x, lambda, red, precBits = 1... |
test_that("correct dimension", {
X <- matrix(data = c(2,4,6,7,1,3,5,6,5,6), ncol=2)
X <- cbind(1, X)
y <- c(0.4,0.16,0.3,0.2,0.22)
expect_equal(dim(X)[2], length(regression.fit(X,y)))
})
| /tests/testthat/test-something.R | permissive | hsansford1/Regression | R | false | false | 195 | r | test_that("correct dimension", {
X <- matrix(data = c(2,4,6,7,1,3,5,6,5,6), ncol=2)
X <- cbind(1, X)
y <- c(0.4,0.16,0.3,0.2,0.22)
expect_equal(dim(X)[2], length(regression.fit(X,y)))
})
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale-.R
\name{continuous_scale}
\alias{continuous_scale}
\title{Continuous scale constructor}
\usage{
continuous_scale(
aesthetics,
scale_name,
palette,
name = waiver(),
breaks = waiver(),
minor_breaks = waiver(),
n.breaks = NU... | /man/continuous_scale.Rd | permissive | tidyverse/ggplot2 | R | false | true | 6,004 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale-.R
\name{continuous_scale}
\alias{continuous_scale}
\title{Continuous scale constructor}
\usage{
continuous_scale(
aesthetics,
scale_name,
palette,
name = waiver(),
breaks = waiver(),
minor_breaks = waiver(),
n.breaks = NU... |
## SciCast Brier Scores
## Imitation of Stratman's method for binary questions
##
## Modified 2014-12-22 by kolson to fix a bug in carrying forward old estimates:
## Some had failed to carry forward; this seems to have been the main source of
## the discrepancy between our previous scores and Steve's.
#
# First run G... | /Incentive Accuracy Control 141209 test.R | no_license | Andy-Powell/SciCast_Andy | R | false | false | 4,928 | r | ## SciCast Brier Scores
## Imitation of Stratman's method for binary questions
##
## Modified 2014-12-22 by kolson to fix a bug in carrying forward old estimates:
## Some had failed to carry forward; this seems to have been the main source of
## the discrepancy between our previous scores and Steve's.
#
# First run G... |
#!/applications/R/R-3.5.0/bin/Rscript
library(rtracklayer)
# Load NLRAnnotator output TSV file and include annotated motifs in
# BED and GFF output files for use in downstream analysis
# (e.g., test representation of motifs among cM/Mb quantiles)
NLR <- read.table(paste0("/home/ajt200/analysis/wheat/annotation/221118... | /annotation/221118_download/iwgsc_refseqv1.1_genes_2017July06/NLRs_Steuernagel_Wulff_2020_Plant_Physiol/NLRAnnotator/add_NLRAnnotator_motifs_to_BED_and_GFF.R | no_license | ajtock/wheat | R | false | false | 20,368 | r | #!/applications/R/R-3.5.0/bin/Rscript
library(rtracklayer)
# Load NLRAnnotator output TSV file and include annotated motifs in
# BED and GFF output files for use in downstream analysis
# (e.g., test representation of motifs among cM/Mb quantiles)
NLR <- read.table(paste0("/home/ajt200/analysis/wheat/annotation/221118... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 1144
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 1144
c
c Input Parameter (command line, file):
c input filename QBFLIB/Letombe/Abduction/par8-2-c-50.qdimacs
c output filename ... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Letombe/Abduction/par8-2-c-50/par8-2-c-50.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 616 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 1144
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 1144
c
c Input Parameter (command line, file):
c input filename QBFLIB/Letombe/Abduction/par8-2-c-50.qdimacs
c output filename ... |
% Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{content}
\alias{content}
\alias{parsed_content}
\alias{text_content}
\title{Extract content from a request.}
\usage{
content(x, as = NULL, type = NULL, encoding = NULL, ...)
}
\arguments{
\item{x}{request object}
\item{as}{desired type of output: \code{raw}... | /man/content.Rd | no_license | wibeasley/httr | R | false | false | 2,868 | rd | % Generated by roxygen2 (4.0.1.99): do not edit by hand
\name{content}
\alias{content}
\alias{parsed_content}
\alias{text_content}
\title{Extract content from a request.}
\usage{
content(x, as = NULL, type = NULL, encoding = NULL, ...)
}
\arguments{
\item{x}{request object}
\item{as}{desired type of output: \code{raw}... |
###################
# apply functions #
###################
# apply(df, margin, fun)
# apply the function fun to the rows / columns of df
# rows: margin = 1, column: margin = 2
df = data.frame(a = 1:5, b = c(3,2,1,3,2))
df
rowMeans(df)
apply(df, 1, mean)
# row sd
apply(df, 1, sd)
# column medians... | /statistical-computing/Lecture/Lecture16 apply.R | no_license | JiaRuiShao/Data-Mining-R | R | false | false | 1,329 | r | ###################
# apply functions #
###################
# apply(df, margin, fun)
# apply the function fun to the rows / columns of df
# rows: margin = 1, column: margin = 2
df = data.frame(a = 1:5, b = c(3,2,1,3,2))
df
rowMeans(df)
apply(df, 1, mean)
# row sd
apply(df, 1, sd)
# column medians... |
library(shiny)
shinyServer(function(input, output) {
# Make three independent, repeatable copies of rnorm so that the underlying
# random values don't change
rnorm1 = repeatable(rnorm)
rnorm2 = repeatable(rnorm)
rnorm3 = repeatable(rnorm)
gen_data = reactive(function() {
n = input$n; mu1 = input$... | /06-anova/server.R | no_license | jcheng5/appstat | R | false | false | 989 | r | library(shiny)
shinyServer(function(input, output) {
# Make three independent, repeatable copies of rnorm so that the underlying
# random values don't change
rnorm1 = repeatable(rnorm)
rnorm2 = repeatable(rnorm)
rnorm3 = repeatable(rnorm)
gen_data = reactive(function() {
n = input$n; mu1 = input$... |
rm(list = ls())
library(MASS)
head(survey)
#write the file
write.table(survey, file = "survey.dat", row.names = F, sep = "\t")
setwd("/Users/Francesco/Documents/R Project")
#read the file
read.table("survey.dat", header = T, sep = "\t") -> data
head(data)
#contingency table
(tbl <- table(survey$Smoke, survey$Exer))... | /Lesson3.R | no_license | frank1789/Lesson-R | R | false | false | 413 | r | rm(list = ls())
library(MASS)
head(survey)
#write the file
write.table(survey, file = "survey.dat", row.names = F, sep = "\t")
setwd("/Users/Francesco/Documents/R Project")
#read the file
read.table("survey.dat", header = T, sep = "\t") -> data
head(data)
#contingency table
(tbl <- table(survey$Smoke, survey$Exer))... |
require("gridExtra")
plot.residuals <- function(results, cutoff = 30, binning = seq(-2,5,0.1), inverse = F){
if( inverse ){
reference <- data.frame( observable = 1/results$ptTrue,
fitted = 1/results$refPt,
delta = with(results, 1/... | /residuals.R | no_license | kkotov/emtfPtRegression | R | false | false | 4,451 | r | require("gridExtra")
plot.residuals <- function(results, cutoff = 30, binning = seq(-2,5,0.1), inverse = F){
if( inverse ){
reference <- data.frame( observable = 1/results$ptTrue,
fitted = 1/results$refPt,
delta = with(results, 1/... |
#' cBRS squat dataset for use with Myths and Methodologies Reliability Papers
#'
#' The time points are PRE and POST.
#' Alpha coefficients are designated as alphaLF and alphaHF for the low and high frequency range respectively. Estimates are provided for the mean and median of the frequency ranges.
#' Transfer functio... | /R/cBRS_squats_data.R | permissive | AshleyAkerman/mmReliability | R | false | false | 844 | r | #' cBRS squat dataset for use with Myths and Methodologies Reliability Papers
#'
#' The time points are PRE and POST.
#' Alpha coefficients are designated as alphaLF and alphaHF for the low and high frequency range respectively. Estimates are provided for the mean and median of the frequency ranges.
#' Transfer functio... |
\name{rownames-methods}
\docType{methods}
\alias{rownames-methods}
\alias{rownames<--methods}
\alias{rownames,Dna-method}
\alias{rownames<-,Dna-method}
\alias{rownames,Parsimnet-method}
\alias{rownames<-,Parsimnet-method}
\title{Retrieve or set the row names}
\description{
Function to get or set row names of a seque... | /man/rownames-methods.Rd | no_license | cran/haplotypes | R | false | false | 1,580 | rd | \name{rownames-methods}
\docType{methods}
\alias{rownames-methods}
\alias{rownames<--methods}
\alias{rownames,Dna-method}
\alias{rownames<-,Dna-method}
\alias{rownames,Parsimnet-method}
\alias{rownames<-,Parsimnet-method}
\title{Retrieve or set the row names}
\description{
Function to get or set row names of a seque... |
##' Trajectory plots with conditioning
##'
##' This function plots back trajectories. There are two related
##' functions: \code{trajPlot} and \code{trajLevel}. These functions
##' require that data are imported using the \code{importTraj}
##' function.
##'
##' Several types of trajectory plot are available. \code{traj... | /functions/trajPlot.R | no_license | eliavs/Wind | R | false | false | 22,776 | r | ##' Trajectory plots with conditioning
##'
##' This function plots back trajectories. There are two related
##' functions: \code{trajPlot} and \code{trajLevel}. These functions
##' require that data are imported using the \code{importTraj}
##' function.
##'
##' Several types of trajectory plot are available. \code{traj... |
###
### weak marginal for model parameters
###
### Mparms: pmS parms
## FIXME: weak_marginal_model:
## FIXME: We carry N to all marginal model parameters, not a big deal but it would be cleaner if we didn't
weak_marginal_model<- function(Mparms, disc=NULL,cont=NULL, type="pms", details=2){
##Mparms <- unclass(Mp... | /fuzzedpackages/gRim/R/mi-weakmodel.R | no_license | akhikolla/testpackages | R | false | false | 4,247 | r | ###
### weak marginal for model parameters
###
### Mparms: pmS parms
## FIXME: weak_marginal_model:
## FIXME: We carry N to all marginal model parameters, not a big deal but it would be cleaner if we didn't
weak_marginal_model<- function(Mparms, disc=NULL,cont=NULL, type="pms", details=2){
##Mparms <- unclass(Mp... |
#
# Copyright SAS Institute
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | /R/rswat_rest.R | permissive | poparksas/R-swat | R | false | false | 31,672 | r | #
# Copyright SAS Institute
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... |
/Stock/stock_traitement_robot_tra.R | no_license | Gottavianoni/R | R | false | false | 4,652 | r | ||
testlist <- list(Rs = numeric(0), atmp = c(9.53708019597101e-228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), relh = c(NA, NaN, NaN, -5.59219752033303e+72), temp = -Inf)
result <- do.call(meteor:::ET0_Makkink,testlist)
str(result) | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615858799-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 261 | r | testlist <- list(Rs = numeric(0), atmp = c(9.53708019597101e-228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), relh = c(NA, NaN, NaN, -5.59219752033303e+72), temp = -Inf)
result <- do.call(meteor:::ET0_Makkink,testlist)
str(result) |
# 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... | /mepstrends/hc_use/json/code/r/totPOP__poverty__race__.r | permissive | RandomCriticalAnalysis/MEPS-summary-tables | R | false | false | 2,544 | 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... |
interior_cor_first=function(data_A,result_D,test_data,s,method,Discrete,G1,beta_value,criteria,d,option,test_M_data,filename,simulation){
Discrete_data=as.data.frame(matrix(,nrow(data_A),))
multi_criterion_pre=as.data.frame(matrix(,10,))
multi_criterion=as.data.frame(matrix(,10,))
temp_matrix=as.data.frame(matr... | /R/演算法/MFSS_parallel_selection_algorithm.r | no_license | DaYi-TW/Data-science | R | false | false | 10,794 | r | interior_cor_first=function(data_A,result_D,test_data,s,method,Discrete,G1,beta_value,criteria,d,option,test_M_data,filename,simulation){
Discrete_data=as.data.frame(matrix(,nrow(data_A),))
multi_criterion_pre=as.data.frame(matrix(,10,))
multi_criterion=as.data.frame(matrix(,10,))
temp_matrix=as.data.frame(matr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generics.R, R/preprocessing.R
\name{RegionStats}
\alias{RegionStats}
\alias{RegionStats.default}
\alias{RegionStats.Assay}
\alias{RegionStats.Seurat}
\title{Compute base composition information for genomic ranges}
\usage{
RegionStats(object, ... | /man/RegionStats.Rd | permissive | zorrodong/signac | R | false | true | 1,434 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generics.R, R/preprocessing.R
\name{RegionStats}
\alias{RegionStats}
\alias{RegionStats.default}
\alias{RegionStats.Assay}
\alias{RegionStats.Seurat}
\title{Compute base composition information for genomic ranges}
\usage{
RegionStats(object, ... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 10005
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 10005
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query21_query34_1344/query21_query34_1344.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 717 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 10005
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 10005
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4... |
\name{weighted.median}
\alias{weighted.median}
\title{An example function from the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R}
\description{An example function from Chapter 2 of the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/da... | /man/weighted.median.Rd | no_license | 42n4/dmr.stats | R | false | false | 1,248 | rd | \name{weighted.median}
\alias{weighted.median}
\title{An example function from the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R}
\description{An example function from Chapter 2 of the book Cichosz, P. (2015): Data Mining Algorithms: Explained Using R. See Appendix B or http://www.wiley.com/go/da... |
library(ape)
testtree <- read.tree("4945_14.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="4945_14_unrooted.txt") | /codeml_files/newick_trees_processed/4945_14/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("4945_14.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="4945_14_unrooted.txt") |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Classifier/skin.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.04,family="gaussian",standardize=FALSE)
sink('./skin_020.txt',append=TRUE)
pri... | /Model/EN/Classifier/skin/skin_020.R | no_license | esbgkannan/QSMART | R | false | false | 346 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Classifier/skin.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.04,family="gaussian",standardize=FALSE)
sink('./skin_020.txt',append=TRUE)
pri... |
{
(
(({
{
{
c(
99,
1 + 1, {
"within that suff"
}
)
}
}
}))
)
}
(((
1 + 2) * (3 + 4
)))
function(x, y, z) {
}
| /tests/testthat/indention_multiple/edge_strict_mixed-out.R | no_license | miraisolutions/styler | R | false | false | 225 | r | {
(
(({
{
{
c(
99,
1 + 1, {
"within that suff"
}
)
}
}
}))
)
}
(((
1 + 2) * (3 + 4
)))
function(x, y, z) {
}
|
# calculating posterior probabilities - for trait study only
#
# For each person with trait, create tx.max (e.g. 1000) posterior probs corresponding to prob that RNAseq = 1 ... 1000
# See equation 6: Ri is ri in equation. y1[i] is yi in equation.
posterior.prob <- function(geno, y1, Ri, beta.hat, gamma.hat, sige.hat, ... | /R/twas.R | permissive | dkulp2/TWAS | R | false | false | 18,196 | r | # calculating posterior probabilities - for trait study only
#
# For each person with trait, create tx.max (e.g. 1000) posterior probs corresponding to prob that RNAseq = 1 ... 1000
# See equation 6: Ri is ri in equation. y1[i] is yi in equation.
posterior.prob <- function(geno, y1, Ri, beta.hat, gamma.hat, sige.hat, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Misc_functions.R
\name{repapply}
\alias{repapply}
\title{Apply Functions Over Replicate Groups}
\usage{
repapply(msdata, ...)
}
\arguments{
\item{msdata}{An object of \code{\link[MSdata]{MSdata}} class.}
\item{fun}{The function to be applied... | /man/repapply.Rd | no_license | flajole/MSdata | R | false | true | 448 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Misc_functions.R
\name{repapply}
\alias{repapply}
\title{Apply Functions Over Replicate Groups}
\usage{
repapply(msdata, ...)
}
\arguments{
\item{msdata}{An object of \code{\link[MSdata]{MSdata}} class.}
\item{fun}{The function to be applied... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rtable.R
\name{rtable}
\alias{rtable}
\title{Create a Table}
\usage{
rtable(header, ..., format = NULL)
}
\arguments{
\item{header}{either a vector with column names or an object returned by
\code{\link{rheader}} if special formating and mult... | /man/rtable.Rd | permissive | bbaranow/rtables | R | false | true | 2,802 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rtable.R
\name{rtable}
\alias{rtable}
\title{Create a Table}
\usage{
rtable(header, ..., format = NULL)
}
\arguments{
\item{header}{either a vector with column names or an object returned by
\code{\link{rheader}} if special formating and mult... |
binom.test(80, 124, p = 0.60)
| /inst/snippets/Exploration3.1.8d.R | no_license | rpruim/ISIwithR | R | false | false | 31 | r | binom.test(80, 124, p = 0.60)
|
##' Multi-objective Expected Hypervolume Improvement with respect to the
##' current Pareto front. With two objectives the analytical formula is used, while
##' Sample Average Approximation (SAA) is used with more objectives.
##' To avoid numerical instabilities, the new point is penalized if it is too close to an exi... | /GPareto/R/crit_EHI.R | no_license | akhikolla/InformationHouse | R | false | false | 5,115 | r | ##' Multi-objective Expected Hypervolume Improvement with respect to the
##' current Pareto front. With two objectives the analytical formula is used, while
##' Sample Average Approximation (SAA) is used with more objectives.
##' To avoid numerical instabilities, the new point is penalized if it is too close to an exi... |
setwd('/Users/ayusek/Desktop/Academics/MLT/MLT-Machine-Learning-Techniques-CS771-IITK/Assignment2') #Need to be changed accordingly
set.seed(2) #Setting a seed for deterministic evaluation
mydata = read.csv('letter-recognition.data.txt',header = FALSE)
#I am not giving the column names initially
problem = 1
m_a = 4... | /Assignment2/config.R | no_license | sahooamarjeet/MLT-Machine-Learning-Techniques-CS771-IITK | R | false | false | 352 | r | setwd('/Users/ayusek/Desktop/Academics/MLT/MLT-Machine-Learning-Techniques-CS771-IITK/Assignment2') #Need to be changed accordingly
set.seed(2) #Setting a seed for deterministic evaluation
mydata = read.csv('letter-recognition.data.txt',header = FALSE)
#I am not giving the column names initially
problem = 1
m_a = 4... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/banner2cpe.R
\name{prepareGlobalVars}
\alias{prepareGlobalVars}
\title{prepareGlobalVars}
\usage{
prepareGlobalVars()
}
\description{
prepareGlobalVars
}
| /man/prepareGlobalVars.Rd | permissive | datofe/banner2cpe | R | false | true | 233 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/banner2cpe.R
\name{prepareGlobalVars}
\alias{prepareGlobalVars}
\title{prepareGlobalVars}
\usage{
prepareGlobalVars()
}
\description{
prepareGlobalVars
}
|
library("lme4")
library("mvtnorm")
library("MCMCpack")
library("nloptr")
library("ggplot2")
library("dplyr")
library("stats4")
# load a sample dataset
mysample<-read.csv(file="example.csv")
# load self-defined functions
source("ASE_paraEst.R")
source("ASE_LogPPs.R")
source("ASE_detect.R")
# detect AS... | /ASE_example.R | no_license | JingXieMIZZOU/ASE-detection-by-BLRM | R | false | false | 381 | r | library("lme4")
library("mvtnorm")
library("MCMCpack")
library("nloptr")
library("ggplot2")
library("dplyr")
library("stats4")
# load a sample dataset
mysample<-read.csv(file="example.csv")
# load self-defined functions
source("ASE_paraEst.R")
source("ASE_LogPPs.R")
source("ASE_detect.R")
# detect AS... |
# Copyright 2011 Revolution Analytics
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | /rmr2/pkg/R/local.R | no_license | sjuvekar/RHadoop | R | false | false | 1,838 | r | # Copyright 2011 Revolution Analytics
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... |
#### Trying to understand and improve the existing algorithm
rm(list = ls()) #clearing the workspace.
library(RTOMO)
# Description: Created mainly for use with seismic tomography, this
# program plots tomographic images, and allows one to interact
# and query three-dimensional tomographic models. Vertical
#... | /RCode_MtStHelens/TomoRunCarp.R | no_license | gkamath/VolcanoSRI | R | false | false | 11,023 | r | #### Trying to understand and improve the existing algorithm
rm(list = ls()) #clearing the workspace.
library(RTOMO)
# Description: Created mainly for use with seismic tomography, this
# program plots tomographic images, and allows one to interact
# and query three-dimensional tomographic models. Vertical
#... |
library(ggplot2)
library(plyr)
data <- read.delim('~/Dropbox/densitypaper/densitypaperdataanalysis/ExtractedData/heterokaryon.txt',header=T,stringsAsFactors=F)
numericcols <- c('repNum','dataNum','objNum','volume','cytoGAPDH','cytoGFP','cytoGAS6');
for (col in numericcols){
data[[col]] <- as.numeric(data[[col]])
}... | /densityfigures/Figure3/Heterokaryon/Fig3BC.R | no_license | arjunrajlaboratory/DensityPaperDataAnalysis | R | false | false | 1,989 | r | library(ggplot2)
library(plyr)
data <- read.delim('~/Dropbox/densitypaper/densitypaperdataanalysis/ExtractedData/heterokaryon.txt',header=T,stringsAsFactors=F)
numericcols <- c('repNum','dataNum','objNum','volume','cytoGAPDH','cytoGFP','cytoGAS6');
for (col in numericcols){
data[[col]] <- as.numeric(data[[col]])
}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_mRECIST.R
\name{plotmRECIST}
\alias{plotmRECIST}
\title{To plot mRECIST values}
\usage{
plotmRECIST(mat, control.name = NA, control.col = "#238b45",
drug.col = "black", colPalette = NULL, name = "Drug & Models",
sort = TRUE, row_font... | /man/plotmRECIST.Rd | no_license | RNA-Ninja/Xeva | R | false | true | 1,250 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_mRECIST.R
\name{plotmRECIST}
\alias{plotmRECIST}
\title{To plot mRECIST values}
\usage{
plotmRECIST(mat, control.name = NA, control.col = "#238b45",
drug.col = "black", colPalette = NULL, name = "Drug & Models",
sort = TRUE, row_font... |
# setwd("E:/OSU/Research/AF SNV/R Package/wAF")
# library(devtools)
#
# # RV_dense
# set.seed(7)
# RV_dense <- data_sim(n = 1000, K = 300, prop = 0.2, strg = 0.5, binary = TRUE)
# use_data(RV_dense)
#
# # RV_sparse
# set.seed(14)
# RV_sparse <- data_sim(n = 1000, K = 300, prop = 0.01, strg = 2, binary = TRUE)
# use_dat... | /R/data_generation.R | no_license | songbiostat/wAF | R | false | false | 577 | r | # setwd("E:/OSU/Research/AF SNV/R Package/wAF")
# library(devtools)
#
# # RV_dense
# set.seed(7)
# RV_dense <- data_sim(n = 1000, K = 300, prop = 0.2, strg = 0.5, binary = TRUE)
# use_data(RV_dense)
#
# # RV_sparse
# set.seed(14)
# RV_sparse <- data_sim(n = 1000, K = 300, prop = 0.01, strg = 2, binary = TRUE)
# use_dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mp.R
\name{marginalPrediction}
\alias{marginalPrediction}
\title{marginalizes prediction functions}
\usage{
marginalPrediction(data, vars, n, model, uniform = TRUE, points, int.points,
aggregate.fun = function(x) sum(x)/length(x),
predict... | /man/marginalPrediction.Rd | no_license | flinder/mmpf | R | false | true | 2,899 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mp.R
\name{marginalPrediction}
\alias{marginalPrediction}
\title{marginalizes prediction functions}
\usage{
marginalPrediction(data, vars, n, model, uniform = TRUE, points, int.points,
aggregate.fun = function(x) sum(x)/length(x),
predict... |
###########################################################################################################################
## Project: NEXTDATA ##
## Parameter: NEPH ... | /NEPH_P20_1907.R | no_license | cageo/procedures_NextData | R | false | false | 50,640 | r | ###########################################################################################################################
## Project: NEXTDATA ##
## Parameter: NEPH ... |
setwd("D:/Work/Project/Paper_algorithms/sc-RNA/scImpute-master")
library(parallel)
library(kernlab)
library(doParallel)
ans = list.files("./R")
ans = paste0("R/", ans[1:9])
sapply(ans, source)
s = Sys.time()
scimpute(count_path="inst/extdata/raw_count.csv", infile="csv",
outfile="csv", out_di... | /demo.R | no_license | NeyoShinado/MGGE | R | false | false | 426 | r | setwd("D:/Work/Project/Paper_algorithms/sc-RNA/scImpute-master")
library(parallel)
library(kernlab)
library(doParallel)
ans = list.files("./R")
ans = paste0("R/", ans[1:9])
sapply(ans, source)
s = Sys.time()
scimpute(count_path="inst/extdata/raw_count.csv", infile="csv",
outfile="csv", out_di... |
#' Establishes a connection to the database
#'
#' @param database target db
#' @param host db host: typically "localhost"
#' @param port db port number
#' @param username db username
#' @param password db password
#' @param sqlite_file filename as character vector if using an sqlite db (in
#' which case this is the o... | /R/utils.R | no_license | CC-HIC/inspectEHR | R | false | false | 6,621 | r | #' Establishes a connection to the database
#'
#' @param database target db
#' @param host db host: typically "localhost"
#' @param port db port number
#' @param username db username
#' @param password db password
#' @param sqlite_file filename as character vector if using an sqlite db (in
#' which case this is the o... |
gpca <-
function (xmin = list, xmax = list, reduire = 0, nomVar = NULL,
axes = c(1, 2), axes2=c(1,2,3),nomInd = NULL, legend = NULL, xlim = NULL,
ylim = NULL, nametable = NULL, plot3d.table=NULL)
{
Centrage<-function(x,reduire=0){
x1<-scale(x,center=TRUE, scale=FALSE);
x2<-scale(x,center=TRUE, sca... | /GPCSIV/R/gpca.R | no_license | ingted/R-Examples | R | false | false | 22,036 | r | gpca <-
function (xmin = list, xmax = list, reduire = 0, nomVar = NULL,
axes = c(1, 2), axes2=c(1,2,3),nomInd = NULL, legend = NULL, xlim = NULL,
ylim = NULL, nametable = NULL, plot3d.table=NULL)
{
Centrage<-function(x,reduire=0){
x1<-scale(x,center=TRUE, scale=FALSE);
x2<-scale(x,center=TRUE, sca... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fullscreen.R
\name{fullscreen}
\alias{fullscreen}
\title{Toggle fullscreen mode in the browser}
\usage{
fullscreen(
fullscreen_mode = TRUE,
message = "<p>The experiment will switch to full screen mode when you press the button below</... | /man/fullscreen.Rd | permissive | djnavarro/jaysire | R | false | true | 874 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fullscreen.R
\name{fullscreen}
\alias{fullscreen}
\title{Toggle fullscreen mode in the browser}
\usage{
fullscreen(
fullscreen_mode = TRUE,
message = "<p>The experiment will switch to full screen mode when you press the button below</... |
####################################################################################################################
# Fisheries within the Strait of Georgia Sponge Reef Complexes
#
# Objective: Select fishing events that cross over the sponge reef polygon
#
# Summary: For each fishery of interest - access logb... | /ExtractShellfishFishingEvents_BuildSHP.R | no_license | sare-ah/FishingOnSpongeReefSummaries | R | false | false | 6,248 | r | ####################################################################################################################
# Fisheries within the Strait of Georgia Sponge Reef Complexes
#
# Objective: Select fishing events that cross over the sponge reef polygon
#
# Summary: For each fishery of interest - access logb... |
set.seed(3000)
xseq<-seq(-4,4,.01)
densities<-dnorm(xseq, 0,1)
cumulative<-pnorm(xseq, 0, 1)
randomdeviates<-rnorm(1000,0,1)
par(mfrow=c(1,3), mar=c(3,4,4,2))
plot(xseq, densities, col="darkgreen",xlab="", ylab="Density", type="l",lwd=2, cex=2, main="PDF of Standard Normal", cex.axis=.8)
plot(xseq, cumulat... | /Create random number normal distribution.r | no_license | PrakashV1992/Projects-on-R | R | false | false | 717 | r | set.seed(3000)
xseq<-seq(-4,4,.01)
densities<-dnorm(xseq, 0,1)
cumulative<-pnorm(xseq, 0, 1)
randomdeviates<-rnorm(1000,0,1)
par(mfrow=c(1,3), mar=c(3,4,4,2))
plot(xseq, densities, col="darkgreen",xlab="", ylab="Density", type="l",lwd=2, cex=2, main="PDF of Standard Normal", cex.axis=.8)
plot(xseq, cumulat... |
mcmctwalk <- function(Model, Data, Iterations, Status, Thinning, Specs,
Acceptance, Dev, DiagCovar, LIV, Mon, Mo0, ScaleF, thinned, Debug,
LogFile, MaxWalltime=Inf)
{
time1 <- proc.time()["elapsed"]
xp0 <- SIV <- Specs[["SIV"]]
n1 <- Specs[["n1"]]
at <- Specs[["at"]]
... | /R/mcmctwalk.R | no_license | taranu/LaplacesDemon | R | false | false | 12,554 | r | mcmctwalk <- function(Model, Data, Iterations, Status, Thinning, Specs,
Acceptance, Dev, DiagCovar, LIV, Mon, Mo0, ScaleF, thinned, Debug,
LogFile, MaxWalltime=Inf)
{
time1 <- proc.time()["elapsed"]
xp0 <- SIV <- Specs[["SIV"]]
n1 <- Specs[["n1"]]
at <- Specs[["at"]]
... |
# 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.
# makeCacheMatrix creates a special matrix to cache the inverse of itself and stores it. In particular,
# a) set the values of the matrix
# b) get the values of the ... | /cachematrix.R | no_license | giusycaligiuri/ProgrammingAssignment2 | R | false | false | 1,014 | r | # 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.
# makeCacheMatrix creates a special matrix to cache the inverse of itself and stores it. In particular,
# a) set the values of the matrix
# b) get the values of the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.