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
#bar plot data("iris") data <- matrix() for (Species in iris[["Species"]]) { sum(iris["Species"] == Species) data[Species] <- sum(iris["Species"] == Species) } barplot(data)
/R/Scripts/exploratory_analysis/categorical.R
no_license
tdworowy/Data_science_notes
R
false
false
179
r
#bar plot data("iris") data <- matrix() for (Species in iris[["Species"]]) { sum(iris["Species"] == Species) data[Species] <- sum(iris["Species"] == Species) } barplot(data)
## why aren't limpets coexisting in our simulations? library(tidyverse) #### show the problem #### fd_results <- do.intertidal.simulation() # they look ok when you just run the simulation: fd_results %>% gather(balanus_glandula:free_space, key = "species", value = "abundance") %>% mutate(neg_value = if...
/foodwebs/intertidal_foodweb/limpets/why_limpets_not_coexist.R
no_license
abarner/network-coexistence
R
false
false
54,532
r
## why aren't limpets coexisting in our simulations? library(tidyverse) #### show the problem #### fd_results <- do.intertidal.simulation() # they look ok when you just run the simulation: fd_results %>% gather(balanus_glandula:free_space, key = "species", value = "abundance") %>% mutate(neg_value = if...
print(packrat::status())
/packrat/app.R
permissive
virtualstaticvoid/heroku-docker-r-examples
R
false
false
25
r
print(packrat::status())
\name{ms} \alias{ms} \title{Mean-shift mode seeking algorithm} \usage{ ms(X, init, H, tol = 1e-06, ncores = 1, store = FALSE) } \arguments{ \item{X}{n by d matrix containing the data.} \item{init}{d-dimensional vector containing the initial point for the optimization. By default it is equal to \code{colMeans(X...
/man/ms.Rd
no_license
danieldinsdale/mvnfast
R
false
false
2,514
rd
\name{ms} \alias{ms} \title{Mean-shift mode seeking algorithm} \usage{ ms(X, init, H, tol = 1e-06, ncores = 1, store = FALSE) } \arguments{ \item{X}{n by d matrix containing the data.} \item{init}{d-dimensional vector containing the initial point for the optimization. By default it is equal to \code{colMeans(X...
#Función para generar links entre todas las palabras de una frase #y todas ellas a su vez con la categorí generateLinksGraph <- function(txt, category){ txt <- paste(txt, category, sep=" ") txtSplit <- unlist(strsplit(txt, " ")) gg <- graph.data.frame(expand.grid(txtSplit,txtSplit), directed=F) ss <- s...
/GeneralPurposeFunctions.R
no_license
fperezgarcia/Master
R
false
false
392
r
#Función para generar links entre todas las palabras de una frase #y todas ellas a su vez con la categorí generateLinksGraph <- function(txt, category){ txt <- paste(txt, category, sep=" ") txtSplit <- unlist(strsplit(txt, " ")) gg <- graph.data.frame(expand.grid(txtSplit,txtSplit), directed=F) ss <- s...
#' Add rows, setting additional columns to 0 #' #' Any columns in data1 but not in data2 will be set to 0 in the #' additional rows from data1. #' Any columns in data2 but not in data1 will be ignored. #' #' @param data1 data frame #' @param data2 dataframe #' @return Augmented data frame #' @examples #' rbind.fill.dat...
/R/rbind.fill.data.frame.R
no_license
eicoffee/hierlm
R
false
false
563
r
#' Add rows, setting additional columns to 0 #' #' Any columns in data1 but not in data2 will be set to 0 in the #' additional rows from data1. #' Any columns in data2 but not in data1 will be ignored. #' #' @param data1 data frame #' @param data2 dataframe #' @return Augmented data frame #' @examples #' rbind.fill.dat...
#' Select colors visually #' #' The \code{getcolors2} function allows one to select from a visual palette of #' 1200 colors (i.e. color combinations from 6 levels of red, green, and blue). #' #' @param n Numeric value of the number of colors to select #' #' @return A vector of hexadecimal codings for colors #' (as...
/R/getcolors2.R
permissive
tokami/sinkr
R
false
false
2,178
r
#' Select colors visually #' #' The \code{getcolors2} function allows one to select from a visual palette of #' 1200 colors (i.e. color combinations from 6 levels of red, green, and blue). #' #' @param n Numeric value of the number of colors to select #' #' @return A vector of hexadecimal codings for colors #' (as...
library(shiny) library(datasets) # Define server logic required to summarize and view the selected dataset shinyServer(function(input, output) { # By declaring databaseInput as a reactive expression we ensure that: # # 1) It is only called when the inputs it depends on changes # 2) The computation and res...
/server.R
no_license
Rashmi-Sinha/Shinyapp
R
false
false
1,875
r
library(shiny) library(datasets) # Define server logic required to summarize and view the selected dataset shinyServer(function(input, output) { # By declaring databaseInput as a reactive expression we ensure that: # # 1) It is only called when the inputs it depends on changes # 2) The computation and res...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/import_Material.R \name{import_Material} \alias{import_Material} \title{Function to import a Material} \usage{ import_Material(file.name) } \arguments{ \item{file.name}{\link{character} name of the .FLT file containing the Material p...
/man/import_Material.Rd
no_license
cran/LumReader
R
false
true
819
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/import_Material.R \name{import_Material} \alias{import_Material} \title{Function to import a Material} \usage{ import_Material(file.name) } \arguments{ \item{file.name}{\link{character} name of the .FLT file containing the Material p...
################################################################ #IoT Analytics #Evaluate Techniques for WiFi Locationing #Model for determining latitude #Created by Eirik Espe ################################################################ source("Model for longitude.R") #--- Creating the first model ---- #Set...
/Model for latitude.R
no_license
EirikEspe/WiFi-Indoor-Positioning
R
false
false
8,329
r
################################################################ #IoT Analytics #Evaluate Techniques for WiFi Locationing #Model for determining latitude #Created by Eirik Espe ################################################################ source("Model for longitude.R") #--- Creating the first model ---- #Set...
# this Script is used to select hr24_prcp variables from POAMA file # hr24_prcp[lon,lat,time] # prcp_A_max[lon,lat,leadtime,issuetime] require("ncdf4") rm(list = ls(all = TRUE)) # set POAMA file root root <- "E:/climateData/POAMA2.4/A/" fList <- list.files(root,recursive = TRUE) gstart <- c(58,50,1) gcount <- c(3,2,9...
/dataCollection/SelectPrcp.R
no_license
dingmindm/Code
R
false
false
633
r
# this Script is used to select hr24_prcp variables from POAMA file # hr24_prcp[lon,lat,time] # prcp_A_max[lon,lat,leadtime,issuetime] require("ncdf4") rm(list = ls(all = TRUE)) # set POAMA file root root <- "E:/climateData/POAMA2.4/A/" fList <- list.files(root,recursive = TRUE) gstart <- c(58,50,1) gcount <- c(3,2,9...
version https://git-lfs.github.com/spec/v1 oid sha256:275695f9dc8f64438e52c4a38ec3ef5562808c1f3c03c554d580ebc4119a31e0 size 225
/MagicSynth/JuceLibraryCode/include_juce_audio_plugin_client_RTAS.r
no_license
SharodCelestin/MagicSynth
R
false
false
128
r
version https://git-lfs.github.com/spec/v1 oid sha256:275695f9dc8f64438e52c4a38ec3ef5562808c1f3c03c554d580ebc4119a31e0 size 225
\name{gen.findFounders} \alias{gen.findFounders} \title{Find common founder ancestors} \description{Returns all the ancestors that are founders for specified individuals in the genealogy.} \usage{gen.findFounders(gen, individuals, NbProcess=parallel::detectCores()-1)} \arguments{ \item{gen}{An object of class GLg...
/man/gen.findFounders.Rd
no_license
cran/GENLIB
R
false
false
1,474
rd
\name{gen.findFounders} \alias{gen.findFounders} \title{Find common founder ancestors} \description{Returns all the ancestors that are founders for specified individuals in the genealogy.} \usage{gen.findFounders(gen, individuals, NbProcess=parallel::detectCores()-1)} \arguments{ \item{gen}{An object of class GLg...
## These two functions would achieve the goal of calculating the inverse of a ##given matrix (given that this matrix is inversible), and save the inverse so ##that the user can just pull out the saved inverse of a known matrix instead of ##do the calculation again (which can be time consumimg). ## The first functio...
/cachematrix.R
no_license
yuzhuhan/ProgrammingAssignment2
R
false
false
1,677
r
## These two functions would achieve the goal of calculating the inverse of a ##given matrix (given that this matrix is inversible), and save the inverse so ##that the user can just pull out the saved inverse of a known matrix instead of ##do the calculation again (which can be time consumimg). ## The first functio...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/handle-event.R \name{wait_for_event} \alias{wait_for_event} \title{Query the next invocation endpoint to get the next input} \usage{ wait_for_event(deserialiser = NULL, serialiser = NULL) } \arguments{ \item{deserialiser}{function for deseria...
/man/wait_for_event.Rd
permissive
dA505819/lambdr
R
false
true
977
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/handle-event.R \name{wait_for_event} \alias{wait_for_event} \title{Query the next invocation endpoint to get the next input} \usage{ wait_for_event(deserialiser = NULL, serialiser = NULL) } \arguments{ \item{deserialiser}{function for deseria...
library(data.table) library(chromVAR) library(SummarizedExperiment) library(Matrix) library(BSgenome.Hsapiens.UCSC.hg19) library(motifmatchr) library(chromVARmotifs) library(GenomicRanges) library(BuenColors) library(magrittr) # Import human data hemecounts <- data.matrix(fread("zcat < ../humandata/GSE74912_ATACseq_Al...
/code/13sept2017_humanGWAS.R
no_license
caleblareau/immgen_final
R
false
false
2,558
r
library(data.table) library(chromVAR) library(SummarizedExperiment) library(Matrix) library(BSgenome.Hsapiens.UCSC.hg19) library(motifmatchr) library(chromVARmotifs) library(GenomicRanges) library(BuenColors) library(magrittr) # Import human data hemecounts <- data.matrix(fread("zcat < ../humandata/GSE74912_ATACseq_Al...
test_that("proper filename is generated", { filename <- make_filename("2013") expect_match(filename, "^accident_") expect_match(filename, "\\.csv\\.bz2$") expect_match(filename, "\\d{4}") })
/tests/testthat/test-filename.R
no_license
jschonem/FARSdatatools
R
false
false
199
r
test_that("proper filename is generated", { filename <- make_filename("2013") expect_match(filename, "^accident_") expect_match(filename, "\\.csv\\.bz2$") expect_match(filename, "\\d{4}") })
library(RCurl) ### Name: findHTTPHeaderEncoding ### Title: Find the encoding of the HTTP response from the HTTP header ### Aliases: findHTTPHeaderEncoding ### Keywords: IO programming ### ** Examples findHTTPHeaderEncoding("Content-Type: text/html;charset=ISO-8859-1\r\n") findHTTPHeaderEncoding("Content-Type: text/...
/data/genthat_extracted_code/RCurl/examples/findHTTPHeaderEncoding.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
349
r
library(RCurl) ### Name: findHTTPHeaderEncoding ### Title: Find the encoding of the HTTP response from the HTTP header ### Aliases: findHTTPHeaderEncoding ### Keywords: IO programming ### ** Examples findHTTPHeaderEncoding("Content-Type: text/html;charset=ISO-8859-1\r\n") findHTTPHeaderEncoding("Content-Type: text/...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{clf} \alias{clf} \title{Continuous Learning of Features Block} \usage{ clf(...) } \arguments{ \item{...}{arguments for the \code{\link{block_clf}} function.} } \value{ A list with \code{type} = "clf" and \code{params} with th...
/man/clf.Rd
no_license
neuroimaginador/dl4ni
R
false
true
432
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wrappers.R \name{clf} \alias{clf} \title{Continuous Learning of Features Block} \usage{ clf(...) } \arguments{ \item{...}{arguments for the \code{\link{block_clf}} function.} } \value{ A list with \code{type} = "clf" and \code{params} with th...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/estConnectivity.R \name{diffMC} \alias{diffMC} \title{Pairwise differences between two or more independent MC estimates} \usage{ diffMC(estimates, nSamples = 1e+05, alpha = 0.05, returnSamples = F) } \arguments{ \item{estimates}{List of at le...
/man/diffMC.Rd
no_license
eriqande/MigConnectivity
R
false
true
4,965
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/estConnectivity.R \name{diffMC} \alias{diffMC} \title{Pairwise differences between two or more independent MC estimates} \usage{ diffMC(estimates, nSamples = 1e+05, alpha = 0.05, returnSamples = F) } \arguments{ \item{estimates}{List of at le...
##' Function uses summary statistics to test for differences between the posterior distribution of parameter estimates for the evolutionary rate matrix regimes. ##' ##' This functions performs a test to check whether the posterior distribution of the fitted matrices are different. It returns the proportion of overlap b...
/R/testRatematrix.R
no_license
lzhangss/ratematrix
R
false
false
10,160
r
##' Function uses summary statistics to test for differences between the posterior distribution of parameter estimates for the evolutionary rate matrix regimes. ##' ##' This functions performs a test to check whether the posterior distribution of the fitted matrices are different. It returns the proportion of overlap b...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{listEnrichrDbs} \alias{listEnrichrDbs} \title{Look up available databases on Enrichr} \usage{ listEnrichrDbs() } \value{ dataframe of available Enrichr databases } \description{ Look up available databases on Enrichr } \deta...
/man/listEnrichrDbs.Rd
no_license
wjawaid/bglab
R
false
true
390
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{listEnrichrDbs} \alias{listEnrichrDbs} \title{Look up available databases on Enrichr} \usage{ listEnrichrDbs() } \value{ dataframe of available Enrichr databases } \description{ Look up available databases on Enrichr } \deta...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/irt-tse.R \name{tse} \alias{tse} \title{Newton-Raphton method in IRT true score equating Reference: Kolen & Brennan (2014, p.194)} \usage{ tse(tau, t0, a, b, c, D) } \arguments{ \item{tau}{true score, integer, vector.} \item{t0}{initial valu...
/man/tse.Rd
permissive
takuizum/irtfun2
R
false
true
587
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/irt-tse.R \name{tse} \alias{tse} \title{Newton-Raphton method in IRT true score equating Reference: Kolen & Brennan (2014, p.194)} \usage{ tse(tau, t0, a, b, c, D) } \arguments{ \item{tau}{true score, integer, vector.} \item{t0}{initial valu...
# Copula transformation function (see Park and Gupta 2012), based on a variable's ECDF make_copula <- function(x) { if (length(unique(x))==1) return(as.numeric(rep(NA, length(x)))) return(ifelse(ecdf(x)(x)==1, qnorm(1-.0000001), qnorm(ecdf(x)(x)))) }
/analysis/marketingtools/make_copula.R
no_license
hannesdatta/brand-equity-journal-of-marketing
R
false
false
258
r
# Copula transformation function (see Park and Gupta 2012), based on a variable's ECDF make_copula <- function(x) { if (length(unique(x))==1) return(as.numeric(rep(NA, length(x)))) return(ifelse(ecdf(x)(x)==1, qnorm(1-.0000001), qnorm(ecdf(x)(x)))) }
library(dplyr) library(tidyr) library(reshape2) library(readr) library(devtools) #devtools::load_all() #? ## read in cleaned data files -------------------------------------------------- code_dir <- "~/../Desktop/work/Psychometrics Data Cleaning Example" source(paste0(code_dir,"/data_cleaning_functions.R")) source(pas...
/data_cleaning/R/archive/from_hannah_2021_03/03-metadatafiles-example.R
no_license
eryka-nosal/item_analysis_automation
R
false
false
2,666
r
library(dplyr) library(tidyr) library(reshape2) library(readr) library(devtools) #devtools::load_all() #? ## read in cleaned data files -------------------------------------------------- code_dir <- "~/../Desktop/work/Psychometrics Data Cleaning Example" source(paste0(code_dir,"/data_cleaning_functions.R")) source(pas...
.libPaths("/srv/shiny-server/david/libs") library(shiny) if(!require(RDAVIDWebService)){ source("http://bioconductor.org/biocLite.R") biocLite("RDAVIDWebService") library(RDAVIDWebService) } if(!require(xlsx)){ install.packages("xlsx", dependencies = TRUE) library(xlsx) } quit(save="no")
/requirements.R
no_license
mpg-age-bioinformatics/shiny-david
R
false
false
301
r
.libPaths("/srv/shiny-server/david/libs") library(shiny) if(!require(RDAVIDWebService)){ source("http://bioconductor.org/biocLite.R") biocLite("RDAVIDWebService") library(RDAVIDWebService) } if(!require(xlsx)){ install.packages("xlsx", dependencies = TRUE) library(xlsx) } quit(save="no")
#' LogarithmicTransformation #' #' Clase que sobreescribe la clase \code{\link{Transformation}} implementando #' la transformacion logaritmica. #' #' @docType class #' @importFrom R6 R6Class #' @export #' @format A LogarithmicTransformation Class of type \code{\link{R6Class}}. #' @section Warning: Advertencias. #' @sec...
/TimeSeriesAnalysisLibrary/packages/TimeSeriesTransformation/R/class.LogarithmicTransformation.R
permissive
jmorenov/TimeSeriesAnalysis
R
false
false
1,475
r
#' LogarithmicTransformation #' #' Clase que sobreescribe la clase \code{\link{Transformation}} implementando #' la transformacion logaritmica. #' #' @docType class #' @importFrom R6 R6Class #' @export #' @format A LogarithmicTransformation Class of type \code{\link{R6Class}}. #' @section Warning: Advertencias. #' @sec...
list.of.packages <- c("readr","pheatmap","RColorBrewer","genefilter","gridExtra","mvShapiroTest") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) #source("https://bioconductor.org/biocLite.R") library(readr) library(phe...
/SRC/Human/heatmaps.R
no_license
chrismazzeo/Tesis_Marcadores_Glicoinmunologicos
R
false
false
14,549
r
list.of.packages <- c("readr","pheatmap","RColorBrewer","genefilter","gridExtra","mvShapiroTest") new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])] if(length(new.packages)) install.packages(new.packages) #source("https://bioconductor.org/biocLite.R") library(readr) library(phe...
##Assignment ##Create a numerical vector to store the odd numbers between 1 to 100 a <- seq(1,100,2) a ##Create a numerical vector with 1,2,3,4,5,8,6,2,11. Create a 3*3 matrix from the vector b <- c(1,2,3,4,5,8,6,2,11) b b1 <- matrix(b,nrow=3,ncol=3,byrow=TRUE) b1 ##Consider vector a<-c(NA,11:15,NA,N...
/Assignment_1.R
no_license
NanditaVelamore/Acadgild-Assignment-Project
R
false
false
595
r
##Assignment ##Create a numerical vector to store the odd numbers between 1 to 100 a <- seq(1,100,2) a ##Create a numerical vector with 1,2,3,4,5,8,6,2,11. Create a 3*3 matrix from the vector b <- c(1,2,3,4,5,8,6,2,11) b b1 <- matrix(b,nrow=3,ncol=3,byrow=TRUE) b1 ##Consider vector a<-c(NA,11:15,NA,N...
#' Parametric proportional hazards regression #' #' This function is called by \code{\link{aftreg}}, but it can also be directly #' called by a user. #' #' See \code{\link{aftreg}} for more detail. #' #' @param X The design (covariate) matrix. #' @param Y A survival object, the response. #' @param dist Which baselin...
/R/aftreg.fit.R
no_license
cran/eha
R
false
false
6,590
r
#' Parametric proportional hazards regression #' #' This function is called by \code{\link{aftreg}}, but it can also be directly #' called by a user. #' #' See \code{\link{aftreg}} for more detail. #' #' @param X The design (covariate) matrix. #' @param Y A survival object, the response. #' @param dist Which baselin...
## ## Exploratory Data Analysis - Course Project 1 ## ## Plot 3 (plot3.R) ## source("./plot_common.R") dt <- readFile() setupPlot("plot3.png") plot(dt$Sub_metering_1, type="l", ylab = "Energy sub metering", xlab = "", xaxt = "n", col="black") lines(dt$Sub_metering_2, col="red") li...
/plot3.R
no_license
zpmartins/ExData_Plotting1
R
false
false
792
r
## ## Exploratory Data Analysis - Course Project 1 ## ## Plot 3 (plot3.R) ## source("./plot_common.R") dt <- readFile() setupPlot("plot3.png") plot(dt$Sub_metering_1, type="l", ylab = "Energy sub metering", xlab = "", xaxt = "n", col="black") lines(dt$Sub_metering_2, col="red") li...
sh#if (require(devtools)) install.packages("devtools")#if not already installed #devtools::install_github("AnalytixWare/ShinySky") #library(shinysky) rm(list = ls()) library(shiny) library(xts) library(DT) library(quantmod) library(tidyquant) library(shinysky) library(ggplot2) library(PerformanceAnalytics) library(me...
/Portfolio_Analytics/Shiny_Portfolio1/app.R
no_license
DannyJRa/Portfolio_Analytics
R
false
false
2,868
r
sh#if (require(devtools)) install.packages("devtools")#if not already installed #devtools::install_github("AnalytixWare/ShinySky") #library(shinysky) rm(list = ls()) library(shiny) library(xts) library(DT) library(quantmod) library(tidyquant) library(shinysky) library(ggplot2) library(PerformanceAnalytics) library(me...
births$hyp <- factor(births$hyp,labels=c("normal","hyper")) births$sex <- factor(births$sex,labels=c("M","F")) births$agegrp <- cut(births$matage,breaks=c(20,25,30,35,40,45),right=FALSE) births$gest4 <- cut(births$gestwks,breaks=c(20,35,37,39,45),right=FALSE)
/pracs/data/births-house.r
no_license
SPE-R/SPE
R
false
false
262
r
births$hyp <- factor(births$hyp,labels=c("normal","hyper")) births$sex <- factor(births$sex,labels=c("M","F")) births$agegrp <- cut(births$matage,breaks=c(20,25,30,35,40,45),right=FALSE) births$gest4 <- cut(births$gestwks,breaks=c(20,35,37,39,45),right=FALSE)
# plot by number of observations library(ggplot2) filename_csv = "results-by-observations-in-2-dimensions-refresh-0.1.csv" df = read.csv(filename_csv) # removing Factorized Boomerang and diagonal boomerang df = df[df$sampler != "Factorized Boomerang",] df = df[df$sampler != "Boomerang (diagonal)",] df = df[df$sampler...
/R/plot_logistic_by_observations.R
no_license
jbierkens/ICML-boomerang
R
false
false
1,583
r
# plot by number of observations library(ggplot2) filename_csv = "results-by-observations-in-2-dimensions-refresh-0.1.csv" df = read.csv(filename_csv) # removing Factorized Boomerang and diagonal boomerang df = df[df$sampler != "Factorized Boomerang",] df = df[df$sampler != "Boomerang (diagonal)",] df = df[df$sampler...
#' Generate a GRangesList object with feature ranges #' #' Generate a GRangesList object with genomic ranges for (any combination of) #' spliced transcripts, unspliced transcripts and introns. #' #' @param gtf Path to gtf file. #' @param featureType Character vector indicating the type(s) of features to #' extract...
/R/getFeatureRanges.R
no_license
hiraksarkar/eisaR
R
false
false
11,115
r
#' Generate a GRangesList object with feature ranges #' #' Generate a GRangesList object with genomic ranges for (any combination of) #' spliced transcripts, unspliced transcripts and introns. #' #' @param gtf Path to gtf file. #' @param featureType Character vector indicating the type(s) of features to #' extract...
library(shiny) library(shinyWidgets) image_var <- paste0("https://my-alternativehealth.com/wp-content/uploads/2015", "/11/internal-discomfort.jpg") page_one_layout <- fluidPage( img(src = image_var, width = 250, height = 250), column(10, offset = 1, h1("Cardiovascular Diseases and their...
/final_rfiles/intro.R
permissive
meganaboddam/Cardiovascular_Diseases_Demographic_Data_Analysis
R
false
false
1,506
r
library(shiny) library(shinyWidgets) image_var <- paste0("https://my-alternativehealth.com/wp-content/uploads/2015", "/11/internal-discomfort.jpg") page_one_layout <- fluidPage( img(src = image_var, width = 250, height = 250), column(10, offset = 1, h1("Cardiovascular Diseases and their...
#Homework Assignment 1, see LSTR book for reference. library(corrgram) library(corrplot) library(ISLR) #8. (a) college <- read.csv(file="U:/Midterm/College.csv", header=TRUE, sep=",", na.strings="?") #8. (b) rownames(college )=college [,1] fix(college) college =college [,-1] fix(college) #...
/Project 1 EDA.R
no_license
bingdong1/Machine-Learning-in-R
R
false
false
2,996
r
#Homework Assignment 1, see LSTR book for reference. library(corrgram) library(corrplot) library(ISLR) #8. (a) college <- read.csv(file="U:/Midterm/College.csv", header=TRUE, sep=",", na.strings="?") #8. (b) rownames(college )=college [,1] fix(college) college =college [,-1] fix(college) #...
#' Strings of Near Repeats #' #' Identifies cases that are nearby each other in space/time #' #' @param dat data frame #' @param id string for id variable in data frame (should be unique) #' @param x string for variable that has the x coordinates #' @param y string for variable that has the y coordinates #' @param tim...
/R/near_strings.R
permissive
tkante/ptools
R
false
false
7,490
r
#' Strings of Near Repeats #' #' Identifies cases that are nearby each other in space/time #' #' @param dat data frame #' @param id string for id variable in data frame (should be unique) #' @param x string for variable that has the x coordinates #' @param y string for variable that has the y coordinates #' @param tim...
#' @param mode [\code{character(1)}]\cr #' Storage mode of the array. Arrays can hold vectors, i.e. \dQuote{logical}, #' \dQuote{integer}, \dQuote{double}, \dQuote{numeric}, \dQuote{complex}, #' \dQuote{character} and \dQuote{list}. You can also specify \dQuote{atomic} #' here to explicitly prohibit lists. Default ...
/man-roxygen/mode.R
no_license
jackwasey/checkmate
R
false
false
347
r
#' @param mode [\code{character(1)}]\cr #' Storage mode of the array. Arrays can hold vectors, i.e. \dQuote{logical}, #' \dQuote{integer}, \dQuote{double}, \dQuote{numeric}, \dQuote{complex}, #' \dQuote{character} and \dQuote{list}. You can also specify \dQuote{atomic} #' here to explicitly prohibit lists. Default ...
#' Simulate UD from fitted SSF #' #' Function to obtain a habitat kernel from a fitted (i)SSF. #' #' The habitat kernel is calculated by multiplying resources with their corresponding coefficients from the fitted (i)SSF. #' #' @param resources `[RasterLayer, RasterStack]` \cr The resources. #' @param movement_kernel `[...
/amt/R/simulate_ud.R
no_license
akhikolla/InformationHouse
R
false
false
2,662
r
#' Simulate UD from fitted SSF #' #' Function to obtain a habitat kernel from a fitted (i)SSF. #' #' The habitat kernel is calculated by multiplying resources with their corresponding coefficients from the fitted (i)SSF. #' #' @param resources `[RasterLayer, RasterStack]` \cr The resources. #' @param movement_kernel `[...
context("block_clf") test_that("block_clf works as expected for one input", { load_keras() input <- layer_input(shape = c(100)) expect_works(output <- input %>% block_clf(hidden_layers = list(dense(10)), all = TRUE) %>% block_clf(hidden_layers = list(dense(10)), all = ...
/tests/testthat/test_block_clf.R
no_license
neuroimaginador/dl4ni
R
false
false
914
r
context("block_clf") test_that("block_clf works as expected for one input", { load_keras() input <- layer_input(shape = c(100)) expect_works(output <- input %>% block_clf(hidden_layers = list(dense(10)), all = TRUE) %>% block_clf(hidden_layers = list(dense(10)), all = ...
library(ggplot2) ggplot(diamonds, aes(cut)) + geom_bar()
/1.R
no_license
aureru/CEU_DA1
R
false
false
57
r
library(ggplot2) ggplot(diamonds, aes(cut)) + geom_bar()
#run_analysis.R #Will run if data is in working directory (and sub-folders) #Note: STEPS do not exactly correspond to those in the project instructions. #STEP 1: Read in all the raw data into data tables using fread library(data.table,quietly=TRUE) features <- fread("features.txt") names(features) <- c("code","d...
/run_analysis.R
no_license
cobrown3/Cleaning-Data-Project
R
false
false
2,872
r
#run_analysis.R #Will run if data is in working directory (and sub-folders) #Note: STEPS do not exactly correspond to those in the project instructions. #STEP 1: Read in all the raw data into data tables using fread library(data.table,quietly=TRUE) features <- fread("features.txt") names(features) <- c("code","d...
output$availDVs <- DT::renderDataTable({ if (input$use2 == FALSE) { sites <- c(input$yID, input$xID) info <- whatNWISdata(sites) info <- subset(info, parm_cd == "00060" & data_type_cd == "dv" & stat_cd == "00003") info <- info[,c(3,4,6,7,22,23)] info } else if (input$use2 == TRUE) { sites <- c(input$yID, input...
/inst/shiny/availDVs.R
permissive
bbreaker/MISTEdv
R
false
false
499
r
output$availDVs <- DT::renderDataTable({ if (input$use2 == FALSE) { sites <- c(input$yID, input$xID) info <- whatNWISdata(sites) info <- subset(info, parm_cd == "00060" & data_type_cd == "dv" & stat_cd == "00003") info <- info[,c(3,4,6,7,22,23)] info } else if (input$use2 == TRUE) { sites <- c(input$yID, input...
corr <- function(directory, threshold = 0) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files directory <- "/Volumes/JORDAN 1/SUTD/SembCorp/Matrices/" ## 'threshold' is a numeric vector of length 1 indicating the ## number of completely observed observations (on all...
/correlation_study/corr1.R
no_license
magnumhell/analytics_watertreatment
R
false
false
3,773
r
corr <- function(directory, threshold = 0) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files directory <- "/Volumes/JORDAN 1/SUTD/SembCorp/Matrices/" ## 'threshold' is a numeric vector of length 1 indicating the ## number of completely observed observations (on all...
## The following two function compute the inverse of a given matrix and cache it. ## makeCacheMatrix() creates an R object which contains a matrix and several ## functions to store and retrieve the matrix and its inverse. ## The actual calculation of the inverse matrix is done by cacheSolve. However it ## only calcula...
/cachematrix.R
no_license
dortje/ProgrammingAssignment2
R
false
false
1,816
r
## The following two function compute the inverse of a given matrix and cache it. ## makeCacheMatrix() creates an R object which contains a matrix and several ## functions to store and retrieve the matrix and its inverse. ## The actual calculation of the inverse matrix is done by cacheSolve. However it ## only calcula...
context("StitchedOutline") test_that("StitchedOutlines work correctly", { P <- rbind(c(1,1), c(2,1), c(2,-1), c(1,-1), c(1,-2), c(-1,-2), c(-1,-1), c(-2,-1), c(-2,1), c(-1,1), c(-1,2), ...
/pkg/retistruct/tests/testthat/test-stitched-outline.R
no_license
davidcsterratt/retistruct
R
false
false
1,406
r
context("StitchedOutline") test_that("StitchedOutlines work correctly", { P <- rbind(c(1,1), c(2,1), c(2,-1), c(1,-1), c(1,-2), c(-1,-2), c(-1,-1), c(-2,-1), c(-2,1), c(-1,1), c(-1,2), ...
library(testthat) library(BKKCrypt) test_check('BKKCrypt')
/R/inst/tests/testthat.R
permissive
Gujci/BKKCrypt
R
false
false
60
r
library(testthat) library(BKKCrypt) test_check('BKKCrypt')
#' Scatter Plots #' #' Create a scatter plot. #' #' @param x \code{formula}. An expression of the form \code{y ~ x | z} where \code{x} is the variable we want on the x-axis, \code{y} is the variable we want on the y-axis and \code{z} is an optional variable we would like to use for faceting. #' @param data data frame. ...
/R/xyplot.R
no_license
AmeliaMN/mobilizr
R
false
false
919
r
#' Scatter Plots #' #' Create a scatter plot. #' #' @param x \code{formula}. An expression of the form \code{y ~ x | z} where \code{x} is the variable we want on the x-axis, \code{y} is the variable we want on the y-axis and \code{z} is an optional variable we would like to use for faceting. #' @param data data frame. ...
## Assign NAFO divisions #load libraries ---------------- library(data.table) library(dplyr) library(ggplot2) library(sf) library(RCurl) #source function to crop the data script <- getURL("https://raw.githubusercontent.com/rystanley/RFuns/master/R/CropFun.R", ssl.verifypeer = FALSE) eval(parse(text ...
/R/NAFOCROP.R
no_license
rystanley/RFuns
R
false
false
1,266
r
## Assign NAFO divisions #load libraries ---------------- library(data.table) library(dplyr) library(ggplot2) library(sf) library(RCurl) #source function to crop the data script <- getURL("https://raw.githubusercontent.com/rystanley/RFuns/master/R/CropFun.R", ssl.verifypeer = FALSE) eval(parse(text ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/parsers.r \name{solr_parse} \alias{solr_parse} \alias{solr_parse.sr_facet} \alias{solr_parse.sr_group} \alias{solr_parse.sr_high} \alias{solr_parse.sr_mlt} \alias{solr_parse.sr_search} \alias{solr_parse.sr_stats} \title{Parse raw data...
/man/solr_parse.Rd
permissive
cran/solr
R
false
false
1,432
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/parsers.r \name{solr_parse} \alias{solr_parse} \alias{solr_parse.sr_facet} \alias{solr_parse.sr_group} \alias{solr_parse.sr_high} \alias{solr_parse.sr_mlt} \alias{solr_parse.sr_search} \alias{solr_parse.sr_stats} \title{Parse raw data...
args<-commandArgs(TRUE) table <-read.table(paste(c(args[1], args[2], ".txt"), collapse = ""), sep=",",header=T) png(paste(c(args[1], args[2], ".png"), collapse = ""), height=600,width=750, bg="white") par(mar=c(5,3,2,2)+0.1) y_range <- range(0, table$w1, table$w2, table$w3) x_range <- range (0,table$time + 500) with...
/r-scripts/plot.R
no_license
alessandroleite/scaling-nemesis
R
false
false
811
r
args<-commandArgs(TRUE) table <-read.table(paste(c(args[1], args[2], ".txt"), collapse = ""), sep=",",header=T) png(paste(c(args[1], args[2], ".png"), collapse = ""), height=600,width=750, bg="white") par(mar=c(5,3,2,2)+0.1) y_range <- range(0, table$w1, table$w2, table$w3) x_range <- range (0,table$time + 500) with...
library(GenomicRanges) library(data.table) options(scipen=999) setwd("../downstream/input/human_analysis") ##read in DNase regions (i.e., regulatory DNA regions) ##DNase regions were obtained from https://github.com/WeiqiangZhou/BIRD-data/releases/download/v3.0/BIRD_data_ENCODE.zip and resize to 250bp for each region...
/TFBS_analysis_human/TFBS_human_regions.R
no_license
AndyFeinberg/methyl_entropy
R
false
false
1,359
r
library(GenomicRanges) library(data.table) options(scipen=999) setwd("../downstream/input/human_analysis") ##read in DNase regions (i.e., regulatory DNA regions) ##DNase regions were obtained from https://github.com/WeiqiangZhou/BIRD-data/releases/download/v3.0/BIRD_data_ENCODE.zip and resize to 250bp for each region...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/abm_functions_latest.R \name{happyregion} \alias{happyregion} \title{Stage Assessment to Aggregate Happiness by Region} \usage{ happyregion(soc) } \arguments{ \item{soc}{The list of society characteristics initiated by \code{\link{initialsoc}...
/man/happyregion.Rd
no_license
gentok/contextvoting
R
false
true
574
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/abm_functions_latest.R \name{happyregion} \alias{happyregion} \title{Stage Assessment to Aggregate Happiness by Region} \usage{ happyregion(soc) } \arguments{ \item{soc}{The list of society characteristics initiated by \code{\link{initialsoc}...
## ************************************************************ ## setwd('~/Dropbox/hedgerow_metacom') rm(list=ls()) setwd('analysis/occupancy') args <- commandArgs(trailingOnly=TRUE) source('src/initialize.R') source("src/cppp.R") ## ************************************************************ ## prep data ## ********...
/analysis/occupancy/src/not_in_ms/run_cppp.R
no_license
Lucy-Guarnieri/hedgerow_metacom
R
false
false
2,641
r
## ************************************************************ ## setwd('~/Dropbox/hedgerow_metacom') rm(list=ls()) setwd('analysis/occupancy') args <- commandArgs(trailingOnly=TRUE) source('src/initialize.R') source("src/cppp.R") ## ************************************************************ ## prep data ## ********...
## Coursera R Programming Assignment No2 ## 'makeCasheMatrix' and 'casheSolve' ## Function 'makeCasheMatrix' ## special matrix for caching its inverse ## returning calculation produced by function 'cacheSolve' makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x...
/cachematrix.R
no_license
ber2d2/ProgrammingAssignment2
R
false
false
976
r
## Coursera R Programming Assignment No2 ## 'makeCasheMatrix' and 'casheSolve' ## Function 'makeCasheMatrix' ## special matrix for caching its inverse ## returning calculation produced by function 'cacheSolve' makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GetDimAttrMeasInWorkbookFormatSparqlQuery.R \name{GetDimAttrMeasInWorkbookFormatSparqlQuery} \alias{GetDimAttrMeasInWorkbookFormatSparqlQuery} \title{SPARQL query for dimensions, attributes and measure from RDF data cube in workbook format} \...
/rrdfqbcrnd0/man/GetDimAttrMeasInWorkbookFormatSparqlQuery.Rd
no_license
rjsheperd/rrdfqbcrnd0
R
false
true
584
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/GetDimAttrMeasInWorkbookFormatSparqlQuery.R \name{GetDimAttrMeasInWorkbookFormatSparqlQuery} \alias{GetDimAttrMeasInWorkbookFormatSparqlQuery} \title{SPARQL query for dimensions, attributes and measure from RDF data cube in workbook format} \...
library(dpl) ted <- read.csv("Data/Ted_subjects_for_Q4.csv", stringsAsFactors = F) subjects_Q4 <- read.csv("Data/subjects_for_Q4.csv", stringsAsFactors = F) subjects_only <- subjects_Q4$subject_ids write.table(subjects_only, file = "Data/Q4_subject_list.csv", sep = ",", row.names = F, col.names = F) summary(su...
/Scripts/Untitled.R
no_license
aliburchard/SnapsAtSea
R
false
false
677
r
library(dpl) ted <- read.csv("Data/Ted_subjects_for_Q4.csv", stringsAsFactors = F) subjects_Q4 <- read.csv("Data/subjects_for_Q4.csv", stringsAsFactors = F) subjects_only <- subjects_Q4$subject_ids write.table(subjects_only, file = "Data/Q4_subject_list.csv", sep = ",", row.names = F, col.names = F) summary(su...
#------------------------------------------------------ # Program name: gaur_divergent_regions_genes.R # Objective: To compare the gaur missing genes in divergent # region chr15 against hereford and brahman. Then # plot heatmap of gene expression for region # surrounding the divergent regi...
/scripts/gaur_divergent_regions_genes.R
permissive
Genorater/GaurAssemblyProject
R
false
false
11,448
r
#------------------------------------------------------ # Program name: gaur_divergent_regions_genes.R # Objective: To compare the gaur missing genes in divergent # region chr15 against hereford and brahman. Then # plot heatmap of gene expression for region # surrounding the divergent regi...
library(R.matlab) library("pixmap") library("bmp") library("spatstat") library("readbitmap") # WorkSpace nécessaire pour charger les images # Répertoire Images setwd("~/Desktop/MASSS/Stage/Donnees/Images") # Mac Perso setwd("/kora/home/stage/asetif/Bureau/Images") # PC stagiaire # Application données BabyLab load_d...
/Stage-BabyLab/Codes/CodeStageBabyMac.R
no_license
Twan76/R
R
false
false
5,766
r
library(R.matlab) library("pixmap") library("bmp") library("spatstat") library("readbitmap") # WorkSpace nécessaire pour charger les images # Répertoire Images setwd("~/Desktop/MASSS/Stage/Donnees/Images") # Mac Perso setwd("/kora/home/stage/asetif/Bureau/Images") # PC stagiaire # Application données BabyLab load_d...
# R_code_variability.r # Indicare la cartella da cui estrarre i dati setwd("C:/lab/") # Windows # Funzione library per richiamare il pacchetto: raster library(raster) #oppure: require(raster) # Funzione library per richiamare il pacchetto: RStoolbox library(RStoolbox) # Funzione library per richiamare il pacchetto:...
/R_code_variability.r
no_license
GianlucaNanni/telerilevamento_2021
R
false
false
5,804
r
# R_code_variability.r # Indicare la cartella da cui estrarre i dati setwd("C:/lab/") # Windows # Funzione library per richiamare il pacchetto: raster library(raster) #oppure: require(raster) # Funzione library per richiamare il pacchetto: RStoolbox library(RStoolbox) # Funzione library per richiamare il pacchetto:...
# Created by MRU on March 31, 2019 # To regress type of CCF relationship of pixels with climate data library("ncdf4") library(zoo) library(raster) library(rasterVis) library(gpclib) library(maptools) library(maps) library(forecast) library(astsa) library(TSA) library(ggplot2) library(ggpubr) #for several ggplots tog...
/ccf_regs.r
no_license
rosariouribed/purduesharingtest
R
false
false
43,857
r
# Created by MRU on March 31, 2019 # To regress type of CCF relationship of pixels with climate data library("ncdf4") library(zoo) library(raster) library(rasterVis) library(gpclib) library(maptools) library(maps) library(forecast) library(astsa) library(TSA) library(ggplot2) library(ggpubr) #for several ggplots tog...
## solve function ##### a generic function that solves the equation a %*% x = b for x, ##### where b can be either a vector or a matrix. ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y ...
/cachematrix.R
no_license
WDAnalytics/ProgrammingAssignment2
R
false
false
1,064
r
## solve function ##### a generic function that solves the equation a %*% x = b for x, ##### where b can be either a vector or a matrix. ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y ...
#' Returns outlier indices #' #' Returns a \code{data.frame} with outlier indices for a specific \code{lm} #' model. Indices include studentized residuals, residuals' cook's distance, #' and residuals' hat values. #' #' @param data A data.frame. #' @param formula A model formula. #' @param id A column name from \code{...
/R/lm_outliers.R
permissive
cedricbatailler/marguerite
R
false
false
1,566
r
#' Returns outlier indices #' #' Returns a \code{data.frame} with outlier indices for a specific \code{lm} #' model. Indices include studentized residuals, residuals' cook's distance, #' and residuals' hat values. #' #' @param data A data.frame. #' @param formula A model formula. #' @param id A column name from \code{...
# Statistics One, 2013, Lab 5 # Lab goals # Read a datafile into R # Print summary statistics # Conduct correlation analyses, including NHSTs # Conduct regression analyses, emphasis on standard error, confidence intervals, and model comparison # Example # A correlational study investigating predictors of p...
/Lab5/supplemental-Stats1.13.Lab.05.R
no_license
mnapoleon/statsOneCourse
R
false
false
4,929
r
# Statistics One, 2013, Lab 5 # Lab goals # Read a datafile into R # Print summary statistics # Conduct correlation analyses, including NHSTs # Conduct regression analyses, emphasis on standard error, confidence intervals, and model comparison # Example # A correlational study investigating predictors of p...
#Set the working directory setwd("C:/Users/6217473/Desktop/Coursera/getdata_projectfiles_UCI HAR Dataset/UCI HAR Dataset") ############################################################################################### #STEP1: Merges the training and the test sets to create one data set testX <- read.table("./test/X_...
/run_analysis.R
no_license
jieun0228/Getting_and_Cleaning_Data
R
false
false
2,104
r
#Set the working directory setwd("C:/Users/6217473/Desktop/Coursera/getdata_projectfiles_UCI HAR Dataset/UCI HAR Dataset") ############################################################################################### #STEP1: Merges the training and the test sets to create one data set testX <- read.table("./test/X_...
#' Check if an object was imported using \code{readBlast} or import an object using \code{readBlast} #' #' @param bvar either a path to a Blast result table (gerenated with outfmt=6) or #' such a table imported with the readBlast function #' @param bform character string. Currently can only be "outfmt6" #' ...
/R/checkBlastVar.R
permissive
pgpmartin/NanoBAC
R
false
false
2,117
r
#' Check if an object was imported using \code{readBlast} or import an object using \code{readBlast} #' #' @param bvar either a path to a Blast result table (gerenated with outfmt=6) or #' such a table imported with the readBlast function #' @param bform character string. Currently can only be "outfmt6" #' ...
# Data Processing # This file records steps taken to process the data from accidents.csv # Clear workspace rm(list=ls()) # Load data accidents = read.csv("accidents.csv", header = T, na.strings = "-1") # Inspect data dim(accidents) names(accidents) # Inspect fatality data (accident is fatal if accident_severity ...
/data_processing.R
no_license
ibvandersluis/accidents
R
false
false
9,244
r
# Data Processing # This file records steps taken to process the data from accidents.csv # Clear workspace rm(list=ls()) # Load data accidents = read.csv("accidents.csv", header = T, na.strings = "-1") # Inspect data dim(accidents) names(accidents) # Inspect fatality data (accident is fatal if accident_severity ...
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = c(-1.72131968218895e+83, -7.88781071482505e+93, 1.0823131123826e-105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.9...
/meteor/inst/testfiles/ET0_PenmanMonteith/AFL_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1615839311-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
847
r
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = c(-1.72131968218895e+83, -7.88781071482505e+93, 1.0823131123826e-105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.9...
library(shiny) library(fiftystater) shinyUI(navbarPage("U.S. Crime Report", tabPanel("Bubble Plot", fluidPage( titlePanel("On The Bubbles"), plotOutput("bubbleChart") ) ), tabPanel("Line Chart", fluidPage( ...
/ui.R
no_license
AaronWangyz/Investigate_on_US_crime_rate
R
false
false
2,168
r
library(shiny) library(fiftystater) shinyUI(navbarPage("U.S. Crime Report", tabPanel("Bubble Plot", fluidPage( titlePanel("On The Bubbles"), plotOutput("bubbleChart") ) ), tabPanel("Line Chart", fluidPage( ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \docType{methods} \name{show,scPred-method} \alias{show,scPred-method} \title{show} \usage{ \S4method{show}{scPred}(object) } \description{ Generic display function for \linkS4class{scPred} objects. Displays summary of the object su...
/man/show-scPred-method.Rd
no_license
ACS0906/scPred
R
false
true
374
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \docType{methods} \name{show,scPred-method} \alias{show,scPred-method} \title{show} \usage{ \S4method{show}{scPred}(object) } \description{ Generic display function for \linkS4class{scPred} objects. Displays summary of the object su...
library(dplyr) library(ggplot2) NEIds <- readRDS(file = "summarySCC_PM25.rds") SCCds <- readRDS(file = "Source_Classification_Code.rds") NEIds$year <- factor(NEIds$year) vehicle <- SCCds[grep(pattern = "Mobile Sources", x = SCCds$SCC.Level.One),] vehicle.scc <- vehicle$SCC vehicleDS <- NEIds[NEIds$SCC %in% vehicle.sc...
/plot6.R
no_license
divydeep/ExData_Plotting2
R
false
false
1,163
r
library(dplyr) library(ggplot2) NEIds <- readRDS(file = "summarySCC_PM25.rds") SCCds <- readRDS(file = "Source_Classification_Code.rds") NEIds$year <- factor(NEIds$year) vehicle <- SCCds[grep(pattern = "Mobile Sources", x = SCCds$SCC.Level.One),] vehicle.scc <- vehicle$SCC vehicleDS <- NEIds[NEIds$SCC %in% vehicle.sc...
library(datasets) #setwd("D:/doc/study/dataScientists/4-Exploratory Data Analysis/ExData_Plotting1") rec=read.table("household_power_consumption.txt",header=TRUE,sep=";",na.strings = "?",colClasses=c("character", "character",rep("numeric",7))) dt=rec[(rec$Date %in% c("1/2/2007","2/2/2007")), ] png(filename = "plot1.p...
/courseProject1/plot1.R
no_license
gdwangh/coursera-dataScientists-4-ExploratoryDataAnalysis
R
false
false
475
r
library(datasets) #setwd("D:/doc/study/dataScientists/4-Exploratory Data Analysis/ExData_Plotting1") rec=read.table("household_power_consumption.txt",header=TRUE,sep=";",na.strings = "?",colClasses=c("character", "character",rep("numeric",7))) dt=rec[(rec$Date %in% c("1/2/2007","2/2/2007")), ] png(filename = "plot1.p...
#' Add new variables using dplyr #' #' `step_mutate` creates a *specification* of a recipe step #' that will add variables using [dplyr::mutate()]. #' #' @inheritParams step_center #' @param ... Name-value pairs of expressions. See [dplyr::mutate()]. #' If the argument is not named, the expression is converted to #' a...
/R/mutate.R
permissive
jonthegeek/recipes
R
false
false
3,980
r
#' Add new variables using dplyr #' #' `step_mutate` creates a *specification* of a recipe step #' that will add variables using [dplyr::mutate()]. #' #' @inheritParams step_center #' @param ... Name-value pairs of expressions. See [dplyr::mutate()]. #' If the argument is not named, the expression is converted to #' a...
#course project if(!file.exists("./data")){dir.create("./data")} fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" download.file(fileURL,destfile = "./data/pollution.zip",method = "curl") unzip("./data/pollution.zip") #unzip file #load necessary packages library(data.table) library(p...
/exploratory_data_analysis/wk4/course_project/course_project_script.R
no_license
randallhelms/datasciencecoursera
R
false
false
4,601
r
#course project if(!file.exists("./data")){dir.create("./data")} fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip" download.file(fileURL,destfile = "./data/pollution.zip",method = "curl") unzip("./data/pollution.zip") #unzip file #load necessary packages library(data.table) library(p...
library(h2o) library(tidyquant) library(data.table) library(Metrics) # Import setwd("C:\\Users\\user\\Desktop\\R") data <- fread("train.csv") submission <- fread("test.csv") # Train test split smp_size <- floor(0.8 * nrow(data)) set.seed(1) train_ind <- sample(seq_len(nrow(data)), size = smp_size) train <- data[train...
/R/4. Basic Bandgap.R
no_license
thecch/NomadPrediction
R
false
false
1,600
r
library(h2o) library(tidyquant) library(data.table) library(Metrics) # Import setwd("C:\\Users\\user\\Desktop\\R") data <- fread("train.csv") submission <- fread("test.csv") # Train test split smp_size <- floor(0.8 * nrow(data)) set.seed(1) train_ind <- sample(seq_len(nrow(data)), size = smp_size) train <- data[train...
#' Compute confidence intervals from (multiple) simulated data sets #' #' This function automates the calculation of coverage rates for exploring #' the robustness of confidence interval methods. #' #' @param n size of each sample #' @param samples number of samples to simulate #' @param rdist function used to draw ...
/R/CIsim.R
no_license
fboehm/mosaic
R
false
false
3,581
r
#' Compute confidence intervals from (multiple) simulated data sets #' #' This function automates the calculation of coverage rates for exploring #' the robustness of confidence interval methods. #' #' @param n size of each sample #' @param samples number of samples to simulate #' @param rdist function used to draw ...
junk = rnorm(100, 100, 15) the mean for junk is r`mean(junk)`
/Not hardcoding Examples.R
permissive
johnhall93/STT2810ClassRepo
R
false
false
62
r
junk = rnorm(100, 100, 15) the mean for junk is r`mean(junk)`
pow_cons <- read.csv("household_power_consumption.txt", TRUE, ";") pow_cons[,1] <- as.Date(pow_cons[, 1], "%d/%m/%Y") pow_cons <- subset(pow_cons, Date == "2007-02-01" | Date == "2007-02-02") pow_cons_dt <- strptime(paste(pow_cons$Date, pow_cons$Time), "%Y-%m-%d %H:%M:%S") png(file = "plot2.png") plot(pow_cons_dt, pow...
/plot2.R
no_license
bhardwajs/ExData_Plotting1
R
false
false
482
r
pow_cons <- read.csv("household_power_consumption.txt", TRUE, ";") pow_cons[,1] <- as.Date(pow_cons[, 1], "%d/%m/%Y") pow_cons <- subset(pow_cons, Date == "2007-02-01" | Date == "2007-02-02") pow_cons_dt <- strptime(paste(pow_cons$Date, pow_cons$Time), "%Y-%m-%d %H:%M:%S") png(file = "plot2.png") plot(pow_cons_dt, pow...
NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") # Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) variable, which of these four sources have seen decreases in emissions from 1999-2008 for Baltimore City? Which have seen increases in emission...
/plot3.R
no_license
fballina/Exploratory-Data-Analysis-Project
R
false
false
886
r
NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") # Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad) variable, which of these four sources have seen decreases in emissions from 1999-2008 for Baltimore City? Which have seen increases in emission...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/natural_event_api.R \name{naturalevents} \alias{naturalevents} \title{EONET} \usage{ naturalevents(t, event, APIkey) } \arguments{ \item{t}{Limit the number of prior days (including today) from which events will be returned.} \item{event}{Th...
/man/naturalevents.Rd
permissive
ShuangfeiLi/Mypackage
R
false
true
938
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/natural_event_api.R \name{naturalevents} \alias{naturalevents} \title{EONET} \usage{ naturalevents(t, event, APIkey) } \arguments{ \item{t}{Limit the number of prior days (including today) from which events will be returned.} \item{event}{Th...
#Load required libraries library("GENESIS") library("GWASTools") library("SNPRelate") #Set parameters args <- commandArgs(trailingOnly = TRUE) null.rdata.file <- args[1] bed.fn <- args[2] bim.fn <- args[3] fam.fn <- args[4] out.file.name <- args[5] #Load null model load(null.rdata.file) #Convert PLINK file to GDS gd...
/run_genesis_assoc.R
no_license
mdaya/hla_genesis_assoc
R
false
false
980
r
#Load required libraries library("GENESIS") library("GWASTools") library("SNPRelate") #Set parameters args <- commandArgs(trailingOnly = TRUE) null.rdata.file <- args[1] bed.fn <- args[2] bim.fn <- args[3] fam.fn <- args[4] out.file.name <- args[5] #Load null model load(null.rdata.file) #Convert PLINK file to GDS gd...
## Simple illustration with two numeric and two categorical predictors library(ma) data(wage1) attach(wage1) model <- lm.ma(lwage ~ female + married + educ + exper, compute.deriv=TRUE, parallel=TRUE) apply(coef(model),2,summary) plot(model) plot(model,plot.deriv=TRUE) summary(model)
/demo/wage1.R
no_license
JeffreyRacine/R-Package-ma
R
false
false
318
r
## Simple illustration with two numeric and two categorical predictors library(ma) data(wage1) attach(wage1) model <- lm.ma(lwage ~ female + married + educ + exper, compute.deriv=TRUE, parallel=TRUE) apply(coef(model),2,summary) plot(model) plot(model,plot.deriv=TRUE) summary(model)
\name{servr_combine_param} \alias{servr_combine_param} \title{Combine Solr parameters.} \usage{ servr_combine_param(value, param = names(value)) } \description{ Combine Solr parameters. } \author{ Barret Schloerke } \keyword{internal}
/man/servr_combine_param.Rd
no_license
hadley/helpr
R
false
false
242
rd
\name{servr_combine_param} \alias{servr_combine_param} \title{Combine Solr parameters.} \usage{ servr_combine_param(value, param = names(value)) } \description{ Combine Solr parameters. } \author{ Barret Schloerke } \keyword{internal}
######################################################################################################## # # MMF Record Linkage Project # # Project: Mapping Print, Charting Enlightenment # # Script: Helper function # # Authors: Michael Falk # # Date: 14/1/18 # # This script loads the necessary libaries, connects to the...
/init.R
permissive
davidxhuang/record-linkage
R
false
false
2,928
r
######################################################################################################## # # MMF Record Linkage Project # # Project: Mapping Print, Charting Enlightenment # # Script: Helper function # # Authors: Michael Falk # # Date: 14/1/18 # # This script loads the necessary libaries, connects to the...
library(readr) ufc_data <- read_csv("data/ufc data - Sheet1.csv") View(ufc_data) library(tidyverse) ufc_data$method_d <- str_replace(ufc_data$method_d, "Elbow$", "Elbows") ufc_data$method_d <- str_replace(ufc_data$method_d, "Rear Naked Choke", "Rear-Naked Choke") ufc_data$method_d <- str_replace(ufc_data$method_d, ...
/test.R
no_license
ristouuk/mma-dashboard
R
false
false
1,844
r
library(readr) ufc_data <- read_csv("data/ufc data - Sheet1.csv") View(ufc_data) library(tidyverse) ufc_data$method_d <- str_replace(ufc_data$method_d, "Elbow$", "Elbows") ufc_data$method_d <- str_replace(ufc_data$method_d, "Rear Naked Choke", "Rear-Naked Choke") ufc_data$method_d <- str_replace(ufc_data$method_d, ...
\name{dtwPlotThreeWay} \alias{dtwPlotThreeWay} %- Also NEED an '\alias' for EACH other topic documented here. \title{Plotting of dynamic time warp results: annotated warping function} \description{ Display the query and reference time series and their warping curve, arranged for visual inspection. } \usage{ d...
/man/dtwPlotThreeWay.Rd
no_license
jorgeverdu/dtw
R
false
false
3,317
rd
\name{dtwPlotThreeWay} \alias{dtwPlotThreeWay} %- Also NEED an '\alias' for EACH other topic documented here. \title{Plotting of dynamic time warp results: annotated warping function} \description{ Display the query and reference time series and their warping curve, arranged for visual inspection. } \usage{ d...
\name{print.findFn} \alias{print.findFn} \title{ print a findFn object } \description{ Print a \code{findFn} object to a file and pass it to a web browser } \usage{ \method{print}{findFn}(x, where, title, openBrowser = TRUE, template, ...) } \arguments{ \item{x}{ An object of class \code{findFn} } \...
/man/print.findFn.Rd
no_license
sbgraves237/sos
R
false
false
2,033
rd
\name{print.findFn} \alias{print.findFn} \title{ print a findFn object } \description{ Print a \code{findFn} object to a file and pass it to a web browser } \usage{ \method{print}{findFn}(x, where, title, openBrowser = TRUE, template, ...) } \arguments{ \item{x}{ An object of class \code{findFn} } \...
# emissions from motor vehicle sources in Baltimore City decreased from 1999-2008 scc.vehicles <- SCC[grep("Mobile.*Vehicles", SCC$EI.Sector), ]; # Pattern match mobile vehicles in SCC description scc.vehicles.list <- unique(scc.vehicles$SCC); # Create motor vehicle lookup list by SCC nei.vehicles <- subset(NEI, SCC...
/Plot_5.R
no_license
coryjpiette/ExploratoryData_Project2
R
false
false
1,649
r
# emissions from motor vehicle sources in Baltimore City decreased from 1999-2008 scc.vehicles <- SCC[grep("Mobile.*Vehicles", SCC$EI.Sector), ]; # Pattern match mobile vehicles in SCC description scc.vehicles.list <- unique(scc.vehicles$SCC); # Create motor vehicle lookup list by SCC nei.vehicles <- subset(NEI, SCC...
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 gridCCDr <- function(cors, init_betas, nj, indexj, aj, lambdas, params, verbose) { .Call('ccdrAlgorithm_gridCCDr', PACKAGE = 'ccdrAlgorithm', cors, init_betas, nj, indexj, aj, lambdas, para...
/R/RcppExports.R
no_license
GRSEB9S/ccdrAlgorithm
R
false
false
547
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 gridCCDr <- function(cors, init_betas, nj, indexj, aj, lambdas, params, verbose) { .Call('ccdrAlgorithm_gridCCDr', PACKAGE = 'ccdrAlgorithm', cors, init_betas, nj, indexj, aj, lambdas, para...
testlist <- list(data = structure(0, .Dim = c(1L, 1L)), x = structure(c(2.65671481147497e-231, 7.06284259278282e+281, 4.56969240625327e+233, 4.56316257250786e+257, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 2L))) result <- do.call(distr6:::C_EmpiricalMVPdf,testlist) str(result)
/distr6/inst/testfiles/C_EmpiricalMVPdf/libFuzzer_C_EmpiricalMVPdf/C_EmpiricalMVPdf_valgrind_files/1610035513-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
269
r
testlist <- list(data = structure(0, .Dim = c(1L, 1L)), x = structure(c(2.65671481147497e-231, 7.06284259278282e+281, 4.56969240625327e+233, 4.56316257250786e+257, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 2L))) result <- do.call(distr6:::C_EmpiricalMVPdf,testlist) str(result)
#----------------------------------------------------------# # # # Global Rate-of-Change patterns # # Distribution of sites # # Ondrej Mottl - 2020 # #----------------------------------------------------------# source("R/00_config.R") #----------------------------...
/R/01_Data_distribution.R
no_license
HOPE-UIB-BIO/Global_RoC
R
false
false
7,856
r
#----------------------------------------------------------# # # # Global Rate-of-Change patterns # # Distribution of sites # # Ondrej Mottl - 2020 # #----------------------------------------------------------# source("R/00_config.R") #----------------------------...
library(shiny) shinyUI( uiOutput("ui") )
/ui.R
permissive
jason-p-pickering/datapackr-web
R
false
false
44
r
library(shiny) shinyUI( uiOutput("ui") )
# stores data/shirley.rda in shirley <- data.frame( name = c("Martin", "Carol", "Max", "Virginia Ruth", "Sibyl", "David", "James D.", "Harvey", "Winnifred", "Quentin", "Maurice", "Judy", "Irene May", "Peter", "Walley", "Fred", "Donovan", "Patricia", "Torey", "Larry", "Doris"), sex ...
/data-raw/R/shirley.R
no_license
D-score/dbook1
R
false
false
1,046
r
# stores data/shirley.rda in shirley <- data.frame( name = c("Martin", "Carol", "Max", "Virginia Ruth", "Sibyl", "David", "James D.", "Harvey", "Winnifred", "Quentin", "Maurice", "Judy", "Irene May", "Peter", "Walley", "Fred", "Donovan", "Patricia", "Torey", "Larry", "Doris"), sex ...
# Generate Figure 10 in the paper cat("\014") source("algorithms.R") source("copulastatistic.R") rhoVal = 0.2 i=1 vectx=seq(50,2000,50) nbrsim=1000 matcos=matrix(nrow=40,ncol=1) matdcor=matrix(nrow=40,ncol=1) matmic=matrix(nrow=40,ncol=1) matrdc=matrix(nrow=40,ncol=1) matccor=matrix(nrow=40,ncol=1) nbren=50 while (n...
/codefig10a.R
no_license
faisalnawazmir/copulastatistic
R
false
false
1,606
r
# Generate Figure 10 in the paper cat("\014") source("algorithms.R") source("copulastatistic.R") rhoVal = 0.2 i=1 vectx=seq(50,2000,50) nbrsim=1000 matcos=matrix(nrow=40,ncol=1) matdcor=matrix(nrow=40,ncol=1) matmic=matrix(nrow=40,ncol=1) matrdc=matrix(nrow=40,ncol=1) matccor=matrix(nrow=40,ncol=1) nbren=50 while (n...
# models supported by gasl gasl.slist <- c("linterms", "slterms") # run one more iteration of each smoother and return the underlying fit object (gam::gam.fit does not return these) extract_fits <- function(fit) { data <- fit$smooth.frame w <- fit$weights smooth.labels <- names(data) smooth.wante...
/R/gasl.R
no_license
jeremyrcoyle/gasl
R
false
false
3,416
r
# models supported by gasl gasl.slist <- c("linterms", "slterms") # run one more iteration of each smoother and return the underlying fit object (gam::gam.fit does not return these) extract_fits <- function(fit) { data <- fit$smooth.frame w <- fit$weights smooth.labels <- names(data) smooth.wante...
#library(automap) library(raster) library(caret) library(rgdal) # path <- "/media/tims_ex/kilimanjaro_ta200_interp" # setwd(path) path.server <- "/media/memory01/data/casestudies/kilimanjaro_ta200_interp_ephraim" setwd(path.server) # preparation ------------------------------------------------------------- ### define...
/src_old/global_prep.R
no_license
environmentalinformatics-marburg/appelhans-SPASTA-D-14-00065
R
false
false
7,995
r
#library(automap) library(raster) library(caret) library(rgdal) # path <- "/media/tims_ex/kilimanjaro_ta200_interp" # setwd(path) path.server <- "/media/memory01/data/casestudies/kilimanjaro_ta200_interp_ephraim" setwd(path.server) # preparation ------------------------------------------------------------- ### define...
source("./Code/MixtureLineups.R") source("./Code/theme_lineup.R") library(ggplot2) library(plyr) library(dplyr) library(reshape2) library(nullabor) library(doMC) registerDoMC(12) library(digest) library(Cairo) # Define colors and shapes colors <- c("#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", ...
/Code/GenerateLineupsTurk18.R
no_license
srvanderplas/FeatureHierarchy
R
false
false
7,889
r
source("./Code/MixtureLineups.R") source("./Code/theme_lineup.R") library(ggplot2) library(plyr) library(dplyr) library(reshape2) library(nullabor) library(doMC) registerDoMC(12) library(digest) library(Cairo) # Define colors and shapes colors <- c("#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", ...
# 0. raw data cleaning rm(list=ls()) cat("\14") library(readr) table1 <- read_csv("~/Data Science/Datasets/Data Set 1a.csv") table2 <- read_csv("~/Data Science/Datasets/Data Set 1b.csv") table1$Quantity = as.numeric(table1$Quantity) levels(table1$Product) <- c(levels(table1$Product), "Galaxy Edge S8") table1$...
/Intro to DS/Lab Session 3 and 4/W2A1480191.R
no_license
kiaorahao/DataScienceCourse
R
false
false
1,895
r
# 0. raw data cleaning rm(list=ls()) cat("\14") library(readr) table1 <- read_csv("~/Data Science/Datasets/Data Set 1a.csv") table2 <- read_csv("~/Data Science/Datasets/Data Set 1b.csv") table1$Quantity = as.numeric(table1$Quantity) levels(table1$Product) <- c(levels(table1$Product), "Galaxy Edge S8") table1$...
################################################## # # aggregress Scratchpad # # Lealand Morin, Ph.D. # Assistant Professor # Department of Economics # College of Business Administration # University of Central Florida # # February 15, 2020 # ################################################## # # A set of commands...
/LPM/aggregress_init.R
no_license
LeeMorinUCF/Hidden_Comp_Risks
R
false
false
1,458
r
################################################## # # aggregress Scratchpad # # Lealand Morin, Ph.D. # Assistant Professor # Department of Economics # College of Business Administration # University of Central Florida # # February 15, 2020 # ################################################## # # A set of commands...