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
# Please build your own test file from test-Template.R, and place it in tests folder # please specify the package you need to run the sim function in the test files. # to test all the test files in the tests folder: test_dir("/Users/stevec/Dropbox/Courses/7043H16/Lab/scfmModules/scfmSpread/tests") # Alternative, you...
/modules/scfmSpread/tests/unitTests.R
no_license
tati-micheletti/SpaDESinAction
R
false
false
484
r
# Please build your own test file from test-Template.R, and place it in tests folder # please specify the package you need to run the sim function in the test files. # to test all the test files in the tests folder: test_dir("/Users/stevec/Dropbox/Courses/7043H16/Lab/scfmModules/scfmSpread/tests") # Alternative, you...
\name{Run_permutation} \alias{Run_permutation} \title{Derive importance scores for M permuted data sets.} \usage{ Run_permutation(X, W, ntree, mtry,genes.name,M) } \arguments{ \item{X}{\code{(n x p)} Matrix containing expression levels for \code{n} samples and \code{p} genes.} \item{W}{\code{(p x p)} Matrix containing...
/man/Run_permutation.Rd
no_license
cran/iRafNet
R
false
false
2,893
rd
\name{Run_permutation} \alias{Run_permutation} \title{Derive importance scores for M permuted data sets.} \usage{ Run_permutation(X, W, ntree, mtry,genes.name,M) } \arguments{ \item{X}{\code{(n x p)} Matrix containing expression levels for \code{n} samples and \code{p} genes.} \item{W}{\code{(p x p)} Matrix containing...
#' @title Delete a person #' @description Function to Delete a person on pipedrive. #' @param id ID of the person #' @param api_token To validate your requests, you'll need your api_token - this means that our system will need to know who you are and be able to connect all actions you do with your chosen Pipedrive a...
/R/persons.delete.R
no_license
cran/Rpipedrive
R
false
false
1,559
r
#' @title Delete a person #' @description Function to Delete a person on pipedrive. #' @param id ID of the person #' @param api_token To validate your requests, you'll need your api_token - this means that our system will need to know who you are and be able to connect all actions you do with your chosen Pipedrive a...
#' get an envrionment variable `HEADLESS_CHROME` #' #' @md #' @note This only return an envrionment variable `HEADLESS_CHROME`. #' @export #' @examples #' get_env() get_chrome_env <- function() { Sys.getenv("HEADLESS_CHROME") } #' set an envrionment variable `HEADLESS_CHROME` #' #' @md #' @note This only grabs the `...
/R/env.R
no_license
markwsac/decapitated
R
false
false
628
r
#' get an envrionment variable `HEADLESS_CHROME` #' #' @md #' @note This only return an envrionment variable `HEADLESS_CHROME`. #' @export #' @examples #' get_env() get_chrome_env <- function() { Sys.getenv("HEADLESS_CHROME") } #' set an envrionment variable `HEADLESS_CHROME` #' #' @md #' @note This only grabs the `...
# Figure S2: exclusivity surface plots for different initial connectivity and resource share type ------- ## Load data on disproportionate share type: this scenario calculates individual payoffs in which the group-level resource share is determined by the size of the groups, considering that larger groups outcompete s...
/Figure_codes/FigureS2.R
no_license
sabrinatucci/Cantor-Farine-Repro-Project
R
false
false
22,088
r
# Figure S2: exclusivity surface plots for different initial connectivity and resource share type ------- ## Load data on disproportionate share type: this scenario calculates individual payoffs in which the group-level resource share is determined by the size of the groups, considering that larger groups outcompete s...
# Yige Wu @WashU Apr 2020 ## running on local ## for plotting average expression of known pathogenic pathway genes for each tumor subclusters (manually grouped) ## VHL-HIF pathway # set up libraries and output directory ----------------------------------- ## set working directory baseD = "~/Box/" setwd(baseD) source("...
/tumor_subcluster/plotting/heatmap/heatmap_tumor_manualsubcluster_mtorpathway.R
no_license
ding-lab/ccRCC_snRNA_analysis
R
false
false
5,458
r
# Yige Wu @WashU Apr 2020 ## running on local ## for plotting average expression of known pathogenic pathway genes for each tumor subclusters (manually grouped) ## VHL-HIF pathway # set up libraries and output directory ----------------------------------- ## set working directory baseD = "~/Box/" setwd(baseD) source("...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PASWR-package.R \docType{data} \name{Formula1} \alias{Formula1} \title{Pit Stop Times} \format{ A data frame with 10 observations on the following 3 variables: \describe{ \item{Race}{number corresponding to a race site} \item{Team1}{pit stop...
/man/Formula1.Rd
no_license
alanarnholt/PASWR
R
false
true
685
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PASWR-package.R \docType{data} \name{Formula1} \alias{Formula1} \title{Pit Stop Times} \format{ A data frame with 10 observations on the following 3 variables: \describe{ \item{Race}{number corresponding to a race site} \item{Team1}{pit stop...
#' @title Create input indicator(s) #' #' @description The function creates the input indicators from the inputs and #' the outputs. #' @param data_table A symmetric input-output table, a use table, #' a margins or tax table retrieved by the \code{\link{iotable_get}} #' function. #' @param input_row The name...
/R/input_indicator_create.R
permissive
cran/iotables
R
false
false
3,104
r
#' @title Create input indicator(s) #' #' @description The function creates the input indicators from the inputs and #' the outputs. #' @param data_table A symmetric input-output table, a use table, #' a margins or tax table retrieved by the \code{\link{iotable_get}} #' function. #' @param input_row The name...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wiki_graph.R \docType{data} \name{wiki_data} \alias{wiki_data} \title{Dataset creation for wiki graph.} \format{A data frame with 18 rows and 3 variables: \describe{ \item{v1}{edge1 of graph} \item{v2}{edge2 of grpah} \item{w}{weight of...
/man/wiki_data.Rd
permissive
MuhammadFaizanKhalid/euclidspackage
R
false
true
530
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wiki_graph.R \docType{data} \name{wiki_data} \alias{wiki_data} \title{Dataset creation for wiki graph.} \format{A data frame with 18 rows and 3 variables: \describe{ \item{v1}{edge1 of graph} \item{v2}{edge2 of grpah} \item{w}{weight of...
##--------------------------------## ## Small ODE example: EnvZ/OmpR ## ##--------------------------------## rm(list = ls()) library(episode) library(ggplot2); library(reshape) library(igraph) source("../ggplot_theme.R") ## Define system ## x0 <- c('(EnvZ-P)OmpR' = 4, 'EnvZ(OmpR-P)' = 5, 'EnvZ-P'...
/SimStudies/SimF_EnvZOmpR/main.R
no_license
nielsrhansen/SLODE
R
false
false
9,948
r
##--------------------------------## ## Small ODE example: EnvZ/OmpR ## ##--------------------------------## rm(list = ls()) library(episode) library(ggplot2); library(reshape) library(igraph) source("../ggplot_theme.R") ## Define system ## x0 <- c('(EnvZ-P)OmpR' = 4, 'EnvZ(OmpR-P)' = 5, 'EnvZ-P'...
AUTH_SCOPES = c('https://www.googleapis.com/auth/cloud-platform') GCS_PATH_SEPARATOR = '/' #' Access datasets from Google Cloud Storage #' #' Helper functions for loading datasets from Google Cloud Storage (GCS). In case of #' tabular data, provides functions which can be used in concert with #' \link[megautils]{impo...
/R/gcs.R
permissive
gmega/megautils
R
false
false
2,699
r
AUTH_SCOPES = c('https://www.googleapis.com/auth/cloud-platform') GCS_PATH_SEPARATOR = '/' #' Access datasets from Google Cloud Storage #' #' Helper functions for loading datasets from Google Cloud Storage (GCS). In case of #' tabular data, provides functions which can be used in concert with #' \link[megautils]{impo...
options(servr.daemon = interactive(), blogdown.YAML.empty = TRUE, blogdown.author = 'Alexander C. Hungerford', blogdown.ext = '.Rmd', blogdown.subdir = 'post')
/.Rprofile
permissive
achungerford/rsite
R
false
false
176
rprofile
options(servr.daemon = interactive(), blogdown.YAML.empty = TRUE, blogdown.author = 'Alexander C. Hungerford', blogdown.ext = '.Rmd', blogdown.subdir = 'post')
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gdfpd_get_inflation_data.R \name{gdfpd.get.inflation.data} \alias{gdfpd.get.inflation.data} \title{Downloads and read inflation data from github} \usage{ gdfpd.get.inflation.data(inflation.index, do.cache) } \arguments{ \item{inflation.index}...
/man/gdfpd.get.inflation.data.Rd
no_license
msperlin/GetDFPData
R
false
true
920
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gdfpd_get_inflation_data.R \name{gdfpd.get.inflation.data} \alias{gdfpd.get.inflation.data} \title{Downloads and read inflation data from github} \usage{ gdfpd.get.inflation.data(inflation.index, do.cache) } \arguments{ \item{inflation.index}...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 2133 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 2133 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/e...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/eequery_query64_1344n/eequery_query64_1344n.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
710
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 2133 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 2133 c c Input Parameter (command line, file): c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/e...
library(tidyverse) # ** calculate the mean, sd, cov and se ** data_15P_cal_HE_outlier_replaced <- read_csv("data/tidydata/data_15P_cal_HE_outlier_replaced.csv") variation <- data_15P_cal_HE_outlier_replaced %>% group_by(Sample, Time) %>% summarise(Mean_HE = mean(HE, na.rm = TRUE...
/scripts/calculation/calculation_var_15P.R
no_license
Yuzi-00/starch-degradation
R
false
false
1,186
r
library(tidyverse) # ** calculate the mean, sd, cov and se ** data_15P_cal_HE_outlier_replaced <- read_csv("data/tidydata/data_15P_cal_HE_outlier_replaced.csv") variation <- data_15P_cal_HE_outlier_replaced %>% group_by(Sample, Time) %>% summarise(Mean_HE = mean(HE, na.rm = TRUE...
# Read in the data from the text file... data <- read.table("household_power_consumption.txt", sep=";", na.strings="?", header=TRUE) #Subset the data desired for Feb 1st and 2nd, 2007 feb <- data[(data$Date==c("1/2/2007")| data$Date==c("2/2/2007")),] hist(feb$Global_active_power, col="red", xlab="Global Active Power...
/plot1.R
no_license
susanst/ExData_Plotting1
R
false
false
459
r
# Read in the data from the text file... data <- read.table("household_power_consumption.txt", sep=";", na.strings="?", header=TRUE) #Subset the data desired for Feb 1st and 2nd, 2007 feb <- data[(data$Date==c("1/2/2007")| data$Date==c("2/2/2007")),] hist(feb$Global_active_power, col="red", xlab="Global Active Power...
608f72c3c5f27301083afd596371276d trivial_query25_1344n.qdimacs 885 4022
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/trivial_query25_1344n/trivial_query25_1344n.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
71
r
608f72c3c5f27301083afd596371276d trivial_query25_1344n.qdimacs 885 4022
plot4 <- function() { epc_table <- read.table("household_power_consumption.txt", sep=";", header=TRUE, stringsAsFactors = FALSE) epc_table[,1] <- as.Date(epc_table[,1],format="%d/%m/%Y") epc_table_subset <- with(epc_table, epc_table[(Date >= "2007-02-01" & Date <= "2007-02-02"), ]) epc_table_subset["datetime"] ...
/plot4.R
no_license
kazkibergetic/ExData_Plotting1
R
false
false
1,350
r
plot4 <- function() { epc_table <- read.table("household_power_consumption.txt", sep=";", header=TRUE, stringsAsFactors = FALSE) epc_table[,1] <- as.Date(epc_table[,1],format="%d/%m/%Y") epc_table_subset <- with(epc_table, epc_table[(Date >= "2007-02-01" & Date <= "2007-02-02"), ]) epc_table_subset["datetime"] ...
#Data has been download into working directory first #Load the household data into R household_data <- read.csv("household_power_consumption.txt", header =TRUE, sep = ";") #subset of the data required for the graphs graph_data <- subset(household_data, household_data$Date=="1/2/2007" | household_data$Date =="2/...
/Plot1.R
no_license
Nativim/ExData_Plotting1
R
false
false
781
r
#Data has been download into working directory first #Load the household data into R household_data <- read.csv("household_power_consumption.txt", header =TRUE, sep = ";") #subset of the data required for the graphs graph_data <- subset(household_data, household_data$Date=="1/2/2007" | household_data$Date =="2/...
library(shiny) phasefit<-function(CumulativeTime, Response){ CosTime<-cos(2*pi*CumulativeTime / 24) # Create two new predictor variables, CosTime and SinTime SinTime<-sin(2*pi*CumulativeTime / 24) lm1<-lm(Response ~ CosTime + SinTime) summary(lm1) # Response can be modelled as a linear...
/server.R
no_license
gtatters/CosinorFit
R
false
false
7,971
r
library(shiny) phasefit<-function(CumulativeTime, Response){ CosTime<-cos(2*pi*CumulativeTime / 24) # Create two new predictor variables, CosTime and SinTime SinTime<-sin(2*pi*CumulativeTime / 24) lm1<-lm(Response ~ CosTime + SinTime) summary(lm1) # Response can be modelled as a linear...
#################################################################################################### #' Function to order contigs within a single linkage group using a greedy algorithms #' Attempt to order contigs within #' @useDynLib contiBAIT #' @import Rcpp TSP # #' @param linkageGroupReadTable dataframe of strand...
/R/orderContigsGreedy.R
permissive
oneillkza/ContiBAIT
R
false
false
3,228
r
#################################################################################################### #' Function to order contigs within a single linkage group using a greedy algorithms #' Attempt to order contigs within #' @useDynLib contiBAIT #' @import Rcpp TSP # #' @param linkageGroupReadTable dataframe of strand...
library(readr) library(data.table) daten_moocall <- read_delim("Rohdaten/Rohdaten_10-Sep-2018_Faersen.csv", ";", escape_double = FALSE, trim_ws = TRUE) print_tables <- function(confusion_table) { table = epitools::epitable(c(sum(confusion_table$RP),sum(confusion_table$FP), su...
/alex/MooCall/Auswertung_Faersen.R
no_license
whllnd/studie
R
false
false
7,622
r
library(readr) library(data.table) daten_moocall <- read_delim("Rohdaten/Rohdaten_10-Sep-2018_Faersen.csv", ";", escape_double = FALSE, trim_ws = TRUE) print_tables <- function(confusion_table) { table = epitools::epitable(c(sum(confusion_table$RP),sum(confusion_table$FP), su...
\name{ READ } \alias{ READ } \docType{data} \title{ Rectum adenocarcinoma } \description{ A document describing the TCGA cancer code } \details{ \preformatted{ > experiments( READ ) ExperimentList class object of length 14: [1] READ_CNASeq-20160128: RaggedExperiment with 56380 rows and 70 columns [2] READ_CNASNP-2...
/man/READ.Rd
no_license
shawnspei/curatedTCGAData
R
false
false
5,654
rd
\name{ READ } \alias{ READ } \docType{data} \title{ Rectum adenocarcinoma } \description{ A document describing the TCGA cancer code } \details{ \preformatted{ > experiments( READ ) ExperimentList class object of length 14: [1] READ_CNASeq-20160128: RaggedExperiment with 56380 rows and 70 columns [2] READ_CNASNP-2...
# Function makeCacheMatrix and cacheSolve are used in combination. # makeCacheMatrix creates a cache object for a matrix and its inverse matrix. # Function cacheSolve takes a makeCacheMatrix object and computes the inverse of the cached matrix and store the result as a cache in the makeCacheMatrix object. # If there is...
/cachematrix.R
no_license
eov/ProgrammingAssignment2
R
false
false
1,944
r
# Function makeCacheMatrix and cacheSolve are used in combination. # makeCacheMatrix creates a cache object for a matrix and its inverse matrix. # Function cacheSolve takes a makeCacheMatrix object and computes the inverse of the cached matrix and store the result as a cache in the makeCacheMatrix object. # If there is...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-feature-selection.R \name{featsel_stepforward} \alias{featsel_stepforward} \title{Feature selection vis stepwise forward} \usage{ featsel_stepforward(model, ...) } \arguments{ \item{model}{model} \item{...}{Additional arguments for sta...
/man/featsel_stepforward.Rd
permissive
jbkunst/risk3r
R
false
true
502
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model-feature-selection.R \name{featsel_stepforward} \alias{featsel_stepforward} \title{Feature selection vis stepwise forward} \usage{ featsel_stepforward(model, ...) } \arguments{ \item{model}{model} \item{...}{Additional arguments for sta...
\name{CAAIlluminatedFraction_VenusMagnitudeAA} \alias{CAAIlluminatedFraction_VenusMagnitudeAA} \title{ CAAIlluminatedFraction_VenusMagnitudeAA } \description{ CAAIlluminatedFraction_VenusMagnitudeAA } \usage{ CAAIlluminatedFraction_VenusMagnitudeAA(r, Delta, i) } \arguments{ \item{r}{ r The planet's dist...
/man/CAAIlluminatedFraction_VenusMagnitudeAA.Rd
no_license
helixcn/skycalc
R
false
false
843
rd
\name{CAAIlluminatedFraction_VenusMagnitudeAA} \alias{CAAIlluminatedFraction_VenusMagnitudeAA} \title{ CAAIlluminatedFraction_VenusMagnitudeAA } \description{ CAAIlluminatedFraction_VenusMagnitudeAA } \usage{ CAAIlluminatedFraction_VenusMagnitudeAA(r, Delta, i) } \arguments{ \item{r}{ r The planet's dist...
#' Custom save to .csv function #' #' This function saves data.tables or data.frames as .csv in the root working directory or a specified subfolder. #' Additionally the current date is automatically included in the file name. #' #' @param file The data.table or data.frame to be saved. #' #' @param file_name Character s...
/R/save_csv_carl.R
no_license
cfbeuchel/CarlHelpR
R
false
false
3,635
r
#' Custom save to .csv function #' #' This function saves data.tables or data.frames as .csv in the root working directory or a specified subfolder. #' Additionally the current date is automatically included in the file name. #' #' @param file The data.table or data.frame to be saved. #' #' @param file_name Character s...
library(data.table) library(jsonlite) library(optparse) # make an options parsing list option_list = list( make_option(c("-u", "--user"), type="character", default=NULL, help="user_id", metavar="character") ); opt_parser = OptionParser(option_list=option_list); opt = parse_args(opt_parser); # get the arguments that...
/Lectures/9.Script_writing/Scripting_2_wacky_boost.R
no_license
sharonsunpeng/PSU_Stat_184
R
false
false
2,403
r
library(data.table) library(jsonlite) library(optparse) # make an options parsing list option_list = list( make_option(c("-u", "--user"), type="character", default=NULL, help="user_id", metavar="character") ); opt_parser = OptionParser(option_list=option_list); opt = parse_args(opt_parser); # get the arguments that...
output$pageStub <- renderUI( fluidPage(useShinyjs(),theme = shinytheme('superhero'), fluidRow( column( 7, offset = 1, h2("WHO IS MOST LIKELY TO LIVE? ") ) ), fluidRow ( id = "greyBox", align = "center",imageOutput("grey", click = "grey_click") ...
/GameofThrones/predictions.R
no_license
zembrodta/GOT
R
false
false
2,715
r
output$pageStub <- renderUI( fluidPage(useShinyjs(),theme = shinytheme('superhero'), fluidRow( column( 7, offset = 1, h2("WHO IS MOST LIKELY TO LIVE? ") ) ), fluidRow ( id = "greyBox", align = "center",imageOutput("grey", click = "grey_click") ...
rm(list=ls()) library(ggplot2) library(plyr) library(dplyr) library(moments) home_wd = "/Users/caraebrook/Documents/R/R_repositories/COVID-Ct-Madagascar/Mada-Ct-Distribute/" main_wd = paste0(home_wd, "/fig-plots/") setwd(main_wd) #Ct and distribution fits mada.df.tot <- read.csv("mada-ct-cross-gp.csv", header = TRU...
/fig-plots/Fig3-S7-S8-S9.R
no_license
carabrook/Mada-Ct-Distribute
R
false
false
12,197
r
rm(list=ls()) library(ggplot2) library(plyr) library(dplyr) library(moments) home_wd = "/Users/caraebrook/Documents/R/R_repositories/COVID-Ct-Madagascar/Mada-Ct-Distribute/" main_wd = paste0(home_wd, "/fig-plots/") setwd(main_wd) #Ct and distribution fits mada.df.tot <- read.csv("mada-ct-cross-gp.csv", header = TRU...
# Code used to create charts for 1.2 Grammar of Graphics # Not for distribution to students library(tidyverse) # Makes tidyverse accessible to this script baseball <- read_csv("/Users/mchapple/Desktop/baseball.csv") baseball <- baseball %>% gather(year, wins, -Team) %>% rename(team=Team) baseball$year <- as.inte...
/R/ggplot2 - LinkedIn Learning/1_2_examples.r
no_license
robbyjeffries1/DataSciencePortfolio
R
false
false
1,085
r
# Code used to create charts for 1.2 Grammar of Graphics # Not for distribution to students library(tidyverse) # Makes tidyverse accessible to this script baseball <- read_csv("/Users/mchapple/Desktop/baseball.csv") baseball <- baseball %>% gather(year, wins, -Team) %>% rename(team=Team) baseball$year <- as.inte...
library(ssvd) ### Name: ssvd ### Title: Sparse SVD ### Aliases: ssvd ### Keywords: sparse SVD iterative thresholding ### ** Examples ssvd(matrix(rnorm(2^15),2^7,2^8), method = "method")
/data/genthat_extracted_code/ssvd/examples/ssvd.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
193
r
library(ssvd) ### Name: ssvd ### Title: Sparse SVD ### Aliases: ssvd ### Keywords: sparse SVD iterative thresholding ### ** Examples ssvd(matrix(rnorm(2^15),2^7,2^8), method = "method")
# VideoData rm(list=ls()) setwd("~/Jasmine uni/Imperial/Winter project/") library(igraph) library(dplyr) library(plyr) ##HB=hidden badge, VB=visible badge #Read in RFID-fitted cage data from every aviary: total_interaction<- read.csv("~/Jasmine uni/Imperial/Winter project/total_interaction2.csv") data<-total_i...
/SNASimulations.R
no_license
j-somerville/MResEECWinter2018
R
false
false
8,019
r
# VideoData rm(list=ls()) setwd("~/Jasmine uni/Imperial/Winter project/") library(igraph) library(dplyr) library(plyr) ##HB=hidden badge, VB=visible badge #Read in RFID-fitted cage data from every aviary: total_interaction<- read.csv("~/Jasmine uni/Imperial/Winter project/total_interaction2.csv") data<-total_i...
#' Fast flight phase for the cube method modified #' #' @description #' #' implementation modified from the package sampling. #' #' @param X matrix of auxiliary variables. #' @param pik vector of inclusion probabilities. #' @param order order to rearrange the data. Default 1 #' @param comment bool, if comment should...
/R/fastflightcubeSPOT.R
no_license
RJauslin/SamplingC
R
false
false
3,933
r
#' Fast flight phase for the cube method modified #' #' @description #' #' implementation modified from the package sampling. #' #' @param X matrix of auxiliary variables. #' @param pik vector of inclusion probabilities. #' @param order order to rearrange the data. Default 1 #' @param comment bool, if comment should...
library(magrittr) library(purrr) library(dplyr) library(ggplot2) semilla = 800 # base descargada de # https://www.kaggle.com/aljarah/xAPI-Edu-Data # notas para la clase ----------------------------------------------------- # leer documentacion de como parte arbol y RF las numericas y las categoricas # leer ISLR de...
/clases_full/05-arboles_full.r
no_license
ftvalentini/curso-CepalR2019
R
false
false
8,162
r
library(magrittr) library(purrr) library(dplyr) library(ggplot2) semilla = 800 # base descargada de # https://www.kaggle.com/aljarah/xAPI-Edu-Data # notas para la clase ----------------------------------------------------- # leer documentacion de como parte arbol y RF las numericas y las categoricas # leer ISLR de...
#' @title Declare a target. #' @export #' @description A target is a single step of computation in a pipeline. #' It runs an R command and returns a value. #' This value gets treated as an R object that can be used #' by the commands of targets downstream. Targets that #' are already up to date are skipped. See...
/R/tar_target.R
permissive
tjmahr/targets
R
false
false
13,123
r
#' @title Declare a target. #' @export #' @description A target is a single step of computation in a pipeline. #' It runs an R command and returns a value. #' This value gets treated as an R object that can be used #' by the commands of targets downstream. Targets that #' are already up to date are skipped. See...
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) library(ggplot2) buoydata <- read.csv('data/FormattedBuoyData.csv') buoydata$DateTime <- as.Date(buoydata$DateTime,format="%m/%d/%Y") ...
/ExampleWaterQualityApp/server.R
no_license
UtahHydroinformatics/ExampleWQAppSolution
R
false
false
1,355
r
# This is the server logic for a Shiny web application. # You can find out more about building applications with Shiny here: # # http://shiny.rstudio.com # library(shiny) library(ggplot2) buoydata <- read.csv('data/FormattedBuoyData.csv') buoydata$DateTime <- as.Date(buoydata$DateTime,format="%m/%d/%Y") ...
## ----echo = FALSE------------------------------------------------------------- knitr::opts_chunk$set(collapse = TRUE, warning = FALSE, comment = "#>") suppressPackageStartupMessages(library(sjmisc)) ## ----message=FALSE------------------------------------------------------------ library(sjmisc) data(efc) ##...
/packrat/lib/x86_64-apple-darwin19.4.0/4.0.4/sjmisc/doc/recodingvariables.R
no_license
marilotte/Pregancy_Relapse_Count_Simulation
R
false
false
3,869
r
## ----echo = FALSE------------------------------------------------------------- knitr::opts_chunk$set(collapse = TRUE, warning = FALSE, comment = "#>") suppressPackageStartupMessages(library(sjmisc)) ## ----message=FALSE------------------------------------------------------------ library(sjmisc) data(efc) ##...
## ## hierstrauss.R ## ## $Revision: 1.4 $ $Date: 2015/01/08 07:34:30 $ ## ## The hierarchical Strauss process ## ## HierStrauss() create an instance of the hierarchical Strauss process ## [an object of class 'interact'] ## ## -------------------------------------------------------------...
/R/hierstrauss.R
no_license
jmetz/spatstat
R
false
false
9,511
r
## ## hierstrauss.R ## ## $Revision: 1.4 $ $Date: 2015/01/08 07:34:30 $ ## ## The hierarchical Strauss process ## ## HierStrauss() create an instance of the hierarchical Strauss process ## [an object of class 'interact'] ## ## -------------------------------------------------------------...
sqndwdecomp <- function (x, J, filter.number, family) { lx <- length(x) ans <- matrix(0, nrow = J, ncol = length(x)) dw <- hwwn.dw(J, filter.number, family) longest.support <- length(dw[[J]]) scale.shift <- 0 for (j in 1:J) { l <- length(dw[[j]]) init <- (filter.number - 1) * (l...
/R/sqndwdecomp.R
no_license
cran/hwwntest
R
false
false
720
r
sqndwdecomp <- function (x, J, filter.number, family) { lx <- length(x) ans <- matrix(0, nrow = J, ncol = length(x)) dw <- hwwn.dw(J, filter.number, family) longest.support <- length(dw[[J]]) scale.shift <- 0 for (j in 1:J) { l <- length(dw[[j]]) init <- (filter.number - 1) * (l...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{plot_branches_method1} \alias{plot_branches_method1} \title{Plot a tree with branches colored according to molecular data, method 1} \usage{ plot_branches_method1( x, tip_label = "otu", drop_outgroup = TRUE, ladderize_tr...
/man/plot_branches_method1.Rd
no_license
McTavishLab/physcraperex
R
false
true
864
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{plot_branches_method1} \alias{plot_branches_method1} \title{Plot a tree with branches colored according to molecular data, method 1} \usage{ plot_branches_method1( x, tip_label = "otu", drop_outgroup = TRUE, ladderize_tr...
At the end of the dada2 tutorial (http://benjjneb.github.io/dada2/tutorial.html), you end up with chimera removed variant tables which can be saved as .rds, piped directly into phyloseq, or converted into biom tables for qiime. In the scripts below, I'm saving one of my libraries as seqtabG_nochim.rds(1). In the nex...
/scripts/create_otu.R
permissive
megaptera-helvetiae/SalmoTruttaVals
R
false
false
2,077
r
At the end of the dada2 tutorial (http://benjjneb.github.io/dada2/tutorial.html), you end up with chimera removed variant tables which can be saved as .rds, piped directly into phyloseq, or converted into biom tables for qiime. In the scripts below, I'm saving one of my libraries as seqtabG_nochim.rds(1). In the nex...
# Copyright 2019 Battelle Memorial Institute; see the LICENSE file. #' module_socio_L180.GDP_macro #' #' National accounts information for GDP macro. #' #' @param command API command to execute #' @param ... other optional parameters, depending on command #' @return Depends on \code{command}: either a vector of requir...
/input/gcamdata/R/zsocio_L180.GDP_macro.R
permissive
JGCRI/gcam-core
R
false
false
15,661
r
# Copyright 2019 Battelle Memorial Institute; see the LICENSE file. #' module_socio_L180.GDP_macro #' #' National accounts information for GDP macro. #' #' @param command API command to execute #' @param ... other optional parameters, depending on command #' @return Depends on \code{command}: either a vector of requir...
#'A dataset containing NO2 data for 2010 #' #'This dataset contains smoothed NO2 data from March to September 2010 #' #'@format An array of 4 x 179 x 360 dimensions. #'\describe{ #' \item{Dimension 1}{Each \code{NO2_2010[t, , ]} contains NO2 data for a given month with \code{t=1} corresponding to March and \code{t=7} ...
/R/NO2_2010-data.R
permissive
battyone/eventstream
R
false
false
567
r
#'A dataset containing NO2 data for 2010 #' #'This dataset contains smoothed NO2 data from March to September 2010 #' #'@format An array of 4 x 179 x 360 dimensions. #'\describe{ #' \item{Dimension 1}{Each \code{NO2_2010[t, , ]} contains NO2 data for a given month with \code{t=1} corresponding to March and \code{t=7} ...
## ----setup, include=FALSE------------------------------------------------ require(knitr) knitr::opts_chunk$set(echo = TRUE) library(mvITR) ## ----Generate data set, results='markup', echo=TRUE---------------------- set.seed(123) dat <- generateData(n = 1000) str(dat) ## ----Summary plots, results='mar...
/inst/doc/mvITR-vignette.R
no_license
kdoub5ha/mvITR
R
false
false
4,758
r
## ----setup, include=FALSE------------------------------------------------ require(knitr) knitr::opts_chunk$set(echo = TRUE) library(mvITR) ## ----Generate data set, results='markup', echo=TRUE---------------------- set.seed(123) dat <- generateData(n = 1000) str(dat) ## ----Summary plots, results='mar...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Case1.r \docType{data} \name{Case1} \alias{Case1} \title{Virtual dataset Case 1} \format{ A data frame with 1200 rows and 30 variables: \describe{ \item{SR_ 0.1}{Empty column denoting the start of the record sampled at a sampling resolution o...
/man/Case1.Rd
no_license
cran/seasonalclumped
R
false
true
3,180
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Case1.r \docType{data} \name{Case1} \alias{Case1} \title{Virtual dataset Case 1} \format{ A data frame with 1200 rows and 30 variables: \describe{ \item{SR_ 0.1}{Empty column denoting the start of the record sampled at a sampling resolution o...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/partydf.R \name{partition} \alias{partition} \title{Partition data across workers in a cluster} \usage{ partition(data, cluster) } \arguments{ \item{data}{Dataset to partition, typically grouped. When grouped, all observations in a ...
/multidplyr/man/partition.Rd
permissive
yp1227/Multiplier
R
false
true
984
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/partydf.R \name{partition} \alias{partition} \title{Partition data across workers in a cluster} \usage{ partition(data, cluster) } \arguments{ \item{data}{Dataset to partition, typically grouped. When grouped, all observations in a ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/transfer_coda.R \name{clrvar2phi} \alias{clrvar2phi} \title{Calculate Phi Statistics (Proportionality) from CLR Covariances} \usage{ clrvar2phi(Sigma) } \arguments{ \item{Sigma}{Covariance matrix Px(PN) where N is number of covariance matric...
/man/clrvar2phi.Rd
no_license
jsilve24/RcppCoDA
R
false
true
752
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/transfer_coda.R \name{clrvar2phi} \alias{clrvar2phi} \title{Calculate Phi Statistics (Proportionality) from CLR Covariances} \usage{ clrvar2phi(Sigma) } \arguments{ \item{Sigma}{Covariance matrix Px(PN) where N is number of covariance matric...
# Congratulations on learning GitHub! # Make any edits you like here: jbkku j
/practicescript.R
no_license
garciajj/github-intro-2
R
false
false
80
r
# Congratulations on learning GitHub! # Make any edits you like here: jbkku j
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/boynton.R \name{show_boynton} \alias{show_boynton} \title{Show the colors in a palette view} \usage{ show_boynton() } \description{ Show the colors in a palette view }
/man/show_boynton.Rd
no_license
btupper/catecolors
R
false
false
255
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/boynton.R \name{show_boynton} \alias{show_boynton} \title{Show the colors in a palette view} \usage{ show_boynton() } \description{ Show the colors in a palette view }
#------------------------------------------------------------------------------# # Replication of Brookhart M.A. et al. (2006) # Variable Selection for Propensity Score Models. # American Journal of Epidemiology, 163(12), 1149–1156. # # Replicator: K Luijken # Co-pilot: B B L Penning de Vries # # Helper function to est...
/Replication.Brookhart.2006/R/estimate_effect_quintiles.R
permissive
replisims/Brookhart_MA-2006
R
false
false
2,352
r
#------------------------------------------------------------------------------# # Replication of Brookhart M.A. et al. (2006) # Variable Selection for Propensity Score Models. # American Journal of Epidemiology, 163(12), 1149–1156. # # Replicator: K Luijken # Co-pilot: B B L Penning de Vries # # Helper function to est...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rls_update.R \name{rls_update} \alias{rls_update} \title{Updates the model fits} \usage{ rls_update(model, datatr = NA, y = NA, runcpp = TRUE) } \arguments{ \item{model}{A model object} \item{datatr}{a data.list with transformed data (from m...
/onlineforecast/man/rls_update.Rd
no_license
akhikolla/updatedatatype-list2
R
false
true
1,073
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rls_update.R \name{rls_update} \alias{rls_update} \title{Updates the model fits} \usage{ rls_update(model, datatr = NA, y = NA, runcpp = TRUE) } \arguments{ \item{model}{A model object} \item{datatr}{a data.list with transformed data (from m...
pollutantmean <- function(directory, pollutant, id = 1:332){ data <- NA result <- 0 # the id vector is a reference to the monitor data we need to read. # read in the monitors specified by the callee files = file.path(directory, paste0(formatC(id, width=3, format="d", flag="0"), ".csv")) # print...
/Week2/pollutantmean.R
no_license
XAGV1YBGAdk34WDPVVLn/datasciencecoursera
R
false
false
869
r
pollutantmean <- function(directory, pollutant, id = 1:332){ data <- NA result <- 0 # the id vector is a reference to the monitor data we need to read. # read in the monitors specified by the callee files = file.path(directory, paste0(formatC(id, width=3, format="d", flag="0"), ".csv")) # print...
#!/usr/bin/env Rscript library(TitanCNA) version <- "0.1.2" args <- commandArgs(TRUE) tumWig <- args[1] normWig <- args[2] gc <- args[3] map <- args[4] target_list <- args[5] outfile <- args[6] genometype <- args[7] message('titan: Correcting GC content and mappability biases...') if( target_list!="NULL" ){ targ...
/dockerfiles/titan/correctReads.R
no_license
shahcompbio/wgspipeline_docker_containers
R
false
false
712
r
#!/usr/bin/env Rscript library(TitanCNA) version <- "0.1.2" args <- commandArgs(TRUE) tumWig <- args[1] normWig <- args[2] gc <- args[3] map <- args[4] target_list <- args[5] outfile <- args[6] genometype <- args[7] message('titan: Correcting GC content and mappability biases...') if( target_list!="NULL" ){ targ...
####################################################################### # Mike Safar - CorpusSummary # ---------------------------------------------- # Copyright (C) 2018. All Rights Reserved. ######################################################################## library(R6) library(logging) library(tm) library(s...
/corpusSummary.R
no_license
mikesafar/signal-boost
R
false
false
9,808
r
####################################################################### # Mike Safar - CorpusSummary # ---------------------------------------------- # Copyright (C) 2018. All Rights Reserved. ######################################################################## library(R6) library(logging) library(tm) library(s...
library(ISLR) library(tidyverse) library(caret) library(keras) library(neuralnet) library(Hmisc) data = read.csv("Datos.csv") %>% filter(G3 != 0) data_nn= data %>% dplyr::select(,c("G2","G1","age","studytime","failures", "G3","traveltime","absences"))#,"Medu", #"Fedu","famre...
/NNSCRIP.R
no_license
stuarstuar/modelospredictivos2
R
false
false
1,402
r
library(ISLR) library(tidyverse) library(caret) library(keras) library(neuralnet) library(Hmisc) data = read.csv("Datos.csv") %>% filter(G3 != 0) data_nn= data %>% dplyr::select(,c("G2","G1","age","studytime","failures", "G3","traveltime","absences"))#,"Medu", #"Fedu","famre...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/antsImageIterator_class.R \name{antsImageIteratorIsAtEnd} \alias{antsImageIteratorIsAtEnd} \title{antsImageIteratorIsAtEnd} \usage{ antsImageIteratorIsAtEnd(x) } \arguments{ \item{x}{antsImageIterator} } \value{ boolean indicating position } ...
/man/antsImageIteratorIsAtEnd.Rd
permissive
alainlompo/ANTsR
R
false
true
525
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/antsImageIterator_class.R \name{antsImageIteratorIsAtEnd} \alias{antsImageIteratorIsAtEnd} \title{antsImageIteratorIsAtEnd} \usage{ antsImageIteratorIsAtEnd(x) } \arguments{ \item{x}{antsImageIterator} } \value{ boolean indicating position } ...
library(plotrix) library(cowplot) library(gridGraphics) space = seq(0, 1, 0.1) star = 0.8 * space + 0.1 circle = -0.8 * space + 0.9 d1 = data.frame(space = c(space, space), fitness = c(star, circle), type = c(rep("star", length(star)), rep("circle", length(circle)...
/Figure1.R
no_license
singhal/hz_metaanalysis
R
false
false
3,225
r
library(plotrix) library(cowplot) library(gridGraphics) space = seq(0, 1, 0.1) star = 0.8 * space + 0.1 circle = -0.8 * space + 0.9 d1 = data.frame(space = c(space, space), fitness = c(star, circle), type = c(rep("star", length(star)), rep("circle", length(circle)...
library(testthat) suppressPackageStartupMessages(library(sluRm)) test_check("sluRm")
/tests/testthat.R
permissive
pmarjora/sluRm
R
false
false
87
r
library(testthat) suppressPackageStartupMessages(library(sluRm)) test_check("sluRm")
make_type <- function(x) { if (is.null(x)) { return() } if (substr(x, 1, 1) == ".") { x <- mime::guess_type(x, empty = NULL) } list(`Content-Type` = x) } # adapted from https://github.com/hadley/httr raw_body <- function(body, type = NULL) { if (is.character(body)) { body <- charToRaw(paste(bo...
/R/body.R
permissive
dickoa/crul
R
false
false
2,217
r
make_type <- function(x) { if (is.null(x)) { return() } if (substr(x, 1, 1) == ".") { x <- mime::guess_type(x, empty = NULL) } list(`Content-Type` = x) } # adapted from https://github.com/hadley/httr raw_body <- function(body, type = NULL) { if (is.character(body)) { body <- charToRaw(paste(bo...
library(lme4) library(data.table) cd52.expr=read.table('cd52.txt') cd52.covs=fread('cd52.covs.txt', sep=',',header=T) #lets put all of our variables in here df=data.frame(cd52.covs, cd52=cd52.expr) #just get the monocytes for now, and just SLE df.use=df[intersect(grep('CD14', df$ct_cov), which(df$disease_cov=='sle')...
/scQTL.R
no_license
yelabucsf/sceQTL
R
false
false
1,903
r
library(lme4) library(data.table) cd52.expr=read.table('cd52.txt') cd52.covs=fread('cd52.covs.txt', sep=',',header=T) #lets put all of our variables in here df=data.frame(cd52.covs, cd52=cd52.expr) #just get the monocytes for now, and just SLE df.use=df[intersect(grep('CD14', df$ct_cov), which(df$disease_cov=='sle')...
getVal <- function(x, vars = "both"){ #' Get the vector of Kc/c values from the chaos01.res object. #' #' This function allows easy extraction of Kc/c values from the chaos01.res object. #' @param x the object of "chaos01.res" class, produced by testChaos01 function when parameter out = "TRUE". Subset the outp...
/R/getval.R
no_license
cran/Chaos01
R
false
false
1,770
r
getVal <- function(x, vars = "both"){ #' Get the vector of Kc/c values from the chaos01.res object. #' #' This function allows easy extraction of Kc/c values from the chaos01.res object. #' @param x the object of "chaos01.res" class, produced by testChaos01 function when parameter out = "TRUE". Subset the outp...
path <- "~/Desktop/PhD/GitKraken/gmse_fork_RQ1/batch6-perfObs/" setwd(dir = path) # get the directory content content <- dir() # order alphabetically content <- content[order(content)] #### sim results #### # initialize a table with the UT0 at0 <- grep(pattern = c("UT0pt0-"), x = content, fixed = T, value = T) at0...
/merge-results.R
no_license
AdrianBach/gmse
R
false
false
4,133
r
path <- "~/Desktop/PhD/GitKraken/gmse_fork_RQ1/batch6-perfObs/" setwd(dir = path) # get the directory content content <- dir() # order alphabetically content <- content[order(content)] #### sim results #### # initialize a table with the UT0 at0 <- grep(pattern = c("UT0pt0-"), x = content, fixed = T, value = T) at0...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/function.R \name{distr} \alias{distr} \title{Length distribution} \usage{ distr(mu, sigma, l, par = data.frame()) } \arguments{ \item{mu}{mean length for all ages} \item{sigma}{standard deviation of length for all ages} \item{l}{len...
/man/distr.Rd
no_license
milokmilo/rgadget
R
false
false
558
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/function.R \name{distr} \alias{distr} \title{Length distribution} \usage{ distr(mu, sigma, l, par = data.frame()) } \arguments{ \item{mu}{mean length for all ages} \item{sigma}{standard deviation of length for all ages} \item{l}{len...
#' Bayes Factor Calculation Scheme for META prior #' #' A function that calculates bayes factor for each data pair on each grid point #' in log scale. #' #' @param data A dataset which is constructed by pairs of coefficient #' values \eqn{ \beta } and standard errors \eqn{ se(\beta)}. #' @param hyperparam A two...
/R/bf.cal.meta.R
no_license
cran/INTRIGUE
R
false
false
2,634
r
#' Bayes Factor Calculation Scheme for META prior #' #' A function that calculates bayes factor for each data pair on each grid point #' in log scale. #' #' @param data A dataset which is constructed by pairs of coefficient #' values \eqn{ \beta } and standard errors \eqn{ se(\beta)}. #' @param hyperparam A two...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/parameterEstimation.R \name{Cvb} \alias{Cvb} \title{Cvb function} \usage{ Cvb(xyt, spatial.intensity, N = 100, spatial.covmodel, covpars) } \arguments{ \item{xyt}{object of class stppp} \item{spatial.intensity}{bivariate density esti...
/man/Cvb.Rd
no_license
bentaylor1/lgcp
R
false
false
1,256
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/parameterEstimation.R \name{Cvb} \alias{Cvb} \title{Cvb function} \usage{ Cvb(xyt, spatial.intensity, N = 100, spatial.covmodel, covpars) } \arguments{ \item{xyt}{object of class stppp} \item{spatial.intensity}{bivariate density esti...
# List of sample names to combine each person's sequencing for CAZyme analysis map <- read.delim(file = "~/Documents/Projects/dietstudy/data/maps/SampleID_map.txt") map$X.SampleID <- gsub("\\.", "_", map$X.SampleID) run1names <- read.delim(file = "~/Documents/Projects/dietstudy/data/run1names.txt", header = F, col.na...
/lib/processing_scripts/sequencingrunnames.R
no_license
knights-lab/dietstudy_analyses
R
false
false
1,460
r
# List of sample names to combine each person's sequencing for CAZyme analysis map <- read.delim(file = "~/Documents/Projects/dietstudy/data/maps/SampleID_map.txt") map$X.SampleID <- gsub("\\.", "_", map$X.SampleID) run1names <- read.delim(file = "~/Documents/Projects/dietstudy/data/run1names.txt", header = F, col.na...
# plot of all 2017 balls and strikes library(dplyr) library(tibble) library(ggplot2) #pitches <- as_data_frame(readRDS("pitches2017.Rda")) # Rule book zone: up/down pz's have been normalized to go from # 1.5 to 3.5. Width of baseball is 0.245 feet, so we add 1/2 of # a baseball's width to each edge. Width of plate is ...
/figures/ball_strike_cloud.R
no_license
djhunter/inconsistency
R
false
false
3,485
r
# plot of all 2017 balls and strikes library(dplyr) library(tibble) library(ggplot2) #pitches <- as_data_frame(readRDS("pitches2017.Rda")) # Rule book zone: up/down pz's have been normalized to go from # 1.5 to 3.5. Width of baseball is 0.245 feet, so we add 1/2 of # a baseball's width to each edge. Width of plate is ...
raw.data = file.choose() Vigilance.Calc.Block.Function = function(dataset,binsize){ acc.start = 15 omission.start = 65 total.bins = 50 / binsize new.data = as.data.frame(matrix(nrow=nrow(dataset),ncol=(total.bins * 2))) bin.num = 1 for(a in 1:total.bins){ acc.col = a colnames(new.data)[ac...
/Chris Vigilance.R
no_license
dpalmer9/Weston_QC_Processor
R
false
false
2,117
r
raw.data = file.choose() Vigilance.Calc.Block.Function = function(dataset,binsize){ acc.start = 15 omission.start = 65 total.bins = 50 / binsize new.data = as.data.frame(matrix(nrow=nrow(dataset),ncol=(total.bins * 2))) bin.num = 1 for(a in 1:total.bins){ acc.col = a colnames(new.data)[ac...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xls-find.R \name{xls_find} \alias{xls_find} \title{Find the pair of Excel files from a automatic weather station} \usage{ xls_find(file.name, verbose = TRUE) } \arguments{ \item{file.name}{character vector with paths to Excel files; in genera...
/man/xls_find.Rd
permissive
lhmet/rinmetxls
R
false
true
958
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xls-find.R \name{xls_find} \alias{xls_find} \title{Find the pair of Excel files from a automatic weather station} \usage{ xls_find(file.name, verbose = TRUE) } \arguments{ \item{file.name}{character vector with paths to Excel files; in genera...
\name{runShiny} \alias{runShiny} \title{ Run Shiny Web interface } \description{ Web interface for univariate, bivariate and multivariate breakeven analysis } \usage{ runShiny(...,name="shiny_perctolimit") } \arguments{ \item{\dots}{ Arguments to pass to \code{\link{runApp}} } \item{name}{ User interface to...
/man/runShiny.Rd
no_license
josephguillaume/cost_benefit_breakeven
R
false
false
550
rd
\name{runShiny} \alias{runShiny} \title{ Run Shiny Web interface } \description{ Web interface for univariate, bivariate and multivariate breakeven analysis } \usage{ runShiny(...,name="shiny_perctolimit") } \arguments{ \item{\dots}{ Arguments to pass to \code{\link{runApp}} } \item{name}{ User interface to...
# Install Requried Packages installed.packages("SnowballC") installed.packages("tm") installed.packages("twitteR") installed.packages("syuzhet") # Load Requried Packages library("SnowballC") library("tm") library("twitteR") library("syuzhet") library(data.table) data_republicans <- fread("C:/Users/uia91182/Desktop...
/scripts/wordseperation_republicans.R
no_license
sakethg/Sentiment-Analysis-on-political-twitter-data
R
false
false
2,836
r
# Install Requried Packages installed.packages("SnowballC") installed.packages("tm") installed.packages("twitteR") installed.packages("syuzhet") # Load Requried Packages library("SnowballC") library("tm") library("twitteR") library("syuzhet") library(data.table) data_republicans <- fread("C:/Users/uia91182/Desktop...
#Load library library(plyr) url<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" file <- "dataset.zip" baseDir <-"UCI HAR Dataset" # Download the files if required if(!file.exists(file)){ download.file(url, file, method="curl") unzip(file, list = FALSE, overwrite = TRUE...
/course-project/run_analysis.R
no_license
senthil69/datasciencecoursera
R
false
false
2,402
r
#Load library library(plyr) url<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" file <- "dataset.zip" baseDir <-"UCI HAR Dataset" # Download the files if required if(!file.exists(file)){ download.file(url, file, method="curl") unzip(file, list = FALSE, overwrite = TRUE...
/Practica 8/ref_reto1.R
no_license
DavidM0413/Simulacion_Sistemas
R
false
false
3,625
r
#' Power Generation #' #' This function computes instantaneous power generation #’ from a reservoir given its height and flow rate into turbines #' @param rho Density of water (kg/m3) Default is 1000 #' @param g Acceleration due to gravity (m/sec2) Default is 9.8 #' @param Kefficiency Turbine Efficiency (0-1) Default i...
/power_gen.R
no_license
tcobian/ESM_232
R
false
false
649
r
#' Power Generation #' #' This function computes instantaneous power generation #’ from a reservoir given its height and flow rate into turbines #' @param rho Density of water (kg/m3) Default is 1000 #' @param g Acceleration due to gravity (m/sec2) Default is 9.8 #' @param Kefficiency Turbine Efficiency (0-1) Default i...
#NAOC 2020 count data workshop distance probability distribution lesson #By Evan Adams and Beth Ross ########################################################### #Not a lot of code here, just showing how we created the distributions shown in the presentation #coin flipping hist(rbinom(10, 1, 0.5)) #proba...
/lessons/probability_distribution_lesson_code.R
no_license
dubrewer92/NAOC2020-Count-Data-Workshop
R
false
false
1,171
r
#NAOC 2020 count data workshop distance probability distribution lesson #By Evan Adams and Beth Ross ########################################################### #Not a lot of code here, just showing how we created the distributions shown in the presentation #coin flipping hist(rbinom(10, 1, 0.5)) #proba...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clustering.R \name{cluster_pathways} \alias{cluster_pathways} \title{Cluster Pathways} \usage{ cluster_pathways(enrichment_res, method = "hierarchical", kappa_threshold = 0.35, plot_clusters_graph = TRUE, use_names = FALSE, use_active_snw...
/man/cluster_pathways.Rd
no_license
KUNJU-PITT/pathfindR
R
false
true
2,311
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/clustering.R \name{cluster_pathways} \alias{cluster_pathways} \title{Cluster Pathways} \usage{ cluster_pathways(enrichment_res, method = "hierarchical", kappa_threshold = 0.35, plot_clusters_graph = TRUE, use_names = FALSE, use_active_snw...
# Read in data library(data.table) data_train <- fread("data/train.csv") data_test <- fread("data/test.csv") ##### Preprocess ## For imputation, stack predictors in training and test together allPred <- rbindlist(list(data_train,data_test),use.names=TRUE,fill=TRUE,idcol = "Source") ol.mask <- allPred$Fare==0|allPred...
/titanic2.R
no_license
chelsyx/titanic_kaggle
R
false
false
5,741
r
# Read in data library(data.table) data_train <- fread("data/train.csv") data_test <- fread("data/test.csv") ##### Preprocess ## For imputation, stack predictors in training and test together allPred <- rbindlist(list(data_train,data_test),use.names=TRUE,fill=TRUE,idcol = "Source") ol.mask <- allPred$Fare==0|allPred...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readmsb.R \name{ms2bed} \alias{ms2bed} \title{Import the output of the \code{ms} program in a \code{BED} object} \usage{ ms2bed(fname) } \arguments{ \item{fname}{the name of the text file containing \code{ms} output} } \value{ a bed object } ...
/man/ms2bed.Rd
no_license
plantarum/hierfstat
R
false
true
489
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readmsb.R \name{ms2bed} \alias{ms2bed} \title{Import the output of the \code{ms} program in a \code{BED} object} \usage{ ms2bed(fname) } \arguments{ \item{fname}{the name of the text file containing \code{ms} output} } \value{ a bed object } ...
setwd('~/Downloads/battleship/data_visualization') # model 1 basic_model1 = read.csv('../results/basic_test_model1.csv') b_model1_BT = subset(basic_model1, `propagation.type` == 'BT') b_model1_FC = subset(basic_model1, `propagation.type` == 'FC') b_model1_GAC = subset(basic_model1, `propagation.type` == 'GAC') b_mode...
/data_visualization/PD_board_size_basic.R
no_license
pyliaorachel/battleship-ai
R
false
false
4,045
r
setwd('~/Downloads/battleship/data_visualization') # model 1 basic_model1 = read.csv('../results/basic_test_model1.csv') b_model1_BT = subset(basic_model1, `propagation.type` == 'BT') b_model1_FC = subset(basic_model1, `propagation.type` == 'FC') b_model1_GAC = subset(basic_model1, `propagation.type` == 'GAC') b_mode...
while(TRUE){ print('Hello') # use print inside loops } counter <- 1 while(counter < 12){ print(counter) counter <- counter + 1 # counter++ does not work } # Iterate i from 1 to 5 for(i in 1:5){ print("Hello R") } # Prints Hello 6 times for(i in 5:10){ print("Hello R") }
/loops.R
no_license
rhymermj/R-practice
R
false
false
298
r
while(TRUE){ print('Hello') # use print inside loops } counter <- 1 while(counter < 12){ print(counter) counter <- counter + 1 # counter++ does not work } # Iterate i from 1 to 5 for(i in 1:5){ print("Hello R") } # Prints Hello 6 times for(i in 5:10){ print("Hello R") }
networkER <- function(p.){ # Input : p. - total dim # Output : a matrix with Erdos-Renyi structure A <- matrix(0,p.,p.) for (i in 1:p.){ for (j in 1:p.) A[i,j] <- ifelse(rbinom(1, size=1, 0.3), ifelse(rbinom(1, size=1, 0.5), runif(1, min ...
/networks.R
no_license
DeniseYi/Assisted_Differential_Network
R
false
false
4,313
r
networkER <- function(p.){ # Input : p. - total dim # Output : a matrix with Erdos-Renyi structure A <- matrix(0,p.,p.) for (i in 1:p.){ for (j in 1:p.) A[i,j] <- ifelse(rbinom(1, size=1, 0.3), ifelse(rbinom(1, size=1, 0.5), runif(1, min ...
setMethod("initialize", signature(.Object="BeadStudioSetList"), function(.Object, assayDataList=AssayDataList(baf=baf, lrr=lrr), lrr=list(), baf=lapply(lrr, function(x) matrix(nrow=nrow(x), ncol=ncol(x))), featureDataList=GenomeAnnotatedDataFrameFrom(assayDataList, annotation, genome), chrom...
/R/methods-BeadStudioSetList.R
no_license
benilton/oligoClasses
R
false
false
7,111
r
setMethod("initialize", signature(.Object="BeadStudioSetList"), function(.Object, assayDataList=AssayDataList(baf=baf, lrr=lrr), lrr=list(), baf=lapply(lrr, function(x) matrix(nrow=nrow(x), ncol=ncol(x))), featureDataList=GenomeAnnotatedDataFrameFrom(assayDataList, annotation, genome), chrom...
\name{Principal coordinate analysis using the Jensen-Shannon divergence} \alias{esov.mds} \title{ Principal coordinate analysis using the Jensen-Shannon divergence } \description{ Principal coordinate analysis using the Jensen-Shannon divergence. } \usage{ esov.mds(x, k = 2, eig = TRUE) } \arguments{ ...
/man/esov.mds.Rd
no_license
cran/Compositional
R
false
false
1,740
rd
\name{Principal coordinate analysis using the Jensen-Shannon divergence} \alias{esov.mds} \title{ Principal coordinate analysis using the Jensen-Shannon divergence } \description{ Principal coordinate analysis using the Jensen-Shannon divergence. } \usage{ esov.mds(x, k = 2, eig = TRUE) } \arguments{ ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/explorePatentData.R \name{summarizeColumns} \alias{summarizeColumns} \title{Summarize columns of a data frame} \usage{ summarizeColumns(df, names, naOmit = FALSE) } \arguments{ \item{df}{A data frame of patent data.} \item{names}{a character...
/man/summarizeColumns.Rd
no_license
lupok2001/patentr
R
false
true
1,640
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/explorePatentData.R \name{summarizeColumns} \alias{summarizeColumns} \title{Summarize columns of a data frame} \usage{ summarizeColumns(df, names, naOmit = FALSE) } \arguments{ \item{df}{A data frame of patent data.} \item{names}{a character...
## Processing torpor data from 2015 field season to incorporate with previous torpor data ## Anusha Shankar ## Started February 22, 2016 ##Packages library(ggplot2) library(reshape) library(gridExtra) library(grid) library(wq) library(gam) library(foreign) library(MASS) library(devtools) require(dplyr) #library(plotfl...
/Torpor1415/Torpor2015.R
no_license
nushiamme/AShankar_hummers
R
false
false
27,199
r
## Processing torpor data from 2015 field season to incorporate with previous torpor data ## Anusha Shankar ## Started February 22, 2016 ##Packages library(ggplot2) library(reshape) library(gridExtra) library(grid) library(wq) library(gam) library(foreign) library(MASS) library(devtools) require(dplyr) #library(plotfl...
### 0. preparation for the data cleaning # call libraries library(dplyr) library(plyr) library(reshape2) # download row data fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip " download.file(fileURL, "rowdata.zip", method="curl") # unzip row data unzip("rowdata.zip...
/Course 3 - Getting and Cleaning Data/Course 3 - Assignments/run_analysis.R
no_license
buihongthu/datasciencespecialization
R
false
false
2,535
r
### 0. preparation for the data cleaning # call libraries library(dplyr) library(plyr) library(reshape2) # download row data fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip " download.file(fileURL, "rowdata.zip", method="curl") # unzip row data unzip("rowdata.zip...
# # # context("Test that all null model methods work") # Here we just run the code to check that it works test_that("All null model methods work", { # We need to increase the max number of iterations otherwise warnings are produced options(spatialwarnings.constants.maxit = 10^(8.5)) options(spatialwarni...
/tests/testthat/test-nullfun.R
permissive
spatial-ews/spatialwarnings
R
false
false
11,173
r
# # # context("Test that all null model methods work") # Here we just run the code to check that it works test_that("All null model methods work", { # We need to increase the max number of iterations otherwise warnings are produced options(spatialwarnings.constants.maxit = 10^(8.5)) options(spatialwarni...
# EXERCISE: K-Means Clustering Example iris_tbl <- copy_to(sc, iris, "iris", overwrite = TRUE) kmeans_model <- iris_tbl %>% ml_kmeans(k = 3, features = c("Petal_Length", "Petal_Width")) print(kmeans_model) # Predict associated class predicted <- ml_predict(kmeans_model, iris_tbl) %>% collect table(predicted$Spe...
/reference/modeling-exercises.R
no_license
BB1464/wsds_sparklyr_workshop
R
false
false
1,044
r
# EXERCISE: K-Means Clustering Example iris_tbl <- copy_to(sc, iris, "iris", overwrite = TRUE) kmeans_model <- iris_tbl %>% ml_kmeans(k = 3, features = c("Petal_Length", "Petal_Width")) print(kmeans_model) # Predict associated class predicted <- ml_predict(kmeans_model, iris_tbl) %>% collect table(predicted$Spe...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
/r/tests/testthat/test-Array.R
permissive
vikrant1717/arrow
R
false
false
30,038
r
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Do transmission tree reconstruction & generate priors ----- source("R/utils.R") # Packages library(here) library(treerabid) # devtools::install_github("mrajeev08/treerabid") library(data.table) library(lubridate) library(dplyr) library(lubridate) library(magrittr) library(foreach) library(iterators) library(doRNG) ...
/analysis/scripts/00_trees_priors.R
no_license
mrajeev08/dynamicSD
R
false
false
3,863
r
# Do transmission tree reconstruction & generate priors ----- source("R/utils.R") # Packages library(here) library(treerabid) # devtools::install_github("mrajeev08/treerabid") library(data.table) library(lubridate) library(dplyr) library(lubridate) library(magrittr) library(foreach) library(iterators) library(doRNG) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/imports.most.R \name{imports.most} \alias{imports.most} \title{Mostly imported packages} \usage{ imports.most(imports, n = 10, year = FALSE) } \arguments{ \item{imports}{results of function imports()} \item{n}{the most frequency number} \it...
/man/imports.most.Rd
no_license
yikeshu0611/packagomatrics
R
false
true
1,279
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/imports.most.R \name{imports.most} \alias{imports.most} \title{Mostly imported packages} \usage{ imports.most(imports, n = 10, year = FALSE) } \arguments{ \item{imports}{results of function imports()} \item{n}{the most frequency number} \it...
library(coin) absoluteMeanDifferences <- function(group1,group2){ return(abs(mean(group1)-mean(group2))) } permTest <- function(group1,group2,permutations=1000){ testStatistic <- absoluteMeanDifferences observed <- testStatistic(group1,group2) allValues <- c(group1,group2) groupMemberShips <- c(rep(TRUE,l...
/permutationTest.R
no_license
rushkock/simulation_practice
R
false
false
2,133
r
library(coin) absoluteMeanDifferences <- function(group1,group2){ return(abs(mean(group1)-mean(group2))) } permTest <- function(group1,group2,permutations=1000){ testStatistic <- absoluteMeanDifferences observed <- testStatistic(group1,group2) allValues <- c(group1,group2) groupMemberShips <- c(rep(TRUE,l...
library(TMB) compile("birthDist.cpp","-O1 -g",DLLFLAGS="") dyn.load(dynlib("birthDist")) load("birthidstData.RDat") obj <- MakeADFun(data,parameters,DLL="birthDist",checkParameterOrder = FALSE) obj$fn() obj$gr() system.time(opt <- nlminb(obj$par,obj$fn,obj$gr,control = list(eval.max = 1e6,maxit = 1e6))) rep<-sdrep...
/scripts/BirthDist3.R
no_license
NorskRegnesentral/pupR
R
false
false
5,140
r
library(TMB) compile("birthDist.cpp","-O1 -g",DLLFLAGS="") dyn.load(dynlib("birthDist")) load("birthidstData.RDat") obj <- MakeADFun(data,parameters,DLL="birthDist",checkParameterOrder = FALSE) obj$fn() obj$gr() system.time(opt <- nlminb(obj$par,obj$fn,obj$gr,control = list(eval.max = 1e6,maxit = 1e6))) rep<-sdrep...
#Levels of a given vector v = c(1, 2, 3, 3, 4, NA, 3, 2, 4, 5, NA, 5) print("Original vector:") print(v) print("Levels of factor of the said vector:") print(levels(factor(v)))
/lvlofvector.r
permissive
maansisrivastava/Practice-code-R
R
false
false
182
r
#Levels of a given vector v = c(1, 2, 3, 3, 4, NA, 3, 2, 4, 5, NA, 5) print("Original vector:") print(v) print("Levels of factor of the said vector:") print(levels(factor(v)))
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SQLContext.R \name{tableToDF} \alias{tableToDF} \title{Create a SparkDataFrame from a SparkSQL table or view} \usage{ tableToDF(tableName) } \arguments{ \item{tableName}{the qualified or unqualified name that designates a table or view. If a ...
/man/tableToDF.Rd
no_license
cran/SparkR
R
false
true
902
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/SQLContext.R \name{tableToDF} \alias{tableToDF} \title{Create a SparkDataFrame from a SparkSQL table or view} \usage{ tableToDF(tableName) } \arguments{ \item{tableName}{the qualified or unqualified name that designates a table or view. If a ...
test_that("redist.plot.map works", { out <- redist.plot.map(shp = iowa, plan = iowa$cd_2010) expect_true('ggplot' %in% class(out)) iowa_map = redist_map(iowa, existing_plan = cd_2010, pop_tol=0.01) out <- iowa_map %>% redist.plot.map(shp = ., plan = get_existing(.)) expect_true('ggplot' %in% class(out)) ...
/tests/testthat/test_plots.R
no_license
LiYao-sfu/redist
R
false
false
969
r
test_that("redist.plot.map works", { out <- redist.plot.map(shp = iowa, plan = iowa$cd_2010) expect_true('ggplot' %in% class(out)) iowa_map = redist_map(iowa, existing_plan = cd_2010, pop_tol=0.01) out <- iowa_map %>% redist.plot.map(shp = ., plan = get_existing(.)) expect_true('ggplot' %in% class(out)) ...
\name{houseVotes} \alias{houseVotes} \docType{data} \title{ Congressional Voting Records Data} \description{ 1984 United Stated Congressional Voting Records for each of the U.S. House of Representatives Congressmen on the 16 key votes identified by the Congressional Quarterly Almanac. } \usage{data(houseVot...
/man/houseVotes.Rd
no_license
cran/fclust
R
false
false
2,200
rd
\name{houseVotes} \alias{houseVotes} \docType{data} \title{ Congressional Voting Records Data} \description{ 1984 United Stated Congressional Voting Records for each of the U.S. House of Representatives Congressmen on the 16 key votes identified by the Congressional Quarterly Almanac. } \usage{data(houseVot...
library(nws) ### Name: batchNodeList ### Title: NodeList Functions ### Aliases: batchNodeList sgeNodeList lsfNodeList pbsNodeList ### Keywords: utilities ### ** Examples Sys.setenv(LSB_HOSTS="node1 node2 node3") batchNodeList()
/data/genthat_extracted_code/nws/examples/batchNodeList.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
235
r
library(nws) ### Name: batchNodeList ### Title: NodeList Functions ### Aliases: batchNodeList sgeNodeList lsfNodeList pbsNodeList ### Keywords: utilities ### ** Examples Sys.setenv(LSB_HOSTS="node1 node2 node3") batchNodeList()
CAAJupiter_EclipticLongitude <- function(JD){ .Call("CAAJupiter_EclipticLongitude", JD) }
/R/CAAJupiter_EclipticLongitude.R
no_license
helixcn/skycalc
R
false
false
94
r
CAAJupiter_EclipticLongitude <- function(JD){ .Call("CAAJupiter_EclipticLongitude", JD) }