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 |
|---|---|---|---|---|---|---|---|---|---|
#-------------------------------------------------------------------------------
# Environment Set-up
#-------------------------------------------------------------------------------
rm(list=ls(all=TRUE))
gc()
options(scipen=999)
# Link DropBox
# library(RStudioAMI)
# linkDropbox()
# install.packages(c("xgboost", "rea... | /Model/Submission/Codes/xgboost_submission_25.r | no_license | vikasnitk85/RossmannStoreSales | R | false | false | 6,587 | r | #-------------------------------------------------------------------------------
# Environment Set-up
#-------------------------------------------------------------------------------
rm(list=ls(all=TRUE))
gc()
options(scipen=999)
# Link DropBox
# library(RStudioAMI)
# linkDropbox()
# install.packages(c("xgboost", "rea... |
#######################################################################################
?install_keras
rm(list=ls())
library(keras)
library(MASS)
use_session_with_seed(1, disable_parallel_cpu = FALSE)
## read csv file
d_score <- read.csv("driving_score.csv")
## prepare data
set.seed(12354)
idx <- c( s... | /R_code/ppt resource/Multi-layer Perception.R | no_license | achieve0410/R | R | false | false | 10,696 | r |
#######################################################################################
?install_keras
rm(list=ls())
library(keras)
library(MASS)
use_session_with_seed(1, disable_parallel_cpu = FALSE)
## read csv file
d_score <- read.csv("driving_score.csv")
## prepare data
set.seed(12354)
idx <- c( s... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818285669856e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual... | /CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615831281-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.32784507357645e-308, 9.53818285669856e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chimericDrops.R
\name{chimericDrops}
\alias{chimericDrops}
\alias{removeChimericDrops}
\title{Remove chimeric molecules}
\usage{
chimericDrops(sample, barcode.length = NULL, ...)
removeChimericDrops(
cells,
umis,
genes,
nreads,
ref... | /man/chimericDrops.Rd | no_license | jwang1834/DropletUtils | R | false | true | 4,810 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/chimericDrops.R
\name{chimericDrops}
\alias{chimericDrops}
\alias{removeChimericDrops}
\title{Remove chimeric molecules}
\usage{
chimericDrops(sample, barcode.length = NULL, ...)
removeChimericDrops(
cells,
umis,
genes,
nreads,
ref... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/03-pull.R
\name{pull_product_table}
\alias{pull_product_table}
\title{Pull PUR Product Table.}
\usage{
pull_product_table(years, quiet = FALSE)
}
\arguments{
\item{years}{A vector of four digit years in the range of 1990 to 2016.}
\item{quie... | /man/pull_product_table.Rd | no_license | temuulene/purexposure | R | false | true | 1,934 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/03-pull.R
\name{pull_product_table}
\alias{pull_product_table}
\title{Pull PUR Product Table.}
\usage{
pull_product_table(years, quiet = FALSE)
}
\arguments{
\item{years}{A vector of four digit years in the range of 1990 to 2016.}
\item{quie... |
# bei mir funktioniert so alles korrekt bis zu den ### (Zeile 75)! Die eingelesenen Werte in R sind korrekt auch wenn Sie im csv anders dargestellt werden.
# Vielleicht darf man im csv keine Bearbeitungen vornehmen da dann die bearbeiteten Felder einen falschen Typ haben, vielleicht...
# read in csv data
erp1 <- read.... | /ERP/cong_sens_interaction_results_lg_confirmed.R | no_license | lukasgehrke/prediction_error_processing | R | false | false | 9,416 | r | # bei mir funktioniert so alles korrekt bis zu den ### (Zeile 75)! Die eingelesenen Werte in R sind korrekt auch wenn Sie im csv anders dargestellt werden.
# Vielleicht darf man im csv keine Bearbeitungen vornehmen da dann die bearbeiteten Felder einen falschen Typ haben, vielleicht...
# read in csv data
erp1 <- read.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_details.R
\name{get_details}
\alias{get_details}
\title{Get game data from a certain starting time}
\usage{
get_details(gameId, hl = "en-US", startingTime = NULL, save_details = FALSE)
}
\arguments{
\item{gameId}{string. The ID of the gam... | /man/get_details.Rd | permissive | flsck/rlolesports | R | false | true | 972 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_details.R
\name{get_details}
\alias{get_details}
\title{Get game data from a certain starting time}
\usage{
get_details(gameId, hl = "en-US", startingTime = NULL, save_details = FALSE)
}
\arguments{
\item{gameId}{string. The ID of the gam... |
# Peer-graded Assignment: Course Project 2
## Load Required Package
library(ggplot2)
library(RColorBrewer)
## Download and unzip the file:
dir.create("./air_pollution")
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
download.file(url, destfile = "./air_pollution.zip" )
unzip("./air_pollut... | /4_ExploratoryDataAnalysis/week4/PEER Graded Assignment Summary.R | no_license | artickavenger/datasciencecoursera | R | false | false | 6,324 | r | # Peer-graded Assignment: Course Project 2
## Load Required Package
library(ggplot2)
library(RColorBrewer)
## Download and unzip the file:
dir.create("./air_pollution")
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
download.file(url, destfile = "./air_pollution.zip" )
unzip("./air_pollut... |
a<-read.table(file="household_power_consumption.txt",sep=";",header=TRUE,na.strings="?")
#Reading the releavnet data for 2 days into a dataframe
b<-a[as.Date(a$Date,"%d/%m/%Y")=="2007-02-01" | as.Date(a$Date,"%d/%m/%Y")=="2007-02-02",]
b$Date<-as.Date(b$Date,"%d/%m/%Y")
b$Day<-weekdays(b$Date)
b$date_time<-paste(b$Da... | /Plot4.R | no_license | sachinsharma851/ExData_Plotting1 | R | false | false | 950 | r | a<-read.table(file="household_power_consumption.txt",sep=";",header=TRUE,na.strings="?")
#Reading the releavnet data for 2 days into a dataframe
b<-a[as.Date(a$Date,"%d/%m/%Y")=="2007-02-01" | as.Date(a$Date,"%d/%m/%Y")=="2007-02-02",]
b$Date<-as.Date(b$Date,"%d/%m/%Y")
b$Day<-weekdays(b$Date)
b$date_time<-paste(b$Da... |
# *------------------------------------------------------------------
# | PROGRAM NAME: 03_ap_model_fit
# | FILE NAME: 03_ap_model_fit.R
# | DATE:
# | CREATED BY: Jim Stagge
# *----------------------------------------------------------------
# | PURPOSE: This is a code wrapper to fit the Annual Percentile ... | /odds_and_ends/maybe_in_future/12_clustering_dfa_approach.R | permissive | jstagge/weber_paleo_clim | R | false | false | 14,434 | r |
# *------------------------------------------------------------------
# | PROGRAM NAME: 03_ap_model_fit
# | FILE NAME: 03_ap_model_fit.R
# | DATE:
# | CREATED BY: Jim Stagge
# *----------------------------------------------------------------
# | PURPOSE: This is a code wrapper to fit the Annual Percentile ... |
library(drc)
library(drm)
globalFctDefA <- list(name='global',fct=fctA, ssfct=ssfctA, names=c('alpha','tau'));
cont <- drmc(constr = FALSE, errorm = TRUE, maxIt = 1000, method="SANN", noMessage = FALSE, relTol = 1e-07, rmNA=FALSE, useD = FALSE, trace = TRUE, otrace = TRUE, warnVal = -1, dscaleThres = 1e-15, rscaleThre... | /InVitroDeliveryRateModel2.R | no_license | jaywarrick/R-InVivoDrugTestingDevice | R | false | false | 3,574 | r | library(drc)
library(drm)
globalFctDefA <- list(name='global',fct=fctA, ssfct=ssfctA, names=c('alpha','tau'));
cont <- drmc(constr = FALSE, errorm = TRUE, maxIt = 1000, method="SANN", noMessage = FALSE, relTol = 1e-07, rmNA=FALSE, useD = FALSE, trace = TRUE, otrace = TRUE, warnVal = -1, dscaleThres = 1e-15, rscaleThre... |
###############################################################################################################################
# Name : ChangeClass
# Date : 2016-06-03
# Author : Christopher Mooney
# Dept : Business Analytics
# Purpose : function designed... | /R/changeclass.r | no_license | moone009/wec-preprocess | R | false | false | 1,827 | r | ###############################################################################################################################
# Name : ChangeClass
# Date : 2016-06-03
# Author : Christopher Mooney
# Dept : Business Analytics
# Purpose : function designed... |
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
####global options
####CHOOSE DATASET HERE BY CHOOSING FILEPATH:
dirpath = "/tungstenfs/scratch/ggiorget/_LIVECELL/Analysis_Data/PGK_G8_A11_B3_F6_SingleCells/Uncorrected_traj/2h_movies/" #set the filepath to files you are intested in
af_dirpath = "/tungstenfs/s... | /utils/manual_aft_correction.R | no_license | zhanyinx/Imaging_tania_project | R | false | false | 2,420 | r | setwd(dirname(rstudioapi::getSourceEditorContext()$path))
####global options
####CHOOSE DATASET HERE BY CHOOSING FILEPATH:
dirpath = "/tungstenfs/scratch/ggiorget/_LIVECELL/Analysis_Data/PGK_G8_A11_B3_F6_SingleCells/Uncorrected_traj/2h_movies/" #set the filepath to files you are intested in
af_dirpath = "/tungstenfs/s... |
id.outlier <- function(df){
## Use ifelse to filter for outliers
df[, "outlier"] <- ifelse(df[,"enginesize"] > 190 |
df[, "weight"] > 3500|
df[, "citympg"] > 40, '1', '0')
df
}
## ID and plot outliers
auto.price <- maml.mapInputPort(1) # r... | /Scripts_Notes/Useful_R _Scripts/FilterOutliers.R | no_license | muaz-urwa/Projects | R | false | false | 661 | r | id.outlier <- function(df){
## Use ifelse to filter for outliers
df[, "outlier"] <- ifelse(df[,"enginesize"] > 190 |
df[, "weight"] > 3500|
df[, "citympg"] > 40, '1', '0')
df
}
## ID and plot outliers
auto.price <- maml.mapInputPort(1) # r... |
#' H2O Generalized Linear Models
#'
#' Fit a generalized linear model, specified by a response variable, a set of predictors, and a description of the error distribution.
#'
#' @param x
#' @param y
#' @param training_frame
#' @param ...
#' @param destination_key
#' @param validation_frame
#' @param score_each_iteration... | /h2o-r/h2o-package/R/glm.R | permissive | knormoyle/forked-h2o-dev | R | false | false | 2,924 | r | #' H2O Generalized Linear Models
#'
#' Fit a generalized linear model, specified by a response variable, a set of predictors, and a description of the error distribution.
#'
#' @param x
#' @param y
#' @param training_frame
#' @param ...
#' @param destination_key
#' @param validation_frame
#' @param score_each_iteration... |
library(shiny)
library(jsonlite)
library(tidyverse)
library(magrittr)
library(shinycssloaders)
library(lubridate)
# remotes::install_github("annecori/EpiEstim")
library(EpiEstim)
library(DT)
library(dqshiny)
library(forecast)
library(shinythemes)
library(plotly)
library(shinyalert)
library(patchwork)
if (!require(mtaux... | /ui.R | no_license | yangboyubyron/corona | R | false | false | 1,562 | r | library(shiny)
library(jsonlite)
library(tidyverse)
library(magrittr)
library(shinycssloaders)
library(lubridate)
# remotes::install_github("annecori/EpiEstim")
library(EpiEstim)
library(DT)
library(dqshiny)
library(forecast)
library(shinythemes)
library(plotly)
library(shinyalert)
library(patchwork)
if (!require(mtaux... |
# R Code to run the mark-recovery model
local(envir=.PBSmodEnv,expr={
locale = sys.frame(sys.nframe() - 1) # local environment
# ************************************************************
# Functions required for the GUI
# ************************************************************
# Initialize and compi... | /PBSmodelling/inst/examples/MarkRec.r | no_license | pbs-software/pbs-modelling | R | false | false | 2,449 | r | # R Code to run the mark-recovery model
local(envir=.PBSmodEnv,expr={
locale = sys.frame(sys.nframe() - 1) # local environment
# ************************************************************
# Functions required for the GUI
# ************************************************************
# Initialize and compi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.r
\docType{data}
\name{ex_dtsam}
\alias{ex_dtsam}
\title{Simulated discrete time survival data set}
\format{
A data frame with 1000 rows and 8 variables:
\describe{
\item{x1}{A binary variable with missing values}
\item{x2}{A fully o... | /man/ex_dtsam.Rd | no_license | jwb133/smcfcs | R | false | true | 578 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.r
\docType{data}
\name{ex_dtsam}
\alias{ex_dtsam}
\title{Simulated discrete time survival data set}
\format{
A data frame with 1000 rows and 8 variables:
\describe{
\item{x1}{A binary variable with missing values}
\item{x2}{A fully o... |
library(dplyr)
if(file.exists("household_power_consumption.txt")){
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";")
} else{
temp <- tempfile()
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", temp)
data <- read.table(unz(tem... | /plot4.R | no_license | djirufin/ExData_Plotting1 | R | false | false | 1,386 | r | library(dplyr)
if(file.exists("household_power_consumption.txt")){
data <- read.table("household_power_consumption.txt", header = TRUE, sep = ";")
} else{
temp <- tempfile()
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", temp)
data <- read.table(unz(tem... |
#% VZM
#% 6/05/2018
# cleaning data, Week 3
library(dplyr)
packageVersion("dplyr")
library(swirl)
install_from_swirl("Getting and Cleaning Data")
swirl()
# cran is a data frame table
by_package <- group_by(cran, package)
summarize(by_package, mean(size))
pack_sum <- summarize(by_package,
... | /Weak3_practice.R | no_license | vahidzm/test-repo | R | false | false | 3,117 | r | #% VZM
#% 6/05/2018
# cleaning data, Week 3
library(dplyr)
packageVersion("dplyr")
library(swirl)
install_from_swirl("Getting and Cleaning Data")
swirl()
# cran is a data frame table
by_package <- group_by(cran, package)
summarize(by_package, mean(size))
pack_sum <- summarize(by_package,
... |
## Exploratory data analysis, Project 1, Plot 2
## Set folder
my.wd <- paste(getwd(), '/', sep='')
## Load full dataset from working directory, truncate to relevant days, set column classes
fulldata <- read.table(paste(my.wd,'household_power_consumption.txt', sep=''), sep = ";",
col.names = c... | /plot2.R | no_license | Courserajgp/ExData_Plotting1 | R | false | false | 1,557 | r |
## Exploratory data analysis, Project 1, Plot 2
## Set folder
my.wd <- paste(getwd(), '/', sep='')
## Load full dataset from working directory, truncate to relevant days, set column classes
fulldata <- read.table(paste(my.wd,'household_power_consumption.txt', sep=''), sep = ";",
col.names = c... |
#' AMARETTO_LarsenBased
#'
#' @param Data
#' @param Clusters
#' @param RegulatorData
#' @param Parameters
#' @param NrCores
#' @param random_seeds
#' @param convergence_cutoff
#'
#' @import MultiAssayExperiment
#' @import graphics
#' @importFrom Matrix nnzero
#' @importFrom doParallel registerDoParallel
#'
#' ... | /R/amaretto_run.R | permissive | gevaertlab/AMARETTO | R | false | false | 14,907 | r | #' AMARETTO_LarsenBased
#'
#' @param Data
#' @param Clusters
#' @param RegulatorData
#' @param Parameters
#' @param NrCores
#' @param random_seeds
#' @param convergence_cutoff
#'
#' @import MultiAssayExperiment
#' @import graphics
#' @importFrom Matrix nnzero
#' @importFrom doParallel registerDoParallel
#'
#' ... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
Inverser <- NULL
##Function to set the Matrix
SetMatrix <- function(MatrixA) {
x <<- MatrixA... | /cachematrix.R | no_license | BijiUNair/ProgrammingAssignment2 | R | false | false | 1,475 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
Inverser <- NULL
##Function to set the Matrix
SetMatrix <- function(MatrixA) {
x <<- MatrixA... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ChipSeq.R
\name{useBamCompare}
\alias{useBamCompare}
\title{bsub -P bbc -J "bamCompare" -o %J.bamCompare.log -e %J.Compare.err -W 72:00 -n 32 -q parallel -R 'rusage[mem= 16000 ] span[ptile= 16 ]' -u aimin.yan@med.miami.edu R -e 'library(ChipS... | /man/useBamCompare.Rd | no_license | aiminy/ChipSeq | R | false | true | 1,016 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ChipSeq.R
\name{useBamCompare}
\alias{useBamCompare}
\title{bsub -P bbc -J "bamCompare" -o %J.bamCompare.log -e %J.Compare.err -W 72:00 -n 32 -q parallel -R 'rusage[mem= 16000 ] span[ptile= 16 ]' -u aimin.yan@med.miami.edu R -e 'library(ChipS... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_ols}
\alias{plot_ols}
\title{Simple demo of OLS}
\usage{
plot_ols(
n = 10,
betas = c(intercept = 1, slope = 1),
x = c(mean = 0, sd = 1),
error = c(mean = 0, sd = 1),
seed = NULL,
show_raw_data = TRUE,
...
)
}
\... | /man/plot_ols.Rd | permissive | SuffolkEcon/SuffolkEcon | R | false | true | 1,495 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.R
\name{plot_ols}
\alias{plot_ols}
\title{Simple demo of OLS}
\usage{
plot_ols(
n = 10,
betas = c(intercept = 1, slope = 1),
x = c(mean = 0, sd = 1),
error = c(mean = 0, sd = 1),
seed = NULL,
show_raw_data = TRUE,
...
)
}
\... |
library(MASS)
# proposal distribution
mypropDF <- function(n.pars, covmat, ...) mvrnorm(Sigma=covmat, mu=rep(0, n.pars) )
| /RScripts/function_proposal-distribution-modelpars.r | no_license | chihuanbin/GCs | R | false | false | 123 | r | library(MASS)
# proposal distribution
mypropDF <- function(n.pars, covmat, ...) mvrnorm(Sigma=covmat, mu=rep(0, n.pars) )
|
##Preparation
source("CreateNGrams.R")
rm(mycorpus)
source("ReadFiles.R")
len_blog <- length(text_blog)
len_twitter <- length(text_twitter)
len_news <- length(text_news)
set.seed(1234)
sample_blog <- sample(text_blog, size = (1 * len_blog))
sample_twitter <- sample(text_twitter, size = (1 * len_twitter))
sample_ne... | /NGramsByLoop.R | no_license | SapnaGiri/DataScienceCapstoneProject | R | false | false | 2,347 | r | ##Preparation
source("CreateNGrams.R")
rm(mycorpus)
source("ReadFiles.R")
len_blog <- length(text_blog)
len_twitter <- length(text_twitter)
len_news <- length(text_news)
set.seed(1234)
sample_blog <- sample(text_blog, size = (1 * len_blog))
sample_twitter <- sample(text_twitter, size = (1 * len_twitter))
sample_ne... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Helpers.R
\name{alloca}
\alias{alloca}
\title{Memory preallocation}
\usage{
alloca(len, list = FALSE)
}
\arguments{
\item{len}{A integer preallocation size.}
\item{list}{Generate a empty list? By default is FALSE,
means generate a empty vec... | /Rpackage/man/alloca.Rd | permissive | xieguigang/visualbasic.R | R | false | true | 491 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Helpers.R
\name{alloca}
\alias{alloca}
\title{Memory preallocation}
\usage{
alloca(len, list = FALSE)
}
\arguments{
\item{len}{A integer preallocation size.}
\item{list}{Generate a empty list? By default is FALSE,
means generate a empty vec... |
#!/usr/local/bin/Rscript
library(SingleCellExperiment)
library(tidyverse)
library(devtools)
library(scater)
devtools::load_all('~/taproom/')
source("~/imc-2020/scripts/functions.R")
args <- commandArgs(trailingOnly = TRUE)
### [GET ARGUMENTS] #####
cells <- args[1]
types <- args[2]
states <- args[3]
clusters <- arg... | /pipeline/clustering-comparison/boxplot_states.R | no_license | camlab-bioml/astir-manuscript | R | false | false | 1,422 | r | #!/usr/local/bin/Rscript
library(SingleCellExperiment)
library(tidyverse)
library(devtools)
library(scater)
devtools::load_all('~/taproom/')
source("~/imc-2020/scripts/functions.R")
args <- commandArgs(trailingOnly = TRUE)
### [GET ARGUMENTS] #####
cells <- args[1]
types <- args[2]
states <- args[3]
clusters <- arg... |
library(tidyverse)
library(readxl)
library("sqldf")
library(RSQLite)
library(DBI)
contrib_all <- read_xlsx("Top MA Donors 2016-2020 - Copy.xlsx",
sheet = "Direct_Contributions_+_JFC Dist")
JFC <- read_xlsx("Top MA Donors 2016-2020 - Copy.xlsx",
sheet = "JFC_Contributions")
##... | /MA615/SQL HW.R | no_license | Koo1u/Koo1u | R | false | false | 1,134 | r | library(tidyverse)
library(readxl)
library("sqldf")
library(RSQLite)
library(DBI)
contrib_all <- read_xlsx("Top MA Donors 2016-2020 - Copy.xlsx",
sheet = "Direct_Contributions_+_JFC Dist")
JFC <- read_xlsx("Top MA Donors 2016-2020 - Copy.xlsx",
sheet = "JFC_Contributions")
##... |
#install.packages("ISLR")
data(Hitters,package="ISLR")
data <- na.omit(Hitters)
str(data)
head(data)
# factorial variables should be dummy-encoded
# vars with skewed distributions could be log-transfered
# separate data in train and test
set.seed(123)
train_i <- sample(seq_len(nrow(data)), size = floor(2/3 * nrow(dat... | /amrc2020/lab/1.R | no_license | lazafi/labor | R | false | false | 2,125 | r | #install.packages("ISLR")
data(Hitters,package="ISLR")
data <- na.omit(Hitters)
str(data)
head(data)
# factorial variables should be dummy-encoded
# vars with skewed distributions could be log-transfered
# separate data in train and test
set.seed(123)
train_i <- sample(seq_len(nrow(data)), size = floor(2/3 * nrow(dat... |
library(knitr)
#
purl("./EDA/ExploratoryDataAnalysis.Rnw", output="./RfromRnw/ExploratoryDataAnalysis.R")
purl("./Results/Phase2Monitoring.Rnw", output="./RfromRnw/Phase2Monitoring.R")
purl("./Results/Simulations.Rnw", output="./RfromRnw/Simulations.R")
| /Knitting.R | no_license | Ethorsn/SPC-NGS-Rcpp | R | false | false | 255 | r | library(knitr)
#
purl("./EDA/ExploratoryDataAnalysis.Rnw", output="./RfromRnw/ExploratoryDataAnalysis.R")
purl("./Results/Phase2Monitoring.Rnw", output="./RfromRnw/Phase2Monitoring.R")
purl("./Results/Simulations.Rnw", output="./RfromRnw/Simulations.R")
|
#
# Laura C. Larregui
# Week 10: App 2
#
library(shiny)
fname<-"C:\\Users\\laura\\OneDrive\\Documents\\Syracuse iSchool\\IST 719\\IST-719\\Labs\\Lab 10\\art.csv"
artServer<- function(input, output){
art<-read.csv(fname, header=TRUE, stringsAsFactors = FALSE)
waterclolor.col<-"cadetblue1"
drawing.col<-"antiquewhi... | /Labs/Lab 10/app 2/app2.R | no_license | larregui/IST-719 | R | false | false | 1,220 | r | #
# Laura C. Larregui
# Week 10: App 2
#
library(shiny)
fname<-"C:\\Users\\laura\\OneDrive\\Documents\\Syracuse iSchool\\IST 719\\IST-719\\Labs\\Lab 10\\art.csv"
artServer<- function(input, output){
art<-read.csv(fname, header=TRUE, stringsAsFactors = FALSE)
waterclolor.col<-"cadetblue1"
drawing.col<-"antiquewhi... |
hpccIterate<-function(dataframe,calltransfunc,out.dataframe,local=NULL){
strim<<-function (x)
{
gsub("^\\s+|\\s+$", "", x)
gsub("^,+|,+$", "", x)
}
is.not.null <- function(x) ! is.null(x)
if (missing(dataframe))
{
stop("no dataframe.")
}
else
{
strt1<-strim(paste(dataframe,se... | /hpccIterate.R | no_license | magaELS/rHpcc | R | false | false | 664 | r | hpccIterate<-function(dataframe,calltransfunc,out.dataframe,local=NULL){
strim<<-function (x)
{
gsub("^\\s+|\\s+$", "", x)
gsub("^,+|,+$", "", x)
}
is.not.null <- function(x) ! is.null(x)
if (missing(dataframe))
{
stop("no dataframe.")
}
else
{
strt1<-strim(paste(dataframe,se... |
utils::globalVariables(c("vecg","nComponents","modellags","phiEstimate","y","datafreq","initialType",
"yot","maxlag","silent","allowMultiplicative","current.model",
"nParamIntermittent","cfTypeOriginal","matF","matw","pt.for","errors.mat",
"ipro... | /R/es.R | no_license | trnnick/smooth | R | false | false | 69,268 | r | utils::globalVariables(c("vecg","nComponents","modellags","phiEstimate","y","datafreq","initialType",
"yot","maxlag","silent","allowMultiplicative","current.model",
"nParamIntermittent","cfTypeOriginal","matF","matw","pt.for","errors.mat",
"ipro... |
#' Estimate the parameters of Truncated Scale Mixtures of Skew-Normal Distributions
#'
#' This function obtains the maximum likelihood estimators of the TSMSN (Skew-Normal, Skew-t, Skew-Slash and Skew-Contaminated Normal) distribution parameters by direct maximization.
#'
#' @param x Dataset.
#' @param mu Initial locat... | /R/main.R | no_license | cran/TSMSN | R | false | false | 12,600 | r | #' Estimate the parameters of Truncated Scale Mixtures of Skew-Normal Distributions
#'
#' This function obtains the maximum likelihood estimators of the TSMSN (Skew-Normal, Skew-t, Skew-Slash and Skew-Contaminated Normal) distribution parameters by direct maximization.
#'
#' @param x Dataset.
#' @param mu Initial locat... |
model_data = budworm.lg$model
ids = names(budworm.lg$model )
shinyUI(fluidPage(
uiOutput("ui"),
verbatimTextOutput(ids[1]),
verbatimTextOutput(ids[2]),
verbatimTextOutput(ids[3]),
verbatimTextOutput('df')
)
) | /old/ui.r | no_license | DrRoad/predictshine | R | false | false | 227 | r | model_data = budworm.lg$model
ids = names(budworm.lg$model )
shinyUI(fluidPage(
uiOutput("ui"),
verbatimTextOutput(ids[1]),
verbatimTextOutput(ids[2]),
verbatimTextOutput(ids[3]),
verbatimTextOutput('df')
)
) |
# scenario simulations - first run
#out <- array(dim=c(50,2,100), data=NA)
#system.time(for(i in 1:100){
#out[,,i] <- popsim(nyears=50, init_pop=c(100,100), dphi_sa = .9986, pr_b= .4230, nb_dphi = .9992, a_in_night_prob = c(0.333,0.333,0.334),
# a_rmort = 0.0407, a_in_num_guards = c(0,0,0), guard_limit = 10, a_... | /R/parscensims.R | no_license | openfields/Ambcitsci | R | false | false | 2,093 | r | # scenario simulations - first run
#out <- array(dim=c(50,2,100), data=NA)
#system.time(for(i in 1:100){
#out[,,i] <- popsim(nyears=50, init_pop=c(100,100), dphi_sa = .9986, pr_b= .4230, nb_dphi = .9992, a_in_night_prob = c(0.333,0.333,0.334),
# a_rmort = 0.0407, a_in_num_guards = c(0,0,0), guard_limit = 10, a_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/user_activity_list.R
\name{user_activity_list}
\alias{user_activity_list}
\title{Return a list of a user's activities}
\usage{
user_activity_list(id, offset = 0, limit = 31, url = get_default_url(),
as = "list", ...)
}
\arguments{
\item{id}... | /man/user_activity_list.Rd | permissive | wush978/ckanr | R | false | true | 1,439 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/user_activity_list.R
\name{user_activity_list}
\alias{user_activity_list}
\title{Return a list of a user's activities}
\usage{
user_activity_list(id, offset = 0, limit = 31, url = get_default_url(),
as = "list", ...)
}
\arguments{
\item{id}... |
#!/applications/R/R-3.5.0/bin/Rscript
# Plot coverage profiles around crossover hotspots
# Usage:
# ./hotspotProfile.R 1000 1kb '1 kb'
args <- commandArgs(trailingOnly = T)
flankSize <- as.numeric(args[1])
flankName <- args[2]
flankNamePlot <- args[3]
library(parallel)
hotspots <- read.table("./hotspots_Matt.txt",... | /BethRowan_190219/BR_wt_ColLer_F2/hotspotProfiles/analysis_01/hotspotProfile.R | no_license | ajtock/GBS_CO | R | false | false | 6,304 | r | #!/applications/R/R-3.5.0/bin/Rscript
# Plot coverage profiles around crossover hotspots
# Usage:
# ./hotspotProfile.R 1000 1kb '1 kb'
args <- commandArgs(trailingOnly = T)
flankSize <- as.numeric(args[1])
flankName <- args[2]
flankNamePlot <- args[3]
library(parallel)
hotspots <- read.table("./hotspots_Matt.txt",... |
# Script de seleçao dos preditores. Seleciona-se o de maior score e em caso de empate escolhe o de menor números de preditorese.
# input = arquivos de preditores para k = 1, 2, 3 e 4
# output = 1 arquivo com os preditores selecionados.
library(igraph)
net = "_completo"
tipo = "IM_pen_zero_SDB_126"
file_read = paste("E... | /plotting_graph.R | no_license | camila-koike/Measure_GRN | R | false | false | 1,274 | r | # Script de seleçao dos preditores. Seleciona-se o de maior score e em caso de empate escolhe o de menor números de preditorese.
# input = arquivos de preditores para k = 1, 2, 3 e 4
# output = 1 arquivo com os preditores selecionados.
library(igraph)
net = "_completo"
tipo = "IM_pen_zero_SDB_126"
file_read = paste("E... |
\name{coef.aidsEst}
\alias{coef.aidsEst}
\alias{print.coef.aidsEst}
\title{Coefficients of an Almost Ideal Demand System}
\description{
These methods return and print the coefficients from
an Almost Ideal Demand System.
}
\usage{
\method{coef}{aidsEst}( object, ... )
\method{print}{coef.aidsEst}( x, ...... | /tags/0.5-6/man/coef.aidsEst.Rd | no_license | scfmolina/micecon | R | false | false | 1,092 | rd | \name{coef.aidsEst}
\alias{coef.aidsEst}
\alias{print.coef.aidsEst}
\title{Coefficients of an Almost Ideal Demand System}
\description{
These methods return and print the coefficients from
an Almost Ideal Demand System.
}
\usage{
\method{coef}{aidsEst}( object, ... )
\method{print}{coef.aidsEst}( x, ...... |
library(ShapeSelectForest)
### Name: flat2parameter
### Title: flat2parameter
### Aliases: flat2parameter
### Keywords: models
### ** Examples
# define years
years <- c(2001:2010)
# define parameters
all.shapes <- c(1, 4, 5, 3)
all.dyrs <- c(2001, 0, 2004, 2004)
all.durs <- c(1, 0, 3, 5)
all.mags <- c(100, ... | /data/genthat_extracted_code/ShapeSelectForest/examples/flat2parameter.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 541 | r | library(ShapeSelectForest)
### Name: flat2parameter
### Title: flat2parameter
### Aliases: flat2parameter
### Keywords: models
### ** Examples
# define years
years <- c(2001:2010)
# define parameters
all.shapes <- c(1, 4, 5, 3)
all.dyrs <- c(2001, 0, 2004, 2004)
all.durs <- c(1, 0, 3, 5)
all.mags <- c(100, ... |
## Building Cross-Validation From Scratch in R
rm(list = ls())
## Install and load required packages
# devtools::install_github("andrebleier/Xy")
library(tidyverse)
library(Xy)
## Simulate data
sim <- Xy(n = 1000,
numvars = c(2,2),
catvars = 0,
cor = c(-0.5, 0.9),
noisevars = ... | /cross-validation/cv_from_scratch.R | permissive | STATWORX/blog | R | false | false | 1,243 | r | ## Building Cross-Validation From Scratch in R
rm(list = ls())
## Install and load required packages
# devtools::install_github("andrebleier/Xy")
library(tidyverse)
library(Xy)
## Simulate data
sim <- Xy(n = 1000,
numvars = c(2,2),
catvars = 0,
cor = c(-0.5, 0.9),
noisevars = ... |
context("GeneSetDb")
## TODO: These tests need to be added to test-GeneSetDb
## * test the URL functions
## * test various collectionMetadata manipulation, ie:
## - collectionMetadata(x)
## - collectionMetadata(x, collection)
## - collectionMetadata(x, collection, name)
## * test collectionMetadata<-... | /tests/testthat/test-GeneSetDb.R | permissive | lianos/multiGSEA | R | false | false | 17,004 | r | context("GeneSetDb")
## TODO: These tests need to be added to test-GeneSetDb
## * test the URL functions
## * test various collectionMetadata manipulation, ie:
## - collectionMetadata(x)
## - collectionMetadata(x, collection)
## - collectionMetadata(x, collection, name)
## * test collectionMetadata<-... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/typography.R
\name{argonPadding}
\alias{argonPadding}
\title{Change tag padding}
\usage{
argonPadding(tag, orientation, value)
}
\arguments{
\item{tag}{Tag to be treated.}
\item{orientation}{Padding side. See \url{https://getbootstrap.com/do... | /man/argonPadding.Rd | no_license | kashenfelter/argonR | R | false | true | 759 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/typography.R
\name{argonPadding}
\alias{argonPadding}
\title{Change tag padding}
\usage{
argonPadding(tag, orientation, value)
}
\arguments{
\item{tag}{Tag to be treated.}
\item{orientation}{Padding side. See \url{https://getbootstrap.com/do... |
## Two functions that together invert a matrix and cache its inverse for quick future access.
## M an inverstible square matrix.
## Set vM <- makeCacheMatrix(M).
## The inverse of M is computed as cacheSolve(vM).
## After the inital call cacheSolve(vM), all subsequent calls cacheSolve(vM) will load the already comp... | /cachematrix.R | no_license | mgelvin/ProgrammingAssignment2 | R | false | false | 1,324 | r | ## Two functions that together invert a matrix and cache its inverse for quick future access.
## M an inverstible square matrix.
## Set vM <- makeCacheMatrix(M).
## The inverse of M is computed as cacheSolve(vM).
## After the inital call cacheSolve(vM), all subsequent calls cacheSolve(vM) will load the already comp... |
#' Process the player's complete game record
#'
#' Process for creating player box scores
#'
#' @param data cg_list or cgs_list (The result value of bind_cg_list or bind_cgs_list)
#' @param boxscore The result value of the pitcher_statistics function
#' @return boxscore with CG or CGS
#' @examples
#' ## internal functi... | /R/player_disposal.R | permissive | choosunsick/kbodatamining | R | false | false | 953 | r | #' Process the player's complete game record
#'
#' Process for creating player box scores
#'
#' @param data cg_list or cgs_list (The result value of bind_cg_list or bind_cgs_list)
#' @param boxscore The result value of the pitcher_statistics function
#' @return boxscore with CG or CGS
#' @examples
#' ## internal functi... |
\name{letters_out}
\docType{data}
\alias{letters_out}
\title{Letters training sample- output}
\description{This data set gives the expected response for the \code{letters_train} dataset. Each letter has more than one representation. }
\usage{data(letters_out)}
\format{A matrix containing 40 response. Each r... | /man/letter_out.rd | no_license | albiondervishi1/neural | R | false | false | 463 | rd | \name{letters_out}
\docType{data}
\alias{letters_out}
\title{Letters training sample- output}
\description{This data set gives the expected response for the \code{letters_train} dataset. Each letter has more than one representation. }
\usage{data(letters_out)}
\format{A matrix containing 40 response. Each r... |
#A simple program to making human based coding eaiser
#easycode_string(dataframe,string,string)
easycode <- function(X,data_column,coding_column,auto_fill){
keep_going=TRUE #Stops the program when you are done coding, another way to stop is the ctrl+c
while(keep_going){
for( i in 1:length( X[,coding_column ] )... | /quickcoding.r | no_license | nickdeis/Rscripts | R | false | false | 1,519 | r | #A simple program to making human based coding eaiser
#easycode_string(dataframe,string,string)
easycode <- function(X,data_column,coding_column,auto_fill){
keep_going=TRUE #Stops the program when you are done coding, another way to stop is the ctrl+c
while(keep_going){
for( i in 1:length( X[,coding_column ] )... |
\name{mallet.top.words}
\alias{mallet.top.words}
\title{Get the most probable words and their probabilities for one topic.}
\description{
This function returns a data frame with two columns, one containing the most probable words as character values, the second containing the weight assigned to that word in the word we... | /mallet/man/mallet.top.words.Rd | permissive | lonihagen/RMallet | R | false | false | 734 | rd | \name{mallet.top.words}
\alias{mallet.top.words}
\title{Get the most probable words and their probabilities for one topic.}
\description{
This function returns a data frame with two columns, one containing the most probable words as character values, the second containing the weight assigned to that word in the word we... |
library(dplyr)
library(nycflights13)
library(ggplot2)
library(lubridate)
## Demo 1
# How many *flights to Los Angeles (LAX)* did each of the
# *legacy carriers (AA, UA, DL or US)* have *in May* *from JFK*,
# and what was their average duration?
flights %>%
select(dest, origin, carrier, month, air_time) %>%
fi... | /ex_09_19.R | no_license | Sta523-Fa16/Exercises | R | false | false | 1,442 | r | library(dplyr)
library(nycflights13)
library(ggplot2)
library(lubridate)
## Demo 1
# How many *flights to Los Angeles (LAX)* did each of the
# *legacy carriers (AA, UA, DL or US)* have *in May* *from JFK*,
# and what was their average duration?
flights %>%
select(dest, origin, carrier, month, air_time) %>%
fi... |
#Clean Up!
ls()
rm(list=ls())
#Read household energy usage: 2007-02-01 - 2007-02-02
usage_data <- "household_power_consumption.txt" #Either download file or grab from folder directly
hhold_data <- read.table(usage_data, header = TRUE, sep = ";", stringsAsFactors = FALSE)
head(hhold_data) #quick view of hhold_data tabl... | /plot1.R | no_license | sandraezidiegwu/ExData_Plotting1 | R | false | false | 952 | r | #Clean Up!
ls()
rm(list=ls())
#Read household energy usage: 2007-02-01 - 2007-02-02
usage_data <- "household_power_consumption.txt" #Either download file or grab from folder directly
hhold_data <- read.table(usage_data, header = TRUE, sep = ";", stringsAsFactors = FALSE)
head(hhold_data) #quick view of hhold_data tabl... |
## These two functions are used to calcuate the inverse of a given matrix.
## The following function creates a marix and returns a set of list of functions.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y){
x <<- y
m <<- NULL
}
get <- function(){
x}
setinve... | /cachematrix.R | no_license | som1234-cyber/ProgrammingAssignment2 | R | false | false | 813 | r | ## These two functions are used to calcuate the inverse of a given matrix.
## The following function creates a marix and returns a set of list of functions.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y){
x <<- y
m <<- NULL
}
get <- function(){
x}
setinve... |
\name{dischargeLogAxis}
\alias{dischargeLogAxis}
\title{Axis generation for log discharge}
\usage{
dischargeLogAxis(x, qUnit, padPercent = 5,
tinyPlot = FALSE)
}
\arguments{
\item{x}{vector specifying discharge}
\item{qUnit}{object of qUnit class \code{\link{qConst}},
or numeric represented the short code,... | /man/dischargeLogAxis.Rd | permissive | ayan-usgs/EGRET | R | false | false | 618 | rd | \name{dischargeLogAxis}
\alias{dischargeLogAxis}
\title{Axis generation for log discharge}
\usage{
dischargeLogAxis(x, qUnit, padPercent = 5,
tinyPlot = FALSE)
}
\arguments{
\item{x}{vector specifying discharge}
\item{qUnit}{object of qUnit class \code{\link{qConst}},
or numeric represented the short code,... |
###################################### Suppl. Figure 1 ##################
######## plot Gene, sample, prevalence
############## Bar Plot CHIP Genes and Per Sample
library(ggplot2)
library(cowplot)
library(ggpubr)
theme_set(theme_cowplot())
library(readxl)
library(data.table)
library(dplyr)
load("~/Documents/Project/Me... | /Scripts/Suppl.Fig1.R | permissive | MMesbahU/CHIP-EWAS | R | false | false | 8,472 | r | ###################################### Suppl. Figure 1 ##################
######## plot Gene, sample, prevalence
############## Bar Plot CHIP Genes and Per Sample
library(ggplot2)
library(cowplot)
library(ggpubr)
theme_set(theme_cowplot())
library(readxl)
library(data.table)
library(dplyr)
load("~/Documents/Project/Me... |
#' Correlation check
#'
#' This function takes in a dataframe object and creates a correlation heatmap, a correlation description matrix, and releases the correlation matrix to the command line. It is useful for screening data sets for possible multicollinearity issues.
#'
#' @author Jeff Nivitanont, \email{jeffniv@ou.... | /projects/MATH4803Nivitanont/R/corrcheck.R | no_license | jeffniv/R | R | false | false | 1,953 | r | #' Correlation check
#'
#' This function takes in a dataframe object and creates a correlation heatmap, a correlation description matrix, and releases the correlation matrix to the command line. It is useful for screening data sets for possible multicollinearity issues.
#'
#' @author Jeff Nivitanont, \email{jeffniv@ou.... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/S03.R
\name{Method1}
\alias{Method1}
\title{Method1 function}
\usage{
Method1(MyData, AgeRange, Plot = F, Color = MyData$Param$Color)
}
\arguments{
\item{MyData}{The list returned by the AddReference() function.}
\item{AgeRange}{Age ... | /man/Method1.Rd | no_license | cran/ELT | R | false | false | 698 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/S03.R
\name{Method1}
\alias{Method1}
\title{Method1 function}
\usage{
Method1(MyData, AgeRange, Plot = F, Color = MyData$Param$Color)
}
\arguments{
\item{MyData}{The list returned by the AddReference() function.}
\item{AgeRange}{Age ... |
sim_fin_chrom <- function (pop_size = 100,
initial_heterozygosity = 0.5,
total_runtime = 100,
morgan = 1,
seed = 42,
R = 100) {
set.seed(seed)
.Call("_junctions_sim_fin_chrom", ... | /junctions/R/sim_fin_chrom.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 426 | r | sim_fin_chrom <- function (pop_size = 100,
initial_heterozygosity = 0.5,
total_runtime = 100,
morgan = 1,
seed = 42,
R = 100) {
set.seed(seed)
.Call("_junctions_sim_fin_chrom", ... |
# plot1.R
library(data.table)
library(lubridate)
# Download the data file if we don't already have it.
filename <- "power_consumption.zip"
if (!file.exists(filename)) {
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", filename, method="curl")
unzip(filenam... | /plot1.R | no_license | strockbine/ExData_Plotting1 | R | false | false | 1,426 | r | # plot1.R
library(data.table)
library(lubridate)
# Download the data file if we don't already have it.
filename <- "power_consumption.zip"
if (!file.exists(filename)) {
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", filename, method="curl")
unzip(filenam... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/move_final_package.R
\name{move_final_package}
\alias{move_final_package}
\title{Move a package file to its final location for collation by AnnotationHubData.}
\usage{
move_final_package(pkgname, type = "orgdb", dir = "EuPathDB")
}
\arguments... | /man/move_final_package.Rd | no_license | hupef/EuPathDB | R | false | true | 559 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/move_final_package.R
\name{move_final_package}
\alias{move_final_package}
\title{Move a package file to its final location for collation by AnnotationHubData.}
\usage{
move_final_package(pkgname, type = "orgdb", dir = "EuPathDB")
}
\arguments... |
switch2Zero<-function(otutable,threshold){
rown<-rownames(otutable)
coln<-colnames(otutable)
otutable<-as.matrix(otutable)
nrow<-nrow(otutable)
mani<-ifelse(otutable<rep(threshold,length(otutable)),rep(0,length(otutable)),otutable)
otutable<-data.frame(matrix(mani,nrow=nrow))
rownames(otutable)<-ro... | /R/switch2Zero.R | no_license | YushuShi/MicrobiomeCluster | R | false | false | 369 | r | switch2Zero<-function(otutable,threshold){
rown<-rownames(otutable)
coln<-colnames(otutable)
otutable<-as.matrix(otutable)
nrow<-nrow(otutable)
mani<-ifelse(otutable<rep(threshold,length(otutable)),rep(0,length(otutable)),otutable)
otutable<-data.frame(matrix(mani,nrow=nrow))
rownames(otutable)<-ro... |
data <- read.delim("household_power_consumption.txt", sep = ";", header=TRUE,
colClasses="character", na.strings ="?")
png("plot2.png", width=480, height = 480)
time_list <- strptime(paste(data$Date, data$Time), "%d/%m/%Y %H:%M:%S")
trim_list <- (time_list - strptime("2007-02-01", "%Y-%m-%d")) >= ... | /plot2.R | no_license | m-santh/ExData_Plotting1 | R | false | false | 692 | r | data <- read.delim("household_power_consumption.txt", sep = ";", header=TRUE,
colClasses="character", na.strings ="?")
png("plot2.png", width=480, height = 480)
time_list <- strptime(paste(data$Date, data$Time), "%d/%m/%Y %H:%M:%S")
trim_list <- (time_list - strptime("2007-02-01", "%Y-%m-%d")) >= ... |
residPlot<-
function (lmfit, f = 0.5)
## Fitted Values versus Residuals plot
{
yhat <- fitted(lmfit)
res <- resid(lmfit)
y = yhat + res
QQ = qr.Q(lmfit$qr)
RR = qr.R(lmfit$qr)
xx = QQ %*% RR
newdata = data.frame(y, yhat^2, xx[, -1])
xnam <- dimnames(newdata)[[2]][-1]
form <- as.for... | /s20x/R/residPlot.R | no_license | ingted/R-Examples | R | false | false | 1,235 | r | residPlot<-
function (lmfit, f = 0.5)
## Fitted Values versus Residuals plot
{
yhat <- fitted(lmfit)
res <- resid(lmfit)
y = yhat + res
QQ = qr.Q(lmfit$qr)
RR = qr.R(lmfit$qr)
xx = QQ %*% RR
newdata = data.frame(y, yhat^2, xx[, -1])
xnam <- dimnames(newdata)[[2]][-1]
form <- as.for... |
library(dplyr)
NEI <- readRDS("summarySCC_PM25.rds")
# Which of four types have seen decreases in emissions from 1999–2008 for Baltimore City?
d3 <- NEI %>% filter(fips=="24510") %>% select(year, type, Emissions) %>%
group_by(year, type) %>% summarise(Emission = sum(Emissions))
library(ggplot2)
p<-ggplot(d3, aes(... | /plot3.R | no_license | kborys1/Exploratory_Data_Analysis_week4 | R | false | false | 449 | r | library(dplyr)
NEI <- readRDS("summarySCC_PM25.rds")
# Which of four types have seen decreases in emissions from 1999–2008 for Baltimore City?
d3 <- NEI %>% filter(fips=="24510") %>% select(year, type, Emissions) %>%
group_by(year, type) %>% summarise(Emission = sum(Emissions))
library(ggplot2)
p<-ggplot(d3, aes(... |
#' Make a full report from data
#'
#' takes a data object, fits (and finds the best) model, and then produces a report based on the provided analysisSkeleton and narrative found in modelMetadata. This will write two files: a polished html-based report (with the extension \code{.html}) and an intermediary R Markdown fil... | /R/reportWriter.R | no_license | jonkeane/mocapGrip | R | false | false | 8,040 | r | #' Make a full report from data
#'
#' takes a data object, fits (and finds the best) model, and then produces a report based on the provided analysisSkeleton and narrative found in modelMetadata. This will write two files: a polished html-based report (with the extension \code{.html}) and an intermediary R Markdown fil... |
% File rnosql/man/rkv_avro_value_get_double.Rd
\name{rkv_avro_value_get_double}
\alias{rkv_avro_value_get_double}
\title{Get value of a double field of avro value object.}
\description{
Get value of a double field of avro value object.
}
\usage{
rkv_avro_value_get_double(avroValue, name)
}
\arguments{
\item{avroValue}{... | /rkvstore/man/rkv_avro_value_get_double.Rd | permissive | sshyran/oracle-nosql-drivers | R | false | false | 752 | rd | % File rnosql/man/rkv_avro_value_get_double.Rd
\name{rkv_avro_value_get_double}
\alias{rkv_avro_value_get_double}
\title{Get value of a double field of avro value object.}
\description{
Get value of a double field of avro value object.
}
\usage{
rkv_avro_value_get_double(avroValue, name)
}
\arguments{
\item{avroValue}{... |
\name{FeedingTimes}
\alias{FeedingTimes}
\docType{data}
\title{Feeding Times of a Newborn}
\description{
These data were collected during July and August, 2006
at the request of the pediatrician concerning the feeding
habits of Anna Lu Kerns.
}
\usage{data(FeedingTimes)}
\format{
A data frame with ... | /man/FeedingTimes.Rd | no_license | cran/RcmdrPlugin.IPSUR | R | false | false | 1,445 | rd | \name{FeedingTimes}
\alias{FeedingTimes}
\docType{data}
\title{Feeding Times of a Newborn}
\description{
These data were collected during July and August, 2006
at the request of the pediatrician concerning the feeding
habits of Anna Lu Kerns.
}
\usage{data(FeedingTimes)}
\format{
A data frame with ... |
library(yaml)
library(MASS)
CONFIG <- yaml.load_file("config_global.yaml")
main <- function() {
simga <- matrix(c(1,.5,.5,1),2,2)
mean <- rep(0, 2)
draw <-mvrnorm(10000, mean, simga)
write.table(draw, sprintf("%s/data.csv", CONFIG$build$draw_data), sep=",",
row.names = FALSE, col.names = FALSE, ... | /analysis/source/draw_data/draw_data.R | permissive | memonb1226/Practice-Task | R | false | false | 343 | r | library(yaml)
library(MASS)
CONFIG <- yaml.load_file("config_global.yaml")
main <- function() {
simga <- matrix(c(1,.5,.5,1),2,2)
mean <- rep(0, 2)
draw <-mvrnorm(10000, mean, simga)
write.table(draw, sprintf("%s/data.csv", CONFIG$build$draw_data), sep=",",
row.names = FALSE, col.names = FALSE, ... |
plot1 <- function(){
vars <- c( "character" , "character" , rep( "numeric" , 7 ) )
data <- read.table("household_power_consumption.txt", header = TRUE , sep =";" ,colClasses=vars ,na.strings = "?")
data <- filter(data , (Date == "1/2/2007")|(Date == "2/2/2007") )
# Adding a datetime variable
data$dateti... | /plot1.R | no_license | rgn216/ExData_Plotting1 | R | false | false | 580 | r | plot1 <- function(){
vars <- c( "character" , "character" , rep( "numeric" , 7 ) )
data <- read.table("household_power_consumption.txt", header = TRUE , sep =";" ,colClasses=vars ,na.strings = "?")
data <- filter(data , (Date == "1/2/2007")|(Date == "2/2/2007") )
# Adding a datetime variable
data$dateti... |
source("data.R")
plot3 <- function(data=NULL) {
if(is.null(data))
data <- load_data()
png("plot3.png", width=400, height=400)
plot(data$Time, data$Sub_metering_1, type="l", col="black",
xlab="", ylab="Energy sub metering")
lines(data$Time, ... | /plot3.R | no_license | icehart85/ExData_Plotting1 | R | false | false | 605 | r | source("data.R")
plot3 <- function(data=NULL) {
if(is.null(data))
data <- load_data()
png("plot3.png", width=400, height=400)
plot(data$Time, data$Sub_metering_1, type="l", col="black",
xlab="", ylab="Energy sub metering")
lines(data$Time, ... |
# This is the code for creating return, given stock list and weights , every rebalancing date
##################################################### Libraries
library("xts")
library("zoo")
library("matrixStats")
############################ Inputs to the code
setwd("D:/LFT/Template/tester/R test data/full si... | /MN_FM_final_LAG1_universe.R | no_license | VivekVerma25/codingground | R | false | false | 18,179 | r | # This is the code for creating return, given stock list and weights , every rebalancing date
##################################################### Libraries
library("xts")
library("zoo")
library("matrixStats")
############################ Inputs to the code
setwd("D:/LFT/Template/tester/R test data/full si... |
# Yige Wu @WashU Sep 2020
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
source("./ccRCC_snRNA_analysis/functions.R")
source("./ccRCC_snRNA_an... | /dimplot/plot_celltype_on_umap/dimplot_bycelltype_on_C3N-01200_tumorcells_reclustered.R | no_license | ding-lab/ccRCC_snRNA_analysis | R | false | false | 2,537 | r | # Yige Wu @WashU Sep 2020
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
source("./ccRCC_snRNA_analysis/functions.R")
source("./ccRCC_snRNA_an... |
# @file Private
#
# Copyright 2022 Observational Health Data Sciences and Informatics
#
# This file is part of ROhdsiWebApi
#
# 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.... | /R/Private.R | permissive | OHDSI/ROhdsiWebApi | R | false | false | 7,800 | r | # @file Private
#
# Copyright 2022 Observational Health Data Sciences and Informatics
#
# This file is part of ROhdsiWebApi
#
# 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.... |
# install.packages("downloader")
library(downloader)
url <- "http://apps.start.umd.edu/gtd/downloads/dataset/GTD_0814dist.zip"
download(url, dest="./data/GTD_0814dist.zip", mode="wb")
unzip("./data/GTD_0814dist.zip", exdir="./data")
# list.files("./data") | /00-download.R | no_license | jhedges3/terrorism | R | false | false | 256 | r | # install.packages("downloader")
library(downloader)
url <- "http://apps.start.umd.edu/gtd/downloads/dataset/GTD_0814dist.zip"
download(url, dest="./data/GTD_0814dist.zip", mode="wb")
unzip("./data/GTD_0814dist.zip", exdir="./data")
# list.files("./data") |
# title: basic server
# purpose: a basic server, together with ui callable via moody::moody
# date: 05.08.2021
# author: Lukas
server <- function(input, output) {
# Histogram of the Old Faithful Geyser Data ----
# with requested number of bins
# This expression that generates a histogram is wrapped in a call
... | /inst/shiny-examples/myapp/server.R | no_license | lmuenter/moody | R | false | false | 806 | r | # title: basic server
# purpose: a basic server, together with ui callable via moody::moody
# date: 05.08.2021
# author: Lukas
server <- function(input, output) {
# Histogram of the Old Faithful Geyser Data ----
# with requested number of bins
# This expression that generates a histogram is wrapped in a call
... |
##
#install.packages("tidyverse")
library(tidyverse)
library(magrittr)
library(rpart)
library(rattle)
library(rpart.plot)
library(RColorBrewer)
library(Cairo)
library(forcats)
library(dplyr)
library(stringr)
#install.packages("e1071")
library(e1071)
#install.packages("mlr")
library(mlr)
# install.pack... | /Week8/Example_TidyVerse_DT_SVM_RF_kNN_NB.R | no_license | sathish-rajendiran/ist707 | R | false | false | 9,226 | r | ##
#install.packages("tidyverse")
library(tidyverse)
library(magrittr)
library(rpart)
library(rattle)
library(rpart.plot)
library(RColorBrewer)
library(Cairo)
library(forcats)
library(dplyr)
library(stringr)
#install.packages("e1071")
library(e1071)
#install.packages("mlr")
library(mlr)
# install.pack... |
########## hidden functions to help in model implementation ##########
# parse formula and return a list that contains the model response
# matrix as element one, and the model matrix as element two
"parse.formula" <- function(formula, data = NULL) {
# extract Y, X, and variable names for model formula and frame
... | /R/hidden.R | no_license | jourdy345/bsamGP | R | false | false | 3,641 | r | ########## hidden functions to help in model implementation ##########
# parse formula and return a list that contains the model response
# matrix as element one, and the model matrix as element two
"parse.formula" <- function(formula, data = NULL) {
# extract Y, X, and variable names for model formula and frame
... |
f.speechlinks=function(html.page, node.type=".ver12 a"){
urls <- html.page %>% # feed `main.page` to the next step
html_nodes(node.type) %>% # get the CSS nodes
html_attr("href") # extract the URLs
# Get link text
links <- main.page %>% # feed `main.page` to the next step
html_nodes(node.type) %>% # g... | /lib/speechFuncs.R | no_license | minimesun/NBCU | R | false | false | 1,741 | r | f.speechlinks=function(html.page, node.type=".ver12 a"){
urls <- html.page %>% # feed `main.page` to the next step
html_nodes(node.type) %>% # get the CSS nodes
html_attr("href") # extract the URLs
# Get link text
links <- main.page %>% # feed `main.page` to the next step
html_nodes(node.type) %>% # g... |
VE.EB.HT.Ratio <- function(VecY.s, VecX.s, VecPk.s, MatPkl.s, VecAlpha.s = rep(1, times= length(VecPk.s)))
{
if(! is.vector(VecY.s) ){stop("VecY.s must be a vector.") }
if(! is.vector(VecX.s) ){stop("VecX.s must be a vector.") ... | /samplingVarEst/R/VE_EB_HT_Ratio.r | no_license | ingted/R-Examples | R | false | false | 4,451 | r | VE.EB.HT.Ratio <- function(VecY.s, VecX.s, VecPk.s, MatPkl.s, VecAlpha.s = rep(1, times= length(VecPk.s)))
{
if(! is.vector(VecY.s) ){stop("VecY.s must be a vector.") }
if(! is.vector(VecX.s) ){stop("VecX.s must be a vector.") ... |
#' viewLogfile
#'
#' A simple function that shows the logfile.
#' @param logfile The name of the logfile.
#' @param n The number of rows of the logfile to view (defaults to the whole file)
#' @param thinning Thinning parameter for the posterior - defaults to 1 (all samples). 2 uses every second sample, 3 every third an... | /retired_functions/viewLogfile.R | no_license | hferg/bayestraitr | R | false | false | 610 | r | #' viewLogfile
#'
#' A simple function that shows the logfile.
#' @param logfile The name of the logfile.
#' @param n The number of rows of the logfile to view (defaults to the whole file)
#' @param thinning Thinning parameter for the posterior - defaults to 1 (all samples). 2 uses every second sample, 3 every third an... |
args <- commandArgs(trailingOnly=T)
project.name <- args[1]
my.dir <- args[2]
tissue <- args[3]
tis <- gsub(" ","",tissue)
Nk <- 15
setwd(my.dir)
files <- paste0( project.name,c(paste0(".",tis,".exp.adj.",Nk,"PEERfactors.3PCs.gender.IDxGENE.RDS"),
".SNPxID.RDS",
... | /3_Preprocess_SNP_Gene.R | permissive | CreRecombinase/PrediXmod | R | false | false | 4,587 | r | args <- commandArgs(trailingOnly=T)
project.name <- args[1]
my.dir <- args[2]
tissue <- args[3]
tis <- gsub(" ","",tissue)
Nk <- 15
setwd(my.dir)
files <- paste0( project.name,c(paste0(".",tis,".exp.adj.",Nk,"PEERfactors.3PCs.gender.IDxGENE.RDS"),
".SNPxID.RDS",
... |
library(AotClient)
library(DT)
library(dplyr)
library(stringr)
# if (!exists("sensors"))
sensors <- ls.sensors()
# if (!exists("nodes"))
nodes <- ls.nodes()
# Convert factors to strings so comparisons work
nodes$vsn <- sapply(nodes$vsn, as.character)
# if (!exists("observations"))
observations <-ls.observat... | /viewAotData.R | no_license | wbedu/The-Air-that-I-Breathe-Dashboard | R | false | false | 1,718 | r | library(AotClient)
library(DT)
library(dplyr)
library(stringr)
# if (!exists("sensors"))
sensors <- ls.sensors()
# if (!exists("nodes"))
nodes <- ls.nodes()
# Convert factors to strings so comparisons work
nodes$vsn <- sapply(nodes$vsn, as.character)
# if (!exists("observations"))
observations <-ls.observat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/direct-messages.R
\name{my_direct_messages}
\alias{my_direct_messages}
\title{GET direct_messages}
\usage{
my_direct_messages(since_id = NULL, max_id = NULL, count = 200,
token = NULL)
}
\arguments{
\item{since_id}{optional Returns results ... | /man/my_direct_messages.Rd | no_license | jscarlton/rtweet | R | false | true | 1,639 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/direct-messages.R
\name{my_direct_messages}
\alias{my_direct_messages}
\title{GET direct_messages}
\usage{
my_direct_messages(since_id = NULL, max_id = NULL, count = 200,
token = NULL)
}
\arguments{
\item{since_id}{optional Returns results ... |
summarySE <-
function(data=NULL, measurevar, groupvars=NULL, na.rm=FALSE,
conf.interval=.95, .drop=TRUE) {
require(plyr)
# New version of length which can handle NA's: if na.rm==T, don't count them
length2 <- function (x, na.rm=FALSE) {
if (na.rm) sum(!is.na(x))
else ... | /R-libraries/myUtilities/R/summarySE.R | no_license | jyqalan/myUtilities | R | false | false | 1,311 | r | summarySE <-
function(data=NULL, measurevar, groupvars=NULL, na.rm=FALSE,
conf.interval=.95, .drop=TRUE) {
require(plyr)
# New version of length which can handle NA's: if na.rm==T, don't count them
length2 <- function (x, na.rm=FALSE) {
if (na.rm) sum(!is.na(x))
else ... |
g4 <- function(n){
x <- numeric(n)
for(j in 1:n){
u1 <- runif(1)
u2 <- runif(1)
if(u1 < 0.5){
x[j] <- floor(10 * u2) + 1
} else{
x[j] <- floor(5 * u2) + 6
}
}
x
}
z <- g4(5000) #changed to 5000
mean(z == 3) #changed from 9 to 3
| /4.ex.1g.R | no_license | fengzenggithub/R-Simulation-by-Ross | R | false | false | 284 | r | g4 <- function(n){
x <- numeric(n)
for(j in 1:n){
u1 <- runif(1)
u2 <- runif(1)
if(u1 < 0.5){
x[j] <- floor(10 * u2) + 1
} else{
x[j] <- floor(5 * u2) + 6
}
}
x
}
z <- g4(5000) #changed to 5000
mean(z == 3) #changed from 9 to 3
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cbs_get_data.R
\name{cbs_get_data}
\alias{cbs_get_data}
\title{Get data from Statistics Netherlands (CBS)}
\usage{
cbs_get_data(id, ..., select = NULL, typed = TRUE,
add_column_labels = TRUE, dir = tempdir(), verbose = FALSE,
base_url = g... | /man/cbs_get_data.Rd | no_license | jacobkap/cbsodataR | R | false | true | 2,362 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cbs_get_data.R
\name{cbs_get_data}
\alias{cbs_get_data}
\title{Get data from Statistics Netherlands (CBS)}
\usage{
cbs_get_data(id, ..., select = NULL, typed = TRUE,
add_column_labels = TRUE, dir = tempdir(), verbose = FALSE,
base_url = g... |
# Up and Running with R
# Ex03_04
# Calculating frequencies
# Uses data set 'social_network.csv' which records the gender anda age of 202 online
# survey respondents along with their preferred social networking site and an estimate
# of how many times they log in per week
# Create data frame 'sn' from CSV file w/head... | /ex03_04.R | no_license | drandyharrison/lynda_intro2R | R | false | false | 900 | r | # Up and Running with R
# Ex03_04
# Calculating frequencies
# Uses data set 'social_network.csv' which records the gender anda age of 202 online
# survey respondents along with their preferred social networking site and an estimate
# of how many times they log in per week
# Create data frame 'sn' from CSV file w/head... |
#' @title Plot the counterfactual.
#' @description \code{idd.cfplot} takes an output object after \code{idd} and plots the counterfactual using \code{ggplot2}.
#'
#' @param x Name of the \code{idd} output object.
#' @param mult Multiplier for the rates (default=100000).
#' @param donor Plot a counterfactual based on th... | /R/idd.cfplot.R | no_license | carlbona/idd | R | false | false | 2,729 | r | #' @title Plot the counterfactual.
#' @description \code{idd.cfplot} takes an output object after \code{idd} and plots the counterfactual using \code{ggplot2}.
#'
#' @param x Name of the \code{idd} output object.
#' @param mult Multiplier for the rates (default=100000).
#' @param donor Plot a counterfactual based on th... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_make_object.R
\name{make_modeling_object}
\alias{make_modeling_object}
\title{Make modeling object}
\usage{
make_modeling_object(rawdata, exclude.vars, UK.varnames, pls.comps = 5)
}
\arguments{
\item{rawdata}{See rawdata under PLSK.... | /man/make_modeling_object.Rd | no_license | myoung3/regionalkrig | R | false | true | 1,782 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions_make_object.R
\name{make_modeling_object}
\alias{make_modeling_object}
\title{Make modeling object}
\usage{
make_modeling_object(rawdata, exclude.vars, UK.varnames, pls.comps = 5)
}
\arguments{
\item{rawdata}{See rawdata under PLSK.... |
library(shiny)
library(ggplot2)
library(tidyverse)
movie2 = read.csv("movie2.csv")
fluidPage(
sidebarLayout(
sidebarPanel(
selectInput(inputId = "y",
label = "Y-axis:",
choices = c("Spielfilmlaenge", "Bewertung", "Waehlerstimmen", "Einnahm... | /shiny/P24E/ui.R | no_license | MFuchs1989/Bdown | R | false | false | 845 | r | library(shiny)
library(ggplot2)
library(tidyverse)
movie2 = read.csv("movie2.csv")
fluidPage(
sidebarLayout(
sidebarPanel(
selectInput(inputId = "y",
label = "Y-axis:",
choices = c("Spielfilmlaenge", "Bewertung", "Waehlerstimmen", "Einnahm... |
# Graph
# Author: Walter Xie
# Accessed on 17 Apr 2016
#' Add a line
#'
#' Add a line \code{\link{geom_line}} to a given \code{\link{ggplot}} object.
#'
#' @param xintercept,yintercept,intercept,slope,smooth.method
#' Refer to \code{\link{geom_vline}}, \code{\link{geom_hline}},
#' \code{\link{geom_abline}}, \code{\lin... | /R/GraphAdd.R | permissive | walterxie/gg1L | R | false | false | 6,687 | r | # Graph
# Author: Walter Xie
# Accessed on 17 Apr 2016
#' Add a line
#'
#' Add a line \code{\link{geom_line}} to a given \code{\link{ggplot}} object.
#'
#' @param xintercept,yintercept,intercept,slope,smooth.method
#' Refer to \code{\link{geom_vline}}, \code{\link{geom_hline}},
#' \code{\link{geom_abline}}, \code{\lin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/es_data.R
\docType{data}
\name{data_es}
\alias{data_es}
\title{Stan Data for the Origins of Electoral Systems Example}
\format{Data for Stan program for the Origins of Electoral Systems example}
\usage{
data_es
}
\description{
Stan Data for t... | /man/data_es.Rd | no_license | macartan/biqq | R | false | true | 381 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/es_data.R
\docType{data}
\name{data_es}
\alias{data_es}
\title{Stan Data for the Origins of Electoral Systems Example}
\format{Data for Stan program for the Origins of Electoral Systems example}
\usage{
data_es
}
\description{
Stan Data for t... |
library(modehunt)
### Name: criticalValuesAll
### Title: Compute critical values based on the set of all intervals
### Aliases: criticalValuesAll
### Keywords: htest nonparametric
### ** Examples
## compute critical values and compare to those in cvModeAll
## (to see output in R, press CTRL + W)
cv1 <- criticalVal... | /data/genthat_extracted_code/modehunt/examples/criticalValuesAll.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 489 | r | library(modehunt)
### Name: criticalValuesAll
### Title: Compute critical values based on the set of all intervals
### Aliases: criticalValuesAll
### Keywords: htest nonparametric
### ** Examples
## compute critical values and compare to those in cvModeAll
## (to see output in R, press CTRL + W)
cv1 <- criticalVal... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/document_true_param.R
\docType{data}
\name{z}
\alias{z}
\title{Threshold: parameter of an MRMC model}
\description{
A posterior mean of the model parameter for data \code{\link{ddd}} as an example of truth parameter.
}
\seealso{
\co... | /man/z.Rd | no_license | cran/BayesianFROC | R | false | true | 418 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/document_true_param.R
\docType{data}
\name{z}
\alias{z}
\title{Threshold: parameter of an MRMC model}
\description{
A posterior mean of the model parameter for data \code{\link{ddd}} as an example of truth parameter.
}
\seealso{
\co... |
iris_dataset=iris[1:4]
iris_pca=princomp(iris_dataset)
summary(iris_pca)
#Plotting
screeplot(iris_pca)
screeplot(iris_pca,type="lines")
biplot(iris_pca)
#Printing loadings and scores
iris_pca$loadings
iris_pca$scores
#Finding eigen data
covariance_matrix=cov(iris_dataset)
covariance_matrix
eigen_data=eigen(covarian... | /PCA.r | no_license | k27ketaki/PCA | R | false | false | 482 | r | iris_dataset=iris[1:4]
iris_pca=princomp(iris_dataset)
summary(iris_pca)
#Plotting
screeplot(iris_pca)
screeplot(iris_pca,type="lines")
biplot(iris_pca)
#Printing loadings and scores
iris_pca$loadings
iris_pca$scores
#Finding eigen data
covariance_matrix=cov(iris_dataset)
covariance_matrix
eigen_data=eigen(covarian... |
# Import the data from the CSV
data <- read.csv("/home/dusty/BrownBag - TERC/footballData.csv")
#Check the data
head(data)
summary(data)
# Tabulate wins vs at-home status
table(data$win, data$homeTeam)
# Import visualization library
library(ggplot2)
# Plot rush yards vs points against
ggplot(data, aes(x=rushYards, ... | /analysis.R | no_license | dustywhite7/brown-bag-r | R | false | false | 1,806 | r | # Import the data from the CSV
data <- read.csv("/home/dusty/BrownBag - TERC/footballData.csv")
#Check the data
head(data)
summary(data)
# Tabulate wins vs at-home status
table(data$win, data$homeTeam)
# Import visualization library
library(ggplot2)
# Plot rush yards vs points against
ggplot(data, aes(x=rushYards, ... |
\name{as.solist}
\alias{as.solist}
\title{
Convert List of Two-Dimensional Spatial Objects
}
\description{
Given a list of two-dimensional spatial objects,
convert it to the class \code{"solist"}.
}
\usage{
as.solist(x, \dots)
}
\arguments{
\item{x}{
A list of objects, each representing a two-dimensional
... | /man/as.solist.Rd | no_license | chenjiaxun9/spatstat | R | false | false | 1,123 | rd | \name{as.solist}
\alias{as.solist}
\title{
Convert List of Two-Dimensional Spatial Objects
}
\description{
Given a list of two-dimensional spatial objects,
convert it to the class \code{"solist"}.
}
\usage{
as.solist(x, \dots)
}
\arguments{
\item{x}{
A list of objects, each representing a two-dimensional
... |
##the functions below are caching the inverse of a matrix. For this purpose the first function caches the matrix, and defines
##functions to set and get the inverse of the matrix. The second function (cacheSolve) actually computes the inverse but only if it
##has not been computed previously.
# example input/outputs
... | /cachematrix.R | no_license | ezsolti/ProgrammingAssignment2 | R | false | false | 2,420 | r | ##the functions below are caching the inverse of a matrix. For this purpose the first function caches the matrix, and defines
##functions to set and get the inverse of the matrix. The second function (cacheSolve) actually computes the inverse but only if it
##has not been computed previously.
# example input/outputs
... |
MOSS_Hierarchical <-
function (startList = NULL, p = 0.2, alpha = 1, c = 0.1, cPrime = 0.0001, q = 0.1, replicates = 5, data) {
tools <- list()
varNames <- colnames(data)[which(colnames(data)!= "freq")]
n <- length(varNames)
varSets <- decToBin (0:(2**n-1),n)
colnames(varSets) <- varNames
lenVarSets <- ... | /genMOSS/R/MOSS_Hierarchical.R | no_license | ingted/R-Examples | R | false | false | 5,065 | r | MOSS_Hierarchical <-
function (startList = NULL, p = 0.2, alpha = 1, c = 0.1, cPrime = 0.0001, q = 0.1, replicates = 5, data) {
tools <- list()
varNames <- colnames(data)[which(colnames(data)!= "freq")]
n <- length(varNames)
varSets <- decToBin (0:(2**n-1),n)
colnames(varSets) <- varNames
lenVarSets <- ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.