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
#!/usr/bin/env Rscript # Szi Kay Leung: sl693@exeter.ac.uk # Aim: Classification of AS events in Iso-Seq data (IR, SE, MX, A5', A3', AF, AL) novel vs annotated isoforms # IR(Intron Retention) - identified from SQANTI2 # MX(Mutually Exclusive), SE (Skipped Exons) - identified from SUPPA2 # A5'(Alternative 5'), A3'(Alt...
/Alternative_Splicing/AS_Events_Output_novelannotated.R
no_license
SziKayLeung/Whole_Transcriptome_Paper
R
false
false
12,434
r
#!/usr/bin/env Rscript # Szi Kay Leung: sl693@exeter.ac.uk # Aim: Classification of AS events in Iso-Seq data (IR, SE, MX, A5', A3', AF, AL) novel vs annotated isoforms # IR(Intron Retention) - identified from SQANTI2 # MX(Mutually Exclusive), SE (Skipped Exons) - identified from SUPPA2 # A5'(Alternative 5'), A3'(Alt...
binom.test(28, 37, 0.85, "two.sided") # Q1 pchisq(5, 3, lower.tail = FALSE)
/Tutorial 3/t3.R
no_license
manthan98/BME213
R
false
false
76
r
binom.test(28, 37, 0.85, "two.sided") # Q1 pchisq(5, 3, lower.tail = FALSE)
/Ch. 4/RSF_Rocio/All_analysis_Rocío/D_descriptivo_individuos.R
no_license
anasanz/MyScripts
R
false
false
4,364
r
makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y){ x <<- y i <<- NULL } get <- function() x setinverse <- function(inverse) i <<- inverse getinverse <- function() i list(set= set, get = get, ...
/cachematrix.R
no_license
izania/ProgrammingAssignment2
R
false
false
824
r
makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y){ x <<- y i <<- NULL } get <- function() x setinverse <- function(inverse) i <<- inverse getinverse <- function() i list(set= set, get = get, ...
#------------------------------------------ # Function to generate random noise images # #------------------------------------------
/_R/mainfile.R
no_license
svenohl/VisualJitterIllusion
R
false
false
132
r
#------------------------------------------ # Function to generate random noise images # #------------------------------------------
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reducers.R \name{as_reducer} \alias{as_reducer} \title{Create a custom reducer} \usage{ as_reducer(.f, ..., returns_vector = TRUE, first_match = NULL) } \arguments{ \item{.f}{a function that returns either a numeric vector or a \code{data.fra...
/man/as_reducer.Rd
permissive
USCbiostats/partition
R
false
true
1,513
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reducers.R \name{as_reducer} \alias{as_reducer} \title{Create a custom reducer} \usage{ as_reducer(.f, ..., returns_vector = TRUE, first_match = NULL) } \arguments{ \item{.f}{a function that returns either a numeric vector or a \code{data.fra...
makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse getinverse <- function() m list(set = set, get = get, set...
/R Programming/makeCacheMatrix.R
no_license
hbs1/Desktop
R
false
false
382
r
makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse getinverse <- function() m list(set = set, get = get, set...
simtable.bab <- function(args, nosim = NULL, maxiter = NULL){ if (!is.null(nosim)) args$nosim <- nosim if (!is.null(maxiter)) args$maxiter <- maxiter if (args$nosim > args$maxiter) { warning("update.bab, nosim > maxiter, setting maxiter = nosim") args$maxiter <- args$nosim } nocol <- length(args$y) ...
/B_analysts_sources_github/bcaffo/exactLoglinTest/simtable.bab.R
no_license
Irbis3/crantasticScrapper
R
false
false
2,179
r
simtable.bab <- function(args, nosim = NULL, maxiter = NULL){ if (!is.null(nosim)) args$nosim <- nosim if (!is.null(maxiter)) args$maxiter <- maxiter if (args$nosim > args$maxiter) { warning("update.bab, nosim > maxiter, setting maxiter = nosim") args$maxiter <- args$nosim } nocol <- length(args$y) ...
\name{soil} \alias{soil} \docType{data} \title{ Data of soil analysis for 13 localities} \description{ We analyzed the physical and chemical properties of different soils, as full characterization of soil and special analysis of micro-elements. These analyses were conducted in the laboratory analysis of ...
/man/soil.Rd
no_license
cran/agricolae
R
false
false
2,658
rd
\name{soil} \alias{soil} \docType{data} \title{ Data of soil analysis for 13 localities} \description{ We analyzed the physical and chemical properties of different soils, as full characterization of soil and special analysis of micro-elements. These analyses were conducted in the laboratory analysis of ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gatingModules.R \name{gatingModuleUI} \alias{gatingModuleUI} \title{Title} \usage{ gatingModuleUI(id, label = "gatingModule", popSubsets) } \arguments{ \item{id}{unique identifier for object} \item{label}{unique name for UI module} \item{an...
/man/gatingModuleUI.Rd
permissive
laderast/flowDashboard
R
false
true
356
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gatingModules.R \name{gatingModuleUI} \alias{gatingModuleUI} \title{Title} \usage{ gatingModuleUI(id, label = "gatingModule", popSubsets) } \arguments{ \item{id}{unique identifier for object} \item{label}{unique name for UI module} \item{an...
\name{dg.graphedges-class} \docType{class} % \alias{coerce,dg.simple.graph,dg.graph-method} \alias{dg.graphedges-class} \alias{show,dg.graphedges-method} \alias{Str,dg.graphedges-method} \alias{addModel,dg.graphedges-method} \alias{addView,dg.graphedges-method} \alias{replaceModel,dg.graphedges-method} \alias{repl...
/man/dg.graphedges-class.Rd
no_license
cran/dynamicGraph
R
false
false
19,756
rd
\name{dg.graphedges-class} \docType{class} % \alias{coerce,dg.simple.graph,dg.graph-method} \alias{dg.graphedges-class} \alias{show,dg.graphedges-method} \alias{Str,dg.graphedges-method} \alias{addModel,dg.graphedges-method} \alias{addView,dg.graphedges-method} \alias{replaceModel,dg.graphedges-method} \alias{repl...
library(LS2W) ### Name: Psi2Dname ### Title: Return a D2ACW list object style name. ### Aliases: Psi2Dname ### Keywords: models ### ** Examples # # What's the name of the order 4 Haar PsiJ object? # Psi2Dname(-4, filter.number=1, family="DaubExPhase", switch="direction") #[1] "D1Psi.d.4.1.DaubExPhase"
/data/genthat_extracted_code/LS2W/examples/Psi2Dname.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
311
r
library(LS2W) ### Name: Psi2Dname ### Title: Return a D2ACW list object style name. ### Aliases: Psi2Dname ### Keywords: models ### ** Examples # # What's the name of the order 4 Haar PsiJ object? # Psi2Dname(-4, filter.number=1, family="DaubExPhase", switch="direction") #[1] "D1Psi.d.4.1.DaubExPhase"
# Libraries library(pdftools) library(tabulizer) library(re2r) library(data.table) library(rlist) library(pipeR) library(parallel) #library(readxl) # Code to download Center for Muni Finance pdfs # Get city names from Reason spreadsheet cities <- readxl::read_excel( "/Users/davidlucey/Desktop/David/Projects/...
/reason_pdf_parser.R
no_license
luceydav/pdf_cafr_parse
R
false
false
6,902
r
# Libraries library(pdftools) library(tabulizer) library(re2r) library(data.table) library(rlist) library(pipeR) library(parallel) #library(readxl) # Code to download Center for Muni Finance pdfs # Get city names from Reason spreadsheet cities <- readxl::read_excel( "/Users/davidlucey/Desktop/David/Projects/...
\name{dataB} \alias{dataB} \docType{data} \title{dataB} \description{ Data Set B for usage example. } \usage{data("dataB")} \format{ The format is: num [1:1000, 1:5] 1 1 0 1 1 2 0 0 1 2 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:5] "snp" "smoke" "fev" "age" ... } \details{ %% ~~ If necessary, ...
/man/dataB.Rd
no_license
SharonLutz/bayesIndirect
R
false
false
603
rd
\name{dataB} \alias{dataB} \docType{data} \title{dataB} \description{ Data Set B for usage example. } \usage{data("dataB")} \format{ The format is: num [1:1000, 1:5] 1 1 0 1 1 2 0 0 1 2 ... - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:5] "snp" "smoke" "fev" "age" ... } \details{ %% ~~ If necessary, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/robotstxt.R \docType{class} \name{robotstxt} \alias{robotstxt} \title{An object representation of robots.txt files} \format{\code{\link{R6Class}} object.} \usage{ robotstxt } \value{ Object of \code{\link{R6Class}} with method(s) for bot perm...
/man/robotstxt.Rd
permissive
seozoidberg/robotstxt
R
false
true
1,930
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/robotstxt.R \docType{class} \name{robotstxt} \alias{robotstxt} \title{An object representation of robots.txt files} \format{\code{\link{R6Class}} object.} \usage{ robotstxt } \value{ Object of \code{\link{R6Class}} with method(s) for bot perm...
############################################################################ ### Simulation code for section 4.3 (uncertainty quantification) ############################################################################ source("0_libs_funs.R", chdir = T) if(length(list.files("results")) == 0) dir.create("results") if(l...
/simulations/3_bootstrap_sim_factor.R
no_license
davidruegamer/BoostingSignalSynchro
R
false
false
3,305
r
############################################################################ ### Simulation code for section 4.3 (uncertainty quantification) ############################################################################ source("0_libs_funs.R", chdir = T) if(length(list.files("results")) == 0) dir.create("results") if(l...
\name{wleFromRes} \alias{wleFromRes} \title{Collects all WLEs from the object returned by getResults()} \description{Collects WLEs in a wide data frame. } \usage{ wleFromRes(resultsObj, idVarName = NULL, verbose=TRUE)} \arguments{ \item{resultsObj}{ The object returned by \code{\link{getResults}}. } \item...
/man/wleFromRes.rd
no_license
weirichs/eatModel
R
false
false
1,035
rd
\name{wleFromRes} \alias{wleFromRes} \title{Collects all WLEs from the object returned by getResults()} \description{Collects WLEs in a wide data frame. } \usage{ wleFromRes(resultsObj, idVarName = NULL, verbose=TRUE)} \arguments{ \item{resultsObj}{ The object returned by \code{\link{getResults}}. } \item...
## Loading required package: ggplot2 and dplyr require(ggplot2) require(dplyr) #png("plot3.png", width=number.add.width, height=number.add.height) # Group total NEI emissions per year: baltcitymary.emissions.byyear<-summarise(group_by(filter(NEI, fips == "24510"), year,type), Emissions=sum(Emissions)) # clrs <- c("re...
/plot3.R
no_license
aclyrics65M/Exploratory-Data-Analysis-Project-02
R
false
false
921
r
## Loading required package: ggplot2 and dplyr require(ggplot2) require(dplyr) #png("plot3.png", width=number.add.width, height=number.add.height) # Group total NEI emissions per year: baltcitymary.emissions.byyear<-summarise(group_by(filter(NEI, fips == "24510"), year,type), Emissions=sum(Emissions)) # clrs <- c("re...
## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setInverse <- function(solveMatrix) i <<- solveMatri...
/cachematrix.R
no_license
fvecchiato/ProgrammingAssignment2
R
false
false
984
r
## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { i <- NULL set <- function(y) { x <<- y i <<- NULL } get <- function() x setInverse <- function(solveMatrix) i <<- solveMatri...
#' Author: Ted Kwartler #' Date: 9-24-2018 #' Purpose: OldCar Toyota Corolla Regression #' # Libs library(vtreat) library(dplyr) library(ModelMetrics) # Options options(scipen=999) # SetWD setwd("/cloud/project/Lessons/D_Regression_LogisticRegression/data") # Dat cars <- read.csv('oldCar.csv') # Partitioning 20% ...
/Lessons/D_Regression_LogisticRegression/scripts/D_oldCar.R
no_license
guptasan98/Harvard_DataMining_Business_Student
R
false
false
3,964
r
#' Author: Ted Kwartler #' Date: 9-24-2018 #' Purpose: OldCar Toyota Corolla Regression #' # Libs library(vtreat) library(dplyr) library(ModelMetrics) # Options options(scipen=999) # SetWD setwd("/cloud/project/Lessons/D_Regression_LogisticRegression/data") # Dat cars <- read.csv('oldCar.csv') # Partitioning 20% ...
#------------------------------------------------------------------------------- # 5): compute the deviation from the "true" stock (Mac) for each replicate #------------------------------------------------------------------------------- # get the CVs on the Ns and Fs from the latests assessment devN<- log(sweep...
/utils/assessment errors.r
no_license
brune001/WKMACLTMP2014
R
false
false
1,746
r
#------------------------------------------------------------------------------- # 5): compute the deviation from the "true" stock (Mac) for each replicate #------------------------------------------------------------------------------- # get the CVs on the Ns and Fs from the latests assessment devN<- log(sweep...
testlist <- list(x = c(-6.95715257111252e+306, NaN, -1.65652687672654e-181, NaN, -1.06817373190923e+297, 3.53369545915248e+72, 7.21902962651992e-304, 4.99006302299659e-322, 0, NaN, 3.53369546676705e+72, 4.99006302299659e-322, 0, -1.491667821162e-154, NaN, -2.62841760552745e-159, 4.74156249361237e-296, -1.3476547798...
/blorr/inst/testfiles/blr_pairs_cpp/libFuzzer_blr_pairs_cpp/blr_pairs_cpp_valgrind_files/1609956220-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
765
r
testlist <- list(x = c(-6.95715257111252e+306, NaN, -1.65652687672654e-181, NaN, -1.06817373190923e+297, 3.53369545915248e+72, 7.21902962651992e-304, 4.99006302299659e-322, 0, NaN, 3.53369546676705e+72, 4.99006302299659e-322, 0, -1.491667821162e-154, NaN, -2.62841760552745e-159, 4.74156249361237e-296, -1.3476547798...
#' @title Information attached package #' #' @param package_name name of the package #' #' @description Helpful to find out if the latest version (build) is in search-path or not and prints out the version #' @return #' @export #' #' @examples #' library(stats) #' info_attached_package(package_name = "survival") info_...
/R/helpful_functions.R
no_license
gmoeser/masem_R_DEV
R
false
false
5,315
r
#' @title Information attached package #' #' @param package_name name of the package #' #' @description Helpful to find out if the latest version (build) is in search-path or not and prints out the version #' @return #' @export #' #' @examples #' library(stats) #' info_attached_package(package_name = "survival") info_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/coef.R \name{coef.glmsmurf} \alias{coef.glmsmurf} \alias{coefficients.glmsmurf} \title{Coefficients of Estimated Model} \usage{ \method{coef}{glmsmurf}(object, ...) \method{coefficients}{glmsmurf}(object, ...) } \arguments{ \item...
/man/coef.glmsmurf.Rd
no_license
BavoDC/smurf
R
false
true
991
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/coef.R \name{coef.glmsmurf} \alias{coef.glmsmurf} \alias{coefficients.glmsmurf} \title{Coefficients of Estimated Model} \usage{ \method{coef}{glmsmurf}(object, ...) \method{coefficients}{glmsmurf}(object, ...) } \arguments{ \item...
#'Cleaning the Data 2.0 - By Name #' #'Cleans the data for the Names of the faculty. #'@param data frame The name of the data frame, Faculty (from cleanyr3) #'@return A new dataframe (unassigned) that now has the name of the Faculty, cleaning out unnecessary symbols that had previously existed in the data. #'@...
/R/cleanname.R
no_license
johnsonnei/Faculty
R
false
false
1,105
r
#'Cleaning the Data 2.0 - By Name #' #'Cleans the data for the Names of the faculty. #'@param data frame The name of the data frame, Faculty (from cleanyr3) #'@return A new dataframe (unassigned) that now has the name of the Faculty, cleaning out unnecessary symbols that had previously existed in the data. #'@...
powerz <- function(gamma1, r=0.5,m1=1000, pi0=0.99,alpha=0.05,delta=1){ N = 8*m1 n1 = N*r/m1 pow1 = 1 - pnorm(qnorm(gamma1)-delta*sqrt(n1/2)) m2 = m1*(pi0*gamma1 + (1-pi0)*pow1) n2 = N*(1-r)/m2 nt = n1 + n2 gfun<-function(z,g2) (1-pnorm((qnorm(1-g2)-sqrt(n1/nt)*z)/sqrt(n2/nt)))*dnorm(z) gam<-function(g2) integrate...
/R/powerz.R
no_license
xsswang/TwoStage
R
false
false
778
r
powerz <- function(gamma1, r=0.5,m1=1000, pi0=0.99,alpha=0.05,delta=1){ N = 8*m1 n1 = N*r/m1 pow1 = 1 - pnorm(qnorm(gamma1)-delta*sqrt(n1/2)) m2 = m1*(pi0*gamma1 + (1-pi0)*pow1) n2 = N*(1-r)/m2 nt = n1 + n2 gfun<-function(z,g2) (1-pnorm((qnorm(1-g2)-sqrt(n1/nt)*z)/sqrt(n2/nt)))*dnorm(z) gam<-function(g2) integrate...
#' se #' #' Utility function to compute pointwise squared error (SE) #' #' @param y A numeric vector representing the actual values. #' @param y_hat A numeric vector representing the forecasted values. #' #' @return squared error of forecasted values. #' #' @export se <- function(y, y_hat) { stopifnot(length(y) == le...
/R/metrics.r
no_license
dsaa17anonymous/dsaa17ensemble
R
false
false
2,743
r
#' se #' #' Utility function to compute pointwise squared error (SE) #' #' @param y A numeric vector representing the actual values. #' @param y_hat A numeric vector representing the forecasted values. #' #' @return squared error of forecasted values. #' #' @export se <- function(y, y_hat) { stopifnot(length(y) == le...
scoped_exit <- function(expr, frame = caller_env()) { expr <- enexpr(expr) # We are at top-level when only one frame refers to the global environment if (is_reference(frame, global_env())) { is_global_frame <- sys.parents() == 0 if (sum(is_global_frame) == 1) { abort("Can't add an exit event at to...
/R/events.R
no_license
tracydiayu/rlang
R
false
false
495
r
scoped_exit <- function(expr, frame = caller_env()) { expr <- enexpr(expr) # We are at top-level when only one frame refers to the global environment if (is_reference(frame, global_env())) { is_global_frame <- sys.parents() == 0 if (sum(is_global_frame) == 1) { abort("Can't add an exit event at to...
# K means lloylds algorithms # calculates the distance between each data point of df1, df2 distanceDF <- function(df1,df2){ dfx <- rbind(df1,df2) dist <- as.matrix(dist(dfx), label=true) dist <- dist[(nrow(df1)+1):(nrow(dfx)),1:nrow(df1)] return(dist) } # Returns boolean whether the list of centroids are wit...
/Unsupervised learning/Code/Ck.R
no_license
BBaggines/ML
R
false
false
2,881
r
# K means lloylds algorithms # calculates the distance between each data point of df1, df2 distanceDF <- function(df1,df2){ dfx <- rbind(df1,df2) dist <- as.matrix(dist(dfx), label=true) dist <- dist[(nrow(df1)+1):(nrow(dfx)),1:nrow(df1)] return(dist) } # Returns boolean whether the list of centroids are wit...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Normalization4CA.R \name{print.createNormedFactors} \alias{print.createNormedFactors} \title{Change the print function for createNormedFactors} \usage{ \method{print}{createNormedFactors}(x, ...) } \arguments{ \item{x}{a list: output of creat...
/man/print.createNormedFactors.Rd
no_license
HerveAbdi/PTCA4CATA
R
false
true
473
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Normalization4CA.R \name{print.createNormedFactors} \alias{print.createNormedFactors} \title{Change the print function for createNormedFactors} \usage{ \method{print}{createNormedFactors}(x, ...) } \arguments{ \item{x}{a list: output of creat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/document_data.R \docType{data} \name{prob3p23data} \alias{prob3p23data} \title{The prob3p23data data set.} \format{A data frame with 60 rows and 2 variables. \describe{ \item{X1}{variable} \item{x}{variable} }} \source{ \url{http://people...
/man/prob3p23data.Rd
no_license
rrrlw/KzooStats
R
false
true
460
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/document_data.R \docType{data} \name{prob3p23data} \alias{prob3p23data} \title{The prob3p23data data set.} \format{A data frame with 60 rows and 2 variables. \describe{ \item{X1}{variable} \item{x}{variable} }} \source{ \url{http://people...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/log_factorial.R \name{log_factorial} \alias{log_factorial} \title{compute the log factorial} \usage{ log_factorial(n) } \arguments{ \item{n}{integer} } \value{ log factorial of the given integer } \description{ compute the log ...
/man/log_factorial.Rd
no_license
TaoYang-dev/gIDR
R
false
true
334
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/log_factorial.R \name{log_factorial} \alias{log_factorial} \title{compute the log factorial} \usage{ log_factorial(n) } \arguments{ \item{n}{integer} } \value{ log factorial of the given integer } \description{ compute the log ...
## Across the United States, how have emissions from coal combustion-related sources changed from 1999-2008? combustion.coal <- grepl("Fuel Comb.*Coal", SCC$EI.Sector) combustion.coal.sources <- SCC[combustion.coal,] # Find emissions from coal combustion-related sources emissions.coal.combustion <- NEI[(NEI$SCC %in% ...
/Plot4.R
no_license
Ryedla/Coursera-exploratory-data-analysis-course-project-2
R
false
false
928
r
## Across the United States, how have emissions from coal combustion-related sources changed from 1999-2008? combustion.coal <- grepl("Fuel Comb.*Coal", SCC$EI.Sector) combustion.coal.sources <- SCC[combustion.coal,] # Find emissions from coal combustion-related sources emissions.coal.combustion <- NEI[(NEI$SCC %in% ...
install.packages("ade4") library(ade4) install.packages("Distance") library(Distance) Sys.time() jaccard2 <- read.csv("data\\distanceMatricesJacksonDatabindV112\\dm_jaccard.csv", header = FALSE) dij3 <- with(jaccard2, structure(Distance, Size = length(nams), Labels...
/r/MantelTestV2.R
no_license
DetailsMatterM/R_MantelTest
R
false
false
1,050
r
install.packages("ade4") library(ade4) install.packages("Distance") library(Distance) Sys.time() jaccard2 <- read.csv("data\\distanceMatricesJacksonDatabindV112\\dm_jaccard.csv", header = FALSE) dij3 <- with(jaccard2, structure(Distance, Size = length(nams), Labels...
#Scrapped from Generating County plot of Target Sales # #tzip2 <- merge(tzip,zip.regions,by.x='ZIP',by.y='region') #tzip2[,.(value=sum(value)),by=.(region=county.fips.numeric)] #county_choropleth(tzip2[,.(value=sum(value)),by=.(region=county.fips.numeric)], title = "Target Sales by County 2014+2015") + scale_fill_brewe...
/R/prepare_data.R
no_license
cabajgtr/Map
R
false
false
3,187
r
#Scrapped from Generating County plot of Target Sales # #tzip2 <- merge(tzip,zip.regions,by.x='ZIP',by.y='region') #tzip2[,.(value=sum(value)),by=.(region=county.fips.numeric)] #county_choropleth(tzip2[,.(value=sum(value)),by=.(region=county.fips.numeric)], title = "Target Sales by County 2014+2015") + scale_fill_brewe...
ineq_theil2 <- function(age, dx, lx, ex, ax){ age_length_equal <- all.equal(length(age),length(dx), length(lx),length(ex), length(ax)) stopifnot(age_length_equal) N <- length(age) T1 <- rep(NA,N) for(i in 1:N){ axi <- age[1:(N+1-...
/dev/theil_alternative.R
no_license
alysonvanraalte/LifeIneq
R
false
false
1,252
r
ineq_theil2 <- function(age, dx, lx, ex, ax){ age_length_equal <- all.equal(length(age),length(dx), length(lx),length(ex), length(ax)) stopifnot(age_length_equal) N <- length(age) T1 <- rep(NA,N) for(i in 1:N){ axi <- age[1:(N+1-...
library(caTools) library(shiny) library(shinydashboard) library(httr) library(leaflet) library(dplyr) library(ggmap) library(geosphere) library(geosphere) library(data.table) library(scales) library(plotly) library(lazyeval) library(shinyjs) library(mongolite) # For Parallel Coordinates #devtools::install_github("tim...
/ui.R
no_license
mavezdabas/food_WorldCup
R
false
false
9,898
r
library(caTools) library(shiny) library(shinydashboard) library(httr) library(leaflet) library(dplyr) library(ggmap) library(geosphere) library(geosphere) library(data.table) library(scales) library(plotly) library(lazyeval) library(shinyjs) library(mongolite) # For Parallel Coordinates #devtools::install_github("tim...
### Reed Woyda # reedwoyda@gmail.com # 11/17/2020 # Script to make pheatmaps with metadata library(pheatmap) library(viridis) # data must be in the format: rownames = isolate, colnames = genes # metadata must be in the format: rownames = isolates (*have to be in same order as data rownames), colnames = metadata categ...
/pheatmap-conting-table.R
no_license
BioRRW/Random-R-Scripts-heatmaps-and-clustering
R
false
false
1,820
r
### Reed Woyda # reedwoyda@gmail.com # 11/17/2020 # Script to make pheatmaps with metadata library(pheatmap) library(viridis) # data must be in the format: rownames = isolate, colnames = genes # metadata must be in the format: rownames = isolates (*have to be in same order as data rownames), colnames = metadata categ...
# title: ps3.R # authors: nadia lucas and fern ramoutar # updated: march 2021 #================================================# # set up #================================================# # packages library(tidyverse) library(tigris) library(sf) library(RColorBrewer) library(ggmap) library(ggthemes) library(map...
/pset3/ps3.R
no_license
nadialucas/iobros
R
false
false
5,590
r
# title: ps3.R # authors: nadia lucas and fern ramoutar # updated: march 2021 #================================================# # set up #================================================# # packages library(tidyverse) library(tigris) library(sf) library(RColorBrewer) library(ggmap) library(ggthemes) library(map...
# Here we are going to try training a model with categorical features # Load libraries library(data.table) library(lightgbm) # Load data and look at the structure # # Classes 'data.table' and 'data.frame': 4521 obs. of 17 variables: # $ age : int 30 33 35 30 59 35 36 39 41 43 ... # $ job : chr "unemploye...
/R-package/demo/categorical_features_prepare.R
permissive
gmaliar/LightGBM
R
false
false
3,220
r
# Here we are going to try training a model with categorical features # Load libraries library(data.table) library(lightgbm) # Load data and look at the structure # # Classes 'data.table' and 'data.frame': 4521 obs. of 17 variables: # $ age : int 30 33 35 30 59 35 36 39 41 43 ... # $ job : chr "unemploye...
#' Create UI of summary page #' #' @param id Namespace for the page. #' #' @importFrom shiny NS fluidRow plotOutput #' @importFrom shinydashboard box summaryPageUI <- function(id) { ns <- NS(id) fluidRow( box(width = 3, shiny::tableOutput(outputId = ns("summary_table"))), box(width = 4, shiny::sele...
/R/summaryPage.R
permissive
altairwei/wiztimebook
R
false
false
1,391
r
#' Create UI of summary page #' #' @param id Namespace for the page. #' #' @importFrom shiny NS fluidRow plotOutput #' @importFrom shinydashboard box summaryPageUI <- function(id) { ns <- NS(id) fluidRow( box(width = 3, shiny::tableOutput(outputId = ns("summary_table"))), box(width = 4, shiny::sele...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getOntos.R \name{getCellOnto} \alias{getCellOnto} \alias{getCellLineOnto} \alias{getEFOOnto} \alias{getChebiLite} \alias{getCellosaurusOnto} \alias{getUBERON_NE} \alias{getChebiOnto} \alias{getOncotreeOnto} \alias{getDiseaseOnto} \alias{getGe...
/man/getCellOnto.Rd
no_license
MusculusMus/ontoProc
R
false
true
2,537
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getOntos.R \name{getCellOnto} \alias{getCellOnto} \alias{getCellLineOnto} \alias{getEFOOnto} \alias{getChebiLite} \alias{getCellosaurusOnto} \alias{getUBERON_NE} \alias{getChebiOnto} \alias{getOncotreeOnto} \alias{getDiseaseOnto} \alias{getGe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/topojson_write.R \name{topojson_write} \alias{topojson_write} \title{Write TopoJSON from various inputs} \usage{ topojson_write(input, lat = NULL, lon = NULL, geometry = "point", group = NULL, file = "myfile.topojson", overwrite = TRUE, p...
/man/topojson_write.Rd
permissive
mohsinrazadanish/geojsonio
R
false
true
7,715
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/topojson_write.R \name{topojson_write} \alias{topojson_write} \title{Write TopoJSON from various inputs} \usage{ topojson_write(input, lat = NULL, lon = NULL, geometry = "point", group = NULL, file = "myfile.topojson", overwrite = TRUE, p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/frauddetector_operations.R \name{frauddetector_put_event_type} \alias{frauddetector_put_event_type} \title{Creates or updates an event type} \usage{ frauddetector_put_event_type(name, description, eventVariables, labels, entityTypes, tags) ...
/paws/man/frauddetector_put_event_type.Rd
permissive
sanchezvivi/paws
R
false
true
1,542
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/frauddetector_operations.R \name{frauddetector_put_event_type} \alias{frauddetector_put_event_type} \title{Creates or updates an event type} \usage{ frauddetector_put_event_type(name, description, eventVariables, labels, entityTypes, tags) ...
# # Install packages if not done yet # if (!requireNamespace("plotly", quietly = TRUE)) # install.packages("plotly") # if (!requireNamespace("purrr", quietly = TRUE)) # install.packages("purrr") # if (!requireNamespace("dplyr", quietly = TRUE)) # install.packages("dplyr") # if (!requireNamespace("stringr", quietl...
/apps/linear_transformations_shiny.R
no_license
massonix/math_teaching
R
false
false
6,561
r
# # Install packages if not done yet # if (!requireNamespace("plotly", quietly = TRUE)) # install.packages("plotly") # if (!requireNamespace("purrr", quietly = TRUE)) # install.packages("purrr") # if (!requireNamespace("dplyr", quietly = TRUE)) # install.packages("dplyr") # if (!requireNamespace("stringr", quietl...
#If skewness of the data lies between -1 and +1 then it is normal data, else it is skewed. #It is negatively skewed if the data leans towards left and positively skewed if vice versa. #Kurtosis shows the peak of standard deviation between data points and mean, usually for normal data it lies between -3 and +3 #(platyku...
/9th July-Statistical Functions On Dataset.R
no_license
SaaiMahesh/College-R
R
false
false
2,716
r
#If skewness of the data lies between -1 and +1 then it is normal data, else it is skewed. #It is negatively skewed if the data leans towards left and positively skewed if vice versa. #Kurtosis shows the peak of standard deviation between data points and mean, usually for normal data it lies between -3 and +3 #(platyku...
library(timeseriesdb) ### Name: createHstore ### Title: Create Hstore ### Aliases: createHstore createHstore.ts createHstore.zoo ### createHstore.data.frame createHstore.list ### ** Examples ts1 <- ts(rnorm(100),start = c(1990,1),frequency = 4) createHstore(ts1)
/data/genthat_extracted_code/timeseriesdb/examples/createHstore.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
273
r
library(timeseriesdb) ### Name: createHstore ### Title: Create Hstore ### Aliases: createHstore createHstore.ts createHstore.zoo ### createHstore.data.frame createHstore.list ### ** Examples ts1 <- ts(rnorm(100),start = c(1990,1),frequency = 4) createHstore(ts1)
library(shiny) require(markdown) shinyUI(navbarPage("Economic Data Visualizer", tabPanel("Plot", sidebarPanel( helpText("Select an Economic Data to display. Information will be collected from Federal Reserve Bank of St. Louis."), selectInput("select", label = h3("Select Data"), ...
/ui.R
no_license
saddagarla/developing-data-products
R
false
false
1,159
r
library(shiny) require(markdown) shinyUI(navbarPage("Economic Data Visualizer", tabPanel("Plot", sidebarPanel( helpText("Select an Economic Data to display. Information will be collected from Federal Reserve Bank of St. Louis."), selectInput("select", label = h3("Select Data"), ...
library(dplR) ### Name: time.rwl ### Title: Return time values for rwl and crn objects ### Aliases: time.rwl time.crn ### Keywords: manip ### ** Examples library(utils) data(co021) co021.yrs <- time(co021)
/data/genthat_extracted_code/dplR/examples/time.rwl.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
213
r
library(dplR) ### Name: time.rwl ### Title: Return time values for rwl and crn objects ### Aliases: time.rwl time.crn ### Keywords: manip ### ** Examples library(utils) data(co021) co021.yrs <- time(co021)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pivotThemes.R \name{getDefaultTheme} \alias{getDefaultTheme} \title{Get the default theme for styling a pivot table.} \usage{ getDefaultTheme(parentPivot, themeName = "default") } \arguments{ \item{parentPivot}{Owning pivot table.} \item{the...
/man/getDefaultTheme.Rd
no_license
cbailiss/pivottabler
R
false
true
467
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pivotThemes.R \name{getDefaultTheme} \alias{getDefaultTheme} \title{Get the default theme for styling a pivot table.} \usage{ getDefaultTheme(parentPivot, themeName = "default") } \arguments{ \item{parentPivot}{Owning pivot table.} \item{the...
#' Variable importance using statistical learning #' #' @description Given a dataframe produced of response and predictors, this function first #' divides the data into training and test sets. It does model fitting and returns the key results, and optionally, plots, #' for further analysis by the user. The statistical...
/stat290project-master/statgeophy/R/modelFitting.R
no_license
kizzykinte/stats290project
R
false
false
5,496
r
#' Variable importance using statistical learning #' #' @description Given a dataframe produced of response and predictors, this function first #' divides the data into training and test sets. It does model fitting and returns the key results, and optionally, plots, #' for further analysis by the user. The statistical...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/a.R \name{loadTreeMan} \alias{loadTreeMan} \title{Load a TreeMan object in serialization format} \usage{ loadTreeMan(file) } \arguments{ \item{file}{file path} } \description{ \code{TreeMan} equivalent to \code{load()} but able to handle node...
/man/loadTreeMan.Rd
permissive
ropensci/phylotaR
R
false
true
1,481
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/a.R \name{loadTreeMan} \alias{loadTreeMan} \title{Load a TreeMan object in serialization format} \usage{ loadTreeMan(file) } \arguments{ \item{file}{file path} } \description{ \code{TreeMan} equivalent to \code{load()} but able to handle node...
#function takes a column filled with B's (1) and E's (0) and gives a vector of 1's and 0's. matchType<-function(column){ masterList<-c() i=1 for(i in 1:length(column)){ if(column[i]=='B'){ masterList<-c(masterList, 1) } else { masterList<-c(masterList, 0) } } masterList }
/matchType.R
no_license
r54liu/InfiniticsDMC2015
R
false
false
316
r
#function takes a column filled with B's (1) and E's (0) and gives a vector of 1's and 0's. matchType<-function(column){ masterList<-c() i=1 for(i in 1:length(column)){ if(column[i]=='B'){ masterList<-c(masterList, 1) } else { masterList<-c(masterList, 0) } } masterList }
# Miscellaneous functions --------------------------------------------- # location of single column (internal function) col.loc <- function(df, x){ return( which(names(df) == x) ) } #' Many tables are unused (undocumented) or constant. Remove them. #' #' @param df a dataframe. #' @return A dataframe w/o zero varianc...
/R/misc funs.R
no_license
zane-uw/edwHelpers
R
false
false
2,645
r
# Miscellaneous functions --------------------------------------------- # location of single column (internal function) col.loc <- function(df, x){ return( which(names(df) == x) ) } #' Many tables are unused (undocumented) or constant. Remove them. #' #' @param df a dataframe. #' @return A dataframe w/o zero varianc...
"%&%" = function(a,b) paste(a,b,sep="") library(data.table) for(i in c(3, 5, 10)){ for(pop in c("AFA", "CAU", "HIS")){ elasticnet2meqtl_covar <- fread("/home/angela/plosgen_revisions/MESA/covariates/" %&% pop %&% "pcs" %&% i %&%"cov.txt") elasticnet2meqtl_covar$FID <- NULL elasticnet2meqtl_covar$pop <- N...
/elasticnet2meqtl_covar.R
no_license
aandaleon/MESA_revisions
R
false
false
644
r
"%&%" = function(a,b) paste(a,b,sep="") library(data.table) for(i in c(3, 5, 10)){ for(pop in c("AFA", "CAU", "HIS")){ elasticnet2meqtl_covar <- fread("/home/angela/plosgen_revisions/MESA/covariates/" %&% pop %&% "pcs" %&% i %&%"cov.txt") elasticnet2meqtl_covar$FID <- NULL elasticnet2meqtl_covar$pop <- N...
## Plot Global Active Power from UCI data ## Plot 1 for course project 1 for courera subject exdata-032 ## setwd("~/Documents/uni/courserarprog/exploratory") filename="household_power_consumption.txt" # read in the UCI data and subset to first two days in February newdata <- read.table(filename,sep=";",header=TRUE,na...
/plot1.R
no_license
mazinbriz/ExData_Plotting1
R
false
false
969
r
## Plot Global Active Power from UCI data ## Plot 1 for course project 1 for courera subject exdata-032 ## setwd("~/Documents/uni/courserarprog/exploratory") filename="household_power_consumption.txt" # read in the UCI data and subset to first two days in February newdata <- read.table(filename,sep=";",header=TRUE,na...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/logSum.R \name{logSum} \alias{logSum} \title{convenience function} \usage{ logSum(l) } \arguments{ \item{l}{number, vector, or matrix to be log-sum-exp'ed} } \value{ a numeric value } \description{ convenience function }
/man/logSum.Rd
permissive
david-dunson/bayesCC
R
false
true
300
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/logSum.R \name{logSum} \alias{logSum} \title{convenience function} \usage{ logSum(l) } \arguments{ \item{l}{number, vector, or matrix to be log-sum-exp'ed} } \value{ a numeric value } \description{ convenience function }
#' --- #' title: "Hello" #' author: "Jenny Bryan" #' date: "June 15, 2016" #' output: github_document #' --- #+ setup, include=FALSE knitr::opts_chunk$set(echo = TRUE) #' ## R Markdown #' You can put formulas. $\overline{\mu_i}$. #' This is an R Markdown document. Markdown is a simple formatting syntax for authorin...
/B_analysts_sources_github/jennybc/jenny/goodbye.R
no_license
Irbis3/crantasticScrapper
R
false
false
941
r
#' --- #' title: "Hello" #' author: "Jenny Bryan" #' date: "June 15, 2016" #' output: github_document #' --- #+ setup, include=FALSE knitr::opts_chunk$set(echo = TRUE) #' ## R Markdown #' You can put formulas. $\overline{\mu_i}$. #' This is an R Markdown document. Markdown is a simple formatting syntax for authorin...
library(fOptions) library(ggplot2) #1 goog <- read.csv("D:/A/NTU-MFE/courses/MT2/FE8828 Programming Web Applications in Finance (E)/assignment/Assignment4/Assignment4/goog.csv", sep=",") #2 totalvaluation_call <- 0 totalvaluation_put <- 0 totalvaluation_candp <- 0 for(i in 1:80) totalvaluation_call <- totalvaluati...
/2019/Assignment/FE8828-LI Jiajing/Assignment4/question1.R
no_license
leafyoung/fe8828
R
false
false
2,073
r
library(fOptions) library(ggplot2) #1 goog <- read.csv("D:/A/NTU-MFE/courses/MT2/FE8828 Programming Web Applications in Finance (E)/assignment/Assignment4/Assignment4/goog.csv", sep=",") #2 totalvaluation_call <- 0 totalvaluation_put <- 0 totalvaluation_candp <- 0 for(i in 1:80) totalvaluation_call <- totalvaluati...
## ssn ----------------------------------------- ssn_en_IE = R6Class( "ssn_en_IE", inherit = ssn_init, cloneable = FALSE, private = list( vat_id_formats = c( 'IE#?#####?', 'IE#######?', 'IE#######??' ) ), public = list( # http://ec.europa.eu/taxation_customs/vies/faq.html#item...
/R/en_IE.R
no_license
LuYang19/faker
R
false
false
1,592
r
## ssn ----------------------------------------- ssn_en_IE = R6Class( "ssn_en_IE", inherit = ssn_init, cloneable = FALSE, private = list( vat_id_formats = c( 'IE#?#####?', 'IE#######?', 'IE#######??' ) ), public = list( # http://ec.europa.eu/taxation_customs/vies/faq.html#item...
library(shiny) library(stringi) library(grupa0) library(DT) #przy pracy na Windows'ie trzeba kodowanie zmienic #sciezka_eksponat$dzien_tyg <-suppressWarnings(stri_encode(sciezka_eksponat$dzien_tyg,from="UTF-8",to="Windows 1250")) lista<-levels(typowa_sciezka$data) shinyUI(fluidPage( titlePanel("Analiza scież...
/MINI_2016/ZespolyP1/grupa0/ui.R
no_license
gradzielr/RandBigData
R
false
false
7,349
r
library(shiny) library(stringi) library(grupa0) library(DT) #przy pracy na Windows'ie trzeba kodowanie zmienic #sciezka_eksponat$dzien_tyg <-suppressWarnings(stri_encode(sciezka_eksponat$dzien_tyg,from="UTF-8",to="Windows 1250")) lista<-levels(typowa_sciezka$data) shinyUI(fluidPage( titlePanel("Analiza scież...
#Assignment 6 Is there a surge of bankruptcies due to Covid-19? #By Sindre Sønvisen bankruptcy <- function(from, to){ library(tidyverse) library(rvest) #Parse url url <- sprintf("https://w2.brreg.no/kunngjoring/kombisok.jsp?datoFra=%s&datoTil=%s&id_region=0&id_niva1=51&id_niva2=-+-+-&id_bransje1=0", from, to)...
/Assignment 6 - Is there a surge of bankruptcies due to Covid-19/bankruptcies.r
no_license
sso149/Assignments-bed2056
R
false
false
3,899
r
#Assignment 6 Is there a surge of bankruptcies due to Covid-19? #By Sindre Sønvisen bankruptcy <- function(from, to){ library(tidyverse) library(rvest) #Parse url url <- sprintf("https://w2.brreg.no/kunngjoring/kombisok.jsp?datoFra=%s&datoTil=%s&id_region=0&id_niva1=51&id_niva2=-+-+-&id_bransje1=0", from, to)...
# commenting # cntrl+shift+C - comment/uncomment #Arithmetic operator data <- 5+7 # addition 23/5 # division 23%%5 # get remainder 3^2 #square of 3 #Relational operator 5>7 # greater than 5<7 # less than 10==5 # equal to 10!=10 # not equal to 5<=3 # less than equal to 6>=4 # greater than equal to #Logical operat...
/_R_operators.R
no_license
ashwin-sg/R_files
R
false
false
494
r
# commenting # cntrl+shift+C - comment/uncomment #Arithmetic operator data <- 5+7 # addition 23/5 # division 23%%5 # get remainder 3^2 #square of 3 #Relational operator 5>7 # greater than 5<7 # less than 10==5 # equal to 10!=10 # not equal to 5<=3 # less than equal to 6>=4 # greater than equal to #Logical operat...
test_that("is_packaged_fn()", { expect_true(is_packaged_fn("praise::praise")) expect_true(is_packaged_fn("usethis:::restart_rstudio")) # only directly assigning the function is allowed expect_false(is_packaged_fn("praise::praise()")) expect_false(is_packaged_fn("usethis:::restart_rstudio()")) expect_false...
/tests/testthat/test-add_shortcuts.R
no_license
fossabot/shrtcts
R
false
false
436
r
test_that("is_packaged_fn()", { expect_true(is_packaged_fn("praise::praise")) expect_true(is_packaged_fn("usethis:::restart_rstudio")) # only directly assigning the function is allowed expect_false(is_packaged_fn("praise::praise()")) expect_false(is_packaged_fn("usethis:::restart_rstudio()")) expect_false...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/03-find_elevation_and_discharge.R \name{find_E_from_Q} \alias{find_E_from_Q} \title{find elevation from Discharge (cfs)} \usage{ find_E_from_Q(site, Qcfs, print = F) } \arguments{ \item{site}{character 5-letter site name, including 4-characte...
/man/find_E_from_Q.Rd
permissive
Ryan-Lima/gRandcanyonsand
R
false
true
882
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/03-find_elevation_and_discharge.R \name{find_E_from_Q} \alias{find_E_from_Q} \title{find elevation from Discharge (cfs)} \usage{ find_E_from_Q(site, Qcfs, print = F) } \arguments{ \item{site}{character 5-letter site name, including 4-characte...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/bone.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.8,family="gaussian",standardize=FALSE) sink('./bone_084.txt',append=TRUE) print(g...
/Model/EN/ReliefF/bone/bone_084.R
no_license
esbgkannan/QSMART
R
false
false
342
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/bone.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.8,family="gaussian",standardize=FALSE) sink('./bone_084.txt',append=TRUE) print(g...
library(shinythemes) library(shiny) library(knitr) library(shinydashboard) if (!("AppLayoutGuide.md" %in% list.files())) { rmdfiles <- c("AppLayoutGuide.Rmd", "AppFileFormats.Rmd", "TypesofShiny.Rmd", "TypesofShiny2.Rmd", "TypesofShiny3.Rmd", ...
/Misk_shiny_intro/global.R
no_license
Safa721/Misk_Shiny
R
false
false
535
r
library(shinythemes) library(shiny) library(knitr) library(shinydashboard) if (!("AppLayoutGuide.md" %in% list.files())) { rmdfiles <- c("AppLayoutGuide.Rmd", "AppFileFormats.Rmd", "TypesofShiny.Rmd", "TypesofShiny2.Rmd", "TypesofShiny3.Rmd", ...
\name{ShortestGraphPathsC} \alias{ShortestGraphPathsC} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Shortest GraphPaths = geodesic distances } \description{ Dijkstra's SSSP (Single source shortest path) algorithm, from all points to all points } \usage{ ShortestGraphPathsC(Adj, Cost)...
/DatabionicSwarm/man/ShortestGraphPathsC.Rd
no_license
akhikolla/TestedPackages-NoIssues
R
false
false
2,066
rd
\name{ShortestGraphPathsC} \alias{ShortestGraphPathsC} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Shortest GraphPaths = geodesic distances } \description{ Dijkstra's SSSP (Single source shortest path) algorithm, from all points to all points } \usage{ ShortestGraphPathsC(Adj, Cost)...
library(AnnuityRIR) ### Name: variance_pre_mood_pm ### Title: Compute the variance of the present value of an annuity-due ### using the Mood _et al._ approximation and some non-central moments of ### positive order. ### Aliases: variance_pre_mood_pm ### ** Examples # example 1 data = c(1.77,1.85,1.85,1.84,1.84...
/data/genthat_extracted_code/AnnuityRIR/examples/variance_pre_mood_pm.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
443
r
library(AnnuityRIR) ### Name: variance_pre_mood_pm ### Title: Compute the variance of the present value of an annuity-due ### using the Mood _et al._ approximation and some non-central moments of ### positive order. ### Aliases: variance_pre_mood_pm ### ** Examples # example 1 data = c(1.77,1.85,1.85,1.84,1.84...
\name{transform.base} \alias{transform.base} \title{ base function for class of \code{transform} } \description{ This function transforms an excess rainfall event to a direct runoff hydorgraph. } \usage{ \method{transform}{base}(rainfall,transformMethod,transformParams,Area,UH,simulation) } \arguments{ \i...
/man/transform.base.Rd
no_license
cran/RHMS
R
false
false
1,613
rd
\name{transform.base} \alias{transform.base} \title{ base function for class of \code{transform} } \description{ This function transforms an excess rainfall event to a direct runoff hydorgraph. } \usage{ \method{transform}{base}(rainfall,transformMethod,transformParams,Area,UH,simulation) } \arguments{ \i...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 1796 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 1589 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 1589 c c Input Parameter (command line, fil...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Kontchakov/SUBMITTED/Core1108_tbm_21.tex.module.000030/Core1108_tbm_21.tex.module.000030.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
1,040
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 1796 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 1589 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 1589 c c Input Parameter (command line, fil...
#' Inline SQL Query #' #' @param text A character SQL query. #' #' @return An \code{sq} object. #' #' @export sq_text <- function(text) { if (!is_scalar_character(text)) stop("Argument 'text' should be a scalar character value") structure(text, class = "sq") }
/R/sq_text.R
no_license
j450h1/squr
R
false
false
270
r
#' Inline SQL Query #' #' @param text A character SQL query. #' #' @return An \code{sq} object. #' #' @export sq_text <- function(text) { if (!is_scalar_character(text)) stop("Argument 'text' should be a scalar character value") structure(text, class = "sq") }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Class-SoilProfileCollection.R \docType{methods} \name{siteNames<-} \alias{siteNames<-} \alias{siteNames<-,SoilProfileCollection-method} \alias{siteNames,SoilProfileCollection-method} \alias{siteNames} \title{Set site column names} \u...
/man/siteNames.Rd
no_license
cran/aqp
R
false
true
695
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Class-SoilProfileCollection.R \docType{methods} \name{siteNames<-} \alias{siteNames<-} \alias{siteNames<-,SoilProfileCollection-method} \alias{siteNames,SoilProfileCollection-method} \alias{siteNames} \title{Set site column names} \u...
\name{JacobianK} \alias{JacobianK} \title{ Internal Utility Function } \description{ The matrix defined in eqn. (10) of McLeod and Zhang (2006). Used by the function \code{\link{Jacobian}}. } \usage{ JacobianK(zeta, k) } \arguments{ \item{zeta}{ partial autocorrelations } \item{k}{ k-th Jacobian } } \...
/man/JacobianK.Rd
no_license
githubfun/FitAR
R
false
false
635
rd
\name{JacobianK} \alias{JacobianK} \title{ Internal Utility Function } \description{ The matrix defined in eqn. (10) of McLeod and Zhang (2006). Used by the function \code{\link{Jacobian}}. } \usage{ JacobianK(zeta, k) } \arguments{ \item{zeta}{ partial autocorrelations } \item{k}{ k-th Jacobian } } \...
# LDA topic modeling -- document topic probabilities source('necessary_libs.R') lda.14 <- readRDS('lda_model_14.rda') documents <- tidy(lda.14, matrix = 'gamma') date_df <- readRDS('data/refinery29_cols_time.rda') %>% transmute(document = row_number(), Pub_date) doc_date <- merge(documents, date_df,...
/code/topic_summaries.R
no_license
ariannasang/Refinery29_wellness_analysis
R
false
false
5,215
r
# LDA topic modeling -- document topic probabilities source('necessary_libs.R') lda.14 <- readRDS('lda_model_14.rda') documents <- tidy(lda.14, matrix = 'gamma') date_df <- readRDS('data/refinery29_cols_time.rda') %>% transmute(document = row_number(), Pub_date) doc_date <- merge(documents, date_df,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phylomoments.R \name{moments.ctmcjumps} \alias{moments.ctmcjumps} \title{Restricted factorial moments of labeled substitution counts for a reversible CTMC.} \usage{ moments.ctmcjumps(t, rate.mat, label.mat, root.dist = NULL...
/man/moments.ctmcjumps.Rd
no_license
blogsdon/phylomoments
R
false
true
1,946
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phylomoments.R \name{moments.ctmcjumps} \alias{moments.ctmcjumps} \title{Restricted factorial moments of labeled substitution counts for a reversible CTMC.} \usage{ moments.ctmcjumps(t, rate.mat, label.mat, root.dist = NULL...
#impute missing values of each column of tab #with a small value. #The small value is randomly draws from a uniform distribution #between the min of observed values in the column #and the q% quantile of these observed values. impute.pa=function (tab, conditions, q.min = 0.025, q.norm = 3, eps = 0, distribution...
/R/impute_pa.R
no_license
cran/imp4p
R
false
false
2,907
r
#impute missing values of each column of tab #with a small value. #The small value is randomly draws from a uniform distribution #between the min of observed values in the column #and the q% quantile of these observed values. impute.pa=function (tab, conditions, q.min = 0.025, q.norm = 3, eps = 0, distribution...
test_that("sounding_wyoming works!", { # expected error testthat::expect_message(sounding_wyoming(wmo_id = 12220, yy = 2019, mm = 4, dd = 4, ...
/tests/testthat/test-sounding_wyoming.R
permissive
bczernecki/climate
R
false
false
1,056
r
test_that("sounding_wyoming works!", { # expected error testthat::expect_message(sounding_wyoming(wmo_id = 12220, yy = 2019, mm = 4, dd = 4, ...
getCrI <- function(res=res,param="theta"){ res<-as.matrix(res) params<-dim(res)[2] thetacol<-which(colnames(res)==param) post_prob<-mean(res[,thetacol]>0) quants<-matrix(rep(NA,params*3),ncol=3) for(i in 1:params){ quants[i,2]<-mean(res[,i]) quants[i,c(1,3)]<-quantile(res[,i],probs=c(0.025,0.9...
/case_studies/JEV2017/R/GetCrI.R
permissive
vasishth/IntroductionBayes
R
false
false
356
r
getCrI <- function(res=res,param="theta"){ res<-as.matrix(res) params<-dim(res)[2] thetacol<-which(colnames(res)==param) post_prob<-mean(res[,thetacol]>0) quants<-matrix(rep(NA,params*3),ncol=3) for(i in 1:params){ quants[i,2]<-mean(res[,i]) quants[i,c(1,3)]<-quantile(res[,i],probs=c(0.025,0.9...
# Load dependencies require(jsonlite) require(httr) require(lubridate) # Sys.setenv(http_proxy="http://localhost:8888") # Enables Fiddler capturing of traffic # Sys.setenv(http_proxy="") # Disables Fiddler proxying # Create a simple AQUARIUS Time-Series API client. timeseriesClient <- setRefClass("timeseriesClient", ...
/TimeSeries/PublicApis/R/timeseries_client.R
permissive
jasonelaw/examples
R
false
false
31,276
r
# Load dependencies require(jsonlite) require(httr) require(lubridate) # Sys.setenv(http_proxy="http://localhost:8888") # Enables Fiddler capturing of traffic # Sys.setenv(http_proxy="") # Disables Fiddler proxying # Create a simple AQUARIUS Time-Series API client. timeseriesClient <- setRefClass("timeseriesClient", ...
\name{colMad} \alias{colMad} \title{ Compute Column Median Absolute Deviations } \description{ This function computes the median absolute deviation of each column in a matrix.} \usage{ colMad(X) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{X}{ X must be a numeric matrix. } } \value{ re...
/man/colMad.Rd
no_license
jonclayden/FIACH
R
false
false
455
rd
\name{colMad} \alias{colMad} \title{ Compute Column Median Absolute Deviations } \description{ This function computes the median absolute deviation of each column in a matrix.} \usage{ colMad(X) } %- maybe also 'usage' for other objects documented here. \arguments{ \item{X}{ X must be a numeric matrix. } } \value{ re...
x <- fread(cusfile, sep = "^", na.strings = "", stringsAsFactors = F, select = 1)
/test.R
no_license
Plumarine/mcmultichannel
R
false
false
82
r
x <- fread(cusfile, sep = "^", na.strings = "", stringsAsFactors = F, select = 1)
# remotes::install_github("rstudio/shinytest") library(shinytest) library(bench) run_use_test <- function(use_caching){ # Make sure you have the latest version of shinytest from github so option passing # is available app <- ShinyDriver$new("./", phantomTimeout = 10000, loadTimeout = 10000, ...
/weather_lookup/tests/mytest.R
no_license
mikejohnson51/shiny_app_stories
R
false
false
1,988
r
# remotes::install_github("rstudio/shinytest") library(shinytest) library(bench) run_use_test <- function(use_caching){ # Make sure you have the latest version of shinytest from github so option passing # is available app <- ShinyDriver$new("./", phantomTimeout = 10000, loadTimeout = 10000, ...
############################################################################ ### function to evaluate the accuracy of classification models ### with binary outcome ############################################################################ Daim <- function(formula, model = NULL, data = NULL, control = ...
/R/Daim.R
no_license
cran/Daim
R
false
false
13,564
r
############################################################################ ### function to evaluate the accuracy of classification models ### with binary outcome ############################################################################ Daim <- function(formula, model = NULL, data = NULL, control = ...
library(parallel) simRep <- 5000 # Replication times in one simulation pvalue.true <- .05 # Testing type I error b.var <- c(0.04) # The set of varaince of random covariates b as random slope smooth <- 1 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1 cores <- 8 r.sim <- b.va...
/full simulation/summer/hetero_power/variance0.04/seed2/heter_power_0.04_pca_s_seed2_200_20.R
no_license
wma9/FMRI-project
R
false
false
9,197
r
library(parallel) simRep <- 5000 # Replication times in one simulation pvalue.true <- .05 # Testing type I error b.var <- c(0.04) # The set of varaince of random covariates b as random slope smooth <- 1 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1 cores <- 8 r.sim <- b.va...
#' Class "topmod" #' #' An updateable list keeping the best x models it encounters in any kind of #' model iteration #' #' #' @name topmod-class #' @docType class #' @section Objects from the Class: Objects can be created by calls to #' \code{\link{topmod}}, or indirectly by calls to \code{\link{b...
/R/zzz.R
no_license
cran/BMS
R
false
false
8,399
r
#' Class "topmod" #' #' An updateable list keeping the best x models it encounters in any kind of #' model iteration #' #' #' @name topmod-class #' @docType class #' @section Objects from the Class: Objects can be created by calls to #' \code{\link{topmod}}, or indirectly by calls to \code{\link{b...
######################################################## # SCRIPT FOR CHLOROPHYLL A ANALYSES IN THE BLACK SEA # # (AND OTHER MARGINAL FEATURES) # ######################################################## library(ncdf4) library(ggplot2) library(plyr) library(reshape2) library(chron) library(vir...
/Cases/BlackSea_DCM/BlackSea_DCM_Analysis.R
no_license
MAST-ULiege/ArgoDiva
R
false
false
68,916
r
######################################################## # SCRIPT FOR CHLOROPHYLL A ANALYSES IN THE BLACK SEA # # (AND OTHER MARGINAL FEATURES) # ######################################################## library(ncdf4) library(ggplot2) library(plyr) library(reshape2) library(chron) library(vir...
library(rgee) # ee_reattach() # reattach ee as a reserved word ee_Initialize() ############################### # Asset List ############################### gsw = ee$Image('JRC/GSW1_1/GlobalSurfaceWater') occurrence = gsw$select('occurrence') change = gsw$select("change_abs") roi = ee$Geometry$Polygon( list( c(...
/examples/Tutorials/GlobalSurfaceWater/2_water_occurrence_change_intensity.R
permissive
benardonyango/rgee
R
false
false
2,154
r
library(rgee) # ee_reattach() # reattach ee as a reserved word ee_Initialize() ############################### # Asset List ############################### gsw = ee$Image('JRC/GSW1_1/GlobalSurfaceWater') occurrence = gsw$select('occurrence') change = gsw$select("change_abs") roi = ee$Geometry$Polygon( list( c(...
library(s4inherits) data <- SubMatrix(1) inherits(data, "dsyMatrix") is(data, "dsyMatrix") save(data, file = "test.RData")
/test-save.R
no_license
kevinushey/s4inherits
R
false
false
126
r
library(s4inherits) data <- SubMatrix(1) inherits(data, "dsyMatrix") is(data, "dsyMatrix") save(data, file = "test.RData")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{Seq.Diastocapen} \alias{Seq.Diastocapen} \title{Sequences and metadata extracted from the Barcode of Life Database (BOLD), GenBank (NCBI) and the repository of the New Zealand National Fish Collection for the speci...
/man/Seq.Diastocapen.Rd
no_license
ignacio3437/regPhylo
R
false
true
2,744
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{Seq.Diastocapen} \alias{Seq.Diastocapen} \title{Sequences and metadata extracted from the Barcode of Life Database (BOLD), GenBank (NCBI) and the repository of the New Zealand National Fish Collection for the speci...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dModFrameClass.R, R/parClass.R, R/plots.R \name{plotProfile.tbl_df} \alias{plotProfile.tbl_df} \alias{plotProfile.parframe} \alias{plotProfile.list} \alias{plotProfile} \title{Profile likelihood plot} \usage{ \method{plotProfile}{tbl_df}(dMod...
/man/plotProfile.Rd
no_license
Mutaz94/dMod
R
false
true
1,114
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dModFrameClass.R, R/parClass.R, R/plots.R \name{plotProfile.tbl_df} \alias{plotProfile.tbl_df} \alias{plotProfile.parframe} \alias{plotProfile.list} \alias{plotProfile} \title{Profile likelihood plot} \usage{ \method{plotProfile}{tbl_df}(dMod...
\name{Histopath} \alias{Histopath} \title{ GUI for analysis of histopathological data } \description{ This is the function call to start the GUI interface for StatCharrms } \usage{ Histopath() } \details{ \itemize{ \item{\bold{Load Data Button:}}{ A standard data set in the "tall" format. Every ...
/man/Histopath.Rd
no_license
cran/RSCABS
R
false
false
2,235
rd
\name{Histopath} \alias{Histopath} \title{ GUI for analysis of histopathological data } \description{ This is the function call to start the GUI interface for StatCharrms } \usage{ Histopath() } \details{ \itemize{ \item{\bold{Load Data Button:}}{ A standard data set in the "tall" format. Every ...
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(1.72348146030783e+218, 0, 0)) result <- do.call(meteor:::ET0_Makkink,testlist) str(result)
/meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615856341-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
172
r
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(1.72348146030783e+218, 0, 0)) result <- do.call(meteor:::ET0_Makkink,testlist) str(result)
library(PDQutils) ### Name: cumulant2moment ### Title: Convert raw cumulants to moments. ### Aliases: cumulant2moment ### Keywords: distribution ### ** Examples # normal distribution, mean 0, variance 1 n.mom <- cumulant2moment(c(0,1,0,0,0,0)) # normal distribution, mean 1, variance 1 n.mom <- cumulant2moment(c(1,1...
/data/genthat_extracted_code/PDQutils/examples/cumulant2moment.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
334
r
library(PDQutils) ### Name: cumulant2moment ### Title: Convert raw cumulants to moments. ### Aliases: cumulant2moment ### Keywords: distribution ### ** Examples # normal distribution, mean 0, variance 1 n.mom <- cumulant2moment(c(0,1,0,0,0,0)) # normal distribution, mean 1, variance 1 n.mom <- cumulant2moment(c(1,1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{BatchXmlText} \alias{BatchXmlText} \title{Retrieve xml context} \usage{ BatchXmlText(xmlObj, xPrefix, xItems) } \arguments{ \item{xmlObj}{xml object.} \item{xPrefix}{xPath prefix.} \item{xItems}{Node names.} } \value{ A named l...
/man/BatchXmlText.Rd
no_license
YulongNiu/NCBIAPI
R
false
true
481
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{BatchXmlText} \alias{BatchXmlText} \title{Retrieve xml context} \usage{ BatchXmlText(xmlObj, xPrefix, xItems) } \arguments{ \item{xmlObj}{xml object.} \item{xPrefix}{xPath prefix.} \item{xItems}{Node names.} } \value{ A named l...
#' Saves R object to archivist repository in results directory of adapr Script #' @param Robj R object to be written #' @param description character description. Need for access with aRead #' @return Value of object description #' @details For use within R adapr script. Makes tags in archivist 'source:rscript' and 'aNa...
/R/aWrite.R
no_license
cran/adapr
R
false
false
2,662
r
#' Saves R object to archivist repository in results directory of adapr Script #' @param Robj R object to be written #' @param description character description. Need for access with aRead #' @return Value of object description #' @details For use within R adapr script. Makes tags in archivist 'source:rscript' and 'aNa...
#' Binary Example Data #' #' A toy dataset for a probability forecast of a binary outcome variable #' #' @format A data.table with 120 rows and 5 variables: #' \describe{ #' \item{id}{unique identifier for true observed values} #' \item{true_value}{true observed values} #' \item{model}{name of the model that gene...
/R/data.R
permissive
nickreich/scoringutils
R
false
false
4,410
r
#' Binary Example Data #' #' A toy dataset for a probability forecast of a binary outcome variable #' #' @format A data.table with 120 rows and 5 variables: #' \describe{ #' \item{id}{unique identifier for true observed values} #' \item{true_value}{true observed values} #' \item{model}{name of the model that gene...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/preprocess.R \name{bin_gel} \alias{bin_gel} \title{Force multiple gels to share identical bins} \usage{ bin_gel(dat_smoothed, break_points) } \arguments{ \item{dat_smoothed}{Smoothed autoradiointensity data obtained from \code{\link{smooth_ge...
/man/bin_gel.Rd
permissive
zhenkewu/spotgear
R
false
true
790
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/preprocess.R \name{bin_gel} \alias{bin_gel} \title{Force multiple gels to share identical bins} \usage{ bin_gel(dat_smoothed, break_points) } \arguments{ \item{dat_smoothed}{Smoothed autoradiointensity data obtained from \code{\link{smooth_ge...
.SinglePlot <- function(x){ plot(1, 1, col="white", ann=FALSE, xaxt="n", yaxt="n", axes=FALSE) par(ps=100) text(1, 1, x, col="red") } .shrink2 <- function(x, thr=7){ block <- strsplit(as.character(x) , " ")[[1]] l <- length(block) nc <- vapply(block, nchar, 0L) if(l >= 2){ out <- bl...
/R/cellCellReport-internal.R
permissive
ni11235/scTensor
R
false
false
35,619
r
.SinglePlot <- function(x){ plot(1, 1, col="white", ann=FALSE, xaxt="n", yaxt="n", axes=FALSE) par(ps=100) text(1, 1, x, col="red") } .shrink2 <- function(x, thr=7){ block <- strsplit(as.character(x) , " ")[[1]] l <- length(block) nc <- vapply(block, nchar, 0L) if(l >= 2){ out <- bl...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/activityRatio.R \name{activityRatio} \alias{activityRatio} \title{Calculate activity ratio metrics} \usage{ activityRatio( recorder_name, data, recorder_col = "recorders", date_col = "date_start", summer_days = NULL ) } \arguments{ ...
/man/activityRatio.Rd
permissive
BiologicalRecordsCentre/recorderMetrics
R
false
true
2,748
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/activityRatio.R \name{activityRatio} \alias{activityRatio} \title{Calculate activity ratio metrics} \usage{ activityRatio( recorder_name, data, recorder_col = "recorders", date_col = "date_start", summer_days = NULL ) } \arguments{ ...