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
############# ## see how fav <- subset(master, line < 0) und <- subset(master, line > 0) table(fav$p + fav$line > fav$pA) ddply(fav, 'season', function(x) { table(x$p + x$line > x$pA) }) table(und$p + und$line > und$pA) ddply(und, 'season', function(x) { table(x$p + x$line > x$pA) }) # 100 + (+4.5) > 103...
/code/decommissioned/modeling/script9.R
no_license
Basketball4Nerds/nba_basketball_research
R
false
false
8,599
r
############# ## see how fav <- subset(master, line < 0) und <- subset(master, line > 0) table(fav$p + fav$line > fav$pA) ddply(fav, 'season', function(x) { table(x$p + x$line > x$pA) }) table(und$p + und$line > und$pA) ddply(und, 'season', function(x) { table(x$p + x$line > x$pA) }) # 100 + (+4.5) > 103...
#' S3 method to plot objects of class \code{clme} #' #' @description Generates a basic plot of estimated coefficients which are subject to constraints (\eqn{\theta_1}{theta_1} ). Lines indicate individual constraints (not global tests) and significance. #' #' @inheritParams plot.summary.clme #' #' @note #' While it i...
/CLME/R/plot.clme.r
no_license
ingted/R-Examples
R
false
false
8,106
r
#' S3 method to plot objects of class \code{clme} #' #' @description Generates a basic plot of estimated coefficients which are subject to constraints (\eqn{\theta_1}{theta_1} ). Lines indicate individual constraints (not global tests) and significance. #' #' @inheritParams plot.summary.clme #' #' @note #' While it i...
#=======Was Tyrannosaurus Rex Warm-Blooded?======= library(tidyr) library(dplyr) library(ggplot2) setwd('D:/ESE5023/ESE5023_Assignments/Data') DATA <- read.csv("Tyrannosaurus.csv",header = T) DATA <- as_tibble(DATA) DATA anova_one_way <- aov(value~factor(name), data = DATA) summary(anova_one_way)
/PS3/PS3_2.R
no_license
violentelder/ESE5023_Assignments
R
false
false
308
r
#=======Was Tyrannosaurus Rex Warm-Blooded?======= library(tidyr) library(dplyr) library(ggplot2) setwd('D:/ESE5023/ESE5023_Assignments/Data') DATA <- read.csv("Tyrannosaurus.csv",header = T) DATA <- as_tibble(DATA) DATA anova_one_way <- aov(value~factor(name), data = DATA) summary(anova_one_way)
# Copyright (C) Kevin R. Coombes, 2007-2016 # A "pipeline" represents a series of processors that should be applied # in order. You should think of a pipeline as a completely defined set # of transformations that is applied uniformly to every microarray in # the set. setClass('Pipeline', slots = c(pr...
/R/b06-pipeline.R
no_license
cran/PreProcess
R
false
false
1,664
r
# Copyright (C) Kevin R. Coombes, 2007-2016 # A "pipeline" represents a series of processors that should be applied # in order. You should think of a pipeline as a completely defined set # of transformations that is applied uniformly to every microarray in # the set. setClass('Pipeline', slots = c(pr...
context("compileDecisionModel") Net <- HydeNetwork(~ wells + pe | wells + d.dimer | pregnant*pe + angio | pe + treat | d.dimer*angio + death | pe*treat, data = PE) %>% setDecisionNodes...
/HydeNet/tests/testthat/test_compileDecisionModel.R
no_license
ingted/R-Examples
R
false
false
458
r
context("compileDecisionModel") Net <- HydeNetwork(~ wells + pe | wells + d.dimer | pregnant*pe + angio | pe + treat | d.dimer*angio + death | pe*treat, data = PE) %>% setDecisionNodes...
# Difference Between Two Date-Times # Create two dates the_start_of_time <- as.Date("1970-01-01") the_end_of_time <- as.Date("2012-12-21") # calculate the difference in the two dates difftime(the_end_of_time, the_start_of_time, units = "auto") # calculate the difference in the two dates difftime(the_end_of_time, the...
/difference-between-two-dates.r
no_license
anhnguyendepocen/r-code-examples
R
false
false
460
r
# Difference Between Two Date-Times # Create two dates the_start_of_time <- as.Date("1970-01-01") the_end_of_time <- as.Date("2012-12-21") # calculate the difference in the two dates difftime(the_end_of_time, the_start_of_time, units = "auto") # calculate the difference in the two dates difftime(the_end_of_time, the...
library(FRegSigCom) ### Name: cv.msof ### Title: Cross-validation for linear multivariate scalar-on-function ### regression ### Aliases: cv.msof ### ** Examples ######################################################################### # Example: multiple scalar-on-function regression ############################...
/data/genthat_extracted_code/FRegSigCom/examples/cv.msof.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,012
r
library(FRegSigCom) ### Name: cv.msof ### Title: Cross-validation for linear multivariate scalar-on-function ### regression ### Aliases: cv.msof ### ** Examples ######################################################################### # Example: multiple scalar-on-function regression ############################...
# Remove al existing variables rm(list = ls()) # Load external methods and variables source("./header.R"); source("./io.R"); # Load libraries library(scatterplot3d) # https://github.com/bhaskarvk/colormap library(colormap) createDifferencePlot3D<-function(data, values_1, values_2, plot_title='', alpha=0.2){ data$d...
/visualisation/differencePlot.R
no_license
lauraBaakman/Stage-2.0
R
false
false
2,571
r
# Remove al existing variables rm(list = ls()) # Load external methods and variables source("./header.R"); source("./io.R"); # Load libraries library(scatterplot3d) # https://github.com/bhaskarvk/colormap library(colormap) createDifferencePlot3D<-function(data, values_1, values_2, plot_title='', alpha=0.2){ data$d...
hsr.avg<-hsr.quests[Measure.Names=="Average"] hsr.avg.chi <- hsr.avg[Level=="KIPP Chicago"] hsr.avg.nat <- hsr.avg[Level=="National"] setkey(hsr.avg.chi, Survey.Question, Parent.Topic, Topic.Name, Role, Measure.Names) setkey(hsr.avg.nat, Survey.Question, Parent.Topic, Topic.Name, Role, Measure.Names) hsr.avg.chinat<...
/HSR/src/hsr_all_questions_region.R
no_license
kippchicago/Data_Analysis
R
false
false
6,364
r
hsr.avg<-hsr.quests[Measure.Names=="Average"] hsr.avg.chi <- hsr.avg[Level=="KIPP Chicago"] hsr.avg.nat <- hsr.avg[Level=="National"] setkey(hsr.avg.chi, Survey.Question, Parent.Topic, Topic.Name, Role, Measure.Names) setkey(hsr.avg.nat, Survey.Question, Parent.Topic, Topic.Name, Role, Measure.Names) hsr.avg.chinat<...
## These functions will return the inverse of a matrix. However, they will first check to see if the inverse has already been calculated and if so it will return it from the cache. ## This function will take an inversible numeric matrix and return a list of of four items. ## The items are are for functions set, get, ...
/cachematrix.R
no_license
randyjacobus/ProgrammingAssignment2
R
false
false
1,513
r
## These functions will return the inverse of a matrix. However, they will first check to see if the inverse has already been calculated and if so it will return it from the cache. ## This function will take an inversible numeric matrix and return a list of of four items. ## The items are are for functions set, get, ...
context("Absolute change each year") library(convergEU) require(tibble) require(devtools) # debug(departure_mean) test_that("Basic tests on absolute change.", { testTB <- dplyr::tribble( ~years, ~countryA , ~countryB, ~countryC, 2000, 0.8, 2.7, 3.9, 2001, 1.2, 3.2, 4.2, 2002, ...
/tests/testthat/test_abso_change.R
no_license
krlmlr/convergEU
R
false
false
2,462
r
context("Absolute change each year") library(convergEU) require(tibble) require(devtools) # debug(departure_mean) test_that("Basic tests on absolute change.", { testTB <- dplyr::tribble( ~years, ~countryA , ~countryB, ~countryC, 2000, 0.8, 2.7, 3.9, 2001, 1.2, 3.2, 4.2, 2002, ...
### Load the data energy <- read.table("household_power_consumption.txt",sep=";",header=TRUE) ### Subset data for Feb 1 and 2 enersub <- subset(energy, energy$Date == "1/2/2007" | energy$Date == "2/2/2007") ### Check data head(enersub) ### Convert data enersub$Global_active_power <- as.numeric(as.character(enersub$Glob...
/Plot4.R
no_license
imhasan/datasciencecourse
R
false
false
2,203
r
### Load the data energy <- read.table("household_power_consumption.txt",sep=";",header=TRUE) ### Subset data for Feb 1 and 2 enersub <- subset(energy, energy$Date == "1/2/2007" | energy$Date == "2/2/2007") ### Check data head(enersub) ### Convert data enersub$Global_active_power <- as.numeric(as.character(enersub$Glob...
\name{p_gr} \alias{p_gr} \alias{p_gr} \alias{p_chart} \alias{proportion} \title{ P control chart for attributes } \description{ Calculates the \emph{p} control chart for attributes, using a sample \emph{D} of number of defectives or nonconforming items and a constant sample size \emph{n}. The values plotted in...
/man/p_gr.Rd
no_license
cran/XRSCC
R
false
false
1,737
rd
\name{p_gr} \alias{p_gr} \alias{p_gr} \alias{p_chart} \alias{proportion} \title{ P control chart for attributes } \description{ Calculates the \emph{p} control chart for attributes, using a sample \emph{D} of number of defectives or nonconforming items and a constant sample size \emph{n}. The values plotted in...
# R Code for Labs # An Introduction to Statistical Learning with Applications in R # Chapter 2 Lab: Introduction to R #http://www-bcf.usc.edu/~gareth/ISL/code.html # # Basic Commands x <- c(1,3,2,5) x x = c(1,6,2) x y = c(1,4,3) length(x) length(y) x+y ls() rm(x,y) ls() rm(list=ls()) ?matrix x=matrix(data=c(1,2,3,4),...
/l04Rbasic/AISLwithR.R
no_license
wLoup/2018R
R
false
false
28,089
r
# R Code for Labs # An Introduction to Statistical Learning with Applications in R # Chapter 2 Lab: Introduction to R #http://www-bcf.usc.edu/~gareth/ISL/code.html # # Basic Commands x <- c(1,3,2,5) x x = c(1,6,2) x y = c(1,4,3) length(x) length(y) x+y ls() rm(x,y) ls() rm(list=ls()) ?matrix x=matrix(data=c(1,2,3,4),...
test_that("read theme settings from css variables", { expected_vars <- list( background_color = "#E9EBEE", text_color = "#18273F", header_color = "#23395b", text_bold_color = "#23395b", inverse_background_color = "#23395b", inverse_text_color = "#E9EBEE", inverse_header_color = "#E9EBEE", ...
/tests/testthat/test-css.R
permissive
gadenbuie/xaringanthemer
R
false
false
4,025
r
test_that("read theme settings from css variables", { expected_vars <- list( background_color = "#E9EBEE", text_color = "#18273F", header_color = "#23395b", text_bold_color = "#23395b", inverse_background_color = "#23395b", inverse_text_color = "#E9EBEE", inverse_header_color = "#E9EBEE", ...
## Script To Run The Analysis for Peer Review Assignment ## Author: Gaurav Goyal cat("Welcome\n") cat("Please Wait it Will take Some Time\n\n") ## Reading Files X_test <- read.table(".\\UCI HAR Dataset\\test\\X_test.txt") y_test <- read.table(".\\UCI HAR Dataset\\test\\y_test.txt") subject_test <- read.table(...
/run_analysis.R
no_license
goyal1189/datasciencecoursera
R
false
false
1,769
r
## Script To Run The Analysis for Peer Review Assignment ## Author: Gaurav Goyal cat("Welcome\n") cat("Please Wait it Will take Some Time\n\n") ## Reading Files X_test <- read.table(".\\UCI HAR Dataset\\test\\X_test.txt") y_test <- read.table(".\\UCI HAR Dataset\\test\\y_test.txt") subject_test <- read.table(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/opal.file.R \name{opal.file_unzip} \alias{opal.file_unzip} \title{Unzip a zip archive file} \usage{ opal.file_unzip(opal, source, destination, key = NULL) } \arguments{ \item{opal}{Opal object.} \item{source}{Path to the file in the Opal fil...
/man/opal.file_unzip.Rd
no_license
obiba/opalr
R
false
true
1,255
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/opal.file.R \name{opal.file_unzip} \alias{opal.file_unzip} \title{Unzip a zip archive file} \usage{ opal.file_unzip(opal, source, destination, key = NULL) } \arguments{ \item{opal}{Opal object.} \item{source}{Path to the file in the Opal fil...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/processCoreSet.R \name{createAnnotation} \alias{createAnnotation} \title{The function creates FAS annotation for the fasta file of a core gene in the core set. This annotation file will be saved in each core gene folder and be used then to c...
/man/createAnnotation.Rd
permissive
giangnguyen0709/fCAT
R
false
true
1,243
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/processCoreSet.R \name{createAnnotation} \alias{createAnnotation} \title{The function creates FAS annotation for the fasta file of a core gene in the core set. This annotation file will be saved in each core gene folder and be used then to c...
% Generated by roxygen2 (4.1.0.9000): do not edit by hand % Please edit documentation in R/pkgpapply.R \name{pkgapply} \alias{pkgapply} \title{Apply an operation over several packages.} \usage{ pkgapply(packages, dir = getwd(), f) } \arguments{ \item{packages}{character. A character vector of package names. These must ...
/man/pkgapply.Rd
no_license
robertzk/packagepackage
R
false
false
1,957
rd
% Generated by roxygen2 (4.1.0.9000): do not edit by hand % Please edit documentation in R/pkgpapply.R \name{pkgapply} \alias{pkgapply} \title{Apply an operation over several packages.} \usage{ pkgapply(packages, dir = getwd(), f) } \arguments{ \item{packages}{character. A character vector of package names. These must ...
library('animation') library('ggplot2') library('gridExtra') data(iris) dt = as.data.frame(iris$Sepal.Length) m_dt = round(mean(dt$`iris$Sepal.Length`),3) set.seed(100) sum = data.frame(seq(from = 0, to = 10, by = 0.001)) sum$count = 0 colnames(sum) = c('Mean', 'Frequency') i=1 y=1 no = 10000 plots = seq(from = ...
/Sepal/Sepal.R
no_license
RobHarrand/kaggle
R
false
false
2,122
r
library('animation') library('ggplot2') library('gridExtra') data(iris) dt = as.data.frame(iris$Sepal.Length) m_dt = round(mean(dt$`iris$Sepal.Length`),3) set.seed(100) sum = data.frame(seq(from = 0, to = 10, by = 0.001)) sum$count = 0 colnames(sum) = c('Mean', 'Frequency') i=1 y=1 no = 10000 plots = seq(from = ...
################################################################################ ## ## ## Spectral (binary) file reading utilities ## ## ...
/tools/Parser_and_Converters/R/rNMR-IO/rNMR-IO.R
permissive
sneumann/NMR-ML
R
false
false
36,989
r
################################################################################ ## ## ## Spectral (binary) file reading utilities ## ## ...
# https://datahub.io/anuveyatsu/co2-ppm source web page library(ggplot2) #for plotting the results in a clear manner library(dplyr) # for manipulation on the dataset library(corrplot)# to find correlation between variable # Reading the data from file co2data<-read.csv( "../data/co2.csv", header=TRUE, na.string...
/src/co2_dataprocessing.R
no_license
Alpargata/dataprocessesgroup7.github.io
R
false
false
2,524
r
# https://datahub.io/anuveyatsu/co2-ppm source web page library(ggplot2) #for plotting the results in a clear manner library(dplyr) # for manipulation on the dataset library(corrplot)# to find correlation between variable # Reading the data from file co2data<-read.csv( "../data/co2.csv", header=TRUE, na.string...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/available.R \name{available} \alias{available} \title{See if a name is available} \usage{ available(name, ...) } \arguments{ \item{name}{Name of package to search} \item{...}{Additional arguments passed to [utils::available.packages()].} } \...
/man/available.Rd
no_license
mpadge/available
R
false
true
451
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/available.R \name{available} \alias{available} \title{See if a name is available} \usage{ available(name, ...) } \arguments{ \item{name}{Name of package to search} \item{...}{Additional arguments passed to [utils::available.packages()].} } \...
% Generated by roxygen2 (4.0.0): do not edit by hand \name{takes_less_than} \alias{takes_less_than} \title{Expectation: does expression take less than a fixed amount of time to run?} \usage{ takes_less_than(amount) } \arguments{ \item{amount}{maximum duration in seconds} } \description{ This is useful for performance r...
/man/takes_less_than.Rd
no_license
neoclem/testthat
R
false
false
1,268
rd
% Generated by roxygen2 (4.0.0): do not edit by hand \name{takes_less_than} \alias{takes_less_than} \title{Expectation: does expression take less than a fixed amount of time to run?} \usage{ takes_less_than(amount) } \arguments{ \item{amount}{maximum duration in seconds} } \description{ This is useful for performance r...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vec-new.R \name{vector-construction} \alias{vector-construction} \alias{lgl} \alias{int} \alias{dbl} \alias{cpl} \alias{chr} \alias{bytes} \title{Create vectors} \usage{ lgl(...) int(...) dbl(...) cpl(...) chr(...) bytes(...) } \argument...
/man/vector-construction.Rd
no_license
TylerGrantSmith/rlang
R
false
true
2,019
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vec-new.R \name{vector-construction} \alias{vector-construction} \alias{lgl} \alias{int} \alias{dbl} \alias{cpl} \alias{chr} \alias{bytes} \title{Create vectors} \usage{ lgl(...) int(...) dbl(...) cpl(...) chr(...) bytes(...) } \argument...
context("testing functions for the ICD-9 code function") test_that("remove_icd9_periods", { expect_equal(remove_icd9_periods("123.45"), "12345") expect_equal(remove_icd9_periods("123.4"), "1234") expect_equal(remove_icd9_periods("123"), "123") expect_equal(remove_icd9_periods(c("123.45", "234.56")), c("12345"...
/tests/testthat/test_icd9.R
permissive
ZhangAngus/mimicfilters
R
false
false
4,302
r
context("testing functions for the ICD-9 code function") test_that("remove_icd9_periods", { expect_equal(remove_icd9_periods("123.45"), "12345") expect_equal(remove_icd9_periods("123.4"), "1234") expect_equal(remove_icd9_periods("123"), "123") expect_equal(remove_icd9_periods(c("123.45", "234.56")), c("12345"...
summary.fit_t_scaled <- function( object , digits = 4 , file=NULL , ...){ fit_mdmb_distribution_summary( object=object , digits = digits , file=file , ...) }
/R/summary.fit_t_scaled.R
no_license
strategist922/mdmb
R
false
false
161
r
summary.fit_t_scaled <- function( object , digits = 4 , file=NULL , ...){ fit_mdmb_distribution_summary( object=object , digits = digits , file=file , ...) }
#' @title Query GDC data #' @description #' Uses GDC API to search for search, it searches for both controlled and #' open-acess data. #' For GDC data arguments project, data.category, data.type and workflow.type should be used #' For the legacy data arguments project, data.category, platform and/or file.extens...
/R/query.R
no_license
QiStark/TCGAbiolinks
R
false
false
30,975
r
#' @title Query GDC data #' @description #' Uses GDC API to search for search, it searches for both controlled and #' open-acess data. #' For GDC data arguments project, data.category, data.type and workflow.type should be used #' For the legacy data arguments project, data.category, platform and/or file.extens...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rfm-launch-shiny-app.R \name{rfm_launch_app} \alias{rfm_launch_app} \title{Launch shiny app} \usage{ rfm_launch_app() } \description{ Launches shiny app. } \examples{ \dontrun{ rfm_launch_app() } }
/man/rfm_launch_app.Rd
no_license
cran/rfm
R
false
true
292
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rfm-launch-shiny-app.R \name{rfm_launch_app} \alias{rfm_launch_app} \title{Launch shiny app} \usage{ rfm_launch_app() } \description{ Launches shiny app. } \examples{ \dontrun{ rfm_launch_app() } }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/evreg.R \docType{data} \name{fremantle} \alias{fremantle} \title{Annual Maximum Sea Levels at Fremantle, Western Australia} \format{A dataframe with 86 rows and 4 columns. \itemize{ \item{Column 1, \code{Year}: }{A numeric vector of yea...
/man/fremantle.Rd
no_license
pengyuwei94/evreg
R
false
true
1,219
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/evreg.R \docType{data} \name{fremantle} \alias{fremantle} \title{Annual Maximum Sea Levels at Fremantle, Western Australia} \format{A dataframe with 86 rows and 4 columns. \itemize{ \item{Column 1, \code{Year}: }{A numeric vector of yea...
#!/bin/env/Rscript library(GEOquery) library(tidyverse) options(stringsAsFactors = FALSE) # GEO accession accession <- 'GSE39754' # directory to store raw and processed data base_dir <- file.path('/data/public/human/geo', accession) raw_data_dir <- file.path(base_dir, 'raw') clean_data_dir <- file.path(base_dir, 'p...
/script/GSE39754.R
no_license
khughitt/multi-mm
R
false
false
3,367
r
#!/bin/env/Rscript library(GEOquery) library(tidyverse) options(stringsAsFactors = FALSE) # GEO accession accession <- 'GSE39754' # directory to store raw and processed data base_dir <- file.path('/data/public/human/geo', accession) raw_data_dir <- file.path(base_dir, 'raw') clean_data_dir <- file.path(base_dir, 'p...
#------------------------------------------------------ # Code for data visualization with ggplot2 class #------------------------------------------------------ library(mosaicData) library(ggplot2) # simple bar plot ggplot(data=CPS85, aes(x=sector)) + geom_bar() # stacked bar plot ggplot(data=CPS85, aes(x=sector, ...
/Code for class - CPS85.R
no_license
Rkabacoff/visclass
R
false
false
4,034
r
#------------------------------------------------------ # Code for data visualization with ggplot2 class #------------------------------------------------------ library(mosaicData) library(ggplot2) # simple bar plot ggplot(data=CPS85, aes(x=sector)) + geom_bar() # stacked bar plot ggplot(data=CPS85, aes(x=sector, ...
# Module: Data Cleaning # Task solution examples # Loading libraries require(dplyr) require(Hmisc) require(reshape2) # Get and read data furl <- "http://service.dataqualia.com/misc/2015_east.csv.zip" download.file(furl, destfile="2015_east.csv.zip") sdata <- read.csv(unz("2015_east.csv.zip", "2015_east.csv"), encodin...
/modules/rppr01_data_cleaning/data_cleaning.r
no_license
tingsyo/NCDR_r_programming
R
false
false
1,065
r
# Module: Data Cleaning # Task solution examples # Loading libraries require(dplyr) require(Hmisc) require(reshape2) # Get and read data furl <- "http://service.dataqualia.com/misc/2015_east.csv.zip" download.file(furl, destfile="2015_east.csv.zip") sdata <- read.csv(unz("2015_east.csv.zip", "2015_east.csv"), encodin...
## The functions makeCacheMatrix and cacheSolve attempt at making the costly ## processes of matrix inversion less costly by caching the calculated inverse ## matrix, so that the calculation does not need to be done every time the ## inverse is required. ## makeCacheMatrix has 4 functions: ## 1. set allows the user t...
/cachematrix.R
no_license
schatto1/ProgrammingAssignment2
R
false
false
1,534
r
## The functions makeCacheMatrix and cacheSolve attempt at making the costly ## processes of matrix inversion less costly by caching the calculated inverse ## matrix, so that the calculation does not need to be done every time the ## inverse is required. ## makeCacheMatrix has 4 functions: ## 1. set allows the user t...
## Script to extract geographic distribution for North American Tree species out of ## published shapefiles ## # Based off Nacho's code "Get_range_nam_parallel.R" # Date: 14 Jan 2020 by Cat and Dan #withr::with_makevars(c(PKG_LIBS = "-liconv"), install.packages("chillR"), assignment = "+=") # housekeeping rm(list=...
/analyses/ranges/Get_range_allnam.R
no_license
lizzieinvancouver/ospree
R
false
false
32,708
r
## Script to extract geographic distribution for North American Tree species out of ## published shapefiles ## # Based off Nacho's code "Get_range_nam_parallel.R" # Date: 14 Jan 2020 by Cat and Dan #withr::with_makevars(c(PKG_LIBS = "-liconv"), install.packages("chillR"), assignment = "+=") # housekeeping rm(list=...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SL.Yman2016.R \name{predict.SL.Yman2016} \alias{predict.SL.Yman2016} \title{Internal prediction method for SL.Yman2016} \usage{ \method{predict}{SL.Yman2016}(object, newdata, ...) } \arguments{ \item{object}{An object of class \code{Yman2016}...
/man/predict.SL.Yman2016.Rd
no_license
ben-arnold/tmleAb
R
false
true
677
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SL.Yman2016.R \name{predict.SL.Yman2016} \alias{predict.SL.Yman2016} \title{Internal prediction method for SL.Yman2016} \usage{ \method{predict}{SL.Yman2016}(object, newdata, ...) } \arguments{ \item{object}{An object of class \code{Yman2016}...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datasets.R \docType{data} \name{ElectricFish} \alias{ElectricFish} \title{Electric Fish} \format{A data frame with 12 observations on the following 3 variables. \describe{ \item{tributary}{a character vector} \item{species.upstream}{a numeric...
/man/ElectricFish.Rd
no_license
mdlama/abd
R
false
true
1,195
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datasets.R \docType{data} \name{ElectricFish} \alias{ElectricFish} \title{Electric Fish} \format{A data frame with 12 observations on the following 3 variables. \describe{ \item{tributary}{a character vector} \item{species.upstream}{a numeric...
library(shiny) library(shinyBS) library(LBSPR) library(Hmisc) library(xtable) shinyServer(function(input, output, clientData, session) { values <- reactiveValues(useDF=FALSE, default=NULL,useExamp=FALSE, ShowResults=FALSE, AssessReady=FALSE, DoneAssess=FALSE) observeEvent(input$binswidth, { values$ShowRe...
/server.r
no_license
edwinrodriguez120178/LBSPR_shiny
R
false
false
38,700
r
library(shiny) library(shinyBS) library(LBSPR) library(Hmisc) library(xtable) shinyServer(function(input, output, clientData, session) { values <- reactiveValues(useDF=FALSE, default=NULL,useExamp=FALSE, ShowResults=FALSE, AssessReady=FALSE, DoneAssess=FALSE) observeEvent(input$binswidth, { values$ShowRe...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/RunModels.R \name{RunModels} \alias{RunBootstrap} \alias{RunCV} \alias{RunModels} \title{RunModels} \usage{ RunCV(form.list, data, classifier, cv = 2, para, opt.para = FALSE, val.propo = 0.1, return.model = FALSE, varimp = TRUE, par...
/man/RunModels.Rd
no_license
nguforche/nsqipDischargeToRehab
R
false
false
4,878
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/RunModels.R \name{RunModels} \alias{RunBootstrap} \alias{RunCV} \alias{RunModels} \title{RunModels} \usage{ RunCV(form.list, data, classifier, cv = 2, para, opt.para = FALSE, val.propo = 0.1, return.model = FALSE, varimp = TRUE, par...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/present.R \docType{data} \name{present} \alias{present} \title{Male and female births in the US} \format{ A tbl_df with 74 rows and 3 variables: \describe{ \item{year}{year, ranging from 1940 to 2013} \item{boys}{number of male births} ...
/man/present.Rd
no_license
cran/statsr
R
false
true
923
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/present.R \docType{data} \name{present} \alias{present} \title{Male and female births in the US} \format{ A tbl_df with 74 rows and 3 variables: \describe{ \item{year}{year, ranging from 1940 to 2013} \item{boys}{number of male births} ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sagemaker_operations.R \name{sagemaker_delete_notebook_instance_lifecycle_config} \alias{sagemaker_delete_notebook_instance_lifecycle_config} \title{Deletes a notebook instance lifecycle configuration} \usage{ sagemaker_delete_notebook_instan...
/cran/paws.machine.learning/man/sagemaker_delete_notebook_instance_lifecycle_config.Rd
permissive
TWarczak/paws
R
false
true
758
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sagemaker_operations.R \name{sagemaker_delete_notebook_instance_lifecycle_config} \alias{sagemaker_delete_notebook_instance_lifecycle_config} \title{Deletes a notebook instance lifecycle configuration} \usage{ sagemaker_delete_notebook_instan...
source("http://bioconductor.org/biocLite.R") biocLite("affy") library("affy") #Reading the data affy.data = ReadAffy() eset.mas5 = mas5(affy.data) exprSet.nologs = exprs(eset.mas5) colnames(exprSet.nologs) #Logarithm of the Affymetrix data exprSet = log(exprSet.nologs, 2) exprSet <- as.data.frame(exprSet...
/StomatalRNAProcessing.R
no_license
Anika-Singh/Pathways-of-Stomatal-Aperture
R
false
false
5,010
r
source("http://bioconductor.org/biocLite.R") biocLite("affy") library("affy") #Reading the data affy.data = ReadAffy() eset.mas5 = mas5(affy.data) exprSet.nologs = exprs(eset.mas5) colnames(exprSet.nologs) #Logarithm of the Affymetrix data exprSet = log(exprSet.nologs, 2) exprSet <- as.data.frame(exprSet...
\name{AbsoluteFractionModern_from_Delta14C_method__numeric} \alias{AbsoluteFractionModern_from_Delta14C_method__numeric} \title{Converts from Delta14C to Absolute Fraction Modern} \description{Converts a number or vector containing Delta14C values to the appropriate Absolute Fraction Modern values. Have a look at t...
/man/5.Rd
no_license
haiyangzhang798/SoilR
R
false
false
554
rd
\name{AbsoluteFractionModern_from_Delta14C_method__numeric} \alias{AbsoluteFractionModern_from_Delta14C_method__numeric} \title{Converts from Delta14C to Absolute Fraction Modern} \description{Converts a number or vector containing Delta14C values to the appropriate Absolute Fraction Modern values. Have a look at t...
library(tidyverse) library(MASS) library(optmatch) # Read in data and view summary statistics data <- read.csv("https://raw.githubusercontent.com/dmoste/DATA621/master/hw5/wine-training-data.csv", header = TRUE) head(data) summary(data) data <- data[2:16] data <- fill.NAs(data) par(mfrow = c(4,4)) for(i in 2:15) { ...
/hw5/dmoste_hw5.R
no_license
dmoste/DATA621
R
false
false
990
r
library(tidyverse) library(MASS) library(optmatch) # Read in data and view summary statistics data <- read.csv("https://raw.githubusercontent.com/dmoste/DATA621/master/hw5/wine-training-data.csv", header = TRUE) head(data) summary(data) data <- data[2:16] data <- fill.NAs(data) par(mfrow = c(4,4)) for(i in 2:15) { ...
#' @import dplyr #' @importFrom purrr map #' @importFrom magrittr %>% #' #' @export point_biserial <- function(x) { xcols <- c("testid", "userid", "itemid", "response") stopifnot(x %hascols% xcols) x <- x %keepcols% xcols out <- map(split(x, x[["testid"]]), function(test_data) { test_name <...
/R/item_analysis_classical.R
no_license
nirmalpatel/eduminer
R
false
false
3,611
r
#' @import dplyr #' @importFrom purrr map #' @importFrom magrittr %>% #' #' @export point_biserial <- function(x) { xcols <- c("testid", "userid", "itemid", "response") stopifnot(x %hascols% xcols) x <- x %keepcols% xcols out <- map(split(x, x[["testid"]]), function(test_data) { test_name <...
# Copyright 2019 Battelle Memorial Institute; see the LICENSE file. #' module_energy_Off_road_incelas_SSP_xml #' #' Construct XML data structures for all the \code{Off_road_incelas_SSP.xml} files. #' #' @param command API command to execute #' @param ... other optional parameters, depending on command #' @return Depen...
/input/gcamdata/R/zenergy_xml_Off_road_SSP.R
permissive
JGCRI/gcam-core
R
false
false
3,172
r
# Copyright 2019 Battelle Memorial Institute; see the LICENSE file. #' module_energy_Off_road_incelas_SSP_xml #' #' Construct XML data structures for all the \code{Off_road_incelas_SSP.xml} files. #' #' @param command API command to execute #' @param ... other optional parameters, depending on command #' @return Depen...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/api_snps_queries.R \name{query_snps} \alias{query_snps} \title{Query Snps} \usage{ query_snps( name = NA, rsid = NA, chr = NA, min_bp = NA, max_bp = NA, paging = NA, ... ) } \arguments{ \item{name}{A vector of strings} \item{rs...
/man/query_snps.Rd
permissive
jaybee84/iatlas.api.client
R
false
true
547
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/api_snps_queries.R \name{query_snps} \alias{query_snps} \title{Query Snps} \usage{ query_snps( name = NA, rsid = NA, chr = NA, min_bp = NA, max_bp = NA, paging = NA, ... ) } \arguments{ \item{name}{A vector of strings} \item{rs...
# calculate RMSE scores ------------------------------------------------------ rm(list=ls()) #remove previous variable assignments # load libraries library(plyr) library(Metrics) library(reshape2) # https://www.marinedatascience.co/blog/2019/01/07/normalizing-the-rmse/ # https://github.com/saskiaotto/INDperform # fu...
/Codes/calculate_rmse.R
no_license
jms5151/EVP
R
false
false
14,032
r
# calculate RMSE scores ------------------------------------------------------ rm(list=ls()) #remove previous variable assignments # load libraries library(plyr) library(Metrics) library(reshape2) # https://www.marinedatascience.co/blog/2019/01/07/normalizing-the-rmse/ # https://github.com/saskiaotto/INDperform # fu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/connect_operations.R \name{connect_list_instances} \alias{connect_list_instances} \title{This API is in preview release for Amazon Connect and is subject to change} \usage{ connect_list_instances(NextToken, MaxResults) } \arguments{ \item{Nex...
/cran/paws.customer.engagement/man/connect_list_instances.Rd
permissive
TWarczak/paws
R
false
true
1,554
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/connect_operations.R \name{connect_list_instances} \alias{connect_list_instances} \title{This API is in preview release for Amazon Connect and is subject to change} \usage{ connect_list_instances(NextToken, MaxResults) } \arguments{ \item{Nex...
#' Simulate a partially observed Poisson branching process with discrete generations #' #' For a given reproduction number, this function simulate the incidence of a disease at each generation. #' The offspring distribution of each individual infected is assumed to follow a Poisson distribution with mean #' equal to th...
/R/simulate_negbin.R
no_license
reconhub/branchr
R
false
false
4,182
r
#' Simulate a partially observed Poisson branching process with discrete generations #' #' For a given reproduction number, this function simulate the incidence of a disease at each generation. #' The offspring distribution of each individual infected is assumed to follow a Poisson distribution with mean #' equal to th...
library(ggplot2) library(gganimate) load("precalculated_congestion_data.RData") # TODO: this step will become a selector in a shiny app selected_event <- "amsterdam_marathon" selected_date <- "2019-10-20" # steps for the interpolation selected_distance_tick <- 100 # time ticks for the animation in seconds selected_ti...
/table8.R
no_license
DavidKunFA/sport-data-challenge-2019
R
false
false
1,512
r
library(ggplot2) library(gganimate) load("precalculated_congestion_data.RData") # TODO: this step will become a selector in a shiny app selected_event <- "amsterdam_marathon" selected_date <- "2019-10-20" # steps for the interpolation selected_distance_tick <- 100 # time ticks for the animation in seconds selected_ti...
#' realignBwa #' #' Convert paired-end bam files to fastqs and then realign with bwa mem #' #' @param bam Paired-end BAM file to realign #' @param threads Number of threads to use in the analysis. #' @param ref Reference genome (ref.fa) to use for the alignment. #' @param platform Platforme used in the sequecing proces...
/R/realignBwa.R
no_license
msubirana/DNAseqPipeline
R
false
false
2,883
r
#' realignBwa #' #' Convert paired-end bam files to fastqs and then realign with bwa mem #' #' @param bam Paired-end BAM file to realign #' @param threads Number of threads to use in the analysis. #' @param ref Reference genome (ref.fa) to use for the alignment. #' @param platform Platforme used in the sequecing proces...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/new-jdbc.R \name{dbGetRowsAffected,DrillJDBCResult-method} \alias{dbGetRowsAffected,DrillJDBCResult-method} \alias{dbGetRowsAffected} \title{Drill JDBC dbGetRowsAffected} \usage{ \S4method{dbGetRowsAffected}{DrillJDBCResult}(res, ...) } \argu...
/man/dbGetRowsAffected-DrillJDBCResult-method.Rd
permissive
hrbrmstr/sergeant-caffeinated
R
false
true
471
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/new-jdbc.R \name{dbGetRowsAffected,DrillJDBCResult-method} \alias{dbGetRowsAffected,DrillJDBCResult-method} \alias{dbGetRowsAffected} \title{Drill JDBC dbGetRowsAffected} \usage{ \S4method{dbGetRowsAffected}{DrillJDBCResult}(res, ...) } \argu...
\name{FourierFilter} \alias{FourierFilter} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Low-pass or band-pass filter Filtering by Fourier } \description{ Filter time series by keeping only the largest or first of FFT coefficients. } \usage{ FourierFilter(Data, CountOrPercent=0.1, largest=TRUE,...
/man/FourierFilter.Rd
no_license
Mthrun/TSAT
R
false
false
1,533
rd
\name{FourierFilter} \alias{FourierFilter} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Low-pass or band-pass filter Filtering by Fourier } \description{ Filter time series by keeping only the largest or first of FFT coefficients. } \usage{ FourierFilter(Data, CountOrPercent=0.1, largest=TRUE,...
# last modification: 27.04.2016 (Arzideh) to fit y-limits #source("kde.txt") # graph.hist.R displays the hist and kde and returns mod of the data # modification (Ar): 22.08.2012, border=gray15 # last modification (Ar): 03.02.2015: this modification was developed to use the tool as default in windows-system # or...
/example_1_refInt/prog/R_functions/graph_hist.R
no_license
juliangruendner/ketos_examples
R
false
false
1,829
r
# last modification: 27.04.2016 (Arzideh) to fit y-limits #source("kde.txt") # graph.hist.R displays the hist and kde and returns mod of the data # modification (Ar): 22.08.2012, border=gray15 # last modification (Ar): 03.02.2015: this modification was developed to use the tool as default in windows-system # or...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/train_model.R \name{train_model} \alias{train_model} \title{Train a model across horizons and validation datasets} \usage{ train_model( lagged_df, windows, model_name, model_function, ..., use_future = FALSE ) } \arguments{ \item{...
/man/train_model.Rd
no_license
dereckvan01/forecastML
R
false
true
4,143
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/train_model.R \name{train_model} \alias{train_model} \title{Train a model across horizons and validation datasets} \usage{ train_model( lagged_df, windows, model_name, model_function, ..., use_future = FALSE ) } \arguments{ \item{...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataDownloadFix.R \name{dataDownloadFix} \alias{dataDownloadFix} \title{Data Download and Fix of sugar Values} \usage{ dataDownloadFix(key = c(), p = c()) } \arguments{ \item{key}{Key with dimensions for data download.} \item{p}{The paramete...
/man/dataDownloadFix.Rd
no_license
ncwanner/faoswsStandardization
R
false
true
1,184
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataDownloadFix.R \name{dataDownloadFix} \alias{dataDownloadFix} \title{Data Download and Fix of sugar Values} \usage{ dataDownloadFix(key = c(), p = c()) } \arguments{ \item{key}{Key with dimensions for data download.} \item{p}{The paramete...
\name{myUnits} \alias{myUnits} \title{Frequency of date/time units} \description{ A variable with the frequency of date/units. } \value{ the date/time units, a character value, yy default \code{"days"} } \examples{ ## myUnits - getRmetricsOptions("myUnits") } \keyword{chron}
/man/options-myUnits.Rd
no_license
cran/timeDate
R
false
false
292
rd
\name{myUnits} \alias{myUnits} \title{Frequency of date/time units} \description{ A variable with the frequency of date/units. } \value{ the date/time units, a character value, yy default \code{"days"} } \examples{ ## myUnits - getRmetricsOptions("myUnits") } \keyword{chron}
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wgEncodeTfbsV3.R \docType{data} \name{wgEncodeTfbsV3} \alias{wgEncodeTfbsV3} \title{transcription factor binding site clusters (V3) from ENCODE} \format{ An object of GRanges. } \source{ http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDC...
/man/wgEncodeTfbsV3.Rd
no_license
jianhong/ChIPpeakAnno
R
false
true
1,418
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wgEncodeTfbsV3.R \docType{data} \name{wgEncodeTfbsV3} \alias{wgEncodeTfbsV3} \title{transcription factor binding site clusters (V3) from ENCODE} \format{ An object of GRanges. } \source{ http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDC...
get.giant <- function(tbl_graf) { library(tidygraph) library(igraph) comps <- components(tbl_graf) giant <- which(comps$csize == max(comps$csize)) tbl_graf <- activate(tbl_graf, nodes) slice(tbl_graf, which(comps$membership == giant)) }
/Landscape/code/utils/get.giant.R
no_license
Christian-Ramos-Uria/Holobiont-Landscape
R
false
false
249
r
get.giant <- function(tbl_graf) { library(tidygraph) library(igraph) comps <- components(tbl_graf) giant <- which(comps$csize == max(comps$csize)) tbl_graf <- activate(tbl_graf, nodes) slice(tbl_graf, which(comps$membership == giant)) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fixCase.R \name{fixCase} \alias{fixCase} \title{Fix the name case of a taxon} \usage{ fixCase(x) } \arguments{ \item{x}{a unit character vector with a taxon} } \description{ Fix the name case of a taxon } \examples{ fixCase("myrcia lingua") f...
/man/fixCase.Rd
no_license
gustavobio/tpl
R
false
true
373
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fixCase.R \name{fixCase} \alias{fixCase} \title{Fix the name case of a taxon} \usage{ fixCase(x) } \arguments{ \item{x}{a unit character vector with a taxon} } \description{ Fix the name case of a taxon } \examples{ fixCase("myrcia lingua") f...
## 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 cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x...
/cachematrix.R
no_license
sbahta/ProgrammingAssignment2
R
false
false
338
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 cacheSolve <- function(x, ...) { ## Return a matrix that is the inverse of 'x...
#' Make URL string #' #' Creates a URL strings which can be used to scrape LabCorp's website for location data based on a search query. This function only forms the URL string which must be passed to another funtion to retrieve the data. #' #' @param referer Character string. See the vignette for details. #' @param par...
/R/makeurls.R
permissive
kuhnrl30/LabCorp
R
false
false
1,308
r
#' Make URL string #' #' Creates a URL strings which can be used to scrape LabCorp's website for location data based on a search query. This function only forms the URL string which must be passed to another funtion to retrieve the data. #' #' @param referer Character string. See the vignette for details. #' @param par...
\name{spectro} \alias{spectro} \title{2D-spectrogram of a time wave} \description{ This function returns a two-dimension spectrographic representation of a time wave. The function corresponds to short-term Fourier transform. An amplitude contour plot can be overlaid.} \usage{ spectro(wave, f, wl = 512, wn = "...
/man/spectro.Rd
no_license
vocobox/seewave
R
false
false
8,554
rd
\name{spectro} \alias{spectro} \title{2D-spectrogram of a time wave} \description{ This function returns a two-dimension spectrographic representation of a time wave. The function corresponds to short-term Fourier transform. An amplitude contour plot can be overlaid.} \usage{ spectro(wave, f, wl = 512, wn = "...
#- funciones para hacer graficos con ggplot2 para el informe SUE # #- grafico de lineas para % de una variable x grupo de edad y grupo de estudios #- HAS de meter la v. entre comillas get_grafico_1l <- function(df, y){ y_var <- sym(y) y_edad_cruce <- sym(edad_cruce) #- pasa un character a simbolo y_estudios_c...
/_f_en_curso/my_f_graph_ok_XXXXXXXXXXX.R
permissive
perezp44/pjpv2020.01
R
false
false
1,699
r
#- funciones para hacer graficos con ggplot2 para el informe SUE # #- grafico de lineas para % de una variable x grupo de edad y grupo de estudios #- HAS de meter la v. entre comillas get_grafico_1l <- function(df, y){ y_var <- sym(y) y_edad_cruce <- sym(edad_cruce) #- pasa un character a simbolo y_estudios_c...
library(ggplot2) library(hrbrthemes) # Importar datos fut <- read.csv("fut.csv") fut <- fut[, c('FTHG', 'FTAG')] str(fut) # 1 # Frecuencias relativas como dataframe th <- as.data.frame(table(fut$FTHG)) # host team ta <- as.data.frame(table(fut$FTAG)) # away team tha <- as.data.frame(table(fut)) # ho...
/R/Sesión 03/Postwork/Postwork03.R
no_license
fatimamt/Bedu_Fase2
R
false
false
2,284
r
library(ggplot2) library(hrbrthemes) # Importar datos fut <- read.csv("fut.csv") fut <- fut[, c('FTHG', 'FTAG')] str(fut) # 1 # Frecuencias relativas como dataframe th <- as.data.frame(table(fut$FTHG)) # host team ta <- as.data.frame(table(fut$FTAG)) # away team tha <- as.data.frame(table(fut)) # ho...
##################################################################################################### # Title: Plot 4 # # Purpose: Plot 4 for Questions 4 in Project 2 in Explanatory Data Analysis # # Author: ...
/Plot 4 - 2017-01-09.r
no_license
wcaughey1984/Project-2---Exploratory-Data-Analsis
R
false
false
1,761
r
##################################################################################################### # Title: Plot 4 # # Purpose: Plot 4 for Questions 4 in Project 2 in Explanatory Data Analysis # # Author: ...
test_that("headtail() works", { x <- data.frame(number = 1:26, letter = LETTERS) expect_error(headtail(1)) expect_error(headtail(list(a = 1, b = 2))) out_1 <- capture.output(headtail(x)) out_2 <- capture.output(headtail(x, 10)) out_3 <- capture.output(headtail(x, 16)) out_4 <- captur...
/tests/testthat/test-function-headtail.R
permissive
KWB-R/kwb.utils
R
false
false
584
r
test_that("headtail() works", { x <- data.frame(number = 1:26, letter = LETTERS) expect_error(headtail(1)) expect_error(headtail(list(a = 1, b = 2))) out_1 <- capture.output(headtail(x)) out_2 <- capture.output(headtail(x, 10)) out_3 <- capture.output(headtail(x, 16)) out_4 <- captur...
install.packages("ISLR") library(ISLR) data(Hitters) head(Hitters) data <- na.omit(Hitters) library(glmnet) names(data) X=model.matrix(Salary~.,data)[,-1] y=data$Salary sh <- 10^seq(10,-2,length=100) Ridge <- glmnet(X,y,alpha=0, lambda=sh) summary(Ridge) Lasso <- glmnet(X,y, alpha=1, lambda=sh) summary...
/5강 과제(문제 3).R
no_license
palpitation0/Machine-Learning-homework
R
false
false
494
r
install.packages("ISLR") library(ISLR) data(Hitters) head(Hitters) data <- na.omit(Hitters) library(glmnet) names(data) X=model.matrix(Salary~.,data)[,-1] y=data$Salary sh <- 10^seq(10,-2,length=100) Ridge <- glmnet(X,y,alpha=0, lambda=sh) summary(Ridge) Lasso <- glmnet(X,y, alpha=1, lambda=sh) summary...
# BIBD.R BIBD = function(Tbl, alpha=0.05) { xij = Tbl[,3] N = length(xij) l = length(unique(Tbl[,1])) # treatment m = length(unique(Tbl[,2])) # block p = N/m # block size r = m*p/l # replicate per treatment f.adj = (l - 1)/l*p/(p - 1) xi. = vector(length=...
/src/BIBD.R
no_license
ACP-KR/ExperimentDesign
R
false
false
2,449
r
# BIBD.R BIBD = function(Tbl, alpha=0.05) { xij = Tbl[,3] N = length(xij) l = length(unique(Tbl[,1])) # treatment m = length(unique(Tbl[,2])) # block p = N/m # block size r = m*p/l # replicate per treatment f.adj = (l - 1)/l*p/(p - 1) xi. = vector(length=...
testlist <- list(a = 0L, b = 0L, x = 704643071L) result <- do.call(grattan:::anyOutside,testlist) str(result)
/grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610055158-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
109
r
testlist <- list(a = 0L, b = 0L, x = 704643071L) result <- do.call(grattan:::anyOutside,testlist) str(result)
#### Извлечение таблицы из Википедии. library(rvest) ## Извлечём таблицу со списком лондонских музеев ## и сохраним в виде таблицы. # Получить и обработать страницу page <- read_html("https://en.wikipedia.org/wiki/List_of_museums_in_London") # Извлечь таблицу музеев tables <- page %>% html_nodes(xpath="//*[@id='mw-...
/Сбор данных в интернете/14/06-wikipedia.R
no_license
kn7072/R
R
false
false
1,787
r
#### Извлечение таблицы из Википедии. library(rvest) ## Извлечём таблицу со списком лондонских музеев ## и сохраним в виде таблицы. # Получить и обработать страницу page <- read_html("https://en.wikipedia.org/wiki/List_of_museums_in_London") # Извлечь таблицу музеев tables <- page %>% html_nodes(xpath="//*[@id='mw-...
# Install all packages. #BiocManager::install(c("minet", "Rgraphviz")) #install.packages(c("corrplot", "ggplot2"), type="source", repos="https://cloud.r-project.org/") # make sure you have the packages below before you try to import them. options(jupyter.plot_mimetypes = c("text/plain", "image/png" )) library("minet")...
/network_costas.R
no_license
Ld-monkey/NETWORK_COSTAS
R
false
false
6,018
r
# Install all packages. #BiocManager::install(c("minet", "Rgraphviz")) #install.packages(c("corrplot", "ggplot2"), type="source", repos="https://cloud.r-project.org/") # make sure you have the packages below before you try to import them. options(jupyter.plot_mimetypes = c("text/plain", "image/png" )) library("minet")...
# TODO: Continue to update the pure documentation. basic/analyzed formats; dataManip/Visualizations #' The MicrobiomeR Formats #' #' The formats are listed in order from lowest to highest level. #' To get a taxmap object into the higher formats they must be in one of the lower formats. #' It is also inherently import...
/R/package.R
permissive
sekingsley/MicrobiomeR
R
false
false
3,655
r
# TODO: Continue to update the pure documentation. basic/analyzed formats; dataManip/Visualizations #' The MicrobiomeR Formats #' #' The formats are listed in order from lowest to highest level. #' To get a taxmap object into the higher formats they must be in one of the lower formats. #' It is also inherently import...
#' Process Image #' #' This function processes an image #' @param file_path path to the document #' @param language optional, default: English #' @param profile String. Optional; default: \code{documentConversion} #' Options: \code{documentConversion, documentArchiving, textExtraction, fieldLevelRecognition, ba...
/R/processImage.R
permissive
cran/abbyyR
R
false
false
4,401
r
#' Process Image #' #' This function processes an image #' @param file_path path to the document #' @param language optional, default: English #' @param profile String. Optional; default: \code{documentConversion} #' Options: \code{documentConversion, documentArchiving, textExtraction, fieldLevelRecognition, ba...
### # ### # ### # ### # Purpose: Functions Related to Logging ### # started: 2019-10-03 (pvr) ### # ### # ############################################## ### #' @title Create log4r Logger for package #' #' @param ps_logfile name of the logfile #' @param ps_level logger level #' #' @return qpdt_logger #' @export...
/R/logger.R
permissive
fbzwsqualitasag/qpdt
R
false
false
3,761
r
### # ### # ### # ### # Purpose: Functions Related to Logging ### # started: 2019-10-03 (pvr) ### # ### # ############################################## ### #' @title Create log4r Logger for package #' #' @param ps_logfile name of the logfile #' @param ps_level logger level #' #' @return qpdt_logger #' @export...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/02Metaheur.R \name{getlogs} \alias{getlogs} \title{get the logs of a metaheur search} \usage{ getlogs(x, n = NULL) } \arguments{ \item{x}{(metaheur class object) output of function metaheur()} \item{n}{(integer) number of log entries show, d...
/man/getlogs.Rd
no_license
mvattulainen/metaheur
R
false
true
434
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/02Metaheur.R \name{getlogs} \alias{getlogs} \title{get the logs of a metaheur search} \usage{ getlogs(x, n = NULL) } \arguments{ \item{x}{(metaheur class object) output of function metaheur()} \item{n}{(integer) number of log entries show, d...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create.R \name{td_value_at} \alias{td_value_at} \title{Return the value at the specified quantile} \usage{ td_value_at(td, q) } \arguments{ \item{td}{t-digest object} \item{q}{quantile (range 0:1)} } \description{ Return the value at the spe...
/man/td_value_at.Rd
permissive
Akayeshmantha/tdigest
R
false
true
338
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create.R \name{td_value_at} \alias{td_value_at} \title{Return the value at the specified quantile} \usage{ td_value_at(td, q) } \arguments{ \item{td}{t-digest object} \item{q}{quantile (range 0:1)} } \description{ Return the value at the spe...
library(xts) library(forecast) library(ggplot2) library(readxl) library(xlsx) library(car) # Data preparation types = c("date", rep("numeric", 72)) dd = read_excel("data_amm.xlsx",sheet = 2, col_types = types) colnames(dd)[1] = "DATE" dd$DATE <- as.Date(dd$DATE, format = "%d.%m.%Y") # Выкинем слишком короткие ряды...
/benchmark_3.R
no_license
Pyatachokk/diploma
R
false
false
7,459
r
library(xts) library(forecast) library(ggplot2) library(readxl) library(xlsx) library(car) # Data preparation types = c("date", rep("numeric", 72)) dd = read_excel("data_amm.xlsx",sheet = 2, col_types = types) colnames(dd)[1] = "DATE" dd$DATE <- as.Date(dd$DATE, format = "%d.%m.%Y") # Выкинем слишком короткие ряды...
\name{dat.raudenbush1985} \docType{data} \alias{dat.raudenbush1985} \title{Studies on Assessing the Effects of Teacher Expectations on Pupil IQ} \description{Results from 19 studies examining how teachers' expectations about their pupils can influence actual IQ levels.} \usage{dat.raudenbush1985} \format{The data frame...
/man/dat.raudenbush1985.Rd
no_license
RobbievanAert/metadat
R
false
false
4,433
rd
\name{dat.raudenbush1985} \docType{data} \alias{dat.raudenbush1985} \title{Studies on Assessing the Effects of Teacher Expectations on Pupil IQ} \description{Results from 19 studies examining how teachers' expectations about their pupils can influence actual IQ levels.} \usage{dat.raudenbush1985} \format{The data frame...
# Exercise 4: practicing with dplyr # Install the `nycflights13` package. Load (`library()`) the package. # You'll also need to load `dplyr` # install.packages("nycflights13") library(nycflights13) library(dplyr) # The data.frame `flights` should now be accessible to you. # Use functions to inspect it: how many rows ...
/exercise-4/exercise.R
permissive
luxizheng/ch10-dplyr
R
false
false
2,214
r
# Exercise 4: practicing with dplyr # Install the `nycflights13` package. Load (`library()`) the package. # You'll also need to load `dplyr` # install.packages("nycflights13") library(nycflights13) library(dplyr) # The data.frame `flights` should now be accessible to you. # Use functions to inspect it: how many rows ...
#' Bar plot #' @description Creates barplots for count or mean with SE that can be interactive or not. #' #' @param node A data frame (required) #' @param Property A categorical column (required) #' @param y A numerical column. #' @param MEAN Calculated average of numerical column known as y. Specificy TRUE or FALSE #'...
/xplorer/R/barplot.R
permissive
uc-cdis/gen3sdk-R
R
false
false
11,722
r
#' Bar plot #' @description Creates barplots for count or mean with SE that can be interactive or not. #' #' @param node A data frame (required) #' @param Property A categorical column (required) #' @param y A numerical column. #' @param MEAN Calculated average of numerical column known as y. Specificy TRUE or FALSE #'...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bootstrapCIs.R \name{bootstrapCI} \alias{bootstrapCI} \title{Function to compute bootstrap confidence intervals} \usage{ bootstrapCI( object, which = NULL, resampling_fun_outer = NULL, resampling_fun_inner = NULL, B_outer = 100, B...
/man/bootstrapCI.Rd
no_license
cran/FDboost
R
false
true
7,668
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bootstrapCIs.R \name{bootstrapCI} \alias{bootstrapCI} \title{Function to compute bootstrap confidence intervals} \usage{ bootstrapCI( object, which = NULL, resampling_fun_outer = NULL, resampling_fun_inner = NULL, B_outer = 100, B...
\name{fReadTimeSeveralCols} \alias{fReadTimeSeveralCols} \title{fReadTimeSeveralCols} \description{Constructing time from columnns 'year',...,'hour'} \usage{fReadTimeSeveralCols(data, fileName, ncPkg = requireNetCDFPackage(), callingFunction = "", colYear = "year", colMonth = "month", colDay = "day", colHour ...
/man/fReadTimeSeveralCols.Rd
no_license
bgctw/REddyProcNCDF
R
false
false
1,745
rd
\name{fReadTimeSeveralCols} \alias{fReadTimeSeveralCols} \title{fReadTimeSeveralCols} \description{Constructing time from columnns 'year',...,'hour'} \usage{fReadTimeSeveralCols(data, fileName, ncPkg = requireNetCDFPackage(), callingFunction = "", colYear = "year", colMonth = "month", colDay = "day", colHour ...
#!/home/genesky/software/r/3.5.1/bin/Rscript library(docopt) "Usage: diffbind.r -i <file> -o <dir> --case_group_name <string> --control_group_name <string> [--cor_file <file> --pvalue_cutoff <numeric> --log2fc_cutoff <numeric> --Rlib <dir>] Options: -i, --input <file> diffbind规定的sheet.csv文件。包含以下11个表...
/diffbind.r
no_license
lpp1985/PersonalTools
R
false
false
16,559
r
#!/home/genesky/software/r/3.5.1/bin/Rscript library(docopt) "Usage: diffbind.r -i <file> -o <dir> --case_group_name <string> --control_group_name <string> [--cor_file <file> --pvalue_cutoff <numeric> --log2fc_cutoff <numeric> --Rlib <dir>] Options: -i, --input <file> diffbind规定的sheet.csv文件。包含以下11个表...
##Online learning Algorithms #Least-Mean-Square x <- rnorm(1000,0,2) beta <- 3 y <- beta*x + rnorm(1000,0,0.5) betaest <- 0 alpha <- 0.1 for(i in 1:1000){ betaest <- betaest + alpha*(x[i]*betaest - y[i]) } ##Variational Bayes x <- rnorm(10000) beta <- 3 y <- beta*x + rnorm(10000,0,0.5) #Online algorithm ...
/Onlinelearning/LMS.R
no_license
AnthonyEbert/Tutorial
R
false
false
820
r
##Online learning Algorithms #Least-Mean-Square x <- rnorm(1000,0,2) beta <- 3 y <- beta*x + rnorm(1000,0,0.5) betaest <- 0 alpha <- 0.1 for(i in 1:1000){ betaest <- betaest + alpha*(x[i]*betaest - y[i]) } ##Variational Bayes x <- rnorm(10000) beta <- 3 y <- beta*x + rnorm(10000,0,0.5) #Online algorithm ...
# ---------------------------------------------------------------------- # [Title]: Functions to generate adjacency matrix fills useful in # network analysis. # [Date]: 1 Apr 2013 [Loc]: Sevilla # Pedro Jordano. # ...................................................................... # nullmat will gener...
/functions/networks/matfills.R
no_license
pedroj/functions_repo
R
false
false
1,453
r
# ---------------------------------------------------------------------- # [Title]: Functions to generate adjacency matrix fills useful in # network analysis. # [Date]: 1 Apr 2013 [Loc]: Sevilla # Pedro Jordano. # ...................................................................... # nullmat will gener...
#Four table constrains are generated hpcons.c, hpcons1, hpcons2, hpcons3 #The sumrow_mf function has to be added for clean.pvar.NOA and so on library(tidyverse) # Clean "n" P_12YMAS Population 12 years and more------------------------ #debugonce(clean.pvar) clean.pvar <- function(vec.mf = hpcons$P_12YMAS, ...
/code/02-Huehuetla_CPV2010_Data privacy_algorithm.R
permissive
delapazruiz/population.modelling.hue2010
R
false
false
45,786
r
#Four table constrains are generated hpcons.c, hpcons1, hpcons2, hpcons3 #The sumrow_mf function has to be added for clean.pvar.NOA and so on library(tidyverse) # Clean "n" P_12YMAS Population 12 years and more------------------------ #debugonce(clean.pvar) clean.pvar <- function(vec.mf = hpcons$P_12YMAS, ...
library(pacman) p_load(Hmisc, magrittr, caret, corrplot, rpart, rattle, MASS, ggbiplot, AppliedPredictiveModeling, pairsD3, conjoint) #load data Baseball <- read.csv("~/Data_Science/MarketingAnalytics/Baseball.csv", stringsAsFactors=FALSE) #clean up salary, chr to numeric Baseball$SALARY <- as.numeric(Baseball$SALARY) ...
/FinalExam.R
no_license
sco-lo-digital/MarketingFinal
R
false
false
5,385
r
library(pacman) p_load(Hmisc, magrittr, caret, corrplot, rpart, rattle, MASS, ggbiplot, AppliedPredictiveModeling, pairsD3, conjoint) #load data Baseball <- read.csv("~/Data_Science/MarketingAnalytics/Baseball.csv", stringsAsFactors=FALSE) #clean up salary, chr to numeric Baseball$SALARY <- as.numeric(Baseball$SALARY) ...
# Download data link <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" if (file.exists("household_power_consumption.zip") || file.exists("household_power_consumption.txt")) { message("Data file exists") } else {message("Downloading data file") downlo...
/plot1.R
no_license
rgoodgold/ExData_Plotting1
R
false
false
1,254
r
# Download data link <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" if (file.exists("household_power_consumption.zip") || file.exists("household_power_consumption.txt")) { message("Data file exists") } else {message("Downloading data file") downlo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/diag3Darray.R \name{diag3Darray<-} \alias{diag3Darray<-} \title{Define function to change the diagonal of array} \usage{ diag3Darray(x) <- value } \arguments{ \item{x}{\code{3D array} whose diagonal must be c hanged} \item{value}{...
/man/diag3Darray-set.Rd
no_license
cran/NeuralSens
R
false
true
1,083
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/diag3Darray.R \name{diag3Darray<-} \alias{diag3Darray<-} \title{Define function to change the diagonal of array} \usage{ diag3Darray(x) <- value } \arguments{ \item{x}{\code{3D array} whose diagonal must be c hanged} \item{value}{...
\name{classif.depth} \Rdversion{1.1} \alias{classif.depth} \title{ Classifier from Functional Data} \description{ Classification of functional data using maximum depth.} \usage{ classif.depth(group,fdataobj,newfdataobj,depth="RP", par.depth=list(),CV="none") } \arguments{ \item{group}{ Factor of length \e...
/man/classif.depth.Rd
no_license
dgorbachev/fda.usc
R
false
false
2,514
rd
\name{classif.depth} \Rdversion{1.1} \alias{classif.depth} \title{ Classifier from Functional Data} \description{ Classification of functional data using maximum depth.} \usage{ classif.depth(group,fdataobj,newfdataobj,depth="RP", par.depth=list(),CV="none") } \arguments{ \item{group}{ Factor of length \e...
#------------------------------------- # Author: Babak Naimi, naimi.b@gmail.com # Date (first version): August 2017 # Date (last update): Feb. 2019 # Version 0.2 # Licence GPL v3 #------------------------ # if filename already exist, x will be appended, otherwise a new file will be created: .writeBin <- function(x,...
/R/writeBigRaster.R
no_license
babaknaimi/mraster
R
false
false
8,965
r
#------------------------------------- # Author: Babak Naimi, naimi.b@gmail.com # Date (first version): August 2017 # Date (last update): Feb. 2019 # Version 0.2 # Licence GPL v3 #------------------------ # if filename already exist, x will be appended, otherwise a new file will be created: .writeBin <- function(x,...
## Put comments here that give an overall description of what your ## functions do ## set: sets the matrix for which inverse has to be calculated ## get: retrieves the matrix for which inverse has ## to be calculated ## setinv: stores the inverse of the matrix in cache ## getinv: retrieves the inverse of the matr...
/cachematrix.R
no_license
tusharganguli/ProgrammingAssignment2
R
false
false
1,316
r
## Put comments here that give an overall description of what your ## functions do ## set: sets the matrix for which inverse has to be calculated ## get: retrieves the matrix for which inverse has ## to be calculated ## setinv: stores the inverse of the matrix in cache ## getinv: retrieves the inverse of the matr...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/iterators.R \name{union.igraph.es} \alias{union.igraph.es} \title{Union of edge sequences} \usage{ \method{union}{igraph.es}(...) } \arguments{ \item{...}{The edge sequences to take the union of.} } \value{ An edge sequence that conta...
/man/union.igraph.es.Rd
no_license
davidmaciel/rigraph
R
false
false
1,504
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/iterators.R \name{union.igraph.es} \alias{union.igraph.es} \title{Union of edge sequences} \usage{ \method{union}{igraph.es}(...) } \arguments{ \item{...}{The edge sequences to take the union of.} } \value{ An edge sequence that conta...
getKEGGchisq <- function (gpl, deg, alf) { # Takes: gpl = a string indicating the name of the chip used # deg = a list of kegg annotations for a set of DEGs # alf = the p value cut-off to use (alpha) # Returns: a table of KEGG ids, their freq, and p-values for overrep in "deg" # (only...
/archive/getKEGGchisq.R
no_license
sgschneider01/R_code
R
false
false
2,160
r
getKEGGchisq <- function (gpl, deg, alf) { # Takes: gpl = a string indicating the name of the chip used # deg = a list of kegg annotations for a set of DEGs # alf = the p value cut-off to use (alpha) # Returns: a table of KEGG ids, their freq, and p-values for overrep in "deg" # (only...
#Load Data get_data <- function(updateProgress = NULL) { if (is.function(updateProgress)) { updateProgress(detail = "getting local ...") get_local_datasets() get_local_sparql_results() updateProgress(detail = "getting remote ...") get_remote_datasets() updateProgress(detail = "getting graphite...
/server.R
no_license
wikimedia/wikidata-analytics-dashboard
R
false
false
2,467
r
#Load Data get_data <- function(updateProgress = NULL) { if (is.function(updateProgress)) { updateProgress(detail = "getting local ...") get_local_datasets() get_local_sparql_results() updateProgress(detail = "getting remote ...") get_remote_datasets() updateProgress(detail = "getting graphite...
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 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,...
/IntervalSurgeon/inst/testfiles/rcpp_pile/AFL_rcpp_pile/rcpp_pile_valgrind_files/1609860098-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
729
r
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032927L, 1837701012L, 1632068659L), pts = c(1758370433L, 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,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mom.dm.R \name{mom.dm} \alias{mom.dm} \title{Moment estimation for Dirichlet-multinomial} \usage{ mom.dm(X) } \arguments{ \item{X}{a data frame or matrix containing the count data. Rows of the matrix represent observations and columns are the...
/man/mom.dm.Rd
no_license
ZRChao/adaANCOM
R
false
true
425
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mom.dm.R \name{mom.dm} \alias{mom.dm} \title{Moment estimation for Dirichlet-multinomial} \usage{ mom.dm(X) } \arguments{ \item{X}{a data frame or matrix containing the count data. Rows of the matrix represent observations and columns are the...
# Copyright 2007-2018 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 la...
/R/MxMMI.R
no_license
lnsongxf/OpenMx
R
false
false
18,119
r
# Copyright 2007-2018 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 la...