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 |
|---|---|---|---|---|---|---|---|---|---|
# Objective: given a list of platekeys, we want to take the repeat-sizes for genes
date ()
Sys.info ()[c("nodename", "user")]
commandArgs ()
rm (list = ls ())
R.version.string ## "R version 3.3.2 (2016-10-31)"
# libraries
library(dplyr); packageDescription ("dplyr", fields = "Version") #"0.8.5"
library(tidyverse); pac... | /operations_across_genes/retrieving_EH_sizes_for_genomes.R | no_license | kibanez/analysing_STRs | R | false | false | 4,504 | r | # Objective: given a list of platekeys, we want to take the repeat-sizes for genes
date ()
Sys.info ()[c("nodename", "user")]
commandArgs ()
rm (list = ls ())
R.version.string ## "R version 3.3.2 (2016-10-31)"
# libraries
library(dplyr); packageDescription ("dplyr", fields = "Version") #"0.8.5"
library(tidyverse); pac... |
#' smartR GUI
#'
#' The \code{smartRgui} function implements the main graphical user interface
#' of smartR. Please, contact the package maintainer for detailed instructions.
#'
#' @param smartRstudy SmartProject class
#'
#' @return This function does not return a value.
#'
#' @examples
#' \dontrun{
#' yourSmartRstudy... | /R/smart_gui.R | no_license | d-lorenz/smartR | R | false | false | 188,324 | r |
#' smartR GUI
#'
#' The \code{smartRgui} function implements the main graphical user interface
#' of smartR. Please, contact the package maintainer for detailed instructions.
#'
#' @param smartRstudy SmartProject class
#'
#' @return This function does not return a value.
#'
#' @examples
#' \dontrun{
#' yourSmartRstudy... |
library(RSurveillance)
### Name: binom.jeffreys
### Title: Jeffreys confidence limits
### Aliases: binom.jeffreys
### Keywords: methods
### ** Examples
# test binom.jeffreys
binom.jeffreys(25, 200)
binom.jeffreys(seq(10, 100, 10), 200)
binom.jeffreys(50, seq(100, 1000, 100))
| /data/genthat_extracted_code/RSurveillance/examples/binom.jeffreys.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 283 | r | library(RSurveillance)
### Name: binom.jeffreys
### Title: Jeffreys confidence limits
### Aliases: binom.jeffreys
### Keywords: methods
### ** Examples
# test binom.jeffreys
binom.jeffreys(25, 200)
binom.jeffreys(seq(10, 100, 10), 200)
binom.jeffreys(50, seq(100, 1000, 100))
|
#' @importFrom stringi stri_split_lines stri_split_regex
split_pdf <- function(x, pattern = "\\p{WHITE_SPACE}{3,}") {
x_lines <- stringi::stri_split_lines(x)
x_lines <- lapply(x_lines, gsub,
pattern = "^\\s{1,20}",
replacement = "")
x_page <- lapply(x_lines, strin... | /R/split_pdf.r | no_license | jixing475/pdfsearch | R | false | false | 1,538 | r | #' @importFrom stringi stri_split_lines stri_split_regex
split_pdf <- function(x, pattern = "\\p{WHITE_SPACE}{3,}") {
x_lines <- stringi::stri_split_lines(x)
x_lines <- lapply(x_lines, gsub,
pattern = "^\\s{1,20}",
replacement = "")
x_page <- lapply(x_lines, strin... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ee_module.R
\docType{data}
\name{ee}
\alias{ee}
\title{Main Earth Engine module}
\format{
Earth Engine module
}
\usage{
ee
}
\description{
Interface to main Earth Engine module. Provides access to the top level
classes and functions as well a... | /man/ee.Rd | permissive | r-spatial/rgee | R | false | true | 583 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ee_module.R
\docType{data}
\name{ee}
\alias{ee}
\title{Main Earth Engine module}
\format{
Earth Engine module
}
\usage{
ee
}
\description{
Interface to main Earth Engine module. Provides access to the top level
classes and functions as well a... |
# Timepoint and Sample Size Conditions: T = 10; N = 500 ------------------------------------------------
# Libraries
library(plm)
library (lavaan)
library(lcsm)
# Data Generating Process ------------------------------------------------
# y_{it} = b_i + a*y{it-1} + e_it
makedata = function(N, T, a = .75){
count = ... | /NST10N500.R | no_license | ajvsom/LCS_TAR | R | false | false | 51,021 | r | # Timepoint and Sample Size Conditions: T = 10; N = 500 ------------------------------------------------
# Libraries
library(plm)
library (lavaan)
library(lcsm)
# Data Generating Process ------------------------------------------------
# y_{it} = b_i + a*y{it-1} + e_it
makedata = function(N, T, a = .75){
count = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{MyCalPlot}
\alias{MyCalPlot}
\title{MyCalPlot function
my hack of validate.plot.default in rms for my 2 panel plots to match with val.prob}
\usage{
MyCalPlot(p, y, logit, group, weights = rep(1, length(y)),
normwt = FALSE,... | /man/MyCalPlot.Rd | no_license | Josh-Myers/MyersMisc | R | false | true | 888 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{MyCalPlot}
\alias{MyCalPlot}
\title{MyCalPlot function
my hack of validate.plot.default in rms for my 2 panel plots to match with val.prob}
\usage{
MyCalPlot(p, y, logit, group, weights = rep(1, length(y)),
normwt = FALSE,... |
tbl = read.table("/Users/carlchapman/git/regex_readability_study/readability_analysis/M3R0V0_OCTRNG_M3R0V1_CCC_M3R0V2_HEXRNG.tsv",TRUE,"\t")
results = kruskal.test(value ~ code, data=tbl)
capture.output(results,file="/Users/carlchapman/git/regex_readability_study/readability_analysis/example_kruskal_output.txt")
| /readability_analysis/example_kruskal.r | no_license | softwarekitty/regex_readability_study | R | false | false | 314 | r | tbl = read.table("/Users/carlchapman/git/regex_readability_study/readability_analysis/M3R0V0_OCTRNG_M3R0V1_CCC_M3R0V2_HEXRNG.tsv",TRUE,"\t")
results = kruskal.test(value ~ code, data=tbl)
capture.output(results,file="/Users/carlchapman/git/regex_readability_study/readability_analysis/example_kruskal_output.txt")
|
MonoisotopicMass <- function(formula = list(), isotopes = list(), charge = 0) {
defaultFormula <- list(C = 0, H = 0, N = 0, O = 0, S = 0, P = 0, Br = 0, Cl = 0, F = 0, Si = 0, x = 0)
defaultFormula[names(formula)] <- formula # replace default values with argument values
defaultIsotopes <- l... | /R/MonoisotopicMass.R | no_license | cran/OrgMassSpecR | R | false | false | 1,697 | r | MonoisotopicMass <- function(formula = list(), isotopes = list(), charge = 0) {
defaultFormula <- list(C = 0, H = 0, N = 0, O = 0, S = 0, P = 0, Br = 0, Cl = 0, F = 0, Si = 0, x = 0)
defaultFormula[names(formula)] <- formula # replace default values with argument values
defaultIsotopes <- l... |
# Correct level data from NHC sites and
# calculate average depth as best as we can for now
# this process is idosincratic for each site and will be based
# on times that the sensor was moved or when there is bad data.
library(tidyverse)
library(xts)
library(dygraphs)
library(lubridate)
library(zoo)
setwd('C:/Users... | /src/download_format_data/correct_level_data_calc_depth.R | no_license | amcarter/NHC_2019_metabolism | R | false | false | 23,794 | r | # Correct level data from NHC sites and
# calculate average depth as best as we can for now
# this process is idosincratic for each site and will be based
# on times that the sensor was moved or when there is bad data.
library(tidyverse)
library(xts)
library(dygraphs)
library(lubridate)
library(zoo)
setwd('C:/Users... |
#!/usr/bin/env Rscript
stopifnot(file.exists("DESCRIPTION"))
input <- readLines("vignettes/orderly.Rmd")
readme <- readLines("README.md.in")
str_from <- "<!-- introduction begin -->"
str_to <- "<!-- introduction end -->"
str_replace <- "<!-- introduction -->"
stopifnot(str_from %in% input,
str_to %in% input... | /scripts/build_readme | permissive | vimc/orderly | R | false | false | 687 | #!/usr/bin/env Rscript
stopifnot(file.exists("DESCRIPTION"))
input <- readLines("vignettes/orderly.Rmd")
readme <- readLines("README.md.in")
str_from <- "<!-- introduction begin -->"
str_to <- "<!-- introduction end -->"
str_replace <- "<!-- introduction -->"
stopifnot(str_from %in% input,
str_to %in% input... | |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/heat_tree--internal.R
\name{look_for_na}
\alias{look_for_na}
\title{Look for NAs in parameters}
\usage{
look_for_na(taxon_ids, args)
}
\arguments{
\item{args}{(\code{character}) The names of arguments to verify.}
}
\description{
Look for NAs ... | /man/look_for_na.Rd | permissive | grunwaldlab/metacoder | R | false | true | 355 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/heat_tree--internal.R
\name{look_for_na}
\alias{look_for_na}
\title{Look for NAs in parameters}
\usage{
look_for_na(taxon_ids, args)
}
\arguments{
\item{args}{(\code{character}) The names of arguments to verify.}
}
\description{
Look for NAs ... |
# Fill in a kernel function
# Could be Gaussian, square, cosine
SquareKernel <- function(x, h) {
# A kernel function for use in nonparametric estimation.
# Args:
# x: The point to evaluate the kernel
# h: The bandwidth of the kernel.
# Returns:
# The value of a kernel with bandwidth h evaluated at x.
... | /week4/lab_week4/R/kernel_density_solution.R | no_license | jpdunc23/stat-215a-fall-2020 | R | false | false | 2,012 | r |
# Fill in a kernel function
# Could be Gaussian, square, cosine
SquareKernel <- function(x, h) {
# A kernel function for use in nonparametric estimation.
# Args:
# x: The point to evaluate the kernel
# h: The bandwidth of the kernel.
# Returns:
# The value of a kernel with bandwidth h evaluated at x.
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/base_segvis_block_list.R
\docType{methods}
\name{plot_profiles}
\alias{plot_profiles}
\title{Plots the coverage profiles for the segvis_block_list}
\usage{
plot_profiles(object, condition, coord = NULL, mc, FUN, ...)
}
\arguments{
\item{objec... | /man/plot_profiles.Rd | no_license | duydnguyen/tan-coverage | R | false | true | 1,233 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/base_segvis_block_list.R
\docType{methods}
\name{plot_profiles}
\alias{plot_profiles}
\title{Plots the coverage profiles for the segvis_block_list}
\usage{
plot_profiles(object, condition, coord = NULL, mc, FUN, ...)
}
\arguments{
\item{objec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCutoff.R
\name{getCutoff}
\alias{getCutoff}
\title{Get a intersection point from two densities}
\usage{
getCutoff(mclust.object, density1, density2, interval)
}
\arguments{
\item{mclust.object}{Object obtained from Mclust().}
\item{densit... | /man/getCutoff.Rd | no_license | calebae/Bowser | R | false | true | 644 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCutoff.R
\name{getCutoff}
\alias{getCutoff}
\title{Get a intersection point from two densities}
\usage{
getCutoff(mclust.object, density1, density2, interval)
}
\arguments{
\item{mclust.object}{Object obtained from Mclust().}
\item{densit... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eks_service.R
\name{eks}
\alias{eks}
\title{Amazon Elastic Kubernetes Service}
\usage{
eks(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\description{
Amazon Elastic Kubernetes... | /paws/man/eks.Rd | permissive | johnnytommy/paws | R | false | true | 4,593 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eks_service.R
\name{eks}
\alias{eks}
\title{Amazon Elastic Kubernetes Service}
\usage{
eks(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\description{
Amazon Elastic Kubernetes... |
# @file 1DCNN.R
#
# Copyright 2021 Observational Health Data Sciences and Informatics
#
# This file is part of EcgPsEvaluation
#
# 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://w... | /R/1DCNN.R | permissive | ABMI/EcgPsEvaluation | R | false | false | 1,938 | r | # @file 1DCNN.R
#
# Copyright 2021 Observational Health Data Sciences and Informatics
#
# This file is part of EcgPsEvaluation
#
# 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://w... |
## Sum of powered score (SPU) test (perm, version 2, matrix used in permutation)
##
## It gives the p-values of the SPU test and aSPU test based on based on the permutation of residuals. (This is version 2, matrix version is faster but if it doesn't work, we should use version 1, vector version)
##
## @param Y phenoty... | /aSPU/R/aSPUperm2.R | no_license | ingted/R-Examples | R | false | false | 3,534 | r | ## Sum of powered score (SPU) test (perm, version 2, matrix used in permutation)
##
## It gives the p-values of the SPU test and aSPU test based on based on the permutation of residuals. (This is version 2, matrix version is faster but if it doesn't work, we should use version 1, vector version)
##
## @param Y phenoty... |
#' Run a likelihood profile in Stock Synthesis.
#'
#' Iteratively changes the control file using SS_changepars.
#'
#'
#' @param dir Directory where input files and executable are located.
#' @param masterctlfile Source control file. Default = "control.ss_new"
#' @param newctlfile Destination for new control file... | /R/SS_profile.R | no_license | cran/r4ss | R | false | false | 19,227 | r | #' Run a likelihood profile in Stock Synthesis.
#'
#' Iteratively changes the control file using SS_changepars.
#'
#'
#' @param dir Directory where input files and executable are located.
#' @param masterctlfile Source control file. Default = "control.ss_new"
#' @param newctlfile Destination for new control file... |
library(rjson)
library(lubridate)
library(maptools)
library(rgdal)
library(sp)
library(spgwr)
crimeBlock <- function(crime) {
blocks <- readOGR("/home/fgregg/academic/boundaries/Census Blocks.shp",
"Census Blocks")
blocks <- spTransform(blocks, CRS("+proj=utm +zone=16 +datum=NAD83"))
attr(blo... | /code/experiments/crime.R | no_license | fgregg/neighborhoods | R | false | false | 5,799 | r | library(rjson)
library(lubridate)
library(maptools)
library(rgdal)
library(sp)
library(spgwr)
crimeBlock <- function(crime) {
blocks <- readOGR("/home/fgregg/academic/boundaries/Census Blocks.shp",
"Census Blocks")
blocks <- spTransform(blocks, CRS("+proj=utm +zone=16 +datum=NAD83"))
attr(blo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iot_operations.R
\name{iot_list_attached_policies}
\alias{iot_list_attached_policies}
\title{Lists the policies attached to the specified thing group}
\usage{
iot_list_attached_policies(target, recursive, marker, pageSize)
}
\arguments{
\item... | /paws/man/iot_list_attached_policies.Rd | permissive | sanchezvivi/paws | R | false | true | 1,099 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iot_operations.R
\name{iot_list_attached_policies}
\alias{iot_list_attached_policies}
\title{Lists the policies attached to the specified thing group}
\usage{
iot_list_attached_policies(target, recursive, marker, pageSize)
}
\arguments{
\item... |
\name{Rclean-package}
\alias{Rclean-package}
\alias{Rclean}
\docType{package}
\title{
RClean, An Interactive Data Cleaning Tool Provides Users The Dynamic Ability To Import And Clean Data
}
\description{
This package attempts to replicate data cleaning functionality from Excel in R
}
\details{
Utilizing R to impo... | /man/Rclean-package.Rd | no_license | nuhorchak/RClean | R | false | false | 1,268 | rd | \name{Rclean-package}
\alias{Rclean-package}
\alias{Rclean}
\docType{package}
\title{
RClean, An Interactive Data Cleaning Tool Provides Users The Dynamic Ability To Import And Clean Data
}
\description{
This package attempts to replicate data cleaning functionality from Excel in R
}
\details{
Utilizing R to impo... |
library(RCurl)
library(RJSONIO)
library(XML)
library(parallel)
load("hoteles(25.1.16).RData")
resumen=matrix(NA,nrow=400,nco=8)
colnames(resumen)=c("Prov","Prov_id","UniqID","Serv-html","RServ","HServ","desc","fotos")
lapply(1:400,function(i){
cat(i,"\n")
temp=getURL(paste("http://localhost:5000/es/raw/content/"... | /Base de datos/Version1.R | no_license | Xmael/R | R | false | false | 1,251 | r | library(RCurl)
library(RJSONIO)
library(XML)
library(parallel)
load("hoteles(25.1.16).RData")
resumen=matrix(NA,nrow=400,nco=8)
colnames(resumen)=c("Prov","Prov_id","UniqID","Serv-html","RServ","HServ","desc","fotos")
lapply(1:400,function(i){
cat(i,"\n")
temp=getURL(paste("http://localhost:5000/es/raw/content/"... |
testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = 0L, item_score = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /dexterMST/inst/testfiles/mutate_booklet_score/libFuzzer_mutate_booklet_score/mutate_booklet_score_valgrind_files/1612726825-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 600 | r | testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = 0L, item_score = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
#' Internally sort each element of a GenomicRangesList
#'
#' @param x
#' GRangesList object
#' @param ...
#' Comma separated list of unquoted variable names to sort by. Variables are
#' names of metadata columns found in GRangesList object. Use desc() to sort a
#' variable in descending order. Input can be `exonorder`... | /R/eachfunctions.R | permissive | fursham-h/factR | R | false | false | 3,280 | r | #' Internally sort each element of a GenomicRangesList
#'
#' @param x
#' GRangesList object
#' @param ...
#' Comma separated list of unquoted variable names to sort by. Variables are
#' names of metadata columns found in GRangesList object. Use desc() to sort a
#' variable in descending order. Input can be `exonorder`... |
Weekly_Means<-Weekly_Means[-1]
#rm(wk_dataPM10)
wk_dataPM10<- Weekly_Means[-7]
normalize <- function(x) {
return((x - min(x)) / (max(x) - min(x)))
}
wk_dataPM10_norm <- as.data.frame(lapply(wk_dataPM10, normalize))
wk_dataPM10_test <- wk_dataPM10_norm[214:265, ]
wk_model_results_3 <- compute(model_3, wk... | /Cams-2_PM10_NeuralNet/extended_script_for_weekly_plot.R | no_license | ishmamshahid/PM_predict_with_FF_ANN | R | false | false | 4,345 | r | Weekly_Means<-Weekly_Means[-1]
#rm(wk_dataPM10)
wk_dataPM10<- Weekly_Means[-7]
normalize <- function(x) {
return((x - min(x)) / (max(x) - min(x)))
}
wk_dataPM10_norm <- as.data.frame(lapply(wk_dataPM10, normalize))
wk_dataPM10_test <- wk_dataPM10_norm[214:265, ]
wk_model_results_3 <- compute(model_3, wk... |
# nocov start
.onLoad = function(...) {
has_ggplot2_3.0 =
requireNamespace("ggplot2", quietly = TRUE) &&
utils::packageVersion("ggplot2") >= "3.0.0"
if (has_ggplot2_3.0)
s3_register("ggplot2::autoplot", "sfnetwork")
has_spatstat =
requireNamespace("spatstat.linnet", quietly = TRUE) &&
requir... | /R/zzz.R | permissive | luukvdmeer/sfnetworks | R | false | false | 2,819 | r | # nocov start
.onLoad = function(...) {
has_ggplot2_3.0 =
requireNamespace("ggplot2", quietly = TRUE) &&
utils::packageVersion("ggplot2") >= "3.0.0"
if (has_ggplot2_3.0)
s3_register("ggplot2::autoplot", "sfnetwork")
has_spatstat =
requireNamespace("spatstat.linnet", quietly = TRUE) &&
requir... |
library(reshape2)
library(ggplot2)
library(lubridate)
library(plyr)
#Set directory
setwd('C:/Users/carly/Google Drive/University of Utah - Research/Research Assistant/SnowpackDynamics (iUTAH and NASA projects)/ModelResults/Shifted/SupplySources')
#List files in folder
filelist=list.files(path=".",pattern="*.csv")
numfi... | /SupplySourcesByScenarioShifted.R | no_license | cahhansen/Snowbedo | R | false | false | 1,421 | r | library(reshape2)
library(ggplot2)
library(lubridate)
library(plyr)
#Set directory
setwd('C:/Users/carly/Google Drive/University of Utah - Research/Research Assistant/SnowpackDynamics (iUTAH and NASA projects)/ModelResults/Shifted/SupplySources')
#List files in folder
filelist=list.files(path=".",pattern="*.csv")
numfi... |
#' Boxplots of covariates for rejections unique to methods subsets
#'
#' @param object A SummarizedBenchmark object
#' @param alpha An alpha value.
#' @param nsets Number of method sets to plot. Method sets are ordered decreasingly according
#' to the number of rejections specific to the sets of methods.
#' @param ... | /datasets/R/plotCovariateBoxplots.R | permissive | pkimes/benchmark-fdr | R | false | false | 2,265 | r | #' Boxplots of covariates for rejections unique to methods subsets
#'
#' @param object A SummarizedBenchmark object
#' @param alpha An alpha value.
#' @param nsets Number of method sets to plot. Method sets are ordered decreasingly according
#' to the number of rejections specific to the sets of methods.
#' @param ... |
#' PCoA on Long Data
#'
#' This function is a wrapper around Vegan's capscale function for performing PCoA on tidy (long) data.
#' @param samples The column header for your sample identifiers. Defaults to SampleID
#' @param otus The column header for your OTU identifiers. Defaults to variable
#' @param value The column... | /R/tidy_pcoa.R | permissive | bulksoil/tidyMB | R | false | false | 1,415 | r | #' PCoA on Long Data
#'
#' This function is a wrapper around Vegan's capscale function for performing PCoA on tidy (long) data.
#' @param samples The column header for your sample identifiers. Defaults to SampleID
#' @param otus The column header for your OTU identifiers. Defaults to variable
#' @param value The column... |
# Create a Sample Corpus for Model
## Create a Training Sample and Test set
ctwitter <- file.path("~", "Data Science Coursera", "capstone-JHU-swiftkey",
"data", "final", "en_US", "en_US.twitter.txt")
cblogs <- file.path("~", "Data Science Coursera", "capstone-JHU-swiftkey",
... | /code/sample_corpus.R | no_license | keithgw/JHU-DSS-capstone | R | false | false | 1,465 | r | # Create a Sample Corpus for Model
## Create a Training Sample and Test set
ctwitter <- file.path("~", "Data Science Coursera", "capstone-JHU-swiftkey",
"data", "final", "en_US", "en_US.twitter.txt")
cblogs <- file.path("~", "Data Science Coursera", "capstone-JHU-swiftkey",
... |
# load ICAClusters.RData
# comparison with PCA results
library(pcaMethods)
library(gplots)
library(RColorBrewer)
library(reshape2)
library(ggplot2)
library(stringr)
library(cowplot)
ica_rdata = "Results/phospho/ICA/ICA_phospho_ICA.Rdata"
clinical_data = "Data/phospho/phospho_clinical.csv"
exp_prefix = "ICA_phospho"
fe... | /Scripts/Figures/ica_pca_comparison.R | permissive | rhong3/Segundo_Melanoma | R | false | false | 5,660 | r | # load ICAClusters.RData
# comparison with PCA results
library(pcaMethods)
library(gplots)
library(RColorBrewer)
library(reshape2)
library(ggplot2)
library(stringr)
library(cowplot)
ica_rdata = "Results/phospho/ICA/ICA_phospho_ICA.Rdata"
clinical_data = "Data/phospho/phospho_clinical.csv"
exp_prefix = "ICA_phospho"
fe... |
library(phyloseq)
library(dplyr)
library(ape)
library(ggplot2)
library(RColorBrewer)
library(ggtext)
meta = read.table("sample-metadata-pueria.tsv", header=TRUE,row.names = 1, sep="\t")
OTU = read.table("ASV-table-306.txt", header=TRUE, sep="\t")
tax = read.table("tree_tax.tsv", header=TRUE, sep="\t")
meta$compartment ... | /R.code/Relative_abundance_samples_markdown.R | no_license | yaqinguo/AMF-communities-of-the-pioneer-plant-Pueraria-phaseoloides | R | false | false | 4,254 | r | library(phyloseq)
library(dplyr)
library(ape)
library(ggplot2)
library(RColorBrewer)
library(ggtext)
meta = read.table("sample-metadata-pueria.tsv", header=TRUE,row.names = 1, sep="\t")
OTU = read.table("ASV-table-306.txt", header=TRUE, sep="\t")
tax = read.table("tree_tax.tsv", header=TRUE, sep="\t")
meta$compartment ... |
#' This function returns the (minus) logLikelihood
#'
#' This function returns the minus logarithm of the likelihood to
#' minimize.
# P : Transition matrix P(will go to i | is in j)
# E : Event observation matrix P(detection event j | is in i)
# e: Sequence of observation events. Since we are taking
# time increase sm... | /MobileNetworkDataSimulationTemplate/code/src/destim/R/logLik.R | no_license | Lorencrack3/TFG-Lorenzo | R | false | false | 1,312 | r | #' This function returns the (minus) logLikelihood
#'
#' This function returns the minus logarithm of the likelihood to
#' minimize.
# P : Transition matrix P(will go to i | is in j)
# E : Event observation matrix P(detection event j | is in i)
# e: Sequence of observation events. Since we are taking
# time increase sm... |
library(evd)
### Name: tcplot
### Title: Threshold Choice Plot
### Aliases: tcplot
### Keywords: hplot
### ** Examples
tlim <- c(3.6, 4.2)
## Not run: tcplot(portpirie, tlim)
## Not run: tcplot(portpirie, tlim, nt = 100, lwd = 3, type = "l")
## Not run: tcplot(portpirie, tlim, model = "pp")
| /data/genthat_extracted_code/evd/examples/tcplot.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 299 | r | library(evd)
### Name: tcplot
### Title: Threshold Choice Plot
### Aliases: tcplot
### Keywords: hplot
### ** Examples
tlim <- c(3.6, 4.2)
## Not run: tcplot(portpirie, tlim)
## Not run: tcplot(portpirie, tlim, nt = 100, lwd = 3, type = "l")
## Not run: tcplot(portpirie, tlim, model = "pp")
|
# This function samples k indices from 1:n starting with very dense sampling
# (every value) and then getting more and more sparse
#' Sampling for qq plots
#'
#' Returns k indices between 1:max.idx (x) such that -log(x/n) is uniformly
#' distributed. This is useful to reduce overplotting when plotting
#' log-transfor... | /R/qq_plot.r | permissive | tyjo/zoom.plot | R | false | false | 2,625 | r | # This function samples k indices from 1:n starting with very dense sampling
# (every value) and then getting more and more sparse
#' Sampling for qq plots
#'
#' Returns k indices between 1:max.idx (x) such that -log(x/n) is uniformly
#' distributed. This is useful to reduce overplotting when plotting
#' log-transfor... |
# Copyright 2014-2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | /tests/testthat/test-pre_post.R | permissive | Victor4web/abpackage | R | false | false | 4,857 | r | # Copyright 2014-2017 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
library(BSDA)
### Name: Skewed
### Title: Illustrates the Wilcoxon Rank Sum test
### Aliases: Skewed
### Keywords: datasets
### ** Examples
boxplot(Skewed$C1, Skewed$C2, col = c("pink", "lightblue"))
wilcox.test(Skewed$C1, Skewed$C2)
| /data/genthat_extracted_code/BSDA/examples/Skewed.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 243 | r | library(BSDA)
### Name: Skewed
### Title: Illustrates the Wilcoxon Rank Sum test
### Aliases: Skewed
### Keywords: datasets
### ** Examples
boxplot(Skewed$C1, Skewed$C2, col = c("pink", "lightblue"))
wilcox.test(Skewed$C1, Skewed$C2)
|
#get evs files
get.evs.raw<-function(filepath.annovar,filepath.evs.raw){
annovar<-read.table(filepath.annovar,sep="\t",header=TRUE, quote ="")
# evs.raw<-annovar %>%
# filter(!is.na(Afalt_1000g2015aug_eur)) %>%
# filter(TotalDepth>20) %>%
# mutate(geno0 = (1-Afalt_1000g2015aug_eur)^2 + 0.0000001)... | /code/2_methods/2_rare variants/2_rvTDT/functions.R | no_license | lindagai/8q24_project | R | false | false | 5,583 | r | #get evs files
get.evs.raw<-function(filepath.annovar,filepath.evs.raw){
annovar<-read.table(filepath.annovar,sep="\t",header=TRUE, quote ="")
# evs.raw<-annovar %>%
# filter(!is.na(Afalt_1000g2015aug_eur)) %>%
# filter(TotalDepth>20) %>%
# mutate(geno0 = (1-Afalt_1000g2015aug_eur)^2 + 0.0000001)... |
dat = list(
comp = read.csv("data/data_complete.csv")[,-1],
imp = read.csv("data/data_imputation.csv")[,-1],
comp_trim = read.csv("data/data_complete.csv")[,-1],
imp_trim = read.csv("data/data_imputation.csv")[,-1]
)
dat[[3]] = dat[[3]][which(dat[[3]]$date_num > 107),]
dat[[4]] = dat[[4]][which(dat[[... | /code/e_modelV1.4.R | no_license | GitTFJ/COVID19_parks_landscape | R | false | false | 37,569 | r | dat = list(
comp = read.csv("data/data_complete.csv")[,-1],
imp = read.csv("data/data_imputation.csv")[,-1],
comp_trim = read.csv("data/data_complete.csv")[,-1],
imp_trim = read.csv("data/data_imputation.csv")[,-1]
)
dat[[3]] = dat[[3]][which(dat[[3]]$date_num > 107),]
dat[[4]] = dat[[4]][which(dat[[... |
#-------------------------------------------------------------------------------
# sc2_mthds: Load list of sc2 method functions
#-------------------------------------------------------------------------------
#' @name SC2_Methods
#' @title List of level 2 single-concentration hit-call functions
#'
#' @description
#'... | /R/sc2_mthds.R | no_license | carolineshep/tcpl-toxcast-info | R | false | false | 3,096 | r | #-------------------------------------------------------------------------------
# sc2_mthds: Load list of sc2 method functions
#-------------------------------------------------------------------------------
#' @name SC2_Methods
#' @title List of level 2 single-concentration hit-call functions
#'
#' @description
#'... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/setup_test.R
\name{setup_ezspin_test}
\alias{setup_ezspin_test}
\alias{setup_ezknit_test}
\alias{setup_test}
\title{Set up a test directory to experiment with \code{ezspin} or \code{ezknit}}
\usage{
setup_ezspin_test()
setup_ezknit... | /man/setup_test.Rd | permissive | cran/ezknitr | R | false | true | 1,663 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/setup_test.R
\name{setup_ezspin_test}
\alias{setup_ezspin_test}
\alias{setup_ezknit_test}
\alias{setup_test}
\title{Set up a test directory to experiment with \code{ezspin} or \code{ezknit}}
\usage{
setup_ezspin_test()
setup_ezknit... |
### Global variables
clientID <- "add19e0d-2230-48b3-a615-63b0bcd91e4e"
clientSecret <- "siftzQ9tmJKB8VUwD2djLuhT4qCTVL6q"
br <- "https://rest0.bullhornstaffing.com/"
| /DataPull/BHCredentials.R | no_license | huytquoc/bullhorn | R | false | false | 167 | r | ### Global variables
clientID <- "add19e0d-2230-48b3-a615-63b0bcd91e4e"
clientSecret <- "siftzQ9tmJKB8VUwD2djLuhT4qCTVL6q"
br <- "https://rest0.bullhornstaffing.com/"
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulation-CLX.R
\name{Cai.theta.sigma}
\alias{Cai.theta.sigma}
\title{Estimation of cov(X) and its variance}
\usage{
Cai.theta.sigma(X)
}
\arguments{
\item{X}{n by p observation matrix, columns are features}
}
\value{
A list with the followi... | /man/Cai.theta.sigma.Rd | no_license | lingxuez/sLED | R | false | true | 646 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulation-CLX.R
\name{Cai.theta.sigma}
\alias{Cai.theta.sigma}
\title{Estimation of cov(X) and its variance}
\usage{
Cai.theta.sigma(X)
}
\arguments{
\item{X}{n by p observation matrix, columns are features}
}
\value{
A list with the followi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mc.matrix.R
\name{mc.matrix}
\alias{mc.matrix}
\alias{build.mc.matrix}
\alias{check.mc.matrix}
\title{Build and check misclassification matrices from empirical estimations}
\usage{
build.mc.matrix(mc.matrix, method = "series",
tuning = sqrt... | /man/mc.matrix.Rd | no_license | CLINDA-AAU/simex-1 | R | false | true | 3,052 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mc.matrix.R
\name{mc.matrix}
\alias{mc.matrix}
\alias{build.mc.matrix}
\alias{check.mc.matrix}
\title{Build and check misclassification matrices from empirical estimations}
\usage{
build.mc.matrix(mc.matrix, method = "series",
tuning = sqrt... |
library(igraph)
library(matrixStats)
# (a) Directed graph n PageRank Simulation with a damping parameter d = 0.15
n <- 1000
p <- 1/100
g <- erdos.renyi.game(n, p, type=c("gnp"), directed=TRUE)
d <- c(0.85, 0.15)
jump <- c(0, 1)
t <- 20
n_walkers <- 1000
sp <- matrix(0, nrow = t, ncol=n_walkers)
for (j in 1:n_walkers)... | /UCLA_EE232E/hw2/hw2_304397496/q4.R | no_license | nahida47/student_projects | R | false | false | 2,635 | r | library(igraph)
library(matrixStats)
# (a) Directed graph n PageRank Simulation with a damping parameter d = 0.15
n <- 1000
p <- 1/100
g <- erdos.renyi.game(n, p, type=c("gnp"), directed=TRUE)
d <- c(0.85, 0.15)
jump <- c(0, 1)
t <- 20
n_walkers <- 1000
sp <- matrix(0, nrow = t, ncol=n_walkers)
for (j in 1:n_walkers)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/luq_anole_doc.R
\docType{data}
\name{luq_anole}
\alias{luq_anole}
\title{Anole Mark and Resight Study}
\format{
An object of class \code{spec_tbl_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 543 rows and 16 columns.
}... | /man/luq_anole.Rd | permissive | liaaaaran/alohalr | R | false | true | 861 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/luq_anole_doc.R
\docType{data}
\name{luq_anole}
\alias{luq_anole}
\title{Anole Mark and Resight Study}
\format{
An object of class \code{spec_tbl_df} (inherits from \code{tbl_df}, \code{tbl}, \code{data.frame}) with 543 rows and 16 columns.
}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trajectories.R
\name{steep_cyc_traj}
\alias{steep_cyc_traj}
\title{Steep cyclical trajectory}
\usage{
steep_cyc_traj(t)
}
\arguments{
\item{t}{numeric vector of times at which to evaluate the trajectory
function.}
}
\value{
A vector containi... | /man/steep_cyc_traj.Rd | no_license | JuliaPalacios/phylodyn | R | false | true | 470 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/trajectories.R
\name{steep_cyc_traj}
\alias{steep_cyc_traj}
\title{Steep cyclical trajectory}
\usage{
steep_cyc_traj(t)
}
\arguments{
\item{t}{numeric vector of times at which to evaluate the trajectory
function.}
}
\value{
A vector containi... |
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... | /meteor/inst/testfiles/E_Penman/libFuzzer_E_Penman/E_Penman_valgrind_files/1612738462-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 398 | r | testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... |
#' Get species lists
#'
#' This scripts produces a list of the species that we will quiery gbif for occurence data.
#' \code{sl()} produces a species list and a dataframe with the same list pluss some more
#' @param df Logical. Whether to return a dataframe which also includes the species group in a second column. Def... | /R/spList.R | no_license | anders-kolstad/sdmShiny | R | false | false | 2,395 | r | #' Get species lists
#'
#' This scripts produces a list of the species that we will quiery gbif for occurence data.
#' \code{sl()} produces a species list and a dataframe with the same list pluss some more
#' @param df Logical. Whether to return a dataframe which also includes the species group in a second column. Def... |
#' @describeIn linters check that all commas do not have spaces before them.
#' @export
commas_before_linter <- function(source_file) {
re <- rex(list(one_or_more(" "), ",") %or% list(",", non_space))
res <- re_matches(source_file$lines, re, global = TRUE, locations = TRUE)
lapply(seq_along(res), function(id) ... | /R/commas_before_linter.R | no_license | rmsharp/lintr | R | false | false | 1,858 | r | #' @describeIn linters check that all commas do not have spaces before them.
#' @export
commas_before_linter <- function(source_file) {
re <- rex(list(one_or_more(" "), ",") %or% list(",", non_space))
res <- re_matches(source_file$lines, re, global = TRUE, locations = TRUE)
lapply(seq_along(res), function(id) ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{StandardEicTypeList}
\alias{StandardEicTypeList}
\title{StandardEicTypeList}
\format{
An object of class \code{data.table} (inherits from \code{data.frame}) with 7 rows and 3 columns.
}
\usage{
StandardEicTypeList
... | /man/StandardEicTypeList.Rd | no_license | krose/entsoeapi | R | false | true | 377 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{StandardEicTypeList}
\alias{StandardEicTypeList}
\title{StandardEicTypeList}
\format{
An object of class \code{data.table} (inherits from \code{data.frame}) with 7 rows and 3 columns.
}
\usage{
StandardEicTypeList
... |
" This function sets the working directory, reads in data, and
transforms certain columns to have numeric types. Returns the data.
"
loadData <- function(){
setwd("/datascience/projects/statisticallyfit/github/learningprogramming/R/RProgramming/coursera/assignments/assignment3")
outcomeData <- read.csv("dat... | /RCourse/assignments/assignment3/baseRWay/loaddata.R | no_license | statisticallyfit/R | R | false | false | 626 | r | " This function sets the working directory, reads in data, and
transforms certain columns to have numeric types. Returns the data.
"
loadData <- function(){
setwd("/datascience/projects/statisticallyfit/github/learningprogramming/R/RProgramming/coursera/assignments/assignment3")
outcomeData <- read.csv("dat... |
# Exploratory Data Analysis
# First week assingment
#######################
# Load libraries
library (data.table) #Fast and efficient big data sets tool
library (lattice)
# Load data set
ePower <- fread ("./household_power_consumption.txt", sep = ";", na.strings = "?")
# Format date and time
ePower [, Date := as.... | /plot4.R | no_license | juanmacarrillo/ExData_Plotting1 | R | false | false | 1,422 | r | # Exploratory Data Analysis
# First week assingment
#######################
# Load libraries
library (data.table) #Fast and efficient big data sets tool
library (lattice)
# Load data set
ePower <- fread ("./household_power_consumption.txt", sep = ";", na.strings = "?")
# Format date and time
ePower [, Date := as.... |
rm(list=ls())
library(tidyverse)
library(curl)
library(extrafont)
library(ggtext)
library(scales)
library(readxl)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_t... | /Heatmaps/COVIDVaxxAgeUKUSA.R | no_license | ma0511/COVID-20 | R | false | false | 17,330 | r | rm(list=ls())
library(tidyverse)
library(curl)
library(extrafont)
library(ggtext)
library(scales)
library(readxl)
theme_custom <- function() {
theme_classic() %+replace%
theme(plot.title.position="plot", plot.caption.position="plot",
strip.background=element_blank(), strip.text=element_t... |
#*******************************************************************************************************************
#************** NOTE: This code is slow because of bootstrapping. It takes >1 hr to run. *******
#************* Can remove Nboot and bootexpr arguments from felm() for qui... | /scripts/12_FigureED8.R | permissive | sheftneal/HBBB2018 | R | false | false | 25,206 | r | #*******************************************************************************************************************
#************** NOTE: This code is slow because of bootstrapping. It takes >1 hr to run. *******
#************* Can remove Nboot and bootexpr arguments from felm() for qui... |
source("generics.R")
require(logging)
basicConfig()
# helper function to mult.log.loss
row.log.loss <- function(row)
{
label <- row["Category"]
prob <- as.numeric(row[label])
return(log(prob))
}
# compute the multiclass log loss over a set of predictions
mult.log.loss <- function(pred, raw.data)
{
pred <- as... | /helpers.R | no_license | ytbaum/sf_crime | R | false | false | 10,006 | r | source("generics.R")
require(logging)
basicConfig()
# helper function to mult.log.loss
row.log.loss <- function(row)
{
label <- row["Category"]
prob <- as.numeric(row[label])
return(log(prob))
}
# compute the multiclass log loss over a set of predictions
mult.log.loss <- function(pred, raw.data)
{
pred <- as... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/low_quality_cells.R
\name{ScorePipelineCells}
\alias{ScorePipelineCells}
\title{Score cells with a KDE classifier.}
\usage{
ScorePipelineCells(pipeline.data, mitochondrion.genes = NULL,
mit.chromosome.name = NULL, tags.data = NULL, filter.m... | /dropestr/man/ScorePipelineCells.Rd | no_license | pdworzynski/dropEst | R | false | true | 704 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/low_quality_cells.R
\name{ScorePipelineCells}
\alias{ScorePipelineCells}
\title{Score cells with a KDE classifier.}
\usage{
ScorePipelineCells(pipeline.data, mitochondrion.genes = NULL,
mit.chromosome.name = NULL, tags.data = NULL, filter.m... |
#' Construct an im3d object representing 3D image data, densities etc
#'
#' \code{im3d} objects consist of a data array with attributes defining the
#' spatial positions at which the voxels are located. There should always be a
#' \code{BoundingBox} attribute which defines the physical extent of the volume
#' in th... | /R/im3d.R | no_license | zhihaozheng/nat | R | false | false | 47,949 | r | #' Construct an im3d object representing 3D image data, densities etc
#'
#' \code{im3d} objects consist of a data array with attributes defining the
#' spatial positions at which the voxels are located. There should always be a
#' \code{BoundingBox} attribute which defines the physical extent of the volume
#' in th... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_model_output.R
\name{get_CItable}
\alias{get_CItable}
\title{Make parameter summary table}
\usage{
get_CItable(CIlist, param_names, free_param_index, fitted)
}
\arguments{
\item{CIlist}{a list of confidence intervals and parameter estimat... | /man/get_CItable.Rd | permissive | SineadMorris/ushr | R | false | true | 1,158 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_model_output.R
\name{get_CItable}
\alias{get_CItable}
\title{Make parameter summary table}
\usage{
get_CItable(CIlist, param_names, free_param_index, fitted)
}
\arguments{
\item{CIlist}{a list of confidence intervals and parameter estimat... |
\name{dat.lee2004}
\docType{data}
\alias{dat.lee2004}
\title{Studies on Acupoint P6 Stimulation for Preventing Nausea}
\description{Results from studies examining the effectiveness of wrist acupuncture point P6 stimulation for preventing postoperative nausea.}
\usage{dat.lee2004}
\format{The data frame contains t... | /metafor/man/dat.lee2004.Rd | no_license | skoval/meta-analysis | R | false | false | 1,760 | rd | \name{dat.lee2004}
\docType{data}
\alias{dat.lee2004}
\title{Studies on Acupoint P6 Stimulation for Preventing Nausea}
\description{Results from studies examining the effectiveness of wrist acupuncture point P6 stimulation for preventing postoperative nausea.}
\usage{dat.lee2004}
\format{The data frame contains t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rarefaction.R
\name{prep_rrarefy}
\alias{prep_rrarefy}
\title{rrarefied counts in a long data frame}
\usage{
prep_rrarefy(Long.df, Level)
}
\arguments{
\item{Level}{= The taxonomic level to preform the analysis.}
\item{Long}{= Taxa count dat... | /man/prep_rrarefy.Rd | no_license | InterstateCommissionPotomacRiverBasin/BIBI | R | false | true | 730 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rarefaction.R
\name{prep_rrarefy}
\alias{prep_rrarefy}
\title{rrarefied counts in a long data frame}
\usage{
prep_rrarefy(Long.df, Level)
}
\arguments{
\item{Level}{= The taxonomic level to preform the analysis.}
\item{Long}{= Taxa count dat... |
setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
library(tidyverse)
library(tikzDevice)
library(RColorBrewer)
library(ggh4x)
use.tikz <- T
# Load
df <- read_delim("experiment-cit.csv", delim=",", col_types = cols(n="f", EffectOrder="f"))
df$Test[df$Test == "LinReg"] = "CorTest $+ \\Psi_{\\texttt{DRPL}}$"
d... | /experiment-cit/experiment-cit.R | permissive | anonymised-submission/TestingDistributionalShifts | R | false | false | 2,100 | r | setwd(dirname(rstudioapi::getActiveDocumentContext()$path))
library(tidyverse)
library(tikzDevice)
library(RColorBrewer)
library(ggh4x)
use.tikz <- T
# Load
df <- read_delim("experiment-cit.csv", delim=",", col_types = cols(n="f", EffectOrder="f"))
df$Test[df$Test == "LinReg"] = "CorTest $+ \\Psi_{\\texttt{DRPL}}$"
d... |
#########################################################################
# Script to visualise LepMAP linkage maps vs genetic distance
# Here we're visualising our v10 map
lib<-c("ggplot2","data.table")
lapply(lib,library,character.only=T)
# Read in the data for each LG and plot
LG_plots<-lapply(1:23,function(x){
... | /R/plot_lepmap_vs_STAR_v10_trimming.R | permissive | JimWhiting91/guppy_LH_QTL | R | false | false | 6,423 | r | #########################################################################
# Script to visualise LepMAP linkage maps vs genetic distance
# Here we're visualising our v10 map
lib<-c("ggplot2","data.table")
lapply(lib,library,character.only=T)
# Read in the data for each LG and plot
LG_plots<-lapply(1:23,function(x){
... |
library(shiny)
library(shinydashboard)
library(leaflet)
library(dplyr)
library(rgdal)
library(tidyr)
library(ggplot2)
library(lubridate)
library(DT)
library(tidyverse)
library(ggthemes)
library(readr)
#Read in data
Litterfall <-
read_csv("Data/Litterfall.csv")
SoilRespiration <-
read_csv("Data/SoilResp.csv")
Stand... | /Tests_Kwak/Combined Dash.R | no_license | jpgannon/EI-Capstone-21-Litter | R | false | false | 16,026 | r | library(shiny)
library(shinydashboard)
library(leaflet)
library(dplyr)
library(rgdal)
library(tidyr)
library(ggplot2)
library(lubridate)
library(DT)
library(tidyverse)
library(ggthemes)
library(readr)
#Read in data
Litterfall <-
read_csv("Data/Litterfall.csv")
SoilRespiration <-
read_csv("Data/SoilResp.csv")
Stand... |
# --------------------------------------------------
# Math 365A Computational Methods Molecular Biology
# Prof. Claudia Rangel-Escareño
#
# Colored Volcanoplots
# --------------------------------------------------
# First look at the results in B&W to determine the axes limits
# to avoid misplacing the labels every... | /VolcanoPlotsColors.R | no_license | edwardmurphy/R-scripts | R | false | false | 2,063 | r | # --------------------------------------------------
# Math 365A Computational Methods Molecular Biology
# Prof. Claudia Rangel-Escareño
#
# Colored Volcanoplots
# --------------------------------------------------
# First look at the results in B&W to determine the axes limits
# to avoid misplacing the labels every... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bivariate_utils.R
\name{logdet}
\alias{logdet}
\title{Find the log determinant}
\usage{
logdet(L)
}
\arguments{
\item{L}{the Cholesky factor of Q}
}
\description{
Find the log determinant of a matrix Q from its Cholesky factor L.
}
\examples{... | /man/logdet.Rd | no_license | andrewzm/bicon | R | false | true | 420 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bivariate_utils.R
\name{logdet}
\alias{logdet}
\title{Find the log determinant}
\usage{
logdet(L)
}
\arguments{
\item{L}{the Cholesky factor of Q}
}
\description{
Find the log determinant of a matrix Q from its Cholesky factor L.
}
\examples{... |
library(qtl)
library(snowfall)
load("/share/malooflab/Ruijuan/F2/QTL_analysis/data/LG.f2.after.crossover.43traits.Rdata")
LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32)
LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1)
sfInit(parallel = TRUE, cpus = 16)
sfExport("LG.f2.... | /F2/scantwo/scantwo_perm_8.5_new.R | no_license | leejimmy93/KIAT_cabernet | R | false | false | 677 | r | library(qtl)
library(snowfall)
load("/share/malooflab/Ruijuan/F2/QTL_analysis/data/LG.f2.after.crossover.43traits.Rdata")
LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32)
LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1)
sfInit(parallel = TRUE, cpus = 16)
sfExport("LG.f2.... |
best <- function(state,outcome){
# read data
outcome_data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
valid_outcomes <- c("heart attack","heart failure","pneumonia")
# make sure that the state is valid
if(!is.element(state, outcome_data$State)){
stop("invalid s... | /best.R | no_license | escuccim/RProgrammingAssignment3 | R | false | false | 1,743 | r | best <- function(state,outcome){
# read data
outcome_data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
valid_outcomes <- c("heart attack","heart failure","pneumonia")
# make sure that the state is valid
if(!is.element(state, outcome_data$State)){
stop("invalid s... |
source('a2p.R')
if(.Platform$pkgType == "mac.binary") dyn.load("cpp/Rfunc_mac.so")
if(.Platform$pkgType == "source") dyn.load("cpp/Rfunc.so")
tre = rUMT(5)
t = ape2peth(tre)
# The main speed constraint is in
# the time to copy the fitness matrix for each simulation.
# This needs to be stored in C++ and kept, not co... | /path_cpp.R | no_license | magnusclarke/path | R | false | false | 2,896 | r | source('a2p.R')
if(.Platform$pkgType == "mac.binary") dyn.load("cpp/Rfunc_mac.so")
if(.Platform$pkgType == "source") dyn.load("cpp/Rfunc.so")
tre = rUMT(5)
t = ape2peth(tre)
# The main speed constraint is in
# the time to copy the fitness matrix for each simulation.
# This needs to be stored in C++ and kept, not co... |
load("net_new.Rdata")
## library(lme4)
## lmer(score1~(1|id)+(1|title1),df)
## Random effects:
## Groups Name Std.Dev.
## id (Intercept) 21.7
## title1 (Intercept) 24.5
## Residual 14.0
#merge(df[!duplicated(df$id),],df[duplicated(df$id),],by='id')->z
#cor(z$score1.x,z$sco... | /sim_to_match_empirical.R | no_license | ben-domingue/network_equating | R | false | false | 1,013 | r | load("net_new.Rdata")
## library(lme4)
## lmer(score1~(1|id)+(1|title1),df)
## Random effects:
## Groups Name Std.Dev.
## id (Intercept) 21.7
## title1 (Intercept) 24.5
## Residual 14.0
#merge(df[!duplicated(df$id),],df[duplicated(df$id),],by='id')->z
#cor(z$score1.x,z$sco... |
\name{CombineHierarchyInfo}
\alias{CombineHierarchyInfo}
\title{Combine Hierarchy Info}
\description{
This function combines different hierarchy dataframes into one. Mostly an
internal function for tree and edge label building.
}
\usage{
CombineHierarchyInfo(MyHiers)
}
\arguments{
\item{MyHiers}{A vector of hier pa... | /Software/Reol/man/CombineHierarchyInfo.Rd | no_license | bomeara/omearatenure | R | false | false | 440 | rd | \name{CombineHierarchyInfo}
\alias{CombineHierarchyInfo}
\title{Combine Hierarchy Info}
\description{
This function combines different hierarchy dataframes into one. Mostly an
internal function for tree and edge label building.
}
\usage{
CombineHierarchyInfo(MyHiers)
}
\arguments{
\item{MyHiers}{A vector of hier pa... |
# mode argument below not really necessary:
if(!exists("DWEnv",mode="environment")){
DWEnv<-new.env()
}
| /R/zzz.R | no_license | cran/LS2W | R | false | false | 111 | r |
# mode argument below not really necessary:
if(!exists("DWEnv",mode="environment")){
DWEnv<-new.env()
}
|
setwd("C:/Users/D-07/Documents/Ukbank")
library(dplyr)
wales_data_details <- read.csv("Wales_Customer.csv")
print(wales_data_details)
# total Balance
totalBalance_wales <- sum(wales_data_details$Balance)
print(totalBalance_wales)
#Maximam balance
maxBalance_wales <- max(wales_data_details$Balanc... | /wales_report.R | no_license | Ashfaque-2015/Bank-Data-Analysis | R | false | false | 619 | r | setwd("C:/Users/D-07/Documents/Ukbank")
library(dplyr)
wales_data_details <- read.csv("Wales_Customer.csv")
print(wales_data_details)
# total Balance
totalBalance_wales <- sum(wales_data_details$Balance)
print(totalBalance_wales)
#Maximam balance
maxBalance_wales <- max(wales_data_details$Balanc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hlme.R
\name{hlme}
\alias{hlme}
\title{Estimation of latent class linear mixed models}
\usage{
hlme(fixed, mixture, random, subject, classmb, ng = 1, idiag = FALSE,
nwg = FALSE, cor = NULL, data, B, convB = 1e-04, convL = 1e-04,
convG = 1... | /man/hlme.Rd | no_license | cgpu/lcmm | R | false | true | 14,801 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hlme.R
\name{hlme}
\alias{hlme}
\title{Estimation of latent class linear mixed models}
\usage{
hlme(fixed, mixture, random, subject, classmb, ng = 1, idiag = FALSE,
nwg = FALSE, cor = NULL, data, B, convB = 1e-04, convL = 1e-04,
convG = 1... |
#######################################
# Capsule Study - Gen1
#
# Extended Data Figure 8
#
# Author: Jess Grembi and Rebecca Culver
#######################################
rm(list=ls())
# configure directories, load libraries and base functions
source(paste0(here::here(), "/0-config.R"))
###########################... | /1-scripts/2-ExtendedData_Figure_8.R | permissive | jgrembi/capscan-profiling-human-intestine | R | false | false | 20,334 | r | #######################################
# Capsule Study - Gen1
#
# Extended Data Figure 8
#
# Author: Jess Grembi and Rebecca Culver
#######################################
rm(list=ls())
# configure directories, load libraries and base functions
source(paste0(here::here(), "/0-config.R"))
###########################... |
#utils::globalVariables(c("dummy.data.frame",".kolmogorov.dependence.nptest"))
i<-permSpace<-testType<-statTest<-return.permIDs<-P<-idClust<-test <-j <- otherParams<- perms <- NULL
#####trace of a matrix
.tr <- function(sigma) sum(diag(sigma))
.getW <- function(data){
if(!is.null(data$W)) return(data)
data$W=arra... | /flip/R/utilities.R | no_license | ingted/R-Examples | R | false | false | 27,175 | r | #utils::globalVariables(c("dummy.data.frame",".kolmogorov.dependence.nptest"))
i<-permSpace<-testType<-statTest<-return.permIDs<-P<-idClust<-test <-j <- otherParams<- perms <- NULL
#####trace of a matrix
.tr <- function(sigma) sum(diag(sigma))
.getW <- function(data){
if(!is.null(data$W)) return(data)
data$W=arra... |
args <- commandArgs(trailingOnly=TRUE)
if(F) {
cat("250*14.3
3^6 / 117
(2.16 - 48.34)^-1
(59 - 15 + 3*6)/21\n",file=f<-tempfile())
args<-list(f)
#unlink(f)
}
con <- file(args[[1]], "r")
while(length(l <- readLines(con, n = 1, warn = FALSE)) > 0) {
cat(round(eval(parse(text=l)),5),sep="\n")
}
close(con)
| /1-moderate/simple_calculator.R | no_license | OehlR/codeeval | R | false | false | 320 | r | args <- commandArgs(trailingOnly=TRUE)
if(F) {
cat("250*14.3
3^6 / 117
(2.16 - 48.34)^-1
(59 - 15 + 3*6)/21\n",file=f<-tempfile())
args<-list(f)
#unlink(f)
}
con <- file(args[[1]], "r")
while(length(l <- readLines(con, n = 1, warn = FALSE)) > 0) {
cat(round(eval(parse(text=l)),5),sep="\n")
}
close(con)
|
#### Lab 9: Correlation, Linear Regression ####
#clean up working environment
rm(list = ls())
#verify working directory
getwd()
#load them libraries; reminder to only install packages once
library("ggfortify")
install.packages("broom")
library("broom")
library("tidyverse")
tidyverse_update()
#read in data
data01 <- ... | /Assignments/2019-11-12_Lab9.R | no_license | BIO375/kaur_preet | R | false | false | 1,143 | r | #### Lab 9: Correlation, Linear Regression ####
#clean up working environment
rm(list = ls())
#verify working directory
getwd()
#load them libraries; reminder to only install packages once
library("ggfortify")
install.packages("broom")
library("broom")
library("tidyverse")
tidyverse_update()
#read in data
data01 <- ... |
library(emuR)
### Name: fapply
### Title: Function that applies a function to an EMU spectral object
### Aliases: fapply
### Keywords: utilities
### ** Examples
# mean value per spectrum, input is a spectral matrix
m <- fapply(vowlax.dft.5, sapply, FUN=mean)
# as above but after converting dB to powers before
# ap... | /data/genthat_extracted_code/emuR/examples/fapply.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 888 | r | library(emuR)
### Name: fapply
### Title: Function that applies a function to an EMU spectral object
### Aliases: fapply
### Keywords: utilities
### ** Examples
# mean value per spectrum, input is a spectral matrix
m <- fapply(vowlax.dft.5, sapply, FUN=mean)
# as above but after converting dB to powers before
# ap... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scrapers.R
\name{get_galleys_from_article}
\alias{get_galleys_from_article}
\title{Scraping galleys URLs from OJS articles}
\usage{
get_galleys_from_article(input_url, verbose = FALSE)
}
\arguments{
\item{input_url}{Character vector.}
\item{... | /man/get_galleys_from_article.Rd | no_license | cran/ojsr | R | false | true | 923 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scrapers.R
\name{get_galleys_from_article}
\alias{get_galleys_from_article}
\title{Scraping galleys URLs from OJS articles}
\usage{
get_galleys_from_article(input_url, verbose = FALSE)
}
\arguments{
\item{input_url}{Character vector.}
\item{... |
library(crmPack)
### Name: update,Effloglog-method
### Title: Update method for the 'Effloglog' Model class. This is a method
### to update the modal estimates of the model parameters theta_1
### (theta1), theta_2 (theta2) and nu (nu, the precision of the efficacy
### responses) when new data or new observation... | /data/genthat_extracted_code/crmPack/examples/update-Effloglog-method.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,000 | r | library(crmPack)
### Name: update,Effloglog-method
### Title: Update method for the 'Effloglog' Model class. This is a method
### to update the modal estimates of the model parameters theta_1
### (theta1), theta_2 (theta2) and nu (nu, the precision of the efficacy
### responses) when new data or new observation... |
EPI_data <- read.csv('C:/Users/15189/Desktop/DataAnalysis/2010EPI_data.csv',header=TRUE)
plot(ecdf(EPI_data$EPI),do.points=FALSE,verticals = TRUE)
plot(ecdf(EPI_data$EPI),do.points=TRUE,verticals = TRUE) # points are visible on the plot.
par(pty="s")
help("qqnorm") # read the RStudio documentation for qqnorm
... | /LAB1PART2.R | no_license | xingyuYE97/DataAnalytics2020_Xingyu_YE | R | false | false | 4,574 | r | EPI_data <- read.csv('C:/Users/15189/Desktop/DataAnalysis/2010EPI_data.csv',header=TRUE)
plot(ecdf(EPI_data$EPI),do.points=FALSE,verticals = TRUE)
plot(ecdf(EPI_data$EPI),do.points=TRUE,verticals = TRUE) # points are visible on the plot.
par(pty="s")
help("qqnorm") # read the RStudio documentation for qqnorm
... |
rm(list=ls())
EPI_data <- read.csv(file.choose(),header = TRUE)
attach(EPI_data)
head(EPI_data)
#Lab2a
#Central Tendency for EPI and DALY
summary(EPI_data$EPI)
mean(EPI_data$EPI,na.rm = TRUE)
median(EPI_data$EPI, na.rm = TRUE)
names(table(EPI_data$EPI))[table(EPI_data$EPI) == max(table(EPI_data$EPI))]
s... | /Lab02 - Part1 - Feiman Li.R | no_license | FeimanLi/DataAnalytics2020Spring | R | false | false | 2,511 | r | rm(list=ls())
EPI_data <- read.csv(file.choose(),header = TRUE)
attach(EPI_data)
head(EPI_data)
#Lab2a
#Central Tendency for EPI and DALY
summary(EPI_data$EPI)
mean(EPI_data$EPI,na.rm = TRUE)
median(EPI_data$EPI, na.rm = TRUE)
names(table(EPI_data$EPI))[table(EPI_data$EPI) == max(table(EPI_data$EPI))]
s... |
## Update thresholds and reevaluate external to the initial run
## Read the json file
jsonFilePath <- "C:/Users/mblacke/Desktop/DQD/MDCD/results_IBM_MDCD_(v1327).json"
# jsonFilePath <- "C:/Users/mblacke/Desktop/DQD/CCAE/results_ccae_v992.json"
## Read in jsonData from the path
jsonData <- jsonlite::read_jso... | /extras/updateThresholds.R | permissive | dmitryilyn/DataQualityDashboard | R | false | false | 10,328 | r | ## Update thresholds and reevaluate external to the initial run
## Read the json file
jsonFilePath <- "C:/Users/mblacke/Desktop/DQD/MDCD/results_IBM_MDCD_(v1327).json"
# jsonFilePath <- "C:/Users/mblacke/Desktop/DQD/CCAE/results_ccae_v992.json"
## Read in jsonData from the path
jsonData <- jsonlite::read_jso... |
#Import Dataset
dataset = read.csv('50_Startups.csv')
dataset
#Encoding Categorical Values
dataset$State = factor(dataset$State,
levels = c('New York', 'California','Florida'),
labels = c(1,2,3))
library(caTools)
set.seed(123)
#Splitting the Dataset
split = sample.split(d... | /Regression/Multiple Linear Regression/Multiple linear Regression.R | no_license | IkshitaMishra/handson-machine-learning | R | false | false | 1,686 | r | #Import Dataset
dataset = read.csv('50_Startups.csv')
dataset
#Encoding Categorical Values
dataset$State = factor(dataset$State,
levels = c('New York', 'California','Florida'),
labels = c(1,2,3))
library(caTools)
set.seed(123)
#Splitting the Dataset
split = sample.split(d... |
#reading the data
power <- read.table("household_power_consumption.txt",header = TRUE,sep=";")
#subsetting the data
subpower <- subset(power,power$Date=="1/2/2007" | power$Date =="2/2/2007")
#transforming the Date and Time vars from characters into objects of type Date and POSIXlt respectively
subpower$Date <- a... | /Plot3.R | no_license | astdeww/ExData_Plotting1 | R | false | false | 1,144 | r | #reading the data
power <- read.table("household_power_consumption.txt",header = TRUE,sep=";")
#subsetting the data
subpower <- subset(power,power$Date=="1/2/2007" | power$Date =="2/2/2007")
#transforming the Date and Time vars from characters into objects of type Date and POSIXlt respectively
subpower$Date <- a... |
#' read.px
#'
#' Fixed version of read.px from pxR package
#'
#' @param filename filename
#' @param encoding encoding
#' @param na.strings na.strings
#'
#' @return px object
#' @export
#' @references
#' See citation("sorvi")
#' @author Contact: Leo Lahti \email{louhos@@googlegroups.com}
#' @examples #
#' @keywords... | /R/pxR.R | permissive | jtuomist/sorvi | R | false | false | 3,876 | r | #' read.px
#'
#' Fixed version of read.px from pxR package
#'
#' @param filename filename
#' @param encoding encoding
#' @param na.strings na.strings
#'
#' @return px object
#' @export
#' @references
#' See citation("sorvi")
#' @author Contact: Leo Lahti \email{louhos@@googlegroups.com}
#' @examples #
#' @keywords... |
\encoding{latin1}
\name{soundexES}
\alias{soundexES}
\title{Spanish Soundex Encoding
}
\description{SoundexES function returns a Census-like soundex code for a string given the hispanic sound system. This function was firstly outlined to work with the \code{RecordLinkage} package. Nonetheless, the soundex codes can be ... | /man/soundexES.Rd | no_license | husseingb/SciencePo | R | false | false | 1,277 | rd | \encoding{latin1}
\name{soundexES}
\alias{soundexES}
\title{Spanish Soundex Encoding
}
\description{SoundexES function returns a Census-like soundex code for a string given the hispanic sound system. This function was firstly outlined to work with the \code{RecordLinkage} package. Nonetheless, the soundex codes can be ... |
#' @export
VarTest <- R6::R6Class(
classname = "VarTest",
inherit = QWUtils::Test,
public = list(
initialize = function() {
super$initialize()
}
),
private = list(
)
)
| /R/VarTest.R | permissive | DavidBarke/QWUtils | R | false | false | 195 | r | #' @export
VarTest <- R6::R6Class(
classname = "VarTest",
inherit = QWUtils::Test,
public = list(
initialize = function() {
super$initialize()
}
),
private = list(
)
)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rasterSp-package.R
\docType{data}
\name{ter_mammals}
\alias{ter_mammals}
\title{Latin names of Terrestrial Mammal Species}
\format{A \code{data.frame} with 6067 observations and 10 variables.}
\description{
Latin names of Terrestrial Mammal S... | /man/ter_mammals.Rd | permissive | nvt-1009/rasterSp | R | false | true | 445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rasterSp-package.R
\docType{data}
\name{ter_mammals}
\alias{ter_mammals}
\title{Latin names of Terrestrial Mammal Species}
\format{A \code{data.frame} with 6067 observations and 10 variables.}
\description{
Latin names of Terrestrial Mammal S... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{MD_hrv_classic_pnn40}
\alias{MD_hrv_classic_pnn40}
\title{Function to calculate a statistical feature}
\usage{
MD_hrv_classic_pnn40(x)
}
\arguments{
\item{x}{a numerical time-series input vector}
}
\value{
scalar value tha... | /man/MD_hrv_classic_pnn40.Rd | no_license | hendersontrent/Rcatch22 | R | false | true | 523 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{MD_hrv_classic_pnn40}
\alias{MD_hrv_classic_pnn40}
\title{Function to calculate a statistical feature}
\usage{
MD_hrv_classic_pnn40(x)
}
\arguments{
\item{x}{a numerical time-series input vector}
}
\value{
scalar value tha... |
stopwords <- readr::read_csv2("data-raw/stopwords.csv", col_types = readr::cols(), locale = readr::locale(decimal_mark = ","))
usethis::use_data(stopwords, overwrite = TRUE)
| /data-raw/stopwords.R | permissive | stephLH/caractr | R | false | false | 175 | r | stopwords <- readr::read_csv2("data-raw/stopwords.csv", col_types = readr::cols(), locale = readr::locale(decimal_mark = ","))
usethis::use_data(stopwords, overwrite = TRUE)
|
###Install these libraries:
source("https://bioconductor.org/biocLite.R")
biocLite("ShortRead")
biocLite("Rsamtools")
biocLite("ggplot2")
rm(list=ls())
library(ShortRead)
#setwd to a folder that contains .fastq files;
setwd("E:/Genomic DNA/4.1")
reads_F<-readFastq("Strain_comparison... | /Genomic DNA analysis/Strain_comparison/KD518_rep1_Rcode.R | permissive | AnnaBioLogic/Shiriaeva_et_al_2019 | R | false | false | 9,403 | r | ###Install these libraries:
source("https://bioconductor.org/biocLite.R")
biocLite("ShortRead")
biocLite("Rsamtools")
biocLite("ggplot2")
rm(list=ls())
library(ShortRead)
#setwd to a folder that contains .fastq files;
setwd("E:/Genomic DNA/4.1")
reads_F<-readFastq("Strain_comparison... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/testsResiduals.R
\name{testSpatialAutocorrelation}
\alias{testSpatialAutocorrelation}
\title{Test for spatial autocorrelation}
\usage{
testSpatialAutocorrelation(simulationOutput, x = NULL, y = NULL,
distMat = NULL, plot = T)
}
\arguments{
... | /DHARMa/man/testSpatialAutocorrelation.Rd | no_license | PasqualeDente/DHARMa | R | false | true | 2,596 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/testsResiduals.R
\name{testSpatialAutocorrelation}
\alias{testSpatialAutocorrelation}
\title{Test for spatial autocorrelation}
\usage{
testSpatialAutocorrelation(simulationOutput, x = NULL, y = NULL,
distMat = NULL, plot = T)
}
\arguments{
... |
# setwd('~/Documents/snotel-regression_project')
# setwd('~/Documents/snotel-regression_project')
library(raster)
library(reshape2)
library(plyr)
library(ggplot2)
library(doMC)
library(RColorBrewer)
library(gridExtra)
library(tidyr)
library(dplyr)
rswe='v3.1'
covrange='idp1'
fscaMatch='wofsca'
scalesnotel='scale'
cos... | /src/plot_boxplots_surveygridded.r | no_license | dschneiderch/snotel-regression | R | false | false | 10,822 | r | # setwd('~/Documents/snotel-regression_project')
# setwd('~/Documents/snotel-regression_project')
library(raster)
library(reshape2)
library(plyr)
library(ggplot2)
library(doMC)
library(RColorBrewer)
library(gridExtra)
library(tidyr)
library(dplyr)
rswe='v3.1'
covrange='idp1'
fscaMatch='wofsca'
scalesnotel='scale'
cos... |
# KBMP2020_FindASVs
# Kat Beilsmith
# University of Chicago Department of Ecology and Evolution, Bergelson Lab
# Summer 2020
# Make a copy of the phyloseq object and encode sample data variables as factors.
physeq_factored <- physeq
sample_data(physeq_factored)$Year <- factor(sample_data(physeq_factored)$Year, levels... | /bioRxiv_version_1/bv1_KBMP2020_FindASVs.R | no_license | krbeilsmith/KBMP2020_Microbes | R | false | false | 12,288 | r | # KBMP2020_FindASVs
# Kat Beilsmith
# University of Chicago Department of Ecology and Evolution, Bergelson Lab
# Summer 2020
# Make a copy of the phyloseq object and encode sample data variables as factors.
physeq_factored <- physeq
sample_data(physeq_factored)$Year <- factor(sample_data(physeq_factored)$Year, levels... |
################################
### Metropolis Hastings MCMC ###
################################
# this is a slight adaptation of mcmcMH from fitR package
# prevents 'covariance matrix not positive definite' error
# see fitR package for documentation
myMCMC<-function (target, init.theta, proposal.sd = NULL, n.iterat... | /R/myMCMC.R | no_license | PPML/syphilis | R | false | false | 9,107 | r | ################################
### Metropolis Hastings MCMC ###
################################
# this is a slight adaptation of mcmcMH from fitR package
# prevents 'covariance matrix not positive definite' error
# see fitR package for documentation
myMCMC<-function (target, init.theta, proposal.sd = NULL, n.iterat... |
# DHGC Julio Huato
# PWT
cat("\014") # This clears the consol
# Loads, summarizes data --------------------------------------------------
pwt9 <- read.csv("~/Downloads/pwt9.csv") # data
str(pwt9) # data frame structure
summary(pwt9) # i = 1, \ldots, 182 (countries), t = 1950, ..., 2014 (65 years)
# n = i \times t = 11... | /dhgc_master1.R | no_license | jhuato/postwar_global_capitalism | R | false | false | 52,960 | r | # DHGC Julio Huato
# PWT
cat("\014") # This clears the consol
# Loads, summarizes data --------------------------------------------------
pwt9 <- read.csv("~/Downloads/pwt9.csv") # data
str(pwt9) # data frame structure
summary(pwt9) # i = 1, \ldots, 182 (countries), t = 1950, ..., 2014 (65 years)
# n = i \times t = 11... |
# Linear Discriminant Analysis
library(MASS)
library(ISLR)
attach(Smarket)
train=(Year<2005)
Smarket.2005=Smarket[!train,]
Direction.2005=Direction[!train]
lda.fit=lda(Direction~Lag1+Lag2,data=Smarket,subset=train)
lda.fit
# Call:
# lda(Direction ~ Lag1 + Lag2, data = Smarket, subset = train)
#
# Prior probabilities... | /classification/lda.R | no_license | kayfay/R_programming | R | false | false | 1,667 | r | # Linear Discriminant Analysis
library(MASS)
library(ISLR)
attach(Smarket)
train=(Year<2005)
Smarket.2005=Smarket[!train,]
Direction.2005=Direction[!train]
lda.fit=lda(Direction~Lag1+Lag2,data=Smarket,subset=train)
lda.fit
# Call:
# lda(Direction ~ Lag1 + Lag2, data = Smarket, subset = train)
#
# Prior probabilities... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.