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
# public functions: loadPrismaData = function(path, maxLines=-1, fastSally=TRUE, alpha=.05, skipFeatureCorrelation=FALSE) { data = readPrismaInput(path, maxLines, fastSally) data = preprocessPrismaData(data, alpha, skipFeatureCorrelation) data$path = path class(data) = "prisma" return(data) } getDuplicateDat...
/modules/PRISMA/R/prisma.R
permissive
N0nent1ty/pulsar
R
false
false
11,180
r
# public functions: loadPrismaData = function(path, maxLines=-1, fastSally=TRUE, alpha=.05, skipFeatureCorrelation=FALSE) { data = readPrismaInput(path, maxLines, fastSally) data = preprocessPrismaData(data, alpha, skipFeatureCorrelation) data$path = path class(data) = "prisma" return(data) } getDuplicateDat...
library(clusterProfiler) library(org.Mm.eg.db) library(tidyverse) library(pals) get_anno <- function(data){ df <- read.csv(data, header = T, stringsAsFactors = F, sep = "\t") colnames(df)[1] <- "PeakID" colnames(df)[12] <- "ENSEMBL" return(df) } komoji2omoji <- function(string){ omoji <- touppe...
/GO_analysis_of_SE_associated_genes.R
permissive
okadalabipr/Kanazawa2021
R
false
false
3,741
r
library(clusterProfiler) library(org.Mm.eg.db) library(tidyverse) library(pals) get_anno <- function(data){ df <- read.csv(data, header = T, stringsAsFactors = F, sep = "\t") colnames(df)[1] <- "PeakID" colnames(df)[12] <- "ENSEMBL" return(df) } komoji2omoji <- function(string){ omoji <- touppe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{non_inclusion_reasons} \alias{non_inclusion_reasons} \title{Metadata on non-inclusion reasons} \format{An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 9 rows and 3 columns.} \usa...
/package/man/non_inclusion_reasons.Rd
permissive
dynverse/dynbenchmark
R
false
true
417
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{non_inclusion_reasons} \alias{non_inclusion_reasons} \title{Metadata on non-inclusion reasons} \format{An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 9 rows and 3 columns.} \usa...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/const.R \name{PATH_GET_OPTIONS} \alias{PATH_GET_OPTIONS} \title{Build path to the options endpoint.} \usage{ PATH_GET_OPTIONS(field) } \arguments{ \item{field}{the field name for the endpoint giving the available options} } \value{ A string: ...
/man/PATH_GET_OPTIONS.Rd
permissive
MehdiChelh/eiopaR
R
false
true
408
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/const.R \name{PATH_GET_OPTIONS} \alias{PATH_GET_OPTIONS} \title{Build path to the options endpoint.} \usage{ PATH_GET_OPTIONS(field) } \arguments{ \item{field}{the field name for the endpoint giving the available options} } \value{ A string: ...
## File Name: mlnormal_soft_thresholding.R ## File Version: 0.13 mlnormal_soft_thresholding <- function( x, lambda ) { x_abs <- abs(x) x <- ifelse( x_abs > lambda, x - sign(x) * lambda, 0 ) return(x) }
/LAM/R/mlnormal_soft_thresholding.R
no_license
akhikolla/TestedPackages-NoIssues
R
false
false
228
r
## File Name: mlnormal_soft_thresholding.R ## File Version: 0.13 mlnormal_soft_thresholding <- function( x, lambda ) { x_abs <- abs(x) x <- ifelse( x_abs > lambda, x - sign(x) * lambda, 0 ) return(x) }
## version: 1.35 ## method: get ## path: /tasks ## code: 200 ## response: [{"ID":"0kzzo1i0y4jz6027t0k7aezc7","Version":{"Index":71},"CreatedAt":"2016-06-07T21:07:31.171892745Z","UpdatedAt":"2016-06-07T21:07:31.376370513Z","Spec":{"ContainerSpec":{"Image":"redis"},"Resources":{"Limits":{},"Reservations":{}},"RestartPoli...
/tests/testthat/sample_responses/v1.35/task_list.R
no_license
cran/stevedore
R
false
false
5,797
r
## version: 1.35 ## method: get ## path: /tasks ## code: 200 ## response: [{"ID":"0kzzo1i0y4jz6027t0k7aezc7","Version":{"Index":71},"CreatedAt":"2016-06-07T21:07:31.171892745Z","UpdatedAt":"2016-06-07T21:07:31.376370513Z","Spec":{"ContainerSpec":{"Image":"redis"},"Resources":{"Limits":{},"Reservations":{}},"RestartPoli...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vlist.R \name{vlist} \alias{vlist} \title{Generation of a sublist} \usage{ vlist(list, skip = NULL, first = NULL, select = NULL) } \arguments{ \item{list}{list you want to print details of} \item{skip}{Skip first that many list-el...
/man/vlist.Rd
no_license
cran/MoBPS
R
false
true
643
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vlist.R \name{vlist} \alias{vlist} \title{Generation of a sublist} \usage{ vlist(list, skip = NULL, first = NULL, select = NULL) } \arguments{ \item{list}{list you want to print details of} \item{skip}{Skip first that many list-el...
\name{getFoo} \alias{gets} \alias{gets,Rcpp_PDV-method} \alias{gets,Rcpp_CPS-method} \alias{getx} \alias{getx,Rcpp_PDV-method} \alias{getx,Rcpp_CPS-method} \alias{gety} \alias{gety,Rcpp_PDV-method} \alias{gety,Rcpp_CPS-method} \alias{getz} \alias{getz,Rcpp_PDV-method} \alias{getz,Rcpp_CPS-method} \alias{getstate} \alia...
/man/getFoo.Rd
no_license
bpfaff/cccp
R
false
false
1,290
rd
\name{getFoo} \alias{gets} \alias{gets,Rcpp_PDV-method} \alias{gets,Rcpp_CPS-method} \alias{getx} \alias{getx,Rcpp_PDV-method} \alias{getx,Rcpp_CPS-method} \alias{gety} \alias{gety,Rcpp_PDV-method} \alias{gety,Rcpp_CPS-method} \alias{getz} \alias{getz,Rcpp_PDV-method} \alias{getz,Rcpp_CPS-method} \alias{getstate} \alia...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse ge...
/cachematrix.R
no_license
RomainPhilippe/ProgrammingAssignment2
R
false
false
875
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse ge...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22801808222998e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual_...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615772818-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
362
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22801808222998e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L))) result <- do.call(CNull:::communities_individual_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/parse_packet_set_ACTIVITY2.R, % R/parse_packet_set_CAPSENSE&METADATA.R, R/parse_packet_set_EVENT.R, % R/parse_packet_set_SENSOR_DATA.R, R/parse_packet_set_SENSOR_SCHEMA.R, % R/parse_packet_set__generic_&_simple_methods.R \name{parse_pac...
/man/parse_packet_set.Rd
permissive
Thulasi-vk/AGread
R
false
true
2,266
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/parse_packet_set_ACTIVITY2.R, % R/parse_packet_set_CAPSENSE&METADATA.R, R/parse_packet_set_EVENT.R, % R/parse_packet_set_SENSOR_DATA.R, R/parse_packet_set_SENSOR_SCHEMA.R, % R/parse_packet_set__generic_&_simple_methods.R \name{parse_pac...
##### Fitting VBGF for Pristipomoides filamentosus with Mark Recapture Data #### Written by: Stephen Scherrer with some code modified from Erik Franklin (2017) #### Written: Feb - March 2018 #### Contact: scherrer@hawaii.edu #### All Wrongs Preserved #### Laslett et al 2004 implementation of Fabens Method using taggin...
/Analysis/src/Integrative_Growth_Model_Analysis.R
permissive
stevescherrer/Ch4-Opakapaka-Growth
R
false
false
64,711
r
##### Fitting VBGF for Pristipomoides filamentosus with Mark Recapture Data #### Written by: Stephen Scherrer with some code modified from Erik Franklin (2017) #### Written: Feb - March 2018 #### Contact: scherrer@hawaii.edu #### All Wrongs Preserved #### Laslett et al 2004 implementation of Fabens Method using taggin...
########################### # # Auxiliary functions for # adegenet objects # # T. Jombart ########################### ############################## # Method truenames for genind ############################## setGeneric("truenames", function(x) standardGeneric("truenames")) setMethod("truenames", signature(x="genind...
/R/handling.R
no_license
libor-m/adegenet
R
false
false
17,469
r
########################### # # Auxiliary functions for # adegenet objects # # T. Jombart ########################### ############################## # Method truenames for genind ############################## setGeneric("truenames", function(x) standardGeneric("truenames")) setMethod("truenames", signature(x="genind...
##Merge the training and the test sets to create one data set #training sets x_train<-read.table('./UCI HAR Dataset/train/X_train.txt') y_train<-read.table('./UCI HAR Dataset/train/y_train.txt') subject_train<-read.table('./UCI HAR Dataset/train/subject_train.txt') train<-cbind(subject_train,y_train,x_train) #test sets...
/run_analysis.R
no_license
shuai114/CleanDataProject
R
false
false
1,782
r
##Merge the training and the test sets to create one data set #training sets x_train<-read.table('./UCI HAR Dataset/train/X_train.txt') y_train<-read.table('./UCI HAR Dataset/train/y_train.txt') subject_train<-read.table('./UCI HAR Dataset/train/subject_train.txt') train<-cbind(subject_train,y_train,x_train) #test sets...
## Load the full dataset dataComplete <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') ## Convert dates to allow subsetting dataComplete$Date <- as.Date(da...
/plot4.R
no_license
RebeccahM/ExData_Plotting1
R
false
false
1,420
r
## Load the full dataset dataComplete <- read.csv("household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", quote='\"') ## Convert dates to allow subsetting dataComplete$Date <- as.Date(da...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simple_rs.R \name{simple_rs_probabilities} \alias{simple_rs_probabilities} \title{Inclusion Probabilities: Simple Random Sampling} \usage{ simple_rs_probabilities( N, prob = NULL, prob_unit = NULL, check_inputs = TRUE, simple = TRUE...
/man/simple_rs_probabilities.Rd
no_license
cran/randomizr
R
false
true
1,063
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simple_rs.R \name{simple_rs_probabilities} \alias{simple_rs_probabilities} \title{Inclusion Probabilities: Simple Random Sampling} \usage{ simple_rs_probabilities( N, prob = NULL, prob_unit = NULL, check_inputs = TRUE, simple = TRUE...
source("rankhospital.R") best <- function(state, outcome){ rankhospital(state, outcome) }
/02_R-Programming/best.R
no_license
olistroemer/datasciencecoursera
R
false
false
93
r
source("rankhospital.R") best <- function(state, outcome){ rankhospital(state, outcome) }
library(event) ### Name: cprocess ### Title: Plot Counting Process Data ### Aliases: cprocess ### Keywords: hplot ### ** Examples times <- rgamma(20,2,scale=4) cprocess(times)
/data/genthat_extracted_code/event/examples/cprocess.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
183
r
library(event) ### Name: cprocess ### Title: Plot Counting Process Data ### Aliases: cprocess ### Keywords: hplot ### ** Examples times <- rgamma(20,2,scale=4) cprocess(times)
##' Compare gene clusters functional profile ##' Given a list of gene set, this function will compute profiles of each gene ##' cluster. ##' ##' ##' @param geneClusters a list of entrez gene id. ##' @param fun One of "groupGO", "enrichGO", "enrichKEGG", "enrichDO" or "enrichPathway" . ##' @param ... Other argum...
/2X/2.13/clusterProfiler/R/compareCluster.R
no_license
GuangchuangYu/bioc-release
R
false
false
8,000
r
##' Compare gene clusters functional profile ##' Given a list of gene set, this function will compute profiles of each gene ##' cluster. ##' ##' ##' @param geneClusters a list of entrez gene id. ##' @param fun One of "groupGO", "enrichGO", "enrichKEGG", "enrichDO" or "enrichPathway" . ##' @param ... Other argum...
/MLib/helpMe.r
no_license
markusMiksa/ETFportfolio
R
false
false
2,428
r
# libraries --------------------------------------------------------------- library(tidyverse) library(brolgar) library(extrafont) library(directlabels) # data ---------------------------------------------------------------------- college_dat <- read_csv("/Users/shortessay/Downloads/Data_10-7-2019.csv") colnames...
/college-demographics/ivyplus.R
no_license
ivelasq/data-visualization-portfolio
R
false
false
4,919
r
# libraries --------------------------------------------------------------- library(tidyverse) library(brolgar) library(extrafont) library(directlabels) # data ---------------------------------------------------------------------- college_dat <- read_csv("/Users/shortessay/Downloads/Data_10-7-2019.csv") colnames...
\encoding{utf-8} \name{hyp2f1} \alias{hyp2f1} \title{Compute the Gaussian hypergeometric function with complex arguments} \usage{ hyp2f1(a, b, c, z, algorithm = c("michel.stoitsov", "forrey")) } \arguments{ \item{a}{complex parameter} \item{b}{complex parameter} \item{c}{complex parameter} \item{z}{com...
/man/hyp2f1.Rd
no_license
mbedward/appell
R
false
false
2,597
rd
\encoding{utf-8} \name{hyp2f1} \alias{hyp2f1} \title{Compute the Gaussian hypergeometric function with complex arguments} \usage{ hyp2f1(a, b, c, z, algorithm = c("michel.stoitsov", "forrey")) } \arguments{ \item{a}{complex parameter} \item{b}{complex parameter} \item{c}{complex parameter} \item{z}{com...
#========== SETUP DATA FRAMES ================= # COLLECT AIRPORT DATA airports <- read.csv("https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat", header = FALSE) colnames(airports) <- c("ID", "name", "city", "country", "IATA_FAA", "ICAO", "lat", "lon", "altitude", "timezone", "DST"...
/R/maps tutorial.r
no_license
ashokmvbc/MSBITraining
R
false
false
4,189
r
#========== SETUP DATA FRAMES ================= # COLLECT AIRPORT DATA airports <- read.csv("https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat", header = FALSE) colnames(airports) <- c("ID", "name", "city", "country", "IATA_FAA", "ICAO", "lat", "lon", "altitude", "timezone", "DST"...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170322e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) st...
/CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615781624-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
329
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170322e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L))) result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist) st...
#' this function should only ever be used to reload/maintain Reactome caches #' all the files are as downloaded from the Reactome/Ensembl website but gzipped #' FIXME: add loading of interaction maps for all of the supported organisms. #' #' @param TxDbLitePath where the TxDbLite source build root can be found #' ...
/R/loadReactome.R
no_license
RamsinghLab/TxDbLite
R
false
false
1,729
r
#' this function should only ever be used to reload/maintain Reactome caches #' all the files are as downloaded from the Reactome/Ensembl website but gzipped #' FIXME: add loading of interaction maps for all of the supported organisms. #' #' @param TxDbLitePath where the TxDbLite source build root can be found #' ...
# Copyright Mark Niemann-Ross, 2017 # Author: Mark Niemann-Ross. mark.niemannross@gmail.com # LinkedIn: https://www.linkedin.com/in/markniemannross/ # Github: https://github.com/mnr # More Learning: http://niemannross.com/link/mnratlil # Description: Heatmap example for Tidyverse # Appreciation to Martin Hadley - https...
/02_04 tidyverse comparison/heatmap_Tidyverse.R
no_license
anhnguyendepocen/R-Programming-in-Data-Science-Setup-and-Start
R
false
false
1,294
r
# Copyright Mark Niemann-Ross, 2017 # Author: Mark Niemann-Ross. mark.niemannross@gmail.com # LinkedIn: https://www.linkedin.com/in/markniemannross/ # Github: https://github.com/mnr # More Learning: http://niemannross.com/link/mnratlil # Description: Heatmap example for Tidyverse # Appreciation to Martin Hadley - https...
# Exercise 7: using dplyr on external data # Load the `dplyr` library # Use the `read.csv()` function to read in the included data set. Remember to # save it as a variable. # View the data frame you loaded, and get some basic information about the # number of rows/columns. # Note the "X" preceding some of the co...
/chapter-11-exercises/exercise-7/exercise.R
permissive
sparkoparko/book-exercises
R
false
false
1,601
r
# Exercise 7: using dplyr on external data # Load the `dplyr` library # Use the `read.csv()` function to read in the included data set. Remember to # save it as a variable. # View the data frame you loaded, and get some basic information about the # number of rows/columns. # Note the "X" preceding some of the co...
#The two functions below are used in conjuction to calculate/caches inverse of matrices #The makeCacheMatrix function takes in an argument, which is the matrix whose inverse will be caculated. #The default value is an empty matrix. #It will return a list of 4 functions, set, get, setmean and getmean. Set function sets...
/cachematrix.R
no_license
irene0204/ProgrammingAssignment2
R
false
false
1,310
r
#The two functions below are used in conjuction to calculate/caches inverse of matrices #The makeCacheMatrix function takes in an argument, which is the matrix whose inverse will be caculated. #The default value is an empty matrix. #It will return a list of 4 functions, set, get, setmean and getmean. Set function sets...
library(GMSE); context("Landscape initialisation"); land <- make_landscape(model = "IBM", rows = 10, cols = 10, cell_types = 1, cell_val_mn = 1, cell_val_sd = 0...
/tests/testthat/test-make_landscape.R
no_license
nbunne/gmse
R
false
false
927
r
library(GMSE); context("Landscape initialisation"); land <- make_landscape(model = "IBM", rows = 10, cols = 10, cell_types = 1, cell_val_mn = 1, cell_val_sd = 0...
setwd("D:/HCL/LikeMe") #Loading the required packages. library(formattable) library(data.table) library(shiny) library(shinydashboard) library(quanteda, irlba) library(ggplot2) #library(e1071) #library(lattice) library(zoo) library(lubridate) #library(fiftystater) library(forecast) library(rvest) libra...
/LikeMe_3_0 with Datatable with minimal excel reads_updated_2.r
no_license
maddy6/temp
R
false
false
134,676
r
setwd("D:/HCL/LikeMe") #Loading the required packages. library(formattable) library(data.table) library(shiny) library(shinydashboard) library(quanteda, irlba) library(ggplot2) #library(e1071) #library(lattice) library(zoo) library(lubridate) #library(fiftystater) library(forecast) library(rvest) libra...
Kruskal-Wallis rank sum test data: ARRAY and categs Kruskal-Wallis chi-squared = 261.56, df = 13, p-value < 2.2e-16 HHCOR2LPNORM HHCOR2MINMAX HHCORandomLPNORM HHCORandomMINMAX HHLA HypE MOEAD MOEADD MOMBI2 NSGAII NSGAIII SPEA2 SPEA2SDE HHCOR2MINMAX 0.00070 - - ...
/MaFMethodology/R/semsde/IGD/5/kruskaloutput.R
no_license
fritsche/hhcopreliminaryresults
R
false
false
2,221
r
Kruskal-Wallis rank sum test data: ARRAY and categs Kruskal-Wallis chi-squared = 261.56, df = 13, p-value < 2.2e-16 HHCOR2LPNORM HHCOR2MINMAX HHCORandomLPNORM HHCORandomMINMAX HHLA HypE MOEAD MOEADD MOMBI2 NSGAII NSGAIII SPEA2 SPEA2SDE HHCOR2MINMAX 0.00070 - - ...
.onLoad <- function(libname, pkgname) { backports::import(pkgname, c("anyNA", "isTRUE", "lengths")) }
/R/onLoad.R
permissive
rossellhayes/incase
R
false
false
104
r
.onLoad <- function(libname, pkgname) { backports::import(pkgname, c("anyNA", "isTRUE", "lengths")) }
call(a = 5, b) call(a = 5, b ) c( a = 1, b = # comment here 2 )
/tests/testthat/indention_operators/eq_sub_complex_tokens-in.R
permissive
r-lib/styler
R
false
false
143
r
call(a = 5, b) call(a = 5, b ) c( a = 1, b = # comment here 2 )
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotFlowHist.R \name{plot.FlowHist} \alias{plot.FlowHist} \title{Plot histograms for FlowHist objects} \usage{ \method{plot}{FlowHist}(x, init = FALSE, nls = TRUE, comps = TRUE, main = fhFile(x), ...) } \arguments{ \item{x}{a \code{\link{Fl...
/man/plot.FlowHist.Rd
no_license
plantarum/flowPloidy-old
R
false
true
925
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotFlowHist.R \name{plot.FlowHist} \alias{plot.FlowHist} \title{Plot histograms for FlowHist objects} \usage{ \method{plot}{FlowHist}(x, init = FALSE, nls = TRUE, comps = TRUE, main = fhFile(x), ...) } \arguments{ \item{x}{a \code{\link{Fl...
# Decision Tree - Classification #we want predict for combination of input variables, is a person likely to survive or not #import data from online site path = 'https://raw.githubusercontent.com/DUanalytics/datasets/master/csv/titanic_train.csv' titanic <- read.csv(path) head(titanic) names(titanic) data = titanic[,c(...
/Decision tree.R
no_license
raghavsavaji/iimbg
R
false
false
1,766
r
# Decision Tree - Classification #we want predict for combination of input variables, is a person likely to survive or not #import data from online site path = 'https://raw.githubusercontent.com/DUanalytics/datasets/master/csv/titanic_train.csv' titanic <- read.csv(path) head(titanic) names(titanic) data = titanic[,c(...
# rm(list=ls()) options(shiny.trace=FALSE) library(shiny) library(shinyBS) library(data.table) library(stringr) library(purrr) library(tidyr) library(htmltools) source("helper_functions.R") source("regexplainer.R") buy_me_stuff_button_html <- sample(c('www/buy_me_coffee_button.html', ...
/inst/app/global.R
no_license
liao961120/regexShiny
R
false
false
1,704
r
# rm(list=ls()) options(shiny.trace=FALSE) library(shiny) library(shinyBS) library(data.table) library(stringr) library(purrr) library(tidyr) library(htmltools) source("helper_functions.R") source("regexplainer.R") buy_me_stuff_button_html <- sample(c('www/buy_me_coffee_button.html', ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gamelift_operations.R \name{gamelift_update_runtime_configuration} \alias{gamelift_update_runtime_configuration} \title{Updates the current runtime configuration for the specified fleet, which tells Amazon GameLift how to launch server proces...
/paws/man/gamelift_update_runtime_configuration.Rd
permissive
sanchezvivi/paws
R
false
true
2,891
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gamelift_operations.R \name{gamelift_update_runtime_configuration} \alias{gamelift_update_runtime_configuration} \title{Updates the current runtime configuration for the specified fleet, which tells Amazon GameLift how to launch server proces...
# The function for using ewastools to check sex for placenta samples: # let argument RGsetChara to be a charactor CheckGenotype <- function(RGsetChara){ registerDoParallel(cores=10) # get the object from character RGset <- get(RGsetChara) # get meta data phenoData <- pData(RGset) # phenoData to phen...
/R_Functions/GEOdataAnalysis_CheckGenotypeFUN.R
permissive
QianhuiWan/MethylationArray_Placenta
R
false
false
1,982
r
# The function for using ewastools to check sex for placenta samples: # let argument RGsetChara to be a charactor CheckGenotype <- function(RGsetChara){ registerDoParallel(cores=10) # get the object from character RGset <- get(RGsetChara) # get meta data phenoData <- pData(RGset) # phenoData to phen...
### Get the parameters parser = argparse::ArgumentParser(description="Run cicero") parser$add_argument('-P','--peak', help='the peak file') parser$add_argument('-C','--count', help='peak raw count file') parser$add_argument('-O','--out', help='outpath') parser$add_argument('-S','--sample', help='sample ID') args = pars...
/scripts/run_cicero.R
permissive
liuyang0681/scATACworkflow
R
false
false
1,430
r
### Get the parameters parser = argparse::ArgumentParser(description="Run cicero") parser$add_argument('-P','--peak', help='the peak file') parser$add_argument('-C','--count', help='peak raw count file') parser$add_argument('-O','--out', help='outpath') parser$add_argument('-S','--sample', help='sample ID') args = pars...
library(shiny) library(shinydashboard) # Dashboard UI shinyUI( dashboardPage( skin = "green", dashboardHeader( title = "Ecodomia" ), dashboardSidebar( # Menu items of the sidebar menu panel sidebarMenu( menuItem("Mon logement", tabName = "logement", icon = icon("home")), ...
/ui.R
no_license
dstoiko/hackathon-datapower
R
false
false
4,411
r
library(shiny) library(shinydashboard) # Dashboard UI shinyUI( dashboardPage( skin = "green", dashboardHeader( title = "Ecodomia" ), dashboardSidebar( # Menu items of the sidebar menu panel sidebarMenu( menuItem("Mon logement", tabName = "logement", icon = icon("home")), ...
# Analysis of house elf data library(dplyr) # import house elf data dat <- read.csv("data/houseelf_earlength_dna_data_1.csv") get_size_class <- function(weight,threshold){ if (weight > threshold){ size_class <- "large" } else { size_class <- "small" } return(size_class) } add_size_class <- function(df...
/houseself-analysis.r
no_license
sjgraves/class_example_timeseries
R
false
false
485
r
# Analysis of house elf data library(dplyr) # import house elf data dat <- read.csv("data/houseelf_earlength_dna_data_1.csv") get_size_class <- function(weight,threshold){ if (weight > threshold){ size_class <- "large" } else { size_class <- "small" } return(size_class) } add_size_class <- function(df...
library(knotR) filename <- "8_21.svg" a <- reader(filename) #knotplot2(a,node=TRUE) sym821 <- symmetry_object(a,Mver=NULL,xver=4) a <- symmetrize(a,sym821) #knotplot2(a) #knotplot2(a,text=TRUE,lwd=1,circ=FALSE) ou821 <- matrix(c( 09,02, 03,12, 15,06, 07,23, 18,08, 13,19, 22,...
/inst/8_21_worker.R
no_license
cran/knotR
R
false
false
748
r
library(knotR) filename <- "8_21.svg" a <- reader(filename) #knotplot2(a,node=TRUE) sym821 <- symmetry_object(a,Mver=NULL,xver=4) a <- symmetrize(a,sym821) #knotplot2(a) #knotplot2(a,text=TRUE,lwd=1,circ=FALSE) ou821 <- matrix(c( 09,02, 03,12, 15,06, 07,23, 18,08, 13,19, 22,...
setwd('/Users/kindaixin/Dropbox-work/Dropbox/coursera/03 Getting and Cleaning Data/Project'); #1. Load the test, training set subjectTrain <- read.table("./UCI HAR Dataset/train/subject_train.txt") xTrain <- read.table("./UCI HAR Dataset/train/X_train.txt") yTrain <- read.table("./UCI HAR Dataset/train/Y_train.txt")...
/run_analysis.R
no_license
jaxxie/Coursera-Getting-and-Cleaning-Data-Course-Project
R
false
false
1,916
r
setwd('/Users/kindaixin/Dropbox-work/Dropbox/coursera/03 Getting and Cleaning Data/Project'); #1. Load the test, training set subjectTrain <- read.table("./UCI HAR Dataset/train/subject_train.txt") xTrain <- read.table("./UCI HAR Dataset/train/X_train.txt") yTrain <- read.table("./UCI HAR Dataset/train/Y_train.txt")...
########################################################### # Functions for parallelization and fitting of GLM models ########################################################### #' .fitGLM #' This function parallelizes glm models: #' Parallelizes across genes in a counts matrix #' Parallelizes across patterns in a mat...
/R/model_fitting.R
permissive
gofflab/glmpd
R
false
false
19,410
r
########################################################### # Functions for parallelization and fitting of GLM models ########################################################### #' .fitGLM #' This function parallelizes glm models: #' Parallelizes across genes in a counts matrix #' Parallelizes across patterns in a mat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DBI.R \name{dbQuoteIdentifier,DatabaseConnectorConnection,character-method} \alias{dbQuoteIdentifier,DatabaseConnectorConnection,character-method} \title{Quote identifiers} \usage{ \S4method{dbQuoteIdentifier}{DatabaseConnectorConnection,char...
/man/dbQuoteIdentifier-DatabaseConnectorConnection-character-method.Rd
permissive
CristianPachacama/DatabaseConnector
R
false
true
2,206
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DBI.R \name{dbQuoteIdentifier,DatabaseConnectorConnection,character-method} \alias{dbQuoteIdentifier,DatabaseConnectorConnection,character-method} \title{Quote identifiers} \usage{ \S4method{dbQuoteIdentifier}{DatabaseConnectorConnection,char...
library(SingleR) library(celldex) library(Seurat) library(SeuratDisk) library(dplyr) library(scater) library(scRNAseq) library(parallel) library(destiny) library(monocle) #========================================Multiple Core detectCores() detectCores(logical = F) mc<-makeCluster(getOption("mc.cores"...
/single cell.R
no_license
JZYangTJ/Tanglab_NKT_COVID-19
R
false
false
32,802
r
library(SingleR) library(celldex) library(Seurat) library(SeuratDisk) library(dplyr) library(scater) library(scRNAseq) library(parallel) library(destiny) library(monocle) #========================================Multiple Core detectCores() detectCores(logical = F) mc<-makeCluster(getOption("mc.cores"...
#' Generate an table of descriptive statistics. #' #' This is a wrapper function of \code{stat_tab}, allowing for groupped variables, #' split statistics table by `row_split` variable. #' #' @param x Variables to be used or a \code{formula} for summary table. #' If \code{x} is a \code{formula}, then the \code{group} ...
/R/cttab.R
no_license
shug0131/cctu
R
false
false
21,532
r
#' Generate an table of descriptive statistics. #' #' This is a wrapper function of \code{stat_tab}, allowing for groupped variables, #' split statistics table by `row_split` variable. #' #' @param x Variables to be used or a \code{formula} for summary table. #' If \code{x} is a \code{formula}, then the \code{group} ...
#Let us load the data data=read.csv("choicebasedconjoint.csv") # Now we will look at the variables present in tha dataset names(data) #Serial number is not necessary. So we will remove it from the dataset data=data[,-1] # Now we will look at the structure of the data str(data) # We will include suurvival library ...
/Choice Based Conjoint Analysis.r
no_license
murugeshmanthiramoorthi/Choice-Based-Conjoint-Analysis
R
false
false
1,102
r
#Let us load the data data=read.csv("choicebasedconjoint.csv") # Now we will look at the variables present in tha dataset names(data) #Serial number is not necessary. So we will remove it from the dataset data=data[,-1] # Now we will look at the structure of the data str(data) # We will include suurvival library ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TheiaQuery.R \name{TheiaQuery} \alias{TheiaQuery} \title{A query to the Theia website} \description{ Generate an send a query to Theia web API to get and download tiles based on input given by the user. } \section{Usage}{ \preformatted{ q...
/man/TheiaQuery.Rd
no_license
MayaGueguen/theiaR
R
false
true
2,887
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TheiaQuery.R \name{TheiaQuery} \alias{TheiaQuery} \title{A query to the Theia website} \description{ Generate an send a query to Theia web API to get and download tiles based on input given by the user. } \section{Usage}{ \preformatted{ q...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/munge.R \name{refactor_list} \alias{refactor_list} \title{Produce a lookup for refactor()} \usage{ refactor_list(x, consolidate = FALSE, file = NULL) } \arguments{ \item{x}{A \code{\link{factor}} (or \code{\link{character}}) variable} \item{...
/man/refactor_list.Rd
permissive
arturocm/brocks
R
false
true
2,844
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/munge.R \name{refactor_list} \alias{refactor_list} \title{Produce a lookup for refactor()} \usage{ refactor_list(x, consolidate = FALSE, file = NULL) } \arguments{ \item{x}{A \code{\link{factor}} (or \code{\link{character}}) variable} \item{...
#' read_h5df #' #' TODO #' #' @param h5in #' Input file. #' @param dataset #' Dataset in input file to read or \code{NULL}. In the latter case, TODO #' @param indices #' TODO #' #' @export read_shff = function(h5in, dataset=NULL, indices=NULL) { check.is.string(h5in) if (!is.null(dataset)) check.is.string(da...
/R/read_shff.r
permissive
RBigData/shff
R
false
false
1,412
r
#' read_h5df #' #' TODO #' #' @param h5in #' Input file. #' @param dataset #' Dataset in input file to read or \code{NULL}. In the latter case, TODO #' @param indices #' TODO #' #' @export read_shff = function(h5in, dataset=NULL, indices=NULL) { check.is.string(h5in) if (!is.null(dataset)) check.is.string(da...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.R \name{closest_to_point} \alias{closest_to_point} \title{Get data closest to a point} \usage{ closest_to_point(mat, point) } \value{ Logical vector for each row in input matrix, TRUE if closest point } \description{ Get data closest t...
/man/closest_to_point.Rd
no_license
standardgalactic/scbp
R
false
true
332
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.R \name{closest_to_point} \alias{closest_to_point} \title{Get data closest to a point} \usage{ closest_to_point(mat, point) } \value{ Logical vector for each row in input matrix, TRUE if closest point } \description{ Get data closest t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.r \name{coef.gapski} \alias{coef.gapski} \title{Extract void point process parameter estimates} \usage{ \method{coef}{gapski}(object, ...) } \arguments{ \item{object}{A fitted model from \link{fit.gap}.} \item{...}{Other parameters (...
/man/coef.gapski.Rd
no_license
cmjt/gapski
R
false
true
454
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.r \name{coef.gapski} \alias{coef.gapski} \title{Extract void point process parameter estimates} \usage{ \method{coef}{gapski}(object, ...) } \arguments{ \item{object}{A fitted model from \link{fit.gap}.} \item{...}{Other parameters (...
#reading the dataset letters <- read.csv("letterdata.csv") str(letters) #splitting the dataset letters_training <- letters[1:16000, ] letters_test <- letters[16001:20000, ] #SVM learning - packages: e1071, klaR, kernlab install.packages("kernlab") #developed natively in R, can be used with caret package library(kern...
/ch7_2_ImageProcessing.R
no_license
buyukdem/MLwR
R
false
false
1,571
r
#reading the dataset letters <- read.csv("letterdata.csv") str(letters) #splitting the dataset letters_training <- letters[1:16000, ] letters_test <- letters[16001:20000, ] #SVM learning - packages: e1071, klaR, kernlab install.packages("kernlab") #developed natively in R, can be used with caret package library(kern...
# Question-1: Exercise: Explore the relationship between the following, where x contains numbers # from 1 to 100: x <- c(1:100) y <- 1 x plot(x, x^2) plot(x, x^3) # Question-2:: First we'll produce a very simple graph using the values in the car vector: cars <- c(1, 3, 6, 4, 9) # Graph the car vector...
/Assignment7.R
no_license
mahendra-16/Acadgild_Assignment7
R
false
false
969
r
# Question-1: Exercise: Explore the relationship between the following, where x contains numbers # from 1 to 100: x <- c(1:100) y <- 1 x plot(x, x^2) plot(x, x^3) # Question-2:: First we'll produce a very simple graph using the values in the car vector: cars <- c(1, 3, 6, 4, 9) # Graph the car vector...
Data_Frame <- data.frame ( Training = c("Strength", "Stamina", "Other"), Pulse = c(100, 150, 120), Duration = c(60, 30, 45) ) ncol(Data_Frame) nrow(Data_Frame)
/Saneeth/amount_dataframe.R
no_license
tactlabs/r-samples
R
false
false
165
r
Data_Frame <- data.frame ( Training = c("Strength", "Stamina", "Other"), Pulse = c(100, 150, 120), Duration = c(60, 30, 45) ) ncol(Data_Frame) nrow(Data_Frame)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/crypto_helpers.R \name{safely_read_json} \alias{safely_read_json} \title{Safely read json API} \usage{ safely_read_json(json_url) } \arguments{ \item{json_url}{json API URL} } \value{ parsed dataset or a elegant error message } \description{ ...
/man/safely_read_json.Rd
permissive
cran/crypto
R
false
true
572
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/crypto_helpers.R \name{safely_read_json} \alias{safely_read_json} \title{Safely read json API} \usage{ safely_read_json(json_url) } \arguments{ \item{json_url}{json API URL} } \value{ parsed dataset or a elegant error message } \description{ ...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 3819 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 2982 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 2937 c c Performing E1-Autarky iteration. c...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Kontchakov/SUBMITTED/Umbrella_tbm_05.tex.module.000053/Umbrella_tbm_05.tex.module.000053.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
1,607
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 3819 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 2982 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 2937 c c Performing E1-Autarky iteration. c...
library(saemix) ### Name: cow.saemix ### Title: Evolution of the weight of 560 cows, in SAEM format ### Aliases: cow.saemix ### Keywords: datasets ### ** Examples data(cow.saemix) saemix.data<-saemixData(name.data=cow.saemix,header=TRUE,name.group=c("cow"), name.predictors=c("time"),name.response=c("weight"), ...
/data/genthat_extracted_code/saemix/examples/cow.saemix.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,548
r
library(saemix) ### Name: cow.saemix ### Title: Evolution of the weight of 560 cows, in SAEM format ### Aliases: cow.saemix ### Keywords: datasets ### ** Examples data(cow.saemix) saemix.data<-saemixData(name.data=cow.saemix,header=TRUE,name.group=c("cow"), name.predictors=c("time"),name.response=c("weight"), ...
\name{butterworth} \docType{methods} \alias{butterworth} \alias{butterworth,Trace,numeric,missing,numeric,missing-method} \alias{butterworth,Trace,numeric,numeric,missing,missing-method} \alias{butterworth,Trace,numeric,numeric,numeric,character-method} \alias{butterworth,Trace,numeric,numeric,numeric,missing-method} ...
/man/butterworth.Rd
no_license
cran/IRISSeismic
R
false
false
2,843
rd
\name{butterworth} \docType{methods} \alias{butterworth} \alias{butterworth,Trace,numeric,missing,numeric,missing-method} \alias{butterworth,Trace,numeric,numeric,missing,missing-method} \alias{butterworth,Trace,numeric,numeric,numeric,character-method} \alias{butterworth,Trace,numeric,numeric,numeric,missing-method} ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/branchRateMatrix.R \name{branchRateMatrix} \alias{branchRateMatrix} \title{Compute exponentiated rate matrix for all branches} \usage{ branchRateMatrix(rate, branch.length, pi, log = TRUE) } \arguments{ \item{rate}{vector of mutation rates, o...
/man/branchRateMatrix.Rd
no_license
ndukler/epiAlleleGLM
R
false
true
718
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/branchRateMatrix.R \name{branchRateMatrix} \alias{branchRateMatrix} \title{Compute exponentiated rate matrix for all branches} \usage{ branchRateMatrix(rate, branch.length, pi, log = TRUE) } \arguments{ \item{rate}{vector of mutation rates, o...
#' Tidying methods for ordinal logistic regression models #' #' These methods tidy the coefficients of ordinal logistic regression #' models generated by [ordinal::clm()] or [ordinal::clmm()] #' of the `ordinal` package, [MASS::polr()] of the `MASS` #' packge, or [survey::svyolr()] of the `survey` package. #' #' @param...
/R/ordinal-tidiers.R
no_license
ethchr/broom
R
false
false
5,383
r
#' Tidying methods for ordinal logistic regression models #' #' These methods tidy the coefficients of ordinal logistic regression #' models generated by [ordinal::clm()] or [ordinal::clmm()] #' of the `ordinal` package, [MASS::polr()] of the `MASS` #' packge, or [survey::svyolr()] of the `survey` package. #' #' @param...
rm(list = ls()) source("code/table_function.R") # source("code/preliminary_weighted_analysis.R") # Run the first 25 lines from the file above to get hte data, questionnaire, etc. library(tidyverse) library(hypegrammaR) library(parallel) library(dplyr) questions <- read.csv("./input/survey.csv", stringsAsFactors = F) c...
/code/table_output.R
no_license
hedibmustapha/lby_msna2019
R
false
false
2,617
r
rm(list = ls()) source("code/table_function.R") # source("code/preliminary_weighted_analysis.R") # Run the first 25 lines from the file above to get hte data, questionnaire, etc. library(tidyverse) library(hypegrammaR) library(parallel) library(dplyr) questions <- read.csv("./input/survey.csv", stringsAsFactors = F) c...
###################################################### # this file contains internal functions # for calculation of fuzzy weights using method described # by Krejčí et al. (2016) ###################################################### setGeneric(".weightsLimits", function(data, i) standardGeneric(".we...
/R/function-internal-optimization.R
no_license
cran/FuzzyAHP
R
false
false
3,233
r
###################################################### # this file contains internal functions # for calculation of fuzzy weights using method described # by Krejčí et al. (2016) ###################################################### setGeneric(".weightsLimits", function(data, i) standardGeneric(".we...
rankall <- function(outcome, num = "best" ){ data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") state <- data$State state <- sort(unique(state)) hospital <- rep("", length(state)) for (i in 1:length(state)) { statedata<- data[data$State==state[i],] if (outcome == 'heart a...
/rankall.R
no_license
Eisforinnovate/outcomeofcaremeasurements
R
false
false
1,030
r
rankall <- function(outcome, num = "best" ){ data <- read.csv("outcome-of-care-measures.csv", colClasses = "character") state <- data$State state <- sort(unique(state)) hospital <- rep("", length(state)) for (i in 1:length(state)) { statedata<- data[data$State==state[i],] if (outcome == 'heart a...
rm(list=ls()) library(rjags) library(jagsUI) library(plyr) set.seed(2013) # RE4_10.1.7 (works), adding an extra covariate with random effects in beta coefficient (crop diversity) # ---- Data simulation ---- # 30 species # 5 years (unbalanced number of transects per year) # Observation model calculated with Half...
/Ch. 2-3/Ch. 3/Simulations/14. S_x_[dcat_area_HNintegral]_sigma[alpha(s)_obs(j,t)]_lambda[alpha(s,t)_sp.site(s,j)_covAreas(s,j,t)_covLands1(s,j,t)].r
no_license
anasanz/MyScripts
R
false
false
16,474
r
rm(list=ls()) library(rjags) library(jagsUI) library(plyr) set.seed(2013) # RE4_10.1.7 (works), adding an extra covariate with random effects in beta coefficient (crop diversity) # ---- Data simulation ---- # 30 species # 5 years (unbalanced number of transects per year) # Observation model calculated with Half...
#' Time-series of the 1971 influenza epidemic in Tristan-da-Cunha #' #' A dataset containing the daily incidence recorded during the 1971 influenza A/H3N2 two-wave epidemic on the island of Tristan-da-Cunha. #' #' \itemize{ #' \item \code{date} calendar date of the record #' \item \code{time} day of record since b...
/R/fitR-package.r
no_license
arbstat/fitR
R
false
false
9,621
r
#' Time-series of the 1971 influenza epidemic in Tristan-da-Cunha #' #' A dataset containing the daily incidence recorded during the 1971 influenza A/H3N2 two-wave epidemic on the island of Tristan-da-Cunha. #' #' \itemize{ #' \item \code{date} calendar date of the record #' \item \code{time} day of record since b...
## function to compute the correlation between clusters ## in reduced dimension (e.g. principle component) space #' @param seurat_object A seurat object containing reduced dimension embeddings and cluster ids. #' @param dr_type The dimension reduction type, e.g. "pca" or "cca" #' @param comps The components to use. #'...
/tenxutils/R/Cluster.R
permissive
MatthieuRouland/tenx
R
false
false
1,817
r
## function to compute the correlation between clusters ## in reduced dimension (e.g. principle component) space #' @param seurat_object A seurat object containing reduced dimension embeddings and cluster ids. #' @param dr_type The dimension reduction type, e.g. "pca" or "cca" #' @param comps The components to use. #'...
if(!dir.exists("~/Documents/Yonathan/Courera/Exploratory")){ dir.create("~/Documents/Yonathan/Courera/Exploratory") } setwd("/Users/ybrhane/Documents/Yonathan/Courera/Exploratory") getwd() fileUrl = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileUrl, ...
/plot1.R
no_license
ybrhane/ExData_Plotting1
R
false
false
1,008
r
if(!dir.exists("~/Documents/Yonathan/Courera/Exploratory")){ dir.create("~/Documents/Yonathan/Courera/Exploratory") } setwd("/Users/ybrhane/Documents/Yonathan/Courera/Exploratory") getwd() fileUrl = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileUrl, ...
############################### ### Libraries and functions ### ############################### options(import.path=c("/homes/hannah/projects/GWAS", "/homes/hannah/projects")) options(bitmapType = 'cairo', device = 'pdf') modules::import_package('ggplot2', attach=TRUE) smooth <- modules::import(...
/digital-heart/association/scripts/concordance.R
no_license
ImperialCollegeLondon/fractalgenetics
R
false
false
8,444
r
############################### ### Libraries and functions ### ############################### options(import.path=c("/homes/hannah/projects/GWAS", "/homes/hannah/projects")) options(bitmapType = 'cairo', device = 'pdf') modules::import_package('ggplot2', attach=TRUE) smooth <- modules::import(...
#' @rdname unbiased_increment #' @title Unbiased estimator for the value of the increment at the given level #' @description Generate four coupled chains and compute the estimator of the increment #' @param level an integer that determines the target probability distributions of four chains #' @param rinit function tha...
/R/unbiased_increment.R
no_license
jeremyhengjm/UnbiasedMultilevel
R
false
false
10,016
r
#' @rdname unbiased_increment #' @title Unbiased estimator for the value of the increment at the given level #' @description Generate four coupled chains and compute the estimator of the increment #' @param level an integer that determines the target probability distributions of four chains #' @param rinit function tha...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \name{size} \alias{size} \alias{size.default} \alias{size<-} \alias{size<-.default} \title{Return size (width and height) of widget} \usage{ size(obj) \method{size}{default}(obj) size(obj) <- value size(obj) <- value } \arguments...
/man/size.Rd
no_license
cran/gWidgets2
R
false
true
483
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \name{size} \alias{size} \alias{size.default} \alias{size<-} \alias{size<-.default} \title{Return size (width and height) of widget} \usage{ size(obj) \method{size}{default}(obj) size(obj) <- value size(obj) <- value } \arguments...
function(input, output, session) { observeEvent(input$warning, { # Save the ID for removal later showNotification({ HTML(paste("Dataframe must be a csv file where rows correspond to individuals and columns to items. If an item is answered correctly by an individual the value of the cell is 1, if it...
/server.R
no_license
albamrt/PerFitShiny
R
false
false
14,238
r
function(input, output, session) { observeEvent(input$warning, { # Save the ID for removal later showNotification({ HTML(paste("Dataframe must be a csv file where rows correspond to individuals and columns to items. If an item is answered correctly by an individual the value of the cell is 1, if it...
library(umap) library(colorspace) library(RColorBrewer) library(scales) library(ggplot2) library(viridis) compute_pca <- function(met_mat, vmr_count = 2000) { met_mat_imputed = impute_nas(met_mat) met_mat_imputed[1:5, 1:5] var_region = apply(X = met_mat_imputed, FUN = var, MARGIN = 1) var_region_sorted = s...
/R/dimensionality_reduction.R
no_license
yasin-uzun/SINBAD.0.2
R
false
false
7,478
r
library(umap) library(colorspace) library(RColorBrewer) library(scales) library(ggplot2) library(viridis) compute_pca <- function(met_mat, vmr_count = 2000) { met_mat_imputed = impute_nas(met_mat) met_mat_imputed[1:5, 1:5] var_region = apply(X = met_mat_imputed, FUN = var, MARGIN = 1) var_region_sorted = s...
/Oaxaca.R
no_license
allvesbru/Data-Micro
R
false
false
12,466
r
rm(list=ls()) #===> loading packages and such <===# #install.packages("OIsurv") library(OIsurv) data(aids) aids attach(aids) infect detach(aids) aids$infect #===> survival object <===# data(tongue); attach(tongue) # the following will not affect computations # create a subset for just the first group by using [type...
/survivalInR-for-statsTeachR/code/SurvGuideCode.R
no_license
OpenIntroOrg/stat-online-extras
R
false
false
5,952
r
rm(list=ls()) #===> loading packages and such <===# #install.packages("OIsurv") library(OIsurv) data(aids) aids attach(aids) infect detach(aids) aids$infect #===> survival object <===# data(tongue); attach(tongue) # the following will not affect computations # create a subset for just the first group by using [type...
rc <- function(cube = rubix()){ hold1 <- cube$top[c(3,6,9),3] cube$top[c(3,6,9), 3] <- cube$front[c(3,6,9), 3] cube$front[c(3,6,9), 3] <- cube$base[c(3,6,9), 3] cube$base[c(3,6,9), 3] <- cube$hind[c(3,6,9), 3] cube$hind[c(3,6,9), 3] <- hold1 hold2 <- cube$right[4,3] hold3 <- cube$right[...
/rubix_moves.R
no_license
t-reader/r-rubix-cube
R
false
false
8,062
r
rc <- function(cube = rubix()){ hold1 <- cube$top[c(3,6,9),3] cube$top[c(3,6,9), 3] <- cube$front[c(3,6,9), 3] cube$front[c(3,6,9), 3] <- cube$base[c(3,6,9), 3] cube$base[c(3,6,9), 3] <- cube$hind[c(3,6,9), 3] cube$hind[c(3,6,9), 3] <- hold1 hold2 <- cube$right[4,3] hold3 <- cube$right[...
rm(list = ls()) ##### loading the needed libraries ################ library (INLA) library(lme4) ###--------------------------------------------------- ############################################################### ############### Simulation Example #################### ### Simulating observatio...
/r-inla.org/papers/S8-2010-R.R
no_license
HughParsonage/R-INLA-mirror
R
false
false
57,802
r
rm(list = ls()) ##### loading the needed libraries ################ library (INLA) library(lme4) ###--------------------------------------------------- ############################################################### ############### Simulation Example #################### ### Simulating observatio...
#' nullplot #' #' Make an plot with nothing in it #' #' @param x1 lowest x-axis value #' @param x2 largest x-axis value #' @param y1 lowest y-axis value #' @param y2 largest y-axis value #' @param xlab x-axis title, defaults to no title #' @param ylab y-axis title, defaults to no title #' @param ... further arguments...
/R/nullplot.R
no_license
CymGen30/rafalib
R
false
false
505
r
#' nullplot #' #' Make an plot with nothing in it #' #' @param x1 lowest x-axis value #' @param x2 largest x-axis value #' @param y1 lowest y-axis value #' @param y2 largest y-axis value #' @param xlab x-axis title, defaults to no title #' @param ylab y-axis title, defaults to no title #' @param ... further arguments...
library(tidyverse) library(xml2) library(fs) library(sys) library(rvest) library(pdftools) library(lubridate) # Utility functions ------------------------------------------------------------ #' Extract URLs from home page extract_urls <- function(url) { url %>% read_html() %>% html_nodes(".country-data a") ...
/extract.R
no_license
cuulee/google-location-coronavirus
R
false
false
8,885
r
library(tidyverse) library(xml2) library(fs) library(sys) library(rvest) library(pdftools) library(lubridate) # Utility functions ------------------------------------------------------------ #' Extract URLs from home page extract_urls <- function(url) { url %>% read_html() %>% html_nodes(".country-data a") ...
# test_galeshapley.R # test matching with the Gale-Shapley Algorithm test_that("Check if galeShapley.marriageMarket matching is stable", { uM <- matrix(runif(12), nrow = 4, ncol = 3) uW <- matrix(runif(12), nrow = 3, ncol = 4) matching.marriageMarket <- galeShapley.marriageMarket(uM, uW) expect_true(galeShaple...
/tests/testthat/test_galeshapley.R
no_license
minghao2016/matchingR
R
false
false
11,414
r
# test_galeshapley.R # test matching with the Gale-Shapley Algorithm test_that("Check if galeShapley.marriageMarket matching is stable", { uM <- matrix(runif(12), nrow = 4, ncol = 3) uW <- matrix(runif(12), nrow = 3, ncol = 4) matching.marriageMarket <- galeShapley.marriageMarket(uM, uW) expect_true(galeShaple...
#Developed by Pablo Vicente-Munuera source('~/Documents/Dropbox/MScBioinformatics/Thesis/Project/Analyzing-PPIs/src/lib/plotingResults.R', echo=TRUE) plotingResults(title = "Malaria", resultsGeo2D = resultsGeo2DMalariaAdj, fileOriginal = "data/results/MalariaAdj.sifGC.txt", ...
/src/showingTheResults.R
permissive
Pablo1990/Analyzing-PPIs
R
false
false
371
r
#Developed by Pablo Vicente-Munuera source('~/Documents/Dropbox/MScBioinformatics/Thesis/Project/Analyzing-PPIs/src/lib/plotingResults.R', echo=TRUE) plotingResults(title = "Malaria", resultsGeo2D = resultsGeo2DMalariaAdj, fileOriginal = "data/results/MalariaAdj.sifGC.txt", ...
## Programming Assignment 2 ## Writing a pair of functions that cache the inverse of a matrix ## Step 1: Create a matrix object that can cache its inverse makeCacheMatrix <- function(x=matrix()){ #initialising x as a matrix i <- NULL # initialising i within the function environment for future use set<-functi...
/cachematrix.R
no_license
cmasih/ProgrammingAssignment2
R
false
false
1,379
r
## Programming Assignment 2 ## Writing a pair of functions that cache the inverse of a matrix ## Step 1: Create a matrix object that can cache its inverse makeCacheMatrix <- function(x=matrix()){ #initialising x as a matrix i <- NULL # initialising i within the function environment for future use set<-functi...
#' Copyright(c) 2017-2020 R. Mark Sharp # This file is part of nprcgenekeepr test_that("mapIdsToObfuscated maps IDS as expected", { set_seed(1) ped <- qcStudbook(nprcgenekeepr::pedSix) obfuscated <- obfuscatePed(ped, map = TRUE) someIds <- c("s1", "s2", "d1", "d1") someUndefinedIds <- c("nope", "s1", "still_n...
/tests/testthat/test_mapIdsToObfuscated.R
permissive
jhagberg/nprcgenekeepr
R
false
false
565
r
#' Copyright(c) 2017-2020 R. Mark Sharp # This file is part of nprcgenekeepr test_that("mapIdsToObfuscated maps IDS as expected", { set_seed(1) ped <- qcStudbook(nprcgenekeepr::pedSix) obfuscated <- obfuscatePed(ped, map = TRUE) someIds <- c("s1", "s2", "d1", "d1") someUndefinedIds <- c("nope", "s1", "still_n...
# ###################### OLD FUNCTIONS ############################### # # #################################################################### # # Get Personal Portfolio's Data # # # # This function downloads my personal Excel with my Portfolio data # # # # @family Investment # # @param filename Characeter. Import ...
/R/stocks_old.R
no_license
vahidnouri/lares
R
false
false
34,724
r
# ###################### OLD FUNCTIONS ############################### # # #################################################################### # # Get Personal Portfolio's Data # # # # This function downloads my personal Excel with my Portfolio data # # # # @family Investment # # @param filename Characeter. Import ...
# Piotr Jastrzebski # Marcin Nazimek evaluate.evaluate <-function(testDataFrame, trainDataFrame){ testSet = as.matrix(testDataFrame) trainSet = as.matrix(trainDataFrame) ##### OUR ALGORITHMS ##### # [TP|FP|FN|TN] # http://www.eol.ucar.edu/rsf/NEXRAD/dq_fy98/fig_2.4.gif # kNN classification test r...
/Temat16/src/utils/evaluate.r
no_license
ktp-forked-repos/MOW
R
false
false
3,867
r
# Piotr Jastrzebski # Marcin Nazimek evaluate.evaluate <-function(testDataFrame, trainDataFrame){ testSet = as.matrix(testDataFrame) trainSet = as.matrix(trainDataFrame) ##### OUR ALGORITHMS ##### # [TP|FP|FN|TN] # http://www.eol.ucar.edu/rsf/NEXRAD/dq_fy98/fig_2.4.gif # kNN classification test r...
#' Athena driver class. #' #' @keywords internal #' @export #' @import RJDBC #' @import methods #' @importClassesFrom RJDBC JDBCDriver setClass("AthenaDriver", contains = "JDBCDriver") #' Athena DBI wrapper #' #' @export Athena <- function() { new("AthenaDriver") } #' Constructor of AthenaDriver #' #' @name Athen...
/R/athena.R
no_license
hrbrmstr/AWR.Athena
R
false
false
3,910
r
#' Athena driver class. #' #' @keywords internal #' @export #' @import RJDBC #' @import methods #' @importClassesFrom RJDBC JDBCDriver setClass("AthenaDriver", contains = "JDBCDriver") #' Athena DBI wrapper #' #' @export Athena <- function() { new("AthenaDriver") } #' Constructor of AthenaDriver #' #' @name Athen...
context("beautify") b <- beautify() test_that("beautify", { expect_length(b, 31) lapply(b, function(e) { expect_true(is.function(e)) }) })
/tests/testthat/test_beautify.R
no_license
cran/wyz.code.rdoc
R
false
false
151
r
context("beautify") b <- beautify() test_that("beautify", { expect_length(b, 31) lapply(b, function(e) { expect_true(is.function(e)) }) })
source("https://bioconductor.org/biocLite.R") biocLite("RRHO") library(RRHO) ### Graph raw counts setwd("~/Documents/dimitra/Workspace/RNA-Seq/Kits_comparison/") pico = read.delim("gene_lists_filtered/Pico.counts.ILB.9579.txt") v4 = read.delim("gene_lists_filtered/V4.counts.ILB.9579.txt") truseq = read.delim("gene_li...
/scripts/rrho.R
no_license
dimitras/scatterplots-clustering-in-R
R
false
false
3,748
r
source("https://bioconductor.org/biocLite.R") biocLite("RRHO") library(RRHO) ### Graph raw counts setwd("~/Documents/dimitra/Workspace/RNA-Seq/Kits_comparison/") pico = read.delim("gene_lists_filtered/Pico.counts.ILB.9579.txt") v4 = read.delim("gene_lists_filtered/V4.counts.ILB.9579.txt") truseq = read.delim("gene_li...
## Function that take two arguments: the 2-character abbreviated name of a state and an ## outcome name. The function reads the outcome-of-care-measures.csv and returns a character vector ## with the name of the hospital that has the best (i.e. lowest) 30-day mortality for the specifed outcome ## in that state. The ho...
/Assignment function files -Final Copies/Programming Assignment 3 Hospital Quality/best.R
no_license
ashmachado/datasciencecoursera
R
false
false
4,964
r
## Function that take two arguments: the 2-character abbreviated name of a state and an ## outcome name. The function reads the outcome-of-care-measures.csv and returns a character vector ## with the name of the hospital that has the best (i.e. lowest) 30-day mortality for the specifed outcome ## in that state. The ho...
library(tidyquant) #### Setup context(paste0("Testing tq_performance")) # Get returns for individual stock components grouped by symbol Ra <- c("AAPL", "GOOG", "NFLX") %>% tq_get(get = "stock.prices", from = "2010-01-01", to = "2015-12-31") %>% group_by(symbol) %>% tq_transmute(a...
/tests/testthat/test-tq_performance.R
no_license
aborodya/tidyquant
R
false
false
1,500
r
library(tidyquant) #### Setup context(paste0("Testing tq_performance")) # Get returns for individual stock components grouped by symbol Ra <- c("AAPL", "GOOG", "NFLX") %>% tq_get(get = "stock.prices", from = "2010-01-01", to = "2015-12-31") %>% group_by(symbol) %>% tq_transmute(a...
library(dplyr) Sys.setlocale("LC_TIME", "C") data <- read.table("household_power_consumption.txt", sep=";", header=TRUE) datarequired <- filter(data, Date=="1/2/2007" | Date=="2/2/2007") datarequired[,1] <- as.Date(datarequired[,1], "%d/%m/%Y") datarequired$numformat <- as.POSIXct(paste(datarequired[,1], datarequi...
/plot2.R
no_license
manfrediruggeri/ExData_Plotting1
R
false
false
512
r
library(dplyr) Sys.setlocale("LC_TIME", "C") data <- read.table("household_power_consumption.txt", sep=";", header=TRUE) datarequired <- filter(data, Date=="1/2/2007" | Date=="2/2/2007") datarequired[,1] <- as.Date(datarequired[,1], "%d/%m/%Y") datarequired$numformat <- as.POSIXct(paste(datarequired[,1], datarequi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fresh-package.R \docType{package} \name{fresh} \alias{fresh} \alias{fresh-package} \title{Fresh 'Shiny' Themes} \description{ Customize 'Bootstrap' and 'Bootswatch' themes, like colors, fonts, grid layout, to use in 'Shiny' applications. } \a...
/man/fresh.Rd
no_license
pythseq/fresh
R
false
true
411
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fresh-package.R \docType{package} \name{fresh} \alias{fresh} \alias{fresh-package} \title{Fresh 'Shiny' Themes} \description{ Customize 'Bootstrap' and 'Bootswatch' themes, like colors, fonts, grid layout, to use in 'Shiny' applications. } \a...
#' Returns small data frame #' Based on the quest it searches for correct place in the player log and calculates pointing direction from the player #' position at that time adn the position of the goal of the quest as suggested from the last known transform #' #' @param choosings - evet times of ChooseDirections in U...
/R/Unity/pointing_accuracy.R
no_license
hejtmy/VR_City_Analysis
R
false
false
2,866
r
#' Returns small data frame #' Based on the quest it searches for correct place in the player log and calculates pointing direction from the player #' position at that time adn the position of the goal of the quest as suggested from the last known transform #' #' @param choosings - evet times of ChooseDirections in U...
acc<-c() for(i in 1:500) { print(i) ##Data Partition inTraininglocal<-createDataPartition(iris$Species,p=.85,list = F) training1<-iris[inTraininglocal,] testing<-iris[-inTraininglocal,] #Model building fittree <- C5.0(training1$Species~., data=training1) #Predicting pred<-predict.C5.0(fitt...
/data science partition.R
no_license
gowthamthenarasu/Datascience-R-codes
R
false
false
438
r
acc<-c() for(i in 1:500) { print(i) ##Data Partition inTraininglocal<-createDataPartition(iris$Species,p=.85,list = F) training1<-iris[inTraininglocal,] testing<-iris[-inTraininglocal,] #Model building fittree <- C5.0(training1$Species~., data=training1) #Predicting pred<-predict.C5.0(fitt...
add2<- function(x,y) { x+y } above10 <- function(x) { use <- x>10 x[use] } above <- function(x,n) { use <- x>n x[use] } columnmean <- function(y) { nc <- ncol(y) means <- numeric(nc) for(i in 1:nc) means[i] <- mean(y[,i], na.rm=T) means }
/Rprogramming/week2samples.R
no_license
petersedivec/datasciencecoursera
R
false
false
270
r
add2<- function(x,y) { x+y } above10 <- function(x) { use <- x>10 x[use] } above <- function(x,n) { use <- x>n x[use] } columnmean <- function(y) { nc <- ncol(y) means <- numeric(nc) for(i in 1:nc) means[i] <- mean(y[,i], na.rm=T) means }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/numbers.R \name{percent_formatting} \alias{percent_formatting} \title{Formatting percentages} \usage{ percent_formatting(x) } \arguments{ \item{x}{the number you need to format} } \value{ a string } \description{ This function allows you to f...
/man/percent_formatting.Rd
no_license
pachevalier/tricky
R
false
true
397
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/numbers.R \name{percent_formatting} \alias{percent_formatting} \title{Formatting percentages} \usage{ percent_formatting(x) } \arguments{ \item{x}{the number you need to format} } \value{ a string } \description{ This function allows you to f...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/madb.R \name{getmadbcountries} \alias{getmadbcountries} \title{Function to retrieve list of countries, available at Market Access DB} \usage{ getmadbcountries(url = "http://madb.europa.eu/madb/euTariffs.htm") } \description{ Function ...
/man/getmadbcountries.Rd
no_license
malexan/fclhs
R
false
false
384
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/madb.R \name{getmadbcountries} \alias{getmadbcountries} \title{Function to retrieve list of countries, available at Market Access DB} \usage{ getmadbcountries(url = "http://madb.europa.eu/madb/euTariffs.htm") } \description{ Function ...
library(shiny) shinyUI(pageWithSidebar( headerPanel("966 stars"), sidebarPanel( sliderInput('mu','Guess the mean brightness', value = 7.00, min = 2.00, max = 14.00, step = 0.05) ), mainPanel( plotOutput('newHist') ) ))
/ui.R
no_license
simplz/9CourseProject
R
false
false
298
r
library(shiny) shinyUI(pageWithSidebar( headerPanel("966 stars"), sidebarPanel( sliderInput('mu','Guess the mean brightness', value = 7.00, min = 2.00, max = 14.00, step = 0.05) ), mainPanel( plotOutput('newHist') ) ))
### Run simple e coli model ##### Code to run generalised function and examples ##*** Libraries needed library(mvtnorm);library(plyr); library(ggplot2);library(reshape2);library(deSolve);library(grid);library(gtools); library(directlabels); library(mvtnorm) theme_set(theme_gray(base_size = 24)); ##*** Locations home...
/ec_generalised_function_withr_run.R
no_license
nmfuller/Hetero_res_and_f_nf
R
false
false
22,179
r
### Run simple e coli model ##### Code to run generalised function and examples ##*** Libraries needed library(mvtnorm);library(plyr); library(ggplot2);library(reshape2);library(deSolve);library(grid);library(gtools); library(directlabels); library(mvtnorm) theme_set(theme_gray(base_size = 24)); ##*** Locations home...