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 |
|---|---|---|---|---|---|---|---|---|---|
library(ggplot2)
library(dplyr)
setwd('C:/Users/mecha_000/Desktop/DataScience/Python/DataVisualizations/project')
loans <- read.csv(file = 'prosperLoanData.csv', sep = ',', quote = "\"'")
loans$ListingCreationDate <- as.Date(loans$ListingCreationDate)
loans$ListingCreationYear <- as.numeric(format(loans$ListingCreat... | /eda.R | no_license | X0RSH1FT/DataAnalysis-NanoDegree-Prosper-Loan-Data-Visualization | R | false | false | 19,731 | r | library(ggplot2)
library(dplyr)
setwd('C:/Users/mecha_000/Desktop/DataScience/Python/DataVisualizations/project')
loans <- read.csv(file = 'prosperLoanData.csv', sep = ',', quote = "\"'")
loans$ListingCreationDate <- as.Date(loans$ListingCreationDate)
loans$ListingCreationYear <- as.numeric(format(loans$ListingCreat... |
# Tidy Tuesday: 2021 Week 8
# 16 Feb 2021: Dubois Challenge
library(tidyr)
library(dplyr)
library(ggplot2)
library(ggpubr)
income <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-02-16/income.csv')
# Cleaning NA to match the original plot
income[is.na(income$Othe... | /code/2021W08_Dubois.R | no_license | dosullivan019/tidytuesday | R | false | false | 2,987 | r | # Tidy Tuesday: 2021 Week 8
# 16 Feb 2021: Dubois Challenge
library(tidyr)
library(dplyr)
library(ggplot2)
library(ggpubr)
income <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-02-16/income.csv')
# Cleaning NA to match the original plot
income[is.na(income$Othe... |
#' @export
writeFringe <- function(f,file = NULL, path = NULL){
path <- path %||% "."
if(!isFringe(f))
stop("not a fringe")
csv <- f$writeCSV(file, path)
yaml <- f$writeYAML(file, path)
paste0(csv,yaml)
}
#' @export
readFringe <- function(file = NULL, path = NULL){
path <- path %||% "."
file <- file_... | /R/fringeIO.R | no_license | jpmarindiaz/fringer | R | false | false | 765 | r | #' @export
writeFringe <- function(f,file = NULL, path = NULL){
path <- path %||% "."
if(!isFringe(f))
stop("not a fringe")
csv <- f$writeCSV(file, path)
yaml <- f$writeYAML(file, path)
paste0(csv,yaml)
}
#' @export
readFringe <- function(file = NULL, path = NULL){
path <- path %||% "."
file <- file_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{printTable}
\alias{printTable}
\title{printTable}
\usage{
printTable(obj, caption = "DF", digits = 3, onlyContents = FALSE)
}
\arguments{
\item{obj}{Dataframe/ezANOVA object to print}
\item{caption}{Title of the dataframe}
\it... | /man/printTable.Rd | no_license | igmmgi/psychReport | R | false | true | 1,423 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{printTable}
\alias{printTable}
\title{printTable}
\usage{
printTable(obj, caption = "DF", digits = 3, onlyContents = FALSE)
}
\arguments{
\item{obj}{Dataframe/ezANOVA object to print}
\item{caption}{Title of the dataframe}
\it... |
## As suggested by @topepo, brought in from the `pryr` package
## via the `recepies` package
fun_calls <- function(f) {
if (is.function(f)) {
fun_calls(body(f))
} else if (is.call(f)) {
fname <- as.character(f[[1]])
# Calls inside .Internal are special and shouldn't be included
if (identical(fname... | /model.R | no_license | edgararuiz-zz/random | R | false | false | 4,006 | r |
## As suggested by @topepo, brought in from the `pryr` package
## via the `recepies` package
fun_calls <- function(f) {
if (is.function(f)) {
fun_calls(body(f))
} else if (is.call(f)) {
fname <- as.character(f[[1]])
# Calls inside .Internal are special and shouldn't be included
if (identical(fname... |
#' @export
ES_clean_data <- function(long_data,
outcomevar,
unit_var,
cal_time_var,
onset_time_var,
cluster_vars,
discrete_covars = NULL,
... | /eventStudy/R/clean_data.R | permissive | davidnov/eventStudy | R | false | false | 32,044 | r |
#' @export
ES_clean_data <- function(long_data,
outcomevar,
unit_var,
cal_time_var,
onset_time_var,
cluster_vars,
discrete_covars = NULL,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{zScore.underlying}
\alias{zScore.underlying}
\title{zScore.underlying}
\usage{
zScore.underlying(x)
}
\arguments{
\item{x}{= a vector/matrix/data-frame. The first columns are numeric while the last column is logical without NA's}... | /man/zScore.underlying.Rd | no_license | vsrimurthy/EPFR | R | false | true | 432 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EPFR.r
\name{zScore.underlying}
\alias{zScore.underlying}
\title{zScore.underlying}
\usage{
zScore.underlying(x)
}
\arguments{
\item{x}{= a vector/matrix/data-frame. The first columns are numeric while the last column is logical without NA's}... |
setwd("D:/Data/My Books/Data Science - Text Mining/code")
rm(list = ls())
library(tm)
main_data = read.csv("data/csv/term_weight_class-all.csv")
corpus = VCorpus(DataframeSource(main_data[,1:2]))
dtm = DocumentTermMatrix(corpus, control = list(weighting = function(x) weightTfIdf(x)))
main_data.unigram... | /Bab_07_00_STW_TFIDF.R | no_license | rezafaisal/TextMinningForBeginner | R | false | false | 465 | r | setwd("D:/Data/My Books/Data Science - Text Mining/code")
rm(list = ls())
library(tm)
main_data = read.csv("data/csv/term_weight_class-all.csv")
corpus = VCorpus(DataframeSource(main_data[,1:2]))
dtm = DocumentTermMatrix(corpus, control = list(weighting = function(x) weightTfIdf(x)))
main_data.unigram... |
## place script in same folder as dataset file "household_power_consumption.txt"
library(dplyr)
##read data
DF<-read.table("household_power_consumption.txt",sep=";",header=T,na.strings="?")
##let's subset the two days of interest
DF<-subset(DF, (as.Date(DF$Date,"%d/%m/%Y") >= as.Date("2007-02-01")) &
... | /plot2.R | no_license | BenoitFayolle/ExData_Plotting1 | R | false | false | 783 | r | ## place script in same folder as dataset file "household_power_consumption.txt"
library(dplyr)
##read data
DF<-read.table("household_power_consumption.txt",sep=";",header=T,na.strings="?")
##let's subset the two days of interest
DF<-subset(DF, (as.Date(DF$Date,"%d/%m/%Y") >= as.Date("2007-02-01")) &
... |
##load files
if(!exists("NEI")){
NEI <- readRDS("exdata-data-NEI_data/summarySCC_PM25.rds")
}
if(!exists("SCC")){
SCC <- readRDS("exdata-data-NEI_data/Source_Classification_Code.rds")
}
## Have total emissions from PM2.5 decreased in the United States from 1999 to 2008?
## Using the base plotting system, make a... | /otherSolutions/q1.1.R | no_license | iuliazidaru/expDataAnalysis_2 | R | false | false | 755 | r |
##load files
if(!exists("NEI")){
NEI <- readRDS("exdata-data-NEI_data/summarySCC_PM25.rds")
}
if(!exists("SCC")){
SCC <- readRDS("exdata-data-NEI_data/Source_Classification_Code.rds")
}
## Have total emissions from PM2.5 decreased in the United States from 1999 to 2008?
## Using the base plotting system, make a... |
#******************************************************************
#
# ----------------- Micro-macro Aggregates analysis ---------------
#
#******************************************************************
#******************************************************************
#
# ------------ Read Monte Carlo experimen... | /R/mm_correlation_analysis.R | no_license | gmsporto/Banks_TAPAS | R | false | false | 74,528 | r | #******************************************************************
#
# ----------------- Micro-macro Aggregates analysis ---------------
#
#******************************************************************
#******************************************************************
#
# ------------ Read Monte Carlo experimen... |
library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/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="mse",alpha=0.01,family="gaussian",standardize=FALSE)
sink('./Model/EN/AvgRank/skin/skin_006.txt',append=TRUE)
pr... | /Model/EN/AvgRank/skin/skin_006.R | no_license | leon1003/QSMART | R | false | false | 347 | r | library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/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="mse",alpha=0.01,family="gaussian",standardize=FALSE)
sink('./Model/EN/AvgRank/skin/skin_006.txt',append=TRUE)
pr... |
#' Deprecated functions
#'
#'
#' Deprecated `chk_()` functions.
#'
#' @family deprecated
#'
#' @inheritParams chk_flag
#' @keywords internal
#' @name chk_deprecated
NULL
#' @describeIn chk_deprecated Check Directories Exist
#'
#' `r lifecycle::badge("deprecated")`
#'
#' Replace with `[chk_all](x, [chk_dir])`
#'
#' @ex... | /R/deprecated.R | permissive | poissonconsulting/chk | R | false | false | 4,131 | r | #' Deprecated functions
#'
#'
#' Deprecated `chk_()` functions.
#'
#' @family deprecated
#'
#' @inheritParams chk_flag
#' @keywords internal
#' @name chk_deprecated
NULL
#' @describeIn chk_deprecated Check Directories Exist
#'
#' `r lifecycle::badge("deprecated")`
#'
#' Replace with `[chk_all](x, [chk_dir])`
#'
#' @ex... |
#' SCE_proxy
#'
#' Workaround to get onto the internet from SCE instances
#'
#'
#' @return
#' @export
#'
#' @examples
SCE_proxy<- function(){
Sys.setenv(http_proxy="http://10.85.4.54:8080", https_proxy="http://10.85.4.54:8080")
}
| /R/SCE_proxy.R | permissive | lee269/davidtools | R | false | false | 235 | r | #' SCE_proxy
#'
#' Workaround to get onto the internet from SCE instances
#'
#'
#' @return
#' @export
#'
#' @examples
SCE_proxy<- function(){
Sys.setenv(http_proxy="http://10.85.4.54:8080", https_proxy="http://10.85.4.54:8080")
}
|
# qrsh -l mem_free=10G,h_vmem=11G -pe local 25
library('R.utils')
library('BiocParallel')
## Parallel environment
bp <- MulticoreParam(workers = 25, outfile = Sys.getenv('SGE_STDERR_PATH'))
## Load pheno data
load('/dcl01/leek/data/gtex_work/runs/gtex/DER_analysis/pheno/pheno_missing_less_10.Rdata')
## Locate bwtoo... | /gtex/DER_analysis/coverageMatrix/bwtool/misc/check_tsv_files.R | permissive | jtleek/runs | R | false | false | 1,588 | r | # qrsh -l mem_free=10G,h_vmem=11G -pe local 25
library('R.utils')
library('BiocParallel')
## Parallel environment
bp <- MulticoreParam(workers = 25, outfile = Sys.getenv('SGE_STDERR_PATH'))
## Load pheno data
load('/dcl01/leek/data/gtex_work/runs/gtex/DER_analysis/pheno/pheno_missing_less_10.Rdata')
## Locate bwtoo... |
## File Name: tam.pv.mcmc.R
## File Version: 0.848
tam.pv.mcmc <- function( tamobj, Y=NULL, group=NULL, beta_groups=TRUE,
nplausible=10, level=.95, n.iter=1000,
n.burnin=500, adj_MH=.5, adj_change_MH=.05,
refresh_MH=50, accrate_bound_MH=c(.45, .55),
... | /R/tam.pv.mcmc.R | no_license | cran/TAM | R | false | false | 9,869 | r | ## File Name: tam.pv.mcmc.R
## File Version: 0.848
tam.pv.mcmc <- function( tamobj, Y=NULL, group=NULL, beta_groups=TRUE,
nplausible=10, level=.95, n.iter=1000,
n.burnin=500, adj_MH=.5, adj_change_MH=.05,
refresh_MH=50, accrate_bound_MH=c(.45, .55),
... |
# @file EmpiricalCalibrationUsingPLikelihood.R
#
# Copyright 2019 Observational Health Data Sciences and Informatics
#
# This file is part of EmpiricalCalibration
#
# 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 co... | /R/EmpiricalCalibrationUsingPLikelihood.R | permissive | sunfeng98/EmpiricalCalibration | R | false | false | 7,894 | r | # @file EmpiricalCalibrationUsingPLikelihood.R
#
# Copyright 2019 Observational Health Data Sciences and Informatics
#
# This file is part of EmpiricalCalibration
#
# 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 co... |
{data_waterfall <- data.frame(label = c("Income 1", "Income 2", "Income 3", "Total 1",
"Expenses 1", "Expenses 2", "Total 2", "Income 4",
"Income 5", "Income 6", "Expenses 3","Total 3",
"Expenses 4", ... | /data-raw/data_waterfall.R | no_license | datastorm-open/rAmCharts | R | false | false | 862 | r | {data_waterfall <- data.frame(label = c("Income 1", "Income 2", "Income 3", "Total 1",
"Expenses 1", "Expenses 2", "Total 2", "Income 4",
"Income 5", "Income 6", "Expenses 3","Total 3",
"Expenses 4", ... |
#matrices
?matrix
(m1 = matrix(1:12, nrow=4))
marks3 = floor(runif(30, 50,90))
marks3
m2 = matrix(marks3, nrow=5)
m2
(x = 1:5)
m3 = matrix(marks3, nrow=6, byrow = T)
m3
(m4 = matrix(marks3, ncol=5, byrow = T))
colSums(m4)
rowSums(m4)
sum(m4)
m4 [m4 > 70]
m4
m4[1,]
m4[,2]
m4[3,5]
m4[1:2, 3:5]
| /matrix.R | no_license | Trajat/analytics1 | R | false | false | 295 | r | #matrices
?matrix
(m1 = matrix(1:12, nrow=4))
marks3 = floor(runif(30, 50,90))
marks3
m2 = matrix(marks3, nrow=5)
m2
(x = 1:5)
m3 = matrix(marks3, nrow=6, byrow = T)
m3
(m4 = matrix(marks3, ncol=5, byrow = T))
colSums(m4)
rowSums(m4)
sum(m4)
m4 [m4 > 70]
m4
m4[1,]
m4[,2]
m4[3,5]
m4[1:2, 3:5]
|
##This script converts a VCF file produced from plink using '--recode vcf' into a form suitable for Graphia with added metadata##
##Usage: Rscript script_name.R <VCF_file> <P-value_file_in_xls_or_xlsx_format> <metadata_file_in_xls_or_xlsx_format>##
library(readr) ##for read_delim
library(readxl) ##for read_excel
librar... | /VCF_to_Graphia_input_maker_with_metadata_updated.R | no_license | prasundutta87/R-codes | R | false | false | 3,130 | r | ##This script converts a VCF file produced from plink using '--recode vcf' into a form suitable for Graphia with added metadata##
##Usage: Rscript script_name.R <VCF_file> <P-value_file_in_xls_or_xlsx_format> <metadata_file_in_xls_or_xlsx_format>##
library(readr) ##for read_delim
library(readxl) ##for read_excel
librar... |
\name{PhenoComp}
\alias{PhenoComp}
\title{Identification of population-level differentially expressed genes in one-phenotype data}
\usage{
PhenoComp(expdata,label,gene,freq,method,freq1,outfile1,outfile2)
}
\arguments{
\item{expdata}{a (non-empty) numeric gene expression matrix with both disease and control sa... | /man/PhenoComp.Rd | no_license | XJJ-student/PhenoComp1 | R | false | false | 1,850 | rd | \name{PhenoComp}
\alias{PhenoComp}
\title{Identification of population-level differentially expressed genes in one-phenotype data}
\usage{
PhenoComp(expdata,label,gene,freq,method,freq1,outfile1,outfile2)
}
\arguments{
\item{expdata}{a (non-empty) numeric gene expression matrix with both disease and control sa... |
# Matrix inversion may be a costly computation and so it is useful and efficient to cache the inverse
# of a matrix, so that you do not have to compute it again and again. The following two functions serve
# this purpose.
# makeCacheMatrix creates a list containing a function that:
# 1. sets the value of the matrix;... | /cachematrix.R | no_license | ChiaraVis/ProgrammingAssignment2 | R | false | false | 1,094 | r | # Matrix inversion may be a costly computation and so it is useful and efficient to cache the inverse
# of a matrix, so that you do not have to compute it again and again. The following two functions serve
# this purpose.
# makeCacheMatrix creates a list containing a function that:
# 1. sets the value of the matrix;... |
# 한빛아카데미 도서 크롤링
install.packages('rvest')
library(rvest)
library(dplyr)
library(stringr)
library(xlsx)
trim <- function(x) gsub("^\\s+|\\s+$", "", x)
base_url <- 'http://www.hanbit.co.kr/academy/books/category_list.html?'
page <- 'page='
category <- '&cate_cd='
num_cate <- c('004008', '004008', '004003', '004004', '00... | /01_Crowling/Crawling_1_scripts.R | no_license | Blockhead4/R-Project | R | false | false | 1,463 | r | # 한빛아카데미 도서 크롤링
install.packages('rvest')
library(rvest)
library(dplyr)
library(stringr)
library(xlsx)
trim <- function(x) gsub("^\\s+|\\s+$", "", x)
base_url <- 'http://www.hanbit.co.kr/academy/books/category_list.html?'
page <- 'page='
category <- '&cate_cd='
num_cate <- c('004008', '004008', '004003', '004004', '00... |
source("~/COMPBIO/trunk/users/jang/R5/myEnetCoxIterModel.R")
source("~/COMPBIO/trunk/users/jang/R5/myEnetCoxModelIQM.R")
MC_unpenalty_Exp <- setRefClass(Class = "MC_unpenalty_Exp",
contains="PredictiveModel",
fields=c("... | /survival_analysis/IterCV_Insock/MC_unpenalty/MC_unpenalty_Exp.R | no_license | insockjang/DrugResponse | R | false | false | 7,860 | r | source("~/COMPBIO/trunk/users/jang/R5/myEnetCoxIterModel.R")
source("~/COMPBIO/trunk/users/jang/R5/myEnetCoxModelIQM.R")
MC_unpenalty_Exp <- setRefClass(Class = "MC_unpenalty_Exp",
contains="PredictiveModel",
fields=c("... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hashmap.R
\name{hashmap}
\alias{hashmap}
\title{Atomic vector hash map}
\usage{
hashmap(keys, values, ...)
}
\arguments{
\item{keys}{an atomic vector representing lookup keys}
\item{values}{an atomic vector of values associated with \code{ke... | /man/hashmap.Rd | permissive | nathan-russell/hashmap | R | false | true | 1,457 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hashmap.R
\name{hashmap}
\alias{hashmap}
\title{Atomic vector hash map}
\usage{
hashmap(keys, values, ...)
}
\arguments{
\item{keys}{an atomic vector representing lookup keys}
\item{values}{an atomic vector of values associated with \code{ke... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NLDprov.R
\name{NLDprov}
\alias{NLDprov}
\title{NLDprov}
\usage{
NLDprov(
stat = NULL,
varname = "value",
getPROV = FALSE,
title = "Kaart van Nederland",
subtitle = NULL,
copyright = NULL,
mincol = "turquoise1",
maxcol = "stee... | /man/NLDprov.Rd | no_license | TIvanDijk/TivD | R | false | true | 1,476 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NLDprov.R
\name{NLDprov}
\alias{NLDprov}
\title{NLDprov}
\usage{
NLDprov(
stat = NULL,
varname = "value",
getPROV = FALSE,
title = "Kaart van Nederland",
subtitle = NULL,
copyright = NULL,
mincol = "turquoise1",
maxcol = "stee... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package.R
\name{et}
\alias{et}
\title{shortcut for eval(parse(text = <string>))}
\usage{
et(txt, eval = TRUE, envir = parent.frame())
}
\arguments{
\item{txt}{string to evaluate}
}
\description{
shortcut for eval(parse(text = <string>))
}
\au... | /man/et.Rd | no_license | cdurmaz569/khtools | R | false | true | 339 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package.R
\name{et}
\alias{et}
\title{shortcut for eval(parse(text = <string>))}
\usage{
et(txt, eval = TRUE, envir = parent.frame())
}
\arguments{
\item{txt}{string to evaluate}
}
\description{
shortcut for eval(parse(text = <string>))
}
\au... |
/plot3.R | no_license | PakoRC1/C4Hw1 | R | false | false | 1,149 | r | ||
#################
# Preparations #
###############
# install packages
#install.packages("plyr")
#install.packages("ape")
#install.packages("ggplot2")
#source("https://bioconductor.org/biocLite.R")
#biocLite("ggtree")
#biocLite("EBImage")
# load packages
library(plyr)
library(ape)
library(ggplot2)
l... | /Chapter_2/R/ch2_script.R | no_license | nemochina2008/Dissertation-1 | R | false | false | 3,863 | r |
#################
# Preparations #
###############
# install packages
#install.packages("plyr")
#install.packages("ape")
#install.packages("ggplot2")
#source("https://bioconductor.org/biocLite.R")
#biocLite("ggtree")
#biocLite("EBImage")
# load packages
library(plyr)
library(ape)
library(ggplot2)
l... |
generateProfiles <- function(cancermine) {
cancermineProfiles <- cancermine
cancermineProfiles$gene_and_role <- factor(paste(cancermineProfiles$gene_normalized, str_replace(cancermineProfiles$role,"_"," "), sep=':'))
cancermineProfiles$log_citation_count <- log10(cancermineProfiles$citation_count+1)
cancermineP... | /shiny/profile_clustering.R | permissive | jakelever/cancermine | R | false | false | 5,501 | r | generateProfiles <- function(cancermine) {
cancermineProfiles <- cancermine
cancermineProfiles$gene_and_role <- factor(paste(cancermineProfiles$gene_normalized, str_replace(cancermineProfiles$role,"_"," "), sep=':'))
cancermineProfiles$log_citation_count <- log10(cancermineProfiles$citation_count+1)
cancermineP... |
\name{fsOrder}
\alias{fsOrder}
\title{
Compute the Ordered Factor Scores
}
\description{
Compute the ordered factor scores according to the first/second/third... column of the original factor scores.
}
\usage{
fsOrder(factorScores)
}
\arguments{
\item{factorScores}{
The original factor scores.
}
}
... | /man/fsOrder.Rd | no_license | cran/robustfa | R | false | false | 1,158 | rd | \name{fsOrder}
\alias{fsOrder}
\title{
Compute the Ordered Factor Scores
}
\description{
Compute the ordered factor scores according to the first/second/third... column of the original factor scores.
}
\usage{
fsOrder(factorScores)
}
\arguments{
\item{factorScores}{
The original factor scores.
}
}
... |
mw.plot <- function(model,
cv = 0.2,
every = 5,
last.yr = 2015,
french=FALSE){
mpd <- model$mpd
yrs <- model$dat$meanwtdata[,1]
obs <- mpd$obs_annual_mean_weight
fit <- mpd$annual_mean_weight
i <- cbind(yrs, obs, fit) %>% as.tib... | /R/figures-mean-weight.R | no_license | pbs-assess/pacific-cod-2018 | R | false | false | 1,827 | r | mw.plot <- function(model,
cv = 0.2,
every = 5,
last.yr = 2015,
french=FALSE){
mpd <- model$mpd
yrs <- model$dat$meanwtdata[,1]
obs <- mpd$obs_annual_mean_weight
fit <- mpd$annual_mean_weight
i <- cbind(yrs, obs, fit) %>% as.tib... |
library("Mcomp")
library("Rlgt2")
M3.data <- subset(M3,"yearly")
set.seed(12)
curr_series <- 1
sizeTestSet <- length(M3.data[[curr_series]]$xx)
data.train <- M3.data[[curr_series]]$x
mod <- list()
forecasts <- list()
#fc <- forecast(ets(data.train), h = sizeTestSet)
#plot(fc)
##--------------------------------... | /scripts/exampleScript.R | no_license | cbergmeir/Rlgt | R | false | false | 2,380 | r |
library("Mcomp")
library("Rlgt2")
M3.data <- subset(M3,"yearly")
set.seed(12)
curr_series <- 1
sizeTestSet <- length(M3.data[[curr_series]]$xx)
data.train <- M3.data[[curr_series]]$x
mod <- list()
forecasts <- list()
#fc <- forecast(ets(data.train), h = sizeTestSet)
#plot(fc)
##--------------------------------... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source("../../../h2o-r/scripts/h2o-r-test-setup.R")
test <-
function() {
running_inside_hexdata = file.exists("/mnt/0xcustomer-datasets/c4/test20130806.tsv")
if (!running_inside_hexdata) {
# hdp2.2 cluster
stop("0xdat... | /h2o-test-integ/tests/mnt/runit_parse_test.R | permissive | Winfredemalx54/h2o-3 | R | false | false | 571 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source("../../../h2o-r/scripts/h2o-r-test-setup.R")
test <-
function() {
running_inside_hexdata = file.exists("/mnt/0xcustomer-datasets/c4/test20130806.tsv")
if (!running_inside_hexdata) {
# hdp2.2 cluster
stop("0xdat... |
library(BMLGrid)
test <- function(){
g1=createBMLGrid(0.5)
g2=createBMLGrid(1)
x=all(runBMLGrid(g1,20)==crunBMLGrid(g1,20)) & all(runBMLGrid(g2,20)==crunBMLGrid(g2,20))
x
}
context("Whether our move functions match")
test_that("test() should give TRUE", {
expect_equal(test(), TRUE)
})
| /BLM Grid improved (R:C++)/BMLGrid/tests/testthat/test1.R | no_license | vladimirsemenp/Projects-in-statistics | R | false | false | 311 | r | library(BMLGrid)
test <- function(){
g1=createBMLGrid(0.5)
g2=createBMLGrid(1)
x=all(runBMLGrid(g1,20)==crunBMLGrid(g1,20)) & all(runBMLGrid(g2,20)==crunBMLGrid(g2,20))
x
}
context("Whether our move functions match")
test_that("test() should give TRUE", {
expect_equal(test(), TRUE)
})
|
#' Illig_data
#'
#' Illig_data contains 187 CpGs required to calcualte smoking score based on Elliot et al approach
#'
#' @docType data
#'
#' @usage data(Illig_data)
#'
#' @keywords datasets
#'
#' @format A dataframe with 187 rows and 9 columns.
#'
#' @references Elliott HR, Tillin T, McArdle WL, et al. Differences in ... | /R/Illig_data.R | no_license | spurthy111/EpiSmokEr | R | false | false | 587 | r | #' Illig_data
#'
#' Illig_data contains 187 CpGs required to calcualte smoking score based on Elliot et al approach
#'
#' @docType data
#'
#' @usage data(Illig_data)
#'
#' @keywords datasets
#'
#' @format A dataframe with 187 rows and 9 columns.
#'
#' @references Elliott HR, Tillin T, McArdle WL, et al. Differences in ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AM_mix_weights_prior.R
\name{summary.AM_mix_weights_prior}
\alias{summary.AM_mix_weights_prior}
\title{summary information of the AM_mix_weights_prior object}
\usage{
\method{summary}{AM_mix_weights_prior}(object, ...)
}
\arguments{
\item{obj... | /man/summary.AM_mix_weights_prior.Rd | no_license | cran/AntMAN | R | false | true | 667 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AM_mix_weights_prior.R
\name{summary.AM_mix_weights_prior}
\alias{summary.AM_mix_weights_prior}
\title{summary information of the AM_mix_weights_prior object}
\usage{
\method{summary}{AM_mix_weights_prior}(object, ...)
}
\arguments{
\item{obj... |
############ APPLIED STATISTICS -> EXERCISE 3 ############
#### Export, Import, Data frame ####
rm(list=ls())
##### Matrix #####
m1<-matrix(1, nrow = 2, ncol = 3)
(m2<-matrix(c(1,2,3), nrow=2, ncol = 3))
dim(m2)
m1+m2
1+m2
(m3<-matrix(1:6,ncol=3))
c(1,2)*m3
m3*c(1,2)
c(1,2,3)*m3
c(1,... | /applied-statistics-labs/Script_exercise_3.R | no_license | nshahpazov/probability-and-statistics-and-a-bit-of-markov-chains | R | false | false | 6,468 | r | ############ APPLIED STATISTICS -> EXERCISE 3 ############
#### Export, Import, Data frame ####
rm(list=ls())
##### Matrix #####
m1<-matrix(1, nrow = 2, ncol = 3)
(m2<-matrix(c(1,2,3), nrow=2, ncol = 3))
dim(m2)
m1+m2
1+m2
(m3<-matrix(1:6,ncol=3))
c(1,2)*m3
m3*c(1,2)
c(1,2,3)*m3
c(1,... |
library(tidyverse)
library(caret)
library(pROC)
library(glmnet)
library(DMwR)
library(rmda)
library(ggpubr)
library(ModelGood)
library(rms)
library(mRMRe)
library(DescTools)
library(Publish)
heatplot <- function(conf_mat)
{
conf_mat$table %>%
heatmap.2(dendrogram = 'none', trace = 'none',
... | /code_pancSCNvsMCN_new.R | no_license | jaho0528/radiomicspanc | R | false | false | 14,788 | r | library(tidyverse)
library(caret)
library(pROC)
library(glmnet)
library(DMwR)
library(rmda)
library(ggpubr)
library(ModelGood)
library(rms)
library(mRMRe)
library(DescTools)
library(Publish)
heatplot <- function(conf_mat)
{
conf_mat$table %>%
heatmap.2(dendrogram = 'none', trace = 'none',
... |
# Tests adorn_rounding
library(janitor)
context("adorn_rounding")
library(dplyr)
x <- data.frame(
a = c(rep("x", 55), rep("y", 45)),
b = c(rep("x", 50), rep("y", 50)),
stringsAsFactors = FALSE
)
# Crosstab with decimal values ending in .5
y <- x %>%
tabyl(a, b) %>%
adorn_percentages("all")
test_that("r... | /tests/testthat/test-adorn-rounding.R | permissive | khunreus/janitor | R | false | false | 2,245 | r | # Tests adorn_rounding
library(janitor)
context("adorn_rounding")
library(dplyr)
x <- data.frame(
a = c(rep("x", 55), rep("y", 45)),
b = c(rep("x", 50), rep("y", 50)),
stringsAsFactors = FALSE
)
# Crosstab with decimal values ending in .5
y <- x %>%
tabyl(a, b) %>%
adorn_percentages("all")
test_that("r... |
## ******************************************************************** ##
## alphahull_to_shape.R
##
## Author: Andrew Bevan (code from https://stat.ethz.ch/pipermail/r-sig-geo/2012-March/014409.html)
## Date Created: 2014-11-10
##
## Purpose:
## Convert from an alpha hull object created by functions in the alphahull
... | /Appendix_Data/App5_Expert_Maps/alphahull_to_shape.R | no_license | yangxhcaf/Merow_et_al_2016_GEB_Minxent_Examples | R | false | false | 4,001 | r | ## ******************************************************************** ##
## alphahull_to_shape.R
##
## Author: Andrew Bevan (code from https://stat.ethz.ch/pipermail/r-sig-geo/2012-March/014409.html)
## Date Created: 2014-11-10
##
## Purpose:
## Convert from an alpha hull object created by functions in the alphahull
... |
library(readxl)
library(reshape2)
library(ggplot2)
### ESTE DATASET (incidenciaPorComuna.csv) NO ESTA EN EL GIT PORQUE ES MUY GRANDE, DESCARGAR DEL DRIVE #######
inc<-read.csv("datasets\\incidenciaPorComuna.csv", header = T)
egr<-read.csv("datasets\\incidenciaPorComuna.csv", header = T)
incN<-read.csv("datasets\\incid... | /scripts/abortoEspontaneo.R | no_license | RaiBP/CC5206-Project | R | false | false | 2,570 | r | library(readxl)
library(reshape2)
library(ggplot2)
### ESTE DATASET (incidenciaPorComuna.csv) NO ESTA EN EL GIT PORQUE ES MUY GRANDE, DESCARGAR DEL DRIVE #######
inc<-read.csv("datasets\\incidenciaPorComuna.csv", header = T)
egr<-read.csv("datasets\\incidenciaPorComuna.csv", header = T)
incN<-read.csv("datasets\\incid... |
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(readr)
library(data.table)
library(stringr)
bigram<-fread("bigram.csv")
trigram<... | /Downloads/projectAc01/Text predictor/server.R | no_license | saurabh-24/Projects | R | false | false | 2,545 | r | #
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(readr)
library(data.table)
library(stringr)
bigram<-fread("bigram.csv")
trigram<... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_generator.R
\name{sktb_insert_comma}
\alias{sktb_insert_comma}
\title{Insert comma after specified pos}
\usage{
sktb_insert_comma(message, pos_after = c("ADP", "AUX"), comma_freq = 0)
}
\arguments{
\item{message}{character scalar.}
\it... | /man/sktb_insert_comma.Rd | permissive | paithiov909/shaketoba | R | false | true | 505 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_generator.R
\name{sktb_insert_comma}
\alias{sktb_insert_comma}
\title{Insert comma after specified pos}
\usage{
sktb_insert_comma(message, pos_after = c("ADP", "AUX"), comma_freq = 0)
}
\arguments{
\item{message}{character scalar.}
\it... |
# Raise the default file size limit to 2000MG
options(shiny.maxRequestSize= -1)
function(input, output, session){
# read sr dataset -------------------------------------------------------------
sr = reactive({
if (!is.null(input$sr_file))
{
inFile <- input$sr_file
fn = inFile$datapath
... | /Server.R | no_license | cstangor/shiny | R | false | false | 4,496 | r | # Raise the default file size limit to 2000MG
options(shiny.maxRequestSize= -1)
function(input, output, session){
# read sr dataset -------------------------------------------------------------
sr = reactive({
if (!is.null(input$sr_file))
{
inFile <- input$sr_file
fn = inFile$datapath
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/demographic.r
\name{genderpieplot}
\alias{genderpieplot}
\title{code for plotting gender Pie plot}
\usage{
genderpieplot(charactManufac)
}
\arguments{
\item{charactManufac}{result of charactManufacture code}
}
\description{
code for plotting ... | /man/genderpieplot.Rd | no_license | ABMI/RTROD_WINGS | R | false | true | 338 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/demographic.r
\name{genderpieplot}
\alias{genderpieplot}
\title{code for plotting gender Pie plot}
\usage{
genderpieplot(charactManufac)
}
\arguments{
\item{charactManufac}{result of charactManufacture code}
}
\description{
code for plotting ... |
# Load
HLA_matrix<- readRDS("data/HLA_matrix.rds")
mut_matrix<- readRDS("data/mut_matrix.rds")
TCGA_cancer_id<- readRDS("downloads/TCGA/clin/TCGA_cancer_id.rds")
# Get score vector
HLA_vector<- as.numeric(HLA_matrix)
mut_vector<- as.logical(mut_matrix!=0)
mut_vector<- mut_vector[!is.na(HLA_vector)]
HLA_vector<- HLA_ve... | /scripts/manuscript_mut_HLA_analysis.R | no_license | CCGGlab/mhc_driver | R | false | false | 1,935 | r | # Load
HLA_matrix<- readRDS("data/HLA_matrix.rds")
mut_matrix<- readRDS("data/mut_matrix.rds")
TCGA_cancer_id<- readRDS("downloads/TCGA/clin/TCGA_cancer_id.rds")
# Get score vector
HLA_vector<- as.numeric(HLA_matrix)
mut_vector<- as.logical(mut_matrix!=0)
mut_vector<- mut_vector[!is.na(HLA_vector)]
HLA_vector<- HLA_ve... |
\name{distmap.ppp} %DontDeclareMethods
\alias{distmap.ppp}
\title{
Distance Map of Point Pattern
}
\description{
Computes the distance from each pixel to the nearest
point in the given point pattern.
}
\usage{
\method{distmap}{ppp}(X, \dots)
}
\arguments{
\item{X}{A point pattern (object of class \code{"ppp"... | /man/distmap.ppp.Rd | no_license | chenjiaxun9/spatstat | R | false | false | 2,280 | rd | \name{distmap.ppp} %DontDeclareMethods
\alias{distmap.ppp}
\title{
Distance Map of Point Pattern
}
\description{
Computes the distance from each pixel to the nearest
point in the given point pattern.
}
\usage{
\method{distmap}{ppp}(X, \dots)
}
\arguments{
\item{X}{A point pattern (object of class \code{"ppp"... |
library(XML)
### Name: [<-.XMLNode
### Title: Assign sub-nodes to an XML node
### Aliases: [<-.XMLNode [[<-.XMLNode
### Keywords: IO file
### ** Examples
top <- xmlNode("top", xmlNode("next","Some text"))
top[["second"]] <- xmlCDataNode("x <- 1:10")
top[[3]] <- xmlNode("tag",attrs=c(id="name"))
| /data/genthat_extracted_code/XML/examples/AssignXMLNode.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 306 | r | library(XML)
### Name: [<-.XMLNode
### Title: Assign sub-nodes to an XML node
### Aliases: [<-.XMLNode [[<-.XMLNode
### Keywords: IO file
### ** Examples
top <- xmlNode("top", xmlNode("next","Some text"))
top[["second"]] <- xmlCDataNode("x <- 1:10")
top[[3]] <- xmlNode("tag",attrs=c(id="name"))
|
\dontrun{
# download all available data for PIAAC round 1 to "~/PIAAC/Round 1" folder
# root argument will vary by operating system conventions
downloadPIAAC(root="~/")
}
| /man/examples/downloadPIAAC.R | no_license | cran/EdSurvey | R | false | false | 176 | r | \dontrun{
# download all available data for PIAAC round 1 to "~/PIAAC/Round 1" folder
# root argument will vary by operating system conventions
downloadPIAAC(root="~/")
}
|
testlist <- list(A = structure(c(1.36350961530478e-309, 6.37476210524676e-314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(7L, 10L)), left = 0L, r... | /mgss/inst/testfiles/MVP_normalfactor_rcpp/AFL_MVP_normalfactor_rcpp/MVP_normalfactor_rcpp_valgrind_files/1615948790-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 415 | r | testlist <- list(A = structure(c(1.36350961530478e-309, 6.37476210524676e-314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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(7L, 10L)), left = 0L, r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loadGeneSet.R
\name{loadGeneSet}
\alias{loadGeneSet}
\title{Load gene set data}
\usage{
loadGeneSet(
organism = "hsapiens",
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile =... | /man/loadGeneSet.Rd | no_license | smartgamer/WebGestaltR | R | false | true | 3,268 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loadGeneSet.R
\name{loadGeneSet}
\alias{loadGeneSet}
\title{Load gene set data}
\usage{
loadGeneSet(
organism = "hsapiens",
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile =... |
## Below are two functions that are used to create a special object
## that stores a square matrices and cache's its Inverse.
## This function, makeCacheMatrix creates a special "matrix" object
## This object is really a list containing a function to
##setMatrix : the value of the matrix
##getMatrix : get the value o... | /cachematrix.R | no_license | rezakhoie/ProgrammingAssignment2 | R | false | false | 1,339 | r | ## Below are two functions that are used to create a special object
## that stores a square matrices and cache's its Inverse.
## This function, makeCacheMatrix creates a special "matrix" object
## This object is really a list containing a function to
##setMatrix : the value of the matrix
##getMatrix : get the value o... |
#always set this as wd or your source files wouldn't run
setwd("D:/R program/")
####FOR EXPONENTS USE (n)^n RATHER THAN E
#just for trial, shift completed script chunks to the Rnotebook but make initial scripts here
##calculating beta
#values needed
K= 1.38064852*(10)^-23 #m2 kg/ s2 K boltzmann consta... | /Oct 2018/beta kernel trial3.R | no_license | kaye11/Postdoc-R | R | false | false | 12,624 | r |
#always set this as wd or your source files wouldn't run
setwd("D:/R program/")
####FOR EXPONENTS USE (n)^n RATHER THAN E
#just for trial, shift completed script chunks to the Rnotebook but make initial scripts here
##calculating beta
#values needed
K= 1.38064852*(10)^-23 #m2 kg/ s2 K boltzmann consta... |
# load the sqldf library
options(gsubfn.engine = "R") # use this option on Mac
library(sqldf)
# load data within the 2 days period, with SQL query
data <- read.csv2.sql(file = "household_power_consumption.txt",
sql = "SELECT * FROM file WHERE Date IN ('1/2/2007','2/2/2007')")
# create png devic... | /plot1.R | no_license | jgruhier/ExData_Plotting1 | R | false | false | 555 | r | # load the sqldf library
options(gsubfn.engine = "R") # use this option on Mac
library(sqldf)
# load data within the 2 days period, with SQL query
data <- read.csv2.sql(file = "household_power_consumption.txt",
sql = "SELECT * FROM file WHERE Date IN ('1/2/2007','2/2/2007')")
# create png devic... |
DATA.PATH <- "../DataSets/zip.data/"
ZIP.TRAIN.FILE.NAME <- paste0(DATA.PATH, "zip.train")
ZIP.TEST.FILE.NAME <- paste0(DATA.PATH, "zip.test")
get.data <- function(
train.file, test.file, class.1, class.2, num.principle.components = 50) {
# Args:
# train.file:
# test.file:
# class.1:
# class.2
# ... | /STAT775/HW07/hmmmm.R | permissive | T-R0D/Past-Courses | R | false | false | 2,202 | r | DATA.PATH <- "../DataSets/zip.data/"
ZIP.TRAIN.FILE.NAME <- paste0(DATA.PATH, "zip.train")
ZIP.TEST.FILE.NAME <- paste0(DATA.PATH, "zip.test")
get.data <- function(
train.file, test.file, class.1, class.2, num.principle.components = 50) {
# Args:
# train.file:
# test.file:
# class.1:
# class.2
# ... |
# CLT and t-distribution in Practice Exercises
# Central Limit Theorem applies when events are independent.
# Central Limit Theorem is an asympototic result.
# CLT explains normal Z and tells us the population mean = 0 & population standard deviation = 1
# Asympototic result: gets closer to being a perfect approximat... | /StatisticalThinking/DataAnalysisLifeSciences/Classwork/Week2/t-distributionExercises.R | no_license | Lula27/R_StatisticsEssentialTraining | R | false | false | 5,414 | r | # CLT and t-distribution in Practice Exercises
# Central Limit Theorem applies when events are independent.
# Central Limit Theorem is an asympototic result.
# CLT explains normal Z and tells us the population mean = 0 & population standard deviation = 1
# Asympototic result: gets closer to being a perfect approximat... |
visMannKendall <- function(rst,
p_value = NULL,
sp.layout = NULL,
at = seq(-1, 1, .2),
col.regions = NULL,
alpha.regions = 1,
keycex = .8,
... | /R/visMannKendall.R | no_license | npp97/paper_kilimanjaro_ndvi_comparison | R | false | false | 2,490 | r | visMannKendall <- function(rst,
p_value = NULL,
sp.layout = NULL,
at = seq(-1, 1, .2),
col.regions = NULL,
alpha.regions = 1,
keycex = .8,
... |
library(cobalt)
### Name: var.names
### Title: Extract Variable Names from 'bal.tab' Objects
### Aliases: var.names
### ** Examples
data(lalonde)
b1 <- bal.tab(treat ~ age + race + married, data = lalonde,
int = TRUE)
v1 <- var.names(b1, type = "vec", minimal = TRUE)
v1["age"] <- "Age (Years)"
v1["rac... | /data/genthat_extracted_code/cobalt/examples/var.names.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 770 | r | library(cobalt)
### Name: var.names
### Title: Extract Variable Names from 'bal.tab' Objects
### Aliases: var.names
### ** Examples
data(lalonde)
b1 <- bal.tab(treat ~ age + race + married, data = lalonde,
int = TRUE)
v1 <- var.names(b1, type = "vec", minimal = TRUE)
v1["age"] <- "Age (Years)"
v1["rac... |
## code to prepare `zdd_store` dataset goes here
# when package loads, we want to have a reliable environment where we can store
# zdd nodes
zdd_store <- new.env()
zdd_fxns <- new.env()
usethis::use_data(zdd_store, zdd_fxns, overwrite = TRUE)
| /data-raw/zdd_store.R | permissive | jordagaman/zddr | R | false | false | 244 | r | ## code to prepare `zdd_store` dataset goes here
# when package loads, we want to have a reliable environment where we can store
# zdd nodes
zdd_store <- new.env()
zdd_fxns <- new.env()
usethis::use_data(zdd_store, zdd_fxns, overwrite = TRUE)
|
/groupe-conception/groupe2/FunCampR.R | no_license | insee-unissi/funcamp-r | R | false | false | 1,939 | r | ||
#' @title Obtain the physico-chemical properties from a peptide sequence
#' @description Computes different properties for a peptide sequence from the amino acid properties and the amino acid frequency of the sequence.
#' @param AAfreq The relative frequency of amino acids in a peptide sequence
#' @return A data.frame ... | /R/AA_PhysChemProps.R | no_license | crarlus/paprbag | R | false | false | 905 | r | #' @title Obtain the physico-chemical properties from a peptide sequence
#' @description Computes different properties for a peptide sequence from the amino acid properties and the amino acid frequency of the sequence.
#' @param AAfreq The relative frequency of amino acids in a peptide sequence
#' @return A data.frame ... |
##' DES optimization algorithm minimizing specified function
##'
##' @param par Initial parameter combination .
##' @param fn Function to minimize.
##' @param lower Lower bounds of search space.
##' @param upper Upper bounds of search space.
##' @param max_eval Maximium number of function evaluations to perform.
##' @p... | /des_algorithm.R | no_license | trojkac/WAE | R | false | false | 4,110 | r | ##' DES optimization algorithm minimizing specified function
##'
##' @param par Initial parameter combination .
##' @param fn Function to minimize.
##' @param lower Lower bounds of search space.
##' @param upper Upper bounds of search space.
##' @param max_eval Maximium number of function evaluations to perform.
##' @p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trav_out_node.R
\name{trav_out_node}
\alias{trav_out_node}
\title{Traverse from one or more selected edges onto
adjacent, outward nodes}
\usage{
trav_out_node(graph, conditions = NULL, copy_attrs_from = NULL,
agg = "sum")
}
\arguments{
\ite... | /man/trav_out_node.Rd | no_license | DataXujing/DiagrammeR | R | false | true | 5,694 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trav_out_node.R
\name{trav_out_node}
\alias{trav_out_node}
\title{Traverse from one or more selected edges onto
adjacent, outward nodes}
\usage{
trav_out_node(graph, conditions = NULL, copy_attrs_from = NULL,
agg = "sum")
}
\arguments{
\ite... |
#' Pseudo-3D plotting
#'
#' `Plot3()` is an experimental function that generates
#' a two-dimensional plot with the impression of a third dimension
#' obtained through point scaling, overlap and fogging.
#'
#' @param x,y,z Coordinates of points to plot.
#' @param fog Numeric specifying amount of mist to apply to dist... | /R/Plot3.R | no_license | pyspider/TreeDist | R | false | false | 2,397 | r | #' Pseudo-3D plotting
#'
#' `Plot3()` is an experimental function that generates
#' a two-dimensional plot with the impression of a third dimension
#' obtained through point scaling, overlap and fogging.
#'
#' @param x,y,z Coordinates of points to plot.
#' @param fog Numeric specifying amount of mist to apply to dist... |
###Scripts for doing the variance subsets taking labs into account
library(parallel)
library(class)
library(plyr)
raw_data <- read.table("Desktop/DatasetCarlos_GPL570_mRNA_RMA_CleanedIdentifiers_QCed.txt", sep="\t", row.names = 1, header = T)
label_data <- read.csv2("cup_usable_samples.csv", row.names = 1)
cross_... | /per_CV_iteration_probes.R | no_license | CGUTA/UMCG-CUP-Internship | R | false | false | 805 | r | ###Scripts for doing the variance subsets taking labs into account
library(parallel)
library(class)
library(plyr)
raw_data <- read.table("Desktop/DatasetCarlos_GPL570_mRNA_RMA_CleanedIdentifiers_QCed.txt", sep="\t", row.names = 1, header = T)
label_data <- read.csv2("cup_usable_samples.csv", row.names = 1)
cross_... |
\name{cpt.geo-class}
\alias{cpt.geo-class}
\Rdversion{1.1}
\docType{class}
\alias{ang.cpts,cpt.geo-method}
\alias{ang.cpts<-,cpt.geo-method}
\alias{ang.out,cpt.geo-method}
\alias{ang.out<-,cpt.geo-method}
\alias{data.set,cpt.geo-method}
\alias{data.set<-,cpt.geo-method}
\alias{dist.cpts,cpt.geo-method}
\alias{dist.cpts... | /man/cpt.geo-class.Rd | no_license | grundy95/changepoint.geo | R | false | false | 5,976 | rd | \name{cpt.geo-class}
\alias{cpt.geo-class}
\Rdversion{1.1}
\docType{class}
\alias{ang.cpts,cpt.geo-method}
\alias{ang.cpts<-,cpt.geo-method}
\alias{ang.out,cpt.geo-method}
\alias{ang.out<-,cpt.geo-method}
\alias{data.set,cpt.geo-method}
\alias{data.set<-,cpt.geo-method}
\alias{dist.cpts,cpt.geo-method}
\alias{dist.cpts... |
# ---
# GENERAL DEFINITION FILE FOR TESTING
# ---
# contains general (task and algorithm-independent) setup
# overwrite registry?
OVERWRITE = TRUE
# termination criterion for each run
MAXEVAL = 40L
# replication of each run
REPLICATIONS = 1L
FUNS = list(
"Sphere.2D" = makeSphereFunction(1),
"Styblinsky" = mak... | /benchmark/b2-noise-effect/def_test.R | no_license | juliambr/bayesopt-repl | R | false | false | 573 | r | # ---
# GENERAL DEFINITION FILE FOR TESTING
# ---
# contains general (task and algorithm-independent) setup
# overwrite registry?
OVERWRITE = TRUE
# termination criterion for each run
MAXEVAL = 40L
# replication of each run
REPLICATIONS = 1L
FUNS = list(
"Sphere.2D" = makeSphereFunction(1),
"Styblinsky" = mak... |
## The two functions here are for calculating the inverse of a
## matrix. What is special here is that, if the inverse of the
## matrix is calculated once before, the functions directly
## read the result from cache instead of recalculating.
## The makeCacheMatrix() funtion here creates an artificial list
## incl... | /cachematrix.R | no_license | FangQijun/ProgrammingAssignment2 | R | false | false | 2,204 | r | ## The two functions here are for calculating the inverse of a
## matrix. What is special here is that, if the inverse of the
## matrix is calculated once before, the functions directly
## read the result from cache instead of recalculating.
## The makeCacheMatrix() funtion here creates an artificial list
## incl... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' MVMRcML method with Data Perturbation
#'
#' This is the internal MVMRcML-BIC function of mr_mvcML.
#'
#' @param b_exp A m*L matrix of SNP effects on the exposure variable.
#' @param b_out A ... | /R/RcppExports.R | no_license | cran/MendelianRandomization | R | false | false | 4,207 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' MVMRcML method with Data Perturbation
#'
#' This is the internal MVMRcML-BIC function of mr_mvcML.
#'
#' @param b_exp A m*L matrix of SNP effects on the exposure variable.
#' @param b_out A ... |
# get the original data
projectone<-read.table("./household_power_consumption.txt", header=T,sep=";",na.strings = "?")
# omit NA value
omit.NA.projectone<-na.omit(projectone)
# subsetting the data
subprojectone<-subset(omit.NA.projectone,Date=="1/2/2007"|Date=="2/2/2007")
# converting the date
subprojectone$Date<-as.Da... | /Plot 1.R | no_license | yuntaozhou/Data-analysis-with-R | R | false | false | 763 | r | # get the original data
projectone<-read.table("./household_power_consumption.txt", header=T,sep=";",na.strings = "?")
# omit NA value
omit.NA.projectone<-na.omit(projectone)
# subsetting the data
subprojectone<-subset(omit.NA.projectone,Date=="1/2/2007"|Date=="2/2/2007")
# converting the date
subprojectone$Date<-as.Da... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gompertz.R
\name{dgompertz}
\alias{dgompertz}
\title{Gompertz Probability Density}
\usage{
dgompertz(x, llocation = 0, lshape = 0, log = FALSE)
}
\arguments{
\item{x}{A numeric vector of values.}
\item{llocation}{location parameter on the lo... | /man/dgompertz.Rd | permissive | cran/ssdtools | R | false | true | 663 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gompertz.R
\name{dgompertz}
\alias{dgompertz}
\title{Gompertz Probability Density}
\usage{
dgompertz(x, llocation = 0, lshape = 0, log = FALSE)
}
\arguments{
\item{x}{A numeric vector of values.}
\item{llocation}{location parameter on the lo... |
.onLoad <- function(libname, pkgname) {
reticulate::use_python(python = Sys.which("python3"), required = TRUE)
}
| /R/zzz.R | permissive | kenjisato/clientsideHtmlProtect | R | false | false | 115 | r | .onLoad <- function(libname, pkgname) {
reticulate::use_python(python = Sys.which("python3"), required = TRUE)
}
|
require("project.init")
require(Seurat)
require(dplyr)
require(Matrix)
require(methods)
require(pheatmap)
require(gplots)
project.init2("cll-time_course")
out <- "16_PlotSomeGenes/"
dir.create(dirout(out))
sample.x <- "inclDay30_noIGHLK"
load(file=dirout("10_Seurat_raw/", sample.x, "_negbinom/",sample.x,".RData"))
... | /src/single_cell_RNA/16_PlotSomeGenes.R | no_license | nattzy94/cll-ibrutinib_time | R | false | false | 1,052 | r | require("project.init")
require(Seurat)
require(dplyr)
require(Matrix)
require(methods)
require(pheatmap)
require(gplots)
project.init2("cll-time_course")
out <- "16_PlotSomeGenes/"
dir.create(dirout(out))
sample.x <- "inclDay30_noIGHLK"
load(file=dirout("10_Seurat_raw/", sample.x, "_negbinom/",sample.x,".RData"))
... |
# Damon Polioudakis
# 2016-12-08
# Plot bulk RNAseq of VZ and CP from Luis and Jason's ATAC versus pooled
# scRNAseq VZ and CP
################################################################################
rm(list=ls())
sessionInfo()
require(ggplot2)
require(biomaRt)
### Load data and assign variables
## Load da... | /code/Compare_Bulk_to_scRNAseq_DS002_003.R | no_license | zehualilab/RNAseq_singlecellfetal | R | false | false | 9,705 | r |
# Damon Polioudakis
# 2016-12-08
# Plot bulk RNAseq of VZ and CP from Luis and Jason's ATAC versus pooled
# scRNAseq VZ and CP
################################################################################
rm(list=ls())
sessionInfo()
require(ggplot2)
require(biomaRt)
### Load data and assign variables
## Load da... |
"savevector" <-
structure(function(v,filename,cont=FALSE){
if(length(grep(patt="w32",x=version["os"]))){
eol<-"\n"
}else{eol<-"\r\n"}
cat(paste(c(paste("*Vertices",length(v)), v),collapse=eol),file = filename,append=cont)
}
, comment = "Save vector to file that can be read by Pajek")
| /blockmodeling/R/savevector.R | no_license | ingted/R-Examples | R | false | false | 294 | r | "savevector" <-
structure(function(v,filename,cont=FALSE){
if(length(grep(patt="w32",x=version["os"]))){
eol<-"\n"
}else{eol<-"\r\n"}
cat(paste(c(paste("*Vertices",length(v)), v),collapse=eol),file = filename,append=cont)
}
, comment = "Save vector to file that can be read by Pajek")
|
sk[ref=="TRACHINOCEPHALUS MYOPS", c("species", "genus"):=list(spp, "Synodus")]
sk[spp=="Lycodapus dermatinus", common:=NA]
sk[species=="Eucryphycus californicus", c("spp", "common", "flag"):=list("Eucryphycus californicus", "persimmon eelpout", "check")]
sk[spp=="Eogastropoda", common:=NA]
sk[spp=="Myliobatidae", com... | /pkgBuild/R/manual_edits_check_spp.key.R | no_license | afredston/trawlData | R | false | false | 12,177 | r |
sk[ref=="TRACHINOCEPHALUS MYOPS", c("species", "genus"):=list(spp, "Synodus")]
sk[spp=="Lycodapus dermatinus", common:=NA]
sk[species=="Eucryphycus californicus", c("spp", "common", "flag"):=list("Eucryphycus californicus", "persimmon eelpout", "check")]
sk[spp=="Eogastropoda", common:=NA]
sk[spp=="Myliobatidae", com... |
library(plyr)
library(doMC)
registerDoMC(cores=8)
sequenceTime <- function(df) {
df$pcBookPV1Day <- df$item_book_pv_1day
df$pcBookPV3Day <- df$item_book_pv_3day - df$item_book_pv_1day
df$pcBookPV7Day <- df$item_book_pv_7day - df$item_book_pv_3day
df$pcBookPV15Day <- df$item_book_pv_15day - df$item_boo... | /wltr_new/wltr.git/buildFeatures1.R | no_license | babyang/wltr | R | false | false | 15,749 | r | library(plyr)
library(doMC)
registerDoMC(cores=8)
sequenceTime <- function(df) {
df$pcBookPV1Day <- df$item_book_pv_1day
df$pcBookPV3Day <- df$item_book_pv_3day - df$item_book_pv_1day
df$pcBookPV7Day <- df$item_book_pv_7day - df$item_book_pv_3day
df$pcBookPV15Day <- df$item_book_pv_15day - df$item_boo... |
# preparation growing trees ====
library("tidyverse")
library("rpart")
library("rpart.plot")
library("rattle")
library("partykit")
library("kernlab")
# growing simple trees =====
## Load data-----------
head(smoking)
dim(smoking)
# tiny tree
tree_smoke <- rpart(intention_to_smoke ~ ., data = smoking)
# simple plo... | /Decision_Tree & Random Forest.R | no_license | minye904/DSBA | R | false | false | 6,027 | r | # preparation growing trees ====
library("tidyverse")
library("rpart")
library("rpart.plot")
library("rattle")
library("partykit")
library("kernlab")
# growing simple trees =====
## Load data-----------
head(smoking)
dim(smoking)
# tiny tree
tree_smoke <- rpart(intention_to_smoke ~ ., data = smoking)
# simple plo... |
loadandinstall = function(mypkg) {
if (!is.element(mypkg, installed.packages()[,1]))
install.packages(mypkg)
library(mypkg, character.only = TRUE)}
libs = c("sf", "stringr", "rnaturalearth")
for (lib in libs) loadandinstall(lib)
dir.create("data/chirps", recursive = T, showWarnings = F)
# Downloading CHIRPS p... | /src/000-dataDownload.R | no_license | goergen95/clca | R | false | false | 2,640 | r | loadandinstall = function(mypkg) {
if (!is.element(mypkg, installed.packages()[,1]))
install.packages(mypkg)
library(mypkg, character.only = TRUE)}
libs = c("sf", "stringr", "rnaturalearth")
for (lib in libs) loadandinstall(lib)
dir.create("data/chirps", recursive = T, showWarnings = F)
# Downloading CHIRPS p... |
#' DECENT
#'
#' Differential Expression with Capture Efficiency adjustmeNT
#'
#' @param data.obs Observed count matrix for endogeneous genes, rows represent genes, columns represent cells.
#' @param spike Observed count matrix for spike-ins, rows represent spike-ins, columns represent cells. Only needed if spikes = \co... | /R/decent.R | no_license | RudRho/DECENT | R | false | false | 4,385 | r | #' DECENT
#'
#' Differential Expression with Capture Efficiency adjustmeNT
#'
#' @param data.obs Observed count matrix for endogeneous genes, rows represent genes, columns represent cells.
#' @param spike Observed count matrix for spike-ins, rows represent spike-ins, columns represent cells. Only needed if spikes = \co... |
#'========================================================================================================================================
#' Project: Global-to-local GLOBIOM
#' Subject: Script to combine land use and land cover data
#' Author: Michiel van Dijk
#' Contact: michiel.vandijk@wur.nl
#'================... | /Code/MWI/Agricultural_statistics/Combine_sy.R | no_license | shaohuizhang/Global-to-local-GLOBIOM | R | false | false | 3,301 | r | #'========================================================================================================================================
#' Project: Global-to-local GLOBIOM
#' Subject: Script to combine land use and land cover data
#' Author: Michiel van Dijk
#' Contact: michiel.vandijk@wur.nl
#'================... |
#Stochastic implementation of 3-d transport system simulation
#P = n-dimensional transition matrix
#s_0 = n by 1 column vector of population in whole numbered values
#r_0 = rate of logistic growth
#t = amount of time to run simulation for
#N = number of individuals in initial population
#b = birth rate
#d = death rate... | /Simulation_code/stochastic_sim3d.R | no_license | apsicle/Network-Models-Thesis | R | false | false | 4,658 | r | #Stochastic implementation of 3-d transport system simulation
#P = n-dimensional transition matrix
#s_0 = n by 1 column vector of population in whole numbered values
#r_0 = rate of logistic growth
#t = amount of time to run simulation for
#N = number of individuals in initial population
#b = birth rate
#d = death rate... |
#' Get quantiles for exposure concentrations. Returns a charachter vector.
#'
#' @import tidyverse janitor
#'
#' @export
#'
#' @param x Vector of exposure concentrations
#' @param pct percentile cutoff
qntle_fxn <- function(x, pct){
pct <- quantile(x, pct) %>% signif(., digits = 3)
pct2 <- if_else(pct == 0, ... | /R/qntle_fxn.R | no_license | JAGoodrich/jag2 | R | false | false | 401 | r | #' Get quantiles for exposure concentrations. Returns a charachter vector.
#'
#' @import tidyverse janitor
#'
#' @export
#'
#' @param x Vector of exposure concentrations
#' @param pct percentile cutoff
qntle_fxn <- function(x, pct){
pct <- quantile(x, pct) %>% signif(., digits = 3)
pct2 <- if_else(pct == 0, ... |
# R CMD BATCH --no-save --no-restore '--args initForFit_name ordre step' 5-fit_model.R r.out
# or # R script 5-fit_model.R initForFit_name
#rm(list=ls())
args <- commandArgs(trailingOnly = TRUE)
initForFit <- as.character(args)[1]
ordre <- as.numeric(args)[2]
step <- as.numeric(args)[3]
#initForFit = "initForFit_rf_0... | /scripts/5-fit_model.R | no_license | QUICC-FOR/STModel-Calibration | R | false | false | 2,015 | r | # R CMD BATCH --no-save --no-restore '--args initForFit_name ordre step' 5-fit_model.R r.out
# or # R script 5-fit_model.R initForFit_name
#rm(list=ls())
args <- commandArgs(trailingOnly = TRUE)
initForFit <- as.character(args)[1]
ordre <- as.numeric(args)[2]
step <- as.numeric(args)[3]
#initForFit = "initForFit_rf_0... |
rm(list = ls())
#install.packages("twitteR")
library(twitteR)
#install.packages("ROAuth")
library(ROAuth)
#install.packages('scheduleR')
#library(SchedulerR)
requestURL <- 'https://api.twitter.com/oauth/request_token'
accessURL = 'https://api.twitter.com/oauth/access_token'
authURL = 'https://api.twitter.co... | /Twitter Extraction.R | no_license | QichenHu/Sentiment-and-Association-Exploration | R | false | false | 1,405 | r | rm(list = ls())
#install.packages("twitteR")
library(twitteR)
#install.packages("ROAuth")
library(ROAuth)
#install.packages('scheduleR')
#library(SchedulerR)
requestURL <- 'https://api.twitter.com/oauth/request_token'
accessURL = 'https://api.twitter.com/oauth/access_token'
authURL = 'https://api.twitter.co... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dist.R
\name{dist_skel}
\alias{dist_skel}
\title{Distribution Skeleton}
\usage{
dist_skel(n, dist = FALSE, cum = TRUE, model, params, max_value = 120)
}
\arguments{
\item{n}{Numeric vector, number of samples to take (or days for the probabili... | /man/dist_skel.Rd | permissive | pearsonca/EpiNow2 | R | false | true | 2,341 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dist.R
\name{dist_skel}
\alias{dist_skel}
\title{Distribution Skeleton}
\usage{
dist_skel(n, dist = FALSE, cum = TRUE, model, params, max_value = 120)
}
\arguments{
\item{n}{Numeric vector, number of samples to take (or days for the probabili... |
#1 Car seats problem
library(ISLR)
attach(Carseats)
View(Carseats)
#explore the data
anyNA(Carseats) #no NA
boxplot(Carseats)
summary(Carseats)
str(Carseats)
nrow(Carseats)
#generate a model
library(rpart)
model = rpart(US~.,data = Carseats,method = "class",minsplit = 1)
summary(model)
#2 Bos... | /TreeAssingment.R | no_license | vigneshwart1191/RProjects | R | false | false | 555 | r | #1 Car seats problem
library(ISLR)
attach(Carseats)
View(Carseats)
#explore the data
anyNA(Carseats) #no NA
boxplot(Carseats)
summary(Carseats)
str(Carseats)
nrow(Carseats)
#generate a model
library(rpart)
model = rpart(US~.,data = Carseats,method = "class",minsplit = 1)
summary(model)
#2 Bos... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{iqr}
\alias{iqr}
\title{Interquartile range}
\usage{
iqr(x)
}
\arguments{
\item{x}{vector}
}
\value{
numeric vector of length 2, with the 25th and 75th quantiles of input vector x.
}
\description{
Calculate interquartile range
}... | /base/utils/man/iqr.Rd | permissive | ashiklom/pecan | R | false | true | 421 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{iqr}
\alias{iqr}
\title{Interquartile range}
\usage{
iqr(x)
}
\arguments{
\item{x}{vector}
}
\value{
numeric vector of length 2, with the 25th and 75th quantiles of input vector x.
}
\description{
Calculate interquartile range
}... |
library(igraph)
library(ggnetwork)
library(GGally)
library(network)
library(sna)
library(ggplot2)
library(statnet)
library(ergm)
# --------------------------------------------------------------------------------------------
# Importing data
drug_data = read.csv("DRUGNET.csv",header=TRUE,row.names=1,check.... | /Drug_analysis.R | no_license | ajaskulkarni/Analysis-of-Drugnet-to-reduce-drug-spread-and-understand-local-structures-in-the-network | R | false | false | 17,424 | r | library(igraph)
library(ggnetwork)
library(GGally)
library(network)
library(sna)
library(ggplot2)
library(statnet)
library(ergm)
# --------------------------------------------------------------------------------------------
# Importing data
drug_data = read.csv("DRUGNET.csv",header=TRUE,row.names=1,check.... |
LoadSKUsWeight <- function(SKUsPath) {
suppressMessages({
require(readr)
require(dplyr)
require(tools)
require(magrittr)
require(methods)
require(futile.logger)
})
functionName <- "LoadSKUsWeight"
flog.info(paste("Function", functionName, "started"), name = reportName)
output <- ... | /02_Codes/01_Load/Load_SKUs_Weight_Data.R | no_license | datnq80/TH_Invoice_Checking | R | false | false | 4,188 | r | LoadSKUsWeight <- function(SKUsPath) {
suppressMessages({
require(readr)
require(dplyr)
require(tools)
require(magrittr)
require(methods)
require(futile.logger)
})
functionName <- "LoadSKUsWeight"
flog.info(paste("Function", functionName, "started"), name = reportName)
output <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LogLik.R
\name{SurvLogLik}
\alias{SurvLogLik}
\title{Log Likelihood}
\usage{
SurvLogLik(
data,
dist,
theta,
log_scale = FALSE,
status_name = "status",
time_name = "time"
)
}
\arguments{
\item{data}{Data.frame}
\item{dist}{Distrib... | /man/survLogLik.Rd | no_license | zrmacc/Temporal | R | false | true | 1,683 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LogLik.R
\name{SurvLogLik}
\alias{SurvLogLik}
\title{Log Likelihood}
\usage{
SurvLogLik(
data,
dist,
theta,
log_scale = FALSE,
status_name = "status",
time_name = "time"
)
}
\arguments{
\item{data}{Data.frame}
\item{dist}{Distrib... |
#' @title fun_name
#'
#' @description kolejna funkcja podmieniona
#'
#' @param param fun_name
#'
#'
#'
#' @export
file.mode<- function(params){
rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina",
"Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka",
... | /R/file.mode.R | no_license | granatb/RapeR | R | false | false | 673 | r |
#' @title fun_name
#'
#' @description kolejna funkcja podmieniona
#'
#' @param param fun_name
#'
#'
#'
#' @export
file.mode<- function(params){
rap <- c("Czesc czesc tu Sebol nawija, Mordo nie ma gandy a ja wbijam klina",
"Tutaj start, mega bujanka. Zaczynamy tutaj strefe jaranka",
... |
library(tidyverse)
library(here)
library(SingleCellExperiment)
xin <- readRDS("data/2018-04-15_pancreas_xin/xin.rds")
output <- "results/2018-04-15_xin_processing"
expData <- normcounts(xin)
metadata <- colData(xin)
rm(xin)
if(!all(rownames(metadata) == colnames(expData))){
stop("Cell ids do not match in metadat... | /bin/xin_processing.R | no_license | powellgenomicslab/SingleCell_Prediction | R | false | false | 3,849 | r | library(tidyverse)
library(here)
library(SingleCellExperiment)
xin <- readRDS("data/2018-04-15_pancreas_xin/xin.rds")
output <- "results/2018-04-15_xin_processing"
expData <- normcounts(xin)
metadata <- colData(xin)
rm(xin)
if(!all(rownames(metadata) == colnames(expData))){
stop("Cell ids do not match in metadat... |
# Cognitive analysis
# David N Borg
# June 2021
# Libraries
library(dplyr)
library(janitor)
library(ggplot2)
library(naniar)
library(visdat)
library(tidyverse)
library(bayesplot)
library(brms)
library(modelr)
library(mice)
library(conflicted)
# Conflicts
conflict_prefer("filter","dplyr")
conflict_prefer("filter","s... | /15-other-variables-incongruent-model.R | no_license | SciBorgo/cognitive-heat-stress | R | false | false | 6,043 | r |
# Cognitive analysis
# David N Borg
# June 2021
# Libraries
library(dplyr)
library(janitor)
library(ggplot2)
library(naniar)
library(visdat)
library(tidyverse)
library(bayesplot)
library(brms)
library(modelr)
library(mice)
library(conflicted)
# Conflicts
conflict_prefer("filter","dplyr")
conflict_prefer("filter","s... |
#' Example free recall data.
#'
#' A dataset containing example free recall data from an experiment in the
#' Farrell lab.
#'
#' @format A data frame with 15166 rows and 6 variables:
#' \describe{
#' \item{ID}{Participant ID}
#' \item{trial}{An identified for each trial. trial_id's do not correspond between partici... | /R/data.R | no_license | mark-hurlstone/farrellMem | R | false | false | 809 | r | #' Example free recall data.
#'
#' A dataset containing example free recall data from an experiment in the
#' Farrell lab.
#'
#' @format A data frame with 15166 rows and 6 variables:
#' \describe{
#' \item{ID}{Participant ID}
#' \item{trial}{An identified for each trial. trial_id's do not correspond between partici... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/symmetrize.R
\name{symmetrize}
\alias{symmetrize}
\title{Symmetrize a Matrix}
\usage{
symmetrize(M, update.upper = TRUE)
}
\arguments{
\item{M}{a matrix.}
\item{update.upper}{[logical] should the upper extra diagonal terms be updated using t... | /fuzzedpackages/lavaSearch2/man/symmetrize.Rd | no_license | akhikolla/testpackages | R | false | true | 706 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/symmetrize.R
\name{symmetrize}
\alias{symmetrize}
\title{Symmetrize a Matrix}
\usage{
symmetrize(M, update.upper = TRUE)
}
\arguments{
\item{M}{a matrix.}
\item{update.upper}{[logical] should the upper extra diagonal terms be updated using t... |
# Coral recruitment model partial regression plot
require(tidyverse)
require(patchwork)
require(lme4)
source('https://gist.github.com/cherfychow/e9ae890fd16f4c86730748c067feee2b/raw/c9caceef463062c75c71b42607954f7958818ff7/cherulean.R')
set.seed(24)
ci.pred <- function(.) predict(., newx, type='response', re.form=NA... | /figure_code/F05_recruitment.R | permissive | cherfychow/FishTraitsCoralRec | R | false | false | 2,614 | r |
# Coral recruitment model partial regression plot
require(tidyverse)
require(patchwork)
require(lme4)
source('https://gist.github.com/cherfychow/e9ae890fd16f4c86730748c067feee2b/raw/c9caceef463062c75c71b42607954f7958818ff7/cherulean.R')
set.seed(24)
ci.pred <- function(.) predict(., newx, type='response', re.form=NA... |
## packages
library(MASS)
library(RColorBrewer)
library(Hmisc)
library(pid)
library(akima)
library(zoo)
library(sqldf)
FileName <-"NewBEOut10WO0.csv"
jpeg("CUEQ_MetricTons1.jpg", width = 1000, height = 800,quality = 100)
## uploading data
MyData <- read.csv(file=FileName, header=TRUE, sep=",")
## transform data ... | /MapWizardi/Tools/scripts/RAEF/Package/AuxFiles/RScripts/PlotCUEQ_old2.R | permissive | Joonasha/MapWizard | R | false | false | 6,956 | r |
## packages
library(MASS)
library(RColorBrewer)
library(Hmisc)
library(pid)
library(akima)
library(zoo)
library(sqldf)
FileName <-"NewBEOut10WO0.csv"
jpeg("CUEQ_MetricTons1.jpg", width = 1000, height = 800,quality = 100)
## uploading data
MyData <- read.csv(file=FileName, header=TRUE, sep=",")
## transform data ... |
model {
for(i in 1:n){
f[i] ~ dpois(lambda[i])
lambda[i] <- exp(alpha1*log(hist[i]+1)+alpha2*log(o[i])+alpha3*log(d[i])+beta)
}
alpha1 ~ dunif(0,10)
alpha2 ~ dunif(-10,10)
alpha3 ~ dunif(-10,10)
beta ~ dunif(-100,100)
} | /model4.bug.R | no_license | jazose/flows | R | false | false | 239 | r | model {
for(i in 1:n){
f[i] ~ dpois(lambda[i])
lambda[i] <- exp(alpha1*log(hist[i]+1)+alpha2*log(o[i])+alpha3*log(d[i])+beta)
}
alpha1 ~ dunif(0,10)
alpha2 ~ dunif(-10,10)
alpha3 ~ dunif(-10,10)
beta ~ dunif(-100,100)
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.