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 |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format_triangle.R
\name{format_triangle_multi}
\alias{format_triangle_multi}
\title{Format labels for multi-year Lexis triangles}
\usage{
format_triangle_multi(
x,
age,
period,
width = 5,
break_max = 100,
open_last = TRUE,
month... | /man/format_triangle_multi.Rd | permissive | bayesiandemography/demprep | R | false | true | 4,986 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format_triangle.R
\name{format_triangle_multi}
\alias{format_triangle_multi}
\title{Format labels for multi-year Lexis triangles}
\usage{
format_triangle_multi(
x,
age,
period,
width = 5,
break_max = 100,
open_last = TRUE,
month... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/name_file.R
\name{name_file}
\alias{name_file}
\title{Define download file name}
\usage{
name_file(select_concept, ma, per1m)
}
\arguments{
\item{select_concept}{A character vector of length 1.}
\item{ma}{A character vector of length 1.}
\i... | /man/name_file.Rd | permissive | mitsuoxv/covid | R | false | true | 510 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/name_file.R
\name{name_file}
\alias{name_file}
\title{Define download file name}
\usage{
name_file(select_concept, ma, per1m)
}
\arguments{
\item{select_concept}{A character vector of length 1.}
\item{ma}{A character vector of length 1.}
\i... |
#' Title prevision and prevision error acording BagKDE
#'
#' @param xx data vector
#' @param grille grid for density evaluation
#' @param B number of histograms to aggregate
#' @param dobs observation
#'
#' @return prevision and prevision error
#' @export
BagKDE.err = function(xx,grille=aa,B= 10,dobs) {
f... | /BagKDE.err.R | no_license | youla1u/bagdenest-Package--Bagging-of-density-estimation- | R | false | false | 592 | r | #' Title prevision and prevision error acording BagKDE
#'
#' @param xx data vector
#' @param grille grid for density evaluation
#' @param B number of histograms to aggregate
#' @param dobs observation
#'
#' @return prevision and prevision error
#' @export
BagKDE.err = function(xx,grille=aa,B= 10,dobs) {
f... |
require(data.table)
extractPhoneStub <- function(phone) {
if( substr(phone, 1, 3) == '+61' ) {
substr(phone, 4, 6)
} else if(substr(phone, 1, 1) == '0') {
substr(phone, 2, 4)
} else {
substr(phone, 1, 3)
}
}
extractAllPhoneStubs <- Vectorize(extractPhoneStub)
# THESE MOBILE PHONE FEATURES ARE... | /phoneFeatures.R | no_license | john-hawkins/R_Feature_Gen | R | false | false | 1,802 | r | require(data.table)
extractPhoneStub <- function(phone) {
if( substr(phone, 1, 3) == '+61' ) {
substr(phone, 4, 6)
} else if(substr(phone, 1, 1) == '0') {
substr(phone, 2, 4)
} else {
substr(phone, 1, 3)
}
}
extractAllPhoneStubs <- Vectorize(extractPhoneStub)
# THESE MOBILE PHONE FEATURES ARE... |
#plot 1
library(data.table)
library(dplyr)
#read in data and format
power_data <- tbl_df(fread("household_power_consumption.txt", header = TRUE, sep = ';', na.strings = "?"))
power_data <- power_data %>% filter(Date %in% c("1/2/2007", "2/2/2007"))
power_data <- power_data %>% mutate(date_time = as.POSIXct(strptime(... | /plot1.R | no_license | dnlbreen/ExData_Plotting1 | R | false | false | 595 | r | #plot 1
library(data.table)
library(dplyr)
#read in data and format
power_data <- tbl_df(fread("household_power_consumption.txt", header = TRUE, sep = ';', na.strings = "?"))
power_data <- power_data %>% filter(Date %in% c("1/2/2007", "2/2/2007"))
power_data <- power_data %>% mutate(date_time = as.POSIXct(strptime(... |
library(testthat)
library(GlmSimulatoR)
test_check("GlmSimulatoR")
| /tests/testthat.R | no_license | cran/GlmSimulatoR | R | false | false | 72 | r | library(testthat)
library(GlmSimulatoR)
test_check("GlmSimulatoR")
|
\name{oklahoma.blkgrp}
\Rdversion{1.1}
\alias{oklahoma.blkgrp}
\docType{data}
\title{
oklahoma.blkgrp
}
\description{
oklahoma.blkgrp is a \code{\link[sp:SpatialPolygonsDataFrame]{SpatialPolygonsDataFrame}} with polygons made from the 2000 US Census tiger/line boundary files (\url{http://www.census.gov/geo/www/tiger/}... | /man/oklahoma.blkgrp.Rd | no_license | cran/UScensus2000blkgrp | R | false | false | 9,813 | rd | \name{oklahoma.blkgrp}
\Rdversion{1.1}
\alias{oklahoma.blkgrp}
\docType{data}
\title{
oklahoma.blkgrp
}
\description{
oklahoma.blkgrp is a \code{\link[sp:SpatialPolygonsDataFrame]{SpatialPolygonsDataFrame}} with polygons made from the 2000 US Census tiger/line boundary files (\url{http://www.census.gov/geo/www/tiger/}... |
#' # Template program
#'
#' Description: This R-Oxygen template program provides example layout and
#' organization for making a clean and easily followable html document
#' for your R program.
#'
#' Notes: Hashtags denote hierarchy. The number of hashtags correspond with
#' document headings as follows (also an ... | /programs/z_template.R | permissive | ha0ye/template_project | R | false | false | 2,372 | r | #' # Template program
#'
#' Description: This R-Oxygen template program provides example layout and
#' organization for making a clean and easily followable html document
#' for your R program.
#'
#' Notes: Hashtags denote hierarchy. The number of hashtags correspond with
#' document headings as follows (also an ... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
source("plotStartStops.R")
# Define UI for application that draws a histogram
ui <- fluidPage(
... | /Project3/app.R | no_license | Dragemil/learning-r-projects | R | false | false | 1,863 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
source("plotStartStops.R")
# Define UI for application that draws a histogram
ui <- fluidPage(
... |
map = function(data,year,var){
variable <- data[data$rok==year,match(var,colnames(data))]
intervals<-9
colors<-brewer.pal(intervals, "BuPu")
classes<-classIntervals(variable, intervals, style="fixed",
fixedBreaks=c(min(variable),
... | /scripts/MAP_12052020.R | no_license | strebuh/spatial_data_reviewer | R | false | false | 671 | r |
map = function(data,year,var){
variable <- data[data$rok==year,match(var,colnames(data))]
intervals<-9
colors<-brewer.pal(intervals, "BuPu")
classes<-classIntervals(variable, intervals, style="fixed",
fixedBreaks=c(min(variable),
... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
if (nrow(x)==ncol(x)) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setsolve <- function(solv... | /cachematrix.R | no_license | Alexlp1985/ProgrammingAssignment2 | R | false | false | 828 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
if (nrow(x)==ncol(x)) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setsolve <- function(solv... |
##SET WORKING DIRECTORY
setwd("~/Desktop") ###MODIFY THIS FILE PATH FOR YOUR COMPUTER
getwd()
##LOAD DATA FILE
#Load Exam Anxiety.dat Call it "exam".
exam <- read.delim("Exam Anxiety.dat", header=TRUE)
#Examine structure
str(exam)
##VISUALIZE RELATIONSHIPS
#Create a scatterplot of Exam Anxiety and Exam Performance.... | /Correlations_and_Regression.R | no_license | LynnWahab/Correlations-and-Regressions-in-R | R | false | false | 7,212 | r |
##SET WORKING DIRECTORY
setwd("~/Desktop") ###MODIFY THIS FILE PATH FOR YOUR COMPUTER
getwd()
##LOAD DATA FILE
#Load Exam Anxiety.dat Call it "exam".
exam <- read.delim("Exam Anxiety.dat", header=TRUE)
#Examine structure
str(exam)
##VISUALIZE RELATIONSHIPS
#Create a scatterplot of Exam Anxiety and Exam Performance.... |
\name{roast}
\alias{roast}
\alias{roast.default}
\alias{mroast}
\alias{mroast.default}
\alias{Roast-class}
\alias{show,Roast-method}
\alias{fry}
\alias{fry.default}
\title{Rotation Gene Set Tests}
\description{
Rotation gene set testing for linear models.
}
\usage{
\S3method{roast}{default}(y, index = N... | /man/roast.Rd | no_license | warnes/limma | R | false | false | 11,502 | rd | \name{roast}
\alias{roast}
\alias{roast.default}
\alias{mroast}
\alias{mroast.default}
\alias{Roast-class}
\alias{show,Roast-method}
\alias{fry}
\alias{fry.default}
\title{Rotation Gene Set Tests}
\description{
Rotation gene set testing for linear models.
}
\usage{
\S3method{roast}{default}(y, index = N... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{obpg1_to_obpg2}
\alias{obpg1_to_obpg2}
\title{Convert OBPG old-style filenames to OBPG new-style filenames}
\usage{
obpg1_to_obpg2(
x = c("A2004001.L3m_DAY_CHL_chlor_a_4km.nc", "A2004001.L3m_DAY_SST_sst_4km.nc",
"AQUA_MODIS... | /man/obpg1_to_obpg2.Rd | permissive | BigelowLab/ohwobpg | R | false | true | 724 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/misc.R
\name{obpg1_to_obpg2}
\alias{obpg1_to_obpg2}
\title{Convert OBPG old-style filenames to OBPG new-style filenames}
\usage{
obpg1_to_obpg2(
x = c("A2004001.L3m_DAY_CHL_chlor_a_4km.nc", "A2004001.L3m_DAY_SST_sst_4km.nc",
"AQUA_MODIS... |
##########################################################
#### FIG.1: maps of predictions in summer & winter #######
##########################################################
library(dplyr)
library(here)
library(raster)
library(viridis)
library(maps)
library(fields)
library(ggplot2)
library(gridExtra)
library(png)
... | /R-Scripts/7.MS_Figures/7.1.Fig.1.Predictions.Maps.Summer.R | no_license | pchambault/Arctic-whales-predicted-habitat | R | false | false | 15,080 | r | ##########################################################
#### FIG.1: maps of predictions in summer & winter #######
##########################################################
library(dplyr)
library(here)
library(raster)
library(viridis)
library(maps)
library(fields)
library(ggplot2)
library(gridExtra)
library(png)
... |
<?xml version="1.0" encoding="utf-8"?>
<serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="AzureCloudService" generation="1" functional="0" release="0" Id="e150ccba-ecc7-4ed4-afc1-6ee234d46c60" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.com/d... | /NewCloudRepo-master/NewCloudRepo-master/AzureCloudService/csx/Release/ServiceDefinition.rd | no_license | ericbehughes/NewCloudRepo | R | false | false | 11,608 | rd | <?xml version="1.0" encoding="utf-8"?>
<serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="AzureCloudService" generation="1" functional="0" release="0" Id="e150ccba-ecc7-4ed4-afc1-6ee234d46c60" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.com/d... |
#' Generates a sample-wise PCA plot
#'
#' @param dat Data matrix to use
#' @param color_var Variable to color points by
#' @param scale Whether or not variables should be scaled to have unit variance
# beore performing the PCA.
plot_sample_pca <- function(dat, color_var=NULL, color_var_name='color', point... | /tools/shared/visualization.R | permissive | khughitt/Pharmacogenomics_Prediction_Pipeline_P3 | R | false | false | 1,792 | r | #' Generates a sample-wise PCA plot
#'
#' @param dat Data matrix to use
#' @param color_var Variable to color points by
#' @param scale Whether or not variables should be scaled to have unit variance
# beore performing the PCA.
plot_sample_pca <- function(dat, color_var=NULL, color_var_name='color', point... |
#######################################################################
#######################################################################
##This function performs survival analysis for input genes.
##For reference on the format of expression and phenotypeData,
##please see the example analysis in getGeoDataForSur... | /relatedToPublishedData/getGeoDataForSurvivalAnalysisFunctions.R | no_license | chrishuges/protocolsDryLab | R | false | false | 3,450 | r | #######################################################################
#######################################################################
##This function performs survival analysis for input genes.
##For reference on the format of expression and phenotypeData,
##please see the example analysis in getGeoDataForSur... |
source("loadAndPrepareData.R")
filePath <- "./data/household_power_consumption.txt"
destFileName <- "plot3.png"
# Load data...
relevantData <- loadAndPrepareData(filePath)
# Create plot file...
originalLocale = Sys.getlocale("LC_TIME")
Sys.setlocale("LC_TIME", "English") # Set the locale to English to make sure tha... | /plot3.R | no_license | dominiklanger/ExData_Plotting1 | R | false | false | 962 | r | source("loadAndPrepareData.R")
filePath <- "./data/household_power_consumption.txt"
destFileName <- "plot3.png"
# Load data...
relevantData <- loadAndPrepareData(filePath)
# Create plot file...
originalLocale = Sys.getlocale("LC_TIME")
Sys.setlocale("LC_TIME", "English") # Set the locale to English to make sure tha... |
library(tangram)
### Name: rmd
### Title: Generate an Rmd table entry from a cell object
### Aliases: rmd rmd.default rmd.cell rmd.cell_iqr rmd.cell_estimate
### rmd.cell_fstat rmd.cell_fraction rmd.cell_chi2 rmd.cell_studentt
### rmd.cell_spearman rmd.cell_n rmd.tangram rmd.table_builder
### ** Examples
rmd(t... | /data/genthat_extracted_code/tangram/examples/rmd.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 349 | r | library(tangram)
### Name: rmd
### Title: Generate an Rmd table entry from a cell object
### Aliases: rmd rmd.default rmd.cell rmd.cell_iqr rmd.cell_estimate
### rmd.cell_fstat rmd.cell_fraction rmd.cell_chi2 rmd.cell_studentt
### rmd.cell_spearman rmd.cell_n rmd.tangram rmd.table_builder
### ** Examples
rmd(t... |
Laplacian_GridOperator <-
function(var="x", grid_dataframe, h=1){
# Compute grid distances
DeltaX = mean( diff(sort(unique(grid_dataframe[,'x']))) )
DeltaY = mean( diff(sort(unique(grid_dataframe[,'y']))) )
# Compute adjecancy matrix
d <- approx_equals(as.matrix(dist(grid_dataframe)),c("x"=DeltaX,"y"=DeltaY)[... | /R/Laplacian_GridOperator.R | no_license | jin-gao/movement_tools | R | false | false | 512 | r | Laplacian_GridOperator <-
function(var="x", grid_dataframe, h=1){
# Compute grid distances
DeltaX = mean( diff(sort(unique(grid_dataframe[,'x']))) )
DeltaY = mean( diff(sort(unique(grid_dataframe[,'y']))) )
# Compute adjecancy matrix
d <- approx_equals(as.matrix(dist(grid_dataframe)),c("x"=DeltaX,"y"=DeltaY)[... |
#' Elementary Scoring Function for Expectiles and Quantiles
#'
#' Weighted average of the elementary scoring function for expectiles resp. quantiles at level \code{alpha} with parameter \code{theta}, see [1].
#' Every choice of \code{theta} gives a scoring function consistent for the expectile resp. quantile at level \... | /R/elementary_score.R | no_license | JosepER/MetricsWeighted | R | false | false | 2,301 | r | #' Elementary Scoring Function for Expectiles and Quantiles
#'
#' Weighted average of the elementary scoring function for expectiles resp. quantiles at level \code{alpha} with parameter \code{theta}, see [1].
#' Every choice of \code{theta} gives a scoring function consistent for the expectile resp. quantile at level \... |
# Convert an R package name to a valid Nix attribute
r_to_nix <- function(name) {
gsub(".", "_", sub("^(import|assert|inherit|with)$", "r_\\1", name), fixed = TRUE)
}
line <- function(x) cat(x, sep = "\n")
base_packages <- rownames(installed.packages(priority = "base"))
args <- commandArgs(trailingOnly = TRUE)
if ... | /pkgs/cran/cran2nix.R | no_license | james-atkins/dotfiles | R | false | false | 1,557 | r | # Convert an R package name to a valid Nix attribute
r_to_nix <- function(name) {
gsub(".", "_", sub("^(import|assert|inherit|with)$", "r_\\1", name), fixed = TRUE)
}
line <- function(x) cat(x, sep = "\n")
base_packages <- rownames(installed.packages(priority = "base"))
args <- commandArgs(trailingOnly = TRUE)
if ... |
# Aproximación de una probabilidad
# simulando una distribución Bernulli cuyo
# parametro p=0.5
library(tidyverse)
p=0.5 # caracteristica de la distribución de bernulli
set.seed(1)
# def. cantidad de numeros
nsim=4000
# numeros aletorios cuya distribución uniforme
rx=runif(nsim)
# rx
# Caracteristica de una ber... | /Análisis estadístico de datos simulados/clase9.R | no_license | MisaelErikson/ComputacionEstadistica2020-2 | R | false | false | 3,521 | r | # Aproximación de una probabilidad
# simulando una distribución Bernulli cuyo
# parametro p=0.5
library(tidyverse)
p=0.5 # caracteristica de la distribución de bernulli
set.seed(1)
# def. cantidad de numeros
nsim=4000
# numeros aletorios cuya distribución uniforme
rx=runif(nsim)
# rx
# Caracteristica de una ber... |
# Practica Shiny
library(shiny)
library(shinydashboard)
library(png)
library(shinythemes)
library(devtools)
# Cargamos el archivo que contiene la database y los ruidos
source("database.R")
source("noisesNoReactive.R")
# Creacion de muestra aleatoria para el numero a mostrar
a = sample(500, 1)
ui = dashboardPage(
... | /PracticaShinyR.R | no_license | MarcosBarrera/Shiny | R | false | false | 3,987 | r | # Practica Shiny
library(shiny)
library(shinydashboard)
library(png)
library(shinythemes)
library(devtools)
# Cargamos el archivo que contiene la database y los ruidos
source("database.R")
source("noisesNoReactive.R")
# Creacion de muestra aleatoria para el numero a mostrar
a = sample(500, 1)
ui = dashboardPage(
... |
library(leaflet)
# Choices for drop-downs
vars <- c("Points", "Regions")
ui <- navbarPage("STAT209", id="nav",
tabPanel("Interactive Map",
div(class="outer",
tags$head(
# Include our custom CSS
includeCSS("styles.css"),
includeScript("gomap.js")
),
leafletOutput("map... | /Shiny-Project/ui.R | no_license | Vanessa-feng/Mass-States-of-Mind-during-COVID-19-by-Twitter-Dataset | R | false | false | 1,426 | r | library(leaflet)
# Choices for drop-downs
vars <- c("Points", "Regions")
ui <- navbarPage("STAT209", id="nav",
tabPanel("Interactive Map",
div(class="outer",
tags$head(
# Include our custom CSS
includeCSS("styles.css"),
includeScript("gomap.js")
),
leafletOutput("map... |
# load libraries, set wd
source("global.R")
# load posgresql db connection..
source(file.path("hidden", "DBconnection.hidden"))
# ..or create one:
con <- dbConnect(RPostgres::Postgres(),
dbname = 'DB_NAME',
host = 'DB_HOST',
port = 'DB_PORT',
user... | /storeData.R | no_license | ubbikas/ubbiR_delfi_tm | R | false | false | 3,647 | r | # load libraries, set wd
source("global.R")
# load posgresql db connection..
source(file.path("hidden", "DBconnection.hidden"))
# ..or create one:
con <- dbConnect(RPostgres::Postgres(),
dbname = 'DB_NAME',
host = 'DB_HOST',
port = 'DB_PORT',
user... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vld.R
\name{vld_mcmcr}
\alias{vld_mcmcr}
\alias{vld_mcmcarray}
\alias{vld_mcmcrs}
\title{Validate MCMC Objects}
\usage{
vld_mcmcarray(x)
vld_mcmcr(x)
vld_mcmcrs(x)
}
\arguments{
\item{x}{The object to check.}
}
\value{
A flag indicating whe... | /man/vld_mcmcr.Rd | permissive | krlmlr/mcmcr | R | false | true | 846 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vld.R
\name{vld_mcmcr}
\alias{vld_mcmcr}
\alias{vld_mcmcarray}
\alias{vld_mcmcrs}
\title{Validate MCMC Objects}
\usage{
vld_mcmcarray(x)
vld_mcmcr(x)
vld_mcmcrs(x)
}
\arguments{
\item{x}{The object to check.}
}
\value{
A flag indicating whe... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../h2o-runit.R')
test.mergecat <- function() {
census_path <- locate("smalldata/chicago/chicagoCensus.csv")
crimes_path <- locate("smalldata/chicago/chicagoCrimes10k.csv.zip")
Log.info("Import Chicago census data...")
census_raw ... | /h2o-r/tests/testdir_misc/runit_mergecat.R | permissive | brightchen/h2o-3 | R | false | false | 1,160 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../h2o-runit.R')
test.mergecat <- function() {
census_path <- locate("smalldata/chicago/chicagoCensus.csv")
crimes_path <- locate("smalldata/chicago/chicagoCrimes10k.csv.zip")
Log.info("Import Chicago census data...")
census_raw ... |
nc <- sf::read_sf(system.file("shape/nc.shp", package = "sf"))
nc <- sf::st_transform(nc, 3857)
basemap <-
ggplot() +
layer_location_data(
data = nc,
fill = NA
)
basemap +
layer_markers(
data = nc[1:10],
mapping = aes(size = AREA),
make = TRUE
)
large_nc <-
getdata::get_location_data(... | /examples/layer_markers.R | permissive | elipousson/maplayer | R | false | false | 623 | r | nc <- sf::read_sf(system.file("shape/nc.shp", package = "sf"))
nc <- sf::st_transform(nc, 3857)
basemap <-
ggplot() +
layer_location_data(
data = nc,
fill = NA
)
basemap +
layer_markers(
data = nc[1:10],
mapping = aes(size = AREA),
make = TRUE
)
large_nc <-
getdata::get_location_data(... |
##' align 454 contigs and mira sequence to reference sequence.
##'
##'
##' @title doAlign
##' @param x file names of 454 contig, reference and mira sequences
##' @return fasta S3 object
##' @author ygc
##' @importFrom muscle muscle
##' @importFrom Biostrings readDNAStringSet
##' @importFrom Biostrings reverseComplement... | /R/doAlign.R | no_license | GuangchuangYu/skleid | R | false | false | 7,777 | r | ##' align 454 contigs and mira sequence to reference sequence.
##'
##'
##' @title doAlign
##' @param x file names of 454 contig, reference and mira sequences
##' @return fasta S3 object
##' @author ygc
##' @importFrom muscle muscle
##' @importFrom Biostrings readDNAStringSet
##' @importFrom Biostrings reverseComplement... |
#' @title Download and import the raw dataset.
#'
#' @description Download the dataset from GEO, filter, and create a
#' \code{SingleCellExperiment object}
#'
#' @export
#' @import BiocFileCache SingleCellExperiment rappdirs slingshot HDF5Array
importRawData <- function(){
url <- "https://www.ncbi.nlm.nih.gov/geo/dow... | /R/import_raw_data.R | permissive | wjbsb/bioc2020trajectories | R | false | false | 1,112 | r | #' @title Download and import the raw dataset.
#'
#' @description Download the dataset from GEO, filter, and create a
#' \code{SingleCellExperiment object}
#'
#' @export
#' @import BiocFileCache SingleCellExperiment rappdirs slingshot HDF5Array
importRawData <- function(){
url <- "https://www.ncbi.nlm.nih.gov/geo/dow... |
## ----------------------------------------------
# Reference URL: https://davetang.org/muse/2013/04/06/using-the-r_twitter-package/
# install.packages("twitteR")
# install.packages("wordcloud")
# install.packages("tm")
library("twitteR")
library("wordcloud")
library("tm")
###
# The reference site says it's necessa... | /Unsupervised/Twitter/firstTwitterApp.R | no_license | ujjwal82/R-practice | R | false | false | 2,748 | r | ## ----------------------------------------------
# Reference URL: https://davetang.org/muse/2013/04/06/using-the-r_twitter-package/
# install.packages("twitteR")
# install.packages("wordcloud")
# install.packages("tm")
library("twitteR")
library("wordcloud")
library("tm")
###
# The reference site says it's necessa... |
#' Traverse outward node-by_node until stopping conditions are met
#' @description From a graph object of
#' class \code{dgr_graph}, move along
#' outward edges from one or more nodes
#' present in a selection to other
#' connected nodes, replacing the current
#' nodes in the selection with those nodes
#' traversed to ... | /R/trav_out_until.R | permissive | alarmcom/DiagrammeR | R | false | false | 8,272 | r | #' Traverse outward node-by_node until stopping conditions are met
#' @description From a graph object of
#' class \code{dgr_graph}, move along
#' outward edges from one or more nodes
#' present in a selection to other
#' connected nodes, replacing the current
#' nodes in the selection with those nodes
#' traversed to ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/launchApp.R
\name{launchApp}
\alias{launchApp}
\title{launches the TESTshinyapp app}
\usage{
launchApp()
}
\value{
shiny application object
}
\description{
Display a shiny user interface
}
| /man/launchApp.Rd | no_license | FabienNicol/TESTshinyapp | R | false | true | 267 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/launchApp.R
\name{launchApp}
\alias{launchApp}
\title{launches the TESTshinyapp app}
\usage{
launchApp()
}
\value{
shiny application object
}
\description{
Display a shiny user interface
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_child_care_subsidy.R
\name{model_child_care_subsidy}
\alias{model_child_care_subsidy}
\title{Model Child Care Subsidy}
\usage{
model_child_care_subsidy(
sample_file,
Cbdc_hourly_cap = NULL,
Fdc_hourly_cap = NULL,
Oshc_hourly_cap... | /grattan/man/model_child_care_subsidy.Rd | no_license | akhikolla/TestedPackages-NoIssues | R | false | true | 2,685 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_child_care_subsidy.R
\name{model_child_care_subsidy}
\alias{model_child_care_subsidy}
\title{Model Child Care Subsidy}
\usage{
model_child_care_subsidy(
sample_file,
Cbdc_hourly_cap = NULL,
Fdc_hourly_cap = NULL,
Oshc_hourly_cap... |
library(shiny)
ui <- navbarPage("GAME",
tabPanel(title = "BATTLE",
sidebarLayout(
sidebarPanel(
sliderInput(inputId = "battle_num",
label = "choose a number",
value = 19, min = 5, max = 99, step = 2),
... | /03_Fall_2017/05-little-games/minesweeper/app_gomoku.R | no_license | ranjankislay/Final_Projects | R | false | false | 3,135 | r | library(shiny)
ui <- navbarPage("GAME",
tabPanel(title = "BATTLE",
sidebarLayout(
sidebarPanel(
sliderInput(inputId = "battle_num",
label = "choose a number",
value = 19, min = 5, max = 99, step = 2),
... |
#
# Copyright 2007-2015 The OpenMx Project
#
# 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 ... | /R/MxRAMMetaData.R | permissive | RMKirkpatrick/OpenMx | R | false | false | 1,038 | r | #
# Copyright 2007-2015 The OpenMx Project
#
# 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 ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_demographics_race2010standard.R
\name{build_demographics_race2010standard}
\alias{build_demographics_race2010standard}
\title{Builds a synthetic variable for education attainment}
\usage{
build_demographics_race2010standard(Data)
}
\des... | /man/build_demographics_race2010standard.Rd | no_license | arthurwelle/harmonizePNAD | R | false | true | 385 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_demographics_race2010standard.R
\name{build_demographics_race2010standard}
\alias{build_demographics_race2010standard}
\title{Builds a synthetic variable for education attainment}
\usage{
build_demographics_race2010standard(Data)
}
\des... |
#setting working directory
setwd("EDA/project2")
# Reading the NEI & SCC data
NEI <- readRDS("summaryScc_PM25.rds")
SCC <- readRDS("Source_classification_Code.rds")
# Subseting NEI data for Baltimore's fip.
baltimoreNEI <- NEI[NEI$fips=="24510", ]
#Aggregate using sum the Baltimore emissions data by year
TotalBalt... | /plot2.R | no_license | kumar-amit05/Exploratory-Data-Analysis-R-Project | R | false | false | 625 | r | #setting working directory
setwd("EDA/project2")
# Reading the NEI & SCC data
NEI <- readRDS("summaryScc_PM25.rds")
SCC <- readRDS("Source_classification_Code.rds")
# Subseting NEI data for Baltimore's fip.
baltimoreNEI <- NEI[NEI$fips=="24510", ]
#Aggregate using sum the Baltimore emissions data by year
TotalBalt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/continuous_functions_1-1.R
\name{pchaz}
\alias{pchaz}
\title{Calculate survival for piecewise constant hazard}
\usage{
pchaz(Tint, lambda)
}
\arguments{
\item{Tint}{vector of length \eqn{k+1}, for the boundaries of \eqn{k} time intervals (pre... | /man/pchaz.Rd | no_license | cran/nph | R | false | true | 2,841 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/continuous_functions_1-1.R
\name{pchaz}
\alias{pchaz}
\title{Calculate survival for piecewise constant hazard}
\usage{
pchaz(Tint, lambda)
}
\arguments{
\item{Tint}{vector of length \eqn{k+1}, for the boundaries of \eqn{k} time intervals (pre... |
context("eol_dataobjects")
test_that("eol_dataobjects with taxonomy TRUE", {
skip_on_cran()
vcr::use_cassette("eol_dataobjects", {
temp <- sm(eol_dataobjects(id = "7561533", verbose = FALSE))
}, preserve_exact_body_bytes = TRUE)
expect_is(temp, "list")
expect_is(temp$taxonconcepts$scientificname, "chara... | /tests/testthat/test-eol_dataobjects.R | permissive | ropensci/taxize | R | false | false | 901 | r | context("eol_dataobjects")
test_that("eol_dataobjects with taxonomy TRUE", {
skip_on_cran()
vcr::use_cassette("eol_dataobjects", {
temp <- sm(eol_dataobjects(id = "7561533", verbose = FALSE))
}, preserve_exact_body_bytes = TRUE)
expect_is(temp, "list")
expect_is(temp$taxonconcepts$scientificname, "chara... |
# name : utils.R
# description : Utility file (to load libraries etc)
# maintainer : Arnob L. Alam <aa2288a@student.american.edu>
# updated : 2016-05-11
#
# Utility file to load required libraries, helpful functions, etc.
message("Processing util files")
# Load the logging library
library(futile.l... | /R/utils.R | no_license | arnoblalam/risk_sharing | R | false | false | 501 | r | # name : utils.R
# description : Utility file (to load libraries etc)
# maintainer : Arnob L. Alam <aa2288a@student.american.edu>
# updated : 2016-05-11
#
# Utility file to load required libraries, helpful functions, etc.
message("Processing util files")
# Load the logging library
library(futile.l... |
# dane z WHO
# http://apps.who.int/gho/data/view.main.CBDR2040
library(openxlsx)
library(SmarterPoland)
head(countries)
# dotplot
plD <- ggplot(countries, aes(x = continent, y = birth.rate)) +
geom_dotplot(binaxis = "y", stackdir = "center", binwidth = 0.7) +
theme_bw()
ggsave(plD, filename = "geomDotplot.pdf",... | /GrammarOfGraphics/birth_death_rate/punkty.R | no_license | pbiecek/Eseje | R | false | false | 1,754 | r | # dane z WHO
# http://apps.who.int/gho/data/view.main.CBDR2040
library(openxlsx)
library(SmarterPoland)
head(countries)
# dotplot
plD <- ggplot(countries, aes(x = continent, y = birth.rate)) +
geom_dotplot(binaxis = "y", stackdir = "center", binwidth = 0.7) +
theme_bw()
ggsave(plD, filename = "geomDotplot.pdf",... |
library(dplyr)
library(sf)
# Loading topography data frame ----
topoESQ_comp <- read.csv("Files/Topo_estacas_E.csv") %>%
select(-1) %>%
rename(height = Altura,
side = Lado)
# Joins by topography ----
Estacas_1m <- as_tibble(st_read("Files/ESTACAS_1m_EFC_0-871_Policonic_SIRGAS.shp"))
ESQ <- left_join... | /Topography.R | no_license | rdornas/raileco | R | false | false | 1,364 | r | library(dplyr)
library(sf)
# Loading topography data frame ----
topoESQ_comp <- read.csv("Files/Topo_estacas_E.csv") %>%
select(-1) %>%
rename(height = Altura,
side = Lado)
# Joins by topography ----
Estacas_1m <- as_tibble(st_read("Files/ESTACAS_1m_EFC_0-871_Policonic_SIRGAS.shp"))
ESQ <- left_join... |
\name{evilRegex}
\alias{evilRegex}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Evil Regular Expressions
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
evilRegex(x)
}
%- maybe also 'usage' for other objects documented here.
\argu... | /evilRegex/man/evilRegex.Rd | no_license | Mark-Nawar/evilRegex | R | false | false | 1,471 | rd | \name{evilRegex}
\alias{evilRegex}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Evil Regular Expressions
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
evilRegex(x)
}
%- maybe also 'usage' for other objects documented here.
\argu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analytics-report.R
\name{sf_create_report}
\alias{sf_create_report}
\title{Create a report}
\usage{
sf_create_report(
name = NULL,
report_type = NULL,
report_metadata = NULL,
verbose = FALSE
)
}
\arguments{
\item{name}{\code{character... | /man/sf_create_report.Rd | permissive | carlganz/salesforcer | R | false | true | 3,824 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analytics-report.R
\name{sf_create_report}
\alias{sf_create_report}
\title{Create a report}
\usage{
sf_create_report(
name = NULL,
report_type = NULL,
report_metadata = NULL,
verbose = FALSE
)
}
\arguments{
\item{name}{\code{character... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{summarizeAlgoPerf}
\alias{summarizeAlgoPerf}
\title{Creates summary data.frame for algorithm performance values across all instances.}
\usage{
summarizeAlgoPerf(asscenario, measure)
}
\arguments{
\item{asscenario}{[\code{\link{ASScenario}}]\cr
Algorithm selecti... | /algselbench/man/summarizeAlgoPerf.Rd | no_license | berndbischl/coseal-algsel-benchmark-repo | R | false | false | 564 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{summarizeAlgoPerf}
\alias{summarizeAlgoPerf}
\title{Creates summary data.frame for algorithm performance values across all instances.}
\usage{
summarizeAlgoPerf(asscenario, measure)
}
\arguments{
\item{asscenario}{[\code{\link{ASScenario}}]\cr
Algorithm selecti... |
#' Fast GlmmSeq Analysis
#'
#' @author George Gruehnagen (Georgia Institute of Technology) and Zachary Johnson (Emory)
#'
#' @param obj Seurat object
#' @param cells cells to run the analysis on
#' @param subset.genes.by genes to subset results by
#' @param sequenced.genes the gene_list paramater from dndscv, which is ... | /plk_glmmseq.R | no_license | ggruenhagen3/tooth_scripts | R | false | false | 7,672 | r | #' Fast GlmmSeq Analysis
#'
#' @author George Gruehnagen (Georgia Institute of Technology) and Zachary Johnson (Emory)
#'
#' @param obj Seurat object
#' @param cells cells to run the analysis on
#' @param subset.genes.by genes to subset results by
#' @param sequenced.genes the gene_list paramater from dndscv, which is ... |
Rates.BTC <- list()
for (n in names(Rates)) {
Rates.BTC[[n]] <- Rates[[n]]$BTC[
, .(Cur=as.character(n),
DateTime.c=as.character(DateTime),
RateSat=as.integer(as.numeric(Close)*1e8),
RateBTC=as.numeric(Close))
]
}
Rates.BTC <- rbindlist(Rates.BTC)
Rates.BTC[, DateTime := as.POSIXct(Da... | /RatesAgg.R | no_license | Ming-Tang/CryptoBalances | R | false | false | 1,099 | r | Rates.BTC <- list()
for (n in names(Rates)) {
Rates.BTC[[n]] <- Rates[[n]]$BTC[
, .(Cur=as.character(n),
DateTime.c=as.character(DateTime),
RateSat=as.integer(as.numeric(Close)*1e8),
RateBTC=as.numeric(Close))
]
}
Rates.BTC <- rbindlist(Rates.BTC)
Rates.BTC[, DateTime := as.POSIXct(Da... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-5.59219752037005e+72, -1.06823407896587e-87, -4.25255837648531e+71, 1.7951202446173e-155, -8.18790345762274e-12, -4.84876319029531e+202, -3.96895588925774e+304, -1.15261897385914e+41, -4.16286459815484e-108, -2.95899697222989e+94, 0, 0, 0, 0, 0, 0, 0, 0... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615860188-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 411 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-5.59219752037005e+72, -1.06823407896587e-87, -4.25255837648531e+71, 1.7951202446173e-155, -8.18790345762274e-12, -4.84876319029531e+202, -3.96895588925774e+304, -1.15261897385914e+41, -4.16286459815484e-108, -2.95899697222989e+94, 0, 0, 0, 0, 0, 0, 0, 0... |
# File-Name: r_tests.R
# Date: 2009-07-23
# Author: Drew Conway
# Purpose: Test the speed of R's igraph package on CPU taxing network operations
# Data Used: BA_10000.txt
# Packages Used: ig... | /R/SNA in R Talk - Supporting Code/r_tests.R | permissive | ktargows/ZIA | R | false | false | 1,626 | r | # File-Name: r_tests.R
# Date: 2009-07-23
# Author: Drew Conway
# Purpose: Test the speed of R's igraph package on CPU taxing network operations
# Data Used: BA_10000.txt
# Packages Used: ig... |
# library(testthat); library(parallelRemake);
context("Collation")
source("utils.R")
files = c("code.R", "data.csv", "Makefile", paste0("plot", 1:3, ".pdf"),
paste0("remake", c("", 2:5, "_data"), ".yml"), "collated_remake.yml")
collation = function(){
any(grepl("collated", list.files()))
}
write_colla... | /tests/testthat/test-collation.R | no_license | jmpasmoi/parallelRemake | R | false | false | 1,721 | r | # library(testthat); library(parallelRemake);
context("Collation")
source("utils.R")
files = c("code.R", "data.csv", "Makefile", paste0("plot", 1:3, ".pdf"),
paste0("remake", c("", 2:5, "_data"), ".yml"), "collated_remake.yml")
collation = function(){
any(grepl("collated", list.files()))
}
write_colla... |
library(dplyr)
library(tidyselect)
library(tidyr)
library(magrittr)
library(similR)
library(igraph)
library(ggplot2)
# List of statistics that will be used
statistics <- c(
`Hamman (S)` = "shamann",
`Hamming (D)` = "dhamming",
`Mean Manhattan (D)` = "dmh",
`Michael (S)` = "smichae... | /data/accuracy.R | no_license | muriteams/css-and-ci | R | false | false | 4,675 | r | library(dplyr)
library(tidyselect)
library(tidyr)
library(magrittr)
library(similR)
library(igraph)
library(ggplot2)
# List of statistics that will be used
statistics <- c(
`Hamman (S)` = "shamann",
`Hamming (D)` = "dhamming",
`Mean Manhattan (D)` = "dmh",
`Michael (S)` = "smichae... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/date_to_cohort.R
\name{date_to_cohort_quarter}
\alias{date_to_cohort_quarter}
\title{Convert dates to quarter (three-month) cohorts}
\usage{
date_to_cohort_quarter(date)
}
\arguments{
\item{date}{Dates of events defining cohorts (typically bi... | /man/date_to_cohort_quarter.Rd | permissive | bayesiandemography/demprep | R | false | true | 1,566 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/date_to_cohort.R
\name{date_to_cohort_quarter}
\alias{date_to_cohort_quarter}
\title{Convert dates to quarter (three-month) cohorts}
\usage{
date_to_cohort_quarter(date)
}
\arguments{
\item{date}{Dates of events defining cohorts (typically bi... |
# World_Petroleum Imports to US by Country_1973-2014 #
# ---------------------------------------------------------------
# INPUT DATA ----------------------------------------------------
# ---------------------------------------------------------------
file.loc = '/Users/MEAS/GitHub/ene505-figures' # location of... | /scripts/archive/old_original/World_Petroleum Imports to US by Country_1973-2014.R | no_license | S3researchUSC/ene505-figures | R | false | false | 11,279 | r | # World_Petroleum Imports to US by Country_1973-2014 #
# ---------------------------------------------------------------
# INPUT DATA ----------------------------------------------------
# ---------------------------------------------------------------
file.loc = '/Users/MEAS/GitHub/ene505-figures' # location of... |
#'
#' @name GOCluster
#' @title Circular dendrogram.
#' @description GOCluster generates a circular dendrogram of the \code{data}
#' clustering using by default euclidean distance and average linkage.The
#' inner ring displays the color coded logFC while the outside one encodes the
#' assigned terms to e... | /R/GOCluster.R | no_license | Gzwang1125/wencke.github.io | R | false | false | 17,456 | r | #'
#' @name GOCluster
#' @title Circular dendrogram.
#' @description GOCluster generates a circular dendrogram of the \code{data}
#' clustering using by default euclidean distance and average linkage.The
#' inner ring displays the color coded logFC while the outside one encodes the
#' assigned terms to e... |
################
# Create crisis/political institutions distributions graphs
# Christopher Gandrud
# 20 February 2014
################
library(foreign)
library(ggplot2)
library(gridExtra)
library(reshape2)
Main <- read.dta('/git_repositories/CrisisDataIssues/data/KeeferExtended.dta')
LV <- subset(Main, LV2012_Fiscal ... | /source/ExplorerStage/CrisisDistributionsGraphs.R | no_license | christophergandrud/CrisisDataIssues | R | false | false | 4,089 | r | ################
# Create crisis/political institutions distributions graphs
# Christopher Gandrud
# 20 February 2014
################
library(foreign)
library(ggplot2)
library(gridExtra)
library(reshape2)
Main <- read.dta('/git_repositories/CrisisDataIssues/data/KeeferExtended.dta')
LV <- subset(Main, LV2012_Fiscal ... |
#Normal Reference Distribution Plot for Weight of Chickens Example:
x = c(156,162,168,182,186,190,190,196,202,210,214,220,226,
230,230,236,236,242,246,270)
n = length(x)
x = sort(x)
i = seq(1:n)
u = (i-.5)/n
z = qnorm(u)
#postscript("refdist,chicken.ps",height=8,horizontal=F)
plot(z,x,datax=F,plot=T,xlab=... | /tamu/basic_stat/R/normalrefplot.R | no_license | sadepu1915/data-science | R | false | false | 510 | r | #Normal Reference Distribution Plot for Weight of Chickens Example:
x = c(156,162,168,182,186,190,190,196,202,210,214,220,226,
230,230,236,236,242,246,270)
n = length(x)
x = sort(x)
i = seq(1:n)
u = (i-.5)/n
z = qnorm(u)
#postscript("refdist,chicken.ps",height=8,horizontal=F)
plot(z,x,datax=F,plot=T,xlab=... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RILStEp.R
\name{check_epistasis2}
\alias{check_epistasis2}
\title{Calculate BayesFactor for Comparison between Model1 (without Epistasis) vs Model2 (with Epistasis)}
\usage{
check_epistasis2(
pair_index,
genotype_phenotype_dataset,
phen... | /man/check_epistasis2.Rd | permissive | slt666666/RILStEp | R | false | true | 760 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RILStEp.R
\name{check_epistasis2}
\alias{check_epistasis2}
\title{Calculate BayesFactor for Comparison between Model1 (without Epistasis) vs Model2 (with Epistasis)}
\usage{
check_epistasis2(
pair_index,
genotype_phenotype_dataset,
phen... |
#' Are you sure?
#'
#' This function asks you interactively for permission to continue or not. You
#' can specify a custom message before the question and also different messages
#' for a both a positive and negative answer.
#'
#' If you run this function in non-interactive mode, you should pass an
#' automatic answer ... | /R/sure.R | permissive | ramiromagno/gwasrapidd | R | false | false | 1,857 | r | #' Are you sure?
#'
#' This function asks you interactively for permission to continue or not. You
#' can specify a custom message before the question and also different messages
#' for a both a positive and negative answer.
#'
#' If you run this function in non-interactive mode, you should pass an
#' automatic answer ... |
# By default set time_scale_template_options to time_scale_template()
.onLoad = function(libname, pkgname) {
options(
time_scale_template = time_scale_template()
)
}
.onAttach <- function(libname, pkgname) {
bsu_rule_color <- "#2c3e50"
bsu_main_color <- "#1f78b4"
# Check Theme: If Dark, ... | /R/zzz.R | no_license | iMarcello/anomalize | R | false | false | 968 | r |
# By default set time_scale_template_options to time_scale_template()
.onLoad = function(libname, pkgname) {
options(
time_scale_template = time_scale_template()
)
}
.onAttach <- function(libname, pkgname) {
bsu_rule_color <- "#2c3e50"
bsu_main_color <- "#1f78b4"
# Check Theme: If Dark, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/inference.R
\name{jackknife_se_multi}
\alias{jackknife_se_multi}
\title{Compute standard errors using the jackknife}
\usage{
jackknife_se_multi(multisynth, relative = NULL)
}
\arguments{
\item{multisynth}{fitted multisynth object}
\item{rela... | /man/jackknife_se_multi.Rd | permissive | clarkest/augsynth | R | false | true | 443 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/inference.R
\name{jackknife_se_multi}
\alias{jackknife_se_multi}
\title{Compute standard errors using the jackknife}
\usage{
jackknife_se_multi(multisynth, relative = NULL)
}
\arguments{
\item{multisynth}{fitted multisynth object}
\item{rela... |
setwd("~/r-workspace/comp-stats/hw2/")
data <- read.delim("finanzas.dat")
colnames(data) <- c("Compania", "Ganancia", "Libros", "Precio")
library(ggplot2)
ggplot(data, aes(x=Libros,y=Ganancia)) +
geom_point() + geom_smooth()
## =====================================================
## == 2. Datos de accione... | /hw2/2.R | no_license | alfonsokim/comp-stat-class | R | false | false | 7,534 | r | setwd("~/r-workspace/comp-stats/hw2/")
data <- read.delim("finanzas.dat")
colnames(data) <- c("Compania", "Ganancia", "Libros", "Precio")
library(ggplot2)
ggplot(data, aes(x=Libros,y=Ganancia)) +
geom_point() + geom_smooth()
## =====================================================
## == 2. Datos de accione... |
setwd("~/Dropbox/Yeast_Time_Series/Revisions_1/SOM/")
#list of sigs
Full <- read.table("~/Dropbox/Yeast_Time_Series/Revisions_1/Regression/Pval_table_13tp_ModelA.txt", header = TRUE)
Full$p.week <- -log10(Full$p.week)
sig_snps <- subset(Full, p.week >= 7)
sig_list <- data.frame(sig_snps$chr, sig_snps$pos)
colnames(sig... | /SOM/Sig_SOM_Table_13tp.R | no_license | mphillips67/DeepSeq_TimeSeries_Project | R | false | false | 3,024 | r | setwd("~/Dropbox/Yeast_Time_Series/Revisions_1/SOM/")
#list of sigs
Full <- read.table("~/Dropbox/Yeast_Time_Series/Revisions_1/Regression/Pval_table_13tp_ModelA.txt", header = TRUE)
Full$p.week <- -log10(Full$p.week)
sig_snps <- subset(Full, p.week >= 7)
sig_list <- data.frame(sig_snps$chr, sig_snps$pos)
colnames(sig... |
#' build a long data frame with useful information about the genotypes
#'
#' **Warning**: very memory intensive, only use on small datasets/subsets
#'
#' @keywords internal
bed_convert_genotypes_to_data_frame <- function(bo, subset = TRUE) {
genos <- bed_genotypes(bo, subset)
genos_str <- bed_genotypes_as_strings(... | /plinker/R/convert.R | no_license | quartzbio/plinker_pkg | R | false | false | 847 | r |
#' build a long data frame with useful information about the genotypes
#'
#' **Warning**: very memory intensive, only use on small datasets/subsets
#'
#' @keywords internal
bed_convert_genotypes_to_data_frame <- function(bo, subset = TRUE) {
genos <- bed_genotypes(bo, subset)
genos_str <- bed_genotypes_as_strings(... |
\name{summary.boral}
\alias{summary.boral}
\alias{print.summary.boral}
\title{Summary of fitted boral object}
\description{A summary of the fitted boral objects including the type of model fitted e.g., error distribution, number of latent variables parameter estimates, values of the information criteria (if applicab... | /man/summary.boral.Rd | no_license | mbedward/boral | R | false | false | 1,702 | rd | \name{summary.boral}
\alias{summary.boral}
\alias{print.summary.boral}
\title{Summary of fitted boral object}
\description{A summary of the fitted boral objects including the type of model fitted e.g., error distribution, number of latent variables parameter estimates, values of the information criteria (if applicab... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810533503224e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613110050-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 257 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810533503224e+146, 4.12396251261199e-221, 0, 0, 0), .Dim = c(1L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adaps.R
\encoding{UTF-8}
\name{adaps}
\alias{adaps}
\alias{adapsBATCH}
\alias{adaps2}
\title{adaps, adaps2, and adapsBATCH}
\source{
\enumerate{
\item r - How can I check if a file is empty? - Stack Overflow answered by Konrad Rudolph and ... | /man/adaps.Rd | permissive | cran/ie2misc | R | false | true | 6,165 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adaps.R
\encoding{UTF-8}
\name{adaps}
\alias{adaps}
\alias{adapsBATCH}
\alias{adaps2}
\title{adaps, adaps2, and adapsBATCH}
\source{
\enumerate{
\item r - How can I check if a file is empty? - Stack Overflow answered by Konrad Rudolph and ... |
##' Robin Elahi
##' 16 April 2016
##' foreach
##'
##'
library(foreach)
# the default output of foreach is a list
x <- foreach(i = 1:3) %do% sqrt(i)
x
x <- foreach(a = 1:3, b = rep(10, 3)) %do% (a + b)
x
x <- foreach(a = 1:1000, b = rep(10, 2)) %do% {
a + b
}
x
##### Using .combine #####
# Combining numeric o... | /foreach-lesson.R | permissive | elahi/coding | R | false | false | 897 | r | ##' Robin Elahi
##' 16 April 2016
##' foreach
##'
##'
library(foreach)
# the default output of foreach is a list
x <- foreach(i = 1:3) %do% sqrt(i)
x
x <- foreach(a = 1:3, b = rep(10, 3)) %do% (a + b)
x
x <- foreach(a = 1:1000, b = rep(10, 2)) %do% {
a + b
}
x
##### Using .combine #####
# Combining numeric o... |
setGeneric("boxPlot", signature=c("Object", "covariate1", "covariate2"),
function(Object, covariate1, covariate2, file="boxplots.pdf")
standardGeneric("boxPlot"))
setMethod("boxPlot", signature=c("Dataset", "character", "missing"),
function(Object, covariate1, file="boxplots.pdf") {
pdf(file)
for(i in ... | /R/boxPlot.R | no_license | zzxxyui/metadarclean | R | false | false | 1,624 | r | setGeneric("boxPlot", signature=c("Object", "covariate1", "covariate2"),
function(Object, covariate1, covariate2, file="boxplots.pdf")
standardGeneric("boxPlot"))
setMethod("boxPlot", signature=c("Dataset", "character", "missing"),
function(Object, covariate1, file="boxplots.pdf") {
pdf(file)
for(i in ... |
library(evolqg)
### Name: MonteCarloRep
### Title: Parametric repeatabilities with covariance or correlation
### matrices
### Aliases: MonteCarloRep
### Keywords: montecarlo parametricsampling repeatability
### ** Examples
cov.matrix <- RandomMatrix(5, 1, 1, 10)
MonteCarloRep(cov.matrix, sample.size = 30, Random... | /data/genthat_extracted_code/evolqg/examples/MonteCarloRep.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,108 | r | library(evolqg)
### Name: MonteCarloRep
### Title: Parametric repeatabilities with covariance or correlation
### matrices
### Aliases: MonteCarloRep
### Keywords: montecarlo parametricsampling repeatability
### ** Examples
cov.matrix <- RandomMatrix(5, 1, 1, 10)
MonteCarloRep(cov.matrix, sample.size = 30, Random... |
library(dplyr)
##################################################################
#
# Processing Script for MOVING all CMT/CAPT Science data
# Created by Jenna Daly
# On 03/22/2017
#
##################################################################
#Setup environment
sub_folders <- list.files()
raw_from_github_locat... | /move_raw_CMT.R | no_license | CT-Data-Collaborative/edsight-data-setup | R | false | false | 1,843 | r | library(dplyr)
##################################################################
#
# Processing Script for MOVING all CMT/CAPT Science data
# Created by Jenna Daly
# On 03/22/2017
#
##################################################################
#Setup environment
sub_folders <- list.files()
raw_from_github_locat... |
library(tidyverse)
library(rvest)
library(lubridate)
get_year_page <- function(year) {
"http://www.ecb.europa.eu/press/key/date/%s/html/index.en.html" %>%
sprintf(year) %>%
read_html()
}
get_date <- . %>%
html_nodes("dt") %>%
html_text() %>%
dmy()
get_title <- . %>%
html_nodes("dd > span.doc-title"... | /scripts/get_ecb_speeches.R | no_license | fangduan/scraping_workshop | R | false | false | 1,436 | r | library(tidyverse)
library(rvest)
library(lubridate)
get_year_page <- function(year) {
"http://www.ecb.europa.eu/press/key/date/%s/html/index.en.html" %>%
sprintf(year) %>%
read_html()
}
get_date <- . %>%
html_nodes("dt") %>%
html_text() %>%
dmy()
get_title <- . %>%
html_nodes("dd > span.doc-title"... |
library(caret)
library(ggplot2)
library(doParallel) ##Begin start of parallel processing
cl <- makePSOCKcluster(5)
registerDoParallel(cl)##end start of parallel processing
set.seed(107)
train <- read.csv("lab4-train.csv",
head = TRUE,
sep = ",")
test <- read.csv("lab4-test.csv",
... | /RF_and_AdaBoost_M1.R | no_license | JohnRachid/EnsembleLearning | R | false | false | 1,771 | r | library(caret)
library(ggplot2)
library(doParallel) ##Begin start of parallel processing
cl <- makePSOCKcluster(5)
registerDoParallel(cl)##end start of parallel processing
set.seed(107)
train <- read.csv("lab4-train.csv",
head = TRUE,
sep = ",")
test <- read.csv("lab4-test.csv",
... |
% Generated by roxygen2 (4.0.0): do not edit by hand
\name{log.phi.nbp}
\alias{log.phi.nbp}
\title{(private) A NBP dispersion model}
\usage{
\method{log}{phi.nbp}(par, pi, pi.offset = 1e-04)
}
\arguments{
\item{par}{a vector of length 2, the intercept and the slope of the log linear model (see Details).}
\item{pi}{a v... | /man/log.phi.nbp.Rd | no_license | diystat/NBPSeq | R | false | false | 859 | rd | % Generated by roxygen2 (4.0.0): do not edit by hand
\name{log.phi.nbp}
\alias{log.phi.nbp}
\title{(private) A NBP dispersion model}
\usage{
\method{log}{phi.nbp}(par, pi, pi.offset = 1e-04)
}
\arguments{
\item{par}{a vector of length 2, the intercept and the slope of the log linear model (see Details).}
\item{pi}{a v... |
# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
.mult3sum <- function(x, y, z) {
.Call('lifecontingencies_mult3sum', PACKAGE = 'lifecontingencies', x, y, z)
}
.mult2sum <- function(x, y) {
.Call('lifecontingencies_mult2sum', PACKAGE = 'lifecontingen... | /R/RcppExports.R | no_license | MachariaK/lifecontingencies | R | false | false | 1,000 | r | # This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
.mult3sum <- function(x, y, z) {
.Call('lifecontingencies_mult3sum', PACKAGE = 'lifecontingencies', x, y, z)
}
.mult2sum <- function(x, y) {
.Call('lifecontingencies_mult2sum', PACKAGE = 'lifecontingen... |
myapp = oauth_app("interestspark",
key="v1e1v1vWFp2l1bDoGE6xDiqHQ",secret="sHv0OZioBa2Xi4I4jmwmCM1f9B4ubvMJ6tcCT7LZScnuaa8rXS")
sig = sign_oauth1.0(myapp,
token = "3183904713-9Ct7VXRJdAJvL1o5HILwRncG2RKSKGbpM6tWwbS",
token_secret = "iHYzXNfjWaZXzV47fgRI9XX8SUKls... | /Coursera Data Science class codes/Getting and cleaning data/20150419 Reading APIs.R | no_license | rsankowski/usefulRcodes | R | false | false | 536 | r | myapp = oauth_app("interestspark",
key="v1e1v1vWFp2l1bDoGE6xDiqHQ",secret="sHv0OZioBa2Xi4I4jmwmCM1f9B4ubvMJ6tcCT7LZScnuaa8rXS")
sig = sign_oauth1.0(myapp,
token = "3183904713-9Ct7VXRJdAJvL1o5HILwRncG2RKSKGbpM6tWwbS",
token_secret = "iHYzXNfjWaZXzV47fgRI9XX8SUKls... |
# if (!requireNamespace("BiocManager", quietly = TRUE))
# install.packages("BiocManager")
# BiocManager::install("monocle", version = "3.8")
trajectory_seurat <- SubsetData(Seuratset, ident.use = c(0:3))
trajectory_seurat@raw.data <- trajectory_seurat@raw.data[, rownames(trajectory_seurat@meta.data)]
gene_an... | /source/Practice_set.2/pipeline_2_monocle2.R | no_license | mgood2/BIML-2019-SingleCellRNAseq- | R | false | false | 4,381 | r | # if (!requireNamespace("BiocManager", quietly = TRUE))
# install.packages("BiocManager")
# BiocManager::install("monocle", version = "3.8")
trajectory_seurat <- SubsetData(Seuratset, ident.use = c(0:3))
trajectory_seurat@raw.data <- trajectory_seurat@raw.data[, rownames(trajectory_seurat@meta.data)]
gene_an... |
bibentries = c( # nolint start
breiman_2001 = bibentry("article",
title = "Random Forests",
author = "Breiman, Leo",
year = "2001",
journal = "Machine Learning",
volume = "45",
number = "1",
pages = "5--32",
doi = "10.1023/A:1010933404324"... | /R/bibentries.R | no_license | A-Pai/mlr3extralearners | R | false | false | 2,353 | r | bibentries = c( # nolint start
breiman_2001 = bibentry("article",
title = "Random Forests",
author = "Breiman, Leo",
year = "2001",
journal = "Machine Learning",
volume = "45",
number = "1",
pages = "5--32",
doi = "10.1023/A:1010933404324"... |
#' @docType package
#'
#' @name icesAdvice-package
#'
#' @aliases icesAdvice
#'
#' @title Functions Related to ICES Advice
#'
#' @description
#' A collection of functions that facilitate computational steps related to
#' advice for fisheries management, according to ICES guidelines. These include
#' methods ... | /R/icesAdvice-package.R | no_license | cran/icesAdvice | R | false | false | 1,530 | r | #' @docType package
#'
#' @name icesAdvice-package
#'
#' @aliases icesAdvice
#'
#' @title Functions Related to ICES Advice
#'
#' @description
#' A collection of functions that facilitate computational steps related to
#' advice for fisheries management, according to ICES guidelines. These include
#' methods ... |
\name{quantityIndex}
\alias{quantityIndex}
\title{Calculate Quantity Indices}
\description{
Calculates a Laspeyres, Paasche or Fisher Quantity index.
}
\usage{quantityIndex( prices, quantities, base, data, method = "Laspeyres",
na.rm = FALSE, weights = FALSE, EKS = FALSE )}
\arguments{
\item{prices}{Vector ... | /branches/micEconIndexEKS/man/quantityIndex.Rd | no_license | scfmolina/micecon | R | false | false | 2,445 | rd | \name{quantityIndex}
\alias{quantityIndex}
\title{Calculate Quantity Indices}
\description{
Calculates a Laspeyres, Paasche or Fisher Quantity index.
}
\usage{quantityIndex( prices, quantities, base, data, method = "Laspeyres",
na.rm = FALSE, weights = FALSE, EKS = FALSE )}
\arguments{
\item{prices}{Vector ... |
library(tensorflow)
library(keras)
library(Rcpp)
code = "
int evaluate_win_cpp(IntegerVector board){
int winner = 0;
int tmp0 = 0;
int tmp1 = 0;
int tmp2 = 0;
int zero = -1;
for(int i = 0; i < 9; i++) {
if(board(i) == 0) {
winner = zero;
break;
}
}
for(int i = 0;i<3;i++) ... | /tic_tic_toc/tic_tac_toc_ai.R | no_license | TheoreticalEcology/MethodenSeminar | R | false | false | 7,795 | r | library(tensorflow)
library(keras)
library(Rcpp)
code = "
int evaluate_win_cpp(IntegerVector board){
int winner = 0;
int tmp0 = 0;
int tmp1 = 0;
int tmp2 = 0;
int zero = -1;
for(int i = 0; i < 9; i++) {
if(board(i) == 0) {
winner = zero;
break;
}
}
for(int i = 0;i<3;i++) ... |
## app.R ##
# I like to include commented out installation of packages to assist in reproducability
# install.packages("shinydashboard")
# install.packages("factoextra")
# install.packages("here")
# install.packages("R.utils")
# install.packages("tidyverse")
# install.packages("janitor")
# install.packages("DT")
# in... | /app.R | no_license | AshLynnMiller/fpr_final_project | R | false | false | 11,886 | r | ## app.R ##
# I like to include commented out installation of packages to assist in reproducability
# install.packages("shinydashboard")
# install.packages("factoextra")
# install.packages("here")
# install.packages("R.utils")
# install.packages("tidyverse")
# install.packages("janitor")
# install.packages("DT")
# in... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
}
## Write a short comment describing this function
> makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(... | /cachematrix.R | no_license | Chahana12/ProgrammingAssignment2 | R | false | false | 1,217 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
}
## Write a short comment describing this function
> makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit.3g.R
\name{fit.3g}
\alias{fit.3g}
\title{fit.3g}
\usage{
fit.3g(Z, pars = c(0.8, 0.1, 2, 2, 3, 0.5), weights = rep(1, dim(Z)[1]),
C = 1, fit_null = FALSE, maxit = 10000, tol = 1e-04, sgm = 0.8,
one_way = FALSE, syscov = 0, accel = TRU... | /man/fit.3g.Rd | no_license | jamesliley/subtest | R | false | true | 5,507 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit.3g.R
\name{fit.3g}
\alias{fit.3g}
\title{fit.3g}
\usage{
fit.3g(Z, pars = c(0.8, 0.1, 2, 2, 3, 0.5), weights = rep(1, dim(Z)[1]),
C = 1, fit_null = FALSE, maxit = 10000, tol = 1e-04, sgm = 0.8,
one_way = FALSE, syscov = 0, accel = TRU... |
source("/home/mr984/diversity_metrics/scripts/checkplot_initials.R")
source("/home/mr984/diversity_metrics/scripts/checkplot_inf.R")
reps<-50
outerreps<-1000
size<-rev(round(10^seq(2, 5, 0.25)))[
4
]
nc<-12
plan(strategy=multisession, workers=nc)
map(rev(1:outerreps), function(x){
start<-Sys.time()
out<-checkpl... | /scripts/checkplots_for_parallel_amarel/asy_284.R | no_license | dushoff/diversity_metrics | R | false | false | 535 | r | source("/home/mr984/diversity_metrics/scripts/checkplot_initials.R")
source("/home/mr984/diversity_metrics/scripts/checkplot_inf.R")
reps<-50
outerreps<-1000
size<-rev(round(10^seq(2, 5, 0.25)))[
4
]
nc<-12
plan(strategy=multisession, workers=nc)
map(rev(1:outerreps), function(x){
start<-Sys.time()
out<-checkpl... |
\name{date_trans}
\alias{date_trans}
\title{Transformation for dates (class Date).}
\description{
Transformation for dates (class Date).
}
\examples{
years <- seq(as.Date("1910/1/1"), as.Date("1999/1/1"), "years")
t <- date_trans()
t$trans(years)
t$inv(t$trans(years))
t$format(t$breaks(range(years)))
}
| /man/date_trans.Rd | no_license | baptiste/scales | R | false | false | 307 | rd | \name{date_trans}
\alias{date_trans}
\title{Transformation for dates (class Date).}
\description{
Transformation for dates (class Date).
}
\examples{
years <- seq(as.Date("1910/1/1"), as.Date("1999/1/1"), "years")
t <- date_trans()
t$trans(years)
t$inv(t$trans(years))
t$format(t$breaks(range(years)))
}
|
\name{loglik2}
\alias{loglik2}
\title{
Computes the survival log-likelihood
}
\description{
Computes the survival log-likelihood
}
\usage{
loglik2(theta, interimData)
}
\arguments{
\item{theta}{
the three-element vector of \eqn{(\alpha, \beta, \gamma)}
}
\item{interimData}{
The interim data
}
}
\details{
... | /man/loglik2.Rd | no_license | cran/sp23design | R | false | false | 767 | rd | \name{loglik2}
\alias{loglik2}
\title{
Computes the survival log-likelihood
}
\description{
Computes the survival log-likelihood
}
\usage{
loglik2(theta, interimData)
}
\arguments{
\item{theta}{
the three-element vector of \eqn{(\alpha, \beta, \gamma)}
}
\item{interimData}{
The interim data
}
}
\details{
... |
library(MuViCP)
### Name: get.NN
### Title: Function to find the nearest neighbours
### Aliases: get.NN
### ** Examples
require(MASS)
mu <- c(3,4)
Sigma <- rbind(c(1,0.2),c(0.2,1))
Y <- mvrnorm(20, mu = mu, Sigma = Sigma)
test <- 1:4
train <- 5:20
nn1a <- get.NN(Y, k = 3, test = 1:4, train = 5:20, dist.type =
'eucl... | /data/genthat_extracted_code/MuViCP/examples/get.NN.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 633 | r | library(MuViCP)
### Name: get.NN
### Title: Function to find the nearest neighbours
### Aliases: get.NN
### ** Examples
require(MASS)
mu <- c(3,4)
Sigma <- rbind(c(1,0.2),c(0.2,1))
Y <- mvrnorm(20, mu = mu, Sigma = Sigma)
test <- 1:4
train <- 5:20
nn1a <- get.NN(Y, k = 3, test = 1:4, train = 5:20, dist.type =
'eucl... |
#' @title Unweighted Helmert Contrast Matrices
#'
#' @description
#' Returns a matrix of Helmert contrasts, scaled so that the resulting contrast
#' estimates (in an ANOVA or regression model) correspond to the difference
#' between the levels (categories) being compared. The contrasts may be computed
#' either based o... | /R/contr.helmert.unweighted.R | no_license | anc211/psycholing | R | false | false | 4,968 | r | #' @title Unweighted Helmert Contrast Matrices
#'
#' @description
#' Returns a matrix of Helmert contrasts, scaled so that the resulting contrast
#' estimates (in an ANOVA or regression model) correspond to the difference
#' between the levels (categories) being compared. The contrasts may be computed
#' either based o... |
#Chapter 9, 9.1.2
#Biological Computing Boot Camp
#R Studio Version 1.1.383 ubuntu 16.04 LTS 64bi
#Author Petra Guy 26th October 2017
rm(list = ls())
Mydf = read.csv("../Data/EcolArchives-E089-51-D1.csv")
library(lattice)
# plot graphs and output to pdfs
pdf("../Results/Prey_Lattice.pdf", # Open blank pdf page
1... | /Week3/Code/PP_Lattice.R | no_license | PetraGuy/CMEECourseWork | R | false | false | 2,282 | r | #Chapter 9, 9.1.2
#Biological Computing Boot Camp
#R Studio Version 1.1.383 ubuntu 16.04 LTS 64bi
#Author Petra Guy 26th October 2017
rm(list = ls())
Mydf = read.csv("../Data/EcolArchives-E089-51-D1.csv")
library(lattice)
# plot graphs and output to pdfs
pdf("../Results/Prey_Lattice.pdf", # Open blank pdf page
1... |
library(RMySQL)
con <- dbConnect(RMySQL::MySQL(), host = "localhost", user = "root", password = "root", dbname="prod_football")
rs <- dbSendQuery(con, "select id, Date, a.GameID, a.play_id, Drive, cast(qtr as int) as qtr, TimeSecs, posteam, DefensiveTeam, if(down = 0,null,down) as down, case when play_type in ('End of... | /lv_pbp_functions.R | no_license | psrossman/hsfootball_pbp | R | false | false | 47,648 | r | library(RMySQL)
con <- dbConnect(RMySQL::MySQL(), host = "localhost", user = "root", password = "root", dbname="prod_football")
rs <- dbSendQuery(con, "select id, Date, a.GameID, a.play_id, Drive, cast(qtr as int) as qtr, TimeSecs, posteam, DefensiveTeam, if(down = 0,null,down) as down, case when play_type in ('End of... |
# yrfraction.R
# fraction of the year for a date, includes leap year
# type = 'monthly', 'weekly' or 'daily' (default)
# Jan 2014
yrfraction<-function(date,type='daily'){
if (type=='daily'){
if (class(date)!="Date"){stop("Date variable for annual data must be in date format, see ?Dates")}
year<-as.n... | /season/R/yrfraction.R | no_license | ingted/R-Examples | R | false | false | 929 | r | # yrfraction.R
# fraction of the year for a date, includes leap year
# type = 'monthly', 'weekly' or 'daily' (default)
# Jan 2014
yrfraction<-function(date,type='daily'){
if (type=='daily'){
if (class(date)!="Date"){stop("Date variable for annual data must be in date format, see ?Dates")}
year<-as.n... |
\name{pool.fv}
\alias{pool.fv}
\title{Pool Several Functions}
\description{
Combine several summary functions into a single function.
}
\usage{
\method{pool}{fv}(..., weights=NULL)
}
\arguments{
\item{\dots}{
Objects of class \code{"fv"}.
}
\item{weights}{
Optional numeric vector of weights for the func... | /man/pool.fv.Rd | no_license | jschedler/spatstat | R | false | false | 1,358 | rd | \name{pool.fv}
\alias{pool.fv}
\title{Pool Several Functions}
\description{
Combine several summary functions into a single function.
}
\usage{
\method{pool}{fv}(..., weights=NULL)
}
\arguments{
\item{\dots}{
Objects of class \code{"fv"}.
}
\item{weights}{
Optional numeric vector of weights for the func... |
# Objective: compute total number of unrel genomes, unrel not neuro genomes
# also, by ethnicity
date ()
Sys.info ()[c("nodename", "user")]
commandArgs ()
rm (list = ls ())
R.version.string ## "R version 3.6.1 (2019-07-05)"
cc_100 = read.csv("~/Documents/STRs/ANALYSIS/population_research/PAPER/carriers/cc_pileup_100Kg... | /population_research/reproducing_results_table1.R | no_license | kibanez/analysing_STRs | R | false | false | 5,939 | r | # Objective: compute total number of unrel genomes, unrel not neuro genomes
# also, by ethnicity
date ()
Sys.info ()[c("nodename", "user")]
commandArgs ()
rm (list = ls ())
R.version.string ## "R version 3.6.1 (2019-07-05)"
cc_100 = read.csv("~/Documents/STRs/ANALYSIS/population_research/PAPER/carriers/cc_pileup_100Kg... |
library(ape)
testtree <- read.tree("13143_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="13143_0_unrooted.txt") | /codeml_files/newick_trees_processed/13143_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("13143_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="13143_0_unrooted.txt") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/search_fun.R
\name{plot_clim}
\alias{plot_clim}
\title{Plot lat/long points on a raster map.}
\usage{
plot_clim(ext_ob, clim, boundaries = "", file = "", col = "red",
legend = TRUE, l.cex = 0.9)
}
\arguments{
\item{ext_ob}{A data.frame of c... | /man/plot_clim.Rd | no_license | rsh249/vegdistmod | R | false | true | 1,060 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/search_fun.R
\name{plot_clim}
\alias{plot_clim}
\title{Plot lat/long points on a raster map.}
\usage{
plot_clim(ext_ob, clim, boundaries = "", file = "", col = "red",
legend = TRUE, l.cex = 0.9)
}
\arguments{
\item{ext_ob}{A data.frame of c... |
#' Launch Shiny App For Package mixMVPLN
#'
#' A function that launches the shiny app for this package.
#' The shiny app permit to perform clustering using mixtures
#' of matrix variate Poisson-log normal (MVPLN) via
#' variational Gaussian approximations. Model selection
#' can be done using AIC, AIC3, BIC and ICL.
#'... | /R/runmixMVPLN.R | permissive | anjalisilva/mixMVPLN | R | false | false | 2,522 | r | #' Launch Shiny App For Package mixMVPLN
#'
#' A function that launches the shiny app for this package.
#' The shiny app permit to perform clustering using mixtures
#' of matrix variate Poisson-log normal (MVPLN) via
#' variational Gaussian approximations. Model selection
#' can be done using AIC, AIC3, BIC and ICL.
#'... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{gstatusbar}
\alias{.gstatusbar}
\alias{gstatusbar}
\title{constructor to add a status bar to main window}
\usage{
gstatusbar(text = "", container = NULL, ..., toolkit = guiToolkit())
.gstatusbar(toolkit, text = "", container = NULL, ...)
}
\arguments{
\item{te... | /man/gstatusbar.Rd | no_license | kghub/gWidgets2 | R | false | false | 1,295 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{gstatusbar}
\alias{.gstatusbar}
\alias{gstatusbar}
\title{constructor to add a status bar to main window}
\usage{
gstatusbar(text = "", container = NULL, ..., toolkit = guiToolkit())
.gstatusbar(toolkit, text = "", container = NULL, ...)
}
\arguments{
\item{te... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.